@databrainhq/plugin 0.17.9-beta.87 → 0.17.9-beta.88
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/{Accordion-BchG2sqH.mjs → Accordion-KS0wm76w.mjs} +1 -1
- package/dist/{CardChartSlot-BJI1-6Fi.mjs → CardChartSlot-f36Se2zp.mjs} +1037 -1136
- package/dist/{Chart-BPRIOdLy.mjs → Chart-Rc4bVXrP.mjs} +7 -7
- package/dist/{ChartTypePanel-C2dzGV9H.mjs → ChartTypePanel-DRtj1nYv.mjs} +8 -8
- package/dist/{CreateGlobalFilter-BW71NQ4I.mjs → CreateGlobalFilter-De08sbdM.mjs} +2 -2
- package/dist/{CreateMetricV2-zuJNx7dP.mjs → CreateMetricV2-JfzDCkrS.mjs} +114 -114
- package/dist/{HorizontalStackTable-KXmRc_vp.mjs → HorizontalStackTable-H35irNPp.mjs} +3 -3
- package/dist/{ManageMetricsV2-BFMvfYql.mjs → ManageMetricsV2-CW_ECoXq.mjs} +3 -3
- package/dist/{MetricCardV2-D3x8ndnd.mjs → MetricCardV2-Cc4BRMDI.mjs} +9 -9
- package/dist/{NoDataFound-CLh9t6Js.mjs → NoDataFound-ChRnPe__.mjs} +1 -1
- package/dist/{Panel-Boz3oznI.mjs → Panel-CPSFzQky.mjs} +1 -1
- package/dist/{PivotTableV2-Mv7SFrij.mjs → PivotTableV2-Dmju8J9j.mjs} +2 -2
- package/dist/{PivotTableV3-CKhiTUTm.mjs → PivotTableV3-BqxRB0lY.mjs} +4 -4
- package/dist/{Portal-BMZrD27q.mjs → Portal-CxaQIVhn.mjs} +16 -9
- package/dist/{RadioButton-BBuNPcbg.mjs → RadioButton-CEWeXTaM.mjs} +1 -1
- package/dist/{ScheduleEmail-BRQ_GGMS.mjs → ScheduleEmail-BUOR5Ndf.mjs} +6 -6
- package/dist/{SearchMetricData-Bp7RKjl3.mjs → SearchMetricData-QMT2fQYp.mjs} +13 -13
- package/dist/{SortPanel-DtAP__1J.mjs → SortPanel-g3-c65fe.mjs} +8 -8
- package/dist/{Table-Crhhoyf_.mjs → Table-Ug97LMpx.mjs} +508 -507
- package/dist/{TagInputField-SMeh_vdJ.mjs → TagInputField-dF1i5J37.mjs} +4 -4
- package/dist/{TextAreaField-osj4rqjy.mjs → TextAreaField-BGzFYxSp.mjs} +2 -2
- package/dist/{TimeSeriesSettings-B1vlydJ7.mjs → TimeSeriesSettings-C_aQh55Q.mjs} +2 -2
- package/dist/{clickActions-CYOdHxbd.mjs → clickActions-CXvfV7tl.mjs} +20 -20
- package/dist/{conditionalFormatting-9rsy1Jg2.mjs → conditionalFormatting-Di6YiWwV.mjs} +1 -1
- package/dist/{createGlobalFilter.module-5pE0s-Qa.mjs → createGlobalFilter.module-D0_y_Apc.mjs} +1 -1
- package/dist/{crossPointer-Ct4DXJEx.mjs → crossPointer-C8z2bN7w.mjs} +3 -3
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{metric.mutation-ZNTU8Fds.mjs → metric.mutation-7Ng2k216.mjs} +1 -1
- package/dist/{pluginV3Request-B0e7_2OA.mjs → pluginV3Request-CobM2ThT.mjs} +1 -1
- package/dist/{renderer-CqawuMjq.mjs → renderer-BCjoR_9v.mjs} +1 -1
- package/dist/{timeseries-D7495x32.mjs → timeseries-DI-9AaNe.mjs} +1 -1
- package/dist/{useGuesTokenUsageLog-zvPUY22Q.mjs → useGuesTokenUsageLog-D2Uirt1W.mjs} +1 -1
- package/dist/{useLoadingDeadline-BZ90HIjy.mjs → useLoadingDeadline-CUtZ9eIH.mjs} +569 -458
- package/dist/{usePublishArchivedMetrics-CnxDtwAz.mjs → usePublishArchivedMetrics-DpS4nzrY.mjs} +2 -2
- package/dist/{useQuery-BCy3fWon.mjs → useQuery-BEqCyDgw.mjs} +1 -1
- package/dist/webcomponents-styles.es.js +1 -1
- package/dist/webcomponents.es.js +1592 -1578
- package/dist/webcomponents.umd.js +28 -28
- package/package.json +1 -1
|
@@ -2,25 +2,25 @@ import * as e from "react";
|
|
|
2
2
|
import t, { createPortal as n, flushSync as r } from "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { a as i, n as a } from "./cardStates-C6q56mQy.mjs";
|
|
5
|
-
import { Dr as o, Er as s, Ja as c, Ka as l, On as u, Or as d, Tr as f, Ua as p, _r as m, dr as h, fr as g, g as _, h as v, m as y, mr as b, pr as x, ro as S, wr as C, yr as w } from "./Portal-
|
|
6
|
-
import { g as ee, w as T, y as E } from "./timeseries-
|
|
5
|
+
import { Dr as o, Er as s, Ja as c, Ka as l, On as u, Or as d, Tr as f, Ua as p, _r as m, dr as h, fr as g, g as _, h as v, m as y, mr as b, pr as x, ro as S, wr as C, yr as w } from "./Portal-CxaQIVhn.mjs";
|
|
6
|
+
import { g as ee, w as T, y as E } from "./timeseries-DI-9AaNe.mjs";
|
|
7
7
|
import { A as D, i as O } from "./format-q49rlYCT.mjs";
|
|
8
8
|
import { r as te } from "./contrast-Dse7KwXW.mjs";
|
|
9
|
-
import { A as k, E as ne, M as A, O as j, T as M,
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
9
|
+
import { A as k, E as ne, M as A, O as j, T as M, a as re, i as ie, j as N, k as P, n as ae, r as oe, s as se, t as ce } from "./crossPointer-C8z2bN7w.mjs";
|
|
10
|
+
import { S as le, a as ue, b as de, f as fe, i as pe, l as me, n as he, u as ge, y as _e } from "./useLoadingDeadline-CUtZ9eIH.mjs";
|
|
11
|
+
import { n as ve } from "./shadowContainer-CigTOXz8.mjs";
|
|
12
|
+
import { t as ye } from "./loading-state-D6iHFb1k.mjs";
|
|
13
13
|
import { t as F } from "./createLucideIcon-B89xLYvS.mjs";
|
|
14
|
-
import { _ as
|
|
15
|
-
import { A as
|
|
14
|
+
import { _ as be, a as xe, c as Se, d as I, h as Ce, l as we, m as Te, o as Ee, p as L, t as R, u as De } from "./qaSelectors-OdHjlXAo.mjs";
|
|
15
|
+
import { A as Oe, C as ke, D as Ae, E as je, H as Me, I as Ne, N as Pe, O as z, P as Fe, S as Ie, T as Le, V as Re, _ as ze, b as Be, d as Ve, f as He, g as Ue, h as We, j as Ge, k as Ke, m as qe, p as Je, u as Ye, v as Xe, w as Ze, x as Qe, y as $e } from "./dist-BN9zta-l.mjs";
|
|
16
16
|
import { t as et } from "./x-aT15zz1n.mjs";
|
|
17
|
-
import { t as
|
|
17
|
+
import { t as B } from "./dist-CfZineIA.mjs";
|
|
18
18
|
import { a as tt, c as nt, d as rt, f as it, i as at, l as ot, m as st, n as ct, o as lt, p as ut, r as dt, s as ft, t as pt, u as mt } from "./dist-DECbfGj7.mjs";
|
|
19
19
|
import { i as ht, n as gt, r as _t, t as vt } from "./tslib.es6-D1gkTN1m.mjs";
|
|
20
20
|
import { a as yt, c as bt, i as xt, l as St, n as Ct, o as wt, r as Tt, s as Et, t as Dt } from "./floating-ui.react-dom-D_Yhh-WK.mjs";
|
|
21
21
|
import { n as Ot, r as kt, t as At } from "./ChartCardOverlay-BU9Az6O8.mjs";
|
|
22
|
-
import jt, { Children as Mt, Fragment as Nt, cloneElement as Pt, createContext as Ft, createElement as
|
|
23
|
-
import { Fragment as Bt, jsx as
|
|
22
|
+
import jt, { Children as Mt, Fragment as Nt, cloneElement as Pt, createContext as Ft, createElement as V, forwardRef as H, isValidElement as It, useCallback as U, useContext as Lt, useEffect as W, useLayoutEffect as Rt, useMemo as zt, useRef as G, useState as K } from "react";
|
|
23
|
+
import { Fragment as Bt, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
24
24
|
var Vt = F("arrow-down", [["path", {
|
|
25
25
|
d: "M12 5v14",
|
|
26
26
|
key: "s699le"
|
|
@@ -161,7 +161,7 @@ var Vt = F("arrow-down", [["path", {
|
|
|
161
161
|
whiteSpace: "nowrap",
|
|
162
162
|
wordWrap: "normal"
|
|
163
163
|
}), nn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ en(function(e, t) {
|
|
164
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ q(Oe.span, {
|
|
165
165
|
...e,
|
|
166
166
|
ref: t,
|
|
167
167
|
style: {
|
|
@@ -172,7 +172,7 @@ var Vt = F("arrow-down", [["path", {
|
|
|
172
172
|
}, "VisuallyHidden"));
|
|
173
173
|
// ../../../node_modules/.pnpm/@radix-ui+react-menu@2.1.24_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_1a4859a4d38c8778bb96b91c46c24aae/node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
174
174
|
ht();
|
|
175
|
-
var rn = Object.defineProperty,
|
|
175
|
+
var rn = Object.defineProperty, Y = (e, t) => rn(e, "name", {
|
|
176
176
|
value: t,
|
|
177
177
|
configurable: !0
|
|
178
178
|
}), an = ["Enter", " "], on = [
|
|
@@ -189,14 +189,14 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
189
189
|
}, un = {
|
|
190
190
|
ltr: ["ArrowLeft"],
|
|
191
191
|
rtl: ["ArrowRight"]
|
|
192
|
-
}, dn = "Menu", [fn, pn, mn] = st(dn), [hn, gn] =
|
|
192
|
+
}, dn = "Menu", [fn, pn, mn] = st(dn), [hn, gn] = Ke(dn, [
|
|
193
193
|
mn,
|
|
194
194
|
it,
|
|
195
195
|
ft
|
|
196
|
-
]), _n = it(), vn = ft(), [yn, bn] = hn(dn), [xn, Sn] = hn(dn), Cn = /* @__PURE__ */
|
|
197
|
-
let { __scopeMenu: n, open: r = !1, children: i, dir: a, onOpenChange: o, modal: s = !0 } = t, c = _n(n), [l, u] = e.useState(null), d = e.useRef(!1), f =
|
|
196
|
+
]), _n = it(), vn = ft(), [yn, bn] = hn(dn), [xn, Sn] = hn(dn), Cn = /* @__PURE__ */ Y((t) => {
|
|
197
|
+
let { __scopeMenu: n, open: r = !1, children: i, dir: a, onOpenChange: o, modal: s = !0 } = t, c = _n(n), [l, u] = e.useState(null), d = e.useRef(!1), f = ke(o), p = ut(a);
|
|
198
198
|
return e.useEffect(() => {
|
|
199
|
-
let e = /* @__PURE__ */
|
|
199
|
+
let e = /* @__PURE__ */ Y(() => {
|
|
200
200
|
d.current = !0, document.addEventListener("pointerdown", t, {
|
|
201
201
|
capture: !0,
|
|
202
202
|
once: !0
|
|
@@ -204,23 +204,23 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
204
204
|
capture: !0,
|
|
205
205
|
once: !0
|
|
206
206
|
});
|
|
207
|
-
}, "handleKeyDown"), t = /* @__PURE__ */
|
|
207
|
+
}, "handleKeyDown"), t = /* @__PURE__ */ Y(() => d.current = !1, "handlePointer");
|
|
208
208
|
return document.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
209
209
|
document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
|
|
210
210
|
};
|
|
211
211
|
}, []), e.useEffect(() => {
|
|
212
212
|
if (!r) return;
|
|
213
|
-
let e = /* @__PURE__ */
|
|
213
|
+
let e = /* @__PURE__ */ Y(() => f(!1), "handleBlur");
|
|
214
214
|
return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
|
|
215
|
-
}, [r, f]), /* @__PURE__ */
|
|
215
|
+
}, [r, f]), /* @__PURE__ */ q(rt, {
|
|
216
216
|
...c,
|
|
217
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ q(yn, {
|
|
218
218
|
scope: n,
|
|
219
219
|
open: r,
|
|
220
220
|
onOpenChange: f,
|
|
221
221
|
content: l,
|
|
222
222
|
onContentChange: u,
|
|
223
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ q(xn, {
|
|
224
224
|
scope: n,
|
|
225
225
|
onClose: e.useCallback(() => f(!1), [f]),
|
|
226
226
|
isUsingKeyboardRef: d,
|
|
@@ -230,62 +230,62 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
230
230
|
})
|
|
231
231
|
})
|
|
232
232
|
});
|
|
233
|
-
}, "Menu"), wn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
233
|
+
}, "Menu"), wn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
234
234
|
let { __scopeMenu: n, ...r } = e, i = _n(n);
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ q(nt, {
|
|
236
236
|
...i,
|
|
237
237
|
...r,
|
|
238
238
|
ref: t
|
|
239
239
|
});
|
|
240
|
-
}, "MenuAnchor")), Tn = "MenuPortal", [En, Dn] = hn(Tn, { forceMount: void 0 }), On = /* @__PURE__ */
|
|
240
|
+
}, "MenuAnchor")), Tn = "MenuPortal", [En, Dn] = hn(Tn, { forceMount: void 0 }), On = /* @__PURE__ */ Y((e) => {
|
|
241
241
|
let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = bn(Tn, t);
|
|
242
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ q(En, {
|
|
243
243
|
scope: t,
|
|
244
244
|
forceMount: n,
|
|
245
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ q(Le, {
|
|
246
246
|
present: n || a.open,
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ q(Be, {
|
|
248
248
|
asChild: !0,
|
|
249
249
|
container: i,
|
|
250
250
|
children: r
|
|
251
251
|
})
|
|
252
252
|
})
|
|
253
253
|
});
|
|
254
|
-
}, "MenuPortal"), kn = "MenuContent", [An, jn] = hn(kn), Mn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
254
|
+
}, "MenuPortal"), kn = "MenuContent", [An, jn] = hn(kn), Mn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
255
255
|
let n = Dn(kn, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = bn(kn, e.__scopeMenu), o = Sn(kn, e.__scopeMenu);
|
|
256
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ q(fn.Provider, {
|
|
257
257
|
scope: e.__scopeMenu,
|
|
258
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ q(Le, {
|
|
259
259
|
present: r || a.open,
|
|
260
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ q(fn.Slot, {
|
|
261
261
|
scope: e.__scopeMenu,
|
|
262
|
-
children: o.modal ? /* @__PURE__ */
|
|
262
|
+
children: o.modal ? /* @__PURE__ */ q(Nn, {
|
|
263
263
|
...i,
|
|
264
264
|
ref: t
|
|
265
|
-
}) : /* @__PURE__ */
|
|
265
|
+
}) : /* @__PURE__ */ q(Pn, {
|
|
266
266
|
...i,
|
|
267
267
|
ref: t
|
|
268
268
|
})
|
|
269
269
|
})
|
|
270
270
|
})
|
|
271
271
|
});
|
|
272
|
-
}, "MenuContent")), Nn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
273
|
-
let r = bn(kn, t.__scopeMenu), i = e.useRef(null), a =
|
|
272
|
+
}, "MenuContent")), Nn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
273
|
+
let r = bn(kn, t.__scopeMenu), i = e.useRef(null), a = Ne(n, i);
|
|
274
274
|
return e.useEffect(() => {
|
|
275
275
|
let e = i.current;
|
|
276
|
-
if (e) return
|
|
277
|
-
}, []), /* @__PURE__ */
|
|
276
|
+
if (e) return Ye(e);
|
|
277
|
+
}, []), /* @__PURE__ */ q(In, {
|
|
278
278
|
...t,
|
|
279
279
|
ref: a,
|
|
280
280
|
trapFocus: r.open,
|
|
281
281
|
disableOutsidePointerEvents: r.open,
|
|
282
282
|
disableOutsideScroll: !0,
|
|
283
|
-
onFocusOutside:
|
|
283
|
+
onFocusOutside: z(t.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
284
284
|
onDismiss: () => r.onOpenChange(!1)
|
|
285
285
|
});
|
|
286
|
-
}, "MenuRootContentModal")), Pn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
286
|
+
}, "MenuRootContentModal")), Pn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
287
287
|
let n = bn(kn, e.__scopeMenu);
|
|
288
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ q(In, {
|
|
289
289
|
...e,
|
|
290
290
|
ref: t,
|
|
291
291
|
trapFocus: !1,
|
|
@@ -293,19 +293,19 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
293
293
|
disableOutsideScroll: !1,
|
|
294
294
|
onDismiss: () => n.onOpenChange(!1)
|
|
295
295
|
});
|
|
296
|
-
}, "MenuRootContentNonModal")), Fn =
|
|
297
|
-
let { __scopeMenu: r, loop: i = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: f, onInteractOutside: p, onDismiss: m, disableOutsideScroll: h, ...g } = t, _ = bn(kn, r), v = Sn(kn, r), y = _n(r), b = vn(r), x = pn(r), [S, C] = e.useState(null), w = e.useRef(null), ee =
|
|
296
|
+
}, "MenuRootContentNonModal")), Fn = Pe("MenuContent.ScrollLock"), In = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
297
|
+
let { __scopeMenu: r, loop: i = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: f, onInteractOutside: p, onDismiss: m, disableOutsideScroll: h, ...g } = t, _ = bn(kn, r), v = Sn(kn, r), y = _n(r), b = vn(r), x = pn(r), [S, C] = e.useState(null), w = e.useRef(null), ee = Ne(n, w, _.onContentChange), T = e.useRef(0), E = e.useRef(""), D = e.useRef(0), O = e.useRef(null), te = e.useRef("right"), k = e.useRef(0), ne = h ? Ve : e.Fragment, A = h ? {
|
|
298
298
|
as: Fn,
|
|
299
299
|
allowPinchZoom: !0
|
|
300
|
-
} : void 0, j = /* @__PURE__ */
|
|
300
|
+
} : void 0, j = /* @__PURE__ */ Y((e) => {
|
|
301
301
|
let t = E.current + e, n = x().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = or(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
|
|
302
|
-
(/* @__PURE__ */
|
|
302
|
+
(/* @__PURE__ */ Y((function e(t) {
|
|
303
303
|
E.current = t, window.clearTimeout(T.current), t !== "" && (T.current = window.setTimeout(() => e(""), 1e3));
|
|
304
304
|
}), "updateSearch"))(t), o && setTimeout(() => o.focus());
|
|
305
305
|
}, "handleTypeaheadSearch");
|
|
306
306
|
e.useEffect(() => () => window.clearTimeout(T.current), []), $e();
|
|
307
307
|
let M = e.useCallback((e) => te.current === O.current?.side && cr(e, O.current?.area), []);
|
|
308
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ q(An, {
|
|
309
309
|
scope: r,
|
|
310
310
|
searchRef: E,
|
|
311
311
|
onItemEnter: e.useCallback((e) => {
|
|
@@ -321,16 +321,16 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
321
321
|
onPointerGraceIntentChange: e.useCallback((e) => {
|
|
322
322
|
O.current = e;
|
|
323
323
|
}, []),
|
|
324
|
-
children: /* @__PURE__ */
|
|
324
|
+
children: /* @__PURE__ */ q(ne, {
|
|
325
325
|
...A,
|
|
326
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ q(Qe, {
|
|
327
327
|
asChild: !0,
|
|
328
328
|
trapped: a,
|
|
329
|
-
onMountAutoFocus:
|
|
329
|
+
onMountAutoFocus: z(o, (e) => {
|
|
330
330
|
e.preventDefault(), w.current?.focus({ preventScroll: !0 });
|
|
331
331
|
}),
|
|
332
332
|
onUnmountAutoFocus: s,
|
|
333
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ q(Ie, {
|
|
334
334
|
asChild: !0,
|
|
335
335
|
disableOutsidePointerEvents: c,
|
|
336
336
|
onEscapeKeyDown: u,
|
|
@@ -338,7 +338,7 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
338
338
|
onFocusOutside: f,
|
|
339
339
|
onInteractOutside: p,
|
|
340
340
|
onDismiss: m,
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ q(lt, {
|
|
342
342
|
asChild: !0,
|
|
343
343
|
...b,
|
|
344
344
|
dir: v.dir,
|
|
@@ -346,11 +346,11 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
346
346
|
loop: i,
|
|
347
347
|
currentTabStopId: S,
|
|
348
348
|
onCurrentTabStopIdChange: C,
|
|
349
|
-
onEntryFocus:
|
|
349
|
+
onEntryFocus: z(l, (e) => {
|
|
350
350
|
v.isUsingKeyboardRef.current || e.preventDefault();
|
|
351
351
|
}),
|
|
352
352
|
preventScrollOnEntryFocus: !0,
|
|
353
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ q(mt, {
|
|
354
354
|
role: "menu",
|
|
355
355
|
"aria-orientation": "vertical",
|
|
356
356
|
"data-state": tr(_.open),
|
|
@@ -363,7 +363,7 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
363
363
|
outline: "none",
|
|
364
364
|
...g.style
|
|
365
365
|
},
|
|
366
|
-
onKeyDown:
|
|
366
|
+
onKeyDown: z(g.onKeyDown, (e) => {
|
|
367
367
|
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
|
|
368
368
|
t && (e.key === "Tab" && e.preventDefault(), !n && r && j(e.key));
|
|
369
369
|
let i = w.current;
|
|
@@ -372,10 +372,10 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
372
372
|
let a = x().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
373
373
|
sn.includes(e.key) && a.reverse(), ir(a);
|
|
374
374
|
}),
|
|
375
|
-
onBlur:
|
|
375
|
+
onBlur: z(t.onBlur, (e) => {
|
|
376
376
|
e.currentTarget.contains(e.target) || (window.clearTimeout(T.current), E.current = "");
|
|
377
377
|
}),
|
|
378
|
-
onPointerMove:
|
|
378
|
+
onPointerMove: z(t.onPointerMove, lr((e) => {
|
|
379
379
|
let t = e.target, n = k.current !== e.clientX;
|
|
380
380
|
if (e.currentTarget.contains(t) && n) {
|
|
381
381
|
let t = e.clientX > k.current ? "right" : "left";
|
|
@@ -388,99 +388,99 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
388
388
|
})
|
|
389
389
|
})
|
|
390
390
|
});
|
|
391
|
-
}, "MenuContentImpl")), Ln = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
391
|
+
}, "MenuContentImpl")), Ln = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
392
392
|
let { __scopeMenu: n, ...r } = e;
|
|
393
|
-
return /* @__PURE__ */
|
|
393
|
+
return /* @__PURE__ */ q(Oe.div, {
|
|
394
394
|
...r,
|
|
395
395
|
ref: t
|
|
396
396
|
});
|
|
397
|
-
}, "MenuLabel")), Rn = "MenuItem", zn = "menu.itemSelect", Bn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
398
|
-
let { disabled: r = !1, onSelect: i, ...a } = t, o = e.useRef(null), s = Sn(Rn, t.__scopeMenu), c = jn(Rn, t.__scopeMenu), l =
|
|
397
|
+
}, "MenuLabel")), Rn = "MenuItem", zn = "menu.itemSelect", Bn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
398
|
+
let { disabled: r = !1, onSelect: i, ...a } = t, o = e.useRef(null), s = Sn(Rn, t.__scopeMenu), c = jn(Rn, t.__scopeMenu), l = Ne(n, o), u = e.useRef(!1), d = /* @__PURE__ */ Y(() => {
|
|
399
399
|
let e = o.current;
|
|
400
400
|
if (!r && e) {
|
|
401
401
|
let t = new CustomEvent(zn, {
|
|
402
402
|
bubbles: !0,
|
|
403
403
|
cancelable: !0
|
|
404
404
|
});
|
|
405
|
-
e.addEventListener(zn, (e) => i?.(e), { once: !0 }),
|
|
405
|
+
e.addEventListener(zn, (e) => i?.(e), { once: !0 }), Ge(e, t), t.defaultPrevented ? u.current = !1 : s.onClose();
|
|
406
406
|
}
|
|
407
407
|
}, "handleSelect");
|
|
408
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ q(Vn, {
|
|
409
409
|
...a,
|
|
410
410
|
ref: l,
|
|
411
411
|
disabled: r,
|
|
412
|
-
onClick:
|
|
412
|
+
onClick: z(t.onClick, d),
|
|
413
413
|
onPointerDown: (e) => {
|
|
414
414
|
t.onPointerDown?.(e), u.current = !0;
|
|
415
415
|
},
|
|
416
|
-
onPointerUp:
|
|
416
|
+
onPointerUp: z(t.onPointerUp, (e) => {
|
|
417
417
|
u.current || e.currentTarget?.click();
|
|
418
418
|
}),
|
|
419
|
-
onKeyDown:
|
|
419
|
+
onKeyDown: z(t.onKeyDown, (e) => {
|
|
420
420
|
r || e.target !== e.currentTarget || (c.searchRef.current === "" || e.key !== " ") && an.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
|
|
421
421
|
})
|
|
422
422
|
});
|
|
423
|
-
}, "MenuItem")), Vn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
424
|
-
let { __scopeMenu: r, disabled: i = !1, textValue: a, ...o } = t, s = jn(Rn, r), c = vn(r), l = e.useRef(null), u =
|
|
423
|
+
}, "MenuItem")), Vn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
424
|
+
let { __scopeMenu: r, disabled: i = !1, textValue: a, ...o } = t, s = jn(Rn, r), c = vn(r), l = e.useRef(null), u = Ne(n, l), [d, f] = e.useState(!1), [p, m] = e.useState("");
|
|
425
425
|
return e.useEffect(() => {
|
|
426
426
|
let e = l.current;
|
|
427
427
|
e && m((e.textContent ?? "").trim());
|
|
428
|
-
}, [o.children]), /* @__PURE__ */
|
|
428
|
+
}, [o.children]), /* @__PURE__ */ q(fn.ItemSlot, {
|
|
429
429
|
scope: r,
|
|
430
430
|
disabled: i,
|
|
431
431
|
textValue: a ?? p,
|
|
432
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ q(tt, {
|
|
433
433
|
asChild: !0,
|
|
434
434
|
...c,
|
|
435
435
|
focusable: !i,
|
|
436
|
-
children: /* @__PURE__ */
|
|
436
|
+
children: /* @__PURE__ */ q(Oe.div, {
|
|
437
437
|
role: "menuitem",
|
|
438
438
|
"data-highlighted": d ? "" : void 0,
|
|
439
439
|
"aria-disabled": i || void 0,
|
|
440
440
|
"data-disabled": i ? "" : void 0,
|
|
441
441
|
...o,
|
|
442
442
|
ref: u,
|
|
443
|
-
onPointerMove:
|
|
443
|
+
onPointerMove: z(t.onPointerMove, lr((e) => {
|
|
444
444
|
i ? s.onItemLeave(e) : (s.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
|
|
445
445
|
})),
|
|
446
|
-
onPointerLeave:
|
|
447
|
-
onFocus:
|
|
448
|
-
onBlur:
|
|
446
|
+
onPointerLeave: z(t.onPointerLeave, lr((e) => s.onItemLeave(e))),
|
|
447
|
+
onFocus: z(t.onFocus, () => f(!0)),
|
|
448
|
+
onBlur: z(t.onBlur, () => f(!1))
|
|
449
449
|
})
|
|
450
450
|
})
|
|
451
451
|
});
|
|
452
452
|
}, "MenuItemImpl")), [Hn, Un] = hn("MenuRadioGroup", {
|
|
453
453
|
value: void 0,
|
|
454
|
-
onValueChange: /* @__PURE__ */
|
|
455
|
-
}), [Wn, Gn] = hn("MenuItemIndicator", { checked: !1 }), Kn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
454
|
+
onValueChange: /* @__PURE__ */ Y(() => {}, "onValueChange")
|
|
455
|
+
}), [Wn, Gn] = hn("MenuItemIndicator", { checked: !1 }), Kn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
456
456
|
let { __scopeMenu: n, ...r } = e;
|
|
457
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ q(Oe.div, {
|
|
458
458
|
role: "separator",
|
|
459
459
|
"aria-orientation": "horizontal",
|
|
460
460
|
...r,
|
|
461
461
|
ref: t
|
|
462
462
|
});
|
|
463
|
-
}, "MenuSeparator")), qn = "MenuSub", [Jn, Yn] = hn(qn), Xn = /* @__PURE__ */
|
|
464
|
-
let { __scopeMenu: n, children: r, open: i = !1, onOpenChange: a } = t, o = bn(qn, n), s = _n(n), [c, l] = e.useState(null), [u, d] = e.useState(null), f =
|
|
465
|
-
return e.useEffect(() => (o.open === !1 && f(!1), () => f(!1)), [o.open, f]), /* @__PURE__ */
|
|
463
|
+
}, "MenuSeparator")), qn = "MenuSub", [Jn, Yn] = hn(qn), Xn = /* @__PURE__ */ Y((t) => {
|
|
464
|
+
let { __scopeMenu: n, children: r, open: i = !1, onOpenChange: a } = t, o = bn(qn, n), s = _n(n), [c, l] = e.useState(null), [u, d] = e.useState(null), f = ke(a);
|
|
465
|
+
return e.useEffect(() => (o.open === !1 && f(!1), () => f(!1)), [o.open, f]), /* @__PURE__ */ q(rt, {
|
|
466
466
|
...s,
|
|
467
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ q(yn, {
|
|
468
468
|
scope: n,
|
|
469
469
|
open: i,
|
|
470
470
|
onOpenChange: f,
|
|
471
471
|
content: u,
|
|
472
472
|
onContentChange: d,
|
|
473
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ q(Jn, {
|
|
474
474
|
scope: n,
|
|
475
|
-
contentId:
|
|
476
|
-
triggerId:
|
|
475
|
+
contentId: Ze(),
|
|
476
|
+
triggerId: Ze(),
|
|
477
477
|
trigger: c,
|
|
478
478
|
onTriggerChange: l,
|
|
479
479
|
children: r
|
|
480
480
|
})
|
|
481
481
|
})
|
|
482
482
|
});
|
|
483
|
-
}, "MenuSub"), Zn = "MenuSubTrigger", Qn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
483
|
+
}, "MenuSub"), Zn = "MenuSubTrigger", Qn = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
484
484
|
let r = bn(Zn, t.__scopeMenu), i = Sn(Zn, t.__scopeMenu), a = Yn(Zn, t.__scopeMenu), o = jn(Zn, t.__scopeMenu), s = e.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: l } = o, u = { __scopeMenu: t.__scopeMenu }, d = e.useCallback(() => {
|
|
485
485
|
s.current && window.clearTimeout(s.current), s.current = null;
|
|
486
486
|
}, []);
|
|
@@ -490,11 +490,11 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
490
490
|
window.clearTimeout(e), l(null);
|
|
491
491
|
};
|
|
492
492
|
}, [c, l]);
|
|
493
|
-
let f =
|
|
494
|
-
return /* @__PURE__ */
|
|
493
|
+
let f = Ne(n, a.onTriggerChange);
|
|
494
|
+
return /* @__PURE__ */ q(wn, {
|
|
495
495
|
asChild: !0,
|
|
496
496
|
...u,
|
|
497
|
-
children: /* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ q(Vn, {
|
|
498
498
|
id: a.triggerId,
|
|
499
499
|
"aria-haspopup": "menu",
|
|
500
500
|
"aria-expanded": r.open,
|
|
@@ -505,12 +505,12 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
505
505
|
onClick: (e) => {
|
|
506
506
|
t.onClick?.(e), !(t.disabled || e.defaultPrevented) && (e.currentTarget.focus(), r.open || r.onOpenChange(!0));
|
|
507
507
|
},
|
|
508
|
-
onPointerMove:
|
|
508
|
+
onPointerMove: z(t.onPointerMove, lr((e) => {
|
|
509
509
|
o.onItemEnter(e), e.defaultPrevented || t.disabled || r.open || s.current || (o.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
510
510
|
r.onOpenChange(!0), d();
|
|
511
511
|
}, 100));
|
|
512
512
|
})),
|
|
513
|
-
onPointerLeave:
|
|
513
|
+
onPointerLeave: z(t.onPointerLeave, lr((e) => {
|
|
514
514
|
d();
|
|
515
515
|
let t = r.content?.getBoundingClientRect();
|
|
516
516
|
if (t) {
|
|
@@ -545,20 +545,20 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
545
545
|
o.onPointerGraceIntentChange(null);
|
|
546
546
|
}
|
|
547
547
|
})),
|
|
548
|
-
onKeyDown:
|
|
548
|
+
onKeyDown: z(t.onKeyDown, (e) => {
|
|
549
549
|
t.disabled || e.target !== e.currentTarget || (o.searchRef.current === "" || e.key !== " ") && ln[i.dir].includes(e.key) && (r.onOpenChange(!0), r.content?.focus(), e.preventDefault());
|
|
550
550
|
})
|
|
551
551
|
})
|
|
552
552
|
});
|
|
553
|
-
}, "MenuSubTrigger")), $n = "MenuSubContent", er = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
554
|
-
let r = Dn(kn, t.__scopeMenu), { forceMount: i = r.forceMount, align: a = "start", ...o } = t, s = bn(kn, t.__scopeMenu), c = Sn(kn, t.__scopeMenu), l = Yn($n, t.__scopeMenu), u = e.useRef(null), d =
|
|
555
|
-
return /* @__PURE__ */
|
|
553
|
+
}, "MenuSubTrigger")), $n = "MenuSubContent", er = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ Y(function(t, n) {
|
|
554
|
+
let r = Dn(kn, t.__scopeMenu), { forceMount: i = r.forceMount, align: a = "start", ...o } = t, s = bn(kn, t.__scopeMenu), c = Sn(kn, t.__scopeMenu), l = Yn($n, t.__scopeMenu), u = e.useRef(null), d = Ne(n, u);
|
|
555
|
+
return /* @__PURE__ */ q(fn.Provider, {
|
|
556
556
|
scope: t.__scopeMenu,
|
|
557
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ q(Le, {
|
|
558
558
|
present: i || s.open,
|
|
559
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ q(fn.Slot, {
|
|
560
560
|
scope: t.__scopeMenu,
|
|
561
|
-
children: /* @__PURE__ */
|
|
561
|
+
children: /* @__PURE__ */ q(In, {
|
|
562
562
|
id: l.contentId,
|
|
563
563
|
"aria-labelledby": l.triggerId,
|
|
564
564
|
...o,
|
|
@@ -572,13 +572,13 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
572
572
|
c.isUsingKeyboardRef.current && u.current?.focus(), e.preventDefault();
|
|
573
573
|
},
|
|
574
574
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
575
|
-
onFocusOutside:
|
|
575
|
+
onFocusOutside: z(t.onFocusOutside, (e) => {
|
|
576
576
|
e.target !== l.trigger && s.onOpenChange(!1);
|
|
577
577
|
}),
|
|
578
|
-
onEscapeKeyDown:
|
|
578
|
+
onEscapeKeyDown: z(t.onEscapeKeyDown, (e) => {
|
|
579
579
|
c.onClose(), e.preventDefault();
|
|
580
580
|
}),
|
|
581
|
-
onKeyDown:
|
|
581
|
+
onKeyDown: z(t.onKeyDown, (e) => {
|
|
582
582
|
let t = e.currentTarget.contains(e.target), n = un[c.dir].includes(e.key);
|
|
583
583
|
t && n && (s.onOpenChange(!1), l.trigger?.focus(), e.preventDefault());
|
|
584
584
|
})
|
|
@@ -590,31 +590,31 @@ var rn = Object.defineProperty, J = (e, t) => rn(e, "name", {
|
|
|
590
590
|
function tr(e) {
|
|
591
591
|
return e ? "open" : "closed";
|
|
592
592
|
}
|
|
593
|
-
|
|
593
|
+
Y(tr, "getOpenState");
|
|
594
594
|
function nr(e) {
|
|
595
595
|
return e === "indeterminate";
|
|
596
596
|
}
|
|
597
|
-
|
|
597
|
+
Y(nr, "isIndeterminate");
|
|
598
598
|
function rr(e) {
|
|
599
599
|
return nr(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
600
600
|
}
|
|
601
|
-
|
|
601
|
+
Y(rr, "getCheckedState");
|
|
602
602
|
function ir(e) {
|
|
603
603
|
let t = document.activeElement;
|
|
604
604
|
for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
605
605
|
}
|
|
606
|
-
|
|
606
|
+
Y(ir, "focusFirst");
|
|
607
607
|
function ar(e, t) {
|
|
608
608
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
609
609
|
}
|
|
610
|
-
|
|
610
|
+
Y(ar, "wrapArray");
|
|
611
611
|
function or(e, t, n) {
|
|
612
612
|
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = ar(e, Math.max(i, 0));
|
|
613
613
|
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
614
614
|
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
|
|
615
615
|
return o === n ? void 0 : o;
|
|
616
616
|
}
|
|
617
|
-
|
|
617
|
+
Y(or, "getNextMatch");
|
|
618
618
|
function sr(e, t) {
|
|
619
619
|
let { x: n, y: r } = e, i = !1;
|
|
620
620
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
@@ -623,38 +623,38 @@ function sr(e, t) {
|
|
|
623
623
|
}
|
|
624
624
|
return i;
|
|
625
625
|
}
|
|
626
|
-
|
|
626
|
+
Y(sr, "isPointInPolygon");
|
|
627
627
|
function cr(e, t) {
|
|
628
628
|
return t ? sr({
|
|
629
629
|
x: e.clientX,
|
|
630
630
|
y: e.clientY
|
|
631
631
|
}, t) : !1;
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
Y(cr, "isPointerInGraceArea");
|
|
634
634
|
function lr(e) {
|
|
635
635
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
636
636
|
}
|
|
637
|
-
|
|
637
|
+
Y(lr, "whenMouse");
|
|
638
638
|
var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr = Qn, yr = er, br = Object.defineProperty, xr = (e, t) => br(e, "name", {
|
|
639
639
|
value: t,
|
|
640
640
|
configurable: !0
|
|
641
|
-
}), Sr = "DropdownMenu", [Cr, wr] =
|
|
642
|
-
let { __scopeDropdownMenu: n, children: r, dir: i, open: a, defaultOpen: o, onOpenChange: s, modal: c = !0 } = t, l = Tr(n), u = e.useRef(null), [d, f] =
|
|
641
|
+
}), Sr = "DropdownMenu", [Cr, wr] = Ke(Sr, [gn]), Tr = gn(), [Er, Dr] = Cr(Sr), Or = /* @__PURE__ */ xr((t) => {
|
|
642
|
+
let { __scopeDropdownMenu: n, children: r, dir: i, open: a, defaultOpen: o, onOpenChange: s, modal: c = !0 } = t, l = Tr(n), u = e.useRef(null), [d, f] = je({
|
|
643
643
|
prop: a,
|
|
644
644
|
defaultProp: o ?? !1,
|
|
645
645
|
onChange: s,
|
|
646
646
|
caller: Sr
|
|
647
647
|
});
|
|
648
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ q(Er, {
|
|
649
649
|
scope: n,
|
|
650
|
-
triggerId:
|
|
650
|
+
triggerId: Ze(),
|
|
651
651
|
triggerRef: u,
|
|
652
|
-
contentId:
|
|
652
|
+
contentId: Ze(),
|
|
653
653
|
open: d,
|
|
654
654
|
onOpenChange: f,
|
|
655
655
|
onOpenToggle: e.useCallback(() => f((e) => !e), [f]),
|
|
656
656
|
modal: c,
|
|
657
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ q(ur, {
|
|
658
658
|
...l,
|
|
659
659
|
open: d,
|
|
660
660
|
onOpenChange: f,
|
|
@@ -664,11 +664,11 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
664
664
|
})
|
|
665
665
|
});
|
|
666
666
|
}, "DropdownMenu"), kr = "DropdownMenuTrigger", Ar = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
667
|
-
let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = Dr(kr, n), o = Tr(n), s =
|
|
668
|
-
return /* @__PURE__ */
|
|
667
|
+
let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = Dr(kr, n), o = Tr(n), s = Ne(t, a.triggerRef);
|
|
668
|
+
return /* @__PURE__ */ q(dr, {
|
|
669
669
|
asChild: !0,
|
|
670
670
|
...o,
|
|
671
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ q(Oe.button, {
|
|
672
672
|
type: "button",
|
|
673
673
|
id: a.triggerId,
|
|
674
674
|
"aria-haspopup": "menu",
|
|
@@ -679,10 +679,10 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
679
679
|
disabled: r,
|
|
680
680
|
...i,
|
|
681
681
|
ref: s,
|
|
682
|
-
onPointerDown:
|
|
682
|
+
onPointerDown: z(e.onPointerDown, (e) => {
|
|
683
683
|
!r && e.button === 0 && e.ctrlKey === !1 && (a.onOpenToggle(), a.open || e.preventDefault());
|
|
684
684
|
}),
|
|
685
|
-
onKeyDown:
|
|
685
|
+
onKeyDown: z(e.onKeyDown, (e) => {
|
|
686
686
|
r || (["Enter", " "].includes(e.key) && a.onOpenToggle(), e.key === "ArrowDown" && a.onOpenChange(!0), [
|
|
687
687
|
"Enter",
|
|
688
688
|
" ",
|
|
@@ -693,22 +693,22 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
693
693
|
});
|
|
694
694
|
}, "DropdownMenuTrigger")), jr = /* @__PURE__ */ xr((e) => {
|
|
695
695
|
let { __scopeDropdownMenu: t, ...n } = e, r = Tr(t);
|
|
696
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ q(fr, {
|
|
697
697
|
...r,
|
|
698
698
|
...n
|
|
699
699
|
});
|
|
700
700
|
}, "DropdownMenuPortal"), Mr = "DropdownMenuContent", Nr = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(t, n) {
|
|
701
701
|
let { __scopeDropdownMenu: r, ...i } = t, a = Dr(Mr, r), o = Tr(r), s = e.useRef(!1);
|
|
702
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ q(pr, {
|
|
703
703
|
id: a.contentId,
|
|
704
704
|
"aria-labelledby": a.triggerId,
|
|
705
705
|
...o,
|
|
706
706
|
...i,
|
|
707
707
|
ref: n,
|
|
708
|
-
onCloseAutoFocus:
|
|
708
|
+
onCloseAutoFocus: z(t.onCloseAutoFocus, (e) => {
|
|
709
709
|
s.current || a.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
|
|
710
710
|
}),
|
|
711
|
-
onInteractOutside:
|
|
711
|
+
onInteractOutside: z(t.onInteractOutside, (e) => {
|
|
712
712
|
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
713
713
|
(!a.modal || r) && (s.current = !0);
|
|
714
714
|
}),
|
|
@@ -723,33 +723,33 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
723
723
|
});
|
|
724
724
|
}, "DropdownMenuContent")), Pr = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
725
725
|
let { __scopeDropdownMenu: n, ...r } = e, i = Tr(n);
|
|
726
|
-
return /* @__PURE__ */
|
|
726
|
+
return /* @__PURE__ */ q(mr, {
|
|
727
727
|
...i,
|
|
728
728
|
...r,
|
|
729
729
|
ref: t
|
|
730
730
|
});
|
|
731
731
|
}, "DropdownMenuLabel")), Fr = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
732
732
|
let { __scopeDropdownMenu: n, ...r } = e, i = Tr(n);
|
|
733
|
-
return /* @__PURE__ */
|
|
733
|
+
return /* @__PURE__ */ q(hr, {
|
|
734
734
|
...i,
|
|
735
735
|
...r,
|
|
736
736
|
ref: t
|
|
737
737
|
});
|
|
738
738
|
}, "DropdownMenuItem")), Ir = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
739
739
|
let { __scopeDropdownMenu: n, ...r } = e, i = Tr(n);
|
|
740
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ q(gr, {
|
|
741
741
|
...i,
|
|
742
742
|
...r,
|
|
743
743
|
ref: t
|
|
744
744
|
});
|
|
745
745
|
}, "DropdownMenuSeparator")), Lr = /* @__PURE__ */ xr((e) => {
|
|
746
|
-
let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = Tr(t), [s, c] =
|
|
746
|
+
let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = Tr(t), [s, c] = je({
|
|
747
747
|
prop: r,
|
|
748
748
|
defaultProp: a ?? !1,
|
|
749
749
|
onChange: i,
|
|
750
750
|
caller: "DropdownMenuSub"
|
|
751
751
|
});
|
|
752
|
-
return /* @__PURE__ */
|
|
752
|
+
return /* @__PURE__ */ q(_r, {
|
|
753
753
|
...o,
|
|
754
754
|
open: s,
|
|
755
755
|
onOpenChange: c,
|
|
@@ -757,14 +757,14 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
757
757
|
});
|
|
758
758
|
}, "DropdownMenuSub"), Rr = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
759
759
|
let { __scopeDropdownMenu: n, ...r } = e, i = Tr(n);
|
|
760
|
-
return /* @__PURE__ */
|
|
760
|
+
return /* @__PURE__ */ q(vr, {
|
|
761
761
|
...i,
|
|
762
762
|
...r,
|
|
763
763
|
ref: t
|
|
764
764
|
});
|
|
765
765
|
}, "DropdownMenuSubTrigger")), zr = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ xr(function(e, t) {
|
|
766
766
|
let { __scopeDropdownMenu: n, ...r } = e, i = Tr(n);
|
|
767
|
-
return /* @__PURE__ */
|
|
767
|
+
return /* @__PURE__ */ q(yr, {
|
|
768
768
|
...i,
|
|
769
769
|
...r,
|
|
770
770
|
ref: t,
|
|
@@ -777,15 +777,15 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
777
777
|
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
778
778
|
}
|
|
779
779
|
});
|
|
780
|
-
}, "DropdownMenuSubContent")), Br = Or, Vr = Ar, Hr = jr, Ur = Nr, Wr = Pr, Gr = Fr, Kr = Ir, qr = Lr, Jr = Rr, Yr = zr, Xr = Object.defineProperty,
|
|
780
|
+
}, "DropdownMenuSubContent")), Br = Or, Vr = Ar, Hr = jr, Ur = Nr, Wr = Pr, Gr = Fr, Kr = Ir, qr = Lr, Jr = Rr, Yr = zr, Xr = Object.defineProperty, X = (e, t) => Xr(e, "name", {
|
|
781
781
|
value: t,
|
|
782
782
|
configurable: !0
|
|
783
|
-
}), [Zr, Qr] =
|
|
783
|
+
}), [Zr, Qr] = Ke("Tooltip", [it]), $r = it(), ei = "TooltipProvider", ti = 700, ni = "tooltip.open", [ri, ii] = Zr(ei), ai = /* @__PURE__ */ X((t) => {
|
|
784
784
|
let { __scopeTooltip: n, delayDuration: r = ti, skipDelayDuration: i = 300, disableHoverableContent: a = !1, children: o } = t, s = e.useRef(!0), c = e.useRef(!1), l = e.useRef(0);
|
|
785
785
|
return e.useEffect(() => {
|
|
786
786
|
let e = l.current;
|
|
787
787
|
return () => window.clearTimeout(e);
|
|
788
|
-
}, []), /* @__PURE__ */
|
|
788
|
+
}, []), /* @__PURE__ */ q(ri, {
|
|
789
789
|
scope: n,
|
|
790
790
|
isOpenDelayedRef: s,
|
|
791
791
|
delayDuration: r,
|
|
@@ -802,11 +802,11 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
802
802
|
disableHoverableContent: a,
|
|
803
803
|
children: o
|
|
804
804
|
});
|
|
805
|
-
}, "TooltipProvider"), oi = "Tooltip", [si, ci] = Zr(oi), li = /* @__PURE__ */
|
|
806
|
-
let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l = ii(oi, t.__scopeTooltip), u = $r(n), [d, f] = e.useState(null), [p, m] = e.useState(void 0), h =
|
|
805
|
+
}, "TooltipProvider"), oi = "Tooltip", [si, ci] = Zr(oi), li = /* @__PURE__ */ X((t) => {
|
|
806
|
+
let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l = ii(oi, t.__scopeTooltip), u = $r(n), [d, f] = e.useState(null), [p, m] = e.useState(void 0), h = Ze(), g = e.useRef(0), _ = s ?? l.disableHoverableContent, v = c ?? l.delayDuration, y = e.useRef(!1), [b, x] = je({
|
|
807
807
|
prop: i,
|
|
808
808
|
defaultProp: a ?? !1,
|
|
809
|
-
onChange: /* @__PURE__ */
|
|
809
|
+
onChange: /* @__PURE__ */ X((e) => {
|
|
810
810
|
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(ni))) : l.onClose(), o?.(e);
|
|
811
811
|
}, "onChange"),
|
|
812
812
|
caller: oi
|
|
@@ -823,9 +823,9 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
823
823
|
g.current &&= (window.clearTimeout(g.current), 0);
|
|
824
824
|
}, []);
|
|
825
825
|
let T = p ?? h;
|
|
826
|
-
return /* @__PURE__ */
|
|
826
|
+
return /* @__PURE__ */ q(rt, {
|
|
827
827
|
...u,
|
|
828
|
-
children: /* @__PURE__ */
|
|
828
|
+
children: /* @__PURE__ */ q(si, {
|
|
829
829
|
scope: n,
|
|
830
830
|
contentId: T,
|
|
831
831
|
setContentId: m,
|
|
@@ -849,62 +849,62 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
849
849
|
children: r
|
|
850
850
|
})
|
|
851
851
|
});
|
|
852
|
-
}, "Tooltip"), ui = "TooltipTrigger", di = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
853
|
-
let { __scopeTooltip: r, ...i } = t, a = ci(ui, r), o = ii(ui, r), s = $r(r), c = e.useRef(null), l =
|
|
854
|
-
return e.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */
|
|
852
|
+
}, "Tooltip"), ui = "TooltipTrigger", di = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ X(function(t, n) {
|
|
853
|
+
let { __scopeTooltip: r, ...i } = t, a = ci(ui, r), o = ii(ui, r), s = $r(r), c = e.useRef(null), l = Ne(n, c, a.onTriggerChange), u = e.useRef(!1), d = e.useRef(!1), f = e.useCallback(() => u.current = !1, []);
|
|
854
|
+
return e.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ q(nt, {
|
|
855
855
|
asChild: !0,
|
|
856
856
|
...s,
|
|
857
|
-
children: /* @__PURE__ */
|
|
857
|
+
children: /* @__PURE__ */ q(Oe.button, {
|
|
858
858
|
"aria-describedby": a.open ? a.contentId : void 0,
|
|
859
859
|
"data-state": a.stateAttribute,
|
|
860
860
|
...i,
|
|
861
861
|
ref: l,
|
|
862
|
-
onPointerMove:
|
|
862
|
+
onPointerMove: z(t.onPointerMove, (e) => {
|
|
863
863
|
e.pointerType !== "touch" && !d.current && !o.isPointerInTransitRef.current && (a.onTriggerEnter(), d.current = !0);
|
|
864
864
|
}),
|
|
865
|
-
onPointerLeave:
|
|
865
|
+
onPointerLeave: z(t.onPointerLeave, () => {
|
|
866
866
|
a.onTriggerLeave(), d.current = !1;
|
|
867
867
|
}),
|
|
868
|
-
onPointerDown:
|
|
868
|
+
onPointerDown: z(t.onPointerDown, () => {
|
|
869
869
|
a.open && a.onClose(), u.current = !0, document.addEventListener("pointerup", f, { once: !0 });
|
|
870
870
|
}),
|
|
871
|
-
onFocus:
|
|
871
|
+
onFocus: z(t.onFocus, () => {
|
|
872
872
|
u.current || a.onOpen();
|
|
873
873
|
}),
|
|
874
|
-
onBlur:
|
|
875
|
-
onClick:
|
|
874
|
+
onBlur: z(t.onBlur, a.onClose),
|
|
875
|
+
onClick: z(t.onClick, a.onClose)
|
|
876
876
|
})
|
|
877
877
|
});
|
|
878
|
-
}, "TooltipTrigger")), fi = "TooltipPortal", [pi, mi] = Zr(fi, { forceMount: void 0 }), hi = /* @__PURE__ */
|
|
878
|
+
}, "TooltipTrigger")), fi = "TooltipPortal", [pi, mi] = Zr(fi, { forceMount: void 0 }), hi = /* @__PURE__ */ X((e) => {
|
|
879
879
|
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = ci(fi, t);
|
|
880
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ q(pi, {
|
|
881
881
|
scope: t,
|
|
882
882
|
forceMount: n,
|
|
883
|
-
children: /* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ q(Le, {
|
|
884
884
|
present: n || a.open,
|
|
885
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ q(Be, {
|
|
886
886
|
asChild: !0,
|
|
887
887
|
container: i,
|
|
888
888
|
children: r
|
|
889
889
|
})
|
|
890
890
|
})
|
|
891
891
|
});
|
|
892
|
-
}, "TooltipPortal"), gi = "TooltipContent", _i = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
892
|
+
}, "TooltipPortal"), gi = "TooltipContent", _i = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
893
893
|
let n = mi(gi, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = ci(gi, e.__scopeTooltip);
|
|
894
|
-
return /* @__PURE__ */
|
|
894
|
+
return /* @__PURE__ */ q(Le, {
|
|
895
895
|
present: r || o.open,
|
|
896
|
-
children: o.disableHoverableContent ? /* @__PURE__ */
|
|
896
|
+
children: o.disableHoverableContent ? /* @__PURE__ */ q(bi, {
|
|
897
897
|
side: i,
|
|
898
898
|
...a,
|
|
899
899
|
ref: t
|
|
900
|
-
}) : /* @__PURE__ */
|
|
900
|
+
}) : /* @__PURE__ */ q(vi, {
|
|
901
901
|
side: i,
|
|
902
902
|
...a,
|
|
903
903
|
ref: t
|
|
904
904
|
})
|
|
905
905
|
});
|
|
906
|
-
}, "TooltipContent")), vi = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
907
|
-
let r = ci(gi, t.__scopeTooltip), i = ii(gi, t.__scopeTooltip), a = e.useRef(null), o =
|
|
906
|
+
}, "TooltipContent")), vi = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ X(function(t, n) {
|
|
907
|
+
let r = ci(gi, t.__scopeTooltip), i = ii(gi, t.__scopeTooltip), a = e.useRef(null), o = Ne(n, a), [s, c] = e.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = e.useCallback(() => {
|
|
908
908
|
c(null), f(!1);
|
|
909
909
|
}, [f]), m = e.useCallback((e, t) => {
|
|
910
910
|
let n = e.currentTarget, r = {
|
|
@@ -915,7 +915,7 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
915
915
|
}, [f]);
|
|
916
916
|
return e.useEffect(() => () => p(), [p]), e.useEffect(() => {
|
|
917
917
|
if (l && d) {
|
|
918
|
-
let e = /* @__PURE__ */
|
|
918
|
+
let e = /* @__PURE__ */ X((e) => m(e, d), "handleTriggerLeave"), t = /* @__PURE__ */ X((e) => m(e, l), "handleContentLeave");
|
|
919
919
|
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
|
|
920
920
|
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
|
|
921
921
|
};
|
|
@@ -927,7 +927,7 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
927
927
|
p
|
|
928
928
|
]), e.useEffect(() => {
|
|
929
929
|
if (s) {
|
|
930
|
-
let e = /* @__PURE__ */
|
|
930
|
+
let e = /* @__PURE__ */ X((e) => {
|
|
931
931
|
let t = e.target, n = {
|
|
932
932
|
x: e.clientX,
|
|
933
933
|
y: e.clientY
|
|
@@ -942,31 +942,31 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
942
942
|
s,
|
|
943
943
|
u,
|
|
944
944
|
p
|
|
945
|
-
]), /* @__PURE__ */
|
|
945
|
+
]), /* @__PURE__ */ q(bi, {
|
|
946
946
|
...t,
|
|
947
947
|
ref: o
|
|
948
948
|
});
|
|
949
|
-
}, "TooltipContentHoverable")), yi =
|
|
949
|
+
}, "TooltipContentHoverable")), yi = Fe("TooltipContent"), bi = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ X(function(t, n) {
|
|
950
950
|
let { __scopeTooltip: r, children: i, "aria-label": a, id: o, onEscapeKeyDown: s, onPointerDownOutside: c, ...l } = t, u = ci(gi, r), d = $r(r), { onClose: f } = u;
|
|
951
951
|
e.useEffect(() => (document.addEventListener(ni, f), () => document.removeEventListener(ni, f)), [f]), e.useEffect(() => {
|
|
952
952
|
if (u.trigger) {
|
|
953
|
-
let e = /* @__PURE__ */
|
|
953
|
+
let e = /* @__PURE__ */ X((e) => {
|
|
954
954
|
e.target instanceof Node && e.target.contains(u.trigger) && f();
|
|
955
955
|
}, "handleScroll");
|
|
956
956
|
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
957
957
|
}
|
|
958
958
|
}, [u.trigger, f]);
|
|
959
959
|
let { setContentId: p } = u;
|
|
960
|
-
return
|
|
960
|
+
return Ae(() => (p(o), () => {
|
|
961
961
|
p(void 0);
|
|
962
|
-
}), [o, p]), /* @__PURE__ */
|
|
962
|
+
}), [o, p]), /* @__PURE__ */ q(Ie, {
|
|
963
963
|
asChild: !0,
|
|
964
964
|
disableOutsidePointerEvents: !1,
|
|
965
965
|
onEscapeKeyDown: s,
|
|
966
966
|
onPointerDownOutside: c,
|
|
967
967
|
onFocusOutside: (e) => e.preventDefault(),
|
|
968
968
|
onDismiss: f,
|
|
969
|
-
children: /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ J(mt, {
|
|
970
970
|
"data-state": u.stateAttribute,
|
|
971
971
|
role: a ? void 0 : "tooltip",
|
|
972
972
|
id: a ? void 0 : u.contentId,
|
|
@@ -981,16 +981,16 @@ var ur = Cn, dr = wn, fr = On, pr = Mn, mr = Ln, hr = Bn, gr = Kn, _r = Xn, vr =
|
|
|
981
981
|
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
982
982
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
983
983
|
},
|
|
984
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ q(yi, { children: i }), a ? /* @__PURE__ */ q(nn, {
|
|
985
985
|
id: u.contentId,
|
|
986
986
|
role: "tooltip",
|
|
987
987
|
children: a
|
|
988
988
|
}) : null]
|
|
989
989
|
})
|
|
990
990
|
});
|
|
991
|
-
}, "TooltipContentImpl")), xi = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */
|
|
991
|
+
}, "TooltipContentImpl")), xi = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
992
992
|
let { __scopeTooltip: n, ...r } = e, i = $r(n);
|
|
993
|
-
return /* @__PURE__ */
|
|
993
|
+
return /* @__PURE__ */ q(ot, {
|
|
994
994
|
...i,
|
|
995
995
|
...r,
|
|
996
996
|
ref: t
|
|
@@ -1006,7 +1006,7 @@ function Si(e, t) {
|
|
|
1006
1006
|
default: throw Error("unreachable");
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
|
|
1009
|
+
X(Si, "getExitSideFromRect");
|
|
1010
1010
|
function Ci(e, t, n = 5) {
|
|
1011
1011
|
let r = [];
|
|
1012
1012
|
switch (t) {
|
|
@@ -1047,7 +1047,7 @@ function Ci(e, t, n = 5) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return r;
|
|
1049
1049
|
}
|
|
1050
|
-
|
|
1050
|
+
X(Ci, "getPaddedExitPoints");
|
|
1051
1051
|
function wi(e) {
|
|
1052
1052
|
let { top: t, right: n, bottom: r, left: i } = e;
|
|
1053
1053
|
return [
|
|
@@ -1069,7 +1069,7 @@ function wi(e) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
];
|
|
1071
1071
|
}
|
|
1072
|
-
|
|
1072
|
+
X(wi, "getPointsFromRect");
|
|
1073
1073
|
function Ti(e, t) {
|
|
1074
1074
|
let { x: n, y: r } = e, i = !1;
|
|
1075
1075
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
@@ -1078,12 +1078,12 @@ function Ti(e, t) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
return i;
|
|
1080
1080
|
}
|
|
1081
|
-
|
|
1081
|
+
X(Ti, "isPointInPolygon");
|
|
1082
1082
|
function Ei(e) {
|
|
1083
1083
|
let t = e.slice();
|
|
1084
1084
|
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Di(t);
|
|
1085
1085
|
}
|
|
1086
|
-
|
|
1086
|
+
X(Ei, "getHull");
|
|
1087
1087
|
function Di(e) {
|
|
1088
1088
|
if (e.length <= 1) return e.slice();
|
|
1089
1089
|
let t = [];
|
|
@@ -1109,69 +1109,69 @@ function Di(e) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
1111
1111
|
}
|
|
1112
|
-
|
|
1112
|
+
X(Di, "getHullPresorted");
|
|
1113
1113
|
var Oi = ai, ki = li, Ai = di, ji = hi, Mi = _i, Ni = xi, Pi = "p-1 rounded-(--radius-md)", Fi = {
|
|
1114
1114
|
auto: "min-w-[180px] max-w-[min(22rem,calc(100vw-2rem))]",
|
|
1115
1115
|
sm: "w-[180px]",
|
|
1116
1116
|
md: "w-[220px]",
|
|
1117
1117
|
lg: "w-[280px]",
|
|
1118
1118
|
xl: "w-[360px]"
|
|
1119
|
-
}, Ii = (e, t) => e === "trigger" ? t : Fi[e], Li = "bg-(--popover) text-(--popover-foreground) shadow-[var(--shadow-overlay)] ring-1 ring-(--border)", Ri = "animate-menu-in motion-reduce:animate-none", zi = "group/menu-item relative flex min-h-7 min-w-0 cursor-pointer items-center gap-2 rounded-(--radius-xs) px-2 py-1 text-sm whitespace-normal [overflow-wrap:anywhere] outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4", Bi = "text-(--foreground) focus:bg-(--accent) focus:text-(--foreground) data-highlighted:bg-(--accent) data-disabled:pointer-events-none data-disabled:opacity-50", Vi = "data-[variant=destructive]:text-(--destructive) data-[variant=destructive]:focus:bg-(--destructive)/10 data-[variant=destructive]:focus:text-(--destructive) data-[variant=destructive]:*:[svg]:text-(--destructive)", Hi = "data-inset:pl-8", Ui = "pr-7", Wi = "pointer-events-none absolute right-2 flex items-center justify-center", Gi = "px-2 pt-1.5 pb-1 text-[11px] font-medium text-(--muted-foreground) data-inset:pl-8", Ki = "-mx-1 my-1 h-px bg-(--border)/60", qi = "mb-1 border-b border-(--border)/60 px-1 pt-0.5 pb-1.5", Ji = "overflow-x-hidden overflow-y-auto overscroll-contain [scrollbar-gutter:auto] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-(--border) hover:[&::-webkit-scrollbar-thumb]:bg-(--muted-foreground) [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent]", Yi = "px-2 py-6 text-center text-sm text-(--muted-foreground)", Xi = "w-(--radix-dropdown-menu-trigger-width) min-w-45", Zi = "min-w-radix-dropdown-trigger", Qi = "max-h-(--radix-dropdown-menu-content-available-height)", $i = "origin-(--radix-dropdown-menu-content-transform-origin)", ea = ({ ...e }) => /* @__PURE__ */
|
|
1119
|
+
}, Ii = (e, t) => e === "trigger" ? t : Fi[e], Li = "bg-(--popover) text-(--popover-foreground) shadow-[var(--shadow-overlay)] ring-1 ring-(--border)", Ri = "animate-menu-in motion-reduce:animate-none", zi = "group/menu-item relative flex min-h-7 min-w-0 cursor-pointer items-center gap-2 rounded-(--radius-xs) px-2 py-1 text-sm whitespace-normal [overflow-wrap:anywhere] outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4", Bi = "text-(--foreground) focus:bg-(--accent) focus:text-(--foreground) data-highlighted:bg-(--accent) data-disabled:pointer-events-none data-disabled:opacity-50", Vi = "data-[variant=destructive]:text-(--destructive) data-[variant=destructive]:focus:bg-(--destructive)/10 data-[variant=destructive]:focus:text-(--destructive) data-[variant=destructive]:*:[svg]:text-(--destructive)", Hi = "data-inset:pl-8", Ui = "pr-7", Wi = "pointer-events-none absolute right-2 flex items-center justify-center", Gi = "px-2 pt-1.5 pb-1 text-[11px] font-medium text-(--muted-foreground) data-inset:pl-8", Ki = "-mx-1 my-1 h-px bg-(--border)/60", qi = "mb-1 border-b border-(--border)/60 px-1 pt-0.5 pb-1.5", Ji = "overflow-x-hidden overflow-y-auto overscroll-contain [scrollbar-gutter:auto] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-(--border) hover:[&::-webkit-scrollbar-thumb]:bg-(--muted-foreground) [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent]", Yi = "px-2 py-6 text-center text-sm text-(--muted-foreground)", Xi = "w-(--radix-dropdown-menu-trigger-width) min-w-45", Zi = "min-w-radix-dropdown-trigger", Qi = "max-h-(--radix-dropdown-menu-content-available-height)", $i = "origin-(--radix-dropdown-menu-content-transform-origin)", ea = ({ ...e }) => /* @__PURE__ */ q(Br, {
|
|
1120
1120
|
"data-slot": "dropdown-menu",
|
|
1121
1121
|
...e
|
|
1122
|
-
}), ta = ({ ...e }) => /* @__PURE__ */
|
|
1122
|
+
}), ta = ({ ...e }) => /* @__PURE__ */ q(Vr, {
|
|
1123
1123
|
"data-slot": "dropdown-menu-trigger",
|
|
1124
1124
|
...e
|
|
1125
1125
|
}), na = ({ className: e, align: t = "start", sideOffset: n = 4, hideWhenDetached: r = !0, size: i = "auto", ...a }) => {
|
|
1126
|
-
let o =
|
|
1127
|
-
return /* @__PURE__ */
|
|
1126
|
+
let o = ve();
|
|
1127
|
+
return /* @__PURE__ */ q(Hr, {
|
|
1128
1128
|
container: o ?? void 0,
|
|
1129
|
-
children: /* @__PURE__ */
|
|
1129
|
+
children: /* @__PURE__ */ q(Ur, {
|
|
1130
1130
|
"data-slot": "dropdown-menu-content",
|
|
1131
1131
|
sideOffset: n,
|
|
1132
1132
|
align: t,
|
|
1133
1133
|
hideWhenDetached: r,
|
|
1134
|
-
className:
|
|
1134
|
+
className: B("pointer-events-auto z-app-popover", Ii(i, Xi), Zi, Qi, Ji, Pi, Li, $i, Ri, e),
|
|
1135
1135
|
...a
|
|
1136
1136
|
})
|
|
1137
1137
|
});
|
|
1138
|
-
}, ra = ({ className: e, inset: t, variant: n = "default", ...r }) => /* @__PURE__ */
|
|
1138
|
+
}, ra = ({ className: e, inset: t, variant: n = "default", ...r }) => /* @__PURE__ */ q(Gr, {
|
|
1139
1139
|
"data-slot": "dropdown-menu-item",
|
|
1140
1140
|
"data-inset": t,
|
|
1141
1141
|
"data-variant": n,
|
|
1142
|
-
className:
|
|
1142
|
+
className: B(zi, Bi, Vi, Hi, e),
|
|
1143
1143
|
...r
|
|
1144
|
-
}), ia = ({ className: e, inset: t, ...n }) => /* @__PURE__ */
|
|
1144
|
+
}), ia = ({ className: e, inset: t, ...n }) => /* @__PURE__ */ q(Wr, {
|
|
1145
1145
|
"data-slot": "dropdown-menu-label",
|
|
1146
1146
|
"data-inset": t,
|
|
1147
|
-
className:
|
|
1147
|
+
className: B(Gi, e),
|
|
1148
1148
|
...n
|
|
1149
|
-
}), aa = ({ className: e, ...t }) => /* @__PURE__ */
|
|
1149
|
+
}), aa = ({ className: e, ...t }) => /* @__PURE__ */ q(Kr, {
|
|
1150
1150
|
"data-slot": "dropdown-menu-separator",
|
|
1151
|
-
className:
|
|
1151
|
+
className: B(Ki, e),
|
|
1152
1152
|
...t
|
|
1153
|
-
}), oa = ({ className: e, ...t }) => /* @__PURE__ */
|
|
1153
|
+
}), oa = ({ className: e, ...t }) => /* @__PURE__ */ q("div", {
|
|
1154
1154
|
"data-slot": "dropdown-menu-empty",
|
|
1155
|
-
className:
|
|
1155
|
+
className: B(Yi, e),
|
|
1156
1156
|
...t
|
|
1157
|
-
}), sa = ({ ...e }) => /* @__PURE__ */
|
|
1157
|
+
}), sa = ({ ...e }) => /* @__PURE__ */ q(qr, {
|
|
1158
1158
|
"data-slot": "dropdown-menu-sub",
|
|
1159
1159
|
...e
|
|
1160
|
-
}), ca = ({ className: e, inset: t, children: n, ...r }) => /* @__PURE__ */
|
|
1160
|
+
}), ca = ({ className: e, inset: t, children: n, ...r }) => /* @__PURE__ */ J(Jr, {
|
|
1161
1161
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
1162
1162
|
"data-inset": t,
|
|
1163
|
-
className:
|
|
1163
|
+
className: B(zi, Bi, Hi, "data-[state=open]:bg-(--accent)", e),
|
|
1164
1164
|
...r,
|
|
1165
|
-
children: [n, /* @__PURE__ */
|
|
1166
|
-
}), la = ({ className: e, ...t }) => /* @__PURE__ */
|
|
1165
|
+
children: [n, /* @__PURE__ */ q(y, { className: "ml-auto text-(--muted-foreground)" })]
|
|
1166
|
+
}), la = ({ className: e, ...t }) => /* @__PURE__ */ q(Yr, {
|
|
1167
1167
|
"data-slot": "dropdown-menu-sub-content",
|
|
1168
|
-
className:
|
|
1168
|
+
className: B("z-app-popover min-w-45 overflow-hidden", Pi, Li, $i, Ri, e),
|
|
1169
1169
|
...t
|
|
1170
1170
|
}), ua = "w-(--radix-popover-trigger-width) min-w-[180px]", da = "min-w-radix-popover-trigger", fa = "max-h-(--radix-popover-content-available-height)", pa = "origin-(--radix-popover-content-transform-origin)", ma = dt, ha = at, ga = e.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, hideWhenDetached: r = !0, size: i = "auto", padding: a = "menu", onWheel: o, onTouchMove: s, ...c }, l) => {
|
|
1171
|
-
let u =
|
|
1172
|
-
return /* @__PURE__ */
|
|
1171
|
+
let u = ve();
|
|
1172
|
+
return /* @__PURE__ */ q(ct, {
|
|
1173
1173
|
container: u ?? void 0,
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1174
|
+
children: /* @__PURE__ */ q(pt, {
|
|
1175
1175
|
ref: l,
|
|
1176
1176
|
"data-slot": "popover-content",
|
|
1177
1177
|
align: t,
|
|
@@ -1183,28 +1183,28 @@ var Oi = ai, ki = li, Ai = di, ji = hi, Mi = _i, Ni = xi, Pi = "p-1 rounded-(--r
|
|
|
1183
1183
|
onTouchMove: (e) => {
|
|
1184
1184
|
e.stopPropagation(), s?.(e);
|
|
1185
1185
|
},
|
|
1186
|
-
className:
|
|
1186
|
+
className: B("pointer-events-auto z-app-popover outline-hidden", fa, Ii(i, ua), da, Ji, a === "menu" && "p-1 rounded-(--radius-md)", a === "form" && "p-3 rounded-(--radius-md)", a === "none" && "rounded-(--radius-md)", Li, pa, Ri, e),
|
|
1187
1187
|
...c
|
|
1188
1188
|
})
|
|
1189
1189
|
});
|
|
1190
1190
|
});
|
|
1191
1191
|
ga.displayName = "PopoverContent";
|
|
1192
1192
|
// ../../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1193
|
-
function
|
|
1194
|
-
return
|
|
1193
|
+
function Z() {
|
|
1194
|
+
return Z = Object.assign ? Object.assign.bind() : function(e) {
|
|
1195
1195
|
for (var t = 1; t < arguments.length; t++) {
|
|
1196
1196
|
var n = arguments[t];
|
|
1197
1197
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1198
1198
|
}
|
|
1199
1199
|
return e;
|
|
1200
|
-
},
|
|
1200
|
+
}, Z.apply(null, arguments);
|
|
1201
1201
|
}
|
|
1202
1202
|
// ../../../node_modules/.pnpm/@radix-ui+number@1.0.1/node_modules/@radix-ui/number/dist/index.mjs
|
|
1203
1203
|
function _a(e, [t, n]) {
|
|
1204
1204
|
return Math.min(n, Math.max(t, e));
|
|
1205
1205
|
}
|
|
1206
1206
|
// ../../../node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
1207
|
-
function
|
|
1207
|
+
function Q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
1208
1208
|
return function(r) {
|
|
1209
1209
|
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
|
|
1210
1210
|
};
|
|
@@ -1217,7 +1217,7 @@ function va(e, t = []) {
|
|
|
1217
1217
|
n = [...n, r];
|
|
1218
1218
|
function o(t) {
|
|
1219
1219
|
let { scope: n, children: r, ...o } = t, s = n?.[e][a] || i, c = zt(() => o, Object.values(o));
|
|
1220
|
-
return /*#__PURE__*/
|
|
1220
|
+
return /*#__PURE__*/ V(s.Provider, { value: c }, r);
|
|
1221
1221
|
}
|
|
1222
1222
|
function s(n, o) {
|
|
1223
1223
|
let s = o?.[e][a] || i, c = Lt(s);
|
|
@@ -1267,20 +1267,20 @@ function ba(e, t) {
|
|
|
1267
1267
|
function xa(...e) {
|
|
1268
1268
|
return (t) => e.forEach((e) => ba(e, t));
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1271
|
-
return
|
|
1270
|
+
function $(...e) {
|
|
1271
|
+
return U(xa(...e), e);
|
|
1272
1272
|
}
|
|
1273
1273
|
// ../../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
1274
|
-
var Sa = /*#__PURE__*/
|
|
1274
|
+
var Sa = /*#__PURE__*/ H((e, t) => {
|
|
1275
1275
|
let { children: n, ...r } = e, i = Mt.toArray(n), a = i.find(Ta);
|
|
1276
1276
|
if (a) {
|
|
1277
1277
|
let e = a.props.children, n = i.map((t) => t === a ? Mt.count(e) > 1 ? Mt.only(null) : /*#__PURE__*/ It(e) ? e.props.children : null : t);
|
|
1278
|
-
return /*#__PURE__*/
|
|
1278
|
+
return /*#__PURE__*/ V(Ca, Z({}, r, { ref: t }), /*#__PURE__*/ It(e) ? /*#__PURE__*/ Pt(e, void 0, n) : null);
|
|
1279
1279
|
}
|
|
1280
|
-
return /*#__PURE__*/
|
|
1280
|
+
return /*#__PURE__*/ V(Ca, Z({}, r, { ref: t }), n);
|
|
1281
1281
|
});
|
|
1282
1282
|
Sa.displayName = "Slot";
|
|
1283
|
-
var Ca = /*#__PURE__*/
|
|
1283
|
+
var Ca = /*#__PURE__*/ H((e, t) => {
|
|
1284
1284
|
let { children: n, ...r } = e;
|
|
1285
1285
|
return /*#__PURE__*/ It(n) ? /*#__PURE__*/ Pt(n, {
|
|
1286
1286
|
...Ea(r, n.props),
|
|
@@ -1288,7 +1288,7 @@ var Ca = /*#__PURE__*/ V((e, t) => {
|
|
|
1288
1288
|
}) : Mt.count(n) > 1 ? Mt.only(null) : null;
|
|
1289
1289
|
});
|
|
1290
1290
|
Ca.displayName = "SlotClone";
|
|
1291
|
-
var wa = ({ children: e }) => /*#__PURE__*/
|
|
1291
|
+
var wa = ({ children: e }) => /*#__PURE__*/ V(Nt, null, e);
|
|
1292
1292
|
function Ta(e) {
|
|
1293
1293
|
return /*#__PURE__*/ It(e) && e.type === wa;
|
|
1294
1294
|
}
|
|
@@ -1321,10 +1321,10 @@ function Da(e) {
|
|
|
1321
1321
|
collectionRef: r
|
|
1322
1322
|
}, n);
|
|
1323
1323
|
}, s = e + "CollectionSlot", c = /*#__PURE__*/ jt.forwardRef((e, t) => {
|
|
1324
|
-
let { scope: n, children: r } = e, i =
|
|
1324
|
+
let { scope: n, children: r } = e, i = $(t, a(s, n).collectionRef);
|
|
1325
1325
|
return /*#__PURE__*/ jt.createElement(Sa, { ref: i }, r);
|
|
1326
1326
|
}), l = e + "CollectionItemSlot", u = "data-radix-collection-item", d = /*#__PURE__*/ jt.forwardRef((e, t) => {
|
|
1327
|
-
let { scope: n, children: r, ...i } = e, o = jt.useRef(null), s =
|
|
1327
|
+
let { scope: n, children: r, ...i } = e, o = jt.useRef(null), s = $(t, o), c = a(l, n);
|
|
1328
1328
|
return jt.useEffect(() => (c.itemMap.set(o, {
|
|
1329
1329
|
ref: o,
|
|
1330
1330
|
...i
|
|
@@ -1359,7 +1359,7 @@ function ka(e) {
|
|
|
1359
1359
|
return e || t || "ltr";
|
|
1360
1360
|
}
|
|
1361
1361
|
// ../../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_94f34b397b97d33b29436eacc871db5a/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1362
|
-
var
|
|
1362
|
+
var Aa = [
|
|
1363
1363
|
"a",
|
|
1364
1364
|
"button",
|
|
1365
1365
|
"div",
|
|
@@ -1377,31 +1377,31 @@ var $ = [
|
|
|
1377
1377
|
"svg",
|
|
1378
1378
|
"ul"
|
|
1379
1379
|
].reduce((e, t) => {
|
|
1380
|
-
let n = /*#__PURE__*/
|
|
1380
|
+
let n = /*#__PURE__*/ H((e, n) => {
|
|
1381
1381
|
let { asChild: r, ...i } = e, a = r ? Sa : t;
|
|
1382
|
-
return
|
|
1382
|
+
return W(() => {
|
|
1383
1383
|
window[Symbol.for("radix-ui")] = !0;
|
|
1384
|
-
}, []), /*#__PURE__*/
|
|
1384
|
+
}, []), /*#__PURE__*/ V(a, Z({}, i, { ref: n }));
|
|
1385
1385
|
});
|
|
1386
1386
|
return n.displayName = `Primitive.${t}`, {
|
|
1387
1387
|
...e,
|
|
1388
1388
|
[t]: n
|
|
1389
1389
|
};
|
|
1390
1390
|
}, {});
|
|
1391
|
-
function
|
|
1391
|
+
function ja(e, t) {
|
|
1392
1392
|
e && r(() => e.dispatchEvent(t));
|
|
1393
1393
|
}
|
|
1394
1394
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
1395
|
-
function
|
|
1396
|
-
let t =
|
|
1397
|
-
return
|
|
1395
|
+
function Ma(e) {
|
|
1396
|
+
let t = G(e);
|
|
1397
|
+
return W(() => {
|
|
1398
1398
|
t.current = e;
|
|
1399
1399
|
}), zt(() => (...e) => t.current?.call(t, ...e), []);
|
|
1400
1400
|
}
|
|
1401
1401
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.0.3_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
1402
|
-
function
|
|
1403
|
-
let n =
|
|
1404
|
-
|
|
1402
|
+
function Na(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1403
|
+
let n = Ma(e);
|
|
1404
|
+
W(() => {
|
|
1405
1405
|
let e = (e) => {
|
|
1406
1406
|
e.key === "Escape" && n(e);
|
|
1407
1407
|
};
|
|
@@ -1409,53 +1409,53 @@ function Ma(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1409
1409
|
}, [n, t]);
|
|
1410
1410
|
}
|
|
1411
1411
|
// ../../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.4_@types+react-dom@19.3.0_@types+react@19.3.0__@t_b32c4814390ede723344f3a2c967422a/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1412
|
-
var
|
|
1412
|
+
var Pa = "dismissableLayer.update", Fa = "dismissableLayer.pointerDownOutside", Ia = "dismissableLayer.focusOutside", La, Ra = /*#__PURE__*/ Ft({
|
|
1413
1413
|
layers: /* @__PURE__ */ new Set(),
|
|
1414
1414
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1415
1415
|
branches: /* @__PURE__ */ new Set()
|
|
1416
|
-
}),
|
|
1417
|
-
let { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: a, onInteractOutside: o, onDismiss: s, ...c } = e, l = Lt(
|
|
1416
|
+
}), za = /*#__PURE__*/ H((e, t) => {
|
|
1417
|
+
let { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: a, onInteractOutside: o, onDismiss: s, ...c } = e, l = Lt(Ra), [u, d] = K(null), f = u?.ownerDocument ?? (globalThis == null ? void 0 : globalThis.document), [, p] = K({}), m = $(t, (e) => d(e)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = h.indexOf(g), v = u ? h.indexOf(u) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, b = v >= _, x = Ba((e) => {
|
|
1418
1418
|
let t = e.target, n = [...l.branches].some((e) => e.contains(t));
|
|
1419
1419
|
b && !n && (i?.(e), o?.(e), e.defaultPrevented || s?.());
|
|
1420
|
-
}, f), S =
|
|
1420
|
+
}, f), S = Va((e) => {
|
|
1421
1421
|
let t = e.target;
|
|
1422
1422
|
[...l.branches].some((e) => e.contains(t)) || (a?.(e), o?.(e), e.defaultPrevented || s?.());
|
|
1423
1423
|
}, f);
|
|
1424
|
-
return
|
|
1424
|
+
return Na((e) => {
|
|
1425
1425
|
v === l.layers.size - 1 && (r?.(e), !e.defaultPrevented && s && (e.preventDefault(), s()));
|
|
1426
|
-
}, f),
|
|
1427
|
-
if (u) return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
1428
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents =
|
|
1426
|
+
}, f), W(() => {
|
|
1427
|
+
if (u) return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (La = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(u)), l.layers.add(u), Ha(), () => {
|
|
1428
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = La);
|
|
1429
1429
|
};
|
|
1430
1430
|
}, [
|
|
1431
1431
|
u,
|
|
1432
1432
|
f,
|
|
1433
1433
|
n,
|
|
1434
1434
|
l
|
|
1435
|
-
]),
|
|
1436
|
-
u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u),
|
|
1437
|
-
}, [u, l]),
|
|
1435
|
+
]), W(() => () => {
|
|
1436
|
+
u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u), Ha());
|
|
1437
|
+
}, [u, l]), W(() => {
|
|
1438
1438
|
let e = () => p({});
|
|
1439
|
-
return document.addEventListener(
|
|
1440
|
-
}, []), /*#__PURE__*/
|
|
1439
|
+
return document.addEventListener(Pa, e), () => document.removeEventListener(Pa, e);
|
|
1440
|
+
}, []), /*#__PURE__*/ V(Aa.div, Z({}, c, {
|
|
1441
1441
|
ref: m,
|
|
1442
1442
|
style: {
|
|
1443
1443
|
pointerEvents: y ? b ? "auto" : "none" : void 0,
|
|
1444
1444
|
...e.style
|
|
1445
1445
|
},
|
|
1446
|
-
onFocusCapture:
|
|
1447
|
-
onBlurCapture:
|
|
1448
|
-
onPointerDownCapture:
|
|
1446
|
+
onFocusCapture: Q(e.onFocusCapture, S.onFocusCapture),
|
|
1447
|
+
onBlurCapture: Q(e.onBlurCapture, S.onBlurCapture),
|
|
1448
|
+
onPointerDownCapture: Q(e.onPointerDownCapture, x.onPointerDownCapture)
|
|
1449
1449
|
}));
|
|
1450
1450
|
});
|
|
1451
|
-
function
|
|
1452
|
-
let n =
|
|
1453
|
-
return
|
|
1451
|
+
function Ba(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1452
|
+
let n = Ma(e), r = G(!1), i = G(() => {});
|
|
1453
|
+
return W(() => {
|
|
1454
1454
|
let e = (e) => {
|
|
1455
1455
|
if (e.target && !r.current) {
|
|
1456
1456
|
let r = { originalEvent: e };
|
|
1457
1457
|
function a() {
|
|
1458
|
-
|
|
1458
|
+
Ua(Fa, n, r, { discrete: !0 });
|
|
1459
1459
|
}
|
|
1460
1460
|
e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = a, t.addEventListener("click", i.current, { once: !0 })) : a();
|
|
1461
1461
|
}
|
|
@@ -1468,11 +1468,11 @@ function za(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1468
1468
|
};
|
|
1469
1469
|
}, [t, n]), { onPointerDownCapture: () => r.current = !0 };
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let n =
|
|
1473
|
-
return
|
|
1471
|
+
function Va(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1472
|
+
let n = Ma(e), r = G(!1);
|
|
1473
|
+
return W(() => {
|
|
1474
1474
|
let e = (e) => {
|
|
1475
|
-
e.target && !r.current &&
|
|
1475
|
+
e.target && !r.current && Ua(Ia, n, { originalEvent: e }, { discrete: !1 });
|
|
1476
1476
|
};
|
|
1477
1477
|
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
1478
1478
|
}, [t, n]), {
|
|
@@ -1480,38 +1480,38 @@ function Ba(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1480
1480
|
onBlurCapture: () => r.current = !1
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
let e = new CustomEvent(
|
|
1483
|
+
function Ha() {
|
|
1484
|
+
let e = new CustomEvent(Pa);
|
|
1485
1485
|
document.dispatchEvent(e);
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Ua(e, t, n, { discrete: r }) {
|
|
1488
1488
|
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
1489
1489
|
bubbles: !1,
|
|
1490
1490
|
cancelable: !0,
|
|
1491
1491
|
detail: n
|
|
1492
1492
|
});
|
|
1493
|
-
t && i.addEventListener(e, t, { once: !0 }), r ?
|
|
1493
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? ja(i, a) : i.dispatchEvent(a);
|
|
1494
1494
|
}
|
|
1495
1495
|
// ../../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
1496
|
-
var
|
|
1497
|
-
function
|
|
1498
|
-
|
|
1496
|
+
var Wa = 0;
|
|
1497
|
+
function Ga() {
|
|
1498
|
+
W(() => {
|
|
1499
1499
|
let e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1500
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
1501
|
-
|
|
1500
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ka()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ka()), Wa++, () => {
|
|
1501
|
+
Wa === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((e) => e.remove()), Wa--;
|
|
1502
1502
|
};
|
|
1503
1503
|
}, []);
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function Ka() {
|
|
1506
1506
|
let e = document.createElement("span");
|
|
1507
1507
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
1508
1508
|
}
|
|
1509
1509
|
// ../../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.0.3_@types+react-dom@19.3.0_@types+react@19.3.0__@types+r_4c46e73ebfd13b1be8f440c1bb881903/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
1510
|
-
var
|
|
1510
|
+
var qa = "focusScope.autoFocusOnMount", Ja = "focusScope.autoFocusOnUnmount", Ya = {
|
|
1511
1511
|
bubbles: !1,
|
|
1512
1512
|
cancelable: !0
|
|
1513
|
-
},
|
|
1514
|
-
let { loop: n = !1, trapped: r = !1, onMountAutoFocus: i, onUnmountAutoFocus: a, ...o } = e, [s, c] =
|
|
1513
|
+
}, Xa = /*#__PURE__*/ H((e, t) => {
|
|
1514
|
+
let { loop: n = !1, trapped: r = !1, onMountAutoFocus: i, onUnmountAutoFocus: a, ...o } = e, [s, c] = K(null), l = Ma(i), u = Ma(a), d = G(null), f = $(t, (e) => c(e)), p = G({
|
|
1515
1515
|
paused: !1,
|
|
1516
1516
|
pause() {
|
|
1517
1517
|
this.paused = !0;
|
|
@@ -1520,21 +1520,21 @@ var Ka = "focusScope.autoFocusOnMount", qa = "focusScope.autoFocusOnUnmount", Ja
|
|
|
1520
1520
|
this.paused = !1;
|
|
1521
1521
|
}
|
|
1522
1522
|
}).current;
|
|
1523
|
-
|
|
1523
|
+
W(() => {
|
|
1524
1524
|
if (r) {
|
|
1525
1525
|
function e(e) {
|
|
1526
1526
|
if (p.paused || !s) return;
|
|
1527
1527
|
let t = e.target;
|
|
1528
|
-
s.contains(t) ? d.current = t :
|
|
1528
|
+
s.contains(t) ? d.current = t : ro(d.current, { select: !0 });
|
|
1529
1529
|
}
|
|
1530
1530
|
function t(e) {
|
|
1531
1531
|
if (p.paused || !s) return;
|
|
1532
1532
|
let t = e.relatedTarget;
|
|
1533
|
-
t !== null && (s.contains(t) ||
|
|
1533
|
+
t !== null && (s.contains(t) || ro(d.current, { select: !0 }));
|
|
1534
1534
|
}
|
|
1535
1535
|
function n(e) {
|
|
1536
1536
|
let t = document.activeElement;
|
|
1537
|
-
for (let n of e) n.removedNodes.length > 0 && (s != null && s.contains(t) ||
|
|
1537
|
+
for (let n of e) n.removedNodes.length > 0 && (s != null && s.contains(t) || ro(s));
|
|
1538
1538
|
}
|
|
1539
1539
|
document.addEventListener("focusin", e), document.addEventListener("focusout", t);
|
|
1540
1540
|
let r = new MutationObserver(n);
|
|
@@ -1549,18 +1549,18 @@ var Ka = "focusScope.autoFocusOnMount", qa = "focusScope.autoFocusOnUnmount", Ja
|
|
|
1549
1549
|
r,
|
|
1550
1550
|
s,
|
|
1551
1551
|
p.paused
|
|
1552
|
-
]),
|
|
1552
|
+
]), W(() => {
|
|
1553
1553
|
if (s) {
|
|
1554
|
-
|
|
1554
|
+
io.add(p);
|
|
1555
1555
|
let e = document.activeElement;
|
|
1556
1556
|
if (!s.contains(e)) {
|
|
1557
|
-
let t = new CustomEvent(
|
|
1558
|
-
s.addEventListener(
|
|
1557
|
+
let t = new CustomEvent(qa, Ya);
|
|
1558
|
+
s.addEventListener(qa, l), s.dispatchEvent(t), t.defaultPrevented || (Za(so($a(s)), { select: !0 }), document.activeElement === e && ro(s));
|
|
1559
1559
|
}
|
|
1560
1560
|
return () => {
|
|
1561
|
-
s.removeEventListener(
|
|
1562
|
-
let t = new CustomEvent(
|
|
1563
|
-
s.addEventListener(
|
|
1561
|
+
s.removeEventListener(qa, l), setTimeout(() => {
|
|
1562
|
+
let t = new CustomEvent(Ja, Ya);
|
|
1563
|
+
s.addEventListener(Ja, u), s.dispatchEvent(t), t.defaultPrevented || ro(e ?? document.body, { select: !0 }), s.removeEventListener(Ja, u), io.remove(p);
|
|
1564
1564
|
}, 0);
|
|
1565
1565
|
};
|
|
1566
1566
|
}
|
|
@@ -1570,32 +1570,32 @@ var Ka = "focusScope.autoFocusOnMount", qa = "focusScope.autoFocusOnUnmount", Ja
|
|
|
1570
1570
|
u,
|
|
1571
1571
|
p
|
|
1572
1572
|
]);
|
|
1573
|
-
let m =
|
|
1573
|
+
let m = U((e) => {
|
|
1574
1574
|
if (!n && !r || p.paused) return;
|
|
1575
1575
|
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, i = document.activeElement;
|
|
1576
1576
|
if (t && i) {
|
|
1577
|
-
let t = e.currentTarget, [r, a] =
|
|
1578
|
-
r && a ? !e.shiftKey && i === a ? (e.preventDefault(), n &&
|
|
1577
|
+
let t = e.currentTarget, [r, a] = Qa(t);
|
|
1578
|
+
r && a ? !e.shiftKey && i === a ? (e.preventDefault(), n && ro(r, { select: !0 })) : e.shiftKey && i === r && (e.preventDefault(), n && ro(a, { select: !0 })) : i === t && e.preventDefault();
|
|
1579
1579
|
}
|
|
1580
1580
|
}, [
|
|
1581
1581
|
n,
|
|
1582
1582
|
r,
|
|
1583
1583
|
p.paused
|
|
1584
1584
|
]);
|
|
1585
|
-
return /*#__PURE__*/
|
|
1585
|
+
return /*#__PURE__*/ V(Aa.div, Z({ tabIndex: -1 }, o, {
|
|
1586
1586
|
ref: f,
|
|
1587
1587
|
onKeyDown: m
|
|
1588
1588
|
}));
|
|
1589
1589
|
});
|
|
1590
|
-
function
|
|
1590
|
+
function Za(e, { select: t = !1 } = {}) {
|
|
1591
1591
|
let n = document.activeElement;
|
|
1592
|
-
for (let r of e) if (
|
|
1593
|
-
}
|
|
1594
|
-
function Za(e) {
|
|
1595
|
-
let t = Qa(e);
|
|
1596
|
-
return [$a(t, e), $a(t.reverse(), e)];
|
|
1592
|
+
for (let r of e) if (ro(r, { select: t }), document.activeElement !== n) return;
|
|
1597
1593
|
}
|
|
1598
1594
|
function Qa(e) {
|
|
1595
|
+
let t = $a(e);
|
|
1596
|
+
return [eo(t, e), eo(t.reverse(), e)];
|
|
1597
|
+
}
|
|
1598
|
+
function $a(e) {
|
|
1599
1599
|
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
1600
1600
|
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
1601
1601
|
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
@@ -1603,10 +1603,10 @@ function Qa(e) {
|
|
|
1603
1603
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
1604
1604
|
return t;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1607
|
-
for (let n of e) if (!
|
|
1606
|
+
function eo(e, t) {
|
|
1607
|
+
for (let n of e) if (!to(n, { upTo: t })) return n;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function to(e, { upTo: t }) {
|
|
1610
1610
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
1611
1611
|
for (; e;) {
|
|
1612
1612
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -1615,48 +1615,48 @@ function eo(e, { upTo: t }) {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
return !1;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function no(e) {
|
|
1619
1619
|
return e instanceof HTMLInputElement && "select" in e;
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1621
|
+
function ro(e, { select: t = !1 } = {}) {
|
|
1622
1622
|
if (e && e.focus) {
|
|
1623
1623
|
let n = document.activeElement;
|
|
1624
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
1624
|
+
e.focus({ preventScroll: !0 }), e !== n && no(e) && t && e.select();
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
var
|
|
1628
|
-
function
|
|
1627
|
+
var io = ao();
|
|
1628
|
+
function ao() {
|
|
1629
1629
|
let e = [];
|
|
1630
1630
|
return {
|
|
1631
1631
|
add(t) {
|
|
1632
1632
|
let n = e[0];
|
|
1633
|
-
t !== n && n?.pause(), e =
|
|
1633
|
+
t !== n && n?.pause(), e = oo(e, t), e.unshift(t);
|
|
1634
1634
|
},
|
|
1635
1635
|
remove(t) {
|
|
1636
1636
|
var n;
|
|
1637
|
-
e =
|
|
1637
|
+
e = oo(e, t), (n = e[0]) == null || n.resume();
|
|
1638
1638
|
}
|
|
1639
1639
|
};
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function oo(e, t) {
|
|
1642
1642
|
let n = [...e], r = n.indexOf(t);
|
|
1643
1643
|
return r !== -1 && n.splice(r, 1), n;
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function so(e) {
|
|
1646
1646
|
return e.filter((e) => e.tagName !== "A");
|
|
1647
1647
|
}
|
|
1648
1648
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
1651
|
-
let [n, r] = e.useState(
|
|
1652
|
-
return
|
|
1653
|
-
t || r((e) => e ?? String(
|
|
1649
|
+
var co = globalThis != null && globalThis.document ? Rt : () => {}, lo = e.useId || (() => void 0), uo = 0;
|
|
1650
|
+
function fo(t) {
|
|
1651
|
+
let [n, r] = e.useState(lo());
|
|
1652
|
+
return co(() => {
|
|
1653
|
+
t || r((e) => e ?? String(uo++));
|
|
1654
1654
|
}, [t]), t || (n ? `radix-${n}` : "");
|
|
1655
1655
|
}
|
|
1656
1656
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-size@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
1657
|
-
function
|
|
1658
|
-
let [t, n] =
|
|
1659
|
-
return
|
|
1657
|
+
function po(e) {
|
|
1658
|
+
let [t, n] = K(void 0);
|
|
1659
|
+
return co(() => {
|
|
1660
1660
|
if (e) {
|
|
1661
1661
|
n({
|
|
1662
1662
|
width: e.offsetWidth,
|
|
@@ -1680,21 +1680,21 @@ function fo(e) {
|
|
|
1680
1680
|
}, [e]), t;
|
|
1681
1681
|
}
|
|
1682
1682
|
// ../../../node_modules/.pnpm/@radix-ui+react-popper@1.1.2_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_54f54325d7d6687baee73b95f07a3783/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
1683
|
-
var
|
|
1684
|
-
let { __scopePopper: t, children: n } = e, [r, i] =
|
|
1685
|
-
return /*#__PURE__*/
|
|
1683
|
+
var mo = "Popper", [ho, go] = va(mo), [_o, vo] = ho(mo), yo = (e) => {
|
|
1684
|
+
let { __scopePopper: t, children: n } = e, [r, i] = K(null);
|
|
1685
|
+
return /*#__PURE__*/ V(_o, {
|
|
1686
1686
|
scope: t,
|
|
1687
1687
|
anchor: r,
|
|
1688
1688
|
onAnchorChange: i
|
|
1689
1689
|
}, n);
|
|
1690
|
-
},
|
|
1691
|
-
let { __scopePopper: n, virtualRef: r, ...i } = e, a =
|
|
1692
|
-
return
|
|
1690
|
+
}, bo = "PopperAnchor", xo = /*#__PURE__*/ H((e, t) => {
|
|
1691
|
+
let { __scopePopper: n, virtualRef: r, ...i } = e, a = vo(bo, n), o = G(null), s = $(t, o);
|
|
1692
|
+
return W(() => {
|
|
1693
1693
|
a.onAnchorChange(r?.current || o.current);
|
|
1694
|
-
}), r ? null : /*#__PURE__*/
|
|
1695
|
-
}),
|
|
1694
|
+
}), r ? null : /*#__PURE__*/ V(Aa.div, Z({}, i, { ref: s }));
|
|
1695
|
+
}), So = "PopperContent", [Co, wo] = ho(So), To = /*#__PURE__*/ H((e, t) => {
|
|
1696
1696
|
var n;
|
|
1697
|
-
let { __scopePopper: r, side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, arrowPadding: c = 0, collisionBoundary: l = [], collisionPadding: u = 0, sticky: d = "partial", hideWhenDetached: f = !1, avoidCollisions: p = !0, onPlaced: m, ...h } = e, g =
|
|
1697
|
+
let { __scopePopper: r, side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, arrowPadding: c = 0, collisionBoundary: l = [], collisionPadding: u = 0, sticky: d = "partial", hideWhenDetached: f = !1, avoidCollisions: p = !0, onPlaced: m, ...h } = e, g = vo(So, r), [_, v] = K(null), y = $(t, (e) => v(e)), [b, x] = K(null), S = po(b), C = S?.width ?? 0, w = S?.height ?? 0, ee = i + (o === "center" ? "" : "-" + o), T = typeof u == "number" ? u : {
|
|
1698
1698
|
top: 0,
|
|
1699
1699
|
right: 0,
|
|
1700
1700
|
bottom: 0,
|
|
@@ -1702,7 +1702,7 @@ var po = "Popper", [mo, ho] = va(po), [go, _o] = mo(po), vo = (e) => {
|
|
|
1702
1702
|
...u
|
|
1703
1703
|
}, E = Array.isArray(l) ? l : [l], D = E.length > 0, O = {
|
|
1704
1704
|
padding: T,
|
|
1705
|
-
boundary: E.filter(
|
|
1705
|
+
boundary: E.filter(Eo),
|
|
1706
1706
|
altBoundary: D
|
|
1707
1707
|
}, { refs: te, floatingStyles: k, placement: ne, isPositioned: A, middlewareData: j } = bt({
|
|
1708
1708
|
strategy: "fixed",
|
|
@@ -1732,20 +1732,20 @@ var po = "Popper", [mo, ho] = va(po), [go, _o] = mo(po), vo = (e) => {
|
|
|
1732
1732
|
element: b,
|
|
1733
1733
|
padding: c
|
|
1734
1734
|
}),
|
|
1735
|
-
|
|
1735
|
+
Do({
|
|
1736
1736
|
arrowWidth: C,
|
|
1737
1737
|
arrowHeight: w
|
|
1738
1738
|
}),
|
|
1739
1739
|
f && Tt({ strategy: "referenceHidden" })
|
|
1740
1740
|
]
|
|
1741
|
-
}), [M, re] =
|
|
1742
|
-
|
|
1741
|
+
}), [M, re] = Oo(ne), ie = Ma(m);
|
|
1742
|
+
co(() => {
|
|
1743
1743
|
A && ie?.();
|
|
1744
1744
|
}, [A, ie]);
|
|
1745
|
-
let N = j.arrow?.x, P = j.arrow?.y, ae = j.arrow?.centerOffset !== 0, [oe, se] =
|
|
1746
|
-
return
|
|
1745
|
+
let N = j.arrow?.x, P = j.arrow?.y, ae = j.arrow?.centerOffset !== 0, [oe, se] = K();
|
|
1746
|
+
return co(() => {
|
|
1747
1747
|
_ && se(window.getComputedStyle(_).zIndex);
|
|
1748
|
-
}, [_]), /*#__PURE__*/
|
|
1748
|
+
}, [_]), /*#__PURE__*/ V("div", {
|
|
1749
1749
|
ref: te.setFloating,
|
|
1750
1750
|
"data-radix-popper-content-wrapper": "",
|
|
1751
1751
|
style: {
|
|
@@ -1756,14 +1756,14 @@ var po = "Popper", [mo, ho] = va(po), [go, _o] = mo(po), vo = (e) => {
|
|
|
1756
1756
|
"--radix-popper-transform-origin": [j.transformOrigin?.x, j.transformOrigin?.y].join(" ")
|
|
1757
1757
|
},
|
|
1758
1758
|
dir: e.dir
|
|
1759
|
-
}, /*#__PURE__*/
|
|
1759
|
+
}, /*#__PURE__*/ V(Co, {
|
|
1760
1760
|
scope: r,
|
|
1761
1761
|
placedSide: M,
|
|
1762
1762
|
onArrowChange: x,
|
|
1763
1763
|
arrowX: N,
|
|
1764
1764
|
arrowY: P,
|
|
1765
1765
|
shouldHideArrow: ae
|
|
1766
|
-
}, /*#__PURE__*/
|
|
1766
|
+
}, /*#__PURE__*/ V(Aa.div, Z({
|
|
1767
1767
|
"data-side": M,
|
|
1768
1768
|
"data-align": re
|
|
1769
1769
|
}, h, {
|
|
@@ -1775,14 +1775,14 @@ var po = "Popper", [mo, ho] = va(po), [go, _o] = mo(po), vo = (e) => {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
}))));
|
|
1777
1777
|
});
|
|
1778
|
-
function
|
|
1778
|
+
function Eo(e) {
|
|
1779
1779
|
return e !== null;
|
|
1780
1780
|
}
|
|
1781
|
-
var
|
|
1781
|
+
var Do = (e) => ({
|
|
1782
1782
|
name: "transformOrigin",
|
|
1783
1783
|
options: e,
|
|
1784
1784
|
fn(t) {
|
|
1785
|
-
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] =
|
|
1785
|
+
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = Oo(n), u = {
|
|
1786
1786
|
start: "0%",
|
|
1787
1787
|
center: "50%",
|
|
1788
1788
|
end: "100%"
|
|
@@ -1793,21 +1793,21 @@ var Eo = (e) => ({
|
|
|
1793
1793
|
} };
|
|
1794
1794
|
}
|
|
1795
1795
|
});
|
|
1796
|
-
function
|
|
1796
|
+
function Oo(e) {
|
|
1797
1797
|
let [t, n = "center"] = e.split("-");
|
|
1798
1798
|
return [t, n];
|
|
1799
1799
|
}
|
|
1800
|
-
var
|
|
1800
|
+
var ko = yo, Ao = xo, jo = To, Mo = /*#__PURE__*/ H((e, n) => {
|
|
1801
1801
|
let { container: r = globalThis == null ? void 0 : globalThis.document?.body, ...i } = e;
|
|
1802
|
-
return r ? /*#__PURE__*/ t.createPortal(/*#__PURE__*/
|
|
1802
|
+
return r ? /*#__PURE__*/ t.createPortal(/*#__PURE__*/ V(Aa.div, Z({}, i, { ref: n })), r) : null;
|
|
1803
1803
|
});
|
|
1804
1804
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
1805
|
-
function
|
|
1806
|
-
let [r, i] =
|
|
1805
|
+
function No({ prop: e, defaultProp: t, onChange: n = () => {} }) {
|
|
1806
|
+
let [r, i] = Po({
|
|
1807
1807
|
defaultProp: t,
|
|
1808
1808
|
onChange: n
|
|
1809
|
-
}), a = e !== void 0, o = a ? e : r, s =
|
|
1810
|
-
return [o,
|
|
1809
|
+
}), a = e !== void 0, o = a ? e : r, s = Ma(n);
|
|
1810
|
+
return [o, U((t) => {
|
|
1811
1811
|
if (a) {
|
|
1812
1812
|
let n = typeof t == "function" ? t(e) : t;
|
|
1813
1813
|
n !== e && s(n);
|
|
@@ -1819,9 +1819,9 @@ function Mo({ prop: e, defaultProp: t, onChange: n = () => {} }) {
|
|
|
1819
1819
|
s
|
|
1820
1820
|
])];
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1823
|
-
let n =
|
|
1824
|
-
return
|
|
1822
|
+
function Po({ defaultProp: e, onChange: t }) {
|
|
1823
|
+
let n = K(e), [r] = n, i = G(r), a = Ma(t);
|
|
1824
|
+
return W(() => {
|
|
1825
1825
|
i.current !== r && (a(r), i.current = r);
|
|
1826
1826
|
}, [
|
|
1827
1827
|
r,
|
|
@@ -1830,15 +1830,15 @@ function No({ defaultProp: e, onChange: t }) {
|
|
|
1830
1830
|
]), n;
|
|
1831
1831
|
}
|
|
1832
1832
|
// ../../../node_modules/.pnpm/@radix-ui+react-use-previous@1.0.1_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
1833
|
-
function
|
|
1834
|
-
let t =
|
|
1833
|
+
function Fo(e) {
|
|
1834
|
+
let t = G({
|
|
1835
1835
|
value: e,
|
|
1836
1836
|
previous: e
|
|
1837
1837
|
});
|
|
1838
1838
|
return zt(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
1839
1839
|
}
|
|
1840
1840
|
// ../../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.0.3_@types+react-dom@19.3.0_@types+react@19.3.0__@typ_70b47c4f8f844c1ef378d841e15061ad/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
1841
|
-
var
|
|
1841
|
+
var Io = /*#__PURE__*/ H((e, t) => /*#__PURE__*/ V(Aa.span, Z({}, e, {
|
|
1842
1842
|
ref: t,
|
|
1843
1843
|
style: {
|
|
1844
1844
|
position: "absolute",
|
|
@@ -1853,11 +1853,11 @@ var Fo = /*#__PURE__*/ V((e, t) => /*#__PURE__*/ B($.span, X({}, e, {
|
|
|
1853
1853
|
wordWrap: "normal",
|
|
1854
1854
|
...e.style
|
|
1855
1855
|
}
|
|
1856
|
-
}))),
|
|
1856
|
+
}))), Lo = We(), Ro = function() {}, zo = e.forwardRef(function(t, n) {
|
|
1857
1857
|
var r = e.useRef(null), i = e.useState({
|
|
1858
|
-
onScrollCapture:
|
|
1859
|
-
onWheelCapture:
|
|
1860
|
-
onTouchMoveCapture:
|
|
1858
|
+
onScrollCapture: Ro,
|
|
1859
|
+
onWheelCapture: Ro,
|
|
1860
|
+
onTouchMoveCapture: Ro
|
|
1861
1861
|
}), a = i[0], o = i[1], s = t.forwardProps, c = t.children, l = t.className, u = t.removeScrollBar, d = t.enabled, f = t.shards, p = t.sideCar, m = t.noIsolation, h = t.inert, g = t.allowPinchZoom, _ = t.as, v = _ === void 0 ? "div" : _, y = gt(t, [
|
|
1862
1862
|
"forwardProps",
|
|
1863
1863
|
"children",
|
|
@@ -1870,9 +1870,9 @@ var Fo = /*#__PURE__*/ V((e, t) => /*#__PURE__*/ B($.span, X({}, e, {
|
|
|
1870
1870
|
"inert",
|
|
1871
1871
|
"allowPinchZoom",
|
|
1872
1872
|
"as"
|
|
1873
|
-
]), b = p, x =
|
|
1873
|
+
]), b = p, x = Ue([r, n]), S = vt(vt({}, y), a);
|
|
1874
1874
|
return e.createElement(e.Fragment, null, d && e.createElement(b, {
|
|
1875
|
-
sideCar:
|
|
1875
|
+
sideCar: Lo,
|
|
1876
1876
|
removeScrollBar: u,
|
|
1877
1877
|
shards: f,
|
|
1878
1878
|
noIsolation: m,
|
|
@@ -1885,95 +1885,95 @@ var Fo = /*#__PURE__*/ V((e, t) => /*#__PURE__*/ B($.span, X({}, e, {
|
|
|
1885
1885
|
ref: x
|
|
1886
1886
|
}), c));
|
|
1887
1887
|
});
|
|
1888
|
-
|
|
1888
|
+
zo.defaultProps = {
|
|
1889
1889
|
enabled: !0,
|
|
1890
1890
|
removeScrollBar: !0,
|
|
1891
1891
|
inert: !1
|
|
1892
|
-
},
|
|
1893
|
-
fullWidth:
|
|
1894
|
-
zeroRight:
|
|
1892
|
+
}, zo.classNames = {
|
|
1893
|
+
fullWidth: ze,
|
|
1894
|
+
zeroRight: Xe
|
|
1895
1895
|
};
|
|
1896
1896
|
// ../../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
1897
|
-
var
|
|
1897
|
+
var Bo = !1;
|
|
1898
1898
|
if (typeof window < "u") try {
|
|
1899
|
-
var
|
|
1900
|
-
return
|
|
1899
|
+
var Vo = Object.defineProperty({}, "passive", { get: function() {
|
|
1900
|
+
return Bo = !0, !0;
|
|
1901
1901
|
} });
|
|
1902
|
-
window.addEventListener("test",
|
|
1902
|
+
window.addEventListener("test", Vo, Vo), window.removeEventListener("test", Vo, Vo);
|
|
1903
1903
|
} catch {
|
|
1904
|
-
|
|
1904
|
+
Bo = !1;
|
|
1905
1905
|
}
|
|
1906
|
-
var
|
|
1906
|
+
var Ho = Bo ? { passive: !1 } : !1, Uo = function(e) {
|
|
1907
1907
|
return e.tagName === "TEXTAREA";
|
|
1908
|
-
},
|
|
1908
|
+
}, Wo = function(e, t) {
|
|
1909
1909
|
var n = window.getComputedStyle(e);
|
|
1910
|
-
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !
|
|
1911
|
-
}, Wo = function(e) {
|
|
1912
|
-
return Uo(e, "overflowY");
|
|
1910
|
+
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !Uo(e) && n[t] === "visible");
|
|
1913
1911
|
}, Go = function(e) {
|
|
1914
|
-
return
|
|
1915
|
-
}, Ko = function(e
|
|
1912
|
+
return Wo(e, "overflowY");
|
|
1913
|
+
}, Ko = function(e) {
|
|
1914
|
+
return Wo(e, "overflowX");
|
|
1915
|
+
}, qo = function(e, t) {
|
|
1916
1916
|
var n = t;
|
|
1917
1917
|
do {
|
|
1918
|
-
if (typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host),
|
|
1919
|
-
var r =
|
|
1918
|
+
if (typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host), Xo(e, n)) {
|
|
1919
|
+
var r = Zo(e, n);
|
|
1920
1920
|
if (r[1] > r[2]) return !0;
|
|
1921
1921
|
}
|
|
1922
1922
|
n = n.parentNode;
|
|
1923
1923
|
} while (n && n !== document.body);
|
|
1924
1924
|
return !1;
|
|
1925
|
-
},
|
|
1925
|
+
}, Jo = function(e) {
|
|
1926
1926
|
return [
|
|
1927
1927
|
e.scrollTop,
|
|
1928
1928
|
e.scrollHeight,
|
|
1929
1929
|
e.clientHeight
|
|
1930
1930
|
];
|
|
1931
|
-
},
|
|
1931
|
+
}, Yo = function(e) {
|
|
1932
1932
|
return [
|
|
1933
1933
|
e.scrollLeft,
|
|
1934
1934
|
e.scrollWidth,
|
|
1935
1935
|
e.clientWidth
|
|
1936
1936
|
];
|
|
1937
|
-
}, Yo = function(e, t) {
|
|
1938
|
-
return e === "v" ? Wo(t) : Go(t);
|
|
1939
1937
|
}, Xo = function(e, t) {
|
|
1940
|
-
return e === "v" ?
|
|
1938
|
+
return e === "v" ? Go(t) : Ko(t);
|
|
1941
1939
|
}, Zo = function(e, t) {
|
|
1940
|
+
return e === "v" ? Jo(t) : Yo(t);
|
|
1941
|
+
}, Qo = function(e, t) {
|
|
1942
1942
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1943
|
-
},
|
|
1944
|
-
var a =
|
|
1943
|
+
}, $o = function(e, t, n, r, i) {
|
|
1944
|
+
var a = Qo(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
|
|
1945
1945
|
do {
|
|
1946
|
-
var p =
|
|
1947
|
-
(m || h) &&
|
|
1946
|
+
var p = Zo(e, s), m = p[0], h = p[1] - p[2] - a * m;
|
|
1947
|
+
(m || h) && Xo(e, s) && (d += h, f += m), s = s.parentNode;
|
|
1948
1948
|
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
|
|
1949
1949
|
return (u && (i && d === 0 || !i && o > d) || !u && (i && f === 0 || !i && -o > f)) && (l = !0), l;
|
|
1950
1950
|
};
|
|
1951
1951
|
// ../../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
1952
1952
|
ht();
|
|
1953
|
-
var
|
|
1953
|
+
var es = function(e) {
|
|
1954
1954
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1955
|
-
}, es = function(e) {
|
|
1956
|
-
return [e.deltaX, e.deltaY];
|
|
1957
1955
|
}, ts = function(e) {
|
|
1956
|
+
return [e.deltaX, e.deltaY];
|
|
1957
|
+
}, ns = function(e) {
|
|
1958
1958
|
return e && "current" in e ? e.current : e;
|
|
1959
|
-
},
|
|
1959
|
+
}, rs = function(e, t) {
|
|
1960
1960
|
return e[0] === t[0] && e[1] === t[1];
|
|
1961
|
-
},
|
|
1961
|
+
}, is = function(e) {
|
|
1962
1962
|
return `
|
|
1963
1963
|
.block-interactivity-${e} {pointer-events: none;}
|
|
1964
1964
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
1965
1965
|
`;
|
|
1966
|
-
},
|
|
1967
|
-
function
|
|
1968
|
-
var n = e.useRef([]), r = e.useRef([0, 0]), i = e.useRef(), a = e.useState(
|
|
1969
|
-
return
|
|
1966
|
+
}, as = 0, os = [];
|
|
1967
|
+
function ss(t) {
|
|
1968
|
+
var n = e.useRef([]), r = e.useRef([0, 0]), i = e.useRef(), a = e.useState(as++)[0], o = e.useState(function() {
|
|
1969
|
+
return Je();
|
|
1970
1970
|
})[0], s = e.useRef(t);
|
|
1971
1971
|
e.useEffect(function() {
|
|
1972
1972
|
s.current = t;
|
|
1973
1973
|
}, [t]), e.useEffect(function() {
|
|
1974
1974
|
if (t.inert) {
|
|
1975
1975
|
document.body.classList.add(`block-interactivity-${a}`);
|
|
1976
|
-
var e = _t([t.lockRef.current], (t.shards || []).map(
|
|
1976
|
+
var e = _t([t.lockRef.current], (t.shards || []).map(ns), !0).filter(Boolean);
|
|
1977
1977
|
return e.forEach(function(e) {
|
|
1978
1978
|
return e.classList.add(`allow-interactivity-${a}`);
|
|
1979
1979
|
}), function() {
|
|
@@ -1989,23 +1989,23 @@ function os(t) {
|
|
|
1989
1989
|
]);
|
|
1990
1990
|
var c = e.useCallback(function(e, t) {
|
|
1991
1991
|
if ("touches" in e && e.touches.length === 2) return !s.current.allowPinchZoom;
|
|
1992
|
-
var n =
|
|
1992
|
+
var n = es(e), a = r.current, o = "deltaX" in e ? e.deltaX : a[0] - n[0], c = "deltaY" in e ? e.deltaY : a[1] - n[1], l, u = e.target, d = Math.abs(o) > Math.abs(c) ? "h" : "v";
|
|
1993
1993
|
if ("touches" in e && d === "h" && u.type === "range") return !1;
|
|
1994
|
-
var f =
|
|
1994
|
+
var f = qo(d, u);
|
|
1995
1995
|
if (!f) return !0;
|
|
1996
|
-
if (f ? l = d : (l = d === "v" ? "h" : "v", f =
|
|
1996
|
+
if (f ? l = d : (l = d === "v" ? "h" : "v", f = qo(d, u)), !f) return !1;
|
|
1997
1997
|
if (!i.current && "changedTouches" in e && (o || c) && (i.current = l), !l) return !0;
|
|
1998
1998
|
var p = i.current || l;
|
|
1999
|
-
return
|
|
1999
|
+
return $o(p, t, e, p === "h" ? o : c, !0);
|
|
2000
2000
|
}, []), l = e.useCallback(function(e) {
|
|
2001
2001
|
var t = e;
|
|
2002
|
-
if (
|
|
2003
|
-
var r = "deltaY" in t ?
|
|
2004
|
-
return e.name === t.type && e.target === t.target &&
|
|
2002
|
+
if (os.length && os[os.length - 1] === o) {
|
|
2003
|
+
var r = "deltaY" in t ? ts(t) : es(t), i = n.current.filter(function(e) {
|
|
2004
|
+
return e.name === t.type && e.target === t.target && rs(e.delta, r);
|
|
2005
2005
|
})[0];
|
|
2006
2006
|
if (i && i.should) t.cancelable && t.preventDefault();
|
|
2007
2007
|
else if (!i) {
|
|
2008
|
-
var a = (s.current.shards || []).map(
|
|
2008
|
+
var a = (s.current.shards || []).map(ns).filter(Boolean).filter(function(e) {
|
|
2009
2009
|
return e.contains(t.target);
|
|
2010
2010
|
});
|
|
2011
2011
|
(a.length > 0 ? c(t, a[0]) : !s.current.noIsolation) && t.cancelable && t.preventDefault();
|
|
@@ -2024,54 +2024,54 @@ function os(t) {
|
|
|
2024
2024
|
});
|
|
2025
2025
|
}, 1);
|
|
2026
2026
|
}, []), d = e.useCallback(function(e) {
|
|
2027
|
-
r.current =
|
|
2027
|
+
r.current = es(e), i.current = void 0;
|
|
2028
2028
|
}, []), f = e.useCallback(function(e) {
|
|
2029
|
-
u(e.type,
|
|
2029
|
+
u(e.type, ts(e), e.target, c(e, t.lockRef.current));
|
|
2030
2030
|
}, []), p = e.useCallback(function(e) {
|
|
2031
|
-
u(e.type,
|
|
2031
|
+
u(e.type, es(e), e.target, c(e, t.lockRef.current));
|
|
2032
2032
|
}, []);
|
|
2033
2033
|
e.useEffect(function() {
|
|
2034
|
-
return
|
|
2034
|
+
return os.push(o), t.setCallbacks({
|
|
2035
2035
|
onScrollCapture: f,
|
|
2036
2036
|
onWheelCapture: f,
|
|
2037
2037
|
onTouchMoveCapture: p
|
|
2038
|
-
}), document.addEventListener("wheel", l,
|
|
2039
|
-
|
|
2038
|
+
}), document.addEventListener("wheel", l, Ho), document.addEventListener("touchmove", l, Ho), document.addEventListener("touchstart", d, Ho), function() {
|
|
2039
|
+
os = os.filter(function(e) {
|
|
2040
2040
|
return e !== o;
|
|
2041
|
-
}), document.removeEventListener("wheel", l,
|
|
2041
|
+
}), document.removeEventListener("wheel", l, Ho), document.removeEventListener("touchmove", l, Ho), document.removeEventListener("touchstart", d, Ho);
|
|
2042
2042
|
};
|
|
2043
2043
|
}, []);
|
|
2044
2044
|
var m = t.removeScrollBar, h = t.inert;
|
|
2045
|
-
return e.createElement(e.Fragment, null, h ? e.createElement(o, { styles:
|
|
2045
|
+
return e.createElement(e.Fragment, null, h ? e.createElement(o, { styles: is(a) }) : null, m ? e.createElement(He, { gapMode: "margin" }) : null);
|
|
2046
2046
|
}
|
|
2047
2047
|
// ../../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
2048
|
-
var
|
|
2048
|
+
var cs = qe(Lo, ss);
|
|
2049
2049
|
// ../../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
2050
2050
|
ht();
|
|
2051
|
-
var
|
|
2052
|
-
return e.createElement(
|
|
2051
|
+
var ls = e.forwardRef(function(t, n) {
|
|
2052
|
+
return e.createElement(zo, vt({}, t, {
|
|
2053
2053
|
ref: n,
|
|
2054
|
-
sideCar:
|
|
2054
|
+
sideCar: cs
|
|
2055
2055
|
}));
|
|
2056
2056
|
});
|
|
2057
|
-
|
|
2057
|
+
ls.classNames = zo.classNames;
|
|
2058
2058
|
// ../../../node_modules/.pnpm/@radix-ui+react-select@1.2.2_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_d5434fe6533e522cc59a420de55d843d/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
2059
|
-
var
|
|
2059
|
+
var us = [
|
|
2060
2060
|
" ",
|
|
2061
2061
|
"Enter",
|
|
2062
2062
|
"ArrowUp",
|
|
2063
2063
|
"ArrowDown"
|
|
2064
|
-
],
|
|
2065
|
-
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: p } = e, m =
|
|
2064
|
+
], ds = [" ", "Enter"], fs = "Select", [ps, ms, hs] = Da(fs), [gs, _s] = va(fs, [hs, go]), vs = go(), [ys, bs] = gs(fs), [xs, Ss] = gs(fs), Cs = (e) => {
|
|
2065
|
+
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: p } = e, m = vs(t), [h, g] = K(null), [_, v] = K(null), [y, b] = K(!1), x = ka(l), [S = !1, C] = No({
|
|
2066
2066
|
prop: r,
|
|
2067
2067
|
defaultProp: i,
|
|
2068
2068
|
onChange: a
|
|
2069
|
-
}), [w, ee] =
|
|
2069
|
+
}), [w, ee] = No({
|
|
2070
2070
|
prop: o,
|
|
2071
2071
|
defaultProp: s,
|
|
2072
2072
|
onChange: c
|
|
2073
|
-
}), T =
|
|
2074
|
-
return /*#__PURE__*/
|
|
2073
|
+
}), T = G(null), E = !h || !!h.closest("form"), [D, O] = K(/* @__PURE__ */ new Set()), te = Array.from(D).map((e) => e.props.value).join(";");
|
|
2074
|
+
return /*#__PURE__*/ V(ko, m, /*#__PURE__*/ V(ys, {
|
|
2075
2075
|
required: p,
|
|
2076
2076
|
scope: t,
|
|
2077
2077
|
trigger: h,
|
|
@@ -2080,7 +2080,7 @@ var ls = [
|
|
|
2080
2080
|
onValueNodeChange: v,
|
|
2081
2081
|
valueNodeHasChildren: y,
|
|
2082
2082
|
onValueNodeHasChildrenChange: b,
|
|
2083
|
-
contentId:
|
|
2083
|
+
contentId: fo(),
|
|
2084
2084
|
value: w,
|
|
2085
2085
|
onValueChange: ee,
|
|
2086
2086
|
open: S,
|
|
@@ -2088,18 +2088,18 @@ var ls = [
|
|
|
2088
2088
|
dir: x,
|
|
2089
2089
|
triggerPointerDownPosRef: T,
|
|
2090
2090
|
disabled: f
|
|
2091
|
-
}, /*#__PURE__*/
|
|
2091
|
+
}, /*#__PURE__*/ V(ps.Provider, { scope: t }, /*#__PURE__*/ V(xs, {
|
|
2092
2092
|
scope: e.__scopeSelect,
|
|
2093
|
-
onNativeOptionAdd:
|
|
2093
|
+
onNativeOptionAdd: U((e) => {
|
|
2094
2094
|
O((t) => new Set(t).add(e));
|
|
2095
2095
|
}, []),
|
|
2096
|
-
onNativeOptionRemove:
|
|
2096
|
+
onNativeOptionRemove: U((e) => {
|
|
2097
2097
|
O((t) => {
|
|
2098
2098
|
let n = new Set(t);
|
|
2099
2099
|
return n.delete(e), n;
|
|
2100
2100
|
});
|
|
2101
2101
|
}, [])
|
|
2102
|
-
}, n)), E ? /*#__PURE__*/
|
|
2102
|
+
}, n)), E ? /*#__PURE__*/ V(rc, {
|
|
2103
2103
|
key: te,
|
|
2104
2104
|
"aria-hidden": !0,
|
|
2105
2105
|
required: p,
|
|
@@ -2109,15 +2109,15 @@ var ls = [
|
|
|
2109
2109
|
value: w,
|
|
2110
2110
|
onChange: (e) => ee(e.target.value),
|
|
2111
2111
|
disabled: f
|
|
2112
|
-
}, w === void 0 ? /*#__PURE__*/
|
|
2113
|
-
},
|
|
2114
|
-
let { __scopeSelect: n, disabled: r = !1, ...i } = e, a =
|
|
2115
|
-
let t = l().filter((e) => !e.disabled), n =
|
|
2112
|
+
}, w === void 0 ? /*#__PURE__*/ V("option", { value: "" }) : null, Array.from(D)) : null));
|
|
2113
|
+
}, ws = "SelectTrigger", Ts = /*#__PURE__*/ H((e, t) => {
|
|
2114
|
+
let { __scopeSelect: n, disabled: r = !1, ...i } = e, a = vs(n), o = bs(ws, n), s = o.disabled || r, c = $(t, o.onTriggerChange), l = ms(n), [u, d, f] = ic((e) => {
|
|
2115
|
+
let t = l().filter((e) => !e.disabled), n = ac(t, e, t.find((e) => e.value === o.value));
|
|
2116
2116
|
n !== void 0 && o.onValueChange(n.value);
|
|
2117
2117
|
}), p = () => {
|
|
2118
2118
|
s || (o.onOpenChange(!0), f());
|
|
2119
2119
|
};
|
|
2120
|
-
return /*#__PURE__*/
|
|
2120
|
+
return /*#__PURE__*/ V(Ao, Z({ asChild: !0 }, a), /*#__PURE__*/ V(Aa.button, Z({
|
|
2121
2121
|
type: "button",
|
|
2122
2122
|
role: "combobox",
|
|
2123
2123
|
"aria-controls": o.contentId,
|
|
@@ -2131,59 +2131,59 @@ var ls = [
|
|
|
2131
2131
|
"data-placeholder": o.value === void 0 ? "" : void 0
|
|
2132
2132
|
}, i, {
|
|
2133
2133
|
ref: c,
|
|
2134
|
-
onClick:
|
|
2134
|
+
onClick: Q(i.onClick, (e) => {
|
|
2135
2135
|
e.currentTarget.focus();
|
|
2136
2136
|
}),
|
|
2137
|
-
onPointerDown:
|
|
2137
|
+
onPointerDown: Q(i.onPointerDown, (e) => {
|
|
2138
2138
|
let t = e.target;
|
|
2139
2139
|
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && (p(), o.triggerPointerDownPosRef.current = {
|
|
2140
2140
|
x: Math.round(e.pageX),
|
|
2141
2141
|
y: Math.round(e.pageY)
|
|
2142
2142
|
}, e.preventDefault());
|
|
2143
2143
|
}),
|
|
2144
|
-
onKeyDown:
|
|
2144
|
+
onKeyDown: Q(i.onKeyDown, (e) => {
|
|
2145
2145
|
let t = u.current !== "";
|
|
2146
|
-
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && d(e.key), !(t && e.key === " ") &&
|
|
2146
|
+
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && d(e.key), !(t && e.key === " ") && us.includes(e.key) && (p(), e.preventDefault());
|
|
2147
2147
|
})
|
|
2148
2148
|
})));
|
|
2149
|
-
}),
|
|
2150
|
-
let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o, ...s } = e, c =
|
|
2151
|
-
return
|
|
2149
|
+
}), Es = "SelectValue", Ds = /*#__PURE__*/ H((e, t) => {
|
|
2150
|
+
let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o, ...s } = e, c = bs(Es, n), { onValueNodeHasChildrenChange: l } = c, u = a !== void 0, d = $(t, c.onValueNodeChange);
|
|
2151
|
+
return co(() => {
|
|
2152
2152
|
l(u);
|
|
2153
|
-
}, [l, u]), /*#__PURE__*/
|
|
2153
|
+
}, [l, u]), /*#__PURE__*/ V(Aa.span, Z({}, s, {
|
|
2154
2154
|
ref: d,
|
|
2155
2155
|
style: { pointerEvents: "none" }
|
|
2156
2156
|
}), c.value === void 0 && o !== void 0 ? o : a);
|
|
2157
|
-
}),
|
|
2157
|
+
}), Os = /*#__PURE__*/ H((e, t) => {
|
|
2158
2158
|
let { __scopeSelect: n, children: r, ...i } = e;
|
|
2159
|
-
return /*#__PURE__*/
|
|
2160
|
-
}),
|
|
2161
|
-
let r =
|
|
2162
|
-
if (
|
|
2159
|
+
return /*#__PURE__*/ V(Aa.span, Z({ "aria-hidden": !0 }, i, { ref: t }), r || JSON.parse("\"\\u25bc\""));
|
|
2160
|
+
}), ks = (e) => /*#__PURE__*/ V(Mo, Z({ asChild: !0 }, e)), As = "SelectContent", js = /*#__PURE__*/ H((e, t) => {
|
|
2161
|
+
let r = bs(As, e.__scopeSelect), [i, a] = K();
|
|
2162
|
+
if (co(() => {
|
|
2163
2163
|
a(new DocumentFragment());
|
|
2164
2164
|
}, []), !r.open) {
|
|
2165
2165
|
let t = i;
|
|
2166
|
-
return t ? /*#__PURE__*/ n(/*#__PURE__*/
|
|
2166
|
+
return t ? /*#__PURE__*/ n(/*#__PURE__*/ V(Ns, { scope: e.__scopeSelect }, /*#__PURE__*/ V(ps.Slot, { scope: e.__scopeSelect }, /*#__PURE__*/ V("div", null, e.children))), t) : null;
|
|
2167
2167
|
}
|
|
2168
|
-
return /*#__PURE__*/
|
|
2169
|
-
}),
|
|
2170
|
-
let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: s, sideOffset: c, align: l, alignOffset: u, arrowPadding: d, collisionBoundary: f, collisionPadding: p, sticky: m, hideWhenDetached: h, avoidCollisions: g, ..._ } = e, v =
|
|
2171
|
-
|
|
2172
|
-
if (y) return
|
|
2173
|
-
}, [y]),
|
|
2174
|
-
let ne =
|
|
2168
|
+
return /*#__PURE__*/ V(Fs, Z({}, e, { ref: t }));
|
|
2169
|
+
}), Ms = 10, [Ns, Ps] = gs(As), Fs = /*#__PURE__*/ H((e, t) => {
|
|
2170
|
+
let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: s, sideOffset: c, align: l, alignOffset: u, arrowPadding: d, collisionBoundary: f, collisionPadding: p, sticky: m, hideWhenDetached: h, avoidCollisions: g, ..._ } = e, v = bs(As, n), [y, b] = K(null), [x, S] = K(null), C = $(t, (e) => b(e)), [w, ee] = K(null), [T, E] = K(null), D = ms(n), [O, te] = K(!1), k = G(!1);
|
|
2171
|
+
W(() => {
|
|
2172
|
+
if (y) return Ye(y);
|
|
2173
|
+
}, [y]), Ga();
|
|
2174
|
+
let ne = U((e) => {
|
|
2175
2175
|
let [t, ...n] = D().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
2176
2176
|
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && x && (x.scrollTop = 0), n === r && x && (x.scrollTop = x.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
2177
|
-
}, [D, x]), A =
|
|
2177
|
+
}, [D, x]), A = U(() => ne([w, y]), [
|
|
2178
2178
|
ne,
|
|
2179
2179
|
w,
|
|
2180
2180
|
y
|
|
2181
2181
|
]);
|
|
2182
|
-
|
|
2182
|
+
W(() => {
|
|
2183
2183
|
O && A();
|
|
2184
2184
|
}, [O, A]);
|
|
2185
2185
|
let { onOpenChange: j, triggerPointerDownPosRef: M } = v;
|
|
2186
|
-
|
|
2186
|
+
W(() => {
|
|
2187
2187
|
if (y) {
|
|
2188
2188
|
let e = {
|
|
2189
2189
|
x: 0,
|
|
@@ -2207,22 +2207,22 @@ var ls = [
|
|
|
2207
2207
|
y,
|
|
2208
2208
|
j,
|
|
2209
2209
|
M
|
|
2210
|
-
]),
|
|
2210
|
+
]), W(() => {
|
|
2211
2211
|
let e = () => j(!1);
|
|
2212
2212
|
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
2213
2213
|
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
2214
2214
|
};
|
|
2215
2215
|
}, [j]);
|
|
2216
|
-
let [re, ie] =
|
|
2217
|
-
let t = D().filter((e) => !e.disabled), n =
|
|
2216
|
+
let [re, ie] = ic((e) => {
|
|
2217
|
+
let t = D().filter((e) => !e.disabled), n = ac(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
2218
2218
|
n && setTimeout(() => n.ref.current.focus());
|
|
2219
|
-
}), N =
|
|
2219
|
+
}), N = U((e, t, n) => {
|
|
2220
2220
|
let r = !k.current && !n;
|
|
2221
2221
|
(v.value !== void 0 && v.value === t || r) && (ee(e), r && (k.current = !0));
|
|
2222
|
-
}, [v.value]), P =
|
|
2222
|
+
}, [v.value]), P = U(() => y?.focus(), [y]), ae = U((e, t, n) => {
|
|
2223
2223
|
let r = !k.current && !n;
|
|
2224
2224
|
(v.value !== void 0 && v.value === t || r) && E(e);
|
|
2225
|
-
}, [v.value]), oe = r === "popper" ?
|
|
2225
|
+
}, [v.value]), oe = r === "popper" ? Ls : Is, se = oe === Ls ? {
|
|
2226
2226
|
side: s,
|
|
2227
2227
|
sideOffset: c,
|
|
2228
2228
|
align: l,
|
|
@@ -2234,7 +2234,7 @@ var ls = [
|
|
|
2234
2234
|
hideWhenDetached: h,
|
|
2235
2235
|
avoidCollisions: g
|
|
2236
2236
|
} : {};
|
|
2237
|
-
return /*#__PURE__*/
|
|
2237
|
+
return /*#__PURE__*/ V(Ns, {
|
|
2238
2238
|
scope: n,
|
|
2239
2239
|
content: y,
|
|
2240
2240
|
viewport: x,
|
|
@@ -2248,27 +2248,27 @@ var ls = [
|
|
|
2248
2248
|
position: r,
|
|
2249
2249
|
isPositioned: O,
|
|
2250
2250
|
searchRef: re
|
|
2251
|
-
}, /*#__PURE__*/
|
|
2251
|
+
}, /*#__PURE__*/ V(ls, {
|
|
2252
2252
|
as: Sa,
|
|
2253
2253
|
allowPinchZoom: !0
|
|
2254
|
-
}, /*#__PURE__*/
|
|
2254
|
+
}, /*#__PURE__*/ V(Xa, {
|
|
2255
2255
|
asChild: !0,
|
|
2256
2256
|
trapped: v.open,
|
|
2257
2257
|
onMountAutoFocus: (e) => {
|
|
2258
2258
|
e.preventDefault();
|
|
2259
2259
|
},
|
|
2260
|
-
onUnmountAutoFocus:
|
|
2260
|
+
onUnmountAutoFocus: Q(i, (e) => {
|
|
2261
2261
|
var t;
|
|
2262
2262
|
(t = v.trigger) == null || t.focus({ preventScroll: !0 }), e.preventDefault();
|
|
2263
2263
|
})
|
|
2264
|
-
}, /*#__PURE__*/
|
|
2264
|
+
}, /*#__PURE__*/ V(za, {
|
|
2265
2265
|
asChild: !0,
|
|
2266
2266
|
disableOutsidePointerEvents: !0,
|
|
2267
2267
|
onEscapeKeyDown: a,
|
|
2268
2268
|
onPointerDownOutside: o,
|
|
2269
2269
|
onFocusOutside: (e) => e.preventDefault(),
|
|
2270
2270
|
onDismiss: () => v.onOpenChange(!1)
|
|
2271
|
-
}, /*#__PURE__*/
|
|
2271
|
+
}, /*#__PURE__*/ V(oe, Z({
|
|
2272
2272
|
role: "listbox",
|
|
2273
2273
|
id: v.contentId,
|
|
2274
2274
|
"data-state": v.open ? "open" : "closed",
|
|
@@ -2283,7 +2283,7 @@ var ls = [
|
|
|
2283
2283
|
outline: "none",
|
|
2284
2284
|
..._.style
|
|
2285
2285
|
},
|
|
2286
|
-
onKeyDown:
|
|
2286
|
+
onKeyDown: Q(_.onKeyDown, (e) => {
|
|
2287
2287
|
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
2288
2288
|
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ie(e.key), [
|
|
2289
2289
|
"ArrowUp",
|
|
@@ -2300,18 +2300,18 @@ var ls = [
|
|
|
2300
2300
|
}
|
|
2301
2301
|
})
|
|
2302
2302
|
}))))));
|
|
2303
|
-
}),
|
|
2304
|
-
let { __scopeSelect: n, onPlaced: r, ...i } = e, a =
|
|
2303
|
+
}), Is = /*#__PURE__*/ H((e, t) => {
|
|
2304
|
+
let { __scopeSelect: n, onPlaced: r, ...i } = e, a = bs(As, n), o = Ps(As, n), [s, c] = K(null), [l, u] = K(null), d = $(t, (e) => u(e)), f = ms(n), p = G(!1), m = G(!0), { viewport: h, selectedItem: g, selectedItemText: _, focusSelectedItem: v } = o, y = U(() => {
|
|
2305
2305
|
if (a.trigger && a.valueNode && s && l && h && g && _) {
|
|
2306
2306
|
let e = a.trigger.getBoundingClientRect(), t = l.getBoundingClientRect(), n = a.valueNode.getBoundingClientRect(), i = _.getBoundingClientRect();
|
|
2307
2307
|
if (a.dir !== "rtl") {
|
|
2308
|
-
let r = i.left - t.left, a = n.left - r, o = e.left - a, c = e.width + o, l = Math.max(c, t.width), u = _a(a, [
|
|
2308
|
+
let r = i.left - t.left, a = n.left - r, o = e.left - a, c = e.width + o, l = Math.max(c, t.width), u = _a(a, [Ms, window.innerWidth - Ms - l]);
|
|
2309
2309
|
s.style.minWidth = c + "px", s.style.left = u + "px";
|
|
2310
2310
|
} else {
|
|
2311
|
-
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, c = e.width + o, l = Math.max(c, t.width), u = _a(a, [
|
|
2311
|
+
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, c = e.width + o, l = Math.max(c, t.width), u = _a(a, [Ms, window.innerWidth - Ms - l]);
|
|
2312
2312
|
s.style.minWidth = c + "px", s.style.right = u + "px";
|
|
2313
2313
|
}
|
|
2314
|
-
let o = f(), c = window.innerHeight - 20, u = h.scrollHeight, d = window.getComputedStyle(l), m = parseInt(d.borderTopWidth, 10), v = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = m + v + u + b + y, S = Math.min(g.offsetHeight * 5, x), C = window.getComputedStyle(h), w = parseInt(C.paddingTop, 10), ee = parseInt(C.paddingBottom, 10), T = e.top + e.height / 2 -
|
|
2314
|
+
let o = f(), c = window.innerHeight - 20, u = h.scrollHeight, d = window.getComputedStyle(l), m = parseInt(d.borderTopWidth, 10), v = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = m + v + u + b + y, S = Math.min(g.offsetHeight * 5, x), C = window.getComputedStyle(h), w = parseInt(C.paddingTop, 10), ee = parseInt(C.paddingBottom, 10), T = e.top + e.height / 2 - Ms, E = c - T, D = g.offsetHeight / 2, O = g.offsetTop + D, te = m + v + O, k = x - te;
|
|
2315
2315
|
if (te <= T) {
|
|
2316
2316
|
let e = g === o[o.length - 1].ref.current;
|
|
2317
2317
|
s.style.bottom = "0px";
|
|
@@ -2323,7 +2323,7 @@ var ls = [
|
|
|
2323
2323
|
let t = Math.max(T, m + h.offsetTop + (e ? w : 0) + D) + k;
|
|
2324
2324
|
s.style.height = t + "px", h.scrollTop = te - T + h.offsetTop;
|
|
2325
2325
|
}
|
|
2326
|
-
s.style.margin = `${
|
|
2326
|
+
s.style.margin = `${Ms}px 0`, s.style.minHeight = S + "px", s.style.maxHeight = c + "px", r?.(), requestAnimationFrame(() => p.current = !0);
|
|
2327
2327
|
}
|
|
2328
2328
|
}, [
|
|
2329
2329
|
f,
|
|
@@ -2337,20 +2337,20 @@ var ls = [
|
|
|
2337
2337
|
a.dir,
|
|
2338
2338
|
r
|
|
2339
2339
|
]);
|
|
2340
|
-
|
|
2341
|
-
let [b, x] =
|
|
2342
|
-
|
|
2340
|
+
co(() => y(), [y]);
|
|
2341
|
+
let [b, x] = K();
|
|
2342
|
+
co(() => {
|
|
2343
2343
|
l && x(window.getComputedStyle(l).zIndex);
|
|
2344
2344
|
}, [l]);
|
|
2345
|
-
let S =
|
|
2345
|
+
let S = U((e) => {
|
|
2346
2346
|
e && m.current === !0 && (y(), v?.(), m.current = !1);
|
|
2347
2347
|
}, [y, v]);
|
|
2348
|
-
return /*#__PURE__*/
|
|
2348
|
+
return /*#__PURE__*/ V(Rs, {
|
|
2349
2349
|
scope: n,
|
|
2350
2350
|
contentWrapper: s,
|
|
2351
2351
|
shouldExpandOnScrollRef: p,
|
|
2352
2352
|
onScrollButtonChange: S
|
|
2353
|
-
}, /*#__PURE__*/
|
|
2353
|
+
}, /*#__PURE__*/ V("div", {
|
|
2354
2354
|
ref: c,
|
|
2355
2355
|
style: {
|
|
2356
2356
|
display: "flex",
|
|
@@ -2358,7 +2358,7 @@ var ls = [
|
|
|
2358
2358
|
position: "fixed",
|
|
2359
2359
|
zIndex: b
|
|
2360
2360
|
}
|
|
2361
|
-
}, /*#__PURE__*/
|
|
2361
|
+
}, /*#__PURE__*/ V(Aa.div, Z({}, i, {
|
|
2362
2362
|
ref: d,
|
|
2363
2363
|
style: {
|
|
2364
2364
|
boxSizing: "border-box",
|
|
@@ -2366,9 +2366,9 @@ var ls = [
|
|
|
2366
2366
|
...i.style
|
|
2367
2367
|
}
|
|
2368
2368
|
}))));
|
|
2369
|
-
}),
|
|
2370
|
-
let { __scopeSelect: n, align: r = "start", collisionPadding: i =
|
|
2371
|
-
return /*#__PURE__*/
|
|
2369
|
+
}), Ls = /*#__PURE__*/ H((e, t) => {
|
|
2370
|
+
let { __scopeSelect: n, align: r = "start", collisionPadding: i = Ms, ...a } = e, o = vs(n);
|
|
2371
|
+
return /*#__PURE__*/ V(jo, Z({}, o, a, {
|
|
2372
2372
|
ref: t,
|
|
2373
2373
|
align: r,
|
|
2374
2374
|
collisionPadding: i,
|
|
@@ -2382,9 +2382,9 @@ var ls = [
|
|
|
2382
2382
|
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2383
2383
|
}
|
|
2384
2384
|
}));
|
|
2385
|
-
}), [
|
|
2386
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
2387
|
-
return /*#__PURE__*/
|
|
2385
|
+
}), [Rs, zs] = gs(As, {}), Bs = "SelectViewport", Vs = /*#__PURE__*/ H((e, t) => {
|
|
2386
|
+
let { __scopeSelect: n, ...r } = e, i = Ps(Bs, n), a = zs(Bs, n), o = $(t, i.onViewportChange), s = G(0);
|
|
2387
|
+
return /*#__PURE__*/ V(Nt, null, /*#__PURE__*/ V("style", { dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" } }), /*#__PURE__*/ V(ps.Slot, { scope: n }, /*#__PURE__*/ V(Aa.div, Z({
|
|
2388
2388
|
"data-radix-select-viewport": "",
|
|
2389
2389
|
role: "presentation"
|
|
2390
2390
|
}, r, {
|
|
@@ -2395,7 +2395,7 @@ var ls = [
|
|
|
2395
2395
|
overflow: "auto",
|
|
2396
2396
|
...r.style
|
|
2397
2397
|
},
|
|
2398
|
-
onScroll:
|
|
2398
|
+
onScroll: Q(r.onScroll, (e) => {
|
|
2399
2399
|
let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = a;
|
|
2400
2400
|
if (r != null && r.current && n) {
|
|
2401
2401
|
let e = Math.abs(s.current - t.scrollTop);
|
|
@@ -2410,25 +2410,25 @@ var ls = [
|
|
|
2410
2410
|
s.current = t.scrollTop;
|
|
2411
2411
|
})
|
|
2412
2412
|
}))));
|
|
2413
|
-
}), [
|
|
2414
|
-
let { __scopeSelect: n, value: r, disabled: i = !1, textValue: a, ...o } = e, s =
|
|
2413
|
+
}), [Hs, Us] = gs("SelectGroup"), Ws = "SelectItem", [Gs, Ks] = gs(Ws), qs = /*#__PURE__*/ H((e, t) => {
|
|
2414
|
+
let { __scopeSelect: n, value: r, disabled: i = !1, textValue: a, ...o } = e, s = bs(Ws, n), c = Ps(Ws, n), l = s.value === r, [u, d] = K(a ?? ""), [f, p] = K(!1), m = $(t, (e) => c.itemRefCallback?.call(c, e, r, i)), h = fo(), g = () => {
|
|
2415
2415
|
i || (s.onValueChange(r), s.onOpenChange(!1));
|
|
2416
2416
|
};
|
|
2417
|
-
return /*#__PURE__*/
|
|
2417
|
+
return /*#__PURE__*/ V(Gs, {
|
|
2418
2418
|
scope: n,
|
|
2419
2419
|
value: r,
|
|
2420
2420
|
disabled: i,
|
|
2421
2421
|
textId: h,
|
|
2422
2422
|
isSelected: l,
|
|
2423
|
-
onItemTextChange:
|
|
2423
|
+
onItemTextChange: U((e) => {
|
|
2424
2424
|
d((t) => t || (e?.textContent ?? "").trim());
|
|
2425
2425
|
}, [])
|
|
2426
|
-
}, /*#__PURE__*/
|
|
2426
|
+
}, /*#__PURE__*/ V(ps.ItemSlot, {
|
|
2427
2427
|
scope: n,
|
|
2428
2428
|
value: r,
|
|
2429
2429
|
disabled: i,
|
|
2430
2430
|
textValue: u
|
|
2431
|
-
}, /*#__PURE__*/
|
|
2431
|
+
}, /*#__PURE__*/ V(Aa.div, Z({
|
|
2432
2432
|
role: "option",
|
|
2433
2433
|
"aria-labelledby": h,
|
|
2434
2434
|
"data-highlighted": f ? "" : void 0,
|
|
@@ -2439,27 +2439,27 @@ var ls = [
|
|
|
2439
2439
|
tabIndex: i ? void 0 : -1
|
|
2440
2440
|
}, o, {
|
|
2441
2441
|
ref: m,
|
|
2442
|
-
onFocus:
|
|
2443
|
-
onBlur:
|
|
2444
|
-
onPointerUp:
|
|
2445
|
-
onPointerMove:
|
|
2442
|
+
onFocus: Q(o.onFocus, () => p(!0)),
|
|
2443
|
+
onBlur: Q(o.onBlur, () => p(!1)),
|
|
2444
|
+
onPointerUp: Q(o.onPointerUp, g),
|
|
2445
|
+
onPointerMove: Q(o.onPointerMove, (e) => {
|
|
2446
2446
|
if (i) {
|
|
2447
2447
|
var t;
|
|
2448
2448
|
(t = c.onItemLeave) == null || t.call(c);
|
|
2449
2449
|
} else e.currentTarget.focus({ preventScroll: !0 });
|
|
2450
2450
|
}),
|
|
2451
|
-
onPointerLeave:
|
|
2451
|
+
onPointerLeave: Q(o.onPointerLeave, (e) => {
|
|
2452
2452
|
if (e.currentTarget === document.activeElement) {
|
|
2453
2453
|
var t;
|
|
2454
2454
|
(t = c.onItemLeave) == null || t.call(c);
|
|
2455
2455
|
}
|
|
2456
2456
|
}),
|
|
2457
|
-
onKeyDown:
|
|
2458
|
-
(c.searchRef?.current === "" || e.key !== " ") && (
|
|
2457
|
+
onKeyDown: Q(o.onKeyDown, (e) => {
|
|
2458
|
+
(c.searchRef?.current === "" || e.key !== " ") && (ds.includes(e.key) && g(), e.key === " " && e.preventDefault());
|
|
2459
2459
|
})
|
|
2460
2460
|
}))));
|
|
2461
|
-
}),
|
|
2462
|
-
let { __scopeSelect: r, className: i, style: a, ...o } = e, s =
|
|
2461
|
+
}), Js = "SelectItemText", Ys = /*#__PURE__*/ H((e, t) => {
|
|
2462
|
+
let { __scopeSelect: r, className: i, style: a, ...o } = e, s = bs(Js, r), c = Ps(Js, r), l = Ks(Js, r), u = Ss(Js, r), [d, f] = K(null), p = $(t, (e) => f(e), l.onItemTextChange, (e) => c.itemTextRefCallback?.call(c, e, l.value, l.disabled)), m = d?.textContent, h = zt(() => /*#__PURE__*/ V("option", {
|
|
2463
2463
|
key: l.value,
|
|
2464
2464
|
value: l.value,
|
|
2465
2465
|
disabled: l.disabled
|
|
@@ -2468,17 +2468,17 @@ var ls = [
|
|
|
2468
2468
|
l.value,
|
|
2469
2469
|
m
|
|
2470
2470
|
]), { onNativeOptionAdd: g, onNativeOptionRemove: _ } = u;
|
|
2471
|
-
return
|
|
2471
|
+
return co(() => (g(h), () => _(h)), [
|
|
2472
2472
|
g,
|
|
2473
2473
|
_,
|
|
2474
2474
|
h
|
|
2475
|
-
]), /*#__PURE__*/
|
|
2476
|
-
}),
|
|
2475
|
+
]), /*#__PURE__*/ V(Nt, null, /*#__PURE__*/ V(Aa.span, Z({ id: l.textId }, o, { ref: p })), l.isSelected && s.valueNode && !s.valueNodeHasChildren ? /*#__PURE__*/ n(o.children, s.valueNode) : null);
|
|
2476
|
+
}), Xs = "SelectItemIndicator", Zs = /*#__PURE__*/ H((e, t) => {
|
|
2477
2477
|
let { __scopeSelect: n, ...r } = e;
|
|
2478
|
-
return
|
|
2479
|
-
}),
|
|
2480
|
-
let n =
|
|
2481
|
-
return
|
|
2478
|
+
return Ks(Xs, n).isSelected ? /*#__PURE__*/ V(Aa.span, Z({ "aria-hidden": !0 }, r, { ref: t })) : null;
|
|
2479
|
+
}), Qs = "SelectScrollUpButton", $s = /*#__PURE__*/ H((e, t) => {
|
|
2480
|
+
let n = Ps(Qs, e.__scopeSelect), r = zs(Qs, e.__scopeSelect), [i, a] = K(!1), o = $(t, r.onScrollButtonChange);
|
|
2481
|
+
return co(() => {
|
|
2482
2482
|
if (n.viewport && n.isPositioned) {
|
|
2483
2483
|
let e = n.viewport;
|
|
2484
2484
|
function t() {
|
|
@@ -2487,16 +2487,16 @@ var ls = [
|
|
|
2487
2487
|
}
|
|
2488
2488
|
return t(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
2489
2489
|
}
|
|
2490
|
-
}, [n.viewport, n.isPositioned]), i ? /*#__PURE__*/
|
|
2490
|
+
}, [n.viewport, n.isPositioned]), i ? /*#__PURE__*/ V(nc, Z({}, e, {
|
|
2491
2491
|
ref: o,
|
|
2492
2492
|
onAutoScroll: () => {
|
|
2493
2493
|
let { viewport: e, selectedItem: t } = n;
|
|
2494
2494
|
e && t && (e.scrollTop -= t.offsetHeight);
|
|
2495
2495
|
}
|
|
2496
2496
|
})) : null;
|
|
2497
|
-
}),
|
|
2498
|
-
let n =
|
|
2499
|
-
return
|
|
2497
|
+
}), ec = "SelectScrollDownButton", tc = /*#__PURE__*/ H((e, t) => {
|
|
2498
|
+
let n = Ps(ec, e.__scopeSelect), r = zs(ec, e.__scopeSelect), [i, a] = K(!1), o = $(t, r.onScrollButtonChange);
|
|
2499
|
+
return co(() => {
|
|
2500
2500
|
if (n.viewport && n.isPositioned) {
|
|
2501
2501
|
let e = n.viewport;
|
|
2502
2502
|
function t() {
|
|
@@ -2505,157 +2505,157 @@ var ls = [
|
|
|
2505
2505
|
}
|
|
2506
2506
|
return t(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
2507
2507
|
}
|
|
2508
|
-
}, [n.viewport, n.isPositioned]), i ? /*#__PURE__*/
|
|
2508
|
+
}, [n.viewport, n.isPositioned]), i ? /*#__PURE__*/ V(nc, Z({}, e, {
|
|
2509
2509
|
ref: o,
|
|
2510
2510
|
onAutoScroll: () => {
|
|
2511
2511
|
let { viewport: e, selectedItem: t } = n;
|
|
2512
2512
|
e && t && (e.scrollTop += t.offsetHeight);
|
|
2513
2513
|
}
|
|
2514
2514
|
})) : null;
|
|
2515
|
-
}),
|
|
2516
|
-
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a =
|
|
2515
|
+
}), nc = /*#__PURE__*/ H((e, t) => {
|
|
2516
|
+
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Ps("SelectScrollButton", n), o = G(null), s = ms(n), c = U(() => {
|
|
2517
2517
|
o.current !== null && (window.clearInterval(o.current), o.current = null);
|
|
2518
2518
|
}, []);
|
|
2519
|
-
return
|
|
2519
|
+
return W(() => () => c(), [c]), co(() => {
|
|
2520
2520
|
var e;
|
|
2521
2521
|
let t = s().find((e) => e.ref.current === document.activeElement);
|
|
2522
2522
|
t == null || (e = t.ref.current) == null || e.scrollIntoView({ block: "nearest" });
|
|
2523
|
-
}, [s]), /*#__PURE__*/
|
|
2523
|
+
}, [s]), /*#__PURE__*/ V(Aa.div, Z({ "aria-hidden": !0 }, i, {
|
|
2524
2524
|
ref: t,
|
|
2525
2525
|
style: {
|
|
2526
2526
|
flexShrink: 0,
|
|
2527
2527
|
...i.style
|
|
2528
2528
|
},
|
|
2529
|
-
onPointerDown:
|
|
2529
|
+
onPointerDown: Q(i.onPointerDown, () => {
|
|
2530
2530
|
o.current === null && (o.current = window.setInterval(r, 50));
|
|
2531
2531
|
}),
|
|
2532
|
-
onPointerMove:
|
|
2532
|
+
onPointerMove: Q(i.onPointerMove, () => {
|
|
2533
2533
|
var e;
|
|
2534
2534
|
(e = a.onItemLeave) == null || e.call(a), o.current === null && (o.current = window.setInterval(r, 50));
|
|
2535
2535
|
}),
|
|
2536
|
-
onPointerLeave:
|
|
2536
|
+
onPointerLeave: Q(i.onPointerLeave, () => {
|
|
2537
2537
|
c();
|
|
2538
2538
|
})
|
|
2539
2539
|
}));
|
|
2540
|
-
}),
|
|
2541
|
-
let { value: n, ...r } = e, i =
|
|
2542
|
-
return
|
|
2540
|
+
}), rc = /*#__PURE__*/ H((e, t) => {
|
|
2541
|
+
let { value: n, ...r } = e, i = G(null), a = $(t, i), o = Fo(n);
|
|
2542
|
+
return W(() => {
|
|
2543
2543
|
let e = i.current, t = window.HTMLSelectElement.prototype, r = Object.getOwnPropertyDescriptor(t, "value").set;
|
|
2544
2544
|
if (o !== n && r) {
|
|
2545
2545
|
let t = new Event("change", { bubbles: !0 });
|
|
2546
2546
|
r.call(e, n), e.dispatchEvent(t);
|
|
2547
2547
|
}
|
|
2548
|
-
}, [o, n]), /*#__PURE__*/
|
|
2548
|
+
}, [o, n]), /*#__PURE__*/ V(Io, { asChild: !0 }, /*#__PURE__*/ V("select", Z({}, r, {
|
|
2549
2549
|
ref: a,
|
|
2550
2550
|
defaultValue: n
|
|
2551
2551
|
})));
|
|
2552
2552
|
});
|
|
2553
|
-
|
|
2554
|
-
function
|
|
2555
|
-
let t =
|
|
2553
|
+
rc.displayName = "BubbleSelect";
|
|
2554
|
+
function ic(e) {
|
|
2555
|
+
let t = Ma(e), n = G(""), r = G(0), i = U((e) => {
|
|
2556
2556
|
let i = n.current + e;
|
|
2557
2557
|
t(i), (function e(t) {
|
|
2558
2558
|
n.current = t, window.clearTimeout(r.current), t !== "" && (r.current = window.setTimeout(() => e(""), 1e3));
|
|
2559
2559
|
})(i);
|
|
2560
|
-
}, [t]), a =
|
|
2560
|
+
}, [t]), a = U(() => {
|
|
2561
2561
|
n.current = "", window.clearTimeout(r.current);
|
|
2562
2562
|
}, []);
|
|
2563
|
-
return
|
|
2563
|
+
return W(() => () => window.clearTimeout(r.current), []), [
|
|
2564
2564
|
n,
|
|
2565
2565
|
i,
|
|
2566
2566
|
a
|
|
2567
2567
|
];
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2570
|
-
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a =
|
|
2569
|
+
function ac(e, t, n) {
|
|
2570
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = oc(e, Math.max(i, 0));
|
|
2571
2571
|
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
2572
2572
|
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
2573
2573
|
return o === n ? void 0 : o;
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function oc(e, t) {
|
|
2576
2576
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2577
2577
|
}
|
|
2578
|
-
var
|
|
2578
|
+
var sc = Cs, cc = Ts, lc = Ds, uc = Os, dc = ks, fc = js, pc = Vs, mc = qs, hc = Ys, gc = Zs, _c = $s, vc = tc, yc = "w-(--radix-select-trigger-width) min-w-[180px]", bc = "max-h-(--radix-select-content-available-height)", xc = "origin-(--radix-select-content-transform-origin)", Sc = ({ ...e }) => /* @__PURE__ */ q(sc, {
|
|
2579
2579
|
"data-slot": "select",
|
|
2580
2580
|
...e
|
|
2581
|
-
}),
|
|
2581
|
+
}), Cc = ({ ...e }) => /* @__PURE__ */ q(lc, {
|
|
2582
2582
|
"data-slot": "select-value",
|
|
2583
2583
|
...e
|
|
2584
|
-
}),
|
|
2584
|
+
}), wc = ({ className: e, size: t = "default", children: n, ...r }) => /* @__PURE__ */ J(cc, {
|
|
2585
2585
|
"data-slot": "select-trigger",
|
|
2586
2586
|
"data-size": t,
|
|
2587
|
-
className:
|
|
2587
|
+
className: B("flex w-fit cursor-pointer items-center justify-between gap-2 rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-sm text-(--foreground) whitespace-nowrap transition-colors outline-hidden select-none hover:border-(--border) focus-visible:shadow-focus-ring disabled:cursor-not-allowed disabled:bg-(--accent) disabled:text-(--muted-foreground) aria-invalid:border-(--destructive) aria-invalid:ring-2 aria-invalid:ring-(--destructive)/20 data-[placeholder]:text-(--muted-foreground) data-[size=default]:h-9 data-[size=sm]:h-7 *:data-[slot=select-value]:block *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4", e),
|
|
2588
2588
|
...r,
|
|
2589
|
-
children: [n, /* @__PURE__ */
|
|
2589
|
+
children: [n, /* @__PURE__ */ q(uc, {
|
|
2590
2590
|
asChild: !0,
|
|
2591
|
-
children: /* @__PURE__ */
|
|
2591
|
+
children: /* @__PURE__ */ q(_, { className: "pointer-events-none size-4 shrink-0 self-center text-(--muted-foreground)" })
|
|
2592
2592
|
})]
|
|
2593
|
-
}),
|
|
2594
|
-
let c =
|
|
2595
|
-
return /* @__PURE__ */
|
|
2593
|
+
}), Tc = ({ className: e, children: t, position: n = "item-aligned", align: r = "center", container: i, size: a = "trigger", hideWhenDetached: o = !0, ...s }) => {
|
|
2594
|
+
let c = ve();
|
|
2595
|
+
return /* @__PURE__ */ q(dc, {
|
|
2596
2596
|
container: i ?? c ?? void 0,
|
|
2597
|
-
children: /* @__PURE__ */
|
|
2597
|
+
children: /* @__PURE__ */ J(fc, {
|
|
2598
2598
|
"data-slot": "select-content",
|
|
2599
2599
|
"data-align-trigger": n === "item-aligned",
|
|
2600
|
-
className:
|
|
2600
|
+
className: B("pointer-events-auto relative z-app-popover", Ii(a, yc), bc, Ji, Pi, Li, xc, Ri, "data-[align-trigger=true]:animate-none", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
2601
2601
|
position: n,
|
|
2602
2602
|
align: r,
|
|
2603
2603
|
hideWhenDetached: o,
|
|
2604
2604
|
...s,
|
|
2605
2605
|
children: [
|
|
2606
|
-
/* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
2606
|
+
/* @__PURE__ */ q(Dc, {}),
|
|
2607
|
+
/* @__PURE__ */ q(pc, {
|
|
2608
2608
|
"data-position": n,
|
|
2609
|
-
className:
|
|
2609
|
+
className: B("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)", n === "popper" && ""),
|
|
2610
2610
|
children: t
|
|
2611
2611
|
}),
|
|
2612
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ q(Oc, {})
|
|
2613
2613
|
]
|
|
2614
2614
|
})
|
|
2615
2615
|
});
|
|
2616
|
-
},
|
|
2616
|
+
}, Ec = ({ className: e, children: t, ...n }) => /* @__PURE__ */ J(mc, {
|
|
2617
2617
|
"data-slot": "select-item",
|
|
2618
|
-
className:
|
|
2618
|
+
className: B(zi, Bi, Ui, "w-full data-disabled:cursor-not-allowed *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
|
|
2619
2619
|
...n,
|
|
2620
|
-
children: [/* @__PURE__ */
|
|
2621
|
-
className:
|
|
2622
|
-
children: /* @__PURE__ */
|
|
2623
|
-
}), /* @__PURE__ */
|
|
2624
|
-
}),
|
|
2620
|
+
children: [/* @__PURE__ */ q("span", {
|
|
2621
|
+
className: B(Wi, "size-4"),
|
|
2622
|
+
children: /* @__PURE__ */ q(gc, { children: /* @__PURE__ */ q(Me, { className: "pointer-events-none" }) })
|
|
2623
|
+
}), /* @__PURE__ */ q(hc, { children: t })]
|
|
2624
|
+
}), Dc = ({ className: e, ...t }) => /* @__PURE__ */ q(_c, {
|
|
2625
2625
|
"data-slot": "select-scroll-up-button",
|
|
2626
|
-
className:
|
|
2626
|
+
className: B("z-10 flex cursor-default items-center justify-center bg-(--popover) py-1 text-(--muted-foreground) [&_svg:not([class*=size-])]:size-4", e),
|
|
2627
2627
|
...t,
|
|
2628
|
-
children: /* @__PURE__ */
|
|
2629
|
-
}),
|
|
2628
|
+
children: /* @__PURE__ */ q(Gt, {})
|
|
2629
|
+
}), Oc = ({ className: e, ...t }) => /* @__PURE__ */ q(vc, {
|
|
2630
2630
|
"data-slot": "select-scroll-down-button",
|
|
2631
|
-
className:
|
|
2631
|
+
className: B("z-10 flex cursor-default items-center justify-center bg-(--popover) py-1 text-(--muted-foreground) [&_svg:not([class*=size-])]:size-4", e),
|
|
2632
2632
|
...t,
|
|
2633
|
-
children: /* @__PURE__ */
|
|
2634
|
-
}),
|
|
2633
|
+
children: /* @__PURE__ */ q(_, {})
|
|
2634
|
+
}), kc = ({ delayDuration: e = 0, ...t }) => /* @__PURE__ */ q(Oi, {
|
|
2635
2635
|
"data-slot": "tooltip-provider",
|
|
2636
2636
|
delayDuration: e,
|
|
2637
2637
|
...t
|
|
2638
|
-
}),
|
|
2638
|
+
}), Ac = ({ ...e }) => /* @__PURE__ */ q(ki, {
|
|
2639
2639
|
"data-slot": "tooltip",
|
|
2640
2640
|
...e
|
|
2641
|
-
}),
|
|
2641
|
+
}), jc = ({ ...e }) => /* @__PURE__ */ q(Ai, {
|
|
2642
2642
|
"data-slot": "tooltip-trigger",
|
|
2643
2643
|
...e
|
|
2644
|
-
}),
|
|
2645
|
-
let i =
|
|
2646
|
-
return /* @__PURE__ */
|
|
2644
|
+
}), Mc = ({ className: e, sideOffset: t = 0, children: n, ...r }) => {
|
|
2645
|
+
let i = ve();
|
|
2646
|
+
return /* @__PURE__ */ q(ji, {
|
|
2647
2647
|
container: i ?? void 0,
|
|
2648
|
-
children: /* @__PURE__ */
|
|
2648
|
+
children: /* @__PURE__ */ J(Mi, {
|
|
2649
2649
|
"data-slot": "tooltip-content",
|
|
2650
2650
|
sideOffset: t,
|
|
2651
|
-
className:
|
|
2651
|
+
className: B("z-app-popover inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md border border-(--border) bg-(--popover) px-3 py-1.5 text-xs text-(--popover-foreground) shadow-xl has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm", "data-[state=delayed-open]:animate-menu-in motion-reduce:animate-none", e),
|
|
2652
2652
|
...r,
|
|
2653
|
-
children: [n, /* @__PURE__ */
|
|
2653
|
+
children: [n, /* @__PURE__ */ q(Ni, { className: "z-50 -mt-0.5 size-2.5 -translate-y-1/2 rotate-45 rounded-xs bg-(--popover) fill-(--popover)" })]
|
|
2654
2654
|
})
|
|
2655
2655
|
});
|
|
2656
2656
|
};
|
|
2657
2657
|
// src/v2/surfaces/MetricCard/states/shared.ts
|
|
2658
|
-
function
|
|
2658
|
+
function Nc(e, t, n, { customMessages: r, translationDictionary: i, selectedLanguage: a }) {
|
|
2659
2659
|
let o = n ?? r?.[t] ?? e;
|
|
2660
2660
|
return u({
|
|
2661
2661
|
text: o,
|
|
@@ -2664,24 +2664,24 @@ function Mc(e, t, n, { customMessages: r, translationDictionary: i, selectedLang
|
|
|
2664
2664
|
});
|
|
2665
2665
|
}
|
|
2666
2666
|
// src/v2/surfaces/MetricCard/states/ErrorState.tsx
|
|
2667
|
-
var
|
|
2668
|
-
let u = t ?? a?.error, d = u === void 0 ? void 0 :
|
|
2667
|
+
var Pc = ({ error: e, message: t, onRetry: n, widgetName: r, chartType: i, customMessages: a, translationDictionary: o, selectedLanguage: s, knownCause: c, className: l }) => {
|
|
2668
|
+
let u = t ?? a?.error, d = u === void 0 ? void 0 : Nc("", "error", u, {
|
|
2669
2669
|
customMessages: a,
|
|
2670
2670
|
translationDictionary: o,
|
|
2671
2671
|
selectedLanguage: s
|
|
2672
2672
|
}), f = c ? "The datasource connection failed. Open it to check the connection settings." : d, p = e && (c || d !== void 0) ? {
|
|
2673
2673
|
...e,
|
|
2674
2674
|
message: f ?? e.message
|
|
2675
|
-
} : e, m =
|
|
2675
|
+
} : e, m = Nc("Try again", "retry", void 0, {
|
|
2676
2676
|
customMessages: a,
|
|
2677
2677
|
translationDictionary: o,
|
|
2678
2678
|
selectedLanguage: s
|
|
2679
2679
|
});
|
|
2680
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ J("div", {
|
|
2681
2681
|
"data-testid": "card-error-state",
|
|
2682
2682
|
"data-slot": "metric-card-error",
|
|
2683
|
-
className:
|
|
2684
|
-
children: [/* @__PURE__ */
|
|
2683
|
+
className: B("flex min-h-0 w-full flex-1 flex-col", l),
|
|
2684
|
+
children: [/* @__PURE__ */ q(At, {
|
|
2685
2685
|
state: "error",
|
|
2686
2686
|
widgetName: r,
|
|
2687
2687
|
chartType: i,
|
|
@@ -2690,32 +2690,32 @@ var Nc = ({ error: e, message: t, onRetry: n, widgetName: r, chartType: i, custo
|
|
|
2690
2690
|
onRetry: n,
|
|
2691
2691
|
retryLabel: m,
|
|
2692
2692
|
retryTestId: "card-error-retry"
|
|
2693
|
-
}), c ? /* @__PURE__ */
|
|
2693
|
+
}), c ? /* @__PURE__ */ q("div", {
|
|
2694
2694
|
className: "flex shrink-0 justify-center pb-2",
|
|
2695
|
-
children: /* @__PURE__ */
|
|
2695
|
+
children: /* @__PURE__ */ q(Ce, {
|
|
2696
2696
|
asChild: !0,
|
|
2697
2697
|
variant: "link",
|
|
2698
2698
|
size: "inline",
|
|
2699
2699
|
"data-testid": "card-error-open-datasource",
|
|
2700
|
-
children: /* @__PURE__ */
|
|
2700
|
+
children: /* @__PURE__ */ q("a", {
|
|
2701
2701
|
href: c.href ?? "/datasources",
|
|
2702
2702
|
children: "Open datasource"
|
|
2703
2703
|
})
|
|
2704
2704
|
})
|
|
2705
2705
|
}) : null]
|
|
2706
2706
|
});
|
|
2707
|
-
},
|
|
2707
|
+
}, Fc = {
|
|
2708
2708
|
code: "CARD_LOAD_TIMEOUT",
|
|
2709
2709
|
message: "The server did not answer in 60 seconds.",
|
|
2710
2710
|
hint: "The query is still running, so a late answer still shows here. Retry waits for it again.",
|
|
2711
2711
|
retryable: !0
|
|
2712
|
-
},
|
|
2713
|
-
let { expired: o, restart: s } =
|
|
2714
|
-
return o ? /* @__PURE__ */
|
|
2712
|
+
}, Ic = ({ className: e, onRetry: t, widgetName: n, chartType: r, deadlineMs: i, ...a }) => {
|
|
2713
|
+
let { expired: o, restart: s } = he(i !== void 0, i);
|
|
2714
|
+
return o ? /* @__PURE__ */ q("div", {
|
|
2715
2715
|
"data-testid": "card-load-timeout",
|
|
2716
2716
|
className: "flex min-h-0 flex-1 flex-col",
|
|
2717
|
-
children: /* @__PURE__ */
|
|
2718
|
-
error:
|
|
2717
|
+
children: /* @__PURE__ */ q(Pc, {
|
|
2718
|
+
error: Fc,
|
|
2719
2719
|
widgetName: n,
|
|
2720
2720
|
chartType: r,
|
|
2721
2721
|
onRetry: t ? () => {
|
|
@@ -2724,15 +2724,15 @@ var Nc = ({ error: e, message: t, onRetry: n, widgetName: r, chartType: i, custo
|
|
|
2724
2724
|
className: e,
|
|
2725
2725
|
...a
|
|
2726
2726
|
})
|
|
2727
|
-
}) : /* @__PURE__ */
|
|
2727
|
+
}) : /* @__PURE__ */ q(ye, {
|
|
2728
2728
|
label: "Loading chart",
|
|
2729
2729
|
className: e,
|
|
2730
2730
|
"data-testid": "card-loading-skeleton"
|
|
2731
2731
|
});
|
|
2732
|
-
},
|
|
2733
|
-
function
|
|
2732
|
+
}, Lc = typeof window < "u" ? e.useLayoutEffect : e.useEffect;
|
|
2733
|
+
function Rc(t) {
|
|
2734
2734
|
let [n, r] = e.useState("full");
|
|
2735
|
-
return
|
|
2735
|
+
return Lc(() => {
|
|
2736
2736
|
let e = t.current;
|
|
2737
2737
|
if (!e) return;
|
|
2738
2738
|
let n = typeof e.closest == "function" ? e.closest(`[${Ot}]`) : null, i = () => {
|
|
@@ -2744,7 +2744,7 @@ function Lc(t) {
|
|
|
2744
2744
|
return a.observe(e), n && a.observe(n), () => a.disconnect();
|
|
2745
2745
|
}, [t]), n;
|
|
2746
2746
|
}
|
|
2747
|
-
var
|
|
2747
|
+
var zc = {
|
|
2748
2748
|
columns: "Choose columns",
|
|
2749
2749
|
configure: "Open Configure",
|
|
2750
2750
|
appearance: "Open Appearance",
|
|
@@ -2752,61 +2752,61 @@ var Rc = {
|
|
|
2752
2752
|
groupBy: "Set Group by",
|
|
2753
2753
|
filters: "Edit filters",
|
|
2754
2754
|
geo: "Open Geography"
|
|
2755
|
-
},
|
|
2756
|
-
let u = e.useRef(null), d =
|
|
2755
|
+
}, Bc = ({ reason: t, section: n, onOpenSection: r, actionLabel: i, widgetName: a, customMessages: o, translationDictionary: s, selectedLanguage: c, className: l }) => {
|
|
2756
|
+
let u = e.useRef(null), d = Rc(u), f = Nc(t, "empty", t, {
|
|
2757
2757
|
customMessages: o,
|
|
2758
2758
|
translationDictionary: s,
|
|
2759
2759
|
selectedLanguage: c
|
|
2760
2760
|
}), p = e.useMemo(() => {
|
|
2761
|
-
if (n) return
|
|
2761
|
+
if (n) return Vc(i ?? zc[n], s, c);
|
|
2762
2762
|
}, [
|
|
2763
2763
|
n,
|
|
2764
2764
|
i,
|
|
2765
2765
|
s,
|
|
2766
2766
|
c
|
|
2767
2767
|
]), m = !!(n && r && p), h = a ? `${a}: ${f}` : f;
|
|
2768
|
-
if (d === "none") return /* @__PURE__ */
|
|
2768
|
+
if (d === "none") return /* @__PURE__ */ q("div", {
|
|
2769
2769
|
ref: u,
|
|
2770
2770
|
"data-testid": "card-mismatch-state",
|
|
2771
2771
|
"data-slot": "metric-card-mismatch",
|
|
2772
2772
|
"data-density": "none",
|
|
2773
|
-
className:
|
|
2774
|
-
children: /* @__PURE__ */
|
|
2773
|
+
className: B("flex min-h-0 w-full flex-1", l),
|
|
2774
|
+
children: /* @__PURE__ */ q("span", {
|
|
2775
2775
|
className: "sr-only",
|
|
2776
2776
|
children: h
|
|
2777
2777
|
})
|
|
2778
2778
|
});
|
|
2779
2779
|
let g = d === "inline";
|
|
2780
|
-
return /* @__PURE__ */
|
|
2780
|
+
return /* @__PURE__ */ J("div", {
|
|
2781
2781
|
ref: u,
|
|
2782
2782
|
"data-testid": "card-mismatch-state",
|
|
2783
2783
|
"data-slot": "metric-card-mismatch",
|
|
2784
2784
|
"data-density": d,
|
|
2785
2785
|
role: "note",
|
|
2786
2786
|
"aria-label": h,
|
|
2787
|
-
className:
|
|
2788
|
-
children: [/* @__PURE__ */
|
|
2787
|
+
className: B("flex min-h-0 w-full flex-1 flex-col justify-center gap-2 overflow-hidden", g ? "px-3 py-1.5" : "px-4 py-3", l),
|
|
2788
|
+
children: [/* @__PURE__ */ q("p", {
|
|
2789
2789
|
"data-testid": "card-mismatch-reason",
|
|
2790
|
-
className:
|
|
2790
|
+
className: B("m-0 text-xs leading-4 text-(--foreground)", g ? "line-clamp-1" : "line-clamp-3"),
|
|
2791
2791
|
children: f
|
|
2792
|
-
}), m && !g ? /* @__PURE__ */
|
|
2792
|
+
}), m && !g ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q("button", {
|
|
2793
2793
|
type: "button",
|
|
2794
2794
|
"data-testid": "card-mismatch-action",
|
|
2795
2795
|
onClick: () => n && r?.(n),
|
|
2796
|
-
className:
|
|
2796
|
+
className: B("inline-flex min-h-6 items-center rounded-(--radius-sm) border border-(--border)", "bg-(--background) px-2.5 py-1 text-xs font-medium text-(--foreground)", "hover:bg-(--accent)", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-(--ring) focus-visible:ring-offset-2 focus-visible:ring-offset-(--background)"),
|
|
2797
2797
|
children: p
|
|
2798
2798
|
}) }) : null]
|
|
2799
2799
|
});
|
|
2800
2800
|
};
|
|
2801
|
-
function
|
|
2802
|
-
return
|
|
2801
|
+
function Vc(e, t, n) {
|
|
2802
|
+
return Nc(e, "empty", e, {
|
|
2803
2803
|
translationDictionary: t,
|
|
2804
2804
|
selectedLanguage: n
|
|
2805
2805
|
});
|
|
2806
2806
|
}
|
|
2807
2807
|
// src/v2/surfaces/MetricCard/states/NoDataState.tsx
|
|
2808
|
-
var
|
|
2809
|
-
let m = t || n, h = l?.noData ?? l?.emptyCard, g =
|
|
2808
|
+
var Hc = ({ noDataImg: t, noDataFoundSvg: n, message: r, hint: o, action: s, hasActiveFilters: c = !1, customMessages: l, translationDictionary: d, selectedLanguage: f, className: p }) => {
|
|
2809
|
+
let m = t || n, h = l?.noData ?? l?.emptyCard, g = Nc(i(c), "noData", r, {
|
|
2810
2810
|
customMessages: {
|
|
2811
2811
|
...l,
|
|
2812
2812
|
noData: h
|
|
@@ -2828,63 +2828,63 @@ var Vc = ({ noDataImg: t, noDataFoundSvg: n, message: r, hint: o, action: s, has
|
|
|
2828
2828
|
}, [m, v]);
|
|
2829
2829
|
return e.useEffect(() => {
|
|
2830
2830
|
if (y?.startsWith("blob:")) return () => URL.revokeObjectURL(y);
|
|
2831
|
-
}, [y]), /* @__PURE__ */
|
|
2831
|
+
}, [y]), /* @__PURE__ */ J("div", {
|
|
2832
2832
|
"data-testid": "card-no-data-state",
|
|
2833
2833
|
"data-slot": "metric-card-no-data",
|
|
2834
|
-
className:
|
|
2834
|
+
className: B("flex w-full flex-col items-center justify-center gap-3 p-6 text-center", p),
|
|
2835
2835
|
children: [
|
|
2836
|
-
m ? /* @__PURE__ */
|
|
2836
|
+
m ? /* @__PURE__ */ q("img", {
|
|
2837
2837
|
src: y,
|
|
2838
2838
|
alt: g
|
|
2839
|
-
}) : /* @__PURE__ */
|
|
2839
|
+
}) : /* @__PURE__ */ q("div", {
|
|
2840
2840
|
className: "flex size-16 items-center justify-center rounded-(--radius-lg) bg-(--muted)",
|
|
2841
|
-
children: /* @__PURE__ */
|
|
2841
|
+
children: /* @__PURE__ */ q(be, {
|
|
2842
2842
|
className: "size-8 text-(--muted-foreground)",
|
|
2843
2843
|
"aria-hidden": "true"
|
|
2844
2844
|
})
|
|
2845
2845
|
}),
|
|
2846
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ q("span", {
|
|
2847
2847
|
className: "text-sm text-(--muted-foreground)",
|
|
2848
2848
|
children: g
|
|
2849
2849
|
}),
|
|
2850
|
-
_ ? /* @__PURE__ */
|
|
2850
|
+
_ ? /* @__PURE__ */ q("span", {
|
|
2851
2851
|
className: "text-xs text-(--muted-foreground)",
|
|
2852
2852
|
children: _
|
|
2853
2853
|
}) : null,
|
|
2854
2854
|
s
|
|
2855
2855
|
]
|
|
2856
2856
|
});
|
|
2857
|
-
},
|
|
2858
|
-
let t = e.truncationFootnote?.trim() || null, n = e.reduction, r = !n || n.kind ===
|
|
2857
|
+
}, Uc = "topN", Wc = (e = {}) => {
|
|
2858
|
+
let t = e.truncationFootnote?.trim() || null, n = e.reduction, r = !n || n.kind === Uc && t !== null ? void 0 : g(n, e.rowsIn, { pixelPerfectLine: e.pixelPerfectLine === !0 }), i = [r ? b(r) : void 0, t].filter((e) => typeof e == "string" && e.trim().length > 0);
|
|
2859
2859
|
return i.length ? i.join(" ") : null;
|
|
2860
|
-
},
|
|
2861
|
-
function
|
|
2860
|
+
}, Gc = "chartReason", Kc = "@app:chartReason";
|
|
2861
|
+
function qc(e) {
|
|
2862
2862
|
try {
|
|
2863
|
-
e === null ? window.localStorage.removeItem(
|
|
2863
|
+
e === null ? window.localStorage.removeItem(Kc) : window.localStorage.setItem(Kc, e);
|
|
2864
2864
|
} catch {}
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2866
|
+
function Jc() {
|
|
2867
2867
|
try {
|
|
2868
|
-
let e = window.localStorage.getItem(
|
|
2868
|
+
let e = window.localStorage.getItem(Kc);
|
|
2869
2869
|
if (e === "on" || e === "off") return e;
|
|
2870
2870
|
} catch {}
|
|
2871
2871
|
return null;
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function Yc() {
|
|
2874
2874
|
if (typeof window < "u") try {
|
|
2875
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
2876
|
-
(e === "on" || e === "off") &&
|
|
2875
|
+
let e = new URLSearchParams(window.location.search).get(Gc);
|
|
2876
|
+
(e === "on" || e === "off") && qc(e);
|
|
2877
2877
|
} catch {}
|
|
2878
2878
|
}
|
|
2879
|
-
function
|
|
2880
|
-
return typeof window > "u" ? !1 : (
|
|
2879
|
+
function Xc() {
|
|
2880
|
+
return typeof window > "u" ? !1 : (Yc(), Jc() === "on");
|
|
2881
2881
|
}
|
|
2882
|
-
|
|
2882
|
+
Yc();
|
|
2883
2883
|
// src/charts/missingSavedColumns.ts
|
|
2884
|
-
var
|
|
2885
|
-
let t = e.slice(0,
|
|
2884
|
+
var Zc = 6, Qc = (e) => {
|
|
2885
|
+
let t = e.slice(0, Zc), n = e.length - t.length;
|
|
2886
2886
|
return n > 0 ? `${t.join(", ")} and ${n} more` : t.length < 2 ? t.join("") : `${t.slice(0, -1).join(", ")} and ${t[t.length - 1]}`;
|
|
2887
|
-
},
|
|
2887
|
+
}, $c = (e, t) => {
|
|
2888
2888
|
if (!e || !Array.isArray(t) || !t.length) return null;
|
|
2889
2889
|
let n = [...new Set([
|
|
2890
2890
|
...e.yAxisList ?? [],
|
|
@@ -2896,15 +2896,15 @@ var Xc = 6, Zc = (e) => {
|
|
|
2896
2896
|
for (let e of t) if (e) for (let t of Object.keys(e)) r.add(t);
|
|
2897
2897
|
if (!r.size) return null;
|
|
2898
2898
|
let i = [...r];
|
|
2899
|
-
return n.some((e) =>
|
|
2900
|
-
},
|
|
2899
|
+
return n.some((e) => N(i, e)) ? null : `This chart reads ${Qc(n)}, but the query returns ${Qc(i)}. Pick the columns again in Configure.`;
|
|
2900
|
+
}, el = (e, t, n) => {
|
|
2901
2901
|
if (!e) return !1;
|
|
2902
2902
|
let r = te(e, t, n);
|
|
2903
2903
|
return r !== null && r < 4.5;
|
|
2904
|
-
},
|
|
2904
|
+
}, tl = (e, t, n) => {
|
|
2905
2905
|
let r = e?.tableSettings;
|
|
2906
2906
|
if (!r || !t) return e;
|
|
2907
|
-
let i =
|
|
2907
|
+
let i = el(r.contentColor, t, n), a = el(r.tableTitleColor, t, n);
|
|
2908
2908
|
return !i && !a ? e : {
|
|
2909
2909
|
...e,
|
|
2910
2910
|
tableSettings: {
|
|
@@ -2915,26 +2915,26 @@ var Xc = 6, Zc = (e) => {
|
|
|
2915
2915
|
};
|
|
2916
2916
|
};
|
|
2917
2917
|
// src/charts/toTruncatedChartData.ts
|
|
2918
|
-
function
|
|
2918
|
+
function nl(e) {
|
|
2919
2919
|
let t = e?.trim();
|
|
2920
2920
|
if (!t || /[A-Z]{2,}/.test(t)) return;
|
|
2921
2921
|
let n = t.toLowerCase();
|
|
2922
2922
|
if (!n.endsWith("s")) return /[^aeiou]y$/.test(n) ? `${n.slice(0, -1)}ies` : /(ch|sh|x|z)$/.test(n) ? `${n}es` : `${n}s`;
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function rl(e, t) {
|
|
2925
2925
|
if (t && e?.length) return e.find((e) => e?.alias === t || e?.name === t);
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2928
|
-
let n =
|
|
2927
|
+
function il(e, t) {
|
|
2928
|
+
let n = rl(e, t)?.label;
|
|
2929
2929
|
return typeof n == "string" && n.trim() ? n.trim() : void 0;
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2932
|
-
let n =
|
|
2931
|
+
function al(e, t) {
|
|
2932
|
+
let n = rl(e, t);
|
|
2933
2933
|
if (!n) return;
|
|
2934
2934
|
let r = String(n.datatype ?? n.dataType ?? "");
|
|
2935
2935
|
return !!(/date|time|timestamp|year|month|week/i.test(r) || n.timeGrain || n.functionConfiguration?.dateFormat);
|
|
2936
2936
|
}
|
|
2937
|
-
function
|
|
2937
|
+
function ol(e, t, n, r, i) {
|
|
2938
2938
|
let a = {
|
|
2939
2939
|
rows: t,
|
|
2940
2940
|
collapsedRows: [],
|
|
@@ -2951,62 +2951,62 @@ function al(e, t, n, r, i) {
|
|
|
2951
2951
|
valueKeys: f,
|
|
2952
2952
|
maxCategories: o(c?.chartType),
|
|
2953
2953
|
gap: l.gap,
|
|
2954
|
-
categoryIsTemporal:
|
|
2954
|
+
categoryIsTemporal: al(p?.selectedDims, u)
|
|
2955
2955
|
});
|
|
2956
2956
|
if (!g) return a;
|
|
2957
|
-
let _ =
|
|
2957
|
+
let _ = _e(t);
|
|
2958
2958
|
return {
|
|
2959
2959
|
rows: m,
|
|
2960
2960
|
collapsedRows: h,
|
|
2961
2961
|
summary: g,
|
|
2962
|
-
truncated:
|
|
2962
|
+
truncated: le(_, "chart-coverage", m.slice(0, g.keptCount)).truncated
|
|
2963
2963
|
};
|
|
2964
2964
|
}
|
|
2965
|
-
function
|
|
2966
|
-
let r = n?.datasetMetricSettings?.newDatasetSettings, i = t, a =
|
|
2965
|
+
function sl(e, t, n) {
|
|
2966
|
+
let r = n?.datasetMetricSettings?.newDatasetSettings, i = t, a = nl(il(r?.selectedDims, i?.xAxis)), o = (i?.yAxisList ?? []).filter(Boolean), s = o.length === 1 ? il(r?.selectedMetrics, o[0])?.toLowerCase() : void 0;
|
|
2967
2967
|
return C(e, {
|
|
2968
2968
|
categoryPlural: a,
|
|
2969
2969
|
measureLabel: s
|
|
2970
2970
|
});
|
|
2971
2971
|
}
|
|
2972
2972
|
// src/charts/withLegibleLabelInk.ts
|
|
2973
|
-
var
|
|
2973
|
+
var cl = (e, t) => !t || e?.chartLabelInk?.strategy ? e : {
|
|
2974
2974
|
...e ?? {},
|
|
2975
2975
|
chartLabelInk: { strategy: "legible" }
|
|
2976
|
-
},
|
|
2976
|
+
}, ll = (e, t) => !t || e?.chartLabelOverlap?.strategy ? e : {
|
|
2977
2977
|
...e ?? {},
|
|
2978
2978
|
chartLabelOverlap: { strategy: "declutter" }
|
|
2979
|
-
},
|
|
2979
|
+
}, ul = (e, t) => !t || e?.chartInteraction?.suppressNativeContextMenu !== void 0 ? e : {
|
|
2980
2980
|
...e ?? {},
|
|
2981
2981
|
chartInteraction: {
|
|
2982
2982
|
...e?.chartInteraction ?? {},
|
|
2983
2983
|
suppressNativeContextMenu: !0
|
|
2984
2984
|
}
|
|
2985
|
-
},
|
|
2986
|
-
function
|
|
2985
|
+
}, dl = (e, t, n = t) => ul(ll(cl(e, t), t), n), fl = "tableDomBound", pl = "@app:tableDomBound";
|
|
2986
|
+
function ml(e) {
|
|
2987
2987
|
try {
|
|
2988
|
-
e === null ? window.localStorage.removeItem(
|
|
2988
|
+
e === null ? window.localStorage.removeItem(pl) : window.localStorage.setItem(pl, e);
|
|
2989
2989
|
} catch {}
|
|
2990
2990
|
}
|
|
2991
|
-
function
|
|
2991
|
+
function hl() {
|
|
2992
2992
|
try {
|
|
2993
|
-
let e = window.localStorage.getItem(
|
|
2993
|
+
let e = window.localStorage.getItem(pl);
|
|
2994
2994
|
if (e === "on" || e === "off") return e;
|
|
2995
2995
|
} catch {}
|
|
2996
2996
|
return null;
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2998
|
+
function gl() {
|
|
2999
2999
|
if (typeof window < "u") try {
|
|
3000
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
3001
|
-
(e === "on" || e === "off") &&
|
|
3000
|
+
let e = new URLSearchParams(window.location.search).get(fl);
|
|
3001
|
+
(e === "on" || e === "off") && ml(e);
|
|
3002
3002
|
} catch {}
|
|
3003
3003
|
}
|
|
3004
|
-
function
|
|
3005
|
-
return typeof window > "u" || (
|
|
3004
|
+
function _l() {
|
|
3005
|
+
return typeof window > "u" || (gl(), hl() !== "off");
|
|
3006
3006
|
}
|
|
3007
|
-
|
|
3007
|
+
gl();
|
|
3008
3008
|
// src/core/metric-builder/tableView.ts
|
|
3009
|
-
var
|
|
3009
|
+
var vl = [
|
|
3010
3010
|
10,
|
|
3011
3011
|
25,
|
|
3012
3012
|
50,
|
|
@@ -3015,8 +3015,8 @@ var _l = [
|
|
|
3015
3015
|
250,
|
|
3016
3016
|
500,
|
|
3017
3017
|
1e3
|
|
3018
|
-
],
|
|
3019
|
-
function
|
|
3018
|
+
], yl = 1e3;
|
|
3019
|
+
function bl(e, t) {
|
|
3020
3020
|
return !e || e.key !== t ? {
|
|
3021
3021
|
key: t,
|
|
3022
3022
|
direction: "asc"
|
|
@@ -3025,7 +3025,7 @@ function yl(e, t) {
|
|
|
3025
3025
|
direction: "desc"
|
|
3026
3026
|
} : null;
|
|
3027
3027
|
}
|
|
3028
|
-
function
|
|
3028
|
+
function xl(e, t, n) {
|
|
3029
3029
|
let r = e == null || e === "", i = t == null || t === "";
|
|
3030
3030
|
if (r && i) return 0;
|
|
3031
3031
|
if (r) return 1;
|
|
@@ -3036,18 +3036,18 @@ function bl(e, t, n) {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
return String(e).localeCompare(String(t));
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3039
|
+
function Sl(e, t, n) {
|
|
3040
3040
|
if (!t || !e?.length) return e;
|
|
3041
3041
|
let r = n(t.key), i = e.map((e, t) => ({
|
|
3042
3042
|
row: e,
|
|
3043
3043
|
index: t
|
|
3044
3044
|
}));
|
|
3045
3045
|
return i.sort((e, n) => {
|
|
3046
|
-
let i =
|
|
3046
|
+
let i = xl(e.row?.[t.key], n.row?.[t.key], r), a = t.direction === "asc" ? i : -i;
|
|
3047
3047
|
return a === 0 ? e.index - n.index : a;
|
|
3048
3048
|
}), i.map((e) => e.row);
|
|
3049
3049
|
}
|
|
3050
|
-
function
|
|
3050
|
+
function Cl({ total: e, limit: t, offset: n, renderedRowCount: r }) {
|
|
3051
3051
|
let i = Math.max(1, Math.floor(t) || 1), a = Math.max(0, Math.floor(e) || 0), o = Math.max(0, Math.floor(n) || 0), s = Math.max(1, Math.ceil(a / i)), c = Math.floor(o / i), l = r === void 0 ? Math.max(0, Math.min(i, a - o)) : Math.max(0, Math.floor(r)), u = a === 0 || l === 0 ? 0 : o + 1, d = u === 0 ? 0 : o + l;
|
|
3052
3052
|
return {
|
|
3053
3053
|
from: u,
|
|
@@ -3059,20 +3059,20 @@ function Sl({ total: e, limit: t, offset: n, renderedRowCount: r }) {
|
|
|
3059
3059
|
isLastPage: d >= a
|
|
3060
3060
|
};
|
|
3061
3061
|
}
|
|
3062
|
-
function
|
|
3062
|
+
function wl(e, t, n) {
|
|
3063
3063
|
let r = Math.max(1, Math.floor(t) || 1), i = Math.max(0, Math.floor(n) || 0);
|
|
3064
3064
|
return !e?.length || i === 0 && e.length <= r ? e : e.slice(i, i + r);
|
|
3065
3065
|
}
|
|
3066
|
-
function
|
|
3066
|
+
function Tl({ offset: e, nextLimit: t }) {
|
|
3067
3067
|
let n = Math.max(1, Math.floor(t) || 1);
|
|
3068
3068
|
return Math.floor(Math.max(0, Math.floor(e) || 0) / n) * n;
|
|
3069
3069
|
}
|
|
3070
|
-
function
|
|
3070
|
+
function El(e) {
|
|
3071
3071
|
return e === "client";
|
|
3072
3072
|
}
|
|
3073
3073
|
// src/v2/surfaces/MetricCard/cardTableCell.ts
|
|
3074
|
-
var
|
|
3075
|
-
function
|
|
3074
|
+
var Dl = (e) => e == null || typeof e == "string" && e.trim() === "", Ol = O, kl = 12, Al = 36, jl = 720;
|
|
3075
|
+
function Ml(e, t) {
|
|
3076
3076
|
let n = Array(e + 1);
|
|
3077
3077
|
n[0] = 0;
|
|
3078
3078
|
for (let r = 0; r < e; r += 1) {
|
|
@@ -3081,7 +3081,7 @@ function jl(e, t) {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
return n;
|
|
3083
3083
|
}
|
|
3084
|
-
function
|
|
3084
|
+
function Nl(e, t) {
|
|
3085
3085
|
let n = 0, r = e.length - 1;
|
|
3086
3086
|
for (; n < r;) {
|
|
3087
3087
|
let i = Math.floor((n + r + 1) / 2);
|
|
@@ -3089,7 +3089,7 @@ function Ml(e, t) {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
return n;
|
|
3091
3091
|
}
|
|
3092
|
-
function
|
|
3092
|
+
function Pl({ offsets: e, viewTop: t, viewBottom: n, overscan: r = kl }) {
|
|
3093
3093
|
let i = e.length - 1;
|
|
3094
3094
|
if (i <= 0) return {
|
|
3095
3095
|
start: 0,
|
|
@@ -3099,31 +3099,31 @@ function Nl({ offsets: e, viewTop: t, viewBottom: n, overscan: r = Ol }) {
|
|
|
3099
3099
|
start: 0,
|
|
3100
3100
|
end: i
|
|
3101
3101
|
};
|
|
3102
|
-
let a =
|
|
3102
|
+
let a = Nl(e, t), o = Nl(e, n);
|
|
3103
3103
|
return {
|
|
3104
3104
|
start: Math.max(0, Math.min(i, a - r)),
|
|
3105
3105
|
end: Math.max(0, Math.min(i, o + 1 + r))
|
|
3106
3106
|
};
|
|
3107
3107
|
}
|
|
3108
|
-
function
|
|
3108
|
+
function Fl({ offsets: e, start: t, end: n }) {
|
|
3109
3109
|
let r = e.length - 1;
|
|
3110
3110
|
return {
|
|
3111
3111
|
top: t > 0 ? Math.max(0, e[t]) : 0,
|
|
3112
3112
|
bottom: n < r ? Math.max(0, e[r] - e[n]) : 0
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3116
|
-
let [i, a] = e.useState(
|
|
3115
|
+
function Il({ rowCount: t, scrollElRef: n, minRows: r = 200 }) {
|
|
3116
|
+
let [i, a] = e.useState(Al), [o, s] = e.useState({
|
|
3117
3117
|
viewTop: 0,
|
|
3118
3118
|
viewBottom: Infinity
|
|
3119
|
-
}), [c, l] = e.useState(!1), u = e.useRef(null), d = e.useRef(!1), f = e.useRef(null), p = t > r && !c, m = e.useRef(/* @__PURE__ */ new Map()), [h, g] = e.useState(() => /* @__PURE__ */ new Map()), _ = e.useMemo(() =>
|
|
3119
|
+
}), [c, l] = e.useState(!1), u = e.useRef(null), d = e.useRef(!1), f = e.useRef(null), p = t > r && !c, m = e.useRef(/* @__PURE__ */ new Map()), [h, g] = e.useState(() => /* @__PURE__ */ new Map()), _ = e.useMemo(() => Ml(t, (e) => h.get(e) ?? i), [
|
|
3120
3120
|
t,
|
|
3121
3121
|
i,
|
|
3122
3122
|
h
|
|
3123
|
-
]), v = e.useMemo(() => p ?
|
|
3123
|
+
]), v = e.useMemo(() => p ? Pl({
|
|
3124
3124
|
offsets: _,
|
|
3125
3125
|
viewTop: o.viewTop,
|
|
3126
|
-
viewBottom: Number.isFinite(o.viewBottom) ? o.viewBottom :
|
|
3126
|
+
viewBottom: Number.isFinite(o.viewBottom) ? o.viewBottom : jl
|
|
3127
3127
|
}) : {
|
|
3128
3128
|
start: 0,
|
|
3129
3129
|
end: t
|
|
@@ -3133,7 +3133,7 @@ function Fl({ rowCount: t, scrollElRef: n, minRows: r = 200 }) {
|
|
|
3133
3133
|
o.viewTop,
|
|
3134
3134
|
o.viewBottom,
|
|
3135
3135
|
t
|
|
3136
|
-
]), y = e.useMemo(() => p ?
|
|
3136
|
+
]), y = e.useMemo(() => p ? Fl({
|
|
3137
3137
|
offsets: _,
|
|
3138
3138
|
start: v.start,
|
|
3139
3139
|
end: v.end
|
|
@@ -3199,14 +3199,14 @@ function Fl({ rowCount: t, scrollElRef: n, minRows: r = 200 }) {
|
|
|
3199
3199
|
measureRowRef: S
|
|
3200
3200
|
};
|
|
3201
3201
|
}
|
|
3202
|
-
var
|
|
3203
|
-
let m = e.length > 1e3 &&
|
|
3204
|
-
return !n && !l && !m ? /* @__PURE__ */
|
|
3202
|
+
var Ll = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null, onRetry: a, emptyMessage: o, emptyAction: s, renderCell: c, onCellClick: l, ariaLabel: u, qaEntity: d = "metric-card-chart-table", className: f, searchable: p = !1 }) => {
|
|
3203
|
+
let m = e.length > 1e3 && _l();
|
|
3204
|
+
return !n && !l && !m ? /* @__PURE__ */ q(Rl, {
|
|
3205
3205
|
rows: e,
|
|
3206
3206
|
columns: t,
|
|
3207
3207
|
renderCell: c,
|
|
3208
3208
|
className: f
|
|
3209
|
-
}) : /* @__PURE__ */
|
|
3209
|
+
}) : /* @__PURE__ */ q(Ul, {
|
|
3210
3210
|
rows: e,
|
|
3211
3211
|
columns: t,
|
|
3212
3212
|
paging: n ?? {
|
|
@@ -3225,30 +3225,30 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3225
3225
|
className: f,
|
|
3226
3226
|
searchable: p && n?.mode === "client"
|
|
3227
3227
|
});
|
|
3228
|
-
},
|
|
3229
|
-
let a = e.useRef(null), { range: o, spacerTop: s, spacerBottom: c, isWindowed: l, tbodyRef: u, measureRowRef: d } =
|
|
3228
|
+
}, Rl = ({ rows: t, columns: n, renderCell: r, className: i }) => {
|
|
3229
|
+
let a = e.useRef(null), { range: o, spacerTop: s, spacerBottom: c, isWindowed: l, tbodyRef: u, measureRowRef: d } = Il({
|
|
3230
3230
|
rowCount: t.length,
|
|
3231
3231
|
scrollElRef: a
|
|
3232
3232
|
}), f = t.slice(o.start, o.end);
|
|
3233
|
-
return /* @__PURE__ */
|
|
3233
|
+
return /* @__PURE__ */ q("div", {
|
|
3234
3234
|
ref: a,
|
|
3235
3235
|
"data-testid": "metric-card-chart-table",
|
|
3236
|
-
className:
|
|
3237
|
-
children: /* @__PURE__ */
|
|
3236
|
+
className: B("h-full w-full overflow-auto rounded-(--radius-md) border border-(--border)", i),
|
|
3237
|
+
children: /* @__PURE__ */ J("table", {
|
|
3238
3238
|
className: "w-full text-left text-sm",
|
|
3239
|
-
children: [/* @__PURE__ */
|
|
3239
|
+
children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ q("tr", {
|
|
3240
3240
|
className: "border-b border-(--border)",
|
|
3241
|
-
children: n.map((e) => /* @__PURE__ */
|
|
3241
|
+
children: n.map((e) => /* @__PURE__ */ q("th", {
|
|
3242
3242
|
scope: "col",
|
|
3243
3243
|
className: "px-3 py-2 font-medium text-(--muted-foreground)",
|
|
3244
3244
|
children: e.label
|
|
3245
3245
|
}, e.key))
|
|
3246
|
-
}) }), /* @__PURE__ */
|
|
3246
|
+
}) }), /* @__PURE__ */ J("tbody", {
|
|
3247
3247
|
ref: u,
|
|
3248
3248
|
children: [
|
|
3249
|
-
l && s > 0 ? /* @__PURE__ */
|
|
3249
|
+
l && s > 0 ? /* @__PURE__ */ q("tr", {
|
|
3250
3250
|
"data-virtual-spacer": "top",
|
|
3251
|
-
children: /* @__PURE__ */
|
|
3251
|
+
children: /* @__PURE__ */ q("td", {
|
|
3252
3252
|
colSpan: n.length,
|
|
3253
3253
|
className: "h-(--spacer-h) border-none p-0",
|
|
3254
3254
|
style: { "--spacer-h": `${s}px` }
|
|
@@ -3256,18 +3256,18 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3256
3256
|
}) : null,
|
|
3257
3257
|
f.map((e, t) => {
|
|
3258
3258
|
let i = o.start + t;
|
|
3259
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ q("tr", {
|
|
3260
3260
|
ref: l ? d(i) : void 0,
|
|
3261
3261
|
className: "border-b border-(--border) last:border-0",
|
|
3262
|
-
children: n.map((t) => /* @__PURE__ */
|
|
3262
|
+
children: n.map((t) => /* @__PURE__ */ q("td", {
|
|
3263
3263
|
className: "px-3 py-2 text-(--foreground)",
|
|
3264
|
-
children: r ? r(e?.[t.key], t, e) :
|
|
3264
|
+
children: r ? r(e?.[t.key], t, e) : Vl(e?.[t.key])
|
|
3265
3265
|
}, t.key))
|
|
3266
3266
|
}, i);
|
|
3267
3267
|
}),
|
|
3268
|
-
l && c > 0 ? /* @__PURE__ */
|
|
3268
|
+
l && c > 0 ? /* @__PURE__ */ q("tr", {
|
|
3269
3269
|
"data-virtual-spacer": "bottom",
|
|
3270
|
-
children: /* @__PURE__ */
|
|
3270
|
+
children: /* @__PURE__ */ q("td", {
|
|
3271
3271
|
colSpan: n.length,
|
|
3272
3272
|
className: "h-(--spacer-h) border-none p-0",
|
|
3273
3273
|
style: { "--spacer-h": `${c}px` }
|
|
@@ -3277,14 +3277,14 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3277
3277
|
})]
|
|
3278
3278
|
})
|
|
3279
3279
|
});
|
|
3280
|
-
},
|
|
3280
|
+
}, zl = 256, Bl = () => /* @__PURE__ */ q("span", {
|
|
3281
3281
|
className: "dbn-v2-table__no-value",
|
|
3282
|
-
children:
|
|
3283
|
-
}),
|
|
3282
|
+
children: Ol
|
|
3283
|
+
}), Vl = (e) => Dl(e) ? /* @__PURE__ */ q(Bl, {}) : String(e), Hl = () => /* @__PURE__ */ q("td", {
|
|
3284
3284
|
"aria-hidden": "true",
|
|
3285
3285
|
className: "dbn-v2-table__filler"
|
|
3286
|
-
}),
|
|
3287
|
-
let h = r.mode === "server", g = h && r.totalRows <= r.limit && t.length === r.totalRows, _ =
|
|
3286
|
+
}), Ul = ({ rows: t, columns: n, paging: r, isLoading: i, error: a, onRetry: o, emptyMessage: s, emptyAction: c, renderCell: l, onCellClick: u, ariaLabel: d, qaEntity: f, className: p, searchable: m }) => {
|
|
3287
|
+
let h = r.mode === "server", g = h && r.totalRows <= r.limit && t.length === r.totalRows, _ = El(r.mode) || g, [v, y] = e.useState(null), [b, x] = e.useState({
|
|
3288
3288
|
limit: r.mode === "client" ? r.pageSize ?? 100 : 100,
|
|
3289
3289
|
offset: 0
|
|
3290
3290
|
}), S = e.useCallback((e) => !!n.find((t) => t.key === e)?.isNumeric, [n]), C = v && n.some((e) => e.key === v.key) ? v : null, [w, ee] = e.useState(""), T = m ? w.trim().toLowerCase() : "", E = e.useMemo(() => T ? t.filter((e) => n.some((t) => String(e?.[t.key] ?? "").toLowerCase().includes(T))) : t, [
|
|
@@ -3296,23 +3296,23 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3296
3296
|
...e,
|
|
3297
3297
|
offset: 0
|
|
3298
3298
|
}));
|
|
3299
|
-
}, O = e.useMemo(() => _ ?
|
|
3299
|
+
}, O = e.useMemo(() => _ ? Sl(E, C, S) : E, [
|
|
3300
3300
|
E,
|
|
3301
3301
|
C,
|
|
3302
3302
|
_,
|
|
3303
3303
|
S
|
|
3304
|
-
]), te = r.mode === "client" ? Math.min(r.autoPageAbove ?? 1e3,
|
|
3304
|
+
]), te = r.mode === "client" ? Math.min(r.autoPageAbove ?? 1e3, yl) : 0, k = r.mode === "client" && t.length > te, ne = h ? r.limit : b.limit, A = O.length, j = Math.max(0, Math.min(b.offset, Math.floor(Math.max(0, A - 1) / b.limit) * b.limit)), M = h ? r.offset : k ? j : 0, re = e.useMemo(() => h || !k ? O : wl(O, ne, M), [
|
|
3305
3305
|
h,
|
|
3306
3306
|
k,
|
|
3307
3307
|
O,
|
|
3308
3308
|
ne,
|
|
3309
3309
|
M
|
|
3310
|
-
]), ie =
|
|
3310
|
+
]), ie = Cl({
|
|
3311
3311
|
total: h ? r.totalRows : O.length,
|
|
3312
3312
|
limit: ne,
|
|
3313
3313
|
offset: M,
|
|
3314
3314
|
renderedRowCount: re.length
|
|
3315
|
-
}), N = e.useRef(null), { range: P, spacerTop: ae, spacerBottom: oe, isWindowed: se, tbodyRef: ce, measureRowRef: le } =
|
|
3315
|
+
}), N = e.useRef(null), { range: P, spacerTop: ae, spacerBottom: oe, isWindowed: se, tbodyRef: ce, measureRowRef: le } = Il({
|
|
3316
3316
|
rowCount: re.length,
|
|
3317
3317
|
scrollElRef: N
|
|
3318
3318
|
}), ue = re.slice(P.start, P.end), de = n.length + 1, fe = (e) => {
|
|
@@ -3323,125 +3323,125 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3323
3323
|
}, pe = (e) => {
|
|
3324
3324
|
h ? r.onChangePage(!1, e) : x((t) => ({
|
|
3325
3325
|
limit: e,
|
|
3326
|
-
offset:
|
|
3326
|
+
offset: Tl({
|
|
3327
3327
|
offset: t.offset,
|
|
3328
3328
|
nextLimit: e
|
|
3329
3329
|
})
|
|
3330
3330
|
}));
|
|
3331
|
-
}, me = r,
|
|
3332
|
-
return /* @__PURE__ */
|
|
3331
|
+
}, me = r, he = h ? me.isEnablePrevBtn ?? !ie.isFirstPage : !ie.isFirstPage, _e = h ? me.isEnableNextBtn ?? !ie.isLastPage : !ie.isLastPage, ve = h || k, F = !!i && re.length > 0, be = !!i && re.length === 0, xe = ve ? `${ie.total.toLocaleString()} ${ie.total === 1 ? "row" : "rows"}, ${ne.toLocaleString()} per page.${_ ? "" : " Sorting is unavailable while this table loads one page at a time."}` : null;
|
|
3332
|
+
return /* @__PURE__ */ J("div", {
|
|
3333
3333
|
"data-testid": "metric-card-chart-table",
|
|
3334
3334
|
"data-paging-mode": r.mode,
|
|
3335
|
-
className:
|
|
3335
|
+
className: B("dbn-v2-table dbn-v2-table--fit flex h-full w-full flex-col overflow-hidden rounded-(--radius-md) border border-(--border)", p),
|
|
3336
3336
|
children: [
|
|
3337
|
-
m ? /* @__PURE__ */
|
|
3337
|
+
m ? /* @__PURE__ */ J("div", {
|
|
3338
3338
|
className: "relative shrink-0 border-b border-(--border)",
|
|
3339
3339
|
children: [
|
|
3340
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ q(Re, {
|
|
3341
3341
|
"aria-hidden": "true",
|
|
3342
3342
|
className: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-(--muted-foreground)"
|
|
3343
3343
|
}),
|
|
3344
|
-
/* @__PURE__ */
|
|
3344
|
+
/* @__PURE__ */ q("input", {
|
|
3345
3345
|
type: "search",
|
|
3346
3346
|
value: w,
|
|
3347
3347
|
onChange: (e) => D(e.target.value),
|
|
3348
3348
|
placeholder: "Search",
|
|
3349
3349
|
"aria-label": "Search table",
|
|
3350
|
-
...
|
|
3350
|
+
...R(f, "search"),
|
|
3351
3351
|
className: "h-8 w-full bg-transparent pr-8 pl-8 text-xs text-(--foreground) outline-none placeholder:text-(--muted-foreground) focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [&::-webkit-search-cancel-button]:appearance-none"
|
|
3352
3352
|
}),
|
|
3353
|
-
w ? /* @__PURE__ */
|
|
3353
|
+
w ? /* @__PURE__ */ q("button", {
|
|
3354
3354
|
type: "button",
|
|
3355
3355
|
"aria-label": "Clear search",
|
|
3356
|
-
...
|
|
3356
|
+
...R(f, "search", "clear"),
|
|
3357
3357
|
onClick: () => D(""),
|
|
3358
3358
|
className: "absolute top-1/2 right-1.5 inline-flex size-6 -translate-y-1/2 cursor-pointer items-center justify-center rounded-(--radius-xs) text-(--muted-foreground) hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3359
|
-
children: /* @__PURE__ */
|
|
3359
|
+
children: /* @__PURE__ */ q(et, {
|
|
3360
3360
|
"aria-hidden": "true",
|
|
3361
3361
|
className: "size-3.5"
|
|
3362
3362
|
})
|
|
3363
3363
|
}) : null
|
|
3364
3364
|
]
|
|
3365
3365
|
}) : null,
|
|
3366
|
-
/* @__PURE__ */
|
|
3366
|
+
/* @__PURE__ */ J("div", {
|
|
3367
3367
|
ref: N,
|
|
3368
3368
|
className: "relative min-h-0 flex-1 overflow-auto",
|
|
3369
3369
|
children: [
|
|
3370
|
-
|
|
3370
|
+
F ? /* @__PURE__ */ q("div", {
|
|
3371
3371
|
"data-testid": `${f}-refreshing`,
|
|
3372
3372
|
"aria-hidden": "true",
|
|
3373
3373
|
className: "sticky top-0 z-2 -mb-0.5 h-0.5 w-full animate-pulse bg-(--primary) motion-reduce:animate-none"
|
|
3374
3374
|
}) : null,
|
|
3375
|
-
/* @__PURE__ */
|
|
3375
|
+
/* @__PURE__ */ J("table", {
|
|
3376
3376
|
"aria-label": d,
|
|
3377
3377
|
"aria-busy": i || void 0,
|
|
3378
|
-
className:
|
|
3378
|
+
className: B(F && "opacity-60 transition-opacity motion-reduce:transition-none"),
|
|
3379
3379
|
children: [
|
|
3380
|
-
xe ? /* @__PURE__ */
|
|
3380
|
+
xe ? /* @__PURE__ */ q("caption", {
|
|
3381
3381
|
"data-testid": `${f}-caption`,
|
|
3382
3382
|
className: "sr-only",
|
|
3383
3383
|
children: xe
|
|
3384
3384
|
}) : null,
|
|
3385
|
-
/* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", { children: [n.map((e) => {
|
|
3386
3386
|
let t = C?.key === e.key ? C.direction : null;
|
|
3387
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ q("th", {
|
|
3388
3388
|
scope: "col",
|
|
3389
3389
|
"aria-sort": _ ? t === "asc" ? "ascending" : t === "desc" ? "descending" : "none" : void 0,
|
|
3390
3390
|
className: e.isNumeric ? "dbn-num" : void 0,
|
|
3391
3391
|
title: _ ? void 0 : "Sorting is unavailable while this table loads one page at a time.",
|
|
3392
|
-
children: _ ? /* @__PURE__ */
|
|
3392
|
+
children: _ ? /* @__PURE__ */ J("button", {
|
|
3393
3393
|
type: "button",
|
|
3394
|
-
...
|
|
3394
|
+
...R(f, "sort", e.key),
|
|
3395
3395
|
onClick: () => {
|
|
3396
|
-
y((t) =>
|
|
3396
|
+
y((t) => bl(t, e.key)), x((e) => e.offset === 0 ? e : {
|
|
3397
3397
|
...e,
|
|
3398
3398
|
offset: 0
|
|
3399
3399
|
});
|
|
3400
3400
|
},
|
|
3401
3401
|
className: "inline-flex min-h-6 cursor-pointer items-center gap-1 rounded-(--radius-xs) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3402
|
-
children: [e.label, t === "asc" ? /* @__PURE__ */
|
|
3402
|
+
children: [e.label, t === "asc" ? /* @__PURE__ */ q(Ut, {
|
|
3403
3403
|
"aria-hidden": "true",
|
|
3404
3404
|
className: "size-3"
|
|
3405
|
-
}) : t === "desc" ? /* @__PURE__ */
|
|
3405
|
+
}) : t === "desc" ? /* @__PURE__ */ q(Vt, {
|
|
3406
3406
|
"aria-hidden": "true",
|
|
3407
3407
|
className: "size-3"
|
|
3408
|
-
}) : /* @__PURE__ */
|
|
3408
|
+
}) : /* @__PURE__ */ q(Ht, {
|
|
3409
3409
|
"aria-hidden": "true",
|
|
3410
3410
|
className: "size-3 opacity-40"
|
|
3411
3411
|
})]
|
|
3412
3412
|
}) : e.label
|
|
3413
3413
|
}, e.key);
|
|
3414
|
-
}), /* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3414
|
+
}), /* @__PURE__ */ q(Hl, {})] }) }),
|
|
3415
|
+
/* @__PURE__ */ J("tbody", {
|
|
3416
3416
|
ref: ce,
|
|
3417
3417
|
children: [
|
|
3418
|
-
se && !be && ae > 0 ? /* @__PURE__ */
|
|
3418
|
+
se && !be && ae > 0 ? /* @__PURE__ */ q("tr", {
|
|
3419
3419
|
"data-virtual-spacer": "top",
|
|
3420
|
-
children: /* @__PURE__ */
|
|
3420
|
+
children: /* @__PURE__ */ q("td", {
|
|
3421
3421
|
colSpan: de,
|
|
3422
3422
|
className: "h-(--spacer-h) border-none p-0",
|
|
3423
3423
|
style: { "--spacer-h": `${ae}px` }
|
|
3424
3424
|
})
|
|
3425
3425
|
}) : null,
|
|
3426
|
-
be ? /* @__PURE__ */
|
|
3426
|
+
be ? /* @__PURE__ */ q("tr", {
|
|
3427
3427
|
"data-testid": `${f}-loading-row`,
|
|
3428
|
-
children: /* @__PURE__ */
|
|
3428
|
+
children: /* @__PURE__ */ q("td", {
|
|
3429
3429
|
colSpan: de,
|
|
3430
3430
|
className: "border-none p-0",
|
|
3431
|
-
children: /* @__PURE__ */
|
|
3431
|
+
children: /* @__PURE__ */ q(ye, {
|
|
3432
3432
|
label: "Loading rows",
|
|
3433
|
-
minHeight:
|
|
3433
|
+
minHeight: zl
|
|
3434
3434
|
})
|
|
3435
3435
|
})
|
|
3436
3436
|
}) : ue.map((e, t) => {
|
|
3437
3437
|
let r = P.start + t;
|
|
3438
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ J("tr", {
|
|
3439
3439
|
ref: se ? le(r) : void 0,
|
|
3440
3440
|
children: [n.map((t) => {
|
|
3441
|
-
let n = l ? l(e?.[t.key], t, e) :
|
|
3442
|
-
return /* @__PURE__ */
|
|
3441
|
+
let n = l ? l(e?.[t.key], t, e) : Vl(e?.[t.key]);
|
|
3442
|
+
return /* @__PURE__ */ q("td", {
|
|
3443
3443
|
className: t.isNumeric ? "dbn-num" : void 0,
|
|
3444
|
-
children: u ? /* @__PURE__ */
|
|
3444
|
+
children: u ? /* @__PURE__ */ q("button", {
|
|
3445
3445
|
type: "button",
|
|
3446
3446
|
className: "dbn-v2-table__cell-btn",
|
|
3447
3447
|
"data-testid": `${f}-cell`,
|
|
@@ -3455,12 +3455,12 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3455
3455
|
children: n
|
|
3456
3456
|
}) : n
|
|
3457
3457
|
}, t.key);
|
|
3458
|
-
}), /* @__PURE__ */
|
|
3458
|
+
}), /* @__PURE__ */ q(Hl, {})]
|
|
3459
3459
|
}, r);
|
|
3460
3460
|
}),
|
|
3461
|
-
se && !be && oe > 0 ? /* @__PURE__ */
|
|
3461
|
+
se && !be && oe > 0 ? /* @__PURE__ */ q("tr", {
|
|
3462
3462
|
"data-virtual-spacer": "bottom",
|
|
3463
|
-
children: /* @__PURE__ */
|
|
3463
|
+
children: /* @__PURE__ */ q("td", {
|
|
3464
3464
|
colSpan: de,
|
|
3465
3465
|
className: "h-(--spacer-h) border-none p-0",
|
|
3466
3466
|
style: { "--spacer-h": `${oe}px` }
|
|
@@ -3470,43 +3470,43 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3470
3470
|
})
|
|
3471
3471
|
]
|
|
3472
3472
|
}),
|
|
3473
|
-
!i && a ? /* @__PURE__ */
|
|
3473
|
+
!i && a ? /* @__PURE__ */ J("div", {
|
|
3474
3474
|
role: "alert",
|
|
3475
3475
|
"data-testid": `${f}-error`,
|
|
3476
3476
|
className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
|
|
3477
3477
|
children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ q(ge, {
|
|
3479
3479
|
"aria-hidden": "true",
|
|
3480
3480
|
className: "size-6 text-(--destructive)"
|
|
3481
3481
|
}),
|
|
3482
|
-
/* @__PURE__ */
|
|
3482
|
+
/* @__PURE__ */ q("span", {
|
|
3483
3483
|
className: "text-sm text-(--muted-foreground)",
|
|
3484
3484
|
children: a
|
|
3485
3485
|
}),
|
|
3486
|
-
o ? /* @__PURE__ */
|
|
3486
|
+
o ? /* @__PURE__ */ q("button", {
|
|
3487
3487
|
type: "button",
|
|
3488
|
-
...
|
|
3488
|
+
...R(f, "error", "retry"),
|
|
3489
3489
|
onClick: o,
|
|
3490
3490
|
className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3491
3491
|
children: "Try again"
|
|
3492
3492
|
}) : null
|
|
3493
3493
|
]
|
|
3494
3494
|
}) : null,
|
|
3495
|
-
!i && !a && re.length === 0 ? /* @__PURE__ */
|
|
3495
|
+
!i && !a && re.length === 0 ? /* @__PURE__ */ J("div", {
|
|
3496
3496
|
"data-testid": `${f}-empty`,
|
|
3497
3497
|
className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
|
|
3498
|
-
children: [/* @__PURE__ */
|
|
3498
|
+
children: [/* @__PURE__ */ q("span", {
|
|
3499
3499
|
className: "text-sm text-(--muted-foreground)",
|
|
3500
3500
|
children: T ? "No rows match your search." : s || "No data to show."
|
|
3501
|
-
}), T ? /* @__PURE__ */
|
|
3501
|
+
}), T ? /* @__PURE__ */ q("button", {
|
|
3502
3502
|
type: "button",
|
|
3503
|
-
...
|
|
3503
|
+
...R(f, "empty", "clear-search"),
|
|
3504
3504
|
onClick: () => D(""),
|
|
3505
3505
|
className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3506
3506
|
children: "Clear search"
|
|
3507
|
-
}) : c ? /* @__PURE__ */
|
|
3507
|
+
}) : c ? /* @__PURE__ */ q("button", {
|
|
3508
3508
|
type: "button",
|
|
3509
|
-
...
|
|
3509
|
+
...R(f, "empty", "action"),
|
|
3510
3510
|
onClick: c.onClick,
|
|
3511
3511
|
className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3512
3512
|
children: c.label
|
|
@@ -3514,50 +3514,50 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3514
3514
|
}) : null
|
|
3515
3515
|
]
|
|
3516
3516
|
}),
|
|
3517
|
-
|
|
3517
|
+
ve ? /* @__PURE__ */ q(Wl, {
|
|
3518
3518
|
qaEntity: f,
|
|
3519
3519
|
limit: ne,
|
|
3520
3520
|
window: ie,
|
|
3521
|
-
canPrev:
|
|
3521
|
+
canPrev: he && !i,
|
|
3522
3522
|
canNext: _e && !i,
|
|
3523
3523
|
onChangePageSize: pe,
|
|
3524
3524
|
onGoToOffset: fe
|
|
3525
3525
|
}) : null
|
|
3526
3526
|
]
|
|
3527
3527
|
});
|
|
3528
|
-
},
|
|
3529
|
-
let s =
|
|
3530
|
-
return /* @__PURE__ */
|
|
3528
|
+
}, Wl = ({ qaEntity: e, limit: t, window: n, canPrev: r, canNext: i, onChangePageSize: a, onGoToOffset: o }) => {
|
|
3529
|
+
let s = R(e, "page-size").id, c = "inline-flex size-6 cursor-pointer items-center justify-center rounded-(--radius-xs) text-(--muted-foreground) transition-colors hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:pointer-events-none disabled:opacity-40";
|
|
3530
|
+
return /* @__PURE__ */ J("nav", {
|
|
3531
3531
|
"data-testid": `${e}-pagination`,
|
|
3532
3532
|
"aria-label": "Table pagination",
|
|
3533
3533
|
className: "@container/table-pager flex shrink-0 flex-wrap items-center justify-between gap-3 border-t border-(--border) px-3 py-1.5 text-xs whitespace-nowrap text-(--muted-foreground)",
|
|
3534
|
-
children: [/* @__PURE__ */
|
|
3534
|
+
children: [/* @__PURE__ */ J("div", {
|
|
3535
3535
|
className: "flex items-center gap-1.5",
|
|
3536
|
-
children: [/* @__PURE__ */
|
|
3536
|
+
children: [/* @__PURE__ */ q("label", {
|
|
3537
3537
|
htmlFor: s,
|
|
3538
3538
|
className: "@max-xs/table-pager:sr-only",
|
|
3539
3539
|
children: "Rows per page"
|
|
3540
|
-
}), /* @__PURE__ */
|
|
3540
|
+
}), /* @__PURE__ */ J("span", {
|
|
3541
3541
|
className: "relative inline-flex items-center",
|
|
3542
|
-
children: [/* @__PURE__ */
|
|
3543
|
-
...
|
|
3542
|
+
children: [/* @__PURE__ */ q("select", {
|
|
3543
|
+
...R(e, "page-size"),
|
|
3544
3544
|
value: t,
|
|
3545
3545
|
onChange: (e) => a(Number(e.target.value)),
|
|
3546
3546
|
className: "h-6 cursor-pointer appearance-none rounded-(--radius-sm) border border-(--border) bg-(--muted) pr-5 pl-1.5 text-xs text-(--foreground) transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
|
|
3547
|
-
children: (
|
|
3547
|
+
children: (vl.includes(t) ? vl : [...vl, t].sort((e, t) => e - t)).map((e) => /* @__PURE__ */ J("option", {
|
|
3548
3548
|
value: e,
|
|
3549
3549
|
children: ["Show ", e]
|
|
3550
3550
|
}, e))
|
|
3551
|
-
}), /* @__PURE__ */
|
|
3551
|
+
}), /* @__PURE__ */ q(_, {
|
|
3552
3552
|
"aria-hidden": "true",
|
|
3553
3553
|
className: "pointer-events-none absolute right-1.5 size-3 text-(--muted-foreground)"
|
|
3554
3554
|
})]
|
|
3555
3555
|
})]
|
|
3556
|
-
}), /* @__PURE__ */
|
|
3556
|
+
}), /* @__PURE__ */ J("div", {
|
|
3557
3557
|
"aria-live": "polite",
|
|
3558
3558
|
"aria-atomic": "true",
|
|
3559
3559
|
className: "flex items-center gap-2",
|
|
3560
|
-
children: [/* @__PURE__ */
|
|
3560
|
+
children: [/* @__PURE__ */ J("span", {
|
|
3561
3561
|
className: "tabular-nums @max-xs/table-pager:hidden",
|
|
3562
3562
|
children: [
|
|
3563
3563
|
n.from.toLocaleString(),
|
|
@@ -3567,34 +3567,34 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3567
3567
|
" ",
|
|
3568
3568
|
n.total.toLocaleString()
|
|
3569
3569
|
]
|
|
3570
|
-
}), /* @__PURE__ */
|
|
3570
|
+
}), /* @__PURE__ */ J("div", {
|
|
3571
3571
|
className: "flex items-center gap-0.5",
|
|
3572
3572
|
children: [
|
|
3573
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ q("button", {
|
|
3574
3574
|
type: "button",
|
|
3575
|
-
...
|
|
3575
|
+
...R(e, "pagination", "first"),
|
|
3576
3576
|
"aria-label": "First page",
|
|
3577
3577
|
disabled: !r,
|
|
3578
3578
|
onClick: () => o(0),
|
|
3579
|
-
className:
|
|
3580
|
-
children: /* @__PURE__ */
|
|
3579
|
+
className: B(c, "@max-xs/table-pager:hidden"),
|
|
3580
|
+
children: /* @__PURE__ */ q(Kt, {
|
|
3581
3581
|
"aria-hidden": "true",
|
|
3582
3582
|
className: "size-3.5"
|
|
3583
3583
|
})
|
|
3584
3584
|
}),
|
|
3585
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ q("button", {
|
|
3586
3586
|
type: "button",
|
|
3587
|
-
...
|
|
3587
|
+
...R(e, "pagination", "prev"),
|
|
3588
3588
|
"aria-label": "Previous page",
|
|
3589
3589
|
disabled: !r,
|
|
3590
3590
|
onClick: () => o(Math.max(0, (n.pageIndex - 1) * t)),
|
|
3591
3591
|
className: c,
|
|
3592
|
-
children: /* @__PURE__ */
|
|
3592
|
+
children: /* @__PURE__ */ q(v, {
|
|
3593
3593
|
"aria-hidden": "true",
|
|
3594
3594
|
className: "size-3.5"
|
|
3595
3595
|
})
|
|
3596
3596
|
}),
|
|
3597
|
-
/* @__PURE__ */
|
|
3597
|
+
/* @__PURE__ */ J("span", {
|
|
3598
3598
|
className: "px-1 tabular-nums",
|
|
3599
3599
|
children: [
|
|
3600
3600
|
n.pageIndex + 1,
|
|
@@ -3602,26 +3602,26 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3602
3602
|
n.pageCount
|
|
3603
3603
|
]
|
|
3604
3604
|
}),
|
|
3605
|
-
/* @__PURE__ */
|
|
3605
|
+
/* @__PURE__ */ q("button", {
|
|
3606
3606
|
type: "button",
|
|
3607
|
-
...
|
|
3607
|
+
...R(e, "pagination", "next"),
|
|
3608
3608
|
"aria-label": "Next page",
|
|
3609
3609
|
disabled: !i,
|
|
3610
3610
|
onClick: () => o((n.pageIndex + 1) * t),
|
|
3611
3611
|
className: c,
|
|
3612
|
-
children: /* @__PURE__ */
|
|
3612
|
+
children: /* @__PURE__ */ q(y, {
|
|
3613
3613
|
"aria-hidden": "true",
|
|
3614
3614
|
className: "size-3.5"
|
|
3615
3615
|
})
|
|
3616
3616
|
}),
|
|
3617
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ q("button", {
|
|
3618
3618
|
type: "button",
|
|
3619
|
-
...
|
|
3619
|
+
...R(e, "pagination", "last"),
|
|
3620
3620
|
"aria-label": "Last page",
|
|
3621
3621
|
disabled: !i,
|
|
3622
3622
|
onClick: () => o((n.pageCount - 1) * t),
|
|
3623
|
-
className:
|
|
3624
|
-
children: /* @__PURE__ */
|
|
3623
|
+
className: B(c, "@max-xs/table-pager:hidden"),
|
|
3624
|
+
children: /* @__PURE__ */ q(qt, {
|
|
3625
3625
|
"aria-hidden": "true",
|
|
3626
3626
|
className: "size-3.5"
|
|
3627
3627
|
})
|
|
@@ -3630,137 +3630,38 @@ var Il = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
|
|
|
3630
3630
|
})]
|
|
3631
3631
|
})]
|
|
3632
3632
|
});
|
|
3633
|
-
},
|
|
3633
|
+
}, Gl = (e) => {
|
|
3634
3634
|
let t = e.indexOf(", because ");
|
|
3635
3635
|
return t <= 0 ? { rest: e } : {
|
|
3636
3636
|
type: e.slice(0, t),
|
|
3637
3637
|
rest: e.slice(t)
|
|
3638
3638
|
};
|
|
3639
|
-
},
|
|
3639
|
+
}, Kl = (t) => {
|
|
3640
3640
|
let n = 0;
|
|
3641
3641
|
return t.split(/(\d[\d,]*%?)/g).map((t) => {
|
|
3642
3642
|
let r = `${n}`;
|
|
3643
|
-
return n += t.length, /^\d/.test(t) ? /* @__PURE__ */
|
|
3643
|
+
return n += t.length, /^\d/.test(t) ? /* @__PURE__ */ q("span", {
|
|
3644
3644
|
className: "tabular-nums",
|
|
3645
3645
|
children: t
|
|
3646
|
-
}, r) : /* @__PURE__ */
|
|
3646
|
+
}, r) : /* @__PURE__ */ q(e.Fragment, { children: t }, r);
|
|
3647
3647
|
});
|
|
3648
|
-
},
|
|
3648
|
+
}, ql = ({ sentences: e, className: t }) => {
|
|
3649
3649
|
let n = e?.[0]?.trim();
|
|
3650
3650
|
if (!n) return null;
|
|
3651
|
-
let { type: r, rest: i } =
|
|
3652
|
-
return /* @__PURE__ */
|
|
3651
|
+
let { type: r, rest: i } = Gl(n);
|
|
3652
|
+
return /* @__PURE__ */ q("p", {
|
|
3653
3653
|
"data-slot": "metric-card-reason",
|
|
3654
3654
|
"data-testid": "card-reason-strip",
|
|
3655
3655
|
role: "note",
|
|
3656
3656
|
tabIndex: 0,
|
|
3657
3657
|
title: n,
|
|
3658
|
-
className:
|
|
3659
|
-
children: r ? /* @__PURE__ */
|
|
3658
|
+
className: B("line-clamp-1 shrink-0 text-xs text-(--muted-foreground)", "rounded-xs focus-visible:outline-2 focus-visible:outline-offset-2", "focus-visible:outline-(--ring)", t),
|
|
3659
|
+
children: r ? /* @__PURE__ */ J(Bt, { children: [/* @__PURE__ */ q("span", {
|
|
3660
3660
|
className: "text-(--foreground)",
|
|
3661
3661
|
children: r
|
|
3662
|
-
}),
|
|
3662
|
+
}), Kl(i)] }) : Kl(i)
|
|
3663
3663
|
});
|
|
3664
|
-
},
|
|
3665
|
-
"id",
|
|
3666
|
-
"ids",
|
|
3667
|
-
"url",
|
|
3668
|
-
"uri",
|
|
3669
|
-
"sku",
|
|
3670
|
-
"usd",
|
|
3671
|
-
"eur",
|
|
3672
|
-
"gbp",
|
|
3673
|
-
"api",
|
|
3674
|
-
"utm",
|
|
3675
|
-
"ip",
|
|
3676
|
-
"ltv",
|
|
3677
|
-
"arr",
|
|
3678
|
-
"mrr",
|
|
3679
|
-
"kpi",
|
|
3680
|
-
"roi",
|
|
3681
|
-
"cpc",
|
|
3682
|
-
"ctr",
|
|
3683
|
-
"gmv",
|
|
3684
|
-
"aov",
|
|
3685
|
-
"sla",
|
|
3686
|
-
"uuid"
|
|
3687
|
-
]);
|
|
3688
|
-
function Yl(e) {
|
|
3689
|
-
let t = String(e ?? "").trim();
|
|
3690
|
-
if (!t) return "";
|
|
3691
|
-
let n = t.lastIndexOf("."), r = n >= 0 ? t.slice(n + 1) : t, i = r.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[_\-\s]+/g, " ").replace(/([a-zA-Z])(\d)/g, "$1 $2").trim().split(" ").filter(Boolean);
|
|
3692
|
-
return i.length ? i.map((e, t) => {
|
|
3693
|
-
let n = e.toLowerCase();
|
|
3694
|
-
return Jl.has(n) ? n.toUpperCase() : e.length > 1 && e === e.toUpperCase() && /[A-Z]/.test(e) ? e : t === 0 ? n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
3695
|
-
}).join(" ") : r;
|
|
3696
|
-
}
|
|
3697
|
-
function Xl(e) {
|
|
3698
|
-
let t = String(e ?? "").trim();
|
|
3699
|
-
if (!t) return "";
|
|
3700
|
-
let n = t.lastIndexOf(".");
|
|
3701
|
-
return (n >= 0 ? t.slice(n + 1) : t).toLowerCase();
|
|
3702
|
-
}
|
|
3703
|
-
function Zl(e) {
|
|
3704
|
-
return String(e?.configType ?? "").toUpperCase() === "AGGREGATE" || String(e?.dropType ?? "").toUpperCase() === "METRIC";
|
|
3705
|
-
}
|
|
3706
|
-
function Ql(e, t) {
|
|
3707
|
-
for (let n of e ?? []) {
|
|
3708
|
-
let e = n?.[t];
|
|
3709
|
-
if (e != null && e !== "") return typeof e == "number" ? Number.isFinite(e) ? "number" : "text" : typeof e == "boolean" ? "boolean" : "text";
|
|
3710
|
-
}
|
|
3711
|
-
return "text";
|
|
3712
|
-
}
|
|
3713
|
-
function $l({ keys: e, rows: t = [], selectedDims: n = [], selectedMetrics: r = [] }) {
|
|
3714
|
-
let i = /* @__PURE__ */ new Map(), a = (e) => {
|
|
3715
|
-
if (e) for (let t of [
|
|
3716
|
-
e.alias,
|
|
3717
|
-
e.name,
|
|
3718
|
-
e.label
|
|
3719
|
-
]) {
|
|
3720
|
-
let n = Xl(t);
|
|
3721
|
-
n && !i.has(n) && i.set(n, e);
|
|
3722
|
-
}
|
|
3723
|
-
};
|
|
3724
|
-
n.forEach(a), r.forEach(a);
|
|
3725
|
-
let o = (e, t, ...n) => e !== "number" || t ? e : n.some((e) => e && ql.test(e.trim())) ? "identifier" : e;
|
|
3726
|
-
return (e ?? []).map((e) => {
|
|
3727
|
-
let n = i.get(Xl(e));
|
|
3728
|
-
if (!n) {
|
|
3729
|
-
let n = Yl(e);
|
|
3730
|
-
return {
|
|
3731
|
-
key: e,
|
|
3732
|
-
label: n,
|
|
3733
|
-
kind: o(Ql(t, e), !1, e, n),
|
|
3734
|
-
isMeasure: !1,
|
|
3735
|
-
isDerived: !0
|
|
3736
|
-
};
|
|
3737
|
-
}
|
|
3738
|
-
let r = Zl(n), a = re(n.datatype), s = r ? "number" : a === "number" || a === "date" || a === "boolean" ? a : Ql(t, e), c = n.label?.trim() || n.alias?.trim() || n.name?.trim() || Yl(e);
|
|
3739
|
-
return {
|
|
3740
|
-
key: e,
|
|
3741
|
-
label: c,
|
|
3742
|
-
kind: o(s, r, e, c, n.name),
|
|
3743
|
-
isMeasure: r,
|
|
3744
|
-
isDerived: !1
|
|
3745
|
-
};
|
|
3746
|
-
});
|
|
3747
|
-
}
|
|
3748
|
-
function eu(e) {
|
|
3749
|
-
if (!Number.isFinite(e)) return "";
|
|
3750
|
-
try {
|
|
3751
|
-
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 6 }).format(e);
|
|
3752
|
-
} catch {
|
|
3753
|
-
return String(e);
|
|
3754
|
-
}
|
|
3755
|
-
}
|
|
3756
|
-
function tu(e, t, n) {
|
|
3757
|
-
if (e == null || e === "") return "-";
|
|
3758
|
-
if (t.kind === "identifier" || t.kind !== "number") return String(e);
|
|
3759
|
-
let r = typeof e == "number" ? e : Number(e);
|
|
3760
|
-
return Number.isFinite(r) ? t.isMeasure && n ? n(r, t.key) : eu(r) : String(e);
|
|
3761
|
-
}
|
|
3762
|
-
// src/v2/surfaces/MetricCard/dialogs/UnderlyingDataDialog.tsx
|
|
3763
|
-
var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r, rows: i, onDownload: a, onDownloadAll: o, downloadAllState: s, onDownloadRaw: c, isDownloadingRaw: l, downloadError: u, isLoading: d, title: f = "Underlying data", description: p, presentation: m, error: h, isRefused: g }) => m ? /* @__PURE__ */ K(mu, {
|
|
3664
|
+
}, Jl = 300, Yl = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r, rows: i, onDownload: a, onDownloadAll: o, downloadAllState: s, onDownloadRaw: c, isDownloadingRaw: l, downloadError: u, isLoading: d, title: f = "Underlying data", description: p, presentation: m, error: h, isRefused: g }) => m ? /* @__PURE__ */ q(ou, {
|
|
3764
3665
|
hasActiveFilters: e,
|
|
3765
3666
|
onDownloadRaw: c,
|
|
3766
3667
|
isDownloadingRaw: l,
|
|
@@ -3775,7 +3676,7 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3775
3676
|
title: f,
|
|
3776
3677
|
description: p,
|
|
3777
3678
|
presentation: m
|
|
3778
|
-
}) : /* @__PURE__ */
|
|
3679
|
+
}) : /* @__PURE__ */ q(au, {
|
|
3779
3680
|
hasActiveFilters: e,
|
|
3780
3681
|
open: t,
|
|
3781
3682
|
onOpenChange: n,
|
|
@@ -3790,71 +3691,71 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3790
3691
|
downloadError: u,
|
|
3791
3692
|
title: f,
|
|
3792
3693
|
description: p
|
|
3793
|
-
}),
|
|
3694
|
+
}), Xl = ({ title: e, description: t, search: n, download: r }) => /* @__PURE__ */ J("div", {
|
|
3794
3695
|
className: "flex shrink-0 flex-wrap items-start gap-x-4 gap-y-2",
|
|
3795
3696
|
children: [
|
|
3796
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ J(L, {
|
|
3797
3698
|
className: "min-w-0 flex-1",
|
|
3798
|
-
children: [/* @__PURE__ */
|
|
3699
|
+
children: [/* @__PURE__ */ q(Te, { children: e }), t == null ? null : /* @__PURE__ */ q(I, { children: t })]
|
|
3799
3700
|
}),
|
|
3800
|
-
n ? /* @__PURE__ */
|
|
3701
|
+
n ? /* @__PURE__ */ q("div", {
|
|
3801
3702
|
className: "order-last w-full sm:order-none sm:w-56",
|
|
3802
3703
|
children: n
|
|
3803
3704
|
}) : null,
|
|
3804
|
-
/* @__PURE__ */
|
|
3705
|
+
/* @__PURE__ */ J("div", {
|
|
3805
3706
|
className: "flex shrink-0 items-center gap-2",
|
|
3806
|
-
children: [r, /* @__PURE__ */
|
|
3707
|
+
children: [r, /* @__PURE__ */ q(we, {
|
|
3807
3708
|
asChild: !0,
|
|
3808
|
-
children: /* @__PURE__ */
|
|
3709
|
+
children: /* @__PURE__ */ q(Se, {
|
|
3809
3710
|
type: "button",
|
|
3810
3711
|
variant: "ghost",
|
|
3811
3712
|
size: "icon-sm",
|
|
3812
3713
|
"aria-label": "Close",
|
|
3813
3714
|
"data-testid": "underlying-data-close",
|
|
3814
|
-
children: /* @__PURE__ */
|
|
3715
|
+
children: /* @__PURE__ */ q(et, { "aria-hidden": "true" })
|
|
3815
3716
|
})
|
|
3816
3717
|
})]
|
|
3817
3718
|
})
|
|
3818
3719
|
]
|
|
3819
|
-
}),
|
|
3720
|
+
}), Zl = ({ onDownloadRaw: e, isDownloadingRaw: t = !1, onDownloadFiltered: n, canDownloadFiltered: r, isDownloadingFiltered: i = !1, hint: a }) => !e && !n ? null : /* @__PURE__ */ J(Bt, { children: [a ? /* @__PURE__ */ q("span", {
|
|
3820
3721
|
"data-testid": "underlying-data-download-scope",
|
|
3821
3722
|
className: "text-xs whitespace-nowrap text-(--muted-foreground)",
|
|
3822
3723
|
"aria-live": "polite",
|
|
3823
3724
|
children: a
|
|
3824
|
-
}) : null, /* @__PURE__ */
|
|
3725
|
+
}) : null, /* @__PURE__ */ J(ea, { children: [/* @__PURE__ */ q(ta, {
|
|
3825
3726
|
asChild: !0,
|
|
3826
|
-
children: /* @__PURE__ */
|
|
3727
|
+
children: /* @__PURE__ */ q(Se, {
|
|
3827
3728
|
type: "button",
|
|
3828
3729
|
variant: "ghost",
|
|
3829
3730
|
size: "icon-sm",
|
|
3830
3731
|
"aria-label": "Download",
|
|
3831
3732
|
title: "Download",
|
|
3832
3733
|
"data-testid": "download-underlying-data-btn",
|
|
3833
|
-
children: /* @__PURE__ */
|
|
3734
|
+
children: /* @__PURE__ */ q(Jt, { "aria-hidden": "true" })
|
|
3834
3735
|
})
|
|
3835
|
-
}), /* @__PURE__ */
|
|
3736
|
+
}), /* @__PURE__ */ J(na, {
|
|
3836
3737
|
align: "end",
|
|
3837
|
-
children: [e ? /* @__PURE__ */
|
|
3738
|
+
children: [e ? /* @__PURE__ */ J(ra, {
|
|
3838
3739
|
className: "min-h-8",
|
|
3839
3740
|
"data-testid": "underlying-data-download-raw",
|
|
3840
3741
|
disabled: t,
|
|
3841
3742
|
onSelect: () => e(),
|
|
3842
|
-
children: [/* @__PURE__ */
|
|
3843
|
-
}) : null, n ? /* @__PURE__ */
|
|
3743
|
+
children: [/* @__PURE__ */ q(Yt, {}), t ? "Preparing raw data..." : "Download Raw Data"]
|
|
3744
|
+
}) : null, n ? /* @__PURE__ */ J(ra, {
|
|
3844
3745
|
className: "min-h-8",
|
|
3845
3746
|
"data-testid": "underlying-data-download-filtered",
|
|
3846
3747
|
disabled: !r || i,
|
|
3847
3748
|
onSelect: () => n(),
|
|
3848
|
-
children: [/* @__PURE__ */
|
|
3749
|
+
children: [/* @__PURE__ */ q(Jt, {}), "Download with Filters"]
|
|
3849
3750
|
}) : null]
|
|
3850
|
-
})] })] }),
|
|
3751
|
+
})] })] }), Ql = ({ value: e, onChange: t }) => /* @__PURE__ */ J("div", {
|
|
3851
3752
|
className: "relative",
|
|
3852
3753
|
children: [
|
|
3853
|
-
/* @__PURE__ */
|
|
3754
|
+
/* @__PURE__ */ q(Re, {
|
|
3854
3755
|
"aria-hidden": "true",
|
|
3855
3756
|
className: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-(--muted-foreground)"
|
|
3856
3757
|
}),
|
|
3857
|
-
/* @__PURE__ */
|
|
3758
|
+
/* @__PURE__ */ q(xe, {
|
|
3858
3759
|
type: "search",
|
|
3859
3760
|
value: e,
|
|
3860
3761
|
onChange: (e) => t(e.target.value),
|
|
@@ -3863,7 +3764,7 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3863
3764
|
"data-testid": "underlying-data-search",
|
|
3864
3765
|
className: "h-8 pr-8 pl-8 text-sm"
|
|
3865
3766
|
}),
|
|
3866
|
-
e ? /* @__PURE__ */
|
|
3767
|
+
e ? /* @__PURE__ */ q(Se, {
|
|
3867
3768
|
type: "button",
|
|
3868
3769
|
variant: "ghost",
|
|
3869
3770
|
size: "icon-xs",
|
|
@@ -3871,80 +3772,80 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3871
3772
|
"data-testid": "underlying-data-search-clear",
|
|
3872
3773
|
onClick: () => t(""),
|
|
3873
3774
|
className: "absolute top-1/2 right-1.5 -translate-y-1/2 text-(--muted-foreground)",
|
|
3874
|
-
children: /* @__PURE__ */
|
|
3775
|
+
children: /* @__PURE__ */ q(et, { "aria-hidden": "true" })
|
|
3875
3776
|
}) : null
|
|
3876
3777
|
]
|
|
3877
|
-
}),
|
|
3778
|
+
}), $l = (e, t, n) => {
|
|
3878
3779
|
if (!n) return e;
|
|
3879
3780
|
let r = n.toLowerCase();
|
|
3880
3781
|
return (e ?? []).filter((e) => t.some((t) => String(e?.[t] ?? "").toLowerCase().includes(r)));
|
|
3881
|
-
},
|
|
3782
|
+
}, eu = (e) => `${e.toLocaleString()} ${e === 1 ? "row" : "rows"}`, tu = ({ message: e }) => e ? /* @__PURE__ */ J("div", {
|
|
3882
3783
|
role: "alert",
|
|
3883
3784
|
"data-testid": "underlying-data-download-error",
|
|
3884
3785
|
className: "flex shrink-0 items-center gap-2 text-xs text-(--destructive)",
|
|
3885
|
-
children: [/* @__PURE__ */
|
|
3786
|
+
children: [/* @__PURE__ */ q(ge, {
|
|
3886
3787
|
"aria-hidden": "true",
|
|
3887
3788
|
className: "size-3.5"
|
|
3888
|
-
}), /* @__PURE__ */
|
|
3889
|
-
}) : null,
|
|
3789
|
+
}), /* @__PURE__ */ q("span", { children: e })]
|
|
3790
|
+
}) : null, nu = (e) => e.stopPropagation(), ru = "flex h-4/5 max-h-4/5 w-full flex-col overflow-hidden sm:max-w-260", iu = "min-h-0 flex-1 [&_.overflow-auto]:overscroll-contain", au = ({ hasActiveFilters: t, open: n, onOpenChange: r, columns: i, rows: a, onDownload: o, onDownloadRaw: s, isDownloadingRaw: c, downloadError: l, title: u, description: d, error: f, isRefused: p = !1, isLoading: m = !1 }) => {
|
|
3890
3791
|
let h = !a?.length, g = m && !f, [_, v] = e.useState(""), y = _.trim();
|
|
3891
3792
|
e.useEffect(() => {
|
|
3892
3793
|
n || v("");
|
|
3893
3794
|
}, [n]);
|
|
3894
|
-
let b = e.useMemo(() => i.map((e) => e.key), [i]), x = e.useMemo(() =>
|
|
3795
|
+
let b = e.useMemo(() => i.map((e) => e.key), [i]), x = e.useMemo(() => $l(a, b, y), [
|
|
3895
3796
|
a,
|
|
3896
3797
|
b,
|
|
3897
3798
|
y
|
|
3898
3799
|
]), S = !f && !g && !h;
|
|
3899
|
-
return /* @__PURE__ */
|
|
3800
|
+
return /* @__PURE__ */ q(Ee, {
|
|
3900
3801
|
open: n,
|
|
3901
3802
|
onOpenChange: r,
|
|
3902
|
-
children: /* @__PURE__ */
|
|
3803
|
+
children: /* @__PURE__ */ J(De, {
|
|
3903
3804
|
"data-testid": "underlying-data-dialog",
|
|
3904
3805
|
showCloseButton: !1,
|
|
3905
|
-
className:
|
|
3906
|
-
onWheel:
|
|
3907
|
-
onTouchMove:
|
|
3806
|
+
className: ru,
|
|
3807
|
+
onWheel: nu,
|
|
3808
|
+
onTouchMove: nu,
|
|
3908
3809
|
children: [
|
|
3909
|
-
/* @__PURE__ */
|
|
3810
|
+
/* @__PURE__ */ q(Xl, {
|
|
3910
3811
|
title: u,
|
|
3911
3812
|
description: d,
|
|
3912
|
-
search: S ? /* @__PURE__ */
|
|
3813
|
+
search: S ? /* @__PURE__ */ q(Ql, {
|
|
3913
3814
|
value: _,
|
|
3914
3815
|
onChange: v
|
|
3915
3816
|
}) : null,
|
|
3916
|
-
download: f ? null : /* @__PURE__ */
|
|
3817
|
+
download: f ? null : /* @__PURE__ */ q(Zl, {
|
|
3917
3818
|
onDownloadRaw: s,
|
|
3918
3819
|
isDownloadingRaw: c,
|
|
3919
3820
|
onDownloadFiltered: o ? () => o(x) : void 0,
|
|
3920
3821
|
canDownloadFiltered: S && x.length > 0,
|
|
3921
|
-
hint: S && o ? y ? `${x.length.toLocaleString()} of ${
|
|
3822
|
+
hint: S && o ? y ? `${x.length.toLocaleString()} of ${eu(a.length)}` : eu(a.length) : null
|
|
3922
3823
|
})
|
|
3923
3824
|
}),
|
|
3924
|
-
/* @__PURE__ */
|
|
3925
|
-
/* @__PURE__ */
|
|
3825
|
+
/* @__PURE__ */ q(tu, { message: l }),
|
|
3826
|
+
/* @__PURE__ */ q("div", {
|
|
3926
3827
|
className: "flex min-h-0 flex-1 flex-col",
|
|
3927
|
-
children: f ? /* @__PURE__ */
|
|
3828
|
+
children: f ? /* @__PURE__ */ J("div", {
|
|
3928
3829
|
role: p ? "status" : "alert",
|
|
3929
3830
|
"data-testid": "underlying-data-error",
|
|
3930
3831
|
className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
|
|
3931
|
-
children: [p ? /* @__PURE__ */
|
|
3832
|
+
children: [p ? /* @__PURE__ */ q(Zt, {
|
|
3932
3833
|
"aria-hidden": "true",
|
|
3933
3834
|
className: "size-6 text-(--muted-foreground)"
|
|
3934
|
-
}) : /* @__PURE__ */
|
|
3835
|
+
}) : /* @__PURE__ */ q(ge, {
|
|
3935
3836
|
"aria-hidden": "true",
|
|
3936
3837
|
className: "size-6 text-(--destructive)"
|
|
3937
|
-
}), /* @__PURE__ */
|
|
3838
|
+
}), /* @__PURE__ */ q("span", {
|
|
3938
3839
|
className: "text-sm text-(--muted-foreground)",
|
|
3939
3840
|
children: f
|
|
3940
3841
|
})]
|
|
3941
|
-
}) : g ? /* @__PURE__ */
|
|
3842
|
+
}) : g ? /* @__PURE__ */ q(ye, {
|
|
3942
3843
|
label: "Loading rows",
|
|
3943
3844
|
className: "flex-1"
|
|
3944
|
-
}) : h ? /* @__PURE__ */
|
|
3845
|
+
}) : h ? /* @__PURE__ */ q(Hc, {
|
|
3945
3846
|
className: "flex-1",
|
|
3946
3847
|
hasActiveFilters: t
|
|
3947
|
-
}) : /* @__PURE__ */
|
|
3848
|
+
}) : /* @__PURE__ */ q(Ll, {
|
|
3948
3849
|
rows: x,
|
|
3949
3850
|
columns: i,
|
|
3950
3851
|
paging: {
|
|
@@ -3959,23 +3860,23 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3959
3860
|
},
|
|
3960
3861
|
ariaLabel: typeof u == "string" ? u : "Underlying data",
|
|
3961
3862
|
qaEntity: "underlying-data-table",
|
|
3962
|
-
className:
|
|
3863
|
+
className: iu
|
|
3963
3864
|
})
|
|
3964
3865
|
})
|
|
3965
3866
|
]
|
|
3966
3867
|
})
|
|
3967
3868
|
});
|
|
3968
|
-
},
|
|
3869
|
+
}, ou = ({ hasActiveFilters: t, open: n, onOpenChange: r, columns: i, rows: a, onDownload: o, onDownloadAll: s, downloadAllState: c, onDownloadRaw: l, isDownloadingRaw: u, downloadError: d, title: f, description: p, presentation: m }) => {
|
|
3969
3870
|
let { selectedDims: h, selectedMetrics: g, measureFormatter: _, paging: v, scope: y, isLoading: b = !1, error: x = null, canRetry: S = !0, onRetry: C } = m, [w, ee] = e.useState(""), [T, E] = e.useState("");
|
|
3970
3871
|
e.useEffect(() => {
|
|
3971
3872
|
let e = w.trim();
|
|
3972
3873
|
if (e === T) return;
|
|
3973
|
-
let t = setTimeout(() => E(e),
|
|
3874
|
+
let t = setTimeout(() => E(e), Jl);
|
|
3974
3875
|
return () => clearTimeout(t);
|
|
3975
3876
|
}, [w, T]), e.useEffect(() => {
|
|
3976
3877
|
n || (ee(""), E(""));
|
|
3977
3878
|
}, [n]);
|
|
3978
|
-
let D = e.useMemo(() => i?.length ? i.map((e) => e.key) : Object.keys(a?.[0] ?? {}), [i, a]), O = e.useMemo(() =>
|
|
3879
|
+
let D = e.useMemo(() => i?.length ? i.map((e) => e.key) : Object.keys(a?.[0] ?? {}), [i, a]), O = e.useMemo(() => ue({
|
|
3979
3880
|
keys: D,
|
|
3980
3881
|
rows: a,
|
|
3981
3882
|
selectedDims: h,
|
|
@@ -3991,7 +3892,7 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
3991
3892
|
isNumeric: e.kind === "number" || e.kind === "identifier"
|
|
3992
3893
|
})), [O]), k = e.useMemo(() => new Map(O.map((e) => [e.key, e])), [O]), ne = e.useCallback((e, t) => {
|
|
3993
3894
|
let n = k.get(t.key);
|
|
3994
|
-
return n ?
|
|
3895
|
+
return n ? pe(e, n, _) : String(e ?? "");
|
|
3995
3896
|
}, [k, _]), A = !!v, j = !A || v.canSearch !== !1, M = D, re = v?.onRequestPage, ie = e.useRef(re);
|
|
3996
3897
|
e.useEffect(() => {
|
|
3997
3898
|
ie.current = re;
|
|
@@ -4040,7 +3941,7 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
4040
3941
|
T,
|
|
4041
3942
|
M
|
|
4042
3943
|
]);
|
|
4043
|
-
let se = e.useMemo(() => A ? a :
|
|
3944
|
+
let se = e.useMemo(() => A ? a : $l(a, D, T), [
|
|
4044
3945
|
A,
|
|
4045
3946
|
a,
|
|
4046
3947
|
T,
|
|
@@ -4062,12 +3963,12 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
4062
3963
|
} : {
|
|
4063
3964
|
mode: "client",
|
|
4064
3965
|
pageSize: 100
|
|
4065
|
-
},
|
|
3966
|
+
}, de = Cl({
|
|
4066
3967
|
total: A ? v.totalRows : ce.length,
|
|
4067
3968
|
limit: N,
|
|
4068
3969
|
offset: A ? P : 0,
|
|
4069
3970
|
renderedRowCount: ce.length
|
|
4070
|
-
}),
|
|
3971
|
+
}), fe = e.useMemo(() => {
|
|
4071
3972
|
if (S) {
|
|
4072
3973
|
if (C) return C;
|
|
4073
3974
|
if (A) return () => v.onRequestPage({
|
|
@@ -4087,119 +3988,119 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
4087
3988
|
j,
|
|
4088
3989
|
T,
|
|
4089
3990
|
M
|
|
4090
|
-
]),
|
|
3991
|
+
]), me = !!T, he = !b && !x && ce.length === 0, ge = !!x && !S, _e = me ? `No rows match \u201C${T}\u201D.` : "There are no rows behind this value.", ve = me ? {
|
|
4091
3992
|
label: "Clear search",
|
|
4092
3993
|
onClick: () => ee("")
|
|
4093
|
-
} : void 0,
|
|
3994
|
+
} : void 0, ye = he && !me && !A, F = A && de.total > ce.length, be = s != null && F, xe = !!c?.isRunning, Se = be ? () => s?.({
|
|
4094
3995
|
search: j && T ? T : void 0,
|
|
4095
3996
|
searchColumns: j && T ? M : void 0,
|
|
4096
|
-
total:
|
|
4097
|
-
}) : o ? () => o(ce) : void 0,
|
|
4098
|
-
return /* @__PURE__ */
|
|
3997
|
+
total: de.total
|
|
3998
|
+
}) : o ? () => o(ce) : void 0, I = xe ? `Preparing ${(c?.fetchedRows ?? 0).toLocaleString()} of ${eu(de.total)}...` : ce.length > 0 ? F ? `Showing ${ce.length.toLocaleString()} of ${eu(de.total)}` : eu(de.total) : null;
|
|
3999
|
+
return /* @__PURE__ */ q(Ee, {
|
|
4099
4000
|
open: n,
|
|
4100
4001
|
onOpenChange: r,
|
|
4101
|
-
children: /* @__PURE__ */
|
|
4002
|
+
children: /* @__PURE__ */ J(De, {
|
|
4102
4003
|
"data-testid": "underlying-data-dialog",
|
|
4103
4004
|
showCloseButton: !1,
|
|
4104
|
-
className:
|
|
4105
|
-
onWheel:
|
|
4106
|
-
onTouchMove:
|
|
4005
|
+
className: ru,
|
|
4006
|
+
onWheel: nu,
|
|
4007
|
+
onTouchMove: nu,
|
|
4107
4008
|
children: [
|
|
4108
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ q(Xl, {
|
|
4109
4010
|
title: f,
|
|
4110
4011
|
description: p,
|
|
4111
|
-
search: j && !
|
|
4012
|
+
search: j && !ye && !ge ? /* @__PURE__ */ q(Ql, {
|
|
4112
4013
|
value: w,
|
|
4113
4014
|
onChange: ee
|
|
4114
4015
|
}) : null,
|
|
4115
|
-
download:
|
|
4016
|
+
download: ge ? null : /* @__PURE__ */ q(Zl, {
|
|
4116
4017
|
onDownloadRaw: l,
|
|
4117
4018
|
isDownloadingRaw: u,
|
|
4118
|
-
onDownloadFiltered:
|
|
4019
|
+
onDownloadFiltered: Se,
|
|
4119
4020
|
canDownloadFiltered: !b && ce.length > 0,
|
|
4120
|
-
isDownloadingFiltered:
|
|
4121
|
-
hint:
|
|
4021
|
+
isDownloadingFiltered: xe,
|
|
4022
|
+
hint: I
|
|
4122
4023
|
})
|
|
4123
4024
|
}),
|
|
4124
|
-
y?.length ? /* @__PURE__ */
|
|
4025
|
+
y?.length ? /* @__PURE__ */ J("div", {
|
|
4125
4026
|
className: "flex shrink-0 flex-wrap items-center gap-1.5 text-xs text-(--muted-foreground)",
|
|
4126
4027
|
"data-testid": "underlying-data-scope",
|
|
4127
|
-
children: [/* @__PURE__ */
|
|
4028
|
+
children: [/* @__PURE__ */ q("span", { children: "Showing rows where" }), y.map((t, n) => /* @__PURE__ */ J(e.Fragment, { children: [n > 0 ? /* @__PURE__ */ q("span", { children: "and" }) : null, /* @__PURE__ */ J("span", {
|
|
4128
4029
|
className: "inline-flex max-w-72 items-baseline gap-1 truncate rounded-(--radius-xs) border border-(--border) bg-(--muted) px-1.5 py-0.5",
|
|
4129
|
-
children: [/* @__PURE__ */
|
|
4030
|
+
children: [/* @__PURE__ */ q("span", {
|
|
4130
4031
|
className: "truncate",
|
|
4131
4032
|
children: t.label
|
|
4132
|
-
}), /* @__PURE__ */
|
|
4033
|
+
}), /* @__PURE__ */ q("span", {
|
|
4133
4034
|
className: "truncate font-medium text-(--foreground)",
|
|
4134
4035
|
children: t.value
|
|
4135
4036
|
})]
|
|
4136
4037
|
})] }, `${t.label}-${t.value}`))]
|
|
4137
4038
|
}) : null,
|
|
4138
|
-
/* @__PURE__ */
|
|
4139
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ q(tu, { message: d }),
|
|
4040
|
+
/* @__PURE__ */ q("div", {
|
|
4140
4041
|
className: "flex min-h-0 flex-1 flex-col",
|
|
4141
|
-
children:
|
|
4042
|
+
children: ye ? /* @__PURE__ */ q(Hc, {
|
|
4142
4043
|
className: "flex-1",
|
|
4143
|
-
message:
|
|
4044
|
+
message: _e,
|
|
4144
4045
|
hasActiveFilters: t
|
|
4145
|
-
}) : /* @__PURE__ */
|
|
4046
|
+
}) : /* @__PURE__ */ q(Ll, {
|
|
4146
4047
|
rows: ce,
|
|
4147
4048
|
columns: te,
|
|
4148
4049
|
paging: le,
|
|
4149
4050
|
isLoading: b,
|
|
4150
4051
|
error: x,
|
|
4151
|
-
onRetry:
|
|
4152
|
-
emptyMessage:
|
|
4153
|
-
emptyAction:
|
|
4052
|
+
onRetry: fe,
|
|
4053
|
+
emptyMessage: _e,
|
|
4054
|
+
emptyAction: ve,
|
|
4154
4055
|
renderCell: ne,
|
|
4155
4056
|
ariaLabel: typeof f == "string" ? f : "Underlying data",
|
|
4156
4057
|
qaEntity: "underlying-data-table",
|
|
4157
|
-
className:
|
|
4058
|
+
className: iu
|
|
4158
4059
|
})
|
|
4159
4060
|
})
|
|
4160
4061
|
]
|
|
4161
4062
|
})
|
|
4162
4063
|
});
|
|
4163
|
-
},
|
|
4064
|
+
}, su = e.lazy(async () => ({ default: (await import("./charts-BCsWRROL.mjs").then((e) => e.t)).DbnChart })), cu = e.lazy(async () => ({ default: (await import("./Chart-Rc4bVXrP.mjs").then((e) => e.n)).Chart })), lu = Object.freeze({
|
|
4164
4065
|
isLoading: !1,
|
|
4165
4066
|
error: "",
|
|
4166
4067
|
data: [],
|
|
4167
4068
|
currentValue: ""
|
|
4168
|
-
}),
|
|
4069
|
+
}), uu = new Set([...Object.keys(p), ...Object.values(p)].map(f)), du = (e) => uu.has(f(e)), fu = (e) => {
|
|
4169
4070
|
let t = e?.customSettings?.chartTypeSource;
|
|
4170
4071
|
return t === "default" || t === "engine";
|
|
4171
|
-
},
|
|
4072
|
+
}, pu = "__dbnStackBar", mu = (e, t) => {
|
|
4172
4073
|
let n = Number(e?.[t]);
|
|
4173
4074
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
4174
|
-
},
|
|
4075
|
+
}, hu = (e, t) => t.reduce((t, n) => t + mu(e, n), 0), gu = [
|
|
4175
4076
|
"fill-(--chart-1)",
|
|
4176
4077
|
"fill-(--chart-2)",
|
|
4177
4078
|
"fill-(--chart-3)",
|
|
4178
4079
|
"fill-(--chart-4)",
|
|
4179
4080
|
"fill-(--chart-5)"
|
|
4180
|
-
],
|
|
4181
|
-
let i = t.map((t) => `${t}: ${r(
|
|
4182
|
-
let i =
|
|
4081
|
+
], _u = ({ row: e, cols: t, max: n, format: r }) => {
|
|
4082
|
+
let i = t.map((t) => `${t}: ${r(mu(e, t), t)}`).join(", "), a = 0, o = n > 0 ? t.flatMap((t, r) => {
|
|
4083
|
+
let i = mu(e, t);
|
|
4183
4084
|
if (!i) return [];
|
|
4184
4085
|
let o = i / n * 100, s = a;
|
|
4185
4086
|
return a += o, [{
|
|
4186
4087
|
key: t,
|
|
4187
4088
|
x: s,
|
|
4188
4089
|
width: o,
|
|
4189
|
-
fill:
|
|
4090
|
+
fill: gu[r % gu.length]
|
|
4190
4091
|
}];
|
|
4191
4092
|
}) : [];
|
|
4192
|
-
return /* @__PURE__ */
|
|
4093
|
+
return /* @__PURE__ */ q("div", {
|
|
4193
4094
|
className: "h-3 min-w-24 w-full overflow-hidden rounded-sm bg-(--muted)",
|
|
4194
4095
|
title: i,
|
|
4195
4096
|
"data-slot": "card-stack-row-bar",
|
|
4196
|
-
children: /* @__PURE__ */
|
|
4097
|
+
children: /* @__PURE__ */ J("svg", {
|
|
4197
4098
|
className: "block size-full",
|
|
4198
4099
|
viewBox: "0 0 100 1",
|
|
4199
4100
|
preserveAspectRatio: "none",
|
|
4200
4101
|
role: "img",
|
|
4201
4102
|
"aria-label": i,
|
|
4202
|
-
children: [/* @__PURE__ */
|
|
4103
|
+
children: [/* @__PURE__ */ q("title", { children: i }), o.map((e) => /* @__PURE__ */ q("rect", {
|
|
4203
4104
|
x: e.x,
|
|
4204
4105
|
y: 0,
|
|
4205
4106
|
width: e.width,
|
|
@@ -4208,7 +4109,7 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
4208
4109
|
}, e.key))]
|
|
4209
4110
|
})
|
|
4210
4111
|
});
|
|
4211
|
-
},
|
|
4112
|
+
}, vu = /* @__PURE__ */ new Set([
|
|
4212
4113
|
p.table,
|
|
4213
4114
|
p.trendAnalyzer,
|
|
4214
4115
|
p.pivot,
|
|
@@ -4216,31 +4117,31 @@ var nu = 300, ru = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r,
|
|
|
4216
4117
|
p.pivotV3,
|
|
4217
4118
|
p.horizontalStackTable
|
|
4218
4119
|
]);
|
|
4219
|
-
function
|
|
4120
|
+
function yu(e) {
|
|
4220
4121
|
if (e != null) return typeof e == "number" ? `${e}px` : e;
|
|
4221
4122
|
}
|
|
4222
|
-
var
|
|
4223
|
-
let
|
|
4224
|
-
|
|
4123
|
+
var bu = ({ metric: t, chartSettings: n, data: r, isLoading: i, drillBreadcrumb: a, terminalNotice: o, chartColors: s, chartRendererType: u, chartAppearance: d, chartColumns: g, tablePaging: _, tableSearch: v, onTableCellClick: y, onOpenSection: b, openSectionLabel: C, isTableRefreshing: O, height: te, width: N, onEvents: le, onChartReady: ue, enableCoverageTruncation: pe, chartTasteCapability: he, canOpenDataPointMenu: ge, emptyState: _e, hasActiveFilters: ve, className: ye, reduction: F, reductionRowsIn: be, serverTruncation: xe }) => {
|
|
4124
|
+
let I = vu.has(n?.chartType), Ce = s ?? n?.chartColors, we = ee(he), Te = m(), Ee = Te && fu(n) && pe !== !1, L = e.useMemo(() => I ? null : ol(n, r, Ee, t, xe), [
|
|
4125
|
+
I,
|
|
4225
4126
|
n,
|
|
4226
4127
|
r,
|
|
4227
|
-
|
|
4128
|
+
Ee,
|
|
4228
4129
|
t,
|
|
4229
|
-
|
|
4230
|
-
]),
|
|
4231
|
-
|
|
4130
|
+
xe
|
|
4131
|
+
]), R = e.useMemo(() => L?.summary ? sl(L.summary, n, t) : null, [
|
|
4132
|
+
L?.summary,
|
|
4232
4133
|
n,
|
|
4233
4134
|
t
|
|
4234
|
-
]),
|
|
4235
|
-
truncationFootnote:
|
|
4236
|
-
reduction:
|
|
4135
|
+
]), De = e.useMemo(() => R ?? de(L?.truncated ?? null), [R, L?.truncated]), Oe = e.useMemo(() => Wc({
|
|
4136
|
+
truncationFootnote: De,
|
|
4137
|
+
reduction: F,
|
|
4237
4138
|
rowsIn: be
|
|
4238
4139
|
}), [
|
|
4239
|
-
|
|
4240
|
-
|
|
4140
|
+
De,
|
|
4141
|
+
F,
|
|
4241
4142
|
be
|
|
4242
|
-
]),
|
|
4243
|
-
if (
|
|
4143
|
+
]), ke = e.useMemo(() => {
|
|
4144
|
+
if (Oe || !Xc()) return;
|
|
4244
4145
|
let e = n?.chartType;
|
|
4245
4146
|
if (e && r?.length) try {
|
|
4246
4147
|
let t = h(r);
|
|
@@ -4249,11 +4150,11 @@ var Ou = ({ metric: t, chartSettings: n, data: r, isLoading: i, drillBreadcrumb:
|
|
|
4249
4150
|
return;
|
|
4250
4151
|
}
|
|
4251
4152
|
}, [
|
|
4252
|
-
|
|
4153
|
+
Oe,
|
|
4253
4154
|
n?.chartType,
|
|
4254
4155
|
r
|
|
4255
|
-
]),
|
|
4256
|
-
if (!
|
|
4156
|
+
]), Ae = e.useMemo(() => {
|
|
4157
|
+
if (!Te) return null;
|
|
4257
4158
|
let e = n?.chartType;
|
|
4258
4159
|
if (!e || !r?.length) return null;
|
|
4259
4160
|
try {
|
|
@@ -4265,263 +4166,263 @@ var Ou = ({ metric: t, chartSettings: n, data: r, isLoading: i, drillBreadcrumb:
|
|
|
4265
4166
|
return null;
|
|
4266
4167
|
}
|
|
4267
4168
|
}, [
|
|
4268
|
-
|
|
4169
|
+
Te,
|
|
4269
4170
|
n,
|
|
4270
4171
|
r
|
|
4271
|
-
]),
|
|
4272
|
-
mapping:
|
|
4172
|
+
]), je = L?.rows ?? r, Me = ee(he), Ne = T(null), Pe = e.useMemo(() => !Ne || I ? null : ie({
|
|
4173
|
+
mapping: P(n, je),
|
|
4273
4174
|
chartOptions: n,
|
|
4274
|
-
rows:
|
|
4275
|
-
enabled:
|
|
4175
|
+
rows: je,
|
|
4176
|
+
enabled: Me
|
|
4276
4177
|
}), [
|
|
4277
|
-
Fe,
|
|
4278
|
-
Ce,
|
|
4279
|
-
n,
|
|
4280
4178
|
Ne,
|
|
4281
|
-
|
|
4282
|
-
|
|
4179
|
+
I,
|
|
4180
|
+
n,
|
|
4181
|
+
je,
|
|
4182
|
+
Me
|
|
4183
|
+
]), z = L?.summary?.bucketLabel, [Fe, Ie] = e.useState(null), Le = e.useMemo(() => Fe === "collapsed" ? L?.collapsedRows ?? [] : r, [
|
|
4283
4184
|
r,
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
]),
|
|
4185
|
+
L?.collapsedRows,
|
|
4186
|
+
Fe
|
|
4187
|
+
]), Re = e.useMemo(() => xu(g, Le, !0), [g, Le]), ze = me(), Be = e.useRef(null), Ve = e.useRef(ue);
|
|
4287
4188
|
e.useLayoutEffect(() => {
|
|
4288
|
-
|
|
4289
|
-
}, [
|
|
4290
|
-
let
|
|
4291
|
-
t &&
|
|
4292
|
-
}, []),
|
|
4293
|
-
let e = !!
|
|
4189
|
+
Ve.current = ue;
|
|
4190
|
+
}, [ue]);
|
|
4191
|
+
let He = e.useCallback((e, t) => {
|
|
4192
|
+
t && Be.current !== t && (Be.current = t, Ve.current?.(t));
|
|
4193
|
+
}, []), Ue = e.useMemo(() => {
|
|
4194
|
+
let e = !!ue, n = (t) => {
|
|
4294
4195
|
if (!e) return t;
|
|
4295
4196
|
let n = t?.finished;
|
|
4296
4197
|
return {
|
|
4297
4198
|
...t ?? {},
|
|
4298
4199
|
finished: (...e) => {
|
|
4299
|
-
n?.(...e),
|
|
4200
|
+
n?.(...e), He(e[0], e[1]);
|
|
4300
4201
|
}
|
|
4301
4202
|
};
|
|
4302
4203
|
};
|
|
4303
|
-
if (!
|
|
4304
|
-
let { click: r, ...i } =
|
|
4204
|
+
if (!z && !ze) return n(le);
|
|
4205
|
+
let { click: r, ...i } = le ?? {};
|
|
4305
4206
|
return n({
|
|
4306
4207
|
...i,
|
|
4307
4208
|
click: (e, ...n) => {
|
|
4308
|
-
|
|
4209
|
+
z && e?.name === z ? Ie("collapsed") : ze?.(t, {
|
|
4309
4210
|
params: e,
|
|
4310
4211
|
rowFilters: Array.isArray(e?.rowFilters) ? e.rowFilters : void 0
|
|
4311
4212
|
}) || r?.(e, ...n);
|
|
4312
4213
|
}
|
|
4313
4214
|
});
|
|
4314
4215
|
}, [
|
|
4315
|
-
|
|
4316
|
-
|
|
4216
|
+
le,
|
|
4217
|
+
z,
|
|
4317
4218
|
t,
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
]),
|
|
4322
|
-
...
|
|
4219
|
+
ze,
|
|
4220
|
+
ue,
|
|
4221
|
+
He
|
|
4222
|
+
]), We = S(), Ge = e.useMemo(() => We?.override === !0 && We?.pointerStyle ? { tooltip: { pointerStyle: We.pointerStyle } } : void 0, [We?.override, We?.pointerStyle]), Ke = e.useMemo(() => dl(re(d, {
|
|
4223
|
+
...se(n?.customSettings),
|
|
4323
4224
|
tooltipSettings: n?.tooltipSettings,
|
|
4324
|
-
categoryField:
|
|
4225
|
+
categoryField: Pe?.type === "gaugeV2" ? null : n?.xAxis,
|
|
4325
4226
|
chartZoom: n?.customSettings?.chartZoom,
|
|
4326
4227
|
percentageSize: n?.percentageSize,
|
|
4327
4228
|
repulsion: n?.customSettings?.repulsion,
|
|
4328
4229
|
isUseAsDifference: n?.waterfallSettings?.isUseAsDifference,
|
|
4329
4230
|
hideNullValues: n?.customSettings?.hideNullValues,
|
|
4330
4231
|
axisPointerStyle: n?.customSettings?.axisPointerStyle,
|
|
4331
|
-
crossPointer:
|
|
4332
|
-
themeTooltip:
|
|
4232
|
+
crossPointer: ce(n?.customSettings, n?.chartType),
|
|
4233
|
+
themeTooltip: We,
|
|
4333
4234
|
axisVisibility: n?.customSettings
|
|
4334
|
-
}),
|
|
4235
|
+
}), we, !!ge || we), [
|
|
4335
4236
|
d,
|
|
4336
4237
|
n,
|
|
4337
|
-
|
|
4338
|
-
|
|
4238
|
+
Pe?.type,
|
|
4239
|
+
we,
|
|
4339
4240
|
ge,
|
|
4340
|
-
|
|
4341
|
-
]),
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
]),
|
|
4346
|
-
if (!
|
|
4241
|
+
We
|
|
4242
|
+
]), qe = e.useMemo(() => ae(Ke, oe(Pe?.data ?? {}, Me)), [
|
|
4243
|
+
Ke,
|
|
4244
|
+
Pe?.data,
|
|
4245
|
+
Me
|
|
4246
|
+
]), Je = e.useMemo(() => I ? void 0 : M(n), [I, n]), Ye = e.useMemo(() => D(M(n), "precise"), [n]), Xe = e.useMemo(() => n?.chartType === p.horizontalStackTable ? (n?.stackTableCols ?? []).filter(Boolean) : [], [n?.chartType, n?.stackTableCols]), Ze = e.useMemo(() => {
|
|
4247
|
+
if (!Xe.length) return 0;
|
|
4347
4248
|
let e = 0;
|
|
4348
|
-
for (let t of r ?? []) e = Math.max(e,
|
|
4249
|
+
for (let t of r ?? []) e = Math.max(e, hu(t, Xe));
|
|
4349
4250
|
return e;
|
|
4350
|
-
}, [r,
|
|
4351
|
-
key:
|
|
4251
|
+
}, [r, Xe]), Qe = e.useCallback((e) => Xe.length ? [...e.filter((e) => !Xe.includes(e.key)), {
|
|
4252
|
+
key: pu,
|
|
4352
4253
|
label: n?.tableSettings?.stackColAlias || ""
|
|
4353
|
-
}] : e, [
|
|
4254
|
+
}] : e, [Xe, n?.tableSettings?.stackColAlias]), $e = e.useCallback((e, t, n) => t.key === pu && Xe.length ? /* @__PURE__ */ q(_u, {
|
|
4354
4255
|
row: n ?? {},
|
|
4355
|
-
cols:
|
|
4356
|
-
max:
|
|
4357
|
-
format: (e, t) =>
|
|
4358
|
-
}) : typeof e == "number" && Number.isFinite(e) ?
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
]), [
|
|
4256
|
+
cols: Xe,
|
|
4257
|
+
max: Ze,
|
|
4258
|
+
format: (e, t) => Ye(e, t)
|
|
4259
|
+
}) : typeof e == "number" && Number.isFinite(e) ? Ye(e, t.key) : Dl(e) ? /* @__PURE__ */ q(Bl, {}) : String(e), [
|
|
4260
|
+
Ye,
|
|
4261
|
+
Xe,
|
|
4262
|
+
Ze
|
|
4263
|
+
]), [et, tt] = e.useState(null), nt = fe(et), rt = e.useMemo(() => tl(n, nt?.surface, nt?.backdrop), [
|
|
4363
4264
|
n,
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
]),
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4265
|
+
nt?.surface,
|
|
4266
|
+
nt?.backdrop
|
|
4267
|
+
]), it = e.useMemo(() => Te && !I && !Pe ? $c(n, r) : null, [
|
|
4268
|
+
Te,
|
|
4269
|
+
I,
|
|
4270
|
+
Pe,
|
|
4370
4271
|
n,
|
|
4371
4272
|
r
|
|
4372
|
-
]),
|
|
4373
|
-
|
|
4374
|
-
|
|
4273
|
+
]), at = e.useMemo(() => I || it ? null : k(n, r), [
|
|
4274
|
+
I,
|
|
4275
|
+
it,
|
|
4375
4276
|
n,
|
|
4376
4277
|
r
|
|
4377
|
-
]),
|
|
4378
|
-
let e = E(r,
|
|
4278
|
+
]), ot = e.useMemo(() => j(n, r ?? []), [n, r]), st = e.useMemo(() => {
|
|
4279
|
+
let e = E(r, ot);
|
|
4379
4280
|
if (!e?.length) return !0;
|
|
4380
|
-
if (
|
|
4281
|
+
if (I) return !1;
|
|
4381
4282
|
let t = [
|
|
4382
|
-
...
|
|
4383
|
-
|
|
4384
|
-
|
|
4283
|
+
...ot.yAxisList ?? [],
|
|
4284
|
+
ot.progressColumn,
|
|
4285
|
+
ot.singleValue
|
|
4385
4286
|
].filter((e) => !!e);
|
|
4386
4287
|
return t.length ? !e.some((e) => t.some((t) => e?.[t] !== null && e?.[t] !== void 0)) : !1;
|
|
4387
4288
|
}, [
|
|
4388
4289
|
r,
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
]),
|
|
4392
|
-
"--slot-h":
|
|
4393
|
-
"--slot-w":
|
|
4290
|
+
I,
|
|
4291
|
+
ot
|
|
4292
|
+
]), ct = {
|
|
4293
|
+
"--slot-h": yu(te),
|
|
4294
|
+
"--slot-w": yu(N)
|
|
4394
4295
|
};
|
|
4395
|
-
return /* @__PURE__ */
|
|
4296
|
+
return /* @__PURE__ */ J("div", {
|
|
4396
4297
|
"data-slot": "metric-card-chart",
|
|
4397
4298
|
"data-testid": "metric-card-chart-slot",
|
|
4398
|
-
"data-chart-engine":
|
|
4299
|
+
"data-chart-engine": Pe ? "v2" : void 0,
|
|
4399
4300
|
"data-chart-renderer": u,
|
|
4400
|
-
className:
|
|
4401
|
-
style:
|
|
4301
|
+
className: B("flex h-(--slot-h,auto) w-(--slot-w,100%) min-h-0 flex-1 flex-col gap-2", ye),
|
|
4302
|
+
style: ct,
|
|
4402
4303
|
children: [
|
|
4403
|
-
a != null || o != null ? /* @__PURE__ */
|
|
4304
|
+
a != null || o != null ? /* @__PURE__ */ J("div", {
|
|
4404
4305
|
"data-testid": "metric-card-drill-breadcrumb",
|
|
4405
4306
|
className: "flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1",
|
|
4406
4307
|
children: [a, o]
|
|
4407
4308
|
}) : null,
|
|
4408
|
-
i ? /* @__PURE__ */
|
|
4309
|
+
i ? /* @__PURE__ */ q(Ic, { className: "flex-1" }) : /* @__PURE__ */ J(Bt, { children: [/* @__PURE__ */ q("div", {
|
|
4409
4310
|
className: "min-h-0 w-full flex-1",
|
|
4410
|
-
children:
|
|
4311
|
+
children: it ? /* @__PURE__ */ q(Bc, {
|
|
4411
4312
|
className: "h-full",
|
|
4412
|
-
reason:
|
|
4313
|
+
reason: it,
|
|
4413
4314
|
section: "configure",
|
|
4414
4315
|
onOpenSection: b,
|
|
4415
4316
|
actionLabel: C
|
|
4416
|
-
}) :
|
|
4317
|
+
}) : at ? /* @__PURE__ */ q(Bc, {
|
|
4417
4318
|
className: "h-full",
|
|
4418
|
-
reason:
|
|
4319
|
+
reason: at,
|
|
4419
4320
|
section: "configure",
|
|
4420
4321
|
onOpenSection: b,
|
|
4421
4322
|
actionLabel: C
|
|
4422
|
-
}) : _e != null &&
|
|
4323
|
+
}) : _e != null && st ? _e : Ae && Pe ? /* @__PURE__ */ q(Bc, {
|
|
4423
4324
|
className: "h-full",
|
|
4424
|
-
reason:
|
|
4425
|
-
section:
|
|
4325
|
+
reason: Ae.reason,
|
|
4326
|
+
section: Ae.section,
|
|
4426
4327
|
onOpenSection: b,
|
|
4427
4328
|
actionLabel: C
|
|
4428
|
-
}) :
|
|
4329
|
+
}) : I ? /* @__PURE__ */ q(Ll, {
|
|
4429
4330
|
rows: r,
|
|
4430
|
-
columns:
|
|
4331
|
+
columns: Qe(xu(g, r, !!_)),
|
|
4431
4332
|
paging: _,
|
|
4432
4333
|
searchable: v,
|
|
4433
4334
|
isLoading: !!_ && !!O,
|
|
4434
|
-
renderCell:
|
|
4335
|
+
renderCell: $e,
|
|
4435
4336
|
onCellClick: y
|
|
4436
|
-
}) :
|
|
4437
|
-
fallback: /* @__PURE__ */
|
|
4438
|
-
children: /* @__PURE__ */
|
|
4439
|
-
type:
|
|
4440
|
-
adminTheme:
|
|
4337
|
+
}) : Pe ? /* @__PURE__ */ q(e.Suspense, {
|
|
4338
|
+
fallback: /* @__PURE__ */ q(Ic, { className: "h-full" }),
|
|
4339
|
+
children: /* @__PURE__ */ q(su, {
|
|
4340
|
+
type: Pe.type,
|
|
4341
|
+
adminTheme: Ge,
|
|
4441
4342
|
minHeight: 0,
|
|
4442
4343
|
family: c(n.chartType)?.family ?? void 0,
|
|
4443
|
-
data:
|
|
4444
|
-
appearance:
|
|
4445
|
-
applyDensity:
|
|
4446
|
-
mutedCategory:
|
|
4447
|
-
colorBy:
|
|
4448
|
-
valueFormatter:
|
|
4449
|
-
chartColors:
|
|
4344
|
+
data: Pe.data,
|
|
4345
|
+
appearance: qe,
|
|
4346
|
+
applyDensity: Te,
|
|
4347
|
+
mutedCategory: z,
|
|
4348
|
+
colorBy: Pe.colorBy,
|
|
4349
|
+
valueFormatter: Je,
|
|
4350
|
+
chartColors: Ce,
|
|
4450
4351
|
renderer: u,
|
|
4451
|
-
onEvents:
|
|
4352
|
+
onEvents: Ue,
|
|
4452
4353
|
className: "h-full w-full"
|
|
4453
4354
|
})
|
|
4454
|
-
}) :
|
|
4355
|
+
}) : st ? /* @__PURE__ */ q(Hc, {
|
|
4455
4356
|
className: "h-full",
|
|
4456
4357
|
hasActiveFilters: ve
|
|
4457
|
-
}) :
|
|
4358
|
+
}) : du(n?.chartType) ? f(n?.chartType) === f(p.radar) ? /* @__PURE__ */ q(Hc, {
|
|
4458
4359
|
className: "h-full",
|
|
4459
|
-
message:
|
|
4460
|
-
}) : /* @__PURE__ */
|
|
4461
|
-
fallback: /* @__PURE__ */
|
|
4462
|
-
children: /* @__PURE__ */
|
|
4463
|
-
ref:
|
|
4360
|
+
message: Ne ? "Radar needs one category and at least three measures. Update it in Configure." : "Radar requires the new chart engine."
|
|
4361
|
+
}) : /* @__PURE__ */ q(e.Suspense, {
|
|
4362
|
+
fallback: /* @__PURE__ */ q(Ic, { className: "h-full" }),
|
|
4363
|
+
children: /* @__PURE__ */ q("div", {
|
|
4364
|
+
ref: tt,
|
|
4464
4365
|
"data-testid": "metric-card-legacy-chart",
|
|
4465
4366
|
"data-slot": "metric-card-legacy-chart",
|
|
4466
4367
|
className: "dbn:h-full dbn:w-full h-full w-full",
|
|
4467
|
-
children: /* @__PURE__ */
|
|
4468
|
-
chartOptions:
|
|
4469
|
-
data:
|
|
4368
|
+
children: /* @__PURE__ */ q(cu, {
|
|
4369
|
+
chartOptions: rt,
|
|
4370
|
+
data: je,
|
|
4470
4371
|
chartAppearance: d,
|
|
4471
|
-
colors:
|
|
4372
|
+
colors: Ce,
|
|
4472
4373
|
metricCardColor: "transparent",
|
|
4473
|
-
chartFontSettings:
|
|
4474
|
-
events:
|
|
4475
|
-
pivotDrillState:
|
|
4374
|
+
chartFontSettings: nt,
|
|
4375
|
+
events: Ue,
|
|
4376
|
+
pivotDrillState: lu,
|
|
4476
4377
|
isMetricCard: !0,
|
|
4477
4378
|
isDashboard: !0,
|
|
4478
4379
|
className: "dbn:h-full dbn:w-full"
|
|
4479
4380
|
})
|
|
4480
4381
|
})
|
|
4481
|
-
}) : /* @__PURE__ */
|
|
4382
|
+
}) : /* @__PURE__ */ q(Hc, {
|
|
4482
4383
|
className: "h-full",
|
|
4483
4384
|
message: "This chart type is no longer available. Pick another type in Configure."
|
|
4484
4385
|
})
|
|
4485
|
-
}),
|
|
4386
|
+
}), Oe ? /* @__PURE__ */ J("div", {
|
|
4486
4387
|
"data-testid": "card-truncation-footnote",
|
|
4487
4388
|
"data-slot": "metric-card-truncation-footnote",
|
|
4488
4389
|
"data-notice-slot": "metric-card-notice",
|
|
4489
|
-
title:
|
|
4390
|
+
title: L?.summary && Oe === R ? `${Oe} - View all ${L.summary.totalCount.toLocaleString("en-US")}` : Oe,
|
|
4490
4391
|
className: "flex shrink-0 items-center overflow-hidden text-xs text-(--muted-foreground)",
|
|
4491
|
-
children: [/* @__PURE__ */
|
|
4392
|
+
children: [/* @__PURE__ */ q("span", {
|
|
4492
4393
|
className: "truncate",
|
|
4493
|
-
children:
|
|
4494
|
-
}),
|
|
4394
|
+
children: Oe
|
|
4395
|
+
}), L?.summary && Oe === R ? /* @__PURE__ */ J(Bt, { children: [/* @__PURE__ */ q("span", {
|
|
4495
4396
|
"aria-hidden": "true",
|
|
4496
4397
|
children: " - "
|
|
4497
|
-
}), /* @__PURE__ */
|
|
4398
|
+
}), /* @__PURE__ */ J(Se, {
|
|
4498
4399
|
type: "button",
|
|
4499
4400
|
variant: "link",
|
|
4500
4401
|
size: "sm",
|
|
4501
4402
|
className: "h-auto shrink-0 p-0 text-xs",
|
|
4502
4403
|
"data-testid": "card-truncation-view-all",
|
|
4503
|
-
onClick: () =>
|
|
4404
|
+
onClick: () => Ie("all"),
|
|
4504
4405
|
children: [
|
|
4505
4406
|
"View all",
|
|
4506
4407
|
" ",
|
|
4507
|
-
|
|
4408
|
+
L.summary.totalCount.toLocaleString("en-US")
|
|
4508
4409
|
]
|
|
4509
4410
|
})] }) : null]
|
|
4510
|
-
}) : /* @__PURE__ */
|
|
4511
|
-
/* @__PURE__ */
|
|
4512
|
-
open:
|
|
4411
|
+
}) : /* @__PURE__ */ q(ql, { sentences: ke })] }),
|
|
4412
|
+
/* @__PURE__ */ q(Yl, {
|
|
4413
|
+
open: Fe != null,
|
|
4513
4414
|
onOpenChange: (e) => {
|
|
4514
|
-
e ||
|
|
4415
|
+
e || Ie(null);
|
|
4515
4416
|
},
|
|
4516
|
-
columns:
|
|
4517
|
-
rows:
|
|
4518
|
-
title:
|
|
4519
|
-
description:
|
|
4417
|
+
columns: Re,
|
|
4418
|
+
rows: Le,
|
|
4419
|
+
title: Fe === "collapsed" ? "All Other members" : "All categories",
|
|
4420
|
+
description: Fe === "collapsed" && L?.summary ? `${L.summary.tailCount.toLocaleString("en-US")} categories are combined in ${L.summary.bucketLabel}.` : L?.summary ? `${L.summary.totalCount.toLocaleString("en-US")} categories in descending order.` : void 0
|
|
4520
4421
|
})
|
|
4521
4422
|
]
|
|
4522
4423
|
});
|
|
4523
4424
|
};
|
|
4524
|
-
function
|
|
4425
|
+
function xu(e, t, n = !1) {
|
|
4525
4426
|
let r = e?.length ? e : Object.keys(t?.[0] ?? {});
|
|
4526
4427
|
return n ? r.map((e) => {
|
|
4527
4428
|
let n = !1;
|
|
@@ -4542,4 +4443,4 @@ function ku(e, t, n = !1) {
|
|
|
4542
4443
|
label: e
|
|
4543
4444
|
}));
|
|
4544
4445
|
}
|
|
4545
|
-
export { ca as A, Wt as B, na as C, aa as D, ia as E, Qt as F, Ht as H, Xt as I, Jt as L, Yi as M, qi as N, sa as O, Ji as P, qt as R, ea as S, ra as T, Vt as U, Ut as V,
|
|
4446
|
+
export { ca as A, Wt as B, na as C, aa as D, ia as E, Qt as F, Ht as H, Xt as I, Jt as L, Yi as M, qi as N, sa as O, Ji as P, qt as R, ea as S, ra as T, Vt as U, Ut as V, wc as _, Ll as a, ga as b, Pc as c, Mc as d, kc as f, Ec as g, Tc as h, Yl as i, ta as j, la as k, Nc as l, Sc as m, vu as n, Hc as o, jc as p, du as r, Ic as s, bu as t, Ac as u, Cc as v, oa as w, ha as x, ma as y, Kt as z };
|