@memobit/libs 1.0.46 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import g1, { Component as k3, Fragment as _3, createContext as _0, forwardRef as z1, useCallback as Z, useContext as L0, useEffect as F, useId as z0, useImperativeHandle as B2, useLayoutEffect as m2, useMemo as u1, useRef as X, useState as z } from "react";
1
+ import g1, { Component as k3, Fragment as _3, createContext as _0, forwardRef as z1, useCallback as Z, useContext as L0, useEffect as F, useId as z0, useImperativeHandle as B2, useLayoutEffect as m2, useMemo as u1, useRef as K, useState as z } from "react";
2
2
  import { Fragment as n1, jsx as e, jsxs as c } from "react/jsx-runtime";
3
3
  import { createPortal as K1 } from "react-dom";
4
4
  var L3 = /* @__PURE__ */ c("svg", {
@@ -10017,7 +10017,7 @@ var L3 = /* @__PURE__ */ c("svg", {
10017
10017
  })
10018
10018
  });
10019
10019
  }, Cr = ({ id: t, title: r, icon: l, content: a, isExpanded: h, disabled: d = !1, onToggle: o }) => {
10020
- const m = X(null), i = X(!0);
10020
+ const m = K(null), i = K(!0);
10021
10021
  return F(() => {
10022
10022
  const s = m.current;
10023
10023
  if (s) {
@@ -10066,7 +10066,7 @@ var L3 = /* @__PURE__ */ c("svg", {
10066
10066
  })]
10067
10067
  });
10068
10068
  }, $2 = (t) => {
10069
- const r = X(null);
10069
+ const r = K(null);
10070
10070
  F(() => {
10071
10071
  const l = () => {
10072
10072
  if (!r.current) return;
@@ -10122,10 +10122,86 @@ var L3 = /* @__PURE__ */ c("svg", {
10122
10122
  ] })
10123
10123
  }));
10124
10124
  T.displayName = "Button";
10125
- var W1 = ({ children: t, className: r, isOpen: l, noPadding: a = !1, onClose: h, onOverlayClick: d, primary: o, secondary: m, size: i = "auto", tertiary: n, title: s, titleIcon: p, usePortal: u = !1 }) => {
10125
+ var X = ({ title: t, position: r = "top", delay: l = 200, children: a, disabled: h = !1, className: d = "", maxWidth: o, maxHeight: m }) => {
10126
+ const [i, n] = z(!1), [s, p] = z({
10127
+ top: 0,
10128
+ left: 0
10129
+ }), u = K(null), g = K(null), v = K(null), w = K(null), f = K(!1), y = m !== void 0, b = y ? 150 : 0, C = () => {
10130
+ if (!v.current || !w.current) return;
10131
+ const V = v.current.firstElementChild, S = V && V.getBoundingClientRect().width > 0 ? V.getBoundingClientRect() : v.current.getBoundingClientRect(), _ = w.current.getBoundingClientRect(), R = 8;
10132
+ let B = 0, E = 0;
10133
+ switch (r) {
10134
+ case "top":
10135
+ B = S.top - _.height - R, E = S.left + S.width / 2 - _.width / 2;
10136
+ break;
10137
+ case "bottom":
10138
+ B = S.bottom + R, E = S.left + S.width / 2 - _.width / 2;
10139
+ break;
10140
+ case "left":
10141
+ B = S.top + S.height / 2 - _.height / 2, E = S.left - _.width - R;
10142
+ break;
10143
+ case "right":
10144
+ B = S.top + S.height / 2 - _.height / 2, E = S.right + R;
10145
+ break;
10146
+ }
10147
+ const O = 8;
10148
+ E < O && (E = O), E + _.width > window.innerWidth - O && (E = window.innerWidth - _.width - O), B < O && (B = O), B + _.height > window.innerHeight - O && (B = window.innerHeight - _.height - O), p({
10149
+ top: B,
10150
+ left: E
10151
+ });
10152
+ }, x = () => {
10153
+ h || f.current || (g.current && (clearTimeout(g.current), g.current = null), u.current = setTimeout(() => {
10154
+ n(!0);
10155
+ }, l));
10156
+ }, k = () => {
10157
+ f.current || (u.current && clearTimeout(u.current), b > 0 ? g.current = setTimeout(() => n(!1), b) : n(!1));
10158
+ }, H = (V) => {
10159
+ V.pointerType !== "touch" && V.pointerType !== "pen" || h || (f.current = !0, u.current && (clearTimeout(u.current), u.current = null), V.stopPropagation(), n((S) => !S));
10160
+ };
10161
+ F(() => (i && (C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), () => {
10162
+ window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
10163
+ }), [i]), F(() => {
10164
+ if (!i) return;
10165
+ const V = (S) => {
10166
+ v.current?.contains(S.target) || w.current?.contains(S.target) || n(!1);
10167
+ };
10168
+ return document.addEventListener("pointerdown", V), () => {
10169
+ document.removeEventListener("pointerdown", V), f.current = !1;
10170
+ };
10171
+ }, [i]), F(() => () => {
10172
+ u.current && clearTimeout(u.current), g.current && clearTimeout(g.current);
10173
+ }, []);
10174
+ const L = () => {
10175
+ y && g.current && (clearTimeout(g.current), g.current = null);
10176
+ }, M = () => {
10177
+ y && (g.current = setTimeout(() => n(!1), b));
10178
+ };
10179
+ return /* @__PURE__ */ c(n1, { children: [/* @__PURE__ */ e("span", {
10180
+ ref: v,
10181
+ className: "tooltip-trigger",
10182
+ onMouseEnter: x,
10183
+ onMouseLeave: k,
10184
+ onFocus: x,
10185
+ onBlur: k,
10186
+ onPointerDown: H,
10187
+ children: a
10188
+ }), i && t && K1(/* @__PURE__ */ c("div", {
10189
+ ref: w,
10190
+ className: `tooltip tooltip--${r} ${y ? "tooltip--scrollable" : ""} ${d}`,
10191
+ style: {
10192
+ top: `${s.top}px`,
10193
+ left: `${s.left}px`,
10194
+ ...o !== void 0 && { maxWidth: typeof o == "number" ? `${o}px` : o },
10195
+ ...m !== void 0 && { maxHeight: typeof m == "number" ? `${m}px` : m }
10196
+ },
10197
+ onMouseEnter: L,
10198
+ onMouseLeave: M,
10199
+ children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${r}` })]
10200
+ }), document.body)] });
10201
+ }, W1 = ({ children: t, className: r, isOpen: l, noPadding: a = !1, onClose: h, onOverlayClick: d, primary: o, secondary: m, size: i = "auto", tertiary: n, title: s, titleIcon: p, usePortal: u = !1 }) => {
10126
10202
  const g = T2("Modal");
10127
10203
  $2(l);
10128
- const v = X(null), w = X(null);
10204
+ const v = K(null), w = K(null);
10129
10205
  if (F(() => {
10130
10206
  if (!l) return;
10131
10207
  const b = (C) => {
@@ -10150,13 +10226,15 @@ var W1 = ({ children: t, className: r, isOpen: l, noPadding: a = !1, onClose: h,
10150
10226
  p ? /* @__PURE__ */ e(P, { name: p }) : null,
10151
10227
  " ",
10152
10228
  s
10153
- ] }), /* @__PURE__ */ e(T, {
10154
- className: "modal__close",
10155
- icon: "clear",
10156
- onClick: h,
10157
- size: "medium",
10229
+ ] }), /* @__PURE__ */ e(X, {
10158
10230
  title: "Close modal",
10159
- variant: "ghost"
10231
+ children: /* @__PURE__ */ e(T, {
10232
+ className: "modal__close",
10233
+ icon: "clear",
10234
+ onClick: h,
10235
+ size: "medium",
10236
+ variant: "ghost"
10237
+ })
10160
10238
  })]
10161
10239
  }),
10162
10240
  t != null && /* @__PURE__ */ e("div", {
@@ -10350,92 +10428,18 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
10350
10428
  onKeyDown: o ? (u) => {
10351
10429
  (u.key === "Enter" || u.key === " ") && (u.preventDefault(), o(u));
10352
10430
  } : void 0,
10353
- children: [r, m && /* @__PURE__ */ e("button", {
10354
- className: "badge__clear",
10355
- onClick: (u) => {
10356
- u.stopPropagation(), m();
10357
- },
10358
- type: "button",
10431
+ children: [r, m && /* @__PURE__ */ e(X, {
10359
10432
  title: "Remove",
10360
- children: "×"
10433
+ children: /* @__PURE__ */ e("button", {
10434
+ className: "badge__clear",
10435
+ onClick: (u) => {
10436
+ u.stopPropagation(), m();
10437
+ },
10438
+ type: "button",
10439
+ children: "×"
10440
+ })
10361
10441
  })]
10362
10442
  });
10363
- }, J = ({ title: t, position: r = "top", delay: l = 200, children: a, disabled: h = !1, className: d = "", maxWidth: o, maxHeight: m }) => {
10364
- const [i, n] = z(!1), [s, p] = z({
10365
- top: 0,
10366
- left: 0
10367
- }), u = X(null), g = X(null), v = X(null), w = X(null), f = X(!1), y = m !== void 0, b = y ? 150 : 0, C = () => {
10368
- if (!v.current || !w.current) return;
10369
- const V = v.current.firstElementChild, S = V && V.getBoundingClientRect().width > 0 ? V.getBoundingClientRect() : v.current.getBoundingClientRect(), _ = w.current.getBoundingClientRect(), R = 8;
10370
- let B = 0, E = 0;
10371
- switch (r) {
10372
- case "top":
10373
- B = S.top - _.height - R, E = S.left + S.width / 2 - _.width / 2;
10374
- break;
10375
- case "bottom":
10376
- B = S.bottom + R, E = S.left + S.width / 2 - _.width / 2;
10377
- break;
10378
- case "left":
10379
- B = S.top + S.height / 2 - _.height / 2, E = S.left - _.width - R;
10380
- break;
10381
- case "right":
10382
- B = S.top + S.height / 2 - _.height / 2, E = S.right + R;
10383
- break;
10384
- }
10385
- const O = 8;
10386
- E < O && (E = O), E + _.width > window.innerWidth - O && (E = window.innerWidth - _.width - O), B < O && (B = O), B + _.height > window.innerHeight - O && (B = window.innerHeight - _.height - O), p({
10387
- top: B,
10388
- left: E
10389
- });
10390
- }, x = () => {
10391
- h || f.current || (g.current && (clearTimeout(g.current), g.current = null), u.current = setTimeout(() => {
10392
- n(!0);
10393
- }, l));
10394
- }, k = () => {
10395
- f.current || (u.current && clearTimeout(u.current), b > 0 ? g.current = setTimeout(() => n(!1), b) : n(!1));
10396
- }, H = (V) => {
10397
- V.pointerType !== "touch" && V.pointerType !== "pen" || h || (f.current = !0, u.current && (clearTimeout(u.current), u.current = null), V.stopPropagation(), n((S) => !S));
10398
- };
10399
- F(() => (i && (C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), () => {
10400
- window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
10401
- }), [i]), F(() => {
10402
- if (!i) return;
10403
- const V = (S) => {
10404
- v.current?.contains(S.target) || w.current?.contains(S.target) || n(!1);
10405
- };
10406
- return document.addEventListener("pointerdown", V), () => {
10407
- document.removeEventListener("pointerdown", V), f.current = !1;
10408
- };
10409
- }, [i]), F(() => () => {
10410
- u.current && clearTimeout(u.current), g.current && clearTimeout(g.current);
10411
- }, []);
10412
- const L = () => {
10413
- y && g.current && (clearTimeout(g.current), g.current = null);
10414
- }, M = () => {
10415
- y && (g.current = setTimeout(() => n(!1), b));
10416
- };
10417
- return /* @__PURE__ */ c(n1, { children: [/* @__PURE__ */ e("span", {
10418
- ref: v,
10419
- className: "tooltip-trigger",
10420
- onMouseEnter: x,
10421
- onMouseLeave: k,
10422
- onFocus: x,
10423
- onBlur: k,
10424
- onPointerDown: H,
10425
- children: a
10426
- }), i && t && K1(/* @__PURE__ */ c("div", {
10427
- ref: w,
10428
- className: `tooltip tooltip--${r} ${y ? "tooltip--scrollable" : ""} ${d}`,
10429
- style: {
10430
- top: `${s.top}px`,
10431
- left: `${s.left}px`,
10432
- ...o !== void 0 && { maxWidth: typeof o == "number" ? `${o}px` : o },
10433
- ...m !== void 0 && { maxHeight: typeof m == "number" ? `${m}px` : m }
10434
- },
10435
- onMouseEnter: L,
10436
- onMouseLeave: M,
10437
- children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${r}` })]
10438
- }), document.body)] });
10439
10443
  }, La = ({ action: t, secondaryAction: r, className: l = "", description: a, dismissLabel: h = "Dismiss", onDismiss: d, showDismiss: o = !0, title: m, variant: i = "default" }) => {
10440
10444
  const [n, s] = z(!1), p = t?.variant || (i === "default" ? "default" : i);
10441
10445
  if (n) return null;
@@ -10469,7 +10473,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
10469
10473
  children: r.text
10470
10474
  })]
10471
10475
  })]
10472
- }), o && /* @__PURE__ */ e(J, {
10476
+ }), o && /* @__PURE__ */ e(X, {
10473
10477
  title: h,
10474
10478
  children: /* @__PURE__ */ e("button", {
10475
10479
  className: "banner__dismiss",
@@ -11009,7 +11013,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11009
11013
  u && b("months");
11010
11014
  }, D = () => {
11011
11015
  u && (x(Math.floor(L.getFullYear() / O1) * O1), b("years"));
11012
- }, Q = (A) => {
11016
+ }, J = (A) => {
11013
11017
  const j = new Date(L.getFullYear(), A, 1);
11014
11018
  p ? p(j) : f(j), b("days");
11015
11019
  }, h1 = (A) => {
@@ -11035,7 +11039,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11035
11039
  }, I1 = () => y === "years" ? /* @__PURE__ */ c("div", {
11036
11040
  className: "calendar__header",
11037
11041
  children: [
11038
- /* @__PURE__ */ e(J, {
11042
+ /* @__PURE__ */ e(X, {
11039
11043
  title: "Previous years",
11040
11044
  children: /* @__PURE__ */ e("button", {
11041
11045
  type: "button",
@@ -11052,7 +11056,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11052
11056
  C + O1 - 1
11053
11057
  ]
11054
11058
  }),
11055
- /* @__PURE__ */ e(J, {
11059
+ /* @__PURE__ */ e(X, {
11056
11060
  title: "Next years",
11057
11061
  children: /* @__PURE__ */ e("button", {
11058
11062
  type: "button",
@@ -11065,7 +11069,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11065
11069
  }) : y === "months" ? /* @__PURE__ */ c("div", {
11066
11070
  className: "calendar__header",
11067
11071
  children: [
11068
- /* @__PURE__ */ e(J, {
11072
+ /* @__PURE__ */ e(X, {
11069
11073
  title: "Previous year",
11070
11074
  children: /* @__PURE__ */ e("button", {
11071
11075
  type: "button",
@@ -11080,7 +11084,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11080
11084
  onClick: D,
11081
11085
  children: L.getFullYear()
11082
11086
  }),
11083
- /* @__PURE__ */ e(J, {
11087
+ /* @__PURE__ */ e(X, {
11084
11088
  title: "Next year",
11085
11089
  children: /* @__PURE__ */ e("button", {
11086
11090
  type: "button",
@@ -11093,7 +11097,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11093
11097
  }) : /* @__PURE__ */ c("div", {
11094
11098
  className: "calendar__header",
11095
11099
  children: [
11096
- /* @__PURE__ */ e(J, {
11100
+ /* @__PURE__ */ e(X, {
11097
11101
  title: "Previous month",
11098
11102
  children: /* @__PURE__ */ e("button", {
11099
11103
  type: "button",
@@ -11119,7 +11123,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11119
11123
  children: L.getFullYear()
11120
11124
  })] })
11121
11125
  }),
11122
- /* @__PURE__ */ e(J, {
11126
+ /* @__PURE__ */ e(X, {
11123
11127
  title: "Next month",
11124
11128
  children: /* @__PURE__ */ e("button", {
11125
11129
  type: "button",
@@ -11147,7 +11151,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11147
11151
  children: W0.map((x1, M1) => /* @__PURE__ */ e("button", {
11148
11152
  type: "button",
11149
11153
  className: `calendar__month-item ${M1 === a1 && m1 === L.getFullYear() ? "calendar__month-item--selected" : ""} ${M1 === A && j === L.getFullYear() ? "calendar__month-item--current" : ""}`,
11150
- onClick: () => Q(M1),
11154
+ onClick: () => J(M1),
11151
11155
  children: x1.substring(0, 3)
11152
11156
  }, x1))
11153
11157
  });
@@ -11313,7 +11317,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11313
11317
  ]
11314
11318
  });
11315
11319
  }, c0 = ({ checked: t = !1, onChange: r, label: l, icon: a, disabled: h = !1, id: d, indeterminate: o = !1 }) => {
11316
- const m = z0(), i = d || m, n = X(null);
11320
+ const m = z0(), i = d || m, n = K(null);
11317
11321
  return F(() => {
11318
11322
  n.current && (n.current.indeterminate = o && !t);
11319
11323
  }, [o, t]), /* @__PURE__ */ c("div", {
@@ -11567,7 +11571,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11567
11571
  b: 167
11568
11572
  };
11569
11573
  return j1(g);
11570
- }), o = X(null);
11574
+ }), o = K(null);
11571
11575
  F(() => {
11572
11576
  const g = U0(t);
11573
11577
  g && d(j1(g));
@@ -11940,7 +11944,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
11940
11944
  }
11941
11945
  t.restore();
11942
11946
  }, Ua = z1(({ colors: t, duration: r = 3e3, scope: l = "fullscreen", variant: a = "confetti", particleCount: h }, d) => {
11943
- const o = X(null), m = X(0), i = X(0), n = X(!1), s = {
11947
+ const o = K(null), m = K(0), i = K(0), n = K(!1), s = {
11944
11948
  confetti: 150,
11945
11949
  burst: 200,
11946
11950
  fireworks: 8
@@ -12062,7 +12066,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12062
12066
  getAnchorEl: (m) => t[m]?.anchorEl || null
12063
12067
  };
12064
12068
  }, R1 = 20, Yr = 8, P2 = ({ children: t, visible: r, onClose: l, anchorEl: a, offset: h = Yr, placement: d = "auto" }) => {
12065
- const o = X(null), m = X(null), [i, n] = z({
12069
+ const o = K(null), m = K(null), [i, n] = z({
12066
12070
  top: 0,
12067
12071
  left: 0,
12068
12072
  placement: "bottom"
@@ -12200,7 +12204,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12200
12204
  })
12201
12205
  });
12202
12206
  }, Xr = ({ target: t, onClose: r, children: l, autoClose: a = !1 }) => {
12203
- const h = X(null), [d, o] = z(!1), [m, i] = z(() => {
12207
+ const h = K(null), [d, o] = z(!1), [m, i] = z(() => {
12204
12208
  if (!t) return { opacity: 0 };
12205
12209
  const s = t.getBoundingClientRect();
12206
12210
  return {
@@ -12275,7 +12279,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12275
12279
  className: "toast__action-button",
12276
12280
  children: a.label
12277
12281
  }),
12278
- d && /* @__PURE__ */ e(J, {
12282
+ d && /* @__PURE__ */ e(X, {
12279
12283
  title: "Close",
12280
12284
  children: /* @__PURE__ */ e("button", {
12281
12285
  onClick: n,
@@ -12412,7 +12416,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12412
12416
  const [g, v] = z(!1), [w, f] = z(0), [y, b] = z(0), [C, x] = z(0), [k, H] = z(!1), [L, M] = z(null), [V, S] = z({
12413
12417
  position: "fixed",
12414
12418
  visibility: "hidden"
12415
- }), _ = X(null), R = X(null);
12419
+ }), _ = K(null), R = K(null);
12416
12420
  F(() => {
12417
12421
  a && t instanceof Date && (f(h === "12h" ? t.getHours() % 12 || 12 : t.getHours()), b(t.getMinutes()), x(t.getSeconds()), H(t.getHours() >= 12));
12418
12422
  }, [
@@ -12430,7 +12434,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12430
12434
  }, [p, B]);
12431
12435
  const E = Z(() => {
12432
12436
  if (p || !B || !_.current || !R.current) return;
12433
- const I = _.current.getBoundingClientRect(), D = R.current.getBoundingClientRect(), Q = 16, h1 = 8, U = window.innerHeight - I.bottom - Q, d1 = I.top - Q, v1 = U < D.height && d1 > D.height ? I.top - D.height - h1 : I.bottom + h1, y1 = Math.max(Q, Math.min(v1, window.innerHeight - D.height - Q)), _1 = Math.max(Q, Math.min(I.left, window.innerWidth - D.width - Q));
12437
+ const I = _.current.getBoundingClientRect(), D = R.current.getBoundingClientRect(), J = 16, h1 = 8, U = window.innerHeight - I.bottom - J, d1 = I.top - J, v1 = U < D.height && d1 > D.height ? I.top - D.height - h1 : I.bottom + h1, y1 = Math.max(J, Math.min(v1, window.innerHeight - D.height - J)), _1 = Math.max(J, Math.min(I.left, window.innerWidth - D.width - J));
12434
12438
  S({
12435
12439
  position: "fixed",
12436
12440
  top: `${y1}px`,
@@ -12467,8 +12471,8 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12467
12471
  r?.(I), s && l !== "multiple" && !p && v(!1);
12468
12472
  return;
12469
12473
  }
12470
- const D = new Date(I), Q = h === "12h" ? k ? w % 12 + 12 : w % 12 : w;
12471
- D.setHours(Q, y, C), r?.(D), s && !p && v(!1);
12474
+ const D = new Date(I), J = h === "12h" ? k ? w % 12 + 12 : w % 12 : w;
12475
+ D.setHours(J, y, C), r?.(D), s && !p && v(!1);
12472
12476
  }, N = () => {
12473
12477
  if (!t || !(t instanceof Date)) return;
12474
12478
  const I = new Date(t), D = h === "12h" ? k ? w % 12 + 12 : w % 12 : w;
@@ -12489,7 +12493,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12489
12493
  children: t1 || m
12490
12494
  }), /* @__PURE__ */ c("div", {
12491
12495
  className: "datepicker__actions",
12492
- children: [n && t1 && /* @__PURE__ */ e(J, {
12496
+ children: [n && t1 && /* @__PURE__ */ e(X, {
12493
12497
  title: "Clear",
12494
12498
  children: /* @__PURE__ */ e("button", {
12495
12499
  type: "button",
@@ -12654,7 +12658,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12654
12658
  left: 0,
12655
12659
  width: 0,
12656
12660
  maxHeight: 300
12657
- }), [D, Q] = z(!1), h1 = X(null), U = X([]), d1 = X(null), v1 = X(null), y1 = z0(), _1 = o ?? `dropdown-${y1}`, C1 = X(null);
12661
+ }), [D, J] = z(!1), h1 = K(null), U = K([]), d1 = K(null), v1 = K(null), y1 = z0(), _1 = o ?? `dropdown-${y1}`, C1 = K(null);
12658
12662
  F(() => {
12659
12663
  if (V && x && s) {
12660
12664
  const W = new Set(N.map((c1) => c1.value)), G = [], Y = [];
@@ -12679,7 +12683,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12679
12683
  f,
12680
12684
  V
12681
12685
  ]);
12682
- const I1 = X(L);
12686
+ const I1 = K(L);
12683
12687
  F(() => {
12684
12688
  const W = I1.current;
12685
12689
  I1.current = L;
@@ -12734,7 +12738,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12734
12738
  const W = () => {
12735
12739
  if (!h1.current) return;
12736
12740
  const Y = h1.current.getBoundingClientRect(), c1 = window.visualViewport, F1 = c1?.offsetTop ?? 0, N0 = F1 + (c1?.height ?? window.innerHeight), P1 = 300, D0 = 8, w0 = N0 - Y.bottom, f0 = Y.top - F1, n0 = w0 < P1 && f0 > w0;
12737
- if (Q(n0), H) {
12741
+ if (J(n0), H) {
12738
12742
  const T0 = Math.max(0, (n0 ? f0 : w0) - D0);
12739
12743
  I({
12740
12744
  top: Y.bottom,
@@ -12978,15 +12982,17 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
12978
12982
  children: [/* @__PURE__ */ e("span", {
12979
12983
  className: "dropdown-chip__label",
12980
12984
  children: W.label
12981
- }), /* @__PURE__ */ e("button", {
12982
- type: "button",
12983
- className: "dropdown-chip__remove",
12985
+ }), /* @__PURE__ */ e(X, {
12984
12986
  title: "Remove",
12985
- disabled: a,
12986
- onClick: (G) => {
12987
- G.stopPropagation(), A(W);
12988
- },
12989
- children: e2
12987
+ children: /* @__PURE__ */ e("button", {
12988
+ type: "button",
12989
+ className: "dropdown-chip__remove",
12990
+ disabled: a,
12991
+ onClick: (G) => {
12992
+ G.stopPropagation(), A(W);
12993
+ },
12994
+ children: e2
12995
+ })
12990
12996
  })]
12991
12997
  }, `dd-chip-${W.value}`)),
12992
12998
  /* @__PURE__ */ e(V1, {
@@ -13044,7 +13050,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13044
13050
  ]
13045
13051
  });
13046
13052
  }, rc = z1(({ autoComplete: t = "on", autoFocus: r, clearable: l, disabled: a, error: h, highlighted: d, id: o, label: m, max: i, min: n, onBlur: s, onChange: p, onClick: u, onKeyDown: g, onKeyUp: v, readOnly: w = !1, required: f = !1, success: y, type: b = "date", value: C }, x) => {
13047
- const k = l && C && !a && !w, H = X(null);
13053
+ const k = l && C && !a && !w, H = K(null);
13048
13054
  return /* @__PURE__ */ c("div", {
13049
13055
  className: `input-date-wrapper${d ? " input-date-highlighted" : ""}`,
13050
13056
  children: [
@@ -13080,7 +13086,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13080
13086
  required: f
13081
13087
  }), /* @__PURE__ */ c("div", {
13082
13088
  className: "input-date-actions",
13083
- children: [k && /* @__PURE__ */ e(J, {
13089
+ children: [k && /* @__PURE__ */ e(X, {
13084
13090
  title: "Clear date",
13085
13091
  children: /* @__PURE__ */ e("button", {
13086
13092
  type: "button",
@@ -13091,7 +13097,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13091
13097
  size: "sm"
13092
13098
  })
13093
13099
  })
13094
- }), /* @__PURE__ */ e(J, {
13100
+ }), /* @__PURE__ */ e(X, {
13095
13101
  title: "Open calendar",
13096
13102
  children: /* @__PURE__ */ e("button", {
13097
13103
  type: "button",
@@ -13148,7 +13154,7 @@ var ka = ({ name: t, size: r = "medium", shape: l = "rounded", className: a = ""
13148
13154
  value: g,
13149
13155
  ref: w
13150
13156
  }),
13151
- y && /* @__PURE__ */ e(J, {
13157
+ y && /* @__PURE__ */ e(X, {
13152
13158
  title: "Clear search",
13153
13159
  children: /* @__PURE__ */ e("button", {
13154
13160
  type: "button",
@@ -13929,7 +13935,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
13929
13935
  ]
13930
13936
  })
13931
13937
  });
13932
- return u.title ? /* @__PURE__ */ e(J, {
13938
+ return u.title ? /* @__PURE__ */ e(X, {
13933
13939
  title: u.title,
13934
13940
  children: w
13935
13941
  }, u.value) : /* @__PURE__ */ e(g1.Fragment, { children: w }, u.value);
@@ -14080,7 +14086,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
14080
14086
  variant: t.variant ?? "default",
14081
14087
  children: t.label
14082
14088
  });
14083
- return /* @__PURE__ */ c(n1, { children: [t.tooltip ? /* @__PURE__ */ e(J, {
14089
+ return /* @__PURE__ */ c(n1, { children: [t.tooltip ? /* @__PURE__ */ e(X, {
14084
14090
  title: t.tooltip,
14085
14091
  position: "right",
14086
14092
  children: i
@@ -14118,7 +14124,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
14118
14124
  document.body.removeChild(r);
14119
14125
  }
14120
14126
  }, ei = ({ children: t, className: r = "", copiedLabel: l = "Copied", disabled: a = !1, errorLabel: h = "Copy failed", iconOnly: d = !1, label: o = "Copy", onCopy: m, onError: i, resetDelay: n = 1800, size: s = "medium", title: p, value: u, variant: g = "ghost" }) => {
14121
- const [v, w] = z("idle"), f = X(null);
14127
+ const [v, w] = z("idle"), f = K(null);
14122
14128
  F(() => () => {
14123
14129
  f.current && window.clearTimeout(f.current);
14124
14130
  }, []);
@@ -14144,7 +14150,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
14144
14150
  children: d ? void 0 : t || C
14145
14151
  });
14146
14152
  }, Cc = ({ code: t, size: r = "md", className: l = "" }) => {
14147
- if (!t) return /* @__PURE__ */ e(J, {
14153
+ if (!t) return /* @__PURE__ */ e(X, {
14148
14154
  title: `Unsupported country code: ${t}`,
14149
14155
  children: /* @__PURE__ */ e("div", {
14150
14156
  className: `flags flags--fallback flags--${r} ${l}`,
@@ -14157,7 +14163,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
14157
14163
  children: [/* @__PURE__ */ e("source", {
14158
14164
  srcSet: h,
14159
14165
  type: "image/webp"
14160
- }), /* @__PURE__ */ e(J, {
14166
+ }), /* @__PURE__ */ e(X, {
14161
14167
  title: `Country: ${t.toUpperCase()}`,
14162
14168
  children: /* @__PURE__ */ e("img", {
14163
14169
  src: a,
@@ -14223,7 +14229,7 @@ var mc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
14223
14229
  ]
14224
14230
  });
14225
14231
  }, bc = 45, Mc = 120, xc = 45, kc = 45, C2 = 8, _c = 4, y2 = ({ currentPage: t, totalPages: r, totalItems: l, onPageChange: a, showPagesNumbers: h = !1, pageSizeOptions: d, pageSize: o, onPageSizeChange: m, pageSizeLabel: i = "Rows", horizontalAlign: n = "left" }) => {
14226
- const { isAtLeast: s, isMobile: p } = g0(), u = X(null), [g, v] = z(p ? 0 : 2), w = Z(() => {
14232
+ const { isAtLeast: s, isMobile: p } = g0(), u = K(null), [g, v] = z(p ? 0 : 2), w = Z(() => {
14227
14233
  const C = u.current, x = C?.parentElement;
14228
14234
  if (!C || !x) return;
14229
14235
  let k = 0;
@@ -14407,7 +14413,7 @@ function Bc({ data: t, columns: r, rowKey: l, card: a, actions: h, timeline: d,
14407
14413
  const B = V.get(R), E = l(_, R), O = s && p.includes(E), o1 = H.has(E), N = m?.(_), q = `data-view__card ${o || N ? "data-view__card--clickable" : ""} ${O ? "data-view__card--selected" : ""} ${o1 ? "data-view__card--pinned" : ""} ${i?.(_) || ""}`, t1 = (D) => {
14408
14414
  D.metaKey || D.ctrlKey || D.shiftKey || D.altKey || D.button !== 0 || o && (D.preventDefault(), o(_, D));
14409
14415
  }, I = /* @__PURE__ */ c(n1, { children: [
14410
- o1 && /* @__PURE__ */ e(J, {
14416
+ o1 && /* @__PURE__ */ e(X, {
14411
14417
  title: "Pinned",
14412
14418
  children: /* @__PURE__ */ e("span", {
14413
14419
  className: "data-view__card-pin",
@@ -14528,7 +14534,7 @@ function Bc({ data: t, columns: r, rowKey: l, card: a, actions: h, timeline: d,
14528
14534
  });
14529
14535
  }
14530
14536
  function Ac({ config: t }) {
14531
- const { options: r, selectedKeys: l, onChange: a, label: h = "Columns" } = t, d = X(null), [o, m] = z(!1);
14537
+ const { options: r, selectedKeys: l, onChange: a, label: h = "Columns" } = t, d = K(null), [o, m] = z(!1);
14532
14538
  if (r.length === 0) return null;
14533
14539
  const i = (n, s) => {
14534
14540
  if (s) {
@@ -14577,7 +14583,7 @@ var $c = ({ items: t, sortKey: r, sortDirection: l, onSort: a, align: h = "left"
14577
14583
  ].filter(Boolean).join(" "),
14578
14584
  children: [t.map((m, i) => {
14579
14585
  const n = m.direction ?? "asc", s = d ? r === m.value : r === m.value && l === n;
14580
- return /* @__PURE__ */ e(J, {
14586
+ return /* @__PURE__ */ e(X, {
14581
14587
  title: `Sort by ${typeof m.label == "string" || typeof m.label == "number" ? String(m.label) : m.value}${d ? "" : ` ${n === "asc" ? "ascending" : "descending"}`}`,
14582
14588
  children: /* @__PURE__ */ e(T, {
14583
14589
  className: `mini-sort__button${s ? " is-active" : ""}`,
@@ -14594,7 +14600,7 @@ var $c = ({ items: t, sortKey: r, sortDirection: l, onSort: a, align: h = "left"
14594
14600
  children: m.label ?? m.value
14595
14601
  })
14596
14602
  }, `${m.value}-${i}`);
14597
- }), d && /* @__PURE__ */ e(J, {
14603
+ }), d && /* @__PURE__ */ e(X, {
14598
14604
  title: `Direction: ${l === "asc" ? "ascending" : "descending"}`,
14599
14605
  children: /* @__PURE__ */ e(T, {
14600
14606
  className: "mini-sort__button mini-sort__direction",
@@ -14637,7 +14643,7 @@ function Dc({ state: t }) {
14637
14643
  });
14638
14644
  }
14639
14645
  function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = b2, initialPageSize: i = b2[1], showPageSize: n = !0, card: s, actions: p, actionsWidth: u, timeline: g, onRowClick: v, rowHref: w, rowClassName: f, rowDetail: y, empty: b, initialSortKey: C = null, initialSortDirection: x = "asc", sortKey: k, sortDirection: H, onSortChange: L, miniSort: M, showCardSortControls: V = !0, desktopView: S = "table", cardMaxWidth: _, className: R, onPageChange: B, onPageSizeChange: E, currentPage: O, totalItems: o1, group: N, showResultsCount: q = !0, totalCount: t1, itemNoun: I, columnSelector: D }) {
14640
- const { isMobile: Q } = g0(), [h1, U] = z(C), [d1, v1] = z(x), [y1, _1] = z([]), C1 = o ?? y1, [I1, r1] = z(1), s1 = O ?? I1, [A, j] = z(i), [a1, m1] = z(() => t.reduce(($, l1) => (l1.width && ($[l1.key] = l1.width), $), {})), [x1, M1] = z(/* @__PURE__ */ new Set()), E1 = ($) => {
14646
+ const { isMobile: J } = g0(), [h1, U] = z(C), [d1, v1] = z(x), [y1, _1] = z([]), C1 = o ?? y1, [I1, r1] = z(1), s1 = O ?? I1, [A, j] = z(i), [a1, m1] = z(() => t.reduce(($, l1) => (l1.width && ($[l1.key] = l1.width), $), {})), [x1, M1] = z(/* @__PURE__ */ new Set()), E1 = ($) => {
14641
14647
  M1((l1) => {
14642
14648
  const p1 = new Set(l1);
14643
14649
  return p1.has($) ? p1.delete($) : p1.add($), p1;
@@ -14652,10 +14658,10 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14652
14658
  }, i0 = u1(() => new Set(a ?? []), [a]), L1 = u1(() => {
14653
14659
  let $ = r;
14654
14660
  if (N1) {
14655
- const K = t.find((e1) => e1.key === N1);
14656
- if (K) {
14657
- const e1 = K.sortAccessor || K.accessor || ((B1) => {
14658
- const S1 = B1[K.key];
14661
+ const Q = t.find((e1) => e1.key === N1);
14662
+ if (Q) {
14663
+ const e1 = Q.sortAccessor || Q.accessor || ((B1) => {
14664
+ const S1 = B1[Q.key];
14659
14665
  return typeof S1 == "string" || typeof S1 == "number" ? S1 : "";
14660
14666
  }), w1 = [...r].sort((B1, S1) => {
14661
14667
  const T1 = e1(B1), k1 = e1(S1);
@@ -14666,11 +14672,11 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14666
14672
  }
14667
14673
  if (i0.size === 0) return $;
14668
14674
  const l1 = [], p1 = [];
14669
- if ($.forEach((K, e1) => {
14670
- i0.has(G1(K, e1)) ? l1.push(K) : p1.push(K);
14675
+ if ($.forEach((Q, e1) => {
14676
+ i0.has(G1(Q, e1)) ? l1.push(Q) : p1.push(Q);
14671
14677
  }), a && a.length > 1 && l1.length > 1) {
14672
- const K = new Map(a.map((e1, w1) => [e1, w1]));
14673
- l1.sort((e1, w1) => (K.get(G1(e1, 0)) ?? 0) - (K.get(G1(w1, 0)) ?? 0));
14678
+ const Q = new Map(a.map((e1, w1) => [e1, w1]));
14679
+ l1.sort((e1, w1) => (Q.get(G1(e1, 0)) ?? 0) - (Q.get(G1(w1, 0)) ?? 0));
14674
14680
  }
14675
14681
  return [...l1, ...p1];
14676
14682
  }, [
@@ -14683,20 +14689,20 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14683
14689
  ]), D1 = o1 !== void 0, U1 = u1(() => {
14684
14690
  if (!N || D1) return L1;
14685
14691
  const $ = /* @__PURE__ */ new Map(), l1 = [];
14686
- L1.forEach((K) => {
14687
- const e1 = N.groupBy(K), w1 = $.get(e1);
14688
- w1 ? w1.push(K) : ($.set(e1, [K]), l1.push(e1));
14692
+ L1.forEach((Q) => {
14693
+ const e1 = N.groupBy(Q), w1 = $.get(e1);
14694
+ w1 ? w1.push(Q) : ($.set(e1, [Q]), l1.push(e1));
14689
14695
  });
14690
- const p1 = l1.map((K) => {
14691
- const e1 = $.get(K);
14696
+ const p1 = l1.map((Q) => {
14697
+ const e1 = $.get(Q);
14692
14698
  return {
14693
- key: K,
14694
- label: N.groupLabel(K),
14699
+ key: Q,
14700
+ label: N.groupLabel(Q),
14695
14701
  items: e1,
14696
14702
  totalCount: e1.length
14697
14703
  };
14698
14704
  });
14699
- return N.sortGroups ? p1.sort(N.sortGroups) : p1.sort((K, e1) => K.key === null ? 1 : e1.key === null ? -1 : 0), p1.flatMap((K) => K.items);
14705
+ return N.sortGroups ? p1.sort(N.sortGroups) : p1.sort((Q, e1) => Q.key === null ? 1 : e1.key === null ? -1 : 0), p1.flatMap((Q) => Q.items);
14700
14706
  }, [
14701
14707
  N,
14702
14708
  D1,
@@ -14711,17 +14717,17 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14711
14717
  }, [N, U1]), F1 = u1(() => {
14712
14718
  if (!N || !c1) return null;
14713
14719
  const $ = /* @__PURE__ */ new Map(), l1 = [];
14714
- G.forEach((K) => {
14715
- const e1 = N.groupBy(K), w1 = $.get(e1);
14716
- w1 ? w1.push(K) : ($.set(e1, [K]), l1.push(e1));
14720
+ G.forEach((Q) => {
14721
+ const e1 = N.groupBy(Q), w1 = $.get(e1);
14722
+ w1 ? w1.push(Q) : ($.set(e1, [Q]), l1.push(e1));
14717
14723
  });
14718
- const p1 = l1.map((K) => ({
14719
- key: K,
14720
- label: N.groupLabel(K),
14721
- items: $.get(K),
14722
- totalCount: c1.get(K) ?? 0
14724
+ const p1 = l1.map((Q) => ({
14725
+ key: Q,
14726
+ label: N.groupLabel(Q),
14727
+ items: $.get(Q),
14728
+ totalCount: c1.get(Q) ?? 0
14723
14729
  }));
14724
- return N.sortGroups ? p1.sort(N.sortGroups) : p1.sort((K, e1) => K.key === null ? 1 : e1.key === null ? -1 : 0), p1;
14730
+ return N.sortGroups ? p1.sort(N.sortGroups) : p1.sort((Q, e1) => Q.key === null ? 1 : e1.key === null ? -1 : 0), p1;
14725
14731
  }, [
14726
14732
  N,
14727
14733
  c1,
@@ -14735,11 +14741,11 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14735
14741
  $.sortable && (N1 === $.key ? Z1($.key, H1 === "asc" ? "desc" : "asc") : Z1($.key, "asc"));
14736
14742
  }, w0 = ($, l1) => {
14737
14743
  $.preventDefault();
14738
- const p1 = $.clientX, K = a1[l1] ?? 150, e1 = (B1) => {
14744
+ const p1 = $.clientX, Q = a1[l1] ?? 150, e1 = (B1) => {
14739
14745
  const S1 = B1.clientX - p1, T1 = t.find((k1) => k1.key === l1)?.minWidth ?? 120;
14740
14746
  m1((k1) => ({
14741
14747
  ...k1,
14742
- [l1]: Math.max(T1, K + S1)
14748
+ [l1]: Math.max(T1, Q + S1)
14743
14749
  }));
14744
14750
  }, w1 = () => {
14745
14751
  window.removeEventListener("mousemove", e1), window.removeEventListener("mouseup", w1);
@@ -14800,7 +14806,7 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14800
14806
  Z1(l1, N1 === l1 ? H1 : "asc");
14801
14807
  }
14802
14808
  })
14803
- }), /* @__PURE__ */ e(J, {
14809
+ }), /* @__PURE__ */ e(X, {
14804
14810
  title: H1 === "asc" ? "Sort descending" : "Sort ascending",
14805
14811
  children: /* @__PURE__ */ e(T, {
14806
14812
  className: "data-view__card-sort-direction",
@@ -14835,7 +14841,7 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14835
14841
  selectedIds: C1,
14836
14842
  pinnedIds: a,
14837
14843
  cardMaxWidth: _,
14838
- isMobile: Q,
14844
+ isMobile: J,
14839
14845
  groups: F1 ?? void 0,
14840
14846
  showGroupCount: N?.showCount !== !1,
14841
14847
  collapsible: N?.collapsible,
@@ -14919,22 +14925,22 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14919
14925
  secondary: b.secondary
14920
14926
  }) : /* @__PURE__ */ e(r0, { title: "No data available" })
14921
14927
  }) });
14922
- const $ = C0.length + (o0 ? 1 : 0) + (h ? 1 : 0) + (p ? 1 : 0), l1 = N?.showCount !== !1, p1 = (K, e1) => {
14923
- const w1 = G1(K, e1), B1 = C1.includes(w1), S1 = i0.has(w1), T1 = N0.get(e1), k1 = w?.(K), d2 = !!v || !!k1, M3 = (b1) => {
14928
+ const $ = C0.length + (o0 ? 1 : 0) + (h ? 1 : 0) + (p ? 1 : 0), l1 = N?.showCount !== !1, p1 = (Q, e1) => {
14929
+ const w1 = G1(Q, e1), B1 = C1.includes(w1), S1 = i0.has(w1), T1 = N0.get(e1), k1 = w?.(Q), d2 = !!v || !!k1, M3 = (b1) => {
14924
14930
  if (k1 && (b1.metaKey || b1.ctrlKey || b1.shiftKey)) {
14925
14931
  window.open(k1, "_blank", "noopener,noreferrer");
14926
14932
  return;
14927
14933
  }
14928
14934
  if (v) {
14929
- v(K, b1);
14935
+ v(Q, b1);
14930
14936
  return;
14931
14937
  }
14932
14938
  k1 && window.location.assign(k1);
14933
14939
  }, x3 = (b1) => {
14934
14940
  b1.button !== 1 || !k1 || (b1.preventDefault(), window.open(k1, "_blank", "noopener,noreferrer"));
14935
- }, Z0 = y?.(K);
14941
+ }, Z0 = y?.(Q);
14936
14942
  return /* @__PURE__ */ c(g1.Fragment, { children: [/* @__PURE__ */ c("tr", {
14937
- className: `${B1 ? "is-selected" : ""} ${d2 ? "data-view__row--clickable" : ""} ${S1 ? "data-view__row--pinned" : ""} ${f?.(K) || ""}`,
14943
+ className: `${B1 ? "is-selected" : ""} ${d2 ? "data-view__row--clickable" : ""} ${S1 ? "data-view__row--pinned" : ""} ${f?.(Q) || ""}`,
14938
14944
  onClick: d2 ? M3 : void 0,
14939
14945
  onAuxClick: k1 ? x3 : void 0,
14940
14946
  children: [
@@ -14953,14 +14959,14 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14953
14959
  }),
14954
14960
  C0.map((b1, P0) => /* @__PURE__ */ c("td", {
14955
14961
  style: a1[b1.key] ? { width: a1[b1.key] } : void 0,
14956
- children: [P0 === 0 && S1 && /* @__PURE__ */ e(J, {
14962
+ children: [P0 === 0 && S1 && /* @__PURE__ */ e(X, {
14957
14963
  title: "Pinned",
14958
14964
  children: /* @__PURE__ */ e(P, {
14959
14965
  className: "data-view__pin-indicator",
14960
14966
  name: "pin",
14961
14967
  size: "sm"
14962
14968
  })
14963
- }), q2(b1, K)]
14969
+ }), q2(b1, Q)]
14964
14970
  }, b1.key)),
14965
14971
  p && /* @__PURE__ */ e("td", {
14966
14972
  className: "data-view__actions-cell",
@@ -14968,7 +14974,7 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14968
14974
  children: /* @__PURE__ */ e("div", {
14969
14975
  className: "data-view__table-actions",
14970
14976
  onClick: (b1) => b1.stopPropagation(),
14971
- children: p(K)
14977
+ children: p(Q)
14972
14978
  })
14973
14979
  })
14974
14980
  ]
@@ -14982,10 +14988,10 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
14982
14988
  })] }, w1);
14983
14989
  };
14984
14990
  if (F1) {
14985
- let K = 0;
14991
+ let Q = 0;
14986
14992
  return F1.map((e1) => {
14987
- const w1 = K;
14988
- K += e1.items.length;
14993
+ const w1 = Q;
14994
+ Q += e1.items.length;
14989
14995
  const B1 = N?.collapsible && x1.has(e1.key);
14990
14996
  return /* @__PURE__ */ c(g1.Fragment, { children: [/* @__PURE__ */ e("tr", {
14991
14997
  className: `data-view__group-row${N?.collapsible ? " data-view__group-row--collapsible" : ""}`,
@@ -15012,7 +15018,7 @@ function ci({ columns: t, data: r, rowKey: l, pinnedIds: a, selectable: h = !1,
15012
15018
  }), !B1 && e1.items.map((S1, T1) => p1(S1, w1 + T1))] }, e1.key ?? "__null__");
15013
15019
  });
15014
15020
  }
15015
- return G.map((K, e1) => p1(K, e1));
15021
+ return G.map((Q, e1) => p1(Q, e1));
15016
15022
  })() })] })
15017
15023
  }),
15018
15024
  /* @__PURE__ */ e(y2, {
@@ -15044,7 +15050,7 @@ var t0 = (t) => {
15044
15050
  const [i, n] = z({}), [s, p] = z(() => /* @__PURE__ */ new Date()), [u, g] = z(null), [v, w] = z(d), [f, y] = z({
15045
15051
  position: "fixed",
15046
15052
  visibility: "hidden"
15047
- }), [b, C] = z(r?.start ?? ""), [x, k] = z(r?.end ?? ""), H = X(null), L = X(null), M = r ?? i, V = t0(M.start), S = t0(M.end), _ = V && S ? {
15053
+ }), [b, C] = z(r?.start ?? ""), [x, k] = z(r?.end ?? ""), H = K(null), L = K(null), M = r ?? i, V = t0(M.start), S = t0(M.end), _ = V && S ? {
15048
15054
  start: V,
15049
15055
  end: S
15050
15056
  } : void 0, R = (U) => {
@@ -15078,7 +15084,7 @@ var t0 = (t) => {
15078
15084
  }, [M.start]), F(() => {
15079
15085
  k(M.end ?? "");
15080
15086
  }, [M.end]);
15081
- const t1 = u1(() => k0(s, 1), [s]), I = d || v, D = !d && v, Q = Z(() => {
15087
+ const t1 = u1(() => k0(s, 1), [s]), I = d || v, D = !d && v, J = Z(() => {
15082
15088
  if (!D || !H.current || !L.current) return;
15083
15089
  const U = H.current.getBoundingClientRect(), d1 = L.current.getBoundingClientRect(), v1 = 16, y1 = 8, _1 = window.innerHeight - U.bottom - v1, C1 = U.top - v1, I1 = _1 < d1.height && C1 > d1.height ? U.top - d1.height - y1 : U.bottom + y1, r1 = Math.max(v1, Math.min(I1, window.innerHeight - d1.height - v1)), s1 = U.left, A = Math.max(v1, Math.min(s1, window.innerWidth - d1.width - v1));
15084
15090
  y({
@@ -15098,11 +15104,11 @@ var t0 = (t) => {
15098
15104
  });
15099
15105
  return;
15100
15106
  }
15101
- const U = requestAnimationFrame(() => requestAnimationFrame(Q));
15102
- return window.addEventListener("resize", Q), window.addEventListener("scroll", Q, !0), () => {
15103
- cancelAnimationFrame(U), window.removeEventListener("resize", Q), window.removeEventListener("scroll", Q, !0);
15107
+ const U = requestAnimationFrame(() => requestAnimationFrame(J));
15108
+ return window.addEventListener("resize", J), window.addEventListener("scroll", J, !0), () => {
15109
+ cancelAnimationFrame(U), window.removeEventListener("resize", J), window.removeEventListener("scroll", J, !0);
15104
15110
  };
15105
- }, [D, Q]), F(() => {
15111
+ }, [D, J]), F(() => {
15106
15112
  if (!D) return;
15107
15113
  const U = (v1) => {
15108
15114
  const y1 = v1.target;
@@ -15119,11 +15125,13 @@ var t0 = (t) => {
15119
15125
  children: [/* @__PURE__ */ c("div", {
15120
15126
  className: "date-range-picker__nav",
15121
15127
  children: [
15122
- /* @__PURE__ */ e(T, {
15123
- variant: "default",
15124
- icon: "caret-left",
15125
- onClick: () => p(k0(s, -1)),
15126
- title: "Previous month"
15128
+ /* @__PURE__ */ e(X, {
15129
+ title: "Previous month",
15130
+ children: /* @__PURE__ */ e(T, {
15131
+ variant: "default",
15132
+ icon: "caret-left",
15133
+ onClick: () => p(k0(s, -1))
15134
+ })
15127
15135
  }),
15128
15136
  /* @__PURE__ */ c("span", { children: [
15129
15137
  s.toLocaleString("default", { month: "long" }),
@@ -15134,11 +15142,13 @@ var t0 = (t) => {
15134
15142
  " ",
15135
15143
  t1.getFullYear()
15136
15144
  ] }),
15137
- /* @__PURE__ */ e(T, {
15138
- variant: "default",
15139
- icon: "caret-right",
15140
- onClick: () => p(k0(s, 1)),
15141
- title: "Next month"
15145
+ /* @__PURE__ */ e(X, {
15146
+ title: "Next month",
15147
+ children: /* @__PURE__ */ e(T, {
15148
+ variant: "default",
15149
+ icon: "caret-right",
15150
+ onClick: () => p(k0(s, 1))
15151
+ })
15142
15152
  })
15143
15153
  ]
15144
15154
  }), /* @__PURE__ */ c("div", {
@@ -15531,7 +15541,7 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
15531
15541
  /* @__PURE__ */ c("div", {
15532
15542
  className: "drawer__header",
15533
15543
  children: [
15534
- f && /* @__PURE__ */ e(J, {
15544
+ f && /* @__PURE__ */ e(X, {
15535
15545
  title: y,
15536
15546
  position: "bottom",
15537
15547
  children: /* @__PURE__ */ e(T, {
@@ -15561,20 +15571,22 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
15561
15571
  variant: _.variant ?? "ghost",
15562
15572
  children: _.label
15563
15573
  }), B = _.title ?? _.label;
15564
- return B ? /* @__PURE__ */ e(J, {
15574
+ return B ? /* @__PURE__ */ e(X, {
15565
15575
  title: B,
15566
15576
  position: "bottom",
15567
15577
  children: R
15568
15578
  }, _.id) : /* @__PURE__ */ e(g1.Fragment, { children: R }, _.id);
15569
15579
  })
15570
15580
  }),
15571
- !v && /* @__PURE__ */ e(T, {
15572
- className: "drawer__close",
15573
- icon: "clear",
15574
- onClick: r,
15575
- size: "medium",
15581
+ !v && /* @__PURE__ */ e(X, {
15576
15582
  title: "Close drawer",
15577
- variant: "ghost"
15583
+ children: /* @__PURE__ */ e(T, {
15584
+ className: "drawer__close",
15585
+ icon: "clear",
15586
+ onClick: r,
15587
+ size: "medium",
15588
+ variant: "ghost"
15589
+ })
15578
15590
  })
15579
15591
  ]
15580
15592
  }),
@@ -20722,7 +20734,7 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
20722
20734
  }) : r;
20723
20735
  }
20724
20736
  }, oi = ({ label: t, accept: r, multiple: l = !1, showPreview: a = !0, onFiles: h }) => {
20725
- const [d, o] = z(!1), [m, i] = z([]), n = X(null), [s, p] = z([]);
20737
+ const [d, o] = z(!1), [m, i] = z([]), n = K(null), [s, p] = z([]);
20726
20738
  F(() => {
20727
20739
  if (!a) return;
20728
20740
  const v = m.filter((w) => w.type.startsWith("image/")).map((w) => URL.createObjectURL(w));
@@ -20788,7 +20800,7 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
20788
20800
  const [r, l] = z(!1);
20789
20801
  if (t.length === 1) return /* @__PURE__ */ e("div", {
20790
20802
  className: "float-button-container",
20791
- children: /* @__PURE__ */ e(J, {
20803
+ children: /* @__PURE__ */ e(X, {
20792
20804
  title: t[0].label,
20793
20805
  position: "left",
20794
20806
  children: /* @__PURE__ */ e("button", {
@@ -20827,7 +20839,7 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
20827
20839
  children: d.label
20828
20840
  })]
20829
20841
  }, `float-button-${o}`))
20830
- })] }), /* @__PURE__ */ e(J, {
20842
+ })] }), /* @__PURE__ */ e(X, {
20831
20843
  title: "Actions menu",
20832
20844
  children: /* @__PURE__ */ e("button", {
20833
20845
  className: `float-button ${r ? "float-button--active" : ""}`,
@@ -20976,7 +20988,7 @@ var jc = ({ text: t }) => /* @__PURE__ */ e(n1, { children: u1(() => Pc(t), [t])
20976
20988
  })
20977
20989
  });
20978
20990
  }, di = ({ children: t, onLoadMore: r, hasMore: l, isLoading: a = !1, threshold: h = 0, rootMargin: d = "0px", height: o, onScrollChange: m, endMessage: i, className: n }) => {
20979
- const s = X(null), p = X(null), u = X(null), g = Z(() => {
20991
+ const s = K(null), p = K(null), u = K(null), g = Z(() => {
20980
20992
  const v = s.current;
20981
20993
  if (!v) return;
20982
20994
  const { scrollTop: w, scrollHeight: f, clientHeight: y } = v, b = {
@@ -21168,7 +21180,7 @@ function ll(t) {
21168
21180
  return t.filter((r) => r.type === "token").length;
21169
21181
  }
21170
21182
  var al = z1(({ mask: t, value: r, onChange: l, onComplete: a, placeholder: h, label: d, hint: o, error: m, highlighted: i, size: n = "md", variant: s = "default", disabled: p = !1, readOnly: u = !1, maskChar: g = "_", mono: v = !0, icon: w, suffix: f, className: y = "", id: b, name: C, autoComplete: x }, k) => {
21171
- const H = g1.useMemo(() => cl(t), [t]), L = g1.useMemo(() => ll(H), [H]), M = z0(), V = b ?? M, [S, _] = z(() => r !== void 0 ? r : ""), R = X(null);
21183
+ const H = g1.useMemo(() => cl(t), [t]), L = g1.useMemo(() => ll(H), [H]), M = z0(), V = b ?? M, [S, _] = z(() => r !== void 0 ? r : ""), R = K(null);
21172
21184
  B2(k, () => ({
21173
21185
  focus: () => R.current?.focus(),
21174
21186
  clear: () => {
@@ -21197,13 +21209,13 @@ var al = z1(({ mask: t, value: r, onChange: l, onComplete: a, placeholder: h, la
21197
21209
  }
21198
21210
  if (I.key.length !== 1 || I.ctrlKey || I.metaKey || (I.preventDefault(), S.length >= L)) return;
21199
21211
  const D = I.key;
21200
- let Q = 0;
21212
+ let J = 0;
21201
21213
  for (const d1 of H) if (d1.type === "token") {
21202
- if (Q === S.length) {
21214
+ if (J === S.length) {
21203
21215
  if (!J2[d1.key].test(D)) return;
21204
21216
  break;
21205
21217
  }
21206
- Q++;
21218
+ J++;
21207
21219
  }
21208
21220
  const { masked: h1, rawAccepted: U } = K0(S + D, H, g);
21209
21221
  _(U), l?.(U, h1), U.length === L && a?.(U, h1);
@@ -21739,7 +21751,7 @@ var ui = z1(({ autoComplete: t = "on", autoFocus: r, cols: l, disabled: a, error
21739
21751
  })]
21740
21752
  });
21741
21753
  }, M0 = (t) => Math.max(0, Math.min(1, t)), yi = ({ buckets: t, viewportStart: r, viewportEnd: l, onScrub: a, bands: h, caption: d, className: o = "" }) => {
21742
- const m = X(null), i = X(!1), n = Math.max(0, l - r), s = Math.max(1, ...t), p = Z((w) => {
21754
+ const m = K(null), i = K(!1), n = Math.max(0, l - r), s = Math.max(1, ...t), p = Z((w) => {
21743
21755
  const f = m.current;
21744
21756
  if (!f) return;
21745
21757
  const y = f.getBoundingClientRect(), b = M0((w - y.left) / y.width);
@@ -21905,7 +21917,7 @@ var ui = z1(({ autoComplete: t = "on", autoFocus: r, cols: l, disabled: a, error
21905
21917
  ]
21906
21918
  });
21907
21919
  }, ml = ({ items: t, buttonLabel: r = "Alerts", panelTitle: l = "Notifications", emptyMessage: a = "No active notifications." }) => {
21908
- const [h, d] = z(!1), [o, m] = z({ opacity: 0 }), i = X(null), n = X(null), s = t.some((u) => u.severity === "critical");
21920
+ const [h, d] = z(!1), [o, m] = z({ opacity: 0 }), i = K(null), n = K(null), s = t.some((u) => u.severity === "critical");
21909
21921
  return F(() => {
21910
21922
  if (!h || !i.current || !n.current) return;
21911
21923
  const u = requestAnimationFrame(() => {
@@ -22617,7 +22629,7 @@ ${h.textContent ?? ""}
22617
22629
  </tbody>
22618
22630
  </table><p><br></p>
22619
22631
  `, zl = 100, Vl = (t, r, l) => {
22620
- const a = X([]), h = X([]);
22632
+ const a = K([]), h = K([]);
22621
22633
  return {
22622
22634
  snapshotForUndo: Z(() => {
22623
22635
  const d = t.current;
@@ -22651,7 +22663,7 @@ ${h.textContent ?? ""}
22651
22663
  ])
22652
22664
  };
22653
22665
  }, Nl = ({ editorRef: t, snapshotForUndo: r, emitChange: l }) => {
22654
- const [a, h] = z(!1), [d, o] = z(""), [m, i] = z(""), n = X(null), s = X(null);
22666
+ const [a, h] = z(!1), [d, o] = z(""), [m, i] = z(""), n = K(null), s = K(null);
22655
22667
  return {
22656
22668
  showLinkPrompt: a,
22657
22669
  linkUrl: d,
@@ -22882,7 +22894,7 @@ ${h.textContent ?? ""}
22882
22894
  /* @__PURE__ */ c("div", {
22883
22895
  className: "rte-table-toolbar-group",
22884
22896
  children: [
22885
- /* @__PURE__ */ e(J, {
22897
+ /* @__PURE__ */ e(X, {
22886
22898
  title: "Add row above",
22887
22899
  children: /* @__PURE__ */ e("button", {
22888
22900
  type: "button",
@@ -22891,7 +22903,7 @@ ${h.textContent ?? ""}
22891
22903
  children: "↑ Row"
22892
22904
  })
22893
22905
  }),
22894
- /* @__PURE__ */ e(J, {
22906
+ /* @__PURE__ */ e(X, {
22895
22907
  title: "Add row below",
22896
22908
  children: /* @__PURE__ */ e("button", {
22897
22909
  type: "button",
@@ -22900,7 +22912,7 @@ ${h.textContent ?? ""}
22900
22912
  children: "↓ Row"
22901
22913
  })
22902
22914
  }),
22903
- /* @__PURE__ */ e(J, {
22915
+ /* @__PURE__ */ e(X, {
22904
22916
  title: "Remove last row",
22905
22917
  children: /* @__PURE__ */ e("button", {
22906
22918
  type: "button",
@@ -22915,7 +22927,7 @@ ${h.textContent ?? ""}
22915
22927
  /* @__PURE__ */ c("div", {
22916
22928
  className: "rte-table-toolbar-group",
22917
22929
  children: [
22918
- /* @__PURE__ */ e(J, {
22930
+ /* @__PURE__ */ e(X, {
22919
22931
  title: "Add column left",
22920
22932
  children: /* @__PURE__ */ e("button", {
22921
22933
  type: "button",
@@ -22924,7 +22936,7 @@ ${h.textContent ?? ""}
22924
22936
  children: "← Col"
22925
22937
  })
22926
22938
  }),
22927
- /* @__PURE__ */ e(J, {
22939
+ /* @__PURE__ */ e(X, {
22928
22940
  title: "Add column right",
22929
22941
  children: /* @__PURE__ */ e("button", {
22930
22942
  type: "button",
@@ -22933,7 +22945,7 @@ ${h.textContent ?? ""}
22933
22945
  children: "→ Col"
22934
22946
  })
22935
22947
  }),
22936
- /* @__PURE__ */ e(J, {
22948
+ /* @__PURE__ */ e(X, {
22937
22949
  title: "Remove last column",
22938
22950
  children: /* @__PURE__ */ e("button", {
22939
22951
  type: "button",
@@ -22947,7 +22959,7 @@ ${h.textContent ?? ""}
22947
22959
  /* @__PURE__ */ e("div", { className: "rte-table-toolbar-divider" }),
22948
22960
  /* @__PURE__ */ e("div", {
22949
22961
  className: "rte-table-toolbar-group",
22950
- children: /* @__PURE__ */ e(J, {
22962
+ children: /* @__PURE__ */ e(X, {
22951
22963
  title: "Delete table",
22952
22964
  children: /* @__PURE__ */ e("button", {
22953
22965
  type: "button",
@@ -22963,7 +22975,7 @@ ${h.textContent ?? ""}
22963
22975
  children: [
22964
22976
  /* @__PURE__ */ e("div", {
22965
22977
  className: "rte-toolbar-group",
22966
- children: xl.map((n) => /* @__PURE__ */ e(J, {
22978
+ children: xl.map((n) => /* @__PURE__ */ e(X, {
22967
22979
  title: n.title,
22968
22980
  children: /* @__PURE__ */ e("button", {
22969
22981
  type: "button",
@@ -22978,7 +22990,7 @@ ${h.textContent ?? ""}
22978
22990
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
22979
22991
  /* @__PURE__ */ c("div", {
22980
22992
  className: "rte-toolbar-group",
22981
- children: [Ml.map((n) => /* @__PURE__ */ e(J, {
22993
+ children: [Ml.map((n) => /* @__PURE__ */ e(X, {
22982
22994
  title: n.title,
22983
22995
  children: /* @__PURE__ */ e("button", {
22984
22996
  type: "button",
@@ -22988,7 +23000,7 @@ ${h.textContent ?? ""}
22988
23000
  },
22989
23001
  children: n.label
22990
23002
  })
22991
- }, n.command)), /* @__PURE__ */ e(J, {
23003
+ }, n.command)), /* @__PURE__ */ e(X, {
22992
23004
  title: "Task List",
22993
23005
  children: /* @__PURE__ */ c("button", {
22994
23006
  type: "button",
@@ -23003,7 +23015,7 @@ ${h.textContent ?? ""}
23003
23015
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
23004
23016
  /* @__PURE__ */ e("div", {
23005
23017
  className: "rte-toolbar-group",
23006
- children: kl.map((n) => /* @__PURE__ */ e(J, {
23018
+ children: kl.map((n) => /* @__PURE__ */ e(X, {
23007
23019
  title: `Heading ${n}`,
23008
23020
  children: /* @__PURE__ */ c("button", {
23009
23021
  type: "button",
@@ -23018,7 +23030,7 @@ ${h.textContent ?? ""}
23018
23030
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
23019
23031
  /* @__PURE__ */ e("div", {
23020
23032
  className: "rte-toolbar-group",
23021
- children: /* @__PURE__ */ e(J, {
23033
+ children: /* @__PURE__ */ e(X, {
23022
23034
  title: "Insert Link",
23023
23035
  children: /* @__PURE__ */ c("button", {
23024
23036
  type: "button",
@@ -23032,7 +23044,7 @@ ${h.textContent ?? ""}
23032
23044
  }),
23033
23045
  t && /* @__PURE__ */ c(n1, { children: [/* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }), /* @__PURE__ */ c("div", {
23034
23046
  className: "rte-toolbar-group",
23035
- children: [_l.map((n) => /* @__PURE__ */ e(J, {
23047
+ children: [_l.map((n) => /* @__PURE__ */ e(X, {
23036
23048
  title: n.title,
23037
23049
  children: /* @__PURE__ */ e("button", {
23038
23050
  type: "button",
@@ -23042,7 +23054,7 @@ ${h.textContent ?? ""}
23042
23054
  },
23043
23055
  children: n.label
23044
23056
  })
23045
- }, n.command + (n.value ?? ""))), /* @__PURE__ */ e(J, {
23057
+ }, n.command + (n.value ?? ""))), /* @__PURE__ */ e(X, {
23046
23058
  title: "Insert Table",
23047
23059
  children: /* @__PURE__ */ e("button", {
23048
23060
  type: "button",
@@ -23056,7 +23068,7 @@ ${h.textContent ?? ""}
23056
23068
  })] })
23057
23069
  ]
23058
23070
  }), Bi = ({ advanced: t = !1, error: r, format: l = "html", id: a, label: h, onBlur: d, onChange: o, placeholder: m, required: i = !1, value: n }) => {
23059
- const s = X(null), p = X(!1), u = X(null), [g, v] = z(/* @__PURE__ */ new Set());
23071
+ const s = K(null), p = K(!1), u = K(null), [g, v] = z(/* @__PURE__ */ new Set());
23060
23072
  F(() => {
23061
23073
  const r1 = s.current;
23062
23074
  if (!r1 || p.current) return;
@@ -23075,7 +23087,7 @@ ${h.textContent ?? ""}
23075
23087
  editorRef: s,
23076
23088
  snapshotForUndo: f,
23077
23089
  emitChange: w
23078
- }), { activeTable: R, tableToolbarPos: B, showTableToolbar: E, hideTableToolbar: O, addRowAbove: o1, addRowBelow: N, removeRow: q, addColumnLeft: t1, addColumnRight: I, removeColumn: D, deleteTable: Q } = Hl({
23090
+ }), { activeTable: R, tableToolbarPos: B, showTableToolbar: E, hideTableToolbar: O, addRowAbove: o1, addRowBelow: N, removeRow: q, addColumnLeft: t1, addColumnRight: I, removeColumn: D, deleteTable: J } = Hl({
23079
23091
  editorRef: s,
23080
23092
  snapshotForUndo: f,
23081
23093
  emitChange: w
@@ -23227,7 +23239,7 @@ ${h.textContent ?? ""}
23227
23239
  addColumnLeft: t1,
23228
23240
  addColumnRight: I,
23229
23241
  removeColumn: D,
23230
- deleteTable: Q
23242
+ deleteTable: J
23231
23243
  }),
23232
23244
  /* @__PURE__ */ e("div", {
23233
23245
  ref: s,
@@ -23271,7 +23283,7 @@ ${h.textContent ?? ""}
23271
23283
  behavior: "smooth"
23272
23284
  });
23273
23285
  }, [t]);
23274
- return a ? /* @__PURE__ */ e(J, {
23286
+ return a ? /* @__PURE__ */ e(X, {
23275
23287
  title: "Scroll to top",
23276
23288
  children: /* @__PURE__ */ e("button", {
23277
23289
  className: `scroll-to-top${l ? ` ${l}` : ""}`,
@@ -23344,7 +23356,7 @@ ${h.textContent ?? ""}
23344
23356
  className: "sidebar__link-label",
23345
23357
  children: M.label
23346
23358
  }),
23347
- M.count !== void 0 && /* @__PURE__ */ e(J, {
23359
+ M.count !== void 0 && /* @__PURE__ */ e(X, {
23348
23360
  title: M.countLabel,
23349
23361
  children: /* @__PURE__ */ e("span", {
23350
23362
  className: "sidebar__link-count",
@@ -23499,7 +23511,7 @@ var Ii = ({ variant: t = "text", animation: r = "pulse", width: l, height: a, bo
23499
23511
  children: s
23500
23512
  }) : /* @__PURE__ */ e(n1, { children: s });
23501
23513
  }, Gi = ({ children: t, panel: r, isPanelOpen: l, onPanelClose: a, panelTitle: h, defaultLeftPercent: d = 55, minLeftPercent: o = 25, minRightPercent: m = 20, className: i = "" }) => {
23502
- const [n, s] = z(d), p = X(null), u = X(!1);
23514
+ const [n, s] = z(d), p = K(null), u = K(!1);
23503
23515
  F(() => (l ? document.body.classList.add("split-panel-active") : document.body.classList.remove("split-panel-active"), () => {
23504
23516
  document.body.classList.remove("split-panel-active");
23505
23517
  }), [l]);
@@ -23540,7 +23552,7 @@ var Ii = ({ variant: t = "text", animation: r = "pulse", width: l, height: a, bo
23540
23552
  children: [h && /* @__PURE__ */ e("h2", {
23541
23553
  className: "split-panel__right-title",
23542
23554
  children: h
23543
- }), /* @__PURE__ */ e(J, {
23555
+ }), /* @__PURE__ */ e(X, {
23544
23556
  title: "Close panel",
23545
23557
  children: /* @__PURE__ */ e("button", {
23546
23558
  className: "split-panel__close",
@@ -23580,7 +23592,7 @@ var Ii = ({ variant: t = "text", animation: r = "pulse", width: l, height: a, bo
23580
23592
  const w = s[v];
23581
23593
  if (w <= 0) return null;
23582
23594
  const f = g.state || "default", y = g.pattern || "solid", b = El(g, w, m);
23583
- return /* @__PURE__ */ e(J, {
23595
+ return /* @__PURE__ */ e(X, {
23584
23596
  title: b,
23585
23597
  children: /* @__PURE__ */ e("div", {
23586
23598
  className: [
@@ -23664,7 +23676,7 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
23664
23676
  }, L = u1(() => /* @__PURE__ */ c("div", {
23665
23677
  className: "list-suggestions-list",
23666
23678
  children: [
23667
- /* @__PURE__ */ e(J, {
23679
+ /* @__PURE__ */ e(X, {
23668
23680
  title: a,
23669
23681
  children: /* @__PURE__ */ e("legend", { children: l || "Suggestions" })
23670
23682
  }),
@@ -24353,13 +24365,15 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
24353
24365
  boxShadow: "0 4px 16px rgba(0, 0, 0, 0.3)"
24354
24366
  },
24355
24367
  children: [
24356
- /* @__PURE__ */ e("span", {
24357
- onClick: () => {
24358
- navigator.clipboard.writeText(y), s(!0), window.setTimeout(() => s(!1), 1500);
24359
- },
24360
- style: { cursor: "pointer" },
24368
+ /* @__PURE__ */ e(X, {
24361
24369
  title: "Copy theme name",
24362
- children: y
24370
+ children: /* @__PURE__ */ e("span", {
24371
+ onClick: () => {
24372
+ navigator.clipboard.writeText(y), s(!0), window.setTimeout(() => s(!1), 1500);
24373
+ },
24374
+ style: { cursor: "pointer" },
24375
+ children: y
24376
+ })
24363
24377
  }),
24364
24378
  /* @__PURE__ */ c("span", {
24365
24379
  style: {
@@ -24454,7 +24468,7 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
24454
24468
  label: "Glow",
24455
24469
  value: "glow-effect"
24456
24470
  }
24457
- ], [f, y] = z(""), [b, C] = z(!1), [x, k] = z(!1), [H, L] = z("all"), M = X(null), V = X(!1), S = a?.trim().toLowerCase() ?? "", _ = u1(() => {
24471
+ ], [f, y] = z(""), [b, C] = z(!1), [x, k] = z(!1), [H, L] = z("all"), M = K(null), V = K(!1), S = a?.trim().toLowerCase() ?? "", _ = u1(() => {
24458
24472
  let N = p0;
24459
24473
  if (l && l.length > 0) {
24460
24474
  const q = new Set(l);
@@ -24728,7 +24742,7 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
24728
24742
  onClick: o.onClick,
24729
24743
  children: o.label
24730
24744
  }),
24731
- h && /* @__PURE__ */ e(J, {
24745
+ h && /* @__PURE__ */ e(X, {
24732
24746
  title: "Close",
24733
24747
  children: /* @__PURE__ */ e("button", {
24734
24748
  className: "toast__close",
@@ -24760,7 +24774,7 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
24760
24774
  children: m.label
24761
24775
  })]
24762
24776
  }, m.key);
24763
- return m.description ? /* @__PURE__ */ e(J, {
24777
+ return m.description ? /* @__PURE__ */ e(X, {
24764
24778
  title: m.description,
24765
24779
  children: i
24766
24780
  }, m.key) : i;
@@ -24808,17 +24822,19 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
24808
24822
  return /* @__PURE__ */ c("div", {
24809
24823
  className: u,
24810
24824
  children: [
24811
- s && /* @__PURE__ */ c(T, {
24812
- className: "memobit-toolbar__control-panel-toggle",
24813
- icon: "tune",
24814
- onClick: n?.toggle,
24815
- size: "medium",
24825
+ s && /* @__PURE__ */ e(X, {
24816
24826
  title: "Filters",
24817
- variant: "default",
24818
- children: [l && jl(l), p > 0 && /* @__PURE__ */ e("span", {
24819
- className: "memobit-toolbar__control-panel-toggle-count",
24820
- children: p
24821
- })]
24827
+ children: /* @__PURE__ */ c(T, {
24828
+ className: "memobit-toolbar__control-panel-toggle",
24829
+ icon: "tune",
24830
+ onClick: n?.toggle,
24831
+ size: "medium",
24832
+ variant: "default",
24833
+ children: [l && jl(l), p > 0 && /* @__PURE__ */ e("span", {
24834
+ className: "memobit-toolbar__control-panel-toggle-count",
24835
+ children: p
24836
+ })]
24837
+ })
24822
24838
  }),
24823
24839
  a && /* @__PURE__ */ c("div", {
24824
24840
  className: ["memobit-toolbar__heading", a.onClick ? "memobit-toolbar__heading--clickable" : ""].filter(Boolean).join(" "),
@@ -25036,7 +25052,7 @@ var L2 = 10, Wi = ({ data: t, label: r, title: l, tooltip: a, enableSearch: h =
25036
25052
  });
25037
25053
  }, Ol = 96, Yl = 6;
25038
25054
  function Ji({ items: t, renderItem: r, getKey: l, rowHeight: a, overscan: h = Yl, maxHeight: d, empty: o, className: m = "", rowClassName: i = "" }) {
25039
- const n = X(null), [s, p] = z(0), [u, g] = z(0), [v, w] = z(() => window.innerHeight), [f, y] = z(Ol), b = a && a > 0 ? a : f, C = Z((_) => {
25055
+ const n = K(null), [s, p] = z(0), [u, g] = z(0), [v, w] = z(() => window.innerHeight), [f, y] = z(Ol), b = a && a > 0 ? a : f, C = Z((_) => {
25040
25056
  p(_.currentTarget.scrollTop);
25041
25057
  }, []);
25042
25058
  F(() => {
@@ -26470,8 +26486,8 @@ var la = (function() {
26470
26486
  B.height = B.width = d * q;
26471
26487
  const t1 = d / V * q;
26472
26488
  E.scale(t1, t1), E.fillStyle = m, E.fillRect(0, 0, V, V), E.fillStyle = i, la ? E.fill(new Path2D(p3(O, L))) : M.forEach(function(I, D) {
26473
- I.forEach(function(Q, h1) {
26474
- Q && E.fillRect(h1 + L, D + L, 1, 1);
26489
+ I.forEach(function(J, h1) {
26490
+ J && E.fillRect(h1 + L, D + L, 1, 1);
26475
26491
  });
26476
26492
  }), S && (E.globalAlpha = S.opacity), N && E.drawImage(o1, S.x + L, S.y + L, S.w, S.h);
26477
26493
  }
@@ -26554,10 +26570,10 @@ var g3 = g1.forwardRef(function(r, l) {
26554
26570
  });
26555
26571
  g3.displayName = "QRCodeSVG";
26556
26572
  function nn({ isOpen: t, onClose: r }) {
26557
- const { config: l } = n2(), [a, h] = z("loading"), [d, o] = z(!1), [m, i] = z(null), [n, s] = z(""), [p, u] = z(""), [g, v] = z(""), [w, f] = z(""), [y, b] = z([]), [C, x] = z(""), [k, H] = z(!1), [L, M] = z(null), V = Z(async (Q, h1) => {
26573
+ const { config: l } = n2(), [a, h] = z("loading"), [d, o] = z(!1), [m, i] = z(null), [n, s] = z(""), [p, u] = z(""), [g, v] = z(""), [w, f] = z(""), [y, b] = z([]), [C, x] = z(""), [k, H] = z(!1), [L, M] = z(null), V = Z(async (J, h1) => {
26558
26574
  const U = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), d1 = U ? decodeURIComponent(U[1]) : null, v1 = { "Content-Type": "application/json" };
26559
26575
  d1 && (v1["X-CSRF-Token"] = d1);
26560
- const y1 = await fetch(`${l.apiBaseUrl}${Q}`, {
26576
+ const y1 = await fetch(`${l.apiBaseUrl}${J}`, {
26561
26577
  method: "POST",
26562
26578
  credentials: "include",
26563
26579
  headers: v1,
@@ -26568,8 +26584,8 @@ function nn({ isOpen: t, onClose: r }) {
26568
26584
  }, [l.apiBaseUrl]), S = Z(async () => {
26569
26585
  h("loading"), x("");
26570
26586
  try {
26571
- const Q = await (await fetch(`${l.apiBaseUrl}/auth/mfaStatus`, { credentials: "include" })).json();
26572
- o(!!Q.enabled), i(Q.method ?? null), h("overview");
26587
+ const J = await (await fetch(`${l.apiBaseUrl}/auth/mfaStatus`, { credentials: "include" })).json();
26588
+ o(!!J.enabled), i(J.method ?? null), h("overview");
26573
26589
  } catch {
26574
26590
  x("Could not load MFA status."), h("overview");
26575
26591
  }
@@ -26577,34 +26593,34 @@ function nn({ isOpen: t, onClose: r }) {
26577
26593
  F(() => {
26578
26594
  t && (v(""), f(""), x(""), b([]), S());
26579
26595
  }, [t, S]);
26580
- const _ = async (Q) => {
26596
+ const _ = async (J) => {
26581
26597
  H(!0), x("");
26582
26598
  try {
26583
- await Q();
26599
+ await J();
26584
26600
  } catch (h1) {
26585
26601
  x(h1 instanceof Error ? h1.message : "Something went wrong.");
26586
26602
  } finally {
26587
26603
  H(!1);
26588
26604
  }
26589
26605
  }, R = () => _(async () => {
26590
- const Q = await V("/auth/mfaSetupTotp");
26591
- s(Q.secret || ""), u(Q.otpauthUri || ""), v(""), h("totp-setup");
26606
+ const J = await V("/auth/mfaSetupTotp");
26607
+ s(J.secret || ""), u(J.otpauthUri || ""), v(""), h("totp-setup");
26592
26608
  }), B = () => _(async () => {
26593
- const Q = await V("/auth/mfaConfirmTotp", { code: g.trim() });
26594
- b(Q.recoveryCodes || []), h("recovery");
26609
+ const J = await V("/auth/mfaConfirmTotp", { code: g.trim() });
26610
+ b(J.recoveryCodes || []), h("recovery");
26595
26611
  }), E = () => _(async () => {
26596
26612
  await V("/auth/mfaEnableEmail"), v(""), h("email-setup");
26597
26613
  }), O = () => _(async () => {
26598
- const Q = await V("/auth/mfaConfirmEmail", { code: g.trim() });
26599
- b(Q.recoveryCodes || []), h("recovery");
26614
+ const J = await V("/auth/mfaConfirmEmail", { code: g.trim() });
26615
+ b(J.recoveryCodes || []), h("recovery");
26600
26616
  }), o1 = () => _(async () => {
26601
26617
  await V("/auth/mfaDisable", { password: w }), M({
26602
26618
  message: "Two-factor authentication disabled.",
26603
26619
  type: "success"
26604
26620
  }), f(""), await S();
26605
26621
  }), N = () => _(async () => {
26606
- const Q = await V("/auth/mfaRegenRecovery", { password: w });
26607
- b(Q.recoveryCodes || []), f(""), h("recovery");
26622
+ const J = await V("/auth/mfaRegenRecovery", { password: w });
26623
+ b(J.recoveryCodes || []), f(""), h("recovery");
26608
26624
  }), q = () => _(async () => {
26609
26625
  await V("/auth/mfaForgetDevices"), M({
26610
26626
  message: "All trusted devices have been signed out.",
@@ -26770,7 +26786,7 @@ function nn({ isOpen: t, onClose: r }) {
26770
26786
  }),
26771
26787
  /* @__PURE__ */ e("ul", {
26772
26788
  className: "MfaSetupModal__codes",
26773
- children: y.map((Q) => /* @__PURE__ */ e("li", { children: Q }, Q))
26789
+ children: y.map((J) => /* @__PURE__ */ e("li", { children: J }, J))
26774
26790
  }),
26775
26791
  /* @__PURE__ */ e(T, {
26776
26792
  variant: "default",
@@ -27083,7 +27099,7 @@ var pn = (t, r, l) => {
27083
27099
  } catch {
27084
27100
  return t.trim();
27085
27101
  }
27086
- }, sa = "1.0.46", yn = 318, ha = "61e2247", da = "2026-08-23T06:48:15.977Z", bn = "318", ma = (t) => {
27102
+ }, sa = "1.0.47", yn = 321, ha = "03538eb", da = "2026-08-23T13:13:43.316Z", bn = "321", ma = (t) => {
27087
27103
  const r = document.getElementById("mb-version-toast");
27088
27104
  if (r) {
27089
27105
  r.remove();
@@ -27107,7 +27123,7 @@ var pn = (t, r, l) => {
27107
27123
  const r = {
27108
27124
  ...t,
27109
27125
  lib: sa,
27110
- libBuildNumber: 318,
27126
+ libBuildNumber: 321,
27111
27127
  libCommit: ha,
27112
27128
  libBuildDate: da
27113
27129
  };
@@ -27299,7 +27315,7 @@ export {
27299
27315
  qi as ToggleButtons,
27300
27316
  S2 as ToggleSwitch,
27301
27317
  Xi as Toolbar,
27302
- J as Tooltip,
27318
+ X as Tooltip,
27303
27319
  Ki as TourHud,
27304
27320
  Qi as Tree,
27305
27321
  Ji as VirtualList,