@dipusevilla/componentes-iu 1.0.13 → 1.0.15
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 +9 -9
- package/dist/index.es.js +904 -902
- package/dist/index.umd.js +10 -10
- package/dist/types/components/Table.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import X, { useState as
|
|
1
|
+
import * as V from "react";
|
|
2
|
+
import X, { useState as ee, useRef as _e, useLayoutEffect as Pr, useEffect as le, useId as Ue, createContext as Lt, useContext as It, useCallback as Tt, useMemo as Me } from "react";
|
|
3
3
|
import Ur from "react-dom";
|
|
4
4
|
function Rs(r) {
|
|
5
5
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
@@ -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 === W ? 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 y:
|
|
61
61
|
return "Profiler";
|
|
62
|
-
case
|
|
62
|
+
case F:
|
|
63
63
|
return "StrictMode";
|
|
64
64
|
case O:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case
|
|
66
|
+
case z:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case U:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof w == "object")
|
|
@@ -74,19 +74,19 @@ function Ls() {
|
|
|
74
74
|
), w.$$typeof) {
|
|
75
75
|
case k:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case E:
|
|
78
78
|
return (w.displayName || "Context") + ".Provider";
|
|
79
79
|
case p:
|
|
80
80
|
return (w._context.displayName || "Context") + ".Consumer";
|
|
81
81
|
case D:
|
|
82
|
-
var
|
|
83
|
-
return w = w.displayName, w || (w =
|
|
82
|
+
var I = w.render;
|
|
83
|
+
return w = w.displayName, w || (w = I.displayName || I.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
|
|
84
84
|
case Y:
|
|
85
|
-
return
|
|
85
|
+
return I = w.displayName || null, I !== null ? I : r(w.type) || "Memo";
|
|
86
86
|
case P:
|
|
87
|
-
|
|
87
|
+
I = w._payload, w = w._init;
|
|
88
88
|
try {
|
|
89
|
-
return r(w(
|
|
89
|
+
return r(w(I));
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -98,17 +98,17 @@ function Ls() {
|
|
|
98
98
|
function t(w) {
|
|
99
99
|
try {
|
|
100
100
|
e(w);
|
|
101
|
-
var
|
|
101
|
+
var I = !1;
|
|
102
102
|
} catch {
|
|
103
|
-
|
|
103
|
+
I = !0;
|
|
104
104
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
var G =
|
|
105
|
+
if (I) {
|
|
106
|
+
I = console;
|
|
107
|
+
var G = I.error, te = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
|
|
108
108
|
return G.call(
|
|
109
|
-
|
|
109
|
+
I,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
-
|
|
111
|
+
te
|
|
112
112
|
), e(w);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -117,31 +117,31 @@ function Ls() {
|
|
|
117
117
|
if (typeof w == "object" && w !== null && w.$$typeof === P)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
|
-
var
|
|
121
|
-
return
|
|
120
|
+
var I = r(w);
|
|
121
|
+
return I ? "<" + I + ">" : "<...>";
|
|
122
122
|
} catch {
|
|
123
123
|
return "<...>";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function n() {
|
|
127
|
-
var w =
|
|
127
|
+
var w = R.A;
|
|
128
128
|
return w === null ? null : w.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function a() {
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
133
|
function i(w) {
|
|
134
|
-
if (
|
|
135
|
-
var
|
|
136
|
-
if (
|
|
134
|
+
if (M.call(w, "key")) {
|
|
135
|
+
var I = Object.getOwnPropertyDescriptor(w, "key").get;
|
|
136
|
+
if (I && I.isReactWarning) return !1;
|
|
137
137
|
}
|
|
138
138
|
return w.key !== void 0;
|
|
139
139
|
}
|
|
140
|
-
function l(w,
|
|
140
|
+
function l(w, I) {
|
|
141
141
|
function G() {
|
|
142
|
-
|
|
142
|
+
C || (C = !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
|
+
I
|
|
145
145
|
));
|
|
146
146
|
}
|
|
147
147
|
G.isReactWarning = !0, Object.defineProperty(w, "key", {
|
|
@@ -151,15 +151,15 @@ function Ls() {
|
|
|
151
151
|
}
|
|
152
152
|
function c() {
|
|
153
153
|
var w = r(this.type);
|
|
154
|
-
return
|
|
154
|
+
return g[w] || (g[w] = !0, console.error(
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), w = this.props.ref, w !== void 0 ? w : null;
|
|
157
157
|
}
|
|
158
|
-
function f(w,
|
|
158
|
+
function f(w, I, G, te, ae, q, ce, ue) {
|
|
159
159
|
return G = q.ref, w = {
|
|
160
|
-
$$typeof:
|
|
160
|
+
$$typeof: v,
|
|
161
161
|
type: w,
|
|
162
|
-
key:
|
|
162
|
+
key: I,
|
|
163
163
|
props: q,
|
|
164
164
|
_owner: ae
|
|
165
165
|
}, (G !== void 0 ? G : null) !== null ? Object.defineProperty(w, "ref", {
|
|
@@ -179,50 +179,50 @@ function Ls() {
|
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
182
|
+
value: ce
|
|
183
183
|
}), Object.defineProperty(w, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: ue
|
|
188
188
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
189
189
|
}
|
|
190
|
-
function d(w,
|
|
191
|
-
var H =
|
|
190
|
+
function d(w, I, G, te, ae, q, ce, ue) {
|
|
191
|
+
var H = I.children;
|
|
192
192
|
if (H !== void 0)
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
for (
|
|
196
|
-
m(H[
|
|
193
|
+
if (te)
|
|
194
|
+
if (B(H)) {
|
|
195
|
+
for (te = 0; te < H.length; te++)
|
|
196
|
+
m(H[te]);
|
|
197
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
202
|
else m(H);
|
|
203
|
-
if (
|
|
203
|
+
if (M.call(I, "key")) {
|
|
204
204
|
H = r(w);
|
|
205
|
-
var de = Object.keys(
|
|
205
|
+
var de = Object.keys(I).filter(function(Ze) {
|
|
206
206
|
return Ze !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
te = 0 < de.length ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}", ie[H + te] || (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} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
215
|
+
te,
|
|
216
216
|
H,
|
|
217
217
|
de,
|
|
218
218
|
H
|
|
219
|
-
), ie[H +
|
|
219
|
+
), ie[H + te] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (H = null, G !== void 0 && (t(G), H = "" + G), i(
|
|
221
|
+
if (H = null, G !== void 0 && (t(G), H = "" + G), i(I) && (t(I.key), H = "" + I.key), "key" in I) {
|
|
222
222
|
G = {};
|
|
223
|
-
for (var Fe in
|
|
224
|
-
Fe !== "key" && (G[Fe] =
|
|
225
|
-
} else G =
|
|
223
|
+
for (var Fe in I)
|
|
224
|
+
Fe !== "key" && (G[Fe] = I[Fe]);
|
|
225
|
+
} else G = I;
|
|
226
226
|
return H && l(
|
|
227
227
|
G,
|
|
228
228
|
typeof w == "function" ? w.displayName || w.name || "Unknown" : w
|
|
@@ -233,14 +233,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
233
|
ae,
|
|
234
234
|
n(),
|
|
235
235
|
G,
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
ce,
|
|
237
|
+
ue
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
function m(w) {
|
|
241
|
-
typeof w == "object" && w !== null && w.$$typeof ===
|
|
241
|
+
typeof w == "object" && w !== null && w.$$typeof === v && w._store && (w._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var h = X,
|
|
243
|
+
var h = X, v = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), p = Symbol.for("react.consumer"), E = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), U = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), R = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, B = Array.isArray, _ = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
h = {
|
|
@@ -248,33 +248,33 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return w();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var C, g = {}, Z = h["react-stack-bottom-frame"].bind(
|
|
252
252
|
h,
|
|
253
253
|
a
|
|
254
|
-
)(),
|
|
255
|
-
Ge.Fragment = j, Ge.jsx = function(w,
|
|
256
|
-
var q = 1e4 >
|
|
254
|
+
)(), J = _(s(a)), ie = {};
|
|
255
|
+
Ge.Fragment = j, Ge.jsx = function(w, I, G, te, ae) {
|
|
256
|
+
var q = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return d(
|
|
258
258
|
w,
|
|
259
|
-
|
|
259
|
+
I,
|
|
260
260
|
G,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
262
|
+
te,
|
|
263
263
|
ae,
|
|
264
|
-
q ? Error("react-stack-top-frame") :
|
|
265
|
-
q ?
|
|
264
|
+
q ? Error("react-stack-top-frame") : Z,
|
|
265
|
+
q ? _(s(w)) : J
|
|
266
266
|
);
|
|
267
|
-
}, Ge.jsxs = function(w,
|
|
268
|
-
var q = 1e4 >
|
|
267
|
+
}, Ge.jsxs = function(w, I, G, te, ae) {
|
|
268
|
+
var q = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return d(
|
|
270
270
|
w,
|
|
271
|
-
|
|
271
|
+
I,
|
|
272
272
|
G,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
274
|
+
te,
|
|
275
275
|
ae,
|
|
276
|
-
q ? Error("react-stack-top-frame") :
|
|
277
|
-
q ?
|
|
276
|
+
q ? Error("react-stack-top-frame") : Z,
|
|
277
|
+
q ? _(s(w)) : J
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
280
|
}()), Ge;
|
|
@@ -351,7 +351,7 @@ function Ve({
|
|
|
351
351
|
onClick: f,
|
|
352
352
|
className: d
|
|
353
353
|
}) {
|
|
354
|
-
const m = !!a, h = m && !c,
|
|
354
|
+
const m = !!a, h = m && !c, v = h ? zs[t] : Zs[t];
|
|
355
355
|
return /* @__PURE__ */ o.jsxs(
|
|
356
356
|
"button",
|
|
357
357
|
{
|
|
@@ -363,7 +363,7 @@ function Ve({
|
|
|
363
363
|
className: $(
|
|
364
364
|
Us,
|
|
365
365
|
Bs[e],
|
|
366
|
-
|
|
366
|
+
v,
|
|
367
367
|
Ws,
|
|
368
368
|
d,
|
|
369
369
|
m && c && "gap-2"
|
|
@@ -381,7 +381,7 @@ function qs({
|
|
|
381
381
|
titleId: e,
|
|
382
382
|
...t
|
|
383
383
|
}, s) {
|
|
384
|
-
return /* @__PURE__ */
|
|
384
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
385
385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
386
386
|
fill: "none",
|
|
387
387
|
viewBox: "0 0 24 24",
|
|
@@ -391,21 +391,21 @@ function qs({
|
|
|
391
391
|
"data-slot": "icon",
|
|
392
392
|
ref: s,
|
|
393
393
|
"aria-labelledby": e
|
|
394
|
-
}, t), r ? /* @__PURE__ */
|
|
394
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
395
395
|
id: e
|
|
396
|
-
}, r) : null, /* @__PURE__ */
|
|
396
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
397
397
|
strokeLinecap: "round",
|
|
398
398
|
strokeLinejoin: "round",
|
|
399
399
|
d: "m4.5 12.75 6 6 9-13.5"
|
|
400
400
|
}));
|
|
401
401
|
}
|
|
402
|
-
const Hs = /* @__PURE__ */
|
|
402
|
+
const Hs = /* @__PURE__ */ V.forwardRef(qs);
|
|
403
403
|
function Ys({
|
|
404
404
|
title: r,
|
|
405
405
|
titleId: e,
|
|
406
406
|
...t
|
|
407
407
|
}, s) {
|
|
408
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
409
409
|
xmlns: "http://www.w3.org/2000/svg",
|
|
410
410
|
fill: "none",
|
|
411
411
|
viewBox: "0 0 24 24",
|
|
@@ -415,21 +415,21 @@ function Ys({
|
|
|
415
415
|
"data-slot": "icon",
|
|
416
416
|
ref: s,
|
|
417
417
|
"aria-labelledby": e
|
|
418
|
-
}, t), r ? /* @__PURE__ */
|
|
418
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
419
419
|
id: e
|
|
420
|
-
}, r) : null, /* @__PURE__ */
|
|
420
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
421
421
|
strokeLinecap: "round",
|
|
422
422
|
strokeLinejoin: "round",
|
|
423
423
|
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
424
424
|
}));
|
|
425
425
|
}
|
|
426
|
-
const Zr = /* @__PURE__ */
|
|
426
|
+
const Zr = /* @__PURE__ */ V.forwardRef(Ys);
|
|
427
427
|
function Gs({
|
|
428
428
|
title: r,
|
|
429
429
|
titleId: e,
|
|
430
430
|
...t
|
|
431
431
|
}, s) {
|
|
432
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
433
433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
434
434
|
fill: "none",
|
|
435
435
|
viewBox: "0 0 24 24",
|
|
@@ -439,21 +439,21 @@ function Gs({
|
|
|
439
439
|
"data-slot": "icon",
|
|
440
440
|
ref: s,
|
|
441
441
|
"aria-labelledby": e
|
|
442
|
-
}, t), r ? /* @__PURE__ */
|
|
442
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
443
443
|
id: e
|
|
444
|
-
}, r) : null, /* @__PURE__ */
|
|
444
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
445
445
|
strokeLinecap: "round",
|
|
446
446
|
strokeLinejoin: "round",
|
|
447
447
|
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
448
448
|
}));
|
|
449
449
|
}
|
|
450
|
-
const Xs = /* @__PURE__ */
|
|
450
|
+
const Xs = /* @__PURE__ */ V.forwardRef(Gs);
|
|
451
451
|
function Js({
|
|
452
452
|
title: r,
|
|
453
453
|
titleId: e,
|
|
454
454
|
...t
|
|
455
455
|
}, s) {
|
|
456
|
-
return /* @__PURE__ */
|
|
456
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
457
457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
458
458
|
fill: "none",
|
|
459
459
|
viewBox: "0 0 24 24",
|
|
@@ -463,21 +463,21 @@ function Js({
|
|
|
463
463
|
"data-slot": "icon",
|
|
464
464
|
ref: s,
|
|
465
465
|
"aria-labelledby": e
|
|
466
|
-
}, t), r ? /* @__PURE__ */
|
|
466
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
467
467
|
id: e
|
|
468
|
-
}, r) : null, /* @__PURE__ */
|
|
468
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
469
469
|
strokeLinecap: "round",
|
|
470
470
|
strokeLinejoin: "round",
|
|
471
471
|
d: "m4.5 15.75 7.5-7.5 7.5 7.5"
|
|
472
472
|
}));
|
|
473
473
|
}
|
|
474
|
-
const Ks = /* @__PURE__ */
|
|
474
|
+
const Ks = /* @__PURE__ */ V.forwardRef(Js);
|
|
475
475
|
function Qs({
|
|
476
476
|
title: r,
|
|
477
477
|
titleId: e,
|
|
478
478
|
...t
|
|
479
479
|
}, s) {
|
|
480
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
481
481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
482
482
|
fill: "none",
|
|
483
483
|
viewBox: "0 0 24 24",
|
|
@@ -487,21 +487,21 @@ function Qs({
|
|
|
487
487
|
"data-slot": "icon",
|
|
488
488
|
ref: s,
|
|
489
489
|
"aria-labelledby": e
|
|
490
|
-
}, t), r ? /* @__PURE__ */
|
|
490
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
491
491
|
id: e
|
|
492
|
-
}, r) : null, /* @__PURE__ */
|
|
492
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
493
493
|
strokeLinecap: "round",
|
|
494
494
|
strokeLinejoin: "round",
|
|
495
495
|
d: "M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"
|
|
496
496
|
}));
|
|
497
497
|
}
|
|
498
|
-
const en = /* @__PURE__ */
|
|
498
|
+
const en = /* @__PURE__ */ V.forwardRef(Qs);
|
|
499
499
|
function tn({
|
|
500
500
|
title: r,
|
|
501
501
|
titleId: e,
|
|
502
502
|
...t
|
|
503
503
|
}, s) {
|
|
504
|
-
return /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
505
505
|
xmlns: "http://www.w3.org/2000/svg",
|
|
506
506
|
fill: "none",
|
|
507
507
|
viewBox: "0 0 24 24",
|
|
@@ -511,21 +511,21 @@ function tn({
|
|
|
511
511
|
"data-slot": "icon",
|
|
512
512
|
ref: s,
|
|
513
513
|
"aria-labelledby": e
|
|
514
|
-
}, t), r ? /* @__PURE__ */
|
|
514
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
515
515
|
id: e
|
|
516
|
-
}, r) : null, /* @__PURE__ */
|
|
516
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
517
517
|
strokeLinecap: "round",
|
|
518
518
|
strokeLinejoin: "round",
|
|
519
519
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
520
520
|
}));
|
|
521
521
|
}
|
|
522
|
-
const ar = /* @__PURE__ */
|
|
522
|
+
const ar = /* @__PURE__ */ V.forwardRef(tn);
|
|
523
523
|
function rn({
|
|
524
524
|
title: r,
|
|
525
525
|
titleId: e,
|
|
526
526
|
...t
|
|
527
527
|
}, s) {
|
|
528
|
-
return /* @__PURE__ */
|
|
528
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
529
529
|
xmlns: "http://www.w3.org/2000/svg",
|
|
530
530
|
fill: "none",
|
|
531
531
|
viewBox: "0 0 24 24",
|
|
@@ -535,21 +535,21 @@ function rn({
|
|
|
535
535
|
"data-slot": "icon",
|
|
536
536
|
ref: s,
|
|
537
537
|
"aria-labelledby": e
|
|
538
|
-
}, t), r ? /* @__PURE__ */
|
|
538
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
539
539
|
id: e
|
|
540
|
-
}, r) : null, /* @__PURE__ */
|
|
540
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
541
541
|
strokeLinecap: "round",
|
|
542
542
|
strokeLinejoin: "round",
|
|
543
543
|
d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
544
544
|
}));
|
|
545
545
|
}
|
|
546
|
-
const sn = /* @__PURE__ */
|
|
546
|
+
const sn = /* @__PURE__ */ V.forwardRef(rn);
|
|
547
547
|
function nn({
|
|
548
548
|
title: r,
|
|
549
549
|
titleId: e,
|
|
550
550
|
...t
|
|
551
551
|
}, s) {
|
|
552
|
-
return /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
553
553
|
xmlns: "http://www.w3.org/2000/svg",
|
|
554
554
|
fill: "none",
|
|
555
555
|
viewBox: "0 0 24 24",
|
|
@@ -559,25 +559,25 @@ function nn({
|
|
|
559
559
|
"data-slot": "icon",
|
|
560
560
|
ref: s,
|
|
561
561
|
"aria-labelledby": e
|
|
562
|
-
}, t), r ? /* @__PURE__ */
|
|
562
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
563
563
|
id: e
|
|
564
|
-
}, r) : null, /* @__PURE__ */
|
|
564
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
565
565
|
strokeLinecap: "round",
|
|
566
566
|
strokeLinejoin: "round",
|
|
567
567
|
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
568
|
-
}), /* @__PURE__ */
|
|
568
|
+
}), /* @__PURE__ */ V.createElement("path", {
|
|
569
569
|
strokeLinecap: "round",
|
|
570
570
|
strokeLinejoin: "round",
|
|
571
571
|
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
572
572
|
}));
|
|
573
573
|
}
|
|
574
|
-
const zr = /* @__PURE__ */
|
|
574
|
+
const zr = /* @__PURE__ */ V.forwardRef(nn);
|
|
575
575
|
function an({
|
|
576
576
|
title: r,
|
|
577
577
|
titleId: e,
|
|
578
578
|
...t
|
|
579
579
|
}, s) {
|
|
580
|
-
return /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
581
581
|
xmlns: "http://www.w3.org/2000/svg",
|
|
582
582
|
fill: "none",
|
|
583
583
|
viewBox: "0 0 24 24",
|
|
@@ -587,21 +587,21 @@ function an({
|
|
|
587
587
|
"data-slot": "icon",
|
|
588
588
|
ref: s,
|
|
589
589
|
"aria-labelledby": e
|
|
590
|
-
}, t), r ? /* @__PURE__ */
|
|
590
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
591
591
|
id: e
|
|
592
|
-
}, r) : null, /* @__PURE__ */
|
|
592
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
593
593
|
strokeLinecap: "round",
|
|
594
594
|
strokeLinejoin: "round",
|
|
595
595
|
d: "M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"
|
|
596
596
|
}));
|
|
597
597
|
}
|
|
598
|
-
const on = /* @__PURE__ */
|
|
598
|
+
const on = /* @__PURE__ */ V.forwardRef(an);
|
|
599
599
|
function ln({
|
|
600
600
|
title: r,
|
|
601
601
|
titleId: e,
|
|
602
602
|
...t
|
|
603
603
|
}, s) {
|
|
604
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
605
605
|
xmlns: "http://www.w3.org/2000/svg",
|
|
606
606
|
fill: "none",
|
|
607
607
|
viewBox: "0 0 24 24",
|
|
@@ -611,21 +611,21 @@ function ln({
|
|
|
611
611
|
"data-slot": "icon",
|
|
612
612
|
ref: s,
|
|
613
613
|
"aria-labelledby": e
|
|
614
|
-
}, t), r ? /* @__PURE__ */
|
|
614
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
615
615
|
id: e
|
|
616
|
-
}, r) : null, /* @__PURE__ */
|
|
616
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
617
617
|
strokeLinecap: "round",
|
|
618
618
|
strokeLinejoin: "round",
|
|
619
619
|
d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
|
|
620
620
|
}));
|
|
621
621
|
}
|
|
622
|
-
const cn = /* @__PURE__ */
|
|
622
|
+
const cn = /* @__PURE__ */ V.forwardRef(ln);
|
|
623
623
|
function un({
|
|
624
624
|
title: r,
|
|
625
625
|
titleId: e,
|
|
626
626
|
...t
|
|
627
627
|
}, s) {
|
|
628
|
-
return /* @__PURE__ */
|
|
628
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
629
629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
630
630
|
fill: "none",
|
|
631
631
|
viewBox: "0 0 24 24",
|
|
@@ -635,21 +635,21 @@ function un({
|
|
|
635
635
|
"data-slot": "icon",
|
|
636
636
|
ref: s,
|
|
637
637
|
"aria-labelledby": e
|
|
638
|
-
}, t), r ? /* @__PURE__ */
|
|
638
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
639
639
|
id: e
|
|
640
|
-
}, r) : null, /* @__PURE__ */
|
|
640
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
641
641
|
strokeLinecap: "round",
|
|
642
642
|
strokeLinejoin: "round",
|
|
643
643
|
d: "M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
|
|
644
644
|
}));
|
|
645
645
|
}
|
|
646
|
-
const dn = /* @__PURE__ */
|
|
646
|
+
const dn = /* @__PURE__ */ V.forwardRef(un);
|
|
647
647
|
function fn({
|
|
648
648
|
title: r,
|
|
649
649
|
titleId: e,
|
|
650
650
|
...t
|
|
651
651
|
}, s) {
|
|
652
|
-
return /* @__PURE__ */
|
|
652
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
653
653
|
xmlns: "http://www.w3.org/2000/svg",
|
|
654
654
|
fill: "none",
|
|
655
655
|
viewBox: "0 0 24 24",
|
|
@@ -659,21 +659,21 @@ function fn({
|
|
|
659
659
|
"data-slot": "icon",
|
|
660
660
|
ref: s,
|
|
661
661
|
"aria-labelledby": e
|
|
662
|
-
}, t), r ? /* @__PURE__ */
|
|
662
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
663
663
|
id: e
|
|
664
|
-
}, r) : null, /* @__PURE__ */
|
|
664
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
665
665
|
strokeLinecap: "round",
|
|
666
666
|
strokeLinejoin: "round",
|
|
667
667
|
d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
|
|
668
668
|
}));
|
|
669
669
|
}
|
|
670
|
-
const hn = /* @__PURE__ */
|
|
670
|
+
const hn = /* @__PURE__ */ V.forwardRef(fn);
|
|
671
671
|
function mn({
|
|
672
672
|
title: r,
|
|
673
673
|
titleId: e,
|
|
674
674
|
...t
|
|
675
675
|
}, s) {
|
|
676
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
677
677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
678
678
|
fill: "none",
|
|
679
679
|
viewBox: "0 0 24 24",
|
|
@@ -683,21 +683,21 @@ function mn({
|
|
|
683
683
|
"data-slot": "icon",
|
|
684
684
|
ref: s,
|
|
685
685
|
"aria-labelledby": e
|
|
686
|
-
}, t), r ? /* @__PURE__ */
|
|
686
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
687
687
|
id: e
|
|
688
|
-
}, r) : null, /* @__PURE__ */
|
|
688
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
689
689
|
strokeLinecap: "round",
|
|
690
690
|
strokeLinejoin: "round",
|
|
691
691
|
d: "M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
|
|
692
692
|
}));
|
|
693
693
|
}
|
|
694
|
-
const xn = /* @__PURE__ */
|
|
694
|
+
const xn = /* @__PURE__ */ V.forwardRef(mn);
|
|
695
695
|
function pn({
|
|
696
696
|
title: r,
|
|
697
697
|
titleId: e,
|
|
698
698
|
...t
|
|
699
699
|
}, s) {
|
|
700
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
701
701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
702
702
|
fill: "none",
|
|
703
703
|
viewBox: "0 0 24 24",
|
|
@@ -707,21 +707,21 @@ function pn({
|
|
|
707
707
|
"data-slot": "icon",
|
|
708
708
|
ref: s,
|
|
709
709
|
"aria-labelledby": e
|
|
710
|
-
}, t), r ? /* @__PURE__ */
|
|
710
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
711
711
|
id: e
|
|
712
|
-
}, r) : null, /* @__PURE__ */
|
|
712
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
713
713
|
strokeLinecap: "round",
|
|
714
714
|
strokeLinejoin: "round",
|
|
715
715
|
d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
|
|
716
716
|
}));
|
|
717
717
|
}
|
|
718
|
-
const gn = /* @__PURE__ */
|
|
718
|
+
const gn = /* @__PURE__ */ V.forwardRef(pn);
|
|
719
719
|
function vn({
|
|
720
720
|
title: r,
|
|
721
721
|
titleId: e,
|
|
722
722
|
...t
|
|
723
723
|
}, s) {
|
|
724
|
-
return /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ V.createElement("svg", Object.assign({
|
|
725
725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
726
726
|
fill: "none",
|
|
727
727
|
viewBox: "0 0 24 24",
|
|
@@ -731,22 +731,22 @@ function vn({
|
|
|
731
731
|
"data-slot": "icon",
|
|
732
732
|
ref: s,
|
|
733
733
|
"aria-labelledby": e
|
|
734
|
-
}, t), r ? /* @__PURE__ */
|
|
734
|
+
}, t), r ? /* @__PURE__ */ V.createElement("title", {
|
|
735
735
|
id: e
|
|
736
|
-
}, r) : null, /* @__PURE__ */
|
|
736
|
+
}, r) : null, /* @__PURE__ */ V.createElement("path", {
|
|
737
737
|
strokeLinecap: "round",
|
|
738
738
|
strokeLinejoin: "round",
|
|
739
739
|
d: "M6 18 18 6M6 6l12 12"
|
|
740
740
|
}));
|
|
741
741
|
}
|
|
742
|
-
const Pt = /* @__PURE__ */
|
|
742
|
+
const Pt = /* @__PURE__ */ V.forwardRef(vn);
|
|
743
743
|
function ir({
|
|
744
744
|
title: r,
|
|
745
745
|
children: e,
|
|
746
746
|
defaultOpen: t = !0,
|
|
747
747
|
className: s
|
|
748
748
|
}) {
|
|
749
|
-
const [n, a] =
|
|
749
|
+
const [n, a] = ee(t), i = _e(null), l = _e(null), [c, f] = ee(0), d = () => {
|
|
750
750
|
if (l.current) {
|
|
751
751
|
const m = l.current.scrollHeight;
|
|
752
752
|
f(m);
|
|
@@ -754,7 +754,7 @@ function ir({
|
|
|
754
754
|
};
|
|
755
755
|
return Pr(() => {
|
|
756
756
|
d();
|
|
757
|
-
}, [n]),
|
|
757
|
+
}, [n]), le(() => {
|
|
758
758
|
const m = l.current;
|
|
759
759
|
if (!m) return;
|
|
760
760
|
const h = new ResizeObserver(() => {
|
|
@@ -821,7 +821,7 @@ var yt = (r) => Array.isArray(r) ? r.filter(Boolean) : [], se = (r) => r === voi
|
|
|
821
821
|
return t;
|
|
822
822
|
const s = yt(e.split(/[,[\].]+?/)).reduce((n, a) => xe(n) ? n : n[a], r);
|
|
823
823
|
return se(s) || s === r ? se(r[e]) ? t : r[e] : s;
|
|
824
|
-
}, ve = (r) => typeof r == "boolean", Bt = (r) => /^\w*$/.test(r), Yr = (r) => yt(r.replace(/["|']|\]/g, "").split(/\.|\[/)),
|
|
824
|
+
}, ve = (r) => typeof r == "boolean", Bt = (r) => /^\w*$/.test(r), Yr = (r) => yt(r.replace(/["|']|\]/g, "").split(/\.|\[/)), K = (r, e, t) => {
|
|
825
825
|
let s = -1;
|
|
826
826
|
const n = Bt(e) ? [e] : Yr(e), a = n.length, i = a - 1;
|
|
827
827
|
for (; ++s < a; ) {
|
|
@@ -871,7 +871,7 @@ var Xr = (r, e, t, s = !0) => {
|
|
|
871
871
|
});
|
|
872
872
|
return n;
|
|
873
873
|
};
|
|
874
|
-
const Zt = typeof window < "u" ?
|
|
874
|
+
const Zt = typeof window < "u" ? V.useLayoutEffect : V.useEffect;
|
|
875
875
|
function jn(r) {
|
|
876
876
|
const e = bt(), { control: t = e.control, disabled: s, name: n, exact: a } = r || {}, [i, l] = X.useState(t._formState), c = X.useRef({
|
|
877
877
|
isDirty: !1,
|
|
@@ -944,50 +944,50 @@ function Qr(r) {
|
|
|
944
944
|
enumerable: !0,
|
|
945
945
|
get: () => T(c.errors, t)
|
|
946
946
|
}
|
|
947
|
-
}), [c, t]), h = X.useCallback((
|
|
947
|
+
}), [c, t]), h = X.useCallback((F) => d.current.onChange({
|
|
948
948
|
target: {
|
|
949
|
-
value: qr(
|
|
949
|
+
value: qr(F),
|
|
950
950
|
name: t
|
|
951
951
|
},
|
|
952
952
|
type: ft.CHANGE
|
|
953
|
-
}), [t]),
|
|
953
|
+
}), [t]), v = X.useCallback(() => d.current.onBlur({
|
|
954
954
|
target: {
|
|
955
955
|
value: T(n._formValues, t),
|
|
956
956
|
name: t
|
|
957
957
|
},
|
|
958
958
|
type: ft.BLUR
|
|
959
|
-
}), [t, n._formValues]), k = X.useCallback((
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
focus: () =>
|
|
963
|
-
select: () =>
|
|
964
|
-
setCustomValidity: (p) =>
|
|
965
|
-
reportValidity: () =>
|
|
959
|
+
}), [t, n._formValues]), k = X.useCallback((F) => {
|
|
960
|
+
const y = T(n._fields, t);
|
|
961
|
+
y && F && (y._f.ref = {
|
|
962
|
+
focus: () => F.focus(),
|
|
963
|
+
select: () => F.select(),
|
|
964
|
+
setCustomValidity: (p) => F.setCustomValidity(p),
|
|
965
|
+
reportValidity: () => F.reportValidity()
|
|
966
966
|
});
|
|
967
967
|
}, [n._fields, t]), j = X.useMemo(() => ({
|
|
968
968
|
name: t,
|
|
969
969
|
value: l,
|
|
970
970
|
...ve(s) || c.disabled ? { disabled: c.disabled || s } : {},
|
|
971
971
|
onChange: h,
|
|
972
|
-
onBlur:
|
|
972
|
+
onBlur: v,
|
|
973
973
|
ref: k
|
|
974
|
-
}), [t, s, c.disabled, h,
|
|
974
|
+
}), [t, s, c.disabled, h, v, k, l]);
|
|
975
975
|
return X.useEffect(() => {
|
|
976
|
-
const
|
|
976
|
+
const F = 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
|
|
981
|
+
const y = (p, E) => {
|
|
982
982
|
const D = T(n._fields, p);
|
|
983
|
-
D && D._f && (D._f.mount =
|
|
983
|
+
D && D._f && (D._f.mount = E);
|
|
984
984
|
};
|
|
985
|
-
if (
|
|
985
|
+
if (y(t, !0), F) {
|
|
986
986
|
const p = he(T(n._options.defaultValues, t));
|
|
987
|
-
|
|
987
|
+
K(n._defaultValues, t, p), se(T(n._formValues, t)) && K(n._formValues, t, p);
|
|
988
988
|
}
|
|
989
989
|
return !i && n.register(t), () => {
|
|
990
|
-
(i ?
|
|
990
|
+
(i ? F && !n._state.action : F) ? n.unregister(t) : y(t, !1);
|
|
991
991
|
};
|
|
992
992
|
}, [t, n, i, a]), X.useEffect(() => {
|
|
993
993
|
n._setDisabledField({
|
|
@@ -1124,7 +1124,7 @@ var _n = (r, e, t, s) => {
|
|
|
1124
1124
|
const n = {};
|
|
1125
1125
|
for (const a of r) {
|
|
1126
1126
|
const i = T(e, a);
|
|
1127
|
-
i &&
|
|
1127
|
+
i && K(n, a, i._f);
|
|
1128
1128
|
}
|
|
1129
1129
|
return {
|
|
1130
1130
|
criteriaMode: t,
|
|
@@ -1187,7 +1187,7 @@ var Tn = (r, e, t, s) => {
|
|
|
1187
1187
|
return me(a) || Object.keys(a).length >= Object.keys(e).length || Object.keys(a).find((i) => e[i] === (!s || we.all));
|
|
1188
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
1189
|
const s = Ke(T(r, t));
|
|
1190
|
-
return
|
|
1190
|
+
return K(s, "root", e[t]), K(r, t, s), r;
|
|
1191
1191
|
}, ct = (r) => Ne(r);
|
|
1192
1192
|
function pr(r, e, t = "validate") {
|
|
1193
1193
|
if (ct(r) || Array.isArray(r) && r.every(ct) || ve(r) && !r)
|
|
@@ -1201,80 +1201,80 @@ 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: m, max: h, pattern:
|
|
1205
|
-
if (!
|
|
1204
|
+
const { ref: i, refs: l, required: c, maxLength: f, minLength: d, min: m, max: h, pattern: v, validate: k, name: j, valueAsNumber: F, mount: y } = r._f, p = T(t, j);
|
|
1205
|
+
if (!y || e.has(j))
|
|
1206
1206
|
return {};
|
|
1207
|
-
const
|
|
1208
|
-
n &&
|
|
1209
|
-
}, O = {},
|
|
1210
|
-
const
|
|
1207
|
+
const E = l ? l[0] : i, D = (M) => {
|
|
1208
|
+
n && E.reportValidity && (E.setCustomValidity(ve(M) ? "" : M || ""), E.reportValidity());
|
|
1209
|
+
}, O = {}, z = Wt(i), Y = et(i), P = z || Y, U = (F || zt(i)) && se(i.value) && se(p) || ht(i) && i.value === "" || p === "" || Array.isArray(p) && !p.length, W = es.bind(null, j, s, O), R = (M, B, _, C = Se.maxLength, g = Se.minLength) => {
|
|
1210
|
+
const Z = M ? B : _;
|
|
1211
1211
|
O[j] = {
|
|
1212
|
-
type:
|
|
1213
|
-
message:
|
|
1212
|
+
type: M ? C : g,
|
|
1213
|
+
message: Z,
|
|
1214
1214
|
ref: i,
|
|
1215
|
-
...
|
|
1215
|
+
...W(M ? C : g, Z)
|
|
1216
1216
|
};
|
|
1217
1217
|
};
|
|
1218
|
-
if (a ? !Array.isArray(p) || !p.length : c && (!P && (
|
|
1219
|
-
const { value:
|
|
1220
|
-
if (
|
|
1218
|
+
if (a ? !Array.isArray(p) || !p.length : c && (!P && (U || xe(p)) || ve(p) && !p || Y && !ns(l).isValid || z && !is(l).isValid)) {
|
|
1219
|
+
const { value: M, message: B } = ct(c) ? { value: !!c, message: c } : ze(c);
|
|
1220
|
+
if (M && (O[j] = {
|
|
1221
1221
|
type: Se.required,
|
|
1222
|
-
message:
|
|
1223
|
-
ref:
|
|
1224
|
-
...
|
|
1222
|
+
message: B,
|
|
1223
|
+
ref: E,
|
|
1224
|
+
...W(Se.required, B)
|
|
1225
1225
|
}, !s))
|
|
1226
|
-
return D(
|
|
1226
|
+
return D(B), O;
|
|
1227
1227
|
}
|
|
1228
|
-
if (!
|
|
1229
|
-
let
|
|
1230
|
-
const
|
|
1228
|
+
if (!U && (!xe(m) || !xe(h))) {
|
|
1229
|
+
let M, B;
|
|
1230
|
+
const _ = ze(h), C = ze(m);
|
|
1231
1231
|
if (!xe(p) && !isNaN(p)) {
|
|
1232
|
-
const
|
|
1233
|
-
xe(
|
|
1232
|
+
const g = i.valueAsNumber || p && +p;
|
|
1233
|
+
xe(_.value) || (M = g > _.value), xe(C.value) || (B = g < C.value);
|
|
1234
1234
|
} else {
|
|
1235
|
-
const
|
|
1236
|
-
Ne(
|
|
1235
|
+
const g = i.valueAsDate || new Date(p), Z = (w) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + w), J = i.type == "time", ie = i.type == "week";
|
|
1236
|
+
Ne(_.value) && p && (M = J ? Z(p) > Z(_.value) : ie ? p > _.value : g > new Date(_.value)), Ne(C.value) && p && (B = J ? Z(p) < Z(C.value) : ie ? p < C.value : g < new Date(C.value));
|
|
1237
1237
|
}
|
|
1238
|
-
if ((
|
|
1238
|
+
if ((M || B) && (R(!!M, _.message, C.message, Se.max, Se.min), !s))
|
|
1239
1239
|
return D(O[j].message), O;
|
|
1240
1240
|
}
|
|
1241
|
-
if ((f || d) && !
|
|
1242
|
-
const
|
|
1243
|
-
if ((
|
|
1241
|
+
if ((f || d) && !U && (Ne(p) || a && Array.isArray(p))) {
|
|
1242
|
+
const M = ze(f), B = ze(d), _ = !xe(M.value) && p.length > +M.value, C = !xe(B.value) && p.length < +B.value;
|
|
1243
|
+
if ((_ || C) && (R(_, M.message, B.message), !s))
|
|
1244
1244
|
return D(O[j].message), O;
|
|
1245
1245
|
}
|
|
1246
|
-
if (
|
|
1247
|
-
const { value:
|
|
1248
|
-
if (xt(
|
|
1246
|
+
if (v && !U && Ne(p)) {
|
|
1247
|
+
const { value: M, message: B } = ze(v);
|
|
1248
|
+
if (xt(M) && !p.match(M) && (O[j] = {
|
|
1249
1249
|
type: Se.pattern,
|
|
1250
|
-
message:
|
|
1250
|
+
message: B,
|
|
1251
1251
|
ref: i,
|
|
1252
|
-
...
|
|
1252
|
+
...W(Se.pattern, B)
|
|
1253
1253
|
}, !s))
|
|
1254
|
-
return D(
|
|
1254
|
+
return D(B), O;
|
|
1255
1255
|
}
|
|
1256
1256
|
if (k) {
|
|
1257
1257
|
if (je(k)) {
|
|
1258
|
-
const
|
|
1259
|
-
if (
|
|
1260
|
-
...
|
|
1261
|
-
...
|
|
1258
|
+
const M = await k(p, t), B = pr(M, E);
|
|
1259
|
+
if (B && (O[j] = {
|
|
1260
|
+
...B,
|
|
1261
|
+
...W(Se.validate, B.message)
|
|
1262
1262
|
}, !s))
|
|
1263
|
-
return D(
|
|
1263
|
+
return D(B.message), O;
|
|
1264
1264
|
} else if (ne(k)) {
|
|
1265
|
-
let
|
|
1266
|
-
for (const
|
|
1267
|
-
if (!me(
|
|
1265
|
+
let M = {};
|
|
1266
|
+
for (const B in k) {
|
|
1267
|
+
if (!me(M) && !s)
|
|
1268
1268
|
break;
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
...
|
|
1272
|
-
...
|
|
1273
|
-
}, D(
|
|
1269
|
+
const _ = pr(await k[B](p, t), E, B);
|
|
1270
|
+
_ && (M = {
|
|
1271
|
+
..._,
|
|
1272
|
+
...W(B, _.message)
|
|
1273
|
+
}, D(_.message), s && (O[j] = M));
|
|
1274
1274
|
}
|
|
1275
|
-
if (!me(
|
|
1276
|
-
ref:
|
|
1277
|
-
...
|
|
1275
|
+
if (!me(M) && (O[j] = {
|
|
1276
|
+
ref: E,
|
|
1277
|
+
...M
|
|
1278
1278
|
}, !s))
|
|
1279
1279
|
return O;
|
|
1280
1280
|
}
|
|
@@ -1333,218 +1333,218 @@ function Vn(r = {}) {
|
|
|
1333
1333
|
const h = {
|
|
1334
1334
|
array: or(),
|
|
1335
1335
|
state: or()
|
|
1336
|
-
},
|
|
1336
|
+
}, v = e.criteriaMode === we.all, k = (u) => (x) => {
|
|
1337
1337
|
clearTimeout(f), f = setTimeout(u, x);
|
|
1338
1338
|
}, j = async (u) => {
|
|
1339
1339
|
if (!e.disabled && (d.isValid || m.isValid || u)) {
|
|
1340
|
-
const x = e.resolver ? me((await Y()).errors) : await
|
|
1340
|
+
const x = e.resolver ? me((await Y()).errors) : await U(s, !0);
|
|
1341
1341
|
x !== t.isValid && h.state.next({
|
|
1342
1342
|
isValid: x
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
|
-
},
|
|
1346
|
-
!e.disabled && (d.isValidating || d.validatingFields || m.isValidating || m.validatingFields) && ((u || Array.from(l.mount)).forEach((
|
|
1347
|
-
|
|
1345
|
+
}, F = (u, x) => {
|
|
1346
|
+
!e.disabled && (d.isValidating || d.validatingFields || m.isValidating || m.validatingFields) && ((u || Array.from(l.mount)).forEach((b) => {
|
|
1347
|
+
b && (x ? K(t.validatingFields, b, x) : oe(t.validatingFields, b));
|
|
1348
1348
|
}), h.state.next({
|
|
1349
1349
|
validatingFields: t.validatingFields,
|
|
1350
1350
|
isValidating: !me(t.validatingFields)
|
|
1351
1351
|
}));
|
|
1352
|
-
},
|
|
1353
|
-
if (
|
|
1352
|
+
}, y = (u, x = [], b, A, S = !0, N = !0) => {
|
|
1353
|
+
if (A && b && !e.disabled) {
|
|
1354
1354
|
if (i.action = !0, N && Array.isArray(T(s, u))) {
|
|
1355
|
-
const
|
|
1356
|
-
S &&
|
|
1355
|
+
const L = b(T(s, u), A.argA, A.argB);
|
|
1356
|
+
S && K(s, u, L);
|
|
1357
1357
|
}
|
|
1358
1358
|
if (N && Array.isArray(T(t.errors, u))) {
|
|
1359
|
-
const
|
|
1360
|
-
S &&
|
|
1359
|
+
const L = b(T(t.errors, u), A.argA, A.argB);
|
|
1360
|
+
S && K(t.errors, u, L), An(t.errors, u);
|
|
1361
1361
|
}
|
|
1362
1362
|
if ((d.touchedFields || m.touchedFields) && N && Array.isArray(T(t.touchedFields, u))) {
|
|
1363
|
-
const
|
|
1364
|
-
S &&
|
|
1363
|
+
const L = b(T(t.touchedFields, u), A.argA, A.argB);
|
|
1364
|
+
S && K(t.touchedFields, u, L);
|
|
1365
1365
|
}
|
|
1366
1366
|
(d.dirtyFields || m.dirtyFields) && (t.dirtyFields = Xe(n, a)), h.state.next({
|
|
1367
1367
|
name: u,
|
|
1368
|
-
isDirty:
|
|
1368
|
+
isDirty: R(u, x),
|
|
1369
1369
|
dirtyFields: t.dirtyFields,
|
|
1370
1370
|
errors: t.errors,
|
|
1371
1371
|
isValid: t.isValid
|
|
1372
1372
|
});
|
|
1373
1373
|
} else
|
|
1374
|
-
|
|
1374
|
+
K(a, u, x);
|
|
1375
1375
|
}, p = (u, x) => {
|
|
1376
|
-
|
|
1376
|
+
K(t.errors, u, x), h.state.next({
|
|
1377
1377
|
errors: t.errors
|
|
1378
1378
|
});
|
|
1379
|
-
},
|
|
1379
|
+
}, E = (u) => {
|
|
1380
1380
|
t.errors = u, h.state.next({
|
|
1381
1381
|
errors: t.errors,
|
|
1382
1382
|
isValid: !1
|
|
1383
1383
|
});
|
|
1384
|
-
}, D = (u, x,
|
|
1384
|
+
}, D = (u, x, b, A) => {
|
|
1385
1385
|
const S = T(s, u);
|
|
1386
1386
|
if (S) {
|
|
1387
|
-
const N = T(a, u, se(
|
|
1388
|
-
se(N) ||
|
|
1387
|
+
const N = T(a, u, se(b) ? T(n, u) : b);
|
|
1388
|
+
se(N) || A && A.defaultChecked || x ? K(a, u, x ? N : dr(S._f)) : _(u, N), i.mount && j();
|
|
1389
1389
|
}
|
|
1390
|
-
}, O = (u, x,
|
|
1391
|
-
let N = !1,
|
|
1392
|
-
const
|
|
1390
|
+
}, O = (u, x, b, A, S) => {
|
|
1391
|
+
let N = !1, L = !1;
|
|
1392
|
+
const Q = {
|
|
1393
1393
|
name: u
|
|
1394
1394
|
};
|
|
1395
1395
|
if (!e.disabled) {
|
|
1396
|
-
if (!
|
|
1397
|
-
(d.isDirty || m.isDirty) && (
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1396
|
+
if (!b || A) {
|
|
1397
|
+
(d.isDirty || m.isDirty) && (L = t.isDirty, t.isDirty = Q.isDirty = R(), N = L !== Q.isDirty);
|
|
1398
|
+
const re = De(T(n, u), x);
|
|
1399
|
+
L = !!T(t.dirtyFields, u), re ? oe(t.dirtyFields, u) : K(t.dirtyFields, u, !0), Q.dirtyFields = t.dirtyFields, N = N || (d.dirtyFields || m.dirtyFields) && L !== !re;
|
|
1400
1400
|
}
|
|
1401
|
-
if (
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1401
|
+
if (b) {
|
|
1402
|
+
const re = T(t.touchedFields, u);
|
|
1403
|
+
re || (K(t.touchedFields, u, b), Q.touchedFields = t.touchedFields, N = N || (d.touchedFields || m.touchedFields) && re !== b);
|
|
1404
1404
|
}
|
|
1405
|
-
N && S && h.state.next(
|
|
1405
|
+
N && S && h.state.next(Q);
|
|
1406
1406
|
}
|
|
1407
|
-
return N ?
|
|
1408
|
-
},
|
|
1407
|
+
return N ? Q : {};
|
|
1408
|
+
}, z = (u, x, b, A) => {
|
|
1409
1409
|
const S = T(t.errors, u), N = (d.isValid || m.isValid) && ve(x) && t.isValid !== x;
|
|
1410
|
-
if (e.delayError &&
|
|
1411
|
-
const
|
|
1412
|
-
...
|
|
1410
|
+
if (e.delayError && b ? (c = k(() => p(u, b)), c(e.delayError)) : (clearTimeout(f), c = null, b ? K(t.errors, u, b) : oe(t.errors, u)), (b ? !De(S, b) : S) || !me(A) || N) {
|
|
1411
|
+
const L = {
|
|
1412
|
+
...A,
|
|
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
|
-
}, h.state.next(
|
|
1419
|
+
...L
|
|
1420
|
+
}, h.state.next(L);
|
|
1421
1421
|
}
|
|
1422
1422
|
}, Y = async (u) => {
|
|
1423
|
-
|
|
1423
|
+
F(u, !0);
|
|
1424
1424
|
const x = await e.resolver(a, e.context, _n(u || l.mount, s, e.criteriaMode, e.shouldUseNativeValidation));
|
|
1425
|
-
return
|
|
1425
|
+
return F(u), x;
|
|
1426
1426
|
}, P = async (u) => {
|
|
1427
1427
|
const { errors: x } = await Y(u);
|
|
1428
1428
|
if (u)
|
|
1429
|
-
for (const
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1429
|
+
for (const b of u) {
|
|
1430
|
+
const A = T(x, b);
|
|
1431
|
+
A ? K(t.errors, b, A) : oe(t.errors, b);
|
|
1432
1432
|
}
|
|
1433
1433
|
else
|
|
1434
1434
|
t.errors = x;
|
|
1435
1435
|
return x;
|
|
1436
|
-
},
|
|
1436
|
+
}, U = async (u, x, b = {
|
|
1437
1437
|
valid: !0
|
|
1438
1438
|
}) => {
|
|
1439
|
-
for (const
|
|
1440
|
-
const S = u[
|
|
1439
|
+
for (const A in u) {
|
|
1440
|
+
const S = u[A];
|
|
1441
1441
|
if (S) {
|
|
1442
|
-
const { _f: N, ...
|
|
1442
|
+
const { _f: N, ...L } = S;
|
|
1443
1443
|
if (N) {
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
const ye = await gr(S, l.disabled, a,
|
|
1447
|
-
if (
|
|
1444
|
+
const Q = l.array.has(N.name), re = S._f && Fn(S._f);
|
|
1445
|
+
re && d.validatingFields && F([A], !0);
|
|
1446
|
+
const ye = await gr(S, l.disabled, a, v, e.shouldUseNativeValidation && !x, Q);
|
|
1447
|
+
if (re && d.validatingFields && F([A]), ye[N.name] && (b.valid = !1, x))
|
|
1448
1448
|
break;
|
|
1449
|
-
!x && (T(ye, N.name) ?
|
|
1449
|
+
!x && (T(ye, N.name) ? Q ? $n(t.errors, ye, N.name) : K(t.errors, N.name, ye[N.name]) : oe(t.errors, N.name));
|
|
1450
1450
|
}
|
|
1451
|
-
!me(
|
|
1451
|
+
!me(L) && await U(L, x, b);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
return
|
|
1455
|
-
},
|
|
1454
|
+
return b.valid;
|
|
1455
|
+
}, W = () => {
|
|
1456
1456
|
for (const u of l.unMount) {
|
|
1457
1457
|
const x = T(s, u);
|
|
1458
|
-
x && (x._f.refs ? x._f.refs.every((
|
|
1458
|
+
x && (x._f.refs ? x._f.refs.every((b) => !kt(b)) : !kt(x._f.ref)) && ue(u);
|
|
1459
1459
|
}
|
|
1460
1460
|
l.unMount = /* @__PURE__ */ new Set();
|
|
1461
|
-
},
|
|
1461
|
+
}, R = (u, x) => !e.disabled && (u && x && K(a, u, x), !De(w(), n)), M = (u, x, b) => Jr(u, l, {
|
|
1462
1462
|
...i.mount ? a : se(x) ? n : Ne(u) ? { [u]: x } : x
|
|
1463
|
-
},
|
|
1464
|
-
const
|
|
1463
|
+
}, b, x), B = (u) => yt(T(i.mount ? a : n, u, e.shouldUnregister ? T(n, u, []) : [])), _ = (u, x, b = {}) => {
|
|
1464
|
+
const A = T(s, u);
|
|
1465
1465
|
let S = x;
|
|
1466
|
-
if (
|
|
1467
|
-
const N =
|
|
1468
|
-
N && (!N.disabled &&
|
|
1469
|
-
(!
|
|
1470
|
-
}) : N.refs.forEach((
|
|
1466
|
+
if (A) {
|
|
1467
|
+
const N = A._f;
|
|
1468
|
+
N && (!N.disabled && K(a, u, as(x, N)), S = ht(N.ref) && xe(x) ? "" : x, ts(N.ref) ? [...N.ref.options].forEach((L) => L.selected = S.includes(L.value)) : N.refs ? et(N.ref) ? N.refs.forEach((L) => {
|
|
1469
|
+
(!L.defaultChecked || !L.disabled) && (Array.isArray(S) ? L.checked = !!S.find((Q) => Q === L.value) : L.checked = S === L.value || !!S);
|
|
1470
|
+
}) : N.refs.forEach((L) => L.checked = L.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
|
-
(
|
|
1476
|
-
},
|
|
1477
|
-
for (const
|
|
1478
|
-
if (!x.hasOwnProperty(
|
|
1475
|
+
(b.shouldDirty || b.shouldTouch) && O(u, S, b.shouldTouch, b.shouldDirty, !0), b.shouldValidate && ie(u);
|
|
1476
|
+
}, C = (u, x, b) => {
|
|
1477
|
+
for (const A in x) {
|
|
1478
|
+
if (!x.hasOwnProperty(A))
|
|
1479
1479
|
return;
|
|
1480
|
-
const S = x[
|
|
1481
|
-
(l.array.has(u) || ne(S) ||
|
|
1480
|
+
const S = x[A], N = `${u}.${A}`, L = T(s, N);
|
|
1481
|
+
(l.array.has(u) || ne(S) || L && !L._f) && !Le(S) ? C(N, S, b) : _(N, S, b);
|
|
1482
1482
|
}
|
|
1483
|
-
},
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1483
|
+
}, g = (u, x, b = {}) => {
|
|
1484
|
+
const A = T(s, u), S = l.array.has(u), N = he(x);
|
|
1485
|
+
K(a, u, N), S ? (h.array.next({
|
|
1486
1486
|
name: u,
|
|
1487
1487
|
values: he(a)
|
|
1488
|
-
}), (d.isDirty || d.dirtyFields || m.isDirty || m.dirtyFields) &&
|
|
1488
|
+
}), (d.isDirty || d.dirtyFields || m.isDirty || m.dirtyFields) && b.shouldDirty && h.state.next({
|
|
1489
1489
|
name: u,
|
|
1490
1490
|
dirtyFields: Xe(n, a),
|
|
1491
|
-
isDirty:
|
|
1492
|
-
})) :
|
|
1491
|
+
isDirty: R(u, N)
|
|
1492
|
+
})) : A && !A._f && !xe(N) ? C(u, N, b) : _(u, N, b), 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
|
|
1500
|
-
const S = T(s,
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1499
|
+
let b = x.name, A = !0;
|
|
1500
|
+
const S = T(s, b), N = (re) => {
|
|
1501
|
+
A = Number.isNaN(re) || Le(re) && isNaN(re.getTime()) || De(re, T(a, b, re));
|
|
1502
|
+
}, L = fr(e.mode), Q = fr(e.reValidateMode);
|
|
1503
1503
|
if (S) {
|
|
1504
|
-
let
|
|
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,
|
|
1506
|
-
|
|
1507
|
-
const jt = O(
|
|
1504
|
+
let re, ye;
|
|
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, b) && !S._f.deps || Cn(Ae, T(t.touchedFields, b), t.isSubmitted, Q, L), wt = mr(b, l, Ae);
|
|
1506
|
+
K(a, b, rt), Ae ? (S._f.onBlur && S._f.onBlur(u), c && c(0)) : S._f.onChange && S._f.onChange(u);
|
|
1507
|
+
const jt = O(b, rt, Ae), Ds = !me(jt) || wt;
|
|
1508
1508
|
if (!Ae && h.state.next({
|
|
1509
|
-
name:
|
|
1509
|
+
name: b,
|
|
1510
1510
|
type: u.type,
|
|
1511
1511
|
values: he(a)
|
|
1512
1512
|
}), $s)
|
|
1513
|
-
return (d.isValid || m.isValid) && (e.mode === "onBlur" ? Ae && j() : Ae || j()), Ds && h.state.next({ name:
|
|
1513
|
+
return (d.isValid || m.isValid) && (e.mode === "onBlur" ? Ae && j() : Ae || j()), Ds && h.state.next({ name: b, ...wt ? {} : jt });
|
|
1514
1514
|
if (!Ae && wt && h.state.next({ ...t }), e.resolver) {
|
|
1515
|
-
const { errors: er } = await Y([
|
|
1516
|
-
if (N(rt),
|
|
1517
|
-
const Vs = xr(t.errors, s,
|
|
1518
|
-
|
|
1515
|
+
const { errors: er } = await Y([b]);
|
|
1516
|
+
if (N(rt), A) {
|
|
1517
|
+
const Vs = xr(t.errors, s, b), tr = xr(er, s, Vs.name || b);
|
|
1518
|
+
re = tr.error, b = tr.name, ye = me(er);
|
|
1519
1519
|
}
|
|
1520
1520
|
} else
|
|
1521
|
-
|
|
1522
|
-
|
|
1521
|
+
F([b], !0), re = (await gr(S, l.disabled, a, v, e.shouldUseNativeValidation))[b], F([b]), N(rt), A && (re ? ye = !1 : (d.isValid || m.isValid) && (ye = await U(s, !0)));
|
|
1522
|
+
A && (S._f.deps && ie(S._f.deps), z(b, ye, re, jt));
|
|
1523
1523
|
}
|
|
1524
|
-
},
|
|
1524
|
+
}, J = (u, x) => {
|
|
1525
1525
|
if (T(t.errors, x) && u.focus)
|
|
1526
1526
|
return u.focus(), 1;
|
|
1527
1527
|
}, ie = async (u, x = {}) => {
|
|
1528
|
-
let
|
|
1528
|
+
let b, A;
|
|
1529
1529
|
const S = Ke(u);
|
|
1530
1530
|
if (e.resolver) {
|
|
1531
1531
|
const N = await P(se(u) ? u : S);
|
|
1532
|
-
|
|
1533
|
-
} else u ? (
|
|
1534
|
-
const
|
|
1535
|
-
return await
|
|
1536
|
-
}))).every(Boolean), !(!
|
|
1532
|
+
b = me(N), A = u ? !S.some((L) => T(N, L)) : b;
|
|
1533
|
+
} else u ? (A = (await Promise.all(S.map(async (N) => {
|
|
1534
|
+
const L = T(s, N);
|
|
1535
|
+
return await U(L && L._f ? { [N]: L } : L);
|
|
1536
|
+
}))).every(Boolean), !(!A && !t.isValid) && j()) : A = b = await U(s);
|
|
1537
1537
|
return h.state.next({
|
|
1538
|
-
...!Ne(u) || (d.isValid || m.isValid) &&
|
|
1539
|
-
...e.resolver || !u ? { isValid:
|
|
1538
|
+
...!Ne(u) || (d.isValid || m.isValid) && b !== t.isValid ? {} : { name: u },
|
|
1539
|
+
...e.resolver || !u ? { isValid: b } : {},
|
|
1540
1540
|
errors: t.errors
|
|
1541
|
-
}), x.shouldFocus && !
|
|
1541
|
+
}), x.shouldFocus && !A && Qe(s, J, u ? S : l.mount), A;
|
|
1542
1542
|
}, w = (u) => {
|
|
1543
1543
|
const x = {
|
|
1544
1544
|
...i.mount ? a : n
|
|
1545
1545
|
};
|
|
1546
|
-
return se(u) ? x : Ne(u) ? T(x, u) : u.map((
|
|
1547
|
-
},
|
|
1546
|
+
return se(u) ? x : Ne(u) ? T(x, u) : u.map((b) => T(x, b));
|
|
1547
|
+
}, I = (u, x) => ({
|
|
1548
1548
|
invalid: !!T((x || t).errors, u),
|
|
1549
1549
|
isDirty: !!T((x || t).dirtyFields, u),
|
|
1550
1550
|
error: T((x || t).errors, u),
|
|
@@ -1554,20 +1554,20 @@ function Vn(r = {}) {
|
|
|
1554
1554
|
u && Ke(u).forEach((x) => oe(t.errors, x)), h.state.next({
|
|
1555
1555
|
errors: u ? t.errors : {}
|
|
1556
1556
|
});
|
|
1557
|
-
},
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
...
|
|
1557
|
+
}, te = (u, x, b) => {
|
|
1558
|
+
const A = (T(s, u, { _f: {} })._f || {}).ref, S = T(t.errors, u) || {}, { ref: N, message: L, type: Q, ...re } = S;
|
|
1559
|
+
K(t.errors, u, {
|
|
1560
|
+
...re,
|
|
1561
1561
|
...x,
|
|
1562
|
-
ref:
|
|
1562
|
+
ref: A
|
|
1563
1563
|
}), h.state.next({
|
|
1564
1564
|
name: u,
|
|
1565
1565
|
errors: t.errors,
|
|
1566
1566
|
isValid: !1
|
|
1567
|
-
}),
|
|
1567
|
+
}), b && b.shouldFocus && A && A.focus && A.focus();
|
|
1568
1568
|
}, ae = (u, x) => je(u) ? h.state.subscribe({
|
|
1569
|
-
next: (
|
|
1570
|
-
}) :
|
|
1569
|
+
next: (b) => u(M(void 0, x), b)
|
|
1570
|
+
}) : M(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,39 +1575,39 @@ function Vn(r = {}) {
|
|
|
1575
1575
|
...x
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
}).unsubscribe,
|
|
1578
|
+
}).unsubscribe, ce = (u) => (i.mount = !0, m = {
|
|
1579
1579
|
...m,
|
|
1580
1580
|
...u.formState
|
|
1581
1581
|
}, q({
|
|
1582
1582
|
...u,
|
|
1583
1583
|
formState: m
|
|
1584
|
-
})),
|
|
1585
|
-
for (const
|
|
1586
|
-
l.mount.delete(
|
|
1584
|
+
})), ue = (u, x = {}) => {
|
|
1585
|
+
for (const b of u ? Ke(u) : l.mount)
|
|
1586
|
+
l.mount.delete(b), l.array.delete(b), x.keepValue || (oe(s, b), oe(a, b)), !x.keepError && oe(t.errors, b), !x.keepDirty && oe(t.dirtyFields, b), !x.keepTouched && oe(t.touchedFields, b), !x.keepIsValidating && oe(t.validatingFields, b), !e.shouldUnregister && !x.keepDefaultValue && oe(n, b);
|
|
1587
1587
|
h.state.next({
|
|
1588
1588
|
values: he(a)
|
|
1589
1589
|
}), h.state.next({
|
|
1590
1590
|
...t,
|
|
1591
|
-
...x.keepDirty ? { isDirty:
|
|
1591
|
+
...x.keepDirty ? { isDirty: R() } : {}
|
|
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
|
|
1597
|
-
const
|
|
1598
|
-
return
|
|
1599
|
-
...
|
|
1596
|
+
let b = T(s, u);
|
|
1597
|
+
const A = ve(x.disabled) || ve(e.disabled);
|
|
1598
|
+
return K(s, u, {
|
|
1599
|
+
...b || {},
|
|
1600
1600
|
_f: {
|
|
1601
|
-
...
|
|
1601
|
+
...b && b._f ? b._f : { ref: { name: u } },
|
|
1602
1602
|
name: u,
|
|
1603
1603
|
mount: !0,
|
|
1604
1604
|
...x
|
|
1605
1605
|
}
|
|
1606
|
-
}), l.mount.add(u),
|
|
1606
|
+
}), l.mount.add(u), b ? H({
|
|
1607
1607
|
disabled: ve(x.disabled) ? x.disabled : e.disabled,
|
|
1608
1608
|
name: u
|
|
1609
1609
|
}) : D(u, !0, x.value), {
|
|
1610
|
-
...
|
|
1610
|
+
...A ? { disabled: x.disabled || e.disabled } : {},
|
|
1611
1611
|
...e.progressive ? {
|
|
1612
1612
|
required: !!x.required,
|
|
1613
1613
|
min: Je(x.min),
|
|
@@ -1617,20 +1617,20 @@ function Vn(r = {}) {
|
|
|
1617
1617
|
pattern: Je(x.pattern)
|
|
1618
1618
|
} : {},
|
|
1619
1619
|
name: u,
|
|
1620
|
-
onChange:
|
|
1621
|
-
onBlur:
|
|
1620
|
+
onChange: Z,
|
|
1621
|
+
onBlur: Z,
|
|
1622
1622
|
ref: (S) => {
|
|
1623
1623
|
if (S) {
|
|
1624
|
-
de(u, x),
|
|
1625
|
-
const N = se(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S,
|
|
1626
|
-
if (
|
|
1624
|
+
de(u, x), b = T(s, u);
|
|
1625
|
+
const N = se(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S, L = kn(N), Q = b._f.refs || [];
|
|
1626
|
+
if (L ? Q.find((re) => re === N) : N === b._f.ref)
|
|
1627
1627
|
return;
|
|
1628
|
-
|
|
1628
|
+
K(s, u, {
|
|
1629
1629
|
_f: {
|
|
1630
|
-
...
|
|
1631
|
-
...
|
|
1630
|
+
...b._f,
|
|
1631
|
+
...L ? {
|
|
1632
1632
|
refs: [
|
|
1633
|
-
...
|
|
1633
|
+
...Q.filter(kt),
|
|
1634
1634
|
N,
|
|
1635
1635
|
...Array.isArray(T(n, u)) ? [{}] : []
|
|
1636
1636
|
],
|
|
@@ -1639,69 +1639,69 @@ function Vn(r = {}) {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
}), D(u, !1, void 0, N);
|
|
1641
1641
|
} else
|
|
1642
|
-
|
|
1642
|
+
b = T(s, u, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || x.shouldUnregister) && !(Hr(l.array, u) && i.action) && l.unMount.add(u);
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
|
-
}, Fe = () => e.shouldFocusError && Qe(s,
|
|
1646
|
-
ve(u) && (h.state.next({ disabled: u }), Qe(s, (x,
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1649
|
-
S.disabled =
|
|
1645
|
+
}, Fe = () => e.shouldFocusError && Qe(s, J, l.mount), Ze = (u) => {
|
|
1646
|
+
ve(u) && (h.state.next({ disabled: u }), Qe(s, (x, b) => {
|
|
1647
|
+
const A = T(s, b);
|
|
1648
|
+
A && (x.disabled = A._f.disabled || u, Array.isArray(A._f.refs) && A._f.refs.forEach((S) => {
|
|
1649
|
+
S.disabled = A._f.disabled || u;
|
|
1650
1650
|
}));
|
|
1651
1651
|
}, 0, !1));
|
|
1652
|
-
}, Xt = (u, x) => async (
|
|
1653
|
-
let
|
|
1654
|
-
|
|
1652
|
+
}, Xt = (u, x) => async (b) => {
|
|
1653
|
+
let A;
|
|
1654
|
+
b && (b.preventDefault && b.preventDefault(), b.persist && b.persist());
|
|
1655
1655
|
let S = he(a);
|
|
1656
1656
|
if (h.state.next({
|
|
1657
1657
|
isSubmitting: !0
|
|
1658
1658
|
}), e.resolver) {
|
|
1659
|
-
const { errors: N, values:
|
|
1660
|
-
t.errors = N, S =
|
|
1659
|
+
const { errors: N, values: L } = await Y();
|
|
1660
|
+
t.errors = N, S = L;
|
|
1661
1661
|
} else
|
|
1662
|
-
await
|
|
1662
|
+
await U(s);
|
|
1663
1663
|
if (l.disabled.size)
|
|
1664
1664
|
for (const N of l.disabled)
|
|
1665
|
-
|
|
1665
|
+
K(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(S,
|
|
1671
|
+
await u(S, b);
|
|
1672
1672
|
} catch (N) {
|
|
1673
|
-
|
|
1673
|
+
A = N;
|
|
1674
1674
|
}
|
|
1675
1675
|
} else
|
|
1676
|
-
x && await x({ ...t.errors },
|
|
1676
|
+
x && await x({ ...t.errors }, b), Fe(), setTimeout(Fe);
|
|
1677
1677
|
if (h.state.next({
|
|
1678
1678
|
isSubmitted: !0,
|
|
1679
1679
|
isSubmitting: !1,
|
|
1680
|
-
isSubmitSuccessful: me(t.errors) && !
|
|
1680
|
+
isSubmitSuccessful: me(t.errors) && !A,
|
|
1681
1681
|
submitCount: t.submitCount + 1,
|
|
1682
1682
|
errors: t.errors
|
|
1683
|
-
}),
|
|
1684
|
-
throw
|
|
1683
|
+
}), A)
|
|
1684
|
+
throw A;
|
|
1685
1685
|
}, Os = (u, x = {}) => {
|
|
1686
|
-
T(s, u) && (se(x.defaultValue) ?
|
|
1686
|
+
T(s, u) && (se(x.defaultValue) ? g(u, he(T(n, u))) : (g(u, x.defaultValue), K(n, u, he(x.defaultValue))), x.keepTouched || oe(t.touchedFields, u), x.keepDirty || (oe(t.dirtyFields, u), t.isDirty = x.defaultValue ? R(u, he(T(n, u))) : R()), x.keepError || (oe(t.errors, u), d.isValid && j()), h.state.next({ ...t }));
|
|
1687
1687
|
}, Jt = (u, x = {}) => {
|
|
1688
|
-
const
|
|
1689
|
-
if (x.keepDefaultValues || (n =
|
|
1688
|
+
const b = u ? he(u) : n, A = he(b), S = me(u), N = S ? n : A;
|
|
1689
|
+
if (x.keepDefaultValues || (n = b), !x.keepValues) {
|
|
1690
1690
|
if (x.keepDirtyValues) {
|
|
1691
|
-
const
|
|
1691
|
+
const L = /* @__PURE__ */ new Set([
|
|
1692
1692
|
...l.mount,
|
|
1693
1693
|
...Object.keys(Xe(n, a))
|
|
1694
1694
|
]);
|
|
1695
|
-
for (const
|
|
1696
|
-
T(t.dirtyFields,
|
|
1695
|
+
for (const Q of Array.from(L))
|
|
1696
|
+
T(t.dirtyFields, Q) ? K(N, Q, T(a, Q)) : g(Q, T(N, Q));
|
|
1697
1697
|
} else {
|
|
1698
1698
|
if (Ut && se(u))
|
|
1699
|
-
for (const
|
|
1700
|
-
const
|
|
1701
|
-
if (
|
|
1702
|
-
const
|
|
1703
|
-
if (ht(
|
|
1704
|
-
const ye =
|
|
1699
|
+
for (const L of l.mount) {
|
|
1700
|
+
const Q = T(s, L);
|
|
1701
|
+
if (Q && Q._f) {
|
|
1702
|
+
const re = Array.isArray(Q._f.refs) ? Q._f.refs[0] : Q._f.ref;
|
|
1703
|
+
if (ht(re)) {
|
|
1704
|
+
const ye = re.closest("form");
|
|
1705
1705
|
if (ye) {
|
|
1706
1706
|
ye.reset();
|
|
1707
1707
|
break;
|
|
@@ -1709,8 +1709,8 @@ function Vn(r = {}) {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
|
-
for (const
|
|
1713
|
-
|
|
1712
|
+
for (const L of l.mount)
|
|
1713
|
+
g(L, T(N, L));
|
|
1714
1714
|
}
|
|
1715
1715
|
a = he(N), h.array.next({
|
|
1716
1716
|
values: { ...N }
|
|
@@ -1737,9 +1737,9 @@ function Vn(r = {}) {
|
|
|
1737
1737
|
isSubmitting: !1
|
|
1738
1738
|
});
|
|
1739
1739
|
}, Kt = (u, x) => Jt(je(u) ? u(a) : u, x), Cs = (u, x = {}) => {
|
|
1740
|
-
const
|
|
1741
|
-
if (
|
|
1742
|
-
const S =
|
|
1740
|
+
const b = T(s, u), A = b && b._f;
|
|
1741
|
+
if (A) {
|
|
1742
|
+
const S = A.refs ? A.refs[0] : A.ref;
|
|
1743
1743
|
S.focus && (S.focus(), x.shouldSelect && je(S.select) && S.select());
|
|
1744
1744
|
}
|
|
1745
1745
|
}, As = (u) => {
|
|
@@ -1750,26 +1750,26 @@ function Vn(r = {}) {
|
|
|
1750
1750
|
}, Qt = {
|
|
1751
1751
|
control: {
|
|
1752
1752
|
register: de,
|
|
1753
|
-
unregister:
|
|
1754
|
-
getFieldState:
|
|
1753
|
+
unregister: ue,
|
|
1754
|
+
getFieldState: I,
|
|
1755
1755
|
handleSubmit: Xt,
|
|
1756
|
-
setError:
|
|
1756
|
+
setError: te,
|
|
1757
1757
|
_subscribe: q,
|
|
1758
1758
|
_runSchema: Y,
|
|
1759
|
-
_getWatch:
|
|
1760
|
-
_getDirty:
|
|
1759
|
+
_getWatch: M,
|
|
1760
|
+
_getDirty: R,
|
|
1761
1761
|
_setValid: j,
|
|
1762
|
-
_setFieldArray:
|
|
1762
|
+
_setFieldArray: y,
|
|
1763
1763
|
_setDisabledField: H,
|
|
1764
|
-
_setErrors:
|
|
1765
|
-
_getFieldArray:
|
|
1764
|
+
_setErrors: E,
|
|
1765
|
+
_getFieldArray: B,
|
|
1766
1766
|
_reset: Jt,
|
|
1767
1767
|
_resetDefaultValues: () => je(e.defaultValues) && e.defaultValues().then((u) => {
|
|
1768
1768
|
Kt(u, e.resetOptions), h.state.next({
|
|
1769
1769
|
isLoading: !1
|
|
1770
1770
|
});
|
|
1771
1771
|
}),
|
|
1772
|
-
_removeUnmounted:
|
|
1772
|
+
_removeUnmounted: W,
|
|
1773
1773
|
_disableForm: Ze,
|
|
1774
1774
|
_subjects: h,
|
|
1775
1775
|
_proxyFormState: d,
|
|
@@ -1807,20 +1807,20 @@ function Vn(r = {}) {
|
|
|
1807
1807
|
};
|
|
1808
1808
|
}
|
|
1809
1809
|
},
|
|
1810
|
-
subscribe:
|
|
1810
|
+
subscribe: ce,
|
|
1811
1811
|
trigger: ie,
|
|
1812
1812
|
register: de,
|
|
1813
1813
|
handleSubmit: Xt,
|
|
1814
1814
|
watch: ae,
|
|
1815
|
-
setValue:
|
|
1815
|
+
setValue: g,
|
|
1816
1816
|
getValues: w,
|
|
1817
1817
|
reset: Kt,
|
|
1818
1818
|
resetField: Os,
|
|
1819
1819
|
clearErrors: G,
|
|
1820
|
-
unregister:
|
|
1821
|
-
setError:
|
|
1820
|
+
unregister: ue,
|
|
1821
|
+
setError: te,
|
|
1822
1822
|
setFocus: Cs,
|
|
1823
|
-
getFieldState:
|
|
1823
|
+
getFieldState: I
|
|
1824
1824
|
};
|
|
1825
1825
|
return {
|
|
1826
1826
|
...Qt,
|
|
@@ -1930,19 +1930,19 @@ function In(r) {
|
|
|
1930
1930
|
hasError: d = !1,
|
|
1931
1931
|
errorMessage: m = "",
|
|
1932
1932
|
disabled: h = !1,
|
|
1933
|
-
className:
|
|
1933
|
+
className: v,
|
|
1934
1934
|
onChange: k
|
|
1935
|
-
} = r, j = Ue(),
|
|
1935
|
+
} = r, j = Ue(), F = t || j;
|
|
1936
1936
|
return /* @__PURE__ */ o.jsxs(
|
|
1937
1937
|
"div",
|
|
1938
1938
|
{
|
|
1939
|
-
className: $("flex flex-col",
|
|
1939
|
+
className: $("flex flex-col", v),
|
|
1940
1940
|
style: { width: l, maxWidth: "100%" },
|
|
1941
1941
|
children: [
|
|
1942
1942
|
c && /* @__PURE__ */ o.jsx(
|
|
1943
1943
|
"label",
|
|
1944
1944
|
{
|
|
1945
|
-
htmlFor:
|
|
1945
|
+
htmlFor: F,
|
|
1946
1946
|
className: $(
|
|
1947
1947
|
"pb-2 text-[var(--color-ds-text-primary)]",
|
|
1948
1948
|
os[i],
|
|
@@ -1962,18 +1962,18 @@ function In(r) {
|
|
|
1962
1962
|
control: e,
|
|
1963
1963
|
rules: s,
|
|
1964
1964
|
defaultValue: n,
|
|
1965
|
-
render: ({ field:
|
|
1966
|
-
|
|
1965
|
+
render: ({ field: y, fieldState: p }) => vr(
|
|
1966
|
+
F,
|
|
1967
1967
|
a,
|
|
1968
1968
|
i,
|
|
1969
1969
|
{
|
|
1970
|
-
value:
|
|
1971
|
-
onChange:
|
|
1972
|
-
onBlur:
|
|
1970
|
+
value: y.value,
|
|
1971
|
+
onChange: y.onChange,
|
|
1972
|
+
onBlur: y.onBlur
|
|
1973
1973
|
},
|
|
1974
1974
|
h,
|
|
1975
1975
|
p.error,
|
|
1976
|
-
|
|
1976
|
+
v
|
|
1977
1977
|
)
|
|
1978
1978
|
}
|
|
1979
1979
|
)
|
|
@@ -1982,7 +1982,7 @@ function In(r) {
|
|
|
1982
1982
|
// Modo “no controlado” (solo <input> nativo)
|
|
1983
1983
|
// ---------------------
|
|
1984
1984
|
vr(
|
|
1985
|
-
|
|
1985
|
+
F,
|
|
1986
1986
|
a,
|
|
1987
1987
|
i,
|
|
1988
1988
|
{
|
|
@@ -1991,7 +1991,7 @@ function In(r) {
|
|
|
1991
1991
|
},
|
|
1992
1992
|
h,
|
|
1993
1993
|
d ? { message: m } : void 0,
|
|
1994
|
-
|
|
1994
|
+
v
|
|
1995
1995
|
)
|
|
1996
1996
|
)
|
|
1997
1997
|
]
|
|
@@ -2004,8 +2004,8 @@ const ki = ({
|
|
|
2004
2004
|
align: t = "left",
|
|
2005
2005
|
className: s
|
|
2006
2006
|
}) => {
|
|
2007
|
-
const [n, a] =
|
|
2008
|
-
|
|
2007
|
+
const [n, a] = ee(!1), i = _e(null), l = _e([]);
|
|
2008
|
+
le(() => {
|
|
2009
2009
|
const f = (d) => {
|
|
2010
2010
|
i.current && !i.current.contains(d.target) && a(!1);
|
|
2011
2011
|
};
|
|
@@ -2014,18 +2014,18 @@ const ki = ({
|
|
|
2014
2014
|
const c = (f) => {
|
|
2015
2015
|
var m, h;
|
|
2016
2016
|
const d = l.current.findIndex(
|
|
2017
|
-
(
|
|
2017
|
+
(v) => v === 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
|
-
(m = l.current[
|
|
2023
|
+
const v = (d + 1) % e.length;
|
|
2024
|
+
(m = l.current[v]) == null || m.focus();
|
|
2025
2025
|
} else if (f.key === "ArrowUp") {
|
|
2026
2026
|
f.preventDefault();
|
|
2027
|
-
const
|
|
2028
|
-
(h = l.current[
|
|
2027
|
+
const v = (d - 1 + e.length) % e.length;
|
|
2028
|
+
(h = l.current[v]) == null || h.focus();
|
|
2029
2029
|
}
|
|
2030
2030
|
};
|
|
2031
2031
|
return /* @__PURE__ */ o.jsxs("div", { className: $("relative inline-block", s), ref: i, children: [
|
|
@@ -2052,22 +2052,22 @@ const ki = ({
|
|
|
2052
2052
|
),
|
|
2053
2053
|
onKeyDown: c,
|
|
2054
2054
|
children: e.map((f, d) => {
|
|
2055
|
-
const { label: m, onSelect: h, disabled:
|
|
2055
|
+
const { label: m, onSelect: h, disabled: v, 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: v,
|
|
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
|
+
v ? "opacity-50 cursor-not-allowed" : "hover:bg-[var(--color-ds-background-surface)]"
|
|
2068
2068
|
),
|
|
2069
2069
|
onClick: () => {
|
|
2070
|
-
|
|
2070
|
+
v || (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)]" }),
|
|
@@ -2167,11 +2167,11 @@ class Kn {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
const Qn = (r, e) => {
|
|
2169
2169
|
const t = _e();
|
|
2170
|
-
return
|
|
2170
|
+
return le(() => {
|
|
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 D, O,
|
|
2174
|
+
var D, O, z, Y;
|
|
2175
2175
|
const {
|
|
2176
2176
|
i18n: t
|
|
2177
2177
|
} = e, {
|
|
@@ -2180,8 +2180,8 @@ 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 P = (
|
|
2184
|
-
return
|
|
2183
|
+
const P = (W, R) => Ie(R) ? R : Bn(R) && Ie(R.defaultValue) ? R.defaultValue : Array.isArray(W) ? W[W.length - 1] : W, U = [P, {}, !1];
|
|
2184
|
+
return U.t = P, U.i18n = {}, U.ready = !1, U;
|
|
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 = {
|
|
@@ -2193,32 +2193,32 @@ const Qn = (r, e) => {
|
|
|
2193
2193
|
keyPrefix: c
|
|
2194
2194
|
} = i;
|
|
2195
2195
|
let f = n || ((O = a.options) == null ? void 0 : O.defaultNS);
|
|
2196
|
-
f = Ie(f) ? [f] : f || ["translation"], (Y = (
|
|
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,
|
|
2198
|
-
let
|
|
2199
|
-
e.lng && (
|
|
2200
|
-
const
|
|
2201
|
-
|
|
2196
|
+
f = Ie(f) ? [f] : f || ["translation"], (Y = (z = a.reportNamespaces).addUsedNamespaces) == null || Y.call(z, 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, v = () => cs(a, e.lng || null, i.nsMode === "fallback" ? f : f[0], c), [k, j] = ee(h);
|
|
2198
|
+
let F = f.join();
|
|
2199
|
+
e.lng && (F = `${e.lng}${F}`);
|
|
2200
|
+
const y = Qn(F), p = _e(!0);
|
|
2201
|
+
le(() => {
|
|
2202
2202
|
const {
|
|
2203
2203
|
bindI18n: P,
|
|
2204
|
-
bindI18nStore:
|
|
2204
|
+
bindI18nStore: U
|
|
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(v);
|
|
2208
2208
|
}) : At(a, f, () => {
|
|
2209
|
-
p.current && j(
|
|
2210
|
-
})), d &&
|
|
2211
|
-
const
|
|
2212
|
-
p.current && j(
|
|
2209
|
+
p.current && j(v);
|
|
2210
|
+
})), d && y && y !== F && p.current && j(v);
|
|
2211
|
+
const W = () => {
|
|
2212
|
+
p.current && j(v);
|
|
2213
2213
|
};
|
|
2214
|
-
return P && (a == null || a.on(P,
|
|
2215
|
-
p.current = !1, a && (P == null || P.split(" ").forEach((
|
|
2214
|
+
return P && (a == null || a.on(P, W)), U && (a == null || a.store.on(U, W)), () => {
|
|
2215
|
+
p.current = !1, a && (P == null || P.split(" ").forEach((R) => a.off(R, W))), U && a && U.split(" ").forEach((R) => a.store.off(R, W));
|
|
2216
2216
|
};
|
|
2217
|
-
}, [a,
|
|
2217
|
+
}, [a, F]), le(() => {
|
|
2218
2218
|
p.current && d && j(h);
|
|
2219
2219
|
}, [a, c, d]);
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2220
|
+
const E = [k, a, d];
|
|
2221
|
+
if (E.t = k, E.i18n = a, E.ready = d, d || !d && !l) return E;
|
|
2222
2222
|
throw new Promise((P) => {
|
|
2223
2223
|
e.lng ? br(a, e.lng, f, () => P()) : At(a, f, () => P());
|
|
2224
2224
|
});
|
|
@@ -2231,25 +2231,25 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2231
2231
|
const { t: f } = qt(), d = _e(null), m = typeof s == "number" && e.length >= s, h = () => {
|
|
2232
2232
|
var p;
|
|
2233
2233
|
!i && !m && ((p = d.current) == null || p.click());
|
|
2234
|
-
},
|
|
2235
|
-
const
|
|
2236
|
-
if (!
|
|
2237
|
-
const D = Array.from(
|
|
2234
|
+
}, v = (p) => {
|
|
2235
|
+
const E = p.target.files;
|
|
2236
|
+
if (!E) return;
|
|
2237
|
+
const D = Array.from(E);
|
|
2238
2238
|
let O = e.concat(D);
|
|
2239
2239
|
s && (O = O.slice(0, s)), t(O), p.target.value = "";
|
|
2240
2240
|
}, k = (p) => {
|
|
2241
2241
|
if (p.preventDefault(), i || m) return;
|
|
2242
|
-
const
|
|
2243
|
-
let D = e.concat(
|
|
2242
|
+
const E = Array.from(p.dataTransfer.files);
|
|
2243
|
+
let D = e.concat(E);
|
|
2244
2244
|
s && (D = D.slice(0, s)), t(D);
|
|
2245
2245
|
}, j = (p) => {
|
|
2246
2246
|
p.preventDefault();
|
|
2247
|
-
},
|
|
2248
|
-
const
|
|
2249
|
-
window.open(
|
|
2250
|
-
},
|
|
2251
|
-
const
|
|
2252
|
-
t(
|
|
2247
|
+
}, F = (p) => {
|
|
2248
|
+
const E = URL.createObjectURL(p);
|
|
2249
|
+
window.open(E);
|
|
2250
|
+
}, y = (p) => {
|
|
2251
|
+
const E = e.filter((D, O) => O !== p);
|
|
2252
|
+
t(E);
|
|
2253
2253
|
};
|
|
2254
2254
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2255
2255
|
/* @__PURE__ */ o.jsx("div", { className: "self-start mb-4 w-auto", children: /* @__PURE__ */ o.jsx(
|
|
@@ -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: v,
|
|
2289
2289
|
disabled: i
|
|
2290
2290
|
}
|
|
2291
2291
|
),
|
|
@@ -2304,7 +2304,7 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2304
2304
|
]
|
|
2305
2305
|
}
|
|
2306
2306
|
),
|
|
2307
|
-
e.length > 0 && /* @__PURE__ */ o.jsx("ul", { className: "mt-4 space-y-1", children: e.map((p,
|
|
2307
|
+
e.length > 0 && /* @__PURE__ */ o.jsx("ul", { className: "mt-4 space-y-1", children: e.map((p, E) => /* @__PURE__ */ o.jsxs(
|
|
2308
2308
|
"li",
|
|
2309
2309
|
{
|
|
2310
2310
|
className: "flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",
|
|
@@ -2321,7 +2321,7 @@ function wr(r, e, t, s, n, a, i, l, c) {
|
|
|
2321
2321
|
size: "sm",
|
|
2322
2322
|
icon: zr,
|
|
2323
2323
|
ariaLabel: f("ds.fileUploader.view", "View"),
|
|
2324
|
-
onClick: () =>
|
|
2324
|
+
onClick: () => F(p)
|
|
2325
2325
|
}
|
|
2326
2326
|
),
|
|
2327
2327
|
/* @__PURE__ */ o.jsx(
|
|
@@ -2331,13 +2331,13 @@ 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: () => y(E)
|
|
2335
2335
|
}
|
|
2336
2336
|
)
|
|
2337
2337
|
] })
|
|
2338
2338
|
]
|
|
2339
2339
|
},
|
|
2340
|
-
|
|
2340
|
+
E
|
|
2341
2341
|
)) }),
|
|
2342
2342
|
/* @__PURE__ */ o.jsx("div", { className: "pt-[5px] min-h-[18px] w-full", children: l != null && l.message ? /* @__PURE__ */ o.jsx("span", { className: "text-xs text-[var(--color-ds-text-error)]", children: l.message }) : /* @__PURE__ */ o.jsx("span", { "aria-hidden": "true", children: " " }) })
|
|
2343
2343
|
] });
|
|
@@ -2356,15 +2356,15 @@ function ta(r) {
|
|
|
2356
2356
|
labelHidden: d = !1,
|
|
2357
2357
|
disabled: m = !1,
|
|
2358
2358
|
hasError: h = !1,
|
|
2359
|
-
errorMessage:
|
|
2359
|
+
errorMessage: v = "",
|
|
2360
2360
|
className: k
|
|
2361
|
-
} = r, j = Ue(),
|
|
2361
|
+
} = r, j = Ue(), F = t || j;
|
|
2362
2362
|
if (e && t)
|
|
2363
2363
|
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", k), style: { width: c }, children: [
|
|
2364
2364
|
f && /* @__PURE__ */ o.jsx(
|
|
2365
2365
|
"label",
|
|
2366
2366
|
{
|
|
2367
|
-
htmlFor:
|
|
2367
|
+
htmlFor: F,
|
|
2368
2368
|
className: $(
|
|
2369
2369
|
"pb-[10px] text-[var(--color-ds-text-primary)]",
|
|
2370
2370
|
$t[l],
|
|
@@ -2380,10 +2380,10 @@ function ta(r) {
|
|
|
2380
2380
|
control: e,
|
|
2381
2381
|
rules: s,
|
|
2382
2382
|
defaultValue: n instanceof FileList ? Array.from(n) : n || [],
|
|
2383
|
-
render: ({ field:
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
(O) =>
|
|
2383
|
+
render: ({ field: E, fieldState: D }) => wr(
|
|
2384
|
+
F,
|
|
2385
|
+
E.value,
|
|
2386
|
+
(O) => E.onChange(O),
|
|
2387
2387
|
a,
|
|
2388
2388
|
i,
|
|
2389
2389
|
l,
|
|
@@ -2394,14 +2394,14 @@ function ta(r) {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
)
|
|
2396
2396
|
] });
|
|
2397
|
-
const [
|
|
2397
|
+
const [y, p] = ee(
|
|
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: [
|
|
2401
2401
|
f && /* @__PURE__ */ o.jsx(
|
|
2402
2402
|
"label",
|
|
2403
2403
|
{
|
|
2404
|
-
htmlFor:
|
|
2404
|
+
htmlFor: F,
|
|
2405
2405
|
className: $(
|
|
2406
2406
|
"pb-[10px] text-[var(--color-ds-text-primary)]",
|
|
2407
2407
|
$t[l],
|
|
@@ -2411,14 +2411,14 @@ function ta(r) {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
),
|
|
2413
2413
|
wr(
|
|
2414
|
-
|
|
2415
|
-
|
|
2414
|
+
F,
|
|
2415
|
+
y,
|
|
2416
2416
|
p,
|
|
2417
2417
|
a,
|
|
2418
2418
|
i,
|
|
2419
2419
|
l,
|
|
2420
2420
|
m,
|
|
2421
|
-
h ? { message:
|
|
2421
|
+
h ? { message: v } : void 0,
|
|
2422
2422
|
k
|
|
2423
2423
|
)
|
|
2424
2424
|
] });
|
|
@@ -2483,15 +2483,15 @@ function Ht({
|
|
|
2483
2483
|
separator: d,
|
|
2484
2484
|
suffixButton: m,
|
|
2485
2485
|
disabled: h = !1,
|
|
2486
|
-
control:
|
|
2486
|
+
control: v,
|
|
2487
2487
|
name: k,
|
|
2488
2488
|
rules: j,
|
|
2489
|
-
defaultValue:
|
|
2490
|
-
loading:
|
|
2489
|
+
defaultValue: F,
|
|
2490
|
+
loading: y = !1,
|
|
2491
2491
|
className: p,
|
|
2492
|
-
...
|
|
2492
|
+
...E
|
|
2493
2493
|
}) {
|
|
2494
|
-
const D = Ue(), [O,
|
|
2494
|
+
const D = Ue(), [O, z] = ee(!1), Y = r || D, P = e === "password", W = c ?? (e === "number" ? on : void 0), R = P ? O ? sn : zr : f, M = $(
|
|
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,7 +2503,7 @@ function Ht({
|
|
|
2503
2503
|
"disabled:text-[var(--color-ds-text-disabled)]",
|
|
2504
2504
|
"disabled:cursor-not-allowed"
|
|
2505
2505
|
);
|
|
2506
|
-
return
|
|
2506
|
+
return y ? /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s, maxWidth: "100%" }, children: [
|
|
2507
2507
|
!a && n && /* @__PURE__ */ o.jsx("label", { htmlFor: Y, className: $("pb-2", nt[t]), children: n }),
|
|
2508
2508
|
/* @__PURE__ */ o.jsx(
|
|
2509
2509
|
He,
|
|
@@ -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
|
+
] }) : v && k ? /* @__PURE__ */ o.jsx(
|
|
2519
2519
|
ke,
|
|
2520
2520
|
{
|
|
2521
2521
|
name: k,
|
|
2522
|
-
control:
|
|
2522
|
+
control: v,
|
|
2523
2523
|
rules: j,
|
|
2524
|
-
defaultValue:
|
|
2525
|
-
render: ({ field:
|
|
2524
|
+
defaultValue: F,
|
|
2525
|
+
render: ({ field: B, fieldState: _ }) => /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s }, children: [
|
|
2526
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
|
+
W && /* @__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: W,
|
|
2539
2539
|
size: t,
|
|
2540
2540
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2541
2541
|
}
|
|
@@ -2545,18 +2545,18 @@ function Ht({
|
|
|
2545
2545
|
/* @__PURE__ */ o.jsx(
|
|
2546
2546
|
"input",
|
|
2547
2547
|
{
|
|
2548
|
-
...
|
|
2548
|
+
...B,
|
|
2549
2549
|
id: Y,
|
|
2550
2550
|
type: P ? O ? "text" : "password" : e,
|
|
2551
2551
|
disabled: h,
|
|
2552
|
-
"aria-invalid": !!
|
|
2552
|
+
"aria-invalid": !!_.error,
|
|
2553
2553
|
className: $(
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2554
|
+
M,
|
|
2555
|
+
W && "pl-9",
|
|
2556
|
+
R && "pr-9",
|
|
2557
2557
|
p
|
|
2558
2558
|
),
|
|
2559
|
-
onInvalid: (
|
|
2559
|
+
onInvalid: (C) => C.preventDefault(),
|
|
2560
2560
|
style: P && !O ? {
|
|
2561
2561
|
WebkitTextSecurity: "disc",
|
|
2562
2562
|
MozTextSecurity: "disc"
|
|
@@ -2565,17 +2565,17 @@ function Ht({
|
|
|
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
|
+
R && /* @__PURE__ */ o.jsx(
|
|
2569
2569
|
"button",
|
|
2570
2570
|
{
|
|
2571
2571
|
type: "button",
|
|
2572
|
-
onClick: () =>
|
|
2572
|
+
onClick: () => z((C) => !C),
|
|
2573
2573
|
className: "absolute right-0 flex items-center h-full pr-2",
|
|
2574
2574
|
tabIndex: -1,
|
|
2575
2575
|
children: /* @__PURE__ */ o.jsx(
|
|
2576
2576
|
Oe,
|
|
2577
2577
|
{
|
|
2578
|
-
component:
|
|
2578
|
+
component: R,
|
|
2579
2579
|
size: t,
|
|
2580
2580
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2581
2581
|
}
|
|
@@ -2583,13 +2583,13 @@ function Ht({
|
|
|
2583
2583
|
}
|
|
2584
2584
|
)
|
|
2585
2585
|
] }),
|
|
2586
|
-
/* @__PURE__ */ o.jsx("div", { className: "min-h-[18px]", children:
|
|
2586
|
+
/* @__PURE__ */ o.jsx("div", { className: "min-h-[18px]", children: _.error ? /* @__PURE__ */ o.jsx("span", { className: "text-xs text-[var(--color-ds-text-error)]", children: _.error.message }) : /* @__PURE__ */ o.jsx("span", { "aria-hidden": "true", children: " " }) })
|
|
2587
2587
|
] })
|
|
2588
2588
|
}
|
|
2589
2589
|
) : /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col", style: { width: s }, children: [
|
|
2590
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
|
+
W && /* @__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: W,
|
|
2603
2603
|
size: t,
|
|
2604
2604
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2605
2605
|
}
|
|
@@ -2609,18 +2609,18 @@ function Ht({
|
|
|
2609
2609
|
/* @__PURE__ */ o.jsx(
|
|
2610
2610
|
"input",
|
|
2611
2611
|
{
|
|
2612
|
-
...
|
|
2612
|
+
...E,
|
|
2613
2613
|
id: Y,
|
|
2614
2614
|
type: P ? O ? "text" : "password" : e,
|
|
2615
2615
|
disabled: h,
|
|
2616
2616
|
"aria-invalid": i,
|
|
2617
2617
|
className: $(
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2618
|
+
M,
|
|
2619
|
+
W && "pl-9",
|
|
2620
|
+
R && "pr-9",
|
|
2621
2621
|
p
|
|
2622
2622
|
),
|
|
2623
|
-
onInvalid: (
|
|
2623
|
+
onInvalid: (B) => B.preventDefault(),
|
|
2624
2624
|
style: P && !O ? {
|
|
2625
2625
|
WebkitTextSecurity: "disc",
|
|
2626
2626
|
MozTextSecurity: "disc"
|
|
@@ -2629,17 +2629,17 @@ function Ht({
|
|
|
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
|
+
R && /* @__PURE__ */ o.jsx(
|
|
2633
2633
|
"button",
|
|
2634
2634
|
{
|
|
2635
2635
|
type: "button",
|
|
2636
|
-
onClick: () =>
|
|
2636
|
+
onClick: () => z((B) => !B),
|
|
2637
2637
|
className: "absolute right-0 flex items-center h-full pr-2",
|
|
2638
2638
|
tabIndex: -1,
|
|
2639
2639
|
children: /* @__PURE__ */ o.jsx(
|
|
2640
2640
|
Oe,
|
|
2641
2641
|
{
|
|
2642
|
-
component:
|
|
2642
|
+
component: R,
|
|
2643
2643
|
size: t,
|
|
2644
2644
|
className: "text-[var(--color-ds-text-secondary)]"
|
|
2645
2645
|
}
|
|
@@ -2660,26 +2660,26 @@ const aa = {
|
|
|
2660
2660
|
position: t = "top",
|
|
2661
2661
|
className: s
|
|
2662
2662
|
}) => {
|
|
2663
|
-
const [n, a] =
|
|
2664
|
-
|
|
2663
|
+
const [n, a] = ee(!1), [i, l] = ee({ x: 0, y: 0 }), c = _e(null), f = Ue();
|
|
2664
|
+
le(() => {
|
|
2665
2665
|
if (n && c.current) {
|
|
2666
2666
|
const h = c.current.getBoundingClientRect();
|
|
2667
|
-
let
|
|
2667
|
+
let v = 0, k = 0;
|
|
2668
2668
|
switch (t) {
|
|
2669
2669
|
case "top":
|
|
2670
|
-
|
|
2670
|
+
v = h.left + h.width / 2 - Et / 2, k = h.top - at;
|
|
2671
2671
|
break;
|
|
2672
2672
|
case "bottom":
|
|
2673
|
-
|
|
2673
|
+
v = h.left + h.width / 2 - Et / 2, k = h.bottom + at;
|
|
2674
2674
|
break;
|
|
2675
2675
|
case "left":
|
|
2676
|
-
|
|
2676
|
+
v = h.left - Et - at, k = h.top + h.height / 2;
|
|
2677
2677
|
break;
|
|
2678
2678
|
case "right":
|
|
2679
|
-
|
|
2679
|
+
v = h.right + at, k = h.top + h.height / 2;
|
|
2680
2680
|
break;
|
|
2681
2681
|
}
|
|
2682
|
-
l({ x:
|
|
2682
|
+
l({ x: v, y: k });
|
|
2683
2683
|
}
|
|
2684
2684
|
}, [n, t]);
|
|
2685
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(
|
|
@@ -2734,11 +2734,11 @@ function oa({
|
|
|
2734
2734
|
disabled: c,
|
|
2735
2735
|
info: f
|
|
2736
2736
|
}) {
|
|
2737
|
-
var
|
|
2737
|
+
var F;
|
|
2738
2738
|
const {
|
|
2739
2739
|
control: d,
|
|
2740
2740
|
formState: { errors: m }
|
|
2741
|
-
} = bt(), h = !!m[r],
|
|
2741
|
+
} = bt(), h = !!m[r], v = ((F = m[r]) == null ? void 0 : F.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,7 +2746,7 @@ function oa({
|
|
|
2746
2746
|
name: r,
|
|
2747
2747
|
control: d,
|
|
2748
2748
|
rules: i,
|
|
2749
|
-
render: ({ field:
|
|
2749
|
+
render: ({ field: y }) => /* @__PURE__ */ o.jsx(
|
|
2750
2750
|
Ht,
|
|
2751
2751
|
{
|
|
2752
2752
|
label: e,
|
|
@@ -2754,10 +2754,10 @@ function oa({
|
|
|
2754
2754
|
width: j,
|
|
2755
2755
|
placeholder: a,
|
|
2756
2756
|
hasError: h,
|
|
2757
|
-
errorMessage:
|
|
2757
|
+
errorMessage: v,
|
|
2758
2758
|
loading: l,
|
|
2759
2759
|
type: t,
|
|
2760
|
-
...
|
|
2760
|
+
...y,
|
|
2761
2761
|
disabled: c
|
|
2762
2762
|
}
|
|
2763
2763
|
)
|
|
@@ -2806,14 +2806,14 @@ function la({
|
|
|
2806
2806
|
onChange: t,
|
|
2807
2807
|
children: s
|
|
2808
2808
|
}) {
|
|
2809
|
-
const n = _e(null), [a, i] =
|
|
2809
|
+
const n = _e(null), [a, i] = ee({ left: 0, width: 0 });
|
|
2810
2810
|
return Pr(() => {
|
|
2811
2811
|
const l = n.current;
|
|
2812
2812
|
if (!l) return;
|
|
2813
2813
|
const c = () => {
|
|
2814
|
-
const f = r.findIndex((
|
|
2814
|
+
const f = r.findIndex((F) => F.value === e);
|
|
2815
2815
|
if (f < 0) return;
|
|
2816
|
-
const d = l.children[f], m = d.querySelector("span"), h = (m == null ? void 0 : m.offsetWidth) ?? d.offsetWidth,
|
|
2816
|
+
const d = l.children[f], m = d.querySelector("span"), h = (m == null ? void 0 : m.offsetWidth) ?? d.offsetWidth, v = d.offsetWidth, j = d.offsetLeft + (v - h) / 2;
|
|
2817
2817
|
i({ left: j, width: h });
|
|
2818
2818
|
};
|
|
2819
2819
|
return c(), window.addEventListener("resize", c), l.addEventListener("scroll", c), () => {
|
|
@@ -2922,34 +2922,34 @@ function pt(r) {
|
|
|
2922
2922
|
size: d = "sm",
|
|
2923
2923
|
width: m = "100%",
|
|
2924
2924
|
label: h,
|
|
2925
|
-
labelHidden:
|
|
2925
|
+
labelHidden: v = !1,
|
|
2926
2926
|
hasError: k = !1,
|
|
2927
2927
|
errorMessage: j = "",
|
|
2928
|
-
disableErrorPlaceholder:
|
|
2929
|
-
disabled:
|
|
2928
|
+
disableErrorPlaceholder: F = !1,
|
|
2929
|
+
disabled: y = !1,
|
|
2930
2930
|
className: p,
|
|
2931
|
-
suffixButton:
|
|
2932
|
-
} = r, D = Ue(), O = t || D, [
|
|
2933
|
-
if (
|
|
2934
|
-
i && (
|
|
2935
|
-
}, [i, ...l]),
|
|
2936
|
-
!e &&
|
|
2937
|
-
}, [
|
|
2931
|
+
suffixButton: E
|
|
2932
|
+
} = r, D = Ue(), O = t || D, [z, Y] = ee(a), [P, U] = ee(!!i);
|
|
2933
|
+
if (le(() => {
|
|
2934
|
+
i && (U(!0), i().then((W) => Y(W)).finally(() => U(!1)));
|
|
2935
|
+
}, [i, ...l]), le(() => {
|
|
2936
|
+
!e && z.length > 0 && (c === void 0 || c === "" || !z.some((W) => W.value === c)) && (f == null || f(z[0].value));
|
|
2937
|
+
}, [z, c, f, e]), e && t) {
|
|
2938
2938
|
const {
|
|
2939
|
-
field:
|
|
2940
|
-
fieldState:
|
|
2939
|
+
field: W,
|
|
2940
|
+
fieldState: R
|
|
2941
2941
|
} = Qr({
|
|
2942
2942
|
name: t,
|
|
2943
2943
|
control: e,
|
|
2944
2944
|
rules: s,
|
|
2945
2945
|
defaultValue: n
|
|
2946
2946
|
});
|
|
2947
|
-
return
|
|
2948
|
-
if (!P &&
|
|
2949
|
-
const
|
|
2950
|
-
(
|
|
2947
|
+
return le(() => {
|
|
2948
|
+
if (!P && z.length > 0) {
|
|
2949
|
+
const M = W.value;
|
|
2950
|
+
(M === void 0 || !z.some((B) => B.value === M)) && W.onChange(z[0].value);
|
|
2951
2951
|
}
|
|
2952
|
-
}, [
|
|
2952
|
+
}, [z, P, W]), /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", p), style: { width: m, maxWidth: "100%" }, children: [
|
|
2953
2953
|
h && /* @__PURE__ */ o.jsx(
|
|
2954
2954
|
"label",
|
|
2955
2955
|
{
|
|
@@ -2957,7 +2957,7 @@ function pt(r) {
|
|
|
2957
2957
|
className: $(
|
|
2958
2958
|
"pb-2 text-[var(--color-ds-text-primary)]",
|
|
2959
2959
|
Dt[d],
|
|
2960
|
-
|
|
2960
|
+
v && "sr-only"
|
|
2961
2961
|
),
|
|
2962
2962
|
children: h
|
|
2963
2963
|
}
|
|
@@ -2972,17 +2972,17 @@ function pt(r) {
|
|
|
2972
2972
|
}
|
|
2973
2973
|
) : Er(
|
|
2974
2974
|
O,
|
|
2975
|
-
|
|
2975
|
+
z,
|
|
2976
2976
|
d,
|
|
2977
2977
|
{
|
|
2978
|
-
value:
|
|
2979
|
-
onChange: (
|
|
2978
|
+
value: W.value,
|
|
2979
|
+
onChange: (M) => W.onChange(M.target.value)
|
|
2980
2980
|
},
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2981
|
+
y,
|
|
2982
|
+
R.error,
|
|
2983
|
+
F,
|
|
2984
2984
|
p,
|
|
2985
|
-
|
|
2985
|
+
E
|
|
2986
2986
|
)
|
|
2987
2987
|
] });
|
|
2988
2988
|
}
|
|
@@ -2994,7 +2994,7 @@ function pt(r) {
|
|
|
2994
2994
|
className: $(
|
|
2995
2995
|
"pb-2 text-[var(--color-ds-text-primary)]",
|
|
2996
2996
|
Dt[d],
|
|
2997
|
-
|
|
2997
|
+
v && "sr-only"
|
|
2998
2998
|
),
|
|
2999
2999
|
children: h
|
|
3000
3000
|
}
|
|
@@ -3009,17 +3009,17 @@ function pt(r) {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
) : Er(
|
|
3011
3011
|
O,
|
|
3012
|
-
|
|
3012
|
+
z,
|
|
3013
3013
|
d,
|
|
3014
3014
|
{
|
|
3015
3015
|
value: c,
|
|
3016
|
-
onChange: (
|
|
3016
|
+
onChange: (W) => f == null ? void 0 : f(W.target.value)
|
|
3017
3017
|
},
|
|
3018
|
-
|
|
3018
|
+
y,
|
|
3019
3019
|
k ? { message: j } : void 0,
|
|
3020
|
-
|
|
3020
|
+
F,
|
|
3021
3021
|
p,
|
|
3022
|
-
|
|
3022
|
+
E
|
|
3023
3023
|
)
|
|
3024
3024
|
] });
|
|
3025
3025
|
}
|
|
@@ -3051,24 +3051,24 @@ function da({
|
|
|
3051
3051
|
const {
|
|
3052
3052
|
width: m,
|
|
3053
3053
|
className: h,
|
|
3054
|
-
options:
|
|
3054
|
+
options: v,
|
|
3055
3055
|
loadOptions: k,
|
|
3056
3056
|
...j
|
|
3057
|
-
} = f,
|
|
3058
|
-
let
|
|
3059
|
-
!s && c > 1 && (d === 0 ?
|
|
3057
|
+
} = f, F = Array.isArray(v) || typeof k == "function";
|
|
3058
|
+
let y = "rounded-lg";
|
|
3059
|
+
!s && c > 1 && (d === 0 ? y = "rounded-l-lg rounded-r-none" : d === c - 1 ? y = "rounded-r-lg rounded-l-none" : y = "rounded-none");
|
|
3060
3060
|
const p = $(
|
|
3061
3061
|
"inline-flex items-center flex-shrink-0 overflow-hidden",
|
|
3062
3062
|
typeof m == "string" && m.startsWith("w-") ? m : void 0
|
|
3063
|
-
),
|
|
3064
|
-
return /* @__PURE__ */ o.jsxs("div", { className: p, style:
|
|
3065
|
-
|
|
3063
|
+
), E = typeof m == "string" && !m.startsWith("w-") ? { width: m } : void 0, D = $(h, y);
|
|
3064
|
+
return /* @__PURE__ */ o.jsxs("div", { className: p, style: E, children: [
|
|
3065
|
+
F ? /* @__PURE__ */ o.jsx(
|
|
3066
3066
|
pt,
|
|
3067
3067
|
{
|
|
3068
3068
|
...j,
|
|
3069
3069
|
size: i,
|
|
3070
3070
|
className: D,
|
|
3071
|
-
options:
|
|
3071
|
+
options: v,
|
|
3072
3072
|
loadOptions: k
|
|
3073
3073
|
}
|
|
3074
3074
|
) : /* @__PURE__ */ o.jsx(
|
|
@@ -3116,14 +3116,14 @@ function ha({
|
|
|
3116
3116
|
rules: n,
|
|
3117
3117
|
defaultValue: a,
|
|
3118
3118
|
render: ({ field: m, fieldState: h }) => {
|
|
3119
|
-
const { value:
|
|
3119
|
+
const { value: v, onChange: k } = m;
|
|
3120
3120
|
h.error;
|
|
3121
|
-
const j = (
|
|
3121
|
+
const j = (y) => i ? Array.isArray(v) && v.includes(y) : v === y, F = (y) => {
|
|
3122
3122
|
if (i) {
|
|
3123
|
-
const p = Array.isArray(
|
|
3124
|
-
|
|
3123
|
+
const p = Array.isArray(v) ? [...v] : [], E = p.indexOf(y);
|
|
3124
|
+
E >= 0 ? p.splice(E, 1) : p.push(y), k(p);
|
|
3125
3125
|
} else
|
|
3126
|
-
k(
|
|
3126
|
+
k(y);
|
|
3127
3127
|
};
|
|
3128
3128
|
return /* @__PURE__ */ o.jsxs("div", { className: $("w-full", f), children: [
|
|
3129
3129
|
/* @__PURE__ */ o.jsx(
|
|
@@ -3152,7 +3152,7 @@ function ha({
|
|
|
3152
3152
|
className: $(
|
|
3153
3153
|
c ? "flex flex-col gap-2" : "flex flex-wrap gap-4"
|
|
3154
3154
|
),
|
|
3155
|
-
children: e.map((
|
|
3155
|
+
children: e.map((y) => /* @__PURE__ */ o.jsxs(
|
|
3156
3156
|
"label",
|
|
3157
3157
|
{
|
|
3158
3158
|
className: "inline-flex items-center space-x-2 cursor-pointer select-none",
|
|
@@ -3162,9 +3162,9 @@ function ha({
|
|
|
3162
3162
|
{
|
|
3163
3163
|
type: i ? "checkbox" : "radio",
|
|
3164
3164
|
name: s,
|
|
3165
|
-
value:
|
|
3166
|
-
checked: j(
|
|
3167
|
-
onChange: () =>
|
|
3165
|
+
value: y.value,
|
|
3166
|
+
checked: j(y.value),
|
|
3167
|
+
onChange: () => F(y.value),
|
|
3168
3168
|
className: $(
|
|
3169
3169
|
fa[l],
|
|
3170
3170
|
"text-[var(--color-ds-button-primary-bg)]",
|
|
@@ -3172,10 +3172,10 @@ function ha({
|
|
|
3172
3172
|
)
|
|
3173
3173
|
}
|
|
3174
3174
|
),
|
|
3175
|
-
/* @__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: y.label })
|
|
3176
3176
|
]
|
|
3177
3177
|
},
|
|
3178
|
-
|
|
3178
|
+
y.value
|
|
3179
3179
|
))
|
|
3180
3180
|
}
|
|
3181
3181
|
)
|
|
@@ -3214,7 +3214,7 @@ const xa = {
|
|
|
3214
3214
|
variant: t = "info",
|
|
3215
3215
|
duration: s = 5e3,
|
|
3216
3216
|
onClose: n
|
|
3217
|
-
}) => (
|
|
3217
|
+
}) => (le(() => {
|
|
3218
3218
|
const a = setTimeout(() => n(r), s);
|
|
3219
3219
|
return () => clearTimeout(a);
|
|
3220
3220
|
}, [r, s, n]), /* @__PURE__ */ o.jsxs(
|
|
@@ -3267,7 +3267,7 @@ const ds = Lt(null), ja = () => {
|
|
|
3267
3267
|
if (!r) throw new Error("useToast debe usarse dentro de <ToastProvider>");
|
|
3268
3268
|
return r;
|
|
3269
3269
|
}, Ni = ({ children: r }) => {
|
|
3270
|
-
const [e, t] =
|
|
3270
|
+
const [e, t] = ee([]), s = (a, i = "info", l = 5e3) => {
|
|
3271
3271
|
const c = wa();
|
|
3272
3272
|
t((f) => [...f, { id: c, message: a, variant: i, duration: l }]);
|
|
3273
3273
|
}, n = (a) => {
|
|
@@ -3304,8 +3304,8 @@ const ds = Lt(null), ja = () => {
|
|
|
3304
3304
|
const n = T(e.fields, s), a = Object.assign(r[s] || {}, { ref: n && n.ref });
|
|
3305
3305
|
if (Ea(e.names || Object.keys(r), s)) {
|
|
3306
3306
|
const i = Object.assign({}, T(t, s));
|
|
3307
|
-
|
|
3308
|
-
} else
|
|
3307
|
+
K(i, "root", a), K(t, s, i);
|
|
3308
|
+
} else K(t, s, a);
|
|
3309
3309
|
}
|
|
3310
3310
|
return t;
|
|
3311
3311
|
}, Ea = (r, e) => {
|
|
@@ -3347,78 +3347,78 @@ var Nt, Cr;
|
|
|
3347
3347
|
function Na() {
|
|
3348
3348
|
if (Cr) return Nt;
|
|
3349
3349
|
Cr = 1;
|
|
3350
|
-
function r(
|
|
3351
|
-
this._maxSize =
|
|
3350
|
+
function r(y) {
|
|
3351
|
+
this._maxSize = y, this.clear();
|
|
3352
3352
|
}
|
|
3353
3353
|
r.prototype.clear = function() {
|
|
3354
3354
|
this._size = 0, this._values = /* @__PURE__ */ Object.create(null);
|
|
3355
|
-
}, r.prototype.get = function(
|
|
3356
|
-
return this._values[
|
|
3357
|
-
}, r.prototype.set = function(
|
|
3358
|
-
return this._size >= this._maxSize && this.clear(),
|
|
3355
|
+
}, r.prototype.get = function(y) {
|
|
3356
|
+
return this._values[y];
|
|
3357
|
+
}, r.prototype.set = function(y, p) {
|
|
3358
|
+
return this._size >= this._maxSize && this.clear(), y in this._values || this._size++, this._values[y] = p;
|
|
3359
3359
|
};
|
|
3360
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);
|
|
3361
3361
|
Nt = {
|
|
3362
3362
|
Cache: r,
|
|
3363
3363
|
split: m,
|
|
3364
3364
|
normalizePath: d,
|
|
3365
|
-
setter: function(
|
|
3366
|
-
var p = d(
|
|
3367
|
-
return c.get(
|
|
3368
|
-
for (var
|
|
3369
|
-
var
|
|
3370
|
-
if (
|
|
3365
|
+
setter: function(y) {
|
|
3366
|
+
var p = d(y);
|
|
3367
|
+
return c.get(y) || c.set(y, function(D, O) {
|
|
3368
|
+
for (var z = 0, Y = p.length, P = D; z < Y - 1; ) {
|
|
3369
|
+
var U = p[z];
|
|
3370
|
+
if (U === "__proto__" || U === "constructor" || U === "prototype")
|
|
3371
3371
|
return D;
|
|
3372
|
-
P = P[p[
|
|
3372
|
+
P = P[p[z++]];
|
|
3373
3373
|
}
|
|
3374
|
-
P[p[
|
|
3374
|
+
P[p[z]] = O;
|
|
3375
3375
|
});
|
|
3376
3376
|
},
|
|
3377
|
-
getter: function(
|
|
3378
|
-
var
|
|
3379
|
-
return f.get(
|
|
3380
|
-
for (var
|
|
3381
|
-
if (O != null || !p) O = O[
|
|
3377
|
+
getter: function(y, p) {
|
|
3378
|
+
var E = d(y);
|
|
3379
|
+
return f.get(y) || f.set(y, function(O) {
|
|
3380
|
+
for (var z = 0, Y = E.length; z < Y; )
|
|
3381
|
+
if (O != null || !p) O = O[E[z++]];
|
|
3382
3382
|
else return;
|
|
3383
3383
|
return O;
|
|
3384
3384
|
});
|
|
3385
3385
|
},
|
|
3386
|
-
join: function(
|
|
3387
|
-
return
|
|
3388
|
-
return p + (
|
|
3386
|
+
join: function(y) {
|
|
3387
|
+
return y.reduce(function(p, E) {
|
|
3388
|
+
return p + (v(E) || t.test(E) ? "[" + E + "]" : (p ? "." : "") + E);
|
|
3389
3389
|
}, "");
|
|
3390
3390
|
},
|
|
3391
|
-
forEach: function(
|
|
3392
|
-
h(Array.isArray(
|
|
3391
|
+
forEach: function(y, p, E) {
|
|
3392
|
+
h(Array.isArray(y) ? y : m(y), p, E);
|
|
3393
3393
|
}
|
|
3394
3394
|
};
|
|
3395
|
-
function d(
|
|
3396
|
-
return l.get(
|
|
3397
|
-
|
|
3398
|
-
m(
|
|
3395
|
+
function d(y) {
|
|
3396
|
+
return l.get(y) || l.set(
|
|
3397
|
+
y,
|
|
3398
|
+
m(y).map(function(p) {
|
|
3399
3399
|
return p.replace(a, "$2");
|
|
3400
3400
|
})
|
|
3401
3401
|
);
|
|
3402
3402
|
}
|
|
3403
|
-
function m(
|
|
3404
|
-
return
|
|
3403
|
+
function m(y) {
|
|
3404
|
+
return y.match(e) || [""];
|
|
3405
3405
|
}
|
|
3406
|
-
function h(
|
|
3407
|
-
var D =
|
|
3408
|
-
for (
|
|
3409
|
-
O =
|
|
3406
|
+
function h(y, p, E) {
|
|
3407
|
+
var D = y.length, O, z, Y, P;
|
|
3408
|
+
for (z = 0; z < D; z++)
|
|
3409
|
+
O = y[z], O && (F(O) && (O = '"' + O + '"'), P = v(O), Y = !P && /^\d+$/.test(O), p.call(E, O, P, Y, z, y));
|
|
3410
3410
|
}
|
|
3411
|
-
function
|
|
3412
|
-
return typeof
|
|
3411
|
+
function v(y) {
|
|
3412
|
+
return typeof y == "string" && y && ["'", '"'].indexOf(y.charAt(0)) !== -1;
|
|
3413
3413
|
}
|
|
3414
|
-
function k(
|
|
3415
|
-
return
|
|
3414
|
+
function k(y) {
|
|
3415
|
+
return y.match(s) && !y.match(t);
|
|
3416
3416
|
}
|
|
3417
|
-
function j(
|
|
3418
|
-
return n.test(
|
|
3417
|
+
function j(y) {
|
|
3418
|
+
return n.test(y);
|
|
3419
3419
|
}
|
|
3420
|
-
function
|
|
3421
|
-
return !
|
|
3420
|
+
function F(y) {
|
|
3421
|
+
return !v(y) && (k(y) || j(y));
|
|
3422
3422
|
}
|
|
3423
3423
|
return Nt;
|
|
3424
3424
|
}
|
|
@@ -3449,36 +3449,36 @@ function Fa() {
|
|
|
3449
3449
|
}, ot.exports.array = r;
|
|
3450
3450
|
function r(n, a) {
|
|
3451
3451
|
var i = n.length, l = new Array(i), c = {}, f = i, d = t(a), m = s(n);
|
|
3452
|
-
for (a.forEach(function(
|
|
3453
|
-
if (!m.has(
|
|
3452
|
+
for (a.forEach(function(v) {
|
|
3453
|
+
if (!m.has(v[0]) || !m.has(v[1]))
|
|
3454
3454
|
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
|
|
3455
3455
|
}); f--; )
|
|
3456
3456
|
c[f] || h(n[f], f, /* @__PURE__ */ new Set());
|
|
3457
3457
|
return l;
|
|
3458
|
-
function h(
|
|
3459
|
-
if (j.has(
|
|
3460
|
-
var
|
|
3458
|
+
function h(v, k, j) {
|
|
3459
|
+
if (j.has(v)) {
|
|
3460
|
+
var F;
|
|
3461
3461
|
try {
|
|
3462
|
-
|
|
3462
|
+
F = ", node was:" + JSON.stringify(v);
|
|
3463
3463
|
} catch {
|
|
3464
|
-
|
|
3464
|
+
F = "";
|
|
3465
3465
|
}
|
|
3466
|
-
throw new Error("Cyclic dependency" +
|
|
3466
|
+
throw new Error("Cyclic dependency" + F);
|
|
3467
3467
|
}
|
|
3468
|
-
if (!m.has(
|
|
3469
|
-
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(
|
|
3468
|
+
if (!m.has(v))
|
|
3469
|
+
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(v));
|
|
3470
3470
|
if (!c[k]) {
|
|
3471
3471
|
c[k] = !0;
|
|
3472
|
-
var
|
|
3473
|
-
if (
|
|
3474
|
-
j.add(
|
|
3472
|
+
var y = d.get(v) || /* @__PURE__ */ new Set();
|
|
3473
|
+
if (y = Array.from(y), k = y.length) {
|
|
3474
|
+
j.add(v);
|
|
3475
3475
|
do {
|
|
3476
|
-
var p =
|
|
3476
|
+
var p = y[--k];
|
|
3477
3477
|
h(p, m.get(p), j);
|
|
3478
3478
|
} while (k);
|
|
3479
|
-
j.delete(
|
|
3479
|
+
j.delete(v);
|
|
3480
3480
|
}
|
|
3481
|
-
l[--i] =
|
|
3481
|
+
l[--i] = v;
|
|
3482
3482
|
}
|
|
3483
3483
|
}
|
|
3484
3484
|
}
|
|
@@ -3726,62 +3726,62 @@ function We(r) {
|
|
|
3726
3726
|
test: d,
|
|
3727
3727
|
params: m,
|
|
3728
3728
|
message: h,
|
|
3729
|
-
skipAbsent:
|
|
3729
|
+
skipAbsent: v
|
|
3730
3730
|
} = r;
|
|
3731
3731
|
let {
|
|
3732
3732
|
parent: k,
|
|
3733
3733
|
context: j,
|
|
3734
|
-
abortEarly:
|
|
3735
|
-
disableStackTrace:
|
|
3734
|
+
abortEarly: F = i.spec.abortEarly,
|
|
3735
|
+
disableStackTrace: y = i.spec.disableStackTrace
|
|
3736
3736
|
} = n;
|
|
3737
|
-
function p(
|
|
3738
|
-
return Be.isRef(
|
|
3737
|
+
function p(R) {
|
|
3738
|
+
return Be.isRef(R) ? R.getValue(t, k, j) : R;
|
|
3739
3739
|
}
|
|
3740
|
-
function
|
|
3741
|
-
const
|
|
3740
|
+
function E(R = {}) {
|
|
3741
|
+
const M = Object.assign({
|
|
3742
3742
|
value: t,
|
|
3743
3743
|
originalValue: a,
|
|
3744
3744
|
label: i.spec.label,
|
|
3745
|
-
path:
|
|
3745
|
+
path: R.path || s,
|
|
3746
3746
|
spec: i.spec,
|
|
3747
|
-
disableStackTrace:
|
|
3748
|
-
}, m,
|
|
3749
|
-
for (const
|
|
3750
|
-
const
|
|
3751
|
-
return
|
|
3747
|
+
disableStackTrace: R.disableStackTrace || y
|
|
3748
|
+
}, m, R.params);
|
|
3749
|
+
for (const _ of Object.keys(M)) M[_] = p(M[_]);
|
|
3750
|
+
const B = new ge(ge.formatError(R.message || h, M), t, M.path, R.type || f, M.disableStackTrace);
|
|
3751
|
+
return B.params = M, B;
|
|
3752
3752
|
}
|
|
3753
|
-
const D =
|
|
3753
|
+
const D = F ? l : c;
|
|
3754
3754
|
let O = {
|
|
3755
3755
|
path: s,
|
|
3756
3756
|
parent: k,
|
|
3757
3757
|
type: f,
|
|
3758
3758
|
from: n.from,
|
|
3759
|
-
createError:
|
|
3759
|
+
createError: E,
|
|
3760
3760
|
resolve: p,
|
|
3761
3761
|
options: n,
|
|
3762
3762
|
originalValue: a,
|
|
3763
3763
|
schema: i
|
|
3764
3764
|
};
|
|
3765
|
-
const
|
|
3766
|
-
ge.isError(
|
|
3767
|
-
}, Y = (
|
|
3768
|
-
ge.isError(
|
|
3765
|
+
const z = (R) => {
|
|
3766
|
+
ge.isError(R) ? D(R) : R ? c(null) : D(E());
|
|
3767
|
+
}, Y = (R) => {
|
|
3768
|
+
ge.isError(R) ? D(R) : l(R);
|
|
3769
3769
|
};
|
|
3770
|
-
if (
|
|
3771
|
-
return
|
|
3772
|
-
let
|
|
3770
|
+
if (v && Ce(t))
|
|
3771
|
+
return z(!0);
|
|
3772
|
+
let U;
|
|
3773
3773
|
try {
|
|
3774
|
-
var
|
|
3775
|
-
if (
|
|
3774
|
+
var W;
|
|
3775
|
+
if (U = d.call(O, t, O), typeof ((W = U) == null ? void 0 : W.then) == "function") {
|
|
3776
3776
|
if (n.sync)
|
|
3777
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(
|
|
3778
|
+
return Promise.resolve(U).then(z, Y);
|
|
3779
3779
|
}
|
|
3780
|
-
} catch (
|
|
3781
|
-
Y(
|
|
3780
|
+
} catch (R) {
|
|
3781
|
+
Y(R);
|
|
3782
3782
|
return;
|
|
3783
3783
|
}
|
|
3784
|
-
|
|
3784
|
+
z(U);
|
|
3785
3785
|
}
|
|
3786
3786
|
return e.OPTIONS = r, e;
|
|
3787
3787
|
}
|
|
@@ -4002,7 +4002,7 @@ attempted value: ${i}
|
|
|
4002
4002
|
n || (n = !0, t(j, i));
|
|
4003
4003
|
}, m = (j) => {
|
|
4004
4004
|
n || (n = !0, s(j, i));
|
|
4005
|
-
}, h = a.length,
|
|
4005
|
+
}, h = a.length, v = [];
|
|
4006
4006
|
if (!h) return m([]);
|
|
4007
4007
|
let k = {
|
|
4008
4008
|
value: i,
|
|
@@ -4012,9 +4012,9 @@ attempted value: ${i}
|
|
|
4012
4012
|
schema: this
|
|
4013
4013
|
};
|
|
4014
4014
|
for (let j = 0; j < a.length; j++) {
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4017
|
-
p && (Array.isArray(p) ?
|
|
4015
|
+
const F = a[j];
|
|
4016
|
+
F(k, d, function(p) {
|
|
4017
|
+
p && (Array.isArray(p) ? v.push(...p) : v.push(p)), --h <= 0 && m(v);
|
|
4018
4018
|
});
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
@@ -4046,7 +4046,7 @@ attempted value: ${i}
|
|
|
4046
4046
|
[c ? "index" : "key"]: l,
|
|
4047
4047
|
path: c || l.includes(".") ? `${n || ""}[${c ? l : `"${l}"`}]` : (n ? `${n}.` : "") + e
|
|
4048
4048
|
});
|
|
4049
|
-
return (m, h,
|
|
4049
|
+
return (m, h, v) => this.resolve(d)._validate(f, d, h, v);
|
|
4050
4050
|
}
|
|
4051
4051
|
validate(e, t) {
|
|
4052
4052
|
var s;
|
|
@@ -4765,7 +4765,7 @@ class Ns extends be {
|
|
|
4765
4765
|
__validating: t.__validating || !1
|
|
4766
4766
|
}), d = !1;
|
|
4767
4767
|
for (const m of l) {
|
|
4768
|
-
let h = a[m],
|
|
4768
|
+
let h = a[m], v = m in n;
|
|
4769
4769
|
if (h) {
|
|
4770
4770
|
let k, j = n[m];
|
|
4771
4771
|
f.path = (t.path ? `${t.path}.` : "") + m, h = h.resolve({
|
|
@@ -4773,17 +4773,17 @@ class Ns extends be {
|
|
|
4773
4773
|
context: t.context,
|
|
4774
4774
|
parent: c
|
|
4775
4775
|
});
|
|
4776
|
-
let
|
|
4777
|
-
if (
|
|
4776
|
+
let F = h instanceof be ? h.spec : void 0, y = F == null ? void 0 : F.strict;
|
|
4777
|
+
if (F != null && F.strip) {
|
|
4778
4778
|
d = d || m in n;
|
|
4779
4779
|
continue;
|
|
4780
4780
|
}
|
|
4781
|
-
k = !t.__validating || !
|
|
4781
|
+
k = !t.__validating || !y ? (
|
|
4782
4782
|
// TODO: use _cast, this is double resolving
|
|
4783
4783
|
h.cast(n[m], f)
|
|
4784
4784
|
) : n[m], k !== void 0 && (c[m] = k);
|
|
4785
|
-
} else
|
|
4786
|
-
(
|
|
4785
|
+
} else v && !i && (c[m] = n[m]);
|
|
4786
|
+
(v !== m in c || c[m] !== n[m]) && (d = !0);
|
|
4787
4787
|
}
|
|
4788
4788
|
return d ? c : n;
|
|
4789
4789
|
}
|
|
@@ -4990,8 +4990,8 @@ function ai({
|
|
|
4990
4990
|
case "password":
|
|
4991
4991
|
case "email":
|
|
4992
4992
|
if (a = vs(), (i = n.validation) != null && i.required) {
|
|
4993
|
-
const
|
|
4994
|
-
a = a.required(
|
|
4993
|
+
const v = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
4994
|
+
a = a.required(v);
|
|
4995
4995
|
}
|
|
4996
4996
|
(l = n.validation) != null && l.minLength && (a = a.min(
|
|
4997
4997
|
n.validation.minLength.value,
|
|
@@ -5006,21 +5006,21 @@ function ai({
|
|
|
5006
5006
|
break;
|
|
5007
5007
|
case "number":
|
|
5008
5008
|
if (a = bs(), (d = n.validation) != null && d.required) {
|
|
5009
|
-
const
|
|
5010
|
-
a = a.required(
|
|
5009
|
+
const v = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5010
|
+
a = a.required(v);
|
|
5011
5011
|
}
|
|
5012
5012
|
break;
|
|
5013
5013
|
case "select":
|
|
5014
5014
|
case "optionGroup":
|
|
5015
5015
|
if (a = Rt(), (m = n.validation) != null && m.required) {
|
|
5016
|
-
const
|
|
5017
|
-
a = a.required(
|
|
5016
|
+
const v = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5017
|
+
a = a.required(v);
|
|
5018
5018
|
}
|
|
5019
5019
|
break;
|
|
5020
5020
|
case "date":
|
|
5021
5021
|
if (a = Gt(), (h = n.validation) != null && h.required) {
|
|
5022
|
-
const
|
|
5023
|
-
a = a.required(
|
|
5022
|
+
const v = typeof n.validation.required == "string" ? n.validation.required : "Campo obligatorio";
|
|
5023
|
+
a = a.required(v);
|
|
5024
5024
|
}
|
|
5025
5025
|
break;
|
|
5026
5026
|
default:
|
|
@@ -5044,8 +5044,8 @@ function oi(r) {
|
|
|
5044
5044
|
const e = Me(
|
|
5045
5045
|
() => r.filter((i) => i.type === "select" && i.loadOptions),
|
|
5046
5046
|
[r]
|
|
5047
|
-
), [t, s] =
|
|
5048
|
-
return
|
|
5047
|
+
), [t, s] = ee(e.length), [n, a] = ee({});
|
|
5048
|
+
return le(() => {
|
|
5049
5049
|
e.length !== 0 && e.forEach((i) => {
|
|
5050
5050
|
i.loadOptions().then(
|
|
5051
5051
|
(l) => a((c) => ({ ...c, [i.name]: l }))
|
|
@@ -5092,9 +5092,9 @@ function _s({
|
|
|
5092
5092
|
maxLength: d,
|
|
5093
5093
|
showCounter: m = !1,
|
|
5094
5094
|
className: h,
|
|
5095
|
-
...
|
|
5095
|
+
...v
|
|
5096
5096
|
}) {
|
|
5097
|
-
const k = Ue(), j = e || k, [
|
|
5097
|
+
const k = Ue(), j = e || k, [F, y] = ee(s || "");
|
|
5098
5098
|
if (r && e)
|
|
5099
5099
|
return /* @__PURE__ */ o.jsx(
|
|
5100
5100
|
ke,
|
|
@@ -5103,12 +5103,12 @@ function _s({
|
|
|
5103
5103
|
control: r,
|
|
5104
5104
|
rules: t,
|
|
5105
5105
|
defaultValue: s || "",
|
|
5106
|
-
render: ({ field:
|
|
5106
|
+
render: ({ field: E, fieldState: D }) => {
|
|
5107
5107
|
var O;
|
|
5108
5108
|
return /* @__PURE__ */ o.jsx(
|
|
5109
5109
|
_s,
|
|
5110
5110
|
{
|
|
5111
|
-
...
|
|
5111
|
+
...v,
|
|
5112
5112
|
size: n,
|
|
5113
5113
|
width: a,
|
|
5114
5114
|
label: i,
|
|
@@ -5118,19 +5118,19 @@ function _s({
|
|
|
5118
5118
|
maxLength: d,
|
|
5119
5119
|
showCounter: m,
|
|
5120
5120
|
className: h,
|
|
5121
|
-
value:
|
|
5122
|
-
onChange:
|
|
5121
|
+
value: E.value,
|
|
5122
|
+
onChange: E.onChange
|
|
5123
5123
|
}
|
|
5124
5124
|
);
|
|
5125
5125
|
}
|
|
5126
5126
|
}
|
|
5127
5127
|
);
|
|
5128
|
-
|
|
5129
|
-
|
|
5128
|
+
le(() => {
|
|
5129
|
+
y(s || "");
|
|
5130
5130
|
}, [s]);
|
|
5131
|
-
const p = (
|
|
5131
|
+
const p = (E) => {
|
|
5132
5132
|
var D;
|
|
5133
|
-
d !== void 0 &&
|
|
5133
|
+
d !== void 0 && E.target.value.length > d || (y(E.target.value), (D = v.onChange) == null || D.call(v, E));
|
|
5134
5134
|
};
|
|
5135
5135
|
return /* @__PURE__ */ o.jsxs("div", { className: $("flex flex-col", h), style: { width: a }, children: [
|
|
5136
5136
|
i && /* @__PURE__ */ o.jsx(
|
|
@@ -5154,18 +5154,18 @@ function _s({
|
|
|
5154
5154
|
Ir[n],
|
|
5155
5155
|
ci[n],
|
|
5156
5156
|
c ? "border-[var(--color-ds-border-error)]" : "border-[var(--color-ds-border-default)]",
|
|
5157
|
-
|
|
5157
|
+
v.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)]"
|
|
5158
5158
|
),
|
|
5159
|
-
value:
|
|
5159
|
+
value: F,
|
|
5160
5160
|
onChange: p,
|
|
5161
5161
|
maxLength: d,
|
|
5162
|
-
...
|
|
5162
|
+
...v
|
|
5163
5163
|
}
|
|
5164
5164
|
),
|
|
5165
5165
|
/* @__PURE__ */ o.jsxs("div", { className: "flex justify-between pt-1 min-h-[18px]", children: [
|
|
5166
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: " " }),
|
|
5167
5167
|
m && d !== void 0 && /* @__PURE__ */ o.jsxs("span", { className: "text-xs text-[var(--color-ds-text-secondary)]", children: [
|
|
5168
|
-
|
|
5168
|
+
F.length,
|
|
5169
5169
|
"/",
|
|
5170
5170
|
d
|
|
5171
5171
|
] })
|
|
@@ -5198,7 +5198,7 @@ function di({
|
|
|
5198
5198
|
rules: t,
|
|
5199
5199
|
defaultValue: s,
|
|
5200
5200
|
render: ({ field: m, fieldState: h }) => {
|
|
5201
|
-
const
|
|
5201
|
+
const v = h.error;
|
|
5202
5202
|
return /* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5203
5203
|
/* @__PURE__ */ o.jsx(
|
|
5204
5204
|
"input",
|
|
@@ -5226,7 +5226,7 @@ function di({
|
|
|
5226
5226
|
children: n
|
|
5227
5227
|
}
|
|
5228
5228
|
),
|
|
5229
|
-
f && (
|
|
5229
|
+
f && (v == null ? void 0 : v.message) && /* @__PURE__ */ o.jsx("span", { className: "text-xs text-[var(--color-ds-text-error)]", children: v.message })
|
|
5230
5230
|
] });
|
|
5231
5231
|
}
|
|
5232
5232
|
}
|
|
@@ -5241,36 +5241,36 @@ function fi({
|
|
|
5241
5241
|
width: a = "100%",
|
|
5242
5242
|
disabled: i = !1
|
|
5243
5243
|
}) {
|
|
5244
|
-
const [l, c] =
|
|
5245
|
-
if (
|
|
5244
|
+
const [l, c] = ee([]), [f, d] = ee(!1), [m, h] = ee(!1), v = _e(null), k = async (y) => {
|
|
5245
|
+
if (y) {
|
|
5246
5246
|
d(!0);
|
|
5247
5247
|
try {
|
|
5248
|
-
const p = await t(
|
|
5248
|
+
const p = await t(y);
|
|
5249
5249
|
c(p), h(!0);
|
|
5250
5250
|
} finally {
|
|
5251
5251
|
d(!1);
|
|
5252
5252
|
}
|
|
5253
5253
|
}
|
|
5254
5254
|
};
|
|
5255
|
-
|
|
5256
|
-
function
|
|
5257
|
-
|
|
5255
|
+
le(() => {
|
|
5256
|
+
function y(p) {
|
|
5257
|
+
v.current && !v.current.contains(p.target) && h(!1);
|
|
5258
5258
|
}
|
|
5259
5259
|
if (m)
|
|
5260
|
-
return document.addEventListener("mousedown",
|
|
5260
|
+
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
5261
5261
|
}, [m]);
|
|
5262
|
-
const j = n === "sm" ? "text-ds-sm" : n === "md" ? "text-ds-md" : "text-ds-lg",
|
|
5262
|
+
const j = n === "sm" ? "text-ds-sm" : n === "md" ? "text-ds-md" : "text-ds-lg", F = n === "sm" ? "h-6" : n === "md" ? "h-10" : "h-12";
|
|
5263
5263
|
return /* @__PURE__ */ o.jsx(
|
|
5264
5264
|
ke,
|
|
5265
5265
|
{
|
|
5266
5266
|
name: r,
|
|
5267
5267
|
control: e,
|
|
5268
|
-
render: ({ field:
|
|
5269
|
-
var
|
|
5268
|
+
render: ({ field: y, fieldState: p }) => {
|
|
5269
|
+
var E;
|
|
5270
5270
|
return /* @__PURE__ */ o.jsxs(
|
|
5271
5271
|
"div",
|
|
5272
5272
|
{
|
|
5273
|
-
ref:
|
|
5273
|
+
ref: v,
|
|
5274
5274
|
className: "relative flex flex-col",
|
|
5275
5275
|
style: { width: a },
|
|
5276
5276
|
children: [
|
|
@@ -5288,11 +5288,11 @@ function fi({
|
|
|
5288
5288
|
type: "text",
|
|
5289
5289
|
size: n,
|
|
5290
5290
|
width: "100%",
|
|
5291
|
-
value:
|
|
5292
|
-
onChange: (D) =>
|
|
5291
|
+
value: y.value,
|
|
5292
|
+
onChange: (D) => y.onChange(D.target.value),
|
|
5293
5293
|
disabled: i,
|
|
5294
5294
|
hasError: p.invalid,
|
|
5295
|
-
errorMessage: (
|
|
5295
|
+
errorMessage: (E = p.error) == null ? void 0 : E.message,
|
|
5296
5296
|
suffixButton: /* @__PURE__ */ o.jsx(
|
|
5297
5297
|
Ve,
|
|
5298
5298
|
{
|
|
@@ -5300,7 +5300,7 @@ function fi({
|
|
|
5300
5300
|
className: "!rounded-l-none",
|
|
5301
5301
|
size: n,
|
|
5302
5302
|
variant: "primary",
|
|
5303
|
-
onClick: () => k(
|
|
5303
|
+
onClick: () => k(y.value),
|
|
5304
5304
|
disabled: i,
|
|
5305
5305
|
children: "Buscar"
|
|
5306
5306
|
}
|
|
@@ -5351,7 +5351,7 @@ function fi({
|
|
|
5351
5351
|
{
|
|
5352
5352
|
className: `
|
|
5353
5353
|
px-2
|
|
5354
|
-
${
|
|
5354
|
+
${F}
|
|
5355
5355
|
flex items-center
|
|
5356
5356
|
cursor-pointer
|
|
5357
5357
|
text-[var(--color-ds-text-primary)]
|
|
@@ -5359,7 +5359,7 @@ function fi({
|
|
|
5359
5359
|
|
|
5360
5360
|
`,
|
|
5361
5361
|
onClick: () => {
|
|
5362
|
-
|
|
5362
|
+
y.onChange(D.value), h(!1);
|
|
5363
5363
|
},
|
|
5364
5364
|
children: D.label
|
|
5365
5365
|
},
|
|
@@ -5388,7 +5388,7 @@ function _i({ schema: r }) {
|
|
|
5388
5388
|
} = r, { show: d } = ja(), { t: m } = qt(), h = ai({
|
|
5389
5389
|
fields: t,
|
|
5390
5390
|
explicitSchema: f
|
|
5391
|
-
}),
|
|
5391
|
+
}), v = Rn({
|
|
5392
5392
|
resolver: h,
|
|
5393
5393
|
mode: "onBlur",
|
|
5394
5394
|
reValidateMode: "onChange",
|
|
@@ -5396,58 +5396,58 @@ function _i({ schema: r }) {
|
|
|
5396
5396
|
}), {
|
|
5397
5397
|
control: k,
|
|
5398
5398
|
reset: j,
|
|
5399
|
-
watch:
|
|
5400
|
-
handleSubmit:
|
|
5401
|
-
formState: { errors: p, isSubmitting:
|
|
5402
|
-
} =
|
|
5403
|
-
|
|
5404
|
-
c && (O(!0), c().then((
|
|
5399
|
+
watch: F,
|
|
5400
|
+
handleSubmit: y,
|
|
5401
|
+
formState: { errors: p, isSubmitting: E }
|
|
5402
|
+
} = v, [D, O] = ee(!1);
|
|
5403
|
+
le(() => {
|
|
5404
|
+
c && (O(!0), c().then((C) => j(C)).finally(() => O(!1)));
|
|
5405
5405
|
}, [c, j]);
|
|
5406
|
-
const { loadingCount:
|
|
5407
|
-
const
|
|
5408
|
-
return e.forEach((
|
|
5409
|
-
|
|
5410
|
-
}),
|
|
5411
|
-
}, [e]), [
|
|
5412
|
-
(
|
|
5413
|
-
const
|
|
5414
|
-
return typeof
|
|
5415
|
-
|
|
5416
|
-
) :
|
|
5406
|
+
const { loadingCount: z, optionsMap: Y } = oi(t), P = ii(t), U = li(t, k), W = Me(() => {
|
|
5407
|
+
const C = {};
|
|
5408
|
+
return e.forEach((g, Z) => {
|
|
5409
|
+
g.type === "tabs" && (C[Z] = g.tabs[0].key);
|
|
5410
|
+
}), C;
|
|
5411
|
+
}, [e]), [R, M] = ee(W), B = Tt(
|
|
5412
|
+
(C) => {
|
|
5413
|
+
const g = F(), { watchField: Z, watchValue: J } = C;
|
|
5414
|
+
return typeof J == "function" ? J(
|
|
5415
|
+
g
|
|
5416
|
+
) : g[Z] === J;
|
|
5417
5417
|
},
|
|
5418
|
-
[
|
|
5419
|
-
),
|
|
5420
|
-
(
|
|
5421
|
-
var
|
|
5422
|
-
let
|
|
5423
|
-
if (typeof
|
|
5424
|
-
if (
|
|
5418
|
+
[F]
|
|
5419
|
+
), _ = Tt(
|
|
5420
|
+
(C) => {
|
|
5421
|
+
var I, G, te, ae;
|
|
5422
|
+
let g;
|
|
5423
|
+
if (typeof C == "string") {
|
|
5424
|
+
if (g = P[C], !g) return null;
|
|
5425
5425
|
} else
|
|
5426
|
-
|
|
5427
|
-
if ("visibleWhen" in
|
|
5426
|
+
g = C;
|
|
5427
|
+
if ("visibleWhen" in g && g.visibleWhen && !B(g.visibleWhen))
|
|
5428
5428
|
return null;
|
|
5429
|
-
let
|
|
5430
|
-
if ("disabledWhen" in
|
|
5429
|
+
let Z = !!g.disabled;
|
|
5430
|
+
if ("disabledWhen" in g && g.disabledWhen && B(g.disabledWhen) && (Z = !0), !Z && "name" in g && g.name && U[g.name] && (Z = !0), g.type === "search")
|
|
5431
5431
|
return /* @__PURE__ */ o.jsx(
|
|
5432
5432
|
fi,
|
|
5433
5433
|
{
|
|
5434
|
-
name:
|
|
5434
|
+
name: g.name,
|
|
5435
5435
|
control: k,
|
|
5436
|
-
searchFn:
|
|
5437
|
-
label:
|
|
5438
|
-
size:
|
|
5439
|
-
width:
|
|
5440
|
-
disabled:
|
|
5436
|
+
searchFn: g.searchFn,
|
|
5437
|
+
label: g.label,
|
|
5438
|
+
size: g.size,
|
|
5439
|
+
width: g.width,
|
|
5440
|
+
disabled: Z || E
|
|
5441
5441
|
},
|
|
5442
|
-
|
|
5442
|
+
g.name
|
|
5443
5443
|
);
|
|
5444
|
-
if (
|
|
5445
|
-
const q =
|
|
5444
|
+
if (g.type === "inputGroup") {
|
|
5445
|
+
const q = g, ce = q.inputs.map((ue) => {
|
|
5446
5446
|
var Ze;
|
|
5447
|
-
const H = typeof
|
|
5447
|
+
const H = typeof ue == "string" ? P[ue] : ue;
|
|
5448
5448
|
if (!H) return null;
|
|
5449
5449
|
let de = !!H.disabled;
|
|
5450
|
-
H.disabledWhen &&
|
|
5450
|
+
H.disabledWhen && B(H.disabledWhen) && (de = !0), !de && U[H.name] && (de = !0);
|
|
5451
5451
|
const Fe = {
|
|
5452
5452
|
name: H.name,
|
|
5453
5453
|
control: k,
|
|
@@ -5468,12 +5468,12 @@ function _i({ schema: r }) {
|
|
|
5468
5468
|
options: H.options ?? Y[H.name] ?? [],
|
|
5469
5469
|
loadOptions: H.options ? void 0 : H.loadOptions
|
|
5470
5470
|
} : Fe;
|
|
5471
|
-
}).filter((
|
|
5471
|
+
}).filter((ue) => ue !== null);
|
|
5472
5472
|
return /* @__PURE__ */ o.jsx(
|
|
5473
5473
|
da,
|
|
5474
5474
|
{
|
|
5475
5475
|
groupLabel: q.groupLabel,
|
|
5476
|
-
inputs:
|
|
5476
|
+
inputs: ce,
|
|
5477
5477
|
separator: q.separator,
|
|
5478
5478
|
useSeparator: q.useSeparator,
|
|
5479
5479
|
className: q.className,
|
|
@@ -5483,8 +5483,8 @@ function _i({ schema: r }) {
|
|
|
5483
5483
|
`inputGroup_${q.groupLabel}`
|
|
5484
5484
|
);
|
|
5485
5485
|
}
|
|
5486
|
-
if (
|
|
5487
|
-
const q =
|
|
5486
|
+
if (g.type === "button") {
|
|
5487
|
+
const q = g;
|
|
5488
5488
|
return /* @__PURE__ */ o.jsx("div", { className: "self-center", children: /* @__PURE__ */ o.jsx(
|
|
5489
5489
|
Ve,
|
|
5490
5490
|
{
|
|
@@ -5496,71 +5496,71 @@ function _i({ schema: r }) {
|
|
|
5496
5496
|
iconPosition: q.iconPosition,
|
|
5497
5497
|
ariaLabel: q.ariaLabel,
|
|
5498
5498
|
onClick: q.onClick,
|
|
5499
|
-
disabled:
|
|
5499
|
+
disabled: Z || E,
|
|
5500
5500
|
children: q.label
|
|
5501
5501
|
}
|
|
5502
5502
|
) }, q.name);
|
|
5503
5503
|
}
|
|
5504
|
-
const
|
|
5505
|
-
name:
|
|
5504
|
+
const J = g.suffixButton, ie = typeof J == "string" ? _(J) : J, w = {
|
|
5505
|
+
name: g.name,
|
|
5506
5506
|
control: k,
|
|
5507
|
-
disabled:
|
|
5508
|
-
label:
|
|
5509
|
-
size:
|
|
5510
|
-
width:
|
|
5511
|
-
placeholder:
|
|
5512
|
-
info:
|
|
5507
|
+
disabled: Z || E,
|
|
5508
|
+
label: g.label,
|
|
5509
|
+
size: g.size,
|
|
5510
|
+
width: g.width,
|
|
5511
|
+
placeholder: g.placeholder,
|
|
5512
|
+
info: g.info,
|
|
5513
5513
|
suffixButton: ie
|
|
5514
5514
|
};
|
|
5515
|
-
switch (
|
|
5515
|
+
switch (g.type) {
|
|
5516
5516
|
case "select":
|
|
5517
5517
|
return /* @__PURE__ */ o.jsx(
|
|
5518
5518
|
ke,
|
|
5519
5519
|
{
|
|
5520
|
-
name:
|
|
5520
|
+
name: g.name,
|
|
5521
5521
|
control: k,
|
|
5522
5522
|
render: ({ field: q }) => {
|
|
5523
|
-
var
|
|
5523
|
+
var ce;
|
|
5524
5524
|
return /* @__PURE__ */ o.jsx(
|
|
5525
5525
|
pt,
|
|
5526
5526
|
{
|
|
5527
5527
|
...w,
|
|
5528
5528
|
value: q.value,
|
|
5529
5529
|
onChange: q.onChange,
|
|
5530
|
-
options:
|
|
5531
|
-
loadOptions:
|
|
5532
|
-
hasError: !!p[
|
|
5533
|
-
errorMessage: (
|
|
5530
|
+
options: g.options ?? Y[g.name] ?? [],
|
|
5531
|
+
loadOptions: g.options ? void 0 : g.loadOptions,
|
|
5532
|
+
hasError: !!p[g.name],
|
|
5533
|
+
errorMessage: (ce = p[g.name]) == null ? void 0 : ce.message,
|
|
5534
5534
|
suffixButton: ie
|
|
5535
5535
|
}
|
|
5536
5536
|
);
|
|
5537
5537
|
}
|
|
5538
5538
|
},
|
|
5539
|
-
|
|
5539
|
+
g.name
|
|
5540
5540
|
);
|
|
5541
5541
|
case "textarea":
|
|
5542
5542
|
return /* @__PURE__ */ o.jsx(
|
|
5543
5543
|
ke,
|
|
5544
5544
|
{
|
|
5545
|
-
name:
|
|
5545
|
+
name: g.name,
|
|
5546
5546
|
control: k,
|
|
5547
|
-
render: ({ field: q, fieldState:
|
|
5548
|
-
var
|
|
5547
|
+
render: ({ field: q, fieldState: ce }) => {
|
|
5548
|
+
var ue;
|
|
5549
5549
|
return /* @__PURE__ */ o.jsx(
|
|
5550
5550
|
_s,
|
|
5551
5551
|
{
|
|
5552
5552
|
...w,
|
|
5553
5553
|
value: q.value,
|
|
5554
5554
|
onChange: q.onChange,
|
|
5555
|
-
maxLength:
|
|
5556
|
-
showCounter: !!
|
|
5557
|
-
hasError: !!
|
|
5558
|
-
errorMessage: ((
|
|
5555
|
+
maxLength: g.maxLength,
|
|
5556
|
+
showCounter: !!g.showCounter,
|
|
5557
|
+
hasError: !!ce.error,
|
|
5558
|
+
errorMessage: ((ue = ce.error) == null ? void 0 : ue.message) || ""
|
|
5559
5559
|
}
|
|
5560
5560
|
);
|
|
5561
5561
|
}
|
|
5562
5562
|
},
|
|
5563
|
-
|
|
5563
|
+
g.name
|
|
5564
5564
|
);
|
|
5565
5565
|
case "file":
|
|
5566
5566
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -5568,12 +5568,12 @@ function _i({ schema: r }) {
|
|
|
5568
5568
|
{
|
|
5569
5569
|
...w,
|
|
5570
5570
|
defaultValue: [],
|
|
5571
|
-
maxFiles:
|
|
5572
|
-
accept:
|
|
5573
|
-
hasError: !!p[
|
|
5574
|
-
errorMessage: (
|
|
5571
|
+
maxFiles: g.maxFiles,
|
|
5572
|
+
accept: g.accept,
|
|
5573
|
+
hasError: !!p[g.name],
|
|
5574
|
+
errorMessage: (I = p[g.name]) == null ? void 0 : I.message
|
|
5575
5575
|
},
|
|
5576
|
-
|
|
5576
|
+
g.name
|
|
5577
5577
|
);
|
|
5578
5578
|
case "checkbox":
|
|
5579
5579
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -5581,11 +5581,11 @@ function _i({ schema: r }) {
|
|
|
5581
5581
|
{
|
|
5582
5582
|
...w,
|
|
5583
5583
|
defaultValue: !1,
|
|
5584
|
-
hasError: !!p[
|
|
5585
|
-
errorMessage: (G = p[
|
|
5586
|
-
name:
|
|
5584
|
+
hasError: !!p[g.name],
|
|
5585
|
+
errorMessage: (G = p[g.name]) == null ? void 0 : G.message,
|
|
5586
|
+
name: g.name
|
|
5587
5587
|
},
|
|
5588
|
-
|
|
5588
|
+
g.name
|
|
5589
5589
|
);
|
|
5590
5590
|
case "date":
|
|
5591
5591
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -5593,40 +5593,40 @@ function _i({ schema: r }) {
|
|
|
5593
5593
|
{
|
|
5594
5594
|
...w,
|
|
5595
5595
|
defaultValue: "",
|
|
5596
|
-
showTime: !!
|
|
5597
|
-
hasError: !!p[
|
|
5598
|
-
errorMessage: (
|
|
5596
|
+
showTime: !!g.showTime,
|
|
5597
|
+
hasError: !!p[g.name],
|
|
5598
|
+
errorMessage: (te = p[g.name]) == null ? void 0 : te.message
|
|
5599
5599
|
},
|
|
5600
|
-
|
|
5600
|
+
g.name
|
|
5601
5601
|
);
|
|
5602
5602
|
case "optionGroup":
|
|
5603
5603
|
return /* @__PURE__ */ o.jsx(
|
|
5604
5604
|
ha,
|
|
5605
5605
|
{
|
|
5606
5606
|
...w,
|
|
5607
|
-
options:
|
|
5608
|
-
multiple:
|
|
5609
|
-
vertical:
|
|
5610
|
-
groupLabel:
|
|
5611
|
-
defaultValue:
|
|
5612
|
-
className:
|
|
5613
|
-
name:
|
|
5607
|
+
options: g.options || [],
|
|
5608
|
+
multiple: g.multiple,
|
|
5609
|
+
vertical: g.vertical,
|
|
5610
|
+
groupLabel: g.groupLabel,
|
|
5611
|
+
defaultValue: g.defaultValue,
|
|
5612
|
+
className: g.width ? void 0 : "w-full",
|
|
5613
|
+
name: g.name
|
|
5614
5614
|
},
|
|
5615
|
-
|
|
5615
|
+
g.name
|
|
5616
5616
|
);
|
|
5617
5617
|
default:
|
|
5618
5618
|
return /* @__PURE__ */ o.jsx(
|
|
5619
5619
|
us,
|
|
5620
5620
|
{
|
|
5621
5621
|
...w,
|
|
5622
|
-
type:
|
|
5622
|
+
type: g.type,
|
|
5623
5623
|
loadingDefaults: D,
|
|
5624
|
-
hasError: !!p[
|
|
5625
|
-
errorMessage: (ae = p[
|
|
5624
|
+
hasError: !!p[g.name],
|
|
5625
|
+
errorMessage: (ae = p[g.name]) == null ? void 0 : ae.message,
|
|
5626
5626
|
suffixButton: ie,
|
|
5627
|
-
name:
|
|
5627
|
+
name: g.name
|
|
5628
5628
|
},
|
|
5629
|
-
|
|
5629
|
+
g.name
|
|
5630
5630
|
);
|
|
5631
5631
|
}
|
|
5632
5632
|
},
|
|
@@ -5634,53 +5634,53 @@ function _i({ schema: r }) {
|
|
|
5634
5634
|
P,
|
|
5635
5635
|
k,
|
|
5636
5636
|
p,
|
|
5637
|
-
|
|
5637
|
+
E,
|
|
5638
5638
|
D,
|
|
5639
5639
|
Y,
|
|
5640
|
-
|
|
5641
|
-
|
|
5640
|
+
B,
|
|
5641
|
+
U
|
|
5642
5642
|
]
|
|
5643
5643
|
);
|
|
5644
|
-
return /* @__PURE__ */ o.jsx(wn, { ...
|
|
5644
|
+
return /* @__PURE__ */ o.jsx(wn, { ...v, children: /* @__PURE__ */ o.jsxs(
|
|
5645
5645
|
"form",
|
|
5646
5646
|
{
|
|
5647
5647
|
noValidate: !0,
|
|
5648
|
-
onSubmit:
|
|
5649
|
-
async (
|
|
5650
|
-
await s(
|
|
5648
|
+
onSubmit: y(
|
|
5649
|
+
async (C) => {
|
|
5650
|
+
await s(C), d(n ?? m("ds.form.saveSuccess"), "success");
|
|
5651
5651
|
},
|
|
5652
|
-
(
|
|
5653
|
-
console.log("❌ errores de validación:",
|
|
5652
|
+
(C) => {
|
|
5653
|
+
console.log("❌ errores de validación:", C), ma(C), d(a ?? m("ds.form.saveError"), "error");
|
|
5654
5654
|
}
|
|
5655
5655
|
),
|
|
5656
5656
|
className: "space-y-6",
|
|
5657
5657
|
children: [
|
|
5658
5658
|
e.map(
|
|
5659
|
-
(
|
|
5659
|
+
(C, g) => C.type === "rows" ? /* @__PURE__ */ o.jsx(X.Fragment, { children: C.sections.map((Z, J) => /* @__PURE__ */ o.jsx("div", { className: "mb-6", children: /* @__PURE__ */ o.jsx(
|
|
5660
5660
|
ir,
|
|
5661
5661
|
{
|
|
5662
|
-
title:
|
|
5663
|
-
defaultOpen:
|
|
5664
|
-
children:
|
|
5662
|
+
title: Z.sectionTitle,
|
|
5663
|
+
defaultOpen: Z.defaultOpen,
|
|
5664
|
+
children: Z.rows.map((ie, w) => /* @__PURE__ */ o.jsxs("div", { children: [
|
|
5665
5665
|
ie.title && /* @__PURE__ */ o.jsx("h2", { className: "mb-2 text-lg text-[var(--color-ds-text-primary)]", children: ie.title }),
|
|
5666
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex flex-wrap -mx-2", children: ie.columns.map((
|
|
5667
|
-
var
|
|
5666
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex flex-wrap -mx-2", children: ie.columns.map((I, G) => {
|
|
5667
|
+
var te;
|
|
5668
5668
|
return /* @__PURE__ */ o.jsx(
|
|
5669
5669
|
"div",
|
|
5670
5670
|
{
|
|
5671
|
-
className: `${
|
|
5672
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children:
|
|
5673
|
-
(
|
|
5671
|
+
className: `${I.width} px-2 flex flex-col`,
|
|
5672
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: I.fields ? I.fields.map((ae) => _(ae)) : (te = I.rows) == null ? void 0 : te.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(
|
|
5673
|
+
(ce, ue) => {
|
|
5674
5674
|
var H;
|
|
5675
5675
|
return /* @__PURE__ */ o.jsx(
|
|
5676
5676
|
"div",
|
|
5677
5677
|
{
|
|
5678
|
-
className: `${
|
|
5679
|
-
children: (H =
|
|
5680
|
-
(de) =>
|
|
5678
|
+
className: `${ce.width} px-2`,
|
|
5679
|
+
children: (H = ce.fields) == null ? void 0 : H.map(
|
|
5680
|
+
(de) => _(de)
|
|
5681
5681
|
)
|
|
5682
5682
|
},
|
|
5683
|
-
|
|
5683
|
+
ue
|
|
5684
5684
|
);
|
|
5685
5685
|
}
|
|
5686
5686
|
) }) }, q)) })
|
|
@@ -5690,37 +5690,37 @@ function _i({ schema: r }) {
|
|
|
5690
5690
|
}) })
|
|
5691
5691
|
] }, w))
|
|
5692
5692
|
}
|
|
5693
|
-
) },
|
|
5693
|
+
) }, J)) }, g) : /* @__PURE__ */ o.jsx(
|
|
5694
5694
|
la,
|
|
5695
5695
|
{
|
|
5696
|
-
options:
|
|
5697
|
-
value:
|
|
5698
|
-
onChange: (
|
|
5696
|
+
options: C.tabs.map((Z) => ({ label: Z.label, value: Z.key })),
|
|
5697
|
+
value: R[g],
|
|
5698
|
+
onChange: (Z) => M((J) => ({ ...J, [g]: Z })),
|
|
5699
5699
|
children: Object.fromEntries(
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
/* @__PURE__ */ o.jsx("div", { className: "space-y-6", children:
|
|
5700
|
+
C.tabs.map((Z) => [
|
|
5701
|
+
Z.key,
|
|
5702
|
+
/* @__PURE__ */ o.jsx("div", { className: "space-y-6", children: Z.sections.map((J, ie) => /* @__PURE__ */ o.jsx("div", { className: "mb-6", children: /* @__PURE__ */ o.jsx(
|
|
5703
5703
|
ir,
|
|
5704
5704
|
{
|
|
5705
|
-
title:
|
|
5706
|
-
defaultOpen:
|
|
5707
|
-
children:
|
|
5705
|
+
title: J.sectionTitle,
|
|
5706
|
+
defaultOpen: J.defaultOpen,
|
|
5707
|
+
children: J.rows.map((w, I) => /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx("div", { className: "flex flex-wrap -mx-2", children: w.columns.map((G, te) => {
|
|
5708
5708
|
var ae;
|
|
5709
5709
|
return /* @__PURE__ */ o.jsx(
|
|
5710
5710
|
"div",
|
|
5711
5711
|
{
|
|
5712
5712
|
className: `${G.width ?? "flex-1"} px-2 flex flex-col`,
|
|
5713
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: (ae = G.fields) == null ? void 0 : ae.map((q,
|
|
5713
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "space-y-4", children: (ae = G.fields) == null ? void 0 : ae.map((q, ce) => /* @__PURE__ */ o.jsx(X.Fragment, { children: _(q) }, ce)) })
|
|
5714
5714
|
},
|
|
5715
|
-
|
|
5715
|
+
te
|
|
5716
5716
|
);
|
|
5717
|
-
}) }) },
|
|
5717
|
+
}) }) }, I))
|
|
5718
5718
|
}
|
|
5719
|
-
) }, ie)) },
|
|
5719
|
+
) }, ie)) }, Z.key)
|
|
5720
5720
|
])
|
|
5721
5721
|
)
|
|
5722
5722
|
},
|
|
5723
|
-
|
|
5723
|
+
g
|
|
5724
5724
|
)
|
|
5725
5725
|
),
|
|
5726
5726
|
/* @__PURE__ */ o.jsx("footer", { className: "py-4 w-full flex justify-center space-x-4", children: i ?? /* @__PURE__ */ o.jsx(
|
|
@@ -5730,8 +5730,8 @@ function _i({ schema: r }) {
|
|
|
5730
5730
|
variant: "primary",
|
|
5731
5731
|
icon: Hs,
|
|
5732
5732
|
size: "sm",
|
|
5733
|
-
disabled:
|
|
5734
|
-
children: m(
|
|
5733
|
+
disabled: E || D || z > 0,
|
|
5734
|
+
children: m(E ? "ds.form.sending" : "ds.form.submit")
|
|
5735
5735
|
}
|
|
5736
5736
|
) })
|
|
5737
5737
|
]
|
|
@@ -5843,12 +5843,12 @@ const Fs = Lt({
|
|
|
5843
5843
|
}
|
|
5844
5844
|
});
|
|
5845
5845
|
function Fi({ children: r }) {
|
|
5846
|
-
const [e, t] =
|
|
5847
|
-
|
|
5846
|
+
const [e, t] = ee(!1), [s, n] = ee("light");
|
|
5847
|
+
le(() => {
|
|
5848
5848
|
if (typeof window > "u") return;
|
|
5849
5849
|
const i = localStorage.getItem("ds-theme");
|
|
5850
5850
|
i === "light" || i === "dark" ? n(i) : window.matchMedia("(prefers-color-scheme: dark)").matches && n("dark"), t(!0);
|
|
5851
|
-
}, []),
|
|
5851
|
+
}, []), le(() => {
|
|
5852
5852
|
e && (document.documentElement.classList.toggle("dark", s === "dark"), s === "dark" ? localStorage.setItem("ds-theme", "dark") : localStorage.removeItem("ds-theme"));
|
|
5853
5853
|
}, [s, e]);
|
|
5854
5854
|
const a = () => n((i) => i === "light" ? "dark" : "light");
|
|
@@ -5866,8 +5866,8 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5866
5866
|
profileOptions: c,
|
|
5867
5867
|
onChangeProfile: f
|
|
5868
5868
|
}) => {
|
|
5869
|
-
const d = r.slice(0, 3), { toggle: m } = Ss(), { t: h, i18n:
|
|
5870
|
-
|
|
5869
|
+
const d = r.slice(0, 3), { toggle: m } = Ss(), { t: h, i18n: v } = qt(), k = (j) => {
|
|
5870
|
+
v.changeLanguage(j), i(j);
|
|
5871
5871
|
};
|
|
5872
5872
|
return /* @__PURE__ */ o.jsxs("header", { className: "flex items-center bg-[var(--color-ds-background-page)] py-2", children: [
|
|
5873
5873
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -5979,7 +5979,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
5979
5979
|
title: t,
|
|
5980
5980
|
children: s,
|
|
5981
5981
|
footer: n
|
|
5982
|
-
}) => (
|
|
5982
|
+
}) => (le(() => {
|
|
5983
5983
|
const a = (i) => i.key === "Escape" && e();
|
|
5984
5984
|
return r && (document.addEventListener("keydown", a), document.body.style.overflow = "hidden"), () => {
|
|
5985
5985
|
document.removeEventListener("keydown", a), document.body.style.overflow = "";
|
|
@@ -6039,7 +6039,7 @@ const Ss = () => It(Fs), xi = ({
|
|
|
6039
6039
|
onSelect: t,
|
|
6040
6040
|
level: s = 0
|
|
6041
6041
|
}) => {
|
|
6042
|
-
const [n, a] =
|
|
6042
|
+
const [n, a] = ee(/* @__PURE__ */ new Set()), i = (l) => {
|
|
6043
6043
|
const c = new Set(n);
|
|
6044
6044
|
s === 0 ? (c.clear(), n.has(l) || c.add(l)) : c.has(l) ? c.delete(l) : c.add(l), a(c), t(l);
|
|
6045
6045
|
};
|
|
@@ -6150,71 +6150,73 @@ function Ci({
|
|
|
6150
6150
|
onSort: c,
|
|
6151
6151
|
className: f
|
|
6152
6152
|
}) {
|
|
6153
|
-
const [d, m] =
|
|
6154
|
-
|
|
6155
|
-
t && (
|
|
6156
|
-
}, [t])
|
|
6157
|
-
|
|
6153
|
+
const [d, m] = ee(e), [h, v] = ee(!!t), k = (_) => typeof s == "function" ? s(_) : _[s];
|
|
6154
|
+
le(() => {
|
|
6155
|
+
t && (v(!0), t().then((_) => m(_)).finally(() => v(!1)));
|
|
6156
|
+
}, [t]), le(() => {
|
|
6157
|
+
m(e);
|
|
6158
|
+
}, [e]);
|
|
6159
|
+
const [j, F] = ee(/* @__PURE__ */ new Set()), [y, p] = ee(1), [E, D] = ee(
|
|
6158
6160
|
l == null ? void 0 : l.sortBy
|
|
6159
|
-
), [
|
|
6161
|
+
), [O, z] = ee(
|
|
6160
6162
|
(l == null ? void 0 : l.sortDir) ?? "asc"
|
|
6161
|
-
),
|
|
6162
|
-
if (!
|
|
6163
|
-
const
|
|
6164
|
-
return [...d].sort((
|
|
6165
|
-
const
|
|
6166
|
-
return
|
|
6163
|
+
), Y = Me(() => {
|
|
6164
|
+
if (!E) return [...d];
|
|
6165
|
+
const _ = O === "asc" ? 1 : -1;
|
|
6166
|
+
return [...d].sort((C, g) => {
|
|
6167
|
+
const Z = C[E], J = g[E];
|
|
6168
|
+
return Z == null ? -_ : J == null || Z > J ? _ : Z < J ? -_ : 0;
|
|
6167
6169
|
});
|
|
6168
|
-
}, [d,
|
|
6169
|
-
const
|
|
6170
|
-
return
|
|
6171
|
-
}, [
|
|
6172
|
-
const
|
|
6173
|
-
|
|
6174
|
-
},
|
|
6175
|
-
const
|
|
6176
|
-
|
|
6177
|
-
}, M = (
|
|
6178
|
-
const
|
|
6179
|
-
if (
|
|
6180
|
-
const
|
|
6181
|
-
|
|
6170
|
+
}, [d, E, O]), P = Math.max(1, Math.ceil(Y.length / i)), U = Me(() => {
|
|
6171
|
+
const _ = (y - 1) * i;
|
|
6172
|
+
return Y.slice(_, _ + i);
|
|
6173
|
+
}, [Y, y, i]), W = (_) => {
|
|
6174
|
+
const C = new Set(j);
|
|
6175
|
+
C.has(_) ? C.delete(_) : C.add(_), F(C), a == null || a(d.filter((g) => C.has(k(g))));
|
|
6176
|
+
}, R = () => {
|
|
6177
|
+
const _ = U.every((g) => j.has(k(g))), C = new Set(j);
|
|
6178
|
+
_ ? U.forEach((g) => C.delete(k(g))) : U.forEach((g) => C.add(k(g))), F(C), a == null || a(d.filter((g) => C.has(k(g))));
|
|
6179
|
+
}, M = (_) => {
|
|
6180
|
+
const C = typeof _.accessor == "string" ? _.accessor : _.sortKey;
|
|
6181
|
+
if (E === C) {
|
|
6182
|
+
const g = O === "asc" ? "desc" : "asc";
|
|
6183
|
+
z(g), c == null || c(C, g);
|
|
6182
6184
|
} else
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
},
|
|
6185
|
+
D(C), z("asc"), c == null || c(C, "asc");
|
|
6186
|
+
p(1);
|
|
6187
|
+
}, B = () => h ? /* @__PURE__ */ o.jsx("tbody", { children: Array.from({ length: i }).map((_, C) => /* @__PURE__ */ o.jsxs("tr", { children: [
|
|
6186
6188
|
n && /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(He, { width: "1rem", height: "1rem", variant: "circle" }) }),
|
|
6187
|
-
r.map((
|
|
6188
|
-
] },
|
|
6189
|
+
r.map((g, Z) => /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(He, { width: "100%", height: "1em", variant: "rect" }) }, Z))
|
|
6190
|
+
] }, C)) }) : U.length === 0 ? /* @__PURE__ */ o.jsx("tbody", { children: /* @__PURE__ */ o.jsx("tr", { children: /* @__PURE__ */ o.jsx(
|
|
6189
6191
|
"td",
|
|
6190
6192
|
{
|
|
6191
6193
|
colSpan: n ? r.length + 1 : r.length,
|
|
6192
6194
|
className: "px-4 py-8 text-center text-gray-500",
|
|
6193
6195
|
children: "No hay datos"
|
|
6194
6196
|
}
|
|
6195
|
-
) }) }) : /* @__PURE__ */ o.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children:
|
|
6196
|
-
const
|
|
6197
|
+
) }) }) : /* @__PURE__ */ o.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: U.map((_) => {
|
|
6198
|
+
const C = k(_);
|
|
6197
6199
|
return /* @__PURE__ */ o.jsxs("tr", { className: "hover:bg-gray-50", children: [
|
|
6198
6200
|
n && /* @__PURE__ */ o.jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ o.jsx(
|
|
6199
6201
|
"input",
|
|
6200
6202
|
{
|
|
6201
6203
|
type: "checkbox",
|
|
6202
|
-
checked:
|
|
6203
|
-
onChange: () => W(
|
|
6204
|
+
checked: j.has(C),
|
|
6205
|
+
onChange: () => W(C)
|
|
6204
6206
|
}
|
|
6205
6207
|
) }),
|
|
6206
|
-
r.map((
|
|
6207
|
-
const
|
|
6208
|
+
r.map((g, Z) => {
|
|
6209
|
+
const J = g.render ? g.render(_) : typeof g.accessor == "function" ? g.accessor(_) : _[g.accessor];
|
|
6208
6210
|
return /* @__PURE__ */ o.jsx(
|
|
6209
6211
|
"td",
|
|
6210
6212
|
{
|
|
6211
6213
|
className: "px-4 py-2 whitespace-nowrap text-sm text-gray-800",
|
|
6212
|
-
children:
|
|
6214
|
+
children: J
|
|
6213
6215
|
},
|
|
6214
|
-
|
|
6216
|
+
Z
|
|
6215
6217
|
);
|
|
6216
6218
|
})
|
|
6217
|
-
] },
|
|
6219
|
+
] }, C);
|
|
6218
6220
|
}) });
|
|
6219
6221
|
return /* @__PURE__ */ o.jsxs("div", { className: $("w-full overflow-auto", f), children: [
|
|
6220
6222
|
/* @__PURE__ */ o.jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [
|
|
@@ -6223,41 +6225,41 @@ function Ci({
|
|
|
6223
6225
|
"input",
|
|
6224
6226
|
{
|
|
6225
6227
|
type: "checkbox",
|
|
6226
|
-
checked:
|
|
6227
|
-
onChange:
|
|
6228
|
+
checked: U.length > 0 && U.every((_) => j.has(k(_))),
|
|
6229
|
+
onChange: R
|
|
6228
6230
|
}
|
|
6229
6231
|
) }),
|
|
6230
|
-
r.map((
|
|
6231
|
-
const
|
|
6232
|
+
r.map((_) => {
|
|
6233
|
+
const C = typeof _.accessor == "string" ? _.accessor : _.header, g = _.sortable && !!_.accessor, Z = E === _.accessor;
|
|
6232
6234
|
return /* @__PURE__ */ o.jsx(
|
|
6233
6235
|
"th",
|
|
6234
6236
|
{
|
|
6235
6237
|
className: $(
|
|
6236
6238
|
"px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
6237
|
-
|
|
6239
|
+
_.width
|
|
6238
6240
|
),
|
|
6239
|
-
onClick: () =>
|
|
6241
|
+
onClick: () => g && M(_),
|
|
6240
6242
|
children: /* @__PURE__ */ o.jsxs("div", { className: "inline-flex items-center space-x-1 cursor-pointer select-none", children: [
|
|
6241
|
-
/* @__PURE__ */ o.jsx("span", { children:
|
|
6242
|
-
|
|
6243
|
+
/* @__PURE__ */ o.jsx("span", { children: _.header }),
|
|
6244
|
+
g && /* @__PURE__ */ o.jsx("span", { className: "text-xs", children: Z ? O === "asc" ? "▲" : "▼" : "⇵" })
|
|
6243
6245
|
] })
|
|
6244
6246
|
},
|
|
6245
|
-
|
|
6247
|
+
C
|
|
6246
6248
|
);
|
|
6247
6249
|
})
|
|
6248
6250
|
] }) }),
|
|
6249
|
-
|
|
6251
|
+
B()
|
|
6250
6252
|
] }),
|
|
6251
6253
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between py-2 px-4", children: [
|
|
6252
|
-
/* @__PURE__ */ o.jsx("div", { className: "text-sm text-gray-700", children: h ? "Cargando datos..." : `Página ${
|
|
6254
|
+
/* @__PURE__ */ o.jsx("div", { className: "text-sm text-gray-700", children: h ? "Cargando datos..." : `Página ${y} de ${P}` }),
|
|
6253
6255
|
/* @__PURE__ */ o.jsxs("div", { className: "space-x-2", children: [
|
|
6254
6256
|
/* @__PURE__ */ o.jsx(
|
|
6255
6257
|
Ve,
|
|
6256
6258
|
{
|
|
6257
6259
|
size: "sm",
|
|
6258
6260
|
variant: "outline",
|
|
6259
|
-
disabled: h ||
|
|
6260
|
-
onClick: () =>
|
|
6261
|
+
disabled: h || y <= 1,
|
|
6262
|
+
onClick: () => p((_) => Math.max(1, _ - 1)),
|
|
6261
6263
|
children: "Prev"
|
|
6262
6264
|
}
|
|
6263
6265
|
),
|
|
@@ -6266,8 +6268,8 @@ function Ci({
|
|
|
6266
6268
|
{
|
|
6267
6269
|
size: "sm",
|
|
6268
6270
|
variant: "outline",
|
|
6269
|
-
disabled: h ||
|
|
6270
|
-
onClick: () =>
|
|
6271
|
+
disabled: h || y >= P,
|
|
6272
|
+
onClick: () => p((_) => Math.min(P, _ + 1)),
|
|
6271
6273
|
children: "Next"
|
|
6272
6274
|
}
|
|
6273
6275
|
)
|
|
@@ -6297,13 +6299,13 @@ function yi({
|
|
|
6297
6299
|
control: r,
|
|
6298
6300
|
rules: t,
|
|
6299
6301
|
defaultValue: s,
|
|
6300
|
-
render: ({ field:
|
|
6302
|
+
render: ({ field: v, fieldState: k }) => {
|
|
6301
6303
|
var j;
|
|
6302
6304
|
return /* @__PURE__ */ o.jsx(
|
|
6303
6305
|
yi,
|
|
6304
6306
|
{
|
|
6305
|
-
checked:
|
|
6306
|
-
onChange:
|
|
6307
|
+
checked: v.value,
|
|
6308
|
+
onChange: v.onChange,
|
|
6307
6309
|
disabled: i,
|
|
6308
6310
|
label: l,
|
|
6309
6311
|
labelPosition: c,
|