@dipusevilla/componentes-iu 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -10
- package/dist/index.css +1 -1
- package/dist/index.es.js +850 -847
- package/dist/index.umd.js +12 -12
- package/dist/types/components/Select.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -52,20 +52,20 @@ function Ls() {
|
|
|
52
52
|
function r(w) {
|
|
53
53
|
if (w == null) return null;
|
|
54
54
|
if (typeof w == "function")
|
|
55
|
-
return w.$$typeof ===
|
|
55
|
+
return w.$$typeof === Z ? null : w.displayName || w.name || null;
|
|
56
56
|
if (typeof w == "string") return w;
|
|
57
57
|
switch (w) {
|
|
58
58
|
case j:
|
|
59
59
|
return "Fragment";
|
|
60
|
-
case
|
|
60
|
+
case v:
|
|
61
61
|
return "Profiler";
|
|
62
62
|
case _:
|
|
63
63
|
return "StrictMode";
|
|
64
|
-
case
|
|
64
|
+
case O:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case
|
|
66
|
+
case B:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case W:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof w == "object")
|
|
@@ -78,12 +78,12 @@ function Ls() {
|
|
|
78
78
|
return (w.displayName || "Context") + ".Provider";
|
|
79
79
|
case p:
|
|
80
80
|
return (w._context.displayName || "Context") + ".Consumer";
|
|
81
|
-
case
|
|
81
|
+
case D:
|
|
82
82
|
var U = w.render;
|
|
83
83
|
return w = w.displayName, w || (w = U.displayName || U.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
|
|
84
|
-
case
|
|
84
|
+
case Y:
|
|
85
85
|
return U = w.displayName || null, U !== null ? U : r(w.type) || "Memo";
|
|
86
|
-
case
|
|
86
|
+
case P:
|
|
87
87
|
U = w._payload, w = w._init;
|
|
88
88
|
try {
|
|
89
89
|
return r(w(U));
|
|
@@ -114,7 +114,7 @@ function Ls() {
|
|
|
114
114
|
}
|
|
115
115
|
function s(w) {
|
|
116
116
|
if (w === j) return "<>";
|
|
117
|
-
if (typeof w == "object" && w !== null && w.$$typeof ===
|
|
117
|
+
if (typeof w == "object" && w !== null && w.$$typeof === P)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
120
|
var U = r(w);
|
|
@@ -131,7 +131,7 @@ function Ls() {
|
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
133
|
function i(w) {
|
|
134
|
-
if (
|
|
134
|
+
if (L.call(w, "key")) {
|
|
135
135
|
var U = Object.getOwnPropertyDescriptor(w, "key").get;
|
|
136
136
|
if (U && U.isReactWarning) return !1;
|
|
137
137
|
}
|
|
@@ -139,7 +139,7 @@ function Ls() {
|
|
|
139
139
|
}
|
|
140
140
|
function l(w, U) {
|
|
141
141
|
function G() {
|
|
142
|
-
|
|
142
|
+
A || (A = !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
|
U
|
|
145
145
|
));
|
|
@@ -155,12 +155,12 @@ function Ls() {
|
|
|
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
|
)), w = this.props.ref, w !== void 0 ? w : null;
|
|
157
157
|
}
|
|
158
|
-
function f(w, U, G, ee, ae,
|
|
159
|
-
return G =
|
|
160
|
-
$$typeof:
|
|
158
|
+
function f(w, U, G, ee, ae, q, le, ce) {
|
|
159
|
+
return G = q.ref, w = {
|
|
160
|
+
$$typeof: g,
|
|
161
161
|
type: w,
|
|
162
162
|
key: U,
|
|
163
|
-
props:
|
|
163
|
+
props: q,
|
|
164
164
|
_owner: ae
|
|
165
165
|
}, (G !== void 0 ? G : null) !== null ? Object.defineProperty(w, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
@@ -187,25 +187,25 @@ function Ls() {
|
|
|
187
187
|
value: ce
|
|
188
188
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
189
189
|
}
|
|
190
|
-
function d(w, U, G, ee, ae,
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
190
|
+
function d(w, U, G, ee, ae, q, le, ce) {
|
|
191
|
+
var H = U.children;
|
|
192
|
+
if (H !== void 0)
|
|
193
193
|
if (ee)
|
|
194
|
-
if (E(
|
|
195
|
-
for (ee = 0; ee <
|
|
196
|
-
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
194
|
+
if (E(H)) {
|
|
195
|
+
for (ee = 0; ee < H.length; ee++)
|
|
196
|
+
m(H[ee]);
|
|
197
|
+
Object.freeze && Object.freeze(H);
|
|
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
|
|
203
|
-
if (
|
|
204
|
-
|
|
202
|
+
else m(H);
|
|
203
|
+
if (L.call(U, "key")) {
|
|
204
|
+
H = r(w);
|
|
205
205
|
var de = Object.keys(U).filter(function(Ze) {
|
|
206
206
|
return Ze !== "key";
|
|
207
207
|
});
|
|
208
|
-
ee = 0 < de.length ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}", ie[
|
|
208
|
+
ee = 0 < de.length ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}", ie[H + ee] || (de = 0 < de.length ? "{" + de.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,23 +213,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
215
|
ee,
|
|
216
|
-
|
|
216
|
+
H,
|
|
217
217
|
de,
|
|
218
|
-
|
|
219
|
-
), ie[
|
|
218
|
+
H
|
|
219
|
+
), ie[H + ee] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
221
|
+
if (H = null, G !== void 0 && (t(G), H = "" + G), i(U) && (t(U.key), H = "" + U.key), "key" in U) {
|
|
222
222
|
G = {};
|
|
223
223
|
for (var Fe in U)
|
|
224
224
|
Fe !== "key" && (G[Fe] = U[Fe]);
|
|
225
225
|
} else G = U;
|
|
226
|
-
return
|
|
226
|
+
return H && l(
|
|
227
227
|
G,
|
|
228
228
|
typeof w == "function" ? w.displayName || w.name || "Unknown" : w
|
|
229
229
|
), f(
|
|
230
230
|
w,
|
|
231
|
+
H,
|
|
231
232
|
q,
|
|
232
|
-
W,
|
|
233
233
|
ae,
|
|
234
234
|
n(),
|
|
235
235
|
G,
|
|
@@ -237,23 +237,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
ce
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
typeof w == "object" && w !== null && w.$$typeof ===
|
|
240
|
+
function m(w) {
|
|
241
|
+
typeof w == "object" && w !== null && w.$$typeof === g && w._store && (w._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var h = X, g = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), p = Symbol.for("react.consumer"), F = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), M = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, E = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
h = {
|
|
247
247
|
"react-stack-bottom-frame": function(w) {
|
|
248
248
|
return w();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
252
|
-
|
|
251
|
+
var A, b = {}, z = h["react-stack-bottom-frame"].bind(
|
|
252
|
+
h,
|
|
253
253
|
a
|
|
254
254
|
)(), re = V(s(a)), ie = {};
|
|
255
255
|
Ge.Fragment = j, Ge.jsx = function(w, U, G, ee, ae) {
|
|
256
|
-
var
|
|
256
|
+
var q = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return d(
|
|
258
258
|
w,
|
|
259
259
|
U,
|
|
@@ -261,11 +261,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
261
261
|
!1,
|
|
262
262
|
ee,
|
|
263
263
|
ae,
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
q ? Error("react-stack-top-frame") : z,
|
|
265
|
+
q ? V(s(w)) : re
|
|
266
266
|
);
|
|
267
267
|
}, Ge.jsxs = function(w, U, G, ee, ae) {
|
|
268
|
-
var
|
|
268
|
+
var q = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return d(
|
|
270
270
|
w,
|
|
271
271
|
U,
|
|
@@ -273,8 +273,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
273
273
|
!0,
|
|
274
274
|
ee,
|
|
275
275
|
ae,
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
q ? Error("react-stack-top-frame") : z,
|
|
277
|
+
q ? V(s(w)) : re
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
280
|
}()), Ge;
|
|
@@ -351,22 +351,22 @@ function Ve({
|
|
|
351
351
|
onClick: f,
|
|
352
352
|
className: d
|
|
353
353
|
}) {
|
|
354
|
-
const
|
|
354
|
+
const m = !!a, h = m && !c, g = h ? zs[t] : Zs[t];
|
|
355
355
|
return /* @__PURE__ */ o.jsxs(
|
|
356
356
|
"button",
|
|
357
357
|
{
|
|
358
358
|
type: r,
|
|
359
359
|
onClick: f,
|
|
360
360
|
disabled: n,
|
|
361
|
-
"aria-label":
|
|
361
|
+
"aria-label": h ? l : void 0,
|
|
362
362
|
style: s ? { width: s } : void 0,
|
|
363
363
|
className: $(
|
|
364
364
|
Us,
|
|
365
365
|
Bs[e],
|
|
366
|
-
|
|
366
|
+
g,
|
|
367
367
|
Ws,
|
|
368
368
|
d,
|
|
369
|
-
|
|
369
|
+
m && c && "gap-2"
|
|
370
370
|
),
|
|
371
371
|
children: [
|
|
372
372
|
a && i === "left" && /* @__PURE__ */ o.jsx(Oe, { component: a, size: t }),
|
|
@@ -748,27 +748,27 @@ function ir({
|
|
|
748
748
|
}) {
|
|
749
749
|
const [n, a] = Q(t), i = _e(null), l = _e(null), [c, f] = Q(0), d = () => {
|
|
750
750
|
if (l.current) {
|
|
751
|
-
const
|
|
752
|
-
f(
|
|
751
|
+
const m = l.current.scrollHeight;
|
|
752
|
+
f(m);
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
return Pr(() => {
|
|
756
756
|
d();
|
|
757
757
|
}, [n]), ue(() => {
|
|
758
|
-
const
|
|
759
|
-
if (!
|
|
760
|
-
const
|
|
758
|
+
const m = l.current;
|
|
759
|
+
if (!m) return;
|
|
760
|
+
const h = new ResizeObserver(() => {
|
|
761
761
|
d();
|
|
762
762
|
});
|
|
763
|
-
return
|
|
764
|
-
|
|
763
|
+
return h.observe(m), () => {
|
|
764
|
+
h.disconnect();
|
|
765
765
|
};
|
|
766
766
|
}, []), /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col w-full gap-3", s), children: [
|
|
767
767
|
/* @__PURE__ */ o.jsxs(
|
|
768
768
|
"button",
|
|
769
769
|
{
|
|
770
770
|
type: "button",
|
|
771
|
-
onClick: () => a((
|
|
771
|
+
onClick: () => a((m) => !m),
|
|
772
772
|
className: "flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",
|
|
773
773
|
children: [
|
|
774
774
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -816,7 +816,7 @@ function he(r) {
|
|
|
816
816
|
return r;
|
|
817
817
|
return e;
|
|
818
818
|
}
|
|
819
|
-
var yt = (r) => Array.isArray(r) ? r.filter(Boolean) : [], se = (r) => r === void 0,
|
|
819
|
+
var yt = (r) => Array.isArray(r) ? r.filter(Boolean) : [], se = (r) => r === void 0, T = (r, e, t) => {
|
|
820
820
|
if (!e || !ne(r))
|
|
821
821
|
return t;
|
|
822
822
|
const s = yt(e.split(/[,[\].]+?/)).reduce((n, a) => xe(n) ? n : n[a], r);
|
|
@@ -897,7 +897,7 @@ function jn(r) {
|
|
|
897
897
|
c.current.isValid && t._setValid(!0);
|
|
898
898
|
}, [t]), X.useMemo(() => Xr(i, t, c.current, !1), [i, t]);
|
|
899
899
|
}
|
|
900
|
-
var Ne = (r) => typeof r == "string", Jr = (r, e, t, s, n) => Ne(r) ? (s && e.watch.add(r),
|
|
900
|
+
var Ne = (r) => typeof r == "string", Jr = (r, e, t, s, n) => Ne(r) ? (s && e.watch.add(r), T(t, r, n)) : Array.isArray(r) ? r.map((a) => (s && e.watch.add(a), T(t, a))) : (s && (e.watchAll = !0), t);
|
|
901
901
|
function Kr(r) {
|
|
902
902
|
const e = bt(), { control: t = e.control, name: s, defaultValue: n, disabled: a, exact: i } = r || {}, l = X.useRef(n), [c, f] = X.useState(t._getWatch(s, l.current));
|
|
903
903
|
return Zt(() => t._subscribe({
|
|
@@ -913,7 +913,7 @@ function Qr(r) {
|
|
|
913
913
|
const e = bt(), { name: t, disabled: s, control: n = e.control, shouldUnregister: a } = r, i = Hr(n._names.array, t), l = Kr({
|
|
914
914
|
control: n,
|
|
915
915
|
name: t,
|
|
916
|
-
defaultValue:
|
|
916
|
+
defaultValue: T(n._formValues, t, T(n._defaultValues, t, r.defaultValue)),
|
|
917
917
|
exact: !0
|
|
918
918
|
}), c = jn({
|
|
919
919
|
control: n,
|
|
@@ -923,42 +923,42 @@ function Qr(r) {
|
|
|
923
923
|
...r.rules,
|
|
924
924
|
value: l,
|
|
925
925
|
...ve(r.disabled) ? { disabled: r.disabled } : {}
|
|
926
|
-
})),
|
|
926
|
+
})), m = X.useMemo(() => Object.defineProperties({}, {
|
|
927
927
|
invalid: {
|
|
928
928
|
enumerable: !0,
|
|
929
|
-
get: () => !!
|
|
929
|
+
get: () => !!T(c.errors, t)
|
|
930
930
|
},
|
|
931
931
|
isDirty: {
|
|
932
932
|
enumerable: !0,
|
|
933
|
-
get: () => !!
|
|
933
|
+
get: () => !!T(c.dirtyFields, t)
|
|
934
934
|
},
|
|
935
935
|
isTouched: {
|
|
936
936
|
enumerable: !0,
|
|
937
|
-
get: () => !!
|
|
937
|
+
get: () => !!T(c.touchedFields, t)
|
|
938
938
|
},
|
|
939
939
|
isValidating: {
|
|
940
940
|
enumerable: !0,
|
|
941
|
-
get: () => !!
|
|
941
|
+
get: () => !!T(c.validatingFields, t)
|
|
942
942
|
},
|
|
943
943
|
error: {
|
|
944
944
|
enumerable: !0,
|
|
945
|
-
get: () =>
|
|
945
|
+
get: () => T(c.errors, t)
|
|
946
946
|
}
|
|
947
|
-
}), [c, t]),
|
|
947
|
+
}), [c, t]), h = X.useCallback((_) => d.current.onChange({
|
|
948
948
|
target: {
|
|
949
949
|
value: qr(_),
|
|
950
950
|
name: t
|
|
951
951
|
},
|
|
952
952
|
type: ft.CHANGE
|
|
953
|
-
}), [t]),
|
|
953
|
+
}), [t]), g = X.useCallback(() => d.current.onBlur({
|
|
954
954
|
target: {
|
|
955
|
-
value:
|
|
955
|
+
value: T(n._formValues, t),
|
|
956
956
|
name: t
|
|
957
957
|
},
|
|
958
958
|
type: ft.BLUR
|
|
959
959
|
}), [t, n._formValues]), k = X.useCallback((_) => {
|
|
960
|
-
const
|
|
961
|
-
|
|
960
|
+
const v = T(n._fields, t);
|
|
961
|
+
v && _ && (v._f.ref = {
|
|
962
962
|
focus: () => _.focus(),
|
|
963
963
|
select: () => _.select(),
|
|
964
964
|
setCustomValidity: (p) => _.setCustomValidity(p),
|
|
@@ -968,26 +968,26 @@ function Qr(r) {
|
|
|
968
968
|
name: t,
|
|
969
969
|
value: l,
|
|
970
970
|
...ve(s) || c.disabled ? { disabled: c.disabled || s } : {},
|
|
971
|
-
onChange:
|
|
972
|
-
onBlur:
|
|
971
|
+
onChange: h,
|
|
972
|
+
onBlur: g,
|
|
973
973
|
ref: k
|
|
974
|
-
}), [t, s, c.disabled,
|
|
974
|
+
}), [t, s, c.disabled, h, g, k, l]);
|
|
975
975
|
return X.useEffect(() => {
|
|
976
976
|
const _ = n._options.shouldUnregister || a;
|
|
977
977
|
n.register(t, {
|
|
978
978
|
...f.current.rules,
|
|
979
979
|
...ve(f.current.disabled) ? { disabled: f.current.disabled } : {}
|
|
980
980
|
});
|
|
981
|
-
const
|
|
982
|
-
const
|
|
983
|
-
|
|
981
|
+
const v = (p, F) => {
|
|
982
|
+
const D = T(n._fields, p);
|
|
983
|
+
D && D._f && (D._f.mount = F);
|
|
984
984
|
};
|
|
985
|
-
if (
|
|
986
|
-
const p = he(
|
|
987
|
-
J(n._defaultValues, t, p), se(
|
|
985
|
+
if (v(t, !0), _) {
|
|
986
|
+
const p = he(T(n._options.defaultValues, t));
|
|
987
|
+
J(n._defaultValues, t, p), se(T(n._formValues, t)) && J(n._formValues, t, p);
|
|
988
988
|
}
|
|
989
989
|
return !i && n.register(t), () => {
|
|
990
|
-
(i ? _ && !n._state.action : _) ? n.unregister(t) :
|
|
990
|
+
(i ? _ && !n._state.action : _) ? n.unregister(t) : v(t, !1);
|
|
991
991
|
};
|
|
992
992
|
}, [t, n, i, a]), X.useEffect(() => {
|
|
993
993
|
n._setDisabledField({
|
|
@@ -997,8 +997,8 @@ function Qr(r) {
|
|
|
997
997
|
}, [s, t, n]), X.useMemo(() => ({
|
|
998
998
|
field: j,
|
|
999
999
|
formState: c,
|
|
1000
|
-
fieldState:
|
|
1001
|
-
}), [j, c,
|
|
1000
|
+
fieldState: m
|
|
1001
|
+
}), [j, c, m]);
|
|
1002
1002
|
}
|
|
1003
1003
|
const ke = (r) => r.render(Qr(r));
|
|
1004
1004
|
var es = (r, e, t, s, n) => e ? {
|
|
@@ -1123,7 +1123,7 @@ function dr(r) {
|
|
|
1123
1123
|
var _n = (r, e, t, s) => {
|
|
1124
1124
|
const n = {};
|
|
1125
1125
|
for (const a of r) {
|
|
1126
|
-
const i =
|
|
1126
|
+
const i = T(e, a);
|
|
1127
1127
|
i && J(n, a, i._f);
|
|
1128
1128
|
}
|
|
1129
1129
|
return {
|
|
@@ -1143,7 +1143,7 @@ const hr = "AsyncFunction";
|
|
|
1143
1143
|
var Fn = (r) => !!r && !!r.validate && !!(je(r.validate) && r.validate.constructor.name === hr || ne(r.validate) && Object.values(r.validate).find((e) => e.constructor.name === hr)), Sn = (r) => r.mount && (r.required || r.min || r.max || r.maxLength || r.minLength || r.pattern || r.validate), mr = (r, e, t) => !t && (e.watchAll || e.watch.has(r) || [...e.watch].some((s) => r.startsWith(s) && /^\.\w+/.test(r.slice(s.length))));
|
|
1144
1144
|
const Qe = (r, e, t, s) => {
|
|
1145
1145
|
for (const n of t || Object.keys(r)) {
|
|
1146
|
-
const a =
|
|
1146
|
+
const a = T(r, n);
|
|
1147
1147
|
if (a) {
|
|
1148
1148
|
const { _f: i, ...l } = a;
|
|
1149
1149
|
if (i) {
|
|
@@ -1159,7 +1159,7 @@ const Qe = (r, e, t, s) => {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
};
|
|
1161
1161
|
function xr(r, e, t) {
|
|
1162
|
-
const s =
|
|
1162
|
+
const s = T(r, t);
|
|
1163
1163
|
if (s || Bt(t))
|
|
1164
1164
|
return {
|
|
1165
1165
|
error: s,
|
|
@@ -1167,7 +1167,7 @@ function xr(r, e, t) {
|
|
|
1167
1167
|
};
|
|
1168
1168
|
const n = t.split(".");
|
|
1169
1169
|
for (; n.length; ) {
|
|
1170
|
-
const a = n.join("."), i =
|
|
1170
|
+
const a = n.join("."), i = T(e, a), l = T(r, a);
|
|
1171
1171
|
if (i && !Array.isArray(i) && t !== a)
|
|
1172
1172
|
return { name: t };
|
|
1173
1173
|
if (l && l.type)
|
|
@@ -1185,8 +1185,8 @@ var Tn = (r, e, t, s) => {
|
|
|
1185
1185
|
t(r);
|
|
1186
1186
|
const { name: n, ...a } = r;
|
|
1187
1187
|
return me(a) || Object.keys(a).length >= Object.keys(e).length || Object.keys(a).find((i) => e[i] === (!s || we.all));
|
|
1188
|
-
}, On = (r, e, t) => !r || !e || r === e || Ke(r).some((s) => s && (t ? s === e : s.startsWith(e) || e.startsWith(s))), Cn = (r, e, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(e || r) : (t ? s.isOnBlur : n.isOnBlur) ? !r : (t ? s.isOnChange : n.isOnChange) ? r : !0, An = (r, e) => !yt(
|
|
1189
|
-
const s = Ke(
|
|
1188
|
+
}, On = (r, e, t) => !r || !e || r === e || Ke(r).some((s) => s && (t ? s === e : s.startsWith(e) || e.startsWith(s))), Cn = (r, e, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(e || r) : (t ? s.isOnBlur : n.isOnBlur) ? !r : (t ? s.isOnChange : n.isOnChange) ? r : !0, An = (r, e) => !yt(T(r, e)).length && oe(r, e), $n = (r, e, t) => {
|
|
1189
|
+
const s = Ke(T(r, t));
|
|
1190
1190
|
return J(s, "root", e[t]), J(r, t, s), r;
|
|
1191
1191
|
}, ct = (r) => Ne(r);
|
|
1192
1192
|
function pr(r, e, t = "validate") {
|
|
@@ -1201,85 +1201,85 @@ var ze = (r) => ne(r) && !xt(r) ? r : {
|
|
|
1201
1201
|
value: r,
|
|
1202
1202
|
message: ""
|
|
1203
1203
|
}, gr = async (r, e, t, s, n, a) => {
|
|
1204
|
-
const { ref: i, refs: l, required: c, maxLength: f, minLength: d, min:
|
|
1205
|
-
if (!
|
|
1204
|
+
const { ref: i, refs: l, required: c, maxLength: f, minLength: d, min: m, max: h, pattern: g, validate: k, name: j, valueAsNumber: _, mount: v } = r._f, p = T(t, j);
|
|
1205
|
+
if (!v || e.has(j))
|
|
1206
1206
|
return {};
|
|
1207
|
-
const F = l ? l[0] : i,
|
|
1208
|
-
n && F.reportValidity && (F.setCustomValidity(ve(
|
|
1209
|
-
},
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
type:
|
|
1213
|
-
message:
|
|
1207
|
+
const F = l ? l[0] : i, D = (L) => {
|
|
1208
|
+
n && F.reportValidity && (F.setCustomValidity(ve(L) ? "" : L || ""), F.reportValidity());
|
|
1209
|
+
}, O = {}, B = Wt(i), Y = et(i), P = B || Y, W = (_ || zt(i)) && se(i.value) && se(p) || ht(i) && i.value === "" || p === "" || Array.isArray(p) && !p.length, Z = es.bind(null, j, s, O), M = (L, E, V, A = Se.maxLength, b = Se.minLength) => {
|
|
1210
|
+
const z = L ? E : V;
|
|
1211
|
+
O[j] = {
|
|
1212
|
+
type: L ? A : b,
|
|
1213
|
+
message: z,
|
|
1214
1214
|
ref: i,
|
|
1215
|
-
...
|
|
1215
|
+
...Z(L ? A : b, z)
|
|
1216
1216
|
};
|
|
1217
1217
|
};
|
|
1218
|
-
if (a ? !Array.isArray(p) || !p.length : c && (!
|
|
1219
|
-
const { value:
|
|
1220
|
-
if (
|
|
1218
|
+
if (a ? !Array.isArray(p) || !p.length : c && (!P && (W || xe(p)) || ve(p) && !p || Y && !ns(l).isValid || B && !is(l).isValid)) {
|
|
1219
|
+
const { value: L, message: E } = ct(c) ? { value: !!c, message: c } : ze(c);
|
|
1220
|
+
if (L && (O[j] = {
|
|
1221
1221
|
type: Se.required,
|
|
1222
1222
|
message: E,
|
|
1223
1223
|
ref: F,
|
|
1224
|
-
...
|
|
1224
|
+
...Z(Se.required, E)
|
|
1225
1225
|
}, !s))
|
|
1226
|
-
return
|
|
1226
|
+
return D(E), O;
|
|
1227
1227
|
}
|
|
1228
|
-
if (!
|
|
1229
|
-
let
|
|
1230
|
-
const V = ze(
|
|
1228
|
+
if (!W && (!xe(m) || !xe(h))) {
|
|
1229
|
+
let L, E;
|
|
1230
|
+
const V = ze(h), A = ze(m);
|
|
1231
1231
|
if (!xe(p) && !isNaN(p)) {
|
|
1232
1232
|
const b = i.valueAsNumber || p && +p;
|
|
1233
|
-
xe(V.value) || (
|
|
1233
|
+
xe(V.value) || (L = b > V.value), xe(A.value) || (E = b < A.value);
|
|
1234
1234
|
} else {
|
|
1235
|
-
const b = i.valueAsDate || new Date(p),
|
|
1236
|
-
Ne(V.value) && p && (
|
|
1235
|
+
const b = i.valueAsDate || new Date(p), z = (w) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + w), re = i.type == "time", ie = i.type == "week";
|
|
1236
|
+
Ne(V.value) && p && (L = re ? z(p) > z(V.value) : ie ? p > V.value : b > new Date(V.value)), Ne(A.value) && p && (E = re ? z(p) < z(A.value) : ie ? p < A.value : b < new Date(A.value));
|
|
1237
1237
|
}
|
|
1238
|
-
if ((
|
|
1239
|
-
return
|
|
1238
|
+
if ((L || E) && (M(!!L, V.message, A.message, Se.max, Se.min), !s))
|
|
1239
|
+
return D(O[j].message), O;
|
|
1240
1240
|
}
|
|
1241
|
-
if ((f || d) && !
|
|
1242
|
-
const
|
|
1243
|
-
if ((V ||
|
|
1244
|
-
return
|
|
1241
|
+
if ((f || d) && !W && (Ne(p) || a && Array.isArray(p))) {
|
|
1242
|
+
const L = ze(f), E = ze(d), V = !xe(L.value) && p.length > +L.value, A = !xe(E.value) && p.length < +E.value;
|
|
1243
|
+
if ((V || A) && (M(V, L.message, E.message), !s))
|
|
1244
|
+
return D(O[j].message), O;
|
|
1245
1245
|
}
|
|
1246
|
-
if (
|
|
1247
|
-
const { value:
|
|
1248
|
-
if (xt(
|
|
1246
|
+
if (g && !W && Ne(p)) {
|
|
1247
|
+
const { value: L, message: E } = ze(g);
|
|
1248
|
+
if (xt(L) && !p.match(L) && (O[j] = {
|
|
1249
1249
|
type: Se.pattern,
|
|
1250
1250
|
message: E,
|
|
1251
1251
|
ref: i,
|
|
1252
|
-
...
|
|
1252
|
+
...Z(Se.pattern, E)
|
|
1253
1253
|
}, !s))
|
|
1254
|
-
return
|
|
1254
|
+
return D(E), O;
|
|
1255
1255
|
}
|
|
1256
1256
|
if (k) {
|
|
1257
1257
|
if (je(k)) {
|
|
1258
|
-
const
|
|
1259
|
-
if (E && (
|
|
1258
|
+
const L = await k(p, t), E = pr(L, F);
|
|
1259
|
+
if (E && (O[j] = {
|
|
1260
1260
|
...E,
|
|
1261
|
-
...
|
|
1261
|
+
...Z(Se.validate, E.message)
|
|
1262
1262
|
}, !s))
|
|
1263
|
-
return
|
|
1263
|
+
return D(E.message), O;
|
|
1264
1264
|
} else if (ne(k)) {
|
|
1265
|
-
let
|
|
1265
|
+
let L = {};
|
|
1266
1266
|
for (const E in k) {
|
|
1267
|
-
if (!me(
|
|
1267
|
+
if (!me(L) && !s)
|
|
1268
1268
|
break;
|
|
1269
1269
|
const V = pr(await k[E](p, t), F, E);
|
|
1270
|
-
V && (
|
|
1270
|
+
V && (L = {
|
|
1271
1271
|
...V,
|
|
1272
|
-
...
|
|
1273
|
-
},
|
|
1272
|
+
...Z(E, V.message)
|
|
1273
|
+
}, D(V.message), s && (O[j] = L));
|
|
1274
1274
|
}
|
|
1275
|
-
if (!me(
|
|
1275
|
+
if (!me(L) && (O[j] = {
|
|
1276
1276
|
ref: F,
|
|
1277
|
-
...
|
|
1277
|
+
...L
|
|
1278
1278
|
}, !s))
|
|
1279
|
-
return
|
|
1279
|
+
return O;
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
return
|
|
1282
|
+
return D(!0), O;
|
|
1283
1283
|
};
|
|
1284
1284
|
const Dn = {
|
|
1285
1285
|
mode: we.onSubmit,
|
|
@@ -1327,43 +1327,43 @@ function Vn(r = {}) {
|
|
|
1327
1327
|
isValid: !1,
|
|
1328
1328
|
errors: !1
|
|
1329
1329
|
};
|
|
1330
|
-
let
|
|
1330
|
+
let m = {
|
|
1331
1331
|
...d
|
|
1332
1332
|
};
|
|
1333
|
-
const
|
|
1333
|
+
const h = {
|
|
1334
1334
|
array: or(),
|
|
1335
1335
|
state: or()
|
|
1336
|
-
},
|
|
1336
|
+
}, g = e.criteriaMode === we.all, k = (u) => (x) => {
|
|
1337
1337
|
clearTimeout(f), f = setTimeout(u, x);
|
|
1338
1338
|
}, j = async (u) => {
|
|
1339
|
-
if (!e.disabled && (d.isValid ||
|
|
1340
|
-
const x = e.resolver ? me((await
|
|
1341
|
-
x !== t.isValid &&
|
|
1339
|
+
if (!e.disabled && (d.isValid || m.isValid || u)) {
|
|
1340
|
+
const x = e.resolver ? me((await Y()).errors) : await W(s, !0);
|
|
1341
|
+
x !== t.isValid && h.state.next({
|
|
1342
1342
|
isValid: x
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
1345
|
}, _ = (u, x) => {
|
|
1346
|
-
!e.disabled && (d.isValidating || d.validatingFields ||
|
|
1346
|
+
!e.disabled && (d.isValidating || d.validatingFields || m.isValidating || m.validatingFields) && ((u || Array.from(l.mount)).forEach((y) => {
|
|
1347
1347
|
y && (x ? J(t.validatingFields, y, x) : oe(t.validatingFields, y));
|
|
1348
|
-
}),
|
|
1348
|
+
}), h.state.next({
|
|
1349
1349
|
validatingFields: t.validatingFields,
|
|
1350
1350
|
isValidating: !me(t.validatingFields)
|
|
1351
1351
|
}));
|
|
1352
|
-
},
|
|
1353
|
-
if (
|
|
1354
|
-
if (i.action = !0, N && Array.isArray(
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1352
|
+
}, v = (u, x = [], y, C, S = !0, N = !0) => {
|
|
1353
|
+
if (C && y && !e.disabled) {
|
|
1354
|
+
if (i.action = !0, N && Array.isArray(T(s, u))) {
|
|
1355
|
+
const I = y(T(s, u), C.argA, C.argB);
|
|
1356
|
+
S && J(s, u, I);
|
|
1357
1357
|
}
|
|
1358
|
-
if (N && Array.isArray(
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1358
|
+
if (N && Array.isArray(T(t.errors, u))) {
|
|
1359
|
+
const I = y(T(t.errors, u), C.argA, C.argB);
|
|
1360
|
+
S && J(t.errors, u, I), An(t.errors, u);
|
|
1361
1361
|
}
|
|
1362
|
-
if ((d.touchedFields ||
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1362
|
+
if ((d.touchedFields || m.touchedFields) && N && Array.isArray(T(t.touchedFields, u))) {
|
|
1363
|
+
const I = y(T(t.touchedFields, u), C.argA, C.argB);
|
|
1364
|
+
S && J(t.touchedFields, u, I);
|
|
1365
1365
|
}
|
|
1366
|
-
(d.dirtyFields ||
|
|
1366
|
+
(d.dirtyFields || m.dirtyFields) && (t.dirtyFields = Xe(n, a)), h.state.next({
|
|
1367
1367
|
name: u,
|
|
1368
1368
|
isDirty: M(u, x),
|
|
1369
1369
|
dirtyFields: t.dirtyFields,
|
|
@@ -1373,201 +1373,201 @@ function Vn(r = {}) {
|
|
|
1373
1373
|
} else
|
|
1374
1374
|
J(a, u, x);
|
|
1375
1375
|
}, p = (u, x) => {
|
|
1376
|
-
J(t.errors, u, x),
|
|
1376
|
+
J(t.errors, u, x), h.state.next({
|
|
1377
1377
|
errors: t.errors
|
|
1378
1378
|
});
|
|
1379
1379
|
}, F = (u) => {
|
|
1380
|
-
t.errors = u,
|
|
1380
|
+
t.errors = u, h.state.next({
|
|
1381
1381
|
errors: t.errors,
|
|
1382
1382
|
isValid: !1
|
|
1383
1383
|
});
|
|
1384
|
-
},
|
|
1385
|
-
const
|
|
1386
|
-
if (
|
|
1387
|
-
const N =
|
|
1388
|
-
se(N) ||
|
|
1384
|
+
}, D = (u, x, y, C) => {
|
|
1385
|
+
const S = T(s, u);
|
|
1386
|
+
if (S) {
|
|
1387
|
+
const N = T(a, u, se(y) ? T(n, u) : y);
|
|
1388
|
+
se(N) || C && C.defaultChecked || x ? J(a, u, x ? N : dr(S._f)) : V(u, N), i.mount && j();
|
|
1389
1389
|
}
|
|
1390
|
-
},
|
|
1391
|
-
let N = !1,
|
|
1390
|
+
}, O = (u, x, y, C, S) => {
|
|
1391
|
+
let N = !1, I = !1;
|
|
1392
1392
|
const K = {
|
|
1393
1393
|
name: u
|
|
1394
1394
|
};
|
|
1395
1395
|
if (!e.disabled) {
|
|
1396
|
-
if (!y ||
|
|
1397
|
-
(d.isDirty ||
|
|
1398
|
-
const te = De(
|
|
1399
|
-
|
|
1396
|
+
if (!y || C) {
|
|
1397
|
+
(d.isDirty || m.isDirty) && (I = t.isDirty, t.isDirty = K.isDirty = M(), N = I !== K.isDirty);
|
|
1398
|
+
const te = De(T(n, u), x);
|
|
1399
|
+
I = !!T(t.dirtyFields, u), te ? oe(t.dirtyFields, u) : J(t.dirtyFields, u, !0), K.dirtyFields = t.dirtyFields, N = N || (d.dirtyFields || m.dirtyFields) && I !== !te;
|
|
1400
1400
|
}
|
|
1401
1401
|
if (y) {
|
|
1402
|
-
const te =
|
|
1403
|
-
te || (J(t.touchedFields, u, y), K.touchedFields = t.touchedFields, N = N || (d.touchedFields ||
|
|
1402
|
+
const te = T(t.touchedFields, u);
|
|
1403
|
+
te || (J(t.touchedFields, u, y), K.touchedFields = t.touchedFields, N = N || (d.touchedFields || m.touchedFields) && te !== y);
|
|
1404
1404
|
}
|
|
1405
|
-
N &&
|
|
1405
|
+
N && S && h.state.next(K);
|
|
1406
1406
|
}
|
|
1407
1407
|
return N ? K : {};
|
|
1408
|
-
},
|
|
1409
|
-
const
|
|
1410
|
-
if (e.delayError && y ? (c = k(() => p(u, y)), c(e.delayError)) : (clearTimeout(f), c = null, y ? J(t.errors, u, y) : oe(t.errors, u)), (y ? !De(
|
|
1411
|
-
const
|
|
1412
|
-
...
|
|
1408
|
+
}, B = (u, x, y, C) => {
|
|
1409
|
+
const S = T(t.errors, u), N = (d.isValid || m.isValid) && ve(x) && t.isValid !== x;
|
|
1410
|
+
if (e.delayError && y ? (c = k(() => p(u, y)), c(e.delayError)) : (clearTimeout(f), c = null, y ? J(t.errors, u, y) : oe(t.errors, u)), (y ? !De(S, y) : S) || !me(C) || N) {
|
|
1411
|
+
const I = {
|
|
1412
|
+
...C,
|
|
1413
1413
|
...N && ve(x) ? { isValid: x } : {},
|
|
1414
1414
|
errors: t.errors,
|
|
1415
1415
|
name: u
|
|
1416
1416
|
};
|
|
1417
1417
|
t = {
|
|
1418
1418
|
...t,
|
|
1419
|
-
...
|
|
1420
|
-
},
|
|
1419
|
+
...I
|
|
1420
|
+
}, h.state.next(I);
|
|
1421
1421
|
}
|
|
1422
|
-
},
|
|
1422
|
+
}, Y = async (u) => {
|
|
1423
1423
|
_(u, !0);
|
|
1424
1424
|
const x = await e.resolver(a, e.context, _n(u || l.mount, s, e.criteriaMode, e.shouldUseNativeValidation));
|
|
1425
1425
|
return _(u), x;
|
|
1426
|
-
},
|
|
1427
|
-
const { errors: x } = await
|
|
1426
|
+
}, P = async (u) => {
|
|
1427
|
+
const { errors: x } = await Y(u);
|
|
1428
1428
|
if (u)
|
|
1429
1429
|
for (const y of u) {
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1430
|
+
const C = T(x, y);
|
|
1431
|
+
C ? J(t.errors, y, C) : oe(t.errors, y);
|
|
1432
1432
|
}
|
|
1433
1433
|
else
|
|
1434
1434
|
t.errors = x;
|
|
1435
1435
|
return x;
|
|
1436
|
-
},
|
|
1436
|
+
}, W = async (u, x, y = {
|
|
1437
1437
|
valid: !0
|
|
1438
1438
|
}) => {
|
|
1439
|
-
for (const
|
|
1440
|
-
const
|
|
1441
|
-
if (
|
|
1442
|
-
const { _f: N, ...
|
|
1439
|
+
for (const C in u) {
|
|
1440
|
+
const S = u[C];
|
|
1441
|
+
if (S) {
|
|
1442
|
+
const { _f: N, ...I } = S;
|
|
1443
1443
|
if (N) {
|
|
1444
|
-
const K = l.array.has(N.name), te =
|
|
1445
|
-
te && d.validatingFields && _([
|
|
1446
|
-
const ye = await gr(
|
|
1447
|
-
if (te && d.validatingFields && _([
|
|
1444
|
+
const K = l.array.has(N.name), te = S._f && Fn(S._f);
|
|
1445
|
+
te && d.validatingFields && _([C], !0);
|
|
1446
|
+
const ye = await gr(S, l.disabled, a, g, e.shouldUseNativeValidation && !x, K);
|
|
1447
|
+
if (te && d.validatingFields && _([C]), ye[N.name] && (y.valid = !1, x))
|
|
1448
1448
|
break;
|
|
1449
|
-
!x && (
|
|
1449
|
+
!x && (T(ye, N.name) ? K ? $n(t.errors, ye, N.name) : J(t.errors, N.name, ye[N.name]) : oe(t.errors, N.name));
|
|
1450
1450
|
}
|
|
1451
|
-
!me(
|
|
1451
|
+
!me(I) && await W(I, x, y);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
return y.valid;
|
|
1455
|
-
},
|
|
1455
|
+
}, Z = () => {
|
|
1456
1456
|
for (const u of l.unMount) {
|
|
1457
|
-
const x =
|
|
1457
|
+
const x = T(s, u);
|
|
1458
1458
|
x && (x._f.refs ? x._f.refs.every((y) => !kt(y)) : !kt(x._f.ref)) && ce(u);
|
|
1459
1459
|
}
|
|
1460
1460
|
l.unMount = /* @__PURE__ */ new Set();
|
|
1461
|
-
}, M = (u, x) => !e.disabled && (u && x && J(a, u, x), !De(w(), n)),
|
|
1461
|
+
}, M = (u, x) => !e.disabled && (u && x && J(a, u, x), !De(w(), n)), L = (u, x, y) => Jr(u, l, {
|
|
1462
1462
|
...i.mount ? a : se(x) ? n : Ne(u) ? { [u]: x } : x
|
|
1463
|
-
}, y, x), E = (u) => yt(
|
|
1464
|
-
const
|
|
1465
|
-
let
|
|
1466
|
-
if (
|
|
1467
|
-
const N =
|
|
1468
|
-
N && (!N.disabled && J(a, u, as(x, N)),
|
|
1469
|
-
(!
|
|
1470
|
-
}) : N.refs.forEach((
|
|
1463
|
+
}, y, x), E = (u) => yt(T(i.mount ? a : n, u, e.shouldUnregister ? T(n, u, []) : [])), V = (u, x, y = {}) => {
|
|
1464
|
+
const C = T(s, u);
|
|
1465
|
+
let S = x;
|
|
1466
|
+
if (C) {
|
|
1467
|
+
const N = C._f;
|
|
1468
|
+
N && (!N.disabled && J(a, u, as(x, N)), S = ht(N.ref) && xe(x) ? "" : x, ts(N.ref) ? [...N.ref.options].forEach((I) => I.selected = S.includes(I.value)) : N.refs ? et(N.ref) ? N.refs.forEach((I) => {
|
|
1469
|
+
(!I.defaultChecked || !I.disabled) && (Array.isArray(S) ? I.checked = !!S.find((K) => K === I.value) : I.checked = S === I.value || !!S);
|
|
1470
|
+
}) : N.refs.forEach((I) => I.checked = I.value === S) : zt(N.ref) ? N.ref.value = "" : (N.ref.value = S, N.ref.type || h.state.next({
|
|
1471
1471
|
name: u,
|
|
1472
1472
|
values: he(a)
|
|
1473
1473
|
})));
|
|
1474
1474
|
}
|
|
1475
|
-
(y.shouldDirty || y.shouldTouch) &&
|
|
1476
|
-
},
|
|
1477
|
-
for (const
|
|
1478
|
-
if (!x.hasOwnProperty(
|
|
1475
|
+
(y.shouldDirty || y.shouldTouch) && O(u, S, y.shouldTouch, y.shouldDirty, !0), y.shouldValidate && ie(u);
|
|
1476
|
+
}, A = (u, x, y) => {
|
|
1477
|
+
for (const C in x) {
|
|
1478
|
+
if (!x.hasOwnProperty(C))
|
|
1479
1479
|
return;
|
|
1480
|
-
const
|
|
1481
|
-
(l.array.has(u) || ne(
|
|
1480
|
+
const S = x[C], N = `${u}.${C}`, I = T(s, N);
|
|
1481
|
+
(l.array.has(u) || ne(S) || I && !I._f) && !Le(S) ? A(N, S, y) : V(N, S, y);
|
|
1482
1482
|
}
|
|
1483
1483
|
}, b = (u, x, y = {}) => {
|
|
1484
|
-
const
|
|
1485
|
-
J(a, u, N),
|
|
1484
|
+
const C = T(s, u), S = l.array.has(u), N = he(x);
|
|
1485
|
+
J(a, u, N), S ? (h.array.next({
|
|
1486
1486
|
name: u,
|
|
1487
1487
|
values: he(a)
|
|
1488
|
-
}), (d.isDirty || d.dirtyFields ||
|
|
1488
|
+
}), (d.isDirty || d.dirtyFields || m.isDirty || m.dirtyFields) && y.shouldDirty && h.state.next({
|
|
1489
1489
|
name: u,
|
|
1490
1490
|
dirtyFields: Xe(n, a),
|
|
1491
1491
|
isDirty: M(u, N)
|
|
1492
|
-
})) :
|
|
1492
|
+
})) : C && !C._f && !xe(N) ? A(u, N, y) : V(u, N, y), mr(u, l) && h.state.next({ ...t }), h.state.next({
|
|
1493
1493
|
name: i.mount ? u : void 0,
|
|
1494
1494
|
values: he(a)
|
|
1495
1495
|
});
|
|
1496
|
-
},
|
|
1496
|
+
}, z = async (u) => {
|
|
1497
1497
|
i.mount = !0;
|
|
1498
1498
|
const x = u.target;
|
|
1499
|
-
let y = x.name,
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1503
|
-
if (
|
|
1499
|
+
let y = x.name, C = !0;
|
|
1500
|
+
const S = T(s, y), N = (te) => {
|
|
1501
|
+
C = Number.isNaN(te) || Le(te) && isNaN(te.getTime()) || De(te, T(a, y, te));
|
|
1502
|
+
}, I = fr(e.mode), K = fr(e.reValidateMode);
|
|
1503
|
+
if (S) {
|
|
1504
1504
|
let te, ye;
|
|
1505
|
-
const rt = x.type ? dr(
|
|
1506
|
-
J(a, y, rt), Ae ? (
|
|
1507
|
-
const jt =
|
|
1508
|
-
if (!Ae &&
|
|
1505
|
+
const rt = x.type ? dr(S._f) : qr(u), Ae = u.type === ft.BLUR || u.type === ft.FOCUS_OUT, $s = !Sn(S._f) && !e.resolver && !T(t.errors, y) && !S._f.deps || Cn(Ae, T(t.touchedFields, y), t.isSubmitted, K, I), wt = mr(y, l, Ae);
|
|
1506
|
+
J(a, y, rt), Ae ? (S._f.onBlur && S._f.onBlur(u), c && c(0)) : S._f.onChange && S._f.onChange(u);
|
|
1507
|
+
const jt = O(y, rt, Ae), Ds = !me(jt) || wt;
|
|
1508
|
+
if (!Ae && h.state.next({
|
|
1509
1509
|
name: y,
|
|
1510
1510
|
type: u.type,
|
|
1511
1511
|
values: he(a)
|
|
1512
1512
|
}), $s)
|
|
1513
|
-
return (d.isValid ||
|
|
1514
|
-
if (!Ae && wt &&
|
|
1515
|
-
const { errors: er } = await
|
|
1516
|
-
if (N(rt),
|
|
1513
|
+
return (d.isValid || m.isValid) && (e.mode === "onBlur" ? Ae && j() : Ae || j()), Ds && h.state.next({ name: y, ...wt ? {} : jt });
|
|
1514
|
+
if (!Ae && wt && h.state.next({ ...t }), e.resolver) {
|
|
1515
|
+
const { errors: er } = await Y([y]);
|
|
1516
|
+
if (N(rt), C) {
|
|
1517
1517
|
const Vs = xr(t.errors, s, y), tr = xr(er, s, Vs.name || y);
|
|
1518
1518
|
te = tr.error, y = tr.name, ye = me(er);
|
|
1519
1519
|
}
|
|
1520
1520
|
} else
|
|
1521
|
-
_([y], !0), te = (await gr(
|
|
1522
|
-
|
|
1521
|
+
_([y], !0), te = (await gr(S, l.disabled, a, g, e.shouldUseNativeValidation))[y], _([y]), N(rt), C && (te ? ye = !1 : (d.isValid || m.isValid) && (ye = await W(s, !0)));
|
|
1522
|
+
C && (S._f.deps && ie(S._f.deps), B(y, ye, te, jt));
|
|
1523
1523
|
}
|
|
1524
1524
|
}, re = (u, x) => {
|
|
1525
|
-
if (
|
|
1525
|
+
if (T(t.errors, x) && u.focus)
|
|
1526
1526
|
return u.focus(), 1;
|
|
1527
1527
|
}, ie = async (u, x = {}) => {
|
|
1528
|
-
let y,
|
|
1529
|
-
const
|
|
1528
|
+
let y, C;
|
|
1529
|
+
const S = Ke(u);
|
|
1530
1530
|
if (e.resolver) {
|
|
1531
|
-
const N = await
|
|
1532
|
-
y = me(N),
|
|
1533
|
-
} else u ? (
|
|
1534
|
-
const
|
|
1535
|
-
return await
|
|
1536
|
-
}))).every(Boolean), !(!
|
|
1537
|
-
return
|
|
1538
|
-
...!Ne(u) || (d.isValid ||
|
|
1531
|
+
const N = await P(se(u) ? u : S);
|
|
1532
|
+
y = me(N), C = u ? !S.some((I) => T(N, I)) : y;
|
|
1533
|
+
} else u ? (C = (await Promise.all(S.map(async (N) => {
|
|
1534
|
+
const I = T(s, N);
|
|
1535
|
+
return await W(I && I._f ? { [N]: I } : I);
|
|
1536
|
+
}))).every(Boolean), !(!C && !t.isValid) && j()) : C = y = await W(s);
|
|
1537
|
+
return h.state.next({
|
|
1538
|
+
...!Ne(u) || (d.isValid || m.isValid) && y !== t.isValid ? {} : { name: u },
|
|
1539
1539
|
...e.resolver || !u ? { isValid: y } : {},
|
|
1540
1540
|
errors: t.errors
|
|
1541
|
-
}), x.shouldFocus && !
|
|
1541
|
+
}), x.shouldFocus && !C && Qe(s, re, u ? S : l.mount), C;
|
|
1542
1542
|
}, w = (u) => {
|
|
1543
1543
|
const x = {
|
|
1544
1544
|
...i.mount ? a : n
|
|
1545
1545
|
};
|
|
1546
|
-
return se(u) ? x : Ne(u) ?
|
|
1546
|
+
return se(u) ? x : Ne(u) ? T(x, u) : u.map((y) => T(x, y));
|
|
1547
1547
|
}, U = (u, x) => ({
|
|
1548
|
-
invalid: !!
|
|
1549
|
-
isDirty: !!
|
|
1550
|
-
error:
|
|
1551
|
-
isValidating: !!
|
|
1552
|
-
isTouched: !!
|
|
1548
|
+
invalid: !!T((x || t).errors, u),
|
|
1549
|
+
isDirty: !!T((x || t).dirtyFields, u),
|
|
1550
|
+
error: T((x || t).errors, u),
|
|
1551
|
+
isValidating: !!T(t.validatingFields, u),
|
|
1552
|
+
isTouched: !!T((x || t).touchedFields, u)
|
|
1553
1553
|
}), G = (u) => {
|
|
1554
|
-
u && Ke(u).forEach((x) => oe(t.errors, x)),
|
|
1554
|
+
u && Ke(u).forEach((x) => oe(t.errors, x)), h.state.next({
|
|
1555
1555
|
errors: u ? t.errors : {}
|
|
1556
1556
|
});
|
|
1557
1557
|
}, ee = (u, x, y) => {
|
|
1558
|
-
const
|
|
1558
|
+
const C = (T(s, u, { _f: {} })._f || {}).ref, S = T(t.errors, u) || {}, { ref: N, message: I, type: K, ...te } = S;
|
|
1559
1559
|
J(t.errors, u, {
|
|
1560
1560
|
...te,
|
|
1561
1561
|
...x,
|
|
1562
|
-
ref:
|
|
1563
|
-
}),
|
|
1562
|
+
ref: C
|
|
1563
|
+
}), h.state.next({
|
|
1564
1564
|
name: u,
|
|
1565
1565
|
errors: t.errors,
|
|
1566
1566
|
isValid: !1
|
|
1567
|
-
}), y && y.shouldFocus &&
|
|
1568
|
-
}, ae = (u, x) => je(u) ?
|
|
1569
|
-
next: (y) => u(
|
|
1570
|
-
}) :
|
|
1567
|
+
}), y && y.shouldFocus && C && C.focus && C.focus();
|
|
1568
|
+
}, ae = (u, x) => je(u) ? h.state.subscribe({
|
|
1569
|
+
next: (y) => u(L(void 0, x), y)
|
|
1570
|
+
}) : L(u, x, !0), q = (u) => h.state.subscribe({
|
|
1571
1571
|
next: (x) => {
|
|
1572
1572
|
On(u.name, x.name, u.exact) && Tn(x, u.formState || d, As, u.reRenderRoot) && u.callback({
|
|
1573
1573
|
values: { ...a },
|
|
@@ -1575,26 +1575,26 @@ function Vn(r = {}) {
|
|
|
1575
1575
|
...x
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
}).unsubscribe, le = (u) => (i.mount = !0,
|
|
1579
|
-
...
|
|
1578
|
+
}).unsubscribe, le = (u) => (i.mount = !0, m = {
|
|
1579
|
+
...m,
|
|
1580
1580
|
...u.formState
|
|
1581
|
-
},
|
|
1581
|
+
}, q({
|
|
1582
1582
|
...u,
|
|
1583
|
-
formState:
|
|
1583
|
+
formState: m
|
|
1584
1584
|
})), ce = (u, x = {}) => {
|
|
1585
1585
|
for (const y of u ? Ke(u) : l.mount)
|
|
1586
1586
|
l.mount.delete(y), l.array.delete(y), x.keepValue || (oe(s, y), oe(a, y)), !x.keepError && oe(t.errors, y), !x.keepDirty && oe(t.dirtyFields, y), !x.keepTouched && oe(t.touchedFields, y), !x.keepIsValidating && oe(t.validatingFields, y), !e.shouldUnregister && !x.keepDefaultValue && oe(n, y);
|
|
1587
|
-
|
|
1587
|
+
h.state.next({
|
|
1588
1588
|
values: he(a)
|
|
1589
|
-
}),
|
|
1589
|
+
}), h.state.next({
|
|
1590
1590
|
...t,
|
|
1591
1591
|
...x.keepDirty ? { isDirty: M() } : {}
|
|
1592
1592
|
}), !x.keepIsValid && j();
|
|
1593
|
-
},
|
|
1593
|
+
}, H = ({ disabled: u, name: x }) => {
|
|
1594
1594
|
(ve(u) && i.mount || u || l.disabled.has(x)) && (u ? l.disabled.add(x) : l.disabled.delete(x));
|
|
1595
1595
|
}, de = (u, x = {}) => {
|
|
1596
|
-
let y =
|
|
1597
|
-
const
|
|
1596
|
+
let y = T(s, u);
|
|
1597
|
+
const C = ve(x.disabled) || ve(e.disabled);
|
|
1598
1598
|
return J(s, u, {
|
|
1599
1599
|
...y || {},
|
|
1600
1600
|
_f: {
|
|
@@ -1603,11 +1603,11 @@ function Vn(r = {}) {
|
|
|
1603
1603
|
mount: !0,
|
|
1604
1604
|
...x
|
|
1605
1605
|
}
|
|
1606
|
-
}), l.mount.add(u), y ?
|
|
1606
|
+
}), l.mount.add(u), y ? H({
|
|
1607
1607
|
disabled: ve(x.disabled) ? x.disabled : e.disabled,
|
|
1608
1608
|
name: u
|
|
1609
|
-
}) :
|
|
1610
|
-
...
|
|
1609
|
+
}) : D(u, !0, x.value), {
|
|
1610
|
+
...C ? { disabled: x.disabled || e.disabled } : {},
|
|
1611
1611
|
...e.progressive ? {
|
|
1612
1612
|
required: !!x.required,
|
|
1613
1613
|
min: Je(x.min),
|
|
@@ -1617,87 +1617,87 @@ function Vn(r = {}) {
|
|
|
1617
1617
|
pattern: Je(x.pattern)
|
|
1618
1618
|
} : {},
|
|
1619
1619
|
name: u,
|
|
1620
|
-
onChange:
|
|
1621
|
-
onBlur:
|
|
1622
|
-
ref: (
|
|
1623
|
-
if (
|
|
1624
|
-
de(u, x), y =
|
|
1625
|
-
const N = se(
|
|
1626
|
-
if (
|
|
1620
|
+
onChange: z,
|
|
1621
|
+
onBlur: z,
|
|
1622
|
+
ref: (S) => {
|
|
1623
|
+
if (S) {
|
|
1624
|
+
de(u, x), y = T(s, u);
|
|
1625
|
+
const N = se(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S, I = kn(N), K = y._f.refs || [];
|
|
1626
|
+
if (I ? K.find((te) => te === N) : N === y._f.ref)
|
|
1627
1627
|
return;
|
|
1628
1628
|
J(s, u, {
|
|
1629
1629
|
_f: {
|
|
1630
1630
|
...y._f,
|
|
1631
|
-
...
|
|
1631
|
+
...I ? {
|
|
1632
1632
|
refs: [
|
|
1633
1633
|
...K.filter(kt),
|
|
1634
1634
|
N,
|
|
1635
|
-
...Array.isArray(
|
|
1635
|
+
...Array.isArray(T(n, u)) ? [{}] : []
|
|
1636
1636
|
],
|
|
1637
1637
|
ref: { type: N.type, name: u }
|
|
1638
1638
|
} : { ref: N }
|
|
1639
1639
|
}
|
|
1640
|
-
}),
|
|
1640
|
+
}), D(u, !1, void 0, N);
|
|
1641
1641
|
} else
|
|
1642
|
-
y =
|
|
1642
|
+
y = T(s, u, {}), y._f && (y._f.mount = !1), (e.shouldUnregister || x.shouldUnregister) && !(Hr(l.array, u) && i.action) && l.unMount.add(u);
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
1645
|
}, Fe = () => e.shouldFocusError && Qe(s, re, l.mount), Ze = (u) => {
|
|
1646
|
-
ve(u) && (
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1649
|
-
|
|
1646
|
+
ve(u) && (h.state.next({ disabled: u }), Qe(s, (x, y) => {
|
|
1647
|
+
const C = T(s, y);
|
|
1648
|
+
C && (x.disabled = C._f.disabled || u, Array.isArray(C._f.refs) && C._f.refs.forEach((S) => {
|
|
1649
|
+
S.disabled = C._f.disabled || u;
|
|
1650
1650
|
}));
|
|
1651
1651
|
}, 0, !1));
|
|
1652
1652
|
}, Xt = (u, x) => async (y) => {
|
|
1653
|
-
let
|
|
1653
|
+
let C;
|
|
1654
1654
|
y && (y.preventDefault && y.preventDefault(), y.persist && y.persist());
|
|
1655
|
-
let
|
|
1656
|
-
if (
|
|
1655
|
+
let S = he(a);
|
|
1656
|
+
if (h.state.next({
|
|
1657
1657
|
isSubmitting: !0
|
|
1658
1658
|
}), e.resolver) {
|
|
1659
|
-
const { errors: N, values:
|
|
1660
|
-
t.errors = N,
|
|
1659
|
+
const { errors: N, values: I } = await Y();
|
|
1660
|
+
t.errors = N, S = I;
|
|
1661
1661
|
} else
|
|
1662
|
-
await
|
|
1662
|
+
await W(s);
|
|
1663
1663
|
if (l.disabled.size)
|
|
1664
1664
|
for (const N of l.disabled)
|
|
1665
|
-
J(
|
|
1665
|
+
J(S, N, void 0);
|
|
1666
1666
|
if (oe(t.errors, "root"), me(t.errors)) {
|
|
1667
|
-
|
|
1667
|
+
h.state.next({
|
|
1668
1668
|
errors: {}
|
|
1669
1669
|
});
|
|
1670
1670
|
try {
|
|
1671
|
-
await u(
|
|
1671
|
+
await u(S, y);
|
|
1672
1672
|
} catch (N) {
|
|
1673
|
-
|
|
1673
|
+
C = N;
|
|
1674
1674
|
}
|
|
1675
1675
|
} else
|
|
1676
1676
|
x && await x({ ...t.errors }, y), Fe(), setTimeout(Fe);
|
|
1677
|
-
if (
|
|
1677
|
+
if (h.state.next({
|
|
1678
1678
|
isSubmitted: !0,
|
|
1679
1679
|
isSubmitting: !1,
|
|
1680
|
-
isSubmitSuccessful: me(t.errors) && !
|
|
1680
|
+
isSubmitSuccessful: me(t.errors) && !C,
|
|
1681
1681
|
submitCount: t.submitCount + 1,
|
|
1682
1682
|
errors: t.errors
|
|
1683
|
-
}),
|
|
1684
|
-
throw
|
|
1683
|
+
}), C)
|
|
1684
|
+
throw C;
|
|
1685
1685
|
}, Os = (u, x = {}) => {
|
|
1686
|
-
|
|
1686
|
+
T(s, u) && (se(x.defaultValue) ? b(u, he(T(n, u))) : (b(u, x.defaultValue), J(n, u, he(x.defaultValue))), x.keepTouched || oe(t.touchedFields, u), x.keepDirty || (oe(t.dirtyFields, u), t.isDirty = x.defaultValue ? M(u, he(T(n, u))) : M()), x.keepError || (oe(t.errors, u), d.isValid && j()), h.state.next({ ...t }));
|
|
1687
1687
|
}, Jt = (u, x = {}) => {
|
|
1688
|
-
const y = u ? he(u) : n,
|
|
1688
|
+
const y = u ? he(u) : n, C = he(y), S = me(u), N = S ? n : C;
|
|
1689
1689
|
if (x.keepDefaultValues || (n = y), !x.keepValues) {
|
|
1690
1690
|
if (x.keepDirtyValues) {
|
|
1691
|
-
const
|
|
1691
|
+
const I = /* @__PURE__ */ new Set([
|
|
1692
1692
|
...l.mount,
|
|
1693
1693
|
...Object.keys(Xe(n, a))
|
|
1694
1694
|
]);
|
|
1695
|
-
for (const K of Array.from(
|
|
1696
|
-
|
|
1695
|
+
for (const K of Array.from(I))
|
|
1696
|
+
T(t.dirtyFields, K) ? J(N, K, T(a, K)) : b(K, T(N, K));
|
|
1697
1697
|
} else {
|
|
1698
1698
|
if (Ut && se(u))
|
|
1699
|
-
for (const
|
|
1700
|
-
const K =
|
|
1699
|
+
for (const I of l.mount) {
|
|
1700
|
+
const K = T(s, I);
|
|
1701
1701
|
if (K && K._f) {
|
|
1702
1702
|
const te = Array.isArray(K._f.refs) ? K._f.refs[0] : K._f.ref;
|
|
1703
1703
|
if (ht(te)) {
|
|
@@ -1709,12 +1709,12 @@ function Vn(r = {}) {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
|
-
for (const
|
|
1713
|
-
b(
|
|
1712
|
+
for (const I of l.mount)
|
|
1713
|
+
b(I, T(N, I));
|
|
1714
1714
|
}
|
|
1715
|
-
a = he(N),
|
|
1715
|
+
a = he(N), h.array.next({
|
|
1716
1716
|
values: { ...N }
|
|
1717
|
-
}),
|
|
1717
|
+
}), h.state.next({
|
|
1718
1718
|
values: { ...N }
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
@@ -1726,21 +1726,21 @@ function Vn(r = {}) {
|
|
|
1726
1726
|
watch: /* @__PURE__ */ new Set(),
|
|
1727
1727
|
watchAll: !1,
|
|
1728
1728
|
focus: ""
|
|
1729
|
-
}, i.mount = !d.isValid || !!x.keepIsValid || !!x.keepDirtyValues, i.watch = !!e.shouldUnregister,
|
|
1729
|
+
}, i.mount = !d.isValid || !!x.keepIsValid || !!x.keepDirtyValues, i.watch = !!e.shouldUnregister, h.state.next({
|
|
1730
1730
|
submitCount: x.keepSubmitCount ? t.submitCount : 0,
|
|
1731
|
-
isDirty:
|
|
1731
|
+
isDirty: S ? !1 : x.keepDirty ? t.isDirty : !!(x.keepDefaultValues && !De(u, n)),
|
|
1732
1732
|
isSubmitted: x.keepIsSubmitted ? t.isSubmitted : !1,
|
|
1733
|
-
dirtyFields:
|
|
1733
|
+
dirtyFields: S ? {} : x.keepDirtyValues ? x.keepDefaultValues && a ? Xe(n, a) : t.dirtyFields : x.keepDefaultValues && u ? Xe(n, u) : x.keepDirty ? t.dirtyFields : {},
|
|
1734
1734
|
touchedFields: x.keepTouched ? t.touchedFields : {},
|
|
1735
1735
|
errors: x.keepErrors ? t.errors : {},
|
|
1736
1736
|
isSubmitSuccessful: x.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
1737
1737
|
isSubmitting: !1
|
|
1738
1738
|
});
|
|
1739
1739
|
}, Kt = (u, x) => Jt(je(u) ? u(a) : u, x), Cs = (u, x = {}) => {
|
|
1740
|
-
const y =
|
|
1741
|
-
if (
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1740
|
+
const y = T(s, u), C = y && y._f;
|
|
1741
|
+
if (C) {
|
|
1742
|
+
const S = C.refs ? C.refs[0] : C.ref;
|
|
1743
|
+
S.focus && (S.focus(), x.shouldSelect && je(S.select) && S.select());
|
|
1744
1744
|
}
|
|
1745
1745
|
}, As = (u) => {
|
|
1746
1746
|
t = {
|
|
@@ -1754,24 +1754,24 @@ function Vn(r = {}) {
|
|
|
1754
1754
|
getFieldState: U,
|
|
1755
1755
|
handleSubmit: Xt,
|
|
1756
1756
|
setError: ee,
|
|
1757
|
-
_subscribe:
|
|
1758
|
-
_runSchema:
|
|
1759
|
-
_getWatch:
|
|
1757
|
+
_subscribe: q,
|
|
1758
|
+
_runSchema: Y,
|
|
1759
|
+
_getWatch: L,
|
|
1760
1760
|
_getDirty: M,
|
|
1761
1761
|
_setValid: j,
|
|
1762
|
-
_setFieldArray:
|
|
1763
|
-
_setDisabledField:
|
|
1762
|
+
_setFieldArray: v,
|
|
1763
|
+
_setDisabledField: H,
|
|
1764
1764
|
_setErrors: F,
|
|
1765
1765
|
_getFieldArray: E,
|
|
1766
1766
|
_reset: Jt,
|
|
1767
1767
|
_resetDefaultValues: () => je(e.defaultValues) && e.defaultValues().then((u) => {
|
|
1768
|
-
Kt(u, e.resetOptions),
|
|
1768
|
+
Kt(u, e.resetOptions), h.state.next({
|
|
1769
1769
|
isLoading: !1
|
|
1770
1770
|
});
|
|
1771
1771
|
}),
|
|
1772
|
-
_removeUnmounted:
|
|
1772
|
+
_removeUnmounted: Z,
|
|
1773
1773
|
_disableForm: Ze,
|
|
1774
|
-
_subjects:
|
|
1774
|
+
_subjects: h,
|
|
1775
1775
|
_proxyFormState: d,
|
|
1776
1776
|
get _fields() {
|
|
1777
1777
|
return s;
|
|
@@ -1928,15 +1928,15 @@ function In(r) {
|
|
|
1928
1928
|
label: c,
|
|
1929
1929
|
labelHidden: f = !1,
|
|
1930
1930
|
hasError: d = !1,
|
|
1931
|
-
errorMessage:
|
|
1932
|
-
disabled:
|
|
1933
|
-
className:
|
|
1931
|
+
errorMessage: m = "",
|
|
1932
|
+
disabled: h = !1,
|
|
1933
|
+
className: g,
|
|
1934
1934
|
onChange: k
|
|
1935
1935
|
} = r, j = Ue(), _ = t || j;
|
|
1936
1936
|
return /* @__PURE__ */ o.jsxs(
|
|
1937
1937
|
"div",
|
|
1938
1938
|
{
|
|
1939
|
-
className: $("flex flex-col",
|
|
1939
|
+
className: $("flex flex-col", g),
|
|
1940
1940
|
style: { width: l, maxWidth: "100%" },
|
|
1941
1941
|
children: [
|
|
1942
1942
|
c && /* @__PURE__ */ o.jsx(
|
|
@@ -1962,18 +1962,18 @@ function In(r) {
|
|
|
1962
1962
|
control: e,
|
|
1963
1963
|
rules: s,
|
|
1964
1964
|
defaultValue: n,
|
|
1965
|
-
render: ({ field:
|
|
1965
|
+
render: ({ field: v, fieldState: p }) => vr(
|
|
1966
1966
|
_,
|
|
1967
1967
|
a,
|
|
1968
1968
|
i,
|
|
1969
1969
|
{
|
|
1970
|
-
value:
|
|
1971
|
-
onChange:
|
|
1972
|
-
onBlur:
|
|
1970
|
+
value: v.value,
|
|
1971
|
+
onChange: v.onChange,
|
|
1972
|
+
onBlur: v.onBlur
|
|
1973
1973
|
},
|
|
1974
|
-
|
|
1974
|
+
h,
|
|
1975
1975
|
p.error,
|
|
1976
|
-
|
|
1976
|
+
g
|
|
1977
1977
|
)
|
|
1978
1978
|
}
|
|
1979
1979
|
)
|
|
@@ -1989,9 +1989,9 @@ function In(r) {
|
|
|
1989
1989
|
defaultValue: n,
|
|
1990
1990
|
onChange: k
|
|
1991
1991
|
},
|
|
1992
|
-
|
|
1993
|
-
d ? { message:
|
|
1994
|
-
|
|
1992
|
+
h,
|
|
1993
|
+
d ? { message: m } : void 0,
|
|
1994
|
+
g
|
|
1995
1995
|
)
|
|
1996
1996
|
)
|
|
1997
1997
|
]
|
|
@@ -2012,20 +2012,20 @@ const ki = ({
|
|
|
2012
2012
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
2013
2013
|
}, []);
|
|
2014
2014
|
const c = (f) => {
|
|
2015
|
-
var
|
|
2015
|
+
var m, h;
|
|
2016
2016
|
const d = l.current.findIndex(
|
|
2017
|
-
(
|
|
2017
|
+
(g) => g === document.activeElement
|
|
2018
2018
|
);
|
|
2019
2019
|
if (f.key === "Escape")
|
|
2020
2020
|
a(!1);
|
|
2021
2021
|
else if (f.key === "ArrowDown") {
|
|
2022
2022
|
f.preventDefault();
|
|
2023
|
-
const
|
|
2024
|
-
(
|
|
2023
|
+
const g = (d + 1) % e.length;
|
|
2024
|
+
(m = l.current[g]) == null || m.focus();
|
|
2025
2025
|
} else if (f.key === "ArrowUp") {
|
|
2026
2026
|
f.preventDefault();
|
|
2027
|
-
const
|
|
2028
|
-
(
|
|
2027
|
+
const g = (d - 1 + e.length) % e.length;
|
|
2028
|
+
(h = l.current[g]) == null || h.focus();
|
|
2029
2029
|
}
|
|
2030
2030
|
};
|
|
2031
2031
|
return /* @__PURE__ */ o.jsxs("div", { className: $("relative inline-block", s), ref: i, children: [
|
|
@@ -2052,26 +2052,26 @@ const ki = ({
|
|
|
2052
2052
|
),
|
|
2053
2053
|
onKeyDown: c,
|
|
2054
2054
|
children: e.map((f, d) => {
|
|
2055
|
-
const { label:
|
|
2055
|
+
const { label: m, onSelect: h, disabled: g, icon: k } = f;
|
|
2056
2056
|
return /* @__PURE__ */ o.jsxs(
|
|
2057
2057
|
"button",
|
|
2058
2058
|
{
|
|
2059
2059
|
role: "menuitem",
|
|
2060
2060
|
type: "button",
|
|
2061
|
-
disabled:
|
|
2061
|
+
disabled: g,
|
|
2062
2062
|
ref: (j) => {
|
|
2063
2063
|
l.current[d] = j;
|
|
2064
2064
|
},
|
|
2065
2065
|
className: $(
|
|
2066
2066
|
"w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",
|
|
2067
|
-
|
|
2067
|
+
g ? "opacity-50 cursor-not-allowed" : "hover:bg-[var(--color-ds-background-surface)]"
|
|
2068
2068
|
),
|
|
2069
2069
|
onClick: () => {
|
|
2070
|
-
|
|
2070
|
+
g || (h(), a(!1));
|
|
2071
2071
|
},
|
|
2072
2072
|
children: [
|
|
2073
2073
|
k && /* @__PURE__ */ o.jsx(k, { className: "w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]" }),
|
|
2074
|
-
|
|
2074
|
+
m
|
|
2075
2075
|
]
|
|
2076
2076
|
},
|
|
2077
2077
|
d
|
|
@@ -2171,7 +2171,7 @@ const Qn = (r, e) => {
|
|
|
2171
2171
|
t.current = r;
|
|
2172
2172
|
}, [r, e]), t.current;
|
|
2173
2173
|
}, cs = (r, e, t, s) => r.getFixedT(e, t, s), ea = (r, e, t, s) => Tt(cs(r, e, t, s), [r, e, t, s]), qt = (r, e = {}) => {
|
|
2174
|
-
var
|
|
2174
|
+
var D, O, B, Y;
|
|
2175
2175
|
const {
|
|
2176
2176
|
i18n: t
|
|
2177
2177
|
} = e, {
|
|
@@ -2180,10 +2180,10 @@ const Qn = (r, e) => {
|
|
|
2180
2180
|
} = It(Jn) || {}, a = t || s || Xn();
|
|
2181
2181
|
if (a && !a.reportNamespaces && (a.reportNamespaces = new Kn()), !a) {
|
|
2182
2182
|
Ct(a, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
2183
|
-
const
|
|
2184
|
-
return
|
|
2183
|
+
const P = (Z, M) => Ie(M) ? M : Bn(M) && Ie(M.defaultValue) ? M.defaultValue : Array.isArray(Z) ? Z[Z.length - 1] : Z, W = [P, {}, !1];
|
|
2184
|
+
return W.t = P, W.i18n = {}, W.ready = !1, W;
|
|
2185
2185
|
}
|
|
2186
|
-
(
|
|
2186
|
+
(D = a.options.react) != null && D.wait && Ct(a, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
2187
2187
|
const i = {
|
|
2188
2188
|
...Yn(),
|
|
2189
2189
|
...a.options.react,
|
|
@@ -2192,35 +2192,35 @@ const Qn = (r, e) => {
|
|
|
2192
2192
|
useSuspense: l,
|
|
2193
2193
|
keyPrefix: c
|
|
2194
2194
|
} = i;
|
|
2195
|
-
let f = n || ((
|
|
2196
|
-
f = Ie(f) ? [f] : f || ["translation"], (
|
|
2197
|
-
const d = (a.isInitialized || a.initializedStoreOnce) && f.every((
|
|
2195
|
+
let f = n || ((O = a.options) == null ? void 0 : O.defaultNS);
|
|
2196
|
+
f = Ie(f) ? [f] : f || ["translation"], (Y = (B = a.reportNamespaces).addUsedNamespaces) == null || Y.call(B, f);
|
|
2197
|
+
const d = (a.isInitialized || a.initializedStoreOnce) && f.every((P) => Un(P, a, i)), m = ea(a, e.lng || null, i.nsMode === "fallback" ? f : f[0], c), h = () => m, g = () => cs(a, e.lng || null, i.nsMode === "fallback" ? f : f[0], c), [k, j] = Q(h);
|
|
2198
2198
|
let _ = f.join();
|
|
2199
2199
|
e.lng && (_ = `${e.lng}${_}`);
|
|
2200
|
-
const
|
|
2200
|
+
const v = Qn(_), p = _e(!0);
|
|
2201
2201
|
ue(() => {
|
|
2202
2202
|
const {
|
|
2203
|
-
bindI18n:
|
|
2204
|
-
bindI18nStore:
|
|
2203
|
+
bindI18n: P,
|
|
2204
|
+
bindI18nStore: W
|
|
2205
2205
|
} = i;
|
|
2206
2206
|
p.current = !0, !d && !l && (e.lng ? br(a, e.lng, f, () => {
|
|
2207
|
-
p.current && j(
|
|
2207
|
+
p.current && j(g);
|
|
2208
2208
|
}) : At(a, f, () => {
|
|
2209
|
-
p.current && j(
|
|
2210
|
-
})), d &&
|
|
2211
|
-
const
|
|
2212
|
-
p.current && j(
|
|
2209
|
+
p.current && j(g);
|
|
2210
|
+
})), d && v && v !== _ && p.current && j(g);
|
|
2211
|
+
const Z = () => {
|
|
2212
|
+
p.current && j(g);
|
|
2213
2213
|
};
|
|
2214
|
-
return
|
|
2215
|
-
p.current = !1, a && (
|
|
2214
|
+
return P && (a == null || a.on(P, Z)), W && (a == null || a.store.on(W, Z)), () => {
|
|
2215
|
+
p.current = !1, a && (P == null || P.split(" ").forEach((M) => a.off(M, Z))), W && a && W.split(" ").forEach((M) => a.store.off(M, Z));
|
|
2216
2216
|
};
|
|
2217
2217
|
}, [a, _]), ue(() => {
|
|
2218
|
-
p.current && d && j(
|
|
2218
|
+
p.current && d && j(h);
|
|
2219
2219
|
}, [a, c, d]);
|
|
2220
2220
|
const F = [k, a, d];
|
|
2221
2221
|
if (F.t = k, F.i18n = a, F.ready = d, d || !d && !l) return F;
|
|
2222
|
-
throw new Promise((
|
|
2223
|
-
e.lng ? br(a, e.lng, f, () =>
|
|
2222
|
+
throw new Promise((P) => {
|
|
2223
|
+
e.lng ? br(a, e.lng, f, () => P()) : At(a, f, () => P());
|
|
2224
2224
|
});
|
|
2225
2225
|
}, $t = {
|
|
2226
2226
|
sm: "text-sm",
|
|
@@ -2228,27 +2228,27 @@ const Qn = (r, e) => {
|
|
|
2228
2228
|
lg: "text-lg"
|
|
2229
2229
|
};
|
|
2230
2230
|
function wr(r, e, t, s, n, a, i, l, c) {
|
|
2231
|
-
const { t: f } = qt(), d = _e(null),
|
|
2231
|
+
const { t: f } = qt(), d = _e(null), m = typeof s == "number" && e.length >= s, h = () => {
|
|
2232
2232
|
var p;
|
|
2233
|
-
!i && !
|
|
2234
|
-
},
|
|
2233
|
+
!i && !m && ((p = d.current) == null || p.click());
|
|
2234
|
+
}, g = (p) => {
|
|
2235
2235
|
const F = p.target.files;
|
|
2236
2236
|
if (!F) return;
|
|
2237
|
-
const
|
|
2238
|
-
let
|
|
2239
|
-
s && (
|
|
2237
|
+
const D = Array.from(F);
|
|
2238
|
+
let O = e.concat(D);
|
|
2239
|
+
s && (O = O.slice(0, s)), t(O), p.target.value = "";
|
|
2240
2240
|
}, k = (p) => {
|
|
2241
|
-
if (p.preventDefault(), i ||
|
|
2241
|
+
if (p.preventDefault(), i || m) return;
|
|
2242
2242
|
const F = Array.from(p.dataTransfer.files);
|
|
2243
|
-
let
|
|
2244
|
-
s && (
|
|
2243
|
+
let D = e.concat(F);
|
|
2244
|
+
s && (D = D.slice(0, s)), t(D);
|
|
2245
2245
|
}, j = (p) => {
|
|
2246
2246
|
p.preventDefault();
|
|
2247
2247
|
}, _ = (p) => {
|
|
2248
2248
|
const F = URL.createObjectURL(p);
|
|
2249
2249
|
window.open(F);
|
|
2250
|
-
},
|
|
2251
|
-
const F = e.filter((
|
|
2250
|
+
}, v = (p) => {
|
|
2251
|
+
const F = e.filter((D, O) => O !== p);
|
|
2252
2252
|
t(F);
|
|
2253
2253
|
};
|
|
2254
2254
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
@@ -2259,12 +2259,12 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2259
2259
|
variant: "outline",
|
|
2260
2260
|
size: a,
|
|
2261
2261
|
icon: ar,
|
|
2262
|
-
onClick:
|
|
2263
|
-
disabled: i ||
|
|
2262
|
+
onClick: h,
|
|
2263
|
+
disabled: i || m,
|
|
2264
2264
|
children: f("ds.fileUploader.browse", "Browse files")
|
|
2265
2265
|
}
|
|
2266
2266
|
) }),
|
|
2267
|
-
!
|
|
2267
|
+
!m && /* @__PURE__ */ o.jsxs(
|
|
2268
2268
|
"div",
|
|
2269
2269
|
{
|
|
2270
2270
|
className: $(
|
|
@@ -2285,7 +2285,7 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2285
2285
|
className: "hidden",
|
|
2286
2286
|
multiple: s !== 1,
|
|
2287
2287
|
accept: n,
|
|
2288
|
-
onChange:
|
|
2288
|
+
onChange: g,
|
|
2289
2289
|
disabled: i
|
|
2290
2290
|
}
|
|
2291
2291
|
),
|
|
@@ -2293,8 +2293,8 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2293
2293
|
Oe,
|
|
2294
2294
|
{
|
|
2295
2295
|
component: en,
|
|
2296
|
-
size: "
|
|
2297
|
-
className: "w-
|
|
2296
|
+
size: "md",
|
|
2297
|
+
className: "w-8 h-8 text-[var(--color-ds-text-secondary)]"
|
|
2298
2298
|
}
|
|
2299
2299
|
),
|
|
2300
2300
|
/* @__PURE__ */ o.jsx("p", { className: "mt-3 text-[var(--color-ds-text-secondary)] text-center", children: f(
|
|
@@ -2331,7 +2331,7 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2331
2331
|
size: "sm",
|
|
2332
2332
|
icon: Pt,
|
|
2333
2333
|
ariaLabel: f("ds.fileUploader.remove", "Remove"),
|
|
2334
|
-
onClick: () =>
|
|
2334
|
+
onClick: () => v(F)
|
|
2335
2335
|
}
|
|
2336
2336
|
)
|
|
2337
2337
|
] })
|
|
@@ -2354,9 +2354,9 @@ function ta(r) {
|
|
|
2354
2354
|
width: c = "100%",
|
|
2355
2355
|
label: f,
|
|
2356
2356
|
labelHidden: d = !1,
|
|
2357
|
-
disabled:
|
|
2358
|
-
hasError:
|
|
2359
|
-
errorMessage:
|
|
2357
|
+
disabled: m = !1,
|
|
2358
|
+
hasError: h = !1,
|
|
2359
|
+
errorMessage: g = "",
|
|
2360
2360
|
className: k
|
|
2361
2361
|
} = r, j = Ue(), _ = t || j;
|
|
2362
2362
|
if (e && t)
|
|
@@ -2380,21 +2380,21 @@ function ta(r) {
|
|
|
2380
2380
|
control: e,
|
|
2381
2381
|
rules: s,
|
|
2382
2382
|
defaultValue: n instanceof FileList ? Array.from(n) : n || [],
|
|
2383
|
-
render: ({ field: F, fieldState:
|
|
2383
|
+
render: ({ field: F, fieldState: D }) => wr(
|
|
2384
2384
|
_,
|
|
2385
2385
|
F.value,
|
|
2386
|
-
(
|
|
2386
|
+
(O) => F.onChange(O),
|
|
2387
2387
|
a,
|
|
2388
2388
|
i,
|
|
2389
2389
|
l,
|
|
2390
|
-
|
|
2391
|
-
|
|
2390
|
+
m,
|
|
2391
|
+
D.error,
|
|
2392
2392
|
k
|
|
2393
2393
|
)
|
|
2394
2394
|
}
|
|
2395
2395
|
)
|
|
2396
2396
|
] });
|
|
2397
|
-
const [
|
|
2397
|
+
const [v, p] = Q(
|
|
2398
2398
|
n instanceof FileList ? Array.from(n) : n || []
|
|
2399
2399
|
);
|
|
2400
2400
|
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", k), style: { width: c }, children: [
|
|
@@ -2412,13 +2412,13 @@ function ta(r) {
|
|
|
2412
2412
|
),
|
|
2413
2413
|
wr(
|
|
2414
2414
|
_,
|
|
2415
|
-
|
|
2415
|
+
v,
|
|
2416
2416
|
p,
|
|
2417
2417
|
a,
|
|
2418
2418
|
i,
|
|
2419
2419
|
l,
|
|
2420
|
-
|
|
2421
|
-
|
|
2420
|
+
m,
|
|
2421
|
+
h ? { message: g } : void 0,
|
|
2422
2422
|
k
|
|
2423
2423
|
)
|
|
2424
2424
|
] });
|
|
@@ -2481,17 +2481,17 @@ function Ht({
|
|
|
2481
2481
|
prefixIcon: c,
|
|
2482
2482
|
suffixIcon: f,
|
|
2483
2483
|
separator: d,
|
|
2484
|
-
suffixButton:
|
|
2485
|
-
disabled:
|
|
2486
|
-
control:
|
|
2484
|
+
suffixButton: m,
|
|
2485
|
+
disabled: h = !1,
|
|
2486
|
+
control: g,
|
|
2487
2487
|
name: k,
|
|
2488
2488
|
rules: j,
|
|
2489
2489
|
defaultValue: _,
|
|
2490
|
-
loading:
|
|
2490
|
+
loading: v = !1,
|
|
2491
2491
|
className: p,
|
|
2492
2492
|
...F
|
|
2493
2493
|
}) {
|
|
2494
|
-
const
|
|
2494
|
+
const D = Ue(), [O, B] = Q(!1), Y = r || D, P = e === "password", Z = c ?? (e === "number" ? on : void 0), M = P ? O ? sn : zr : f, L = $(
|
|
2495
2495
|
"box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",
|
|
2496
2496
|
nt[t],
|
|
2497
2497
|
ra[t],
|
|
@@ -2503,8 +2503,8 @@ function Ht({
|
|
|
2503
2503
|
"disabled:text-[var(--color-ds-text-disabled)]",
|
|
2504
2504
|
"disabled:cursor-not-allowed"
|
|
2505
2505
|
);
|
|
2506
|
-
return
|
|
2507
|
-
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor:
|
|
2506
|
+
return v ? /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s, maxWidth: "100%" }, children: [
|
|
2507
|
+
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor: Y, className: $("pb-2", nt[t]), children: n }),
|
|
2508
2508
|
/* @__PURE__ */ o.jsx(
|
|
2509
2509
|
He,
|
|
2510
2510
|
{
|
|
@@ -2515,17 +2515,17 @@ function Ht({
|
|
|
2515
2515
|
}
|
|
2516
2516
|
),
|
|
2517
2517
|
/* @__PURE__ */ o.jsx("div", { className: "min-h-[18px] w-full", children: /* @__PURE__ */ o.jsx("span", { "aria-hidden": "true", children: " " }) })
|
|
2518
|
-
] }) :
|
|
2518
|
+
] }) : g && k ? /* @__PURE__ */ o.jsx(
|
|
2519
2519
|
ke,
|
|
2520
2520
|
{
|
|
2521
2521
|
name: k,
|
|
2522
|
-
control:
|
|
2522
|
+
control: g,
|
|
2523
2523
|
rules: j,
|
|
2524
2524
|
defaultValue: _,
|
|
2525
2525
|
render: ({ field: E, fieldState: V }) => /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s }, children: [
|
|
2526
|
-
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor:
|
|
2526
|
+
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor: Y, className: $("pb-2 text-[var(--color-ds-text-primary)]", nt[t]), children: n }),
|
|
2527
2527
|
/* @__PURE__ */ o.jsxs("div", { className: "relative flex items-center w-full", children: [
|
|
2528
|
-
|
|
2528
|
+
Z && /* @__PURE__ */ o.jsx(
|
|
2529
2529
|
"div",
|
|
2530
2530
|
{
|
|
2531
2531
|
className: $(
|
|
@@ -2535,7 +2535,7 @@ function Ht({
|
|
|
2535
2535
|
children: /* @__PURE__ */ o.jsx(
|
|
2536
2536
|
Oe,
|
|
2537
2537
|
{
|
|
2538
|
-
component:
|
|
2538
|
+
component: Z,
|
|
2539
2539
|
size: t,
|
|
2540
2540
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2541
2541
|
}
|
|
@@ -2546,30 +2546,30 @@ function Ht({
|
|
|
2546
2546
|
"input",
|
|
2547
2547
|
{
|
|
2548
2548
|
...E,
|
|
2549
|
-
id:
|
|
2550
|
-
type:
|
|
2551
|
-
disabled:
|
|
2549
|
+
id: Y,
|
|
2550
|
+
type: P ? O ? "text" : "password" : e,
|
|
2551
|
+
disabled: h,
|
|
2552
2552
|
"aria-invalid": !!V.error,
|
|
2553
2553
|
className: $(
|
|
2554
|
-
|
|
2555
|
-
|
|
2554
|
+
L,
|
|
2555
|
+
Z && "pl-9",
|
|
2556
2556
|
M && "pr-9",
|
|
2557
2557
|
p
|
|
2558
2558
|
),
|
|
2559
|
-
onInvalid: (
|
|
2560
|
-
style:
|
|
2559
|
+
onInvalid: (A) => A.preventDefault(),
|
|
2560
|
+
style: P && !O ? {
|
|
2561
2561
|
WebkitTextSecurity: "disc",
|
|
2562
2562
|
MozTextSecurity: "disc"
|
|
2563
2563
|
} : void 0
|
|
2564
2564
|
}
|
|
2565
2565
|
),
|
|
2566
2566
|
d && /* @__PURE__ */ o.jsx("div", { className: "flex items-center h-full", children: d }),
|
|
2567
|
-
|
|
2567
|
+
m && /* @__PURE__ */ o.jsx("div", { className: "flex items-center h-full pr-2", children: m }),
|
|
2568
2568
|
M && /* @__PURE__ */ o.jsx(
|
|
2569
2569
|
"button",
|
|
2570
2570
|
{
|
|
2571
2571
|
type: "button",
|
|
2572
|
-
onClick: () =>
|
|
2572
|
+
onClick: () => B((A) => !A),
|
|
2573
2573
|
className: "absolute right-0 flex items-center h-full pr-2",
|
|
2574
2574
|
tabIndex: -1,
|
|
2575
2575
|
children: /* @__PURE__ */ o.jsx(
|
|
@@ -2587,9 +2587,9 @@ function Ht({
|
|
|
2587
2587
|
] })
|
|
2588
2588
|
}
|
|
2589
2589
|
) : /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s }, children: [
|
|
2590
|
-
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor:
|
|
2590
|
+
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor: Y, className: $("pb-2 text-[var(--color-ds-text-primary)]", nt[t]), children: n }),
|
|
2591
2591
|
/* @__PURE__ */ o.jsxs("div", { className: "relative flex items-center w-full", children: [
|
|
2592
|
-
|
|
2592
|
+
Z && /* @__PURE__ */ o.jsx(
|
|
2593
2593
|
"div",
|
|
2594
2594
|
{
|
|
2595
2595
|
className: $(
|
|
@@ -2599,7 +2599,7 @@ function Ht({
|
|
|
2599
2599
|
children: /* @__PURE__ */ o.jsx(
|
|
2600
2600
|
Oe,
|
|
2601
2601
|
{
|
|
2602
|
-
component:
|
|
2602
|
+
component: Z,
|
|
2603
2603
|
size: t,
|
|
2604
2604
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2605
2605
|
}
|
|
@@ -2610,30 +2610,30 @@ function Ht({
|
|
|
2610
2610
|
"input",
|
|
2611
2611
|
{
|
|
2612
2612
|
...F,
|
|
2613
|
-
id:
|
|
2614
|
-
type:
|
|
2615
|
-
disabled:
|
|
2613
|
+
id: Y,
|
|
2614
|
+
type: P ? O ? "text" : "password" : e,
|
|
2615
|
+
disabled: h,
|
|
2616
2616
|
"aria-invalid": i,
|
|
2617
2617
|
className: $(
|
|
2618
|
-
|
|
2619
|
-
|
|
2618
|
+
L,
|
|
2619
|
+
Z && "pl-9",
|
|
2620
2620
|
M && "pr-9",
|
|
2621
2621
|
p
|
|
2622
2622
|
),
|
|
2623
2623
|
onInvalid: (E) => E.preventDefault(),
|
|
2624
|
-
style:
|
|
2624
|
+
style: P && !O ? {
|
|
2625
2625
|
WebkitTextSecurity: "disc",
|
|
2626
2626
|
MozTextSecurity: "disc"
|
|
2627
2627
|
} : void 0
|
|
2628
2628
|
}
|
|
2629
2629
|
),
|
|
2630
2630
|
d && /* @__PURE__ */ o.jsx("div", { className: "flex items-center h-full", children: d }),
|
|
2631
|
-
|
|
2631
|
+
m && /* @__PURE__ */ o.jsx("div", { className: "flex items-center h-full", children: m }),
|
|
2632
2632
|
M && /* @__PURE__ */ o.jsx(
|
|
2633
2633
|
"button",
|
|
2634
2634
|
{
|
|
2635
2635
|
type: "button",
|
|
2636
|
-
onClick: () =>
|
|
2636
|
+
onClick: () => B((E) => !E),
|
|
2637
2637
|
className: "absolute right-0 flex items-center h-full pr-2",
|
|
2638
2638
|
tabIndex: -1,
|
|
2639
2639
|
children: /* @__PURE__ */ o.jsx(
|
|
@@ -2663,26 +2663,26 @@ const aa = {
|
|
|
2663
2663
|
const [n, a] = Q(!1), [i, l] = Q({ x: 0, y: 0 }), c = _e(null), f = Ue();
|
|
2664
2664
|
ue(() => {
|
|
2665
2665
|
if (n && c.current) {
|
|
2666
|
-
const
|
|
2667
|
-
let
|
|
2666
|
+
const h = c.current.getBoundingClientRect();
|
|
2667
|
+
let g = 0, k = 0;
|
|
2668
2668
|
switch (t) {
|
|
2669
2669
|
case "top":
|
|
2670
|
-
|
|
2670
|
+
g = h.left + h.width / 2 - Et / 2, k = h.top - at;
|
|
2671
2671
|
break;
|
|
2672
2672
|
case "bottom":
|
|
2673
|
-
|
|
2673
|
+
g = h.left + h.width / 2 - Et / 2, k = h.bottom + at;
|
|
2674
2674
|
break;
|
|
2675
2675
|
case "left":
|
|
2676
|
-
|
|
2676
|
+
g = h.left - Et - at, k = h.top + h.height / 2;
|
|
2677
2677
|
break;
|
|
2678
2678
|
case "right":
|
|
2679
|
-
|
|
2679
|
+
g = h.right + at, k = h.top + h.height / 2;
|
|
2680
2680
|
break;
|
|
2681
2681
|
}
|
|
2682
|
-
l({ x:
|
|
2682
|
+
l({ x: g, y: k });
|
|
2683
2683
|
}
|
|
2684
2684
|
}, [n, t]);
|
|
2685
|
-
const d = () => typeof r == "string" ? /* @__PURE__ */ o.jsx("div", { dangerouslySetInnerHTML: { __html: r } }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: r }),
|
|
2685
|
+
const d = () => typeof r == "string" ? /* @__PURE__ */ o.jsx("div", { dangerouslySetInnerHTML: { __html: r } }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: r }), m = n ? /* @__PURE__ */ o.jsx(
|
|
2686
2686
|
"div",
|
|
2687
2687
|
{
|
|
2688
2688
|
id: f,
|
|
@@ -2719,7 +2719,7 @@ const aa = {
|
|
|
2719
2719
|
children: /* @__PURE__ */ o.jsx(cn, { className: "w-full h-full" })
|
|
2720
2720
|
}
|
|
2721
2721
|
),
|
|
2722
|
-
Ur.createPortal(
|
|
2722
|
+
Ur.createPortal(m, document.body)
|
|
2723
2723
|
] });
|
|
2724
2724
|
};
|
|
2725
2725
|
function oa({
|
|
@@ -2737,8 +2737,8 @@ function oa({
|
|
|
2737
2737
|
var _;
|
|
2738
2738
|
const {
|
|
2739
2739
|
control: d,
|
|
2740
|
-
formState: { errors:
|
|
2741
|
-
} = bt(),
|
|
2740
|
+
formState: { errors: m }
|
|
2741
|
+
} = bt(), h = !!m[r], g = ((_ = m[r]) == null ? void 0 : _.message) || "", k = "relative", j = n ?? "w-full";
|
|
2742
2742
|
return /* @__PURE__ */ o.jsxs("div", { className: k, children: [
|
|
2743
2743
|
/* @__PURE__ */ o.jsx(
|
|
2744
2744
|
ke,
|
|
@@ -2746,18 +2746,18 @@ function oa({
|
|
|
2746
2746
|
name: r,
|
|
2747
2747
|
control: d,
|
|
2748
2748
|
rules: i,
|
|
2749
|
-
render: ({ field:
|
|
2749
|
+
render: ({ field: v }) => /* @__PURE__ */ o.jsx(
|
|
2750
2750
|
Ht,
|
|
2751
2751
|
{
|
|
2752
2752
|
label: e,
|
|
2753
2753
|
size: s,
|
|
2754
2754
|
width: j,
|
|
2755
2755
|
placeholder: a,
|
|
2756
|
-
hasError:
|
|
2757
|
-
errorMessage:
|
|
2756
|
+
hasError: h,
|
|
2757
|
+
errorMessage: g,
|
|
2758
2758
|
loading: l,
|
|
2759
2759
|
type: t,
|
|
2760
|
-
...
|
|
2760
|
+
...v,
|
|
2761
2761
|
disabled: c
|
|
2762
2762
|
}
|
|
2763
2763
|
)
|
|
@@ -2813,8 +2813,8 @@ function la({
|
|
|
2813
2813
|
const c = () => {
|
|
2814
2814
|
const f = r.findIndex((_) => _.value === e);
|
|
2815
2815
|
if (f < 0) return;
|
|
2816
|
-
const d = l.children[f],
|
|
2817
|
-
i({ left: j, width:
|
|
2816
|
+
const d = l.children[f], m = d.querySelector("span"), h = (m == null ? void 0 : m.offsetWidth) ?? d.offsetWidth, g = d.offsetWidth, j = d.offsetLeft + (g - h) / 2;
|
|
2817
|
+
i({ left: j, width: h });
|
|
2818
2818
|
};
|
|
2819
2819
|
return c(), window.addEventListener("resize", c), l.addEventListener("scroll", c), () => {
|
|
2820
2820
|
window.removeEventListener("resize", c), l.removeEventListener("scroll", c);
|
|
@@ -2916,27 +2916,28 @@ function pt(r) {
|
|
|
2916
2916
|
defaultValue: n,
|
|
2917
2917
|
options: a = [],
|
|
2918
2918
|
loadOptions: i,
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2919
|
+
reloadDeps: l = [],
|
|
2920
|
+
value: c,
|
|
2921
|
+
onChange: f,
|
|
2922
|
+
size: d = "sm",
|
|
2923
|
+
width: m = "100%",
|
|
2923
2924
|
label: h,
|
|
2924
|
-
labelHidden:
|
|
2925
|
-
hasError:
|
|
2926
|
-
errorMessage:
|
|
2927
|
-
disableErrorPlaceholder:
|
|
2928
|
-
disabled:
|
|
2929
|
-
className:
|
|
2930
|
-
suffixButton:
|
|
2931
|
-
} = r,
|
|
2925
|
+
labelHidden: g = !1,
|
|
2926
|
+
hasError: k = !1,
|
|
2927
|
+
errorMessage: j = "",
|
|
2928
|
+
disableErrorPlaceholder: _ = !1,
|
|
2929
|
+
disabled: v = !1,
|
|
2930
|
+
className: p,
|
|
2931
|
+
suffixButton: F
|
|
2932
|
+
} = r, D = Ue(), O = t || D, [B, Y] = Q(a), [P, W] = Q(!!i);
|
|
2932
2933
|
if (ue(() => {
|
|
2933
|
-
i && (
|
|
2934
|
-
}, [i]), ue(() => {
|
|
2935
|
-
!e &&
|
|
2936
|
-
}, [
|
|
2934
|
+
i && (W(!0), i().then((Z) => Y(Z)).finally(() => W(!1)));
|
|
2935
|
+
}, [i, ...l]), ue(() => {
|
|
2936
|
+
!e && B.length > 0 && (c === void 0 || c === "" || !B.some((Z) => Z.value === c)) && (f == null || f(B[0].value));
|
|
2937
|
+
}, [B, c, f, e]), e && t) {
|
|
2937
2938
|
const {
|
|
2938
|
-
field:
|
|
2939
|
-
fieldState:
|
|
2939
|
+
field: Z,
|
|
2940
|
+
fieldState: M
|
|
2940
2941
|
} = Qr({
|
|
2941
2942
|
name: t,
|
|
2942
2943
|
control: e,
|
|
@@ -2944,81 +2945,81 @@ function pt(r) {
|
|
|
2944
2945
|
defaultValue: n
|
|
2945
2946
|
});
|
|
2946
2947
|
return ue(() => {
|
|
2947
|
-
if (!
|
|
2948
|
-
const
|
|
2949
|
-
(
|
|
2948
|
+
if (!P && B.length > 0) {
|
|
2949
|
+
const L = Z.value;
|
|
2950
|
+
(L === void 0 || !B.some((E) => E.value === L)) && Z.onChange(B[0].value);
|
|
2950
2951
|
}
|
|
2951
|
-
}, [
|
|
2952
|
+
}, [B, P, Z]), /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", p), style: { width: m, maxWidth: "100%" }, children: [
|
|
2952
2953
|
h && /* @__PURE__ */ o.jsx(
|
|
2953
2954
|
"label",
|
|
2954
2955
|
{
|
|
2955
|
-
htmlFor:
|
|
2956
|
+
htmlFor: O,
|
|
2956
2957
|
className: $(
|
|
2957
2958
|
"pb-2 text-[var(--color-ds-text-primary)]",
|
|
2958
|
-
Dt[
|
|
2959
|
-
|
|
2959
|
+
Dt[d],
|
|
2960
|
+
g && "sr-only"
|
|
2960
2961
|
),
|
|
2961
2962
|
children: h
|
|
2962
2963
|
}
|
|
2963
2964
|
),
|
|
2964
|
-
|
|
2965
|
+
P ? /* @__PURE__ */ o.jsx(
|
|
2965
2966
|
He,
|
|
2966
2967
|
{
|
|
2967
2968
|
width: "100%",
|
|
2968
|
-
height: kr[
|
|
2969
|
+
height: kr[d],
|
|
2969
2970
|
variant: "rect",
|
|
2970
2971
|
className: "rounded-lg"
|
|
2971
2972
|
}
|
|
2972
2973
|
) : Er(
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2974
|
+
O,
|
|
2975
|
+
B,
|
|
2976
|
+
d,
|
|
2976
2977
|
{
|
|
2977
|
-
value:
|
|
2978
|
-
onChange: (
|
|
2978
|
+
value: Z.value,
|
|
2979
|
+
onChange: (L) => Z.onChange(L.target.value)
|
|
2979
2980
|
},
|
|
2981
|
+
v,
|
|
2982
|
+
M.error,
|
|
2980
2983
|
_,
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
g,
|
|
2984
|
-
p
|
|
2984
|
+
p,
|
|
2985
|
+
F
|
|
2985
2986
|
)
|
|
2986
2987
|
] });
|
|
2987
2988
|
}
|
|
2988
|
-
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col",
|
|
2989
|
+
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", p), style: { width: m, maxWidth: "100%" }, children: [
|
|
2989
2990
|
h && /* @__PURE__ */ o.jsx(
|
|
2990
2991
|
"label",
|
|
2991
2992
|
{
|
|
2992
|
-
htmlFor:
|
|
2993
|
+
htmlFor: O,
|
|
2993
2994
|
className: $(
|
|
2994
2995
|
"pb-2 text-[var(--color-ds-text-primary)]",
|
|
2995
|
-
Dt[
|
|
2996
|
-
|
|
2996
|
+
Dt[d],
|
|
2997
|
+
g && "sr-only"
|
|
2997
2998
|
),
|
|
2998
2999
|
children: h
|
|
2999
3000
|
}
|
|
3000
3001
|
),
|
|
3001
|
-
|
|
3002
|
+
P ? /* @__PURE__ */ o.jsx(
|
|
3002
3003
|
He,
|
|
3003
3004
|
{
|
|
3004
3005
|
width: "100%",
|
|
3005
|
-
height: kr[
|
|
3006
|
+
height: kr[d],
|
|
3006
3007
|
variant: "rect",
|
|
3007
3008
|
className: "rounded-lg"
|
|
3008
3009
|
}
|
|
3009
3010
|
) : Er(
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3011
|
+
O,
|
|
3012
|
+
B,
|
|
3013
|
+
d,
|
|
3013
3014
|
{
|
|
3014
|
-
value:
|
|
3015
|
-
onChange: (
|
|
3015
|
+
value: c,
|
|
3016
|
+
onChange: (Z) => f == null ? void 0 : f(Z.target.value)
|
|
3016
3017
|
},
|
|
3018
|
+
v,
|
|
3019
|
+
k ? { message: j } : void 0,
|
|
3017
3020
|
_,
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
g,
|
|
3021
|
-
p
|
|
3021
|
+
p,
|
|
3022
|
+
F
|
|
3022
3023
|
)
|
|
3023
3024
|
] });
|
|
3024
3025
|
}
|
|
@@ -3048,26 +3049,26 @@ function da({
|
|
|
3048
3049
|
a && /* @__PURE__ */ o.jsx("label", { className: $("pb-2", Nr[i]), children: r }),
|
|
3049
3050
|
/* @__PURE__ */ o.jsx("div", { className: "flex items-center flex-nowrap", children: e.map((f, d) => {
|
|
3050
3051
|
const {
|
|
3051
|
-
width:
|
|
3052
|
-
className:
|
|
3053
|
-
options:
|
|
3052
|
+
width: m,
|
|
3053
|
+
className: h,
|
|
3054
|
+
options: g,
|
|
3054
3055
|
loadOptions: k,
|
|
3055
3056
|
...j
|
|
3056
|
-
} = f, _ = Array.isArray(
|
|
3057
|
-
let
|
|
3058
|
-
!s && c > 1 && (d === 0 ?
|
|
3057
|
+
} = f, _ = Array.isArray(g) || typeof k == "function";
|
|
3058
|
+
let v = "rounded-lg";
|
|
3059
|
+
!s && c > 1 && (d === 0 ? v = "rounded-l-lg rounded-r-none" : d === c - 1 ? v = "rounded-r-lg rounded-l-none" : v = "rounded-none");
|
|
3059
3060
|
const p = $(
|
|
3060
3061
|
"inline-flex items-center flex-shrink-0 overflow-hidden",
|
|
3061
|
-
typeof
|
|
3062
|
-
), F = typeof
|
|
3062
|
+
typeof m == "string" && m.startsWith("w-") ? m : void 0
|
|
3063
|
+
), F = typeof m == "string" && !m.startsWith("w-") ? { width: m } : void 0, D = $(h, v);
|
|
3063
3064
|
return /* @__PURE__ */ o.jsxs("div", { className: p, style: F, children: [
|
|
3064
3065
|
_ ? /* @__PURE__ */ o.jsx(
|
|
3065
3066
|
pt,
|
|
3066
3067
|
{
|
|
3067
3068
|
...j,
|
|
3068
3069
|
size: i,
|
|
3069
|
-
className:
|
|
3070
|
-
options:
|
|
3070
|
+
className: D,
|
|
3071
|
+
options: g,
|
|
3071
3072
|
loadOptions: k
|
|
3072
3073
|
}
|
|
3073
3074
|
) : /* @__PURE__ */ o.jsx(
|
|
@@ -3075,7 +3076,7 @@ function da({
|
|
|
3075
3076
|
{
|
|
3076
3077
|
...j,
|
|
3077
3078
|
size: i,
|
|
3078
|
-
className:
|
|
3079
|
+
className: D
|
|
3079
3080
|
}
|
|
3080
3081
|
),
|
|
3081
3082
|
s && d < c - 1 && t
|
|
@@ -3114,15 +3115,15 @@ function ha({
|
|
|
3114
3115
|
control: t,
|
|
3115
3116
|
rules: n,
|
|
3116
3117
|
defaultValue: a,
|
|
3117
|
-
render: ({ field:
|
|
3118
|
-
const { value:
|
|
3119
|
-
|
|
3120
|
-
const j = (
|
|
3118
|
+
render: ({ field: m, fieldState: h }) => {
|
|
3119
|
+
const { value: g, onChange: k } = m;
|
|
3120
|
+
h.error;
|
|
3121
|
+
const j = (v) => i ? Array.isArray(g) && g.includes(v) : g === v, _ = (v) => {
|
|
3121
3122
|
if (i) {
|
|
3122
|
-
const p = Array.isArray(
|
|
3123
|
-
F >= 0 ? p.splice(F, 1) : p.push(
|
|
3123
|
+
const p = Array.isArray(g) ? [...g] : [], F = p.indexOf(v);
|
|
3124
|
+
F >= 0 ? p.splice(F, 1) : p.push(v), k(p);
|
|
3124
3125
|
} else
|
|
3125
|
-
k(
|
|
3126
|
+
k(v);
|
|
3126
3127
|
};
|
|
3127
3128
|
return /* @__PURE__ */ o.jsxs("div", { className: $("w-full", f), children: [
|
|
3128
3129
|
/* @__PURE__ */ o.jsx(
|
|
@@ -3151,7 +3152,7 @@ function ha({
|
|
|
3151
3152
|
className: $(
|
|
3152
3153
|
c ? "flex flex-col gap-2" : "flex flex-wrap gap-4"
|
|
3153
3154
|
),
|
|
3154
|
-
children: e.map((
|
|
3155
|
+
children: e.map((v) => /* @__PURE__ */ o.jsxs(
|
|
3155
3156
|
"label",
|
|
3156
3157
|
{
|
|
3157
3158
|
className: "inline-flex items-center space-x-2 cursor-pointer select-none",
|
|
@@ -3161,9 +3162,9 @@ function ha({
|
|
|
3161
3162
|
{
|
|
3162
3163
|
type: i ? "checkbox" : "radio",
|
|
3163
3164
|
name: s,
|
|
3164
|
-
value:
|
|
3165
|
-
checked: j(
|
|
3166
|
-
onChange: () => _(
|
|
3165
|
+
value: v.value,
|
|
3166
|
+
checked: j(v.value),
|
|
3167
|
+
onChange: () => _(v.value),
|
|
3167
3168
|
className: $(
|
|
3168
3169
|
fa[l],
|
|
3169
3170
|
"text-[var(--color-ds-button-primary-bg)]",
|
|
@@ -3171,10 +3172,10 @@ function ha({
|
|
|
3171
3172
|
)
|
|
3172
3173
|
}
|
|
3173
3174
|
),
|
|
3174
|
-
/* @__PURE__ */ o.jsx("span", { className: "text-[var(--color-ds-text-primary)] text-ds-md", children:
|
|
3175
|
+
/* @__PURE__ */ o.jsx("span", { className: "text-[var(--color-ds-text-primary)] text-ds-md", children: v.label })
|
|
3175
3176
|
]
|
|
3176
3177
|
},
|
|
3177
|
-
|
|
3178
|
+
v.value
|
|
3178
3179
|
))
|
|
3179
3180
|
}
|
|
3180
3181
|
)
|
|
@@ -3288,7 +3289,7 @@ const ds = Lt(null), ja = () => {
|
|
|
3288
3289
|
] });
|
|
3289
3290
|
}, Sr = (r, e, t) => {
|
|
3290
3291
|
if (r && "reportValidity" in r) {
|
|
3291
|
-
const s =
|
|
3292
|
+
const s = T(t, e);
|
|
3292
3293
|
r.setCustomValidity(s && s.message || ""), r.reportValidity();
|
|
3293
3294
|
}
|
|
3294
3295
|
}, fs = (r, e) => {
|
|
@@ -3300,9 +3301,9 @@ const ds = Lt(null), ja = () => {
|
|
|
3300
3301
|
e.shouldUseNativeValidation && fs(r, e);
|
|
3301
3302
|
const t = {};
|
|
3302
3303
|
for (const s in r) {
|
|
3303
|
-
const n =
|
|
3304
|
+
const n = T(e.fields, s), a = Object.assign(r[s] || {}, { ref: n && n.ref });
|
|
3304
3305
|
if (Ea(e.names || Object.keys(r), s)) {
|
|
3305
|
-
const i = Object.assign({},
|
|
3306
|
+
const i = Object.assign({}, T(t, s));
|
|
3306
3307
|
J(i, "root", a), J(t, s, i);
|
|
3307
3308
|
} else J(t, s, a);
|
|
3308
3309
|
}
|
|
@@ -3330,8 +3331,8 @@ function Or(r, e, t) {
|
|
|
3330
3331
|
if (!i.inner) throw i;
|
|
3331
3332
|
return { values: {}, errors: ka((l = i, c = !a.shouldUseNativeValidation && a.criteriaMode === "all", (l.inner || []).reduce(function(f, d) {
|
|
3332
3333
|
if (f[d.path] || (f[d.path] = { message: d.message, type: d.type }), c) {
|
|
3333
|
-
var
|
|
3334
|
-
f[d.path] = es(d.path, c, f, d.type,
|
|
3334
|
+
var m = f[d.path].types, h = m && m[d.type];
|
|
3335
|
+
f[d.path] = es(d.path, c, f, d.type, h ? [].concat(h, d.message) : d.message);
|
|
3335
3336
|
}
|
|
3336
3337
|
return f;
|
|
3337
3338
|
}, {})), a) };
|
|
@@ -3346,78 +3347,78 @@ var Nt, Cr;
|
|
|
3346
3347
|
function Na() {
|
|
3347
3348
|
if (Cr) return Nt;
|
|
3348
3349
|
Cr = 1;
|
|
3349
|
-
function r(
|
|
3350
|
-
this._maxSize =
|
|
3350
|
+
function r(v) {
|
|
3351
|
+
this._maxSize = v, this.clear();
|
|
3351
3352
|
}
|
|
3352
3353
|
r.prototype.clear = function() {
|
|
3353
3354
|
this._size = 0, this._values = /* @__PURE__ */ Object.create(null);
|
|
3354
|
-
}, r.prototype.get = function(
|
|
3355
|
-
return this._values[
|
|
3356
|
-
}, r.prototype.set = function(
|
|
3357
|
-
return this._size >= this._maxSize && this.clear(),
|
|
3355
|
+
}, r.prototype.get = function(v) {
|
|
3356
|
+
return this._values[v];
|
|
3357
|
+
}, r.prototype.set = function(v, p) {
|
|
3358
|
+
return this._size >= this._maxSize && this.clear(), v in this._values || this._size++, this._values[v] = p;
|
|
3358
3359
|
};
|
|
3359
3360
|
var e = /[^.^\]^[]+|(?=\[\]|\.\.)/g, t = /^\d+$/, s = /^\d/, n = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, a = /^\s*(['"]?)(.*?)(\1)\s*$/, i = 512, l = new r(i), c = new r(i), f = new r(i);
|
|
3360
3361
|
Nt = {
|
|
3361
3362
|
Cache: r,
|
|
3362
|
-
split:
|
|
3363
|
+
split: m,
|
|
3363
3364
|
normalizePath: d,
|
|
3364
|
-
setter: function(
|
|
3365
|
-
var p = d(
|
|
3366
|
-
return c.get(
|
|
3367
|
-
for (var
|
|
3368
|
-
var
|
|
3369
|
-
if (
|
|
3370
|
-
return
|
|
3371
|
-
|
|
3365
|
+
setter: function(v) {
|
|
3366
|
+
var p = d(v);
|
|
3367
|
+
return c.get(v) || c.set(v, function(D, O) {
|
|
3368
|
+
for (var B = 0, Y = p.length, P = D; B < Y - 1; ) {
|
|
3369
|
+
var W = p[B];
|
|
3370
|
+
if (W === "__proto__" || W === "constructor" || W === "prototype")
|
|
3371
|
+
return D;
|
|
3372
|
+
P = P[p[B++]];
|
|
3372
3373
|
}
|
|
3373
|
-
|
|
3374
|
+
P[p[B]] = O;
|
|
3374
3375
|
});
|
|
3375
3376
|
},
|
|
3376
|
-
getter: function(
|
|
3377
|
-
var F = d(
|
|
3378
|
-
return f.get(
|
|
3379
|
-
for (var
|
|
3380
|
-
if (
|
|
3377
|
+
getter: function(v, p) {
|
|
3378
|
+
var F = d(v);
|
|
3379
|
+
return f.get(v) || f.set(v, function(O) {
|
|
3380
|
+
for (var B = 0, Y = F.length; B < Y; )
|
|
3381
|
+
if (O != null || !p) O = O[F[B++]];
|
|
3381
3382
|
else return;
|
|
3382
|
-
return
|
|
3383
|
+
return O;
|
|
3383
3384
|
});
|
|
3384
3385
|
},
|
|
3385
|
-
join: function(
|
|
3386
|
-
return
|
|
3387
|
-
return p + (
|
|
3386
|
+
join: function(v) {
|
|
3387
|
+
return v.reduce(function(p, F) {
|
|
3388
|
+
return p + (g(F) || t.test(F) ? "[" + F + "]" : (p ? "." : "") + F);
|
|
3388
3389
|
}, "");
|
|
3389
3390
|
},
|
|
3390
|
-
forEach: function(
|
|
3391
|
-
|
|
3391
|
+
forEach: function(v, p, F) {
|
|
3392
|
+
h(Array.isArray(v) ? v : m(v), p, F);
|
|
3392
3393
|
}
|
|
3393
3394
|
};
|
|
3394
|
-
function d(
|
|
3395
|
-
return l.get(
|
|
3396
|
-
|
|
3397
|
-
|
|
3395
|
+
function d(v) {
|
|
3396
|
+
return l.get(v) || l.set(
|
|
3397
|
+
v,
|
|
3398
|
+
m(v).map(function(p) {
|
|
3398
3399
|
return p.replace(a, "$2");
|
|
3399
3400
|
})
|
|
3400
3401
|
);
|
|
3401
3402
|
}
|
|
3402
|
-
function
|
|
3403
|
-
return
|
|
3403
|
+
function m(v) {
|
|
3404
|
+
return v.match(e) || [""];
|
|
3404
3405
|
}
|
|
3405
|
-
function
|
|
3406
|
-
var
|
|
3407
|
-
for (
|
|
3408
|
-
|
|
3406
|
+
function h(v, p, F) {
|
|
3407
|
+
var D = v.length, O, B, Y, P;
|
|
3408
|
+
for (B = 0; B < D; B++)
|
|
3409
|
+
O = v[B], O && (_(O) && (O = '"' + O + '"'), P = g(O), Y = !P && /^\d+$/.test(O), p.call(F, O, P, Y, B, v));
|
|
3409
3410
|
}
|
|
3410
|
-
function v
|
|
3411
|
-
return typeof
|
|
3411
|
+
function g(v) {
|
|
3412
|
+
return typeof v == "string" && v && ["'", '"'].indexOf(v.charAt(0)) !== -1;
|
|
3412
3413
|
}
|
|
3413
|
-
function k(
|
|
3414
|
-
return
|
|
3414
|
+
function k(v) {
|
|
3415
|
+
return v.match(s) && !v.match(t);
|
|
3415
3416
|
}
|
|
3416
|
-
function j(
|
|
3417
|
-
return n.test(
|
|
3417
|
+
function j(v) {
|
|
3418
|
+
return n.test(v);
|
|
3418
3419
|
}
|
|
3419
|
-
function _(
|
|
3420
|
-
return !v
|
|
3420
|
+
function _(v) {
|
|
3421
|
+
return !g(v) && (k(v) || j(v));
|
|
3421
3422
|
}
|
|
3422
3423
|
return Nt;
|
|
3423
3424
|
}
|
|
@@ -3425,8 +3426,8 @@ var Pe = Na(), _t, Ar;
|
|
|
3425
3426
|
function _a() {
|
|
3426
3427
|
if (Ar) return _t;
|
|
3427
3428
|
Ar = 1;
|
|
3428
|
-
const r = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, e = (d) => d.match(r) || [], t = (d) => d[0].toUpperCase() + d.slice(1), s = (d,
|
|
3429
|
-
(
|
|
3429
|
+
const r = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, e = (d) => d.match(r) || [], t = (d) => d[0].toUpperCase() + d.slice(1), s = (d, m) => e(d).join(m).toLowerCase(), n = (d) => e(d).reduce(
|
|
3430
|
+
(m, h) => `${m}${m ? h[0].toUpperCase() + h.slice(1).toLowerCase() : h.toLowerCase()}`,
|
|
3430
3431
|
""
|
|
3431
3432
|
);
|
|
3432
3433
|
return _t = {
|
|
@@ -3447,37 +3448,37 @@ function Fa() {
|
|
|
3447
3448
|
return r(e(n), n);
|
|
3448
3449
|
}, ot.exports.array = r;
|
|
3449
3450
|
function r(n, a) {
|
|
3450
|
-
var i = n.length, l = new Array(i), c = {}, f = i, d = t(a),
|
|
3451
|
-
for (a.forEach(function(
|
|
3452
|
-
if (!
|
|
3451
|
+
var i = n.length, l = new Array(i), c = {}, f = i, d = t(a), m = s(n);
|
|
3452
|
+
for (a.forEach(function(g) {
|
|
3453
|
+
if (!m.has(g[0]) || !m.has(g[1]))
|
|
3453
3454
|
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
|
|
3454
3455
|
}); f--; )
|
|
3455
|
-
c[f] ||
|
|
3456
|
+
c[f] || h(n[f], f, /* @__PURE__ */ new Set());
|
|
3456
3457
|
return l;
|
|
3457
|
-
function
|
|
3458
|
-
if (j.has(
|
|
3458
|
+
function h(g, k, j) {
|
|
3459
|
+
if (j.has(g)) {
|
|
3459
3460
|
var _;
|
|
3460
3461
|
try {
|
|
3461
|
-
_ = ", node was:" + JSON.stringify(
|
|
3462
|
+
_ = ", node was:" + JSON.stringify(g);
|
|
3462
3463
|
} catch {
|
|
3463
3464
|
_ = "";
|
|
3464
3465
|
}
|
|
3465
3466
|
throw new Error("Cyclic dependency" + _);
|
|
3466
3467
|
}
|
|
3467
|
-
if (!
|
|
3468
|
-
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(
|
|
3468
|
+
if (!m.has(g))
|
|
3469
|
+
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(g));
|
|
3469
3470
|
if (!c[k]) {
|
|
3470
3471
|
c[k] = !0;
|
|
3471
|
-
var
|
|
3472
|
-
if (
|
|
3473
|
-
j.add(
|
|
3472
|
+
var v = d.get(g) || /* @__PURE__ */ new Set();
|
|
3473
|
+
if (v = Array.from(v), k = v.length) {
|
|
3474
|
+
j.add(g);
|
|
3474
3475
|
do {
|
|
3475
|
-
var p =
|
|
3476
|
-
|
|
3476
|
+
var p = v[--k];
|
|
3477
|
+
h(p, m.get(p), j);
|
|
3477
3478
|
} while (k);
|
|
3478
|
-
j.delete(
|
|
3479
|
+
j.delete(g);
|
|
3479
3480
|
}
|
|
3480
|
-
l[--i] =
|
|
3481
|
+
l[--i] = g;
|
|
3481
3482
|
}
|
|
3482
3483
|
}
|
|
3483
3484
|
}
|
|
@@ -3723,34 +3724,34 @@ function We(r) {
|
|
|
3723
3724
|
const {
|
|
3724
3725
|
name: f,
|
|
3725
3726
|
test: d,
|
|
3726
|
-
params:
|
|
3727
|
-
message:
|
|
3728
|
-
skipAbsent:
|
|
3727
|
+
params: m,
|
|
3728
|
+
message: h,
|
|
3729
|
+
skipAbsent: g
|
|
3729
3730
|
} = r;
|
|
3730
3731
|
let {
|
|
3731
3732
|
parent: k,
|
|
3732
3733
|
context: j,
|
|
3733
3734
|
abortEarly: _ = i.spec.abortEarly,
|
|
3734
|
-
disableStackTrace:
|
|
3735
|
+
disableStackTrace: v = i.spec.disableStackTrace
|
|
3735
3736
|
} = n;
|
|
3736
3737
|
function p(M) {
|
|
3737
3738
|
return Be.isRef(M) ? M.getValue(t, k, j) : M;
|
|
3738
3739
|
}
|
|
3739
3740
|
function F(M = {}) {
|
|
3740
|
-
const
|
|
3741
|
+
const L = Object.assign({
|
|
3741
3742
|
value: t,
|
|
3742
3743
|
originalValue: a,
|
|
3743
3744
|
label: i.spec.label,
|
|
3744
3745
|
path: M.path || s,
|
|
3745
3746
|
spec: i.spec,
|
|
3746
|
-
disableStackTrace: M.disableStackTrace ||
|
|
3747
|
-
},
|
|
3748
|
-
for (const V of Object.keys(
|
|
3749
|
-
const E = new ge(ge.formatError(M.message ||
|
|
3750
|
-
return E.params =
|
|
3747
|
+
disableStackTrace: M.disableStackTrace || v
|
|
3748
|
+
}, m, M.params);
|
|
3749
|
+
for (const V of Object.keys(L)) L[V] = p(L[V]);
|
|
3750
|
+
const E = new ge(ge.formatError(M.message || h, L), t, L.path, M.type || f, L.disableStackTrace);
|
|
3751
|
+
return E.params = L, E;
|
|
3751
3752
|
}
|
|
3752
|
-
const
|
|
3753
|
-
let
|
|
3753
|
+
const D = _ ? l : c;
|
|
3754
|
+
let O = {
|
|
3754
3755
|
path: s,
|
|
3755
3756
|
parent: k,
|
|
3756
3757
|
type: f,
|
|
@@ -3761,26 +3762,26 @@ function We(r) {
|
|
|
3761
3762
|
originalValue: a,
|
|
3762
3763
|
schema: i
|
|
3763
3764
|
};
|
|
3764
|
-
const
|
|
3765
|
-
ge.isError(M) ?
|
|
3766
|
-
},
|
|
3767
|
-
ge.isError(M) ?
|
|
3765
|
+
const B = (M) => {
|
|
3766
|
+
ge.isError(M) ? D(M) : M ? c(null) : D(F());
|
|
3767
|
+
}, Y = (M) => {
|
|
3768
|
+
ge.isError(M) ? D(M) : l(M);
|
|
3768
3769
|
};
|
|
3769
|
-
if (
|
|
3770
|
-
return
|
|
3771
|
-
let
|
|
3770
|
+
if (g && Ce(t))
|
|
3771
|
+
return B(!0);
|
|
3772
|
+
let W;
|
|
3772
3773
|
try {
|
|
3773
|
-
var
|
|
3774
|
-
if (
|
|
3774
|
+
var Z;
|
|
3775
|
+
if (W = d.call(O, t, O), typeof ((Z = W) == null ? void 0 : Z.then) == "function") {
|
|
3775
3776
|
if (n.sync)
|
|
3776
|
-
throw new Error(`Validation test of type: "${
|
|
3777
|
-
return Promise.resolve(
|
|
3777
|
+
throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
|
|
3778
|
+
return Promise.resolve(W).then(B, Y);
|
|
3778
3779
|
}
|
|
3779
3780
|
} catch (M) {
|
|
3780
|
-
|
|
3781
|
+
Y(M);
|
|
3781
3782
|
return;
|
|
3782
3783
|
}
|
|
3783
|
-
|
|
3784
|
+
B(W);
|
|
3784
3785
|
}
|
|
3785
3786
|
return e.OPTIONS = r, e;
|
|
3786
3787
|
}
|
|
@@ -3793,12 +3794,12 @@ function Pa(r, e, t, s = t) {
|
|
|
3793
3794
|
parent: n,
|
|
3794
3795
|
value: t
|
|
3795
3796
|
});
|
|
3796
|
-
let
|
|
3797
|
-
if (r.innerType ||
|
|
3798
|
-
if (
|
|
3799
|
-
if (t &&
|
|
3797
|
+
let m = r.type === "tuple", h = f ? parseInt(d, 10) : 0;
|
|
3798
|
+
if (r.innerType || m) {
|
|
3799
|
+
if (m && !f) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);
|
|
3800
|
+
if (t && h >= t.length)
|
|
3800
3801
|
throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);
|
|
3801
|
-
n = t, t = t && t[
|
|
3802
|
+
n = t, t = t && t[h], r = m ? r.spec.types[h] : r.innerType;
|
|
3802
3803
|
}
|
|
3803
3804
|
if (!f) {
|
|
3804
3805
|
if (!r.fields || !r.fields[d]) throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${r.type}")`);
|
|
@@ -3999,10 +4000,10 @@ attempted value: ${i}
|
|
|
3999
4000
|
options: f
|
|
4000
4001
|
} = e, d = (j) => {
|
|
4001
4002
|
n || (n = !0, t(j, i));
|
|
4002
|
-
},
|
|
4003
|
+
}, m = (j) => {
|
|
4003
4004
|
n || (n = !0, s(j, i));
|
|
4004
|
-
},
|
|
4005
|
-
if (!
|
|
4005
|
+
}, h = a.length, g = [];
|
|
4006
|
+
if (!h) return m([]);
|
|
4006
4007
|
let k = {
|
|
4007
4008
|
value: i,
|
|
4008
4009
|
originalValue: l,
|
|
@@ -4013,7 +4014,7 @@ attempted value: ${i}
|
|
|
4013
4014
|
for (let j = 0; j < a.length; j++) {
|
|
4014
4015
|
const _ = a[j];
|
|
4015
4016
|
_(k, d, function(p) {
|
|
4016
|
-
p && (Array.isArray(p) ?
|
|
4017
|
+
p && (Array.isArray(p) ? g.push(...p) : g.push(p)), --h <= 0 && m(g);
|
|
4017
4018
|
});
|
|
4018
4019
|
}
|
|
4019
4020
|
}
|
|
@@ -4045,7 +4046,7 @@ attempted value: ${i}
|
|
|
4045
4046
|
[c ? "index" : "key"]: l,
|
|
4046
4047
|
path: c || l.includes(".") ? `${n || ""}[${c ? l : `"${l}"`}]` : (n ? `${n}.` : "") + e
|
|
4047
4048
|
});
|
|
4048
|
-
return (
|
|
4049
|
+
return (m, h, g) => this.resolve(d)._validate(f, d, h, g);
|
|
4049
4050
|
}
|
|
4050
4051
|
validate(e, t) {
|
|
4051
4052
|
var s;
|
|
@@ -4266,7 +4267,7 @@ attempted value: ${i}
|
|
|
4266
4267
|
tests: t.tests.map((c) => ({
|
|
4267
4268
|
name: c.OPTIONS.name,
|
|
4268
4269
|
params: c.OPTIONS.params
|
|
4269
|
-
})).filter((c, f, d) => d.findIndex((
|
|
4270
|
+
})).filter((c, f, d) => d.findIndex((m) => m.name === c.name) === f)
|
|
4270
4271
|
};
|
|
4271
4272
|
}
|
|
4272
4273
|
}
|
|
@@ -4759,30 +4760,30 @@ class Ns extends be {
|
|
|
4759
4760
|
let n = super._cast(e, t);
|
|
4760
4761
|
if (n === void 0) return this.getDefault(t);
|
|
4761
4762
|
if (!this._typeCheck(n)) return n;
|
|
4762
|
-
let a = this.fields, i = (s = t.stripUnknown) != null ? s : this.spec.noUnknown, l = [].concat(this._nodes, Object.keys(n).filter((
|
|
4763
|
+
let a = this.fields, i = (s = t.stripUnknown) != null ? s : this.spec.noUnknown, l = [].concat(this._nodes, Object.keys(n).filter((m) => !this._nodes.includes(m))), c = {}, f = Object.assign({}, t, {
|
|
4763
4764
|
parent: c,
|
|
4764
4765
|
__validating: t.__validating || !1
|
|
4765
4766
|
}), d = !1;
|
|
4766
|
-
for (const
|
|
4767
|
-
let
|
|
4768
|
-
if (
|
|
4769
|
-
let k, j = n[
|
|
4770
|
-
f.path = (t.path ? `${t.path}.` : "") +
|
|
4767
|
+
for (const m of l) {
|
|
4768
|
+
let h = a[m], g = m in n;
|
|
4769
|
+
if (h) {
|
|
4770
|
+
let k, j = n[m];
|
|
4771
|
+
f.path = (t.path ? `${t.path}.` : "") + m, h = h.resolve({
|
|
4771
4772
|
value: j,
|
|
4772
4773
|
context: t.context,
|
|
4773
4774
|
parent: c
|
|
4774
4775
|
});
|
|
4775
|
-
let _ =
|
|
4776
|
+
let _ = h instanceof be ? h.spec : void 0, v = _ == null ? void 0 : _.strict;
|
|
4776
4777
|
if (_ != null && _.strip) {
|
|
4777
|
-
d = d ||
|
|
4778
|
+
d = d || m in n;
|
|
4778
4779
|
continue;
|
|
4779
4780
|
}
|
|
4780
|
-
k = !t.__validating || !
|
|
4781
|
+
k = !t.__validating || !v ? (
|
|
4781
4782
|
// TODO: use _cast, this is double resolving
|
|
4782
|
-
|
|
4783
|
-
) : n[
|
|
4784
|
-
} else
|
|
4785
|
-
(
|
|
4783
|
+
h.cast(n[m], f)
|
|
4784
|
+
) : n[m], k !== void 0 && (c[m] = k);
|
|
4785
|
+
} else g && !i && (c[m] = n[m]);
|
|
4786
|
+
(g !== m in c || c[m] !== n[m]) && (d = !0);
|
|
4786
4787
|
}
|
|
4787
4788
|
return d ? c : n;
|
|
4788
4789
|
}
|
|
@@ -4802,11 +4803,11 @@ class Ns extends be {
|
|
|
4802
4803
|
}
|
|
4803
4804
|
i = i || f;
|
|
4804
4805
|
let d = [];
|
|
4805
|
-
for (let
|
|
4806
|
-
let
|
|
4807
|
-
!
|
|
4806
|
+
for (let m of this._nodes) {
|
|
4807
|
+
let h = this.fields[m];
|
|
4808
|
+
!h || Be.isRef(h) || d.push(h.asNestedTest({
|
|
4808
4809
|
options: t,
|
|
4809
|
-
key:
|
|
4810
|
+
key: m,
|
|
4810
4811
|
parent: f,
|
|
4811
4812
|
parentPath: t.path,
|
|
4812
4813
|
originalParent: i
|
|
@@ -4817,8 +4818,8 @@ class Ns extends be {
|
|
|
4817
4818
|
value: f,
|
|
4818
4819
|
originalValue: i,
|
|
4819
4820
|
options: t
|
|
4820
|
-
}, s, (
|
|
4821
|
-
n(
|
|
4821
|
+
}, s, (m) => {
|
|
4822
|
+
n(m.sort(this._sortErrors).concat(c), f);
|
|
4822
4823
|
});
|
|
4823
4824
|
});
|
|
4824
4825
|
}
|
|
@@ -4982,15 +4983,15 @@ function ai({
|
|
|
4982
4983
|
return Or(e);
|
|
4983
4984
|
const t = {};
|
|
4984
4985
|
r.forEach((n) => {
|
|
4985
|
-
var i, l, c, f, d,
|
|
4986
|
+
var i, l, c, f, d, m, h;
|
|
4986
4987
|
let a;
|
|
4987
4988
|
switch (n.type) {
|
|
4988
4989
|
case "text":
|
|
4989
4990
|
case "password":
|
|
4990
4991
|
case "email":
|
|
4991
4992
|
if (a = vs(), (i = n.validation) != null && i.required) {
|
|
4992
|
-
const
|
|
4993
|
-
a = a.required(
|
|
4993
|
+
const g = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
4994
|
+
a = a.required(g);
|
|
4994
4995
|
}
|
|
4995
4996
|
(l = n.validation) != null && l.minLength && (a = a.min(
|
|
4996
4997
|
n.validation.minLength.value,
|
|
@@ -5005,21 +5006,21 @@ function ai({
|
|
|
5005
5006
|
break;
|
|
5006
5007
|
case "number":
|
|
5007
5008
|
if (a = bs(), (d = n.validation) != null && d.required) {
|
|
5008
|
-
const
|
|
5009
|
-
a = a.required(
|
|
5009
|
+
const g = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5010
|
+
a = a.required(g);
|
|
5010
5011
|
}
|
|
5011
5012
|
break;
|
|
5012
5013
|
case "select":
|
|
5013
5014
|
case "optionGroup":
|
|
5014
|
-
if (a = Rt(), (
|
|
5015
|
-
const
|
|
5016
|
-
a = a.required(
|
|
5015
|
+
if (a = Rt(), (m = n.validation) != null && m.required) {
|
|
5016
|
+
const g = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5017
|
+
a = a.required(g);
|
|
5017
5018
|
}
|
|
5018
5019
|
break;
|
|
5019
5020
|
case "date":
|
|
5020
|
-
if (a = Gt(), (
|
|
5021
|
-
const
|
|
5022
|
-
a = a.required(
|
|
5021
|
+
if (a = Gt(), (h = n.validation) != null && h.required) {
|
|
5022
|
+
const g = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5023
|
+
a = a.required(g);
|
|
5023
5024
|
}
|
|
5024
5025
|
break;
|
|
5025
5026
|
default:
|
|
@@ -5089,11 +5090,11 @@ function _s({
|
|
|
5089
5090
|
hasError: c = !1,
|
|
5090
5091
|
errorMessage: f = "",
|
|
5091
5092
|
maxLength: d,
|
|
5092
|
-
showCounter:
|
|
5093
|
-
className:
|
|
5094
|
-
...
|
|
5093
|
+
showCounter: m = !1,
|
|
5094
|
+
className: h,
|
|
5095
|
+
...g
|
|
5095
5096
|
}) {
|
|
5096
|
-
const k = Ue(), j = e || k, [_,
|
|
5097
|
+
const k = Ue(), j = e || k, [_, v] = Q(s || "");
|
|
5097
5098
|
if (r && e)
|
|
5098
5099
|
return /* @__PURE__ */ o.jsx(
|
|
5099
5100
|
ke,
|
|
@@ -5102,21 +5103,21 @@ function _s({
|
|
|
5102
5103
|
control: r,
|
|
5103
5104
|
rules: t,
|
|
5104
5105
|
defaultValue: s || "",
|
|
5105
|
-
render: ({ field: F, fieldState:
|
|
5106
|
-
var
|
|
5106
|
+
render: ({ field: F, fieldState: D }) => {
|
|
5107
|
+
var O;
|
|
5107
5108
|
return /* @__PURE__ */ o.jsx(
|
|
5108
5109
|
_s,
|
|
5109
5110
|
{
|
|
5110
|
-
...
|
|
5111
|
+
...g,
|
|
5111
5112
|
size: n,
|
|
5112
5113
|
width: a,
|
|
5113
5114
|
label: i,
|
|
5114
5115
|
labelHidden: l,
|
|
5115
|
-
hasError: !!
|
|
5116
|
-
errorMessage: ((
|
|
5116
|
+
hasError: !!D.error,
|
|
5117
|
+
errorMessage: ((O = D.error) == null ? void 0 : O.message) || "",
|
|
5117
5118
|
maxLength: d,
|
|
5118
|
-
showCounter:
|
|
5119
|
-
className:
|
|
5119
|
+
showCounter: m,
|
|
5120
|
+
className: h,
|
|
5120
5121
|
value: F.value,
|
|
5121
5122
|
onChange: F.onChange
|
|
5122
5123
|
}
|
|
@@ -5125,13 +5126,13 @@ function _s({
|
|
|
5125
5126
|
}
|
|
5126
5127
|
);
|
|
5127
5128
|
ue(() => {
|
|
5128
|
-
|
|
5129
|
+
v(s || "");
|
|
5129
5130
|
}, [s]);
|
|
5130
5131
|
const p = (F) => {
|
|
5131
|
-
var
|
|
5132
|
-
d !== void 0 && F.target.value.length > d || (
|
|
5132
|
+
var D;
|
|
5133
|
+
d !== void 0 && F.target.value.length > d || (v(F.target.value), (D = g.onChange) == null || D.call(g, F));
|
|
5133
5134
|
};
|
|
5134
|
-
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col",
|
|
5135
|
+
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", h), style: { width: a }, children: [
|
|
5135
5136
|
i && /* @__PURE__ */ o.jsx(
|
|
5136
5137
|
"label",
|
|
5137
5138
|
{
|
|
@@ -5153,17 +5154,17 @@ function _s({
|
|
|
5153
5154
|
Ir[n],
|
|
5154
5155
|
ci[n],
|
|
5155
5156
|
c ? "border-[var(--color-ds-border-error)]" : "border-[var(--color-ds-border-default)]",
|
|
5156
|
-
|
|
5157
|
+
g.disabled ? "bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed" : "text-[var(--color-ds-text-primary)]"
|
|
5157
5158
|
),
|
|
5158
5159
|
value: _,
|
|
5159
5160
|
onChange: p,
|
|
5160
5161
|
maxLength: d,
|
|
5161
|
-
...
|
|
5162
|
+
...g
|
|
5162
5163
|
}
|
|
5163
5164
|
),
|
|
5164
5165
|
/* @__PURE__ */ o.jsxs("div", { className: "flex justify-between pt-1 min-h-[18px]", children: [
|
|
5165
5166
|
c && f ? /* @__PURE__ */ o.jsx("span", { className: "text-xs text-[var(--color-ds-text-error)]", children: f }) : /* @__PURE__ */ o.jsx("span", { "aria-hidden": "true", children: " " }),
|
|
5166
|
-
|
|
5167
|
+
m && d !== void 0 && /* @__PURE__ */ o.jsxs("span", { className: "text-xs text-[var(--color-ds-text-secondary)]", children: [
|
|
5167
5168
|
_.length,
|
|
5168
5169
|
"/",
|
|
5169
5170
|
d
|
|
@@ -5196,8 +5197,8 @@ function di({
|
|
|
5196
5197
|
control: r,
|
|
5197
5198
|
rules: t,
|
|
5198
5199
|
defaultValue: s,
|
|
5199
|
-
render: ({ field:
|
|
5200
|
-
const
|
|
5200
|
+
render: ({ field: m, fieldState: h }) => {
|
|
5201
|
+
const g = h.error;
|
|
5201
5202
|
return /* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5202
5203
|
/* @__PURE__ */ o.jsx(
|
|
5203
5204
|
"input",
|
|
@@ -5210,8 +5211,8 @@ function di({
|
|
|
5210
5211
|
"border-[var(--color-ds-border-default)]",
|
|
5211
5212
|
i && "opacity-50 cursor-not-allowed"
|
|
5212
5213
|
),
|
|
5213
|
-
checked:
|
|
5214
|
-
onChange: (k) =>
|
|
5214
|
+
checked: m.value,
|
|
5215
|
+
onChange: (k) => m.onChange(k.target.checked),
|
|
5215
5216
|
disabled: i
|
|
5216
5217
|
}
|
|
5217
5218
|
),
|
|
@@ -5225,7 +5226,7 @@ function di({
|
|
|
5225
5226
|
children: n
|
|
5226
5227
|
}
|
|
5227
5228
|
),
|
|
5228
|
-
f && (
|
|
5229
|
+
f && (g == null ? void 0 : g.message) && /* @__PURE__ */ o.jsx("span", { className: "text-xs text-[var(--color-ds-text-error)]", children: g.message })
|
|
5229
5230
|
] });
|
|
5230
5231
|
}
|
|
5231
5232
|
}
|
|
@@ -5240,36 +5241,36 @@ function fi({
|
|
|
5240
5241
|
width: a = "100%",
|
|
5241
5242
|
disabled: i = !1
|
|
5242
5243
|
}) {
|
|
5243
|
-
const [l, c] = Q([]), [f, d] = Q(!1), [
|
|
5244
|
-
if (
|
|
5244
|
+
const [l, c] = Q([]), [f, d] = Q(!1), [m, h] = Q(!1), g = _e(null), k = async (v) => {
|
|
5245
|
+
if (v) {
|
|
5245
5246
|
d(!0);
|
|
5246
5247
|
try {
|
|
5247
|
-
const p = await t(
|
|
5248
|
-
c(p),
|
|
5248
|
+
const p = await t(v);
|
|
5249
|
+
c(p), h(!0);
|
|
5249
5250
|
} finally {
|
|
5250
5251
|
d(!1);
|
|
5251
5252
|
}
|
|
5252
5253
|
}
|
|
5253
5254
|
};
|
|
5254
5255
|
ue(() => {
|
|
5255
|
-
function
|
|
5256
|
-
|
|
5256
|
+
function v(p) {
|
|
5257
|
+
g.current && !g.current.contains(p.target) && h(!1);
|
|
5257
5258
|
}
|
|
5258
|
-
if (
|
|
5259
|
-
return document.addEventListener("mousedown",
|
|
5260
|
-
}, [
|
|
5259
|
+
if (m)
|
|
5260
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
5261
|
+
}, [m]);
|
|
5261
5262
|
const j = n === "sm" ? "text-ds-sm" : n === "md" ? "text-ds-md" : "text-ds-lg", _ = n === "sm" ? "h-6" : n === "md" ? "h-10" : "h-12";
|
|
5262
5263
|
return /* @__PURE__ */ o.jsx(
|
|
5263
5264
|
ke,
|
|
5264
5265
|
{
|
|
5265
5266
|
name: r,
|
|
5266
5267
|
control: e,
|
|
5267
|
-
render: ({ field:
|
|
5268
|
+
render: ({ field: v, fieldState: p }) => {
|
|
5268
5269
|
var F;
|
|
5269
5270
|
return /* @__PURE__ */ o.jsxs(
|
|
5270
5271
|
"div",
|
|
5271
5272
|
{
|
|
5272
|
-
ref:
|
|
5273
|
+
ref: g,
|
|
5273
5274
|
className: "relative flex flex-col",
|
|
5274
5275
|
style: { width: a },
|
|
5275
5276
|
children: [
|
|
@@ -5287,8 +5288,8 @@ function fi({
|
|
|
5287
5288
|
type: "text",
|
|
5288
5289
|
size: n,
|
|
5289
5290
|
width: "100%",
|
|
5290
|
-
value:
|
|
5291
|
-
onChange: (
|
|
5291
|
+
value: v.value,
|
|
5292
|
+
onChange: (D) => v.onChange(D.target.value),
|
|
5292
5293
|
disabled: i,
|
|
5293
5294
|
hasError: p.invalid,
|
|
5294
5295
|
errorMessage: (F = p.error) == null ? void 0 : F.message,
|
|
@@ -5299,7 +5300,7 @@ function fi({
|
|
|
5299
5300
|
className: "!rounded-l-none",
|
|
5300
5301
|
size: n,
|
|
5301
5302
|
variant: "primary",
|
|
5302
|
-
onClick: () => k(
|
|
5303
|
+
onClick: () => k(v.value),
|
|
5303
5304
|
disabled: i,
|
|
5304
5305
|
children: "Buscar"
|
|
5305
5306
|
}
|
|
@@ -5327,7 +5328,7 @@ function fi({
|
|
|
5327
5328
|
)
|
|
5328
5329
|
}
|
|
5329
5330
|
),
|
|
5330
|
-
|
|
5331
|
+
m && !f && l.length > 0 && /* @__PURE__ */ o.jsx(
|
|
5331
5332
|
"ul",
|
|
5332
5333
|
{
|
|
5333
5334
|
className: `
|
|
@@ -5345,7 +5346,7 @@ function fi({
|
|
|
5345
5346
|
overflow-auto
|
|
5346
5347
|
z-10
|
|
5347
5348
|
`,
|
|
5348
|
-
children: l.map((
|
|
5349
|
+
children: l.map((D) => /* @__PURE__ */ o.jsx(
|
|
5349
5350
|
"li",
|
|
5350
5351
|
{
|
|
5351
5352
|
className: `
|
|
@@ -5358,11 +5359,11 @@ function fi({
|
|
|
5358
5359
|
|
|
5359
5360
|
`,
|
|
5360
5361
|
onClick: () => {
|
|
5361
|
-
|
|
5362
|
+
v.onChange(D.value), h(!1);
|
|
5362
5363
|
},
|
|
5363
|
-
children:
|
|
5364
|
+
children: D.label
|
|
5364
5365
|
},
|
|
5365
|
-
|
|
5366
|
+
D.value
|
|
5366
5367
|
))
|
|
5367
5368
|
}
|
|
5368
5369
|
)
|
|
@@ -5384,11 +5385,11 @@ function _i({ schema: r }) {
|
|
|
5384
5385
|
defaultValues: l,
|
|
5385
5386
|
loadDefaultValues: c,
|
|
5386
5387
|
validationSchema: f
|
|
5387
|
-
} = r, { show: d } = ja(), { t:
|
|
5388
|
+
} = r, { show: d } = ja(), { t: m } = qt(), h = ai({
|
|
5388
5389
|
fields: t,
|
|
5389
5390
|
explicitSchema: f
|
|
5390
|
-
}),
|
|
5391
|
-
resolver:
|
|
5391
|
+
}), g = Rn({
|
|
5392
|
+
resolver: h,
|
|
5392
5393
|
mode: "onBlur",
|
|
5393
5394
|
reValidateMode: "onChange",
|
|
5394
5395
|
defaultValues: l ?? {}
|
|
@@ -5396,37 +5397,37 @@ function _i({ schema: r }) {
|
|
|
5396
5397
|
control: k,
|
|
5397
5398
|
reset: j,
|
|
5398
5399
|
watch: _,
|
|
5399
|
-
handleSubmit:
|
|
5400
|
+
handleSubmit: v,
|
|
5400
5401
|
formState: { errors: p, isSubmitting: F }
|
|
5401
|
-
} =
|
|
5402
|
+
} = g, [D, O] = Q(!1);
|
|
5402
5403
|
ue(() => {
|
|
5403
|
-
c && (
|
|
5404
|
+
c && (O(!0), c().then((A) => j(A)).finally(() => O(!1)));
|
|
5404
5405
|
}, [c, j]);
|
|
5405
|
-
const { loadingCount:
|
|
5406
|
-
const
|
|
5407
|
-
return e.forEach((b,
|
|
5408
|
-
b.type === "tabs" && (
|
|
5409
|
-
}),
|
|
5410
|
-
}, [e]), [M,
|
|
5411
|
-
(
|
|
5412
|
-
const b = _(), { watchField:
|
|
5406
|
+
const { loadingCount: B, optionsMap: Y } = oi(t), P = ii(t), W = li(t, k), Z = Me(() => {
|
|
5407
|
+
const A = {};
|
|
5408
|
+
return e.forEach((b, z) => {
|
|
5409
|
+
b.type === "tabs" && (A[z] = b.tabs[0].key);
|
|
5410
|
+
}), A;
|
|
5411
|
+
}, [e]), [M, L] = Q(Z), E = Tt(
|
|
5412
|
+
(A) => {
|
|
5413
|
+
const b = _(), { watchField: z, watchValue: re } = A;
|
|
5413
5414
|
return typeof re == "function" ? re(
|
|
5414
5415
|
b
|
|
5415
|
-
) : b[
|
|
5416
|
+
) : b[z] === re;
|
|
5416
5417
|
},
|
|
5417
5418
|
[_]
|
|
5418
5419
|
), V = Tt(
|
|
5419
|
-
(
|
|
5420
|
+
(A) => {
|
|
5420
5421
|
var U, G, ee, ae;
|
|
5421
5422
|
let b;
|
|
5422
|
-
if (typeof
|
|
5423
|
-
if (b =
|
|
5423
|
+
if (typeof A == "string") {
|
|
5424
|
+
if (b = P[A], !b) return null;
|
|
5424
5425
|
} else
|
|
5425
|
-
b =
|
|
5426
|
+
b = A;
|
|
5426
5427
|
if ("visibleWhen" in b && b.visibleWhen && !E(b.visibleWhen))
|
|
5427
5428
|
return null;
|
|
5428
|
-
let
|
|
5429
|
-
if ("disabledWhen" in b && b.disabledWhen && E(b.disabledWhen) && (
|
|
5429
|
+
let z = !!b.disabled;
|
|
5430
|
+
if ("disabledWhen" in b && b.disabledWhen && E(b.disabledWhen) && (z = !0), !z && "name" in b && b.name && W[b.name] && (z = !0), b.type === "search")
|
|
5430
5431
|
return /* @__PURE__ */ o.jsx(
|
|
5431
5432
|
fi,
|
|
5432
5433
|
{
|
|
@@ -5436,74 +5437,74 @@ function _i({ schema: r }) {
|
|
|
5436
5437
|
label: b.label,
|
|
5437
5438
|
size: b.size,
|
|
5438
5439
|
width: b.width,
|
|
5439
|
-
disabled:
|
|
5440
|
+
disabled: z || F
|
|
5440
5441
|
},
|
|
5441
5442
|
b.name
|
|
5442
5443
|
);
|
|
5443
5444
|
if (b.type === "inputGroup") {
|
|
5444
|
-
const
|
|
5445
|
+
const q = b, le = q.inputs.map((ce) => {
|
|
5445
5446
|
var Ze;
|
|
5446
|
-
const
|
|
5447
|
-
if (!
|
|
5448
|
-
let de = !!
|
|
5449
|
-
|
|
5447
|
+
const H = typeof ce == "string" ? P[ce] : ce;
|
|
5448
|
+
if (!H) return null;
|
|
5449
|
+
let de = !!H.disabled;
|
|
5450
|
+
H.disabledWhen && E(H.disabledWhen) && (de = !0), !de && W[H.name] && (de = !0);
|
|
5450
5451
|
const Fe = {
|
|
5451
|
-
name:
|
|
5452
|
+
name: H.name,
|
|
5452
5453
|
control: k,
|
|
5453
|
-
rules:
|
|
5454
|
+
rules: H.validation,
|
|
5454
5455
|
defaultValue: void 0,
|
|
5455
|
-
label:
|
|
5456
|
-
size:
|
|
5457
|
-
width:
|
|
5458
|
-
placeholder:
|
|
5459
|
-
hasError: !!p[
|
|
5460
|
-
errorMessage: ((Ze = p[
|
|
5461
|
-
loading:
|
|
5456
|
+
label: H.label,
|
|
5457
|
+
size: H.size,
|
|
5458
|
+
width: H.width,
|
|
5459
|
+
placeholder: H.placeholder,
|
|
5460
|
+
hasError: !!p[H.name],
|
|
5461
|
+
errorMessage: ((Ze = p[H.name]) == null ? void 0 : Ze.message) || "",
|
|
5462
|
+
loading: D,
|
|
5462
5463
|
disabled: de,
|
|
5463
|
-
suffixButton:
|
|
5464
|
+
suffixButton: H.suffixButton
|
|
5464
5465
|
};
|
|
5465
|
-
return
|
|
5466
|
+
return H.type === "select" ? {
|
|
5466
5467
|
...Fe,
|
|
5467
|
-
options:
|
|
5468
|
-
loadOptions:
|
|
5468
|
+
options: H.options ?? Y[H.name] ?? [],
|
|
5469
|
+
loadOptions: H.options ? void 0 : H.loadOptions
|
|
5469
5470
|
} : Fe;
|
|
5470
5471
|
}).filter((ce) => ce !== null);
|
|
5471
5472
|
return /* @__PURE__ */ o.jsx(
|
|
5472
5473
|
da,
|
|
5473
5474
|
{
|
|
5474
|
-
groupLabel:
|
|
5475
|
+
groupLabel: q.groupLabel,
|
|
5475
5476
|
inputs: le,
|
|
5476
|
-
separator:
|
|
5477
|
-
useSeparator:
|
|
5478
|
-
className:
|
|
5479
|
-
showVisibleLabel:
|
|
5480
|
-
size:
|
|
5477
|
+
separator: q.separator,
|
|
5478
|
+
useSeparator: q.useSeparator,
|
|
5479
|
+
className: q.className,
|
|
5480
|
+
showVisibleLabel: q.showVisibleLabel,
|
|
5481
|
+
size: q.size
|
|
5481
5482
|
},
|
|
5482
|
-
`inputGroup_${
|
|
5483
|
+
`inputGroup_${q.groupLabel}`
|
|
5483
5484
|
);
|
|
5484
5485
|
}
|
|
5485
5486
|
if (b.type === "button") {
|
|
5486
|
-
const
|
|
5487
|
+
const q = b;
|
|
5487
5488
|
return /* @__PURE__ */ o.jsx("div", { className: "self-center", children: /* @__PURE__ */ o.jsx(
|
|
5488
5489
|
Ve,
|
|
5489
5490
|
{
|
|
5490
5491
|
type: "button",
|
|
5491
|
-
variant:
|
|
5492
|
-
size:
|
|
5493
|
-
width:
|
|
5494
|
-
icon:
|
|
5495
|
-
iconPosition:
|
|
5496
|
-
ariaLabel:
|
|
5497
|
-
onClick:
|
|
5498
|
-
disabled:
|
|
5499
|
-
children:
|
|
5492
|
+
variant: q.variant,
|
|
5493
|
+
size: q.size,
|
|
5494
|
+
width: q.width,
|
|
5495
|
+
icon: q.icon,
|
|
5496
|
+
iconPosition: q.iconPosition,
|
|
5497
|
+
ariaLabel: q.ariaLabel,
|
|
5498
|
+
onClick: q.onClick,
|
|
5499
|
+
disabled: z || F,
|
|
5500
|
+
children: q.label
|
|
5500
5501
|
}
|
|
5501
|
-
) },
|
|
5502
|
+
) }, q.name);
|
|
5502
5503
|
}
|
|
5503
5504
|
const re = b.suffixButton, ie = typeof re == "string" ? V(re) : re, w = {
|
|
5504
5505
|
name: b.name,
|
|
5505
5506
|
control: k,
|
|
5506
|
-
disabled:
|
|
5507
|
+
disabled: z || F,
|
|
5507
5508
|
label: b.label,
|
|
5508
5509
|
size: b.size,
|
|
5509
5510
|
width: b.width,
|
|
@@ -5518,15 +5519,15 @@ function _i({ schema: r }) {
|
|
|
5518
5519
|
{
|
|
5519
5520
|
name: b.name,
|
|
5520
5521
|
control: k,
|
|
5521
|
-
render: ({ field:
|
|
5522
|
+
render: ({ field: q }) => {
|
|
5522
5523
|
var le;
|
|
5523
5524
|
return /* @__PURE__ */ o.jsx(
|
|
5524
5525
|
pt,
|
|
5525
5526
|
{
|
|
5526
5527
|
...w,
|
|
5527
|
-
value:
|
|
5528
|
-
onChange:
|
|
5529
|
-
options: b.options ??
|
|
5528
|
+
value: q.value,
|
|
5529
|
+
onChange: q.onChange,
|
|
5530
|
+
options: b.options ?? Y[b.name] ?? [],
|
|
5530
5531
|
loadOptions: b.options ? void 0 : b.loadOptions,
|
|
5531
5532
|
hasError: !!p[b.name],
|
|
5532
5533
|
errorMessage: (le = p[b.name]) == null ? void 0 : le.message,
|
|
@@ -5543,14 +5544,14 @@ function _i({ schema: r }) {
|
|
|
5543
5544
|
{
|
|
5544
5545
|
name: b.name,
|
|
5545
5546
|
control: k,
|
|
5546
|
-
render: ({ field:
|
|
5547
|
+
render: ({ field: q, fieldState: le }) => {
|
|
5547
5548
|
var ce;
|
|
5548
5549
|
return /* @__PURE__ */ o.jsx(
|
|
5549
5550
|
_s,
|
|
5550
5551
|
{
|
|
5551
5552
|
...w,
|
|
5552
|
-
value:
|
|
5553
|
-
onChange:
|
|
5553
|
+
value: q.value,
|
|
5554
|
+
onChange: q.onChange,
|
|
5554
5555
|
maxLength: b.maxLength,
|
|
5555
5556
|
showCounter: !!b.showCounter,
|
|
5556
5557
|
hasError: !!le.error,
|
|
@@ -5619,7 +5620,7 @@ function _i({ schema: r }) {
|
|
|
5619
5620
|
{
|
|
5620
5621
|
...w,
|
|
5621
5622
|
type: b.type,
|
|
5622
|
-
loadingDefaults:
|
|
5623
|
+
loadingDefaults: D,
|
|
5623
5624
|
hasError: !!p[b.name],
|
|
5624
5625
|
errorMessage: (ae = p[b.name]) == null ? void 0 : ae.message,
|
|
5625
5626
|
suffixButton: ie,
|
|
@@ -5630,37 +5631,37 @@ function _i({ schema: r }) {
|
|
|
5630
5631
|
}
|
|
5631
5632
|
},
|
|
5632
5633
|
[
|
|
5633
|
-
|
|
5634
|
+
P,
|
|
5634
5635
|
k,
|
|
5635
5636
|
p,
|
|
5636
5637
|
F,
|
|
5637
|
-
|
|
5638
|
-
|
|
5638
|
+
D,
|
|
5639
|
+
Y,
|
|
5639
5640
|
E,
|
|
5640
|
-
|
|
5641
|
+
W
|
|
5641
5642
|
]
|
|
5642
5643
|
);
|
|
5643
|
-
return /* @__PURE__ */ o.jsx(wn, { ...
|
|
5644
|
+
return /* @__PURE__ */ o.jsx(wn, { ...g, children: /* @__PURE__ */ o.jsxs(
|
|
5644
5645
|
"form",
|
|
5645
5646
|
{
|
|
5646
5647
|
noValidate: !0,
|
|
5647
|
-
onSubmit:
|
|
5648
|
-
async (
|
|
5649
|
-
await s(
|
|
5648
|
+
onSubmit: v(
|
|
5649
|
+
async (A) => {
|
|
5650
|
+
await s(A), d(n ?? m("ds.form.saveSuccess"), "success");
|
|
5650
5651
|
},
|
|
5651
|
-
(
|
|
5652
|
-
ma(
|
|
5652
|
+
(A) => {
|
|
5653
|
+
console.log("❌ errores de validación:", A), ma(A), d(a ?? m("ds.form.saveError"), "error");
|
|
5653
5654
|
}
|
|
5654
5655
|
),
|
|
5655
5656
|
className: "space-y-6",
|
|
5656
5657
|
children: [
|
|
5657
5658
|
e.map(
|
|
5658
|
-
(
|
|
5659
|
+
(A, b) => A.type === "rows" ? /* @__PURE__ */ o.jsx(X.Fragment, { children: A.sections.map((z, re) => /* @__PURE__ */ o.jsx("div", { className: "mb-6", children: /* @__PURE__ */ o.jsx(
|
|
5659
5660
|
ir,
|
|
5660
5661
|
{
|
|
5661
|
-
title:
|
|
5662
|
-
defaultOpen:
|
|
5663
|
-
children:
|
|
5662
|
+
title: z.sectionTitle,
|
|
5663
|
+
defaultOpen: z.defaultOpen,
|
|
5664
|
+
children: z.rows.map((ie, w) => /* @__PURE__ */ o.jsxs("div", { children: [
|
|
5664
5665
|
ie.title && /* @__PURE__ */ o.jsx("h2", { className: "mb-2 text-lg text-[var(--color-ds-text-primary)]", children: ie.title }),
|
|
5665
5666
|
/* @__PURE__ */ o.jsx("div", { className: "flex flex-wrap -mx-2", children: ie.columns.map((U, G) => {
|
|
5666
5667
|
var ee;
|
|
@@ -5668,21 +5669,21 @@ function _i({ schema: r }) {
|
|
|
5668
5669
|
"div",
|
|
5669
5670
|
{
|
|
5670
5671
|
className: `${U.width} px-2 flex flex-col`,
|
|
5671
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: U.fields ? U.fields.map((ae) => V(ae)) : (ee = U.rows) == null ? void 0 : ee.map((ae,
|
|
5672
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: U.fields ? U.fields.map((ae) => V(ae)) : (ee = U.rows) == null ? void 0 : ee.map((ae, q) => /* @__PURE__ */ o.jsx("div", { className: "mb-1", children: /* @__PURE__ */ o.jsx("div", { className: "flex flex-wrap -mx-2", children: ae.columns.map(
|
|
5672
5673
|
(le, ce) => {
|
|
5673
|
-
var
|
|
5674
|
+
var H;
|
|
5674
5675
|
return /* @__PURE__ */ o.jsx(
|
|
5675
5676
|
"div",
|
|
5676
5677
|
{
|
|
5677
5678
|
className: `${le.width} px-2`,
|
|
5678
|
-
children: (
|
|
5679
|
+
children: (H = le.fields) == null ? void 0 : H.map(
|
|
5679
5680
|
(de) => V(de)
|
|
5680
5681
|
)
|
|
5681
5682
|
},
|
|
5682
5683
|
ce
|
|
5683
5684
|
);
|
|
5684
5685
|
}
|
|
5685
|
-
) }) },
|
|
5686
|
+
) }) }, q)) })
|
|
5686
5687
|
},
|
|
5687
5688
|
G
|
|
5688
5689
|
);
|
|
@@ -5692,13 +5693,13 @@ function _i({ schema: r }) {
|
|
|
5692
5693
|
) }, re)) }, b) : /* @__PURE__ */ o.jsx(
|
|
5693
5694
|
la,
|
|
5694
5695
|
{
|
|
5695
|
-
options:
|
|
5696
|
+
options: A.tabs.map((z) => ({ label: z.label, value: z.key })),
|
|
5696
5697
|
value: M[b],
|
|
5697
|
-
onChange: (
|
|
5698
|
+
onChange: (z) => L((re) => ({ ...re, [b]: z })),
|
|
5698
5699
|
children: Object.fromEntries(
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
/* @__PURE__ */ o.jsx("div", { className: "space-y-6", children:
|
|
5700
|
+
A.tabs.map((z) => [
|
|
5701
|
+
z.key,
|
|
5702
|
+
/* @__PURE__ */ o.jsx("div", { className: "space-y-6", children: z.sections.map((re, ie) => /* @__PURE__ */ o.jsx("div", { className: "mb-6", children: /* @__PURE__ */ o.jsx(
|
|
5702
5703
|
ir,
|
|
5703
5704
|
{
|
|
5704
5705
|
title: re.sectionTitle,
|
|
@@ -5709,13 +5710,13 @@ function _i({ schema: r }) {
|
|
|
5709
5710
|
"div",
|
|
5710
5711
|
{
|
|
5711
5712
|
className: `${G.width ?? "flex-1"} px-2 flex flex-col`,
|
|
5712
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: (ae = G.fields) == null ? void 0 : ae.map((
|
|
5713
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: (ae = G.fields) == null ? void 0 : ae.map((q, le) => /* @__PURE__ */ o.jsx(X.Fragment, { children: V(q) }, le)) })
|
|
5713
5714
|
},
|
|
5714
5715
|
ee
|
|
5715
5716
|
);
|
|
5716
5717
|
}) }) }, U))
|
|
5717
5718
|
}
|
|
5718
|
-
) }, ie)) },
|
|
5719
|
+
) }, ie)) }, z.key)
|
|
5719
5720
|
])
|
|
5720
5721
|
)
|
|
5721
5722
|
},
|
|
@@ -5729,8 +5730,8 @@ function _i({ schema: r }) {
|
|
|
5729
5730
|
variant: "primary",
|
|
5730
5731
|
icon: Hs,
|
|
5731
5732
|
size: "sm",
|
|
5732
|
-
disabled: F ||
|
|
5733
|
-
children:
|
|
5733
|
+
disabled: F || D || B > 0,
|
|
5734
|
+
children: m(F ? "ds.form.sending" : "ds.form.submit")
|
|
5734
5735
|
}
|
|
5735
5736
|
) })
|
|
5736
5737
|
]
|
|
@@ -5865,8 +5866,8 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5865
5866
|
profileOptions: c,
|
|
5866
5867
|
onChangeProfile: f
|
|
5867
5868
|
}) => {
|
|
5868
|
-
const d = r.slice(0, 3), { toggle:
|
|
5869
|
-
|
|
5869
|
+
const d = r.slice(0, 3), { toggle: m } = Ss(), { t: h, i18n: g } = qt(), k = (j) => {
|
|
5870
|
+
g.changeLanguage(j), i(j);
|
|
5870
5871
|
};
|
|
5871
5872
|
return /* @__PURE__ */ o.jsxs("header", { className: "flex items-center bg-[var(--color-ds-background-page)] py-2", children: [
|
|
5872
5873
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -5875,7 +5876,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5875
5876
|
{
|
|
5876
5877
|
icon: hn,
|
|
5877
5878
|
size: "sm",
|
|
5878
|
-
ariaLabel:
|
|
5879
|
+
ariaLabel: h("back"),
|
|
5879
5880
|
onClick: t
|
|
5880
5881
|
}
|
|
5881
5882
|
),
|
|
@@ -5884,7 +5885,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5884
5885
|
{
|
|
5885
5886
|
icon: gn,
|
|
5886
5887
|
size: "sm",
|
|
5887
|
-
ariaLabel:
|
|
5888
|
+
ariaLabel: h("clearPins"),
|
|
5888
5889
|
onClick: () => r.forEach((j) => e(j.id))
|
|
5889
5890
|
}
|
|
5890
5891
|
),
|
|
@@ -5908,7 +5909,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5908
5909
|
{
|
|
5909
5910
|
icon: Pt,
|
|
5910
5911
|
size: "sm",
|
|
5911
|
-
ariaLabel: `${
|
|
5912
|
+
ariaLabel: `${h("remove")} ${j.label}`,
|
|
5912
5913
|
onClick: () => e(j.id)
|
|
5913
5914
|
}
|
|
5914
5915
|
)
|
|
@@ -5938,7 +5939,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5938
5939
|
disableErrorPlaceholder: !0
|
|
5939
5940
|
}
|
|
5940
5941
|
),
|
|
5941
|
-
/* @__PURE__ */ o.jsx(mi, { dark: s, onToggle:
|
|
5942
|
+
/* @__PURE__ */ o.jsx(mi, { dark: s, onToggle: m })
|
|
5942
5943
|
] })
|
|
5943
5944
|
] });
|
|
5944
5945
|
}, Si = ({
|
|
@@ -6043,7 +6044,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
6043
6044
|
s === 0 ? (c.clear(), n.has(l) || c.add(l)) : c.has(l) ? c.delete(l) : c.add(l), a(c), t(l);
|
|
6044
6045
|
};
|
|
6045
6046
|
return /* @__PURE__ */ o.jsx("ul", { className: $(s > 0 ? "mt-1" : "mt-0"), children: r.map((l) => {
|
|
6046
|
-
const c = l.value === e, f = n.has(l.value), d = ["pl-2", "pl-2", "pl-2"][s] || "pl-4",
|
|
6047
|
+
const c = l.value === e, f = n.has(l.value), d = ["pl-2", "pl-2", "pl-2"][s] || "pl-4", m = s === 0 ? f || c ? "bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg" : "text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]" : c ? "bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]" : "text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]", h = s === 0 && (f || c) ? "text-[var(--color-ds-text-on-accent)]" : "text-[var(--color-ds-text-secondary)]";
|
|
6047
6048
|
return /* @__PURE__ */ o.jsxs("li", { children: [
|
|
6048
6049
|
/* @__PURE__ */ o.jsxs(
|
|
6049
6050
|
"button",
|
|
@@ -6052,14 +6053,14 @@ const Ss = () => It(Fs), xi = ({
|
|
|
6052
6053
|
className: $(
|
|
6053
6054
|
"w-full flex items-center justify-between h-8 transition-colors",
|
|
6054
6055
|
d,
|
|
6055
|
-
|
|
6056
|
+
m
|
|
6056
6057
|
),
|
|
6057
6058
|
children: [
|
|
6058
6059
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
6059
6060
|
s === 0 && l.icon && /* @__PURE__ */ o.jsx(l.icon, { className: "w-5 h-5 ml-2" }),
|
|
6060
6061
|
/* @__PURE__ */ o.jsx("span", { className: "text-ds-sm", children: l.label })
|
|
6061
6062
|
] }),
|
|
6062
|
-
l.children && (f ? /* @__PURE__ */ o.jsx(Zr, { className: $("w-4 h-4 ",
|
|
6063
|
+
l.children && (f ? /* @__PURE__ */ o.jsx(Zr, { className: $("w-4 h-4 ", h) }) : /* @__PURE__ */ o.jsx(Xs, { className: $("w-4 h-4", h) }))
|
|
6063
6064
|
]
|
|
6064
6065
|
}
|
|
6065
6066
|
),
|
|
@@ -6149,49 +6150,49 @@ function Ci({
|
|
|
6149
6150
|
onSort: c,
|
|
6150
6151
|
className: f
|
|
6151
6152
|
}) {
|
|
6152
|
-
const [d,
|
|
6153
|
+
const [d, m] = Q(e), [h, g] = Q(!!t);
|
|
6153
6154
|
ue(() => {
|
|
6154
|
-
t && (
|
|
6155
|
+
t && (g(!0), t().then((E) => m(E)).finally(() => g(!1)));
|
|
6155
6156
|
}, [t]);
|
|
6156
|
-
const [k, j] = Q(/* @__PURE__ */ new Set()), [_,
|
|
6157
|
+
const [k, j] = Q(/* @__PURE__ */ new Set()), [_, v] = Q(1), [p, F] = Q(
|
|
6157
6158
|
l == null ? void 0 : l.sortBy
|
|
6158
|
-
), [
|
|
6159
|
+
), [D, O] = Q(
|
|
6159
6160
|
(l == null ? void 0 : l.sortDir) ?? "asc"
|
|
6160
|
-
),
|
|
6161
|
+
), B = Me(() => {
|
|
6161
6162
|
if (!p) return [...d];
|
|
6162
|
-
const E =
|
|
6163
|
-
return [...d].sort((V,
|
|
6164
|
-
const b = V[p],
|
|
6165
|
-
return b == null ? -E :
|
|
6163
|
+
const E = D === "asc" ? 1 : -1;
|
|
6164
|
+
return [...d].sort((V, A) => {
|
|
6165
|
+
const b = V[p], z = A[p];
|
|
6166
|
+
return b == null ? -E : z == null || b > z ? E : b < z ? -E : 0;
|
|
6166
6167
|
});
|
|
6167
|
-
}, [d, p,
|
|
6168
|
+
}, [d, p, D]), Y = Math.max(1, Math.ceil(B.length / i)), P = Me(() => {
|
|
6168
6169
|
const E = (_ - 1) * i;
|
|
6169
|
-
return
|
|
6170
|
-
}, [
|
|
6170
|
+
return B.slice(E, E + i);
|
|
6171
|
+
}, [B, _, i]), W = (E) => {
|
|
6171
6172
|
const V = new Set(k);
|
|
6172
|
-
V.has(E) ? V.delete(E) : V.add(E), j(V), a == null || a(d.filter((
|
|
6173
|
-
},
|
|
6174
|
-
const E =
|
|
6175
|
-
E ?
|
|
6173
|
+
V.has(E) ? V.delete(E) : V.add(E), j(V), a == null || a(d.filter((A) => V.has(A[s])));
|
|
6174
|
+
}, Z = () => {
|
|
6175
|
+
const E = P.every((A) => k.has(A[s])), V = new Set(k);
|
|
6176
|
+
E ? P.forEach((A) => V.delete(A[s])) : P.forEach((A) => V.add(A[s])), j(V), a == null || a(d.filter((A) => V.has(A[s])));
|
|
6176
6177
|
}, M = (E) => {
|
|
6177
6178
|
const V = typeof E.accessor == "string" ? E.accessor : E.sortKey;
|
|
6178
6179
|
if (p === V) {
|
|
6179
|
-
const
|
|
6180
|
-
|
|
6180
|
+
const A = D === "asc" ? "desc" : "asc";
|
|
6181
|
+
O(A), c == null || c(V, A);
|
|
6181
6182
|
} else
|
|
6182
|
-
F(V),
|
|
6183
|
-
|
|
6184
|
-
},
|
|
6183
|
+
F(V), O("asc"), c == null || c(V, "asc");
|
|
6184
|
+
v(1);
|
|
6185
|
+
}, L = () => h ? /* @__PURE__ */ o.jsx("tbody", { children: Array.from({ length: i }).map((E, V) => /* @__PURE__ */ o.jsxs("tr", { children: [
|
|
6185
6186
|
n && /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(He, { width: "1rem", height: "1rem", variant: "circle" }) }),
|
|
6186
|
-
r.map((
|
|
6187
|
-
] }, V)) }) :
|
|
6187
|
+
r.map((A, b) => /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(He, { width: "100%", height: "1em", variant: "rect" }) }, b))
|
|
6188
|
+
] }, V)) }) : P.length === 0 ? /* @__PURE__ */ o.jsx("tbody", { children: /* @__PURE__ */ o.jsx("tr", { children: /* @__PURE__ */ o.jsx(
|
|
6188
6189
|
"td",
|
|
6189
6190
|
{
|
|
6190
6191
|
colSpan: n ? r.length + 1 : r.length,
|
|
6191
6192
|
className: "px-4 py-8 text-center text-gray-500",
|
|
6192
6193
|
children: "No hay datos"
|
|
6193
6194
|
}
|
|
6194
|
-
) }) }) : /* @__PURE__ */ o.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children:
|
|
6195
|
+
) }) }) : /* @__PURE__ */ o.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: P.map((E) => {
|
|
6195
6196
|
const V = E[s];
|
|
6196
6197
|
return /* @__PURE__ */ o.jsxs("tr", { className: "hover:bg-gray-50", children: [
|
|
6197
6198
|
n && /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(
|
|
@@ -6199,16 +6200,16 @@ function Ci({
|
|
|
6199
6200
|
{
|
|
6200
6201
|
type: "checkbox",
|
|
6201
6202
|
checked: k.has(V),
|
|
6202
|
-
onChange: () =>
|
|
6203
|
+
onChange: () => W(V)
|
|
6203
6204
|
}
|
|
6204
6205
|
) }),
|
|
6205
|
-
r.map((
|
|
6206
|
-
const
|
|
6206
|
+
r.map((A, b) => {
|
|
6207
|
+
const z = A.render ? A.render(E) : typeof A.accessor == "function" ? A.accessor(E) : E[A.accessor];
|
|
6207
6208
|
return /* @__PURE__ */ o.jsx(
|
|
6208
6209
|
"td",
|
|
6209
6210
|
{
|
|
6210
6211
|
className: "px-4 py-2 whitespace-nowrap text-sm text-gray-800",
|
|
6211
|
-
children:
|
|
6212
|
+
children: z
|
|
6212
6213
|
},
|
|
6213
6214
|
b
|
|
6214
6215
|
);
|
|
@@ -6222,12 +6223,12 @@ function Ci({
|
|
|
6222
6223
|
"input",
|
|
6223
6224
|
{
|
|
6224
6225
|
type: "checkbox",
|
|
6225
|
-
checked:
|
|
6226
|
-
onChange:
|
|
6226
|
+
checked: P.length > 0 && P.every((E) => k.has(E[s])),
|
|
6227
|
+
onChange: Z
|
|
6227
6228
|
}
|
|
6228
6229
|
) }),
|
|
6229
6230
|
r.map((E) => {
|
|
6230
|
-
const V = typeof E.accessor == "string" ? E.accessor : E.header,
|
|
6231
|
+
const V = typeof E.accessor == "string" ? E.accessor : E.header, A = E.sortable && !!E.accessor, b = p === E.accessor;
|
|
6231
6232
|
return /* @__PURE__ */ o.jsx(
|
|
6232
6233
|
"th",
|
|
6233
6234
|
{
|
|
@@ -6235,28 +6236,28 @@ function Ci({
|
|
|
6235
6236
|
"px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
6236
6237
|
E.width
|
|
6237
6238
|
),
|
|
6238
|
-
onClick: () =>
|
|
6239
|
+
onClick: () => A && M(E),
|
|
6239
6240
|
children: /* @__PURE__ */ o.jsxs("div", { className: "inline-flex items-center space-x-1 cursor-pointer select-none", children: [
|
|
6240
6241
|
/* @__PURE__ */ o.jsx("span", { children: E.header }),
|
|
6241
|
-
|
|
6242
|
+
A && /* @__PURE__ */ o.jsx("span", { className: "text-xs", children: b ? D === "asc" ? "▲" : "▼" : "⇵" })
|
|
6242
6243
|
] })
|
|
6243
6244
|
},
|
|
6244
6245
|
V
|
|
6245
6246
|
);
|
|
6246
6247
|
})
|
|
6247
6248
|
] }) }),
|
|
6248
|
-
|
|
6249
|
+
L()
|
|
6249
6250
|
] }),
|
|
6250
6251
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between py-2 px-4", children: [
|
|
6251
|
-
/* @__PURE__ */ o.jsx("div", { className: "text-sm text-gray-700", children:
|
|
6252
|
+
/* @__PURE__ */ o.jsx("div", { className: "text-sm text-gray-700", children: h ? "Cargando datos..." : `Página ${_} de ${Y}` }),
|
|
6252
6253
|
/* @__PURE__ */ o.jsxs("div", { className: "space-x-2", children: [
|
|
6253
6254
|
/* @__PURE__ */ o.jsx(
|
|
6254
6255
|
Ve,
|
|
6255
6256
|
{
|
|
6256
6257
|
size: "sm",
|
|
6257
6258
|
variant: "outline",
|
|
6258
|
-
disabled:
|
|
6259
|
-
onClick: () =>
|
|
6259
|
+
disabled: h || _ <= 1,
|
|
6260
|
+
onClick: () => v((E) => Math.max(1, E - 1)),
|
|
6260
6261
|
children: "Prev"
|
|
6261
6262
|
}
|
|
6262
6263
|
),
|
|
@@ -6265,8 +6266,8 @@ function Ci({
|
|
|
6265
6266
|
{
|
|
6266
6267
|
size: "sm",
|
|
6267
6268
|
variant: "outline",
|
|
6268
|
-
disabled:
|
|
6269
|
-
onClick: () =>
|
|
6269
|
+
disabled: h || _ >= Y,
|
|
6270
|
+
onClick: () => v((E) => Math.min(Y, E + 1)),
|
|
6270
6271
|
children: "Next"
|
|
6271
6272
|
}
|
|
6272
6273
|
)
|
|
@@ -6287,7 +6288,7 @@ function yi({
|
|
|
6287
6288
|
errorMessage: f = "",
|
|
6288
6289
|
className: d
|
|
6289
6290
|
}) {
|
|
6290
|
-
const
|
|
6291
|
+
const m = Ue();
|
|
6291
6292
|
if (r && e)
|
|
6292
6293
|
return /* @__PURE__ */ o.jsx(
|
|
6293
6294
|
ke,
|
|
@@ -6296,13 +6297,13 @@ function yi({
|
|
|
6296
6297
|
control: r,
|
|
6297
6298
|
rules: t,
|
|
6298
6299
|
defaultValue: s,
|
|
6299
|
-
render: ({ field:
|
|
6300
|
+
render: ({ field: g, fieldState: k }) => {
|
|
6300
6301
|
var j;
|
|
6301
6302
|
return /* @__PURE__ */ o.jsx(
|
|
6302
6303
|
yi,
|
|
6303
6304
|
{
|
|
6304
|
-
checked:
|
|
6305
|
-
onChange:
|
|
6305
|
+
checked: g.value,
|
|
6306
|
+
onChange: g.onChange,
|
|
6306
6307
|
disabled: i,
|
|
6307
6308
|
label: l,
|
|
6308
6309
|
labelPosition: c,
|
|
@@ -6313,7 +6314,7 @@ function yi({
|
|
|
6313
6314
|
}
|
|
6314
6315
|
}
|
|
6315
6316
|
);
|
|
6316
|
-
const
|
|
6317
|
+
const h = !!n;
|
|
6317
6318
|
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", d), children: [
|
|
6318
6319
|
/* @__PURE__ */ o.jsxs(
|
|
6319
6320
|
"label",
|
|
@@ -6322,18 +6323,18 @@ function yi({
|
|
|
6322
6323
|
"inline-flex items-center space-x-3 select-none",
|
|
6323
6324
|
i && "opacity-50 cursor-not-allowed"
|
|
6324
6325
|
),
|
|
6325
|
-
htmlFor:
|
|
6326
|
+
htmlFor: m,
|
|
6326
6327
|
children: [
|
|
6327
6328
|
l && c === "left" && /* @__PURE__ */ o.jsx("span", { className: "text-ds-md text-[var(--color-ds-text-primary)]", children: l }),
|
|
6328
6329
|
/* @__PURE__ */ o.jsx(
|
|
6329
6330
|
"button",
|
|
6330
6331
|
{
|
|
6331
|
-
id:
|
|
6332
|
+
id: m,
|
|
6332
6333
|
type: "button",
|
|
6333
6334
|
role: "switch",
|
|
6334
|
-
"aria-checked":
|
|
6335
|
+
"aria-checked": h,
|
|
6335
6336
|
disabled: i,
|
|
6336
|
-
onClick: () => !i && (a == null ? void 0 : a(!
|
|
6337
|
+
onClick: () => !i && (a == null ? void 0 : a(!h)),
|
|
6337
6338
|
className: $(
|
|
6338
6339
|
"relative inline-flex items-center h-8 w-16",
|
|
6339
6340
|
"bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200",
|
|
@@ -6344,7 +6345,7 @@ function yi({
|
|
|
6344
6345
|
{
|
|
6345
6346
|
className: $(
|
|
6346
6347
|
"absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",
|
|
6347
|
-
|
|
6348
|
+
h ? "translate-x-9" : "translate-x-1"
|
|
6348
6349
|
)
|
|
6349
6350
|
}
|
|
6350
6351
|
)
|
|
@@ -6359,6 +6360,7 @@ function yi({
|
|
|
6359
6360
|
}
|
|
6360
6361
|
export {
|
|
6361
6362
|
Ve as Button,
|
|
6363
|
+
di as Checkbox,
|
|
6362
6364
|
ir as CollapsibleSection,
|
|
6363
6365
|
In as DateInput,
|
|
6364
6366
|
ki as DropdownMenu,
|
|
@@ -6376,6 +6378,7 @@ export {
|
|
|
6376
6378
|
Ti as Modal,
|
|
6377
6379
|
ha as OptionGroup,
|
|
6378
6380
|
Oi as PageLayout,
|
|
6381
|
+
fi as SearchField,
|
|
6379
6382
|
pt as Select,
|
|
6380
6383
|
vi as Sidebar,
|
|
6381
6384
|
Ts as SidebarNav,
|