ynotsoft-dynamic-form 1.0.94 → 1.0.95
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/dynamic-form.js +405 -400
- package/dist/dynamic-form.umd.cjs +16 -16
- package/package.json +1 -1
package/dist/dynamic-form.js
CHANGED
|
@@ -267,31 +267,33 @@ function dl({
|
|
|
267
267
|
apiClient: s,
|
|
268
268
|
...i
|
|
269
269
|
}) {
|
|
270
|
-
const c = a, l = e.selectMode !== "multiple", [d, m] = le([]), [g, p] = le(!1), [v, h] = le(!1), [y, k] = le(""), [C, E] = le(-1), [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
const c = a, l = e.selectMode !== "multiple", [d, m] = le([]), [g, p] = le(!1), [v, h] = le(!1), [y, k] = le(""), [C, E] = le(-1), [S, A] = le({}), I = Yt(null), _ = Yt(null), P = Yt(null), F = t[e.name], H = sr(() => F ? (Array.isArray(F) ? F : [F]).map((x) => {
|
|
271
|
+
if (x && typeof x == "object" && x.value !== void 0)
|
|
272
|
+
return { value: x.value, label: x.label || x.value };
|
|
273
|
+
const z = d.find((G) => G.value === x);
|
|
274
|
+
return z || (S[x] ? S[x] : { value: x, label: x });
|
|
275
|
+
}) : [], [F, d, S])(), Y = sr(
|
|
274
276
|
async (N = "") => {
|
|
275
277
|
if (e.onSearch) {
|
|
276
|
-
const
|
|
277
|
-
m(
|
|
278
|
+
const x = await e.onSearch(N, t);
|
|
279
|
+
m(x);
|
|
278
280
|
return;
|
|
279
281
|
}
|
|
280
282
|
if (!e.optionsUrl || !s) {
|
|
281
|
-
const
|
|
283
|
+
const x = (e.options || []).map((z) => ({
|
|
282
284
|
value: z[e.valueId || "value"] || z.value || z.id,
|
|
283
285
|
label: z[e.labelId || "label"] || z.label || z.name
|
|
284
286
|
}));
|
|
285
287
|
m(
|
|
286
|
-
N ?
|
|
288
|
+
N ? x.filter(
|
|
287
289
|
(z) => String(z.label).toLowerCase().includes(N.toLowerCase())
|
|
288
|
-
) :
|
|
290
|
+
) : x
|
|
289
291
|
);
|
|
290
292
|
return;
|
|
291
293
|
}
|
|
292
294
|
p(!0);
|
|
293
295
|
try {
|
|
294
|
-
const
|
|
296
|
+
const x = e.searchParam || "search", z = e.optionsUrl.includes("?") ? "&" : "?", G = `${e.optionsUrl}${z}${x}=${encodeURIComponent(N)}`, j = await s(G), ue = j.data || j, q = Array.isArray(ue) ? ue : [];
|
|
295
297
|
m(
|
|
296
298
|
q.map((ee) => ({
|
|
297
299
|
value: ee[e.valueId || "value"] || ee.value || ee.id,
|
|
@@ -308,15 +310,16 @@ function dl({
|
|
|
308
310
|
), w = sr(
|
|
309
311
|
(N) => {
|
|
310
312
|
if (!N) return;
|
|
311
|
-
A((
|
|
312
|
-
|
|
313
|
+
A((G) => ({ ...G, [N.value]: N }));
|
|
314
|
+
const x = { value: N.value, label: N.label };
|
|
315
|
+
let z;
|
|
313
316
|
if (l)
|
|
314
|
-
|
|
317
|
+
z = [x], h(!1);
|
|
315
318
|
else {
|
|
316
|
-
const
|
|
317
|
-
|
|
319
|
+
const G = Array.isArray(F) ? F : [];
|
|
320
|
+
z = G.some((ue) => (ue?.value ?? ue) === N.value) ? G.filter((ue) => (ue?.value ?? ue) !== N.value) : [...G, x];
|
|
318
321
|
}
|
|
319
|
-
n(e.name,
|
|
322
|
+
n(e.name, z), r(e.name), e.clearSearchOnSelect && k("");
|
|
320
323
|
},
|
|
321
324
|
[
|
|
322
325
|
F,
|
|
@@ -331,11 +334,11 @@ function dl({
|
|
|
331
334
|
switch (N.key) {
|
|
332
335
|
case "ArrowDown":
|
|
333
336
|
N.preventDefault(), v ? E(
|
|
334
|
-
(
|
|
337
|
+
(x) => x < d.length - 1 ? x + 1 : x
|
|
335
338
|
) : h(!0);
|
|
336
339
|
break;
|
|
337
340
|
case "ArrowUp":
|
|
338
|
-
N.preventDefault(), v && E((
|
|
341
|
+
N.preventDefault(), v && E((x) => x > 0 ? x - 1 : 0);
|
|
339
342
|
break;
|
|
340
343
|
case "Enter":
|
|
341
344
|
N.preventDefault(), v && C >= 0 && d[C] ? w(d[C]) : v || h(!0);
|
|
@@ -348,26 +351,26 @@ function dl({
|
|
|
348
351
|
break;
|
|
349
352
|
}
|
|
350
353
|
}, O = (N) => {
|
|
351
|
-
const
|
|
352
|
-
k(
|
|
354
|
+
const x = N.target.value;
|
|
355
|
+
k(x), E(-1), P.current && clearTimeout(P.current), P.current = setTimeout(() => Y(x), 300);
|
|
353
356
|
};
|
|
354
357
|
qe(() => {
|
|
355
358
|
if (v) {
|
|
356
|
-
|
|
359
|
+
Y(y);
|
|
357
360
|
const N = setTimeout(() => _.current?.focus(), 50);
|
|
358
361
|
return () => clearTimeout(N);
|
|
359
362
|
} else
|
|
360
363
|
E(-1);
|
|
361
|
-
}, [v,
|
|
362
|
-
const N = (
|
|
363
|
-
I.current && !I.current.contains(
|
|
364
|
+
}, [v, Y, y]), qe(() => {
|
|
365
|
+
const N = (x) => {
|
|
366
|
+
I.current && !I.current.contains(x.target) && (h(!1), r(e.name));
|
|
364
367
|
};
|
|
365
368
|
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
366
369
|
}, [e.name, r]);
|
|
367
|
-
const R = (N,
|
|
370
|
+
const R = (N, x) => {
|
|
368
371
|
N.stopPropagation();
|
|
369
|
-
const z = Array.isArray(F) ? F : [],
|
|
370
|
-
n(e.name,
|
|
372
|
+
const z = Array.isArray(F) ? F : [], G = l ? [] : z.filter((j) => (j?.value ?? j) !== x);
|
|
373
|
+
n(e.name, G), r(e.name);
|
|
371
374
|
};
|
|
372
375
|
return /* @__PURE__ */ D(
|
|
373
376
|
"div",
|
|
@@ -404,7 +407,7 @@ function dl({
|
|
|
404
407
|
{
|
|
405
408
|
type: "button",
|
|
406
409
|
"aria-label": `Remove ${N.label}`,
|
|
407
|
-
onClick: (
|
|
410
|
+
onClick: (x) => R(x, N.value),
|
|
408
411
|
className: "ml-1 p-0.5 hover:bg-primary/20 rounded-full transition-colors",
|
|
409
412
|
children: /* @__PURE__ */ u(Gr, { className: "w-3 h-3" })
|
|
410
413
|
}
|
|
@@ -451,25 +454,25 @@ function dl({
|
|
|
451
454
|
role: "listbox",
|
|
452
455
|
"aria-label": e.label,
|
|
453
456
|
className: "max-h-60 overflow-y-auto p-1",
|
|
454
|
-
children: d.length > 0 ? d.map((N,
|
|
457
|
+
children: d.length > 0 ? d.map((N, x) => {
|
|
455
458
|
const z = H.some(
|
|
456
459
|
(j) => j.value === N.value
|
|
457
|
-
),
|
|
460
|
+
), G = x === C;
|
|
458
461
|
return /* @__PURE__ */ D(
|
|
459
462
|
"div",
|
|
460
463
|
{
|
|
461
|
-
id: `${e.name}-opt-${
|
|
464
|
+
id: `${e.name}-opt-${x}`,
|
|
462
465
|
role: "option",
|
|
463
466
|
tabIndex: -1,
|
|
464
467
|
"aria-selected": z,
|
|
465
468
|
onClick: () => w(N),
|
|
466
469
|
onKeyDown: (j) => j.key === "Enter" && w(N),
|
|
467
|
-
onMouseEnter: () => E(
|
|
470
|
+
onMouseEnter: () => E(x),
|
|
468
471
|
className: `
|
|
469
472
|
px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
|
|
470
|
-
${
|
|
473
|
+
${G ? "bg-accent text-accent-foreground" : ""}
|
|
471
474
|
${z ? "text-primary font-medium" : "text-foreground"}
|
|
472
|
-
${!
|
|
475
|
+
${!G && !z ? "hover:bg-muted" : ""}
|
|
473
476
|
`,
|
|
474
477
|
children: [
|
|
475
478
|
/* @__PURE__ */ u("span", { children: N.label }),
|
|
@@ -621,15 +624,15 @@ function _a(e) {
|
|
|
621
624
|
s.displayName = t;
|
|
622
625
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Ce(i), l = Te.forwardRef(
|
|
623
626
|
(h, y) => {
|
|
624
|
-
const { scope: k, children: C } = h, E = a(i, k),
|
|
625
|
-
return /* @__PURE__ */ u(c, { ref:
|
|
627
|
+
const { scope: k, children: C } = h, E = a(i, k), S = ie(y, E.collectionRef);
|
|
628
|
+
return /* @__PURE__ */ u(c, { ref: S, children: C });
|
|
626
629
|
}
|
|
627
630
|
);
|
|
628
631
|
l.displayName = i;
|
|
629
632
|
const d = e + "CollectionItemSlot", m = "data-radix-collection-item", g = /* @__PURE__ */ Ce(d), p = Te.forwardRef(
|
|
630
633
|
(h, y) => {
|
|
631
|
-
const { scope: k, children: C, ...E } = h,
|
|
632
|
-
return Te.useEffect(() => (I.itemMap.set(
|
|
634
|
+
const { scope: k, children: C, ...E } = h, S = Te.useRef(null), A = ie(y, S), I = a(d, k);
|
|
635
|
+
return Te.useEffect(() => (I.itemMap.set(S, { ref: S, ...E }), () => void I.itemMap.delete(S))), /* @__PURE__ */ u(g, { [m]: "", ref: A, children: C });
|
|
633
636
|
}
|
|
634
637
|
);
|
|
635
638
|
p.displayName = d;
|
|
@@ -712,9 +715,9 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
712
715
|
onInteractOutside: s,
|
|
713
716
|
onDismiss: i,
|
|
714
717
|
...c
|
|
715
|
-
} = e, l = f.useContext(Da), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), v = ie(t, (_) => m(_)), h = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), k = h.indexOf(y), C = d ? h.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0,
|
|
718
|
+
} = e, l = f.useContext(Da), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), v = ie(t, (_) => m(_)), h = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), k = h.indexOf(y), C = d ? h.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, S = C >= k, A = Nl((_) => {
|
|
716
719
|
const P = _.target, F = [...l.branches].some((V) => V.contains(P));
|
|
717
|
-
!
|
|
720
|
+
!S || F || (o?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
718
721
|
}, g), I = Tl((_) => {
|
|
719
722
|
const P = _.target;
|
|
720
723
|
[...l.branches].some((V) => V.contains(P)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
@@ -737,7 +740,7 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
737
740
|
...c,
|
|
738
741
|
ref: v,
|
|
739
742
|
style: {
|
|
740
|
-
pointerEvents: E ?
|
|
743
|
+
pointerEvents: E ? S ? "auto" : "none" : void 0,
|
|
741
744
|
...e.style
|
|
742
745
|
},
|
|
743
746
|
onFocusCapture: Z(e.onFocusCapture, I.onFocusCapture),
|
|
@@ -871,12 +874,12 @@ var Pl = [
|
|
|
871
874
|
if (r) {
|
|
872
875
|
let h = function(E) {
|
|
873
876
|
if (p.paused || !i) return;
|
|
874
|
-
const
|
|
875
|
-
i.contains(
|
|
877
|
+
const S = E.target;
|
|
878
|
+
i.contains(S) ? m.current = S : Je(m.current, { select: !0 });
|
|
876
879
|
}, y = function(E) {
|
|
877
880
|
if (p.paused || !i) return;
|
|
878
|
-
const
|
|
879
|
-
|
|
881
|
+
const S = E.relatedTarget;
|
|
882
|
+
S !== null && (i.contains(S) || Je(m.current, { select: !0 }));
|
|
880
883
|
}, k = function(E) {
|
|
881
884
|
if (document.activeElement === document.body)
|
|
882
885
|
for (const A of E)
|
|
@@ -909,8 +912,8 @@ var Pl = [
|
|
|
909
912
|
if (!n && !r || p.paused) return;
|
|
910
913
|
const y = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, k = document.activeElement;
|
|
911
914
|
if (y && k) {
|
|
912
|
-
const C = h.currentTarget, [E,
|
|
913
|
-
E &&
|
|
915
|
+
const C = h.currentTarget, [E, S] = Ml(C);
|
|
916
|
+
E && S ? !h.shiftKey && k === S ? (h.preventDefault(), n && Je(E, { select: !0 })) : h.shiftKey && k === E && (h.preventDefault(), n && Je(S, { select: !0 })) : k === C && h.preventDefault();
|
|
914
917
|
}
|
|
915
918
|
},
|
|
916
919
|
[n, r, p.paused]
|
|
@@ -979,12 +982,12 @@ function Wo(e, t) {
|
|
|
979
982
|
function Fl(e) {
|
|
980
983
|
return e.filter((t) => t.tagName !== "A");
|
|
981
984
|
}
|
|
982
|
-
var
|
|
985
|
+
var ve = globalThis?.document ? f.useLayoutEffect : () => {
|
|
983
986
|
}, $l = f[" useId ".trim().toString()] || (() => {
|
|
984
987
|
}), Wl = 0;
|
|
985
988
|
function Zt(e) {
|
|
986
989
|
const [t, n] = f.useState($l());
|
|
987
|
-
return
|
|
990
|
+
return ve(() => {
|
|
988
991
|
n((r) => r ?? String(Wl++));
|
|
989
992
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
990
993
|
}
|
|
@@ -1164,7 +1167,7 @@ const Ql = async (e, t, n) => {
|
|
|
1164
1167
|
} = i[h], {
|
|
1165
1168
|
x: C,
|
|
1166
1169
|
y: E,
|
|
1167
|
-
data:
|
|
1170
|
+
data: S,
|
|
1168
1171
|
reset: A
|
|
1169
1172
|
} = await k({
|
|
1170
1173
|
x: d,
|
|
@@ -1184,7 +1187,7 @@ const Ql = async (e, t, n) => {
|
|
|
1184
1187
|
...p,
|
|
1185
1188
|
[y]: {
|
|
1186
1189
|
...p[y],
|
|
1187
|
-
...
|
|
1190
|
+
...S
|
|
1188
1191
|
}
|
|
1189
1192
|
}, A && v <= 50 && (v++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
|
|
1190
1193
|
reference: e,
|
|
@@ -1229,7 +1232,7 @@ async function qt(e, t) {
|
|
|
1229
1232
|
y: o,
|
|
1230
1233
|
width: s.floating.width,
|
|
1231
1234
|
height: s.floating.height
|
|
1232
|
-
} : s.reference, E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)),
|
|
1235
|
+
} : s.reference, E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), S = await (a.isElement == null ? void 0 : a.isElement(E)) ? await (a.getScale == null ? void 0 : a.getScale(E)) || {
|
|
1233
1236
|
x: 1,
|
|
1234
1237
|
y: 1
|
|
1235
1238
|
} : {
|
|
@@ -1242,10 +1245,10 @@ async function qt(e, t) {
|
|
|
1242
1245
|
strategy: c
|
|
1243
1246
|
}) : C);
|
|
1244
1247
|
return {
|
|
1245
|
-
top: (k.top - A.top + v.top) /
|
|
1246
|
-
bottom: (A.bottom - k.bottom + v.bottom) /
|
|
1247
|
-
left: (k.left - A.left + v.left) /
|
|
1248
|
-
right: (A.right - k.right + v.right) /
|
|
1248
|
+
top: (k.top - A.top + v.top) / S.y,
|
|
1249
|
+
bottom: (A.bottom - k.bottom + v.bottom) / S.y,
|
|
1250
|
+
left: (k.left - A.left + v.left) / S.x,
|
|
1251
|
+
right: (A.right - k.right + v.right) / S.x
|
|
1249
1252
|
};
|
|
1250
1253
|
}
|
|
1251
1254
|
const Zl = (e) => ({
|
|
@@ -1269,10 +1272,10 @@ const Zl = (e) => ({
|
|
|
1269
1272
|
const m = $a(d), g = {
|
|
1270
1273
|
x: n,
|
|
1271
1274
|
y: r
|
|
1272
|
-
}, p = Jr(o), v = Zr(p), h = await s.getDimensions(l), y = p === "y", k = y ? "top" : "left", C = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth",
|
|
1275
|
+
}, p = Jr(o), v = Zr(p), h = await s.getDimensions(l), y = p === "y", k = y ? "top" : "left", C = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", S = a.reference[v] + a.reference[p] - g[p] - a.floating[v], A = g[p] - a.reference[p], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1273
1276
|
let _ = I ? I[E] : 0;
|
|
1274
1277
|
(!_ || !await (s.isElement == null ? void 0 : s.isElement(I))) && (_ = i.floating[E] || a.floating[v]);
|
|
1275
|
-
const P =
|
|
1278
|
+
const P = S / 2 - A / 2, F = _ / 2 - h[v] / 2 - 1, V = tt(m[k], F), H = tt(m[C], F), Y = V, w = _ - h[v] - H, T = _ / 2 - h[v] / 2 + P, O = Rr(Y, T, w), R = !c.arrow && Ot(o) != null && T !== O && a.reference[v] / 2 - (T < Y ? V : H) - h[v] / 2 < 0, N = R ? T < Y ? T - Y : T - w : 0;
|
|
1276
1279
|
return {
|
|
1277
1280
|
[p]: g[p] + N,
|
|
1278
1281
|
data: {
|
|
@@ -1309,23 +1312,23 @@ const Zl = (e) => ({
|
|
|
1309
1312
|
} = Ke(e, t);
|
|
1310
1313
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
1311
1314
|
return {};
|
|
1312
|
-
const k = Xe(o), C = ze(i), E = Xe(i) === i,
|
|
1313
|
-
!g && I && A.push(...Kl(i, h, v,
|
|
1315
|
+
const k = Xe(o), C = ze(i), E = Xe(i) === i, S = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = g || (E || !h ? [kn(i)] : Vl(i)), I = v !== "none";
|
|
1316
|
+
!g && I && A.push(...Kl(i, h, v, S));
|
|
1314
1317
|
const _ = [i, ...A], P = await qt(t, y), F = [];
|
|
1315
1318
|
let V = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
1316
1319
|
if (d && F.push(P[k]), m) {
|
|
1317
|
-
const T = jl(o, s,
|
|
1320
|
+
const T = jl(o, s, S);
|
|
1318
1321
|
F.push(P[T[0]], P[T[1]]);
|
|
1319
1322
|
}
|
|
1320
1323
|
if (V = [...V, {
|
|
1321
1324
|
placement: o,
|
|
1322
1325
|
overflows: F
|
|
1323
1326
|
}], !F.every((T) => T <= 0)) {
|
|
1324
|
-
var H,
|
|
1327
|
+
var H, Y;
|
|
1325
1328
|
const T = (((H = a.flip) == null ? void 0 : H.index) || 0) + 1, O = _[T];
|
|
1326
1329
|
if (O && (!(m === "alignment" ? C !== ze(O) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1327
1330
|
// overflows the main axis.
|
|
1328
|
-
V.every((
|
|
1331
|
+
V.every((x) => ze(x.placement) === C ? x.overflows[0] > 0 : !0)))
|
|
1329
1332
|
return {
|
|
1330
1333
|
data: {
|
|
1331
1334
|
index: T,
|
|
@@ -1335,20 +1338,20 @@ const Zl = (e) => ({
|
|
|
1335
1338
|
placement: O
|
|
1336
1339
|
}
|
|
1337
1340
|
};
|
|
1338
|
-
let R = (
|
|
1341
|
+
let R = (Y = V.filter((N) => N.overflows[0] <= 0).sort((N, x) => N.overflows[1] - x.overflows[1])[0]) == null ? void 0 : Y.placement;
|
|
1339
1342
|
if (!R)
|
|
1340
1343
|
switch (p) {
|
|
1341
1344
|
case "bestFit": {
|
|
1342
1345
|
var w;
|
|
1343
|
-
const N = (w = V.filter((
|
|
1346
|
+
const N = (w = V.filter((x) => {
|
|
1344
1347
|
if (I) {
|
|
1345
|
-
const z = ze(
|
|
1348
|
+
const z = ze(x.placement);
|
|
1346
1349
|
return z === C || // Create a bias to the `y` side axis due to horizontal
|
|
1347
1350
|
// reading directions favoring greater width.
|
|
1348
1351
|
z === "y";
|
|
1349
1352
|
}
|
|
1350
1353
|
return !0;
|
|
1351
|
-
}).map((
|
|
1354
|
+
}).map((x) => [x.placement, x.overflows.filter((z) => z > 0).reduce((z, G) => z + G, 0)]).sort((x, z) => x[1] - z[1])[0]) == null ? void 0 : w[0];
|
|
1352
1355
|
N && (R = N);
|
|
1353
1356
|
break;
|
|
1354
1357
|
}
|
|
@@ -1553,12 +1556,12 @@ const nu = function(e) {
|
|
|
1553
1556
|
...h
|
|
1554
1557
|
};
|
|
1555
1558
|
if (c) {
|
|
1556
|
-
const E = g === "y" ? "height" : "width",
|
|
1557
|
-
p <
|
|
1559
|
+
const E = g === "y" ? "height" : "width", S = a.reference[g] - a.floating[E] + y.mainAxis, A = a.reference[g] + a.reference[E] - y.mainAxis;
|
|
1560
|
+
p < S ? p = S : p > A && (p = A);
|
|
1558
1561
|
}
|
|
1559
1562
|
if (l) {
|
|
1560
1563
|
var k, C;
|
|
1561
|
-
const E = g === "y" ? "width" : "height",
|
|
1564
|
+
const E = g === "y" ? "width" : "height", S = Wa.has(Xe(o)), A = a.reference[m] - a.floating[E] + (S && ((k = s.offset) == null ? void 0 : k[m]) || 0) + (S ? 0 : y.crossAxis), I = a.reference[m] + a.reference[E] + (S ? 0 : ((C = s.offset) == null ? void 0 : C[m]) || 0) - (S ? y.crossAxis : 0);
|
|
1562
1565
|
v < A ? v = A : v > I && (v = I);
|
|
1563
1566
|
}
|
|
1564
1567
|
return {
|
|
@@ -1588,11 +1591,11 @@ const nu = function(e) {
|
|
|
1588
1591
|
} = a.floating;
|
|
1589
1592
|
let y, k;
|
|
1590
1593
|
m === "top" || m === "bottom" ? (y = m, k = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (k = m, y = g === "end" ? "top" : "bottom");
|
|
1591
|
-
const C = h - d.top - d.bottom, E = v - d.left - d.right,
|
|
1592
|
-
let _ =
|
|
1594
|
+
const C = h - d.top - d.bottom, E = v - d.left - d.right, S = tt(h - d[y], C), A = tt(v - d[k], E), I = !t.middlewareData.shift;
|
|
1595
|
+
let _ = S, P = A;
|
|
1593
1596
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = E), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = C), I && !g) {
|
|
1594
|
-
const V = Ee(d.left, 0), H = Ee(d.right, 0),
|
|
1595
|
-
p ? P = v - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (
|
|
1597
|
+
const V = Ee(d.left, 0), H = Ee(d.right, 0), Y = Ee(d.top, 0), w = Ee(d.bottom, 0);
|
|
1598
|
+
p ? P = v - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (Y !== 0 || w !== 0 ? Y + w : Ee(d.top, d.bottom));
|
|
1596
1599
|
}
|
|
1597
1600
|
await c({
|
|
1598
1601
|
...t,
|
|
@@ -1772,8 +1775,8 @@ function ft(e, t, n, r) {
|
|
|
1772
1775
|
const g = ke(a), p = r && Me(r) ? ke(r) : r;
|
|
1773
1776
|
let v = g, h = _r(v);
|
|
1774
1777
|
for (; h && r && p !== v; ) {
|
|
1775
|
-
const y = At(h), k = h.getBoundingClientRect(), C = De(h), E = k.left + (h.clientLeft + parseFloat(C.paddingLeft)) * y.x,
|
|
1776
|
-
c *= y.x, l *= y.y, d *= y.x, m *= y.y, c += E, l +=
|
|
1778
|
+
const y = At(h), k = h.getBoundingClientRect(), C = De(h), E = k.left + (h.clientLeft + parseFloat(C.paddingLeft)) * y.x, S = k.top + (h.clientTop + parseFloat(C.paddingTop)) * y.y;
|
|
1779
|
+
c *= y.x, l *= y.y, d *= y.x, m *= y.y, c += E, l += S, v = ke(h), h = _r(v);
|
|
1777
1780
|
}
|
|
1778
1781
|
}
|
|
1779
1782
|
return An({
|
|
@@ -2034,17 +2037,17 @@ function Ru(e, t) {
|
|
|
2034
2037
|
rootMargin: -v + "px " + -h + "px " + -y + "px " + -k + "px",
|
|
2035
2038
|
threshold: Ee(0, tt(1, c)) || 1
|
|
2036
2039
|
};
|
|
2037
|
-
let
|
|
2040
|
+
let S = !0;
|
|
2038
2041
|
function A(I) {
|
|
2039
2042
|
const _ = I[0].intersectionRatio;
|
|
2040
2043
|
if (_ !== c) {
|
|
2041
|
-
if (!
|
|
2044
|
+
if (!S)
|
|
2042
2045
|
return s();
|
|
2043
2046
|
_ ? s(!1, _) : r = setTimeout(() => {
|
|
2044
2047
|
s(!1, 1e-7);
|
|
2045
2048
|
}, 1e3);
|
|
2046
2049
|
}
|
|
2047
|
-
_ === 1 && !Ya(l, e.getBoundingClientRect()) && s(),
|
|
2050
|
+
_ === 1 && !Ya(l, e.getBoundingClientRect()) && s(), S = !1;
|
|
2048
2051
|
}
|
|
2049
2052
|
try {
|
|
2050
2053
|
n = new IntersectionObserver(A, {
|
|
@@ -2176,35 +2179,35 @@ function Bu(e) {
|
|
|
2176
2179
|
isPositioned: !1
|
|
2177
2180
|
}), [g, p] = f.useState(r);
|
|
2178
2181
|
Nn(g, r) || p(r);
|
|
2179
|
-
const [v, h] = f.useState(null), [y, k] = f.useState(null), C = f.useCallback((
|
|
2180
|
-
|
|
2181
|
-
}, []), E = f.useCallback((
|
|
2182
|
-
|
|
2183
|
-
}, []),
|
|
2182
|
+
const [v, h] = f.useState(null), [y, k] = f.useState(null), C = f.useCallback((x) => {
|
|
2183
|
+
x !== I.current && (I.current = x, h(x));
|
|
2184
|
+
}, []), E = f.useCallback((x) => {
|
|
2185
|
+
x !== _.current && (_.current = x, k(x));
|
|
2186
|
+
}, []), S = a || v, A = s || y, I = f.useRef(null), _ = f.useRef(null), P = f.useRef(d), F = c != null, V = fr(c), H = fr(o), Y = fr(l), w = f.useCallback(() => {
|
|
2184
2187
|
if (!I.current || !_.current)
|
|
2185
2188
|
return;
|
|
2186
|
-
const
|
|
2189
|
+
const x = {
|
|
2187
2190
|
placement: t,
|
|
2188
2191
|
strategy: n,
|
|
2189
2192
|
middleware: g
|
|
2190
2193
|
};
|
|
2191
|
-
H.current && (
|
|
2192
|
-
const
|
|
2194
|
+
H.current && (x.platform = H.current), $u(I.current, _.current, x).then((z) => {
|
|
2195
|
+
const G = {
|
|
2193
2196
|
...z,
|
|
2194
2197
|
// The floating element's position may be recomputed while it's closed
|
|
2195
2198
|
// but still mounted (such as when transitioning out). To ensure
|
|
2196
2199
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
2197
2200
|
// setting it to `true` when `open === false` (must be specified).
|
|
2198
|
-
isPositioned:
|
|
2201
|
+
isPositioned: Y.current !== !1
|
|
2199
2202
|
};
|
|
2200
|
-
T.current && !Nn(P.current,
|
|
2201
|
-
m(
|
|
2203
|
+
T.current && !Nn(P.current, G) && (P.current = G, _n.flushSync(() => {
|
|
2204
|
+
m(G);
|
|
2202
2205
|
}));
|
|
2203
2206
|
});
|
|
2204
|
-
}, [g, t, n, H,
|
|
2207
|
+
}, [g, t, n, H, Y]);
|
|
2205
2208
|
yn(() => {
|
|
2206
|
-
l === !1 && P.current.isPositioned && (P.current.isPositioned = !1, m((
|
|
2207
|
-
...
|
|
2209
|
+
l === !1 && P.current.isPositioned && (P.current.isPositioned = !1, m((x) => ({
|
|
2210
|
+
...x,
|
|
2208
2211
|
isPositioned: !1
|
|
2209
2212
|
})));
|
|
2210
2213
|
}, [l]);
|
|
@@ -2212,39 +2215,39 @@ function Bu(e) {
|
|
|
2212
2215
|
yn(() => (T.current = !0, () => {
|
|
2213
2216
|
T.current = !1;
|
|
2214
2217
|
}), []), yn(() => {
|
|
2215
|
-
if (
|
|
2218
|
+
if (S && (I.current = S), A && (_.current = A), S && A) {
|
|
2216
2219
|
if (V.current)
|
|
2217
|
-
return V.current(
|
|
2220
|
+
return V.current(S, A, w);
|
|
2218
2221
|
w();
|
|
2219
2222
|
}
|
|
2220
|
-
}, [
|
|
2223
|
+
}, [S, A, w, V, F]);
|
|
2221
2224
|
const O = f.useMemo(() => ({
|
|
2222
2225
|
reference: I,
|
|
2223
2226
|
floating: _,
|
|
2224
2227
|
setReference: C,
|
|
2225
2228
|
setFloating: E
|
|
2226
2229
|
}), [C, E]), R = f.useMemo(() => ({
|
|
2227
|
-
reference:
|
|
2230
|
+
reference: S,
|
|
2228
2231
|
floating: A
|
|
2229
|
-
}), [
|
|
2230
|
-
const
|
|
2232
|
+
}), [S, A]), N = f.useMemo(() => {
|
|
2233
|
+
const x = {
|
|
2231
2234
|
position: n,
|
|
2232
2235
|
left: 0,
|
|
2233
2236
|
top: 0
|
|
2234
2237
|
};
|
|
2235
2238
|
if (!R.floating)
|
|
2236
|
-
return
|
|
2237
|
-
const z = Xo(R.floating, d.x),
|
|
2239
|
+
return x;
|
|
2240
|
+
const z = Xo(R.floating, d.x), G = Xo(R.floating, d.y);
|
|
2238
2241
|
return i ? {
|
|
2239
|
-
...
|
|
2240
|
-
transform: "translate(" + z + "px, " +
|
|
2242
|
+
...x,
|
|
2243
|
+
transform: "translate(" + z + "px, " + G + "px)",
|
|
2241
2244
|
...qa(R.floating) >= 1.5 && {
|
|
2242
2245
|
willChange: "transform"
|
|
2243
2246
|
}
|
|
2244
2247
|
} : {
|
|
2245
2248
|
position: n,
|
|
2246
2249
|
left: z,
|
|
2247
|
-
top:
|
|
2250
|
+
top: G
|
|
2248
2251
|
};
|
|
2249
2252
|
}, [n, i, R.floating, d.x, d.y]);
|
|
2250
2253
|
return f.useMemo(() => ({
|
|
@@ -2365,7 +2368,7 @@ var Ju = Ka, ed = [
|
|
|
2365
2368
|
}, {});
|
|
2366
2369
|
function Qa(e) {
|
|
2367
2370
|
const [t, n] = f.useState(void 0);
|
|
2368
|
-
return
|
|
2371
|
+
return ve(() => {
|
|
2369
2372
|
if (e) {
|
|
2370
2373
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
2371
2374
|
const r = new ResizeObserver((o) => {
|
|
@@ -2417,12 +2420,12 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2417
2420
|
updatePositionStrategy: p = "optimized",
|
|
2418
2421
|
onPlaced: v,
|
|
2419
2422
|
...h
|
|
2420
|
-
} = e, y = Ja(oo, n), [k, C] = f.useState(null), E = ie(t, (L) => C(L)), [
|
|
2423
|
+
} = e, y = Ja(oo, n), [k, C] = f.useState(null), E = ie(t, (L) => C(L)), [S, A] = f.useState(null), I = Qa(S), _ = I?.width ?? 0, P = I?.height ?? 0, F = r + (a !== "center" ? "-" + a : ""), V = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, H = Array.isArray(l) ? l : [l], Y = H.length > 0, w = {
|
|
2421
2424
|
padding: V,
|
|
2422
2425
|
boundary: H.filter(ad),
|
|
2423
2426
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2424
|
-
altBoundary:
|
|
2425
|
-
}, { refs: T, floatingStyles: O, placement: R, isPositioned: N, middlewareData:
|
|
2427
|
+
altBoundary: Y
|
|
2428
|
+
}, { refs: T, floatingStyles: O, placement: R, isPositioned: N, middlewareData: x } = Bu({
|
|
2426
2429
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2427
2430
|
strategy: "fixed",
|
|
2428
2431
|
placement: F,
|
|
@@ -2444,21 +2447,21 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2444
2447
|
Yu({
|
|
2445
2448
|
...w,
|
|
2446
2449
|
apply: ({ elements: L, rects: te, availableWidth: ce, availableHeight: Q }) => {
|
|
2447
|
-
const { width: ne, height: oe } = te.reference,
|
|
2448
|
-
|
|
2450
|
+
const { width: ne, height: oe } = te.reference, fe = L.floating.style;
|
|
2451
|
+
fe.setProperty("--radix-popper-available-width", `${ce}px`), fe.setProperty("--radix-popper-available-height", `${Q}px`), fe.setProperty("--radix-popper-anchor-width", `${ne}px`), fe.setProperty("--radix-popper-anchor-height", `${oe}px`);
|
|
2449
2452
|
}
|
|
2450
2453
|
}),
|
|
2451
|
-
|
|
2454
|
+
S && Ku({ element: S, padding: i }),
|
|
2452
2455
|
sd({ arrowWidth: _, arrowHeight: P }),
|
|
2453
2456
|
g && qu({ strategy: "referenceHidden", ...w })
|
|
2454
2457
|
]
|
|
2455
|
-
}), [z,
|
|
2456
|
-
|
|
2458
|
+
}), [z, G] = ss(R), j = et(v);
|
|
2459
|
+
ve(() => {
|
|
2457
2460
|
N && j?.();
|
|
2458
2461
|
}, [N, j]);
|
|
2459
|
-
const
|
|
2460
|
-
return
|
|
2461
|
-
k &&
|
|
2462
|
+
const ue = x.arrow?.x, q = x.arrow?.y, ee = x.arrow?.centerOffset !== 0, [J, ge] = f.useState();
|
|
2463
|
+
return ve(() => {
|
|
2464
|
+
k && ge(window.getComputedStyle(k).zIndex);
|
|
2462
2465
|
}, [k]), /* @__PURE__ */ u(
|
|
2463
2466
|
"div",
|
|
2464
2467
|
{
|
|
@@ -2471,13 +2474,13 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2471
2474
|
minWidth: "max-content",
|
|
2472
2475
|
zIndex: J,
|
|
2473
2476
|
"--radix-popper-transform-origin": [
|
|
2474
|
-
|
|
2475
|
-
|
|
2477
|
+
x.transformOrigin?.x,
|
|
2478
|
+
x.transformOrigin?.y
|
|
2476
2479
|
].join(" "),
|
|
2477
2480
|
// hide the content if using the hide middleware and should be hidden
|
|
2478
2481
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2479
2482
|
// as if the PopperContent isn't there at all
|
|
2480
|
-
...
|
|
2483
|
+
...x.hide?.referenceHidden && {
|
|
2481
2484
|
visibility: "hidden",
|
|
2482
2485
|
pointerEvents: "none"
|
|
2483
2486
|
}
|
|
@@ -2489,14 +2492,14 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2489
2492
|
scope: n,
|
|
2490
2493
|
placedSide: z,
|
|
2491
2494
|
onArrowChange: A,
|
|
2492
|
-
arrowX:
|
|
2495
|
+
arrowX: ue,
|
|
2493
2496
|
arrowY: q,
|
|
2494
2497
|
shouldHideArrow: ee,
|
|
2495
2498
|
children: /* @__PURE__ */ u(
|
|
2496
2499
|
Xa.div,
|
|
2497
2500
|
{
|
|
2498
2501
|
"data-side": z,
|
|
2499
|
-
"data-align":
|
|
2502
|
+
"data-align": G,
|
|
2500
2503
|
...h,
|
|
2501
2504
|
ref: E,
|
|
2502
2505
|
style: {
|
|
@@ -2607,7 +2610,7 @@ var is = es, ao = ns, cs = rs, ls = as, id = [
|
|
|
2607
2610
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2608
2611
|
}, {}), ld = "Portal", so = f.forwardRef((e, t) => {
|
|
2609
2612
|
const { container: n, ...r } = e, [o, a] = f.useState(!1);
|
|
2610
|
-
|
|
2613
|
+
ve(() => a(!0), []);
|
|
2611
2614
|
const s = n || o && globalThis?.document?.body;
|
|
2612
2615
|
return s ? sc.createPortal(/* @__PURE__ */ u(cd.div, { ...r, ref: t }), s) : null;
|
|
2613
2616
|
});
|
|
@@ -2636,7 +2639,7 @@ var ud = [
|
|
|
2636
2639
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
2637
2640
|
});
|
|
2638
2641
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2639
|
-
}, {}), dd = f[" useInsertionEffect ".trim().toString()] ||
|
|
2642
|
+
}, {}), dd = f[" useInsertionEffect ".trim().toString()] || ve;
|
|
2640
2643
|
function Xt({
|
|
2641
2644
|
prop: e,
|
|
2642
2645
|
defaultProp: t,
|
|
@@ -2931,7 +2934,7 @@ var gs = Pd(), hr = function() {
|
|
|
2931
2934
|
onScrollCapture: hr,
|
|
2932
2935
|
onWheelCapture: hr,
|
|
2933
2936
|
onTouchMoveCapture: hr
|
|
2934
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative, v = e.noIsolation, h = e.inert, y = e.allowPinchZoom, k = e.as, C = k === void 0 ? "div" : k, E = e.gapMode,
|
|
2937
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative, v = e.noIsolation, h = e.inert, y = e.allowPinchZoom, k = e.as, C = k === void 0 ? "div" : k, E = e.gapMode, S = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = g, I = Ad([n, t]), _ = We(We({}, S), o);
|
|
2935
2938
|
return f.createElement(
|
|
2936
2939
|
f.Fragment,
|
|
2937
2940
|
null,
|
|
@@ -3182,7 +3185,7 @@ function ef(e) {
|
|
|
3182
3185
|
var i = f.useCallback(function(h, y) {
|
|
3183
3186
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
3184
3187
|
return !s.current.allowPinchZoom;
|
|
3185
|
-
var k = mn(h), C = n.current, E = "deltaX" in h ? h.deltaX : C[0] - k[0],
|
|
3188
|
+
var k = mn(h), C = n.current, E = "deltaX" in h ? h.deltaX : C[0] - k[0], S = "deltaY" in h ? h.deltaY : C[1] - k[1], A, I = h.target, _ = Math.abs(E) > Math.abs(S) ? "h" : "v";
|
|
3186
3189
|
if ("touches" in h && _ === "h" && I.type === "range")
|
|
3187
3190
|
return !1;
|
|
3188
3191
|
var P = Jo(_, I);
|
|
@@ -3190,10 +3193,10 @@ function ef(e) {
|
|
|
3190
3193
|
return !0;
|
|
3191
3194
|
if (P ? A = _ : (A = _ === "v" ? "h" : "v", P = Jo(_, I)), !P)
|
|
3192
3195
|
return !1;
|
|
3193
|
-
if (!r.current && "changedTouches" in h && (E ||
|
|
3196
|
+
if (!r.current && "changedTouches" in h && (E || S) && (r.current = A), !A)
|
|
3194
3197
|
return !0;
|
|
3195
3198
|
var F = r.current || A;
|
|
3196
|
-
return Xd(F, y, h, F === "h" ? E :
|
|
3199
|
+
return Xd(F, y, h, F === "h" ? E : S);
|
|
3197
3200
|
}, []), c = f.useCallback(function(h) {
|
|
3198
3201
|
var y = h;
|
|
3199
3202
|
if (!(!Ct.length || Ct[Ct.length - 1] !== a)) {
|
|
@@ -3207,15 +3210,15 @@ function ef(e) {
|
|
|
3207
3210
|
if (!C) {
|
|
3208
3211
|
var E = (s.current.shards || []).map(ta).filter(Boolean).filter(function(A) {
|
|
3209
3212
|
return A.contains(y.target);
|
|
3210
|
-
}),
|
|
3211
|
-
|
|
3213
|
+
}), S = E.length > 0 ? i(y, E[0]) : !s.current.noIsolation;
|
|
3214
|
+
S && y.cancelable && y.preventDefault();
|
|
3212
3215
|
}
|
|
3213
3216
|
}
|
|
3214
3217
|
}, []), l = f.useCallback(function(h, y, k, C) {
|
|
3215
3218
|
var E = { name: h, delta: y, target: k, should: C, shadowParent: tf(k) };
|
|
3216
3219
|
t.current.push(E), setTimeout(function() {
|
|
3217
|
-
t.current = t.current.filter(function(
|
|
3218
|
-
return
|
|
3220
|
+
t.current = t.current.filter(function(S) {
|
|
3221
|
+
return S !== E;
|
|
3219
3222
|
});
|
|
3220
3223
|
}, 1);
|
|
3221
3224
|
}, []), d = f.useCallback(function(h) {
|
|
@@ -3273,7 +3276,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3273
3276
|
disabled: g,
|
|
3274
3277
|
required: p,
|
|
3275
3278
|
form: v
|
|
3276
|
-
} = e, h = Hn(t), [y, k] = f.useState(null), [C, E] = f.useState(null), [
|
|
3279
|
+
} = e, h = Hn(t), [y, k] = f.useState(null), [C, E] = f.useState(null), [S, A] = f.useState(!1), I = qr(l), [_, P] = Xt({
|
|
3277
3280
|
prop: r,
|
|
3278
3281
|
defaultProp: o ?? !1,
|
|
3279
3282
|
onChange: a,
|
|
@@ -3283,7 +3286,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3283
3286
|
defaultProp: i,
|
|
3284
3287
|
onChange: c,
|
|
3285
3288
|
caller: mt
|
|
3286
|
-
}), H = f.useRef(null),
|
|
3289
|
+
}), H = f.useRef(null), Y = y ? v || !!y.closest("form") : !0, [w, T] = f.useState(/* @__PURE__ */ new Set()), O = Array.from(w).map((R) => R.props.value).join(";");
|
|
3287
3290
|
return /* @__PURE__ */ u(is, { ...h, children: /* @__PURE__ */ D(
|
|
3288
3291
|
sf,
|
|
3289
3292
|
{
|
|
@@ -3293,7 +3296,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3293
3296
|
onTriggerChange: k,
|
|
3294
3297
|
valueNode: C,
|
|
3295
3298
|
onValueNodeChange: E,
|
|
3296
|
-
valueNodeHasChildren:
|
|
3299
|
+
valueNodeHasChildren: S,
|
|
3297
3300
|
onValueNodeHasChildrenChange: A,
|
|
3298
3301
|
contentId: Zt(),
|
|
3299
3302
|
value: F,
|
|
@@ -3313,14 +3316,14 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3313
3316
|
}, []),
|
|
3314
3317
|
onNativeOptionRemove: f.useCallback((R) => {
|
|
3315
3318
|
T((N) => {
|
|
3316
|
-
const
|
|
3317
|
-
return
|
|
3319
|
+
const x = new Set(N);
|
|
3320
|
+
return x.delete(R), x;
|
|
3318
3321
|
});
|
|
3319
3322
|
}, []),
|
|
3320
3323
|
children: n
|
|
3321
3324
|
}
|
|
3322
3325
|
) }),
|
|
3323
|
-
|
|
3326
|
+
Y ? /* @__PURE__ */ D(
|
|
3324
3327
|
Vs,
|
|
3325
3328
|
{
|
|
3326
3329
|
"aria-hidden": !0,
|
|
@@ -3391,7 +3394,7 @@ Cs.displayName = Ss;
|
|
|
3391
3394
|
var Es = "SelectValue", ks = f.forwardRef(
|
|
3392
3395
|
(e, t) => {
|
|
3393
3396
|
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: s = "", ...i } = e, c = ot(Es, n), { onValueNodeHasChildrenChange: l } = c, d = a !== void 0, m = ie(t, c.onValueNodeChange);
|
|
3394
|
-
return
|
|
3397
|
+
return ve(() => {
|
|
3395
3398
|
l(d);
|
|
3396
3399
|
}, [l, d]), /* @__PURE__ */ u(
|
|
3397
3400
|
Ae.span,
|
|
@@ -3417,7 +3420,7 @@ Ns.displayName = df;
|
|
|
3417
3420
|
var pt = "SelectContent", Ts = f.forwardRef(
|
|
3418
3421
|
(e, t) => {
|
|
3419
3422
|
const n = ot(pt, e.__scopeSelect), [r, o] = f.useState();
|
|
3420
|
-
if (
|
|
3423
|
+
if (ve(() => {
|
|
3421
3424
|
o(new DocumentFragment());
|
|
3422
3425
|
}, []), !n.open) {
|
|
3423
3426
|
const a = r;
|
|
@@ -3452,19 +3455,19 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3452
3455
|
avoidCollisions: y,
|
|
3453
3456
|
//
|
|
3454
3457
|
...k
|
|
3455
|
-
} = e, C = ot(pt, n), [E,
|
|
3458
|
+
} = e, C = ot(pt, n), [E, S] = f.useState(null), [A, I] = f.useState(null), _ = ie(t, (L) => S(L)), [P, F] = f.useState(null), [V, H] = f.useState(
|
|
3456
3459
|
null
|
|
3457
|
-
),
|
|
3460
|
+
), Y = Bn(n), [w, T] = f.useState(!1), O = f.useRef(!1);
|
|
3458
3461
|
f.useEffect(() => {
|
|
3459
3462
|
if (E) return ms(E);
|
|
3460
3463
|
}, [E]), La();
|
|
3461
3464
|
const R = f.useCallback(
|
|
3462
3465
|
(L) => {
|
|
3463
|
-
const [te, ...ce] =
|
|
3466
|
+
const [te, ...ce] = Y().map((oe) => oe.ref.current), [Q] = ce.slice(-1), ne = document.activeElement;
|
|
3464
3467
|
for (const oe of L)
|
|
3465
3468
|
if (oe === ne || (oe?.scrollIntoView({ block: "nearest" }), oe === te && A && (A.scrollTop = 0), oe === Q && A && (A.scrollTop = A.scrollHeight), oe?.focus(), document.activeElement !== ne)) return;
|
|
3466
3469
|
},
|
|
3467
|
-
[
|
|
3470
|
+
[Y, A]
|
|
3468
3471
|
), N = f.useCallback(
|
|
3469
3472
|
() => R([P, E]),
|
|
3470
3473
|
[R, P, E]
|
|
@@ -3472,7 +3475,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3472
3475
|
f.useEffect(() => {
|
|
3473
3476
|
w && N();
|
|
3474
3477
|
}, [w, N]);
|
|
3475
|
-
const { onOpenChange:
|
|
3478
|
+
const { onOpenChange: x, triggerPointerDownPosRef: z } = C;
|
|
3476
3479
|
f.useEffect(() => {
|
|
3477
3480
|
if (E) {
|
|
3478
3481
|
let L = { x: 0, y: 0 };
|
|
@@ -3482,22 +3485,22 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3482
3485
|
y: Math.abs(Math.round(Q.pageY) - (z.current?.y ?? 0))
|
|
3483
3486
|
};
|
|
3484
3487
|
}, ce = (Q) => {
|
|
3485
|
-
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : E.contains(Q.target) ||
|
|
3488
|
+
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : E.contains(Q.target) || x(!1), document.removeEventListener("pointermove", te), z.current = null;
|
|
3486
3489
|
};
|
|
3487
3490
|
return z.current !== null && (document.addEventListener("pointermove", te), document.addEventListener("pointerup", ce, { capture: !0, once: !0 })), () => {
|
|
3488
3491
|
document.removeEventListener("pointermove", te), document.removeEventListener("pointerup", ce, { capture: !0 });
|
|
3489
3492
|
};
|
|
3490
3493
|
}
|
|
3491
|
-
}, [E,
|
|
3492
|
-
const L = () =>
|
|
3494
|
+
}, [E, x, z]), f.useEffect(() => {
|
|
3495
|
+
const L = () => x(!1);
|
|
3493
3496
|
return window.addEventListener("blur", L), window.addEventListener("resize", L), () => {
|
|
3494
3497
|
window.removeEventListener("blur", L), window.removeEventListener("resize", L);
|
|
3495
3498
|
};
|
|
3496
|
-
}, [
|
|
3497
|
-
const [
|
|
3498
|
-
const te =
|
|
3499
|
+
}, [x]);
|
|
3500
|
+
const [G, j] = Ys((L) => {
|
|
3501
|
+
const te = Y().filter((ne) => !ne.disabled), ce = te.find((ne) => ne.ref.current === document.activeElement), Q = qs(te, L, ce);
|
|
3499
3502
|
Q && setTimeout(() => Q.ref.current.focus());
|
|
3500
|
-
}),
|
|
3503
|
+
}), ue = f.useCallback(
|
|
3501
3504
|
(L, te, ce) => {
|
|
3502
3505
|
const Q = !O.current && !ce;
|
|
3503
3506
|
(C.value !== void 0 && C.value === te || Q) && (F(L), Q && (O.current = !0));
|
|
@@ -3509,7 +3512,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3509
3512
|
(C.value !== void 0 && C.value === te || Q) && H(L);
|
|
3510
3513
|
},
|
|
3511
3514
|
[C.value]
|
|
3512
|
-
), J = r === "popper" ? Dr : Os,
|
|
3515
|
+
), J = r === "popper" ? Dr : Os, ge = J === Dr ? {
|
|
3513
3516
|
side: i,
|
|
3514
3517
|
sideOffset: c,
|
|
3515
3518
|
align: l,
|
|
@@ -3528,7 +3531,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3528
3531
|
content: E,
|
|
3529
3532
|
viewport: A,
|
|
3530
3533
|
onViewportChange: I,
|
|
3531
|
-
itemRefCallback:
|
|
3534
|
+
itemRefCallback: ue,
|
|
3532
3535
|
selectedItem: P,
|
|
3533
3536
|
onItemLeave: q,
|
|
3534
3537
|
itemTextRefCallback: ee,
|
|
@@ -3536,7 +3539,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3536
3539
|
selectedItemText: V,
|
|
3537
3540
|
position: r,
|
|
3538
3541
|
isPositioned: w,
|
|
3539
|
-
searchRef:
|
|
3542
|
+
searchRef: G,
|
|
3540
3543
|
children: /* @__PURE__ */ u(io, { as: mf, allowPinchZoom: !0, children: /* @__PURE__ */ u(
|
|
3541
3544
|
Xr,
|
|
3542
3545
|
{
|
|
@@ -3566,7 +3569,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3566
3569
|
dir: C.dir,
|
|
3567
3570
|
onContextMenu: (L) => L.preventDefault(),
|
|
3568
3571
|
...k,
|
|
3569
|
-
...
|
|
3572
|
+
...ge,
|
|
3570
3573
|
onPlaced: () => T(!0),
|
|
3571
3574
|
ref: _,
|
|
3572
3575
|
style: {
|
|
@@ -3580,7 +3583,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3580
3583
|
onKeyDown: Z(k.onKeyDown, (L) => {
|
|
3581
3584
|
const te = L.ctrlKey || L.altKey || L.metaKey;
|
|
3582
3585
|
if (L.key === "Tab" && L.preventDefault(), !te && L.key.length === 1 && j(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
|
|
3583
|
-
let Q =
|
|
3586
|
+
let Q = Y().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
|
|
3584
3587
|
if (["ArrowUp", "End"].includes(L.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(L.key)) {
|
|
3585
3588
|
const ne = L.target, oe = Q.indexOf(ne);
|
|
3586
3589
|
Q = Q.slice(oe + 1);
|
|
@@ -3604,7 +3607,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3604
3607
|
if (a.trigger && a.valueNode && i && l && h && y && k) {
|
|
3605
3608
|
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), F = a.valueNode.getBoundingClientRect(), V = k.getBoundingClientRect();
|
|
3606
3609
|
if (a.dir !== "rtl") {
|
|
3607
|
-
const ne = V.left - P.left, oe = F.left - ne,
|
|
3610
|
+
const ne = V.left - P.left, oe = F.left - ne, fe = _.left - oe, Ne = _.width + fe, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3608
3611
|
Oe,
|
|
3609
3612
|
// Prevents the content from going off the starting edge of the
|
|
3610
3613
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -3615,33 +3618,33 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3615
3618
|
]);
|
|
3616
3619
|
i.style.minWidth = Ne + "px", i.style.left = ct + "px";
|
|
3617
3620
|
} else {
|
|
3618
|
-
const ne = P.right - V.right, oe = window.innerWidth - F.right - ne,
|
|
3621
|
+
const ne = P.right - V.right, oe = window.innerWidth - F.right - ne, fe = window.innerWidth - _.right - oe, Ne = _.width + fe, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3619
3622
|
Oe,
|
|
3620
3623
|
Math.max(Oe, it - Re)
|
|
3621
3624
|
]);
|
|
3622
3625
|
i.style.minWidth = Ne + "px", i.style.right = ct + "px";
|
|
3623
3626
|
}
|
|
3624
|
-
const H = g(),
|
|
3627
|
+
const H = g(), Y = window.innerHeight - Oe * 2, w = h.scrollHeight, T = window.getComputedStyle(l), O = parseInt(T.borderTopWidth, 10), R = parseInt(T.paddingTop, 10), N = parseInt(T.borderBottomWidth, 10), x = parseInt(T.paddingBottom, 10), z = O + R + w + x + N, G = Math.min(y.offsetHeight * 5, z), j = window.getComputedStyle(h), ue = parseInt(j.paddingTop, 10), q = parseInt(j.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = Y - ee, ge = y.offsetHeight / 2, L = y.offsetTop + ge, te = O + R + L, ce = z - te;
|
|
3625
3628
|
if (te <= ee) {
|
|
3626
3629
|
const ne = H.length > 0 && y === H[H.length - 1].ref.current;
|
|
3627
3630
|
i.style.bottom = "0px";
|
|
3628
|
-
const oe = l.clientHeight - h.offsetTop - h.offsetHeight,
|
|
3631
|
+
const oe = l.clientHeight - h.offsetTop - h.offsetHeight, fe = Math.max(
|
|
3629
3632
|
J,
|
|
3630
|
-
|
|
3633
|
+
ge + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
3631
3634
|
(ne ? q : 0) + oe + N
|
|
3632
|
-
), Ne = te +
|
|
3635
|
+
), Ne = te + fe;
|
|
3633
3636
|
i.style.height = Ne + "px";
|
|
3634
3637
|
} else {
|
|
3635
3638
|
const ne = H.length > 0 && y === H[0].ref.current;
|
|
3636
3639
|
i.style.top = "0px";
|
|
3637
|
-
const
|
|
3640
|
+
const fe = Math.max(
|
|
3638
3641
|
ee,
|
|
3639
3642
|
O + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
3640
|
-
(ne ?
|
|
3643
|
+
(ne ? ue : 0) + ge
|
|
3641
3644
|
) + ce;
|
|
3642
|
-
i.style.height =
|
|
3645
|
+
i.style.height = fe + "px", h.scrollTop = te - ee + h.offsetTop;
|
|
3643
3646
|
}
|
|
3644
|
-
i.style.margin = `${Oe}px 0`, i.style.minHeight =
|
|
3647
|
+
i.style.margin = `${Oe}px 0`, i.style.minHeight = G + "px", i.style.maxHeight = Y + "px", r?.(), requestAnimationFrame(() => p.current = !0);
|
|
3645
3648
|
}
|
|
3646
3649
|
}, [
|
|
3647
3650
|
g,
|
|
@@ -3655,9 +3658,9 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3655
3658
|
a.dir,
|
|
3656
3659
|
r
|
|
3657
3660
|
]);
|
|
3658
|
-
|
|
3659
|
-
const [
|
|
3660
|
-
|
|
3661
|
+
ve(() => E(), [E]);
|
|
3662
|
+
const [S, A] = f.useState();
|
|
3663
|
+
ve(() => {
|
|
3661
3664
|
l && A(window.getComputedStyle(l).zIndex);
|
|
3662
3665
|
}, [l]);
|
|
3663
3666
|
const I = f.useCallback(
|
|
@@ -3681,7 +3684,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3681
3684
|
display: "flex",
|
|
3682
3685
|
flexDirection: "column",
|
|
3683
3686
|
position: "fixed",
|
|
3684
|
-
zIndex:
|
|
3687
|
+
zIndex: S
|
|
3685
3688
|
},
|
|
3686
3689
|
children: /* @__PURE__ */ u(
|
|
3687
3690
|
Ae.div,
|
|
@@ -3773,8 +3776,8 @@ var [gf, co] = Mt(pt, {}), Ir = "SelectViewport", _s = f.forwardRef(
|
|
|
3773
3776
|
if (p > 0) {
|
|
3774
3777
|
const v = window.innerHeight - Oe * 2, h = parseFloat(m.style.minHeight), y = parseFloat(m.style.height), k = Math.max(h, y);
|
|
3775
3778
|
if (k < v) {
|
|
3776
|
-
const C = k + p, E = Math.min(v, C),
|
|
3777
|
-
m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop =
|
|
3779
|
+
const C = k + p, E = Math.min(v, C), S = C - E;
|
|
3780
|
+
m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop = S > 0 ? S : 0, m.style.justifyContent = "flex-end");
|
|
3778
3781
|
}
|
|
3779
3782
|
}
|
|
3780
3783
|
}
|
|
@@ -3889,7 +3892,7 @@ var Gt = "SelectItemText", Ws = f.forwardRef(
|
|
|
3889
3892
|
() => /* @__PURE__ */ u("option", { value: c.value, disabled: c.disabled, children: p }, c.value),
|
|
3890
3893
|
[c.disabled, c.value, p]
|
|
3891
3894
|
), { onNativeOptionAdd: h, onNativeOptionRemove: y } = l;
|
|
3892
|
-
return
|
|
3895
|
+
return ve(() => (h(v), () => y(v)), [h, y, v]), /* @__PURE__ */ D(Rt, { children: [
|
|
3893
3896
|
/* @__PURE__ */ u(Ae.span, { id: c.textId, ...a, ref: g }),
|
|
3894
3897
|
c.isSelected && s.valueNode && !s.valueNodeHasChildren ? _n.createPortal(a.children, s.valueNode) : null
|
|
3895
3898
|
] });
|
|
@@ -3905,7 +3908,7 @@ var zs = "SelectItemIndicator", wf = f.forwardRef(
|
|
|
3905
3908
|
wf.displayName = zs;
|
|
3906
3909
|
var Lr = "SelectScrollUpButton", Bs = f.forwardRef((e, t) => {
|
|
3907
3910
|
const n = at(Lr, e.__scopeSelect), r = co(Lr, e.__scopeSelect), [o, a] = f.useState(!1), s = ie(t, r.onScrollButtonChange);
|
|
3908
|
-
return
|
|
3911
|
+
return ve(() => {
|
|
3909
3912
|
if (n.viewport && n.isPositioned) {
|
|
3910
3913
|
let i = function() {
|
|
3911
3914
|
const l = c.scrollTop > 0;
|
|
@@ -3929,7 +3932,7 @@ var Lr = "SelectScrollUpButton", Bs = f.forwardRef((e, t) => {
|
|
|
3929
3932
|
Bs.displayName = Lr;
|
|
3930
3933
|
var Fr = "SelectScrollDownButton", xf = f.forwardRef((e, t) => {
|
|
3931
3934
|
const n = at(Fr, e.__scopeSelect), r = co(Fr, e.__scopeSelect), [o, a] = f.useState(!1), s = ie(t, r.onScrollButtonChange);
|
|
3932
|
-
return
|
|
3935
|
+
return ve(() => {
|
|
3933
3936
|
if (n.viewport && n.isPositioned) {
|
|
3934
3937
|
let i = function() {
|
|
3935
3938
|
const l = c.scrollHeight - c.clientHeight, d = Math.ceil(c.scrollTop) < l;
|
|
@@ -3955,7 +3958,7 @@ var Hs = f.forwardRef((e, t) => {
|
|
|
3955
3958
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, a = at("SelectScrollButton", n), s = f.useRef(null), i = Bn(n), c = f.useCallback(() => {
|
|
3956
3959
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
3957
3960
|
}, []);
|
|
3958
|
-
return f.useEffect(() => () => c(), [c]),
|
|
3961
|
+
return f.useEffect(() => () => c(), [c]), ve(() => {
|
|
3959
3962
|
i().find((d) => d.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
3960
3963
|
}, [i]), /* @__PURE__ */ u(
|
|
3961
3964
|
Ae.div,
|
|
@@ -4434,7 +4437,7 @@ function Zs() {
|
|
|
4434
4437
|
const U = n.createElement("template");
|
|
4435
4438
|
U.content && U.content.ownerDocument && (n = U.content.ownerDocument);
|
|
4436
4439
|
}
|
|
4437
|
-
let
|
|
4440
|
+
let S, A = "";
|
|
4438
4441
|
const {
|
|
4439
4442
|
implementation: I,
|
|
4440
4443
|
createNodeIterator: _,
|
|
@@ -4446,19 +4449,19 @@ function Zs() {
|
|
|
4446
4449
|
let H = da();
|
|
4447
4450
|
t.isSupported = typeof Ks == "function" && typeof E == "function" && I && I.createHTMLDocument !== void 0;
|
|
4448
4451
|
const {
|
|
4449
|
-
MUSTACHE_EXPR:
|
|
4452
|
+
MUSTACHE_EXPR: Y,
|
|
4450
4453
|
ERB_EXPR: w,
|
|
4451
4454
|
TMPLIT_EXPR: T,
|
|
4452
4455
|
DATA_ATTR: O,
|
|
4453
4456
|
ARIA_ATTR: R,
|
|
4454
4457
|
IS_SCRIPT_OR_DATA: N,
|
|
4455
|
-
ATTR_WHITESPACE:
|
|
4458
|
+
ATTR_WHITESPACE: x,
|
|
4456
4459
|
CUSTOM_ELEMENT: z
|
|
4457
4460
|
} = ua;
|
|
4458
4461
|
let {
|
|
4459
|
-
IS_ALLOWED_URI:
|
|
4462
|
+
IS_ALLOWED_URI: G
|
|
4460
4463
|
} = ua, j = null;
|
|
4461
|
-
const
|
|
4464
|
+
const ue = X({}, [...sa, ...yr, ...wr, ...xr, ...ia]);
|
|
4462
4465
|
let q = null;
|
|
4463
4466
|
const ee = X({}, [...ca, ...Sr, ...la, ...hn]);
|
|
4464
4467
|
let J = Object.seal(Wr(null, {
|
|
@@ -4480,7 +4483,7 @@ function Zs() {
|
|
|
4480
4483
|
enumerable: !0,
|
|
4481
4484
|
value: !1
|
|
4482
4485
|
}
|
|
4483
|
-
})),
|
|
4486
|
+
})), ge = null, L = null;
|
|
4484
4487
|
const te = Object.seal(Wr(null, {
|
|
4485
4488
|
tagCheck: {
|
|
4486
4489
|
writable: !0,
|
|
@@ -4495,7 +4498,7 @@ function Zs() {
|
|
|
4495
4498
|
value: null
|
|
4496
4499
|
}
|
|
4497
4500
|
}));
|
|
4498
|
-
let ce = !0, Q = !0, ne = !1, oe = !0,
|
|
4501
|
+
let ce = !0, Q = !0, ne = !1, oe = !0, fe = !1, Ne = !0, Re = !1, it = !1, ct = !1, gt = !1, nn = !1, rn = !1, mo = !0, po = !1;
|
|
4499
4502
|
const Ki = "user-content-";
|
|
4500
4503
|
let Zn = !0, Lt = !1, bt = {}, Le = null;
|
|
4501
4504
|
const Jn = X({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
@@ -4509,21 +4512,21 @@ function Zs() {
|
|
|
4509
4512
|
const Qi = X({}, ["title", "style", "font", "a", "script"]);
|
|
4510
4513
|
let Ft = null;
|
|
4511
4514
|
const Zi = ["application/xhtml+xml", "text/html"], Ji = "text/html";
|
|
4512
|
-
let
|
|
4515
|
+
let me = null, yt = null;
|
|
4513
4516
|
const ec = n.createElement("form"), vo = function(b) {
|
|
4514
4517
|
return b instanceof RegExp || b instanceof Function;
|
|
4515
4518
|
}, rr = function() {
|
|
4516
4519
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4517
4520
|
if (!(yt && yt === b)) {
|
|
4518
4521
|
if ((!b || typeof b != "object") && (b = {}), b = $e(b), Ft = // eslint-disable-next-line unicorn/prefer-includes
|
|
4519
|
-
Zi.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Ji : b.PARSER_MEDIA_TYPE,
|
|
4522
|
+
Zi.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Ji : b.PARSER_MEDIA_TYPE, me = Ft === "application/xhtml+xml" ? br : Sn, j = _e(b, "ALLOWED_TAGS") ? X({}, b.ALLOWED_TAGS, me) : ue, q = _e(b, "ALLOWED_ATTR") ? X({}, b.ALLOWED_ATTR, me) : ee, nr = _e(b, "ALLOWED_NAMESPACES") ? X({}, b.ALLOWED_NAMESPACES, br) : Xi, er = _e(b, "ADD_URI_SAFE_ATTR") ? X($e(bo), b.ADD_URI_SAFE_ATTR, me) : bo, ho = _e(b, "ADD_DATA_URI_TAGS") ? X($e(go), b.ADD_DATA_URI_TAGS, me) : go, Le = _e(b, "FORBID_CONTENTS") ? X({}, b.FORBID_CONTENTS, me) : Jn, ge = _e(b, "FORBID_TAGS") ? X({}, b.FORBID_TAGS, me) : $e({}), L = _e(b, "FORBID_ATTR") ? X({}, b.FORBID_ATTR, me) : $e({}), bt = _e(b, "USE_PROFILES") ? b.USE_PROFILES : !1, ce = b.ALLOW_ARIA_ATTR !== !1, Q = b.ALLOW_DATA_ATTR !== !1, ne = b.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, fe = b.SAFE_FOR_TEMPLATES || !1, Ne = b.SAFE_FOR_XML !== !1, Re = b.WHOLE_DOCUMENT || !1, gt = b.RETURN_DOM || !1, nn = b.RETURN_DOM_FRAGMENT || !1, rn = b.RETURN_TRUSTED_TYPE || !1, ct = b.FORCE_BODY || !1, mo = b.SANITIZE_DOM !== !1, po = b.SANITIZE_NAMED_PROPS || !1, Zn = b.KEEP_CONTENT !== !1, Lt = b.IN_PLACE || !1, G = b.ALLOWED_URI_REGEXP || Xs, vt = b.NAMESPACE || je, sn = b.MATHML_TEXT_INTEGRATION_POINTS || sn, cn = b.HTML_INTEGRATION_POINTS || cn, J = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (J.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (J.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), fe && (Q = !1), nn && (gt = !0), bt && (j = X({}, ia), q = [], bt.html === !0 && (X(j, sa), X(q, ca)), bt.svg === !0 && (X(j, yr), X(q, Sr), X(q, hn)), bt.svgFilters === !0 && (X(j, wr), X(q, Sr), X(q, hn)), bt.mathMl === !0 && (X(j, xr), X(q, la), X(q, hn))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? te.tagCheck = b.ADD_TAGS : (j === ue && (j = $e(j)), X(j, b.ADD_TAGS, me))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? te.attributeCheck = b.ADD_ATTR : (q === ee && (q = $e(q)), X(q, b.ADD_ATTR, me))), b.ADD_URI_SAFE_ATTR && X(er, b.ADD_URI_SAFE_ATTR, me), b.FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.FORBID_CONTENTS, me)), b.ADD_FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.ADD_FORBID_CONTENTS, me)), Zn && (j["#text"] = !0), Re && X(j, ["html", "head", "body"]), j.table && (X(j, ["tbody"]), delete ge.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
4520
4523
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4521
4524
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4522
4525
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4523
4526
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4524
|
-
|
|
4527
|
+
S = b.TRUSTED_TYPES_POLICY, A = S.createHTML("");
|
|
4525
4528
|
} else
|
|
4526
|
-
|
|
4529
|
+
S === void 0 && (S = im(p, o)), S !== null && typeof A == "string" && (A = S.createHTML(""));
|
|
4527
4530
|
we && we(b), yt = b;
|
|
4528
4531
|
}
|
|
4529
4532
|
}, yo = X({}, [...yr, ...wr, ...Xf]), wo = X({}, [...xr, ...Qf]), tc = function(b) {
|
|
@@ -4571,11 +4574,11 @@ function Zs() {
|
|
|
4571
4574
|
if (ct)
|
|
4572
4575
|
b = "<remove></remove>" + b;
|
|
4573
4576
|
else {
|
|
4574
|
-
const
|
|
4575
|
-
B =
|
|
4577
|
+
const de = vr(b, /^[\r\n\t ]+/);
|
|
4578
|
+
B = de && de[0];
|
|
4576
4579
|
}
|
|
4577
4580
|
Ft === "application/xhtml+xml" && vt === je && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
4578
|
-
const se =
|
|
4581
|
+
const se = S ? S.createHTML(b) : b;
|
|
4579
4582
|
if (vt === je)
|
|
4580
4583
|
try {
|
|
4581
4584
|
M = new g().parseFromString(se, Ft);
|
|
@@ -4588,8 +4591,8 @@ function Zs() {
|
|
|
4588
4591
|
} catch {
|
|
4589
4592
|
}
|
|
4590
4593
|
}
|
|
4591
|
-
const
|
|
4592
|
-
return b && B &&
|
|
4594
|
+
const be = M.body || M.documentElement;
|
|
4595
|
+
return b && B && be.insertBefore(n.createTextNode(B), be.childNodes[0] || null), vt === je ? F.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : be;
|
|
4593
4596
|
}, So = function(b) {
|
|
4594
4597
|
return _.call(
|
|
4595
4598
|
b.ownerDocument || b,
|
|
@@ -4612,28 +4615,28 @@ function Zs() {
|
|
|
4612
4615
|
let M = null;
|
|
4613
4616
|
if (Ve(H.beforeSanitizeElements, b, null), or(b))
|
|
4614
4617
|
return Fe(b), !0;
|
|
4615
|
-
const B =
|
|
4618
|
+
const B = me(b.nodeName);
|
|
4616
4619
|
if (Ve(H.uponSanitizeElement, b, {
|
|
4617
4620
|
tagName: B,
|
|
4618
4621
|
allowedTags: j
|
|
4619
4622
|
}), Ne && b.hasChildNodes() && !Co(b.firstElementChild) && ye(/<[/\w!]/g, b.innerHTML) && ye(/<[/\w!]/g, b.textContent) || b.nodeType === Ht.progressingInstruction || Ne && b.nodeType === Ht.comment && ye(/<[/\w]/g, b.data))
|
|
4620
4623
|
return Fe(b), !0;
|
|
4621
|
-
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!j[B] ||
|
|
4622
|
-
if (!
|
|
4624
|
+
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!j[B] || ge[B])) {
|
|
4625
|
+
if (!ge[B] && Ao(B) && (J.tagNameCheck instanceof RegExp && ye(J.tagNameCheck, B) || J.tagNameCheck instanceof Function && J.tagNameCheck(B)))
|
|
4623
4626
|
return !1;
|
|
4624
4627
|
if (Zn && !Le[B]) {
|
|
4625
|
-
const se = E(b) || b.parentNode,
|
|
4626
|
-
if (
|
|
4627
|
-
const
|
|
4628
|
-
for (let Se =
|
|
4629
|
-
const Ge = h(
|
|
4628
|
+
const se = E(b) || b.parentNode, be = C(b) || b.childNodes;
|
|
4629
|
+
if (be && se) {
|
|
4630
|
+
const de = be.length;
|
|
4631
|
+
for (let Se = de - 1; Se >= 0; --Se) {
|
|
4632
|
+
const Ge = h(be[Se], !0);
|
|
4630
4633
|
Ge.__removalCount = (b.__removalCount || 0) + 1, se.insertBefore(Ge, k(b));
|
|
4631
4634
|
}
|
|
4632
4635
|
}
|
|
4633
4636
|
}
|
|
4634
4637
|
return Fe(b), !0;
|
|
4635
4638
|
}
|
|
4636
|
-
return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (
|
|
4639
|
+
return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (fe && b.nodeType === Ht.text && (M = b.textContent, pn([Y, w, T], (se) => {
|
|
4637
4640
|
M = Wt(M, se, " ");
|
|
4638
4641
|
}), b.textContent !== M && ($t(t.removed, {
|
|
4639
4642
|
element: b.cloneNode()
|
|
@@ -4654,9 +4657,9 @@ function Zs() {
|
|
|
4654
4657
|
M === "is" && J.allowCustomizedBuiltInElements && (J.tagNameCheck instanceof RegExp && ye(J.tagNameCheck, B) || J.tagNameCheck instanceof Function && J.tagNameCheck(B)))
|
|
4655
4658
|
) return !1;
|
|
4656
4659
|
} else if (!er[M]) {
|
|
4657
|
-
if (!ye(
|
|
4660
|
+
if (!ye(G, Wt(B, x, ""))) {
|
|
4658
4661
|
if (!((M === "src" || M === "xlink:href" || M === "href") && b !== "script" && Gf(B, "data:") === 0 && ho[b])) {
|
|
4659
|
-
if (!(ne && !ye(N, Wt(B,
|
|
4662
|
+
if (!(ne && !ye(N, Wt(B, x, "")))) {
|
|
4660
4663
|
if (B)
|
|
4661
4664
|
return !1;
|
|
4662
4665
|
}
|
|
@@ -4685,54 +4688,54 @@ function Zs() {
|
|
|
4685
4688
|
};
|
|
4686
4689
|
let se = M.length;
|
|
4687
4690
|
for (; se--; ) {
|
|
4688
|
-
const
|
|
4689
|
-
name:
|
|
4691
|
+
const be = M[se], {
|
|
4692
|
+
name: de,
|
|
4690
4693
|
namespaceURI: Se,
|
|
4691
4694
|
value: Ge
|
|
4692
|
-
} =
|
|
4693
|
-
let
|
|
4694
|
-
if (B.attrName = wt, B.attrValue =
|
|
4695
|
-
lt(
|
|
4695
|
+
} = be, wt = me(de), ar = Ge;
|
|
4696
|
+
let he = de === "value" ? ar : Yf(ar);
|
|
4697
|
+
if (B.attrName = wt, B.attrValue = he, B.keepAttr = !0, B.forceKeepAttr = void 0, Ve(H.uponSanitizeAttribute, b, B), he = B.attrValue, po && (wt === "id" || wt === "name") && (lt(de, b), he = Ki + he), Ne && ye(/((--!?|])>)|<\/(style|title|textarea)/i, he)) {
|
|
4698
|
+
lt(de, b);
|
|
4696
4699
|
continue;
|
|
4697
4700
|
}
|
|
4698
|
-
if (wt === "attributename" && vr(
|
|
4699
|
-
lt(
|
|
4701
|
+
if (wt === "attributename" && vr(he, "href")) {
|
|
4702
|
+
lt(de, b);
|
|
4700
4703
|
continue;
|
|
4701
4704
|
}
|
|
4702
4705
|
if (B.forceKeepAttr)
|
|
4703
4706
|
continue;
|
|
4704
4707
|
if (!B.keepAttr) {
|
|
4705
|
-
lt(
|
|
4708
|
+
lt(de, b);
|
|
4706
4709
|
continue;
|
|
4707
4710
|
}
|
|
4708
|
-
if (!oe && ye(/\/>/i,
|
|
4709
|
-
lt(
|
|
4711
|
+
if (!oe && ye(/\/>/i, he)) {
|
|
4712
|
+
lt(de, b);
|
|
4710
4713
|
continue;
|
|
4711
4714
|
}
|
|
4712
|
-
|
|
4713
|
-
|
|
4715
|
+
fe && pn([Y, w, T], (Po) => {
|
|
4716
|
+
he = Wt(he, Po, " ");
|
|
4714
4717
|
});
|
|
4715
|
-
const To =
|
|
4716
|
-
if (!ko(To, wt,
|
|
4717
|
-
lt(
|
|
4718
|
+
const To = me(b.nodeName);
|
|
4719
|
+
if (!ko(To, wt, he)) {
|
|
4720
|
+
lt(de, b);
|
|
4718
4721
|
continue;
|
|
4719
4722
|
}
|
|
4720
|
-
if (
|
|
4723
|
+
if (S && typeof p == "object" && typeof p.getAttributeType == "function" && !Se)
|
|
4721
4724
|
switch (p.getAttributeType(To, wt)) {
|
|
4722
4725
|
case "TrustedHTML": {
|
|
4723
|
-
|
|
4726
|
+
he = S.createHTML(he);
|
|
4724
4727
|
break;
|
|
4725
4728
|
}
|
|
4726
4729
|
case "TrustedScriptURL": {
|
|
4727
|
-
|
|
4730
|
+
he = S.createScriptURL(he);
|
|
4728
4731
|
break;
|
|
4729
4732
|
}
|
|
4730
4733
|
}
|
|
4731
|
-
if (
|
|
4734
|
+
if (he !== ar)
|
|
4732
4735
|
try {
|
|
4733
|
-
Se ? b.setAttributeNS(Se,
|
|
4736
|
+
Se ? b.setAttributeNS(Se, de, he) : b.setAttribute(de, he), or(b) ? Fe(b) : aa(t.removed);
|
|
4734
4737
|
} catch {
|
|
4735
|
-
lt(
|
|
4738
|
+
lt(de, b);
|
|
4736
4739
|
}
|
|
4737
4740
|
}
|
|
4738
4741
|
Ve(H.afterSanitizeAttributes, b, null);
|
|
@@ -4744,7 +4747,7 @@ function Zs() {
|
|
|
4744
4747
|
Ve(H.afterSanitizeShadowDOM, b, null);
|
|
4745
4748
|
};
|
|
4746
4749
|
return t.sanitize = function(U) {
|
|
4747
|
-
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, M = null, B = null, se = null,
|
|
4750
|
+
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, M = null, B = null, se = null, be = null;
|
|
4748
4751
|
if (tr = !U, tr && (U = "<!-->"), typeof U != "string" && !Co(U))
|
|
4749
4752
|
if (typeof U.toString == "function") {
|
|
4750
4753
|
if (U = U.toString(), typeof U != "string")
|
|
@@ -4755,38 +4758,38 @@ function Zs() {
|
|
|
4755
4758
|
return U;
|
|
4756
4759
|
if (it || rr(b), t.removed = [], typeof U == "string" && (Lt = !1), Lt) {
|
|
4757
4760
|
if (U.nodeName) {
|
|
4758
|
-
const Ge =
|
|
4759
|
-
if (!j[Ge] ||
|
|
4761
|
+
const Ge = me(U.nodeName);
|
|
4762
|
+
if (!j[Ge] || ge[Ge])
|
|
4760
4763
|
throw zt("root node is forbidden and cannot be sanitized in-place");
|
|
4761
4764
|
}
|
|
4762
4765
|
} else if (U instanceof i)
|
|
4763
4766
|
M = xo("<!---->"), B = M.ownerDocument.importNode(U, !0), B.nodeType === Ht.element && B.nodeName === "BODY" || B.nodeName === "HTML" ? M = B : M.appendChild(B);
|
|
4764
4767
|
else {
|
|
4765
|
-
if (!gt && !
|
|
4768
|
+
if (!gt && !fe && !Re && // eslint-disable-next-line unicorn/prefer-includes
|
|
4766
4769
|
U.indexOf("<") === -1)
|
|
4767
|
-
return
|
|
4770
|
+
return S && rn ? S.createHTML(U) : U;
|
|
4768
4771
|
if (M = xo(U), !M)
|
|
4769
4772
|
return gt ? null : rn ? A : "";
|
|
4770
4773
|
}
|
|
4771
4774
|
M && ct && Fe(M.firstChild);
|
|
4772
|
-
const
|
|
4773
|
-
for (; se =
|
|
4775
|
+
const de = So(Lt ? U : M);
|
|
4776
|
+
for (; se = de.nextNode(); )
|
|
4774
4777
|
Eo(se), No(se), se.content instanceof a && nc(se.content);
|
|
4775
4778
|
if (Lt)
|
|
4776
4779
|
return U;
|
|
4777
4780
|
if (gt) {
|
|
4778
4781
|
if (nn)
|
|
4779
|
-
for (
|
|
4780
|
-
|
|
4782
|
+
for (be = P.call(M.ownerDocument); M.firstChild; )
|
|
4783
|
+
be.appendChild(M.firstChild);
|
|
4781
4784
|
else
|
|
4782
|
-
|
|
4783
|
-
return (q.shadowroot || q.shadowrootmode) && (
|
|
4785
|
+
be = M;
|
|
4786
|
+
return (q.shadowroot || q.shadowrootmode) && (be = V.call(r, be, !0)), be;
|
|
4784
4787
|
}
|
|
4785
4788
|
let Se = Re ? M.outerHTML : M.innerHTML;
|
|
4786
4789
|
return Re && j["!doctype"] && M.ownerDocument && M.ownerDocument.doctype && M.ownerDocument.doctype.name && ye(Qs, M.ownerDocument.doctype.name) && (Se = "<!DOCTYPE " + M.ownerDocument.doctype.name + `>
|
|
4787
|
-
` + Se),
|
|
4790
|
+
` + Se), fe && pn([Y, w, T], (Ge) => {
|
|
4788
4791
|
Se = Wt(Se, Ge, " ");
|
|
4789
|
-
}),
|
|
4792
|
+
}), S && rn ? S.createHTML(Se) : Se;
|
|
4790
4793
|
}, t.setConfig = function() {
|
|
4791
4794
|
let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4792
4795
|
rr(U), it = !0;
|
|
@@ -4794,7 +4797,7 @@ function Zs() {
|
|
|
4794
4797
|
yt = null, it = !1;
|
|
4795
4798
|
}, t.isValidAttribute = function(U, b, M) {
|
|
4796
4799
|
yt || rr({});
|
|
4797
|
-
const B =
|
|
4800
|
+
const B = me(U), se = me(b);
|
|
4798
4801
|
return ko(B, se, M);
|
|
4799
4802
|
}, t.addHook = function(U, b) {
|
|
4800
4803
|
typeof b == "function" && $t(H[U], b);
|
|
@@ -5061,8 +5064,8 @@ function dm({
|
|
|
5061
5064
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
5062
5065
|
`;
|
|
5063
5066
|
if (v.length > 0) {
|
|
5064
|
-
const C = Array.isArray(t[e.name]) ? t[e.name] : [], E = (
|
|
5065
|
-
let I = A ? [...C,
|
|
5067
|
+
const C = Array.isArray(t[e.name]) ? t[e.name] : [], E = (S, A) => {
|
|
5068
|
+
let I = A ? [...C, S] : C.filter((_) => _ !== S);
|
|
5066
5069
|
n(e.name, I), r(e.name);
|
|
5067
5070
|
};
|
|
5068
5071
|
return /* @__PURE__ */ D(
|
|
@@ -5077,8 +5080,8 @@ function dm({
|
|
|
5077
5080
|
"div",
|
|
5078
5081
|
{
|
|
5079
5082
|
className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
|
|
5080
|
-
children: v.map((
|
|
5081
|
-
const A = typeof
|
|
5083
|
+
children: v.map((S) => {
|
|
5084
|
+
const A = typeof S == "object" ? S.value : S, I = typeof S == "object" ? S.label : S, _ = typeof S == "object" ? S.description : null, P = `${e.name}-${A}`, F = C.includes(A);
|
|
5082
5085
|
return /* @__PURE__ */ D(
|
|
5083
5086
|
"div",
|
|
5084
5087
|
{
|
|
@@ -6447,13 +6450,13 @@ function vp(e) {
|
|
|
6447
6450
|
return f.useEffect(() => {
|
|
6448
6451
|
const l = gn(r.current);
|
|
6449
6452
|
a.current = i === "mounted" ? l : "none";
|
|
6450
|
-
}, [i]),
|
|
6453
|
+
}, [i]), ve(() => {
|
|
6451
6454
|
const l = r.current, d = o.current;
|
|
6452
6455
|
if (d !== e) {
|
|
6453
6456
|
const g = a.current, p = gn(l);
|
|
6454
6457
|
e ? c("MOUNT") : p === "none" || l?.display === "none" ? c("UNMOUNT") : c(d && g !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
6455
6458
|
}
|
|
6456
|
-
}, [e, c]),
|
|
6459
|
+
}, [e, c]), ve(() => {
|
|
6457
6460
|
if (t) {
|
|
6458
6461
|
let l;
|
|
6459
6462
|
const d = t.ownerDocument.defaultView ?? window, m = (p) => {
|
|
@@ -6966,10 +6969,10 @@ const Lp = (e, t) => {
|
|
|
6966
6969
|
}
|
|
6967
6970
|
y = !1;
|
|
6968
6971
|
}
|
|
6969
|
-
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), E = p ? C + Ur : C,
|
|
6970
|
-
if (s.indexOf(
|
|
6972
|
+
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), E = p ? C + Ur : C, S = E + k;
|
|
6973
|
+
if (s.indexOf(S) > -1)
|
|
6971
6974
|
continue;
|
|
6972
|
-
s.push(
|
|
6975
|
+
s.push(S);
|
|
6973
6976
|
const A = o(k, y);
|
|
6974
6977
|
for (let I = 0; I < A.length; ++I) {
|
|
6975
6978
|
const _ = A[I];
|
|
@@ -7003,7 +7006,7 @@ const Lp = (e, t) => {
|
|
|
7003
7006
|
return o(c, d), d;
|
|
7004
7007
|
};
|
|
7005
7008
|
return a = s, (...c) => a(th(...c));
|
|
7006
|
-
}, rh = [],
|
|
7009
|
+
}, rh = [], pe = (e) => {
|
|
7007
7010
|
const t = (n) => n[e] || rh;
|
|
7008
7011
|
return t.isThemeGetter = !0, t;
|
|
7009
7012
|
}, wi = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, xi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, oh = /^\d+\/\d+$/, ah = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, sh = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ih = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, ch = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, lh = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, kt = (e) => oh.test(e), K = (e) => !!e && !Number.isNaN(Number(e)), Ze = (e) => !!e && Number.isInteger(Number(e)), Er = (e) => e.endsWith("%") && K(e.slice(0, -1)), Ye = (e) => ah.test(e), uh = () => !0, dh = (e) => (
|
|
@@ -7018,7 +7021,7 @@ const Lp = (e, t) => {
|
|
|
7018
7021
|
const r = xi.exec(e);
|
|
7019
7022
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
7020
7023
|
}, Ci = (e) => e === "position" || e === "percentage", Ei = (e) => e === "image" || e === "url", ki = (e) => e === "length" || e === "size" || e === "bg-size", Ai = (e) => e === "length", wh = (e) => e === "number", xh = (e) => e === "family-name", Ni = (e) => e === "shadow", Sh = () => {
|
|
7021
|
-
const e =
|
|
7024
|
+
const e = pe("color"), t = pe("font"), n = pe("text"), r = pe("font-weight"), o = pe("tracking"), a = pe("leading"), s = pe("breakpoint"), i = pe("container"), c = pe("spacing"), l = pe("radius"), d = pe("shadow"), m = pe("inset-shadow"), g = pe("text-shadow"), p = pe("drop-shadow"), v = pe("blur"), h = pe("perspective"), y = pe("aspect"), k = pe("ease"), C = pe("animate"), E = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], S = () => [
|
|
7022
7025
|
"center",
|
|
7023
7026
|
"top",
|
|
7024
7027
|
"bottom",
|
|
@@ -7036,15 +7039,15 @@ const Lp = (e, t) => {
|
|
|
7036
7039
|
"bottom-left",
|
|
7037
7040
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7038
7041
|
"left-bottom"
|
|
7039
|
-
], A = () => [...
|
|
7042
|
+
], A = () => [...S(), W, $], I = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], P = () => [W, $, c], F = () => [kt, "full", "auto", ...P()], V = () => [Ze, "none", "subgrid", W, $], H = () => ["auto", {
|
|
7040
7043
|
span: ["full", Ze, W, $]
|
|
7041
|
-
}, Ze, W, $],
|
|
7044
|
+
}, Ze, W, $], Y = () => [Ze, "auto", W, $], w = () => ["auto", "min", "max", "fr", W, $], T = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], O = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], R = () => ["auto", ...P()], N = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], x = () => [e, W, $], z = () => [...S(), Ca, Sa, {
|
|
7042
7045
|
position: [W, $]
|
|
7043
|
-
}],
|
|
7046
|
+
}], G = () => ["no-repeat", {
|
|
7044
7047
|
repeat: ["", "x", "y", "space", "round"]
|
|
7045
7048
|
}], j = () => ["auto", "cover", "contain", vh, hh, {
|
|
7046
7049
|
size: [W, $]
|
|
7047
|
-
}],
|
|
7050
|
+
}], ue = () => [Er, Vt, ut], q = () => [
|
|
7048
7051
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7049
7052
|
"",
|
|
7050
7053
|
"none",
|
|
@@ -7052,7 +7055,7 @@ const Lp = (e, t) => {
|
|
|
7052
7055
|
l,
|
|
7053
7056
|
W,
|
|
7054
7057
|
$
|
|
7055
|
-
], ee = () => ["", K, Vt, ut], J = () => ["solid", "dashed", "dotted", "double"],
|
|
7058
|
+
], ee = () => ["", K, Vt, ut], J = () => ["solid", "dashed", "dotted", "double"], ge = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], L = () => [K, Er, Ca, Sa], te = () => [
|
|
7056
7059
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7057
7060
|
"",
|
|
7058
7061
|
"none",
|
|
@@ -7378,14 +7381,14 @@ const Lp = (e, t) => {
|
|
|
7378
7381
|
* @see https://tailwindcss.com/docs/grid-column
|
|
7379
7382
|
*/
|
|
7380
7383
|
"col-start": [{
|
|
7381
|
-
"col-start":
|
|
7384
|
+
"col-start": Y()
|
|
7382
7385
|
}],
|
|
7383
7386
|
/**
|
|
7384
7387
|
* Grid Column End
|
|
7385
7388
|
* @see https://tailwindcss.com/docs/grid-column
|
|
7386
7389
|
*/
|
|
7387
7390
|
"col-end": [{
|
|
7388
|
-
"col-end":
|
|
7391
|
+
"col-end": Y()
|
|
7389
7392
|
}],
|
|
7390
7393
|
/**
|
|
7391
7394
|
* Grid Template Rows
|
|
@@ -7406,14 +7409,14 @@ const Lp = (e, t) => {
|
|
|
7406
7409
|
* @see https://tailwindcss.com/docs/grid-row
|
|
7407
7410
|
*/
|
|
7408
7411
|
"row-start": [{
|
|
7409
|
-
"row-start":
|
|
7412
|
+
"row-start": Y()
|
|
7410
7413
|
}],
|
|
7411
7414
|
/**
|
|
7412
7415
|
* Grid Row End
|
|
7413
7416
|
* @see https://tailwindcss.com/docs/grid-row
|
|
7414
7417
|
*/
|
|
7415
7418
|
"row-end": [{
|
|
7416
|
-
"row-end":
|
|
7419
|
+
"row-end": Y()
|
|
7417
7420
|
}],
|
|
7418
7421
|
/**
|
|
7419
7422
|
* Grid Auto Flow
|
|
@@ -7874,14 +7877,14 @@ const Lp = (e, t) => {
|
|
|
7874
7877
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
7875
7878
|
*/
|
|
7876
7879
|
"placeholder-color": [{
|
|
7877
|
-
placeholder:
|
|
7880
|
+
placeholder: x()
|
|
7878
7881
|
}],
|
|
7879
7882
|
/**
|
|
7880
7883
|
* Text Color
|
|
7881
7884
|
* @see https://tailwindcss.com/docs/text-color
|
|
7882
7885
|
*/
|
|
7883
7886
|
"text-color": [{
|
|
7884
|
-
text:
|
|
7887
|
+
text: x()
|
|
7885
7888
|
}],
|
|
7886
7889
|
/**
|
|
7887
7890
|
* Text Decoration
|
|
@@ -7907,7 +7910,7 @@ const Lp = (e, t) => {
|
|
|
7907
7910
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
7908
7911
|
*/
|
|
7909
7912
|
"text-decoration-color": [{
|
|
7910
|
-
decoration:
|
|
7913
|
+
decoration: x()
|
|
7911
7914
|
}],
|
|
7912
7915
|
/**
|
|
7913
7916
|
* Text Underline Offset
|
|
@@ -8018,7 +8021,7 @@ const Lp = (e, t) => {
|
|
|
8018
8021
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
8019
8022
|
*/
|
|
8020
8023
|
"bg-repeat": [{
|
|
8021
|
-
bg:
|
|
8024
|
+
bg: G()
|
|
8022
8025
|
}],
|
|
8023
8026
|
/**
|
|
8024
8027
|
* Background Size
|
|
@@ -8045,49 +8048,49 @@ const Lp = (e, t) => {
|
|
|
8045
8048
|
* @see https://tailwindcss.com/docs/background-color
|
|
8046
8049
|
*/
|
|
8047
8050
|
"bg-color": [{
|
|
8048
|
-
bg:
|
|
8051
|
+
bg: x()
|
|
8049
8052
|
}],
|
|
8050
8053
|
/**
|
|
8051
8054
|
* Gradient Color Stops From Position
|
|
8052
8055
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8053
8056
|
*/
|
|
8054
8057
|
"gradient-from-pos": [{
|
|
8055
|
-
from:
|
|
8058
|
+
from: ue()
|
|
8056
8059
|
}],
|
|
8057
8060
|
/**
|
|
8058
8061
|
* Gradient Color Stops Via Position
|
|
8059
8062
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8060
8063
|
*/
|
|
8061
8064
|
"gradient-via-pos": [{
|
|
8062
|
-
via:
|
|
8065
|
+
via: ue()
|
|
8063
8066
|
}],
|
|
8064
8067
|
/**
|
|
8065
8068
|
* Gradient Color Stops To Position
|
|
8066
8069
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8067
8070
|
*/
|
|
8068
8071
|
"gradient-to-pos": [{
|
|
8069
|
-
to:
|
|
8072
|
+
to: ue()
|
|
8070
8073
|
}],
|
|
8071
8074
|
/**
|
|
8072
8075
|
* Gradient Color Stops From
|
|
8073
8076
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8074
8077
|
*/
|
|
8075
8078
|
"gradient-from": [{
|
|
8076
|
-
from:
|
|
8079
|
+
from: x()
|
|
8077
8080
|
}],
|
|
8078
8081
|
/**
|
|
8079
8082
|
* Gradient Color Stops Via
|
|
8080
8083
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8081
8084
|
*/
|
|
8082
8085
|
"gradient-via": [{
|
|
8083
|
-
via:
|
|
8086
|
+
via: x()
|
|
8084
8087
|
}],
|
|
8085
8088
|
/**
|
|
8086
8089
|
* Gradient Color Stops To
|
|
8087
8090
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8088
8091
|
*/
|
|
8089
8092
|
"gradient-to": [{
|
|
8090
|
-
to:
|
|
8093
|
+
to: x()
|
|
8091
8094
|
}],
|
|
8092
8095
|
// ---------------
|
|
8093
8096
|
// --- Borders ---
|
|
@@ -8303,70 +8306,70 @@ const Lp = (e, t) => {
|
|
|
8303
8306
|
* @see https://tailwindcss.com/docs/border-color
|
|
8304
8307
|
*/
|
|
8305
8308
|
"border-color": [{
|
|
8306
|
-
border:
|
|
8309
|
+
border: x()
|
|
8307
8310
|
}],
|
|
8308
8311
|
/**
|
|
8309
8312
|
* Border Color X
|
|
8310
8313
|
* @see https://tailwindcss.com/docs/border-color
|
|
8311
8314
|
*/
|
|
8312
8315
|
"border-color-x": [{
|
|
8313
|
-
"border-x":
|
|
8316
|
+
"border-x": x()
|
|
8314
8317
|
}],
|
|
8315
8318
|
/**
|
|
8316
8319
|
* Border Color Y
|
|
8317
8320
|
* @see https://tailwindcss.com/docs/border-color
|
|
8318
8321
|
*/
|
|
8319
8322
|
"border-color-y": [{
|
|
8320
|
-
"border-y":
|
|
8323
|
+
"border-y": x()
|
|
8321
8324
|
}],
|
|
8322
8325
|
/**
|
|
8323
8326
|
* Border Color S
|
|
8324
8327
|
* @see https://tailwindcss.com/docs/border-color
|
|
8325
8328
|
*/
|
|
8326
8329
|
"border-color-s": [{
|
|
8327
|
-
"border-s":
|
|
8330
|
+
"border-s": x()
|
|
8328
8331
|
}],
|
|
8329
8332
|
/**
|
|
8330
8333
|
* Border Color E
|
|
8331
8334
|
* @see https://tailwindcss.com/docs/border-color
|
|
8332
8335
|
*/
|
|
8333
8336
|
"border-color-e": [{
|
|
8334
|
-
"border-e":
|
|
8337
|
+
"border-e": x()
|
|
8335
8338
|
}],
|
|
8336
8339
|
/**
|
|
8337
8340
|
* Border Color Top
|
|
8338
8341
|
* @see https://tailwindcss.com/docs/border-color
|
|
8339
8342
|
*/
|
|
8340
8343
|
"border-color-t": [{
|
|
8341
|
-
"border-t":
|
|
8344
|
+
"border-t": x()
|
|
8342
8345
|
}],
|
|
8343
8346
|
/**
|
|
8344
8347
|
* Border Color Right
|
|
8345
8348
|
* @see https://tailwindcss.com/docs/border-color
|
|
8346
8349
|
*/
|
|
8347
8350
|
"border-color-r": [{
|
|
8348
|
-
"border-r":
|
|
8351
|
+
"border-r": x()
|
|
8349
8352
|
}],
|
|
8350
8353
|
/**
|
|
8351
8354
|
* Border Color Bottom
|
|
8352
8355
|
* @see https://tailwindcss.com/docs/border-color
|
|
8353
8356
|
*/
|
|
8354
8357
|
"border-color-b": [{
|
|
8355
|
-
"border-b":
|
|
8358
|
+
"border-b": x()
|
|
8356
8359
|
}],
|
|
8357
8360
|
/**
|
|
8358
8361
|
* Border Color Left
|
|
8359
8362
|
* @see https://tailwindcss.com/docs/border-color
|
|
8360
8363
|
*/
|
|
8361
8364
|
"border-color-l": [{
|
|
8362
|
-
"border-l":
|
|
8365
|
+
"border-l": x()
|
|
8363
8366
|
}],
|
|
8364
8367
|
/**
|
|
8365
8368
|
* Divide Color
|
|
8366
8369
|
* @see https://tailwindcss.com/docs/divide-color
|
|
8367
8370
|
*/
|
|
8368
8371
|
"divide-color": [{
|
|
8369
|
-
divide:
|
|
8372
|
+
divide: x()
|
|
8370
8373
|
}],
|
|
8371
8374
|
/**
|
|
8372
8375
|
* Outline Style
|
|
@@ -8394,7 +8397,7 @@ const Lp = (e, t) => {
|
|
|
8394
8397
|
* @see https://tailwindcss.com/docs/outline-color
|
|
8395
8398
|
*/
|
|
8396
8399
|
"outline-color": [{
|
|
8397
|
-
outline:
|
|
8400
|
+
outline: x()
|
|
8398
8401
|
}],
|
|
8399
8402
|
// ---------------
|
|
8400
8403
|
// --- Effects ---
|
|
@@ -8418,7 +8421,7 @@ const Lp = (e, t) => {
|
|
|
8418
8421
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
8419
8422
|
*/
|
|
8420
8423
|
"shadow-color": [{
|
|
8421
|
-
shadow:
|
|
8424
|
+
shadow: x()
|
|
8422
8425
|
}],
|
|
8423
8426
|
/**
|
|
8424
8427
|
* Inset Box Shadow
|
|
@@ -8432,7 +8435,7 @@ const Lp = (e, t) => {
|
|
|
8432
8435
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
8433
8436
|
*/
|
|
8434
8437
|
"inset-shadow-color": [{
|
|
8435
|
-
"inset-shadow":
|
|
8438
|
+
"inset-shadow": x()
|
|
8436
8439
|
}],
|
|
8437
8440
|
/**
|
|
8438
8441
|
* Ring Width
|
|
@@ -8453,7 +8456,7 @@ const Lp = (e, t) => {
|
|
|
8453
8456
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
8454
8457
|
*/
|
|
8455
8458
|
"ring-color": [{
|
|
8456
|
-
ring:
|
|
8459
|
+
ring: x()
|
|
8457
8460
|
}],
|
|
8458
8461
|
/**
|
|
8459
8462
|
* Ring Offset Width
|
|
@@ -8471,7 +8474,7 @@ const Lp = (e, t) => {
|
|
|
8471
8474
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
8472
8475
|
*/
|
|
8473
8476
|
"ring-offset-color": [{
|
|
8474
|
-
"ring-offset":
|
|
8477
|
+
"ring-offset": x()
|
|
8475
8478
|
}],
|
|
8476
8479
|
/**
|
|
8477
8480
|
* Inset Ring Width
|
|
@@ -8485,7 +8488,7 @@ const Lp = (e, t) => {
|
|
|
8485
8488
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
8486
8489
|
*/
|
|
8487
8490
|
"inset-ring-color": [{
|
|
8488
|
-
"inset-ring":
|
|
8491
|
+
"inset-ring": x()
|
|
8489
8492
|
}],
|
|
8490
8493
|
/**
|
|
8491
8494
|
* Text Shadow
|
|
@@ -8499,7 +8502,7 @@ const Lp = (e, t) => {
|
|
|
8499
8502
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
8500
8503
|
*/
|
|
8501
8504
|
"text-shadow-color": [{
|
|
8502
|
-
"text-shadow":
|
|
8505
|
+
"text-shadow": x()
|
|
8503
8506
|
}],
|
|
8504
8507
|
/**
|
|
8505
8508
|
* Opacity
|
|
@@ -8513,14 +8516,14 @@ const Lp = (e, t) => {
|
|
|
8513
8516
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
8514
8517
|
*/
|
|
8515
8518
|
"mix-blend": [{
|
|
8516
|
-
"mix-blend": [...
|
|
8519
|
+
"mix-blend": [...ge(), "plus-darker", "plus-lighter"]
|
|
8517
8520
|
}],
|
|
8518
8521
|
/**
|
|
8519
8522
|
* Background Blend Mode
|
|
8520
8523
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
8521
8524
|
*/
|
|
8522
8525
|
"bg-blend": [{
|
|
8523
|
-
"bg-blend":
|
|
8526
|
+
"bg-blend": ge()
|
|
8524
8527
|
}],
|
|
8525
8528
|
/**
|
|
8526
8529
|
* Mask Clip
|
|
@@ -8550,10 +8553,10 @@ const Lp = (e, t) => {
|
|
|
8550
8553
|
"mask-linear-to": L()
|
|
8551
8554
|
}],
|
|
8552
8555
|
"mask-image-linear-from-color": [{
|
|
8553
|
-
"mask-linear-from":
|
|
8556
|
+
"mask-linear-from": x()
|
|
8554
8557
|
}],
|
|
8555
8558
|
"mask-image-linear-to-color": [{
|
|
8556
|
-
"mask-linear-to":
|
|
8559
|
+
"mask-linear-to": x()
|
|
8557
8560
|
}],
|
|
8558
8561
|
"mask-image-t-from-pos": [{
|
|
8559
8562
|
"mask-t-from": L()
|
|
@@ -8562,10 +8565,10 @@ const Lp = (e, t) => {
|
|
|
8562
8565
|
"mask-t-to": L()
|
|
8563
8566
|
}],
|
|
8564
8567
|
"mask-image-t-from-color": [{
|
|
8565
|
-
"mask-t-from":
|
|
8568
|
+
"mask-t-from": x()
|
|
8566
8569
|
}],
|
|
8567
8570
|
"mask-image-t-to-color": [{
|
|
8568
|
-
"mask-t-to":
|
|
8571
|
+
"mask-t-to": x()
|
|
8569
8572
|
}],
|
|
8570
8573
|
"mask-image-r-from-pos": [{
|
|
8571
8574
|
"mask-r-from": L()
|
|
@@ -8574,10 +8577,10 @@ const Lp = (e, t) => {
|
|
|
8574
8577
|
"mask-r-to": L()
|
|
8575
8578
|
}],
|
|
8576
8579
|
"mask-image-r-from-color": [{
|
|
8577
|
-
"mask-r-from":
|
|
8580
|
+
"mask-r-from": x()
|
|
8578
8581
|
}],
|
|
8579
8582
|
"mask-image-r-to-color": [{
|
|
8580
|
-
"mask-r-to":
|
|
8583
|
+
"mask-r-to": x()
|
|
8581
8584
|
}],
|
|
8582
8585
|
"mask-image-b-from-pos": [{
|
|
8583
8586
|
"mask-b-from": L()
|
|
@@ -8586,10 +8589,10 @@ const Lp = (e, t) => {
|
|
|
8586
8589
|
"mask-b-to": L()
|
|
8587
8590
|
}],
|
|
8588
8591
|
"mask-image-b-from-color": [{
|
|
8589
|
-
"mask-b-from":
|
|
8592
|
+
"mask-b-from": x()
|
|
8590
8593
|
}],
|
|
8591
8594
|
"mask-image-b-to-color": [{
|
|
8592
|
-
"mask-b-to":
|
|
8595
|
+
"mask-b-to": x()
|
|
8593
8596
|
}],
|
|
8594
8597
|
"mask-image-l-from-pos": [{
|
|
8595
8598
|
"mask-l-from": L()
|
|
@@ -8598,10 +8601,10 @@ const Lp = (e, t) => {
|
|
|
8598
8601
|
"mask-l-to": L()
|
|
8599
8602
|
}],
|
|
8600
8603
|
"mask-image-l-from-color": [{
|
|
8601
|
-
"mask-l-from":
|
|
8604
|
+
"mask-l-from": x()
|
|
8602
8605
|
}],
|
|
8603
8606
|
"mask-image-l-to-color": [{
|
|
8604
|
-
"mask-l-to":
|
|
8607
|
+
"mask-l-to": x()
|
|
8605
8608
|
}],
|
|
8606
8609
|
"mask-image-x-from-pos": [{
|
|
8607
8610
|
"mask-x-from": L()
|
|
@@ -8610,10 +8613,10 @@ const Lp = (e, t) => {
|
|
|
8610
8613
|
"mask-x-to": L()
|
|
8611
8614
|
}],
|
|
8612
8615
|
"mask-image-x-from-color": [{
|
|
8613
|
-
"mask-x-from":
|
|
8616
|
+
"mask-x-from": x()
|
|
8614
8617
|
}],
|
|
8615
8618
|
"mask-image-x-to-color": [{
|
|
8616
|
-
"mask-x-to":
|
|
8619
|
+
"mask-x-to": x()
|
|
8617
8620
|
}],
|
|
8618
8621
|
"mask-image-y-from-pos": [{
|
|
8619
8622
|
"mask-y-from": L()
|
|
@@ -8622,10 +8625,10 @@ const Lp = (e, t) => {
|
|
|
8622
8625
|
"mask-y-to": L()
|
|
8623
8626
|
}],
|
|
8624
8627
|
"mask-image-y-from-color": [{
|
|
8625
|
-
"mask-y-from":
|
|
8628
|
+
"mask-y-from": x()
|
|
8626
8629
|
}],
|
|
8627
8630
|
"mask-image-y-to-color": [{
|
|
8628
|
-
"mask-y-to":
|
|
8631
|
+
"mask-y-to": x()
|
|
8629
8632
|
}],
|
|
8630
8633
|
"mask-image-radial": [{
|
|
8631
8634
|
"mask-radial": [W, $]
|
|
@@ -8637,10 +8640,10 @@ const Lp = (e, t) => {
|
|
|
8637
8640
|
"mask-radial-to": L()
|
|
8638
8641
|
}],
|
|
8639
8642
|
"mask-image-radial-from-color": [{
|
|
8640
|
-
"mask-radial-from":
|
|
8643
|
+
"mask-radial-from": x()
|
|
8641
8644
|
}],
|
|
8642
8645
|
"mask-image-radial-to-color": [{
|
|
8643
|
-
"mask-radial-to":
|
|
8646
|
+
"mask-radial-to": x()
|
|
8644
8647
|
}],
|
|
8645
8648
|
"mask-image-radial-shape": [{
|
|
8646
8649
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -8652,7 +8655,7 @@ const Lp = (e, t) => {
|
|
|
8652
8655
|
}]
|
|
8653
8656
|
}],
|
|
8654
8657
|
"mask-image-radial-pos": [{
|
|
8655
|
-
"mask-radial-at":
|
|
8658
|
+
"mask-radial-at": S()
|
|
8656
8659
|
}],
|
|
8657
8660
|
"mask-image-conic-pos": [{
|
|
8658
8661
|
"mask-conic": [K]
|
|
@@ -8664,10 +8667,10 @@ const Lp = (e, t) => {
|
|
|
8664
8667
|
"mask-conic-to": L()
|
|
8665
8668
|
}],
|
|
8666
8669
|
"mask-image-conic-from-color": [{
|
|
8667
|
-
"mask-conic-from":
|
|
8670
|
+
"mask-conic-from": x()
|
|
8668
8671
|
}],
|
|
8669
8672
|
"mask-image-conic-to-color": [{
|
|
8670
|
-
"mask-conic-to":
|
|
8673
|
+
"mask-conic-to": x()
|
|
8671
8674
|
}],
|
|
8672
8675
|
/**
|
|
8673
8676
|
* Mask Mode
|
|
@@ -8695,7 +8698,7 @@ const Lp = (e, t) => {
|
|
|
8695
8698
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
8696
8699
|
*/
|
|
8697
8700
|
"mask-repeat": [{
|
|
8698
|
-
mask:
|
|
8701
|
+
mask: G()
|
|
8699
8702
|
}],
|
|
8700
8703
|
/**
|
|
8701
8704
|
* Mask Size
|
|
@@ -8774,7 +8777,7 @@ const Lp = (e, t) => {
|
|
|
8774
8777
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
8775
8778
|
*/
|
|
8776
8779
|
"drop-shadow-color": [{
|
|
8777
|
-
"drop-shadow":
|
|
8780
|
+
"drop-shadow": x()
|
|
8778
8781
|
}],
|
|
8779
8782
|
/**
|
|
8780
8783
|
* Grayscale
|
|
@@ -9145,7 +9148,7 @@ const Lp = (e, t) => {
|
|
|
9145
9148
|
* @see https://tailwindcss.com/docs/accent-color
|
|
9146
9149
|
*/
|
|
9147
9150
|
accent: [{
|
|
9148
|
-
accent:
|
|
9151
|
+
accent: x()
|
|
9149
9152
|
}],
|
|
9150
9153
|
/**
|
|
9151
9154
|
* Appearance
|
|
@@ -9159,7 +9162,7 @@ const Lp = (e, t) => {
|
|
|
9159
9162
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
9160
9163
|
*/
|
|
9161
9164
|
"caret-color": [{
|
|
9162
|
-
caret:
|
|
9165
|
+
caret: x()
|
|
9163
9166
|
}],
|
|
9164
9167
|
/**
|
|
9165
9168
|
* Color Scheme
|
|
@@ -9405,7 +9408,7 @@ const Lp = (e, t) => {
|
|
|
9405
9408
|
* @see https://tailwindcss.com/docs/fill
|
|
9406
9409
|
*/
|
|
9407
9410
|
fill: [{
|
|
9408
|
-
fill: ["none", ...
|
|
9411
|
+
fill: ["none", ...x()]
|
|
9409
9412
|
}],
|
|
9410
9413
|
/**
|
|
9411
9414
|
* Stroke Width
|
|
@@ -9419,7 +9422,7 @@ const Lp = (e, t) => {
|
|
|
9419
9422
|
* @see https://tailwindcss.com/docs/stroke
|
|
9420
9423
|
*/
|
|
9421
9424
|
stroke: [{
|
|
9422
|
-
stroke: ["none", ...
|
|
9425
|
+
stroke: ["none", ...x()]
|
|
9423
9426
|
}],
|
|
9424
9427
|
// ---------------------
|
|
9425
9428
|
// --- Accessibility ---
|
|
@@ -9677,18 +9680,18 @@ function Ea({
|
|
|
9677
9680
|
);
|
|
9678
9681
|
const O = await C(T), R = { ...t, [w.name]: O };
|
|
9679
9682
|
a(w.name, O), s(R);
|
|
9680
|
-
},
|
|
9683
|
+
}, S = async (w, T) => {
|
|
9681
9684
|
const O = t[w.name] || [];
|
|
9682
9685
|
if (w.maxFiles && O.length + T.length > w.maxFiles)
|
|
9683
9686
|
throw new Error(`Maximum ${w.maxFiles} files allowed`);
|
|
9684
|
-
T.forEach((
|
|
9685
|
-
if (w.maxSize &&
|
|
9687
|
+
T.forEach((x) => {
|
|
9688
|
+
if (w.maxSize && x.size > w.maxSize)
|
|
9686
9689
|
throw new Error(
|
|
9687
9690
|
`Each file must not exceed ${k(w.maxSize)}`
|
|
9688
9691
|
);
|
|
9689
9692
|
});
|
|
9690
9693
|
const R = await Promise.all(
|
|
9691
|
-
T.map((
|
|
9694
|
+
T.map((x) => C(x))
|
|
9692
9695
|
// Updated call
|
|
9693
9696
|
), N = [...O, ...R];
|
|
9694
9697
|
a(w.name, N), s({ ...t, [w.name]: N });
|
|
@@ -9696,7 +9699,7 @@ function Ea({
|
|
|
9696
9699
|
if (l) return;
|
|
9697
9700
|
const O = Array.from(T);
|
|
9698
9701
|
try {
|
|
9699
|
-
e.type === "multifile" ? await
|
|
9702
|
+
e.type === "multifile" ? await S(e, O) : await E(e, O[0]), o.current?.[w] && (o.current[w].value = "");
|
|
9700
9703
|
} catch (R) {
|
|
9701
9704
|
Cn.error(`Upload failed: ${R.message}`);
|
|
9702
9705
|
}
|
|
@@ -9710,7 +9713,7 @@ function Ea({
|
|
|
9710
9713
|
w.preventDefault(), l || h(!1);
|
|
9711
9714
|
}, F = (w) => {
|
|
9712
9715
|
w.preventDefault(), h(!1), !l && w.dataTransfer.files && w.dataTransfer.files.length > 0 && A(e.name, w.dataTransfer.files);
|
|
9713
|
-
}, V = e.accept ? e.accept.split(",").map((w) => w.split("/")[1] || w.split(".")[1] || w).join(", ").toUpperCase() : "PNG, JPG, PDF", H = e.maxSize ? `, up to ${k(e.maxSize)}` : "",
|
|
9716
|
+
}, V = e.accept ? e.accept.split(",").map((w) => w.split("/")[1] || w.split(".")[1] || w).join(", ").toUpperCase() : "PNG, JPG, PDF", H = e.maxSize ? `, up to ${k(e.maxSize)}` : "", Y = `
|
|
9714
9717
|
w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
|
|
9715
9718
|
// Ensure focus styling is handled correctly for the button element
|
|
9716
9719
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
@@ -9725,7 +9728,7 @@ function Ea({
|
|
|
9725
9728
|
"button",
|
|
9726
9729
|
{
|
|
9727
9730
|
type: "button",
|
|
9728
|
-
className:
|
|
9731
|
+
className: Y,
|
|
9729
9732
|
onClick: () => {
|
|
9730
9733
|
l || o?.current?.[e.name]?.click();
|
|
9731
9734
|
},
|
|
@@ -9904,8 +9907,8 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9904
9907
|
A = A === 0 ? 55 : A - 5, p(l, A.toString(), m);
|
|
9905
9908
|
}, C = () => {
|
|
9906
9909
|
p(l, d, m === "AM" ? "PM" : "AM");
|
|
9907
|
-
}, E = () => n(e.name, null),
|
|
9908
|
-
return e.maxDate &&
|
|
9910
|
+
}, E = () => n(e.name, null), S = [];
|
|
9911
|
+
return e.maxDate && S.push({ after: new Date(e.maxDate) }), e.minDate && S.push({ before: new Date(e.minDate) }), /* @__PURE__ */ D("div", { className: "relative", children: [
|
|
9909
9912
|
/* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
|
|
9910
9913
|
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
9911
9914
|
"button",
|
|
@@ -9965,7 +9968,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9965
9968
|
selected: c,
|
|
9966
9969
|
onSelect: g,
|
|
9967
9970
|
showOutsideDays: !0,
|
|
9968
|
-
disabled:
|
|
9971
|
+
disabled: S,
|
|
9969
9972
|
className: "p-0",
|
|
9970
9973
|
classNames: {
|
|
9971
9974
|
day_selected: "bg-blue-600 text-white hover:bg-blue-600 hover:text-white focus:bg-blue-600 focus:text-white rounded-md",
|
|
@@ -10229,7 +10232,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10229
10232
|
defaultProp: i ?? null,
|
|
10230
10233
|
onChange: c,
|
|
10231
10234
|
caller: tn
|
|
10232
|
-
}), [k, C] = f.useState(!1), E = et(l),
|
|
10235
|
+
}), [k, C] = f.useState(!1), E = et(l), S = Oi(n), A = f.useRef(!1), [I, _] = f.useState(0);
|
|
10233
10236
|
return f.useEffect(() => {
|
|
10234
10237
|
const P = g.current;
|
|
10235
10238
|
if (P)
|
|
@@ -10271,7 +10274,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10271
10274
|
if (P.target === P.currentTarget && F && !k) {
|
|
10272
10275
|
const V = new CustomEvent(Nr, jh);
|
|
10273
10276
|
if (P.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
|
|
10274
|
-
const H =
|
|
10277
|
+
const H = S().filter((R) => R.focusable), Y = H.find((R) => R.active), w = H.find((R) => R.id === h), O = [Y, w, ...H].filter(
|
|
10275
10278
|
Boolean
|
|
10276
10279
|
).map((R) => R.ref.current);
|
|
10277
10280
|
Li(O, d);
|
|
@@ -10325,12 +10328,12 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10325
10328
|
if (k !== void 0) {
|
|
10326
10329
|
if (y.metaKey || y.ctrlKey || y.altKey || y.shiftKey) return;
|
|
10327
10330
|
y.preventDefault();
|
|
10328
|
-
let E = g().filter((
|
|
10331
|
+
let E = g().filter((S) => S.focusable).map((S) => S.ref.current);
|
|
10329
10332
|
if (k === "last") E.reverse();
|
|
10330
10333
|
else if (k === "prev" || k === "next") {
|
|
10331
10334
|
k === "prev" && E.reverse();
|
|
10332
|
-
const
|
|
10333
|
-
E = d.loop ? Jh(E,
|
|
10335
|
+
const S = E.indexOf(y.currentTarget);
|
|
10336
|
+
E = d.loop ? Jh(E, S + 1) : E.slice(S + 1);
|
|
10334
10337
|
}
|
|
10335
10338
|
setTimeout(() => Li(E));
|
|
10336
10339
|
}
|
|
@@ -10658,13 +10661,13 @@ function hg({
|
|
|
10658
10661
|
{
|
|
10659
10662
|
...g,
|
|
10660
10663
|
value: p,
|
|
10661
|
-
onValueChange: (
|
|
10662
|
-
n(e.name,
|
|
10664
|
+
onValueChange: (S) => {
|
|
10665
|
+
n(e.name, S), r(e.name);
|
|
10663
10666
|
},
|
|
10664
10667
|
disabled: v,
|
|
10665
10668
|
className: E,
|
|
10666
|
-
children: h.map((
|
|
10667
|
-
const A = typeof
|
|
10669
|
+
children: h.map((S) => {
|
|
10670
|
+
const A = typeof S == "object" ? S.value : S, I = typeof S == "object" ? S.label : S, _ = typeof S == "object" ? S.description : null, P = `${e.name}-${A}`, F = p === A;
|
|
10668
10671
|
return k ? /* @__PURE__ */ D(
|
|
10669
10672
|
"label",
|
|
10670
10673
|
{
|
|
@@ -10895,27 +10898,27 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10895
10898
|
const [a, s] = le(!1), [i, c] = le("12"), [l, d] = le("00"), [m, g] = le("PM"), p = t[e.name] || "";
|
|
10896
10899
|
Te.useEffect(() => {
|
|
10897
10900
|
if (p) {
|
|
10898
|
-
const
|
|
10899
|
-
|
|
10901
|
+
const S = p.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
|
|
10902
|
+
S && (c(S[1].padStart(2, "0")), d(S[2]), g(S[3].toUpperCase()));
|
|
10900
10903
|
}
|
|
10901
10904
|
}, [p]);
|
|
10902
10905
|
const v = () => {
|
|
10903
|
-
const
|
|
10904
|
-
n(e.name,
|
|
10906
|
+
const S = `${i}:${l} ${m}`;
|
|
10907
|
+
n(e.name, S), s(!1);
|
|
10905
10908
|
}, h = () => {
|
|
10906
10909
|
n(e.name, ""), c("12"), d("00"), g("PM");
|
|
10907
10910
|
}, y = () => {
|
|
10908
|
-
const
|
|
10909
|
-
c((
|
|
10911
|
+
const S = parseInt(i);
|
|
10912
|
+
c((S % 12 + 1).toString().padStart(2, "0"));
|
|
10910
10913
|
}, k = () => {
|
|
10911
|
-
const
|
|
10912
|
-
c((
|
|
10914
|
+
const S = parseInt(i);
|
|
10915
|
+
c((S === 1 ? 12 : S - 1).toString().padStart(2, "0"));
|
|
10913
10916
|
}, C = () => {
|
|
10914
|
-
const
|
|
10915
|
-
d(((
|
|
10917
|
+
const S = parseInt(l);
|
|
10918
|
+
d(((S + 5) % 60).toString().padStart(2, "0"));
|
|
10916
10919
|
}, E = () => {
|
|
10917
|
-
const
|
|
10918
|
-
d((
|
|
10920
|
+
const S = parseInt(l);
|
|
10921
|
+
d((S === 0 ? 55 : S - 5).toString().padStart(2, "0"));
|
|
10919
10922
|
};
|
|
10920
10923
|
return /* @__PURE__ */ u("div", { children: /* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
|
|
10921
10924
|
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
@@ -10994,8 +10997,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10994
10997
|
{
|
|
10995
10998
|
type: "text",
|
|
10996
10999
|
value: i,
|
|
10997
|
-
onChange: (
|
|
10998
|
-
const A =
|
|
11000
|
+
onChange: (S) => {
|
|
11001
|
+
const A = S.target.value.replace(/\D/g, "");
|
|
10999
11002
|
(A === "" || parseInt(A) >= 1 && parseInt(A) <= 12) && c(A.padStart(2, "0"));
|
|
11000
11003
|
},
|
|
11001
11004
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
@@ -11052,8 +11055,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11052
11055
|
{
|
|
11053
11056
|
type: "text",
|
|
11054
11057
|
value: l,
|
|
11055
|
-
onChange: (
|
|
11056
|
-
const A =
|
|
11058
|
+
onChange: (S) => {
|
|
11059
|
+
const A = S.target.value.replace(/\D/g, "");
|
|
11057
11060
|
(A === "" || parseInt(A) >= 0 && parseInt(A) <= 59) && d(A.padStart(2, "0"));
|
|
11058
11061
|
},
|
|
11059
11062
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
@@ -11211,7 +11214,7 @@ const $g = ({
|
|
|
11211
11214
|
},
|
|
11212
11215
|
debugMode: l = !1
|
|
11213
11216
|
}) => {
|
|
11214
|
-
const [d, m] = le({ ...i }), [g, p] = le({}), [v, h] = le({}), [y, k] = le({}), C = Yt({}), E = ["hidden", "linebreak", "header", "alert"],
|
|
11217
|
+
const [d, m] = le({ ...i }), [g, p] = le({}), [v, h] = le({}), [y, k] = le({}), C = Yt({}), E = ["hidden", "linebreak", "header", "alert"], S = Ta(
|
|
11215
11218
|
() => ({
|
|
11216
11219
|
file: Ea,
|
|
11217
11220
|
multifile: Ea,
|
|
@@ -11236,28 +11239,30 @@ const $g = ({
|
|
|
11236
11239
|
}),
|
|
11237
11240
|
[]
|
|
11238
11241
|
), A = async (w, T = null) => {
|
|
11239
|
-
if (!
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11242
|
+
if (!(w.optionsUrl && !w.preloadOptions)) {
|
|
11243
|
+
if (!e) {
|
|
11244
|
+
const O = `apiClient prop is required when using fields with optionsUrl. Field "${w.name}" requires optionsUrl but no apiClient was provided.`;
|
|
11245
|
+
l && console.error(O), Cn.error(O);
|
|
11246
|
+
return;
|
|
11247
|
+
}
|
|
11248
|
+
try {
|
|
11249
|
+
const O = await e(`/${w.optionsUrl}`);
|
|
11250
|
+
let R = [];
|
|
11251
|
+
w.type === "select" ? R = [
|
|
11252
|
+
{ value: "", label: `Select ${w.label.toLowerCase()}` },
|
|
11253
|
+
...O.data
|
|
11254
|
+
] : R = [
|
|
11255
|
+
...O.data.map((N) => ({
|
|
11256
|
+
value: N.value,
|
|
11257
|
+
label: N.label
|
|
11258
|
+
}))
|
|
11259
|
+
], r.fields.forEach((N) => {
|
|
11260
|
+
N.name === w.name && (N.options = R);
|
|
11261
|
+
});
|
|
11262
|
+
} catch (O) {
|
|
11263
|
+
l && console.error(`Failed to load options for ${w.name}:`, O);
|
|
11264
|
+
} finally {
|
|
11265
|
+
}
|
|
11261
11266
|
}
|
|
11262
11267
|
};
|
|
11263
11268
|
qe(() => {
|
|
@@ -11282,8 +11287,8 @@ const $g = ({
|
|
|
11282
11287
|
if (N && !w.required)
|
|
11283
11288
|
return null;
|
|
11284
11289
|
if (w.validate) {
|
|
11285
|
-
const
|
|
11286
|
-
if (
|
|
11290
|
+
const x = w.validate(T, O);
|
|
11291
|
+
if (x) return x;
|
|
11287
11292
|
}
|
|
11288
11293
|
if (w.type === "email" && T && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(T))
|
|
11289
11294
|
return "Please enter a valid email address";
|
|
@@ -11308,13 +11313,13 @@ const $g = ({
|
|
|
11308
11313
|
}
|
|
11309
11314
|
] : O.type === "dayTimePicker" ? R[w] = T ? ir(T).format("YYYY-MM-DD HH:mm:ss") : "" : O.type === "number" ? R[w] = T === "" ? "" : Number(T) : R[w] = T, O.type === "select" && r.fields.forEach((N) => {
|
|
11310
11315
|
if (N.showIf && !N.showIf(R)) {
|
|
11311
|
-
const
|
|
11312
|
-
R[N.name] =
|
|
11316
|
+
const x = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
|
|
11317
|
+
R[N.name] = x ? [] : "";
|
|
11313
11318
|
}
|
|
11314
11319
|
}), r.fields.forEach((N) => {
|
|
11315
11320
|
if (typeof N.disabled == "function" && N.disabled(R)) {
|
|
11316
|
-
const
|
|
11317
|
-
R[N.name] =
|
|
11321
|
+
const x = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
|
|
11322
|
+
R[N.name] = x ? [] : "";
|
|
11318
11323
|
}
|
|
11319
11324
|
}), m(R);
|
|
11320
11325
|
}, P = (w) => {
|
|
@@ -11332,35 +11337,35 @@ const $g = ({
|
|
|
11332
11337
|
N && (O[R.name] = N);
|
|
11333
11338
|
}
|
|
11334
11339
|
}), p(O), Object.keys(O).length === 0) {
|
|
11335
|
-
const R = (
|
|
11336
|
-
if (
|
|
11337
|
-
const
|
|
11338
|
-
if (Array.isArray(
|
|
11339
|
-
return
|
|
11340
|
-
switch (
|
|
11340
|
+
const R = (x, z) => {
|
|
11341
|
+
if (x === "" || x === null || x === void 0) return null;
|
|
11342
|
+
const G = z?.toLowerCase();
|
|
11343
|
+
if (Array.isArray(x))
|
|
11344
|
+
return G === "number" || G === "integer" ? x.map((j) => j === "" ? null : Number(j)) : x;
|
|
11345
|
+
switch (G) {
|
|
11341
11346
|
case "number":
|
|
11342
11347
|
case "integer":
|
|
11343
11348
|
case "float":
|
|
11344
|
-
return Number(
|
|
11349
|
+
return Number(x);
|
|
11345
11350
|
case "boolean":
|
|
11346
11351
|
case "bool":
|
|
11347
|
-
return String(
|
|
11352
|
+
return String(x).toLowerCase() === "true" || x === !0;
|
|
11348
11353
|
case "date":
|
|
11349
11354
|
case "datetime": {
|
|
11350
|
-
const j = ir(
|
|
11351
|
-
return j.isValid() ? j.toISOString() :
|
|
11355
|
+
const j = ir(x);
|
|
11356
|
+
return j.isValid() ? j.toISOString() : x;
|
|
11352
11357
|
}
|
|
11353
11358
|
default:
|
|
11354
|
-
return
|
|
11359
|
+
return x;
|
|
11355
11360
|
}
|
|
11356
11361
|
}, N = {};
|
|
11357
|
-
r.fields.forEach((
|
|
11358
|
-
if (
|
|
11359
|
-
const z = d[
|
|
11360
|
-
o ? N[
|
|
11362
|
+
r.fields.forEach((x) => {
|
|
11363
|
+
if (x.name) {
|
|
11364
|
+
const z = d[x.name], G = x.fieldType || "string", j = R(z, G);
|
|
11365
|
+
o ? N[x.name] = {
|
|
11361
11366
|
value: j,
|
|
11362
|
-
fieldType:
|
|
11363
|
-
} : N[
|
|
11367
|
+
fieldType: G
|
|
11368
|
+
} : N[x.name] = j;
|
|
11364
11369
|
}
|
|
11365
11370
|
}), l ? console.log("Form submitted with values:", N) : a(N);
|
|
11366
11371
|
} else
|
|
@@ -11388,7 +11393,7 @@ const $g = ({
|
|
|
11388
11393
|
`[fieldFormat RENDER] Error exists in state for ${T.name} but not passed in props!`
|
|
11389
11394
|
)), E.includes(T.type))
|
|
11390
11395
|
return /* @__PURE__ */ u("div", { className: T.class || "col-span-full", children: w });
|
|
11391
|
-
const N = T.containerStyle,
|
|
11396
|
+
const N = T.containerStyle, x = T.color || "blue", z = N === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${T.containerClassName || V[x] || V.blue}` : "", G = /* @__PURE__ */ D(Rt, { children: [
|
|
11392
11397
|
T.label && /* @__PURE__ */ D(
|
|
11393
11398
|
"label",
|
|
11394
11399
|
{
|
|
@@ -11408,11 +11413,11 @@ const $g = ({
|
|
|
11408
11413
|
T.description && /* @__PURE__ */ u("p", { className: "text-xs mt-1.5 text-gray-400", children: T.description }),
|
|
11409
11414
|
O && /* @__PURE__ */ u("p", { id: R, className: "text-sm text-red-500 mt-1", role: "alert", children: O })
|
|
11410
11415
|
] });
|
|
11411
|
-
return /* @__PURE__ */ u("div", { className: "mb-4", children: N === "card" ? /* @__PURE__ */ u("div", { className: z, children:
|
|
11416
|
+
return /* @__PURE__ */ u("div", { className: "mb-4", children: N === "card" ? /* @__PURE__ */ u("div", { className: z, children: G }) : G });
|
|
11412
11417
|
}
|
|
11413
|
-
const
|
|
11418
|
+
const Y = (w) => {
|
|
11414
11419
|
if (w.showIf && !w.showIf(d)) return null;
|
|
11415
|
-
const T =
|
|
11420
|
+
const T = S[w.type] || ra;
|
|
11416
11421
|
if (d[w.name] === void 0) {
|
|
11417
11422
|
const N = w.type === "multiselect" || w.type === "searchselect" || w.type === "checkbox" && w.options && w.options.length > 0;
|
|
11418
11423
|
d[w.name] = w.value !== void 0 ? w.value : N ? [] : "";
|
|
@@ -11449,7 +11454,7 @@ const $g = ({
|
|
|
11449
11454
|
"div",
|
|
11450
11455
|
{
|
|
11451
11456
|
className: `${w.class || "col-span-full"} `,
|
|
11452
|
-
children:
|
|
11457
|
+
children: Y(w)
|
|
11453
11458
|
},
|
|
11454
11459
|
w.name + w.type
|
|
11455
11460
|
)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
|