wg-design 0.7.3 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +1018 -321
- package/dist/src/components/Badge/Badge.d.ts +6 -2
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -2
- package/dist/src/components/IconButton/IconButton.d.ts +1 -1
- package/dist/src/components/Input/Input.d.ts +1 -1
- package/dist/src/components/NativeSelect/NativeSelect.d.ts +3 -3
- package/dist/src/components/Slider/slider.d.ts +4 -0
- package/dist/src/components/Switch/switch.d.ts +1 -2
- package/dist/src/components/Textarea/textarea.d.ts +3 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/theme.css +1 -0
- package/dist/wg-design.css +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -2049,10 +2049,10 @@ var mn = Ue("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-cen
|
|
|
2049
2049
|
variant: "primary",
|
|
2050
2050
|
size: "md"
|
|
2051
2051
|
}
|
|
2052
|
-
})
|
|
2053
|
-
function hn({ className: e, variant: t = "primary", size: n = "md", render: r, ...i }) {
|
|
2052
|
+
}), hn = _(function({ className: e, variant: t = "primary", size: n = "md", render: r, ...i }, a) {
|
|
2054
2053
|
return Re({
|
|
2055
2054
|
defaultTagName: "span",
|
|
2055
|
+
ref: a,
|
|
2056
2056
|
props: I({ className: W(mn({
|
|
2057
2057
|
variant: t,
|
|
2058
2058
|
size: n
|
|
@@ -2063,7 +2063,7 @@ function hn({ className: e, variant: t = "primary", size: n = "md", render: r, .
|
|
|
2063
2063
|
variant: t
|
|
2064
2064
|
}
|
|
2065
2065
|
});
|
|
2066
|
-
}
|
|
2066
|
+
});
|
|
2067
2067
|
//#endregion
|
|
2068
2068
|
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
2069
2069
|
function gn() {
|
|
@@ -2397,20 +2397,20 @@ var ir = Ue("inline-flex items-center justify-center gap-2 whitespace-nowrap rou
|
|
|
2397
2397
|
variant: "default",
|
|
2398
2398
|
size: "default"
|
|
2399
2399
|
}
|
|
2400
|
-
})
|
|
2401
|
-
|
|
2402
|
-
let a = nr(), o = t ?? a?.variant ?? "default", s = n ?? a?.size ?? "default";
|
|
2400
|
+
}), ar = _(function({ className: e, variant: t, size: n, disabled: r, ...i }, a) {
|
|
2401
|
+
let o = nr(), s = t ?? o?.variant ?? "default", c = n ?? o?.size ?? "default";
|
|
2403
2402
|
return /* @__PURE__ */ D($n, {
|
|
2403
|
+
ref: a,
|
|
2404
2404
|
"data-slot": "button",
|
|
2405
|
-
disabled: r ??
|
|
2405
|
+
disabled: r ?? o?.disabled,
|
|
2406
2406
|
className: W(ir({
|
|
2407
|
-
variant:
|
|
2408
|
-
size:
|
|
2407
|
+
variant: s,
|
|
2408
|
+
size: c,
|
|
2409
2409
|
className: e
|
|
2410
2410
|
})),
|
|
2411
2411
|
...i
|
|
2412
2412
|
});
|
|
2413
|
-
}
|
|
2413
|
+
});
|
|
2414
2414
|
//#endregion
|
|
2415
2415
|
//#region node_modules/@date-fns/tz/tzName/index.js
|
|
2416
2416
|
function or(e, t, n = "long") {
|
|
@@ -6226,8 +6226,9 @@ var Dc = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
|
6226
6226
|
process.env.NODE_ENV !== "production" && (Dc.displayName = "CheckboxIndicator");
|
|
6227
6227
|
//#endregion
|
|
6228
6228
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
6229
|
-
|
|
6229
|
+
var Oc = p.forwardRef(function({ className: e, ...t }, n) {
|
|
6230
6230
|
return /* @__PURE__ */ D(dc, {
|
|
6231
|
+
ref: n,
|
|
6231
6232
|
"data-slot": "checkbox",
|
|
6232
6233
|
className: W("peer border-input data-checked:bg-primary data-checked:text-primary-foreground data-checked:border-primary size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", "disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
6233
6234
|
...t,
|
|
@@ -6237,10 +6238,7 @@ function Oc({ className: e, ...t }) {
|
|
|
6237
6238
|
children: /* @__PURE__ */ D(a, { className: "size-3.5" })
|
|
6238
6239
|
})
|
|
6239
6240
|
});
|
|
6240
|
-
}
|
|
6241
|
-
//#endregion
|
|
6242
|
-
//#region node_modules/@base-ui/react/esm/dialog/root/DialogRootContext.js
|
|
6243
|
-
var kc = /* @__PURE__ */ p.createContext(void 0);
|
|
6241
|
+
}), kc = /* @__PURE__ */ p.createContext(void 0);
|
|
6244
6242
|
process.env.NODE_ENV !== "production" && (kc.displayName = "DialogRootContext");
|
|
6245
6243
|
function Ac(e) {
|
|
6246
6244
|
let t = p.useContext(kc);
|
|
@@ -18023,33 +18021,30 @@ function Tx({ name: e, size: t = 24, className: n, "aria-label": r }) {
|
|
|
18023
18021
|
}
|
|
18024
18022
|
//#endregion
|
|
18025
18023
|
//#region src/components/IconButton/IconButton.tsx
|
|
18026
|
-
|
|
18024
|
+
var Ex = _(function({ size: e = "icon", icon: t, children: n, ...r }, i) {
|
|
18027
18025
|
return /* @__PURE__ */ D(ar, {
|
|
18026
|
+
ref: i,
|
|
18028
18027
|
size: e,
|
|
18029
18028
|
...r,
|
|
18030
18029
|
children: t ?? n
|
|
18031
18030
|
});
|
|
18032
|
-
}
|
|
18033
|
-
//#endregion
|
|
18034
|
-
//#region src/components/Input/Input.tsx
|
|
18035
|
-
function Dx({ className: e, type: t, ...n }) {
|
|
18031
|
+
}), Dx = p.forwardRef(function({ className: e, type: t, ...n }, r) {
|
|
18036
18032
|
return /* @__PURE__ */ D("input", {
|
|
18033
|
+
ref: r,
|
|
18037
18034
|
type: t,
|
|
18038
18035
|
"data-slot": "input",
|
|
18039
|
-
className: W("border-input selection:bg-primary selection:text-primary-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 h-9 w-full min-w-0 rounded-md border bg-
|
|
18036
|
+
className: W("border-input selection:bg-primary selection:text-primary-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 h-9 w-full min-w-0 rounded-md border bg-(--input-bg) px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
18040
18037
|
...n
|
|
18041
18038
|
});
|
|
18042
|
-
}
|
|
18043
|
-
//#endregion
|
|
18044
|
-
//#region src/components/NativeSelect/NativeSelect.tsx
|
|
18045
|
-
function Ox({ className: e, size: t = "default", fullWidth: n = !1, ...r }) {
|
|
18039
|
+
}), Ox = p.forwardRef(function({ className: e, size: t = "default", fullWidth: n = !1, ...r }, i) {
|
|
18046
18040
|
return /* @__PURE__ */ O("div", {
|
|
18047
18041
|
className: W("group/native-select relative min-w-fit has-[select:disabled]:opacity-50", { "w-full": n }),
|
|
18048
18042
|
"data-slot": "native-select-wrapper",
|
|
18049
18043
|
children: [/* @__PURE__ */ D("select", {
|
|
18044
|
+
ref: i,
|
|
18050
18045
|
"data-slot": "native-select",
|
|
18051
18046
|
"data-size": t,
|
|
18052
|
-
className: W("border-input selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-
|
|
18047
|
+
className: W("border-input selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-(--input-bg) px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
18053
18048
|
...r
|
|
18054
18049
|
}), /* @__PURE__ */ D(o, {
|
|
18055
18050
|
className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none",
|
|
@@ -18057,7 +18052,7 @@ function Ox({ className: e, size: t = "default", fullWidth: n = !1, ...r }) {
|
|
|
18057
18052
|
"data-slot": "native-select-icon"
|
|
18058
18053
|
})]
|
|
18059
18054
|
});
|
|
18060
|
-
}
|
|
18055
|
+
});
|
|
18061
18056
|
function kx({ className: e, ...t }) {
|
|
18062
18057
|
return /* @__PURE__ */ D("option", {
|
|
18063
18058
|
"data-slot": "native-select-option",
|
|
@@ -19036,27 +19031,722 @@ function AS({ className: e, ...t }) {
|
|
|
19036
19031
|
});
|
|
19037
19032
|
}
|
|
19038
19033
|
//#endregion
|
|
19034
|
+
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
19035
|
+
function jS(e, t) {
|
|
19036
|
+
if (typeof e == "function") return e(t);
|
|
19037
|
+
e != null && (e.current = t);
|
|
19038
|
+
}
|
|
19039
|
+
function MS(...e) {
|
|
19040
|
+
return (t) => {
|
|
19041
|
+
let n = !1, r = e.map((e) => {
|
|
19042
|
+
let r = jS(e, t);
|
|
19043
|
+
return !n && typeof r == "function" && (n = !0), r;
|
|
19044
|
+
});
|
|
19045
|
+
if (n) return () => {
|
|
19046
|
+
for (let t = 0; t < r.length; t++) {
|
|
19047
|
+
let n = r[t];
|
|
19048
|
+
typeof n == "function" ? n() : jS(e[t], null);
|
|
19049
|
+
}
|
|
19050
|
+
};
|
|
19051
|
+
};
|
|
19052
|
+
}
|
|
19053
|
+
function NS(...e) {
|
|
19054
|
+
return p.useCallback(MS(...e), e);
|
|
19055
|
+
}
|
|
19056
|
+
//#endregion
|
|
19057
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
19058
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
19059
|
+
function PS(e) {
|
|
19060
|
+
let t = /* @__PURE__ */ FS(e), n = p.forwardRef((e, n) => {
|
|
19061
|
+
let { children: r, ...i } = e, a = p.Children.toArray(r), o = a.find(LS);
|
|
19062
|
+
if (o) {
|
|
19063
|
+
let e = o.props.children, r = a.map((t) => t === o ? p.Children.count(e) > 1 ? p.Children.only(null) : p.isValidElement(e) ? e.props.children : null : t);
|
|
19064
|
+
return /* @__PURE__ */ D(t, {
|
|
19065
|
+
...i,
|
|
19066
|
+
ref: n,
|
|
19067
|
+
children: p.isValidElement(e) ? p.cloneElement(e, void 0, r) : null
|
|
19068
|
+
});
|
|
19069
|
+
}
|
|
19070
|
+
return /* @__PURE__ */ D(t, {
|
|
19071
|
+
...i,
|
|
19072
|
+
ref: n,
|
|
19073
|
+
children: r
|
|
19074
|
+
});
|
|
19075
|
+
});
|
|
19076
|
+
return n.displayName = `${e}.Slot`, n;
|
|
19077
|
+
}
|
|
19078
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
19079
|
+
function FS(e) {
|
|
19080
|
+
let t = p.forwardRef((e, t) => {
|
|
19081
|
+
let { children: n, ...r } = e;
|
|
19082
|
+
if (p.isValidElement(n)) {
|
|
19083
|
+
let e = zS(n), i = RS(r, n.props);
|
|
19084
|
+
return n.type !== p.Fragment && (i.ref = t ? MS(t, e) : e), p.cloneElement(n, i);
|
|
19085
|
+
}
|
|
19086
|
+
return p.Children.count(n) > 1 ? p.Children.only(null) : null;
|
|
19087
|
+
});
|
|
19088
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
19089
|
+
}
|
|
19090
|
+
var IS = Symbol("radix.slottable");
|
|
19091
|
+
function LS(e) {
|
|
19092
|
+
return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === IS;
|
|
19093
|
+
}
|
|
19094
|
+
function RS(e, t) {
|
|
19095
|
+
let n = { ...t };
|
|
19096
|
+
for (let r in t) {
|
|
19097
|
+
let i = e[r], a = t[r];
|
|
19098
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
19099
|
+
let t = a(...e);
|
|
19100
|
+
return i(...e), t;
|
|
19101
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
19102
|
+
...i,
|
|
19103
|
+
...a
|
|
19104
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
19105
|
+
}
|
|
19106
|
+
return {
|
|
19107
|
+
...e,
|
|
19108
|
+
...n
|
|
19109
|
+
};
|
|
19110
|
+
}
|
|
19111
|
+
function zS(e) {
|
|
19112
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
19113
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
19114
|
+
}
|
|
19115
|
+
//#endregion
|
|
19116
|
+
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
19117
|
+
var BS = [
|
|
19118
|
+
"a",
|
|
19119
|
+
"button",
|
|
19120
|
+
"div",
|
|
19121
|
+
"form",
|
|
19122
|
+
"h2",
|
|
19123
|
+
"h3",
|
|
19124
|
+
"img",
|
|
19125
|
+
"input",
|
|
19126
|
+
"label",
|
|
19127
|
+
"li",
|
|
19128
|
+
"nav",
|
|
19129
|
+
"ol",
|
|
19130
|
+
"p",
|
|
19131
|
+
"select",
|
|
19132
|
+
"span",
|
|
19133
|
+
"svg",
|
|
19134
|
+
"ul"
|
|
19135
|
+
].reduce((e, t) => {
|
|
19136
|
+
let n = /* @__PURE__ */ PS(`Primitive.${t}`), r = p.forwardRef((e, r) => {
|
|
19137
|
+
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
19138
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ D(o, {
|
|
19139
|
+
...a,
|
|
19140
|
+
ref: r
|
|
19141
|
+
});
|
|
19142
|
+
});
|
|
19143
|
+
return r.displayName = `Primitive.${t}`, {
|
|
19144
|
+
...e,
|
|
19145
|
+
[t]: r
|
|
19146
|
+
};
|
|
19147
|
+
}, {});
|
|
19148
|
+
//#endregion
|
|
19149
|
+
//#region node_modules/@radix-ui/react-context/dist/index.mjs
|
|
19150
|
+
function VS(e, t = []) {
|
|
19151
|
+
let n = [];
|
|
19152
|
+
function r(t, r) {
|
|
19153
|
+
let i = p.createContext(r), a = n.length;
|
|
19154
|
+
n = [...n, r];
|
|
19155
|
+
let o = (t) => {
|
|
19156
|
+
let { scope: n, children: r, ...o } = t, s = n?.[e]?.[a] || i, c = p.useMemo(() => o, Object.values(o));
|
|
19157
|
+
return /* @__PURE__ */ D(s.Provider, {
|
|
19158
|
+
value: c,
|
|
19159
|
+
children: r
|
|
19160
|
+
});
|
|
19161
|
+
};
|
|
19162
|
+
o.displayName = t + "Provider";
|
|
19163
|
+
function s(n, o) {
|
|
19164
|
+
let s = o?.[e]?.[a] || i, c = p.useContext(s);
|
|
19165
|
+
if (c) return c;
|
|
19166
|
+
if (r !== void 0) return r;
|
|
19167
|
+
throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
19168
|
+
}
|
|
19169
|
+
return [o, s];
|
|
19170
|
+
}
|
|
19171
|
+
let i = () => {
|
|
19172
|
+
let t = n.map((e) => p.createContext(e));
|
|
19173
|
+
return function(n) {
|
|
19174
|
+
let r = n?.[e] || t;
|
|
19175
|
+
return p.useMemo(() => ({ [`__scope${e}`]: {
|
|
19176
|
+
...n,
|
|
19177
|
+
[e]: r
|
|
19178
|
+
} }), [n, r]);
|
|
19179
|
+
};
|
|
19180
|
+
};
|
|
19181
|
+
return i.scopeName = e, [r, HS(i, ...t)];
|
|
19182
|
+
}
|
|
19183
|
+
function HS(...e) {
|
|
19184
|
+
let t = e[0];
|
|
19185
|
+
if (e.length === 1) return t;
|
|
19186
|
+
let n = () => {
|
|
19187
|
+
let n = e.map((e) => ({
|
|
19188
|
+
useScope: e(),
|
|
19189
|
+
scopeName: e.scopeName
|
|
19190
|
+
}));
|
|
19191
|
+
return function(e) {
|
|
19192
|
+
let r = n.reduce((t, { useScope: n, scopeName: r }) => {
|
|
19193
|
+
let i = n(e)[`__scope${r}`];
|
|
19194
|
+
return {
|
|
19195
|
+
...t,
|
|
19196
|
+
...i
|
|
19197
|
+
};
|
|
19198
|
+
}, {});
|
|
19199
|
+
return p.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
19200
|
+
};
|
|
19201
|
+
};
|
|
19202
|
+
return n.scopeName = t.scopeName, n;
|
|
19203
|
+
}
|
|
19204
|
+
//#endregion
|
|
19205
|
+
//#region node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
19206
|
+
function US(e) {
|
|
19207
|
+
let t = e + "CollectionProvider", [n, r] = VS(t), [i, a] = n(t, {
|
|
19208
|
+
collectionRef: { current: null },
|
|
19209
|
+
itemMap: /* @__PURE__ */ new Map()
|
|
19210
|
+
}), o = (e) => {
|
|
19211
|
+
let { scope: t, children: n } = e, r = m.useRef(null), a = m.useRef(/* @__PURE__ */ new Map()).current;
|
|
19212
|
+
return /* @__PURE__ */ D(i, {
|
|
19213
|
+
scope: t,
|
|
19214
|
+
itemMap: a,
|
|
19215
|
+
collectionRef: r,
|
|
19216
|
+
children: n
|
|
19217
|
+
});
|
|
19218
|
+
};
|
|
19219
|
+
o.displayName = t;
|
|
19220
|
+
let s = e + "CollectionSlot", c = /* @__PURE__ */ PS(s), l = m.forwardRef((e, t) => {
|
|
19221
|
+
let { scope: n, children: r } = e;
|
|
19222
|
+
return /* @__PURE__ */ D(c, {
|
|
19223
|
+
ref: NS(t, a(s, n).collectionRef),
|
|
19224
|
+
children: r
|
|
19225
|
+
});
|
|
19226
|
+
});
|
|
19227
|
+
l.displayName = s;
|
|
19228
|
+
let u = e + "CollectionItemSlot", d = "data-radix-collection-item", f = /* @__PURE__ */ PS(u), p = m.forwardRef((e, t) => {
|
|
19229
|
+
let { scope: n, children: r, ...i } = e, o = m.useRef(null), s = NS(t, o), c = a(u, n);
|
|
19230
|
+
return m.useEffect(() => (c.itemMap.set(o, {
|
|
19231
|
+
ref: o,
|
|
19232
|
+
...i
|
|
19233
|
+
}), () => void c.itemMap.delete(o))), /* @__PURE__ */ D(f, {
|
|
19234
|
+
[d]: "",
|
|
19235
|
+
ref: s,
|
|
19236
|
+
children: r
|
|
19237
|
+
});
|
|
19238
|
+
});
|
|
19239
|
+
p.displayName = u;
|
|
19240
|
+
function h(t) {
|
|
19241
|
+
let n = a(e + "CollectionConsumer", t);
|
|
19242
|
+
return m.useCallback(() => {
|
|
19243
|
+
let e = n.collectionRef.current;
|
|
19244
|
+
if (!e) return [];
|
|
19245
|
+
let t = Array.from(e.querySelectorAll(`[${d}]`));
|
|
19246
|
+
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
|
|
19247
|
+
}, [n.collectionRef, n.itemMap]);
|
|
19248
|
+
}
|
|
19249
|
+
return [
|
|
19250
|
+
{
|
|
19251
|
+
Provider: o,
|
|
19252
|
+
Slot: l,
|
|
19253
|
+
ItemSlot: p
|
|
19254
|
+
},
|
|
19255
|
+
h,
|
|
19256
|
+
r
|
|
19257
|
+
];
|
|
19258
|
+
}
|
|
19259
|
+
typeof window < "u" && window.document && window.document.createElement;
|
|
19260
|
+
function WS(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
19261
|
+
return function(r) {
|
|
19262
|
+
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
|
|
19263
|
+
};
|
|
19264
|
+
}
|
|
19265
|
+
//#endregion
|
|
19266
|
+
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
19267
|
+
var GS = globalThis?.document ? p.useLayoutEffect : () => {}, KS = p.useInsertionEffect || GS;
|
|
19268
|
+
function qS({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
|
|
19269
|
+
let [i, a, o] = JS({
|
|
19270
|
+
defaultProp: t,
|
|
19271
|
+
onChange: n
|
|
19272
|
+
}), s = e !== void 0, c = s ? e : i;
|
|
19273
|
+
{
|
|
19274
|
+
let t = p.useRef(e !== void 0);
|
|
19275
|
+
p.useEffect(() => {
|
|
19276
|
+
let e = t.current;
|
|
19277
|
+
e !== s && console.warn(`${r} is changing from ${e ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), t.current = s;
|
|
19278
|
+
}, [s, r]);
|
|
19279
|
+
}
|
|
19280
|
+
return [c, p.useCallback((t) => {
|
|
19281
|
+
if (s) {
|
|
19282
|
+
let n = YS(t) ? t(e) : t;
|
|
19283
|
+
n !== e && o.current?.(n);
|
|
19284
|
+
} else a(t);
|
|
19285
|
+
}, [
|
|
19286
|
+
s,
|
|
19287
|
+
e,
|
|
19288
|
+
a,
|
|
19289
|
+
o
|
|
19290
|
+
])];
|
|
19291
|
+
}
|
|
19292
|
+
function JS({ defaultProp: e, onChange: t }) {
|
|
19293
|
+
let [n, r] = p.useState(e), i = p.useRef(n), a = p.useRef(t);
|
|
19294
|
+
return KS(() => {
|
|
19295
|
+
a.current = t;
|
|
19296
|
+
}, [t]), p.useEffect(() => {
|
|
19297
|
+
i.current !== n && (a.current?.(n), i.current = n);
|
|
19298
|
+
}, [n, i]), [
|
|
19299
|
+
n,
|
|
19300
|
+
r,
|
|
19301
|
+
a
|
|
19302
|
+
];
|
|
19303
|
+
}
|
|
19304
|
+
function YS(e) {
|
|
19305
|
+
return typeof e == "function";
|
|
19306
|
+
}
|
|
19307
|
+
//#endregion
|
|
19308
|
+
//#region node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
19309
|
+
var XS = p.createContext(void 0);
|
|
19310
|
+
function ZS(e) {
|
|
19311
|
+
let t = p.useContext(XS);
|
|
19312
|
+
return e || t || "ltr";
|
|
19313
|
+
}
|
|
19314
|
+
//#endregion
|
|
19315
|
+
//#region node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
19316
|
+
function QS(e) {
|
|
19317
|
+
let t = p.useRef({
|
|
19318
|
+
value: e,
|
|
19319
|
+
previous: e
|
|
19320
|
+
});
|
|
19321
|
+
return p.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
19322
|
+
}
|
|
19323
|
+
//#endregion
|
|
19324
|
+
//#region node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
19325
|
+
function $S(e) {
|
|
19326
|
+
let [t, n] = p.useState(void 0);
|
|
19327
|
+
return GS(() => {
|
|
19328
|
+
if (e) {
|
|
19329
|
+
n({
|
|
19330
|
+
width: e.offsetWidth,
|
|
19331
|
+
height: e.offsetHeight
|
|
19332
|
+
});
|
|
19333
|
+
let t = new ResizeObserver((t) => {
|
|
19334
|
+
if (!Array.isArray(t) || !t.length) return;
|
|
19335
|
+
let r = t[0], i, a;
|
|
19336
|
+
if ("borderBoxSize" in r) {
|
|
19337
|
+
let e = r.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
19338
|
+
i = t.inlineSize, a = t.blockSize;
|
|
19339
|
+
} else i = e.offsetWidth, a = e.offsetHeight;
|
|
19340
|
+
n({
|
|
19341
|
+
width: i,
|
|
19342
|
+
height: a
|
|
19343
|
+
});
|
|
19344
|
+
});
|
|
19345
|
+
return t.observe(e, { box: "border-box" }), () => t.unobserve(e);
|
|
19346
|
+
} else n(void 0);
|
|
19347
|
+
}, [e]), t;
|
|
19348
|
+
}
|
|
19349
|
+
//#endregion
|
|
19350
|
+
//#region node_modules/@radix-ui/number/dist/index.mjs
|
|
19351
|
+
function eC(e, [t, n]) {
|
|
19352
|
+
return Math.min(n, Math.max(t, e));
|
|
19353
|
+
}
|
|
19354
|
+
//#endregion
|
|
19355
|
+
//#region node_modules/@radix-ui/react-slider/dist/index.mjs
|
|
19356
|
+
var tC = ["PageUp", "PageDown"], nC = [
|
|
19357
|
+
"ArrowUp",
|
|
19358
|
+
"ArrowDown",
|
|
19359
|
+
"ArrowLeft",
|
|
19360
|
+
"ArrowRight"
|
|
19361
|
+
], rC = {
|
|
19362
|
+
"from-left": [
|
|
19363
|
+
"Home",
|
|
19364
|
+
"PageDown",
|
|
19365
|
+
"ArrowDown",
|
|
19366
|
+
"ArrowLeft"
|
|
19367
|
+
],
|
|
19368
|
+
"from-right": [
|
|
19369
|
+
"Home",
|
|
19370
|
+
"PageDown",
|
|
19371
|
+
"ArrowDown",
|
|
19372
|
+
"ArrowRight"
|
|
19373
|
+
],
|
|
19374
|
+
"from-bottom": [
|
|
19375
|
+
"Home",
|
|
19376
|
+
"PageDown",
|
|
19377
|
+
"ArrowDown",
|
|
19378
|
+
"ArrowLeft"
|
|
19379
|
+
],
|
|
19380
|
+
"from-top": [
|
|
19381
|
+
"Home",
|
|
19382
|
+
"PageDown",
|
|
19383
|
+
"ArrowUp",
|
|
19384
|
+
"ArrowLeft"
|
|
19385
|
+
]
|
|
19386
|
+
}, iC = "Slider", [aC, oC, sC] = US(iC), [cC, lC] = VS(iC, [sC]), [uC, dC] = cC(iC), fC = p.forwardRef((e, t) => {
|
|
19387
|
+
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: s = !1, minStepsBetweenThumbs: c = 0, defaultValue: l = [r], value: u, onValueChange: d = () => {}, onValueCommit: f = () => {}, inverted: m = !1, form: h, ...g } = e, _ = p.useRef(/* @__PURE__ */ new Set()), v = p.useRef(0), y = o === "horizontal" ? hC : gC, [b = [], x] = qS({
|
|
19388
|
+
prop: u,
|
|
19389
|
+
defaultProp: l,
|
|
19390
|
+
onChange: (e) => {
|
|
19391
|
+
[..._.current][v.current]?.focus(), d(e);
|
|
19392
|
+
}
|
|
19393
|
+
}), S = p.useRef(b);
|
|
19394
|
+
function C(e) {
|
|
19395
|
+
E(e, AC(b, e));
|
|
19396
|
+
}
|
|
19397
|
+
function w(e) {
|
|
19398
|
+
E(e, v.current);
|
|
19399
|
+
}
|
|
19400
|
+
function T() {
|
|
19401
|
+
let e = S.current[v.current];
|
|
19402
|
+
b[v.current] !== e && f(b);
|
|
19403
|
+
}
|
|
19404
|
+
function E(e, t, { commit: n } = { commit: !1 }) {
|
|
19405
|
+
let o = FC(a), s = eC(IC(Math.round((e - r) / a) * a + r, o), [r, i]);
|
|
19406
|
+
x((e = []) => {
|
|
19407
|
+
let r = DC(e, s, t);
|
|
19408
|
+
if (NC(r, c * a)) {
|
|
19409
|
+
v.current = r.indexOf(s);
|
|
19410
|
+
let t = String(r) !== String(e);
|
|
19411
|
+
return t && n && f(r), t ? r : e;
|
|
19412
|
+
} else return e;
|
|
19413
|
+
});
|
|
19414
|
+
}
|
|
19415
|
+
return /* @__PURE__ */ D(uC, {
|
|
19416
|
+
scope: e.__scopeSlider,
|
|
19417
|
+
name: n,
|
|
19418
|
+
disabled: s,
|
|
19419
|
+
min: r,
|
|
19420
|
+
max: i,
|
|
19421
|
+
valueIndexToChangeRef: v,
|
|
19422
|
+
thumbs: _.current,
|
|
19423
|
+
values: b,
|
|
19424
|
+
orientation: o,
|
|
19425
|
+
form: h,
|
|
19426
|
+
children: /* @__PURE__ */ D(aC.Provider, {
|
|
19427
|
+
scope: e.__scopeSlider,
|
|
19428
|
+
children: /* @__PURE__ */ D(aC.Slot, {
|
|
19429
|
+
scope: e.__scopeSlider,
|
|
19430
|
+
children: /* @__PURE__ */ D(y, {
|
|
19431
|
+
"aria-disabled": s,
|
|
19432
|
+
"data-disabled": s ? "" : void 0,
|
|
19433
|
+
...g,
|
|
19434
|
+
ref: t,
|
|
19435
|
+
onPointerDown: WS(g.onPointerDown, () => {
|
|
19436
|
+
s || (S.current = b);
|
|
19437
|
+
}),
|
|
19438
|
+
min: r,
|
|
19439
|
+
max: i,
|
|
19440
|
+
inverted: m,
|
|
19441
|
+
onSlideStart: s ? void 0 : C,
|
|
19442
|
+
onSlideMove: s ? void 0 : w,
|
|
19443
|
+
onSlideEnd: s ? void 0 : T,
|
|
19444
|
+
onHomeKeyDown: () => !s && E(r, 0, { commit: !0 }),
|
|
19445
|
+
onEndKeyDown: () => !s && E(i, b.length - 1, { commit: !0 }),
|
|
19446
|
+
onStepKeyDown: ({ event: e, direction: t }) => {
|
|
19447
|
+
if (!s) {
|
|
19448
|
+
let n = tC.includes(e.key) || e.shiftKey && nC.includes(e.key) ? 10 : 1, r = v.current, i = b[r];
|
|
19449
|
+
E(i + a * n * t, r, { commit: !0 });
|
|
19450
|
+
}
|
|
19451
|
+
}
|
|
19452
|
+
})
|
|
19453
|
+
})
|
|
19454
|
+
})
|
|
19455
|
+
});
|
|
19456
|
+
});
|
|
19457
|
+
fC.displayName = iC;
|
|
19458
|
+
var [pC, mC] = cC(iC, {
|
|
19459
|
+
startEdge: "left",
|
|
19460
|
+
endEdge: "right",
|
|
19461
|
+
size: "width",
|
|
19462
|
+
direction: 1
|
|
19463
|
+
}), hC = p.forwardRef((e, t) => {
|
|
19464
|
+
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = p.useState(null), m = NS(t, (e) => f(e)), h = p.useRef(void 0), g = ZS(i), _ = g === "ltr", v = _ && !a || !_ && a;
|
|
19465
|
+
function y(e) {
|
|
19466
|
+
let t = h.current || d.getBoundingClientRect(), i = PC([0, t.width], v ? [n, r] : [r, n]);
|
|
19467
|
+
return h.current = t, i(e - t.left);
|
|
19468
|
+
}
|
|
19469
|
+
return /* @__PURE__ */ D(pC, {
|
|
19470
|
+
scope: e.__scopeSlider,
|
|
19471
|
+
startEdge: v ? "left" : "right",
|
|
19472
|
+
endEdge: v ? "right" : "left",
|
|
19473
|
+
direction: v ? 1 : -1,
|
|
19474
|
+
size: "width",
|
|
19475
|
+
children: /* @__PURE__ */ D(_C, {
|
|
19476
|
+
dir: g,
|
|
19477
|
+
"data-orientation": "horizontal",
|
|
19478
|
+
...u,
|
|
19479
|
+
ref: m,
|
|
19480
|
+
style: {
|
|
19481
|
+
...u.style,
|
|
19482
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
19483
|
+
},
|
|
19484
|
+
onSlideStart: (e) => {
|
|
19485
|
+
let t = y(e.clientX);
|
|
19486
|
+
o?.(t);
|
|
19487
|
+
},
|
|
19488
|
+
onSlideMove: (e) => {
|
|
19489
|
+
let t = y(e.clientX);
|
|
19490
|
+
s?.(t);
|
|
19491
|
+
},
|
|
19492
|
+
onSlideEnd: () => {
|
|
19493
|
+
h.current = void 0, c?.();
|
|
19494
|
+
},
|
|
19495
|
+
onStepKeyDown: (e) => {
|
|
19496
|
+
let t = rC[v ? "from-left" : "from-right"].includes(e.key);
|
|
19497
|
+
l?.({
|
|
19498
|
+
event: e,
|
|
19499
|
+
direction: t ? -1 : 1
|
|
19500
|
+
});
|
|
19501
|
+
}
|
|
19502
|
+
})
|
|
19503
|
+
});
|
|
19504
|
+
}), gC = p.forwardRef((e, t) => {
|
|
19505
|
+
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: c, ...l } = e, u = p.useRef(null), d = NS(t, u), f = p.useRef(void 0), m = !i;
|
|
19506
|
+
function h(e) {
|
|
19507
|
+
let t = f.current || u.current.getBoundingClientRect(), i = PC([0, t.height], m ? [r, n] : [n, r]);
|
|
19508
|
+
return f.current = t, i(e - t.top);
|
|
19509
|
+
}
|
|
19510
|
+
return /* @__PURE__ */ D(pC, {
|
|
19511
|
+
scope: e.__scopeSlider,
|
|
19512
|
+
startEdge: m ? "bottom" : "top",
|
|
19513
|
+
endEdge: m ? "top" : "bottom",
|
|
19514
|
+
size: "height",
|
|
19515
|
+
direction: m ? 1 : -1,
|
|
19516
|
+
children: /* @__PURE__ */ D(_C, {
|
|
19517
|
+
"data-orientation": "vertical",
|
|
19518
|
+
...l,
|
|
19519
|
+
ref: d,
|
|
19520
|
+
style: {
|
|
19521
|
+
...l.style,
|
|
19522
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
19523
|
+
},
|
|
19524
|
+
onSlideStart: (e) => {
|
|
19525
|
+
let t = h(e.clientY);
|
|
19526
|
+
a?.(t);
|
|
19527
|
+
},
|
|
19528
|
+
onSlideMove: (e) => {
|
|
19529
|
+
let t = h(e.clientY);
|
|
19530
|
+
o?.(t);
|
|
19531
|
+
},
|
|
19532
|
+
onSlideEnd: () => {
|
|
19533
|
+
f.current = void 0, s?.();
|
|
19534
|
+
},
|
|
19535
|
+
onStepKeyDown: (e) => {
|
|
19536
|
+
let t = rC[m ? "from-bottom" : "from-top"].includes(e.key);
|
|
19537
|
+
c?.({
|
|
19538
|
+
event: e,
|
|
19539
|
+
direction: t ? -1 : 1
|
|
19540
|
+
});
|
|
19541
|
+
}
|
|
19542
|
+
})
|
|
19543
|
+
});
|
|
19544
|
+
}), _C = p.forwardRef((e, t) => {
|
|
19545
|
+
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: s, onStepKeyDown: c, ...l } = e, u = dC(iC, n);
|
|
19546
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19547
|
+
...l,
|
|
19548
|
+
ref: t,
|
|
19549
|
+
onKeyDown: WS(e.onKeyDown, (e) => {
|
|
19550
|
+
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (s(e), e.preventDefault()) : tC.concat(nC).includes(e.key) && (c(e), e.preventDefault());
|
|
19551
|
+
}),
|
|
19552
|
+
onPointerDown: WS(e.onPointerDown, (e) => {
|
|
19553
|
+
let t = e.target;
|
|
19554
|
+
t.setPointerCapture(e.pointerId), e.preventDefault(), u.thumbs.has(t) ? t.focus() : r(e);
|
|
19555
|
+
}),
|
|
19556
|
+
onPointerMove: WS(e.onPointerMove, (e) => {
|
|
19557
|
+
e.target.hasPointerCapture(e.pointerId) && i(e);
|
|
19558
|
+
}),
|
|
19559
|
+
onPointerUp: WS(e.onPointerUp, (e) => {
|
|
19560
|
+
let t = e.target;
|
|
19561
|
+
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), a(e));
|
|
19562
|
+
})
|
|
19563
|
+
});
|
|
19564
|
+
}), vC = "SliderTrack", yC = p.forwardRef((e, t) => {
|
|
19565
|
+
let { __scopeSlider: n, ...r } = e, i = dC(vC, n);
|
|
19566
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19567
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
19568
|
+
"data-orientation": i.orientation,
|
|
19569
|
+
...r,
|
|
19570
|
+
ref: t
|
|
19571
|
+
});
|
|
19572
|
+
});
|
|
19573
|
+
yC.displayName = vC;
|
|
19574
|
+
var bC = "SliderRange", xC = p.forwardRef((e, t) => {
|
|
19575
|
+
let { __scopeSlider: n, ...r } = e, i = dC(bC, n), a = mC(bC, n), o = NS(t, p.useRef(null)), s = i.values.length, c = i.values.map((e) => OC(e, i.min, i.max)), l = s > 1 ? Math.min(...c) : 0, u = 100 - Math.max(...c);
|
|
19576
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19577
|
+
"data-orientation": i.orientation,
|
|
19578
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
19579
|
+
...r,
|
|
19580
|
+
ref: o,
|
|
19581
|
+
style: {
|
|
19582
|
+
...e.style,
|
|
19583
|
+
[a.startEdge]: l + "%",
|
|
19584
|
+
[a.endEdge]: u + "%"
|
|
19585
|
+
}
|
|
19586
|
+
});
|
|
19587
|
+
});
|
|
19588
|
+
xC.displayName = bC;
|
|
19589
|
+
var SC = "SliderThumb", CC = p.forwardRef((e, t) => {
|
|
19590
|
+
let n = oC(e.__scopeSlider), [r, i] = p.useState(null), a = NS(t, (e) => i(e)), o = p.useMemo(() => r ? n().findIndex((e) => e.ref.current === r) : -1, [n, r]);
|
|
19591
|
+
return /* @__PURE__ */ D(wC, {
|
|
19592
|
+
...e,
|
|
19593
|
+
ref: a,
|
|
19594
|
+
index: o
|
|
19595
|
+
});
|
|
19596
|
+
}), wC = p.forwardRef((e, t) => {
|
|
19597
|
+
let { __scopeSlider: n, index: r, name: i, ...a } = e, o = dC(SC, n), s = mC(SC, n), [c, l] = p.useState(null), u = NS(t, (e) => l(e)), d = c ? o.form || !!c.closest("form") : !0, f = $S(c), m = o.values[r], h = m === void 0 ? 0 : OC(m, o.min, o.max), g = kC(r, o.values.length), _ = f?.[s.size], v = _ ? jC(_, h, s.direction) : 0;
|
|
19598
|
+
return p.useEffect(() => {
|
|
19599
|
+
if (c) return o.thumbs.add(c), () => {
|
|
19600
|
+
o.thumbs.delete(c);
|
|
19601
|
+
};
|
|
19602
|
+
}, [c, o.thumbs]), /* @__PURE__ */ O("span", {
|
|
19603
|
+
style: {
|
|
19604
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
19605
|
+
position: "absolute",
|
|
19606
|
+
[s.startEdge]: `calc(${h}% + ${v}px)`
|
|
19607
|
+
},
|
|
19608
|
+
children: [/* @__PURE__ */ D(aC.ItemSlot, {
|
|
19609
|
+
scope: e.__scopeSlider,
|
|
19610
|
+
children: /* @__PURE__ */ D(BS.span, {
|
|
19611
|
+
role: "slider",
|
|
19612
|
+
"aria-label": e["aria-label"] || g,
|
|
19613
|
+
"aria-valuemin": o.min,
|
|
19614
|
+
"aria-valuenow": m,
|
|
19615
|
+
"aria-valuemax": o.max,
|
|
19616
|
+
"aria-orientation": o.orientation,
|
|
19617
|
+
"data-orientation": o.orientation,
|
|
19618
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
19619
|
+
tabIndex: o.disabled ? void 0 : 0,
|
|
19620
|
+
...a,
|
|
19621
|
+
ref: u,
|
|
19622
|
+
style: m === void 0 ? { display: "none" } : e.style,
|
|
19623
|
+
onFocus: WS(e.onFocus, () => {
|
|
19624
|
+
o.valueIndexToChangeRef.current = r;
|
|
19625
|
+
})
|
|
19626
|
+
})
|
|
19627
|
+
}), d && /* @__PURE__ */ D(EC, {
|
|
19628
|
+
name: i ?? (o.name ? o.name + (o.values.length > 1 ? "[]" : "") : void 0),
|
|
19629
|
+
form: o.form,
|
|
19630
|
+
value: m
|
|
19631
|
+
}, r)]
|
|
19632
|
+
});
|
|
19633
|
+
});
|
|
19634
|
+
CC.displayName = SC;
|
|
19635
|
+
var TC = "RadioBubbleInput", EC = p.forwardRef(({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
19636
|
+
let i = p.useRef(null), a = NS(i, r), o = QS(t);
|
|
19637
|
+
return p.useEffect(() => {
|
|
19638
|
+
let e = i.current;
|
|
19639
|
+
if (!e) return;
|
|
19640
|
+
let n = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value").set;
|
|
19641
|
+
if (o !== t && r) {
|
|
19642
|
+
let n = new Event("input", { bubbles: !0 });
|
|
19643
|
+
r.call(e, t), e.dispatchEvent(n);
|
|
19644
|
+
}
|
|
19645
|
+
}, [o, t]), /* @__PURE__ */ D(BS.input, {
|
|
19646
|
+
style: { display: "none" },
|
|
19647
|
+
...n,
|
|
19648
|
+
ref: a,
|
|
19649
|
+
defaultValue: t
|
|
19650
|
+
});
|
|
19651
|
+
});
|
|
19652
|
+
EC.displayName = TC;
|
|
19653
|
+
function DC(e = [], t, n) {
|
|
19654
|
+
let r = [...e];
|
|
19655
|
+
return r[n] = t, r.sort((e, t) => e - t);
|
|
19656
|
+
}
|
|
19657
|
+
function OC(e, t, n) {
|
|
19658
|
+
return eC(100 / (n - t) * (e - t), [0, 100]);
|
|
19659
|
+
}
|
|
19660
|
+
function kC(e, t) {
|
|
19661
|
+
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
19662
|
+
if (t === 2) return ["Minimum", "Maximum"][e];
|
|
19663
|
+
}
|
|
19664
|
+
function AC(e, t) {
|
|
19665
|
+
if (e.length === 1) return 0;
|
|
19666
|
+
let n = e.map((e) => Math.abs(e - t)), r = Math.min(...n);
|
|
19667
|
+
return n.indexOf(r);
|
|
19668
|
+
}
|
|
19669
|
+
function jC(e, t, n) {
|
|
19670
|
+
let r = e / 2;
|
|
19671
|
+
return (r - PC([0, 50], [0, r])(t) * n) * n;
|
|
19672
|
+
}
|
|
19673
|
+
function MC(e) {
|
|
19674
|
+
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
19675
|
+
}
|
|
19676
|
+
function NC(e, t) {
|
|
19677
|
+
if (t > 0) {
|
|
19678
|
+
let n = MC(e);
|
|
19679
|
+
return Math.min(...n) >= t;
|
|
19680
|
+
}
|
|
19681
|
+
return !0;
|
|
19682
|
+
}
|
|
19683
|
+
function PC(e, t) {
|
|
19684
|
+
return (n) => {
|
|
19685
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
19686
|
+
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
19687
|
+
return t[0] + r * (n - e[0]);
|
|
19688
|
+
};
|
|
19689
|
+
}
|
|
19690
|
+
function FC(e) {
|
|
19691
|
+
return (String(e).split(".")[1] || "").length;
|
|
19692
|
+
}
|
|
19693
|
+
function IC(e, t) {
|
|
19694
|
+
let n = 10 ** t;
|
|
19695
|
+
return Math.round(e * n) / n;
|
|
19696
|
+
}
|
|
19697
|
+
var LC = fC, RC = yC, zC = xC, BC = CC;
|
|
19698
|
+
//#endregion
|
|
19699
|
+
//#region src/components/Slider/slider.tsx
|
|
19700
|
+
function VC({ className: e, defaultValue: t, value: n, min: r = 0, max: i = 100, ...a }) {
|
|
19701
|
+
let o = p.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r, i], [
|
|
19702
|
+
n,
|
|
19703
|
+
t,
|
|
19704
|
+
r,
|
|
19705
|
+
i
|
|
19706
|
+
]);
|
|
19707
|
+
return /* @__PURE__ */ O(LC, {
|
|
19708
|
+
"data-slot": "slider",
|
|
19709
|
+
defaultValue: t,
|
|
19710
|
+
value: n,
|
|
19711
|
+
min: r,
|
|
19712
|
+
max: i,
|
|
19713
|
+
className: W("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", e),
|
|
19714
|
+
...a,
|
|
19715
|
+
children: [/* @__PURE__ */ D(RC, {
|
|
19716
|
+
"data-slot": "slider-track",
|
|
19717
|
+
className: W("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
19718
|
+
children: /* @__PURE__ */ D(zC, {
|
|
19719
|
+
"data-slot": "slider-range",
|
|
19720
|
+
className: W("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
19721
|
+
})
|
|
19722
|
+
}), Array.from({ length: o.length }, (e, t) => /* @__PURE__ */ D(BC, {
|
|
19723
|
+
"data-slot": "slider-thumb",
|
|
19724
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
19725
|
+
}, t))]
|
|
19726
|
+
});
|
|
19727
|
+
}
|
|
19728
|
+
//#endregion
|
|
19039
19729
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRootContext.js
|
|
19040
|
-
var
|
|
19041
|
-
process.env.NODE_ENV !== "production" && (
|
|
19042
|
-
function
|
|
19043
|
-
let e = p.useContext(
|
|
19730
|
+
var HC = /* @__PURE__ */ p.createContext(void 0);
|
|
19731
|
+
process.env.NODE_ENV !== "production" && (HC.displayName = "SwitchRootContext");
|
|
19732
|
+
function UC() {
|
|
19733
|
+
let e = p.useContext(HC);
|
|
19044
19734
|
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? ue(63) : "Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");
|
|
19045
19735
|
return e;
|
|
19046
19736
|
}
|
|
19047
19737
|
//#endregion
|
|
19048
19738
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRootDataAttributes.js
|
|
19049
|
-
var
|
|
19739
|
+
var WC = /* @__PURE__ */ function(e) {
|
|
19050
19740
|
return e.checked = "data-checked", e.unchecked = "data-unchecked", e.disabled = "data-disabled", e.readonly = "data-readonly", e.required = "data-required", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
19051
|
-
}({}),
|
|
19741
|
+
}({}), GC = {
|
|
19052
19742
|
...js,
|
|
19053
19743
|
checked(e) {
|
|
19054
|
-
return e ? { [
|
|
19744
|
+
return e ? { [WC.checked]: "" } : { [WC.unchecked]: "" };
|
|
19055
19745
|
}
|
|
19056
19746
|
};
|
|
19057
19747
|
//#endregion
|
|
19058
19748
|
//#region node_modules/@base-ui/react/esm/internals/labelable-provider/useLabelableId.js
|
|
19059
|
-
function
|
|
19749
|
+
function KC(e = {}) {
|
|
19060
19750
|
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = Ks(), o = Ls(t), s = n ? i : void 0, c = fe(() => Symbol("labelable-control")), l = p.useRef(!1), u = p.useRef(t != null), d = K(() => {
|
|
19061
19751
|
!l.current || a === we || (l.current = !1, a(c.current, void 0));
|
|
19062
19752
|
});
|
|
@@ -19090,8 +19780,8 @@ function FS(e = {}) {
|
|
|
19090
19780
|
}
|
|
19091
19781
|
//#endregion
|
|
19092
19782
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRoot.js
|
|
19093
|
-
var
|
|
19094
|
-
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: u = !1, onCheckedChange: d, readOnly: f = !1, required: m = !1, disabled: h = !1, render: g, uncheckedValue: _, value: v, style: y, ...b } = e, { clearErrors: x } = Ws(), { state: S, setTouched: C, setDirty: w, validityData: T, setFilled: E, setFocused: k, shouldValidateOnChange: A, validationMode: j, disabled: M, name: N, validation: P } = zs(), { labelId: F } = Ks(), ee = M || h, te = N ?? l, ne = K(d), re = p.useRef(null), L = pe(re, c, P.inputRef), ie = p.useRef(null), R = Ls(), ae =
|
|
19783
|
+
var qC = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
19784
|
+
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: u = !1, onCheckedChange: d, readOnly: f = !1, required: m = !1, disabled: h = !1, render: g, uncheckedValue: _, value: v, style: y, ...b } = e, { clearErrors: x } = Ws(), { state: S, setTouched: C, setDirty: w, validityData: T, setFilled: E, setFocused: k, shouldValidateOnChange: A, validationMode: j, disabled: M, name: N, validation: P } = zs(), { labelId: F } = Ks(), ee = M || h, te = N ?? l, ne = K(d), re = p.useRef(null), L = pe(re, c, P.inputRef), ie = p.useRef(null), R = Ls(), ae = KC({
|
|
19095
19785
|
id: s,
|
|
19096
19786
|
implicit: !1,
|
|
19097
19787
|
controlRef: ie
|
|
@@ -19197,9 +19887,9 @@ var IS = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
|
19197
19887
|
b,
|
|
19198
19888
|
se
|
|
19199
19889
|
],
|
|
19200
|
-
stateAttributesMapping:
|
|
19890
|
+
stateAttributesMapping: GC
|
|
19201
19891
|
});
|
|
19202
|
-
return /* @__PURE__ */ O(
|
|
19892
|
+
return /* @__PURE__ */ O(HC.Provider, {
|
|
19203
19893
|
value: fe,
|
|
19204
19894
|
children: [
|
|
19205
19895
|
me,
|
|
@@ -19216,38 +19906,36 @@ var IS = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
|
19216
19906
|
]
|
|
19217
19907
|
});
|
|
19218
19908
|
});
|
|
19219
|
-
process.env.NODE_ENV !== "production" && (
|
|
19909
|
+
process.env.NODE_ENV !== "production" && (qC.displayName = "SwitchRoot");
|
|
19220
19910
|
//#endregion
|
|
19221
19911
|
//#region node_modules/@base-ui/react/esm/switch/thumb/SwitchThumb.js
|
|
19222
|
-
var
|
|
19223
|
-
let { render: n, className: r, style: i, ...a } = e, { state: o } = zs(), s =
|
|
19912
|
+
var JC = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
19913
|
+
let { render: n, className: r, style: i, ...a } = e, { state: o } = zs(), s = UC();
|
|
19224
19914
|
return ke("span", e, {
|
|
19225
19915
|
state: {
|
|
19226
19916
|
...o,
|
|
19227
19917
|
...s
|
|
19228
19918
|
},
|
|
19229
19919
|
ref: t,
|
|
19230
|
-
stateAttributesMapping:
|
|
19920
|
+
stateAttributesMapping: GC,
|
|
19231
19921
|
props: a
|
|
19232
19922
|
});
|
|
19233
19923
|
});
|
|
19234
|
-
process.env.NODE_ENV !== "production" && (
|
|
19924
|
+
process.env.NODE_ENV !== "production" && (JC.displayName = "SwitchThumb");
|
|
19235
19925
|
//#endregion
|
|
19236
19926
|
//#region src/components/Switch/switch.tsx
|
|
19237
|
-
|
|
19238
|
-
return /* @__PURE__ */ D(
|
|
19927
|
+
var YC = p.forwardRef(function({ className: e, ...t }, n) {
|
|
19928
|
+
return /* @__PURE__ */ D(qC, {
|
|
19929
|
+
ref: n,
|
|
19239
19930
|
"data-slot": "switch",
|
|
19240
19931
|
className: W("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "disabled:cursor-not-allowed disabled:opacity-50", "data-unchecked:bg-input dark:data-unchecked:bg-input/80", "data-checked:bg-primary", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
19241
19932
|
...t,
|
|
19242
|
-
children: /* @__PURE__ */ D(
|
|
19933
|
+
children: /* @__PURE__ */ D(JC, {
|
|
19243
19934
|
"data-slot": "switch-thumb",
|
|
19244
19935
|
className: W("bg-background pointer-events-none block size-4 rounded-full shadow-sm ring-0 transition-transform", "data-unchecked:translate-x-0", "data-checked:translate-x-4")
|
|
19245
19936
|
})
|
|
19246
19937
|
});
|
|
19247
|
-
}
|
|
19248
|
-
//#endregion
|
|
19249
|
-
//#region src/components/Table/CheckFilter.tsx
|
|
19250
|
-
var zS = ({ label: e, value: t, onChange: n, className: r }) => /* @__PURE__ */ O(ar, {
|
|
19938
|
+
}), XC = ({ label: e, value: t, onChange: n, className: r }) => /* @__PURE__ */ O(ar, {
|
|
19251
19939
|
render: /* @__PURE__ */ D("span", {}),
|
|
19252
19940
|
variant: "outline",
|
|
19253
19941
|
className: W("cursor-pointer", r),
|
|
@@ -19262,24 +19950,24 @@ var zS = ({ label: e, value: t, onChange: n, className: r }) => /* @__PURE__ */
|
|
|
19262
19950
|
});
|
|
19263
19951
|
//#endregion
|
|
19264
19952
|
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
19265
|
-
function
|
|
19953
|
+
function ZC(e, t) {
|
|
19266
19954
|
return typeof e == "function" ? e(t) : e;
|
|
19267
19955
|
}
|
|
19268
|
-
function
|
|
19956
|
+
function QC(e, t) {
|
|
19269
19957
|
return (n) => {
|
|
19270
19958
|
t.setState((t) => ({
|
|
19271
19959
|
...t,
|
|
19272
|
-
[e]:
|
|
19960
|
+
[e]: ZC(n, t[e])
|
|
19273
19961
|
}));
|
|
19274
19962
|
};
|
|
19275
19963
|
}
|
|
19276
|
-
function
|
|
19964
|
+
function $C(e) {
|
|
19277
19965
|
return e instanceof Function;
|
|
19278
19966
|
}
|
|
19279
|
-
function
|
|
19967
|
+
function ew(e) {
|
|
19280
19968
|
return Array.isArray(e) && e.every((e) => typeof e == "number");
|
|
19281
19969
|
}
|
|
19282
|
-
function
|
|
19970
|
+
function tw(e, t) {
|
|
19283
19971
|
let n = [], r = (e) => {
|
|
19284
19972
|
e.forEach((e) => {
|
|
19285
19973
|
n.push(e);
|
|
@@ -19318,7 +20006,7 @@ function $(e, t, n, r) {
|
|
|
19318
20006
|
onChange: r
|
|
19319
20007
|
};
|
|
19320
20008
|
}
|
|
19321
|
-
function
|
|
20009
|
+
function nw(e, t, n, r) {
|
|
19322
20010
|
let i = {
|
|
19323
20011
|
id: `${t.id}_${n.id}`,
|
|
19324
20012
|
row: t,
|
|
@@ -19343,7 +20031,7 @@ function GS(e, t, n, r) {
|
|
|
19343
20031
|
r.createCell == null || r.createCell(i, n, t, e);
|
|
19344
20032
|
}, {}), i;
|
|
19345
20033
|
}
|
|
19346
|
-
function
|
|
20034
|
+
function rw(e, t, n, r) {
|
|
19347
20035
|
let i = {
|
|
19348
20036
|
...e._getDefaultColumnDef(),
|
|
19349
20037
|
...t
|
|
@@ -19369,8 +20057,8 @@ function KS(e, t, n, r) {
|
|
|
19369
20057
|
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
|
|
19370
20058
|
return c;
|
|
19371
20059
|
}
|
|
19372
|
-
var
|
|
19373
|
-
function
|
|
20060
|
+
var iw = "debugHeaders";
|
|
20061
|
+
function aw(e, t, n) {
|
|
19374
20062
|
let r = {
|
|
19375
20063
|
id: n.id ?? t.id,
|
|
19376
20064
|
column: t,
|
|
@@ -19398,7 +20086,7 @@ function JS(e, t, n) {
|
|
|
19398
20086
|
t.createHeader == null || t.createHeader(r, e);
|
|
19399
20087
|
}), r;
|
|
19400
20088
|
}
|
|
19401
|
-
var
|
|
20089
|
+
var ow = { createTable: (e) => {
|
|
19402
20090
|
e.getHeaderGroups = Q(() => [
|
|
19403
20091
|
e.getAllColumns(),
|
|
19404
20092
|
e.getVisibleLeafColumns(),
|
|
@@ -19406,34 +20094,34 @@ var YS = { createTable: (e) => {
|
|
|
19406
20094
|
e.getState().columnPinning.right
|
|
19407
20095
|
], (t, n, r, i) => {
|
|
19408
20096
|
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
|
|
19409
|
-
return
|
|
20097
|
+
return sw(t, [
|
|
19410
20098
|
...a,
|
|
19411
20099
|
...s,
|
|
19412
20100
|
...o
|
|
19413
20101
|
], e);
|
|
19414
|
-
}, $(e.options,
|
|
20102
|
+
}, $(e.options, iw, "getHeaderGroups")), e.getCenterHeaderGroups = Q(() => [
|
|
19415
20103
|
e.getAllColumns(),
|
|
19416
20104
|
e.getVisibleLeafColumns(),
|
|
19417
20105
|
e.getState().columnPinning.left,
|
|
19418
20106
|
e.getState().columnPinning.right
|
|
19419
|
-
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))),
|
|
20107
|
+
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), sw(t, n, e, "center")), $(e.options, iw, "getCenterHeaderGroups")), e.getLeftHeaderGroups = Q(() => [
|
|
19420
20108
|
e.getAllColumns(),
|
|
19421
20109
|
e.getVisibleLeafColumns(),
|
|
19422
20110
|
e.getState().columnPinning.left
|
|
19423
|
-
], (t, n, r) =>
|
|
20111
|
+
], (t, n, r) => sw(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), $(e.options, iw, "getLeftHeaderGroups")), e.getRightHeaderGroups = Q(() => [
|
|
19424
20112
|
e.getAllColumns(),
|
|
19425
20113
|
e.getVisibleLeafColumns(),
|
|
19426
20114
|
e.getState().columnPinning.right
|
|
19427
|
-
], (t, n, r) =>
|
|
20115
|
+
], (t, n, r) => sw(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), $(e.options, iw, "getRightHeaderGroups")), e.getFooterGroups = Q(() => [e.getHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getFooterGroups")), e.getLeftFooterGroups = Q(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getLeftFooterGroups")), e.getCenterFooterGroups = Q(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getCenterFooterGroups")), e.getRightFooterGroups = Q(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getRightFooterGroups")), e.getFlatHeaders = Q(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getFlatHeaders")), e.getLeftFlatHeaders = Q(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getLeftFlatHeaders")), e.getCenterFlatHeaders = Q(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getCenterFlatHeaders")), e.getRightFlatHeaders = Q(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getRightFlatHeaders")), e.getCenterLeafHeaders = Q(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
|
|
19428
20116
|
var t;
|
|
19429
20117
|
return !((t = e.subHeaders) != null && t.length);
|
|
19430
|
-
}), $(e.options,
|
|
20118
|
+
}), $(e.options, iw, "getCenterLeafHeaders")), e.getLeftLeafHeaders = Q(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
|
|
19431
20119
|
var t;
|
|
19432
20120
|
return !((t = e.subHeaders) != null && t.length);
|
|
19433
|
-
}), $(e.options,
|
|
20121
|
+
}), $(e.options, iw, "getLeftLeafHeaders")), e.getRightLeafHeaders = Q(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
|
|
19434
20122
|
var t;
|
|
19435
20123
|
return !((t = e.subHeaders) != null && t.length);
|
|
19436
|
-
}), $(e.options,
|
|
20124
|
+
}), $(e.options, iw, "getRightLeafHeaders")), e.getLeafHeaders = Q(() => [
|
|
19437
20125
|
e.getLeftHeaderGroups(),
|
|
19438
20126
|
e.getCenterHeaderGroups(),
|
|
19439
20127
|
e.getRightHeaderGroups()
|
|
@@ -19441,9 +20129,9 @@ var YS = { createTable: (e) => {
|
|
|
19441
20129
|
...e[0]?.headers ?? [],
|
|
19442
20130
|
...t[0]?.headers ?? [],
|
|
19443
20131
|
...n[0]?.headers ?? []
|
|
19444
|
-
].map((e) => e.getLeafHeaders()).flat(), $(e.options,
|
|
20132
|
+
].map((e) => e.getLeafHeaders()).flat(), $(e.options, iw, "getLeafHeaders"));
|
|
19445
20133
|
} };
|
|
19446
|
-
function
|
|
20134
|
+
function sw(e, t, n, r) {
|
|
19447
20135
|
let i = 0, a = function(e, t) {
|
|
19448
20136
|
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
|
|
19449
20137
|
var n;
|
|
@@ -19461,7 +20149,7 @@ function XS(e, t, n, r) {
|
|
|
19461
20149
|
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
|
|
19462
20150
|
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
|
|
19463
20151
|
else {
|
|
19464
|
-
let i =
|
|
20152
|
+
let i = aw(n, c, {
|
|
19465
20153
|
id: [
|
|
19466
20154
|
r,
|
|
19467
20155
|
t,
|
|
@@ -19478,7 +20166,7 @@ function XS(e, t, n, r) {
|
|
|
19478
20166
|
i.headers.push(e), e.headerGroup = i;
|
|
19479
20167
|
}), o.push(i), t > 0 && s(a, t - 1);
|
|
19480
20168
|
};
|
|
19481
|
-
s(t.map((e, t) =>
|
|
20169
|
+
s(t.map((e, t) => aw(n, e, {
|
|
19482
20170
|
depth: i,
|
|
19483
20171
|
index: t
|
|
19484
20172
|
})), i - 1), o.reverse();
|
|
@@ -19496,7 +20184,7 @@ function XS(e, t, n, r) {
|
|
|
19496
20184
|
});
|
|
19497
20185
|
return c(o[0]?.headers ?? []), o;
|
|
19498
20186
|
}
|
|
19499
|
-
var
|
|
20187
|
+
var cw = (e, t, n, r, i, a, o) => {
|
|
19500
20188
|
let s = {
|
|
19501
20189
|
id: t,
|
|
19502
20190
|
index: r,
|
|
@@ -19517,7 +20205,7 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19517
20205
|
},
|
|
19518
20206
|
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
|
|
19519
20207
|
subRows: a ?? [],
|
|
19520
|
-
getLeafRows: () =>
|
|
20208
|
+
getLeafRows: () => tw(s.subRows, (e) => e.subRows),
|
|
19521
20209
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
19522
20210
|
getParentRows: () => {
|
|
19523
20211
|
let e = [], t = s;
|
|
@@ -19528,7 +20216,7 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19528
20216
|
}
|
|
19529
20217
|
return e.reverse();
|
|
19530
20218
|
},
|
|
19531
|
-
getAllCells: Q(() => [e.getAllLeafColumns()], (t) => t.map((t) =>
|
|
20219
|
+
getAllCells: Q(() => [e.getAllLeafColumns()], (t) => t.map((t) => nw(e, s, t, t.id)), $(e.options, "debugRows", "getAllCells")),
|
|
19532
20220
|
_getAllCellsByColumnId: Q(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), $(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
19533
20221
|
};
|
|
19534
20222
|
for (let t = 0; t < e._features.length; t++) {
|
|
@@ -19536,87 +20224,87 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19536
20224
|
n == null || n.createRow == null || n.createRow(s, e);
|
|
19537
20225
|
}
|
|
19538
20226
|
return s;
|
|
19539
|
-
},
|
|
20227
|
+
}, lw = { createColumn: (e, t) => {
|
|
19540
20228
|
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
|
|
19541
20229
|
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
|
|
19542
20230
|
};
|
|
19543
|
-
} },
|
|
20231
|
+
} }, uw = (e, t, n) => {
|
|
19544
20232
|
var r, i;
|
|
19545
20233
|
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
|
|
19546
20234
|
return !!(!((i = e.getValue(t)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(a));
|
|
19547
20235
|
};
|
|
19548
|
-
|
|
19549
|
-
var
|
|
20236
|
+
uw.autoRemove = (e) => bw(e);
|
|
20237
|
+
var dw = (e, t, n) => {
|
|
19550
20238
|
var r;
|
|
19551
20239
|
return !!(!((r = e.getValue(t)) == null || (r = r.toString()) == null) && r.includes(n));
|
|
19552
20240
|
};
|
|
19553
|
-
|
|
19554
|
-
var
|
|
20241
|
+
dw.autoRemove = (e) => bw(e);
|
|
20242
|
+
var fw = (e, t, n) => {
|
|
19555
20243
|
var r;
|
|
19556
20244
|
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
|
|
19557
20245
|
};
|
|
19558
|
-
|
|
19559
|
-
var
|
|
19560
|
-
|
|
19561
|
-
var
|
|
20246
|
+
fw.autoRemove = (e) => bw(e);
|
|
20247
|
+
var pw = (e, t, n) => e.getValue(t)?.includes(n);
|
|
20248
|
+
pw.autoRemove = (e) => bw(e);
|
|
20249
|
+
var mw = (e, t, n) => !n.some((n) => {
|
|
19562
20250
|
var r;
|
|
19563
20251
|
return !((r = e.getValue(t)) != null && r.includes(n));
|
|
19564
20252
|
});
|
|
19565
|
-
|
|
19566
|
-
var
|
|
19567
|
-
|
|
19568
|
-
var
|
|
19569
|
-
|
|
19570
|
-
var
|
|
19571
|
-
|
|
19572
|
-
var
|
|
20253
|
+
mw.autoRemove = (e) => bw(e) || !(e != null && e.length);
|
|
20254
|
+
var hw = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
|
|
20255
|
+
hw.autoRemove = (e) => bw(e) || !(e != null && e.length);
|
|
20256
|
+
var gw = (e, t, n) => e.getValue(t) === n;
|
|
20257
|
+
gw.autoRemove = (e) => bw(e);
|
|
20258
|
+
var _w = (e, t, n) => e.getValue(t) == n;
|
|
20259
|
+
_w.autoRemove = (e) => bw(e);
|
|
20260
|
+
var vw = (e, t, n) => {
|
|
19573
20261
|
let [r, i] = n, a = e.getValue(t);
|
|
19574
20262
|
return a >= r && a <= i;
|
|
19575
20263
|
};
|
|
19576
|
-
|
|
20264
|
+
vw.resolveFilterValue = (e) => {
|
|
19577
20265
|
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
|
|
19578
20266
|
if (a > o) {
|
|
19579
20267
|
let e = a;
|
|
19580
20268
|
a = o, o = e;
|
|
19581
20269
|
}
|
|
19582
20270
|
return [a, o];
|
|
19583
|
-
},
|
|
19584
|
-
var
|
|
19585
|
-
includesString:
|
|
19586
|
-
includesStringSensitive:
|
|
19587
|
-
equalsString:
|
|
19588
|
-
arrIncludes:
|
|
19589
|
-
arrIncludesAll:
|
|
19590
|
-
arrIncludesSome:
|
|
19591
|
-
equals:
|
|
19592
|
-
weakEquals:
|
|
19593
|
-
inNumberRange:
|
|
20271
|
+
}, vw.autoRemove = (e) => bw(e) || bw(e[0]) && bw(e[1]);
|
|
20272
|
+
var yw = {
|
|
20273
|
+
includesString: uw,
|
|
20274
|
+
includesStringSensitive: dw,
|
|
20275
|
+
equalsString: fw,
|
|
20276
|
+
arrIncludes: pw,
|
|
20277
|
+
arrIncludesAll: mw,
|
|
20278
|
+
arrIncludesSome: hw,
|
|
20279
|
+
equals: gw,
|
|
20280
|
+
weakEquals: _w,
|
|
20281
|
+
inNumberRange: vw
|
|
19594
20282
|
};
|
|
19595
|
-
function
|
|
20283
|
+
function bw(e) {
|
|
19596
20284
|
return e == null || e === "";
|
|
19597
20285
|
}
|
|
19598
|
-
var
|
|
20286
|
+
var xw = {
|
|
19599
20287
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
19600
20288
|
getInitialState: (e) => ({
|
|
19601
20289
|
columnFilters: [],
|
|
19602
20290
|
...e
|
|
19603
20291
|
}),
|
|
19604
20292
|
getDefaultOptions: (e) => ({
|
|
19605
|
-
onColumnFiltersChange:
|
|
20293
|
+
onColumnFiltersChange: QC("columnFilters", e),
|
|
19606
20294
|
filterFromLeafRows: !1,
|
|
19607
20295
|
maxLeafRowFilterDepth: 100
|
|
19608
20296
|
}),
|
|
19609
20297
|
createColumn: (e, t) => {
|
|
19610
20298
|
e.getAutoFilterFn = () => {
|
|
19611
20299
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
19612
|
-
return typeof n == "string" ?
|
|
19613
|
-
}, e.getFilterFn = () =>
|
|
20300
|
+
return typeof n == "string" ? yw.includesString : typeof n == "number" ? yw.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? yw.equals : Array.isArray(n) ? yw.arrIncludes : yw.weakEquals;
|
|
20301
|
+
}, e.getFilterFn = () => $C(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? yw[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
19614
20302
|
var n;
|
|
19615
20303
|
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
|
|
19616
20304
|
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
|
|
19617
20305
|
t.setColumnFilters((t) => {
|
|
19618
|
-
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a =
|
|
19619
|
-
if (
|
|
20306
|
+
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = ZC(n, i ? i.value : void 0);
|
|
20307
|
+
if (Sw(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
|
|
19620
20308
|
let o = {
|
|
19621
20309
|
id: e.id,
|
|
19622
20310
|
value: a
|
|
@@ -19631,19 +20319,19 @@ var uC = {
|
|
|
19631
20319
|
createTable: (e) => {
|
|
19632
20320
|
e.setColumnFilters = (t) => {
|
|
19633
20321
|
let n = e.getAllLeafColumns();
|
|
19634
|
-
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) =>
|
|
20322
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => ZC(t, e)?.filter((e) => {
|
|
19635
20323
|
let t = n.find((t) => t.id === e.id);
|
|
19636
|
-
return !(t &&
|
|
20324
|
+
return !(t && Sw(t.getFilterFn(), e.value, t));
|
|
19637
20325
|
}));
|
|
19638
20326
|
}, e.resetColumnFilters = (t) => {
|
|
19639
20327
|
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
|
|
19640
20328
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
19641
20329
|
}
|
|
19642
20330
|
};
|
|
19643
|
-
function
|
|
20331
|
+
function Sw(e, t, n) {
|
|
19644
20332
|
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
|
|
19645
20333
|
}
|
|
19646
|
-
var
|
|
20334
|
+
var Cw = {
|
|
19647
20335
|
sum: (e, t, n) => n.reduce((t, n) => {
|
|
19648
20336
|
let r = n.getValue(e);
|
|
19649
20337
|
return t + (typeof r == "number" ? r : 0);
|
|
@@ -19679,7 +20367,7 @@ var fC = {
|
|
|
19679
20367
|
median: (e, t) => {
|
|
19680
20368
|
if (!t.length) return;
|
|
19681
20369
|
let n = t.map((t) => t.getValue(e));
|
|
19682
|
-
if (!
|
|
20370
|
+
if (!ew(n)) return;
|
|
19683
20371
|
if (n.length === 1) return n[0];
|
|
19684
20372
|
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
|
|
19685
20373
|
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
|
|
@@ -19687,7 +20375,7 @@ var fC = {
|
|
|
19687
20375
|
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
|
|
19688
20376
|
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
|
|
19689
20377
|
count: (e, t) => t.length
|
|
19690
|
-
},
|
|
20378
|
+
}, ww = {
|
|
19691
20379
|
getDefaultColumnDef: () => ({
|
|
19692
20380
|
aggregatedCell: (e) => {
|
|
19693
20381
|
var t;
|
|
@@ -19700,7 +20388,7 @@ var fC = {
|
|
|
19700
20388
|
...e
|
|
19701
20389
|
}),
|
|
19702
20390
|
getDefaultOptions: (e) => ({
|
|
19703
|
-
onGroupingChange:
|
|
20391
|
+
onGroupingChange: QC("grouping", e),
|
|
19704
20392
|
groupedColumnMode: "reorder"
|
|
19705
20393
|
}),
|
|
19706
20394
|
createColumn: (e, t) => {
|
|
@@ -19713,11 +20401,11 @@ var fC = {
|
|
|
19713
20401
|
};
|
|
19714
20402
|
}, e.getAutoAggregationFn = () => {
|
|
19715
20403
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
19716
|
-
if (typeof n == "number") return
|
|
19717
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
20404
|
+
if (typeof n == "number") return Cw.sum;
|
|
20405
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return Cw.extent;
|
|
19718
20406
|
}, e.getAggregationFn = () => {
|
|
19719
20407
|
if (!e) throw Error();
|
|
19720
|
-
return
|
|
20408
|
+
return $C(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? Cw[e.columnDef.aggregationFn];
|
|
19721
20409
|
};
|
|
19722
20410
|
},
|
|
19723
20411
|
createTable: (e) => {
|
|
@@ -19739,20 +20427,20 @@ var fC = {
|
|
|
19739
20427
|
};
|
|
19740
20428
|
}
|
|
19741
20429
|
};
|
|
19742
|
-
function
|
|
20430
|
+
function Tw(e, t, n) {
|
|
19743
20431
|
if (!(t != null && t.length) || !n) return e;
|
|
19744
20432
|
let r = e.filter((e) => !t.includes(e.id));
|
|
19745
20433
|
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
|
|
19746
20434
|
}
|
|
19747
|
-
var
|
|
20435
|
+
var Ew = {
|
|
19748
20436
|
getInitialState: (e) => ({
|
|
19749
20437
|
columnOrder: [],
|
|
19750
20438
|
...e
|
|
19751
20439
|
}),
|
|
19752
|
-
getDefaultOptions: (e) => ({ onColumnOrderChange:
|
|
20440
|
+
getDefaultOptions: (e) => ({ onColumnOrderChange: QC("columnOrder", e) }),
|
|
19753
20441
|
createColumn: (e, t) => {
|
|
19754
|
-
e.getIndex = Q((e) => [
|
|
19755
|
-
let r =
|
|
20442
|
+
e.getIndex = Q((e) => [Lw(t, e)], (t) => t.findIndex((t) => t.id === e.id), $(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => Lw(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
|
|
20443
|
+
let r = Lw(t, n);
|
|
19756
20444
|
return r[r.length - 1]?.id === e.id;
|
|
19757
20445
|
};
|
|
19758
20446
|
},
|
|
@@ -19774,18 +20462,18 @@ var hC = {
|
|
|
19774
20462
|
}
|
|
19775
20463
|
i = [...i, ...n];
|
|
19776
20464
|
}
|
|
19777
|
-
return
|
|
20465
|
+
return Tw(i, t, n);
|
|
19778
20466
|
}, $(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
19779
20467
|
}
|
|
19780
|
-
},
|
|
20468
|
+
}, Dw = () => ({
|
|
19781
20469
|
left: [],
|
|
19782
20470
|
right: []
|
|
19783
|
-
}),
|
|
20471
|
+
}), Ow = {
|
|
19784
20472
|
getInitialState: (e) => ({
|
|
19785
|
-
columnPinning:
|
|
20473
|
+
columnPinning: Dw(),
|
|
19786
20474
|
...e
|
|
19787
20475
|
}),
|
|
19788
|
-
getDefaultOptions: (e) => ({ onColumnPinningChange:
|
|
20476
|
+
getDefaultOptions: (e) => ({ onColumnPinningChange: QC("columnPinning", e) }),
|
|
19789
20477
|
createColumn: (e, t) => {
|
|
19790
20478
|
e.pin = (n) => {
|
|
19791
20479
|
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
|
|
@@ -19825,7 +20513,7 @@ var hC = {
|
|
|
19825
20513
|
})), $(t.options, "debugRows", "getRightVisibleCells"));
|
|
19826
20514
|
},
|
|
19827
20515
|
createTable: (e) => {
|
|
19828
|
-
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ?
|
|
20516
|
+
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? Dw() : e.initialState?.columnPinning ?? Dw()), e.getIsSomeColumnsPinned = (t) => {
|
|
19829
20517
|
let n = e.getState().columnPinning;
|
|
19830
20518
|
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
|
|
19831
20519
|
}, e.getLeftLeafColumns = Q(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), $(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = Q(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), $(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = Q(() => [
|
|
@@ -19838,44 +20526,44 @@ var hC = {
|
|
|
19838
20526
|
}, $(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
19839
20527
|
}
|
|
19840
20528
|
};
|
|
19841
|
-
function
|
|
20529
|
+
function kw(e) {
|
|
19842
20530
|
return e || (typeof document < "u" ? document : null);
|
|
19843
20531
|
}
|
|
19844
|
-
var
|
|
20532
|
+
var Aw = {
|
|
19845
20533
|
size: 150,
|
|
19846
20534
|
minSize: 20,
|
|
19847
20535
|
maxSize: 2 ** 53 - 1
|
|
19848
|
-
},
|
|
20536
|
+
}, jw = () => ({
|
|
19849
20537
|
startOffset: null,
|
|
19850
20538
|
startSize: null,
|
|
19851
20539
|
deltaOffset: null,
|
|
19852
20540
|
deltaPercentage: null,
|
|
19853
20541
|
isResizingColumn: !1,
|
|
19854
20542
|
columnSizingStart: []
|
|
19855
|
-
}),
|
|
19856
|
-
getDefaultColumnDef: () =>
|
|
20543
|
+
}), Mw = {
|
|
20544
|
+
getDefaultColumnDef: () => Aw,
|
|
19857
20545
|
getInitialState: (e) => ({
|
|
19858
20546
|
columnSizing: {},
|
|
19859
|
-
columnSizingInfo:
|
|
20547
|
+
columnSizingInfo: jw(),
|
|
19860
20548
|
...e
|
|
19861
20549
|
}),
|
|
19862
20550
|
getDefaultOptions: (e) => ({
|
|
19863
20551
|
columnResizeMode: "onEnd",
|
|
19864
20552
|
columnResizeDirection: "ltr",
|
|
19865
|
-
onColumnSizingChange:
|
|
19866
|
-
onColumnSizingInfoChange:
|
|
20553
|
+
onColumnSizingChange: QC("columnSizing", e),
|
|
20554
|
+
onColumnSizingInfoChange: QC("columnSizingInfo", e)
|
|
19867
20555
|
}),
|
|
19868
20556
|
createColumn: (e, t) => {
|
|
19869
20557
|
e.getSize = () => {
|
|
19870
20558
|
let n = t.getState().columnSizing[e.id];
|
|
19871
|
-
return Math.min(Math.max(e.columnDef.minSize ??
|
|
20559
|
+
return Math.min(Math.max(e.columnDef.minSize ?? Aw.minSize, n ?? e.columnDef.size ?? Aw.size), e.columnDef.maxSize ?? Aw.maxSize);
|
|
19872
20560
|
}, e.getStart = Q((e) => [
|
|
19873
20561
|
e,
|
|
19874
|
-
|
|
20562
|
+
Lw(t, e),
|
|
19875
20563
|
t.getState().columnSizing
|
|
19876
20564
|
], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), $(t.options, "debugColumns", "getStart")), e.getAfter = Q((e) => [
|
|
19877
20565
|
e,
|
|
19878
|
-
|
|
20566
|
+
Lw(t, e),
|
|
19879
20567
|
t.getState().columnSizing
|
|
19880
20568
|
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), $(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
19881
20569
|
t.setColumnSizing((t) => {
|
|
@@ -19899,8 +20587,8 @@ var yC = {
|
|
|
19899
20587
|
}, e.getResizeHandler = (n) => {
|
|
19900
20588
|
let r = t.getColumn(e.column.id), i = r?.getCanResize();
|
|
19901
20589
|
return (a) => {
|
|
19902
|
-
if (!r || !i || (a.persist == null || a.persist(),
|
|
19903
|
-
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c =
|
|
20590
|
+
if (!r || !i || (a.persist == null || a.persist(), Fw(a) && a.touches && a.touches.length > 1)) return;
|
|
20591
|
+
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = Fw(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
|
|
19904
20592
|
typeof n == "number" && (t.setColumnSizingInfo((e) => {
|
|
19905
20593
|
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
|
|
19906
20594
|
return e.columnSizingStart.forEach((e) => {
|
|
@@ -19925,7 +20613,7 @@ var yC = {
|
|
|
19925
20613
|
deltaPercentage: null,
|
|
19926
20614
|
columnSizingStart: []
|
|
19927
20615
|
}));
|
|
19928
|
-
}, p =
|
|
20616
|
+
}, p = kw(n), m = {
|
|
19929
20617
|
moveHandler: (e) => d(e.clientX),
|
|
19930
20618
|
upHandler: (e) => {
|
|
19931
20619
|
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
|
|
@@ -19935,8 +20623,8 @@ var yC = {
|
|
|
19935
20623
|
upHandler: (e) => {
|
|
19936
20624
|
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
|
|
19937
20625
|
}
|
|
19938
|
-
}, g =
|
|
19939
|
-
|
|
20626
|
+
}, g = Pw() ? { passive: !1 } : !1;
|
|
20627
|
+
Fw(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
|
|
19940
20628
|
...e,
|
|
19941
20629
|
startOffset: c,
|
|
19942
20630
|
startSize: o,
|
|
@@ -19952,12 +20640,12 @@ var yC = {
|
|
|
19952
20640
|
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
|
|
19953
20641
|
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
|
|
19954
20642
|
}, e.resetHeaderSizeInfo = (t) => {
|
|
19955
|
-
e.setColumnSizingInfo(t ?
|
|
20643
|
+
e.setColumnSizingInfo(t ? jw() : e.initialState.columnSizingInfo ?? jw());
|
|
19956
20644
|
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
|
|
19957
20645
|
}
|
|
19958
|
-
},
|
|
19959
|
-
function
|
|
19960
|
-
if (typeof
|
|
20646
|
+
}, Nw = null;
|
|
20647
|
+
function Pw() {
|
|
20648
|
+
if (typeof Nw == "boolean") return Nw;
|
|
19961
20649
|
let e = !1;
|
|
19962
20650
|
try {
|
|
19963
20651
|
let t = { get passive() {
|
|
@@ -19967,17 +20655,17 @@ function CC() {
|
|
|
19967
20655
|
} catch {
|
|
19968
20656
|
e = !1;
|
|
19969
20657
|
}
|
|
19970
|
-
return
|
|
20658
|
+
return Nw = e, Nw;
|
|
19971
20659
|
}
|
|
19972
|
-
function
|
|
20660
|
+
function Fw(e) {
|
|
19973
20661
|
return e.type === "touchstart";
|
|
19974
20662
|
}
|
|
19975
|
-
var
|
|
20663
|
+
var Iw = {
|
|
19976
20664
|
getInitialState: (e) => ({
|
|
19977
20665
|
columnVisibility: {},
|
|
19978
20666
|
...e
|
|
19979
20667
|
}),
|
|
19980
|
-
getDefaultOptions: (e) => ({ onColumnVisibilityChange:
|
|
20668
|
+
getDefaultOptions: (e) => ({ onColumnVisibilityChange: QC("columnVisibility", e) }),
|
|
19981
20669
|
createColumn: (e, t) => {
|
|
19982
20670
|
e.toggleVisibility = (n) => {
|
|
19983
20671
|
e.getCanHide() && t.setColumnVisibility((t) => ({
|
|
@@ -20016,20 +20704,20 @@ var TC = {
|
|
|
20016
20704
|
};
|
|
20017
20705
|
}
|
|
20018
20706
|
};
|
|
20019
|
-
function
|
|
20707
|
+
function Lw(e, t) {
|
|
20020
20708
|
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
20021
20709
|
}
|
|
20022
|
-
var
|
|
20710
|
+
var Rw = { createTable: (e) => {
|
|
20023
20711
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
20024
20712
|
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
|
|
20025
20713
|
};
|
|
20026
|
-
} },
|
|
20714
|
+
} }, zw = {
|
|
20027
20715
|
getInitialState: (e) => ({
|
|
20028
20716
|
globalFilter: void 0,
|
|
20029
20717
|
...e
|
|
20030
20718
|
}),
|
|
20031
20719
|
getDefaultOptions: (e) => ({
|
|
20032
|
-
onGlobalFilterChange:
|
|
20720
|
+
onGlobalFilterChange: QC("globalFilter", e),
|
|
20033
20721
|
globalFilterFn: "auto",
|
|
20034
20722
|
getColumnCanGlobalFilter: (t) => {
|
|
20035
20723
|
var n;
|
|
@@ -20041,22 +20729,22 @@ var DC = { createTable: (e) => {
|
|
|
20041
20729
|
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
|
|
20042
20730
|
},
|
|
20043
20731
|
createTable: (e) => {
|
|
20044
|
-
e.getGlobalAutoFilterFn = () =>
|
|
20732
|
+
e.getGlobalAutoFilterFn = () => yw.includesString, e.getGlobalFilterFn = () => {
|
|
20045
20733
|
let { globalFilterFn: t } = e.options;
|
|
20046
|
-
return
|
|
20734
|
+
return $C(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? yw[t];
|
|
20047
20735
|
}, e.setGlobalFilter = (t) => {
|
|
20048
20736
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
|
|
20049
20737
|
}, e.resetGlobalFilter = (t) => {
|
|
20050
20738
|
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
|
|
20051
20739
|
};
|
|
20052
20740
|
}
|
|
20053
|
-
},
|
|
20741
|
+
}, Bw = {
|
|
20054
20742
|
getInitialState: (e) => ({
|
|
20055
20743
|
expanded: {},
|
|
20056
20744
|
...e
|
|
20057
20745
|
}),
|
|
20058
20746
|
getDefaultOptions: (e) => ({
|
|
20059
|
-
onExpandedChange:
|
|
20747
|
+
onExpandedChange: QC("expanded", e),
|
|
20060
20748
|
paginateExpandedRows: !0
|
|
20061
20749
|
}),
|
|
20062
20750
|
createTable: (e) => {
|
|
@@ -20127,18 +20815,18 @@ var DC = { createTable: (e) => {
|
|
|
20127
20815
|
};
|
|
20128
20816
|
};
|
|
20129
20817
|
}
|
|
20130
|
-
},
|
|
20131
|
-
pageIndex:
|
|
20132
|
-
pageSize:
|
|
20133
|
-
}),
|
|
20818
|
+
}, Vw = 0, Hw = 10, Uw = () => ({
|
|
20819
|
+
pageIndex: Vw,
|
|
20820
|
+
pageSize: Hw
|
|
20821
|
+
}), Ww = {
|
|
20134
20822
|
getInitialState: (e) => ({
|
|
20135
20823
|
...e,
|
|
20136
20824
|
pagination: {
|
|
20137
|
-
...
|
|
20825
|
+
...Uw(),
|
|
20138
20826
|
...e?.pagination
|
|
20139
20827
|
}
|
|
20140
20828
|
}),
|
|
20141
|
-
getDefaultOptions: (e) => ({ onPaginationChange:
|
|
20829
|
+
getDefaultOptions: (e) => ({ onPaginationChange: QC("pagination", e) }),
|
|
20142
20830
|
createTable: (e) => {
|
|
20143
20831
|
let t = !1, n = !1;
|
|
20144
20832
|
e._autoResetPageIndex = () => {
|
|
@@ -20154,11 +20842,11 @@ var DC = { createTable: (e) => {
|
|
|
20154
20842
|
e.resetPageIndex(), n = !1;
|
|
20155
20843
|
});
|
|
20156
20844
|
}
|
|
20157
|
-
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) =>
|
|
20158
|
-
e.setPagination(t ?
|
|
20845
|
+
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => ZC(t, e)), e.resetPagination = (t) => {
|
|
20846
|
+
e.setPagination(t ? Uw() : e.initialState.pagination ?? Uw());
|
|
20159
20847
|
}, e.setPageIndex = (t) => {
|
|
20160
20848
|
e.setPagination((n) => {
|
|
20161
|
-
let r =
|
|
20849
|
+
let r = ZC(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
|
|
20162
20850
|
return r = Math.max(0, Math.min(r, i)), {
|
|
20163
20851
|
...n,
|
|
20164
20852
|
pageIndex: r
|
|
@@ -20166,13 +20854,13 @@ var DC = { createTable: (e) => {
|
|
|
20166
20854
|
});
|
|
20167
20855
|
}, e.resetPageIndex = (t) => {
|
|
20168
20856
|
var n;
|
|
20169
|
-
e.setPageIndex(t ?
|
|
20857
|
+
e.setPageIndex(t ? Vw : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? Vw);
|
|
20170
20858
|
}, e.resetPageSize = (t) => {
|
|
20171
20859
|
var n;
|
|
20172
|
-
e.setPageSize(t ?
|
|
20860
|
+
e.setPageSize(t ? Hw : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? Hw);
|
|
20173
20861
|
}, e.setPageSize = (t) => {
|
|
20174
20862
|
e.setPagination((e) => {
|
|
20175
|
-
let n = Math.max(1,
|
|
20863
|
+
let n = Math.max(1, ZC(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
|
|
20176
20864
|
return {
|
|
20177
20865
|
...e,
|
|
20178
20866
|
pageIndex: i,
|
|
@@ -20180,7 +20868,7 @@ var DC = { createTable: (e) => {
|
|
|
20180
20868
|
};
|
|
20181
20869
|
});
|
|
20182
20870
|
}, e.setPageCount = (t) => e.setPagination((n) => {
|
|
20183
|
-
let r =
|
|
20871
|
+
let r = ZC(t, e.options.pageCount ?? -1);
|
|
20184
20872
|
return typeof r == "number" && (r = Math.max(-1, r)), {
|
|
20185
20873
|
...n,
|
|
20186
20874
|
pageCount: r
|
|
@@ -20193,15 +20881,15 @@ var DC = { createTable: (e) => {
|
|
|
20193
20881
|
return n === -1 ? !0 : n === 0 ? !1 : t < n - 1;
|
|
20194
20882
|
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
|
|
20195
20883
|
}
|
|
20196
|
-
},
|
|
20884
|
+
}, Gw = () => ({
|
|
20197
20885
|
top: [],
|
|
20198
20886
|
bottom: []
|
|
20199
|
-
}),
|
|
20887
|
+
}), Kw = {
|
|
20200
20888
|
getInitialState: (e) => ({
|
|
20201
|
-
rowPinning:
|
|
20889
|
+
rowPinning: Gw(),
|
|
20202
20890
|
...e
|
|
20203
20891
|
}),
|
|
20204
|
-
getDefaultOptions: (e) => ({ onRowPinningChange:
|
|
20892
|
+
getDefaultOptions: (e) => ({ onRowPinningChange: QC("rowPinning", e) }),
|
|
20205
20893
|
createRow: (e, t) => {
|
|
20206
20894
|
e.pin = (n, r, i) => {
|
|
20207
20895
|
let a = r ? e.getLeafRows().map((e) => {
|
|
@@ -20240,7 +20928,7 @@ var DC = { createTable: (e) => {
|
|
|
20240
20928
|
};
|
|
20241
20929
|
},
|
|
20242
20930
|
createTable: (e) => {
|
|
20243
|
-
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ?
|
|
20931
|
+
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? Gw() : e.initialState?.rowPinning ?? Gw()), e.getIsSomeRowsPinned = (t) => {
|
|
20244
20932
|
let n = e.getState().rowPinning;
|
|
20245
20933
|
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
|
|
20246
20934
|
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
|
|
@@ -20258,13 +20946,13 @@ var DC = { createTable: (e) => {
|
|
|
20258
20946
|
return e.filter((e) => !r.has(e.id));
|
|
20259
20947
|
}, $(e.options, "debugRows", "getCenterRows"));
|
|
20260
20948
|
}
|
|
20261
|
-
},
|
|
20949
|
+
}, qw = {
|
|
20262
20950
|
getInitialState: (e) => ({
|
|
20263
20951
|
rowSelection: {},
|
|
20264
20952
|
...e
|
|
20265
20953
|
}),
|
|
20266
20954
|
getDefaultOptions: (e) => ({
|
|
20267
|
-
onRowSelectionChange:
|
|
20955
|
+
onRowSelectionChange: QC("rowSelection", e),
|
|
20268
20956
|
enableRowSelection: !0,
|
|
20269
20957
|
enableMultiRowSelection: !0,
|
|
20270
20958
|
enableSubRowSelection: !0
|
|
@@ -20283,17 +20971,17 @@ var DC = { createTable: (e) => {
|
|
|
20283
20971
|
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
|
|
20284
20972
|
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
|
|
20285
20973
|
return e.getRowModel().rows.forEach((t) => {
|
|
20286
|
-
|
|
20974
|
+
Jw(i, t.id, r, !0, e);
|
|
20287
20975
|
}), i;
|
|
20288
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Q(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ?
|
|
20976
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Q(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20289
20977
|
rows: [],
|
|
20290
20978
|
flatRows: [],
|
|
20291
20979
|
rowsById: {}
|
|
20292
|
-
}, $(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Q(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ?
|
|
20980
|
+
}, $(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Q(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20293
20981
|
rows: [],
|
|
20294
20982
|
flatRows: [],
|
|
20295
20983
|
rowsById: {}
|
|
20296
|
-
}, $(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Q(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ?
|
|
20984
|
+
}, $(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Q(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20297
20985
|
rows: [],
|
|
20298
20986
|
flatRows: [],
|
|
20299
20987
|
rowsById: {}
|
|
@@ -20321,17 +21009,17 @@ var DC = { createTable: (e) => {
|
|
|
20321
21009
|
t.setRowSelection((a) => {
|
|
20322
21010
|
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
|
|
20323
21011
|
let o = { ...a };
|
|
20324
|
-
return
|
|
21012
|
+
return Jw(o, e.id, n, r?.selectChildren ?? !0, t), o;
|
|
20325
21013
|
});
|
|
20326
21014
|
}, e.getIsSelected = () => {
|
|
20327
21015
|
let { rowSelection: n } = t.getState();
|
|
20328
|
-
return
|
|
21016
|
+
return Xw(e, n);
|
|
20329
21017
|
}, e.getIsSomeSelected = () => {
|
|
20330
21018
|
let { rowSelection: n } = t.getState();
|
|
20331
|
-
return
|
|
21019
|
+
return Zw(e, n) === "some";
|
|
20332
21020
|
}, e.getIsAllSubRowsSelected = () => {
|
|
20333
21021
|
let { rowSelection: n } = t.getState();
|
|
20334
|
-
return
|
|
21022
|
+
return Zw(e, n) === "all";
|
|
20335
21023
|
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
|
|
20336
21024
|
let t = e.getCanSelect();
|
|
20337
21025
|
return (n) => {
|
|
@@ -20339,16 +21027,16 @@ var DC = { createTable: (e) => {
|
|
|
20339
21027
|
};
|
|
20340
21028
|
};
|
|
20341
21029
|
}
|
|
20342
|
-
},
|
|
21030
|
+
}, Jw = (e, t, n, r, i) => {
|
|
20343
21031
|
var a;
|
|
20344
21032
|
let o = i.getRow(t, !0);
|
|
20345
|
-
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) =>
|
|
21033
|
+
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => Jw(e, t.id, n, r, i));
|
|
20346
21034
|
};
|
|
20347
|
-
function
|
|
21035
|
+
function Yw(e, t) {
|
|
20348
21036
|
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
|
|
20349
21037
|
return e.map((e) => {
|
|
20350
21038
|
var t;
|
|
20351
|
-
let o =
|
|
21039
|
+
let o = Xw(e, n);
|
|
20352
21040
|
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
|
|
20353
21041
|
...e,
|
|
20354
21042
|
subRows: a(e.subRows)
|
|
@@ -20361,32 +21049,32 @@ function RC(e, t) {
|
|
|
20361
21049
|
rowsById: i
|
|
20362
21050
|
};
|
|
20363
21051
|
}
|
|
20364
|
-
function
|
|
21052
|
+
function Xw(e, t) {
|
|
20365
21053
|
return t[e.id] ?? !1;
|
|
20366
21054
|
}
|
|
20367
|
-
function
|
|
21055
|
+
function Zw(e, t, n) {
|
|
20368
21056
|
var r;
|
|
20369
21057
|
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
20370
21058
|
let i = !0, a = !1;
|
|
20371
21059
|
return e.subRows.forEach((e) => {
|
|
20372
|
-
if (!(a && !i) && (e.getCanSelect() && (
|
|
20373
|
-
let n =
|
|
21060
|
+
if (!(a && !i) && (e.getCanSelect() && (Xw(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
21061
|
+
let n = Zw(e, t);
|
|
20374
21062
|
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
20375
21063
|
}
|
|
20376
21064
|
}), i ? "all" : a ? "some" : !1;
|
|
20377
21065
|
}
|
|
20378
|
-
var
|
|
21066
|
+
var Qw = /([0-9]+)/gm, $w = (e, t, n) => sT(oT(e.getValue(n)).toLowerCase(), oT(t.getValue(n)).toLowerCase()), eT = (e, t, n) => sT(oT(e.getValue(n)), oT(t.getValue(n))), tT = (e, t, n) => aT(oT(e.getValue(n)).toLowerCase(), oT(t.getValue(n)).toLowerCase()), nT = (e, t, n) => aT(oT(e.getValue(n)), oT(t.getValue(n))), rT = (e, t, n) => {
|
|
20379
21067
|
let r = e.getValue(n), i = t.getValue(n);
|
|
20380
21068
|
return r > i ? 1 : r < i ? -1 : 0;
|
|
20381
|
-
},
|
|
20382
|
-
function
|
|
21069
|
+
}, iT = (e, t, n) => aT(e.getValue(n), t.getValue(n));
|
|
21070
|
+
function aT(e, t) {
|
|
20383
21071
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
20384
21072
|
}
|
|
20385
|
-
function
|
|
21073
|
+
function oT(e) {
|
|
20386
21074
|
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
20387
21075
|
}
|
|
20388
|
-
function
|
|
20389
|
-
let n = e.split(
|
|
21076
|
+
function sT(e, t) {
|
|
21077
|
+
let n = e.split(Qw).filter(Boolean), r = t.split(Qw).filter(Boolean);
|
|
20390
21078
|
for (; n.length && r.length;) {
|
|
20391
21079
|
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
|
|
20392
21080
|
if (isNaN(o[0])) {
|
|
@@ -20400,22 +21088,22 @@ function XC(e, t) {
|
|
|
20400
21088
|
}
|
|
20401
21089
|
return n.length - r.length;
|
|
20402
21090
|
}
|
|
20403
|
-
var
|
|
20404
|
-
alphanumeric:
|
|
20405
|
-
alphanumericCaseSensitive:
|
|
20406
|
-
text:
|
|
20407
|
-
textCaseSensitive:
|
|
20408
|
-
datetime:
|
|
20409
|
-
basic:
|
|
20410
|
-
},
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
21091
|
+
var cT = {
|
|
21092
|
+
alphanumeric: $w,
|
|
21093
|
+
alphanumericCaseSensitive: eT,
|
|
21094
|
+
text: tT,
|
|
21095
|
+
textCaseSensitive: nT,
|
|
21096
|
+
datetime: rT,
|
|
21097
|
+
basic: iT
|
|
21098
|
+
}, lT = [
|
|
21099
|
+
ow,
|
|
21100
|
+
Iw,
|
|
21101
|
+
Ew,
|
|
21102
|
+
Ow,
|
|
21103
|
+
lw,
|
|
21104
|
+
xw,
|
|
21105
|
+
Rw,
|
|
21106
|
+
zw,
|
|
20419
21107
|
{
|
|
20420
21108
|
getInitialState: (e) => ({
|
|
20421
21109
|
sorting: [],
|
|
@@ -20426,7 +21114,7 @@ var ZC = {
|
|
|
20426
21114
|
sortUndefined: 1
|
|
20427
21115
|
}),
|
|
20428
21116
|
getDefaultOptions: (e) => ({
|
|
20429
|
-
onSortingChange:
|
|
21117
|
+
onSortingChange: QC("sorting", e),
|
|
20430
21118
|
isMultiSortEvent: (e) => e.shiftKey
|
|
20431
21119
|
}),
|
|
20432
21120
|
createColumn: (e, t) => {
|
|
@@ -20434,13 +21122,13 @@ var ZC = {
|
|
|
20434
21122
|
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
|
|
20435
21123
|
for (let t of n) {
|
|
20436
21124
|
let n = t?.getValue(e.id);
|
|
20437
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
20438
|
-
if (typeof n == "string" && (r = !0, n.split(
|
|
21125
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return cT.datetime;
|
|
21126
|
+
if (typeof n == "string" && (r = !0, n.split(Qw).length > 1)) return cT.alphanumeric;
|
|
20439
21127
|
}
|
|
20440
|
-
return r ?
|
|
21128
|
+
return r ? cT.text : cT.basic;
|
|
20441
21129
|
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
|
|
20442
21130
|
if (!e) throw Error();
|
|
20443
|
-
return
|
|
21131
|
+
return $C(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? cT[e.columnDef.sortingFn];
|
|
20444
21132
|
}, e.toggleSorting = (n, r) => {
|
|
20445
21133
|
let i = e.getNextSortingOrder(), a = n != null;
|
|
20446
21134
|
t.setSorting((o) => {
|
|
@@ -20477,16 +21165,16 @@ var ZC = {
|
|
|
20477
21165
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
20478
21166
|
}
|
|
20479
21167
|
},
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20484
|
-
|
|
20485
|
-
|
|
21168
|
+
ww,
|
|
21169
|
+
Bw,
|
|
21170
|
+
Ww,
|
|
21171
|
+
Kw,
|
|
21172
|
+
qw,
|
|
21173
|
+
Mw
|
|
20486
21174
|
];
|
|
20487
|
-
function
|
|
21175
|
+
function uT(e) {
|
|
20488
21176
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
20489
|
-
let t = [...
|
|
21177
|
+
let t = [...lT, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
|
|
20490
21178
|
...r,
|
|
20491
21179
|
...e
|
|
20492
21180
|
}, a = { ...e.initialState ?? {} };
|
|
@@ -20512,7 +21200,7 @@ function $C(e) {
|
|
|
20512
21200
|
n.setState(n.initialState);
|
|
20513
21201
|
},
|
|
20514
21202
|
setOptions: (e) => {
|
|
20515
|
-
n.options = i(
|
|
21203
|
+
n.options = i(ZC(e, n.options));
|
|
20516
21204
|
},
|
|
20517
21205
|
getState: () => n.options.state,
|
|
20518
21206
|
setState: (e) => {
|
|
@@ -20542,7 +21230,7 @@ function $C(e) {
|
|
|
20542
21230
|
getAllColumns: Q(() => [n._getColumnDefs()], (e) => {
|
|
20543
21231
|
let t = function(e, r, i) {
|
|
20544
21232
|
return i === void 0 && (i = 0), e.map((e) => {
|
|
20545
|
-
let a =
|
|
21233
|
+
let a = rw(n, e, i, r), o = e;
|
|
20546
21234
|
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
|
|
20547
21235
|
});
|
|
20548
21236
|
};
|
|
@@ -20563,7 +21251,7 @@ function $C(e) {
|
|
|
20563
21251
|
}
|
|
20564
21252
|
return n;
|
|
20565
21253
|
}
|
|
20566
|
-
function
|
|
21254
|
+
function dT() {
|
|
20567
21255
|
return (e) => Q(() => [e.options.data], (t) => {
|
|
20568
21256
|
let n = {
|
|
20569
21257
|
rows: [],
|
|
@@ -20573,7 +21261,7 @@ function ew() {
|
|
|
20573
21261
|
i === void 0 && (i = 0);
|
|
20574
21262
|
let o = [];
|
|
20575
21263
|
for (let c = 0; c < t.length; c++) {
|
|
20576
|
-
let l =
|
|
21264
|
+
let l = cw(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
|
|
20577
21265
|
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
|
|
20578
21266
|
var s;
|
|
20579
21267
|
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
|
|
@@ -20584,7 +21272,7 @@ function ew() {
|
|
|
20584
21272
|
return n.rows = r(t), n;
|
|
20585
21273
|
}, $(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
20586
21274
|
}
|
|
20587
|
-
function
|
|
21275
|
+
function fT() {
|
|
20588
21276
|
return (e) => Q(() => [e.getState().sorting, e.getPreSortedRowModel()], (t, n) => {
|
|
20589
21277
|
if (!n.rows.length || !(t != null && t.length)) return n;
|
|
20590
21278
|
let r = e.getState().sorting, i = [], a = r.filter((t) => e.getColumn(t.id)?.getCanSort()), o = {};
|
|
@@ -20626,28 +21314,28 @@ function tw() {
|
|
|
20626
21314
|
}
|
|
20627
21315
|
//#endregion
|
|
20628
21316
|
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
|
|
20629
|
-
function
|
|
20630
|
-
return e ?
|
|
21317
|
+
function pT(e, t) {
|
|
21318
|
+
return e ? mT(e) ? /* @__PURE__ */ p.createElement(e, t) : e : null;
|
|
20631
21319
|
}
|
|
20632
|
-
function
|
|
20633
|
-
return
|
|
21320
|
+
function mT(e) {
|
|
21321
|
+
return hT(e) || typeof e == "function" || gT(e);
|
|
20634
21322
|
}
|
|
20635
|
-
function
|
|
21323
|
+
function hT(e) {
|
|
20636
21324
|
return typeof e == "function" && (() => {
|
|
20637
21325
|
let t = Object.getPrototypeOf(e);
|
|
20638
21326
|
return t.prototype && t.prototype.isReactComponent;
|
|
20639
21327
|
})();
|
|
20640
21328
|
}
|
|
20641
|
-
function
|
|
21329
|
+
function gT(e) {
|
|
20642
21330
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
20643
21331
|
}
|
|
20644
|
-
function
|
|
21332
|
+
function _T(e) {
|
|
20645
21333
|
let t = {
|
|
20646
21334
|
state: {},
|
|
20647
21335
|
onStateChange: () => {},
|
|
20648
21336
|
renderFallbackValue: null,
|
|
20649
21337
|
...e
|
|
20650
|
-
}, [n] = p.useState(() => ({ current:
|
|
21338
|
+
}, [n] = p.useState(() => ({ current: uT(t) })), [r, i] = p.useState(() => n.current.initialState);
|
|
20651
21339
|
return n.current.setOptions((t) => ({
|
|
20652
21340
|
...t,
|
|
20653
21341
|
...e,
|
|
@@ -20662,7 +21350,7 @@ function ow(e) {
|
|
|
20662
21350
|
}
|
|
20663
21351
|
//#endregion
|
|
20664
21352
|
//#region src/components/WgDesignProvider/WgDesignProvider.tsx
|
|
20665
|
-
var
|
|
21353
|
+
var vT = { table: {
|
|
20666
21354
|
noResults: "No results found",
|
|
20667
21355
|
filters: "Filters",
|
|
20668
21356
|
filter: "Filter",
|
|
@@ -20682,35 +21370,35 @@ var sw = { table: {
|
|
|
20682
21370
|
ascending: "Ascending",
|
|
20683
21371
|
descending: "Descending",
|
|
20684
21372
|
filterModalDescription: "Filter and sorting options"
|
|
20685
|
-
} },
|
|
20686
|
-
function
|
|
21373
|
+
} }, yT = p.createContext(vT);
|
|
21374
|
+
function bT({ labels: e, children: t }) {
|
|
20687
21375
|
let n = p.useMemo(() => ({ table: {
|
|
20688
|
-
...
|
|
21376
|
+
...vT.table,
|
|
20689
21377
|
...e?.table
|
|
20690
21378
|
} }), [e]);
|
|
20691
|
-
return /* @__PURE__ */ D(
|
|
21379
|
+
return /* @__PURE__ */ D(yT.Provider, {
|
|
20692
21380
|
value: n,
|
|
20693
21381
|
children: t
|
|
20694
21382
|
});
|
|
20695
21383
|
}
|
|
20696
|
-
function
|
|
20697
|
-
return p.useContext(
|
|
21384
|
+
function xT() {
|
|
21385
|
+
return p.useContext(yT);
|
|
20698
21386
|
}
|
|
20699
21387
|
//#endregion
|
|
20700
21388
|
//#region src/components/Table/DataTableMobile.tsx
|
|
20701
|
-
var
|
|
20702
|
-
let n =
|
|
21389
|
+
var ST = ({ table: e, noResultsLabel: t }) => {
|
|
21390
|
+
let n = xT().table, r = (e) => e.columnDef.meta || {}, i = (e) => r(e).mobile || {}, a = e.getAllLeafColumns().find((e) => i(e).cardTitle), o = a ? i(a).cardIcon : void 0, s = (e) => {
|
|
20703
21391
|
if (!a) return;
|
|
20704
21392
|
let t = i(a).cardTitle;
|
|
20705
21393
|
if (typeof t == "string") return t;
|
|
20706
21394
|
let n = e.getVisibleCells().find((e) => e.column.id === a.id);
|
|
20707
|
-
if (n) return
|
|
21395
|
+
if (n) return pT(n.column.columnDef.cell, n.getContext());
|
|
20708
21396
|
}, c = (e) => {
|
|
20709
21397
|
let t = e.getVisibleCells().find((e) => i(e.column).primary);
|
|
20710
|
-
return t ?
|
|
21398
|
+
return t ? pT(t.column.columnDef.cell, t.getContext()) : null;
|
|
20711
21399
|
}, l = (e) => {
|
|
20712
21400
|
let t = e.getVisibleCells().find((e) => i(e.column).action);
|
|
20713
|
-
return t ?
|
|
21401
|
+
return t ? pT(t.column.columnDef.cell, t.getContext()) : null;
|
|
20714
21402
|
}, u = (e, t) => {
|
|
20715
21403
|
let n = t.getVisibleCells().find((t) => t.column.id === e)?.column;
|
|
20716
21404
|
if (!n) return !1;
|
|
@@ -20737,7 +21425,7 @@ var dw = ({ table: e, noResultsLabel: t }) => {
|
|
|
20737
21425
|
children: n
|
|
20738
21426
|
}), /* @__PURE__ */ D("dd", {
|
|
20739
21427
|
className: "text-foreground text-sm font-medium",
|
|
20740
|
-
children:
|
|
21428
|
+
children: pT(t.columnDef.cell, e.getContext())
|
|
20741
21429
|
})]
|
|
20742
21430
|
});
|
|
20743
21431
|
}, p = e.getRowModel().rows;
|
|
@@ -20804,7 +21492,7 @@ var dw = ({ table: e, noResultsLabel: t }) => {
|
|
|
20804
21492
|
};
|
|
20805
21493
|
//#endregion
|
|
20806
21494
|
//#region src/components/Table/hooks.ts
|
|
20807
|
-
function
|
|
21495
|
+
function CT(e) {
|
|
20808
21496
|
return T(v((t) => {
|
|
20809
21497
|
let n = window.matchMedia(e);
|
|
20810
21498
|
return n.addEventListener("change", t), () => {
|
|
@@ -20812,10 +21500,10 @@ function fw(e) {
|
|
|
20812
21500
|
};
|
|
20813
21501
|
}, [e]), () => window.matchMedia(e).matches, () => !1);
|
|
20814
21502
|
}
|
|
20815
|
-
function
|
|
20816
|
-
return
|
|
21503
|
+
function wT() {
|
|
21504
|
+
return CT("only screen and (max-width: 767px)");
|
|
20817
21505
|
}
|
|
20818
|
-
function
|
|
21506
|
+
function TT(e, t) {
|
|
20819
21507
|
let [n, r] = w(e);
|
|
20820
21508
|
return b(() => {
|
|
20821
21509
|
let n = setTimeout(() => r(e), t);
|
|
@@ -20824,7 +21512,7 @@ function mw(e, t) {
|
|
|
20824
21512
|
}
|
|
20825
21513
|
//#endregion
|
|
20826
21514
|
//#region src/components/Table/Table.tsx
|
|
20827
|
-
function
|
|
21515
|
+
function ET({ className: e, ...t }) {
|
|
20828
21516
|
return /* @__PURE__ */ D("div", {
|
|
20829
21517
|
"data-slot": "table-container",
|
|
20830
21518
|
className: "relative w-full overflow-x-auto",
|
|
@@ -20835,49 +21523,49 @@ function hw({ className: e, ...t }) {
|
|
|
20835
21523
|
})
|
|
20836
21524
|
});
|
|
20837
21525
|
}
|
|
20838
|
-
function
|
|
21526
|
+
function DT({ className: e, ...t }) {
|
|
20839
21527
|
return /* @__PURE__ */ D("thead", {
|
|
20840
21528
|
"data-slot": "table-header",
|
|
20841
21529
|
className: W("[&_tr]:border-b", e),
|
|
20842
21530
|
...t
|
|
20843
21531
|
});
|
|
20844
21532
|
}
|
|
20845
|
-
function
|
|
21533
|
+
function OT({ className: e, ...t }) {
|
|
20846
21534
|
return /* @__PURE__ */ D("tbody", {
|
|
20847
21535
|
"data-slot": "table-body",
|
|
20848
21536
|
className: W("[&_tr:last-child]:border-0", e),
|
|
20849
21537
|
...t
|
|
20850
21538
|
});
|
|
20851
21539
|
}
|
|
20852
|
-
function
|
|
21540
|
+
function kT({ className: e, ...t }) {
|
|
20853
21541
|
return /* @__PURE__ */ D("tfoot", {
|
|
20854
21542
|
"data-slot": "table-footer",
|
|
20855
21543
|
className: W("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
|
|
20856
21544
|
...t
|
|
20857
21545
|
});
|
|
20858
21546
|
}
|
|
20859
|
-
function
|
|
21547
|
+
function AT({ className: e, ...t }) {
|
|
20860
21548
|
return /* @__PURE__ */ D("tr", {
|
|
20861
21549
|
"data-slot": "table-row",
|
|
20862
21550
|
className: W("data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
20863
21551
|
...t
|
|
20864
21552
|
});
|
|
20865
21553
|
}
|
|
20866
|
-
function
|
|
21554
|
+
function jT({ className: e, ...t }) {
|
|
20867
21555
|
return /* @__PURE__ */ D("th", {
|
|
20868
21556
|
"data-slot": "table-head",
|
|
20869
21557
|
className: W("text-foreground h-10 px-3 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
20870
21558
|
...t
|
|
20871
21559
|
});
|
|
20872
21560
|
}
|
|
20873
|
-
function
|
|
21561
|
+
function MT({ className: e, ...t }) {
|
|
20874
21562
|
return /* @__PURE__ */ D("td", {
|
|
20875
21563
|
"data-slot": "table-cell",
|
|
20876
21564
|
className: W("px-3 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
20877
21565
|
...t
|
|
20878
21566
|
});
|
|
20879
21567
|
}
|
|
20880
|
-
function
|
|
21568
|
+
function NT({ className: e, ...t }) {
|
|
20881
21569
|
return /* @__PURE__ */ D("caption", {
|
|
20882
21570
|
"data-slot": "table-caption",
|
|
20883
21571
|
className: W("text-muted-foreground mt-4 text-sm", e),
|
|
@@ -20886,22 +21574,22 @@ function Sw({ className: e, ...t }) {
|
|
|
20886
21574
|
}
|
|
20887
21575
|
//#endregion
|
|
20888
21576
|
//#region src/components/Table/DataTable.tsx
|
|
20889
|
-
function
|
|
20890
|
-
let p =
|
|
21577
|
+
function PT({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className: s, disableMobileList: c = !1, sorting: l, onSortingChange: u, skeletonRows: d = 4, noResultsLabel: f }) {
|
|
21578
|
+
let p = xT().table, m = f ?? p.noResults, h = wT(), g = !c && h, [_, v] = w([]), y = !!u, b = y ? l : _, x = y ? u : v, S = _T({
|
|
20891
21579
|
data: r,
|
|
20892
21580
|
columns: e,
|
|
20893
|
-
getCoreRowModel:
|
|
21581
|
+
getCoreRowModel: dT(),
|
|
20894
21582
|
...y ? {
|
|
20895
21583
|
manualSorting: !0,
|
|
20896
21584
|
onSortingChange: x,
|
|
20897
21585
|
state: { sorting: b }
|
|
20898
21586
|
} : {
|
|
20899
|
-
getSortedRowModel:
|
|
21587
|
+
getSortedRowModel: fT(),
|
|
20900
21588
|
onSortingChange: x,
|
|
20901
21589
|
state: { sorting: b }
|
|
20902
21590
|
}
|
|
20903
21591
|
});
|
|
20904
|
-
return g ? /* @__PURE__ */ D(
|
|
21592
|
+
return g ? /* @__PURE__ */ D(ST, {
|
|
20905
21593
|
table: S,
|
|
20906
21594
|
noResultsLabel: m
|
|
20907
21595
|
}) : /* @__PURE__ */ D("div", {
|
|
@@ -20909,26 +21597,26 @@ function Cw({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className:
|
|
|
20909
21597
|
children: /* @__PURE__ */ D("div", {
|
|
20910
21598
|
"data-slot": "data-table",
|
|
20911
21599
|
className: "bg-card rounded-md border",
|
|
20912
|
-
children: /* @__PURE__ */ O(
|
|
21600
|
+
children: /* @__PURE__ */ O(ET, { children: [/* @__PURE__ */ D(DT, { children: S.getHeaderGroups().map((e) => /* @__PURE__ */ D(AT, { children: e.headers.filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(jT, { children: e.isPlaceholder ? null : /* @__PURE__ */ O("div", {
|
|
20913
21601
|
className: W(e.column.getCanSort() ? "cursor-pointer select-none" : "", "flex items-center space-x-2"),
|
|
20914
21602
|
onClick: e.column.getToggleSortingHandler(),
|
|
20915
|
-
children: [/* @__PURE__ */ D("div", { children:
|
|
21603
|
+
children: [/* @__PURE__ */ D("div", { children: pT(e.column.columnDef.header, e.getContext()) }), e.column.getCanSort() && /* @__PURE__ */ D("div", {
|
|
20916
21604
|
className: "flex size-4 items-center justify-center",
|
|
20917
21605
|
children: {
|
|
20918
21606
|
asc: /* @__PURE__ */ D(t, { className: "size-4" }),
|
|
20919
21607
|
desc: /* @__PURE__ */ D(i, { className: "size-4" })
|
|
20920
21608
|
}[e.column.getIsSorted()] ?? /* @__PURE__ */ D(n, { className: "text-muted-foreground size-4" })
|
|
20921
21609
|
})]
|
|
20922
|
-
}) }, e.id)) }, e.id)) }), /* @__PURE__ */ D(
|
|
21610
|
+
}) }, e.id)) }, e.id)) }), /* @__PURE__ */ D(OT, { children: o ? /* @__PURE__ */ D(E, { children: Array.from(Array(d)).map((e, t) => /* @__PURE__ */ D(AT, { children: S.getVisibleLeafColumns().filter((e) => !e.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(MT, { children: /* @__PURE__ */ D(AS, {
|
|
20923
21611
|
className: "rounded-full",
|
|
20924
21612
|
style: { maxWidth: `${Math.floor(Math.random() * 51) + 150}px` }
|
|
20925
|
-
}) }, e.id)) }, t)) }) : S.getRowModel().rows?.length ? S.getRowModel().rows.map((e) => /* @__PURE__ */ D(
|
|
21613
|
+
}) }, e.id)) }, t)) }) : S.getRowModel().rows?.length ? S.getRowModel().rows.map((e) => /* @__PURE__ */ D(AT, {
|
|
20926
21614
|
"data-testid": `row-${e.id}`,
|
|
20927
21615
|
"data-state": e.getIsSelected() && "selected",
|
|
20928
21616
|
onClick: () => a?.(e.original),
|
|
20929
21617
|
className: W(a && "hover:bg-muted/50 cursor-pointer"),
|
|
20930
|
-
children: e.getVisibleCells().filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(
|
|
20931
|
-
}, e.id)) : /* @__PURE__ */ D(
|
|
21618
|
+
children: e.getVisibleCells().filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(MT, { children: pT(e.column.columnDef.cell, e.getContext()) }, e.id))
|
|
21619
|
+
}, e.id)) : /* @__PURE__ */ D(AT, { children: /* @__PURE__ */ D(MT, {
|
|
20932
21620
|
colSpan: e.filter((e) => !e.meta?.desktopHidden).length,
|
|
20933
21621
|
className: "text-muted-foreground pointer-events-none h-24 text-center",
|
|
20934
21622
|
children: m
|
|
@@ -20938,8 +21626,8 @@ function Cw({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className:
|
|
|
20938
21626
|
}
|
|
20939
21627
|
//#endregion
|
|
20940
21628
|
//#region src/components/Table/DataTableFilterHeaderMobileSorting.tsx
|
|
20941
|
-
var
|
|
20942
|
-
let l =
|
|
21629
|
+
var FT = ({ sorting: e, onSortingChange: t, sortableColumns: n = [], sortLabel: r, sortByLabel: i, selectFieldLabel: a, sortDirectionLabel: o, ascendingLabel: s, descendingLabel: c }) => {
|
|
21630
|
+
let l = xT().table, u = r ?? l.sort, d = i ?? l.sortBy, f = a ?? l.selectField, p = o ?? l.sortDirection, m = s ?? l.ascending, h = c ?? l.descending, g = e?.[0], _ = g && n.find((e) => e.id === g.id), v = g?.desc ? "desc" : "asc", [y, b] = w(_?.id), [x, S] = w(v), C = (e) => {
|
|
20943
21631
|
b(e), t && t([{
|
|
20944
21632
|
id: e,
|
|
20945
21633
|
desc: x === "desc"
|
|
@@ -20996,8 +21684,8 @@ var ww = ({ sorting: e, onSortingChange: t, sortableColumns: n = [], sortLabel:
|
|
|
20996
21684
|
};
|
|
20997
21685
|
//#endregion
|
|
20998
21686
|
//#region src/components/Table/FilterModal.tsx
|
|
20999
|
-
function
|
|
21000
|
-
let s =
|
|
21687
|
+
function IT({ open: e, onClose: t, title: n, children: r, footer: i, className: a, descriptionLabel: o }) {
|
|
21688
|
+
let s = xT().table;
|
|
21001
21689
|
return /* @__PURE__ */ D(mm, {
|
|
21002
21690
|
open: e,
|
|
21003
21691
|
onOpenChange: (e) => {
|
|
@@ -21027,8 +21715,8 @@ function Tw({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
21027
21715
|
}
|
|
21028
21716
|
//#endregion
|
|
21029
21717
|
//#region src/components/Table/DateRangeFilter.tsx
|
|
21030
|
-
var
|
|
21031
|
-
let l =
|
|
21718
|
+
var LT = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-5 w-px align-middle" }), RT = ({ from: e, to: t, label: n, onChange: i, filterLabel: a, clearLabel: o, applyLabel: s, formatDate: c = (e) => e.toLocaleDateString() }) => {
|
|
21719
|
+
let l = xT().table, d = a ?? l.dateRange, f = o ?? l.clear, p = s ?? l.apply, [m, h] = w(!1), g = wT(), [_, v] = w({
|
|
21032
21720
|
from: e,
|
|
21033
21721
|
to: t
|
|
21034
21722
|
}), y = () => {
|
|
@@ -21048,7 +21736,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21048
21736
|
/* @__PURE__ */ D(u, { className: "size-4" }),
|
|
21049
21737
|
n || d,
|
|
21050
21738
|
e && t ? /* @__PURE__ */ O(E, { children: [
|
|
21051
|
-
/* @__PURE__ */ D(
|
|
21739
|
+
/* @__PURE__ */ D(LT, {}),
|
|
21052
21740
|
/* @__PURE__ */ O("span", { children: [c(e), " "] }),
|
|
21053
21741
|
/* @__PURE__ */ D(r, { className: "size-4" }),
|
|
21054
21742
|
/* @__PURE__ */ O("span", { children: [
|
|
@@ -21075,7 +21763,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21075
21763
|
variant: "outline",
|
|
21076
21764
|
onClick: () => h(!0),
|
|
21077
21765
|
children: x
|
|
21078
|
-
}), /* @__PURE__ */ D(
|
|
21766
|
+
}), /* @__PURE__ */ D(IT, {
|
|
21079
21767
|
open: m,
|
|
21080
21768
|
onClose: () => h(!1),
|
|
21081
21769
|
title: n || d,
|
|
@@ -21112,8 +21800,8 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21112
21800
|
})]
|
|
21113
21801
|
})]
|
|
21114
21802
|
});
|
|
21115
|
-
},
|
|
21116
|
-
let a =
|
|
21803
|
+
}, zT = ({ value: e, onChange: t, className: n, clearLabel: r, ...i }) => {
|
|
21804
|
+
let a = xT().table, [o, s] = w(e || ""), c = TT(o, 300);
|
|
21117
21805
|
return b(() => {
|
|
21118
21806
|
t(c || void 0);
|
|
21119
21807
|
}, [c]), /* @__PURE__ */ O("div", {
|
|
@@ -21138,8 +21826,8 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21138
21826
|
})
|
|
21139
21827
|
]
|
|
21140
21828
|
});
|
|
21141
|
-
},
|
|
21142
|
-
let l =
|
|
21829
|
+
}, BT = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-5 w-px align-middle" }), VT = ({ value: e = [], options: t, onChange: n, label: r, multiple: i = !0, filterLabel: a, selectedLabel: o, clearLabel: s, applyLabel: c }) => {
|
|
21830
|
+
let l = xT().table, [d, f] = w(!1), [p, m] = w(e), h = wT(), g = a ?? l.filter, _ = o ?? l.selected, v = s ?? l.clear, y = c ?? l.apply, b = () => {
|
|
21143
21831
|
n(p), f(!1);
|
|
21144
21832
|
}, x = () => {
|
|
21145
21833
|
m([]), n([]), f(!1);
|
|
@@ -21150,7 +21838,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21150
21838
|
}, T = h && t.length > 1, k = /* @__PURE__ */ O(E, { children: [
|
|
21151
21839
|
/* @__PURE__ */ D(u, { className: "size-4" }),
|
|
21152
21840
|
r || g,
|
|
21153
|
-
p.length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(
|
|
21841
|
+
p.length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(BT, {}), /* @__PURE__ */ D("span", {
|
|
21154
21842
|
className: "inline-flex align-middle",
|
|
21155
21843
|
children: p.length === 1 ? (() => {
|
|
21156
21844
|
let e = t.find((e) => e.value === p[0]);
|
|
@@ -21187,7 +21875,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21187
21875
|
className: "justify-start",
|
|
21188
21876
|
onClick: () => f(!0),
|
|
21189
21877
|
children: k
|
|
21190
|
-
}), /* @__PURE__ */ D(
|
|
21878
|
+
}), /* @__PURE__ */ D(IT, {
|
|
21191
21879
|
open: d,
|
|
21192
21880
|
onClose: () => f(!1),
|
|
21193
21881
|
title: r || g,
|
|
@@ -21232,22 +21920,22 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21232
21920
|
})]
|
|
21233
21921
|
})]
|
|
21234
21922
|
});
|
|
21235
|
-
},
|
|
21236
|
-
let h =
|
|
21923
|
+
}, HT = _(({ query: e, placeholder: t, handleFilterChange: n, handleResetFilters: r, hasActiveFilters: i, filters: a = [], sorting: o, onSortingChange: s, sortableColumns: c = [], modalTitle: l, filtersLabel: d, clearLabel: f, applyLabel: p }, m) => {
|
|
21924
|
+
let h = xT().table, g = d ?? h.filters, _ = f ?? h.clear, v = p ?? h.apply, y = wT(), [b, x] = w(!1), S = (e, t) => e.type === "select" ? /* @__PURE__ */ D(VT, {
|
|
21237
21925
|
label: e.label,
|
|
21238
21926
|
value: e.value,
|
|
21239
21927
|
options: e.options,
|
|
21240
21928
|
onChange: e.onChange,
|
|
21241
21929
|
clearLabel: f,
|
|
21242
21930
|
applyLabel: p
|
|
21243
|
-
}, t) : e.type === "dateRange" ? /* @__PURE__ */ D(
|
|
21931
|
+
}, t) : e.type === "dateRange" ? /* @__PURE__ */ D(RT, {
|
|
21244
21932
|
label: e.label,
|
|
21245
21933
|
from: e.from,
|
|
21246
21934
|
to: e.to,
|
|
21247
21935
|
onChange: e.onChange,
|
|
21248
21936
|
clearLabel: f,
|
|
21249
21937
|
applyLabel: p
|
|
21250
|
-
}, t) : e.type === "check" ? /* @__PURE__ */ D(
|
|
21938
|
+
}, t) : e.type === "check" ? /* @__PURE__ */ D(XC, {
|
|
21251
21939
|
label: e.label,
|
|
21252
21940
|
value: e.value,
|
|
21253
21941
|
onChange: e.onChange
|
|
@@ -21259,7 +21947,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21259
21947
|
className: "flex w-full flex-row flex-wrap items-stretch justify-end gap-2 md:items-center md:justify-between",
|
|
21260
21948
|
children: [/* @__PURE__ */ D("div", {
|
|
21261
21949
|
className: "flex-grow",
|
|
21262
|
-
children: /* @__PURE__ */ D(
|
|
21950
|
+
children: /* @__PURE__ */ D(zT, {
|
|
21263
21951
|
value: e,
|
|
21264
21952
|
placeholder: t,
|
|
21265
21953
|
onChange: (e) => n("q", e),
|
|
@@ -21282,7 +21970,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21282
21970
|
className: "flex flex-0 items-center justify-end gap-2",
|
|
21283
21971
|
children: a.map((e, t) => S(e, t))
|
|
21284
21972
|
})]
|
|
21285
|
-
}), y && (a.length > 0 || c.length > 0) && /* @__PURE__ */ D(
|
|
21973
|
+
}), y && (a.length > 0 || c.length > 0) && /* @__PURE__ */ D(IT, {
|
|
21286
21974
|
open: b,
|
|
21287
21975
|
onClose: () => x(!1),
|
|
21288
21976
|
title: l || g,
|
|
@@ -21306,7 +21994,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21306
21994
|
children: [a.length > 0 && /* @__PURE__ */ D("div", {
|
|
21307
21995
|
className: "flex flex-col space-y-4",
|
|
21308
21996
|
children: a.map((e, t) => S(e, t))
|
|
21309
|
-
}), /* @__PURE__ */ D(
|
|
21997
|
+
}), /* @__PURE__ */ D(FT, {
|
|
21310
21998
|
sorting: o,
|
|
21311
21999
|
onSortingChange: s,
|
|
21312
22000
|
sortableColumns: c
|
|
@@ -21315,11 +22003,11 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21315
22003
|
})]
|
|
21316
22004
|
});
|
|
21317
22005
|
});
|
|
21318
|
-
|
|
22006
|
+
HT.displayName = "DataTableFilterHeader";
|
|
21319
22007
|
//#endregion
|
|
21320
22008
|
//#region src/components/Table/DataTableMobileSorting.tsx
|
|
21321
|
-
var
|
|
21322
|
-
let f =
|
|
22009
|
+
var UT = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDirectionLabel: s, ascendingLabel: c, descendingLabel: l, clearLabel: u, applyLabel: d }) => {
|
|
22010
|
+
let f = xT().table, p = r ?? f.sort, m = a ?? f.sortBy, h = o ?? f.selectField, g = s ?? f.sortDirection, _ = c ?? f.ascending, v = l ?? f.descending, y = u ?? f.clear, b = d ?? f.apply, [x, C] = w(!1), T = e.getState().sorting, E = e.options.onSortingChange, k = S(() => e.getAllLeafColumns().filter((e) => e.getCanSort()), [e]), A = T?.[0], j = A && k.find((e) => e.id === A.id), M = A?.desc ? "desc" : "asc", [N, P] = w(j?.id), [F, I] = w(M);
|
|
21323
22011
|
return k.length === 0 || !E ? null : /* @__PURE__ */ O(CS, {
|
|
21324
22012
|
open: x,
|
|
21325
22013
|
onOpenChange: (e) => {
|
|
@@ -21399,13 +22087,13 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21399
22087
|
})
|
|
21400
22088
|
})]
|
|
21401
22089
|
});
|
|
21402
|
-
},
|
|
22090
|
+
}, WT = [
|
|
21403
22091
|
10,
|
|
21404
22092
|
25,
|
|
21405
22093
|
50,
|
|
21406
22094
|
100
|
|
21407
|
-
],
|
|
21408
|
-
let a =
|
|
22095
|
+
], GT = ({ value: e, onValueChange: t, className: n, options: r = WT, itemsPerPageLabel: i }) => {
|
|
22096
|
+
let a = xT().table, o = i ?? a.itemsPerPage;
|
|
21409
22097
|
return /* @__PURE__ */ D(Ox, {
|
|
21410
22098
|
size: "sm",
|
|
21411
22099
|
className: n,
|
|
@@ -21420,8 +22108,8 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21420
22108
|
]
|
|
21421
22109
|
}, e))
|
|
21422
22110
|
});
|
|
21423
|
-
},
|
|
21424
|
-
let i =
|
|
22111
|
+
}, KT = ({ pagination: e, pageSize: t, className: n, formatLabel: r }) => {
|
|
22112
|
+
let i = xT().table;
|
|
21425
22113
|
if (!e || e.count === 0) return null;
|
|
21426
22114
|
let a = e.current, o = e.count, s = (a - 1) * t + 1, c = Math.min(a * t, o), l = (r ?? i.showingResults)({
|
|
21427
22115
|
from: s,
|
|
@@ -21432,17 +22120,17 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21432
22120
|
className: W("text-muted-foreground text-sm whitespace-nowrap", n),
|
|
21433
22121
|
children: l
|
|
21434
22122
|
});
|
|
21435
|
-
},
|
|
21436
|
-
let c =
|
|
22123
|
+
}, qT = ({ pagination: e, onPageChange: t, pageSize: n = 10, onPageSizeChange: r, previousLabel: i, nextLabel: a, itemsPerPageLabel: o, formatResultsLabel: s }) => {
|
|
22124
|
+
let c = xT().table, u = wT(), d = e.current, f = e.pages, p = d - 1 > 4 / 2 && f > 4, m = f - d + 1 > 4 / 2 && f > 4;
|
|
21437
22125
|
return f <= 1 && e.count <= n ? null : /* @__PURE__ */ O("div", {
|
|
21438
22126
|
className: "flex items-center justify-between",
|
|
21439
22127
|
children: [!u && /* @__PURE__ */ O("div", {
|
|
21440
22128
|
className: "flex flex-shrink-0 items-center gap-4",
|
|
21441
|
-
children: [r && /* @__PURE__ */ D(
|
|
22129
|
+
children: [r && /* @__PURE__ */ D(GT, {
|
|
21442
22130
|
value: n,
|
|
21443
22131
|
onValueChange: r,
|
|
21444
22132
|
itemsPerPageLabel: o
|
|
21445
|
-
}), /* @__PURE__ */ D(
|
|
22133
|
+
}), /* @__PURE__ */ D(KT, {
|
|
21446
22134
|
pagination: e,
|
|
21447
22135
|
pageSize: n,
|
|
21448
22136
|
formatLabel: s
|
|
@@ -21482,4 +22170,13 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21482
22170
|
});
|
|
21483
22171
|
};
|
|
21484
22172
|
//#endregion
|
|
21485
|
-
|
|
22173
|
+
//#region src/components/Textarea/textarea.tsx
|
|
22174
|
+
function JT({ className: e, ...t }) {
|
|
22175
|
+
return /* @__PURE__ */ D("textarea", {
|
|
22176
|
+
"data-slot": "textarea",
|
|
22177
|
+
className: W("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
22178
|
+
...t
|
|
22179
|
+
});
|
|
22180
|
+
}
|
|
22181
|
+
//#endregion
|
|
22182
|
+
export { hn as Badge, ar as Button, rr as ButtonGroup, ys as Calendar, bs as CalendarDayButton, XC as CheckFilter, Oc as Checkbox, PT as DataTable, HT as DataTableFilterHeader, FT as DataTableFilterHeaderMobileSorting, ST as DataTableMobile, UT as DataTableMobileSorting, qT as DataTablePagination, RT as DateRangeFilter, zT as DebouncedSearchInput, mm as Dialog, gm as DialogClose, _m as DialogContent, xm as DialogDescription, ym as DialogFooter, vm as DialogHeader, bm as DialogTitle, hm as DialogTrigger, Tx as DynamicIcon, IT as FilterModal, Ex as IconButton, Dx as Input, Ox as NativeSelect, Ax as NativeSelectOptGroup, kx as NativeSelectOption, GT as PageSizeSelector, jx as Pagination, Mx as PaginationContent, Lx as PaginationEllipsis, Nx as PaginationItem, Px as PaginationLink, Ix as PaginationNext, Fx as PaginationPrevious, CS as Popover, ES as PopoverClose, TS as PopoverContent, wS as PopoverTrigger, KT as ResultsCounter, VT as SelectFilter, kS as Separator, AS as Skeleton, VC as Slider, YC as Switch, ET as Table, OT as TableBody, NT as TableCaption, MT as TableCell, kT as TableFooter, jT as TableHead, DT as TableHeader, AT as TableRow, JT as Textarea, bT as WgDesignProvider, mn as badgeVariants, er as buttonGroupVariants, ir as buttonVariants, vT as defaultWgDesignLabels, OS as separatorVariants, nr as useButtonGroup, TT as useDebounce, wT as useIsMobile, CT as useMediaQuery, xT as useWgDesignLabels };
|