prlg-ui 1.8.170 → 1.8.172

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.
@@ -533,7 +533,7 @@ const Dn = (e) => ({
533
533
  }, y = Rt(a), w = Mt(y), k = await n.getDimensions(i), x = y === "y", z = x ? "top" : "left", I = x ? "bottom" : "right", M = x ? "clientHeight" : "clientWidth", L = r.reference[w] + r.reference[y] - g[y] - r.floating[w], P = g[y] - r.reference[y], b = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(i));
534
534
  let c = b ? b[M] : 0;
535
535
  (!c || !await (n.isElement == null ? void 0 : n.isElement(b))) && (c = s.floating[M] || r.floating[w]);
536
- const v = L / 2 - P / 2, p = c / 2 - k[w] / 2 - 1, V = Ge(m[z], p), R = Ge(m[I], p), E = V, N = c - k[w] - R, K = c / 2 - k[w] / 2 + v, Q = Tt(E, K, N), S = !u.arrow && it(a) != null && K !== Q && r.reference[w] / 2 - (K < E ? V : R) - k[w] / 2 < 0, F = S ? K < E ? K - E : K - N : 0;
536
+ const v = L / 2 - P / 2, p = c / 2 - k[w] / 2 - 1, T = Ge(m[z], p), R = Ge(m[I], p), E = T, N = c - k[w] - R, K = c / 2 - k[w] / 2 + v, Q = Tt(E, K, N), S = !u.arrow && it(a) != null && K !== Q && r.reference[w] / 2 - (K < E ? T : R) - k[w] / 2 < 0, F = S ? K < E ? K - E : K - N : 0;
537
537
  return {
538
538
  [y]: g[y] + F,
539
539
  data: {
@@ -573,12 +573,12 @@ const Dn = (e) => ({
573
573
  const z = ze(a), I = Be(s), M = ze(s) === s, L = await (u.isRTL == null ? void 0 : u.isRTL(i.floating)), P = g || (M || !k ? [vt(s)] : Vn(s)), b = w !== "none";
574
574
  !g && b && P.push(..._n(s, k, w, L));
575
575
  const c = [s, ...P], v = await pt(l, x), p = [];
576
- let V = ((o = r.flip) == null ? void 0 : o.overflows) || [];
576
+ let T = ((o = r.flip) == null ? void 0 : o.overflows) || [];
577
577
  if (f && p.push(v[z]), m) {
578
578
  const K = xn(a, n, L);
579
579
  p.push(v[K[0]], v[K[1]]);
580
580
  }
581
- if (V = [...V, {
581
+ if (T = [...T, {
582
582
  placement: a,
583
583
  overflows: p
584
584
  }], !p.every((K) => K <= 0)) {
@@ -586,22 +586,22 @@ const Dn = (e) => ({
586
586
  const K = (((R = r.flip) == null ? void 0 : R.index) || 0) + 1, Q = c[K];
587
587
  if (Q && (!(m === "alignment" ? I !== Be(Q) : !1) || // We leave the current main axis only if every placement on that axis
588
588
  // overflows the main axis.
589
- V.every((O) => Be(O.placement) === I ? O.overflows[0] > 0 : !0)))
589
+ T.every((O) => Be(O.placement) === I ? O.overflows[0] > 0 : !0)))
590
590
  return {
591
591
  data: {
592
592
  index: K,
593
- overflows: V
593
+ overflows: T
594
594
  },
595
595
  reset: {
596
596
  placement: Q
597
597
  }
598
598
  };
599
- let S = (E = V.filter((F) => F.overflows[0] <= 0).sort((F, O) => F.overflows[1] - O.overflows[1])[0]) == null ? void 0 : E.placement;
599
+ let S = (E = T.filter((F) => F.overflows[0] <= 0).sort((F, O) => F.overflows[1] - O.overflows[1])[0]) == null ? void 0 : E.placement;
600
600
  if (!S)
601
601
  switch (y) {
602
602
  case "bestFit": {
603
603
  var N;
604
- const F = (N = V.filter((O) => {
604
+ const F = (N = T.filter((O) => {
605
605
  if (b) {
606
606
  const X = Be(O.placement);
607
607
  return X === I || // Create a bias to the `y` side axis due to horizontal
@@ -609,7 +609,7 @@ const Dn = (e) => ({
609
609
  X === "y";
610
610
  }
611
611
  return !0;
612
- }).map((O) => [O.placement, O.overflows.filter((X) => X > 0).reduce((X, T) => X + T, 0)]).sort((O, X) => O[1] - X[1])[0]) == null ? void 0 : N[0];
612
+ }).map((O) => [O.placement, O.overflows.filter((X) => X > 0).reduce((X, V) => X + V, 0)]).sort((O, X) => O[1] - X[1])[0]) == null ? void 0 : N[0];
613
613
  F && (S = F);
614
614
  break;
615
615
  }
@@ -1462,8 +1462,8 @@ const po = {
1462
1462
  }), P = D("left-start"), { floatingStyles: b, update: c } = el(m, y, {
1463
1463
  placement: P,
1464
1464
  middleware: [Gt(), ht(8)]
1465
- }), v = at(), p = D(!1), V = D(!1), R = D(!1), { lockScroll: E, unlockScroll: N } = st(), K = D(null), Q = D(null), S = () => {
1466
- M(), V.value && c();
1465
+ }), v = at(), p = D(!1), T = D(!1), R = D(!1), { lockScroll: E, unlockScroll: N } = st(), K = D(null), Q = D(null), S = () => {
1466
+ M(), T.value && c();
1467
1467
  }, F = _(() => u && u.value !== void 0), O = _({
1468
1468
  get: () => F.value ? u?.value : p.value,
1469
1469
  set: (le) => {
@@ -1471,27 +1471,27 @@ const po = {
1471
1471
  }
1472
1472
  }), X = () => {
1473
1473
  O.value = !0;
1474
- }, T = () => {
1474
+ }, V = () => {
1475
1475
  O.value = !1, Z();
1476
1476
  }, B = () => {
1477
1477
  O.value = !O.value;
1478
1478
  }, Y = () => {
1479
- F.value ? O.value ? T() : X() : B();
1479
+ F.value ? O.value ? V() : X() : B();
1480
1480
  }, G = async (le) => {
1481
- le && le.stopPropagation(), m.value && (V.value = !0);
1481
+ le && le.stopPropagation(), m.value && (T.value = !0);
1482
1482
  }, Z = () => {
1483
- V.value = !1;
1483
+ T.value = !1;
1484
1484
  }, te = (le) => {
1485
1485
  if (s.value === "button-only") return;
1486
1486
  const ge = le.composedPath();
1487
1487
  if (!(y.value && ge.includes(y.value))) {
1488
1488
  if (m.value && ge.includes(m.value) || f.value && ge.includes(f.value)) {
1489
1489
  setTimeout(() => {
1490
- V.value && Z();
1490
+ T.value && Z();
1491
1491
  }, 0);
1492
1492
  return;
1493
1493
  }
1494
- T();
1494
+ V();
1495
1495
  }
1496
1496
  }, De = _(() => {
1497
1497
  if (!I.value.arrow) return {};
@@ -1561,14 +1561,14 @@ const po = {
1561
1561
  document.removeEventListener("click", te), window.removeEventListener("resize", S), window.removeEventListener("scroll", S), window.removeEventListener("orientationchange", S), K.value && K.value.disconnect(), Q.value && Q.value.disconnect(), s.value === "button-only" && O.value && N();
1562
1562
  }), l({
1563
1563
  open: X,
1564
- close: T,
1564
+ close: V,
1565
1565
  openSecondScreen: G,
1566
1566
  closeSecondScreen: Z,
1567
1567
  forceUpdatePosition: () => {
1568
1568
  S();
1569
1569
  },
1570
1570
  isOpen: O,
1571
- isSecondScreenOpen: V
1571
+ isSecondScreenOpen: T
1572
1572
  }), (le, ge) => (d(), h("div", {
1573
1573
  class: H(["popover", { "popover--with-arrow": C(n) }])
1574
1574
  }, [
@@ -1603,13 +1603,13 @@ const po = {
1603
1603
  ee(le.$slots, "default", {
1604
1604
  openSecondScreen: G,
1605
1605
  closeSecondScreen: Z,
1606
- close: T
1606
+ close: V
1607
1607
  }, void 0, !0)
1608
1608
  ])) : ee(le.$slots, "default", {
1609
1609
  key: 1,
1610
1610
  openSecondScreen: G,
1611
1611
  closeSecondScreen: Z,
1612
- close: T
1612
+ close: V
1613
1613
  }, void 0, !0)
1614
1614
  ]),
1615
1615
  C(n) ? (d(), h("div", {
@@ -1624,7 +1624,7 @@ const po = {
1624
1624
  }),
1625
1625
  j(Ie, { name: "slide" }, {
1626
1626
  default: se(() => [
1627
- V.value ? (d(), h("div", {
1627
+ T.value ? (d(), h("div", {
1628
1628
  key: 0,
1629
1629
  class: "popover__second-screen",
1630
1630
  ref: "second-screen",
@@ -2047,8 +2047,8 @@ const po = {
2047
2047
  function f(S) {
2048
2048
  let F = 1e3, O = S;
2049
2049
  for (; O && O !== document.body; ) {
2050
- const X = window.getComputedStyle(O), T = parseInt(X.zIndex);
2051
- !isNaN(T) && T > F && (F = T), O = O.parentElement;
2050
+ const X = window.getComputedStyle(O), V = parseInt(X.zIndex);
2051
+ !isNaN(V) && V > F && (F = V), O = O.parentElement;
2052
2052
  }
2053
2053
  return F;
2054
2054
  }
@@ -2059,7 +2059,7 @@ const po = {
2059
2059
  if (typeof F == "object" && F !== null)
2060
2060
  return F;
2061
2061
  const O = t.options?.find(
2062
- (T) => L(T) === F
2062
+ (V) => L(V) === F
2063
2063
  );
2064
2064
  return O || {
2065
2065
  value: F,
@@ -2095,11 +2095,11 @@ const po = {
2095
2095
  if (!S.disabled)
2096
2096
  if (t.multiple) {
2097
2097
  const F = L(S), O = Array.isArray(t.modelValue) ? [...t.modelValue] : [], X = O.some((B) => typeof B == "object" && B !== null ? L(B) === F : B === F);
2098
- let T;
2099
- X ? T = O.filter((B) => typeof B == "object" && B !== null ? L(B) !== F : B !== F) : T = [
2098
+ let V;
2099
+ X ? V = O.filter((B) => typeof B == "object" && B !== null ? L(B) !== F : B !== F) : V = [
2100
2100
  ...O,
2101
2101
  t.valueKey && t.valueKey !== "" ? L(S) : S
2102
- ], o("update:modelValue", T), o("change", T);
2102
+ ], o("update:modelValue", V), o("change", V);
2103
2103
  } else {
2104
2104
  const F = t.valueKey && t.valueKey !== "" ? L(S) : S;
2105
2105
  o("update:modelValue", F), o("change", F), a.value = !1;
@@ -2107,13 +2107,13 @@ const po = {
2107
2107
  }
2108
2108
  function p(S) {
2109
2109
  if (!t.multiple) return;
2110
- const F = L(S), X = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((T) => typeof T == "object" && T !== null ? L(T) !== F : T !== F);
2110
+ const F = L(S), X = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((V) => typeof V == "object" && V !== null ? L(V) !== F : V !== F);
2111
2111
  o("update:modelValue", X), o("change", X), o(
2112
2112
  "remove-tag",
2113
2113
  t.valueKey && t.valueKey !== "" ? L(S) : S
2114
2114
  );
2115
2115
  }
2116
- function V() {
2116
+ function T() {
2117
2117
  const S = t.multiple ? [] : void 0;
2118
2118
  o("update:modelValue", S), o("change", S), o("clear");
2119
2119
  }
@@ -2130,7 +2130,7 @@ const po = {
2130
2130
  !n.value || !a.value || ve(() => {
2131
2131
  const S = f(n.value);
2132
2132
  m.value = S + 10;
2133
- const F = n.value.getBoundingClientRect(), O = window.innerHeight, X = window.innerWidth, T = O - F.bottom, B = F.top, G = T < 300 && B > T, Z = Math.max(300, F.width);
2133
+ const F = n.value.getBoundingClientRect(), O = window.innerHeight, X = window.innerWidth, V = O - F.bottom, B = F.top, G = V < 300 && B > V, Z = Math.max(300, F.width);
2134
2134
  let te = F.left;
2135
2135
  te + Z > X && (te = Math.max(0, X - Z - 10)), i.value = {
2136
2136
  position: "fixed",
@@ -2142,8 +2142,8 @@ const po = {
2142
2142
  }
2143
2143
  function Q(S) {
2144
2144
  if (!n.value || !a.value) return;
2145
- const F = S.target, O = s.value, X = n.value.contains(F), T = O && O.contains(F);
2146
- !X && !T && (a.value = !1);
2145
+ const F = S.target, O = s.value, X = n.value.contains(F), V = O && O.contains(F);
2146
+ !X && !V && (a.value = !1);
2147
2147
  }
2148
2148
  return J(a, (S) => {
2149
2149
  S ? (K(), t.searchable && ve(() => {
@@ -2215,7 +2215,7 @@ const po = {
2215
2215
  S.clearable && w.value ? (d(), h("button", {
2216
2216
  key: 0,
2217
2217
  class: "dropdown__clear",
2218
- onClick: me(V, ["stop"])
2218
+ onClick: me(T, ["stop"])
2219
2219
  }, [
2220
2220
  j(C(tt))
2221
2221
  ])) : A("", !0)
@@ -2512,10 +2512,10 @@ const po = {
2512
2512
  const y = _(() => {
2513
2513
  let v = [...e.data];
2514
2514
  if (n.value) {
2515
- const { field: p, order: V } = n.value;
2515
+ const { field: p, order: T } = n.value;
2516
2516
  v.sort((R, E) => {
2517
2517
  const N = R[p], K = E[p];
2518
- return N === K ? 0 : V === 1 ? N > K ? 1 : -1 : N < K ? 1 : -1;
2518
+ return N === K ? 0 : T === 1 ? N > K ? 1 : -1 : N < K ? 1 : -1;
2519
2519
  });
2520
2520
  }
2521
2521
  return v;
@@ -2546,10 +2546,10 @@ const po = {
2546
2546
  if (!e.checkboxKey || !e.checkboxDisabled) return !0;
2547
2547
  const E = R[e.checkboxKey];
2548
2548
  return !e.checkboxDisabled.includes(E);
2549
- }), V = v.filter(
2549
+ }), T = v.filter(
2550
2550
  (R) => p.some((E) => M(E, R))
2551
2551
  );
2552
- return p.length > 0 && V.length === p.length;
2552
+ return p.length > 0 && T.length === p.length;
2553
2553
  }), P = _(() => {
2554
2554
  if (!I.value || e.data.length === 0)
2555
2555
  return !1;
@@ -2557,10 +2557,10 @@ const po = {
2557
2557
  if (!e.checkboxKey || !e.checkboxDisabled) return !0;
2558
2558
  const E = R[e.checkboxKey];
2559
2559
  return !e.checkboxDisabled.includes(E);
2560
- }), V = v.filter(
2560
+ }), T = v.filter(
2561
2561
  (R) => p.some((E) => M(E, R))
2562
2562
  );
2563
- return V.length > 0 && V.length < p.length;
2563
+ return T.length > 0 && T.length < p.length;
2564
2564
  }), b = (v) => {
2565
2565
  if (r.value)
2566
2566
  if (r.value === "multiple") {
@@ -2610,7 +2610,7 @@ const po = {
2610
2610
  sortMode: v.sortMode,
2611
2611
  sortField: v.sortField,
2612
2612
  onSelectAllRow: c,
2613
- "onUpdate:sort": p[0] || (p[0] = (V) => n.value = V)
2613
+ "onUpdate:sort": p[0] || (p[0] = (T) => n.value = T)
2614
2614
  }, null, 8, ["size", "columns", "isSelectedAll", "isIndeterminate", "sortMode", "sortField"]),
2615
2615
  y.value.length > 0 && !v.loading ? (d(), U(nl, {
2616
2616
  key: 0,
@@ -2627,8 +2627,8 @@ const po = {
2627
2627
  scroller: v.scroller || void 0,
2628
2628
  virtualScroll: v.virtualScroll || void 0,
2629
2629
  rowStyle: v.rowStyle,
2630
- onRowClickHandler: p[1] || (p[1] = (V) => t("rowClickHandler", V)),
2631
- onToggleRow: p[2] || (p[2] = (V) => b(V))
2630
+ onRowClickHandler: p[1] || (p[1] = (T) => t("rowClickHandler", T)),
2631
+ onToggleRow: p[2] || (p[2] = (T) => b(T))
2632
2632
  }, null, 8, ["size", "selectedRows", "dataKey", "checkboxKey", "checkboxDisabled", "columns", "data", "colorHovered", "scroller", "virtualScroll", "rowStyle"])) : v.loading ? (d(), h("tbody", pa, [
2633
2633
  $("tr", null, [
2634
2634
  $("td", {
@@ -2654,9 +2654,9 @@ const po = {
2654
2654
  ], 2),
2655
2655
  j(ol, {
2656
2656
  currentPage: i.value,
2657
- "onUpdate:currentPage": p[3] || (p[3] = (V) => i.value = V),
2657
+ "onUpdate:currentPage": p[3] || (p[3] = (T) => i.value = T),
2658
2658
  "per-page": f.value,
2659
- "onUpdate:perPage": p[4] || (p[4] = (V) => f.value = V),
2659
+ "onUpdate:perPage": p[4] || (p[4] = (T) => f.value = T),
2660
2660
  data: y.value,
2661
2661
  "per-page-options": v.perPageOptions,
2662
2662
  "totals-row": v.totals,
@@ -2678,7 +2678,7 @@ const po = {
2678
2678
  sortMode: v.sortMode,
2679
2679
  sortField: v.sortField,
2680
2680
  onSelectAllRow: c,
2681
- "onUpdate:sort": p[5] || (p[5] = (V) => n.value = V)
2681
+ "onUpdate:sort": p[5] || (p[5] = (T) => n.value = T)
2682
2682
  }, null, 8, ["size", "columns", "isSelectedAll", "isIndeterminate", "sortMode", "sortField"]),
2683
2683
  y.value.length > 0 && !v.loading ? (d(), U(nl, {
2684
2684
  key: 0,
@@ -2695,8 +2695,8 @@ const po = {
2695
2695
  scroller: v.scroller || void 0,
2696
2696
  virtualScroll: v.virtualScroll || void 0,
2697
2697
  rowStyle: v.rowStyle,
2698
- onRowClickHandler: p[6] || (p[6] = (V) => t("rowClickHandler", V)),
2699
- onToggleRow: p[7] || (p[7] = (V) => b(V))
2698
+ onRowClickHandler: p[6] || (p[6] = (T) => t("rowClickHandler", T)),
2699
+ onToggleRow: p[7] || (p[7] = (T) => b(T))
2700
2700
  }, null, 8, ["size", "selectedRows", "dataKey", "checkboxKey", "checkboxDisabled", "columns", "data", "colorHovered", "scroller", "virtualScroll", "rowStyle"])) : v.loading ? (d(), h("tbody", wa, [
2701
2701
  $("tr", null, [
2702
2702
  $("td", {
@@ -2721,9 +2721,9 @@ const po = {
2721
2721
  ])),
2722
2722
  j(ol, {
2723
2723
  currentPage: i.value,
2724
- "onUpdate:currentPage": p[8] || (p[8] = (V) => i.value = V),
2724
+ "onUpdate:currentPage": p[8] || (p[8] = (T) => i.value = T),
2725
2725
  "per-page": f.value,
2726
- "onUpdate:perPage": p[9] || (p[9] = (V) => f.value = V),
2726
+ "onUpdate:perPage": p[9] || (p[9] = (T) => f.value = T),
2727
2727
  data: y.value,
2728
2728
  "per-page-options": v.perPageOptions,
2729
2729
  "totals-row": v.totals,
@@ -2845,8 +2845,8 @@ const po = {
2845
2845
  emits: ["update:modelValue", "search", "change", "clear", "remove-tag"],
2846
2846
  setup(e, { emit: l }) {
2847
2847
  const t = e, o = l, a = D(!1), r = D(!1), n = D(""), s = D(-1), u = D(), i = D(), f = D(), m = D({});
2848
- function g(T) {
2849
- let B = 1e3, Y = T;
2848
+ function g(V) {
2849
+ let B = 1e3, Y = V;
2850
2850
  for (; Y && Y !== document.body; ) {
2851
2851
  const G = window.getComputedStyle(Y), Z = parseInt(G.zIndex);
2852
2852
  !isNaN(Z) && Z > B && (B = Z), Y = Y.parentElement;
@@ -2859,21 +2859,28 @@ const po = {
2859
2859
  return (Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue]).map((B) => {
2860
2860
  if (typeof B == "object" && B !== null)
2861
2861
  return B;
2862
- const Y = t.options?.find((Z) => b(Z) === B);
2863
- return Y || { value: B, label: String(B) };
2862
+ const Y = t.options?.find(
2863
+ (Z) => b(Z) === B
2864
+ );
2865
+ return Y || {
2866
+ value: B,
2867
+ label: String(B)
2868
+ };
2864
2869
  }).filter((B) => B !== void 0);
2865
2870
  {
2866
2871
  if (typeof t.modelValue == "object" && t.modelValue !== null)
2867
2872
  return [t.modelValue];
2868
- const T = t.options?.find((B) => b(B) === t.modelValue);
2869
- return T ? [T] : [];
2873
+ const V = t.options?.find(
2874
+ (B) => b(B) === t.modelValue
2875
+ );
2876
+ return V ? [V] : [];
2870
2877
  }
2871
- }), k = _(() => t.multiple ? w.value.length > 0 : !!t.modelValue), x = _(() => t.multiple && w.value.length > 0 ? "" : t.placeholder), z = _(() => w.value.slice(0, t.maxTags)), I = _(() => Math.max(0, w.value.length - t.maxTags)), M = _(() => t.options || []), L = _(() => t.multiple ? w.value.map((T) => b(T)) : []), P = _(() => t.multiple || !w.value.length ? null : b(w.value[0]));
2872
- function b(T) {
2873
- return t.valueKey && t.valueKey in T ? T[t.valueKey] : T.value || "";
2878
+ }), k = _(() => t.multiple ? w.value.length > 0 : !!t.modelValue), x = _(() => t.multiple && w.value.length > 0 ? "" : t.placeholder), z = _(() => w.value.slice(0, t.maxTags)), I = _(() => Math.max(0, w.value.length - t.maxTags)), M = _(() => t.options || []), L = _(() => t.multiple ? w.value.map((V) => b(V)) : []), P = _(() => t.multiple || !w.value.length ? null : b(w.value[0]));
2879
+ function b(V) {
2880
+ return t.valueKey && t.valueKey in V ? V[t.valueKey] : V.value || "";
2874
2881
  }
2875
- function c(T) {
2876
- return t.labelKey && t.labelKey in T ? String(T[t.labelKey]) : String(T.label);
2882
+ function c(V) {
2883
+ return t.labelKey && t.labelKey in V ? String(V[t.labelKey]) : String(V.label);
2877
2884
  }
2878
2885
  function v() {
2879
2886
  o("search", n.value), n.value.length >= t.minQueryLength && ((t.options?.length || 0) > 0 || t.loading) ? (a.value = !0, s.value = -1) : a.value = !1;
@@ -2881,55 +2888,58 @@ const po = {
2881
2888
  function p() {
2882
2889
  r.value = !0, n.value.length >= t.minQueryLength && ((t.options?.length || 0) > 0 || t.loading) && (a.value = !0);
2883
2890
  }
2884
- function V() {
2891
+ function T() {
2885
2892
  r.value = !1, t.multiple || setTimeout(() => {
2886
2893
  a.value = !1;
2887
2894
  }, 150);
2888
2895
  }
2889
- function R(T) {
2890
- T.key === "ArrowDown" ? (T.preventDefault(), a.value && M.value.length > 0 && (s.value = Math.min(s.value + 1, M.value.length - 1))) : T.key === "ArrowUp" ? (T.preventDefault(), a.value && M.value.length > 0 && (s.value = Math.max(s.value - 1, 0))) : T.key === "Enter" ? (T.preventDefault(), a.value && s.value >= 0 && E(M.value[s.value])) : T.key === "Escape" ? (a.value = !1, f.value?.blur()) : T.key === "Tab" && (a.value = !1);
2896
+ function R(V) {
2897
+ V.key === "ArrowDown" ? (V.preventDefault(), a.value && M.value.length > 0 && (s.value = Math.min(
2898
+ s.value + 1,
2899
+ M.value.length - 1
2900
+ ))) : V.key === "ArrowUp" ? (V.preventDefault(), a.value && M.value.length > 0 && (s.value = Math.max(s.value - 1, 0))) : V.key === "Enter" ? (V.preventDefault(), a.value && s.value >= 0 && E(M.value[s.value])) : V.key === "Escape" ? (a.value = !1, f.value?.blur()) : V.key === "Tab" && (a.value = !1);
2891
2901
  }
2892
- function E(T) {
2893
- if (!T.disabled) {
2902
+ function E(V) {
2903
+ if (!V.disabled) {
2894
2904
  if (t.multiple) {
2895
- const B = b(T), Y = Array.isArray(t.modelValue) ? [...t.modelValue] : [], G = Y.some((te) => typeof te == "object" && te !== null ? b(te) === B : te === B);
2905
+ const B = b(V), Y = Array.isArray(t.modelValue) ? [...t.modelValue] : [], G = Y.some((te) => typeof te == "object" && te !== null ? b(te) === B : te === B);
2896
2906
  let Z;
2897
2907
  if (G)
2898
2908
  Z = Y.filter((te) => typeof te == "object" && te !== null ? b(te) !== B : te !== B);
2899
2909
  else {
2900
- const te = t.valueKey ? b(T) : T;
2910
+ const te = t.valueKey ? b(V) : V;
2901
2911
  Z = [...Y, te];
2902
2912
  }
2903
2913
  o("update:modelValue", Z), o("change", Z), n.value = "";
2904
2914
  } else {
2905
- const B = t.valueKey ? b(T) : T;
2906
- o("update:modelValue", B), o("change", B), n.value = N(T), a.value = !1;
2915
+ const B = t.valueKey ? b(V) : V;
2916
+ o("update:modelValue", B), o("change", B), n.value = N(V), a.value = !1;
2907
2917
  }
2908
2918
  s.value = -1;
2909
2919
  }
2910
2920
  }
2911
- function N(T) {
2912
- return t.inputKey && t.inputKey in T ? String(T[t.inputKey]) : c(T);
2921
+ function N(V) {
2922
+ return t.inputKey && t.inputKey in V ? String(V[t.inputKey]) : c(V);
2913
2923
  }
2914
- function K(T) {
2924
+ function K(V) {
2915
2925
  if (!t.multiple) return;
2916
- const B = b(T), G = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((Z) => typeof Z == "object" && Z !== null ? b(Z) !== B : Z !== B);
2917
- o("update:modelValue", G), o("change", G), o("remove-tag", T);
2926
+ const B = b(V), G = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((Z) => typeof Z == "object" && Z !== null ? b(Z) !== B : Z !== B);
2927
+ o("update:modelValue", G), o("change", G), o("remove-tag", V);
2918
2928
  }
2919
2929
  function Q() {
2920
- const T = t.multiple ? [] : void 0;
2921
- n.value = "", o("update:modelValue", T), o("change", T), o("clear");
2930
+ const V = t.multiple ? [] : void 0;
2931
+ n.value = "", o("update:modelValue", V), o("change", V), o("clear");
2922
2932
  }
2923
- function S(T) {
2924
- T.disabled || !t.multiple || E(T);
2933
+ function S(V) {
2934
+ V.disabled || !t.multiple || E(V);
2925
2935
  }
2926
- function F(T) {
2927
- T.disabled || t.multiple || E(T);
2936
+ function F(V) {
2937
+ V.disabled || t.multiple || E(V);
2928
2938
  }
2929
2939
  function O() {
2930
2940
  !u.value || !a.value || ve(() => {
2931
- const T = g(u.value);
2932
- y.value = T + 10;
2941
+ const V = g(u.value);
2942
+ y.value = V + 10;
2933
2943
  const B = u.value.getBoundingClientRect(), Y = window.innerHeight, G = window.innerWidth, Z = Y - B.bottom, te = B.top, Se = Z < 300 && te > Z, le = Math.max(300, B.width);
2934
2944
  let ge = B.left;
2935
2945
  ge + le > G && (ge = Math.max(0, G - le - 10)), m.value = {
@@ -2940,49 +2950,64 @@ const po = {
2940
2950
  }, Se ? m.value.bottom = `${Y - B.top + 4}px` : m.value.top = `${B.bottom + 4}px`;
2941
2951
  });
2942
2952
  }
2943
- function X(T) {
2953
+ function X(V) {
2944
2954
  if (!u.value || !a.value) return;
2945
- const B = T.target, Y = i.value, G = u.value.contains(B), Z = Y && Y.contains(B);
2955
+ const B = V.target, Y = i.value, G = u.value.contains(B), Z = Y && Y.contains(B);
2946
2956
  !G && !Z && (a.value = !1);
2947
2957
  }
2948
- return J(() => t.modelValue, (T) => {
2949
- if (!t.multiple && T)
2950
- if (typeof T == "object")
2951
- n.value = N(T);
2952
- else {
2953
- const B = t.options?.find((Y) => b(Y) === T);
2954
- n.value = B ? N(B) : String(T);
2955
- }
2956
- else !t.multiple && !T && (n.value = "");
2957
- }, { immediate: !0 }), J(a, (T) => {
2958
- T && O();
2959
- }), J(() => t.options, (T) => {
2960
- T && T.length > 0 && n.value.length >= t.minQueryLength && (a.value = !0), a.value && O();
2961
- }), J(() => t.loading, (T) => {
2962
- T && n.value.length >= t.minQueryLength && (a.value = !0), a.value && O();
2963
- }), pe(() => {
2958
+ return J(
2959
+ () => t.modelValue,
2960
+ (V) => {
2961
+ if (!t.multiple && V)
2962
+ if (typeof V == "object")
2963
+ n.value = N(V);
2964
+ else {
2965
+ const B = t.options?.find(
2966
+ (Y) => b(Y) === V
2967
+ );
2968
+ n.value = B ? N(B) : String(V);
2969
+ }
2970
+ else !t.multiple && !V && (n.value = "");
2971
+ },
2972
+ { immediate: !0 }
2973
+ ), J(a, (V) => {
2974
+ V && O();
2975
+ }), J(
2976
+ () => t.options,
2977
+ (V) => {
2978
+ V && V.length > 0 && n.value.length >= t.minQueryLength && (a.value = !0), a.value && O();
2979
+ }
2980
+ ), J(
2981
+ () => t.loading,
2982
+ (V) => {
2983
+ V && n.value.length >= t.minQueryLength && (a.value = !0), a.value && O();
2984
+ }
2985
+ ), pe(() => {
2964
2986
  document.addEventListener("click", X), window.addEventListener("resize", O), window.addEventListener("scroll", O);
2965
2987
  }), Te(() => {
2966
2988
  document.removeEventListener("click", X), window.removeEventListener("resize", O), window.removeEventListener("scroll", O);
2967
- }), (T, B) => (d(), h("div", {
2968
- class: H(["autocomplete", { "autocomplete--disabled": T.disabled }])
2989
+ }), (V, B) => (d(), h("div", {
2990
+ class: H(["autocomplete", {
2991
+ "autocomplete--disabled": V.disabled,
2992
+ "autocomplete--error": V.error
2993
+ }])
2969
2994
  }, [
2970
- T.label ? (d(), h("label", Pa, [
2971
- T.required ? (d(), h("sup", _a)) : A("", !0),
2972
- de(" " + q(T.label), 1)
2995
+ V.label ? (d(), h("label", Pa, [
2996
+ V.required ? (d(), h("sup", _a)) : A("", !0),
2997
+ de(" " + q(V.label), 1)
2973
2998
  ])) : A("", !0),
2974
2999
  $("div", {
2975
3000
  ref_key: "autocompleteTrigger",
2976
3001
  ref: u,
2977
3002
  class: H(["autocomplete__trigger", {
2978
3003
  "autocomplete__trigger--active": a.value,
2979
- "autocomplete__trigger--multiple": T.multiple,
3004
+ "autocomplete__trigger--multiple": V.multiple,
2980
3005
  "autocomplete__trigger--focused": r.value,
2981
- "autocomplete__trigger--error": T.error
3006
+ "autocomplete__trigger--error": V.error
2982
3007
  }])
2983
3008
  }, [
2984
3009
  $("div", Ma, [
2985
- T.multiple && w.value.length ? (d(), h("div", Ra, [
3010
+ V.multiple && w.value.length ? (d(), h("div", Ra, [
2986
3011
  (d(!0), h(ae, null, he(z.value, (Y) => (d(), U(C(gt), {
2987
3012
  key: b(Y),
2988
3013
  removable: "",
@@ -3010,10 +3035,10 @@ const po = {
3010
3035
  "onUpdate:modelValue": B[0] || (B[0] = (Y) => n.value = Y),
3011
3036
  class: "autocomplete__text-input",
3012
3037
  placeholder: x.value,
3013
- disabled: T.disabled,
3038
+ disabled: V.disabled,
3014
3039
  onInput: v,
3015
3040
  onFocus: p,
3016
- onBlur: V,
3041
+ onBlur: T,
3017
3042
  onKeydown: R
3018
3043
  }, null, 40, Da), [
3019
3044
  [et, n.value]
@@ -3024,7 +3049,7 @@ const po = {
3024
3049
  }, [
3025
3050
  j(C(yt))
3026
3051
  ], 2),
3027
- T.clearable && (k.value || n.value) ? (d(), h("button", {
3052
+ V.clearable && (k.value || n.value) ? (d(), h("button", {
3028
3053
  key: 0,
3029
3054
  class: "autocomplete__clear",
3030
3055
  onClick: me(Q, ["stop"])
@@ -3046,7 +3071,7 @@ const po = {
3046
3071
  }, ["stop"]))
3047
3072
  }, [
3048
3073
  $("div", Aa, [
3049
- T.loading ? (d(), h("div", Ba, " Загрузка... ")) : (d(), h(ae, { key: 1 }, [
3074
+ V.loading ? (d(), h("div", Ba, "Загрузка...")) : (d(), h(ae, { key: 1 }, [
3050
3075
  (d(!0), h(ae, null, he(M.value, (Y, G) => (d(), h("div", {
3051
3076
  key: b(Y),
3052
3077
  class: H(["autocomplete__option", {
@@ -3054,9 +3079,9 @@ const po = {
3054
3079
  "autocomplete__option--highlighted": G === s.value
3055
3080
  }]),
3056
3081
  onMouseenter: (Z) => s.value = G,
3057
- onClick: (Z) => !T.multiple && E(Y)
3082
+ onClick: (Z) => !V.multiple && E(Y)
3058
3083
  }, [
3059
- T.multiple ? (d(), h("div", {
3084
+ V.multiple ? (d(), h("div", {
3060
3085
  key: 0,
3061
3086
  onMousedown: B[1] || (B[1] = me(() => {
3062
3087
  }, ["prevent"])),
@@ -3078,17 +3103,17 @@ const po = {
3078
3103
  onChange: (Z) => F(Y)
3079
3104
  }, null, 8, ["model-value", "value", "label", "disabled", "onChange"]))
3080
3105
  ], 42, Oa))), 128)),
3081
- !M.value.length && n.value.length >= T.minQueryLength ? (d(), h("div", La, " Ничего не найдено ")) : A("", !0)
3106
+ !M.value.length && n.value.length >= V.minQueryLength ? (d(), h("div", La, " Ничего не найдено ")) : A("", !0)
3082
3107
  ], 64))
3083
3108
  ])
3084
3109
  ], 4)
3085
3110
  ]),
3086
3111
  _: 1
3087
3112
  }, 8, ["show", "z-index"]),
3088
- T.error && T.errorText ? (d(), h("div", za, q(T.errorText), 1)) : A("", !0)
3113
+ V.error && V.errorText ? (d(), h("div", za, q(V.errorText), 1)) : A("", !0)
3089
3114
  ], 2));
3090
3115
  }
3091
- }), yi = /* @__PURE__ */ ie(Ha, [["__scopeId", "data-v-7550fe20"]]), Ka = ["for"], Fa = { key: 0 }, qa = { class: "input__wrapper" }, Na = ["id", "placeholder", "name", "disabled", "type", "required", "readonly", "maxlength"], Wa = { class: "input__actions" }, Ya = {
3116
+ }), yi = /* @__PURE__ */ ie(Ha, [["__scopeId", "data-v-fef6129e"]]), Ka = ["for"], Fa = { key: 0 }, qa = { class: "input__wrapper" }, Na = ["id", "placeholder", "name", "disabled", "type", "required", "readonly", "maxlength"], Wa = { class: "input__actions" }, Ya = {
3092
3117
  key: 1,
3093
3118
  class: "input__count-char"
3094
3119
  }, ja = {
@@ -3217,25 +3242,25 @@ function Ua(e, l) {
3217
3242
  }
3218
3243
  function g(b) {
3219
3244
  const { required: c, optional: v } = i(t), p = c + v;
3220
- let V = "", R = 0, E = 0;
3245
+ let T = "", R = 0, E = 0;
3221
3246
  for (; E < p.length; ) {
3222
3247
  const N = p[E];
3223
3248
  if (f(N))
3224
3249
  if (R < b.length) {
3225
3250
  const K = b[R];
3226
3251
  if (m(K, N))
3227
- V += K, R++;
3252
+ T += K, R++;
3228
3253
  else {
3229
3254
  R++;
3230
3255
  continue;
3231
3256
  }
3232
3257
  } else
3233
- V += o;
3258
+ T += o;
3234
3259
  else
3235
- V += N;
3260
+ T += N;
3236
3261
  E++;
3237
3262
  }
3238
- return V;
3263
+ return T;
3239
3264
  }
3240
3265
  function y() {
3241
3266
  const { required: b, optional: c } = i(t);
@@ -3243,14 +3268,14 @@ function Ua(e, l) {
3243
3268
  }
3244
3269
  function w(b) {
3245
3270
  const { required: c, optional: v } = i(t), p = c + v;
3246
- let V = "", R = 0, E = 0;
3271
+ let T = "", R = 0, E = 0;
3247
3272
  for (; R < b.length && E < p.length; ) {
3248
3273
  const N = b[R], K = p[E];
3249
3274
  if (N === o) {
3250
3275
  R++;
3251
3276
  continue;
3252
3277
  }
3253
- f(K) ? m(N, K) ? (V += N, R++, E++) : R++ : (N === K && R++, E++);
3278
+ f(K) ? m(N, K) ? (T += N, R++, E++) : R++ : (N === K && R++, E++);
3254
3279
  }
3255
3280
  for (; R < b.length; ) {
3256
3281
  const N = b[R];
@@ -3261,8 +3286,8 @@ function Ua(e, l) {
3261
3286
  let K = !1, Q = 0;
3262
3287
  for (let S = 0; S < p.length; S++)
3263
3288
  if (f(p[S])) {
3264
- if (Q === V.length) {
3265
- m(N, p[S]) && (V += N, K = !0);
3289
+ if (Q === T.length) {
3290
+ m(N, p[S]) && (T += N, K = !0);
3266
3291
  break;
3267
3292
  }
3268
3293
  Q++;
@@ -3270,7 +3295,7 @@ function Ua(e, l) {
3270
3295
  if (R++, !K)
3271
3296
  break;
3272
3297
  }
3273
- return V;
3298
+ return T;
3274
3299
  }
3275
3300
  function k(b) {
3276
3301
  const { required: c } = i(t), v = c.replace(/[^9a*]/g, "").length;
@@ -3282,16 +3307,16 @@ function Ua(e, l) {
3282
3307
  n.value = g(b);
3283
3308
  else {
3284
3309
  const { required: c, optional: v } = i(t), p = c + v;
3285
- let V = "";
3310
+ let T = "";
3286
3311
  for (let R = 0; R < p.length && !f(p[R]); R++)
3287
- V += p[R];
3288
- n.value = V;
3312
+ T += p[R];
3313
+ n.value = T;
3289
3314
  }
3290
3315
  }
3291
3316
  function z(b) {
3292
3317
  if (!b.isTrusted) return;
3293
- const c = b.target, v = c.value, p = w(v), V = g(p);
3294
- n.value = V, e.value = p, ve(() => {
3318
+ const c = b.target, v = c.value, p = w(v), T = g(p);
3319
+ n.value = T, e.value = p, ve(() => {
3295
3320
  const { required: R, optional: E } = i(t), N = R + E;
3296
3321
  let K = 0, Q = 0;
3297
3322
  for (let S = 0; S < N.length; S++)
@@ -3310,14 +3335,14 @@ function Ua(e, l) {
3310
3335
  break;
3311
3336
  }
3312
3337
  }
3313
- K = Math.min(K, V.length), c.setSelectionRange(K, K);
3338
+ K = Math.min(K, T.length), c.setSelectionRange(K, K);
3314
3339
  });
3315
3340
  }
3316
3341
  function I(b) {
3317
3342
  const c = b.target;
3318
3343
  setTimeout(() => {
3319
- const v = c.value, p = w(v), V = g(p);
3320
- n.value = V, e.value = p;
3344
+ const v = c.value, p = w(v), T = g(p);
3345
+ n.value = T, e.value = p;
3321
3346
  const { required: R, optional: E } = i(t), N = R + E;
3322
3347
  let K = 0, Q = 0;
3323
3348
  for (let S = 0; S < N.length; S++)
@@ -3336,7 +3361,7 @@ function Ua(e, l) {
3336
3361
  break;
3337
3362
  }
3338
3363
  }
3339
- K = Math.min(K, V.length), c.setSelectionRange(K, K);
3364
+ K = Math.min(K, T.length), c.setSelectionRange(K, K);
3340
3365
  }, 0);
3341
3366
  }
3342
3367
  function M(b) {
@@ -3348,7 +3373,7 @@ function Ua(e, l) {
3348
3373
  const S = c.selectionStart || 0, F = c.selectionEnd || 0;
3349
3374
  if (S !== F) {
3350
3375
  n.value = g(""), e.value = "", ve(() => {
3351
- const { required: X, optional: T } = i(t), B = X + T;
3376
+ const { required: X, optional: V } = i(t), B = X + V;
3352
3377
  let Y = 0;
3353
3378
  for (let G = 0; G < B.length; G++)
3354
3379
  if (f(B[G])) {
@@ -3361,7 +3386,7 @@ function Ua(e, l) {
3361
3386
  }
3362
3387
  if (v > 0 && n.value.length > 0) {
3363
3388
  const X = n.value;
3364
- let T = "", B = -1;
3389
+ let V = "", B = -1;
3365
3390
  const { required: Y, optional: G } = i(t), Z = Y + G;
3366
3391
  for (let te = v - 1; te >= 0; te--)
3367
3392
  if (te < Z.length && f(Z[te])) {
@@ -3377,7 +3402,7 @@ function Ua(e, l) {
3377
3402
  De++;
3378
3403
  }
3379
3404
  }
3380
- te = te.slice(0, De) + te.slice(De + 1), T = g(te), n.value = T, e.value = te, ve(() => {
3405
+ te = te.slice(0, De) + te.slice(De + 1), V = g(te), n.value = V, e.value = te, ve(() => {
3381
3406
  c.setSelectionRange(B, B);
3382
3407
  });
3383
3408
  }
@@ -3391,7 +3416,7 @@ function Ua(e, l) {
3391
3416
  const S = c.selectionStart || 0, F = c.selectionEnd || 0;
3392
3417
  if (S !== F) {
3393
3418
  n.value = g(""), e.value = "", ve(() => {
3394
- const { required: X, optional: T } = i(t), B = X + T;
3419
+ const { required: X, optional: V } = i(t), B = X + V;
3395
3420
  let Y = 0;
3396
3421
  for (let G = 0; G < B.length; G++)
3397
3422
  if (f(B[G])) {
@@ -3404,20 +3429,20 @@ function Ua(e, l) {
3404
3429
  }
3405
3430
  if (v < n.value.length) {
3406
3431
  const X = n.value;
3407
- let T = -1;
3432
+ let V = -1;
3408
3433
  for (let B = v; B < X.length; B++) {
3409
3434
  const { required: Y, optional: G } = i(t), Z = Y + G;
3410
3435
  if (B < Z.length && f(Z[B])) {
3411
- T = B;
3436
+ V = B;
3412
3437
  break;
3413
3438
  }
3414
3439
  }
3415
- if (T >= 0) {
3440
+ if (V >= 0) {
3416
3441
  let B = w(X), Y = 0;
3417
- for (let Z = 0; Z <= T; Z++) {
3442
+ for (let Z = 0; Z <= V; Z++) {
3418
3443
  const { required: te, optional: De } = i(t), Se = te + De;
3419
3444
  if (Z < Se.length && f(Se[Z])) {
3420
- if (Z === T) break;
3445
+ if (Z === V) break;
3421
3446
  Y++;
3422
3447
  }
3423
3448
  }
@@ -3432,7 +3457,7 @@ function Ua(e, l) {
3432
3457
  }
3433
3458
  if (b.metaKey || b.ctrlKey || ["ArrowLeft", "ArrowRight", "Tab", "Home", "End", "Escape"].includes(b.key))
3434
3459
  return;
3435
- const { required: p, optional: V } = i(t), R = p + V, E = w(n.value), N = R.split("").filter((S) => f(S)).length;
3460
+ const { required: p, optional: T } = i(t), R = p + T, E = w(n.value), N = R.split("").filter((S) => f(S)).length;
3436
3461
  if (E.length >= N) {
3437
3462
  b.preventDefault();
3438
3463
  return;
@@ -3450,17 +3475,17 @@ function Ua(e, l) {
3450
3475
  }
3451
3476
  function L(b) {
3452
3477
  s.value = !0, ve(() => {
3453
- const c = b.target, { required: v, optional: p } = i(t), V = v + p;
3478
+ const c = b.target, { required: v, optional: p } = i(t), T = v + p;
3454
3479
  let R = 0;
3455
- for (let E = 0; E < V.length; E++)
3456
- if (f(V[E])) {
3480
+ for (let E = 0; E < T.length; E++)
3481
+ if (f(T[E])) {
3457
3482
  R = E;
3458
3483
  break;
3459
3484
  }
3460
3485
  if (We(e)) {
3461
3486
  let E = 0;
3462
- for (let N = 0; N < V.length; N++)
3463
- if (f(V[N])) {
3487
+ for (let N = 0; N < T.length; N++)
3488
+ if (f(T[N])) {
3464
3489
  if (E >= We(e).length) {
3465
3490
  R = N;
3466
3491
  break;
@@ -4385,7 +4410,7 @@ const Ss = {
4385
4410
  key: p.value,
4386
4411
  class: H(P(p)),
4387
4412
  disabled: p.disabled,
4388
- onClick: (V) => b(p)
4413
+ onClick: (T) => b(p)
4389
4414
  }, [
4390
4415
  $("span", null, q(p.label), 1)
4391
4416
  ], 10, _s))), 128))
@@ -4525,16 +4550,16 @@ const Bs = /* @__PURE__ */ W({
4525
4550
  setup(e, { emit: l }) {
4526
4551
  function t(c, v) {
4527
4552
  let p = v;
4528
- const V = c.dayOfYear(), R = [
4553
+ const T = c.dayOfYear(), R = [
4529
4554
  // День месяца
4530
4555
  [/dd/g, c.format("DD")],
4531
4556
  // два знака
4532
4557
  [/d/g, c.format("D")],
4533
4558
  // без ведущего нуля
4534
4559
  // День года
4535
- [/oo/g, String(V).padStart(3, "0")],
4560
+ [/oo/g, String(T).padStart(3, "0")],
4536
4561
  // три знака
4537
- [/o/g, String(V)],
4562
+ [/o/g, String(T)],
4538
4563
  // без ведущих нулей
4539
4564
  // Название дня
4540
4565
  [/DD/g, c.format("dddd")],
@@ -4576,8 +4601,8 @@ const Bs = /* @__PURE__ */ W({
4576
4601
  const p = ue(c, v, !0);
4577
4602
  if (p.isValid())
4578
4603
  return p;
4579
- const V = ue(c);
4580
- return V.isValid() ? V : null;
4604
+ const T = ue(c);
4605
+ return T.isValid() ? T : null;
4581
4606
  } catch {
4582
4607
  return null;
4583
4608
  }
@@ -5281,16 +5306,16 @@ const Ri = {
5281
5306
  ["bottomright", "bottom", "top", "right", "left", "bottomleft", "topright", "topleft"].forEach((R) => {
5282
5307
  c.includes(R) || c.push(R);
5283
5308
  });
5284
- let p = k, V = P(k);
5309
+ let p = k, T = P(k);
5285
5310
  for (const R of c)
5286
5311
  if (b(R)) {
5287
- p = R, V = P(R);
5312
+ p = R, T = P(R);
5288
5313
  break;
5289
5314
  }
5290
- V.top = Math.max(M, Math.min(V.top, window.innerHeight - I.height - M)), V.left = Math.max(M, Math.min(V.left, window.innerWidth - I.width - M)), o.value = p, t.value = {
5315
+ T.top = Math.max(M, Math.min(T.top, window.innerHeight - I.height - M)), T.left = Math.max(M, Math.min(T.left, window.innerWidth - I.width - M)), o.value = p, t.value = {
5291
5316
  position: "fixed",
5292
- top: `${V.top}px`,
5293
- left: `${V.left}px`,
5317
+ top: `${T.top}px`,
5318
+ left: `${T.left}px`,
5294
5319
  zIndex: 1e3
5295
5320
  };
5296
5321
  }, u = () => {
@@ -5540,8 +5565,8 @@ const Ri = {
5540
5565
  const c = (p) => {
5541
5566
  if (!n.value || !m.value) return;
5542
5567
  u.value = p.clientY;
5543
- const V = u.value - s.value;
5544
- V > 0 && (p.preventDefault(), r.value = V);
5568
+ const T = u.value - s.value;
5569
+ T > 0 && (p.preventDefault(), r.value = T);
5545
5570
  }, v = () => {
5546
5571
  if (!n.value || !m.value) return;
5547
5572
  const p = i.value * 0.3;
@@ -6049,12 +6074,12 @@ const Ri = {
6049
6074
  if (u.value.includes(P))
6050
6075
  return P;
6051
6076
  const v = b * 60 + c;
6052
- let p = u.value[0], V = Math.abs(x(p) - v);
6077
+ let p = u.value[0], T = Math.abs(x(p) - v);
6053
6078
  for (const R of u.value) {
6054
6079
  const E = x(R), N = Math.abs(E - v);
6055
- N < V && (V = N, p = R);
6080
+ N < T && (T = N, p = R);
6056
6081
  }
6057
- return V > e.step ? P : p;
6082
+ return T > e.step ? P : p;
6058
6083
  }
6059
6084
  function x(P) {
6060
6085
  const [b, c] = P.split(":").map(Number);
@@ -6078,8 +6103,8 @@ const Ri = {
6078
6103
  const c = P.target, v = c.selectionStart || 0, p = c.value;
6079
6104
  if (v > 0 && p[v - 1] === ":") {
6080
6105
  P.preventDefault();
6081
- const V = p.substring(0, v - 1) + p.substring(v);
6082
- n.value = V, setTimeout(() => {
6106
+ const T = p.substring(0, v - 1) + p.substring(v);
6107
+ n.value = T, setTimeout(() => {
6083
6108
  c.setSelectionRange(v - 1, v - 1);
6084
6109
  }, 0);
6085
6110
  }
@@ -6107,8 +6132,8 @@ const Ri = {
6107
6132
  if (!t.value) return;
6108
6133
  const b = P.target, c = r.value, v = o.value;
6109
6134
  if (!c) return;
6110
- const p = c.contains(b), V = v && v.contains(b);
6111
- !p && !V && (t.value = !1);
6135
+ const p = c.contains(b), T = v && v.contains(b);
6136
+ !p && !T && (t.value = !1);
6112
6137
  }
6113
6138
  return J(
6114
6139
  l,
@@ -6322,7 +6347,7 @@ const Ri = {
6322
6347
  function g(c) {
6323
6348
  let v = 1e3, p = c;
6324
6349
  for (; p && p !== document.body; ) {
6325
- const V = window.getComputedStyle(p), R = parseInt(V.zIndex);
6350
+ const T = window.getComputedStyle(p), R = parseInt(T.zIndex);
6326
6351
  !isNaN(R) && R > v && (v = R), p = p.parentElement;
6327
6352
  }
6328
6353
  return v;
@@ -6339,13 +6364,13 @@ const Ri = {
6339
6364
  }
6340
6365
  function I(c) {
6341
6366
  const p = m.value.map(
6342
- (V) => V.key === c ? { ...V, enabled: !V.enabled } : V
6367
+ (T) => T.key === c ? { ...T, enabled: !T.enabled } : T
6343
6368
  );
6344
6369
  a("update:modelValue", p), a("change", p);
6345
6370
  }
6346
6371
  function M(c, v) {
6347
6372
  const p = m.value.map(
6348
- (V) => V.key === c ? { ...V, time: v ?? { from: "", to: "" } } : V
6373
+ (T) => T.key === c ? { ...T, time: v ?? { from: "", to: "" } } : T
6349
6374
  );
6350
6375
  a("update:modelValue", p), a("change", p);
6351
6376
  }
@@ -6361,9 +6386,9 @@ const Ri = {
6361
6386
  !n.value || !r.value || ve(() => {
6362
6387
  const c = g(n.value);
6363
6388
  y.value = c + 10;
6364
- const v = n.value.getBoundingClientRect(), p = window.innerHeight, V = window.innerWidth, R = p - v.bottom, E = v.top, K = R < 400 && E > R, Q = Math.max(300, v.width);
6389
+ const v = n.value.getBoundingClientRect(), p = window.innerHeight, T = window.innerWidth, R = p - v.bottom, E = v.top, K = R < 400 && E > R, Q = Math.max(300, v.width);
6365
6390
  let S = v.left;
6366
- S + Q > V && (S = Math.max(0, V - Q - 10)), u.value = {
6391
+ S + Q > T && (S = Math.max(0, T - Q - 10)), u.value = {
6367
6392
  position: "fixed",
6368
6393
  left: `${S}px`,
6369
6394
  width: `${Q}px`,
@@ -6373,8 +6398,8 @@ const Ri = {
6373
6398
  }
6374
6399
  function b(c) {
6375
6400
  if (!n.value || !r.value) return;
6376
- const v = c.target, p = s.value, V = n.value.contains(v), R = p && p.contains(v);
6377
- !V && !R && (r.value = !1);
6401
+ const v = c.target, p = s.value, T = n.value.contains(v), R = p && p.contains(v);
6402
+ !T && !R && (r.value = !1);
6378
6403
  }
6379
6404
  return J(r, (c) => {
6380
6405
  c && P();
@@ -6383,7 +6408,7 @@ const Ri = {
6383
6408
  }), Te(() => {
6384
6409
  document.removeEventListener("click", b), window.removeEventListener("resize", P), window.removeEventListener("scroll", P);
6385
6410
  }), (c, v) => (d(), h("div", {
6386
- class: H(["schedule", { "schedule--disabled": c.disabled }])
6411
+ class: H(["schedule", { "schedule--disabled": c.disabled, "schedule--error": c.error }])
6387
6412
  }, [
6388
6413
  c.label ? (d(), h("label", Gr, q(c.label), 1)) : A("", !0),
6389
6414
  $("div", {
@@ -6445,15 +6470,15 @@ const Ri = {
6445
6470
  j(rt, {
6446
6471
  checked: p.enabled,
6447
6472
  label: p.label,
6448
- onChange: (V) => I(p.key)
6473
+ onChange: (T) => I(p.key)
6449
6474
  }, null, 8, ["checked", "label", "onChange"])
6450
6475
  ]),
6451
6476
  p.enabled ? (d(), h("div", ai, [
6452
6477
  j(Xr, {
6453
6478
  modelValue: p.time,
6454
- "onUpdate:modelValue": (V) => p.time = V,
6479
+ "onUpdate:modelValue": (T) => p.time = T,
6455
6480
  error: i.value[p.key],
6456
- "onUpdate:error": (V) => i.value[p.key] = V
6481
+ "onUpdate:error": (T) => i.value[p.key] = T
6457
6482
  }, null, 8, ["modelValue", "onUpdate:modelValue", "error", "onUpdate:error"])
6458
6483
  ])) : A("", !0)
6459
6484
  ]))), 128))
@@ -6467,7 +6492,7 @@ const Ri = {
6467
6492
  c.error && c.errorText ? (d(), h("div", si, q(c.errorText), 1)) : A("", !0)
6468
6493
  ], 2));
6469
6494
  }
6470
- }), lu = /* @__PURE__ */ ie(ri, [["__scopeId", "data-v-707c89db"]]);
6495
+ }), lu = /* @__PURE__ */ ie(ri, [["__scopeId", "data-v-b0c1a2e5"]]);
6471
6496
  export {
6472
6497
  Ni as Accordion,
6473
6498
  Wi as AccordionContent,