zudoku 0.6.2-dev.3 → 0.6.2-dev.5
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/cli/dev/handler.js +5 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +9 -0
- package/dist/config/validators/InputSidebarSchema.js +2 -0
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +9 -3
- package/dist/config/validators/SidebarSchema.js +7 -3
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +5 -3
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +2 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/vite/plugin-icons.d.ts +3 -0
- package/dist/vite/plugin-icons.js +47 -0
- package/dist/vite/plugin-icons.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +10 -1
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-DYnkydqa.js → AuthenticationPlugin-Bx9FK124.js} +3 -3
- package/lib/{AuthenticationPlugin-DYnkydqa.js.map → AuthenticationPlugin-Bx9FK124.js.map} +1 -1
- package/lib/{CategoryHeading-w2EW676o.js → CategoryHeading-XnFqN2lJ.js} +2 -2
- package/lib/{CategoryHeading-w2EW676o.js.map → CategoryHeading-XnFqN2lJ.js.map} +1 -1
- package/lib/{DeveloperHint-D87KcpDW.js → DeveloperHint-FBb2uXJe.js} +2 -2
- package/lib/{DeveloperHint-D87KcpDW.js.map → DeveloperHint-FBb2uXJe.js.map} +1 -1
- package/lib/{ErrorPage-BdHAg3Rg.js → ErrorPage-knunPbKI.js} +4 -4
- package/lib/{ErrorPage-BdHAg3Rg.js.map → ErrorPage-knunPbKI.js.map} +1 -1
- package/lib/{Input-BmwltPfA.js → Input-BEDZAKw0.js} +350 -366
- package/lib/Input-BEDZAKw0.js.map +1 -0
- package/lib/{Markdown-BZUoEvL7.js → Markdown-B4aR03g6.js} +2494 -2650
- package/lib/Markdown-B4aR03g6.js.map +1 -0
- package/lib/{MdxPage-E4NFxzHQ.js → MdxPage-BZyQsH8Z.js} +44 -55
- package/lib/MdxPage-BZyQsH8Z.js.map +1 -0
- package/lib/{OperationList-DVIuzHN7.js → OperationList-2NeWEM0u.js} +103 -171
- package/lib/OperationList-2NeWEM0u.js.map +1 -0
- package/lib/{Route-5sI-urRK.js → Route-BZPewmrN.js} +3 -3
- package/lib/{Route-5sI-urRK.js.map → Route-BZPewmrN.js.map} +1 -1
- package/lib/{SidebarBadge-6EEz-Bwe.js → SidebarBadge-COz0hgfa.js} +39 -39
- package/lib/{SidebarBadge-6EEz-Bwe.js.map → SidebarBadge-COz0hgfa.js.map} +1 -1
- package/lib/{SlotletProvider-CNyl5wU0.js → SlotletProvider-DJMaOUDs.js} +70 -94
- package/lib/SlotletProvider-DJMaOUDs.js.map +1 -0
- package/lib/Spinner-3cQDBVGr.js +7 -0
- package/lib/Spinner-3cQDBVGr.js.map +1 -0
- package/lib/{ZudokuContext-BHNQL3XO.js → ZudokuContext-cr-pTRY1.js} +25 -25
- package/lib/{ZudokuContext-BHNQL3XO.js.map → ZudokuContext-cr-pTRY1.js.map} +1 -1
- package/lib/{_commonjsHelpers-BVfed4GL.js → _commonjsHelpers-BkfeUUK-.js} +3 -3
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
- package/lib/{index-CbJpF8Yf.js → index-1EDgIO6b.js} +7 -7
- package/lib/{index-CbJpF8Yf.js.map → index-1EDgIO6b.js.map} +1 -1
- package/lib/{index-ChhUJhLT.js → index-BG0g4WW0.js} +10 -10
- package/lib/{index-ChhUJhLT.js.map → index-BG0g4WW0.js.map} +1 -1
- package/lib/{index-DdUotMOQ.js → index-Dv2KZuEw.js} +1113 -1169
- package/lib/index-Dv2KZuEw.js.map +1 -0
- package/lib/{index-BGY8VjAV.js → index-Zezcv0xb.js} +24 -24
- package/lib/{index-BGY8VjAV.js.map → index-Zezcv0xb.js.map} +1 -1
- package/lib/{router-BiRCp01d.js → router-D2p7Olpn.js} +22 -22
- package/lib/{router-BiRCp01d.js.map → router-D2p7Olpn.js.map} +1 -1
- package/lib/{slugify-CiPVjteN.js → slugify-DbLhpSPt.js} +2 -2
- package/lib/{slugify-CiPVjteN.js.map → slugify-DbLhpSPt.js.map} +1 -1
- package/lib/{state-DsXXkBLH.js → state-lIwt9isb.js} +15 -15
- package/lib/{state-DsXXkBLH.js.map → state-lIwt9isb.js.map} +1 -1
- package/lib/{utils-BPHLKjns.js → utils-ByIc_KIM.js} +68 -68
- package/lib/{utils-BPHLKjns.js.map → utils-ByIc_KIM.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +8 -8
- package/lib/zudoku.components.js +754 -834
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +2 -0
- package/lib/zudoku.icons.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +80 -131
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +9 -8
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/package.json +6 -2
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -31
- package/src/lib/components/navigation/SidebarItem.tsx +2 -1
- package/src/lib/icons.ts +1 -0
- package/lib/Input-BmwltPfA.js.map +0 -1
- package/lib/Markdown-BZUoEvL7.js.map +0 -1
- package/lib/MdxPage-E4NFxzHQ.js.map +0 -1
- package/lib/OperationList-DVIuzHN7.js.map +0 -1
- package/lib/SlotletProvider-CNyl5wU0.js.map +0 -1
- package/lib/Spinner-B9eFggre.js +0 -15
- package/lib/Spinner-B9eFggre.js.map +0 -1
- package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
- package/lib/index-DdUotMOQ.js.map +0 -1
|
@@ -4,36 +4,21 @@ var zt = (e) => {
|
|
|
4
4
|
var St = (e, r, t) => r.has(e) || zt("Cannot " + t);
|
|
5
5
|
var G = (e, r, t) => (St(e, r, "read from private field"), t ? t.call(e) : r.get(e)), Ue = (e, r, t) => r.has(e) ? zt("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), He = (e, r, t, s) => (St(e, r, "write to private field"), s ? s.call(e, t) : r.set(e, t), t), We = (e, r, t) => (St(e, r, "access private method"), t);
|
|
6
6
|
import * as h from "react";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { S as
|
|
7
|
+
import I from "react";
|
|
8
|
+
import { n as fs, f as ps, c as hs, o as nr, d as xe, A as ms, P as he, b as ne, e as Ne, i as ys, j as gs, R as vs, S as xs, F as Ss, D as _s, C as bs, a as Bt, p as ws, V as As, h as Cs, l as Vs, g as Es, u as Yt, q as Fs } from "./index-Zezcv0xb.js";
|
|
9
|
+
import { S as Ts, s as Rs, h as Xt, n as ir, a as Is, d as Ns, e as Ds } from "./ZudokuContext-cr-pTRY1.js";
|
|
10
10
|
import { j as b } from "./jsx-runtime-B6kdoens.js";
|
|
11
11
|
import * as ar from "react-dom";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the ISC license.
|
|
17
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
const cr = lr("ChevronDown", [
|
|
20
|
-
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
21
|
-
]);
|
|
22
|
-
/**
|
|
23
|
-
* @license lucide-react v0.378.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/
|
|
28
|
-
const Ms = lr("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
29
|
-
var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
|
|
12
|
+
import { ChevronDown as lr, ChevronUp as Ps, Check as ks } from "lucide-react";
|
|
13
|
+
import { a as Ee } from "./Markdown-B4aR03g6.js";
|
|
14
|
+
var Te, Re, ae, Ce, Ve, nt, Nt, or, Ms = (or = class extends Ts {
|
|
30
15
|
constructor(r, t) {
|
|
31
16
|
super();
|
|
32
17
|
Ue(this, Ve);
|
|
33
18
|
Ue(this, Te);
|
|
34
|
-
Ue(this,
|
|
19
|
+
Ue(this, Re);
|
|
35
20
|
Ue(this, ae);
|
|
36
|
-
Ue(this,
|
|
21
|
+
Ue(this, Ce);
|
|
37
22
|
He(this, Te, r), this.setOptions(t), this.bindMethods(), We(this, Ve, nt).call(this);
|
|
38
23
|
}
|
|
39
24
|
bindMethods() {
|
|
@@ -56,7 +41,7 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
|
|
|
56
41
|
We(this, Ve, nt).call(this), We(this, Ve, Nt).call(this, r);
|
|
57
42
|
}
|
|
58
43
|
getCurrentResult() {
|
|
59
|
-
return G(this,
|
|
44
|
+
return G(this, Re);
|
|
60
45
|
}
|
|
61
46
|
reset() {
|
|
62
47
|
var r;
|
|
@@ -64,12 +49,12 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
|
|
|
64
49
|
}
|
|
65
50
|
mutate(r, t) {
|
|
66
51
|
var s;
|
|
67
|
-
return He(this,
|
|
52
|
+
return He(this, Ce, t), (s = G(this, ae)) == null || s.removeObserver(this), He(this, ae, G(this, Te).getMutationCache().build(G(this, Te), this.options)), G(this, ae).addObserver(this), G(this, ae).execute(r);
|
|
68
53
|
}
|
|
69
|
-
}, Te = new WeakMap(),
|
|
54
|
+
}, Te = new WeakMap(), Re = new WeakMap(), ae = new WeakMap(), Ce = new WeakMap(), Ve = new WeakSet(), nt = function() {
|
|
70
55
|
var t;
|
|
71
|
-
const r = ((t = G(this, ae)) == null ? void 0 : t.state) ??
|
|
72
|
-
He(this,
|
|
56
|
+
const r = ((t = G(this, ae)) == null ? void 0 : t.state) ?? fs();
|
|
57
|
+
He(this, Re, {
|
|
73
58
|
...r,
|
|
74
59
|
isPending: r.status === "pending",
|
|
75
60
|
isSuccess: r.status === "success",
|
|
@@ -81,9 +66,9 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
|
|
|
81
66
|
}, Nt = function(r) {
|
|
82
67
|
ir.batch(() => {
|
|
83
68
|
var t, s, n, i, l, c, d, S;
|
|
84
|
-
if (G(this,
|
|
85
|
-
const m = G(this,
|
|
86
|
-
(r == null ? void 0 : r.type) === "success" ? ((s = (t = G(this,
|
|
69
|
+
if (G(this, Ce) && this.hasListeners()) {
|
|
70
|
+
const m = G(this, Re).variables, y = G(this, Re).context;
|
|
71
|
+
(r == null ? void 0 : r.type) === "success" ? ((s = (t = G(this, Ce)).onSuccess) == null || s.call(t, r.data, m, y), (i = (n = G(this, Ce)).onSettled) == null || i.call(n, r.data, null, m, y)) : (r == null ? void 0 : r.type) === "error" && ((c = (l = G(this, Ce)).onError) == null || c.call(l, r.error, m, y), (S = (d = G(this, Ce)).onSettled) == null || S.call(
|
|
87
72
|
d,
|
|
88
73
|
void 0,
|
|
89
74
|
r.error,
|
|
@@ -92,13 +77,13 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
|
|
|
92
77
|
));
|
|
93
78
|
}
|
|
94
79
|
this.listeners.forEach((m) => {
|
|
95
|
-
m(G(this,
|
|
80
|
+
m(G(this, Re));
|
|
96
81
|
});
|
|
97
82
|
});
|
|
98
83
|
}, or);
|
|
99
84
|
function Bo(e, r) {
|
|
100
|
-
const t =
|
|
101
|
-
() => new
|
|
85
|
+
const t = Is(), [s] = h.useState(
|
|
86
|
+
() => new Ms(
|
|
102
87
|
t,
|
|
103
88
|
e
|
|
104
89
|
)
|
|
@@ -115,17 +100,17 @@ function Bo(e, r) {
|
|
|
115
100
|
() => s.getCurrentResult()
|
|
116
101
|
), i = h.useCallback(
|
|
117
102
|
(l, c) => {
|
|
118
|
-
s.mutate(l, c).catch(
|
|
103
|
+
s.mutate(l, c).catch(Ns);
|
|
119
104
|
},
|
|
120
105
|
[s]
|
|
121
106
|
);
|
|
122
|
-
if (n.error &&
|
|
107
|
+
if (n.error && Ds(s.options.throwOnError, [n.error]))
|
|
123
108
|
throw n.error;
|
|
124
109
|
return { ...n, mutate: i, mutateAsync: n.mutate };
|
|
125
110
|
}
|
|
126
111
|
var Qe = (e) => e.type === "checkbox", $e = (e) => e instanceof Date, oe = (e) => e == null;
|
|
127
|
-
const
|
|
128
|
-
var re = (e) => !oe(e) && !Array.isArray(e) &&
|
|
112
|
+
const cr = (e) => typeof e == "object";
|
|
113
|
+
var re = (e) => !oe(e) && !Array.isArray(e) && cr(e) && !$e(e), ur = (e) => re(e) && e.target ? Qe(e.target) ? e.target.checked : e.target.value : e, Os = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, dr = (e, r) => e.has(Os(r)), js = (e) => {
|
|
129
114
|
const r = e.constructor && e.constructor.prototype;
|
|
130
115
|
return re(r) && r.hasOwnProperty("isPrototypeOf");
|
|
131
116
|
}, Ut = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -137,7 +122,7 @@ function te(e) {
|
|
|
137
122
|
else if (e instanceof Set)
|
|
138
123
|
r = new Set(e);
|
|
139
124
|
else if (!(Ut && (e instanceof Blob || e instanceof FileList)) && (t || re(e)))
|
|
140
|
-
if (r = t ? [] : {}, !t && !
|
|
125
|
+
if (r = t ? [] : {}, !t && !js(e))
|
|
141
126
|
r = e;
|
|
142
127
|
else
|
|
143
128
|
for (const s in e)
|
|
@@ -151,9 +136,9 @@ var Je = (e) => Array.isArray(e) ? e.filter(Boolean) : [], $ = (e) => e === void
|
|
|
151
136
|
return t;
|
|
152
137
|
const s = Je(r.split(/[,[\].]+?/)).reduce((n, i) => oe(n) ? n : n[i], e);
|
|
153
138
|
return $(s) || s === e ? $(e[r]) ? t : e[r] : s;
|
|
154
|
-
}, ge = (e) => typeof e == "boolean", Ht = (e) => /^\w*$/.test(e),
|
|
139
|
+
}, ge = (e) => typeof e == "boolean", Ht = (e) => /^\w*$/.test(e), fr = (e) => Je(e.replace(/["|']|\]/g, "").split(/\.|\[/)), H = (e, r, t) => {
|
|
155
140
|
let s = -1;
|
|
156
|
-
const n = Ht(r) ? [r] :
|
|
141
|
+
const n = Ht(r) ? [r] : fr(r), i = n.length, l = i - 1;
|
|
157
142
|
for (; ++s < i; ) {
|
|
158
143
|
const c = n[s];
|
|
159
144
|
let d = t;
|
|
@@ -185,11 +170,11 @@ const at = {
|
|
|
185
170
|
pattern: "pattern",
|
|
186
171
|
required: "required",
|
|
187
172
|
validate: "validate"
|
|
188
|
-
},
|
|
173
|
+
}, pr = I.createContext(null), pt = () => I.useContext(pr), Uo = (e) => {
|
|
189
174
|
const { children: r, ...t } = e;
|
|
190
|
-
return
|
|
175
|
+
return I.createElement(pr.Provider, { value: t }, r);
|
|
191
176
|
};
|
|
192
|
-
var
|
|
177
|
+
var hr = (e, r, t, s = !0) => {
|
|
193
178
|
const n = {
|
|
194
179
|
defaultValues: r._defaultValues
|
|
195
180
|
};
|
|
@@ -201,14 +186,14 @@ var mr = (e, r, t, s = !0) => {
|
|
|
201
186
|
}
|
|
202
187
|
});
|
|
203
188
|
return n;
|
|
204
|
-
}, le = (e) => re(e) && !Object.keys(e).length,
|
|
189
|
+
}, le = (e) => re(e) && !Object.keys(e).length, mr = (e, r, t, s) => {
|
|
205
190
|
t(e);
|
|
206
191
|
const { name: n, ...i } = e;
|
|
207
192
|
return le(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((l) => r[l] === (!s || pe.all));
|
|
208
|
-
}, ce = (e) => Array.isArray(e) ? e : [e],
|
|
193
|
+
}, ce = (e) => Array.isArray(e) ? e : [e], yr = (e, r, t) => !e || !r || e === r || ce(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s)));
|
|
209
194
|
function ht(e) {
|
|
210
|
-
const r =
|
|
211
|
-
r.current = e,
|
|
195
|
+
const r = I.useRef(e);
|
|
196
|
+
r.current = e, I.useEffect(() => {
|
|
212
197
|
const t = !e.disabled && r.current.subject && r.current.subject.subscribe({
|
|
213
198
|
next: r.current.next
|
|
214
199
|
});
|
|
@@ -217,8 +202,8 @@ function ht(e) {
|
|
|
217
202
|
};
|
|
218
203
|
}, [e.disabled]);
|
|
219
204
|
}
|
|
220
|
-
function
|
|
221
|
-
const r = pt(), { control: t = r.control, disabled: s, name: n, exact: i } = e || {}, [l, c] =
|
|
205
|
+
function Ls(e) {
|
|
206
|
+
const r = pt(), { control: t = r.control, disabled: s, name: n, exact: i } = e || {}, [l, c] = I.useState(t._formState), d = I.useRef(!0), S = I.useRef({
|
|
222
207
|
isDirty: !1,
|
|
223
208
|
isLoading: !1,
|
|
224
209
|
dirtyFields: !1,
|
|
@@ -227,46 +212,46 @@ function Bs(e) {
|
|
|
227
212
|
isValidating: !1,
|
|
228
213
|
isValid: !1,
|
|
229
214
|
errors: !1
|
|
230
|
-
}), m =
|
|
215
|
+
}), m = I.useRef(n);
|
|
231
216
|
return m.current = n, ht({
|
|
232
217
|
disabled: s,
|
|
233
|
-
next: (y) => d.current &&
|
|
218
|
+
next: (y) => d.current && yr(m.current, y.name, i) && mr(y, S.current, t._updateFormState) && c({
|
|
234
219
|
...t._formState,
|
|
235
220
|
...y
|
|
236
221
|
}),
|
|
237
222
|
subject: t._subjects.state
|
|
238
|
-
}),
|
|
223
|
+
}), I.useEffect(() => (d.current = !0, S.current.isValid && t._updateValid(!0), () => {
|
|
239
224
|
d.current = !1;
|
|
240
|
-
}), [t]),
|
|
225
|
+
}), [t]), hr(l, t, S.current, !1);
|
|
241
226
|
}
|
|
242
|
-
var ve = (e) => typeof e == "string",
|
|
243
|
-
function
|
|
244
|
-
const r = pt(), { control: t = r.control, name: s, defaultValue: n, disabled: i, exact: l } = e || {}, c =
|
|
227
|
+
var ve = (e) => typeof e == "string", gr = (e, r, t, s, n) => ve(e) ? (s && r.watch.add(e), p(t, e, n)) : Array.isArray(e) ? e.map((i) => (s && r.watch.add(i), p(t, i))) : (s && (r.watchAll = !0), t);
|
|
228
|
+
function Bs(e) {
|
|
229
|
+
const r = pt(), { control: t = r.control, name: s, defaultValue: n, disabled: i, exact: l } = e || {}, c = I.useRef(s);
|
|
245
230
|
c.current = s, ht({
|
|
246
231
|
disabled: i,
|
|
247
232
|
subject: t._subjects.values,
|
|
248
233
|
next: (m) => {
|
|
249
|
-
|
|
234
|
+
yr(c.current, m.name, l) && S(te(gr(c.current, t._names, m.values || t._formValues, !1, n)));
|
|
250
235
|
}
|
|
251
236
|
});
|
|
252
|
-
const [d, S] =
|
|
253
|
-
return
|
|
237
|
+
const [d, S] = I.useState(t._getWatch(s, n));
|
|
238
|
+
return I.useEffect(() => t._removeUnmounted()), d;
|
|
254
239
|
}
|
|
255
|
-
function
|
|
256
|
-
const r = pt(), { name: t, disabled: s, control: n = r.control, shouldUnregister: i } = e, l =
|
|
240
|
+
function Us(e) {
|
|
241
|
+
const r = pt(), { name: t, disabled: s, control: n = r.control, shouldUnregister: i } = e, l = dr(n._names.array, t), c = Bs({
|
|
257
242
|
control: n,
|
|
258
243
|
name: t,
|
|
259
244
|
defaultValue: p(n._formValues, t, p(n._defaultValues, t, e.defaultValue)),
|
|
260
245
|
exact: !0
|
|
261
|
-
}), d =
|
|
246
|
+
}), d = Ls({
|
|
262
247
|
control: n,
|
|
263
248
|
name: t
|
|
264
|
-
}), S =
|
|
249
|
+
}), S = I.useRef(n.register(t, {
|
|
265
250
|
...e.rules,
|
|
266
251
|
value: c,
|
|
267
252
|
...ge(e.disabled) ? { disabled: e.disabled } : {}
|
|
268
253
|
}));
|
|
269
|
-
return
|
|
254
|
+
return I.useEffect(() => {
|
|
270
255
|
const m = n._options.shouldUnregister || i, y = (E, O) => {
|
|
271
256
|
const w = p(n._fields, E);
|
|
272
257
|
w && w._f && (w._f.mount = O);
|
|
@@ -278,7 +263,7 @@ function Hs(e) {
|
|
|
278
263
|
return () => {
|
|
279
264
|
(l ? m && !n._state.action : m) ? n.unregister(t) : y(t, !1);
|
|
280
265
|
};
|
|
281
|
-
}, [t, n, l, i]),
|
|
266
|
+
}, [t, n, l, i]), I.useEffect(() => {
|
|
282
267
|
p(n._fields, t) && n._updateDisabledField({
|
|
283
268
|
disabled: s,
|
|
284
269
|
fields: n._fields,
|
|
@@ -290,14 +275,14 @@ function Hs(e) {
|
|
|
290
275
|
name: t,
|
|
291
276
|
value: c,
|
|
292
277
|
...ge(s) || d.disabled ? { disabled: d.disabled || s } : {},
|
|
293
|
-
onChange:
|
|
278
|
+
onChange: I.useCallback((m) => S.current.onChange({
|
|
294
279
|
target: {
|
|
295
|
-
value:
|
|
280
|
+
value: ur(m),
|
|
296
281
|
name: t
|
|
297
282
|
},
|
|
298
283
|
type: at.CHANGE
|
|
299
284
|
}), [t]),
|
|
300
|
-
onBlur:
|
|
285
|
+
onBlur: I.useCallback(() => S.current.onBlur({
|
|
301
286
|
target: {
|
|
302
287
|
value: p(n._formValues, t),
|
|
303
288
|
name: t
|
|
@@ -339,8 +324,8 @@ function Hs(e) {
|
|
|
339
324
|
})
|
|
340
325
|
};
|
|
341
326
|
}
|
|
342
|
-
const Ho = (e) => e.render(
|
|
343
|
-
var
|
|
327
|
+
const Ho = (e) => e.render(Us(e));
|
|
328
|
+
var Hs = (e, r, t, s, n) => r ? {
|
|
344
329
|
...t[e],
|
|
345
330
|
types: {
|
|
346
331
|
...t[e] && t[e].types ? t[e].types : {},
|
|
@@ -374,10 +359,10 @@ const qe = (e, r, t, s) => {
|
|
|
374
359
|
}
|
|
375
360
|
}
|
|
376
361
|
};
|
|
377
|
-
var
|
|
362
|
+
var vr = (e, r, t) => {
|
|
378
363
|
const s = ce(p(e, t));
|
|
379
364
|
return H(s, "root", r[t]), H(e, t, s), e;
|
|
380
|
-
}, Wt = (e) => e.type === "file",
|
|
365
|
+
}, Wt = (e) => e.type === "file", Ie = (e) => typeof e == "function", lt = (e) => {
|
|
381
366
|
if (!Ut)
|
|
382
367
|
return !1;
|
|
383
368
|
const r = e ? e.ownerDocument : 0;
|
|
@@ -387,7 +372,7 @@ const Zt = {
|
|
|
387
372
|
value: !1,
|
|
388
373
|
isValid: !1
|
|
389
374
|
}, Qt = { value: !0, isValid: !0 };
|
|
390
|
-
var
|
|
375
|
+
var xr = (e) => {
|
|
391
376
|
if (Array.isArray(e)) {
|
|
392
377
|
if (e.length > 1) {
|
|
393
378
|
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
@@ -404,7 +389,7 @@ const Jt = {
|
|
|
404
389
|
isValid: !1,
|
|
405
390
|
value: null
|
|
406
391
|
};
|
|
407
|
-
var
|
|
392
|
+
var Sr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
408
393
|
isValid: !0,
|
|
409
394
|
value: t.value
|
|
410
395
|
} : r, Jt) : Jt;
|
|
@@ -425,7 +410,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
|
|
|
425
410
|
return {};
|
|
426
411
|
const D = l ? l[0] : i, Z = (F) => {
|
|
427
412
|
s && D.reportValidity && (D.setCustomValidity(ge(F) ? "" : F || ""), D.reportValidity());
|
|
428
|
-
}, v = {},
|
|
413
|
+
}, v = {}, A = Kt(i), V = Qe(i), k = A || V, Q = (P || Wt(i)) && $(i.value) && $(g) || lt(i) && i.value === "" || g === "" || Array.isArray(g) && !g.length, z = Hs.bind(null, w, t, v), de = (F, N, B, j = we.maxLength, Y = we.minLength) => {
|
|
429
414
|
const X = F ? N : B;
|
|
430
415
|
v[w] = {
|
|
431
416
|
type: F ? j : Y,
|
|
@@ -434,7 +419,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
|
|
|
434
419
|
...z(F ? j : Y, X)
|
|
435
420
|
};
|
|
436
421
|
};
|
|
437
|
-
if (n ? !Array.isArray(g) || !g.length : c && (!k && (Q || oe(g)) || ge(g) && !g || V && !
|
|
422
|
+
if (n ? !Array.isArray(g) || !g.length : c && (!k && (Q || oe(g)) || ge(g) && !g || V && !xr(l).isValid || A && !Sr(l).isValid)) {
|
|
438
423
|
const { value: F, message: N } = it(c) ? { value: !!c, message: c } : Ke(c);
|
|
439
424
|
if (F && (v[w] = {
|
|
440
425
|
type: we.required,
|
|
@@ -473,7 +458,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
|
|
|
473
458
|
return Z(N), v;
|
|
474
459
|
}
|
|
475
460
|
if (O) {
|
|
476
|
-
if (
|
|
461
|
+
if (Ie(O)) {
|
|
477
462
|
const F = await O(g, r), N = er(F, D);
|
|
478
463
|
if (N && (v[w] = {
|
|
479
464
|
...N,
|
|
@@ -504,139 +489,139 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
|
|
|
504
489
|
...ce(r)
|
|
505
490
|
], wt = (e) => Array.isArray(e) ? e.map(() => {
|
|
506
491
|
}) : void 0;
|
|
507
|
-
function
|
|
492
|
+
function At(e, r, t) {
|
|
508
493
|
return [
|
|
509
494
|
...e.slice(0, r),
|
|
510
495
|
...ce(t),
|
|
511
496
|
...e.slice(r)
|
|
512
497
|
];
|
|
513
498
|
}
|
|
514
|
-
var
|
|
499
|
+
var Ct = (e, r, t) => Array.isArray(e) ? ($(e[t]) && (e[t] = void 0), e.splice(t, 0, e.splice(r, 1)[0]), e) : [], Vt = (e, r) => [
|
|
515
500
|
...ce(r),
|
|
516
501
|
...ce(e)
|
|
517
502
|
];
|
|
518
|
-
function
|
|
503
|
+
function Ws(e, r) {
|
|
519
504
|
let t = 0;
|
|
520
505
|
const s = [...e];
|
|
521
506
|
for (const n of r)
|
|
522
507
|
s.splice(n - t, 1), t++;
|
|
523
508
|
return Je(s).length ? s : [];
|
|
524
509
|
}
|
|
525
|
-
var Et = (e, r) => $(r) ? [] :
|
|
510
|
+
var Et = (e, r) => $(r) ? [] : Ws(e, ce(r).sort((t, s) => t - s)), Ft = (e, r, t) => {
|
|
526
511
|
[e[r], e[t]] = [e[t], e[r]];
|
|
527
512
|
};
|
|
528
|
-
function
|
|
513
|
+
function Ks(e, r) {
|
|
529
514
|
const t = r.slice(0, -1).length;
|
|
530
515
|
let s = 0;
|
|
531
516
|
for (; s < t; )
|
|
532
517
|
e = $(e) ? s++ : e[r[s++]];
|
|
533
518
|
return e;
|
|
534
519
|
}
|
|
535
|
-
function
|
|
520
|
+
function $s(e) {
|
|
536
521
|
for (const r in e)
|
|
537
522
|
if (e.hasOwnProperty(r) && !$(e[r]))
|
|
538
523
|
return !1;
|
|
539
524
|
return !0;
|
|
540
525
|
}
|
|
541
526
|
function ee(e, r) {
|
|
542
|
-
const t = Array.isArray(r) ? r : Ht(r) ? [r] :
|
|
543
|
-
return s && delete s[i], n !== 0 && (re(s) && le(s) || Array.isArray(s) &&
|
|
527
|
+
const t = Array.isArray(r) ? r : Ht(r) ? [r] : fr(r), s = t.length === 1 ? e : Ks(e, t), n = t.length - 1, i = t[n];
|
|
528
|
+
return s && delete s[i], n !== 0 && (re(s) && le(s) || Array.isArray(s) && $s(s)) && ee(e, t.slice(0, -1)), e;
|
|
544
529
|
}
|
|
545
530
|
var tr = (e, r, t) => (e[r] = t, e);
|
|
546
531
|
function Wo(e) {
|
|
547
|
-
const r = pt(), { control: t = r.control, name: s, keyName: n = "id", shouldUnregister: i } = e, [l, c] =
|
|
532
|
+
const r = pt(), { control: t = r.control, name: s, keyName: n = "id", shouldUnregister: i } = e, [l, c] = I.useState(t._getFieldArray(s)), d = I.useRef(t._getFieldArray(s).map(Fe)), S = I.useRef(l), m = I.useRef(s), y = I.useRef(!1);
|
|
548
533
|
m.current = s, S.current = l, t._names.array.add(s), e.rules && t.register(s, e.rules), ht({
|
|
549
|
-
next: ({ values: v, name:
|
|
550
|
-
if (
|
|
534
|
+
next: ({ values: v, name: A }) => {
|
|
535
|
+
if (A === m.current || !A) {
|
|
551
536
|
const V = p(v, m.current);
|
|
552
537
|
Array.isArray(V) && (c(V), d.current = V.map(Fe));
|
|
553
538
|
}
|
|
554
539
|
},
|
|
555
540
|
subject: t._subjects.array
|
|
556
541
|
});
|
|
557
|
-
const E =
|
|
542
|
+
const E = I.useCallback((v) => {
|
|
558
543
|
y.current = !0, t._updateFieldArray(s, v);
|
|
559
|
-
}, [t, s]), O = (v,
|
|
544
|
+
}, [t, s]), O = (v, A) => {
|
|
560
545
|
const V = ce(te(v)), k = bt(t._getFieldArray(s), V);
|
|
561
|
-
t._names.focus = _t(s, k.length - 1,
|
|
546
|
+
t._names.focus = _t(s, k.length - 1, A), d.current = bt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, bt, {
|
|
562
547
|
argA: wt(v)
|
|
563
548
|
});
|
|
564
|
-
}, w = (v,
|
|
549
|
+
}, w = (v, A) => {
|
|
565
550
|
const V = ce(te(v)), k = Vt(t._getFieldArray(s), V);
|
|
566
|
-
t._names.focus = _t(s, 0,
|
|
551
|
+
t._names.focus = _t(s, 0, A), d.current = Vt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, Vt, {
|
|
567
552
|
argA: wt(v)
|
|
568
553
|
});
|
|
569
554
|
}, P = (v) => {
|
|
570
|
-
const
|
|
571
|
-
d.current = Et(d.current, v), E(
|
|
555
|
+
const A = Et(t._getFieldArray(s), v);
|
|
556
|
+
d.current = Et(d.current, v), E(A), c(A), t._updateFieldArray(s, A, Et, {
|
|
572
557
|
argA: v
|
|
573
558
|
});
|
|
574
|
-
}, M = (v,
|
|
575
|
-
const k = ce(te(
|
|
576
|
-
t._names.focus = _t(s, v, V), d.current =
|
|
559
|
+
}, M = (v, A, V) => {
|
|
560
|
+
const k = ce(te(A)), Q = At(t._getFieldArray(s), v, k);
|
|
561
|
+
t._names.focus = _t(s, v, V), d.current = At(d.current, v, k.map(Fe)), E(Q), c(Q), t._updateFieldArray(s, Q, At, {
|
|
577
562
|
argA: v,
|
|
578
|
-
argB: wt(
|
|
563
|
+
argB: wt(A)
|
|
579
564
|
});
|
|
580
|
-
}, T = (v,
|
|
565
|
+
}, T = (v, A) => {
|
|
581
566
|
const V = t._getFieldArray(s);
|
|
582
|
-
Ft(V, v,
|
|
567
|
+
Ft(V, v, A), Ft(d.current, v, A), E(V), c(V), t._updateFieldArray(s, V, Ft, {
|
|
583
568
|
argA: v,
|
|
584
|
-
argB:
|
|
569
|
+
argB: A
|
|
585
570
|
}, !1);
|
|
586
|
-
}, g = (v,
|
|
571
|
+
}, g = (v, A) => {
|
|
587
572
|
const V = t._getFieldArray(s);
|
|
588
|
-
|
|
573
|
+
Ct(V, v, A), Ct(d.current, v, A), E(V), c(V), t._updateFieldArray(s, V, Ct, {
|
|
589
574
|
argA: v,
|
|
590
|
-
argB:
|
|
575
|
+
argB: A
|
|
591
576
|
}, !1);
|
|
592
|
-
}, D = (v,
|
|
593
|
-
const V = te(
|
|
577
|
+
}, D = (v, A) => {
|
|
578
|
+
const V = te(A), k = tr(t._getFieldArray(s), v, V);
|
|
594
579
|
d.current = [...k].map((Q, z) => !Q || z === v ? Fe() : d.current[z]), E(k), c([...k]), t._updateFieldArray(s, k, tr, {
|
|
595
580
|
argA: v,
|
|
596
581
|
argB: V
|
|
597
582
|
}, !0, !1);
|
|
598
583
|
}, Z = (v) => {
|
|
599
|
-
const
|
|
600
|
-
d.current =
|
|
584
|
+
const A = ce(te(v));
|
|
585
|
+
d.current = A.map(Fe), E([...A]), c([...A]), t._updateFieldArray(s, [...A], (V) => V, {}, !0, !1);
|
|
601
586
|
};
|
|
602
|
-
return
|
|
587
|
+
return I.useEffect(() => {
|
|
603
588
|
if (t._state.action = !1, Dt(s, t._names) && t._subjects.state.next({
|
|
604
589
|
...t._formState
|
|
605
590
|
}), y.current && (!Ze(t._options.mode).isOnSubmit || t._formState.isSubmitted))
|
|
606
591
|
if (t._options.resolver)
|
|
607
592
|
t._executeSchema([s]).then((v) => {
|
|
608
|
-
const
|
|
609
|
-
(V ? !
|
|
593
|
+
const A = p(v.errors, s), V = p(t._formState.errors, s);
|
|
594
|
+
(V ? !A && V.type || A && (V.type !== A.type || V.message !== A.message) : A && A.type) && (A ? H(t._formState.errors, s, A) : ee(t._formState.errors, s), t._subjects.state.next({
|
|
610
595
|
errors: t._formState.errors
|
|
611
596
|
}));
|
|
612
597
|
});
|
|
613
598
|
else {
|
|
614
599
|
const v = p(t._fields, s);
|
|
615
|
-
v && v._f && !(Ze(t._options.reValidateMode).isOnSubmit && Ze(t._options.mode).isOnSubmit) && Pt(v, t._formValues, t._options.criteriaMode === pe.all, t._options.shouldUseNativeValidation, !0).then((
|
|
616
|
-
errors:
|
|
600
|
+
v && v._f && !(Ze(t._options.reValidateMode).isOnSubmit && Ze(t._options.mode).isOnSubmit) && Pt(v, t._formValues, t._options.criteriaMode === pe.all, t._options.shouldUseNativeValidation, !0).then((A) => !le(A) && t._subjects.state.next({
|
|
601
|
+
errors: vr(t._formState.errors, A, s)
|
|
617
602
|
}));
|
|
618
603
|
}
|
|
619
604
|
t._subjects.values.next({
|
|
620
605
|
name: s,
|
|
621
606
|
values: { ...t._formValues }
|
|
622
|
-
}), t._names.focus && qe(t._fields, (v,
|
|
623
|
-
if (t._names.focus &&
|
|
607
|
+
}), t._names.focus && qe(t._fields, (v, A) => {
|
|
608
|
+
if (t._names.focus && A.startsWith(t._names.focus) && v.focus)
|
|
624
609
|
return v.focus(), 1;
|
|
625
610
|
}), t._names.focus = "", t._updateValid(), y.current = !1;
|
|
626
|
-
}, [l, s, t]),
|
|
611
|
+
}, [l, s, t]), I.useEffect(() => (!p(t._formValues, s) && t._updateFieldArray(s), () => {
|
|
627
612
|
(t._options.shouldUnregister || i) && t.unregister(s);
|
|
628
613
|
}), [s, t, n, i]), {
|
|
629
|
-
swap:
|
|
630
|
-
move:
|
|
631
|
-
prepend:
|
|
632
|
-
append:
|
|
633
|
-
remove:
|
|
634
|
-
insert:
|
|
635
|
-
update:
|
|
636
|
-
replace:
|
|
637
|
-
fields:
|
|
614
|
+
swap: I.useCallback(T, [E, s, t]),
|
|
615
|
+
move: I.useCallback(g, [E, s, t]),
|
|
616
|
+
prepend: I.useCallback(w, [E, s, t]),
|
|
617
|
+
append: I.useCallback(O, [E, s, t]),
|
|
618
|
+
remove: I.useCallback(P, [E, s, t]),
|
|
619
|
+
insert: I.useCallback(M, [E, s, t]),
|
|
620
|
+
update: I.useCallback(D, [E, s, t]),
|
|
621
|
+
replace: I.useCallback(Z, [E, s, t]),
|
|
622
|
+
fields: I.useMemo(() => l.map((v, A) => ({
|
|
638
623
|
...v,
|
|
639
|
-
[n]: d.current[
|
|
624
|
+
[n]: d.current[A] || Fe()
|
|
640
625
|
})), [l, n])
|
|
641
626
|
};
|
|
642
627
|
}
|
|
@@ -659,7 +644,7 @@ var Tt = () => {
|
|
|
659
644
|
e = [];
|
|
660
645
|
}
|
|
661
646
|
};
|
|
662
|
-
}, ut = (e) => oe(e) || !
|
|
647
|
+
}, ut = (e) => oe(e) || !cr(e);
|
|
663
648
|
function Me(e, r) {
|
|
664
649
|
if (ut(e) || ut(r))
|
|
665
650
|
return e === r;
|
|
@@ -680,9 +665,9 @@ function Me(e, r) {
|
|
|
680
665
|
}
|
|
681
666
|
return !0;
|
|
682
667
|
}
|
|
683
|
-
var
|
|
668
|
+
var _r = (e) => e.type === "select-multiple", qs = (e) => Kt(e) || Qe(e), Rt = (e) => lt(e) && e.isConnected, br = (e) => {
|
|
684
669
|
for (const r in e)
|
|
685
|
-
if (
|
|
670
|
+
if (Ie(e[r]))
|
|
686
671
|
return !0;
|
|
687
672
|
return !1;
|
|
688
673
|
};
|
|
@@ -690,23 +675,23 @@ function dt(e, r = {}) {
|
|
|
690
675
|
const t = Array.isArray(e);
|
|
691
676
|
if (re(e) || t)
|
|
692
677
|
for (const s in e)
|
|
693
|
-
Array.isArray(e[s]) || re(e[s]) && !
|
|
678
|
+
Array.isArray(e[s]) || re(e[s]) && !br(e[s]) ? (r[s] = Array.isArray(e[s]) ? [] : {}, dt(e[s], r[s])) : oe(e[s]) || (r[s] = !0);
|
|
694
679
|
return r;
|
|
695
680
|
}
|
|
696
|
-
function
|
|
681
|
+
function wr(e, r, t) {
|
|
697
682
|
const s = Array.isArray(e);
|
|
698
683
|
if (re(e) || s)
|
|
699
684
|
for (const n in e)
|
|
700
|
-
Array.isArray(e[n]) || re(e[n]) && !
|
|
685
|
+
Array.isArray(e[n]) || re(e[n]) && !br(e[n]) ? $(r) || ut(t[n]) ? t[n] = Array.isArray(e[n]) ? dt(e[n], []) : { ...dt(e[n]) } : wr(e[n], oe(r) ? {} : r[n], t[n]) : t[n] = !Me(e[n], r[n]);
|
|
701
686
|
return t;
|
|
702
687
|
}
|
|
703
|
-
var ot = (e, r) =>
|
|
704
|
-
function
|
|
688
|
+
var ot = (e, r) => wr(e, r, dt(r)), Ar = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => $(e) ? e : r ? e === "" ? NaN : e && +e : t && ve(e) ? new Date(e) : s ? s(e) : e;
|
|
689
|
+
function It(e) {
|
|
705
690
|
const r = e.ref;
|
|
706
691
|
if (!(e.refs ? e.refs.every((t) => t.disabled) : r.disabled))
|
|
707
|
-
return Wt(r) ? r.files : Kt(r) ?
|
|
692
|
+
return Wt(r) ? r.files : Kt(r) ? Sr(e.refs).value : _r(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Qe(r) ? xr(e.refs).value : Ar($(r.value) ? e.ref.value : r.value, e);
|
|
708
693
|
}
|
|
709
|
-
var
|
|
694
|
+
var Gs = (e, r, t, s) => {
|
|
710
695
|
const n = {};
|
|
711
696
|
for (const i of e) {
|
|
712
697
|
const l = p(r, i);
|
|
@@ -718,7 +703,7 @@ var zs = (e, r, t, s) => {
|
|
|
718
703
|
fields: n,
|
|
719
704
|
shouldUseNativeValidation: s
|
|
720
705
|
};
|
|
721
|
-
}, Ye = (e) => $(e) ? e : ct(e) ? e.source : re(e) ? ct(e.value) ? e.value.source : e.value : e,
|
|
706
|
+
}, Ye = (e) => $(e) ? e : ct(e) ? e.source : re(e) ? ct(e.value) ? e.value.source : e.value : e, zs = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
722
707
|
function rr(e, r, t) {
|
|
723
708
|
const s = p(e, t);
|
|
724
709
|
if (s || Ht(t))
|
|
@@ -742,20 +727,20 @@ function rr(e, r, t) {
|
|
|
742
727
|
name: t
|
|
743
728
|
};
|
|
744
729
|
}
|
|
745
|
-
var
|
|
746
|
-
const
|
|
730
|
+
var Ys = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, Xs = (e, r) => !Je(p(e, r)).length && ee(e, r);
|
|
731
|
+
const Zs = {
|
|
747
732
|
mode: pe.onSubmit,
|
|
748
733
|
reValidateMode: pe.onChange,
|
|
749
734
|
shouldFocusError: !0
|
|
750
735
|
};
|
|
751
|
-
function
|
|
736
|
+
function Qs(e = {}) {
|
|
752
737
|
let r = {
|
|
753
|
-
...
|
|
738
|
+
...Zs,
|
|
754
739
|
...e
|
|
755
740
|
}, t = {
|
|
756
741
|
submitCount: 0,
|
|
757
742
|
isDirty: !1,
|
|
758
|
-
isLoading:
|
|
743
|
+
isLoading: Ie(r.defaultValues),
|
|
759
744
|
isValidating: !1,
|
|
760
745
|
isSubmitted: !1,
|
|
761
746
|
isSubmitting: !1,
|
|
@@ -807,16 +792,16 @@ function Js(e = {}) {
|
|
|
807
792
|
}, g = (o, a = [], u, _, x = !0, f = !0) => {
|
|
808
793
|
if (_ && u) {
|
|
809
794
|
if (l.action = !0, f && Array.isArray(p(s, o))) {
|
|
810
|
-
const
|
|
811
|
-
x && H(s, o,
|
|
795
|
+
const C = u(p(s, o), _.argA, _.argB);
|
|
796
|
+
x && H(s, o, C);
|
|
812
797
|
}
|
|
813
798
|
if (f && Array.isArray(p(t.errors, o))) {
|
|
814
|
-
const
|
|
815
|
-
x && H(t.errors, o,
|
|
799
|
+
const C = u(p(t.errors, o), _.argA, _.argB);
|
|
800
|
+
x && H(t.errors, o, C), Xs(t.errors, o);
|
|
816
801
|
}
|
|
817
802
|
if (m.touchedFields && f && Array.isArray(p(t.touchedFields, o))) {
|
|
818
|
-
const
|
|
819
|
-
x && H(t.touchedFields, o,
|
|
803
|
+
const C = u(p(t.touchedFields, o), _.argA, _.argB);
|
|
804
|
+
x && H(t.touchedFields, o, C);
|
|
820
805
|
}
|
|
821
806
|
m.dirtyFields && (t.dirtyFields = ot(n, i)), y.state.next({
|
|
822
807
|
name: o,
|
|
@@ -840,17 +825,17 @@ function Js(e = {}) {
|
|
|
840
825
|
const x = p(s, o);
|
|
841
826
|
if (x) {
|
|
842
827
|
const f = p(i, o, $(u) ? p(n, o) : u);
|
|
843
|
-
$(f) || _ && _.defaultChecked || a ? H(i, o, a ? f :
|
|
828
|
+
$(f) || _ && _.defaultChecked || a ? H(i, o, a ? f : It(x._f)) : j(o, f), l.mount && M();
|
|
844
829
|
}
|
|
845
|
-
},
|
|
846
|
-
let f = !1,
|
|
830
|
+
}, A = (o, a, u, _, x) => {
|
|
831
|
+
let f = !1, C = !1;
|
|
847
832
|
const L = {
|
|
848
833
|
name: o
|
|
849
834
|
}, J = !!(p(s, o) && p(s, o)._f && p(s, o)._f.disabled);
|
|
850
835
|
if (!u || _) {
|
|
851
|
-
m.isDirty && (
|
|
836
|
+
m.isDirty && (C = t.isDirty, t.isDirty = L.isDirty = F(), f = C !== L.isDirty);
|
|
852
837
|
const ue = J || Me(p(n, o), a);
|
|
853
|
-
|
|
838
|
+
C = !!(!J && p(t.dirtyFields, o)), ue || J ? ee(t.dirtyFields, o) : H(t.dirtyFields, o, !0), L.dirtyFields = t.dirtyFields, f = f || m.dirtyFields && C !== !ue;
|
|
854
839
|
}
|
|
855
840
|
if (u) {
|
|
856
841
|
const ue = p(t.touchedFields, o);
|
|
@@ -860,7 +845,7 @@ function Js(e = {}) {
|
|
|
860
845
|
}, V = (o, a, u, _) => {
|
|
861
846
|
const x = p(t.errors, o), f = m.isValid && ge(a) && t.isValid !== a;
|
|
862
847
|
if (e.delayError && u ? (d = P(() => D(o, u)), d(e.delayError)) : (clearTimeout(S), d = null, u ? H(t.errors, o, u) : ee(t.errors, o)), (u ? !Me(x, u) : x) || !le(_) || f) {
|
|
863
|
-
const
|
|
848
|
+
const C = {
|
|
864
849
|
..._,
|
|
865
850
|
...f && ge(a) ? { isValid: a } : {},
|
|
866
851
|
errors: t.errors,
|
|
@@ -868,12 +853,12 @@ function Js(e = {}) {
|
|
|
868
853
|
};
|
|
869
854
|
t = {
|
|
870
855
|
...t,
|
|
871
|
-
...
|
|
872
|
-
}, y.state.next(
|
|
856
|
+
...C
|
|
857
|
+
}, y.state.next(C);
|
|
873
858
|
}
|
|
874
859
|
}, k = async (o) => {
|
|
875
860
|
T(o, !0);
|
|
876
|
-
const a = await r.resolver(i, r.context,
|
|
861
|
+
const a = await r.resolver(i, r.context, Gs(o || c.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
|
|
877
862
|
return T(o), a;
|
|
878
863
|
}, Q = async (o) => {
|
|
879
864
|
const { errors: a } = await k(o);
|
|
@@ -891,42 +876,42 @@ function Js(e = {}) {
|
|
|
891
876
|
for (const _ in o) {
|
|
892
877
|
const x = o[_];
|
|
893
878
|
if (x) {
|
|
894
|
-
const { _f: f, ...
|
|
879
|
+
const { _f: f, ...C } = x;
|
|
895
880
|
if (f) {
|
|
896
881
|
const L = c.array.has(f.name);
|
|
897
882
|
T([_], !0);
|
|
898
883
|
const J = await Pt(x, i, w, r.shouldUseNativeValidation && !a, L);
|
|
899
884
|
if (T([_]), J[f.name] && (u.valid = !1, a))
|
|
900
885
|
break;
|
|
901
|
-
!a && (p(J, f.name) ? L ?
|
|
886
|
+
!a && (p(J, f.name) ? L ? vr(t.errors, J, f.name) : H(t.errors, f.name, J[f.name]) : ee(t.errors, f.name));
|
|
902
887
|
}
|
|
903
|
-
|
|
888
|
+
C && await z(C, a, u);
|
|
904
889
|
}
|
|
905
890
|
}
|
|
906
891
|
return u.valid;
|
|
907
892
|
}, de = () => {
|
|
908
893
|
for (const o of c.unMount) {
|
|
909
894
|
const a = p(s, o);
|
|
910
|
-
a && (a._f.refs ? a._f.refs.every((u) => !
|
|
895
|
+
a && (a._f.refs ? a._f.refs.every((u) => !Rt(u)) : !Rt(a._f.ref)) && be(o);
|
|
911
896
|
}
|
|
912
897
|
c.unMount = /* @__PURE__ */ new Set();
|
|
913
|
-
}, F = (o, a) => (o && a && H(i, o, a), !Me(ke(), n)), N = (o, a, u) =>
|
|
898
|
+
}, F = (o, a) => (o && a && H(i, o, a), !Me(ke(), n)), N = (o, a, u) => gr(o, c, {
|
|
914
899
|
...l.mount ? i : $(a) ? n : ve(o) ? { [o]: a } : a
|
|
915
900
|
}, u, a), B = (o) => Je(p(l.mount ? i : n, o, e.shouldUnregister ? p(n, o, []) : [])), j = (o, a, u = {}) => {
|
|
916
901
|
const _ = p(s, o);
|
|
917
902
|
let x = a;
|
|
918
903
|
if (_) {
|
|
919
904
|
const f = _._f;
|
|
920
|
-
f && (!f.disabled && H(i, o, Ar(a, f)), x = lt(f.ref) && oe(a) ? "" : a,
|
|
905
|
+
f && (!f.disabled && H(i, o, Ar(a, f)), x = lt(f.ref) && oe(a) ? "" : a, _r(f.ref) ? [...f.ref.options].forEach((C) => C.selected = x.includes(C.value)) : f.refs ? Qe(f.ref) ? f.refs.length > 1 ? f.refs.forEach((C) => (!C.defaultChecked || !C.disabled) && (C.checked = Array.isArray(x) ? !!x.find((L) => L === C.value) : x === C.value)) : f.refs[0] && (f.refs[0].checked = !!x) : f.refs.forEach((C) => C.checked = C.value === x) : Wt(f.ref) ? f.ref.value = "" : (f.ref.value = x, f.ref.type || y.values.next({
|
|
921
906
|
name: o,
|
|
922
907
|
values: { ...i }
|
|
923
908
|
})));
|
|
924
909
|
}
|
|
925
|
-
(u.shouldDirty || u.shouldTouch) &&
|
|
910
|
+
(u.shouldDirty || u.shouldTouch) && A(o, x, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && Se(o);
|
|
926
911
|
}, Y = (o, a, u) => {
|
|
927
912
|
for (const _ in a) {
|
|
928
|
-
const x = a[_], f = `${o}.${_}`,
|
|
929
|
-
(c.array.has(o) || !ut(x) ||
|
|
913
|
+
const x = a[_], f = `${o}.${_}`, C = p(s, f);
|
|
914
|
+
(c.array.has(o) || !ut(x) || C && !C._f) && !$e(x) ? Y(f, x, u) : j(f, x, u);
|
|
930
915
|
}
|
|
931
916
|
}, X = (o, a, u = {}) => {
|
|
932
917
|
const _ = p(s, o), x = c.array.has(o), f = te(a);
|
|
@@ -945,28 +930,28 @@ function Js(e = {}) {
|
|
|
945
930
|
l.mount = !0;
|
|
946
931
|
const a = o.target;
|
|
947
932
|
let u = a.name, _ = !0;
|
|
948
|
-
const x = p(s, u), f = () => a.type ?
|
|
933
|
+
const x = p(s, u), f = () => a.type ? It(x._f) : ur(o), C = (L) => {
|
|
949
934
|
_ = Number.isNaN(L) || L === p(i, u, L);
|
|
950
935
|
};
|
|
951
936
|
if (x) {
|
|
952
937
|
let L, J;
|
|
953
|
-
const ue = f(), Be = o.type === at.BLUR || o.type === at.FOCUS_OUT,
|
|
938
|
+
const ue = f(), Be = o.type === at.BLUR || o.type === at.FOCUS_OUT, cs = !zs(x._f) && !r.resolver && !p(t.errors, u) && !x._f.deps || Ys(Be, p(t.touchedFields, u), t.isSubmitted, O, E), vt = Dt(u, c, Be);
|
|
954
939
|
H(i, u, ue), Be ? (x._f.onBlur && x._f.onBlur(o), d && d(0)) : x._f.onChange && x._f.onChange(o);
|
|
955
|
-
const xt =
|
|
940
|
+
const xt = A(u, ue, Be, !1), us = !le(xt) || vt;
|
|
956
941
|
if (!Be && y.values.next({
|
|
957
942
|
name: u,
|
|
958
943
|
type: o.type,
|
|
959
944
|
values: { ...i }
|
|
960
|
-
}),
|
|
961
|
-
return m.isValid && M(),
|
|
945
|
+
}), cs)
|
|
946
|
+
return m.isValid && M(), us && y.state.next({ name: u, ...vt ? {} : xt });
|
|
962
947
|
if (!Be && vt && y.state.next({ ...t }), r.resolver) {
|
|
963
948
|
const { errors: qt } = await k([u]);
|
|
964
|
-
if (
|
|
965
|
-
const
|
|
949
|
+
if (C(ue), _) {
|
|
950
|
+
const ds = rr(t.errors, s, u), Gt = rr(qt, s, ds.name || u);
|
|
966
951
|
L = Gt.error, u = Gt.name, J = le(qt);
|
|
967
952
|
}
|
|
968
953
|
} else
|
|
969
|
-
T([u], !0), L = (await Pt(x, i, w, r.shouldUseNativeValidation))[u], T([u]),
|
|
954
|
+
T([u], !0), L = (await Pt(x, i, w, r.shouldUseNativeValidation))[u], T([u]), C(ue), _ && (L ? J = !1 : m.isValid && (J = await z(s, !0)));
|
|
970
955
|
_ && (x._f.deps && Se(x._f.deps), V(u, J, L, xt));
|
|
971
956
|
}
|
|
972
957
|
}, ie = (o, a) => {
|
|
@@ -977,10 +962,10 @@ function Js(e = {}) {
|
|
|
977
962
|
const x = ce(o);
|
|
978
963
|
if (r.resolver) {
|
|
979
964
|
const f = await Q($(o) ? o : x);
|
|
980
|
-
u = le(f), _ = o ? !x.some((
|
|
965
|
+
u = le(f), _ = o ? !x.some((C) => p(f, C)) : u;
|
|
981
966
|
} else o ? (_ = (await Promise.all(x.map(async (f) => {
|
|
982
|
-
const
|
|
983
|
-
return await z(
|
|
967
|
+
const C = p(s, f);
|
|
968
|
+
return await z(C && C._f ? { [f]: C } : C);
|
|
984
969
|
}))).every(Boolean), !(!_ && !t.isValid) && M()) : _ = u = await z(s);
|
|
985
970
|
return y.state.next({
|
|
986
971
|
...!ve(o) || m.isValid && u !== t.isValid ? {} : { name: o },
|
|
@@ -1003,7 +988,7 @@ function Js(e = {}) {
|
|
|
1003
988
|
errors: o ? t.errors : {}
|
|
1004
989
|
});
|
|
1005
990
|
}, _e = (o, a, u) => {
|
|
1006
|
-
const _ = (p(s, o, { _f: {} })._f || {}).ref, x = p(t.errors, o) || {}, { ref: f, message:
|
|
991
|
+
const _ = (p(s, o, { _f: {} })._f || {}).ref, x = p(t.errors, o) || {}, { ref: f, message: C, type: L, ...J } = x;
|
|
1007
992
|
H(t.errors, o, {
|
|
1008
993
|
...J,
|
|
1009
994
|
...a,
|
|
@@ -1013,7 +998,7 @@ function Js(e = {}) {
|
|
|
1013
998
|
errors: t.errors,
|
|
1014
999
|
isValid: !1
|
|
1015
1000
|
}), u && u.shouldFocus && _ && _.focus && _.focus();
|
|
1016
|
-
}, Le = (o, a) =>
|
|
1001
|
+
}, Le = (o, a) => Ie(o) ? y.values.subscribe({
|
|
1017
1002
|
next: (u) => o(N(void 0, a), u)
|
|
1018
1003
|
}) : N(o, a, !0), be = (o, a = {}) => {
|
|
1019
1004
|
for (const u of o ? ce(o) : c.mount)
|
|
@@ -1024,10 +1009,10 @@ function Js(e = {}) {
|
|
|
1024
1009
|
...t,
|
|
1025
1010
|
...a.keepDirty ? { isDirty: F() } : {}
|
|
1026
1011
|
}), !a.keepIsValid && M();
|
|
1027
|
-
},
|
|
1012
|
+
}, R = ({ disabled: o, name: a, field: u, fields: _, value: x }) => {
|
|
1028
1013
|
if (ge(o) && l.mount || o) {
|
|
1029
|
-
const f = o ? void 0 : $(x) ?
|
|
1030
|
-
H(i, a, f),
|
|
1014
|
+
const f = o ? void 0 : $(x) ? It(u ? u._f : p(_, a)._f) : x;
|
|
1015
|
+
H(i, a, f), A(a, f, !1, !1, !0);
|
|
1031
1016
|
}
|
|
1032
1017
|
}, K = (o, a = {}) => {
|
|
1033
1018
|
let u = p(s, o);
|
|
@@ -1040,7 +1025,7 @@ function Js(e = {}) {
|
|
|
1040
1025
|
mount: !0,
|
|
1041
1026
|
...a
|
|
1042
1027
|
}
|
|
1043
|
-
}), c.mount.add(o), u ?
|
|
1028
|
+
}), c.mount.add(o), u ? R({
|
|
1044
1029
|
field: u,
|
|
1045
1030
|
disabled: a.disabled,
|
|
1046
1031
|
name: o,
|
|
@@ -1061,15 +1046,15 @@ function Js(e = {}) {
|
|
|
1061
1046
|
ref: (x) => {
|
|
1062
1047
|
if (x) {
|
|
1063
1048
|
K(o, a), u = p(s, o);
|
|
1064
|
-
const f = $(x.value) && x.querySelectorAll && x.querySelectorAll("input,select,textarea")[0] || x,
|
|
1065
|
-
if (
|
|
1049
|
+
const f = $(x.value) && x.querySelectorAll && x.querySelectorAll("input,select,textarea")[0] || x, C = qs(f), L = u._f.refs || [];
|
|
1050
|
+
if (C ? L.find((J) => J === f) : f === u._f.ref)
|
|
1066
1051
|
return;
|
|
1067
1052
|
H(s, o, {
|
|
1068
1053
|
_f: {
|
|
1069
1054
|
...u._f,
|
|
1070
|
-
...
|
|
1055
|
+
...C ? {
|
|
1071
1056
|
refs: [
|
|
1072
|
-
...L.filter(
|
|
1057
|
+
...L.filter(Rt),
|
|
1073
1058
|
f,
|
|
1074
1059
|
...Array.isArray(p(n, o)) ? [{}] : []
|
|
1075
1060
|
],
|
|
@@ -1078,7 +1063,7 @@ function Js(e = {}) {
|
|
|
1078
1063
|
}
|
|
1079
1064
|
}), v(o, !1, void 0, f);
|
|
1080
1065
|
} else
|
|
1081
|
-
u = p(s, o, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(
|
|
1066
|
+
u = p(s, o, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(dr(c.array, o) && l.action) && c.unMount.add(o);
|
|
1082
1067
|
}
|
|
1083
1068
|
};
|
|
1084
1069
|
}, se = () => r.shouldFocusError && qe(s, ie, c.mount), q = (o) => {
|
|
@@ -1095,8 +1080,8 @@ function Js(e = {}) {
|
|
|
1095
1080
|
if (y.state.next({
|
|
1096
1081
|
isSubmitting: !0
|
|
1097
1082
|
}), r.resolver) {
|
|
1098
|
-
const { errors: f, values:
|
|
1099
|
-
t.errors = f, x =
|
|
1083
|
+
const { errors: f, values: C } = await k();
|
|
1084
|
+
t.errors = f, x = C;
|
|
1100
1085
|
} else
|
|
1101
1086
|
await z(s);
|
|
1102
1087
|
if (ee(t.errors, "root"), le(t.errors)) {
|
|
@@ -1124,12 +1109,12 @@ function Js(e = {}) {
|
|
|
1124
1109
|
const u = o ? te(o) : n, _ = te(u), x = le(o), f = x ? n : _;
|
|
1125
1110
|
if (a.keepDefaultValues || (n = u), !a.keepValues) {
|
|
1126
1111
|
if (a.keepDirtyValues)
|
|
1127
|
-
for (const
|
|
1128
|
-
p(t.dirtyFields,
|
|
1112
|
+
for (const C of c.mount)
|
|
1113
|
+
p(t.dirtyFields, C) ? H(f, C, p(i, C)) : X(C, p(f, C));
|
|
1129
1114
|
else {
|
|
1130
1115
|
if (Ut && $(o))
|
|
1131
|
-
for (const
|
|
1132
|
-
const L = p(s,
|
|
1116
|
+
for (const C of c.mount) {
|
|
1117
|
+
const L = p(s, C);
|
|
1133
1118
|
if (L && L._f) {
|
|
1134
1119
|
const J = Array.isArray(L._f.refs) ? L._f.refs[0] : L._f.ref;
|
|
1135
1120
|
if (lt(J)) {
|
|
@@ -1166,7 +1151,7 @@ function Js(e = {}) {
|
|
|
1166
1151
|
isSubmitSuccessful: a.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
1167
1152
|
isSubmitting: !1
|
|
1168
1153
|
});
|
|
1169
|
-
}, ye = (o, a) => me(
|
|
1154
|
+
}, ye = (o, a) => me(Ie(o) ? o(i) : o, a);
|
|
1170
1155
|
return {
|
|
1171
1156
|
control: {
|
|
1172
1157
|
register: K,
|
|
@@ -1180,10 +1165,10 @@ function Js(e = {}) {
|
|
|
1180
1165
|
_updateValid: M,
|
|
1181
1166
|
_removeUnmounted: de,
|
|
1182
1167
|
_updateFieldArray: g,
|
|
1183
|
-
_updateDisabledField:
|
|
1168
|
+
_updateDisabledField: R,
|
|
1184
1169
|
_getFieldArray: B,
|
|
1185
1170
|
_reset: me,
|
|
1186
|
-
_resetDefaultValues: () =>
|
|
1171
|
+
_resetDefaultValues: () => Ie(r.defaultValues) && r.defaultValues().then((o) => {
|
|
1187
1172
|
ye(o, r.resetOptions), y.state.next({
|
|
1188
1173
|
isLoading: !1
|
|
1189
1174
|
});
|
|
@@ -1257,10 +1242,10 @@ function Js(e = {}) {
|
|
|
1257
1242
|
};
|
|
1258
1243
|
}
|
|
1259
1244
|
function Ko(e = {}) {
|
|
1260
|
-
const r =
|
|
1245
|
+
const r = I.useRef(), t = I.useRef(), [s, n] = I.useState({
|
|
1261
1246
|
isDirty: !1,
|
|
1262
1247
|
isValidating: !1,
|
|
1263
|
-
isLoading:
|
|
1248
|
+
isLoading: Ie(e.defaultValues),
|
|
1264
1249
|
isSubmitted: !1,
|
|
1265
1250
|
isSubmitting: !1,
|
|
1266
1251
|
isSubmitSuccessful: !1,
|
|
@@ -1271,48 +1256,48 @@ function Ko(e = {}) {
|
|
|
1271
1256
|
validatingFields: {},
|
|
1272
1257
|
errors: e.errors || {},
|
|
1273
1258
|
disabled: e.disabled || !1,
|
|
1274
|
-
defaultValues:
|
|
1259
|
+
defaultValues: Ie(e.defaultValues) ? void 0 : e.defaultValues
|
|
1275
1260
|
});
|
|
1276
1261
|
r.current || (r.current = {
|
|
1277
|
-
...
|
|
1262
|
+
...Qs(e),
|
|
1278
1263
|
formState: s
|
|
1279
1264
|
});
|
|
1280
1265
|
const i = r.current.control;
|
|
1281
1266
|
return i._options = e, ht({
|
|
1282
1267
|
subject: i._subjects.state,
|
|
1283
1268
|
next: (l) => {
|
|
1284
|
-
|
|
1269
|
+
mr(l, i._proxyFormState, i._updateFormState, !0) && n({ ...i._formState });
|
|
1285
1270
|
}
|
|
1286
|
-
}),
|
|
1271
|
+
}), I.useEffect(() => i._disableForm(e.disabled), [i, e.disabled]), I.useEffect(() => {
|
|
1287
1272
|
if (i._proxyFormState.isDirty) {
|
|
1288
1273
|
const l = i._getDirty();
|
|
1289
1274
|
l !== s.isDirty && i._subjects.state.next({
|
|
1290
1275
|
isDirty: l
|
|
1291
1276
|
});
|
|
1292
1277
|
}
|
|
1293
|
-
}, [i, s.isDirty]),
|
|
1278
|
+
}, [i, s.isDirty]), I.useEffect(() => {
|
|
1294
1279
|
e.values && !Me(e.values, t.current) ? (i._reset(e.values, i._options.resetOptions), t.current = e.values, n((l) => ({ ...l }))) : i._resetDefaultValues();
|
|
1295
|
-
}, [e.values, i]),
|
|
1280
|
+
}, [e.values, i]), I.useEffect(() => {
|
|
1296
1281
|
e.errors && i._setErrors(e.errors);
|
|
1297
|
-
}, [e.errors, i]),
|
|
1282
|
+
}, [e.errors, i]), I.useEffect(() => {
|
|
1298
1283
|
i._state.mount || (i._updateValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
|
|
1299
|
-
}),
|
|
1284
|
+
}), I.useEffect(() => {
|
|
1300
1285
|
e.shouldUnregister && i._subjects.values.next({
|
|
1301
1286
|
values: i._getWatch()
|
|
1302
1287
|
});
|
|
1303
|
-
}, [e.shouldUnregister, i]), r.current.formState =
|
|
1288
|
+
}, [e.shouldUnregister, i]), r.current.formState = hr(s, i), r.current;
|
|
1304
1289
|
}
|
|
1305
1290
|
function sr(e, [r, t]) {
|
|
1306
1291
|
return Math.min(t, Math.max(r, e));
|
|
1307
1292
|
}
|
|
1308
|
-
function
|
|
1293
|
+
function Js(e) {
|
|
1309
1294
|
const r = h.useRef({ value: e, previous: e });
|
|
1310
1295
|
return h.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
1311
1296
|
}
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1297
|
+
var eo = [" ", "Enter", "ArrowUp", "ArrowDown"], to = [" ", "Enter"], et = "Select", [mt, yt, ro] = ps(et), [Ge, $o] = hs(et, [
|
|
1298
|
+
ro,
|
|
1314
1299
|
nr
|
|
1315
|
-
]), gt = nr(), [
|
|
1300
|
+
]), gt = nr(), [so, De] = Ge(et), [oo, no] = Ge(et), Cr = (e) => {
|
|
1316
1301
|
const {
|
|
1317
1302
|
__scopeSelect: r,
|
|
1318
1303
|
children: t,
|
|
@@ -1327,7 +1312,7 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
|
|
|
1327
1312
|
autoComplete: y,
|
|
1328
1313
|
disabled: E,
|
|
1329
1314
|
required: O
|
|
1330
|
-
} = e, w = gt(r), [P, M] = h.useState(null), [T, g] = h.useState(null), [D, Z] = h.useState(!1), v =
|
|
1315
|
+
} = e, w = gt(r), [P, M] = h.useState(null), [T, g] = h.useState(null), [D, Z] = h.useState(!1), v = Es(S), [A = !1, V] = Yt({
|
|
1331
1316
|
prop: s,
|
|
1332
1317
|
defaultProp: n,
|
|
1333
1318
|
onChange: i
|
|
@@ -1336,8 +1321,8 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
|
|
|
1336
1321
|
defaultProp: c,
|
|
1337
1322
|
onChange: d
|
|
1338
1323
|
}), z = h.useRef(null), de = P ? !!P.closest("form") : !0, [F, N] = h.useState(/* @__PURE__ */ new Set()), B = Array.from(F).map((j) => j.props.value).join(";");
|
|
1339
|
-
return /* @__PURE__ */ b.jsx(
|
|
1340
|
-
|
|
1324
|
+
return /* @__PURE__ */ b.jsx(Fs, { ...w, children: /* @__PURE__ */ b.jsxs(
|
|
1325
|
+
so,
|
|
1341
1326
|
{
|
|
1342
1327
|
required: O,
|
|
1343
1328
|
scope: r,
|
|
@@ -1350,14 +1335,14 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
|
|
|
1350
1335
|
contentId: Bt(),
|
|
1351
1336
|
value: k,
|
|
1352
1337
|
onValueChange: Q,
|
|
1353
|
-
open:
|
|
1338
|
+
open: A,
|
|
1354
1339
|
onOpenChange: V,
|
|
1355
1340
|
dir: v,
|
|
1356
1341
|
triggerPointerDownPosRef: z,
|
|
1357
1342
|
disabled: E,
|
|
1358
1343
|
children: [
|
|
1359
1344
|
/* @__PURE__ */ b.jsx(mt.Provider, { scope: r, children: /* @__PURE__ */ b.jsx(
|
|
1360
|
-
|
|
1345
|
+
oo,
|
|
1361
1346
|
{
|
|
1362
1347
|
scope: e.__scopeSelect,
|
|
1363
1348
|
onNativeOptionAdd: h.useCallback((j) => {
|
|
@@ -1373,7 +1358,7 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
|
|
|
1373
1358
|
}
|
|
1374
1359
|
) }),
|
|
1375
1360
|
de ? /* @__PURE__ */ b.jsxs(
|
|
1376
|
-
|
|
1361
|
+
Zr,
|
|
1377
1362
|
{
|
|
1378
1363
|
"aria-hidden": !0,
|
|
1379
1364
|
required: O,
|
|
@@ -1394,16 +1379,16 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
|
|
|
1394
1379
|
}
|
|
1395
1380
|
) });
|
|
1396
1381
|
};
|
|
1397
|
-
|
|
1398
|
-
var
|
|
1382
|
+
Cr.displayName = et;
|
|
1383
|
+
var Vr = "SelectTrigger", Er = h.forwardRef(
|
|
1399
1384
|
(e, r) => {
|
|
1400
|
-
const { __scopeSelect: t, disabled: s = !1, ...n } = e, i = gt(t), l = De(
|
|
1401
|
-
const P = S().filter((g) => !g.disabled), M = P.find((g) => g.value === l.value), T =
|
|
1385
|
+
const { __scopeSelect: t, disabled: s = !1, ...n } = e, i = gt(t), l = De(Vr, t), c = l.disabled || s, d = xe(r, l.onTriggerChange), S = yt(t), [m, y, E] = Qr((w) => {
|
|
1386
|
+
const P = S().filter((g) => !g.disabled), M = P.find((g) => g.value === l.value), T = Jr(P, w, M);
|
|
1402
1387
|
T !== void 0 && l.onValueChange(T.value);
|
|
1403
1388
|
}), O = () => {
|
|
1404
1389
|
c || (l.onOpenChange(!0), E());
|
|
1405
1390
|
};
|
|
1406
|
-
return /* @__PURE__ */ b.jsx(
|
|
1391
|
+
return /* @__PURE__ */ b.jsx(ms, { asChild: !0, ...i, children: /* @__PURE__ */ b.jsx(
|
|
1407
1392
|
he.button,
|
|
1408
1393
|
{
|
|
1409
1394
|
type: "button",
|
|
@@ -1416,7 +1401,7 @@ var Er = "SelectTrigger", Fr = h.forwardRef(
|
|
|
1416
1401
|
"data-state": l.open ? "open" : "closed",
|
|
1417
1402
|
disabled: c,
|
|
1418
1403
|
"data-disabled": c ? "" : void 0,
|
|
1419
|
-
"data-placeholder":
|
|
1404
|
+
"data-placeholder": Xr(l.value) ? "" : void 0,
|
|
1420
1405
|
...n,
|
|
1421
1406
|
ref: d,
|
|
1422
1407
|
onClick: ne(n.onClick, (w) => {
|
|
@@ -1431,16 +1416,16 @@ var Er = "SelectTrigger", Fr = h.forwardRef(
|
|
|
1431
1416
|
}),
|
|
1432
1417
|
onKeyDown: ne(n.onKeyDown, (w) => {
|
|
1433
1418
|
const P = m.current !== "";
|
|
1434
|
-
!(w.ctrlKey || w.altKey || w.metaKey) && w.key.length === 1 && y(w.key), !(P && w.key === " ") &&
|
|
1419
|
+
!(w.ctrlKey || w.altKey || w.metaKey) && w.key.length === 1 && y(w.key), !(P && w.key === " ") && eo.includes(w.key) && (O(), w.preventDefault());
|
|
1435
1420
|
})
|
|
1436
1421
|
}
|
|
1437
1422
|
) });
|
|
1438
1423
|
}
|
|
1439
1424
|
);
|
|
1440
|
-
|
|
1441
|
-
var
|
|
1425
|
+
Er.displayName = Vr;
|
|
1426
|
+
var Fr = "SelectValue", Tr = h.forwardRef(
|
|
1442
1427
|
(e, r) => {
|
|
1443
|
-
const { __scopeSelect: t, className: s, style: n, children: i, placeholder: l = "", ...c } = e, d = De(
|
|
1428
|
+
const { __scopeSelect: t, className: s, style: n, children: i, placeholder: l = "", ...c } = e, d = De(Fr, t), { onValueNodeHasChildrenChange: S } = d, m = i !== void 0, y = xe(r, d.onValueNodeChange);
|
|
1444
1429
|
return Ne(() => {
|
|
1445
1430
|
S(m);
|
|
1446
1431
|
}, [S, m]), /* @__PURE__ */ b.jsx(
|
|
@@ -1449,22 +1434,22 @@ var Tr = "SelectValue", Ir = h.forwardRef(
|
|
|
1449
1434
|
...c,
|
|
1450
1435
|
ref: y,
|
|
1451
1436
|
style: { pointerEvents: "none" },
|
|
1452
|
-
children:
|
|
1437
|
+
children: Xr(d.value) ? /* @__PURE__ */ b.jsx(b.Fragment, { children: l }) : i
|
|
1453
1438
|
}
|
|
1454
1439
|
);
|
|
1455
1440
|
}
|
|
1456
1441
|
);
|
|
1457
|
-
|
|
1458
|
-
var
|
|
1442
|
+
Tr.displayName = Fr;
|
|
1443
|
+
var io = "SelectIcon", Rr = h.forwardRef(
|
|
1459
1444
|
(e, r) => {
|
|
1460
1445
|
const { __scopeSelect: t, children: s, ...n } = e;
|
|
1461
1446
|
return /* @__PURE__ */ b.jsx(he.span, { "aria-hidden": !0, ...n, ref: r, children: s || "▼" });
|
|
1462
1447
|
}
|
|
1463
1448
|
);
|
|
1464
|
-
Rr.displayName =
|
|
1465
|
-
var
|
|
1466
|
-
|
|
1467
|
-
var Oe = "SelectContent",
|
|
1449
|
+
Rr.displayName = io;
|
|
1450
|
+
var ao = "SelectPortal", Ir = (e) => /* @__PURE__ */ b.jsx(Vs, { asChild: !0, ...e });
|
|
1451
|
+
Ir.displayName = ao;
|
|
1452
|
+
var Oe = "SelectContent", Nr = h.forwardRef(
|
|
1468
1453
|
(e, r) => {
|
|
1469
1454
|
const t = De(Oe, e.__scopeSelect), [s, n] = h.useState();
|
|
1470
1455
|
if (Ne(() => {
|
|
@@ -1472,15 +1457,15 @@ var Oe = "SelectContent", Dr = h.forwardRef(
|
|
|
1472
1457
|
}, []), !t.open) {
|
|
1473
1458
|
const i = s;
|
|
1474
1459
|
return i ? ar.createPortal(
|
|
1475
|
-
/* @__PURE__ */ b.jsx(
|
|
1460
|
+
/* @__PURE__ */ b.jsx(Dr, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx(mt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx("div", { children: e.children }) }) }),
|
|
1476
1461
|
i
|
|
1477
1462
|
) : null;
|
|
1478
1463
|
}
|
|
1479
|
-
return /* @__PURE__ */ b.jsx(
|
|
1464
|
+
return /* @__PURE__ */ b.jsx(Pr, { ...e, ref: r });
|
|
1480
1465
|
}
|
|
1481
1466
|
);
|
|
1482
|
-
|
|
1483
|
-
var
|
|
1467
|
+
Nr.displayName = Oe;
|
|
1468
|
+
var Ae = 10, [Dr, Pe] = Ge(Oe), lo = "SelectContentImpl", Pr = h.forwardRef(
|
|
1484
1469
|
(e, r) => {
|
|
1485
1470
|
const {
|
|
1486
1471
|
__scopeSelect: t,
|
|
@@ -1502,16 +1487,16 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1502
1487
|
avoidCollisions: M,
|
|
1503
1488
|
//
|
|
1504
1489
|
...T
|
|
1505
|
-
} = e, g = De(Oe, t), [D, Z] = h.useState(null), [v,
|
|
1490
|
+
} = e, g = De(Oe, t), [D, Z] = h.useState(null), [v, A] = h.useState(null), V = xe(r, (R) => Z(R)), [k, Q] = h.useState(null), [z, de] = h.useState(
|
|
1506
1491
|
null
|
|
1507
1492
|
), F = yt(t), [N, B] = h.useState(!1), j = h.useRef(!1);
|
|
1508
1493
|
h.useEffect(() => {
|
|
1509
|
-
if (D) return
|
|
1510
|
-
}, [D]),
|
|
1494
|
+
if (D) return ys(D);
|
|
1495
|
+
}, [D]), gs();
|
|
1511
1496
|
const Y = h.useCallback(
|
|
1512
|
-
(
|
|
1497
|
+
(R) => {
|
|
1513
1498
|
const [K, ...se] = F().map((W) => W.ref.current), [q] = se.slice(-1), U = document.activeElement;
|
|
1514
|
-
for (const W of
|
|
1499
|
+
for (const W of R)
|
|
1515
1500
|
if (W === U || (W == null || W.scrollIntoView({ block: "nearest" }), W === K && v && (v.scrollTop = 0), W === q && v && (v.scrollTop = v.scrollHeight), W == null || W.focus(), document.activeElement !== U)) return;
|
|
1516
1501
|
},
|
|
1517
1502
|
[F, v]
|
|
@@ -1525,42 +1510,42 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1525
1510
|
const { onOpenChange: fe, triggerPointerDownPosRef: ie } = g;
|
|
1526
1511
|
h.useEffect(() => {
|
|
1527
1512
|
if (D) {
|
|
1528
|
-
let
|
|
1513
|
+
let R = { x: 0, y: 0 };
|
|
1529
1514
|
const K = (q) => {
|
|
1530
1515
|
var U, W;
|
|
1531
|
-
|
|
1516
|
+
R = {
|
|
1532
1517
|
x: Math.abs(Math.round(q.pageX) - (((U = ie.current) == null ? void 0 : U.x) ?? 0)),
|
|
1533
1518
|
y: Math.abs(Math.round(q.pageY) - (((W = ie.current) == null ? void 0 : W.y) ?? 0))
|
|
1534
1519
|
};
|
|
1535
1520
|
}, se = (q) => {
|
|
1536
|
-
|
|
1521
|
+
R.x <= 10 && R.y <= 10 ? q.preventDefault() : D.contains(q.target) || fe(!1), document.removeEventListener("pointermove", K), ie.current = null;
|
|
1537
1522
|
};
|
|
1538
1523
|
return ie.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", se, { capture: !0, once: !0 })), () => {
|
|
1539
1524
|
document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", se, { capture: !0 });
|
|
1540
1525
|
};
|
|
1541
1526
|
}
|
|
1542
1527
|
}, [D, fe, ie]), h.useEffect(() => {
|
|
1543
|
-
const
|
|
1544
|
-
return window.addEventListener("blur",
|
|
1545
|
-
window.removeEventListener("blur",
|
|
1528
|
+
const R = () => fe(!1);
|
|
1529
|
+
return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
|
|
1530
|
+
window.removeEventListener("blur", R), window.removeEventListener("resize", R);
|
|
1546
1531
|
};
|
|
1547
1532
|
}, [fe]);
|
|
1548
|
-
const [Se, ke] =
|
|
1549
|
-
const K = F().filter((U) => !U.disabled), se = K.find((U) => U.ref.current === document.activeElement), q =
|
|
1533
|
+
const [Se, ke] = Qr((R) => {
|
|
1534
|
+
const K = F().filter((U) => !U.disabled), se = K.find((U) => U.ref.current === document.activeElement), q = Jr(K, R, se);
|
|
1550
1535
|
q && setTimeout(() => q.ref.current.focus());
|
|
1551
1536
|
}), je = h.useCallback(
|
|
1552
|
-
(
|
|
1537
|
+
(R, K, se) => {
|
|
1553
1538
|
const q = !j.current && !se;
|
|
1554
|
-
(g.value !== void 0 && g.value === K || q) && (Q(
|
|
1539
|
+
(g.value !== void 0 && g.value === K || q) && (Q(R), q && (j.current = !0));
|
|
1555
1540
|
},
|
|
1556
1541
|
[g.value]
|
|
1557
1542
|
), ze = h.useCallback(() => D == null ? void 0 : D.focus(), [D]), _e = h.useCallback(
|
|
1558
|
-
(
|
|
1543
|
+
(R, K, se) => {
|
|
1559
1544
|
const q = !j.current && !se;
|
|
1560
|
-
(g.value !== void 0 && g.value === K || q) && de(
|
|
1545
|
+
(g.value !== void 0 && g.value === K || q) && de(R);
|
|
1561
1546
|
},
|
|
1562
1547
|
[g.value]
|
|
1563
|
-
), Le = s === "popper" ? kt :
|
|
1548
|
+
), Le = s === "popper" ? kt : kr, be = Le === kt ? {
|
|
1564
1549
|
side: c,
|
|
1565
1550
|
sideOffset: d,
|
|
1566
1551
|
align: S,
|
|
@@ -1573,12 +1558,12 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1573
1558
|
avoidCollisions: M
|
|
1574
1559
|
} : {};
|
|
1575
1560
|
return /* @__PURE__ */ b.jsx(
|
|
1576
|
-
|
|
1561
|
+
Dr,
|
|
1577
1562
|
{
|
|
1578
1563
|
scope: t,
|
|
1579
1564
|
content: D,
|
|
1580
1565
|
viewport: v,
|
|
1581
|
-
onViewportChange:
|
|
1566
|
+
onViewportChange: A,
|
|
1582
1567
|
itemRefCallback: je,
|
|
1583
1568
|
selectedItem: k,
|
|
1584
1569
|
onItemLeave: ze,
|
|
@@ -1588,26 +1573,26 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1588
1573
|
position: s,
|
|
1589
1574
|
isPositioned: N,
|
|
1590
1575
|
searchRef: Se,
|
|
1591
|
-
children: /* @__PURE__ */ b.jsx(
|
|
1592
|
-
|
|
1576
|
+
children: /* @__PURE__ */ b.jsx(vs, { as: xs, allowPinchZoom: !0, children: /* @__PURE__ */ b.jsx(
|
|
1577
|
+
Ss,
|
|
1593
1578
|
{
|
|
1594
1579
|
asChild: !0,
|
|
1595
1580
|
trapped: g.open,
|
|
1596
|
-
onMountAutoFocus: (
|
|
1597
|
-
|
|
1581
|
+
onMountAutoFocus: (R) => {
|
|
1582
|
+
R.preventDefault();
|
|
1598
1583
|
},
|
|
1599
|
-
onUnmountAutoFocus: ne(n, (
|
|
1584
|
+
onUnmountAutoFocus: ne(n, (R) => {
|
|
1600
1585
|
var K;
|
|
1601
|
-
(K = g.trigger) == null || K.focus({ preventScroll: !0 }),
|
|
1586
|
+
(K = g.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
|
|
1602
1587
|
}),
|
|
1603
1588
|
children: /* @__PURE__ */ b.jsx(
|
|
1604
|
-
|
|
1589
|
+
_s,
|
|
1605
1590
|
{
|
|
1606
1591
|
asChild: !0,
|
|
1607
1592
|
disableOutsidePointerEvents: !0,
|
|
1608
1593
|
onEscapeKeyDown: i,
|
|
1609
1594
|
onPointerDownOutside: l,
|
|
1610
|
-
onFocusOutside: (
|
|
1595
|
+
onFocusOutside: (R) => R.preventDefault(),
|
|
1611
1596
|
onDismiss: () => g.onOpenChange(!1),
|
|
1612
1597
|
children: /* @__PURE__ */ b.jsx(
|
|
1613
1598
|
Le,
|
|
@@ -1616,7 +1601,7 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1616
1601
|
id: g.contentId,
|
|
1617
1602
|
"data-state": g.open ? "open" : "closed",
|
|
1618
1603
|
dir: g.dir,
|
|
1619
|
-
onContextMenu: (
|
|
1604
|
+
onContextMenu: (R) => R.preventDefault(),
|
|
1620
1605
|
...T,
|
|
1621
1606
|
...be,
|
|
1622
1607
|
onPlaced: () => B(!0),
|
|
@@ -1629,15 +1614,15 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1629
1614
|
outline: "none",
|
|
1630
1615
|
...T.style
|
|
1631
1616
|
},
|
|
1632
|
-
onKeyDown: ne(T.onKeyDown, (
|
|
1633
|
-
const K =
|
|
1634
|
-
if (
|
|
1617
|
+
onKeyDown: ne(T.onKeyDown, (R) => {
|
|
1618
|
+
const K = R.ctrlKey || R.altKey || R.metaKey;
|
|
1619
|
+
if (R.key === "Tab" && R.preventDefault(), !K && R.key.length === 1 && ke(R.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(R.key)) {
|
|
1635
1620
|
let q = F().filter((U) => !U.disabled).map((U) => U.ref.current);
|
|
1636
|
-
if (["ArrowUp", "End"].includes(
|
|
1637
|
-
const U =
|
|
1621
|
+
if (["ArrowUp", "End"].includes(R.key) && (q = q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(R.key)) {
|
|
1622
|
+
const U = R.target, W = q.indexOf(U);
|
|
1638
1623
|
q = q.slice(W + 1);
|
|
1639
1624
|
}
|
|
1640
|
-
setTimeout(() => Y(q)),
|
|
1625
|
+
setTimeout(() => Y(q)), R.preventDefault();
|
|
1641
1626
|
}
|
|
1642
1627
|
})
|
|
1643
1628
|
}
|
|
@@ -1650,19 +1635,19 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
|
|
|
1650
1635
|
);
|
|
1651
1636
|
}
|
|
1652
1637
|
);
|
|
1653
|
-
|
|
1654
|
-
var
|
|
1638
|
+
Pr.displayName = lo;
|
|
1639
|
+
var co = "SelectItemAlignedPosition", kr = h.forwardRef((e, r) => {
|
|
1655
1640
|
const { __scopeSelect: t, onPlaced: s, ...n } = e, i = De(Oe, t), l = Pe(Oe, t), [c, d] = h.useState(null), [S, m] = h.useState(null), y = xe(r, (V) => m(V)), E = yt(t), O = h.useRef(!1), w = h.useRef(!0), { viewport: P, selectedItem: M, selectedItemText: T, focusSelectedItem: g } = l, D = h.useCallback(() => {
|
|
1656
1641
|
if (i.trigger && i.valueNode && c && S && P && M && T) {
|
|
1657
1642
|
const V = i.trigger.getBoundingClientRect(), k = S.getBoundingClientRect(), Q = i.valueNode.getBoundingClientRect(), z = T.getBoundingClientRect();
|
|
1658
1643
|
if (i.dir !== "rtl") {
|
|
1659
|
-
const U = z.left - k.left, W = Q.left - U, me = V.left - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth -
|
|
1644
|
+
const U = z.left - k.left, W = Q.left - U, me = V.left - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ae, st = sr(W, [Ae, rt - tt]);
|
|
1660
1645
|
c.style.minWidth = ye + "px", c.style.left = st + "px";
|
|
1661
1646
|
} else {
|
|
1662
|
-
const U = k.right - z.right, W = window.innerWidth - Q.right - U, me = window.innerWidth - V.right - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth -
|
|
1647
|
+
const U = k.right - z.right, W = window.innerWidth - Q.right - U, me = window.innerWidth - V.right - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ae, st = sr(W, [Ae, rt - tt]);
|
|
1663
1648
|
c.style.minWidth = ye + "px", c.style.right = st + "px";
|
|
1664
1649
|
}
|
|
1665
|
-
const de = E(), F = window.innerHeight -
|
|
1650
|
+
const de = E(), F = window.innerHeight - Ae * 2, N = P.scrollHeight, B = window.getComputedStyle(S), j = parseInt(B.borderTopWidth, 10), Y = parseInt(B.paddingTop, 10), X = parseInt(B.borderBottomWidth, 10), fe = parseInt(B.paddingBottom, 10), ie = j + Y + N + fe + X, Se = Math.min(M.offsetHeight * 5, ie), ke = window.getComputedStyle(P), je = parseInt(ke.paddingTop, 10), ze = parseInt(ke.paddingBottom, 10), _e = V.top + V.height / 2 - Ae, Le = F - _e, be = M.offsetHeight / 2, R = M.offsetTop + be, K = j + Y + R, se = ie - K;
|
|
1666
1651
|
if (K <= _e) {
|
|
1667
1652
|
const U = M === de[de.length - 1].ref.current;
|
|
1668
1653
|
c.style.bottom = "0px";
|
|
@@ -1682,7 +1667,7 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
|
|
|
1682
1667
|
) + se;
|
|
1683
1668
|
c.style.height = me + "px", P.scrollTop = K - _e + P.offsetTop;
|
|
1684
1669
|
}
|
|
1685
|
-
c.style.margin = `${
|
|
1670
|
+
c.style.margin = `${Ae}px 0`, c.style.minHeight = Se + "px", c.style.maxHeight = F + "px", s == null || s(), requestAnimationFrame(() => O.current = !0);
|
|
1686
1671
|
}
|
|
1687
1672
|
}, [
|
|
1688
1673
|
E,
|
|
@@ -1701,19 +1686,19 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
|
|
|
1701
1686
|
Ne(() => {
|
|
1702
1687
|
S && v(window.getComputedStyle(S).zIndex);
|
|
1703
1688
|
}, [S]);
|
|
1704
|
-
const
|
|
1689
|
+
const A = h.useCallback(
|
|
1705
1690
|
(V) => {
|
|
1706
1691
|
V && w.current === !0 && (D(), g == null || g(), w.current = !1);
|
|
1707
1692
|
},
|
|
1708
1693
|
[D, g]
|
|
1709
1694
|
);
|
|
1710
1695
|
return /* @__PURE__ */ b.jsx(
|
|
1711
|
-
|
|
1696
|
+
fo,
|
|
1712
1697
|
{
|
|
1713
1698
|
scope: t,
|
|
1714
1699
|
contentWrapper: c,
|
|
1715
1700
|
shouldExpandOnScrollRef: O,
|
|
1716
|
-
onScrollButtonChange:
|
|
1701
|
+
onScrollButtonChange: A,
|
|
1717
1702
|
children: /* @__PURE__ */ b.jsx(
|
|
1718
1703
|
"div",
|
|
1719
1704
|
{
|
|
@@ -1744,16 +1729,16 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
|
|
|
1744
1729
|
}
|
|
1745
1730
|
);
|
|
1746
1731
|
});
|
|
1747
|
-
|
|
1748
|
-
var
|
|
1732
|
+
kr.displayName = co;
|
|
1733
|
+
var uo = "SelectPopperPosition", kt = h.forwardRef((e, r) => {
|
|
1749
1734
|
const {
|
|
1750
1735
|
__scopeSelect: t,
|
|
1751
1736
|
align: s = "start",
|
|
1752
|
-
collisionPadding: n =
|
|
1737
|
+
collisionPadding: n = Ae,
|
|
1753
1738
|
...i
|
|
1754
1739
|
} = e, l = gt(t);
|
|
1755
1740
|
return /* @__PURE__ */ b.jsx(
|
|
1756
|
-
|
|
1741
|
+
bs,
|
|
1757
1742
|
{
|
|
1758
1743
|
...l,
|
|
1759
1744
|
...i,
|
|
@@ -1773,8 +1758,8 @@ var fo = "SelectPopperPosition", kt = h.forwardRef((e, r) => {
|
|
|
1773
1758
|
}
|
|
1774
1759
|
);
|
|
1775
1760
|
});
|
|
1776
|
-
kt.displayName =
|
|
1777
|
-
var [
|
|
1761
|
+
kt.displayName = uo;
|
|
1762
|
+
var [fo, $t] = Ge(Oe, {}), Mt = "SelectViewport", Mr = h.forwardRef(
|
|
1778
1763
|
(e, r) => {
|
|
1779
1764
|
const { __scopeSelect: t, nonce: s, ...n } = e, i = Pe(Mt, t), l = $t(Mt, t), c = xe(r, i.onViewportChange), d = h.useRef(0);
|
|
1780
1765
|
return /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
|
|
@@ -1808,7 +1793,7 @@ var [po, $t] = Ge(Oe, {}), Mt = "SelectViewport", Or = h.forwardRef(
|
|
|
1808
1793
|
if (E != null && E.current && y) {
|
|
1809
1794
|
const O = Math.abs(d.current - m.scrollTop);
|
|
1810
1795
|
if (O > 0) {
|
|
1811
|
-
const w = window.innerHeight -
|
|
1796
|
+
const w = window.innerHeight - Ae * 2, P = parseFloat(y.style.minHeight), M = parseFloat(y.style.height), T = Math.max(P, M);
|
|
1812
1797
|
if (T < w) {
|
|
1813
1798
|
const g = T + O, D = Math.min(w, g), Z = g - D;
|
|
1814
1799
|
y.style.height = D + "px", y.style.bottom === "0px" && (m.scrollTop = Z > 0 ? Z : 0, y.style.justifyContent = "flex-end");
|
|
@@ -1822,22 +1807,22 @@ var [po, $t] = Ge(Oe, {}), Mt = "SelectViewport", Or = h.forwardRef(
|
|
|
1822
1807
|
] });
|
|
1823
1808
|
}
|
|
1824
1809
|
);
|
|
1825
|
-
|
|
1826
|
-
var
|
|
1810
|
+
Mr.displayName = Mt;
|
|
1811
|
+
var Or = "SelectGroup", [po, ho] = Ge(Or), jr = h.forwardRef(
|
|
1827
1812
|
(e, r) => {
|
|
1828
1813
|
const { __scopeSelect: t, ...s } = e, n = Bt();
|
|
1829
|
-
return /* @__PURE__ */ b.jsx(
|
|
1814
|
+
return /* @__PURE__ */ b.jsx(po, { scope: t, id: n, children: /* @__PURE__ */ b.jsx(he.div, { role: "group", "aria-labelledby": n, ...s, ref: r }) });
|
|
1830
1815
|
}
|
|
1831
1816
|
);
|
|
1832
|
-
|
|
1833
|
-
var
|
|
1817
|
+
jr.displayName = Or;
|
|
1818
|
+
var Lr = "SelectLabel", Br = h.forwardRef(
|
|
1834
1819
|
(e, r) => {
|
|
1835
|
-
const { __scopeSelect: t, ...s } = e, n =
|
|
1820
|
+
const { __scopeSelect: t, ...s } = e, n = ho(Lr, t);
|
|
1836
1821
|
return /* @__PURE__ */ b.jsx(he.div, { id: n.id, ...s, ref: r });
|
|
1837
1822
|
}
|
|
1838
1823
|
);
|
|
1839
|
-
|
|
1840
|
-
var ft = "SelectItem", [
|
|
1824
|
+
Br.displayName = Lr;
|
|
1825
|
+
var ft = "SelectItem", [mo, Ur] = Ge(ft), Hr = h.forwardRef(
|
|
1841
1826
|
(e, r) => {
|
|
1842
1827
|
const {
|
|
1843
1828
|
__scopeSelect: t,
|
|
@@ -1859,7 +1844,7 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
|
|
|
1859
1844
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
1860
1845
|
);
|
|
1861
1846
|
return /* @__PURE__ */ b.jsx(
|
|
1862
|
-
|
|
1847
|
+
mo,
|
|
1863
1848
|
{
|
|
1864
1849
|
scope: t,
|
|
1865
1850
|
value: s,
|
|
@@ -1902,7 +1887,7 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
|
|
|
1902
1887
|
}),
|
|
1903
1888
|
onKeyDown: ne(l.onKeyDown, (T) => {
|
|
1904
1889
|
var D;
|
|
1905
|
-
((D = d.searchRef) == null ? void 0 : D.current) !== "" && T.key === " " || (
|
|
1890
|
+
((D = d.searchRef) == null ? void 0 : D.current) !== "" && T.key === " " || (to.includes(T.key) && M(), T.key === " " && T.preventDefault());
|
|
1906
1891
|
})
|
|
1907
1892
|
}
|
|
1908
1893
|
)
|
|
@@ -1912,10 +1897,10 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
|
|
|
1912
1897
|
);
|
|
1913
1898
|
}
|
|
1914
1899
|
);
|
|
1915
|
-
|
|
1916
|
-
var Xe = "SelectItemText",
|
|
1900
|
+
Hr.displayName = ft;
|
|
1901
|
+
var Xe = "SelectItemText", Wr = h.forwardRef(
|
|
1917
1902
|
(e, r) => {
|
|
1918
|
-
const { __scopeSelect: t, className: s, style: n, ...i } = e, l = De(Xe, t), c = Pe(Xe, t), d =
|
|
1903
|
+
const { __scopeSelect: t, className: s, style: n, ...i } = e, l = De(Xe, t), c = Pe(Xe, t), d = Ur(Xe, t), S = no(Xe, t), [m, y] = h.useState(null), E = xe(
|
|
1919
1904
|
r,
|
|
1920
1905
|
(T) => y(T),
|
|
1921
1906
|
d.onItemTextChange,
|
|
@@ -1933,15 +1918,15 @@ var Xe = "SelectItemText", Kr = h.forwardRef(
|
|
|
1933
1918
|
] });
|
|
1934
1919
|
}
|
|
1935
1920
|
);
|
|
1936
|
-
|
|
1937
|
-
var
|
|
1921
|
+
Wr.displayName = Xe;
|
|
1922
|
+
var Kr = "SelectItemIndicator", $r = h.forwardRef(
|
|
1938
1923
|
(e, r) => {
|
|
1939
1924
|
const { __scopeSelect: t, ...s } = e;
|
|
1940
|
-
return
|
|
1925
|
+
return Ur(Kr, t).isSelected ? /* @__PURE__ */ b.jsx(he.span, { "aria-hidden": !0, ...s, ref: r }) : null;
|
|
1941
1926
|
}
|
|
1942
1927
|
);
|
|
1943
|
-
|
|
1944
|
-
var Ot = "SelectScrollUpButton",
|
|
1928
|
+
$r.displayName = Kr;
|
|
1929
|
+
var Ot = "SelectScrollUpButton", qr = h.forwardRef((e, r) => {
|
|
1945
1930
|
const t = Pe(Ot, e.__scopeSelect), s = $t(Ot, e.__scopeSelect), [n, i] = h.useState(!1), l = xe(r, s.onScrollButtonChange);
|
|
1946
1931
|
return Ne(() => {
|
|
1947
1932
|
if (t.viewport && t.isPositioned) {
|
|
@@ -1953,7 +1938,7 @@ var Ot = "SelectScrollUpButton", Gr = h.forwardRef((e, r) => {
|
|
|
1953
1938
|
return c(), d.addEventListener("scroll", c), () => d.removeEventListener("scroll", c);
|
|
1954
1939
|
}
|
|
1955
1940
|
}, [t.viewport, t.isPositioned]), n ? /* @__PURE__ */ b.jsx(
|
|
1956
|
-
|
|
1941
|
+
zr,
|
|
1957
1942
|
{
|
|
1958
1943
|
...e,
|
|
1959
1944
|
ref: l,
|
|
@@ -1964,8 +1949,8 @@ var Ot = "SelectScrollUpButton", Gr = h.forwardRef((e, r) => {
|
|
|
1964
1949
|
}
|
|
1965
1950
|
) : null;
|
|
1966
1951
|
});
|
|
1967
|
-
|
|
1968
|
-
var jt = "SelectScrollDownButton",
|
|
1952
|
+
qr.displayName = Ot;
|
|
1953
|
+
var jt = "SelectScrollDownButton", Gr = h.forwardRef((e, r) => {
|
|
1969
1954
|
const t = Pe(jt, e.__scopeSelect), s = $t(jt, e.__scopeSelect), [n, i] = h.useState(!1), l = xe(r, s.onScrollButtonChange);
|
|
1970
1955
|
return Ne(() => {
|
|
1971
1956
|
if (t.viewport && t.isPositioned) {
|
|
@@ -1977,7 +1962,7 @@ var jt = "SelectScrollDownButton", zr = h.forwardRef((e, r) => {
|
|
|
1977
1962
|
return c(), d.addEventListener("scroll", c), () => d.removeEventListener("scroll", c);
|
|
1978
1963
|
}
|
|
1979
1964
|
}, [t.viewport, t.isPositioned]), n ? /* @__PURE__ */ b.jsx(
|
|
1980
|
-
|
|
1965
|
+
zr,
|
|
1981
1966
|
{
|
|
1982
1967
|
...e,
|
|
1983
1968
|
ref: l,
|
|
@@ -1988,8 +1973,8 @@ var jt = "SelectScrollDownButton", zr = h.forwardRef((e, r) => {
|
|
|
1988
1973
|
}
|
|
1989
1974
|
) : null;
|
|
1990
1975
|
});
|
|
1991
|
-
|
|
1992
|
-
var
|
|
1976
|
+
Gr.displayName = jt;
|
|
1977
|
+
var zr = h.forwardRef((e, r) => {
|
|
1993
1978
|
const { __scopeSelect: t, onAutoScroll: s, ...n } = e, i = Pe("SelectScrollButton", t), l = h.useRef(null), c = yt(t), d = h.useCallback(() => {
|
|
1994
1979
|
l.current !== null && (window.clearInterval(l.current), l.current = null);
|
|
1995
1980
|
}, []);
|
|
@@ -2016,26 +2001,26 @@ var Yr = h.forwardRef((e, r) => {
|
|
|
2016
2001
|
})
|
|
2017
2002
|
}
|
|
2018
2003
|
);
|
|
2019
|
-
}),
|
|
2004
|
+
}), yo = "SelectSeparator", Yr = h.forwardRef(
|
|
2020
2005
|
(e, r) => {
|
|
2021
2006
|
const { __scopeSelect: t, ...s } = e;
|
|
2022
2007
|
return /* @__PURE__ */ b.jsx(he.div, { "aria-hidden": !0, ...s, ref: r });
|
|
2023
2008
|
}
|
|
2024
2009
|
);
|
|
2025
|
-
|
|
2026
|
-
var Lt = "SelectArrow",
|
|
2010
|
+
Yr.displayName = yo;
|
|
2011
|
+
var Lt = "SelectArrow", go = h.forwardRef(
|
|
2027
2012
|
(e, r) => {
|
|
2028
2013
|
const { __scopeSelect: t, ...s } = e, n = gt(t), i = De(Lt, t), l = Pe(Lt, t);
|
|
2029
|
-
return i.open && l.position === "popper" ? /* @__PURE__ */ b.jsx(
|
|
2014
|
+
return i.open && l.position === "popper" ? /* @__PURE__ */ b.jsx(ws, { ...n, ...s, ref: r }) : null;
|
|
2030
2015
|
}
|
|
2031
2016
|
);
|
|
2032
|
-
|
|
2033
|
-
function
|
|
2017
|
+
go.displayName = Lt;
|
|
2018
|
+
function Xr(e) {
|
|
2034
2019
|
return e === "" || e === void 0;
|
|
2035
2020
|
}
|
|
2036
|
-
var
|
|
2021
|
+
var Zr = h.forwardRef(
|
|
2037
2022
|
(e, r) => {
|
|
2038
|
-
const { value: t, ...s } = e, n = h.useRef(null), i = xe(r, n), l =
|
|
2023
|
+
const { value: t, ...s } = e, n = h.useRef(null), i = xe(r, n), l = Js(t);
|
|
2039
2024
|
return h.useEffect(() => {
|
|
2040
2025
|
const c = n.current, d = window.HTMLSelectElement.prototype, m = Object.getOwnPropertyDescriptor(
|
|
2041
2026
|
d,
|
|
@@ -2048,9 +2033,9 @@ var Qr = h.forwardRef(
|
|
|
2048
2033
|
}, [l, t]), /* @__PURE__ */ b.jsx(As, { asChild: !0, children: /* @__PURE__ */ b.jsx("select", { ...s, ref: i, defaultValue: t }) });
|
|
2049
2034
|
}
|
|
2050
2035
|
);
|
|
2051
|
-
|
|
2052
|
-
function
|
|
2053
|
-
const r =
|
|
2036
|
+
Zr.displayName = "BubbleSelect";
|
|
2037
|
+
function Qr(e) {
|
|
2038
|
+
const r = Cs(e), t = h.useRef(""), s = h.useRef(0), n = h.useCallback(
|
|
2054
2039
|
(l) => {
|
|
2055
2040
|
const c = t.current + l;
|
|
2056
2041
|
r(c), function d(S) {
|
|
@@ -2063,21 +2048,21 @@ function Jr(e) {
|
|
|
2063
2048
|
}, []);
|
|
2064
2049
|
return h.useEffect(() => () => window.clearTimeout(s.current), []), [t, n, i];
|
|
2065
2050
|
}
|
|
2066
|
-
function
|
|
2051
|
+
function Jr(e, r, t) {
|
|
2067
2052
|
const n = r.length > 1 && Array.from(r).every((S) => S === r[0]) ? r[0] : r, i = t ? e.indexOf(t) : -1;
|
|
2068
|
-
let l =
|
|
2053
|
+
let l = vo(e, Math.max(i, 0));
|
|
2069
2054
|
n.length === 1 && (l = l.filter((S) => S !== t));
|
|
2070
2055
|
const d = l.find(
|
|
2071
2056
|
(S) => S.textValue.toLowerCase().startsWith(n.toLowerCase())
|
|
2072
2057
|
);
|
|
2073
2058
|
return d !== t ? d : void 0;
|
|
2074
2059
|
}
|
|
2075
|
-
function
|
|
2060
|
+
function vo(e, r) {
|
|
2076
2061
|
return e.map((t, s) => e[(r + s) % e.length]);
|
|
2077
2062
|
}
|
|
2078
|
-
var
|
|
2079
|
-
const qo =
|
|
2080
|
-
|
|
2063
|
+
var xo = Cr, es = Er, So = Tr, _o = Rr, bo = Ir, ts = Nr, wo = Mr, Ao = jr, rs = Br, ss = Hr, Co = Wr, Vo = $r, os = qr, ns = Gr, is = Yr;
|
|
2064
|
+
const qo = xo, Go = Ao, zo = So, Eo = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__ */ b.jsxs(
|
|
2065
|
+
es,
|
|
2081
2066
|
{
|
|
2082
2067
|
ref: s,
|
|
2083
2068
|
className: Ee(
|
|
@@ -2087,13 +2072,13 @@ const qo = So, Go = Ao, zo = _o, Fo = h.forwardRef(({ className: e, children: r,
|
|
|
2087
2072
|
...t,
|
|
2088
2073
|
children: [
|
|
2089
2074
|
/* @__PURE__ */ b.jsx("span", { className: "truncate", children: r }),
|
|
2090
|
-
/* @__PURE__ */ b.jsx(
|
|
2075
|
+
/* @__PURE__ */ b.jsx(_o, { asChild: !0, children: /* @__PURE__ */ b.jsx(lr, { className: "flex-shrink-0 h-4 w-4 opacity-50" }) })
|
|
2091
2076
|
]
|
|
2092
2077
|
}
|
|
2093
2078
|
));
|
|
2094
|
-
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2079
|
+
Eo.displayName = es.displayName;
|
|
2080
|
+
const as = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
2081
|
+
os,
|
|
2097
2082
|
{
|
|
2098
2083
|
ref: t,
|
|
2099
2084
|
className: Ee(
|
|
@@ -2101,12 +2086,12 @@ const ls = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
|
2101
2086
|
e
|
|
2102
2087
|
),
|
|
2103
2088
|
...r,
|
|
2104
|
-
children: /* @__PURE__ */ b.jsx(
|
|
2089
|
+
children: /* @__PURE__ */ b.jsx(Ps, { className: "h-4 w-4" })
|
|
2105
2090
|
}
|
|
2106
2091
|
));
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2092
|
+
as.displayName = os.displayName;
|
|
2093
|
+
const ls = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
2094
|
+
ns,
|
|
2110
2095
|
{
|
|
2111
2096
|
ref: t,
|
|
2112
2097
|
className: Ee(
|
|
@@ -2114,12 +2099,12 @@ const cs = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
|
2114
2099
|
e
|
|
2115
2100
|
),
|
|
2116
2101
|
...r,
|
|
2117
|
-
children: /* @__PURE__ */ b.jsx(
|
|
2102
|
+
children: /* @__PURE__ */ b.jsx(lr, { className: "h-4 w-4" })
|
|
2118
2103
|
}
|
|
2119
2104
|
));
|
|
2120
|
-
|
|
2121
|
-
const
|
|
2122
|
-
|
|
2105
|
+
ls.displayName = ns.displayName;
|
|
2106
|
+
const Fo = h.forwardRef(({ className: e, children: r, position: t = "popper", ...s }, n) => /* @__PURE__ */ b.jsx(bo, { children: /* @__PURE__ */ b.jsxs(
|
|
2107
|
+
ts,
|
|
2123
2108
|
{
|
|
2124
2109
|
ref: n,
|
|
2125
2110
|
className: Ee(
|
|
@@ -2130,9 +2115,9 @@ const To = h.forwardRef(({ className: e, children: r, position: t = "popper", ..
|
|
|
2130
2115
|
position: t,
|
|
2131
2116
|
...s,
|
|
2132
2117
|
children: [
|
|
2133
|
-
/* @__PURE__ */ b.jsx(
|
|
2118
|
+
/* @__PURE__ */ b.jsx(as, {}),
|
|
2134
2119
|
/* @__PURE__ */ b.jsx(
|
|
2135
|
-
|
|
2120
|
+
wo,
|
|
2136
2121
|
{
|
|
2137
2122
|
className: Ee(
|
|
2138
2123
|
"p-1",
|
|
@@ -2141,22 +2126,22 @@ const To = h.forwardRef(({ className: e, children: r, position: t = "popper", ..
|
|
|
2141
2126
|
children: r
|
|
2142
2127
|
}
|
|
2143
2128
|
),
|
|
2144
|
-
/* @__PURE__ */ b.jsx(
|
|
2129
|
+
/* @__PURE__ */ b.jsx(ls, {})
|
|
2145
2130
|
]
|
|
2146
2131
|
}
|
|
2147
2132
|
) }));
|
|
2148
|
-
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2133
|
+
Fo.displayName = ts.displayName;
|
|
2134
|
+
const To = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
2135
|
+
rs,
|
|
2151
2136
|
{
|
|
2152
2137
|
ref: t,
|
|
2153
2138
|
className: Ee("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
|
|
2154
2139
|
...r
|
|
2155
2140
|
}
|
|
2156
2141
|
));
|
|
2157
|
-
|
|
2142
|
+
To.displayName = rs.displayName;
|
|
2158
2143
|
const Ro = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__ */ b.jsxs(
|
|
2159
|
-
|
|
2144
|
+
ss,
|
|
2160
2145
|
{
|
|
2161
2146
|
ref: s,
|
|
2162
2147
|
className: Ee(
|
|
@@ -2165,22 +2150,22 @@ const Ro = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__
|
|
|
2165
2150
|
),
|
|
2166
2151
|
...t,
|
|
2167
2152
|
children: [
|
|
2168
|
-
/* @__PURE__ */ b.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ b.jsx(
|
|
2169
|
-
/* @__PURE__ */ b.jsx(
|
|
2153
|
+
/* @__PURE__ */ b.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ b.jsx(Vo, { children: /* @__PURE__ */ b.jsx(ks, { className: "h-4 w-4" }) }) }),
|
|
2154
|
+
/* @__PURE__ */ b.jsx(Co, { children: r })
|
|
2170
2155
|
]
|
|
2171
2156
|
}
|
|
2172
2157
|
));
|
|
2173
|
-
Ro.displayName =
|
|
2174
|
-
const
|
|
2175
|
-
|
|
2158
|
+
Ro.displayName = ss.displayName;
|
|
2159
|
+
const Io = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
|
|
2160
|
+
is,
|
|
2176
2161
|
{
|
|
2177
2162
|
ref: t,
|
|
2178
2163
|
className: Ee("-mx-1 my-1 h-px bg-muted", e),
|
|
2179
2164
|
...r
|
|
2180
2165
|
}
|
|
2181
2166
|
));
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2167
|
+
Io.displayName = is.displayName;
|
|
2168
|
+
const No = h.forwardRef(
|
|
2184
2169
|
({ className: e, type: r, ...t }, s) => /* @__PURE__ */ b.jsx(
|
|
2185
2170
|
"input",
|
|
2186
2171
|
{
|
|
@@ -2194,21 +2179,20 @@ const Do = h.forwardRef(
|
|
|
2194
2179
|
}
|
|
2195
2180
|
)
|
|
2196
2181
|
);
|
|
2197
|
-
|
|
2182
|
+
No.displayName = "Input";
|
|
2198
2183
|
export {
|
|
2199
2184
|
Ho as C,
|
|
2200
2185
|
Uo as F,
|
|
2201
|
-
|
|
2186
|
+
No as I,
|
|
2202
2187
|
qo as S,
|
|
2203
2188
|
Bo as a,
|
|
2204
|
-
|
|
2189
|
+
Eo as b,
|
|
2205
2190
|
zo as c,
|
|
2206
|
-
|
|
2191
|
+
Fo as d,
|
|
2207
2192
|
Go as e,
|
|
2208
2193
|
Ro as f,
|
|
2209
2194
|
Wo as g,
|
|
2210
2195
|
pt as h,
|
|
2211
|
-
cr as i,
|
|
2212
2196
|
Ko as u
|
|
2213
2197
|
};
|
|
2214
|
-
//# sourceMappingURL=Input-
|
|
2198
|
+
//# sourceMappingURL=Input-BEDZAKw0.js.map
|