ynotsoft-dynamic-form 1.0.94 → 1.0.96

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.
@@ -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), [x, A] = le({}), I = Yt(null), _ = Yt(null), P = Yt(null), F = t[e.name], H = sr(() => F ? (Array.isArray(F) ? F : [F]).map((S) => {
271
- const z = d.find((Y) => Y.value === S);
272
- return z || (x[S] ? x[S] : { value: S, label: S });
273
- }) : [], [F, d, x])(), G = sr(
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 S = await e.onSearch(N, t);
277
- m(S);
278
+ const x = await e.onSearch(N, t);
279
+ m(x);
278
280
  return;
279
281
  }
280
282
  if (!e.optionsUrl || !s) {
281
- const S = (e.options || []).map((z) => ({
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 ? S.filter(
288
+ N ? x.filter(
287
289
  (z) => String(z.label).toLowerCase().includes(N.toLowerCase())
288
- ) : S
290
+ ) : x
289
291
  );
290
292
  return;
291
293
  }
292
294
  p(!0);
293
295
  try {
294
- const S = e.searchParam || "search", z = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${z}${S}=${encodeURIComponent(N)}`, j = await s(Y), ve = j.data || j, q = Array.isArray(ve) ? ve : [];
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((z) => ({ ...z, [N.value]: N }));
312
- let S;
313
+ A((G) => ({ ...G, [N.value]: N }));
314
+ const x = { value: N.value, label: N.label };
315
+ let z;
313
316
  if (l)
314
- S = N.value, h(!1);
317
+ z = [x], h(!1);
315
318
  else {
316
- const z = Array.isArray(F) ? F : [];
317
- S = z.includes(N.value) ? z.filter((Y) => Y !== N.value) : [...z, N.value];
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, S), r(e.name), e.clearSearchOnSelect && k("");
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
- (S) => S < d.length - 1 ? S + 1 : S
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((S) => S > 0 ? S - 1 : 0);
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 S = N.target.value;
352
- k(S), E(-1), P.current && clearTimeout(P.current), P.current = setTimeout(() => G(S), 300);
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
- G(y);
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, G, y]), qe(() => {
362
- const N = (S) => {
363
- I.current && !I.current.contains(S.target) && (h(!1), r(e.name));
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, S) => {
370
+ const R = (N, x) => {
368
371
  N.stopPropagation();
369
- const z = Array.isArray(F) ? F : [], Y = l ? null : z.filter((j) => j !== S);
370
- n(e.name, Y), r(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: (S) => R(S, N.value),
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, S) => {
457
+ children: d.length > 0 ? d.map((N, x) => {
455
458
  const z = H.some(
456
459
  (j) => j.value === N.value
457
- ), Y = S === C;
460
+ ), G = x === C;
458
461
  return /* @__PURE__ */ D(
459
462
  "div",
460
463
  {
461
- id: `${e.name}-opt-${S}`,
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(S),
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
- ${Y ? "bg-accent text-accent-foreground" : ""}
473
+ ${G ? "bg-accent text-accent-foreground" : ""}
471
474
  ${z ? "text-primary font-medium" : "text-foreground"}
472
- ${!Y && !z ? "hover:bg-muted" : ""}
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), x = ie(y, E.collectionRef);
625
- return /* @__PURE__ */ u(c, { ref: x, children: C });
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, x = Te.useRef(null), A = ie(y, x), I = a(d, k);
632
- return Te.useEffect(() => (I.itemMap.set(x, { ref: x, ...E }), () => void I.itemMap.delete(x))), /* @__PURE__ */ u(g, { [m]: "", ref: A, children: C });
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, x = C >= k, A = Nl((_) => {
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
- !x || F || (o?.(_), s?.(_), _.defaultPrevented || i?.());
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 ? x ? "auto" : "none" : void 0,
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 x = E.target;
875
- i.contains(x) ? m.current = x : Je(m.current, { select: !0 });
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 x = E.relatedTarget;
879
- x !== null && (i.contains(x) || Je(m.current, { select: !0 }));
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, x] = Ml(C);
913
- E && x ? !h.shiftKey && k === x ? (h.preventDefault(), n && Je(E, { select: !0 })) : h.shiftKey && k === E && (h.preventDefault(), n && Je(x, { select: !0 })) : k === C && h.preventDefault();
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 be = globalThis?.document ? f.useLayoutEffect : () => {
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 be(() => {
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: x,
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
- ...x
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)), x = await (a.isElement == null ? void 0 : a.isElement(E)) ? await (a.getScale == null ? void 0 : a.getScale(E)) || {
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) / x.y,
1246
- bottom: (A.bottom - k.bottom + v.bottom) / x.y,
1247
- left: (k.left - A.left + v.left) / x.x,
1248
- right: (A.right - k.right + v.right) / x.x
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", x = 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));
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 = x / 2 - A / 2, F = _ / 2 - h[v] / 2 - 1, V = tt(m[k], F), H = tt(m[C], F), G = V, w = _ - h[v] - H, T = _ / 2 - h[v] / 2 + P, O = Rr(G, T, w), R = !c.arrow && Ot(o) != null && T !== O && a.reference[v] / 2 - (T < G ? V : H) - h[v] / 2 < 0, N = R ? T < G ? T - G : T - w : 0;
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, x = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = g || (E || !h ? [kn(i)] : Vl(i)), I = v !== "none";
1313
- !g && I && A.push(...Kl(i, h, v, x));
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, x);
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, G;
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((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
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 = (G = V.filter((N) => N.overflows[0] <= 0).sort((N, S) => N.overflows[1] - S.overflows[1])[0]) == null ? void 0 : G.placement;
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((S) => {
1346
+ const N = (w = V.filter((x) => {
1344
1347
  if (I) {
1345
- const z = ze(S.placement);
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((S) => [S.placement, S.overflows.filter((z) => z > 0).reduce((z, Y) => z + Y, 0)]).sort((S, z) => S[1] - z[1])[0]) == null ? void 0 : w[0];
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", x = a.reference[g] - a.floating[E] + y.mainAxis, A = a.reference[g] + a.reference[E] - y.mainAxis;
1557
- p < x ? p = x : p > A && (p = A);
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", x = Wa.has(Xe(o)), A = a.reference[m] - a.floating[E] + (x && ((k = s.offset) == null ? void 0 : k[m]) || 0) + (x ? 0 : y.crossAxis), I = a.reference[m] + a.reference[E] + (x ? 0 : ((C = s.offset) == null ? void 0 : C[m]) || 0) - (x ? y.crossAxis : 0);
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, x = tt(h - d[y], C), A = tt(v - d[k], E), I = !t.middlewareData.shift;
1592
- let _ = x, P = A;
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), G = Ee(d.top, 0), w = Ee(d.bottom, 0);
1595
- p ? P = v - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (G !== 0 || w !== 0 ? G + w : Ee(d.top, d.bottom));
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, x = k.top + (h.clientTop + parseFloat(C.paddingTop)) * y.y;
1776
- c *= y.x, l *= y.y, d *= y.x, m *= y.y, c += E, l += x, v = ke(h), h = _r(v);
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 x = !0;
2040
+ let S = !0;
2038
2041
  function A(I) {
2039
2042
  const _ = I[0].intersectionRatio;
2040
2043
  if (_ !== c) {
2041
- if (!x)
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(), x = !1;
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((S) => {
2180
- S !== I.current && (I.current = S, h(S));
2181
- }, []), E = f.useCallback((S) => {
2182
- S !== _.current && (_.current = S, k(S));
2183
- }, []), x = 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), G = fr(l), w = f.useCallback(() => {
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 S = {
2189
+ const x = {
2187
2190
  placement: t,
2188
2191
  strategy: n,
2189
2192
  middleware: g
2190
2193
  };
2191
- H.current && (S.platform = H.current), $u(I.current, _.current, S).then((z) => {
2192
- const Y = {
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: G.current !== !1
2201
+ isPositioned: Y.current !== !1
2199
2202
  };
2200
- T.current && !Nn(P.current, Y) && (P.current = Y, _n.flushSync(() => {
2201
- m(Y);
2203
+ T.current && !Nn(P.current, G) && (P.current = G, _n.flushSync(() => {
2204
+ m(G);
2202
2205
  }));
2203
2206
  });
2204
- }, [g, t, n, H, G]);
2207
+ }, [g, t, n, H, Y]);
2205
2208
  yn(() => {
2206
- l === !1 && P.current.isPositioned && (P.current.isPositioned = !1, m((S) => ({
2207
- ...S,
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 (x && (I.current = x), A && (_.current = A), x && A) {
2218
+ if (S && (I.current = S), A && (_.current = A), S && A) {
2216
2219
  if (V.current)
2217
- return V.current(x, A, w);
2220
+ return V.current(S, A, w);
2218
2221
  w();
2219
2222
  }
2220
- }, [x, A, w, V, F]);
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: x,
2230
+ reference: S,
2228
2231
  floating: A
2229
- }), [x, A]), N = f.useMemo(() => {
2230
- const S = {
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 S;
2237
- const z = Xo(R.floating, d.x), Y = Xo(R.floating, d.y);
2239
+ return x;
2240
+ const z = Xo(R.floating, d.x), G = Xo(R.floating, d.y);
2238
2241
  return i ? {
2239
- ...S,
2240
- transform: "translate(" + z + "px, " + Y + "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: Y
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 be(() => {
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)), [x, A] = f.useState(null), I = Qa(x), _ = 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], G = H.length > 0, w = {
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: G
2425
- }, { refs: T, floatingStyles: O, placement: R, isPositioned: N, middlewareData: S } = Bu({
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, de = L.floating.style;
2448
- de.setProperty("--radix-popper-available-width", `${ce}px`), de.setProperty("--radix-popper-available-height", `${Q}px`), de.setProperty("--radix-popper-anchor-width", `${ne}px`), de.setProperty("--radix-popper-anchor-height", `${oe}px`);
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
- x && Ku({ element: x, padding: i }),
2454
+ S && Ku({ element: S, padding: i }),
2452
2455
  sd({ arrowWidth: _, arrowHeight: P }),
2453
2456
  g && qu({ strategy: "referenceHidden", ...w })
2454
2457
  ]
2455
- }), [z, Y] = ss(R), j = et(v);
2456
- be(() => {
2458
+ }), [z, G] = ss(R), j = et(v);
2459
+ ve(() => {
2457
2460
  N && j?.();
2458
2461
  }, [N, j]);
2459
- const ve = S.arrow?.x, q = S.arrow?.y, ee = S.arrow?.centerOffset !== 0, [J, he] = f.useState();
2460
- return be(() => {
2461
- k && he(window.getComputedStyle(k).zIndex);
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
- S.transformOrigin?.x,
2475
- S.transformOrigin?.y
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
- ...S.hide?.referenceHidden && {
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: ve,
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": Y,
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
- be(() => a(!0), []);
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()] || be;
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, x = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = g, I = Ad([n, t]), _ = We(We({}, x), o);
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], x = "deltaY" in h ? h.deltaY : C[1] - k[1], A, I = h.target, _ = Math.abs(E) > Math.abs(x) ? "h" : "v";
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 || x) && (r.current = A), !A)
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 : x);
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
- }), x = E.length > 0 ? i(y, E[0]) : !s.current.noIsolation;
3211
- x && y.cancelable && y.preventDefault();
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(x) {
3218
- return x !== E;
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), [x, A] = f.useState(!1), I = qr(l), [_, P] = Xt({
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), G = y ? v || !!y.closest("form") : !0, [w, T] = f.useState(/* @__PURE__ */ new Set()), O = Array.from(w).map((R) => R.props.value).join(";");
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: x,
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 S = new Set(N);
3317
- return S.delete(R), S;
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
- G ? /* @__PURE__ */ D(
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 be(() => {
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 (be(() => {
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, x] = f.useState(null), [A, I] = f.useState(null), _ = ie(t, (L) => x(L)), [P, F] = f.useState(null), [V, H] = f.useState(
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
- ), G = Bn(n), [w, T] = f.useState(!1), O = f.useRef(!1);
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] = G().map((oe) => oe.ref.current), [Q] = ce.slice(-1), ne = document.activeElement;
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
- [G, A]
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: S, triggerPointerDownPosRef: z } = C;
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) || S(!1), document.removeEventListener("pointermove", te), z.current = null;
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, S, z]), f.useEffect(() => {
3492
- const L = () => S(!1);
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
- }, [S]);
3497
- const [Y, j] = Ys((L) => {
3498
- const te = G().filter((ne) => !ne.disabled), ce = te.find((ne) => ne.ref.current === document.activeElement), Q = qs(te, L, ce);
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
- }), ve = f.useCallback(
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, he = J === Dr ? {
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: ve,
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: Y,
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
- ...he,
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 = G().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
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, de = _.left - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
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, de = window.innerWidth - _.right - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
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(), G = 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), S = parseInt(T.paddingBottom, 10), z = O + R + w + S + N, Y = Math.min(y.offsetHeight * 5, z), j = window.getComputedStyle(h), ve = parseInt(j.paddingTop, 10), q = parseInt(j.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = G - ee, he = y.offsetHeight / 2, L = y.offsetTop + he, te = O + R + L, ce = z - te;
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, de = Math.max(
3631
+ const oe = l.clientHeight - h.offsetTop - h.offsetHeight, fe = Math.max(
3629
3632
  J,
3630
- he + // viewport might have padding bottom, include it to avoid a scrollable viewport
3633
+ ge + // viewport might have padding bottom, include it to avoid a scrollable viewport
3631
3634
  (ne ? q : 0) + oe + N
3632
- ), Ne = te + de;
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 de = Math.max(
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 ? ve : 0) + he
3643
+ (ne ? ue : 0) + ge
3641
3644
  ) + ce;
3642
- i.style.height = de + "px", h.scrollTop = te - ee + h.offsetTop;
3645
+ i.style.height = fe + "px", h.scrollTop = te - ee + h.offsetTop;
3643
3646
  }
3644
- i.style.margin = `${Oe}px 0`, i.style.minHeight = Y + "px", i.style.maxHeight = G + "px", r?.(), requestAnimationFrame(() => p.current = !0);
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
- be(() => E(), [E]);
3659
- const [x, A] = f.useState();
3660
- be(() => {
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: x
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), x = C - E;
3777
- m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop = x > 0 ? x : 0, m.style.justifyContent = "flex-end");
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 be(() => (h(v), () => y(v)), [h, y, v]), /* @__PURE__ */ D(Rt, { children: [
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 be(() => {
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 be(() => {
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]), be(() => {
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 x, A = "";
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: G,
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: S,
4458
+ ATTR_WHITESPACE: x,
4456
4459
  CUSTOM_ELEMENT: z
4457
4460
  } = ua;
4458
4461
  let {
4459
- IS_ALLOWED_URI: Y
4462
+ IS_ALLOWED_URI: G
4460
4463
  } = ua, j = null;
4461
- const ve = X({}, [...sa, ...yr, ...wr, ...xr, ...ia]);
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
- })), he = null, L = null;
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, de = !1, Ne = !0, Re = !1, it = !1, ct = !1, gt = !1, nn = !1, rn = !1, mo = !0, po = !1;
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 fe = null, yt = null;
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, fe = Ft === "application/xhtml+xml" ? br : Sn, j = _e(b, "ALLOWED_TAGS") ? X({}, b.ALLOWED_TAGS, fe) : ve, q = _e(b, "ALLOWED_ATTR") ? X({}, b.ALLOWED_ATTR, fe) : 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, fe) : bo, ho = _e(b, "ADD_DATA_URI_TAGS") ? X($e(go), b.ADD_DATA_URI_TAGS, fe) : go, Le = _e(b, "FORBID_CONTENTS") ? X({}, b.FORBID_CONTENTS, fe) : Jn, he = _e(b, "FORBID_TAGS") ? X({}, b.FORBID_TAGS, fe) : $e({}), L = _e(b, "FORBID_ATTR") ? X({}, b.FORBID_ATTR, fe) : $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, de = 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, Y = 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), de && (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 === ve && (j = $e(j)), X(j, b.ADD_TAGS, fe))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? te.attributeCheck = b.ADD_ATTR : (q === ee && (q = $e(q)), X(q, b.ADD_ATTR, fe))), b.ADD_URI_SAFE_ATTR && X(er, b.ADD_URI_SAFE_ATTR, fe), b.FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.FORBID_CONTENTS, fe)), b.ADD_FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.ADD_FORBID_CONTENTS, fe)), Zn && (j["#text"] = !0), Re && X(j, ["html", "head", "body"]), j.table && (X(j, ["tbody"]), delete he.tbody), b.TRUSTED_TYPES_POLICY) {
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
- x = b.TRUSTED_TYPES_POLICY, A = x.createHTML("");
4527
+ S = b.TRUSTED_TYPES_POLICY, A = S.createHTML("");
4525
4528
  } else
4526
- x === void 0 && (x = im(p, o)), x !== null && typeof A == "string" && (A = x.createHTML(""));
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 ue = vr(b, /^[\r\n\t ]+/);
4575
- B = ue && ue[0];
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 = x ? x.createHTML(b) : b;
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 ge = M.body || M.documentElement;
4592
- return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt === je ? F.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : ge;
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 = fe(b.nodeName);
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] || he[B])) {
4622
- if (!he[B] && Ao(B) && (J.tagNameCheck instanceof RegExp && ye(J.tagNameCheck, B) || J.tagNameCheck instanceof Function && J.tagNameCheck(B)))
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, ge = C(b) || b.childNodes;
4626
- if (ge && se) {
4627
- const ue = ge.length;
4628
- for (let Se = ue - 1; Se >= 0; --Se) {
4629
- const Ge = h(ge[Se], !0);
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) : (de && b.nodeType === Ht.text && (M = b.textContent, pn([G, w, T], (se) => {
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(Y, Wt(B, S, ""))) {
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, S, "")))) {
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 ge = M[se], {
4689
- name: ue,
4691
+ const be = M[se], {
4692
+ name: de,
4690
4693
  namespaceURI: Se,
4691
4694
  value: Ge
4692
- } = ge, wt = fe(ue), ar = Ge;
4693
- let pe = ue === "value" ? ar : Yf(ar);
4694
- if (B.attrName = wt, B.attrValue = pe, B.keepAttr = !0, B.forceKeepAttr = void 0, Ve(H.uponSanitizeAttribute, b, B), pe = B.attrValue, po && (wt === "id" || wt === "name") && (lt(ue, b), pe = Ki + pe), Ne && ye(/((--!?|])>)|<\/(style|title|textarea)/i, pe)) {
4695
- lt(ue, b);
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(pe, "href")) {
4699
- lt(ue, b);
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(ue, b);
4708
+ lt(de, b);
4706
4709
  continue;
4707
4710
  }
4708
- if (!oe && ye(/\/>/i, pe)) {
4709
- lt(ue, b);
4711
+ if (!oe && ye(/\/>/i, he)) {
4712
+ lt(de, b);
4710
4713
  continue;
4711
4714
  }
4712
- de && pn([G, w, T], (Po) => {
4713
- pe = Wt(pe, Po, " ");
4715
+ fe && pn([Y, w, T], (Po) => {
4716
+ he = Wt(he, Po, " ");
4714
4717
  });
4715
- const To = fe(b.nodeName);
4716
- if (!ko(To, wt, pe)) {
4717
- lt(ue, b);
4718
+ const To = me(b.nodeName);
4719
+ if (!ko(To, wt, he)) {
4720
+ lt(de, b);
4718
4721
  continue;
4719
4722
  }
4720
- if (x && typeof p == "object" && typeof p.getAttributeType == "function" && !Se)
4723
+ if (S && typeof p == "object" && typeof p.getAttributeType == "function" && !Se)
4721
4724
  switch (p.getAttributeType(To, wt)) {
4722
4725
  case "TrustedHTML": {
4723
- pe = x.createHTML(pe);
4726
+ he = S.createHTML(he);
4724
4727
  break;
4725
4728
  }
4726
4729
  case "TrustedScriptURL": {
4727
- pe = x.createScriptURL(pe);
4730
+ he = S.createScriptURL(he);
4728
4731
  break;
4729
4732
  }
4730
4733
  }
4731
- if (pe !== ar)
4734
+ if (he !== ar)
4732
4735
  try {
4733
- Se ? b.setAttributeNS(Se, ue, pe) : b.setAttribute(ue, pe), or(b) ? Fe(b) : aa(t.removed);
4736
+ Se ? b.setAttributeNS(Se, de, he) : b.setAttribute(de, he), or(b) ? Fe(b) : aa(t.removed);
4734
4737
  } catch {
4735
- lt(ue, b);
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, ge = 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 = fe(U.nodeName);
4759
- if (!j[Ge] || he[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 && !de && !Re && // eslint-disable-next-line unicorn/prefer-includes
4768
+ if (!gt && !fe && !Re && // eslint-disable-next-line unicorn/prefer-includes
4766
4769
  U.indexOf("<") === -1)
4767
- return x && rn ? x.createHTML(U) : U;
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 ue = So(Lt ? U : M);
4773
- for (; se = ue.nextNode(); )
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 (ge = P.call(M.ownerDocument); M.firstChild; )
4780
- ge.appendChild(M.firstChild);
4782
+ for (be = P.call(M.ownerDocument); M.firstChild; )
4783
+ be.appendChild(M.firstChild);
4781
4784
  else
4782
- ge = M;
4783
- return (q.shadowroot || q.shadowrootmode) && (ge = V.call(r, ge, !0)), ge;
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), de && pn([G, w, T], (Ge) => {
4790
+ ` + Se), fe && pn([Y, w, T], (Ge) => {
4788
4791
  Se = Wt(Se, Ge, " ");
4789
- }), x && rn ? x.createHTML(Se) : Se;
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 = fe(U), se = fe(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 = (x, A) => {
5065
- let I = A ? [...C, x] : C.filter((_) => _ !== x);
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((x) => {
5081
- const A = typeof x == "object" ? x.value : x, I = typeof x == "object" ? x.label : x, _ = typeof x == "object" ? x.description : null, P = `${e.name}-${A}`, F = C.includes(A);
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]), be(() => {
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]), be(() => {
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, x = E + k;
6970
- if (s.indexOf(x) > -1)
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(x);
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 = [], me = (e) => {
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 = me("color"), t = me("font"), n = me("text"), r = me("font-weight"), o = me("tracking"), a = me("leading"), s = me("breakpoint"), i = me("container"), c = me("spacing"), l = me("radius"), d = me("shadow"), m = me("inset-shadow"), g = me("text-shadow"), p = me("drop-shadow"), v = me("blur"), h = me("perspective"), y = me("aspect"), k = me("ease"), C = me("animate"), E = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
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 = () => [...x(), 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", {
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, $], G = () => [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()], S = () => [e, W, $], z = () => [...x(), Ca, Sa, {
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
- }], Y = () => ["no-repeat", {
7046
+ }], G = () => ["no-repeat", {
7044
7047
  repeat: ["", "x", "y", "space", "round"]
7045
7048
  }], j = () => ["auto", "cover", "contain", vh, hh, {
7046
7049
  size: [W, $]
7047
- }], ve = () => [Er, Vt, ut], q = () => [
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"], he = () => ["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 = () => [
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": G()
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": G()
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": G()
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": G()
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: S()
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: S()
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: S()
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: Y()
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: S()
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: ve()
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: ve()
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: ve()
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: S()
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: S()
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: S()
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: S()
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": S()
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": S()
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": 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": S()
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": S()
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": S()
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": S()
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": S()
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: S()
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: S()
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: S()
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": S()
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: S()
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": S()
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": S()
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": S()
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": [...he(), "plus-darker", "plus-lighter"]
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": he()
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": S()
8556
+ "mask-linear-from": x()
8554
8557
  }],
8555
8558
  "mask-image-linear-to-color": [{
8556
- "mask-linear-to": S()
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": S()
8568
+ "mask-t-from": x()
8566
8569
  }],
8567
8570
  "mask-image-t-to-color": [{
8568
- "mask-t-to": S()
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": S()
8580
+ "mask-r-from": x()
8578
8581
  }],
8579
8582
  "mask-image-r-to-color": [{
8580
- "mask-r-to": S()
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": S()
8592
+ "mask-b-from": x()
8590
8593
  }],
8591
8594
  "mask-image-b-to-color": [{
8592
- "mask-b-to": S()
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": S()
8604
+ "mask-l-from": x()
8602
8605
  }],
8603
8606
  "mask-image-l-to-color": [{
8604
- "mask-l-to": S()
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": S()
8616
+ "mask-x-from": x()
8614
8617
  }],
8615
8618
  "mask-image-x-to-color": [{
8616
- "mask-x-to": S()
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": S()
8628
+ "mask-y-from": x()
8626
8629
  }],
8627
8630
  "mask-image-y-to-color": [{
8628
- "mask-y-to": S()
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": S()
8643
+ "mask-radial-from": x()
8641
8644
  }],
8642
8645
  "mask-image-radial-to-color": [{
8643
- "mask-radial-to": S()
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": x()
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": S()
8670
+ "mask-conic-from": x()
8668
8671
  }],
8669
8672
  "mask-image-conic-to-color": [{
8670
- "mask-conic-to": S()
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: Y()
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": S()
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: S()
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: S()
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", ...S()]
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", ...S()]
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
- }, x = async (w, T) => {
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((S) => {
9685
- if (w.maxSize && S.size > 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((S) => C(S))
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 x(e, O) : await E(e, O[0]), o.current?.[w] && (o.current[w].value = "");
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)}` : "", G = `
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: G,
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), x = [];
9908
- return e.maxDate && x.push({ after: new Date(e.maxDate) }), e.minDate && x.push({ before: new Date(e.minDate) }), /* @__PURE__ */ D("div", { className: "relative", children: [
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: x,
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), x = Oi(n), A = f.useRef(!1), [I, _] = f.useState(0);
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 = x().filter((R) => R.focusable), G = H.find((R) => R.active), w = H.find((R) => R.id === h), O = [G, w, ...H].filter(
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((x) => x.focusable).map((x) => x.ref.current);
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 x = E.indexOf(y.currentTarget);
10333
- E = d.loop ? Jh(E, x + 1) : E.slice(x + 1);
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: (x) => {
10662
- n(e.name, x), r(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((x) => {
10667
- const A = typeof x == "object" ? x.value : x, I = typeof x == "object" ? x.label : x, _ = typeof x == "object" ? x.description : null, P = `${e.name}-${A}`, F = p === A;
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 x = p.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
10899
- x && (c(x[1].padStart(2, "0")), d(x[2]), g(x[3].toUpperCase()));
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 x = `${i}:${l} ${m}`;
10904
- n(e.name, x), s(!1);
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 x = parseInt(i);
10909
- c((x % 12 + 1).toString().padStart(2, "0"));
10911
+ const S = parseInt(i);
10912
+ c((S % 12 + 1).toString().padStart(2, "0"));
10910
10913
  }, k = () => {
10911
- const x = parseInt(i);
10912
- c((x === 1 ? 12 : x - 1).toString().padStart(2, "0"));
10914
+ const S = parseInt(i);
10915
+ c((S === 1 ? 12 : S - 1).toString().padStart(2, "0"));
10913
10916
  }, C = () => {
10914
- const x = parseInt(l);
10915
- d(((x + 5) % 60).toString().padStart(2, "0"));
10917
+ const S = parseInt(l);
10918
+ d(((S + 5) % 60).toString().padStart(2, "0"));
10916
10919
  }, E = () => {
10917
- const x = parseInt(l);
10918
- d((x === 0 ? 55 : x - 5).toString().padStart(2, "0"));
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: (x) => {
10998
- const A = x.target.value.replace(/\D/g, "");
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: (x) => {
11056
- const A = x.target.value.replace(/\D/g, "");
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"], x = Ta(
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 (!e) {
11240
- const O = `apiClient prop is required when using fields with optionsUrl. Field "${w.name}" requires optionsUrl but no apiClient was provided.`;
11241
- l && console.error(O), Cn.error(O);
11242
- return;
11243
- }
11244
- try {
11245
- const O = await e(`/${w.optionsUrl}`);
11246
- let R = [];
11247
- w.type === "select" ? R = [
11248
- { value: "", label: `Select ${w.label.toLowerCase()}` },
11249
- ...O.data
11250
- ] : R = [
11251
- ...O.data.map((N) => ({
11252
- value: N.value,
11253
- label: N.label
11254
- }))
11255
- ], r.fields.forEach((N) => {
11256
- N.name === w.name && (N.options = R);
11257
- });
11258
- } catch (O) {
11259
- l && console.error(`Failed to load options for ${w.name}:`, O);
11260
- } finally {
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 S = w.validate(T, O);
11286
- if (S) return S;
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 S = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
11312
- R[N.name] = S ? [] : "";
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 S = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
11317
- R[N.name] = S ? [] : "";
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 = (S, z) => {
11336
- if (S === "" || S === null || S === void 0) return null;
11337
- const Y = z?.toLowerCase();
11338
- if (Array.isArray(S))
11339
- return Y === "number" || Y === "integer" ? S.map((j) => j === "" ? null : Number(j)) : S;
11340
- switch (Y) {
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(S);
11349
+ return Number(x);
11345
11350
  case "boolean":
11346
11351
  case "bool":
11347
- return String(S).toLowerCase() === "true" || S === !0;
11352
+ return String(x).toLowerCase() === "true" || x === !0;
11348
11353
  case "date":
11349
11354
  case "datetime": {
11350
- const j = ir(S);
11351
- return j.isValid() ? j.toISOString() : S;
11355
+ const j = ir(x);
11356
+ return j.isValid() ? j.toISOString() : x;
11352
11357
  }
11353
11358
  default:
11354
- return S;
11359
+ return x;
11355
11360
  }
11356
11361
  }, N = {};
11357
- r.fields.forEach((S) => {
11358
- if (S.name) {
11359
- const z = d[S.name], Y = S.fieldType || "string", j = R(z, Y);
11360
- o ? N[S.name] = {
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: Y
11363
- } : N[S.name] = j;
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, S = T.color || "blue", z = N === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${T.containerClassName || V[S] || V.blue}` : "", Y = /* @__PURE__ */ D(Rt, { children: [
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: Y }) : Y });
11416
+ return /* @__PURE__ */ u("div", { className: "mb-4", children: N === "card" ? /* @__PURE__ */ u("div", { className: z, children: G }) : G });
11412
11417
  }
11413
- const G = (w) => {
11418
+ const Y = (w) => {
11414
11419
  if (w.showIf && !w.showIf(d)) return null;
11415
- const T = x[w.type] || ra;
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: G(w)
11457
+ children: Y(w)
11453
11458
  },
11454
11459
  w.name + w.type
11455
11460
  )) : /* @__PURE__ */ u("div", { children: "Loading..." }),