@unizap/uniui 1.0.38 → 1.0.40
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/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +3 -0
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/components/ProfileImageShowcase/ProfileShowcase.d.ts +2 -0
- package/dist/components/Select/Select.types.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +2 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +7 -0
- package/dist/components/Tabs/Tabs.types.d.ts +2 -0
- package/dist/components/TextInput/TextInput.types.d.ts +1 -1
- package/dist/uniui.css +1 -1
- package/dist/uniui.js +918 -892
- package/dist/uniui.umd.cjs +54 -54
- package/package.json +2 -2
package/dist/uniui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Vt from "react";
|
|
2
2
|
import Ce, { useRef as le, useState as W, useEffect as se, useMemo as Me, useReducer as eo, useCallback as oe, forwardRef as Te, useImperativeHandle as Sn, Fragment as to, memo as no, useLayoutEffect as oo } from "react";
|
|
3
3
|
import { createPortal as Oe } from "react-dom";
|
|
4
|
-
function
|
|
4
|
+
function $n(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
7
|
var qe = { exports: {} }, Fe = {};
|
|
@@ -49,12 +49,12 @@ var Ae = {};
|
|
|
49
49
|
var qt;
|
|
50
50
|
function io() {
|
|
51
51
|
return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
-
function e(
|
|
53
|
-
if (
|
|
54
|
-
if (typeof
|
|
55
|
-
return
|
|
56
|
-
if (typeof
|
|
57
|
-
switch (
|
|
52
|
+
function e(x) {
|
|
53
|
+
if (x == null) return null;
|
|
54
|
+
if (typeof x == "function")
|
|
55
|
+
return x.$$typeof === ee ? null : x.displayName || x.name || null;
|
|
56
|
+
if (typeof x == "string") return x;
|
|
57
|
+
switch (x) {
|
|
58
58
|
case f:
|
|
59
59
|
return "Fragment";
|
|
60
60
|
case C:
|
|
@@ -68,144 +68,144 @@ function io() {
|
|
|
68
68
|
case N:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
|
-
if (typeof
|
|
72
|
-
switch (typeof
|
|
71
|
+
if (typeof x == "object")
|
|
72
|
+
switch (typeof x.tag == "number" && console.error(
|
|
73
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
|
-
),
|
|
75
|
-
case
|
|
74
|
+
), x.$$typeof) {
|
|
75
|
+
case v:
|
|
76
76
|
return "Portal";
|
|
77
77
|
case w:
|
|
78
|
-
return (
|
|
78
|
+
return (x.displayName || "Context") + ".Provider";
|
|
79
79
|
case M:
|
|
80
|
-
return (
|
|
80
|
+
return (x._context.displayName || "Context") + ".Consumer";
|
|
81
81
|
case L:
|
|
82
|
-
var y =
|
|
83
|
-
return
|
|
82
|
+
var y = x.render;
|
|
83
|
+
return x = x.displayName, x || (x = y.displayName || y.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
|
|
84
84
|
case T:
|
|
85
|
-
return y =
|
|
85
|
+
return y = x.displayName || null, y !== null ? y : e(x.type) || "Memo";
|
|
86
86
|
case H:
|
|
87
|
-
y =
|
|
87
|
+
y = x._payload, x = x._init;
|
|
88
88
|
try {
|
|
89
|
-
return e(
|
|
89
|
+
return e(x(y));
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
function n(
|
|
96
|
-
return "" +
|
|
95
|
+
function n(x) {
|
|
96
|
+
return "" + x;
|
|
97
97
|
}
|
|
98
|
-
function t(
|
|
98
|
+
function t(x) {
|
|
99
99
|
try {
|
|
100
|
-
n(
|
|
100
|
+
n(x);
|
|
101
101
|
var y = !1;
|
|
102
102
|
} catch {
|
|
103
103
|
y = !0;
|
|
104
104
|
}
|
|
105
105
|
if (y) {
|
|
106
106
|
y = console;
|
|
107
|
-
var E = y.error, _ = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
107
|
+
var E = y.error, _ = typeof Symbol == "function" && Symbol.toStringTag && x[Symbol.toStringTag] || x.constructor.name || "Object";
|
|
108
108
|
return E.call(
|
|
109
109
|
y,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
111
|
_
|
|
112
|
-
), n(
|
|
112
|
+
), n(x);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function o(
|
|
116
|
-
if (
|
|
117
|
-
if (typeof
|
|
115
|
+
function o(x) {
|
|
116
|
+
if (x === f) return "<>";
|
|
117
|
+
if (typeof x == "object" && x !== null && x.$$typeof === H)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
|
-
var y = e(
|
|
120
|
+
var y = e(x);
|
|
121
121
|
return y ? "<" + y + ">" : "<...>";
|
|
122
122
|
} catch {
|
|
123
123
|
return "<...>";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function r() {
|
|
127
|
-
var
|
|
128
|
-
return
|
|
127
|
+
var x = ie.A;
|
|
128
|
+
return x === null ? null : x.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function i() {
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
|
-
function l(
|
|
134
|
-
if (ce.call(
|
|
135
|
-
var y = Object.getOwnPropertyDescriptor(
|
|
133
|
+
function l(x) {
|
|
134
|
+
if (ce.call(x, "key")) {
|
|
135
|
+
var y = Object.getOwnPropertyDescriptor(x, "key").get;
|
|
136
136
|
if (y && y.isReactWarning) return !1;
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return x.key !== void 0;
|
|
139
139
|
}
|
|
140
|
-
function s(
|
|
140
|
+
function s(x, y) {
|
|
141
141
|
function E() {
|
|
142
142
|
Y || (Y = !0, console.error(
|
|
143
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
144
144
|
y
|
|
145
145
|
));
|
|
146
146
|
}
|
|
147
|
-
E.isReactWarning = !0, Object.defineProperty(
|
|
147
|
+
E.isReactWarning = !0, Object.defineProperty(x, "key", {
|
|
148
148
|
get: E,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function c() {
|
|
153
|
-
var
|
|
154
|
-
return D[
|
|
153
|
+
var x = e(this.type);
|
|
154
|
+
return D[x] || (D[x] = !0, console.error(
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
|
-
)),
|
|
156
|
+
)), x = this.props.ref, x !== void 0 ? x : null;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return E = z.ref,
|
|
158
|
+
function u(x, y, E, _, F, z, A, k) {
|
|
159
|
+
return E = z.ref, x = {
|
|
160
160
|
$$typeof: g,
|
|
161
|
-
type:
|
|
161
|
+
type: x,
|
|
162
162
|
key: y,
|
|
163
163
|
props: z,
|
|
164
164
|
_owner: F
|
|
165
|
-
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(
|
|
165
|
+
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(x, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: c
|
|
168
|
-
}) : Object.defineProperty(
|
|
168
|
+
}) : Object.defineProperty(x, "ref", { enumerable: !1, value: null }), x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
169
169
|
configurable: !1,
|
|
170
170
|
enumerable: !1,
|
|
171
171
|
writable: !0,
|
|
172
172
|
value: 0
|
|
173
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(x, "_debugInfo", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: null
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(x, "_debugStack", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
182
|
value: A
|
|
183
|
-
}), Object.defineProperty(
|
|
183
|
+
}), Object.defineProperty(x, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
188
|
-
}), Object.freeze && (Object.freeze(
|
|
187
|
+
value: k
|
|
188
|
+
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
190
|
+
function p(x, y, E, _, F, z, A, k) {
|
|
191
|
+
var R = y.children;
|
|
192
|
+
if (R !== void 0)
|
|
193
193
|
if (_)
|
|
194
|
-
if (U(
|
|
195
|
-
for (_ = 0; _ <
|
|
196
|
-
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
194
|
+
if (U(R)) {
|
|
195
|
+
for (_ = 0; _ < R.length; _++)
|
|
196
|
+
m(R[_]);
|
|
197
|
+
Object.freeze && Object.freeze(R);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else
|
|
202
|
+
else m(R);
|
|
203
203
|
if (ce.call(y, "key")) {
|
|
204
|
-
|
|
204
|
+
R = e(x);
|
|
205
205
|
var V = Object.keys(y).filter(function(j) {
|
|
206
206
|
return j !== "key";
|
|
207
207
|
});
|
|
208
|
-
_ = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", K[
|
|
208
|
+
_ = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", K[R + _] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
@@ -213,68 +213,68 @@ React keys must be passed directly to JSX without using spread:
|
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
215
|
_,
|
|
216
|
-
|
|
216
|
+
R,
|
|
217
217
|
V,
|
|
218
|
-
|
|
219
|
-
), K[
|
|
218
|
+
R
|
|
219
|
+
), K[R + _] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
221
|
+
if (R = null, E !== void 0 && (t(E), R = "" + E), l(y) && (t(y.key), R = "" + y.key), "key" in y) {
|
|
222
222
|
E = {};
|
|
223
223
|
for (var q in y)
|
|
224
224
|
q !== "key" && (E[q] = y[q]);
|
|
225
225
|
} else E = y;
|
|
226
|
-
return
|
|
226
|
+
return R && s(
|
|
227
227
|
E,
|
|
228
|
-
typeof
|
|
229
|
-
),
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
|
|
229
|
+
), u(
|
|
230
|
+
x,
|
|
231
|
+
R,
|
|
232
232
|
z,
|
|
233
233
|
F,
|
|
234
234
|
r(),
|
|
235
235
|
E,
|
|
236
236
|
A,
|
|
237
|
-
|
|
237
|
+
k
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
typeof
|
|
240
|
+
function m(x) {
|
|
241
|
+
typeof x == "object" && x !== null && x.$$typeof === g && x._store && (x._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var d = Ce, g = Symbol.for("react.transitional.element"),
|
|
243
|
+
var d = Ce, g = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), w = Symbol.for("react.context"), L = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), ie = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ce = Object.prototype.hasOwnProperty, U = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
d = {
|
|
247
|
-
"react-stack-bottom-frame": function(
|
|
248
|
-
return
|
|
247
|
+
"react-stack-bottom-frame": function(x) {
|
|
248
|
+
return x();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
var Y, D = {}, Q = d["react-stack-bottom-frame"].bind(
|
|
252
252
|
d,
|
|
253
253
|
i
|
|
254
254
|
)(), pe = O(o(i)), K = {};
|
|
255
|
-
Ae.Fragment = f, Ae.jsx = function(
|
|
255
|
+
Ae.Fragment = f, Ae.jsx = function(x, y, E, _, F) {
|
|
256
256
|
var z = 1e4 > ie.recentlyCreatedOwnerStacks++;
|
|
257
|
-
return
|
|
258
|
-
|
|
257
|
+
return p(
|
|
258
|
+
x,
|
|
259
259
|
y,
|
|
260
260
|
E,
|
|
261
261
|
!1,
|
|
262
262
|
_,
|
|
263
263
|
F,
|
|
264
264
|
z ? Error("react-stack-top-frame") : Q,
|
|
265
|
-
z ? O(o(
|
|
265
|
+
z ? O(o(x)) : pe
|
|
266
266
|
);
|
|
267
|
-
}, Ae.jsxs = function(
|
|
267
|
+
}, Ae.jsxs = function(x, y, E, _, F) {
|
|
268
268
|
var z = 1e4 > ie.recentlyCreatedOwnerStacks++;
|
|
269
|
-
return
|
|
270
|
-
|
|
269
|
+
return p(
|
|
270
|
+
x,
|
|
271
271
|
y,
|
|
272
272
|
E,
|
|
273
273
|
!0,
|
|
274
274
|
_,
|
|
275
275
|
F,
|
|
276
276
|
z ? Error("react-stack-top-frame") : Q,
|
|
277
|
-
z ? O(o(
|
|
277
|
+
z ? O(o(x)) : pe
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
280
|
}()), Ae;
|
|
@@ -453,7 +453,7 @@ const me = {
|
|
|
453
453
|
peer: "peer-checked:border-color-rose-500 peer-checked:text-color-rose-500",
|
|
454
454
|
text: "text-color-rose-500"
|
|
455
455
|
}
|
|
456
|
-
},
|
|
456
|
+
}, Ri = (e) => {
|
|
457
457
|
Object.assign(me, e);
|
|
458
458
|
}, St = {
|
|
459
459
|
dark: {
|
|
@@ -605,7 +605,7 @@ const me = {
|
|
|
605
605
|
}
|
|
606
606
|
}, _i = (e) => {
|
|
607
607
|
Object.assign(St, e);
|
|
608
|
-
},
|
|
608
|
+
}, $t = ({
|
|
609
609
|
title: e,
|
|
610
610
|
children: n,
|
|
611
611
|
variant: t = "filled",
|
|
@@ -615,12 +615,12 @@ const me = {
|
|
|
615
615
|
onClick: l,
|
|
616
616
|
className: s = "",
|
|
617
617
|
fullWidth: c = !1,
|
|
618
|
-
disabled:
|
|
619
|
-
roundedFull:
|
|
620
|
-
size:
|
|
618
|
+
disabled: u = !1,
|
|
619
|
+
roundedFull: p = !1,
|
|
620
|
+
size: m = "medium",
|
|
621
621
|
type: d = "button",
|
|
622
622
|
autoFocus: g = !1,
|
|
623
|
-
href:
|
|
623
|
+
href: v,
|
|
624
624
|
target: f,
|
|
625
625
|
...h
|
|
626
626
|
}) => {
|
|
@@ -631,20 +631,20 @@ const me = {
|
|
|
631
631
|
const H = document.createElement("span"), N = T.getBoundingClientRect(), ee = Math.max(N.width, N.height);
|
|
632
632
|
H.style.width = H.style.height = `${ee}px`, H.style.left = `${I.clientX - N.left - ee / 2}px`, H.style.top = `${I.clientY - N.top - ee / 2}px`, H.className = "ripple", T.appendChild(H), setTimeout(() => H.remove(), 600), l == null || l(I);
|
|
633
633
|
}, L = ((b = me[o]) == null ? void 0 : b[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
|
|
634
|
-
return /* @__PURE__ */ a.jsx(a.Fragment, { children:
|
|
634
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: v ? /* @__PURE__ */ a.jsxs(
|
|
635
635
|
"a",
|
|
636
636
|
{
|
|
637
637
|
ref: M,
|
|
638
|
-
href:
|
|
638
|
+
href: v,
|
|
639
639
|
target: f,
|
|
640
640
|
className: `relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
641
641
|
${t === "outlined" && "border"}
|
|
642
642
|
${L}
|
|
643
643
|
${s}
|
|
644
|
-
${
|
|
644
|
+
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
645
645
|
${c ? "w-full" : ""}
|
|
646
|
-
${
|
|
647
|
-
${
|
|
646
|
+
${p ? "rounded-full" : "rounded-md"}
|
|
647
|
+
${u ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
648
648
|
`,
|
|
649
649
|
children: [
|
|
650
650
|
r && /* @__PURE__ */ a.jsx("span", { className: "mr-1", children: r }),
|
|
@@ -657,16 +657,16 @@ const me = {
|
|
|
657
657
|
{
|
|
658
658
|
ref: C,
|
|
659
659
|
type: d,
|
|
660
|
-
disabled:
|
|
660
|
+
disabled: u,
|
|
661
661
|
onClick: w,
|
|
662
662
|
className: `relative leading-none font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
663
663
|
${t === "outlined" && "border"}
|
|
664
664
|
${L}
|
|
665
665
|
${s}
|
|
666
|
-
${
|
|
666
|
+
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
667
667
|
${c ? "w-full" : ""}
|
|
668
|
-
${
|
|
669
|
-
${
|
|
668
|
+
${p ? "rounded-full" : "rounded-md"}
|
|
669
|
+
${u ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
670
670
|
`,
|
|
671
671
|
autoFocus: g,
|
|
672
672
|
...h,
|
|
@@ -744,8 +744,8 @@ const me = {
|
|
|
744
744
|
}) => {
|
|
745
745
|
const [i, l] = W(!1), s = le(null);
|
|
746
746
|
return se(() => {
|
|
747
|
-
const c = (
|
|
748
|
-
s.current && !s.current.contains(
|
|
747
|
+
const c = (u) => {
|
|
748
|
+
s.current && !s.current.contains(u.target) && l(!1);
|
|
749
749
|
};
|
|
750
750
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
751
751
|
}, []), /* @__PURE__ */ a.jsxs("div", { ref: s, className: "relative inline-block w-full", children: [
|
|
@@ -763,9 +763,9 @@ const me = {
|
|
|
763
763
|
i && /* @__PURE__ */ a.jsx(
|
|
764
764
|
"ul",
|
|
765
765
|
{
|
|
766
|
-
className: `absolute mt-2 right-0 z-10 w-full rounded-xl bg-color-white shadow-lg shadow-color-zinc-200 border border-color-gray-100 py-2 ${o}`,
|
|
767
|
-
children: n.map((c,
|
|
768
|
-
const
|
|
766
|
+
className: `absolute mt-2 right-0 z-10 w-full rounded-xl bg-color-white shadow-lg shadow-color-zinc-200 dark:shadow-color-gray-900 border border-color-gray-100 py-2 ${o}`,
|
|
767
|
+
children: n.map((c, u) => {
|
|
768
|
+
const p = c.label === (e == null ? void 0 : e.label);
|
|
769
769
|
return /* @__PURE__ */ a.jsx(
|
|
770
770
|
"li",
|
|
771
771
|
{
|
|
@@ -776,12 +776,12 @@ const me = {
|
|
|
776
776
|
"div",
|
|
777
777
|
{
|
|
778
778
|
className: `block cursor-pointer w-full px-4 py-2 text-left text-sm text-color-gray-700
|
|
779
|
-
${
|
|
779
|
+
${p ? " bg-color-gray-200" : " hover:bg-color-gray-100 "}`,
|
|
780
780
|
children: c.label
|
|
781
781
|
}
|
|
782
782
|
)
|
|
783
783
|
},
|
|
784
|
-
|
|
784
|
+
u
|
|
785
785
|
);
|
|
786
786
|
})
|
|
787
787
|
}
|
|
@@ -801,7 +801,7 @@ var Gt;
|
|
|
801
801
|
function lo() {
|
|
802
802
|
if (Gt) return te;
|
|
803
803
|
Gt = 1;
|
|
804
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111,
|
|
804
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
805
805
|
function w(b) {
|
|
806
806
|
if (typeof b == "object" && b !== null) {
|
|
807
807
|
var I = b.$$typeof;
|
|
@@ -809,17 +809,17 @@ function lo() {
|
|
|
809
809
|
case n:
|
|
810
810
|
switch (b = b.type, b) {
|
|
811
811
|
case c:
|
|
812
|
-
case
|
|
812
|
+
case u:
|
|
813
813
|
case o:
|
|
814
814
|
case i:
|
|
815
815
|
case r:
|
|
816
|
-
case
|
|
816
|
+
case m:
|
|
817
817
|
return b;
|
|
818
818
|
default:
|
|
819
819
|
switch (b = b && b.$$typeof, b) {
|
|
820
820
|
case s:
|
|
821
|
-
case
|
|
822
|
-
case
|
|
821
|
+
case p:
|
|
822
|
+
case v:
|
|
823
823
|
case g:
|
|
824
824
|
case l:
|
|
825
825
|
return b;
|
|
@@ -833,9 +833,9 @@ function lo() {
|
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
function L(b) {
|
|
836
|
-
return w(b) ===
|
|
836
|
+
return w(b) === u;
|
|
837
837
|
}
|
|
838
|
-
return te.AsyncMode = c, te.ConcurrentMode =
|
|
838
|
+
return te.AsyncMode = c, te.ConcurrentMode = u, te.ContextConsumer = s, te.ContextProvider = l, te.Element = n, te.ForwardRef = p, te.Fragment = o, te.Lazy = v, te.Memo = g, te.Portal = t, te.Profiler = i, te.StrictMode = r, te.Suspense = m, te.isAsyncMode = function(b) {
|
|
839
839
|
return L(b) || w(b) === c;
|
|
840
840
|
}, te.isConcurrentMode = L, te.isContextConsumer = function(b) {
|
|
841
841
|
return w(b) === s;
|
|
@@ -844,11 +844,11 @@ function lo() {
|
|
|
844
844
|
}, te.isElement = function(b) {
|
|
845
845
|
return typeof b == "object" && b !== null && b.$$typeof === n;
|
|
846
846
|
}, te.isForwardRef = function(b) {
|
|
847
|
-
return w(b) ===
|
|
847
|
+
return w(b) === p;
|
|
848
848
|
}, te.isFragment = function(b) {
|
|
849
849
|
return w(b) === o;
|
|
850
850
|
}, te.isLazy = function(b) {
|
|
851
|
-
return w(b) ===
|
|
851
|
+
return w(b) === v;
|
|
852
852
|
}, te.isMemo = function(b) {
|
|
853
853
|
return w(b) === g;
|
|
854
854
|
}, te.isPortal = function(b) {
|
|
@@ -858,9 +858,9 @@ function lo() {
|
|
|
858
858
|
}, te.isStrictMode = function(b) {
|
|
859
859
|
return w(b) === r;
|
|
860
860
|
}, te.isSuspense = function(b) {
|
|
861
|
-
return w(b) ===
|
|
861
|
+
return w(b) === m;
|
|
862
862
|
}, te.isValidElementType = function(b) {
|
|
863
|
-
return typeof b == "string" || typeof b == "function" || b === o || b ===
|
|
863
|
+
return typeof b == "string" || typeof b == "function" || b === o || b === u || b === i || b === r || b === m || b === d || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === g || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof === h || b.$$typeof === C || b.$$typeof === M || b.$$typeof === f);
|
|
864
864
|
}, te.typeOf = w, te;
|
|
865
865
|
}
|
|
866
866
|
var ne = {};
|
|
@@ -875,49 +875,49 @@ var ne = {};
|
|
|
875
875
|
var Zt;
|
|
876
876
|
function so() {
|
|
877
877
|
return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
878
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111,
|
|
878
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
879
879
|
function w(S) {
|
|
880
880
|
return typeof S == "string" || typeof S == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
881
|
-
S === o || S ===
|
|
881
|
+
S === o || S === u || S === i || S === r || S === m || S === d || typeof S == "object" && S !== null && (S.$$typeof === v || S.$$typeof === g || S.$$typeof === l || S.$$typeof === s || S.$$typeof === p || S.$$typeof === h || S.$$typeof === C || S.$$typeof === M || S.$$typeof === f);
|
|
882
882
|
}
|
|
883
883
|
function L(S) {
|
|
884
884
|
if (typeof S == "object" && S !== null) {
|
|
885
|
-
var
|
|
886
|
-
switch (
|
|
885
|
+
var $ = S.$$typeof;
|
|
886
|
+
switch ($) {
|
|
887
887
|
case n:
|
|
888
888
|
var X = S.type;
|
|
889
889
|
switch (X) {
|
|
890
890
|
case c:
|
|
891
|
-
case
|
|
891
|
+
case u:
|
|
892
892
|
case o:
|
|
893
893
|
case i:
|
|
894
894
|
case r:
|
|
895
|
-
case
|
|
895
|
+
case m:
|
|
896
896
|
return X;
|
|
897
897
|
default:
|
|
898
898
|
var J = X && X.$$typeof;
|
|
899
899
|
switch (J) {
|
|
900
900
|
case s:
|
|
901
|
-
case
|
|
902
|
-
case
|
|
901
|
+
case p:
|
|
902
|
+
case v:
|
|
903
903
|
case g:
|
|
904
904
|
case l:
|
|
905
905
|
return J;
|
|
906
906
|
default:
|
|
907
|
-
return
|
|
907
|
+
return $;
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
case t:
|
|
911
|
-
return
|
|
911
|
+
return $;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
var b = c, I =
|
|
915
|
+
var b = c, I = u, T = s, H = l, N = n, ee = p, ie = o, ce = v, U = g, O = t, Y = i, D = r, Q = m, pe = !1;
|
|
916
916
|
function K(S) {
|
|
917
|
-
return pe || (pe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
917
|
+
return pe || (pe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(S) || L(S) === c;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
return L(S) ===
|
|
919
|
+
function x(S) {
|
|
920
|
+
return L(S) === u;
|
|
921
921
|
}
|
|
922
922
|
function y(S) {
|
|
923
923
|
return L(S) === s;
|
|
@@ -929,18 +929,18 @@ function so() {
|
|
|
929
929
|
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
930
930
|
}
|
|
931
931
|
function F(S) {
|
|
932
|
-
return L(S) ===
|
|
932
|
+
return L(S) === p;
|
|
933
933
|
}
|
|
934
934
|
function z(S) {
|
|
935
935
|
return L(S) === o;
|
|
936
936
|
}
|
|
937
937
|
function A(S) {
|
|
938
|
-
return L(S) ===
|
|
938
|
+
return L(S) === v;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function k(S) {
|
|
941
941
|
return L(S) === g;
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function R(S) {
|
|
944
944
|
return L(S) === t;
|
|
945
945
|
}
|
|
946
946
|
function V(S) {
|
|
@@ -950,13 +950,13 @@ function so() {
|
|
|
950
950
|
return L(S) === r;
|
|
951
951
|
}
|
|
952
952
|
function j(S) {
|
|
953
|
-
return L(S) ===
|
|
953
|
+
return L(S) === m;
|
|
954
954
|
}
|
|
955
|
-
ne.AsyncMode = b, ne.ConcurrentMode = I, ne.ContextConsumer = T, ne.ContextProvider = H, ne.Element = N, ne.ForwardRef = ee, ne.Fragment = ie, ne.Lazy = ce, ne.Memo = U, ne.Portal = O, ne.Profiler = Y, ne.StrictMode = D, ne.Suspense = Q, ne.isAsyncMode = K, ne.isConcurrentMode =
|
|
955
|
+
ne.AsyncMode = b, ne.ConcurrentMode = I, ne.ContextConsumer = T, ne.ContextProvider = H, ne.Element = N, ne.ForwardRef = ee, ne.Fragment = ie, ne.Lazy = ce, ne.Memo = U, ne.Portal = O, ne.Profiler = Y, ne.StrictMode = D, ne.Suspense = Q, ne.isAsyncMode = K, ne.isConcurrentMode = x, ne.isContextConsumer = y, ne.isContextProvider = E, ne.isElement = _, ne.isForwardRef = F, ne.isFragment = z, ne.isLazy = A, ne.isMemo = k, ne.isPortal = R, ne.isProfiler = V, ne.isStrictMode = q, ne.isSuspense = j, ne.isValidElementType = w, ne.typeOf = L;
|
|
956
956
|
}()), ne;
|
|
957
957
|
}
|
|
958
958
|
var Yt;
|
|
959
|
-
function
|
|
959
|
+
function kn() {
|
|
960
960
|
return Yt || (Yt = 1, process.env.NODE_ENV === "production" ? Ge.exports = lo() : Ge.exports = so()), Ge.exports;
|
|
961
961
|
}
|
|
962
962
|
/*
|
|
@@ -983,28 +983,28 @@ function co() {
|
|
|
983
983
|
return !1;
|
|
984
984
|
for (var l = {}, s = 0; s < 10; s++)
|
|
985
985
|
l["_" + String.fromCharCode(s)] = s;
|
|
986
|
-
var c = Object.getOwnPropertyNames(l).map(function(
|
|
987
|
-
return l[
|
|
986
|
+
var c = Object.getOwnPropertyNames(l).map(function(p) {
|
|
987
|
+
return l[p];
|
|
988
988
|
});
|
|
989
989
|
if (c.join("") !== "0123456789")
|
|
990
990
|
return !1;
|
|
991
|
-
var
|
|
992
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
993
|
-
p
|
|
994
|
-
}), Object.keys(Object.assign({},
|
|
991
|
+
var u = {};
|
|
992
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(p) {
|
|
993
|
+
u[p] = p;
|
|
994
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
995
995
|
} catch {
|
|
996
996
|
return !1;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
return ct = r() ? Object.assign : function(i, l) {
|
|
1000
|
-
for (var s, c = o(i),
|
|
1001
|
-
s = Object(arguments[
|
|
1002
|
-
for (var
|
|
1003
|
-
n.call(s,
|
|
1000
|
+
for (var s, c = o(i), u, p = 1; p < arguments.length; p++) {
|
|
1001
|
+
s = Object(arguments[p]);
|
|
1002
|
+
for (var m in s)
|
|
1003
|
+
n.call(s, m) && (c[m] = s[m]);
|
|
1004
1004
|
if (e) {
|
|
1005
|
-
|
|
1006
|
-
for (var d = 0; d <
|
|
1007
|
-
t.call(s,
|
|
1005
|
+
u = e(s);
|
|
1006
|
+
for (var d = 0; d < u.length; d++)
|
|
1007
|
+
t.call(s, u[d]) && (c[u[d]] = s[u[d]]);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
return c;
|
|
@@ -1018,7 +1018,7 @@ function Dt() {
|
|
|
1018
1018
|
return ut = e, ut;
|
|
1019
1019
|
}
|
|
1020
1020
|
var pt, Kt;
|
|
1021
|
-
function
|
|
1021
|
+
function Rn() {
|
|
1022
1022
|
return Kt || (Kt = 1, pt = Function.call.bind(Object.prototype.hasOwnProperty)), pt;
|
|
1023
1023
|
}
|
|
1024
1024
|
var dt, Xt;
|
|
@@ -1028,7 +1028,7 @@ function uo() {
|
|
|
1028
1028
|
var e = function() {
|
|
1029
1029
|
};
|
|
1030
1030
|
if (process.env.NODE_ENV !== "production") {
|
|
1031
|
-
var n = /* @__PURE__ */ Dt(), t = {}, o = /* @__PURE__ */
|
|
1031
|
+
var n = /* @__PURE__ */ Dt(), t = {}, o = /* @__PURE__ */ Rn();
|
|
1032
1032
|
e = function(i) {
|
|
1033
1033
|
var l = "Warning: " + i;
|
|
1034
1034
|
typeof console < "u" && console.error(l);
|
|
@@ -1038,29 +1038,29 @@ function uo() {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
function r(i, l, s, c,
|
|
1041
|
+
function r(i, l, s, c, u) {
|
|
1042
1042
|
if (process.env.NODE_ENV !== "production") {
|
|
1043
|
-
for (var
|
|
1044
|
-
if (o(i,
|
|
1045
|
-
var
|
|
1043
|
+
for (var p in i)
|
|
1044
|
+
if (o(i, p)) {
|
|
1045
|
+
var m;
|
|
1046
1046
|
try {
|
|
1047
|
-
if (typeof i[
|
|
1047
|
+
if (typeof i[p] != "function") {
|
|
1048
1048
|
var d = Error(
|
|
1049
|
-
(c || "React class") + ": " + s + " type `" +
|
|
1049
|
+
(c || "React class") + ": " + s + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1050
1050
|
);
|
|
1051
1051
|
throw d.name = "Invariant Violation", d;
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1054
|
-
} catch (
|
|
1055
|
-
|
|
1053
|
+
m = i[p](l, p, c, s, null, n);
|
|
1054
|
+
} catch (v) {
|
|
1055
|
+
m = v;
|
|
1056
1056
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
(c || "React class") + ": type specification of " + s + " `" +
|
|
1059
|
-
),
|
|
1060
|
-
t[
|
|
1061
|
-
var g =
|
|
1057
|
+
if (m && !(m instanceof Error) && e(
|
|
1058
|
+
(c || "React class") + ": type specification of " + s + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof m + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1059
|
+
), m instanceof Error && !(m.message in t)) {
|
|
1060
|
+
t[m.message] = !0;
|
|
1061
|
+
var g = u ? u() : "";
|
|
1062
1062
|
e(
|
|
1063
|
-
"Failed " + s + " type: " +
|
|
1063
|
+
"Failed " + s + " type: " + m.message + (g ?? "")
|
|
1064
1064
|
);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
@@ -1074,7 +1074,7 @@ var gt, Jt;
|
|
|
1074
1074
|
function po() {
|
|
1075
1075
|
if (Jt) return gt;
|
|
1076
1076
|
Jt = 1;
|
|
1077
|
-
var e =
|
|
1077
|
+
var e = kn(), n = co(), t = /* @__PURE__ */ Dt(), o = /* @__PURE__ */ Rn(), r = /* @__PURE__ */ uo(), i = function() {
|
|
1078
1078
|
};
|
|
1079
1079
|
process.env.NODE_ENV !== "production" && (i = function(s) {
|
|
1080
1080
|
var c = "Warning: " + s;
|
|
@@ -1088,9 +1088,9 @@ function po() {
|
|
|
1088
1088
|
return null;
|
|
1089
1089
|
}
|
|
1090
1090
|
return gt = function(s, c) {
|
|
1091
|
-
var
|
|
1092
|
-
function
|
|
1093
|
-
var y =
|
|
1091
|
+
var u = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
|
|
1092
|
+
function m(x) {
|
|
1093
|
+
var y = x && (u && x[u] || x[p]);
|
|
1094
1094
|
if (typeof y == "function")
|
|
1095
1095
|
return y;
|
|
1096
1096
|
}
|
|
@@ -1115,44 +1115,44 @@ function po() {
|
|
|
1115
1115
|
shape: ce,
|
|
1116
1116
|
exact: U
|
|
1117
1117
|
};
|
|
1118
|
-
function x
|
|
1119
|
-
return
|
|
1118
|
+
function v(x, y) {
|
|
1119
|
+
return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
|
|
1120
1120
|
}
|
|
1121
|
-
function f(
|
|
1122
|
-
this.message =
|
|
1121
|
+
function f(x, y) {
|
|
1122
|
+
this.message = x, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
1123
1123
|
}
|
|
1124
1124
|
f.prototype = Error.prototype;
|
|
1125
|
-
function h(
|
|
1125
|
+
function h(x) {
|
|
1126
1126
|
if (process.env.NODE_ENV !== "production")
|
|
1127
1127
|
var y = {}, E = 0;
|
|
1128
|
-
function _(z, A, R,
|
|
1129
|
-
if (
|
|
1128
|
+
function _(z, A, k, R, V, q, j) {
|
|
1129
|
+
if (R = R || d, q = q || k, j !== t) {
|
|
1130
1130
|
if (c) {
|
|
1131
1131
|
var S = new Error(
|
|
1132
1132
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1133
1133
|
);
|
|
1134
1134
|
throw S.name = "Invariant Violation", S;
|
|
1135
1135
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1136
|
-
var
|
|
1137
|
-
!y[
|
|
1136
|
+
var $ = R + ":" + k;
|
|
1137
|
+
!y[$] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1138
1138
|
E < 3 && (i(
|
|
1139
|
-
"You are manually calling a React.PropTypes validation function for the `" + q + "` prop on `" +
|
|
1140
|
-
), y[
|
|
1139
|
+
"You are manually calling a React.PropTypes validation function for the `" + q + "` prop on `" + R + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1140
|
+
), y[$] = !0, E++);
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
return A[
|
|
1143
|
+
return A[k] == null ? z ? A[k] === null ? new f("The " + V + " `" + q + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new f("The " + V + " `" + q + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : x(A, k, R, V, q);
|
|
1144
1144
|
}
|
|
1145
1145
|
var F = _.bind(null, !1);
|
|
1146
1146
|
return F.isRequired = _.bind(null, !0), F;
|
|
1147
1147
|
}
|
|
1148
|
-
function C(
|
|
1149
|
-
function y(E, _, F, z, A,
|
|
1150
|
-
var
|
|
1151
|
-
if (V !==
|
|
1152
|
-
var q = Q(
|
|
1148
|
+
function C(x) {
|
|
1149
|
+
function y(E, _, F, z, A, k) {
|
|
1150
|
+
var R = E[_], V = D(R);
|
|
1151
|
+
if (V !== x) {
|
|
1152
|
+
var q = Q(R);
|
|
1153
1153
|
return new f(
|
|
1154
|
-
"Invalid " + z + " `" + A + "` of type " + ("`" + q + "` supplied to `" + F + "`, expected ") + ("`" +
|
|
1155
|
-
{ expectedType:
|
|
1154
|
+
"Invalid " + z + " `" + A + "` of type " + ("`" + q + "` supplied to `" + F + "`, expected ") + ("`" + x + "`."),
|
|
1155
|
+
{ expectedType: x }
|
|
1156
1156
|
);
|
|
1157
1157
|
}
|
|
1158
1158
|
return null;
|
|
@@ -1162,17 +1162,17 @@ function po() {
|
|
|
1162
1162
|
function M() {
|
|
1163
1163
|
return h(l);
|
|
1164
1164
|
}
|
|
1165
|
-
function w(
|
|
1165
|
+
function w(x) {
|
|
1166
1166
|
function y(E, _, F, z, A) {
|
|
1167
|
-
if (typeof
|
|
1167
|
+
if (typeof x != "function")
|
|
1168
1168
|
return new f("Property `" + A + "` of component `" + F + "` has invalid PropType notation inside arrayOf.");
|
|
1169
|
-
var
|
|
1170
|
-
if (!Array.isArray(
|
|
1171
|
-
var
|
|
1172
|
-
return new f("Invalid " + z + " `" + A + "` of type " + ("`" +
|
|
1169
|
+
var k = E[_];
|
|
1170
|
+
if (!Array.isArray(k)) {
|
|
1171
|
+
var R = D(k);
|
|
1172
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + R + "` supplied to `" + F + "`, expected an array."));
|
|
1173
1173
|
}
|
|
1174
|
-
for (var V = 0; V <
|
|
1175
|
-
var q =
|
|
1174
|
+
for (var V = 0; V < k.length; V++) {
|
|
1175
|
+
var q = x(k, V, F, z, A + "[" + V + "]", t);
|
|
1176
1176
|
if (q instanceof Error)
|
|
1177
1177
|
return q;
|
|
1178
1178
|
}
|
|
@@ -1181,64 +1181,64 @@ function po() {
|
|
|
1181
1181
|
return h(y);
|
|
1182
1182
|
}
|
|
1183
1183
|
function L() {
|
|
1184
|
-
function
|
|
1184
|
+
function x(y, E, _, F, z) {
|
|
1185
1185
|
var A = y[E];
|
|
1186
1186
|
if (!s(A)) {
|
|
1187
|
-
var
|
|
1188
|
-
return new f("Invalid " + F + " `" + z + "` of type " + ("`" +
|
|
1187
|
+
var k = D(A);
|
|
1188
|
+
return new f("Invalid " + F + " `" + z + "` of type " + ("`" + k + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
1189
1189
|
}
|
|
1190
1190
|
return null;
|
|
1191
1191
|
}
|
|
1192
|
-
return h(
|
|
1192
|
+
return h(x);
|
|
1193
1193
|
}
|
|
1194
1194
|
function b() {
|
|
1195
|
-
function
|
|
1195
|
+
function x(y, E, _, F, z) {
|
|
1196
1196
|
var A = y[E];
|
|
1197
1197
|
if (!e.isValidElementType(A)) {
|
|
1198
|
-
var
|
|
1199
|
-
return new f("Invalid " + F + " `" + z + "` of type " + ("`" +
|
|
1198
|
+
var k = D(A);
|
|
1199
|
+
return new f("Invalid " + F + " `" + z + "` of type " + ("`" + k + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
1200
1200
|
}
|
|
1201
1201
|
return null;
|
|
1202
1202
|
}
|
|
1203
|
-
return h(
|
|
1203
|
+
return h(x);
|
|
1204
1204
|
}
|
|
1205
|
-
function I(
|
|
1205
|
+
function I(x) {
|
|
1206
1206
|
function y(E, _, F, z, A) {
|
|
1207
|
-
if (!(E[_] instanceof
|
|
1208
|
-
var
|
|
1209
|
-
return new f("Invalid " + z + " `" + A + "` of type " + ("`" +
|
|
1207
|
+
if (!(E[_] instanceof x)) {
|
|
1208
|
+
var k = x.name || d, R = K(E[_]);
|
|
1209
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + R + "` supplied to `" + F + "`, expected ") + ("instance of `" + k + "`."));
|
|
1210
1210
|
}
|
|
1211
1211
|
return null;
|
|
1212
1212
|
}
|
|
1213
1213
|
return h(y);
|
|
1214
1214
|
}
|
|
1215
|
-
function T(
|
|
1216
|
-
if (!Array.isArray(
|
|
1215
|
+
function T(x) {
|
|
1216
|
+
if (!Array.isArray(x))
|
|
1217
1217
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1218
1218
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1219
1219
|
) : i("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
1220
1220
|
function y(E, _, F, z, A) {
|
|
1221
|
-
for (var
|
|
1222
|
-
if (
|
|
1221
|
+
for (var k = E[_], R = 0; R < x.length; R++)
|
|
1222
|
+
if (v(k, x[R]))
|
|
1223
1223
|
return null;
|
|
1224
|
-
var V = JSON.stringify(
|
|
1225
|
-
var
|
|
1226
|
-
return
|
|
1224
|
+
var V = JSON.stringify(x, function(j, S) {
|
|
1225
|
+
var $ = Q(S);
|
|
1226
|
+
return $ === "symbol" ? String(S) : S;
|
|
1227
1227
|
});
|
|
1228
|
-
return new f("Invalid " + z + " `" + A + "` of value `" + String(
|
|
1228
|
+
return new f("Invalid " + z + " `" + A + "` of value `" + String(k) + "` " + ("supplied to `" + F + "`, expected one of " + V + "."));
|
|
1229
1229
|
}
|
|
1230
1230
|
return h(y);
|
|
1231
1231
|
}
|
|
1232
|
-
function H(
|
|
1232
|
+
function H(x) {
|
|
1233
1233
|
function y(E, _, F, z, A) {
|
|
1234
|
-
if (typeof
|
|
1234
|
+
if (typeof x != "function")
|
|
1235
1235
|
return new f("Property `" + A + "` of component `" + F + "` has invalid PropType notation inside objectOf.");
|
|
1236
|
-
var
|
|
1237
|
-
if (
|
|
1238
|
-
return new f("Invalid " + z + " `" + A + "` of type " + ("`" +
|
|
1239
|
-
for (var V in
|
|
1240
|
-
if (o(
|
|
1241
|
-
var q =
|
|
1236
|
+
var k = E[_], R = D(k);
|
|
1237
|
+
if (R !== "object")
|
|
1238
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + R + "` supplied to `" + F + "`, expected an object."));
|
|
1239
|
+
for (var V in k)
|
|
1240
|
+
if (o(k, V)) {
|
|
1241
|
+
var q = x(k, V, F, z, A + "." + V, t);
|
|
1242
1242
|
if (q instanceof Error)
|
|
1243
1243
|
return q;
|
|
1244
1244
|
}
|
|
@@ -1246,49 +1246,49 @@ function po() {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
return h(y);
|
|
1248
1248
|
}
|
|
1249
|
-
function N(
|
|
1250
|
-
if (!Array.isArray(
|
|
1249
|
+
function N(x) {
|
|
1250
|
+
if (!Array.isArray(x))
|
|
1251
1251
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
1252
|
-
for (var y = 0; y <
|
|
1253
|
-
var E =
|
|
1252
|
+
for (var y = 0; y < x.length; y++) {
|
|
1253
|
+
var E = x[y];
|
|
1254
1254
|
if (typeof E != "function")
|
|
1255
1255
|
return i(
|
|
1256
1256
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + pe(E) + " at index " + y + "."
|
|
1257
1257
|
), l;
|
|
1258
1258
|
}
|
|
1259
|
-
function _(F, z, A,
|
|
1260
|
-
for (var V = [], q = 0; q <
|
|
1261
|
-
var j =
|
|
1259
|
+
function _(F, z, A, k, R) {
|
|
1260
|
+
for (var V = [], q = 0; q < x.length; q++) {
|
|
1261
|
+
var j = x[q], S = j(F, z, A, k, R, t);
|
|
1262
1262
|
if (S == null)
|
|
1263
1263
|
return null;
|
|
1264
1264
|
S.data && o(S.data, "expectedType") && V.push(S.data.expectedType);
|
|
1265
1265
|
}
|
|
1266
|
-
var
|
|
1267
|
-
return new f("Invalid " +
|
|
1266
|
+
var $ = V.length > 0 ? ", expected one of type [" + V.join(", ") + "]" : "";
|
|
1267
|
+
return new f("Invalid " + k + " `" + R + "` supplied to " + ("`" + A + "`" + $ + "."));
|
|
1268
1268
|
}
|
|
1269
1269
|
return h(_);
|
|
1270
1270
|
}
|
|
1271
1271
|
function ee() {
|
|
1272
|
-
function
|
|
1272
|
+
function x(y, E, _, F, z) {
|
|
1273
1273
|
return O(y[E]) ? null : new f("Invalid " + F + " `" + z + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
1274
1274
|
}
|
|
1275
|
-
return h(
|
|
1275
|
+
return h(x);
|
|
1276
1276
|
}
|
|
1277
|
-
function ie(
|
|
1277
|
+
function ie(x, y, E, _, F) {
|
|
1278
1278
|
return new f(
|
|
1279
|
-
(
|
|
1279
|
+
(x || "React class") + ": " + y + " type `" + E + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + F + "`."
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
|
-
function ce(
|
|
1282
|
+
function ce(x) {
|
|
1283
1283
|
function y(E, _, F, z, A) {
|
|
1284
|
-
var
|
|
1285
|
-
if (
|
|
1286
|
-
return new f("Invalid " + z + " `" + A + "` of type `" +
|
|
1287
|
-
for (var V in
|
|
1288
|
-
var q =
|
|
1284
|
+
var k = E[_], R = D(k);
|
|
1285
|
+
if (R !== "object")
|
|
1286
|
+
return new f("Invalid " + z + " `" + A + "` of type `" + R + "` " + ("supplied to `" + F + "`, expected `object`."));
|
|
1287
|
+
for (var V in x) {
|
|
1288
|
+
var q = x[V];
|
|
1289
1289
|
if (typeof q != "function")
|
|
1290
1290
|
return ie(F, z, A, V, Q(q));
|
|
1291
|
-
var j = q(
|
|
1291
|
+
var j = q(k, V, F, z, A + "." + V, t);
|
|
1292
1292
|
if (j)
|
|
1293
1293
|
return j;
|
|
1294
1294
|
}
|
|
@@ -1296,22 +1296,22 @@ function po() {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return h(y);
|
|
1298
1298
|
}
|
|
1299
|
-
function U(
|
|
1299
|
+
function U(x) {
|
|
1300
1300
|
function y(E, _, F, z, A) {
|
|
1301
|
-
var
|
|
1302
|
-
if (
|
|
1303
|
-
return new f("Invalid " + z + " `" + A + "` of type `" +
|
|
1304
|
-
var V = n({}, E[_],
|
|
1301
|
+
var k = E[_], R = D(k);
|
|
1302
|
+
if (R !== "object")
|
|
1303
|
+
return new f("Invalid " + z + " `" + A + "` of type `" + R + "` " + ("supplied to `" + F + "`, expected `object`."));
|
|
1304
|
+
var V = n({}, E[_], x);
|
|
1305
1305
|
for (var q in V) {
|
|
1306
|
-
var j =
|
|
1307
|
-
if (o(
|
|
1306
|
+
var j = x[q];
|
|
1307
|
+
if (o(x, q) && typeof j != "function")
|
|
1308
1308
|
return ie(F, z, A, q, Q(j));
|
|
1309
1309
|
if (!j)
|
|
1310
1310
|
return new f(
|
|
1311
1311
|
"Invalid " + z + " `" + A + "` key `" + q + "` supplied to `" + F + "`.\nBad object: " + JSON.stringify(E[_], null, " ") + `
|
|
1312
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1312
|
+
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1313
1313
|
);
|
|
1314
|
-
var S = j(
|
|
1314
|
+
var S = j(k, q, F, z, A + "." + q, t);
|
|
1315
1315
|
if (S)
|
|
1316
1316
|
return S;
|
|
1317
1317
|
}
|
|
@@ -1319,23 +1319,23 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1319
1319
|
}
|
|
1320
1320
|
return h(y);
|
|
1321
1321
|
}
|
|
1322
|
-
function O(
|
|
1323
|
-
switch (typeof
|
|
1322
|
+
function O(x) {
|
|
1323
|
+
switch (typeof x) {
|
|
1324
1324
|
case "number":
|
|
1325
1325
|
case "string":
|
|
1326
1326
|
case "undefined":
|
|
1327
1327
|
return !0;
|
|
1328
1328
|
case "boolean":
|
|
1329
|
-
return !
|
|
1329
|
+
return !x;
|
|
1330
1330
|
case "object":
|
|
1331
|
-
if (Array.isArray(
|
|
1332
|
-
return
|
|
1333
|
-
if (
|
|
1331
|
+
if (Array.isArray(x))
|
|
1332
|
+
return x.every(O);
|
|
1333
|
+
if (x === null || s(x))
|
|
1334
1334
|
return !0;
|
|
1335
|
-
var y =
|
|
1335
|
+
var y = m(x);
|
|
1336
1336
|
if (y) {
|
|
1337
|
-
var E = y.call(
|
|
1338
|
-
if (y !==
|
|
1337
|
+
var E = y.call(x), _;
|
|
1338
|
+
if (y !== x.entries) {
|
|
1339
1339
|
for (; !(_ = E.next()).done; )
|
|
1340
1340
|
if (!O(_.value))
|
|
1341
1341
|
return !1;
|
|
@@ -1352,27 +1352,27 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1352
1352
|
return !1;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function Y(
|
|
1356
|
-
return
|
|
1355
|
+
function Y(x, y) {
|
|
1356
|
+
return x === "symbol" ? !0 : y ? y["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && y instanceof Symbol : !1;
|
|
1357
1357
|
}
|
|
1358
|
-
function D(
|
|
1359
|
-
var y = typeof
|
|
1360
|
-
return Array.isArray(
|
|
1358
|
+
function D(x) {
|
|
1359
|
+
var y = typeof x;
|
|
1360
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Y(y, x) ? "symbol" : y;
|
|
1361
1361
|
}
|
|
1362
|
-
function Q(
|
|
1363
|
-
if (typeof
|
|
1364
|
-
return "" +
|
|
1365
|
-
var y = D(
|
|
1362
|
+
function Q(x) {
|
|
1363
|
+
if (typeof x > "u" || x === null)
|
|
1364
|
+
return "" + x;
|
|
1365
|
+
var y = D(x);
|
|
1366
1366
|
if (y === "object") {
|
|
1367
|
-
if (
|
|
1367
|
+
if (x instanceof Date)
|
|
1368
1368
|
return "date";
|
|
1369
|
-
if (
|
|
1369
|
+
if (x instanceof RegExp)
|
|
1370
1370
|
return "regexp";
|
|
1371
1371
|
}
|
|
1372
1372
|
return y;
|
|
1373
1373
|
}
|
|
1374
|
-
function pe(
|
|
1375
|
-
var y = Q(
|
|
1374
|
+
function pe(x) {
|
|
1375
|
+
var y = Q(x);
|
|
1376
1376
|
switch (y) {
|
|
1377
1377
|
case "array":
|
|
1378
1378
|
case "object":
|
|
@@ -1385,8 +1385,8 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1385
1385
|
return y;
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
function K(
|
|
1389
|
-
return !
|
|
1388
|
+
function K(x) {
|
|
1389
|
+
return !x.constructor || !x.constructor.name ? d : x.constructor.name;
|
|
1390
1390
|
}
|
|
1391
1391
|
return g.checkPropTypes = r, g.resetWarningCache = r.resetWarningCache, g.PropTypes = g, g;
|
|
1392
1392
|
}, gt;
|
|
@@ -1401,8 +1401,8 @@ function go() {
|
|
|
1401
1401
|
function t() {
|
|
1402
1402
|
}
|
|
1403
1403
|
return t.resetWarningCache = n, ft = function() {
|
|
1404
|
-
function o(l, s, c,
|
|
1405
|
-
if (
|
|
1404
|
+
function o(l, s, c, u, p, m) {
|
|
1405
|
+
if (m !== e) {
|
|
1406
1406
|
var d = new Error(
|
|
1407
1407
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1408
1408
|
);
|
|
@@ -1443,14 +1443,14 @@ var en;
|
|
|
1443
1443
|
function fo() {
|
|
1444
1444
|
if (en) return Be.exports;
|
|
1445
1445
|
if (en = 1, process.env.NODE_ENV !== "production") {
|
|
1446
|
-
var e =
|
|
1446
|
+
var e = kn(), n = !0;
|
|
1447
1447
|
Be.exports = /* @__PURE__ */ po()(e.isElement, n);
|
|
1448
1448
|
} else
|
|
1449
1449
|
Be.exports = /* @__PURE__ */ go()();
|
|
1450
1450
|
return Be.exports;
|
|
1451
1451
|
}
|
|
1452
1452
|
var mo = /* @__PURE__ */ fo();
|
|
1453
|
-
const re = /* @__PURE__ */
|
|
1453
|
+
const re = /* @__PURE__ */ $n(mo);
|
|
1454
1454
|
function _e(e, n, t, o) {
|
|
1455
1455
|
function r(i) {
|
|
1456
1456
|
return i instanceof t ? i : new t(function(l) {
|
|
@@ -1458,24 +1458,24 @@ function _e(e, n, t, o) {
|
|
|
1458
1458
|
});
|
|
1459
1459
|
}
|
|
1460
1460
|
return new (t || (t = Promise))(function(i, l) {
|
|
1461
|
-
function s(
|
|
1461
|
+
function s(p) {
|
|
1462
1462
|
try {
|
|
1463
|
-
|
|
1464
|
-
} catch (
|
|
1465
|
-
l(
|
|
1463
|
+
u(o.next(p));
|
|
1464
|
+
} catch (m) {
|
|
1465
|
+
l(m);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
function c(
|
|
1468
|
+
function c(p) {
|
|
1469
1469
|
try {
|
|
1470
|
-
|
|
1471
|
-
} catch (
|
|
1472
|
-
l(
|
|
1470
|
+
u(o.throw(p));
|
|
1471
|
+
} catch (m) {
|
|
1472
|
+
l(m);
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
function p
|
|
1476
|
-
|
|
1475
|
+
function u(p) {
|
|
1476
|
+
p.done ? i(p.value) : r(p.value).then(s, c);
|
|
1477
1477
|
}
|
|
1478
|
-
|
|
1478
|
+
u((o = o.apply(e, n || [])).next());
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
1481
|
const xo = /* @__PURE__ */ new Map([
|
|
@@ -2728,7 +2728,7 @@ function Je(e) {
|
|
|
2728
2728
|
return typeof e == "object" && e !== null;
|
|
2729
2729
|
}
|
|
2730
2730
|
function Co(e) {
|
|
2731
|
-
return
|
|
2731
|
+
return kt(e.target.files).map((n) => Le(n));
|
|
2732
2732
|
}
|
|
2733
2733
|
function jo(e) {
|
|
2734
2734
|
return _e(this, void 0, void 0, function* () {
|
|
@@ -2738,19 +2738,19 @@ function jo(e) {
|
|
|
2738
2738
|
function So(e, n) {
|
|
2739
2739
|
return _e(this, void 0, void 0, function* () {
|
|
2740
2740
|
if (e.items) {
|
|
2741
|
-
const t =
|
|
2741
|
+
const t = kt(e.items).filter((r) => r.kind === "file");
|
|
2742
2742
|
if (n !== "drop")
|
|
2743
2743
|
return t;
|
|
2744
|
-
const o = yield Promise.all(t.map(
|
|
2744
|
+
const o = yield Promise.all(t.map($o));
|
|
2745
2745
|
return nn(_n(o));
|
|
2746
2746
|
}
|
|
2747
|
-
return nn(
|
|
2747
|
+
return nn(kt(e.files).map((t) => Le(t)));
|
|
2748
2748
|
});
|
|
2749
2749
|
}
|
|
2750
2750
|
function nn(e) {
|
|
2751
2751
|
return e.filter((n) => ho.indexOf(n.name) === -1);
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function kt(e) {
|
|
2754
2754
|
if (e === null)
|
|
2755
2755
|
return [];
|
|
2756
2756
|
const n = [];
|
|
@@ -2760,7 +2760,7 @@ function Rt(e) {
|
|
|
2760
2760
|
}
|
|
2761
2761
|
return n;
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2763
|
+
function $o(e) {
|
|
2764
2764
|
if (typeof e.webkitGetAsEntry != "function")
|
|
2765
2765
|
return on(e);
|
|
2766
2766
|
const n = e.webkitGetAsEntry();
|
|
@@ -2790,9 +2790,9 @@ function on(e, n) {
|
|
|
2790
2790
|
return Le(o, (t = n == null ? void 0 : n.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
2791
2791
|
});
|
|
2792
2792
|
}
|
|
2793
|
-
function
|
|
2793
|
+
function ko(e) {
|
|
2794
2794
|
return _e(this, void 0, void 0, function* () {
|
|
2795
|
-
return e.isDirectory ? En(e) :
|
|
2795
|
+
return e.isDirectory ? En(e) : Ro(e);
|
|
2796
2796
|
});
|
|
2797
2797
|
}
|
|
2798
2798
|
function En(e) {
|
|
@@ -2802,7 +2802,7 @@ function En(e) {
|
|
|
2802
2802
|
function i() {
|
|
2803
2803
|
n.readEntries((l) => _e(this, void 0, void 0, function* () {
|
|
2804
2804
|
if (l.length) {
|
|
2805
|
-
const s = Promise.all(l.map(
|
|
2805
|
+
const s = Promise.all(l.map(ko));
|
|
2806
2806
|
r.push(s), i();
|
|
2807
2807
|
} else
|
|
2808
2808
|
try {
|
|
@@ -2818,7 +2818,7 @@ function En(e) {
|
|
|
2818
2818
|
i();
|
|
2819
2819
|
});
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2821
|
+
function Ro(e) {
|
|
2822
2822
|
return _e(this, void 0, void 0, function* () {
|
|
2823
2823
|
return new Promise((n, t) => {
|
|
2824
2824
|
e.file((o) => {
|
|
@@ -2847,7 +2847,7 @@ function _o() {
|
|
|
2847
2847
|
}), Ze;
|
|
2848
2848
|
}
|
|
2849
2849
|
var Eo = _o();
|
|
2850
|
-
const mt = /* @__PURE__ */
|
|
2850
|
+
const mt = /* @__PURE__ */ $n(Eo);
|
|
2851
2851
|
function an(e) {
|
|
2852
2852
|
return Po(e) || Lo(e) || Ln(e) || Mo();
|
|
2853
2853
|
}
|
|
@@ -2859,7 +2859,7 @@ function Lo(e) {
|
|
|
2859
2859
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
2860
2860
|
}
|
|
2861
2861
|
function Po(e) {
|
|
2862
|
-
if (Array.isArray(e)) return
|
|
2862
|
+
if (Array.isArray(e)) return Rt(e);
|
|
2863
2863
|
}
|
|
2864
2864
|
function ln(e, n) {
|
|
2865
2865
|
var t = Object.keys(e);
|
|
@@ -2894,13 +2894,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2894
2894
|
}
|
|
2895
2895
|
function Ln(e, n) {
|
|
2896
2896
|
if (e) {
|
|
2897
|
-
if (typeof e == "string") return
|
|
2897
|
+
if (typeof e == "string") return Rt(e, n);
|
|
2898
2898
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
2899
2899
|
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
2900
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
2900
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Rt(e, n);
|
|
2901
2901
|
}
|
|
2902
2902
|
}
|
|
2903
|
-
function
|
|
2903
|
+
function Rt(e, n) {
|
|
2904
2904
|
(n == null || n > e.length) && (n = e.length);
|
|
2905
2905
|
for (var t = 0, o = new Array(n); t < n; t++)
|
|
2906
2906
|
o[t] = e[t];
|
|
@@ -2953,24 +2953,24 @@ function Pn(e, n) {
|
|
|
2953
2953
|
return [t, t ? null : Vo(n)];
|
|
2954
2954
|
}
|
|
2955
2955
|
function Fn(e, n, t) {
|
|
2956
|
-
if (
|
|
2957
|
-
if (
|
|
2956
|
+
if (Re(e.size))
|
|
2957
|
+
if (Re(n) && Re(t)) {
|
|
2958
2958
|
if (e.size > t) return [!1, cn(t)];
|
|
2959
2959
|
if (e.size < n) return [!1, un(n)];
|
|
2960
2960
|
} else {
|
|
2961
|
-
if (
|
|
2962
|
-
if (
|
|
2961
|
+
if (Re(n) && e.size < n) return [!1, un(n)];
|
|
2962
|
+
if (Re(t) && e.size > t) return [!1, cn(t)];
|
|
2963
2963
|
}
|
|
2964
2964
|
return [!0, null];
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Re(e) {
|
|
2967
2967
|
return e != null;
|
|
2968
2968
|
}
|
|
2969
2969
|
function qo(e) {
|
|
2970
2970
|
var n = e.files, t = e.accept, o = e.minSize, r = e.maxSize, i = e.multiple, l = e.maxFiles, s = e.validator;
|
|
2971
2971
|
return !i && n.length > 1 || i && l >= 1 && n.length > l ? !1 : n.every(function(c) {
|
|
2972
|
-
var
|
|
2973
|
-
return
|
|
2972
|
+
var u = Pn(c, t), p = ze(u, 1), m = p[0], d = Fn(c, o, r), g = ze(d, 1), v = g[0], f = s ? s(c) : null;
|
|
2973
|
+
return m && v && !f;
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
2976
2976
|
function Qe(e) {
|
|
@@ -3009,7 +3009,7 @@ function Yo() {
|
|
|
3009
3009
|
return "showOpenFilePicker" in window;
|
|
3010
3010
|
}
|
|
3011
3011
|
function Wo(e) {
|
|
3012
|
-
if (
|
|
3012
|
+
if (Re(e)) {
|
|
3013
3013
|
var n = Object.entries(e).filter(function(t) {
|
|
3014
3014
|
var o = ze(t, 2), r = o[0], i = o[1], l = !0;
|
|
3015
3015
|
return An(r) || (console.warn('Skipped "'.concat(r, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(i) || !i.every(Nn)) && (console.warn('Skipped "'.concat(r, '" because an invalid file extension was provided.')), l = !1), l;
|
|
@@ -3026,7 +3026,7 @@ function Wo(e) {
|
|
|
3026
3026
|
return e;
|
|
3027
3027
|
}
|
|
3028
3028
|
function Uo(e) {
|
|
3029
|
-
if (
|
|
3029
|
+
if (Re(e))
|
|
3030
3030
|
return Object.entries(e).reduce(function(n, t) {
|
|
3031
3031
|
var o = ze(t, 2), r = o[0], i = o[1];
|
|
3032
3032
|
return [].concat(an(n), [r], an(i));
|
|
@@ -3350,7 +3350,7 @@ var Mt = {
|
|
|
3350
3350
|
fileRejections: []
|
|
3351
3351
|
};
|
|
3352
3352
|
function Tn() {
|
|
3353
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ae(ae({}, zn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles,
|
|
3353
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ae(ae({}, zn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, u = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, d = n.onDrop, g = n.onDropAccepted, v = n.onDropRejected, f = n.onFileDialogCancel, h = n.onFileDialogOpen, C = n.useFsAccessApi, M = n.autoFocus, w = n.preventDropOnDocument, L = n.noClick, b = n.noKeyboard, I = n.noDrag, T = n.noDragEventsBubbling, H = n.onError, N = n.validator, ee = Me(function() {
|
|
3354
3354
|
return Uo(t);
|
|
3355
3355
|
}, [t]), ie = Me(function() {
|
|
3356
3356
|
return Wo(t);
|
|
@@ -3358,7 +3358,7 @@ function Tn() {
|
|
|
3358
3358
|
return typeof h == "function" ? h : gn;
|
|
3359
3359
|
}, [h]), U = Me(function() {
|
|
3360
3360
|
return typeof f == "function" ? f : gn;
|
|
3361
|
-
}, [f]), O = le(null), Y = le(null), D = eo(ur, Mt), Q = xt(D, 2), pe = Q[0], K = Q[1],
|
|
3361
|
+
}, [f]), O = le(null), Y = le(null), D = eo(ur, Mt), Q = xt(D, 2), pe = Q[0], K = Q[1], x = pe.isFocused, y = pe.isFileDialogActive, E = le(typeof window < "u" && window.isSecureContext && C && Yo()), _ = function() {
|
|
3362
3362
|
!E.current && y && setTimeout(function() {
|
|
3363
3363
|
if (Y.current) {
|
|
3364
3364
|
var B = Y.current.files;
|
|
@@ -3386,7 +3386,7 @@ function Tn() {
|
|
|
3386
3386
|
}, [O, M, o]);
|
|
3387
3387
|
var A = oe(function(P) {
|
|
3388
3388
|
H ? H(P) : console.error(P);
|
|
3389
|
-
}, [H]),
|
|
3389
|
+
}, [H]), k = oe(function(P) {
|
|
3390
3390
|
P.preventDefault(), P.persist(), Ve(P), F.current = [].concat(nr(F.current), [P.target]), Ye(P) && Promise.resolve(r(P)).then(function(B) {
|
|
3391
3391
|
if (!(Qe(P) && !T)) {
|
|
3392
3392
|
var ge = B.length, fe = ge > 0 && qo({
|
|
@@ -3403,12 +3403,12 @@ function Tn() {
|
|
|
3403
3403
|
isDragReject: he,
|
|
3404
3404
|
isDragActive: !0,
|
|
3405
3405
|
type: "setDraggedFiles"
|
|
3406
|
-
}),
|
|
3406
|
+
}), u && u(P);
|
|
3407
3407
|
}
|
|
3408
3408
|
}).catch(function(B) {
|
|
3409
3409
|
return A(B);
|
|
3410
3410
|
});
|
|
3411
|
-
}, [r,
|
|
3411
|
+
}, [r, u, A, T, ee, l, i, s, c, N]), R = oe(function(P) {
|
|
3412
3412
|
P.preventDefault(), P.persist(), Ve(P);
|
|
3413
3413
|
var B = Ye(P);
|
|
3414
3414
|
if (B && P.dataTransfer)
|
|
@@ -3416,8 +3416,8 @@ function Tn() {
|
|
|
3416
3416
|
P.dataTransfer.dropEffect = "copy";
|
|
3417
3417
|
} catch {
|
|
3418
3418
|
}
|
|
3419
|
-
return B &&
|
|
3420
|
-
}, [
|
|
3419
|
+
return B && m && m(P), !1;
|
|
3420
|
+
}, [m, T]), V = oe(function(P) {
|
|
3421
3421
|
P.preventDefault(), P.persist(), Ve(P);
|
|
3422
3422
|
var B = F.current.filter(function(fe) {
|
|
3423
3423
|
return O.current && O.current.contains(fe);
|
|
@@ -3427,8 +3427,8 @@ function Tn() {
|
|
|
3427
3427
|
isDragActive: !1,
|
|
3428
3428
|
isDragAccept: !1,
|
|
3429
3429
|
isDragReject: !1
|
|
3430
|
-
}), Ye(P) &&
|
|
3431
|
-
}, [O,
|
|
3430
|
+
}), Ye(P) && p && p(P));
|
|
3431
|
+
}, [O, p, T]), q = oe(function(P, B) {
|
|
3432
3432
|
var ge = [], fe = [];
|
|
3433
3433
|
P.forEach(function(he) {
|
|
3434
3434
|
var Pe = Pn(he, ee), Ee = xt(Pe, 2), nt = Ee[0], ot = Ee[1], rt = Fn(he, l, i), He = xt(rt, 2), it = He[0], at = He[1], lt = N ? N(he) : null;
|
|
@@ -3453,8 +3453,8 @@ function Tn() {
|
|
|
3453
3453
|
fileRejections: fe,
|
|
3454
3454
|
isDragReject: fe.length > 0,
|
|
3455
3455
|
type: "setFiles"
|
|
3456
|
-
}), d && d(ge, fe, B), fe.length > 0 &&
|
|
3457
|
-
}, [K, s, ee, l, i, c, d, g,
|
|
3456
|
+
}), d && d(ge, fe, B), fe.length > 0 && v && v(fe, B), ge.length > 0 && g && g(ge, B);
|
|
3457
|
+
}, [K, s, ee, l, i, c, d, g, v, N]), j = oe(function(P) {
|
|
3458
3458
|
P.preventDefault(), P.persist(), Ve(P), F.current = [], Ye(P) && Promise.resolve(r(P)).then(function(B) {
|
|
3459
3459
|
Qe(P) && !T || q(B, P);
|
|
3460
3460
|
}).catch(function(B) {
|
|
@@ -3487,7 +3487,7 @@ function Tn() {
|
|
|
3487
3487
|
Y.current && (K({
|
|
3488
3488
|
type: "openDialog"
|
|
3489
3489
|
}), ce(), Y.current.value = null, Y.current.click());
|
|
3490
|
-
}, [K, ce, U, C, q, A, ie, s]),
|
|
3490
|
+
}, [K, ce, U, C, q, A, ie, s]), $ = oe(function(P) {
|
|
3491
3491
|
!O.current || !O.current.isEqualNode(P.target) || (P.key === " " || P.key === "Enter" || P.keyCode === 32 || P.keyCode === 13) && (P.preventDefault(), S());
|
|
3492
3492
|
}, [O, S]), X = oe(function() {
|
|
3493
3493
|
K({
|
|
@@ -3511,12 +3511,12 @@ function Tn() {
|
|
|
3511
3511
|
return function() {
|
|
3512
3512
|
var P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, B = P.refKey, ge = B === void 0 ? "ref" : B, fe = P.role, he = P.onKeyDown, Pe = P.onFocus, Ee = P.onBlur, nt = P.onClick, ot = P.onDragEnter, rt = P.onDragOver, He = P.onDragLeave, it = P.onDrop, at = et(P, er);
|
|
3513
3513
|
return ae(ae(Et({
|
|
3514
|
-
onKeyDown: ve(ye(he,
|
|
3514
|
+
onKeyDown: ve(ye(he, $)),
|
|
3515
3515
|
onFocus: ve(ye(Pe, X)),
|
|
3516
3516
|
onBlur: ve(ye(Ee, J)),
|
|
3517
3517
|
onClick: de(ye(nt, ue)),
|
|
3518
|
-
onDragEnter: Ie(ye(ot,
|
|
3519
|
-
onDragOver: Ie(ye(rt,
|
|
3518
|
+
onDragEnter: Ie(ye(ot, k)),
|
|
3519
|
+
onDragOver: Ie(ye(rt, R)),
|
|
3520
3520
|
onDragLeave: Ie(ye(He, V)),
|
|
3521
3521
|
onDrop: Ie(ye(it, j)),
|
|
3522
3522
|
role: typeof fe == "string" && fe !== "" ? fe : "presentation"
|
|
@@ -3524,7 +3524,7 @@ function Tn() {
|
|
|
3524
3524
|
tabIndex: 0
|
|
3525
3525
|
} : {}), at);
|
|
3526
3526
|
};
|
|
3527
|
-
}, [O,
|
|
3527
|
+
}, [O, $, X, J, ue, k, R, V, j, b, I, o]), Xn = oe(function(P) {
|
|
3528
3528
|
P.stopPropagation();
|
|
3529
3529
|
}, []), Jn = Me(function() {
|
|
3530
3530
|
return function() {
|
|
@@ -3552,7 +3552,7 @@ function Tn() {
|
|
|
3552
3552
|
};
|
|
3553
3553
|
}, [Y, t, s, j, o]);
|
|
3554
3554
|
return ae(ae({}, pe), {}, {
|
|
3555
|
-
isFocused:
|
|
3555
|
+
isFocused: x && !o,
|
|
3556
3556
|
getRootProps: Kn,
|
|
3557
3557
|
getInputProps: Jn,
|
|
3558
3558
|
rootRef: O,
|
|
@@ -3613,12 +3613,12 @@ const Pi = ({
|
|
|
3613
3613
|
disabled: l = !1,
|
|
3614
3614
|
label: s = "Upload PDF",
|
|
3615
3615
|
subLabel: c = "Maximum size: 2 MB",
|
|
3616
|
-
icon:
|
|
3617
|
-
wrapperClass:
|
|
3618
|
-
iconClass:
|
|
3616
|
+
icon: u = /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" }) }),
|
|
3617
|
+
wrapperClass: p = "",
|
|
3618
|
+
iconClass: m = "",
|
|
3619
3619
|
labelClass: d = "",
|
|
3620
3620
|
subLabelClass: g = "",
|
|
3621
|
-
showList:
|
|
3621
|
+
showList: v = !0,
|
|
3622
3622
|
listView: f = !0,
|
|
3623
3623
|
showListImage: h = !1,
|
|
3624
3624
|
uploadedFiles: C = [],
|
|
@@ -3678,7 +3678,7 @@ const Pi = ({
|
|
|
3678
3678
|
${ie ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
|
|
3679
3679
|
${ce ? "border-color-red-500 bg-color-red-50" : ""}
|
|
3680
3680
|
${l ? "opacity-50 cursor-not-allowed" : ""}
|
|
3681
|
-
${
|
|
3681
|
+
${p}
|
|
3682
3682
|
`,
|
|
3683
3683
|
children: [
|
|
3684
3684
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -3688,7 +3688,7 @@ const Pi = ({
|
|
|
3688
3688
|
className: "flex flex-col items-center justify-center text-center px-6 pt-6 pb-4 cursor-pointer",
|
|
3689
3689
|
children: [
|
|
3690
3690
|
/* @__PURE__ */ a.jsx("input", { ...ee() }),
|
|
3691
|
-
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${
|
|
3691
|
+
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${m}`, children: u }),
|
|
3692
3692
|
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${d}`, children: s }),
|
|
3693
3693
|
c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${g}`, children: c })
|
|
3694
3694
|
]
|
|
@@ -3698,7 +3698,7 @@ const Pi = ({
|
|
|
3698
3698
|
"• ",
|
|
3699
3699
|
U
|
|
3700
3700
|
] }, O)) }),
|
|
3701
|
-
|
|
3701
|
+
v && w.length > 0 && /* @__PURE__ */ a.jsx(
|
|
3702
3702
|
"ul",
|
|
3703
3703
|
{
|
|
3704
3704
|
className: `w-full ${f ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
@@ -3812,16 +3812,16 @@ const dr = {
|
|
|
3812
3812
|
disabled: l = !1,
|
|
3813
3813
|
size: s = "medium",
|
|
3814
3814
|
variant: c = "outlined",
|
|
3815
|
-
rounded:
|
|
3816
|
-
...
|
|
3817
|
-
},
|
|
3815
|
+
rounded: u = "medium",
|
|
3816
|
+
...p
|
|
3817
|
+
}, m) => {
|
|
3818
3818
|
const d = le([]), g = (f, h) => {
|
|
3819
3819
|
var w;
|
|
3820
3820
|
const C = f.target.value.replace(/[^0-9]/g, "").slice(0, 1);
|
|
3821
3821
|
if (!C && t[h] === void 0) return;
|
|
3822
3822
|
const M = t.substring(0, h) + C + t.substring(h + 1, i);
|
|
3823
3823
|
o == null || o(M), C && h < i - 1 && ((w = d.current[h + 1]) == null || w.focus()), r && M.length === i && !M.split("").some((L) => !L) && r(M);
|
|
3824
|
-
},
|
|
3824
|
+
}, v = (f, h) => {
|
|
3825
3825
|
var C, M, w;
|
|
3826
3826
|
f.key === "Backspace" && !t[h] && h > 0 ? (o == null || o(
|
|
3827
3827
|
t.substring(0, h - 1) + "" + t.substring(h, i)
|
|
@@ -3842,13 +3842,13 @@ const dr = {
|
|
|
3842
3842
|
text-center font-semibold focus:ring-1 ring-color-primary outline-0 transition-all
|
|
3843
3843
|
${dr[s]}
|
|
3844
3844
|
${fr[c]}
|
|
3845
|
-
${gr[
|
|
3845
|
+
${gr[u]}
|
|
3846
3846
|
${n}
|
|
3847
3847
|
`,
|
|
3848
3848
|
value: t[h] || "",
|
|
3849
3849
|
onChange: (C) => g(C, h),
|
|
3850
|
-
onKeyDown: (C) =>
|
|
3851
|
-
...
|
|
3850
|
+
onKeyDown: (C) => v(C, h),
|
|
3851
|
+
...p
|
|
3852
3852
|
},
|
|
3853
3853
|
h
|
|
3854
3854
|
)) });
|
|
@@ -3873,17 +3873,17 @@ const xr = {
|
|
|
3873
3873
|
iconStyle: l = "",
|
|
3874
3874
|
startIcon: s,
|
|
3875
3875
|
endIcon: c,
|
|
3876
|
-
error:
|
|
3877
|
-
maxLength:
|
|
3878
|
-
label:
|
|
3879
|
-
|
|
3876
|
+
error: u,
|
|
3877
|
+
maxLength: p,
|
|
3878
|
+
label: m,
|
|
3879
|
+
labelClass: d = "",
|
|
3880
3880
|
variant: g = "outlined",
|
|
3881
|
-
size:
|
|
3881
|
+
size: v = "medium",
|
|
3882
3882
|
...f
|
|
3883
3883
|
}, h) => {
|
|
3884
|
-
const C =
|
|
3884
|
+
const C = u ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", M = u ? "text-color-red-500" : l;
|
|
3885
3885
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
3886
|
-
|
|
3886
|
+
m && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${d}`, children: m }),
|
|
3887
3887
|
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${C} ${vr[g]} ${r}`, children: [
|
|
3888
3888
|
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${M}`, children: s }),
|
|
3889
3889
|
/* @__PURE__ */ a.jsx(
|
|
@@ -3894,14 +3894,14 @@ const xr = {
|
|
|
3894
3894
|
type: o,
|
|
3895
3895
|
placeholder: e,
|
|
3896
3896
|
defaultValue: n,
|
|
3897
|
-
maxLength:
|
|
3897
|
+
maxLength: p,
|
|
3898
3898
|
onChange: t,
|
|
3899
|
-
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${xr[
|
|
3899
|
+
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${xr[v]} ${i}`
|
|
3900
3900
|
}
|
|
3901
3901
|
),
|
|
3902
3902
|
c && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${M}`, children: c })
|
|
3903
3903
|
] }),
|
|
3904
|
-
|
|
3904
|
+
u && /* @__PURE__ */ a.jsx("p", { className: "text-color-red-500 text-xs mt-1", children: u })
|
|
3905
3905
|
] });
|
|
3906
3906
|
}
|
|
3907
3907
|
);
|
|
@@ -3938,7 +3938,7 @@ const In = ({
|
|
|
3938
3938
|
color: i = "pearl",
|
|
3939
3939
|
shape: l = "circle"
|
|
3940
3940
|
}) => {
|
|
3941
|
-
var
|
|
3941
|
+
var u;
|
|
3942
3942
|
const s = {
|
|
3943
3943
|
small: "w-8 h-8 text-sm",
|
|
3944
3944
|
medium: "w-10 h-10 text-base",
|
|
@@ -3960,7 +3960,7 @@ const In = ({
|
|
|
3960
3960
|
alt: n,
|
|
3961
3961
|
className: `object-cover w-full h-full ${c[l]}`
|
|
3962
3962
|
}
|
|
3963
|
-
) : o || ((
|
|
3963
|
+
) : o || ((u = n == null ? void 0 : n[0]) == null ? void 0 : u.toUpperCase()) || "?"
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
3966
|
}, je = ({
|
|
@@ -3973,22 +3973,22 @@ const In = ({
|
|
|
3973
3973
|
roundedFull: l = !1,
|
|
3974
3974
|
size: s = "medium",
|
|
3975
3975
|
autoFocus: c = !1,
|
|
3976
|
-
...
|
|
3976
|
+
...u
|
|
3977
3977
|
}) => {
|
|
3978
3978
|
var g;
|
|
3979
|
-
const
|
|
3980
|
-
const f =
|
|
3979
|
+
const p = le(null), m = (v) => {
|
|
3980
|
+
const f = p.current;
|
|
3981
3981
|
if (!f) return;
|
|
3982
3982
|
const h = document.createElement("span"), C = f.getBoundingClientRect(), M = Math.max(C.width, C.height);
|
|
3983
|
-
h.style.width = h.style.height = `${M}px`, h.style.left = `${
|
|
3983
|
+
h.style.width = h.style.height = `${M}px`, h.style.left = `${v.clientX - C.left - M / 2}px`, h.style.top = `${v.clientY - C.top - M / 2}px`, h.className = "ripple_small", f.appendChild(h), setTimeout(() => h.remove(), 600), o == null || o(v);
|
|
3984
3984
|
}, d = ((g = me[n]) == null ? void 0 : g[e === "filled" ? "filled" : e === "outlined" ? "outline" : "transparent"]) || "";
|
|
3985
3985
|
return /* @__PURE__ */ a.jsx(
|
|
3986
3986
|
"button",
|
|
3987
3987
|
{
|
|
3988
|
-
ref:
|
|
3988
|
+
ref: p,
|
|
3989
3989
|
type: "button",
|
|
3990
3990
|
disabled: i,
|
|
3991
|
-
onClick:
|
|
3991
|
+
onClick: m,
|
|
3992
3992
|
className: `relative overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
3993
3993
|
${d}
|
|
3994
3994
|
${e === "outlined" && "border"}
|
|
@@ -3998,7 +3998,7 @@ const In = ({
|
|
|
3998
3998
|
${i ? `!text-color-gray-400 hover:bg-color-transparent ${e === "filled" && "!bg-color-gray-200"} !border-color-gray-200 cursor-not-allowed` : "cursor-pointer hover:opacity-90"}
|
|
3999
3999
|
`,
|
|
4000
4000
|
autoFocus: c,
|
|
4001
|
-
...
|
|
4001
|
+
...u,
|
|
4002
4002
|
children: t && /* @__PURE__ */ a.jsx(a.Fragment, { children: t })
|
|
4003
4003
|
}
|
|
4004
4004
|
);
|
|
@@ -4020,14 +4020,14 @@ const In = ({
|
|
|
4020
4020
|
onDelete: l,
|
|
4021
4021
|
deleteIcon: s,
|
|
4022
4022
|
href: c,
|
|
4023
|
-
target:
|
|
4024
|
-
avatar:
|
|
4025
|
-
icon:
|
|
4023
|
+
target: u = "_self",
|
|
4024
|
+
avatar: p,
|
|
4025
|
+
icon: m
|
|
4026
4026
|
}) => {
|
|
4027
4027
|
var C, M;
|
|
4028
|
-
const d = (C = me[n]) == null ? void 0 : C.filled, g = (M = me[n]) == null ? void 0 : M.outline,
|
|
4029
|
-
|
|
4030
|
-
|
|
4028
|
+
const d = (C = me[n]) == null ? void 0 : C.filled, g = (M = me[n]) == null ? void 0 : M.outline, v = br[o], f = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${g}` : d} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), h = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4029
|
+
p && /* @__PURE__ */ a.jsx(In, { ...typeof p == "object" ? p : {}, className: `-ml-1 mr-1 ${fn[o]}` }),
|
|
4030
|
+
m && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: m }),
|
|
4031
4031
|
/* @__PURE__ */ a.jsx("span", { children: e }),
|
|
4032
4032
|
l && /* @__PURE__ */ a.jsx(
|
|
4033
4033
|
je,
|
|
@@ -4048,7 +4048,7 @@ const In = ({
|
|
|
4048
4048
|
"a",
|
|
4049
4049
|
{
|
|
4050
4050
|
href: c,
|
|
4051
|
-
target:
|
|
4051
|
+
target: u,
|
|
4052
4052
|
className: `no-underline ${f} ${r}`,
|
|
4053
4053
|
onClick: i,
|
|
4054
4054
|
children: h
|
|
@@ -4066,48 +4066,62 @@ const In = ({
|
|
|
4066
4066
|
imageUrl: n,
|
|
4067
4067
|
name: t = "User",
|
|
4068
4068
|
number: o = "1234567890",
|
|
4069
|
-
className: r = ""
|
|
4069
|
+
className: r = "",
|
|
4070
|
+
nameClass: i = "",
|
|
4071
|
+
numberClass: l = ""
|
|
4070
4072
|
}) => /* @__PURE__ */ a.jsxs("div", { className: r || "flex items-center gap-2 w-fit bg-color-transparent rounded-md p-1", children: [
|
|
4071
4073
|
/* @__PURE__ */ a.jsx(In, { size: e, src: n, alt: `${t}'s profile` }),
|
|
4072
4074
|
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col", children: [
|
|
4073
4075
|
/* @__PURE__ */ a.jsx(
|
|
4074
4076
|
"span",
|
|
4075
4077
|
{
|
|
4076
|
-
className: `font-medium text-color-gray-800 block ${e === "extra-large" ? "text-xl" : e === "large" ? "text-lg" : e === "medium" ? "text-base" : "text-sm"}`,
|
|
4078
|
+
className: `font-medium text-color-gray-800 block ${i} ${e === "extra-large" ? "text-xl" : e === "large" ? "text-lg" : e === "medium" ? "text-base" : "text-sm"}`,
|
|
4077
4079
|
children: t
|
|
4078
4080
|
}
|
|
4079
4081
|
),
|
|
4080
4082
|
/* @__PURE__ */ a.jsx(
|
|
4081
4083
|
"span",
|
|
4082
4084
|
{
|
|
4083
|
-
className: `text-color-gray-600 block ${e === "extra-large" ? "text-lg mt-3" : e === "large" ? "text-base mt-2" : e === "medium" ? "text-sm mt-1" : "text-xs mt-1"}`,
|
|
4085
|
+
className: `text-color-gray-600 block ${l} ${e === "extra-large" ? "text-lg mt-3" : e === "large" ? "text-base mt-2" : e === "medium" ? "text-sm mt-1" : "text-xs mt-1"}`,
|
|
4084
4086
|
children: o
|
|
4085
4087
|
}
|
|
4086
4088
|
)
|
|
4087
4089
|
] })
|
|
4088
|
-
] }), Ni = ({
|
|
4089
|
-
|
|
4090
|
+
] }), Ni = ({
|
|
4091
|
+
steps: e,
|
|
4092
|
+
currentStep: n,
|
|
4093
|
+
className: t = "",
|
|
4094
|
+
iconWrapperClass: o = "",
|
|
4095
|
+
iconClass: r = "",
|
|
4096
|
+
iconActiveClass: i = "",
|
|
4097
|
+
iconCompletedClass: l = "",
|
|
4098
|
+
labelClass: s = "",
|
|
4099
|
+
activeLabelClass: c = "",
|
|
4100
|
+
separatorClass: u = "",
|
|
4101
|
+
onChange: p
|
|
4102
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex items-center ${t}`, children: e.map((m, d) => {
|
|
4103
|
+
const g = d === n, v = d < n;
|
|
4090
4104
|
return /* @__PURE__ */ a.jsxs(Ce.Fragment, { children: [
|
|
4091
4105
|
/* @__PURE__ */ a.jsxs(
|
|
4092
4106
|
"div",
|
|
4093
4107
|
{
|
|
4094
4108
|
className: "flex items-center space-x-2 cursor-pointer",
|
|
4095
|
-
onClick: () =>
|
|
4109
|
+
onClick: () => p == null ? void 0 : p(d),
|
|
4096
4110
|
children: [
|
|
4097
4111
|
/* @__PURE__ */ a.jsx(
|
|
4098
4112
|
"div",
|
|
4099
4113
|
{
|
|
4100
4114
|
className: `flex items-center font-semibold justify-center w-7 h-7 rounded-full text-sm transition-color duration-200 leading-none
|
|
4101
|
-
${
|
|
4102
|
-
children:
|
|
4115
|
+
${g ? `bg-color-blue-500 text-color-white ${i} ` : v ? `bg-color-green-500 text-color-white ${l} ` : `bg-color-white text-color-gray-400 ring ${o} `}`,
|
|
4116
|
+
children: v ? /* @__PURE__ */ a.jsx("svg", { className: `size-5 ${r}`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }) }) : d + 1
|
|
4103
4117
|
}
|
|
4104
4118
|
),
|
|
4105
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-sm ${
|
|
4119
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-sm ${g ? `text-color-blue-600 ${c}` : `text-color-gray-600 ${s}`}`, children: m.label })
|
|
4106
4120
|
]
|
|
4107
4121
|
}
|
|
4108
4122
|
),
|
|
4109
|
-
|
|
4110
|
-
] },
|
|
4123
|
+
d < e.length - 1 && /* @__PURE__ */ a.jsx("svg", { className: `mx-4 text-color-gray-400 size-6 ${u}`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
|
|
4124
|
+
] }, d);
|
|
4111
4125
|
}) });
|
|
4112
4126
|
/**
|
|
4113
4127
|
* table-core
|
|
@@ -4119,14 +4133,14 @@ const In = ({
|
|
|
4119
4133
|
*
|
|
4120
4134
|
* @license MIT
|
|
4121
4135
|
*/
|
|
4122
|
-
function
|
|
4136
|
+
function $e(e, n) {
|
|
4123
4137
|
return typeof e == "function" ? e(n) : e;
|
|
4124
4138
|
}
|
|
4125
4139
|
function be(e, n) {
|
|
4126
4140
|
return (t) => {
|
|
4127
4141
|
n.setState((o) => ({
|
|
4128
4142
|
...o,
|
|
4129
|
-
[e]:
|
|
4143
|
+
[e]: $e(t, o[e])
|
|
4130
4144
|
}));
|
|
4131
4145
|
};
|
|
4132
4146
|
}
|
|
@@ -4152,17 +4166,17 @@ function G(e, n, t) {
|
|
|
4152
4166
|
let l;
|
|
4153
4167
|
t.key && t.debug && (l = Date.now());
|
|
4154
4168
|
const s = e(i);
|
|
4155
|
-
if (!(s.length !== o.length || s.some((
|
|
4169
|
+
if (!(s.length !== o.length || s.some((p, m) => o[m] !== p)))
|
|
4156
4170
|
return r;
|
|
4157
4171
|
o = s;
|
|
4158
|
-
let
|
|
4159
|
-
if (t.key && t.debug && (
|
|
4160
|
-
const
|
|
4161
|
-
for (
|
|
4162
|
-
|
|
4163
|
-
return
|
|
4172
|
+
let u;
|
|
4173
|
+
if (t.key && t.debug && (u = Date.now()), r = n(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
4174
|
+
const p = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - u) * 100) / 100, d = m / 16, g = (v, f) => {
|
|
4175
|
+
for (v = String(v); v.length < f; )
|
|
4176
|
+
v = " " + v;
|
|
4177
|
+
return v;
|
|
4164
4178
|
};
|
|
4165
|
-
console.info(`%c⏱ ${g(
|
|
4179
|
+
console.info(`%c⏱ ${g(m, 5)} /${g(p, 5)} ms`, `
|
|
4166
4180
|
font-size: .6rem;
|
|
4167
4181
|
font-weight: bold;
|
|
4168
4182
|
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -4190,13 +4204,13 @@ function Cr(e, n, t, o) {
|
|
|
4190
4204
|
column: t,
|
|
4191
4205
|
getValue: () => n.getValue(o),
|
|
4192
4206
|
renderValue: r,
|
|
4193
|
-
getContext: G(() => [e, t, n, i], (l, s, c,
|
|
4207
|
+
getContext: G(() => [e, t, n, i], (l, s, c, u) => ({
|
|
4194
4208
|
table: l,
|
|
4195
4209
|
column: s,
|
|
4196
4210
|
row: c,
|
|
4197
|
-
cell:
|
|
4198
|
-
getValue:
|
|
4199
|
-
renderValue:
|
|
4211
|
+
cell: u,
|
|
4212
|
+
getValue: u.getValue,
|
|
4213
|
+
renderValue: u.renderValue
|
|
4200
4214
|
}), Z(e.options, "debugCells", "cell.getContext"))
|
|
4201
4215
|
};
|
|
4202
4216
|
return e._features.forEach((l) => {
|
|
@@ -4209,39 +4223,39 @@ function jr(e, n, t, o) {
|
|
|
4209
4223
|
...e._getDefaultColumnDef(),
|
|
4210
4224
|
...n
|
|
4211
4225
|
}, c = s.accessorKey;
|
|
4212
|
-
let
|
|
4213
|
-
if (s.accessorFn ?
|
|
4226
|
+
let u = (r = (i = s.id) != null ? i : c ? typeof String.prototype.replaceAll == "function" ? c.replaceAll(".", "_") : c.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, p;
|
|
4227
|
+
if (s.accessorFn ? p = s.accessorFn : c && (c.includes(".") ? p = (d) => {
|
|
4214
4228
|
let g = d;
|
|
4215
4229
|
for (const f of c.split(".")) {
|
|
4216
|
-
var
|
|
4217
|
-
g = (
|
|
4230
|
+
var v;
|
|
4231
|
+
g = (v = g) == null ? void 0 : v[f], process.env.NODE_ENV !== "production" && g === void 0 && console.warn(`"${f}" in deeply nested key "${c}" returned undefined.`);
|
|
4218
4232
|
}
|
|
4219
4233
|
return g;
|
|
4220
|
-
} :
|
|
4234
|
+
} : p = (d) => d[s.accessorKey]), !u)
|
|
4221
4235
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
4222
|
-
let
|
|
4223
|
-
id: `${String(
|
|
4224
|
-
accessorFn:
|
|
4236
|
+
let m = {
|
|
4237
|
+
id: `${String(u)}`,
|
|
4238
|
+
accessorFn: p,
|
|
4225
4239
|
parent: o,
|
|
4226
4240
|
depth: t,
|
|
4227
4241
|
columnDef: s,
|
|
4228
4242
|
columns: [],
|
|
4229
4243
|
getFlatColumns: G(() => [!0], () => {
|
|
4230
4244
|
var d;
|
|
4231
|
-
return [
|
|
4245
|
+
return [m, ...(d = m.columns) == null ? void 0 : d.flatMap((g) => g.getFlatColumns())];
|
|
4232
4246
|
}, Z(e.options, "debugColumns", "column.getFlatColumns")),
|
|
4233
4247
|
getLeafColumns: G(() => [e._getOrderColumnsFn()], (d) => {
|
|
4234
4248
|
var g;
|
|
4235
|
-
if ((g =
|
|
4236
|
-
let
|
|
4237
|
-
return d(
|
|
4249
|
+
if ((g = m.columns) != null && g.length) {
|
|
4250
|
+
let v = m.columns.flatMap((f) => f.getLeafColumns());
|
|
4251
|
+
return d(v);
|
|
4238
4252
|
}
|
|
4239
|
-
return [
|
|
4253
|
+
return [m];
|
|
4240
4254
|
}, Z(e.options, "debugColumns", "column.getLeafColumns"))
|
|
4241
4255
|
};
|
|
4242
4256
|
for (const d of e._features)
|
|
4243
|
-
d.createColumn == null || d.createColumn(
|
|
4244
|
-
return
|
|
4257
|
+
d.createColumn == null || d.createColumn(m, e);
|
|
4258
|
+
return m;
|
|
4245
4259
|
}
|
|
4246
4260
|
const xe = "debugHeaders";
|
|
4247
4261
|
function mn(e, n, t) {
|
|
@@ -4277,8 +4291,8 @@ const Sr = {
|
|
|
4277
4291
|
createTable: (e) => {
|
|
4278
4292
|
e.getHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
4279
4293
|
var i, l;
|
|
4280
|
-
const s = (i = o == null ? void 0 : o.map((
|
|
4281
|
-
return We(n, [...s, ...
|
|
4294
|
+
const s = (i = o == null ? void 0 : o.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? i : [], c = (l = r == null ? void 0 : r.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], u = t.filter((m) => !(o != null && o.includes(m.id)) && !(r != null && r.includes(m.id)));
|
|
4295
|
+
return We(n, [...s, ...u, ...c], e);
|
|
4282
4296
|
}, Z(e.options, xe, "getHeaderGroups")), e.getCenterHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), We(n, t, e, "center")), Z(e.options, xe, "getCenterHeaderGroups")), e.getLeftHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
4283
4297
|
var r;
|
|
4284
4298
|
const i = (r = o == null ? void 0 : o.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? r : [];
|
|
@@ -4297,8 +4311,8 @@ const Sr = {
|
|
|
4297
4311
|
var o;
|
|
4298
4312
|
return !((o = t.subHeaders) != null && o.length);
|
|
4299
4313
|
}), Z(e.options, xe, "getRightLeafHeaders")), e.getLeafHeaders = G(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
4300
|
-
var r, i, l, s, c,
|
|
4301
|
-
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(c = (
|
|
4314
|
+
var r, i, l, s, c, u;
|
|
4315
|
+
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(c = (u = o[0]) == null ? void 0 : u.headers) != null ? c : []].map((p) => p.getLeafHeaders()).flat();
|
|
4302
4316
|
}, Z(e.options, xe, "getLeafHeaders"));
|
|
4303
4317
|
}
|
|
4304
4318
|
};
|
|
@@ -4306,21 +4320,21 @@ function We(e, n, t, o) {
|
|
|
4306
4320
|
var r, i;
|
|
4307
4321
|
let l = 0;
|
|
4308
4322
|
const s = function(d, g) {
|
|
4309
|
-
g === void 0 && (g = 1), l = Math.max(l, g), d.filter((
|
|
4323
|
+
g === void 0 && (g = 1), l = Math.max(l, g), d.filter((v) => v.getIsVisible()).forEach((v) => {
|
|
4310
4324
|
var f;
|
|
4311
|
-
(f =
|
|
4325
|
+
(f = v.columns) != null && f.length && s(v.columns, g + 1);
|
|
4312
4326
|
}, 0);
|
|
4313
4327
|
};
|
|
4314
4328
|
s(e);
|
|
4315
4329
|
let c = [];
|
|
4316
|
-
const
|
|
4317
|
-
const
|
|
4330
|
+
const u = (d, g) => {
|
|
4331
|
+
const v = {
|
|
4318
4332
|
depth: g,
|
|
4319
4333
|
id: [o, `${g}`].filter(Boolean).join("_"),
|
|
4320
4334
|
headers: []
|
|
4321
4335
|
}, f = [];
|
|
4322
4336
|
d.forEach((h) => {
|
|
4323
|
-
const C = [...f].reverse()[0], M = h.column.depth ===
|
|
4337
|
+
const C = [...f].reverse()[0], M = h.column.depth === v.depth;
|
|
4324
4338
|
let w, L = !1;
|
|
4325
4339
|
if (M && h.column.parent ? w = h.column.parent : (w = h.column, L = !0), C && (C == null ? void 0 : C.column) === w)
|
|
4326
4340
|
C.subHeaders.push(h);
|
|
@@ -4334,16 +4348,16 @@ function We(e, n, t, o) {
|
|
|
4334
4348
|
});
|
|
4335
4349
|
b.subHeaders.push(h), f.push(b);
|
|
4336
4350
|
}
|
|
4337
|
-
|
|
4338
|
-
}), c.push(
|
|
4339
|
-
},
|
|
4351
|
+
v.headers.push(h), h.headerGroup = v;
|
|
4352
|
+
}), c.push(v), g > 0 && u(f, g - 1);
|
|
4353
|
+
}, p = n.map((d, g) => mn(t, d, {
|
|
4340
4354
|
depth: l,
|
|
4341
4355
|
index: g
|
|
4342
4356
|
}));
|
|
4343
|
-
p
|
|
4344
|
-
const
|
|
4357
|
+
u(p, l - 1), c.reverse();
|
|
4358
|
+
const m = (d) => d.filter((v) => v.column.getIsVisible()).map((v) => {
|
|
4345
4359
|
let f = 0, h = 0, C = [0];
|
|
4346
|
-
|
|
4360
|
+
v.subHeaders && v.subHeaders.length ? (C = [], m(v.subHeaders).forEach((w) => {
|
|
4347
4361
|
let {
|
|
4348
4362
|
colSpan: L,
|
|
4349
4363
|
rowSpan: b
|
|
@@ -4351,14 +4365,14 @@ function We(e, n, t, o) {
|
|
|
4351
4365
|
f += L, C.push(b);
|
|
4352
4366
|
})) : f = 1;
|
|
4353
4367
|
const M = Math.min(...C);
|
|
4354
|
-
return h = h + M,
|
|
4368
|
+
return h = h + M, v.colSpan = f, v.rowSpan = h, {
|
|
4355
4369
|
colSpan: f,
|
|
4356
4370
|
rowSpan: h
|
|
4357
4371
|
};
|
|
4358
4372
|
});
|
|
4359
|
-
return
|
|
4373
|
+
return m((r = (i = c[0]) == null ? void 0 : i.headers) != null ? r : []), c;
|
|
4360
4374
|
}
|
|
4361
|
-
const
|
|
4375
|
+
const $r = (e, n, t, o, r, i, l) => {
|
|
4362
4376
|
let s = {
|
|
4363
4377
|
id: n,
|
|
4364
4378
|
index: o,
|
|
@@ -4370,42 +4384,42 @@ const kr = (e, n, t, o, r, i, l) => {
|
|
|
4370
4384
|
getValue: (c) => {
|
|
4371
4385
|
if (s._valuesCache.hasOwnProperty(c))
|
|
4372
4386
|
return s._valuesCache[c];
|
|
4373
|
-
const
|
|
4374
|
-
if (
|
|
4375
|
-
return s._valuesCache[c] =
|
|
4387
|
+
const u = e.getColumn(c);
|
|
4388
|
+
if (u != null && u.accessorFn)
|
|
4389
|
+
return s._valuesCache[c] = u.accessorFn(s.original, o), s._valuesCache[c];
|
|
4376
4390
|
},
|
|
4377
4391
|
getUniqueValues: (c) => {
|
|
4378
4392
|
if (s._uniqueValuesCache.hasOwnProperty(c))
|
|
4379
4393
|
return s._uniqueValuesCache[c];
|
|
4380
|
-
const
|
|
4381
|
-
if (
|
|
4382
|
-
return
|
|
4394
|
+
const u = e.getColumn(c);
|
|
4395
|
+
if (u != null && u.accessorFn)
|
|
4396
|
+
return u.columnDef.getUniqueValues ? (s._uniqueValuesCache[c] = u.columnDef.getUniqueValues(s.original, o), s._uniqueValuesCache[c]) : (s._uniqueValuesCache[c] = [s.getValue(c)], s._uniqueValuesCache[c]);
|
|
4383
4397
|
},
|
|
4384
4398
|
renderValue: (c) => {
|
|
4385
|
-
var
|
|
4386
|
-
return (
|
|
4399
|
+
var u;
|
|
4400
|
+
return (u = s.getValue(c)) != null ? u : e.options.renderFallbackValue;
|
|
4387
4401
|
},
|
|
4388
4402
|
subRows: [],
|
|
4389
4403
|
getLeafRows: () => yr(s.subRows, (c) => c.subRows),
|
|
4390
4404
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
4391
4405
|
getParentRows: () => {
|
|
4392
|
-
let c = [],
|
|
4406
|
+
let c = [], u = s;
|
|
4393
4407
|
for (; ; ) {
|
|
4394
|
-
const
|
|
4395
|
-
if (!
|
|
4396
|
-
c.push(
|
|
4408
|
+
const p = u.getParentRow();
|
|
4409
|
+
if (!p) break;
|
|
4410
|
+
c.push(p), u = p;
|
|
4397
4411
|
}
|
|
4398
4412
|
return c.reverse();
|
|
4399
4413
|
},
|
|
4400
|
-
getAllCells: G(() => [e.getAllLeafColumns()], (c) => c.map((
|
|
4401
|
-
_getAllCellsByColumnId: G(() => [s.getAllCells()], (c) => c.reduce((
|
|
4414
|
+
getAllCells: G(() => [e.getAllLeafColumns()], (c) => c.map((u) => Cr(e, s, u, u.id)), Z(e.options, "debugRows", "getAllCells")),
|
|
4415
|
+
_getAllCellsByColumnId: G(() => [s.getAllCells()], (c) => c.reduce((u, p) => (u[p.column.id] = p, u), {}), Z(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
4402
4416
|
};
|
|
4403
4417
|
for (let c = 0; c < e._features.length; c++) {
|
|
4404
|
-
const
|
|
4405
|
-
|
|
4418
|
+
const u = e._features[c];
|
|
4419
|
+
u == null || u.createRow == null || u.createRow(s, e);
|
|
4406
4420
|
}
|
|
4407
4421
|
return s;
|
|
4408
|
-
},
|
|
4422
|
+
}, kr = {
|
|
4409
4423
|
createColumn: (e, n) => {
|
|
4410
4424
|
e._getFacetedRowModel = n.options.getFacetedRowModel && n.options.getFacetedRowModel(n, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : n.getPreFilteredRowModel(), e._getFacetedUniqueValues = n.options.getFacetedUniqueValues && n.options.getFacetedUniqueValues(n, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = n.options.getFacetedMinMaxValues && n.options.getFacetedMinMaxValues(n, e.id), e.getFacetedMinMaxValues = () => {
|
|
4411
4425
|
if (e._getFacetedMinMaxValues)
|
|
@@ -4475,7 +4489,7 @@ const Se = {
|
|
|
4475
4489
|
function we(e) {
|
|
4476
4490
|
return e == null || e === "";
|
|
4477
4491
|
}
|
|
4478
|
-
const
|
|
4492
|
+
const Rr = {
|
|
4479
4493
|
getDefaultColumnDef: () => ({
|
|
4480
4494
|
filterFn: "auto"
|
|
4481
4495
|
}),
|
|
@@ -4509,18 +4523,18 @@ const $r = {
|
|
|
4509
4523
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
4510
4524
|
}, e.setFilterValue = (t) => {
|
|
4511
4525
|
n.setColumnFilters((o) => {
|
|
4512
|
-
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((
|
|
4526
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((p) => p.id === e.id), l = $e(t, i ? i.value : void 0);
|
|
4513
4527
|
if (xn(r, l, e)) {
|
|
4514
4528
|
var s;
|
|
4515
|
-
return (s = o == null ? void 0 : o.filter((
|
|
4529
|
+
return (s = o == null ? void 0 : o.filter((p) => p.id !== e.id)) != null ? s : [];
|
|
4516
4530
|
}
|
|
4517
4531
|
const c = {
|
|
4518
4532
|
id: e.id,
|
|
4519
4533
|
value: l
|
|
4520
4534
|
};
|
|
4521
4535
|
if (i) {
|
|
4522
|
-
var
|
|
4523
|
-
return (
|
|
4536
|
+
var u;
|
|
4537
|
+
return (u = o == null ? void 0 : o.map((p) => p.id === e.id ? c : p)) != null ? u : [];
|
|
4524
4538
|
}
|
|
4525
4539
|
return o != null && o.length ? [...o, c] : [c];
|
|
4526
4540
|
});
|
|
@@ -4533,7 +4547,7 @@ const $r = {
|
|
|
4533
4547
|
e.setColumnFilters = (n) => {
|
|
4534
4548
|
const t = e.getAllLeafColumns(), o = (r) => {
|
|
4535
4549
|
var i;
|
|
4536
|
-
return (i =
|
|
4550
|
+
return (i = $e(n, r)) == null ? void 0 : i.filter((l) => {
|
|
4537
4551
|
const s = t.find((c) => c.id === l.id);
|
|
4538
4552
|
if (s) {
|
|
4539
4553
|
const c = s.getFilterFn();
|
|
@@ -4702,8 +4716,8 @@ const Or = {
|
|
|
4702
4716
|
else {
|
|
4703
4717
|
const l = [...n], s = [...r];
|
|
4704
4718
|
for (; s.length && l.length; ) {
|
|
4705
|
-
const c = l.shift(),
|
|
4706
|
-
|
|
4719
|
+
const c = l.shift(), u = s.findIndex((p) => p.id === c);
|
|
4720
|
+
u > -1 && i.push(s.splice(u, 1)[0]);
|
|
4707
4721
|
}
|
|
4708
4722
|
i = [...i, ...s];
|
|
4709
4723
|
}
|
|
@@ -4729,20 +4743,20 @@ const Or = {
|
|
|
4729
4743
|
if (t === "right") {
|
|
4730
4744
|
var s, c;
|
|
4731
4745
|
return {
|
|
4732
|
-
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((
|
|
4733
|
-
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((
|
|
4746
|
+
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((m) => !(o != null && o.includes(m))),
|
|
4747
|
+
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((m) => !(o != null && o.includes(m))), ...o]
|
|
4734
4748
|
};
|
|
4735
4749
|
}
|
|
4736
4750
|
if (t === "left") {
|
|
4737
|
-
var
|
|
4751
|
+
var u, p;
|
|
4738
4752
|
return {
|
|
4739
|
-
left: [...((
|
|
4740
|
-
right: ((
|
|
4753
|
+
left: [...((u = r == null ? void 0 : r.left) != null ? u : []).filter((m) => !(o != null && o.includes(m))), ...o],
|
|
4754
|
+
right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((m) => !(o != null && o.includes(m)))
|
|
4741
4755
|
};
|
|
4742
4756
|
}
|
|
4743
4757
|
return {
|
|
4744
|
-
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((
|
|
4745
|
-
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((
|
|
4758
|
+
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((m) => !(o != null && o.includes(m))),
|
|
4759
|
+
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((m) => !(o != null && o.includes(m)))
|
|
4746
4760
|
};
|
|
4747
4761
|
});
|
|
4748
4762
|
}, e.getCanPin = () => e.getLeafColumns().some((o) => {
|
|
@@ -4854,13 +4868,13 @@ const Or = {
|
|
|
4854
4868
|
return (i) => {
|
|
4855
4869
|
if (!o || !r || (i.persist == null || i.persist(), wt(i) && i.touches && i.touches.length > 1))
|
|
4856
4870
|
return;
|
|
4857
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX,
|
|
4871
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX, u = {}, p = (C, M) => {
|
|
4858
4872
|
typeof M == "number" && (n.setColumnSizingInfo((w) => {
|
|
4859
4873
|
var L, b;
|
|
4860
4874
|
const I = n.options.columnResizeDirection === "rtl" ? -1 : 1, T = (M - ((L = w == null ? void 0 : w.startOffset) != null ? L : 0)) * I, H = Math.max(T / ((b = w == null ? void 0 : w.startSize) != null ? b : 0), -0.999999);
|
|
4861
4875
|
return w.columnSizingStart.forEach((N) => {
|
|
4862
4876
|
let [ee, ie] = N;
|
|
4863
|
-
|
|
4877
|
+
u[ee] = Math.round(Math.max(ie + ie * H, 0) * 100) / 100;
|
|
4864
4878
|
}), {
|
|
4865
4879
|
...w,
|
|
4866
4880
|
deltaOffset: T,
|
|
@@ -4868,10 +4882,10 @@ const Or = {
|
|
|
4868
4882
|
};
|
|
4869
4883
|
}), (n.options.columnResizeMode === "onChange" || C === "end") && n.setColumnSizing((w) => ({
|
|
4870
4884
|
...w,
|
|
4871
|
-
...
|
|
4885
|
+
...u
|
|
4872
4886
|
})));
|
|
4873
|
-
},
|
|
4874
|
-
|
|
4887
|
+
}, m = (C) => p("move", C), d = (C) => {
|
|
4888
|
+
p("end", C), n.setColumnSizingInfo((M) => ({
|
|
4875
4889
|
...M,
|
|
4876
4890
|
isResizingColumn: !1,
|
|
4877
4891
|
startOffset: null,
|
|
@@ -4880,13 +4894,13 @@ const Or = {
|
|
|
4880
4894
|
deltaPercentage: null,
|
|
4881
4895
|
columnSizingStart: []
|
|
4882
4896
|
}));
|
|
4883
|
-
}, g = t || typeof document < "u" ? document : null,
|
|
4884
|
-
moveHandler: (C) =>
|
|
4897
|
+
}, g = t || typeof document < "u" ? document : null, v = {
|
|
4898
|
+
moveHandler: (C) => m(C.clientX),
|
|
4885
4899
|
upHandler: (C) => {
|
|
4886
|
-
g == null || g.removeEventListener("mousemove",
|
|
4900
|
+
g == null || g.removeEventListener("mousemove", v.moveHandler), g == null || g.removeEventListener("mouseup", v.upHandler), d(C.clientX);
|
|
4887
4901
|
}
|
|
4888
4902
|
}, f = {
|
|
4889
|
-
moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()),
|
|
4903
|
+
moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()), m(C.touches[0].clientX), !1),
|
|
4890
4904
|
upHandler: (C) => {
|
|
4891
4905
|
var M;
|
|
4892
4906
|
g == null || g.removeEventListener("touchmove", f.moveHandler), g == null || g.removeEventListener("touchend", f.upHandler), C.cancelable && (C.preventDefault(), C.stopPropagation()), d((M = C.touches[0]) == null ? void 0 : M.clientX);
|
|
@@ -4894,7 +4908,7 @@ const Or = {
|
|
|
4894
4908
|
}, h = Hr() ? {
|
|
4895
4909
|
passive: !1
|
|
4896
4910
|
} : !1;
|
|
4897
|
-
wt(i) ? (g == null || g.addEventListener("touchmove", f.moveHandler, h), g == null || g.addEventListener("touchend", f.upHandler, h)) : (g == null || g.addEventListener("mousemove",
|
|
4911
|
+
wt(i) ? (g == null || g.addEventListener("touchmove", f.moveHandler, h), g == null || g.addEventListener("touchend", f.upHandler, h)) : (g == null || g.addEventListener("mousemove", v.moveHandler, h), g == null || g.addEventListener("mouseup", v.upHandler, h)), n.setColumnSizingInfo((C) => ({
|
|
4898
4912
|
...C,
|
|
4899
4913
|
startOffset: c,
|
|
4900
4914
|
startSize: l,
|
|
@@ -5154,14 +5168,14 @@ const Br = {
|
|
|
5154
5168
|
});
|
|
5155
5169
|
}
|
|
5156
5170
|
}, e.setPagination = (o) => {
|
|
5157
|
-
const r = (i) =>
|
|
5171
|
+
const r = (i) => $e(o, i);
|
|
5158
5172
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
5159
5173
|
}, e.resetPagination = (o) => {
|
|
5160
5174
|
var r;
|
|
5161
5175
|
e.setPagination(o ? yt() : (r = e.initialState.pagination) != null ? r : yt());
|
|
5162
5176
|
}, e.setPageIndex = (o) => {
|
|
5163
5177
|
e.setPagination((r) => {
|
|
5164
|
-
let i =
|
|
5178
|
+
let i = $e(o, r.pageIndex);
|
|
5165
5179
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
5166
5180
|
return i = Math.max(0, Math.min(i, l)), {
|
|
5167
5181
|
...r,
|
|
@@ -5176,7 +5190,7 @@ const Br = {
|
|
|
5176
5190
|
e.setPageSize(o ? Pt : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Pt);
|
|
5177
5191
|
}, e.setPageSize = (o) => {
|
|
5178
5192
|
e.setPagination((r) => {
|
|
5179
|
-
const i = Math.max(1,
|
|
5193
|
+
const i = Math.max(1, $e(o, r.pageSize)), l = r.pageSize * r.pageIndex, s = Math.floor(l / i);
|
|
5180
5194
|
return {
|
|
5181
5195
|
...r,
|
|
5182
5196
|
pageIndex: s,
|
|
@@ -5185,7 +5199,7 @@ const Br = {
|
|
|
5185
5199
|
});
|
|
5186
5200
|
}, e.setPageCount = (o) => e.setPagination((r) => {
|
|
5187
5201
|
var i;
|
|
5188
|
-
let l =
|
|
5202
|
+
let l = $e(o, (i = e.options.pageCount) != null ? i : -1);
|
|
5189
5203
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
5190
5204
|
...r,
|
|
5191
5205
|
pageCount: l
|
|
@@ -5221,34 +5235,34 @@ const Br = {
|
|
|
5221
5235
|
e.pin = (t, o, r) => {
|
|
5222
5236
|
const i = o ? e.getLeafRows().map((c) => {
|
|
5223
5237
|
let {
|
|
5224
|
-
id:
|
|
5238
|
+
id: u
|
|
5225
5239
|
} = c;
|
|
5226
|
-
return
|
|
5240
|
+
return u;
|
|
5227
5241
|
}) : [], l = r ? e.getParentRows().map((c) => {
|
|
5228
5242
|
let {
|
|
5229
|
-
id:
|
|
5243
|
+
id: u
|
|
5230
5244
|
} = c;
|
|
5231
|
-
return
|
|
5245
|
+
return u;
|
|
5232
5246
|
}) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
|
5233
5247
|
n.setRowPinning((c) => {
|
|
5234
|
-
var
|
|
5248
|
+
var u, p;
|
|
5235
5249
|
if (t === "bottom") {
|
|
5236
|
-
var
|
|
5250
|
+
var m, d;
|
|
5237
5251
|
return {
|
|
5238
|
-
top: ((
|
|
5252
|
+
top: ((m = c == null ? void 0 : c.top) != null ? m : []).filter((f) => !(s != null && s.has(f))),
|
|
5239
5253
|
bottom: [...((d = c == null ? void 0 : c.bottom) != null ? d : []).filter((f) => !(s != null && s.has(f))), ...Array.from(s)]
|
|
5240
5254
|
};
|
|
5241
5255
|
}
|
|
5242
5256
|
if (t === "top") {
|
|
5243
|
-
var g,
|
|
5257
|
+
var g, v;
|
|
5244
5258
|
return {
|
|
5245
5259
|
top: [...((g = c == null ? void 0 : c.top) != null ? g : []).filter((f) => !(s != null && s.has(f))), ...Array.from(s)],
|
|
5246
|
-
bottom: ((
|
|
5260
|
+
bottom: ((v = c == null ? void 0 : c.bottom) != null ? v : []).filter((f) => !(s != null && s.has(f)))
|
|
5247
5261
|
};
|
|
5248
5262
|
}
|
|
5249
5263
|
return {
|
|
5250
|
-
top: ((
|
|
5251
|
-
bottom: ((
|
|
5264
|
+
top: ((u = c == null ? void 0 : c.top) != null ? u : []).filter((f) => !(s != null && s.has(f))),
|
|
5265
|
+
bottom: ((p = c == null ? void 0 : c.bottom) != null ? p : []).filter((f) => !(s != null && s.has(f)))
|
|
5252
5266
|
};
|
|
5253
5267
|
});
|
|
5254
5268
|
}, e.getCanPin = () => {
|
|
@@ -5436,12 +5450,12 @@ const Br = {
|
|
|
5436
5450
|
function jt(e, n) {
|
|
5437
5451
|
const t = e.getState().rowSelection, o = [], r = {}, i = function(l, s) {
|
|
5438
5452
|
return l.map((c) => {
|
|
5439
|
-
var
|
|
5440
|
-
const
|
|
5441
|
-
if (
|
|
5453
|
+
var u;
|
|
5454
|
+
const p = Ot(c, t);
|
|
5455
|
+
if (p && (o.push(c), r[c.id] = c), (u = c.subRows) != null && u.length && (c = {
|
|
5442
5456
|
...c,
|
|
5443
5457
|
subRows: i(c.subRows)
|
|
5444
|
-
}),
|
|
5458
|
+
}), p)
|
|
5445
5459
|
return c;
|
|
5446
5460
|
}).filter(Boolean);
|
|
5447
5461
|
};
|
|
@@ -5466,14 +5480,14 @@ function At(e, n, t) {
|
|
|
5466
5480
|
}
|
|
5467
5481
|
}), r ? "all" : i ? "some" : !1;
|
|
5468
5482
|
}
|
|
5469
|
-
const Nt = /([0-9]+)/gm, Kr = (e, n, t) => Un(
|
|
5483
|
+
const Nt = /([0-9]+)/gm, Kr = (e, n, t) => Un(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), Xr = (e, n, t) => Un(ke(e.getValue(t)), ke(n.getValue(t))), Jr = (e, n, t) => It(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), Qr = (e, n, t) => It(ke(e.getValue(t)), ke(n.getValue(t))), ei = (e, n, t) => {
|
|
5470
5484
|
const o = e.getValue(t), r = n.getValue(t);
|
|
5471
5485
|
return o > r ? 1 : o < r ? -1 : 0;
|
|
5472
5486
|
}, ti = (e, n, t) => It(e.getValue(t), n.getValue(t));
|
|
5473
5487
|
function It(e, n) {
|
|
5474
5488
|
return e === n ? 0 : e > n ? 1 : -1;
|
|
5475
5489
|
}
|
|
5476
|
-
function
|
|
5490
|
+
function ke(e) {
|
|
5477
5491
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
5478
5492
|
}
|
|
5479
5493
|
function Un(e, n) {
|
|
@@ -5540,21 +5554,21 @@ const Ne = {
|
|
|
5540
5554
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
5541
5555
|
n.setSorting((l) => {
|
|
5542
5556
|
const s = l == null ? void 0 : l.find((g) => g.id === e.id), c = l == null ? void 0 : l.findIndex((g) => g.id === e.id);
|
|
5543
|
-
let
|
|
5544
|
-
if (l != null && l.length && e.getCanMultiSort() && o ? s ?
|
|
5557
|
+
let u = [], p, m = i ? t : r === "desc";
|
|
5558
|
+
if (l != null && l.length && e.getCanMultiSort() && o ? s ? p = "toggle" : p = "add" : l != null && l.length && c !== l.length - 1 ? p = "replace" : s ? p = "toggle" : p = "replace", p === "toggle" && (i || r || (p = "remove")), p === "add") {
|
|
5545
5559
|
var d;
|
|
5546
|
-
|
|
5560
|
+
u = [...l, {
|
|
5547
5561
|
id: e.id,
|
|
5548
|
-
desc:
|
|
5549
|
-
}],
|
|
5550
|
-
} else
|
|
5562
|
+
desc: m
|
|
5563
|
+
}], u.splice(0, u.length - ((d = n.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
5564
|
+
} else p === "toggle" ? u = l.map((g) => g.id === e.id ? {
|
|
5551
5565
|
...g,
|
|
5552
|
-
desc:
|
|
5553
|
-
} : g) :
|
|
5566
|
+
desc: m
|
|
5567
|
+
} : g) : p === "remove" ? u = l.filter((g) => g.id !== e.id) : u = [{
|
|
5554
5568
|
id: e.id,
|
|
5555
|
-
desc:
|
|
5569
|
+
desc: m
|
|
5556
5570
|
}];
|
|
5557
|
-
return
|
|
5571
|
+
return u;
|
|
5558
5572
|
});
|
|
5559
5573
|
}, e.getFirstSortDir = () => {
|
|
5560
5574
|
var t, o;
|
|
@@ -5597,8 +5611,8 @@ const Ne = {
|
|
|
5597
5611
|
qr,
|
|
5598
5612
|
Or,
|
|
5599
5613
|
Ir,
|
|
5614
|
+
kr,
|
|
5600
5615
|
Rr,
|
|
5601
|
-
$r,
|
|
5602
5616
|
Br,
|
|
5603
5617
|
//depends on ColumnFaceting
|
|
5604
5618
|
Gr,
|
|
@@ -5631,9 +5645,9 @@ function ri(e) {
|
|
|
5631
5645
|
var g;
|
|
5632
5646
|
c = (g = d.getInitialState == null ? void 0 : d.getInitialState(c)) != null ? g : c;
|
|
5633
5647
|
});
|
|
5634
|
-
const
|
|
5635
|
-
let
|
|
5636
|
-
const
|
|
5648
|
+
const u = [];
|
|
5649
|
+
let p = !1;
|
|
5650
|
+
const m = {
|
|
5637
5651
|
_features: o,
|
|
5638
5652
|
options: {
|
|
5639
5653
|
...i,
|
|
@@ -5641,10 +5655,10 @@ function ri(e) {
|
|
|
5641
5655
|
},
|
|
5642
5656
|
initialState: c,
|
|
5643
5657
|
_queue: (d) => {
|
|
5644
|
-
|
|
5645
|
-
for (;
|
|
5646
|
-
|
|
5647
|
-
|
|
5658
|
+
u.push(d), p || (p = !0, Promise.resolve().then(() => {
|
|
5659
|
+
for (; u.length; )
|
|
5660
|
+
u.shift()();
|
|
5661
|
+
p = !1;
|
|
5648
5662
|
}).catch((g) => setTimeout(() => {
|
|
5649
5663
|
throw g;
|
|
5650
5664
|
})));
|
|
@@ -5653,16 +5667,16 @@ function ri(e) {
|
|
|
5653
5667
|
r.setState(r.initialState);
|
|
5654
5668
|
},
|
|
5655
5669
|
setOptions: (d) => {
|
|
5656
|
-
const g =
|
|
5670
|
+
const g = $e(d, r.options);
|
|
5657
5671
|
r.options = l(g);
|
|
5658
5672
|
},
|
|
5659
5673
|
getState: () => r.options.state,
|
|
5660
5674
|
setState: (d) => {
|
|
5661
5675
|
r.options.onStateChange == null || r.options.onStateChange(d);
|
|
5662
5676
|
},
|
|
5663
|
-
_getRowId: (d, g,
|
|
5677
|
+
_getRowId: (d, g, v) => {
|
|
5664
5678
|
var f;
|
|
5665
|
-
return (f = r.options.getRowId == null ? void 0 : r.options.getRowId(d, g,
|
|
5679
|
+
return (f = r.options.getRowId == null ? void 0 : r.options.getRowId(d, g, v)) != null ? f : `${v ? [v.id, g].join(".") : g}`;
|
|
5666
5680
|
},
|
|
5667
5681
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
5668
5682
|
// The final calls start at the bottom of the model,
|
|
@@ -5670,31 +5684,31 @@ function ri(e) {
|
|
|
5670
5684
|
getRowModel: () => r.getPaginationRowModel(),
|
|
5671
5685
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
5672
5686
|
getRow: (d, g) => {
|
|
5673
|
-
let
|
|
5674
|
-
if (!
|
|
5687
|
+
let v = (g ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
|
|
5688
|
+
if (!v && (v = r.getCoreRowModel().rowsById[d], !v))
|
|
5675
5689
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
5676
|
-
return
|
|
5690
|
+
return v;
|
|
5677
5691
|
},
|
|
5678
5692
|
_getDefaultColumnDef: G(() => [r.options.defaultColumn], (d) => {
|
|
5679
5693
|
var g;
|
|
5680
5694
|
return d = (g = d) != null ? g : {}, {
|
|
5681
|
-
header: (
|
|
5682
|
-
const f =
|
|
5695
|
+
header: (v) => {
|
|
5696
|
+
const f = v.header.column.columnDef;
|
|
5683
5697
|
return f.accessorKey ? f.accessorKey : f.accessorFn ? f.id : null;
|
|
5684
5698
|
},
|
|
5685
5699
|
// footer: props => props.header.column.id,
|
|
5686
|
-
cell: (
|
|
5700
|
+
cell: (v) => {
|
|
5687
5701
|
var f, h;
|
|
5688
|
-
return (f = (h =
|
|
5702
|
+
return (f = (h = v.renderValue()) == null || h.toString == null ? void 0 : h.toString()) != null ? f : null;
|
|
5689
5703
|
},
|
|
5690
|
-
...r._features.reduce((
|
|
5704
|
+
...r._features.reduce((v, f) => Object.assign(v, f.getDefaultColumnDef == null ? void 0 : f.getDefaultColumnDef()), {}),
|
|
5691
5705
|
...d
|
|
5692
5706
|
};
|
|
5693
5707
|
}, Z(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5694
5708
|
_getColumnDefs: () => r.options.columns,
|
|
5695
5709
|
getAllColumns: G(() => [r._getColumnDefs()], (d) => {
|
|
5696
|
-
const g = function(
|
|
5697
|
-
return h === void 0 && (h = 0),
|
|
5710
|
+
const g = function(v, f, h) {
|
|
5711
|
+
return h === void 0 && (h = 0), v.map((C) => {
|
|
5698
5712
|
const M = jr(r, C, h, f), w = C;
|
|
5699
5713
|
return M.columns = w.columns ? g(w.columns, M, h + 1) : [], M;
|
|
5700
5714
|
});
|
|
@@ -5702,17 +5716,17 @@ function ri(e) {
|
|
|
5702
5716
|
return g(d);
|
|
5703
5717
|
}, Z(e, "debugColumns", "getAllColumns")),
|
|
5704
5718
|
getAllFlatColumns: G(() => [r.getAllColumns()], (d) => d.flatMap((g) => g.getFlatColumns()), Z(e, "debugColumns", "getAllFlatColumns")),
|
|
5705
|
-
_getAllFlatColumnsById: G(() => [r.getAllFlatColumns()], (d) => d.reduce((g,
|
|
5719
|
+
_getAllFlatColumnsById: G(() => [r.getAllFlatColumns()], (d) => d.reduce((g, v) => (g[v.id] = v, g), {}), Z(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5706
5720
|
getAllLeafColumns: G(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, g) => {
|
|
5707
|
-
let
|
|
5708
|
-
return g(
|
|
5721
|
+
let v = d.flatMap((f) => f.getLeafColumns());
|
|
5722
|
+
return g(v);
|
|
5709
5723
|
}, Z(e, "debugColumns", "getAllLeafColumns")),
|
|
5710
5724
|
getColumn: (d) => {
|
|
5711
5725
|
const g = r._getAllFlatColumnsById()[d];
|
|
5712
5726
|
return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${d}' does not exist.`), g;
|
|
5713
5727
|
}
|
|
5714
5728
|
};
|
|
5715
|
-
Object.assign(r,
|
|
5729
|
+
Object.assign(r, m);
|
|
5716
5730
|
for (let d = 0; d < r._features.length; d++) {
|
|
5717
5731
|
const g = r._features[d];
|
|
5718
5732
|
g == null || g.createTable == null || g.createTable(r);
|
|
@@ -5728,11 +5742,11 @@ function ii() {
|
|
|
5728
5742
|
}, o = function(r, i, l) {
|
|
5729
5743
|
i === void 0 && (i = 0);
|
|
5730
5744
|
const s = [];
|
|
5731
|
-
for (let
|
|
5732
|
-
const
|
|
5733
|
-
if (t.flatRows.push(
|
|
5745
|
+
for (let u = 0; u < r.length; u++) {
|
|
5746
|
+
const p = $r(e, e._getRowId(r[u], u, l), r[u], u, i, void 0, l == null ? void 0 : l.id);
|
|
5747
|
+
if (t.flatRows.push(p), t.rowsById[p.id] = p, s.push(p), e.options.getSubRows) {
|
|
5734
5748
|
var c;
|
|
5735
|
-
|
|
5749
|
+
p.originalSubRows = e.options.getSubRows(r[u], u), (c = p.originalSubRows) != null && c.length && (p.subRows = o(p.originalSubRows, i + 1, p));
|
|
5736
5750
|
}
|
|
5737
5751
|
}
|
|
5738
5752
|
return s;
|
|
@@ -5818,20 +5832,23 @@ const li = {
|
|
|
5818
5832
|
pageSize: t = 10,
|
|
5819
5833
|
onPageChange: o,
|
|
5820
5834
|
hideEdgeButtons: r = !1,
|
|
5821
|
-
className: i = ""
|
|
5835
|
+
className: i = "",
|
|
5836
|
+
iconClass: l = "",
|
|
5837
|
+
pageClass: s = ""
|
|
5822
5838
|
}) => {
|
|
5823
|
-
const
|
|
5824
|
-
return
|
|
5839
|
+
const c = Math.ceil(e / t), u = n === 1, p = n === c;
|
|
5840
|
+
return c <= 1 ? null : /* @__PURE__ */ a.jsxs("div", { className: `flex items-center space-x-1 ${i}`, children: [
|
|
5825
5841
|
!r && /* @__PURE__ */ a.jsx(
|
|
5826
5842
|
je,
|
|
5827
5843
|
{
|
|
5828
5844
|
color: "dark",
|
|
5829
5845
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z" }) }),
|
|
5830
5846
|
onClick: () => o(1),
|
|
5831
|
-
disabled:
|
|
5847
|
+
disabled: u,
|
|
5832
5848
|
roundedFull: !0,
|
|
5833
5849
|
size: "small",
|
|
5834
|
-
variant: "transparent"
|
|
5850
|
+
variant: "transparent",
|
|
5851
|
+
className: l
|
|
5835
5852
|
}
|
|
5836
5853
|
),
|
|
5837
5854
|
/* @__PURE__ */ a.jsx(
|
|
@@ -5840,17 +5857,18 @@ const li = {
|
|
|
5840
5857
|
color: "dark",
|
|
5841
5858
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) }),
|
|
5842
5859
|
onClick: () => o(n - 1),
|
|
5843
|
-
disabled:
|
|
5860
|
+
disabled: u,
|
|
5844
5861
|
roundedFull: !0,
|
|
5845
5862
|
size: "small",
|
|
5846
|
-
variant: "transparent"
|
|
5863
|
+
variant: "transparent",
|
|
5864
|
+
className: l
|
|
5847
5865
|
}
|
|
5848
5866
|
),
|
|
5849
|
-
/* @__PURE__ */ a.jsxs("span", { className:
|
|
5867
|
+
/* @__PURE__ */ a.jsxs("span", { className: `text-sm text-color-gray-800 ${s}`, children: [
|
|
5850
5868
|
"Page ",
|
|
5851
5869
|
n,
|
|
5852
5870
|
" of ",
|
|
5853
|
-
|
|
5871
|
+
c
|
|
5854
5872
|
] }),
|
|
5855
5873
|
/* @__PURE__ */ a.jsx(
|
|
5856
5874
|
je,
|
|
@@ -5858,10 +5876,11 @@ const li = {
|
|
|
5858
5876
|
color: "dark",
|
|
5859
5877
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) }),
|
|
5860
5878
|
onClick: () => o(n + 1),
|
|
5861
|
-
disabled:
|
|
5879
|
+
disabled: p,
|
|
5862
5880
|
roundedFull: !0,
|
|
5863
5881
|
size: "small",
|
|
5864
|
-
variant: "transparent"
|
|
5882
|
+
variant: "transparent",
|
|
5883
|
+
className: l
|
|
5865
5884
|
}
|
|
5866
5885
|
),
|
|
5867
5886
|
!r && /* @__PURE__ */ a.jsx(
|
|
@@ -5869,11 +5888,12 @@ const li = {
|
|
|
5869
5888
|
{
|
|
5870
5889
|
color: "dark",
|
|
5871
5890
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z" }) }),
|
|
5872
|
-
onClick: () => o(
|
|
5873
|
-
disabled:
|
|
5891
|
+
onClick: () => o(c),
|
|
5892
|
+
disabled: p,
|
|
5874
5893
|
roundedFull: !0,
|
|
5875
5894
|
size: "small",
|
|
5876
|
-
variant: "transparent"
|
|
5895
|
+
variant: "transparent",
|
|
5896
|
+
className: l
|
|
5877
5897
|
}
|
|
5878
5898
|
)
|
|
5879
5899
|
] });
|
|
@@ -5887,9 +5907,9 @@ const li = {
|
|
|
5887
5907
|
rowOptionArray: l = [5, 10, 15],
|
|
5888
5908
|
totalRecords: s = e.length,
|
|
5889
5909
|
className: c = "",
|
|
5890
|
-
paginationClassName:
|
|
5891
|
-
tdClassName:
|
|
5892
|
-
thClassName:
|
|
5910
|
+
paginationClassName: u = "",
|
|
5911
|
+
tdClassName: p = "",
|
|
5912
|
+
thClassName: m = "",
|
|
5893
5913
|
responsive: d = !1
|
|
5894
5914
|
}) => {
|
|
5895
5915
|
const g = ai({
|
|
@@ -5908,24 +5928,24 @@ const li = {
|
|
|
5908
5928
|
className: `relative overflow-y-auto flex flex-col ${c} `,
|
|
5909
5929
|
children: [
|
|
5910
5930
|
/* @__PURE__ */ a.jsx("div", { className: `${d ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { className: "w-full relative border-collapse", children: [
|
|
5911
|
-
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: g.getHeaderGroups().map((
|
|
5931
|
+
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: g.getHeaderGroups().map((v) => /* @__PURE__ */ a.jsx("tr", { children: v.headers.map((f) => /* @__PURE__ */ a.jsx(
|
|
5912
5932
|
"th",
|
|
5913
5933
|
{
|
|
5914
|
-
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${
|
|
5934
|
+
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${m}`,
|
|
5915
5935
|
children: f.isPlaceholder ? null : f.column.columnDef.header instanceof Function ? f.column.columnDef.header(
|
|
5916
5936
|
f.getContext()
|
|
5917
5937
|
) : f.column.columnDef.header
|
|
5918
5938
|
},
|
|
5919
5939
|
f.id
|
|
5920
|
-
)) },
|
|
5921
|
-
/* @__PURE__ */ a.jsx("tbody", { className: "", children: g.getRowModel().rows.map((
|
|
5940
|
+
)) }, v.id)) }),
|
|
5941
|
+
/* @__PURE__ */ a.jsx("tbody", { className: "", children: g.getRowModel().rows.map((v) => /* @__PURE__ */ a.jsx(
|
|
5922
5942
|
"tr",
|
|
5923
5943
|
{
|
|
5924
5944
|
className: "border-b border-color-gray-200",
|
|
5925
|
-
children:
|
|
5945
|
+
children: v.getVisibleCells().map((f) => /* @__PURE__ */ a.jsx(
|
|
5926
5946
|
"td",
|
|
5927
5947
|
{
|
|
5928
|
-
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${
|
|
5948
|
+
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${p}`,
|
|
5929
5949
|
children: f.column.columnDef.cell instanceof Function ? f.column.columnDef.cell(
|
|
5930
5950
|
f.getContext()
|
|
5931
5951
|
) : f.getValue()
|
|
@@ -5933,13 +5953,13 @@ const li = {
|
|
|
5933
5953
|
f.id
|
|
5934
5954
|
))
|
|
5935
5955
|
},
|
|
5936
|
-
|
|
5956
|
+
v.id
|
|
5937
5957
|
)) })
|
|
5938
5958
|
] }) }),
|
|
5939
5959
|
/* @__PURE__ */ a.jsxs(
|
|
5940
5960
|
"div",
|
|
5941
5961
|
{
|
|
5942
|
-
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${
|
|
5962
|
+
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${u} sticky bottom-0 z-10`,
|
|
5943
5963
|
children: [
|
|
5944
5964
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5945
5965
|
/* @__PURE__ */ a.jsx(si, { variant: "body2", className: "hidden md:!flex", children: "Rows per page" }),
|
|
@@ -5949,8 +5969,8 @@ const li = {
|
|
|
5949
5969
|
options: l,
|
|
5950
5970
|
selectedValue: t,
|
|
5951
5971
|
placementTop: !0,
|
|
5952
|
-
onChange: (
|
|
5953
|
-
r(
|
|
5972
|
+
onChange: (v) => {
|
|
5973
|
+
r(v), i(0);
|
|
5954
5974
|
}
|
|
5955
5975
|
}
|
|
5956
5976
|
)
|
|
@@ -5961,7 +5981,7 @@ const li = {
|
|
|
5961
5981
|
total: s,
|
|
5962
5982
|
pageSize: t,
|
|
5963
5983
|
currentPage: o + 1,
|
|
5964
|
-
onPageChange: (
|
|
5984
|
+
onPageChange: (v) => i(v - 1)
|
|
5965
5985
|
}
|
|
5966
5986
|
)
|
|
5967
5987
|
]
|
|
@@ -6038,15 +6058,15 @@ const li = {
|
|
|
6038
6058
|
defaultHeight: 100
|
|
6039
6059
|
};
|
|
6040
6060
|
}
|
|
6041
|
-
}, { classes: c, defaultWidth:
|
|
6042
|
-
|
|
6043
|
-
const
|
|
6061
|
+
}, { classes: c, defaultWidth: u, defaultHeight: p } = s(), m = t ?? u, d = o ?? p, g = {};
|
|
6062
|
+
m !== void 0 && (g.width = `${m}px`), d !== void 0 && (g.height = `${d}px`), n === "text" && t === void 0 && (g.width = "100%");
|
|
6063
|
+
const v = [
|
|
6044
6064
|
i,
|
|
6045
6065
|
c,
|
|
6046
6066
|
l[e],
|
|
6047
6067
|
r
|
|
6048
6068
|
].filter(Boolean).join(" ");
|
|
6049
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
6069
|
+
return /* @__PURE__ */ a.jsx("div", { className: v, style: g, children: e === "wave" && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6050
6070
|
/* @__PURE__ */ a.jsx(
|
|
6051
6071
|
"div",
|
|
6052
6072
|
{
|
|
@@ -6102,11 +6122,11 @@ const li = {
|
|
|
6102
6122
|
large: { track: "h-3", thumb: "w-5 h-5" }
|
|
6103
6123
|
};
|
|
6104
6124
|
function gi(e) {
|
|
6105
|
-
const n = le(null), t = le(null), o = le(null), r = (c,
|
|
6106
|
-
if (c ===
|
|
6107
|
-
if (Array.isArray(c) && Array.isArray(
|
|
6108
|
-
if (c.length !==
|
|
6109
|
-
for (let
|
|
6125
|
+
const n = le(null), t = le(null), o = le(null), r = (c, u) => {
|
|
6126
|
+
if (c === u) return !0;
|
|
6127
|
+
if (Array.isArray(c) && Array.isArray(u)) {
|
|
6128
|
+
if (c.length !== u.length) return !1;
|
|
6129
|
+
for (let p = 0; p < c.length; p++) if (c[p] !== u[p]) return !1;
|
|
6110
6130
|
return !0;
|
|
6111
6131
|
}
|
|
6112
6132
|
return !1;
|
|
@@ -6139,57 +6159,57 @@ const Vi = no(function({
|
|
|
6139
6159
|
max: l = 100,
|
|
6140
6160
|
step: s = 1,
|
|
6141
6161
|
color: c = "blue",
|
|
6142
|
-
size:
|
|
6143
|
-
disabled:
|
|
6144
|
-
className:
|
|
6162
|
+
size: u = "medium",
|
|
6163
|
+
disabled: p = !1,
|
|
6164
|
+
className: m = "",
|
|
6145
6165
|
showValue: d = !0,
|
|
6146
6166
|
showMarks: g = !1,
|
|
6147
|
-
marks:
|
|
6167
|
+
marks: v = [],
|
|
6148
6168
|
range: f = !1,
|
|
6149
6169
|
minDistance: h = 0
|
|
6150
6170
|
}) {
|
|
6151
|
-
const C = n !== void 0, [M, w] = W(() => t !== void 0 ? t : f ? [i, l] : i), L = C ? n : M, b = Array.isArray(L) ? L[0] : L, [I, T] = Array.isArray(L) ? L : [L, L], H = St[c] || St.blue, N = vn[
|
|
6152
|
-
(
|
|
6171
|
+
const C = n !== void 0, [M, w] = W(() => t !== void 0 ? t : f ? [i, l] : i), L = C ? n : M, b = Array.isArray(L) ? L[0] : L, [I, T] = Array.isArray(L) ? L : [L, L], H = St[c] || St.blue, N = vn[u] ?? vn.medium, ee = oe(
|
|
6172
|
+
($) => ($ - i) / (l - i) * 100,
|
|
6153
6173
|
[i, l]
|
|
6154
|
-
), ie = ee(b), ce = ee(I), U = ee(T), O = oe((
|
|
6155
|
-
(
|
|
6156
|
-
C || w(
|
|
6174
|
+
), ie = ee(b), ce = ee(I), U = ee(T), O = oe(($) => Math.max(i, Math.min(l, $)), [i, l]), Y = oe(($) => Math.round($ / s) * s, [s]), D = gi(o), Q = oe(
|
|
6175
|
+
($, X = !0) => {
|
|
6176
|
+
C || w($), X ? D.schedule($) : D.flush($);
|
|
6157
6177
|
},
|
|
6158
6178
|
[C, D]
|
|
6159
6179
|
), pe = oe(() => {
|
|
6160
|
-
const
|
|
6161
|
-
|
|
6180
|
+
const $ = D.last.current;
|
|
6181
|
+
$ != null && (D.flush($), r == null || r($));
|
|
6162
6182
|
}, [D, r]), K = oe(
|
|
6163
|
-
(
|
|
6164
|
-
if (f && Array.isArray(
|
|
6165
|
-
let [J, ue] =
|
|
6183
|
+
($, X) => {
|
|
6184
|
+
if (f && Array.isArray($)) {
|
|
6185
|
+
let [J, ue] = $, de = Y(O(J)), ve = Y(O(ue));
|
|
6166
6186
|
return ve - de < h && (X === "min" ? ve = O(de + h) : X === "max" && (de = O(ve - h))), de > ve && (X === "min" ? de = ve : ve = de), [de, ve];
|
|
6167
|
-
} else if (!f && typeof
|
|
6168
|
-
return Y(O(
|
|
6169
|
-
return
|
|
6187
|
+
} else if (!f && typeof $ == "number")
|
|
6188
|
+
return Y(O($));
|
|
6189
|
+
return $;
|
|
6170
6190
|
},
|
|
6171
6191
|
[f, O, Y, h]
|
|
6172
|
-
),
|
|
6173
|
-
(
|
|
6192
|
+
), x = le(null), y = oe(
|
|
6193
|
+
($) => {
|
|
6174
6194
|
var ue;
|
|
6175
|
-
const X = (ue =
|
|
6195
|
+
const X = (ue = x.current) == null ? void 0 : ue.getBoundingClientRect();
|
|
6176
6196
|
if (!X) return f ? i : b;
|
|
6177
|
-
const J = Math.max(0, Math.min(1, (
|
|
6197
|
+
const J = Math.max(0, Math.min(1, ($ - X.left) / X.width));
|
|
6178
6198
|
return i + J * (l - i);
|
|
6179
6199
|
},
|
|
6180
6200
|
[i, l, f, b]
|
|
6181
6201
|
), E = oe(
|
|
6182
|
-
(
|
|
6183
|
-
const X = Math.abs(
|
|
6202
|
+
($) => {
|
|
6203
|
+
const X = Math.abs($ - I), J = Math.abs($ - T);
|
|
6184
6204
|
return X <= J ? "min" : "max";
|
|
6185
6205
|
},
|
|
6186
6206
|
[I, T]
|
|
6187
|
-
), [_, F] = W(null), [z, A] = W(null), [
|
|
6188
|
-
(
|
|
6207
|
+
), [_, F] = W(null), [z, A] = W(null), [k, R] = W(null), V = oe(
|
|
6208
|
+
($, X) => {
|
|
6189
6209
|
var ue, de;
|
|
6190
|
-
if (
|
|
6191
|
-
|
|
6192
|
-
const J = y(
|
|
6210
|
+
if (p) return;
|
|
6211
|
+
$.preventDefault(), (de = (ue = $.currentTarget).setPointerCapture) == null || de.call(ue, $.pointerId), R($.pointerId);
|
|
6212
|
+
const J = y($.clientX);
|
|
6193
6213
|
if (f) {
|
|
6194
6214
|
const ve = X || E(J);
|
|
6195
6215
|
F(ve), Q(ve === "min" ? K([J, T], "min") : K([I, J], "max"));
|
|
@@ -6197,7 +6217,7 @@ const Vi = no(function({
|
|
|
6197
6217
|
F("single"), Q(K(J, "single"));
|
|
6198
6218
|
},
|
|
6199
6219
|
[
|
|
6200
|
-
|
|
6220
|
+
p,
|
|
6201
6221
|
f,
|
|
6202
6222
|
y,
|
|
6203
6223
|
E,
|
|
@@ -6207,14 +6227,14 @@ const Vi = no(function({
|
|
|
6207
6227
|
Q
|
|
6208
6228
|
]
|
|
6209
6229
|
), q = oe(
|
|
6210
|
-
(
|
|
6211
|
-
if (
|
|
6212
|
-
const X = y(
|
|
6230
|
+
($) => {
|
|
6231
|
+
if (p || k == null || _ == null) return;
|
|
6232
|
+
const X = y($.clientX);
|
|
6213
6233
|
f ? _ === "min" ? Q(K([X, T], "min")) : _ === "max" && Q(K([I, X], "max")) : Q(K(X, "single"));
|
|
6214
6234
|
},
|
|
6215
6235
|
[
|
|
6216
|
-
|
|
6217
|
-
|
|
6236
|
+
p,
|
|
6237
|
+
k,
|
|
6218
6238
|
_,
|
|
6219
6239
|
f,
|
|
6220
6240
|
y,
|
|
@@ -6224,14 +6244,14 @@ const Vi = no(function({
|
|
|
6224
6244
|
Q
|
|
6225
6245
|
]
|
|
6226
6246
|
), j = oe(() => {
|
|
6227
|
-
_ != null && (F(null),
|
|
6247
|
+
_ != null && (F(null), R(null), pe());
|
|
6228
6248
|
}, [_, pe]), S = oe(
|
|
6229
|
-
(
|
|
6230
|
-
if (
|
|
6249
|
+
($, X) => {
|
|
6250
|
+
if (p) return;
|
|
6231
6251
|
const J = f ? X === "min" ? I : T : b;
|
|
6232
6252
|
let ue = J;
|
|
6233
6253
|
const de = (l - i) / 10;
|
|
6234
|
-
switch (
|
|
6254
|
+
switch ($.key) {
|
|
6235
6255
|
case "ArrowLeft":
|
|
6236
6256
|
case "ArrowDown":
|
|
6237
6257
|
ue = J - s;
|
|
@@ -6255,10 +6275,10 @@ const Vi = no(function({
|
|
|
6255
6275
|
default:
|
|
6256
6276
|
return;
|
|
6257
6277
|
}
|
|
6258
|
-
|
|
6278
|
+
$.preventDefault(), Q(f ? X === "min" ? K([ue, T], "min") : K([I, ue], "max") : K(ue, "single"), !1), r == null || r(C ? n : L);
|
|
6259
6279
|
},
|
|
6260
6280
|
[
|
|
6261
|
-
|
|
6281
|
+
p,
|
|
6262
6282
|
f,
|
|
6263
6283
|
b,
|
|
6264
6284
|
I,
|
|
@@ -6276,22 +6296,22 @@ const Vi = no(function({
|
|
|
6276
6296
|
);
|
|
6277
6297
|
return se(() => {
|
|
6278
6298
|
if (!_) return;
|
|
6279
|
-
const
|
|
6299
|
+
const $ = document.body.style.userSelect;
|
|
6280
6300
|
return document.body.style.userSelect = "none", () => {
|
|
6281
|
-
document.body.style.userSelect =
|
|
6301
|
+
document.body.style.userSelect = $;
|
|
6282
6302
|
};
|
|
6283
|
-
}, [_]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${
|
|
6303
|
+
}, [_]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${m}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
|
|
6284
6304
|
f && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: I }) }) }),
|
|
6285
6305
|
/* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
6286
6306
|
/* @__PURE__ */ a.jsxs(
|
|
6287
6307
|
"div",
|
|
6288
6308
|
{
|
|
6289
|
-
ref:
|
|
6309
|
+
ref: x,
|
|
6290
6310
|
className: `
|
|
6291
6311
|
relative w-full ${N.track} ${H.track} rounded-full
|
|
6292
|
-
${
|
|
6312
|
+
${p ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
|
|
6293
6313
|
`,
|
|
6294
|
-
onPointerDown: (
|
|
6314
|
+
onPointerDown: ($) => V($),
|
|
6295
6315
|
onPointerMove: q,
|
|
6296
6316
|
onPointerUp: j,
|
|
6297
6317
|
onPointerCancel: j,
|
|
@@ -6309,8 +6329,8 @@ const Vi = no(function({
|
|
|
6309
6329
|
style: { width: `${ie}%` }
|
|
6310
6330
|
}
|
|
6311
6331
|
),
|
|
6312
|
-
g &&
|
|
6313
|
-
const J = ee(
|
|
6332
|
+
g && v.map(($, X) => {
|
|
6333
|
+
const J = ee($.value);
|
|
6314
6334
|
return /* @__PURE__ */ a.jsx(
|
|
6315
6335
|
"div",
|
|
6316
6336
|
{
|
|
@@ -6326,23 +6346,23 @@ const Vi = no(function({
|
|
|
6326
6346
|
className: `
|
|
6327
6347
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2
|
|
6328
6348
|
${N.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6329
|
-
rounded-full border-2 ${
|
|
6349
|
+
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6330
6350
|
${_ === "single" ? "cursor-grabbing scale-110" : _ ? "" : "transition-all duration-150"}
|
|
6331
6351
|
${z === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6332
6352
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6333
6353
|
`,
|
|
6334
6354
|
style: { left: `${ie}%` },
|
|
6335
|
-
tabIndex:
|
|
6355
|
+
tabIndex: p ? -1 : 0,
|
|
6336
6356
|
role: "slider",
|
|
6337
6357
|
"aria-orientation": "horizontal",
|
|
6338
6358
|
"aria-valuemin": i,
|
|
6339
6359
|
"aria-valuemax": l,
|
|
6340
6360
|
"aria-valuenow": b,
|
|
6341
|
-
"aria-disabled":
|
|
6342
|
-
onKeyDown: (
|
|
6361
|
+
"aria-disabled": p,
|
|
6362
|
+
onKeyDown: ($) => S($, "single"),
|
|
6343
6363
|
onFocus: () => A("single"),
|
|
6344
6364
|
onBlur: () => A(null),
|
|
6345
|
-
onPointerDown: (
|
|
6365
|
+
onPointerDown: ($) => V($, "single")
|
|
6346
6366
|
}
|
|
6347
6367
|
),
|
|
6348
6368
|
f && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -6352,24 +6372,24 @@ const Vi = no(function({
|
|
|
6352
6372
|
className: `
|
|
6353
6373
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6354
6374
|
${N.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6355
|
-
rounded-full border-2 ${
|
|
6375
|
+
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6356
6376
|
${_ === "min" ? "cursor-grabbing scale-110 z-20" : _ ? "" : "transition-all duration-150"}
|
|
6357
6377
|
${z === "min" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6358
6378
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6359
6379
|
`,
|
|
6360
6380
|
style: { left: `${ce}%` },
|
|
6361
|
-
tabIndex:
|
|
6381
|
+
tabIndex: p ? -1 : 0,
|
|
6362
6382
|
role: "slider",
|
|
6363
6383
|
"aria-orientation": "horizontal",
|
|
6364
6384
|
"aria-valuemin": i,
|
|
6365
6385
|
"aria-valuemax": l,
|
|
6366
6386
|
"aria-valuenow": I,
|
|
6367
|
-
"aria-disabled":
|
|
6387
|
+
"aria-disabled": p,
|
|
6368
6388
|
"aria-label": "Minimum value",
|
|
6369
|
-
onKeyDown: (
|
|
6389
|
+
onKeyDown: ($) => S($, "min"),
|
|
6370
6390
|
onFocus: () => A("min"),
|
|
6371
6391
|
onBlur: () => A(null),
|
|
6372
|
-
onPointerDown: (
|
|
6392
|
+
onPointerDown: ($) => V($, "min")
|
|
6373
6393
|
}
|
|
6374
6394
|
),
|
|
6375
6395
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6378,42 +6398,42 @@ const Vi = no(function({
|
|
|
6378
6398
|
className: `
|
|
6379
6399
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6380
6400
|
${N.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6381
|
-
rounded-full border-2 ${
|
|
6401
|
+
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6382
6402
|
${_ === "max" ? "cursor-grabbing scale-110 z-20" : _ ? "" : "transition-all duration-150"}
|
|
6383
6403
|
${z === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6384
6404
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6385
6405
|
`,
|
|
6386
6406
|
style: { left: `${U}%` },
|
|
6387
|
-
tabIndex:
|
|
6407
|
+
tabIndex: p ? -1 : 0,
|
|
6388
6408
|
role: "slider",
|
|
6389
6409
|
"aria-orientation": "horizontal",
|
|
6390
6410
|
"aria-valuemin": i,
|
|
6391
6411
|
"aria-valuemax": l,
|
|
6392
6412
|
"aria-valuenow": T,
|
|
6393
|
-
"aria-disabled":
|
|
6413
|
+
"aria-disabled": p,
|
|
6394
6414
|
"aria-label": "Maximum value",
|
|
6395
|
-
onKeyDown: (
|
|
6415
|
+
onKeyDown: ($) => S($, "max"),
|
|
6396
6416
|
onFocus: () => A("max"),
|
|
6397
6417
|
onBlur: () => A(null),
|
|
6398
|
-
onPointerDown: (
|
|
6418
|
+
onPointerDown: ($) => V($, "max")
|
|
6399
6419
|
}
|
|
6400
6420
|
)
|
|
6401
6421
|
] })
|
|
6402
6422
|
]
|
|
6403
6423
|
}
|
|
6404
6424
|
),
|
|
6405
|
-
g &&
|
|
6425
|
+
g && v.length > 0 && /* @__PURE__ */ a.jsx(
|
|
6406
6426
|
"div",
|
|
6407
6427
|
{
|
|
6408
6428
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6409
|
-
children:
|
|
6410
|
-
const J = ee(
|
|
6429
|
+
children: v.map(($, X) => {
|
|
6430
|
+
const J = ee($.value);
|
|
6411
6431
|
return /* @__PURE__ */ a.jsx(
|
|
6412
6432
|
"div",
|
|
6413
6433
|
{
|
|
6414
6434
|
className: "absolute transform -translate-x-1/2 text-xs",
|
|
6415
6435
|
style: { left: `${J}%` },
|
|
6416
|
-
children:
|
|
6436
|
+
children: $.label || $.value
|
|
6417
6437
|
},
|
|
6418
6438
|
X
|
|
6419
6439
|
);
|
|
@@ -6433,7 +6453,7 @@ const Vi = no(function({
|
|
|
6433
6453
|
action: l,
|
|
6434
6454
|
className: s = ""
|
|
6435
6455
|
}) => {
|
|
6436
|
-
var
|
|
6456
|
+
var m;
|
|
6437
6457
|
se(() => {
|
|
6438
6458
|
if (e && t > 0 && i) {
|
|
6439
6459
|
const d = setTimeout(() => {
|
|
@@ -6450,7 +6470,7 @@ const Vi = no(function({
|
|
|
6450
6470
|
}, [e, i]);
|
|
6451
6471
|
const c = oe(() => {
|
|
6452
6472
|
i && i();
|
|
6453
|
-
}, [i]),
|
|
6473
|
+
}, [i]), u = (d) => {
|
|
6454
6474
|
const g = "fixed z-50 transform transition-all duration-300 ease-in-out";
|
|
6455
6475
|
switch (d) {
|
|
6456
6476
|
case "top-center":
|
|
@@ -6467,7 +6487,7 @@ const Vi = no(function({
|
|
|
6467
6487
|
default:
|
|
6468
6488
|
return `${g} bottom-4 left-1/2 -translate-x-1/2 ${e ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"}`;
|
|
6469
6489
|
}
|
|
6470
|
-
},
|
|
6490
|
+
}, p = (m = me[r]) == null ? void 0 : m.filled;
|
|
6471
6491
|
return e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6472
6492
|
e && /* @__PURE__ */ a.jsx(
|
|
6473
6493
|
"div",
|
|
@@ -6480,7 +6500,7 @@ const Vi = no(function({
|
|
|
6480
6500
|
"div",
|
|
6481
6501
|
{
|
|
6482
6502
|
className: `min-w-72 max-w-lg mx-4 px-4 py-2 rounded-lg shadow-xl flex items-center justify-between gap-3 backdrop-blur-sm border border-color-white/20
|
|
6483
|
-
${
|
|
6503
|
+
${u(o)} ${p} ${s}`,
|
|
6484
6504
|
role: "alert",
|
|
6485
6505
|
"aria-live": "assertive",
|
|
6486
6506
|
"aria-atomic": "true",
|
|
@@ -6513,10 +6533,10 @@ const Vi = no(function({
|
|
|
6513
6533
|
className: r = "",
|
|
6514
6534
|
...i
|
|
6515
6535
|
}) => {
|
|
6516
|
-
var
|
|
6517
|
-
const l = (
|
|
6536
|
+
var p, m;
|
|
6537
|
+
const l = (p = me[t]) == null ? void 0 : p.outline, s = (m = me[t]) == null ? void 0 : m.filled, c = Math.min(Math.max(n, 0), 100);
|
|
6518
6538
|
if (e === "circular") {
|
|
6519
|
-
const { size: d = 40, thickness: g = 4 } = i,
|
|
6539
|
+
const { size: d = 40, thickness: g = 4 } = i, v = o ? c / 100 * 360 : 270;
|
|
6520
6540
|
return /* @__PURE__ */ a.jsxs(
|
|
6521
6541
|
"div",
|
|
6522
6542
|
{
|
|
@@ -6553,8 +6573,8 @@ const Vi = no(function({
|
|
|
6553
6573
|
boxSizing: "border-box",
|
|
6554
6574
|
transition: "all 0.3s",
|
|
6555
6575
|
background: "transparent",
|
|
6556
|
-
maskImage: `conic-gradient(black 0deg, black ${
|
|
6557
|
-
WebkitMaskImage: `conic-gradient(black 0deg, black ${
|
|
6576
|
+
maskImage: `conic-gradient(black 0deg, black ${v}deg, transparent ${v}deg 360deg)`,
|
|
6577
|
+
WebkitMaskImage: `conic-gradient(black 0deg, black ${v}deg, transparent ${v}deg 360deg)`
|
|
6558
6578
|
}
|
|
6559
6579
|
}
|
|
6560
6580
|
)
|
|
@@ -6562,7 +6582,7 @@ const Vi = no(function({
|
|
|
6562
6582
|
}
|
|
6563
6583
|
);
|
|
6564
6584
|
}
|
|
6565
|
-
const { thickness:
|
|
6585
|
+
const { thickness: u = 4 } = i;
|
|
6566
6586
|
return /* @__PURE__ */ a.jsx(
|
|
6567
6587
|
"div",
|
|
6568
6588
|
{
|
|
@@ -6575,7 +6595,7 @@ const Vi = no(function({
|
|
|
6575
6595
|
"div",
|
|
6576
6596
|
{
|
|
6577
6597
|
className: "w-full bg-color-gray-200 dark:bg-color-gray-700 rounded-full overflow-hidden relative",
|
|
6578
|
-
style: { height: `${
|
|
6598
|
+
style: { height: `${u}px` },
|
|
6579
6599
|
children: o ? /* @__PURE__ */ a.jsx(
|
|
6580
6600
|
"div",
|
|
6581
6601
|
{
|
|
@@ -6607,13 +6627,13 @@ const Vi = no(function({
|
|
|
6607
6627
|
size: l = "medium",
|
|
6608
6628
|
icon: s,
|
|
6609
6629
|
emptyIcon: c,
|
|
6610
|
-
className:
|
|
6611
|
-
showHoverValue:
|
|
6612
|
-
showValue:
|
|
6630
|
+
className: u = "",
|
|
6631
|
+
showHoverValue: p = !1,
|
|
6632
|
+
showValue: m = !1,
|
|
6613
6633
|
labels: d = {}
|
|
6614
6634
|
// <-- Add this
|
|
6615
6635
|
}) => {
|
|
6616
|
-
const [g,
|
|
6636
|
+
const [g, v] = Ce.useState(null), f = (w, L) => {
|
|
6617
6637
|
if (t || o || !n) return;
|
|
6618
6638
|
const { left: b, width: I } = w.target.getBoundingClientRect(), T = (w.clientX - b) / I;
|
|
6619
6639
|
let H = L - 1 + Math.ceil(T / r) * r;
|
|
@@ -6622,8 +6642,8 @@ const Vi = no(function({
|
|
|
6622
6642
|
if (t || o) return;
|
|
6623
6643
|
const { left: b, width: I } = w.target.getBoundingClientRect(), T = (w.clientX - b) / I;
|
|
6624
6644
|
let H = L - 1 + Math.ceil(T / r) * r;
|
|
6625
|
-
H = Math.min(i, Math.max(r, Math.round(H / r) * r)),
|
|
6626
|
-
}, C = () =>
|
|
6645
|
+
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), v(H);
|
|
6646
|
+
}, C = () => v(null), M = [];
|
|
6627
6647
|
for (let w = 1; w <= i; w++) {
|
|
6628
6648
|
let L = (g !== null ? g : e) >= w, b = !L && (g !== null ? g : e) > w - 1, I = L ? s || Ce.cloneElement(hn, { className: `fill-color-yellow-500 ${Xe[l]}` }) : c || Ce.cloneElement(bn, { className: `stroke-color-gray-300 ${Xe[l]}` });
|
|
6629
6649
|
if (b) {
|
|
@@ -6662,9 +6682,9 @@ const Vi = no(function({
|
|
|
6662
6682
|
)
|
|
6663
6683
|
);
|
|
6664
6684
|
}
|
|
6665
|
-
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${
|
|
6685
|
+
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${u}`, role: "radiogroup", "aria-disabled": o, children: [
|
|
6666
6686
|
M,
|
|
6667
|
-
|
|
6687
|
+
p && g !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: d[g] || g }) : m ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: d[e] || e }) : null
|
|
6668
6688
|
] });
|
|
6669
6689
|
}, Gi = ({
|
|
6670
6690
|
children: e,
|
|
@@ -6676,34 +6696,34 @@ const Vi = no(function({
|
|
|
6676
6696
|
interval: l = 3e3,
|
|
6677
6697
|
infiniteLoop: s = !1,
|
|
6678
6698
|
perview: c = 1,
|
|
6679
|
-
gap:
|
|
6680
|
-
onClickItem:
|
|
6681
|
-
showThumbs:
|
|
6699
|
+
gap: u = 0,
|
|
6700
|
+
onClickItem: p,
|
|
6701
|
+
showThumbs: m = !1,
|
|
6682
6702
|
pauseOnHover: d = !1,
|
|
6683
6703
|
swipeable: g = !0,
|
|
6684
|
-
thumbWidth:
|
|
6704
|
+
thumbWidth: v = 60,
|
|
6685
6705
|
orientation: f = "horizontal",
|
|
6686
6706
|
nextIcon: h,
|
|
6687
6707
|
prevIcon: C,
|
|
6688
6708
|
className: M
|
|
6689
6709
|
}) => {
|
|
6690
|
-
const w = e.length, L = Math.min(Math.max(c, 0.1), w), [b, I] = W(0), [T, H] = W(!1), [N, ee] = W(!1), [ie, ce] = W(0), U = le(null), O = le(0), Y = le(0), D = L >= w ? 0 : Math.max(0, w - L), Q = (
|
|
6691
|
-
s && D > 0 ? (
|
|
6710
|
+
const w = e.length, L = Math.min(Math.max(c, 0.1), w), [b, I] = W(0), [T, H] = W(!1), [N, ee] = W(!1), [ie, ce] = W(0), U = le(null), O = le(0), Y = le(0), D = L >= w ? 0 : Math.max(0, w - L), Q = (k) => Math.max(0, Math.min(k, D)), pe = (k) => I(
|
|
6711
|
+
s && D > 0 ? (k % (D + 1) + (D + 1)) % (D + 1) : Q(k)
|
|
6692
6712
|
), K = () => {
|
|
6693
6713
|
s && D > 0 ? I(b === 0 ? D : b - 1) : pe(b - 1);
|
|
6694
|
-
},
|
|
6714
|
+
}, x = () => {
|
|
6695
6715
|
s && D > 0 ? I(b >= D ? 0 : b + 1) : pe(b + 1);
|
|
6696
6716
|
};
|
|
6697
6717
|
se(() => {
|
|
6698
6718
|
if (!i || d && T || N || D === 0)
|
|
6699
6719
|
return;
|
|
6700
|
-
const
|
|
6701
|
-
I((
|
|
6702
|
-
const V =
|
|
6703
|
-
return V > D ? s ? 0 :
|
|
6720
|
+
const k = setInterval(() => {
|
|
6721
|
+
I((R) => {
|
|
6722
|
+
const V = R + 1;
|
|
6723
|
+
return V > D ? s ? 0 : R : V;
|
|
6704
6724
|
});
|
|
6705
6725
|
}, l);
|
|
6706
|
-
return () => clearInterval(
|
|
6726
|
+
return () => clearInterval(k);
|
|
6707
6727
|
}, [
|
|
6708
6728
|
i,
|
|
6709
6729
|
l,
|
|
@@ -6713,22 +6733,22 @@ const Vi = no(function({
|
|
|
6713
6733
|
D,
|
|
6714
6734
|
s
|
|
6715
6735
|
]);
|
|
6716
|
-
const y = (
|
|
6717
|
-
!g || D === 0 || (ee(!0), O.current = f === "horizontal" ?
|
|
6718
|
-
}, E = (
|
|
6719
|
-
N && (Y.current = f === "horizontal" ?
|
|
6736
|
+
const y = (k, R) => {
|
|
6737
|
+
!g || D === 0 || (ee(!0), O.current = f === "horizontal" ? k : R, Y.current = O.current);
|
|
6738
|
+
}, E = (k, R) => {
|
|
6739
|
+
N && (Y.current = f === "horizontal" ? k : R, ce(Y.current - O.current));
|
|
6720
6740
|
}, _ = () => {
|
|
6721
6741
|
if (!N) return;
|
|
6722
|
-
Math.abs(Y.current - O.current) > 50 && (Y.current < O.current ?
|
|
6742
|
+
Math.abs(Y.current - O.current) > 50 && (Y.current < O.current ? x() : K()), ee(!1), ce(0);
|
|
6723
6743
|
}, F = () => {
|
|
6724
|
-
const
|
|
6725
|
-
let
|
|
6744
|
+
const k = f === "horizontal" ? "X" : "Y";
|
|
6745
|
+
let R = 0;
|
|
6726
6746
|
if (N && U.current && D > 0) {
|
|
6727
6747
|
const X = f === "horizontal" ? U.current.offsetWidth : U.current.offsetHeight;
|
|
6728
|
-
|
|
6748
|
+
R = ie / X * 100 * (L / w);
|
|
6729
6749
|
}
|
|
6730
|
-
const q = Math.min(b, D) * (100 / w) -
|
|
6731
|
-
return `translate${
|
|
6750
|
+
const q = Math.min(b, D) * (100 / w) - R, j = b >= D, $ = b <= 0 ? 0 : j ? u / (c / 2) : u / c;
|
|
6751
|
+
return `translate${k}(calc(-${q}% - ${$}px))`;
|
|
6732
6752
|
}, z = () => L >= w ? 1 : Math.floor(D) + 1, A = () => D === 0 ? 0 : Math.round(b / D * (z() - 1));
|
|
6733
6753
|
return /* @__PURE__ */ a.jsxs(
|
|
6734
6754
|
"div",
|
|
@@ -6744,16 +6764,16 @@ const Vi = no(function({
|
|
|
6744
6764
|
ref: U,
|
|
6745
6765
|
className: `w-full overflow-hidden relative ${g && D > 0 ? N ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6746
6766
|
style: {
|
|
6747
|
-
height:
|
|
6767
|
+
height: m ? `calc(${t} - ${v + 20}px)` : t
|
|
6748
6768
|
},
|
|
6749
|
-
onMouseDown: (
|
|
6750
|
-
|
|
6769
|
+
onMouseDown: (k) => {
|
|
6770
|
+
k.preventDefault(), y(k.clientX, k.clientY);
|
|
6751
6771
|
},
|
|
6752
|
-
onMouseMove: (
|
|
6772
|
+
onMouseMove: (k) => E(k.clientX, k.clientY),
|
|
6753
6773
|
onMouseUp: _,
|
|
6754
6774
|
onMouseLeave: _,
|
|
6755
|
-
onTouchStart: (
|
|
6756
|
-
onTouchMove: (
|
|
6775
|
+
onTouchStart: (k) => y(k.touches[0].clientX, k.touches[0].clientY),
|
|
6776
|
+
onTouchMove: (k) => E(k.touches[0].clientX, k.touches[0].clientY),
|
|
6757
6777
|
onTouchEnd: _,
|
|
6758
6778
|
children: [
|
|
6759
6779
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6764,21 +6784,21 @@ const Vi = no(function({
|
|
|
6764
6784
|
width: f === "horizontal" ? `${w * 100 / L}%` : "100%",
|
|
6765
6785
|
height: f === "vertical" ? `${w * 100 / L}%` : "100%",
|
|
6766
6786
|
transform: F(),
|
|
6767
|
-
gap: `${
|
|
6787
|
+
gap: `${u}px`,
|
|
6768
6788
|
transitionProperty: N ? "none" : "transform"
|
|
6769
6789
|
},
|
|
6770
|
-
children: e.map((
|
|
6790
|
+
children: e.map((k, R) => /* @__PURE__ */ a.jsx(
|
|
6771
6791
|
"div",
|
|
6772
6792
|
{
|
|
6773
6793
|
className: "shrink-0 flex items-center justify-center",
|
|
6774
6794
|
style: {
|
|
6775
|
-
width: f === "horizontal" ? `calc(${100 / w}% - ${
|
|
6776
|
-
height: f === "vertical" ? `calc(${100 / w}% - ${
|
|
6795
|
+
width: f === "horizontal" ? `calc(${100 / w}% - ${u / c}px)` : "100%",
|
|
6796
|
+
height: f === "vertical" ? `calc(${100 / w}% - ${u * (w - 1) / w}px)` : "100%"
|
|
6777
6797
|
},
|
|
6778
|
-
onClick: () => !N && (
|
|
6779
|
-
children:
|
|
6798
|
+
onClick: () => !N && (p == null ? void 0 : p(R)),
|
|
6799
|
+
children: k
|
|
6780
6800
|
},
|
|
6781
|
-
|
|
6801
|
+
R
|
|
6782
6802
|
))
|
|
6783
6803
|
}
|
|
6784
6804
|
),
|
|
@@ -6797,7 +6817,7 @@ const Vi = no(function({
|
|
|
6797
6817
|
"button",
|
|
6798
6818
|
{
|
|
6799
6819
|
"aria-label": "next",
|
|
6800
|
-
onClick:
|
|
6820
|
+
onClick: x,
|
|
6801
6821
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-colo cursor-pointer
|
|
6802
6822
|
${f === "horizontal" ? "right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-2 -translate-x-1/2"}`,
|
|
6803
6823
|
children: h || (f === "horizontal" ? "›" : "↓")
|
|
@@ -6809,17 +6829,17 @@ const Vi = no(function({
|
|
|
6809
6829
|
{
|
|
6810
6830
|
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${f === "horizontal" ? "bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,
|
|
6811
6831
|
children: Array.from({ length: z() }).map(
|
|
6812
|
-
(
|
|
6832
|
+
(k, R) => /* @__PURE__ */ a.jsx(
|
|
6813
6833
|
"button",
|
|
6814
6834
|
{
|
|
6815
6835
|
onClick: () => pe(
|
|
6816
6836
|
Math.round(
|
|
6817
|
-
|
|
6837
|
+
R / (z() - 1) * D
|
|
6818
6838
|
)
|
|
6819
6839
|
),
|
|
6820
|
-
className: `size-[10px] rounded-full transition-color hover:bg-color-gray-600 cursor-pointer ${
|
|
6840
|
+
className: `size-[10px] rounded-full transition-color hover:bg-color-gray-600 cursor-pointer ${R === A() ? "bg-color-gray-800" : "bg-color-gray-400"}`
|
|
6821
6841
|
},
|
|
6822
|
-
|
|
6842
|
+
R
|
|
6823
6843
|
)
|
|
6824
6844
|
)
|
|
6825
6845
|
}
|
|
@@ -6827,8 +6847,8 @@ const Vi = no(function({
|
|
|
6827
6847
|
]
|
|
6828
6848
|
}
|
|
6829
6849
|
),
|
|
6830
|
-
|
|
6831
|
-
const V =
|
|
6850
|
+
m && /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 mt-3 justify-center flex-wrap", children: e.map((k, R) => {
|
|
6851
|
+
const V = R === Math.round(b);
|
|
6832
6852
|
return /* @__PURE__ */ a.jsx(
|
|
6833
6853
|
"div",
|
|
6834
6854
|
{
|
|
@@ -6837,19 +6857,19 @@ const Vi = no(function({
|
|
|
6837
6857
|
0,
|
|
6838
6858
|
Math.min(
|
|
6839
6859
|
D,
|
|
6840
|
-
|
|
6860
|
+
R - Math.floor(L / 2)
|
|
6841
6861
|
)
|
|
6842
6862
|
);
|
|
6843
6863
|
pe(q);
|
|
6844
6864
|
},
|
|
6845
6865
|
className: `overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${V ? "border-2 border-color-gray-800 opacity-100 scale-105" : "border-2 border-color-gray-300 opacity-70"}`,
|
|
6846
6866
|
style: {
|
|
6847
|
-
width:
|
|
6848
|
-
height:
|
|
6867
|
+
width: v,
|
|
6868
|
+
height: v
|
|
6849
6869
|
},
|
|
6850
|
-
children:
|
|
6870
|
+
children: k
|
|
6851
6871
|
},
|
|
6852
|
-
|
|
6872
|
+
R
|
|
6853
6873
|
);
|
|
6854
6874
|
}) })
|
|
6855
6875
|
]
|
|
@@ -6863,7 +6883,9 @@ const Vi = no(function({
|
|
|
6863
6883
|
illustration: r,
|
|
6864
6884
|
illustrationWidth: i = 120,
|
|
6865
6885
|
children: l,
|
|
6866
|
-
color: s = "gray"
|
|
6886
|
+
color: s = "gray",
|
|
6887
|
+
titleClass: c = "",
|
|
6888
|
+
descriptionClass: u = ""
|
|
6867
6889
|
}) => /* @__PURE__ */ a.jsxs(
|
|
6868
6890
|
"section",
|
|
6869
6891
|
{
|
|
@@ -6882,9 +6904,9 @@ const Vi = no(function({
|
|
|
6882
6904
|
) : r
|
|
6883
6905
|
}
|
|
6884
6906
|
),
|
|
6885
|
-
/* @__PURE__ */ a.jsx("h2", { className:
|
|
6886
|
-
n && /* @__PURE__ */ a.jsx("p", { className:
|
|
6887
|
-
t && o && /* @__PURE__ */ a.jsx(
|
|
6907
|
+
/* @__PURE__ */ a.jsx("h2", { className: `text-lg mt-4 font-semibold text-color-gray-800 ${c}`, children: e }),
|
|
6908
|
+
n && /* @__PURE__ */ a.jsx("p", { className: `text-sm mt-2 text-color-gray-600 ${u}`, children: n }),
|
|
6909
|
+
t && o && /* @__PURE__ */ a.jsx($t, { onClick: o, color: s, className: "mt-4", children: t }),
|
|
6888
6910
|
l
|
|
6889
6911
|
]
|
|
6890
6912
|
}
|
|
@@ -6897,17 +6919,17 @@ const Vi = no(function({
|
|
|
6897
6919
|
variant: i = "ios"
|
|
6898
6920
|
// <-- default to ios
|
|
6899
6921
|
}) => {
|
|
6900
|
-
var
|
|
6901
|
-
const [l, s] = W(e), [c,
|
|
6922
|
+
var m, d, g;
|
|
6923
|
+
const [l, s] = W(e), [c, u] = W(!1), p = async () => {
|
|
6902
6924
|
if (!(t || c))
|
|
6903
6925
|
if (n) {
|
|
6904
|
-
|
|
6926
|
+
u(!0);
|
|
6905
6927
|
try {
|
|
6906
6928
|
await n(!l), s(!l);
|
|
6907
|
-
} catch (
|
|
6908
|
-
console.error("Toggle failed",
|
|
6929
|
+
} catch (v) {
|
|
6930
|
+
console.error("Toggle failed", v);
|
|
6909
6931
|
} finally {
|
|
6910
|
-
|
|
6932
|
+
u(!1);
|
|
6911
6933
|
}
|
|
6912
6934
|
} else
|
|
6913
6935
|
s(!l);
|
|
@@ -6915,13 +6937,13 @@ const Vi = no(function({
|
|
|
6915
6937
|
return i === "android" ? /* @__PURE__ */ a.jsxs(
|
|
6916
6938
|
"button",
|
|
6917
6939
|
{
|
|
6918
|
-
onClick:
|
|
6940
|
+
onClick: p,
|
|
6919
6941
|
type: o,
|
|
6920
6942
|
disabled: t,
|
|
6921
6943
|
className: `relative w-10 h-3 flex items-center transition-color duration-300
|
|
6922
6944
|
} ${t ? "bg-color-gray-200 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6923
6945
|
children: [
|
|
6924
|
-
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(
|
|
6946
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(m = me[r]) == null ? void 0 : m.filled}` : "bg-color-gray-400"}` }),
|
|
6925
6947
|
/* @__PURE__ */ a.jsx(
|
|
6926
6948
|
"div",
|
|
6927
6949
|
{
|
|
@@ -6934,7 +6956,7 @@ const Vi = no(function({
|
|
|
6934
6956
|
) : /* @__PURE__ */ a.jsx(
|
|
6935
6957
|
"button",
|
|
6936
6958
|
{
|
|
6937
|
-
onClick:
|
|
6959
|
+
onClick: p,
|
|
6938
6960
|
type: o,
|
|
6939
6961
|
disabled: t,
|
|
6940
6962
|
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (g = me[r]) == null ? void 0 : g.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
@@ -6961,10 +6983,10 @@ const Vi = no(function({
|
|
|
6961
6983
|
orientation: l = "horizontal",
|
|
6962
6984
|
className: s = "",
|
|
6963
6985
|
buttonClass: c = "",
|
|
6964
|
-
disabled:
|
|
6986
|
+
disabled: u = !1
|
|
6965
6987
|
}) => {
|
|
6966
|
-
const
|
|
6967
|
-
if (!
|
|
6988
|
+
const p = (d) => Array.isArray(e) ? e.includes(d) : e === d, m = (d) => {
|
|
6989
|
+
if (!u)
|
|
6968
6990
|
if (o) {
|
|
6969
6991
|
if (!Array.isArray(e)) return;
|
|
6970
6992
|
e.includes(d) ? n(e.filter((g) => g !== d)) : n([...e, d]);
|
|
@@ -6976,23 +6998,23 @@ const Vi = no(function({
|
|
|
6976
6998
|
{
|
|
6977
6999
|
className: `inline-flex ${l === "vertical" ? "flex-col" : "flex-row"} rounded-md overflow-hidden border border-color-gray-200 bg-color-white ${s}`,
|
|
6978
7000
|
role: "group",
|
|
6979
|
-
"aria-disabled":
|
|
7001
|
+
"aria-disabled": u,
|
|
6980
7002
|
children: t.map((d, g) => {
|
|
6981
|
-
var
|
|
7003
|
+
var v;
|
|
6982
7004
|
return /* @__PURE__ */ a.jsxs(
|
|
6983
7005
|
"button",
|
|
6984
7006
|
{
|
|
6985
7007
|
type: "button",
|
|
6986
|
-
disabled:
|
|
7008
|
+
disabled: u || d.disabled,
|
|
6987
7009
|
className: `
|
|
6988
7010
|
flex items-center justify-center gap-2 border-0 ${l === "vertical" ? "not-last:border-b-1" : "not-last:border-r-1"} border-color-gray-200
|
|
6989
7011
|
${fi[r]}
|
|
6990
|
-
${
|
|
6991
|
-
${
|
|
7012
|
+
${p(d.value) ? ((v = me[i]) == null ? void 0 : v.filled) || i : "bg-color-transparent text-color-gray-700"}
|
|
7013
|
+
${u || d.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
6992
7014
|
${c}
|
|
6993
7015
|
`,
|
|
6994
|
-
"aria-pressed":
|
|
6995
|
-
onClick: () => !(
|
|
7016
|
+
"aria-pressed": p(d.value),
|
|
7017
|
+
onClick: () => !(u || d.disabled) && m(d.value),
|
|
6996
7018
|
children: [
|
|
6997
7019
|
d.icon,
|
|
6998
7020
|
d.label
|
|
@@ -7027,25 +7049,25 @@ const Vi = no(function({
|
|
|
7027
7049
|
actionMenu: l,
|
|
7028
7050
|
divider: s = !0,
|
|
7029
7051
|
children: c,
|
|
7030
|
-
className:
|
|
7031
|
-
hoverable:
|
|
7032
|
-
bordered:
|
|
7052
|
+
className: u = "",
|
|
7053
|
+
hoverable: p = !1,
|
|
7054
|
+
bordered: m = !1,
|
|
7033
7055
|
onClick: d,
|
|
7034
7056
|
loaderJsx: g = !1
|
|
7035
7057
|
}) => {
|
|
7036
|
-
const
|
|
7058
|
+
const v = [
|
|
7037
7059
|
"relative",
|
|
7038
|
-
"bg-white",
|
|
7060
|
+
"bg-color-white",
|
|
7039
7061
|
"overflow-hidden",
|
|
7040
7062
|
"w-full",
|
|
7041
7063
|
wn[t] || wn.medium,
|
|
7042
7064
|
yn[o] || yn.small,
|
|
7043
7065
|
Cn[r] || Cn.medium,
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7066
|
+
p ? "hover:shadow-xl transition-shadow duration-300 cursor-pointer" : "",
|
|
7067
|
+
m ? "border border-color-gray-200" : "",
|
|
7068
|
+
u
|
|
7047
7069
|
].join(" ").trim();
|
|
7048
|
-
return /* @__PURE__ */ a.jsxs("div", { className:
|
|
7070
|
+
return /* @__PURE__ */ a.jsxs("div", { className: v, onClick: d, children: [
|
|
7049
7071
|
i && /* @__PURE__ */ a.jsx("img", { src: i, alt: "Card", className: "w-full h-auto mb-4 rounded" }),
|
|
7050
7072
|
(e || n) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7051
7073
|
/* @__PURE__ */ a.jsxs("div", { className: "flex justify-between items-start mb-2", children: [
|
|
@@ -7107,9 +7129,9 @@ const Vi = no(function({
|
|
|
7107
7129
|
color: l = "blue",
|
|
7108
7130
|
className: s = "",
|
|
7109
7131
|
radioClass: c
|
|
7110
|
-
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label:
|
|
7111
|
-
var g,
|
|
7112
|
-
const d = i ||
|
|
7132
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: u, value: p, disabled: m }) => {
|
|
7133
|
+
var g, v;
|
|
7134
|
+
const d = i || m;
|
|
7113
7135
|
return /* @__PURE__ */ a.jsxs(
|
|
7114
7136
|
"label",
|
|
7115
7137
|
{
|
|
@@ -7120,10 +7142,10 @@ const Vi = no(function({
|
|
|
7120
7142
|
{
|
|
7121
7143
|
type: "radio",
|
|
7122
7144
|
name: e,
|
|
7123
|
-
value:
|
|
7145
|
+
value: p,
|
|
7124
7146
|
disabled: d,
|
|
7125
|
-
checked: t ===
|
|
7126
|
-
onChange: () => !d && (o == null ? void 0 : o(
|
|
7147
|
+
checked: t === p,
|
|
7148
|
+
onChange: () => !d && (o == null ? void 0 : o(p)),
|
|
7127
7149
|
className: "sr-only peer"
|
|
7128
7150
|
}
|
|
7129
7151
|
),
|
|
@@ -7133,10 +7155,10 @@ const Vi = no(function({
|
|
|
7133
7155
|
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(g = me[l]) == null ? void 0 : g.peer} ${c}`
|
|
7134
7156
|
}
|
|
7135
7157
|
),
|
|
7136
|
-
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm
|
|
7158
|
+
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(v = me[l]) == null ? void 0 : v.peer}`, children: u })
|
|
7137
7159
|
]
|
|
7138
7160
|
},
|
|
7139
|
-
|
|
7161
|
+
p
|
|
7140
7162
|
);
|
|
7141
7163
|
}) }), Xi = ({
|
|
7142
7164
|
label: e,
|
|
@@ -7145,21 +7167,22 @@ const Vi = no(function({
|
|
|
7145
7167
|
options: o,
|
|
7146
7168
|
className: r = "",
|
|
7147
7169
|
labelClass: i = "",
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7170
|
+
inputClass: l = "",
|
|
7171
|
+
disabled: s = !1,
|
|
7172
|
+
size: c = "medium",
|
|
7173
|
+
variant: u = "outlined",
|
|
7151
7174
|
rounded: p = "medium",
|
|
7152
|
-
shadow:
|
|
7175
|
+
shadow: m = !1
|
|
7153
7176
|
}) => {
|
|
7154
|
-
const
|
|
7177
|
+
const d = {
|
|
7155
7178
|
small: "p-2",
|
|
7156
7179
|
medium: "p-3",
|
|
7157
7180
|
large: "p-4"
|
|
7158
|
-
},
|
|
7181
|
+
}, g = {
|
|
7159
7182
|
small: "rounded-md",
|
|
7160
7183
|
medium: "rounded-lg",
|
|
7161
7184
|
full: "rounded-full"
|
|
7162
|
-
},
|
|
7185
|
+
}, v = {
|
|
7163
7186
|
filled: "bg-color-gray-100 border-color-gray-200",
|
|
7164
7187
|
outlined: "border-color-gray-300 bg-color-transparent"
|
|
7165
7188
|
};
|
|
@@ -7169,14 +7192,14 @@ const Vi = no(function({
|
|
|
7169
7192
|
/* @__PURE__ */ a.jsx(
|
|
7170
7193
|
"select",
|
|
7171
7194
|
{
|
|
7172
|
-
disabled:
|
|
7195
|
+
disabled: s,
|
|
7173
7196
|
value: n,
|
|
7174
|
-
onChange: (
|
|
7175
|
-
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${
|
|
7176
|
-
children: o.map((
|
|
7197
|
+
onChange: (f) => t(f.target.value),
|
|
7198
|
+
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${g[p]} ${d[c]} ${v[u]} ${s ? "!bg-color-gray-50 opacity-60 cursor-not-allowed" : ""} ${m ? "shadow-md shadow-color-zinc-100" : ""} ${l}`,
|
|
7199
|
+
children: o.map((f) => /* @__PURE__ */ a.jsx("option", { value: f.value, className: "text-color-gray-900", children: f.label }, f.value))
|
|
7177
7200
|
}
|
|
7178
7201
|
),
|
|
7179
|
-
/* @__PURE__ */ a.jsx("span", { className: `absolute right-3 text-sm top-1/2 -translate-y-1/2 ${
|
|
7202
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute right-3 text-sm top-1/2 -translate-y-1/2 ${s ? "opacity-60" : ""}`, children: /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }) }) })
|
|
7180
7203
|
] })
|
|
7181
7204
|
] });
|
|
7182
7205
|
}, Ji = ({
|
|
@@ -7187,23 +7210,23 @@ const Vi = no(function({
|
|
|
7187
7210
|
const [o, r] = W(!1), [i, l] = W({ top: 0, left: 0 }), s = le(null), c = le(null);
|
|
7188
7211
|
return se(() => {
|
|
7189
7212
|
if (o && s.current && c.current) {
|
|
7190
|
-
const
|
|
7191
|
-
let
|
|
7213
|
+
const u = s.current.getBoundingClientRect(), p = c.current.getBoundingClientRect();
|
|
7214
|
+
let m = 0, d = 0;
|
|
7192
7215
|
switch (t) {
|
|
7193
7216
|
case "top":
|
|
7194
|
-
|
|
7217
|
+
m = u.top - p.height - 8, d = u.left + u.width / 2 - p.width / 2;
|
|
7195
7218
|
break;
|
|
7196
7219
|
case "bottom":
|
|
7197
|
-
|
|
7220
|
+
m = u.bottom + 8, d = u.left + u.width / 2 - p.width / 2;
|
|
7198
7221
|
break;
|
|
7199
7222
|
case "left":
|
|
7200
|
-
|
|
7223
|
+
m = u.top + u.height / 2 - p.height / 2, d = u.left - p.width - 8;
|
|
7201
7224
|
break;
|
|
7202
7225
|
case "right":
|
|
7203
|
-
|
|
7226
|
+
m = u.top + u.height / 2 - p.height / 2, d = u.right + 8;
|
|
7204
7227
|
break;
|
|
7205
7228
|
}
|
|
7206
|
-
l({ top:
|
|
7229
|
+
l({ top: m, left: d });
|
|
7207
7230
|
}
|
|
7208
7231
|
}, [o, t]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7209
7232
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7252,31 +7275,31 @@ const vi = {
|
|
|
7252
7275
|
showCloseIcon: l = !0,
|
|
7253
7276
|
fullscreen: s = !1,
|
|
7254
7277
|
fullWidth: c = !1,
|
|
7255
|
-
maxWidth:
|
|
7256
|
-
},
|
|
7257
|
-
const [
|
|
7278
|
+
maxWidth: u
|
|
7279
|
+
}, p) => {
|
|
7280
|
+
const [m, d] = W(e || !1), [g, v] = W(!1), [f, h] = W(!1);
|
|
7258
7281
|
se(() => {
|
|
7259
7282
|
e !== void 0 && d(e);
|
|
7260
|
-
}, [e]), Sn(
|
|
7283
|
+
}, [e]), Sn(p, () => ({
|
|
7261
7284
|
open: () => d(!0),
|
|
7262
7285
|
close: () => {
|
|
7263
7286
|
h(!1), setTimeout(() => d(!1), 300);
|
|
7264
7287
|
}
|
|
7265
7288
|
})), se(() => {
|
|
7266
7289
|
let M;
|
|
7267
|
-
return
|
|
7268
|
-
}, [
|
|
7290
|
+
return m ? (v(!0), M = setTimeout(() => h(!0), 10)) : h(!1), () => clearTimeout(M);
|
|
7291
|
+
}, [m]);
|
|
7269
7292
|
const C = () => {
|
|
7270
|
-
|
|
7293
|
+
m || v(!1);
|
|
7271
7294
|
};
|
|
7272
7295
|
return se(() => {
|
|
7273
7296
|
const M = (w) => {
|
|
7274
7297
|
w.key === "Escape" && (n == null || n());
|
|
7275
7298
|
};
|
|
7276
|
-
return
|
|
7277
|
-
}, [
|
|
7299
|
+
return m && document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
7300
|
+
}, [m, n]), se(() => (m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7278
7301
|
document.body.style.overflow = "";
|
|
7279
|
-
}), [
|
|
7302
|
+
}), [m]), g ? Oe(
|
|
7280
7303
|
/* @__PURE__ */ a.jsxs(
|
|
7281
7304
|
"div",
|
|
7282
7305
|
{
|
|
@@ -7297,7 +7320,7 @@ const vi = {
|
|
|
7297
7320
|
/* @__PURE__ */ a.jsxs(
|
|
7298
7321
|
"div",
|
|
7299
7322
|
{
|
|
7300
|
-
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${f ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${s ? "w-full h-[calc(100%_-_40px)] m-5" : `${c ? "w-full" : "w-auto"} ${
|
|
7323
|
+
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${f ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${s ? "w-full h-[calc(100%_-_40px)] m-5" : `${c ? "w-full" : "w-auto"} ${u ? vi[u] : ""} mx-5`} ${t}`,
|
|
7301
7324
|
onTransitionEnd: C,
|
|
7302
7325
|
children: [
|
|
7303
7326
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7329,47 +7352,47 @@ const vi = {
|
|
|
7329
7352
|
}
|
|
7330
7353
|
);
|
|
7331
7354
|
function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
7332
|
-
const [r, i] = W(!1), [l, s] = W({ top: 0, left: 0 }), [c,
|
|
7333
|
-
|
|
7355
|
+
const [r, i] = W(!1), [l, s] = W({ top: 0, left: 0 }), [c, u] = W(!1), p = le(null), m = le(null), d = (v) => {
|
|
7356
|
+
v.stopPropagation(), i((f) => !f), u(!1);
|
|
7334
7357
|
};
|
|
7335
7358
|
oo(() => {
|
|
7336
|
-
if (r &&
|
|
7337
|
-
const
|
|
7338
|
-
let M =
|
|
7339
|
-
|
|
7340
|
-
|
|
7359
|
+
if (r && p.current && m.current) {
|
|
7360
|
+
const v = p.current.getBoundingClientRect(), f = m.current.getBoundingClientRect(), h = window.innerWidth, C = window.innerHeight;
|
|
7361
|
+
let M = v.left + window.scrollX, w = v.bottom + window.scrollY;
|
|
7362
|
+
v.right + f.width > h && (M = v.right + window.scrollX - f.width), M + f.width > h && (M = h - f.width - 12), w + f.height > C && (w = v.top + window.scrollY - f.height), s({ top: w, left: M }), setTimeout(() => {
|
|
7363
|
+
u(!0);
|
|
7341
7364
|
}, 150);
|
|
7342
7365
|
}
|
|
7343
7366
|
}, [r]), se(() => {
|
|
7344
|
-
const
|
|
7367
|
+
const v = (f) => {
|
|
7345
7368
|
var h;
|
|
7346
|
-
|
|
7369
|
+
m.current && !m.current.contains(f.target) && !((h = p.current) != null && h.contains(f.target)) && i(!1);
|
|
7347
7370
|
};
|
|
7348
|
-
return r && document.addEventListener("mousedown",
|
|
7349
|
-
document.removeEventListener("mousedown",
|
|
7371
|
+
return r && document.addEventListener("mousedown", v), () => {
|
|
7372
|
+
document.removeEventListener("mousedown", v);
|
|
7350
7373
|
};
|
|
7351
7374
|
}, [r]);
|
|
7352
7375
|
const g = /* @__PURE__ */ a.jsx(
|
|
7353
7376
|
"div",
|
|
7354
7377
|
{
|
|
7355
|
-
ref:
|
|
7378
|
+
ref: m,
|
|
7356
7379
|
className: `absolute mt-2 z-50 rounded-xl bg-color-white shadow-xl p-2 min-w-[160px] transition-all duration-200 transform ${c ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${t}`,
|
|
7357
7380
|
style: {
|
|
7358
7381
|
top: l.top,
|
|
7359
7382
|
left: l.left
|
|
7360
7383
|
},
|
|
7361
|
-
children: e.map((
|
|
7384
|
+
children: e.map((v, f) => /* @__PURE__ */ a.jsxs(
|
|
7362
7385
|
"button",
|
|
7363
7386
|
{
|
|
7364
|
-
disabled:
|
|
7387
|
+
disabled: v.disabled,
|
|
7365
7388
|
onClick: () => {
|
|
7366
7389
|
var h;
|
|
7367
|
-
(h =
|
|
7390
|
+
(h = v.onClick) == null || h.call(v), i(!1);
|
|
7368
7391
|
},
|
|
7369
|
-
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${
|
|
7392
|
+
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${v.disabled ? "opacity-50 hover:bg-color-transparent !cursor-not-allowed" : ""} ${o} ${v.itemClass}`,
|
|
7370
7393
|
children: [
|
|
7371
|
-
|
|
7372
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
7394
|
+
v.icon && /* @__PURE__ */ a.jsx("span", { children: v.icon }),
|
|
7395
|
+
/* @__PURE__ */ a.jsx("span", { children: v.label })
|
|
7373
7396
|
]
|
|
7374
7397
|
},
|
|
7375
7398
|
f
|
|
@@ -7377,7 +7400,7 @@ function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
|
7377
7400
|
}
|
|
7378
7401
|
);
|
|
7379
7402
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7380
|
-
/* @__PURE__ */ a.jsx("div", { ref:
|
|
7403
|
+
/* @__PURE__ */ a.jsx("div", { ref: p, onClick: d, className: "cursor-pointer", children: n }),
|
|
7381
7404
|
r && Oe(g, document.body)
|
|
7382
7405
|
] });
|
|
7383
7406
|
}
|
|
@@ -7395,15 +7418,15 @@ const wi = ({
|
|
|
7395
7418
|
showCloseIcon: s = !0,
|
|
7396
7419
|
anchor: c = "left"
|
|
7397
7420
|
}) => {
|
|
7398
|
-
const [
|
|
7421
|
+
const [u, p] = W(!1), [m, d] = W(!1);
|
|
7399
7422
|
se(() => {
|
|
7400
7423
|
let h;
|
|
7401
|
-
return e ? (
|
|
7424
|
+
return e ? (p(!0), h = setTimeout(() => {
|
|
7402
7425
|
d(!0);
|
|
7403
7426
|
}, 10)) : d(!1), () => clearTimeout(h);
|
|
7404
7427
|
}, [e]);
|
|
7405
7428
|
const g = () => {
|
|
7406
|
-
e ||
|
|
7429
|
+
e || p(!1);
|
|
7407
7430
|
};
|
|
7408
7431
|
if (se(() => {
|
|
7409
7432
|
const h = (C) => {
|
|
@@ -7412,17 +7435,17 @@ const wi = ({
|
|
|
7412
7435
|
return e && document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
7413
7436
|
}, [e, n]), se(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7414
7437
|
document.body.style.overflow = "";
|
|
7415
|
-
}), [e]), !
|
|
7416
|
-
const
|
|
7438
|
+
}), [e]), !u) return null;
|
|
7439
|
+
const v = {
|
|
7417
7440
|
left: "left-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7418
7441
|
right: "right-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7419
7442
|
top: "top-0 left-0 w-full min-h-40 transition-all duration-300",
|
|
7420
7443
|
bottom: "bottom-0 left-0 w-full min-h-40 transition-all duration-300"
|
|
7421
7444
|
}, f = {
|
|
7422
|
-
left:
|
|
7423
|
-
right:
|
|
7424
|
-
top:
|
|
7425
|
-
bottom:
|
|
7445
|
+
left: m ? "translate-x-0" : "-translate-x-full",
|
|
7446
|
+
right: m ? "translate-x-0" : "translate-x-full",
|
|
7447
|
+
top: m ? "translate-y-0" : "-translate-y-full",
|
|
7448
|
+
bottom: m ? "translate-y-0" : "translate-y-full"
|
|
7426
7449
|
};
|
|
7427
7450
|
return Oe(
|
|
7428
7451
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -7430,7 +7453,7 @@ const wi = ({
|
|
|
7430
7453
|
{
|
|
7431
7454
|
className: bi(
|
|
7432
7455
|
"fixed inset-0 z-50 transition-opacity duration-300",
|
|
7433
|
-
|
|
7456
|
+
m ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7434
7457
|
),
|
|
7435
7458
|
children: [
|
|
7436
7459
|
/* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 bg-color-black/50", onClick: n }),
|
|
@@ -7439,7 +7462,7 @@ const wi = ({
|
|
|
7439
7462
|
{
|
|
7440
7463
|
className: `
|
|
7441
7464
|
fixed bg-color-white shadow-lg z-50 p-6 flex flex-col
|
|
7442
|
-
${
|
|
7465
|
+
${v[c]}
|
|
7443
7466
|
${f[c]}
|
|
7444
7467
|
${t}
|
|
7445
7468
|
`,
|
|
@@ -7478,19 +7501,19 @@ const wi = ({
|
|
|
7478
7501
|
onToggle: l,
|
|
7479
7502
|
className: s = "",
|
|
7480
7503
|
titleClass: c = "",
|
|
7481
|
-
contentClass:
|
|
7504
|
+
contentClass: u = ""
|
|
7482
7505
|
}) => {
|
|
7483
|
-
const [
|
|
7506
|
+
const [p, m] = W(i), d = r !== void 0, g = d ? r : p, v = () => {
|
|
7484
7507
|
const f = !g;
|
|
7485
|
-
d ||
|
|
7508
|
+
d || m(f), l == null || l(f);
|
|
7486
7509
|
};
|
|
7487
7510
|
return se(() => {
|
|
7488
|
-
d &&
|
|
7511
|
+
d && m(r);
|
|
7489
7512
|
}, [r]), /* @__PURE__ */ a.jsxs("div", { className: `overflow-hidden w-full border border-color-gray-100 ${s}`, children: [
|
|
7490
7513
|
/* @__PURE__ */ a.jsxs(
|
|
7491
7514
|
"button",
|
|
7492
7515
|
{
|
|
7493
|
-
onClick:
|
|
7516
|
+
onClick: v,
|
|
7494
7517
|
className: `flex justify-between items-center w-full p-4 bg-color-gray-50 hover:bg-color-gray-200 transition ${c}`,
|
|
7495
7518
|
children: [
|
|
7496
7519
|
/* @__PURE__ */ a.jsx("div", { className: "text-left text-sm font-medium", children: e }),
|
|
@@ -7504,7 +7527,7 @@ const wi = ({
|
|
|
7504
7527
|
]
|
|
7505
7528
|
}
|
|
7506
7529
|
),
|
|
7507
|
-
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${g ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ a.jsx("div", { className: `p-4 text-sm text-color-gray-700 ${
|
|
7530
|
+
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${g ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ a.jsx("div", { className: `p-4 text-sm text-color-gray-700 ${u}`, children: n }) }) })
|
|
7508
7531
|
] });
|
|
7509
7532
|
}, yi = {
|
|
7510
7533
|
info: "bg-color-blue-50 border-color-blue-300 text-color-blue-800",
|
|
@@ -7534,12 +7557,12 @@ const wi = ({
|
|
|
7534
7557
|
}) => {
|
|
7535
7558
|
const [l, s] = W(!0), c = le(null);
|
|
7536
7559
|
return se(() => {
|
|
7537
|
-
let
|
|
7560
|
+
let u;
|
|
7538
7561
|
return o && (requestAnimationFrame(() => {
|
|
7539
7562
|
c.current && (c.current.style.transition = `width ${i}ms linear`, c.current.style.width = "0%");
|
|
7540
|
-
}),
|
|
7563
|
+
}), u = setTimeout(() => {
|
|
7541
7564
|
s(!1), t == null || t();
|
|
7542
|
-
}, i)), () => clearTimeout(
|
|
7565
|
+
}, i)), () => clearTimeout(u);
|
|
7543
7566
|
}, [o, i, t]), l ? /* @__PURE__ */ a.jsxs(
|
|
7544
7567
|
"div",
|
|
7545
7568
|
{
|
|
@@ -7580,15 +7603,15 @@ const wi = ({
|
|
|
7580
7603
|
position: i = "top-right"
|
|
7581
7604
|
}) => {
|
|
7582
7605
|
const l = () => {
|
|
7583
|
-
var
|
|
7606
|
+
var u, p;
|
|
7584
7607
|
if (t)
|
|
7585
|
-
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(
|
|
7608
|
+
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(u = me[r]) == null ? void 0 : u.filled} block` });
|
|
7586
7609
|
if (n === 0 || n === void 0) return null;
|
|
7587
7610
|
const c = n > o ? `${o}+` : n;
|
|
7588
7611
|
return /* @__PURE__ */ a.jsx(
|
|
7589
7612
|
"span",
|
|
7590
7613
|
{
|
|
7591
|
-
className: `text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(
|
|
7614
|
+
className: `text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(p = me[r]) == null ? void 0 : p.filled}`,
|
|
7592
7615
|
children: c
|
|
7593
7616
|
}
|
|
7594
7617
|
);
|
|
@@ -7626,7 +7649,7 @@ const wi = ({
|
|
|
7626
7649
|
}) => {
|
|
7627
7650
|
let s = "flex justify-around items-center bg-color-white shadow-sm text-color-gray-600 py-2 px-4";
|
|
7628
7651
|
return e === "fixed" ? s += " fixed bottom-0 left-0 right-0" : e === "floating" ? s += " fixed bottom-4 left-4 right-4 rounded-full" : e === "static" && (s += " static w-full"), /* @__PURE__ */ a.jsx("nav", { className: `${s} ${r}`, children: t.map((c) => {
|
|
7629
|
-
const
|
|
7652
|
+
const u = c.label === n;
|
|
7630
7653
|
return /* @__PURE__ */ a.jsxs(
|
|
7631
7654
|
"a",
|
|
7632
7655
|
{
|
|
@@ -7634,24 +7657,24 @@ const wi = ({
|
|
|
7634
7657
|
onClick: () => o(c.label),
|
|
7635
7658
|
className: `flex flex-col items-center text-sm cursor-pointer text-color-gray-500 no-underline ${l}`,
|
|
7636
7659
|
children: [
|
|
7637
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-xl ${
|
|
7638
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-xs font-medium mt-1 ${
|
|
7660
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-xl ${u ? `text-color-blue-500 ${i}` : ""}`, children: c.icon }),
|
|
7661
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-xs font-medium mt-1 ${u ? `text-color-blue-500 ${i}` : ""}`, children: c.label })
|
|
7639
7662
|
]
|
|
7640
7663
|
},
|
|
7641
7664
|
c.label
|
|
7642
7665
|
);
|
|
7643
7666
|
}) });
|
|
7644
|
-
}, ra = ({ items: e, separator: n = "/", className: t = "" }) => /* @__PURE__ */ a.jsx("nav", { className: `text-sm text-color-gray-600 ${t}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ a.jsx("ol", { className: "flex items-center space-x-1", children: e.map((
|
|
7645
|
-
|
|
7667
|
+
}, ra = ({ items: e, separator: n = "/", className: t = "", itemClass: o = "", spanClass: r = "", separatorClass: i = "" }) => /* @__PURE__ */ a.jsx("nav", { className: `text-sm text-color-gray-600 ${t}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ a.jsx("ol", { className: "flex items-center space-x-1", children: e.map((l, s) => /* @__PURE__ */ a.jsxs("li", { className: "flex items-center", children: [
|
|
7668
|
+
l.href ? /* @__PURE__ */ a.jsx(
|
|
7646
7669
|
"a",
|
|
7647
7670
|
{
|
|
7648
|
-
href:
|
|
7649
|
-
className:
|
|
7650
|
-
children:
|
|
7671
|
+
href: l.href,
|
|
7672
|
+
className: `text-color-gray-800 hover:underline font-medium ${o}`,
|
|
7673
|
+
children: l.label
|
|
7651
7674
|
}
|
|
7652
|
-
) : /* @__PURE__ */ a.jsx("span", { className:
|
|
7653
|
-
|
|
7654
|
-
] },
|
|
7675
|
+
) : /* @__PURE__ */ a.jsx("span", { className: `text-color-gray-500 font-medium ${r}`, children: l.label }),
|
|
7676
|
+
s < e.length - 1 && /* @__PURE__ */ a.jsx("span", { className: `mx-2 text-color-gray-400 ${i}`, children: n })
|
|
7677
|
+
] }, s)) }) }), jn = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Si = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], ia = ({
|
|
7655
7678
|
mode: e = "single",
|
|
7656
7679
|
type: n = "inline",
|
|
7657
7680
|
showTime: t = !1,
|
|
@@ -7661,31 +7684,31 @@ const wi = ({
|
|
|
7661
7684
|
placeholder: l = "Select date",
|
|
7662
7685
|
icon: s = /* @__PURE__ */ a.jsx("svg", { className: "text-color-gray-500 size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z" }) }),
|
|
7663
7686
|
disableBefore: c,
|
|
7664
|
-
disableAfter:
|
|
7665
|
-
selectedDate:
|
|
7687
|
+
disableAfter: u,
|
|
7688
|
+
selectedDate: p
|
|
7666
7689
|
}) => {
|
|
7667
|
-
const [
|
|
7668
|
-
|
|
7690
|
+
const [m, d] = W(!1), [g, v] = W(null), [f, h] = W(/* @__PURE__ */ new Date()), [C, M] = W(
|
|
7691
|
+
p ? new Date(p) : null
|
|
7669
7692
|
), [w, L] = W(null), [b, I] = W(null), [T, H] = W(null), [N, ee] = W({ hour: 12, minute: 0, ampm: "AM" }), ie = le(null), [ce, U] = W(
|
|
7670
|
-
|
|
7693
|
+
p ? new Date(p) : null
|
|
7671
7694
|
), [O, Y] = W(null), [D, Q] = W(null);
|
|
7672
7695
|
se(() => {
|
|
7673
|
-
M(
|
|
7674
|
-
}, [
|
|
7696
|
+
M(p ? new Date(p) : null), U(p ? new Date(p) : null);
|
|
7697
|
+
}, [p]);
|
|
7675
7698
|
const pe = (j) => {
|
|
7676
|
-
j.stopPropagation(),
|
|
7699
|
+
j.stopPropagation(), v(j.currentTarget), d(!0);
|
|
7677
7700
|
}, K = () => {
|
|
7678
7701
|
d(!1);
|
|
7679
|
-
},
|
|
7702
|
+
}, x = (j) => !!(c && j.getTime() < c || u && j.getTime() > u), y = (j) => {
|
|
7680
7703
|
n === "inline" && ie.current && !ie.current.contains(j.target) && (e === "single" ? C || M(null) : e === "range" && (!w || !b) && (L(null), I(null)), d(!1));
|
|
7681
7704
|
};
|
|
7682
|
-
se(() => (
|
|
7705
|
+
se(() => (m ? document.addEventListener("mousedown", y) : document.removeEventListener("mousedown", y), () => {
|
|
7683
7706
|
document.removeEventListener("mousedown", y);
|
|
7684
|
-
}), [
|
|
7707
|
+
}), [m]);
|
|
7685
7708
|
const E = (j) => {
|
|
7686
|
-
!j ||
|
|
7709
|
+
!j || x(j) || (e === "single" ? M(j) : e === "range" && (!w || w && b ? (L(j), I(null)) : j >= w ? I(j) : L(j)));
|
|
7687
7710
|
}, _ = (j) => {
|
|
7688
|
-
if (!j ||
|
|
7711
|
+
if (!j || x(j)) {
|
|
7689
7712
|
H(null);
|
|
7690
7713
|
return;
|
|
7691
7714
|
}
|
|
@@ -7707,31 +7730,31 @@ const wi = ({
|
|
|
7707
7730
|
endDate: b ? b.getTime() : null
|
|
7708
7731
|
}));
|
|
7709
7732
|
}, A = () => {
|
|
7710
|
-
const j = new Date(f.getFullYear(), f.getMonth(), 1), S = new Date(f.getFullYear(), f.getMonth() + 1, 0),
|
|
7733
|
+
const j = new Date(f.getFullYear(), f.getMonth(), 1), S = new Date(f.getFullYear(), f.getMonth() + 1, 0), $ = [], X = j.getDay();
|
|
7711
7734
|
for (let J = 0; J < X; J++)
|
|
7712
|
-
|
|
7735
|
+
$.push(null);
|
|
7713
7736
|
for (let J = 1; J <= S.getDate(); J++)
|
|
7714
|
-
|
|
7715
|
-
return
|
|
7716
|
-
},
|
|
7737
|
+
$.push(new Date(f.getFullYear(), f.getMonth(), J));
|
|
7738
|
+
return $;
|
|
7739
|
+
}, k = (j) => {
|
|
7717
7740
|
if (!j) return !1;
|
|
7718
7741
|
if (e === "single")
|
|
7719
7742
|
return (C == null ? void 0 : C.toDateString()) === j.toDateString();
|
|
7720
7743
|
if (e === "range") {
|
|
7721
7744
|
if (w && !b && T) {
|
|
7722
|
-
const S = w < T ? w : T,
|
|
7723
|
-
return j >= S && j <=
|
|
7745
|
+
const S = w < T ? w : T, $ = w < T ? T : w;
|
|
7746
|
+
return j >= S && j <= $;
|
|
7724
7747
|
}
|
|
7725
7748
|
return w && b && j >= w && j <= b;
|
|
7726
7749
|
}
|
|
7727
7750
|
return !1;
|
|
7728
|
-
},
|
|
7751
|
+
}, R = (j, S) => {
|
|
7729
7752
|
if (!j)
|
|
7730
7753
|
return e === "range" ? S === "end" ? "End Date" : "Start Date" : o ? `${String(N.hour).padStart(2, "0")}:${String(N.minute).padStart(2, "0")} ${N.ampm}` : l;
|
|
7731
7754
|
if (o)
|
|
7732
7755
|
return `${String(N.hour).padStart(2, "0")}:${String(N.minute).padStart(2, "0")} ${N.ampm}`;
|
|
7733
|
-
const
|
|
7734
|
-
return `${
|
|
7756
|
+
const $ = j.getDate().toString().padStart(2, "0"), X = jn[j.getMonth()], J = j.getFullYear(), ue = t ? ` ${String(N.hour).padStart(2, "0")}:${String(N.minute).padStart(2, "0")} ${N.ampm}` : "";
|
|
7757
|
+
return `${$} ${X} ${J}${ue}`;
|
|
7735
7758
|
}, V = /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2", children: [
|
|
7736
7759
|
/* @__PURE__ */ a.jsx(
|
|
7737
7760
|
"select",
|
|
@@ -7826,8 +7849,8 @@ const wi = ({
|
|
|
7826
7849
|
{
|
|
7827
7850
|
className: `size-8 flex justify-center items-center text-sm rounded-full transition-all
|
|
7828
7851
|
${j ? "hover:bg-color-blue-100 cursor-pointer" : ""}
|
|
7829
|
-
${j &&
|
|
7830
|
-
${j &&
|
|
7852
|
+
${j && k(j) ? "bg-color-blue-500 hover:bg-color-blue-500 text-color-white" : ""}
|
|
7853
|
+
${j && x(j) ? "bg-color-gray-100 text-color-gray-400 !cursor-not-allowed hover:bg-color-gray-100" : ""}`,
|
|
7831
7854
|
onClick: () => j && E(j),
|
|
7832
7855
|
onMouseEnter: () => j && _(j),
|
|
7833
7856
|
onMouseLeave: F,
|
|
@@ -7839,7 +7862,7 @@ const wi = ({
|
|
|
7839
7862
|
] }),
|
|
7840
7863
|
(t || o) && V,
|
|
7841
7864
|
/* @__PURE__ */ a.jsx("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a.jsx(
|
|
7842
|
-
|
|
7865
|
+
$t,
|
|
7843
7866
|
{
|
|
7844
7867
|
fullWidth: !0,
|
|
7845
7868
|
onClick: z,
|
|
@@ -7853,7 +7876,7 @@ const wi = ({
|
|
|
7853
7876
|
);
|
|
7854
7877
|
return /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
7855
7878
|
/* @__PURE__ */ a.jsxs(
|
|
7856
|
-
|
|
7879
|
+
$t,
|
|
7857
7880
|
{
|
|
7858
7881
|
onClick: pe,
|
|
7859
7882
|
fullWidth: !0,
|
|
@@ -7861,20 +7884,20 @@ const wi = ({
|
|
|
7861
7884
|
variant: "outlined",
|
|
7862
7885
|
className: `!justify-between gap-2 ${r || ""}`,
|
|
7863
7886
|
children: [
|
|
7864
|
-
e === "single" ? ce ?
|
|
7887
|
+
e === "single" ? ce ? R(ce) : l : (
|
|
7865
7888
|
// Display rangeStart immediately if set, even if rangeEnd is null
|
|
7866
7889
|
w || O || D ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7867
|
-
|
|
7890
|
+
R(w || O, "start"),
|
|
7868
7891
|
" -",
|
|
7869
7892
|
" ",
|
|
7870
|
-
|
|
7893
|
+
R(b || D, "end")
|
|
7871
7894
|
] }) : l
|
|
7872
7895
|
),
|
|
7873
7896
|
s
|
|
7874
7897
|
]
|
|
7875
7898
|
}
|
|
7876
7899
|
),
|
|
7877
|
-
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children:
|
|
7900
|
+
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children: m && Oe(q, document.body) }) : /* @__PURE__ */ a.jsx(hi, { open: m, title: o ? "Select Time" : l, onClose: K, children: /* @__PURE__ */ a.jsx("div", { className: "w-72", children: q }) })
|
|
7878
7901
|
] });
|
|
7879
7902
|
}, aa = ({
|
|
7880
7903
|
tabs: e,
|
|
@@ -7883,43 +7906,45 @@ const wi = ({
|
|
|
7883
7906
|
className: o = "",
|
|
7884
7907
|
tabsClass: r = "",
|
|
7885
7908
|
tabItemClass: i = "",
|
|
7886
|
-
|
|
7887
|
-
|
|
7909
|
+
tabItemActiveClass: l = "",
|
|
7910
|
+
tabContentClass: s = "",
|
|
7911
|
+
indicatorClass: c = "",
|
|
7912
|
+
variant: u = "horizontal"
|
|
7888
7913
|
}) => {
|
|
7889
|
-
const
|
|
7914
|
+
const p = e.find((d) => d.key === n), m = u === "vertical";
|
|
7890
7915
|
return /* @__PURE__ */ a.jsxs(
|
|
7891
7916
|
"div",
|
|
7892
7917
|
{
|
|
7893
|
-
className: `w-full flex ${
|
|
7918
|
+
className: `w-full flex ${m ? "flex-row" : "flex-col"} ${o}`,
|
|
7894
7919
|
children: [
|
|
7895
7920
|
/* @__PURE__ */ a.jsx(
|
|
7896
7921
|
"div",
|
|
7897
7922
|
{
|
|
7898
|
-
className: `${
|
|
7899
|
-
children: e.map((
|
|
7900
|
-
const
|
|
7923
|
+
className: `${m ? "flex flex-col min-w-[160px] border-r border-color-gray-200" : "flex space-x-6 border-b border-color-gray-200"} ${r}`,
|
|
7924
|
+
children: e.map((d) => {
|
|
7925
|
+
const g = n === d.key;
|
|
7901
7926
|
return /* @__PURE__ */ a.jsxs(
|
|
7902
7927
|
"button",
|
|
7903
7928
|
{
|
|
7904
|
-
onClick: () => t(
|
|
7905
|
-
className: `relative flex ${
|
|
7929
|
+
onClick: () => t(d.key),
|
|
7930
|
+
className: `relative flex ${m ? "flex-row items-center px-4 py-3" : "flex-col items-center py-4"}
|
|
7906
7931
|
text-sm font-medium transition-color duration-200 bg-color-transparent
|
|
7907
|
-
${
|
|
7932
|
+
${g ? `text-color-blue-500 ${l} ` : "text-color-gray-600 hover:text-color-blue-500 cursor-pointer"}
|
|
7908
7933
|
${i}`,
|
|
7909
7934
|
children: [
|
|
7910
|
-
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center ${
|
|
7911
|
-
|
|
7912
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
7935
|
+
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center ${m ? "space-x-3" : "space-x-2"}`, children: [
|
|
7936
|
+
d.icon && /* @__PURE__ */ a.jsx("span", { children: d.icon }),
|
|
7937
|
+
/* @__PURE__ */ a.jsx("span", { children: d.label })
|
|
7913
7938
|
] }),
|
|
7914
|
-
|
|
7939
|
+
g && (m ? /* @__PURE__ */ a.jsx("div", { className: `absolute right-0 top-3 bottom-3 w-1 bg-color-blue-500 rounded-full ${c}` }) : /* @__PURE__ */ a.jsx("div", { className: `absolute bottom-0 left-0 right-0 h-1 bg-color-blue-500 rounded-full ${c}` }))
|
|
7915
7940
|
]
|
|
7916
7941
|
},
|
|
7917
|
-
|
|
7942
|
+
d.key
|
|
7918
7943
|
);
|
|
7919
7944
|
})
|
|
7920
7945
|
}
|
|
7921
7946
|
),
|
|
7922
|
-
/* @__PURE__ */ a.jsx("div", { className: `mt-4 ${
|
|
7947
|
+
/* @__PURE__ */ a.jsx("div", { className: `mt-4 ${m ? "ml-6 mt-0" : ""} ${s}`, children: p == null ? void 0 : p.content })
|
|
7923
7948
|
]
|
|
7924
7949
|
}
|
|
7925
7950
|
);
|
|
@@ -7954,11 +7979,11 @@ function sa({
|
|
|
7954
7979
|
defaultActive: o,
|
|
7955
7980
|
open: r = !0,
|
|
7956
7981
|
onClose: i,
|
|
7957
|
-
onItemSelect: l
|
|
7958
|
-
|
|
7982
|
+
onItemSelect: l,
|
|
7983
|
+
className: s = ""
|
|
7959
7984
|
}) {
|
|
7960
|
-
const [
|
|
7961
|
-
|
|
7985
|
+
const [c, u] = W(o), p = (m) => {
|
|
7986
|
+
u(m), m.onClick && m.onClick(), l && l(m);
|
|
7962
7987
|
};
|
|
7963
7988
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
7964
7989
|
wi,
|
|
@@ -7967,6 +7992,7 @@ function sa({
|
|
|
7967
7992
|
onClose: i,
|
|
7968
7993
|
anchor: t,
|
|
7969
7994
|
showCloseIcon: !1,
|
|
7995
|
+
className: s,
|
|
7970
7996
|
children: /* @__PURE__ */ a.jsxs(
|
|
7971
7997
|
"div",
|
|
7972
7998
|
{
|
|
@@ -7974,33 +8000,33 @@ function sa({
|
|
|
7974
8000
|
children: [
|
|
7975
8001
|
n && /* @__PURE__ */ a.jsx("div", { className: "pb-6", children: n }),
|
|
7976
8002
|
/* @__PURE__ */ a.jsx("nav", { className: "space-y-2 text-sm font-medium text-color-gray-700", children: e.map(
|
|
7977
|
-
(
|
|
8003
|
+
(m) => m.href ? /* @__PURE__ */ a.jsxs(
|
|
7978
8004
|
"a",
|
|
7979
8005
|
{
|
|
7980
|
-
href:
|
|
8006
|
+
href: m.href,
|
|
7981
8007
|
className: `flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
7982
|
-
${
|
|
8008
|
+
${m.label === (c == null ? void 0 : c.label) ? "bg-color-blue-500 text-color-white font-medium " : "hover:bg-color-gray-50 text-color-gray-600"}
|
|
7983
8009
|
`,
|
|
7984
|
-
onClick: () => p(
|
|
8010
|
+
onClick: () => p(m),
|
|
7985
8011
|
children: [
|
|
7986
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children:
|
|
7987
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
8012
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children: m.icon }),
|
|
8013
|
+
/* @__PURE__ */ a.jsx("span", { children: m.label })
|
|
7988
8014
|
]
|
|
7989
8015
|
},
|
|
7990
|
-
|
|
8016
|
+
m.label
|
|
7991
8017
|
) : /* @__PURE__ */ a.jsxs(
|
|
7992
8018
|
"button",
|
|
7993
8019
|
{
|
|
7994
|
-
onClick: () => p(
|
|
8020
|
+
onClick: () => p(m),
|
|
7995
8021
|
className: `flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
7996
|
-
${
|
|
8022
|
+
${m.label === (c == null ? void 0 : c.label) ? "bg-color-blue-500 text-color-white font-medium " : "hover:bg-color-gray-50 text-color-gray-600 bg-color-transparent"}
|
|
7997
8023
|
`,
|
|
7998
8024
|
children: [
|
|
7999
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children:
|
|
8000
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
8025
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children: m.icon }),
|
|
8026
|
+
/* @__PURE__ */ a.jsx("span", { children: m.label })
|
|
8001
8027
|
]
|
|
8002
8028
|
},
|
|
8003
|
-
|
|
8029
|
+
m.label
|
|
8004
8030
|
)
|
|
8005
8031
|
) })
|
|
8006
8032
|
]
|
|
@@ -8018,7 +8044,7 @@ export {
|
|
|
8018
8044
|
na as Badge,
|
|
8019
8045
|
oa as BottomNavigation,
|
|
8020
8046
|
ra as Breadcrumbs,
|
|
8021
|
-
|
|
8047
|
+
$t as Button,
|
|
8022
8048
|
me as COLOR_MAP,
|
|
8023
8049
|
mi as Card,
|
|
8024
8050
|
Ei as CardWrapper,
|
|
@@ -8060,6 +8086,6 @@ export {
|
|
|
8060
8086
|
Yi as ToggleSwitch,
|
|
8061
8087
|
Ji as Tooltip,
|
|
8062
8088
|
si as Typography,
|
|
8063
|
-
|
|
8089
|
+
Ri as extendColorMap,
|
|
8064
8090
|
_i as extendRangeColorMap
|
|
8065
8091
|
};
|