@kingsimba/nc-ui 0.1.15 → 0.1.17

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.js CHANGED
@@ -2,7 +2,7 @@ var Je = Object.defineProperty;
2
2
  var Qe = (e, t, n) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var _ = (e, t, n) => Qe(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as s, jsxs as y } from "react/jsx-runtime";
5
- import xe, { useState as T, useRef as W, useMemo as ge, useEffect as L, createContext as se, useContext as X, Children as Ze, isValidElement as et, forwardRef as tt, useImperativeHandle as nt, useCallback as O, Suspense as rt } from "react";
5
+ import xe, { useState as T, useRef as W, useMemo as ge, useEffect as B, createContext as se, useContext as X, Children as Ze, isValidElement as et, forwardRef as tt, useImperativeHandle as nt, useCallback as O, Suspense as rt } from "react";
6
6
  import { createPortal as pe } from "react-dom";
7
7
  import { useTranslation as J } from "react-i18next";
8
8
  import { d as Le, E as ot, R as st, T as it, g as ct, V as at, b as lt, a as dt, c as ut } from "./GeneratedIcons-HFZmBTBT.js";
@@ -37,8 +37,8 @@ function Be({
37
37
  );
38
38
  return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
39
39
  }
40
- function Y({ variant: e = "default", block: t, size: n = "default", className: r, disabled: o, textSelectable: i, loading: l, onClick: a, children: d, ...f }) {
41
- const u = [
40
+ function Y({ variant: e = "default", block: t, size: n = "default", className: r, disabled: o, textSelectable: i, loading: l, onClick: a, children: d, ...p }) {
41
+ const f = [
42
42
  "nc-button",
43
43
  e !== "default" ? `nc-${e}` : "",
44
44
  t ? "nc-block" : "",
@@ -52,19 +52,19 @@ function Y({ variant: e = "default", block: t, size: n = "default", className: r
52
52
  return /* @__PURE__ */ y(
53
53
  "button",
54
54
  {
55
- className: u,
55
+ className: f,
56
56
  disabled: o || l,
57
57
  onClick: (c) => {
58
58
  if (!l) {
59
59
  if (i) {
60
- const p = window.getSelection();
61
- if (p && p.toString().length > 0)
60
+ const u = window.getSelection();
61
+ if (u && u.toString().length > 0)
62
62
  return;
63
63
  }
64
64
  a == null || a(c);
65
65
  }
66
66
  },
67
- ...f,
67
+ ...p,
68
68
  children: [
69
69
  l && /* @__PURE__ */ s(
70
70
  Be,
@@ -105,7 +105,7 @@ function In({
105
105
  const o = Math.max(0, Math.min(1, Number(e) || 0));
106
106
  let i;
107
107
  r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
108
- const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", a = 24, d = 14, f = 2, u = 0, w = 12, c = 0, p = 0, b = 0, g = a, v = d, N = v - c * 2, h = g - c * 2, k = Math.max(1, Math.min(4, v / 4)), m = o === 0 ? 0 : 0.05 + o * 0.95, S = a + f + w, E = 20, I = 0.65, z = Math.max(d, E * I), x = a + f + 1, A = (d - E * I) / 2;
108
+ const l = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", a = 24, d = 14, p = 2, f = 0, g = 12, c = 0, u = 0, w = 0, m = a, v = d, N = v - c * 2, h = m - c * 2, k = Math.max(1, Math.min(4, v / 4)), b = o === 0 ? 0 : 0.05 + o * 0.95, S = a + p + g, R = 20, I = 0.65, z = Math.max(d, R * I), x = a + p + 1, E = (d - R * I) / 2;
109
109
  return /* @__PURE__ */ y(
110
110
  "svg",
111
111
  {
@@ -117,21 +117,21 @@ function In({
117
117
  "aria-label": `Battery ${o === 0 ? "-" : Math.round(o * 100) + "%"} ${t}`,
118
118
  children: [
119
119
  /* @__PURE__ */ y("defs", { children: [
120
- /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: h * m, height: N, fill: "white" }) }),
120
+ /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: h * b, height: N, fill: "white" }) }),
121
121
  /* @__PURE__ */ y("mask", { id: `nc-battery-text-mask-${o}`, children: [
122
122
  /* @__PURE__ */ s("rect", { x: "0", y: "0", width: S, height: z, fill: "white" }),
123
- /* @__PURE__ */ s("text", { x: p + g / 2, y: d - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
123
+ /* @__PURE__ */ s("text", { x: u + m / 2, y: d - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
124
124
  ] })
125
125
  ] }),
126
126
  /* @__PURE__ */ y("g", { mask: `url(#nc-battery-text-mask-${o})`, children: [
127
127
  /* @__PURE__ */ s(
128
128
  "rect",
129
129
  {
130
- x: p,
131
- y: b,
130
+ x: u,
131
+ y: w,
132
132
  rx: k,
133
133
  ry: k,
134
- width: g,
134
+ width: m,
135
135
  height: v,
136
136
  fill: l
137
137
  }
@@ -139,8 +139,8 @@ function In({
139
139
  /* @__PURE__ */ s(
140
140
  "rect",
141
141
  {
142
- x: p + c,
143
- y: b + c,
142
+ x: u + c,
143
+ y: w + c,
144
144
  width: h,
145
145
  height: N,
146
146
  fill: i,
@@ -152,16 +152,16 @@ function In({
152
152
  /* @__PURE__ */ s(
153
153
  "rect",
154
154
  {
155
- x: a + u,
155
+ x: a + f,
156
156
  y: d * 0.26,
157
- width: f,
157
+ width: p,
158
158
  height: d * 0.48,
159
159
  rx: 0.8,
160
160
  ry: 0.8,
161
161
  fill: o === 1 ? i : l
162
162
  }
163
163
  ),
164
- t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${x}, ${A}) scale(${I})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
164
+ t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${x}, ${E}) scale(${I})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
165
165
  ] })
166
166
  ]
167
167
  }
@@ -205,8 +205,8 @@ function $n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
205
205
  {
206
206
  className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${a}`.trim(),
207
207
  style: l,
208
- onClick: (f) => {
209
- n || (f.preventDefault(), t(!e));
208
+ onClick: (p) => {
209
+ n || (p.preventDefault(), t(!e));
210
210
  },
211
211
  children: [
212
212
  /* @__PURE__ */ s(
@@ -216,8 +216,8 @@ function $n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
216
216
  "aria-checked": e,
217
217
  tabIndex: 0,
218
218
  className: `nc-checkbox-box ${d ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
219
- onKeyDown: (f) => {
220
- n || (f.key === "Enter" || f.key === " ") && (f.preventDefault(), t(!e));
219
+ onKeyDown: (p) => {
220
+ n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
221
221
  },
222
222
  children: e && /* @__PURE__ */ s(ht, { size: o })
223
223
  }
@@ -229,7 +229,7 @@ function $n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
229
229
  }
230
230
  function mt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
231
231
  const i = W(null), { t: l } = J();
232
- return L(() => {
232
+ return B(() => {
233
233
  r && i.current && i.current.scrollIntoView({ block: "nearest" });
234
234
  }, [r]), /* @__PURE__ */ y(
235
235
  "div",
@@ -264,40 +264,40 @@ function gt({
264
264
  small: l,
265
265
  highlightedIndex: a = -1
266
266
  }) {
267
- const [d, f] = T({ top: 0, left: 0, width: 0 }), [u, w] = T(o), { t: c } = J();
268
- if (L(() => {
267
+ const [d, p] = T({ top: 0, left: 0, width: 0 }), [f, g] = T(o), { t: c } = J();
268
+ if (B(() => {
269
269
  if (e && i.current) {
270
- const b = i.current.getBoundingClientRect();
271
- let g = o;
270
+ const w = i.current.getBoundingClientRect();
271
+ let m = o;
272
272
  if (o === "bottom") {
273
- const v = window.innerHeight - b.bottom, N = b.top;
274
- v < 320 && N > v && (g = "top");
273
+ const v = window.innerHeight - w.bottom, N = w.top;
274
+ v < 320 && N > v && (m = "top");
275
275
  }
276
- w(g), f({
277
- top: g === "top" ? b.top - 4 : b.bottom + 4,
278
- left: b.left,
279
- width: b.width
276
+ g(m), p({
277
+ top: m === "top" ? w.top - 4 : w.bottom + 4,
278
+ left: w.left,
279
+ width: w.width
280
280
  });
281
281
  }
282
282
  }, [e, i, o]), !e) return null;
283
- const p = /* @__PURE__ */ s(
283
+ const u = /* @__PURE__ */ s(
284
284
  "div",
285
285
  {
286
286
  className: "nc-combo-dropdown",
287
287
  style: {
288
288
  position: "fixed",
289
- top: u === "top" ? void 0 : d.top,
290
- bottom: u === "top" ? window.innerHeight - d.top : void 0,
289
+ top: f === "top" ? void 0 : d.top,
290
+ bottom: f === "top" ? window.innerHeight - d.top : void 0,
291
291
  left: d.left,
292
292
  width: d.width,
293
293
  zIndex: 1e3,
294
294
  maxHeight: 300,
295
295
  overflowY: "auto"
296
296
  },
297
- children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children: c("common.noResults") }) : t.map((b, g) => /* @__PURE__ */ s(mt, { option: b, onChange: n, selected: b.value === r, highlighted: g === a, small: l }, b.value))
297
+ children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${l ? "nc-small" : ""}`, children: c("common.noResults") }) : t.map((w, m) => /* @__PURE__ */ s(mt, { option: w, onChange: n, selected: w.value === r, highlighted: m === a, small: l }, w.value))
298
298
  }
299
299
  );
300
- return pe(p, document.body);
300
+ return pe(u, document.body);
301
301
  }
302
302
  function bt({ onClick: e, small: t }) {
303
303
  return /* @__PURE__ */ s(
@@ -333,68 +333,68 @@ function Rn({
333
333
  clearable: l = !0,
334
334
  allowTyping: a = !1,
335
335
  placement: d = "bottom",
336
- size: f = "default",
337
- style: u,
338
- className: w
336
+ size: p = "default",
337
+ style: f,
338
+ className: g
339
339
  }) {
340
- const [c, p] = T(!1), [b, g] = T(""), [v, N] = T(-1), h = W(null), k = W(null), m = f === "small", { t: S } = J(), E = ge(() => {
341
- const R = b.toLowerCase();
342
- return a ? r.filter((P) => P.label.toLowerCase().includes(R)) : r;
343
- }, [r, b, a]);
344
- L(() => {
340
+ const [c, u] = T(!1), [w, m] = T(""), [v, N] = T(-1), h = W(null), k = W(null), b = p === "small", { t: S } = J(), R = ge(() => {
341
+ const $ = w.toLowerCase();
342
+ return a ? r.filter((P) => P.label.toLowerCase().includes($)) : r;
343
+ }, [r, w, a]);
344
+ B(() => {
345
345
  c && N(-1);
346
- }, [c, E]), L(() => {
346
+ }, [c, R]), B(() => {
347
347
  if (!l && !e && r.length > 0 && t) {
348
- const R = r.find((P) => P.default) || r[0];
349
- t(R.value);
348
+ const $ = r.find((P) => P.default) || r[0];
349
+ t($.value);
350
350
  }
351
- }, [l, e, r, t]), L(() => {
352
- function R(P) {
351
+ }, [l, e, r, t]), B(() => {
352
+ function $(P) {
353
353
  var H;
354
- P.target instanceof Node && h.current && ((H = h.current.parentElement) != null && H.contains(P.target) || p(!1));
354
+ P.target instanceof Node && h.current && ((H = h.current.parentElement) != null && H.contains(P.target) || u(!1));
355
355
  }
356
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
356
+ return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
357
357
  }, []);
358
- const I = r.find((R) => R.value === e), z = I && l, x = !o && !z, A = !(c && a) && !!I, $ = (R, P = !1) => {
358
+ const I = r.find(($) => $.value === e), z = I && l, x = !o && !z, E = !(c && a) && !!I, A = ($, P = !1) => {
359
359
  var H;
360
- t == null || t(R), p(!1), g(""), P && ((H = h.current) == null || H.blur());
360
+ t == null || t($), u(!1), m(""), P && ((H = h.current) == null || H.blur());
361
361
  }, C = () => {
362
- t == null || t(void 0), g(""), p(!1);
363
- }, D = (R) => {
362
+ t == null || t(void 0), m(""), u(!1);
363
+ }, L = ($) => {
364
364
  if (!c) {
365
- (R.key === "ArrowDown" || R.key === "ArrowUp") && (p(!0), R.preventDefault());
365
+ ($.key === "ArrowDown" || $.key === "ArrowUp") && (u(!0), $.preventDefault());
366
366
  return;
367
367
  }
368
- switch (R.key) {
368
+ switch ($.key) {
369
369
  case "ArrowDown":
370
- R.preventDefault(), N((P) => {
370
+ $.preventDefault(), N((P) => {
371
371
  const H = P + 1;
372
- return H >= E.length ? 0 : H;
372
+ return H >= R.length ? 0 : H;
373
373
  });
374
374
  break;
375
375
  case "ArrowUp":
376
- R.preventDefault(), N((P) => {
376
+ $.preventDefault(), N((P) => {
377
377
  const H = P - 1;
378
- return H < 0 ? E.length - 1 : H;
378
+ return H < 0 ? R.length - 1 : H;
379
379
  });
380
380
  break;
381
381
  case "Enter":
382
- R.preventDefault(), v >= 0 && v < E.length && $(E[v].value, !0);
382
+ $.preventDefault(), v >= 0 && v < R.length && A(R[v].value, !0);
383
383
  break;
384
384
  case "Escape":
385
- R.preventDefault(), p(!1), g("");
385
+ $.preventDefault(), u(!1), m("");
386
386
  break;
387
387
  }
388
388
  };
389
- return /* @__PURE__ */ y("div", { className: `nc-combo-container ${w || ""}`.trim(), style: { position: "relative", ...u }, children: [
390
- i && /* @__PURE__ */ s("span", { className: `nc-label ${m ? "nc-small" : ""}`, children: i }),
389
+ return /* @__PURE__ */ y("div", { className: `nc-combo-container ${g || ""}`.trim(), style: { position: "relative", ...f }, children: [
390
+ i && /* @__PURE__ */ s("span", { className: `nc-label ${b ? "nc-small" : ""}`, children: i }),
391
391
  /* @__PURE__ */ y(
392
392
  "div",
393
393
  {
394
394
  ref: k,
395
395
  style: { position: "relative", display: "flex", alignItems: "center" },
396
- onMouseDown: (R) => {
397
- o || a && R.target === h.current || (p((P) => (!P && a && I && g(I.label), !P)), a && !c && setTimeout(() => {
396
+ onMouseDown: ($) => {
397
+ o || a && $.target === h.current || (u((P) => (!P && a && I && m(I.label), !P)), a && !c && setTimeout(() => {
398
398
  var P, H;
399
399
  (P = h.current) == null || P.focus(), (H = h.current) == null || H.select();
400
400
  }, 0));
@@ -404,37 +404,37 @@ function Rn({
404
404
  "input",
405
405
  {
406
406
  ref: h,
407
- className: `nc-input ${m ? "nc-small" : ""}`,
407
+ className: `nc-input ${b ? "nc-small" : ""}`,
408
408
  placeholder: n,
409
409
  onFocus: () => {
410
- var R;
411
- !o && a && (p(!0), I && (g(I.label), setTimeout(() => {
410
+ var $;
411
+ !o && a && (u(!0), I && (m(I.label), setTimeout(() => {
412
412
  var P;
413
413
  return (P = h.current) == null ? void 0 : P.select();
414
- }, 0))), a || (R = h.current) == null || R.blur();
414
+ }, 0))), a || ($ = h.current) == null || $.blur();
415
415
  },
416
- onChange: (R) => a && g(R.target.value),
417
- onKeyDown: D,
418
- value: c && a ? b : (I == null ? void 0 : I.label) || "",
416
+ onChange: ($) => a && m($.target.value),
417
+ onKeyDown: L,
418
+ value: c && a ? w : (I == null ? void 0 : I.label) || "",
419
419
  readOnly: o || !a,
420
420
  style: {
421
421
  width: "100%",
422
- paddingRight: x || z ? m ? 32 : 44 : 12,
422
+ paddingRight: x || z ? b ? 32 : 44 : 12,
423
423
  caretColor: a ? void 0 : "transparent",
424
424
  cursor: a ? void 0 : "pointer",
425
425
  userSelect: a ? void 0 : "none",
426
- color: A ? "transparent" : "var(--nc-text)"
426
+ color: E ? "transparent" : "var(--nc-text)"
427
427
  }
428
428
  }
429
429
  ),
430
- A && /* @__PURE__ */ y(
430
+ E && /* @__PURE__ */ y(
431
431
  "div",
432
432
  {
433
433
  "aria-hidden": !0,
434
434
  style: {
435
435
  position: "absolute",
436
- left: m ? 8 : 12,
437
- right: x || z ? m ? 12 : 24 : m ? 8 : 12,
436
+ left: b ? 8 : 12,
437
+ right: x || z ? b ? 12 : 24 : b ? 8 : 12,
438
438
  top: "50%",
439
439
  transform: "translateY(-50%)",
440
440
  pointerEvents: "none",
@@ -446,8 +446,8 @@ function Rn({
446
446
  textOverflow: "ellipsis"
447
447
  },
448
448
  children: [
449
- /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${m ? "nc-small" : ""}`, children: I == null ? void 0 : I.label }),
450
- (I == null ? void 0 : I.default) && /* @__PURE__ */ y("span", { className: `nc-combo-overlay-default ${m ? "nc-small" : ""}`, children: [
449
+ /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${b ? "nc-small" : ""}`, children: I == null ? void 0 : I.label }),
450
+ (I == null ? void 0 : I.default) && /* @__PURE__ */ y("span", { className: `nc-combo-overlay-default ${b ? "nc-small" : ""}`, children: [
451
451
  "(",
452
452
  S("common.default"),
453
453
  ")"
@@ -455,12 +455,12 @@ function Rn({
455
455
  ]
456
456
  }
457
457
  ),
458
- z && /* @__PURE__ */ s(bt, { onClick: C, small: m }),
459
- x && /* @__PURE__ */ s(vt, { open: c, onClick: () => p((R) => !R), small: m })
458
+ z && /* @__PURE__ */ s(bt, { onClick: C, small: b }),
459
+ x && /* @__PURE__ */ s(vt, { open: c, onClick: () => u(($) => !$), small: b })
460
460
  ]
461
461
  }
462
462
  ),
463
- /* @__PURE__ */ s(gt, { isOpen: c, options: E, onSelect: $, selectedValue: e, placement: d, anchorRef: k, small: m, highlightedIndex: v })
463
+ /* @__PURE__ */ s(gt, { isOpen: c, options: R, onSelect: A, selectedValue: e, placement: d, anchorRef: k, small: b, highlightedIndex: v })
464
464
  ] });
465
465
  }
466
466
  function En({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
@@ -541,35 +541,35 @@ function Ln({
541
541
  anchor: o,
542
542
  preferredDirection: i = "down"
543
543
  }) {
544
- const l = W(null), [a, d] = T({ top: 0, left: 0 }), f = o || (r == null ? void 0 : r.current);
545
- if (L(() => {
546
- if (!e || !f || !l.current) return;
547
- const c = f.getBoundingClientRect(), p = l.current.getBoundingClientRect(), b = window.innerHeight, g = window.innerWidth, v = c.bottom + 8, N = v + p.height <= b - 8;
544
+ const l = W(null), [a, d] = T({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
545
+ if (B(() => {
546
+ if (!e || !p || !l.current) return;
547
+ const c = p.getBoundingClientRect(), u = l.current.getBoundingClientRect(), w = window.innerHeight, m = window.innerWidth, v = c.bottom + 8, N = v + u.height <= w - 8;
548
548
  let h = i;
549
549
  (!N && i === "down" || i === "up" && N) && (h = "up");
550
550
  let k;
551
- h === "down" ? k = v : k = c.top - p.height - 8;
552
- let m = c.left;
553
- m + p.width > g - 8 && (m = c.right - p.width), d({
551
+ h === "down" ? k = v : k = c.top - u.height - 8;
552
+ let b = c.left;
553
+ b + u.width > m - 8 && (b = c.right - u.width), d({
554
554
  top: Math.max(8, k),
555
555
  // Ensure minimum 8px from top
556
- left: Math.max(8, m)
556
+ left: Math.max(8, b)
557
557
  // Ensure minimum 8px from left
558
558
  });
559
- }, [e, f, i]), L(() => {
559
+ }, [e, p, i]), B(() => {
560
560
  if (!e) return;
561
- const c = (b) => {
562
- l.current && !l.current.contains(b.target) && f && !f.contains(b.target) && t();
563
- }, p = (b) => {
564
- b.key === "Escape" && t();
561
+ const c = (w) => {
562
+ l.current && !l.current.contains(w.target) && p && !p.contains(w.target) && t();
563
+ }, u = (w) => {
564
+ w.key === "Escape" && t();
565
565
  };
566
- return document.addEventListener("mousedown", c), document.addEventListener("keydown", p), () => {
567
- document.removeEventListener("mousedown", c), document.removeEventListener("keydown", p);
566
+ return document.addEventListener("mousedown", c), document.addEventListener("keydown", u), () => {
567
+ document.removeEventListener("mousedown", c), document.removeEventListener("keydown", u);
568
568
  };
569
- }, [e, t, f]), !e) return null;
570
- const u = (c) => {
569
+ }, [e, t, p]), !e) return null;
570
+ const f = (c) => {
571
571
  c.type !== "separator" && !c.disabled && c.onClick && (c.onClick(), t());
572
- }, w = n.some((c) => c.icon);
572
+ }, g = n.some((c) => c.icon);
573
573
  return pe(
574
574
  /* @__PURE__ */ s(
575
575
  "div",
@@ -593,17 +593,17 @@ function Ln({
593
593
  },
594
594
  c.id
595
595
  );
596
- const p = [
596
+ const u = [
597
597
  "nc-context-menu-item",
598
598
  c.variant && c.variant !== "default" ? `nc-${c.variant}` : "",
599
599
  c.disabled ? "nc-disabled" : "",
600
- w && !c.icon ? "nc-indented" : ""
600
+ g && !c.icon ? "nc-indented" : ""
601
601
  ].filter(Boolean).join(" ");
602
602
  return /* @__PURE__ */ y(
603
603
  "button",
604
604
  {
605
- className: p,
606
- onClick: () => u(c),
605
+ className: u,
606
+ onClick: () => f(c),
607
607
  disabled: c.disabled,
608
608
  role: "menuitem",
609
609
  children: [
@@ -642,26 +642,26 @@ function Bn({
642
642
  footer: l,
643
643
  onOk: a,
644
644
  onSave: d,
645
- onDelete: f,
646
- onCancel: u,
647
- onConnect: w,
645
+ onDelete: p,
646
+ onCancel: f,
647
+ onConnect: g,
648
648
  closeOnOverlay: c = !0,
649
- primaryDisabled: p = !1,
650
- fullScreen: b = !1,
651
- hideTitleBar: g = !1,
649
+ primaryDisabled: u = !1,
650
+ fullScreen: w = !1,
651
+ hideTitleBar: m = !1,
652
652
  className: v = "",
653
653
  onContentHeightChange: N
654
654
  }) {
655
- const h = W(null), k = W(null), { t: m } = J(), S = { close: t }, E = (x) => {
655
+ const h = W(null), k = W(null), { t: b } = J(), S = { close: t }, R = (x) => {
656
656
  c && x.target === x.currentTarget && t();
657
657
  };
658
- if (L(() => {
658
+ if (B(() => {
659
659
  e && h.current && h.current.focus();
660
- }, [e]), L(() => {
660
+ }, [e]), B(() => {
661
661
  if (!N || !k.current) return;
662
- const x = new ResizeObserver((A) => {
663
- for (const $ of A) {
664
- const C = $.contentRect.height;
662
+ const x = new ResizeObserver((E) => {
663
+ for (const A of E) {
664
+ const C = A.contentRect.height;
665
665
  N(C);
666
666
  }
667
667
  });
@@ -672,31 +672,31 @@ function Bn({
672
672
  const I = () => {
673
673
  switch (i) {
674
674
  case "ok":
675
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(Y, { variant: "primary", onClick: a ?? t, disabled: p, children: m("common.ok") }) });
675
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(Y, { variant: "primary", onClick: a ?? t, disabled: u, children: b("common.ok") }) });
676
676
  case "ok-cancel":
677
677
  return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
678
- /* @__PURE__ */ s(Y, { variant: "primary", onClick: a ?? t, disabled: p, children: m("common.ok") }),
679
- /* @__PURE__ */ s(ne, { onClick: u, children: m("common.cancel") })
678
+ /* @__PURE__ */ s(Y, { variant: "primary", onClick: a ?? t, disabled: u, children: b("common.ok") }),
679
+ /* @__PURE__ */ s(ne, { onClick: f, children: b("common.cancel") })
680
680
  ] });
681
681
  case "save-cancel":
682
682
  return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
683
- /* @__PURE__ */ s(Y, { variant: "primary", onClick: d, disabled: p, children: m("common.save") }),
684
- /* @__PURE__ */ s(ne, { onClick: u, children: m("common.cancel") })
683
+ /* @__PURE__ */ s(Y, { variant: "primary", onClick: d, disabled: u, children: b("common.save") }),
684
+ /* @__PURE__ */ s(ne, { onClick: f, children: b("common.cancel") })
685
685
  ] });
686
686
  case "delete-cancel":
687
687
  return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
688
- /* @__PURE__ */ s(Y, { variant: "danger", onClick: f, disabled: p, children: m("common.delete") }),
689
- /* @__PURE__ */ s(ne, { onClick: u, children: m("common.cancel") })
688
+ /* @__PURE__ */ s(Y, { variant: "danger", onClick: p, disabled: u, children: b("common.delete") }),
689
+ /* @__PURE__ */ s(ne, { onClick: f, children: b("common.cancel") })
690
690
  ] });
691
691
  case "connect":
692
692
  return /* @__PURE__ */ y("div", { className: "nc-dialog-footer", children: [
693
- /* @__PURE__ */ s(Y, { variant: "primary", onClick: w, disabled: p, children: m("common.connect") }),
694
- /* @__PURE__ */ s(ne, { onClick: u, children: m("common.cancel") })
693
+ /* @__PURE__ */ s(Y, { variant: "primary", onClick: g, disabled: u, children: b("common.connect") }),
694
+ /* @__PURE__ */ s(ne, { onClick: f, children: b("common.cancel") })
695
695
  ] });
696
696
  case "close":
697
697
  return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary" }) });
698
698
  case "gotit":
699
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children: m("common.gotit") }) });
699
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", children: b("common.gotit") }) });
700
700
  case "custom":
701
701
  return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: l });
702
702
  case "none":
@@ -704,7 +704,7 @@ function Bn({
704
704
  default:
705
705
  return null;
706
706
  }
707
- }, z = /* @__PURE__ */ s(He.Provider, { value: S, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${b ? " nc-fullscreen" : ""}`, onClick: E, children: /* @__PURE__ */ y(
707
+ }, z = /* @__PURE__ */ s(He.Provider, { value: S, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${w ? " nc-fullscreen" : ""}`, onClick: R, children: /* @__PURE__ */ y(
708
708
  "div",
709
709
  {
710
710
  ref: h,
@@ -713,9 +713,9 @@ function Bn({
713
713
  tabIndex: -1,
714
714
  role: "dialog",
715
715
  "aria-modal": "true",
716
- "aria-labelledby": g ? void 0 : "nc-dialog-title",
716
+ "aria-labelledby": m ? void 0 : "nc-dialog-title",
717
717
  children: [
718
- !g && /* @__PURE__ */ y("div", { className: "nc-dialog-header", children: [
718
+ !m && /* @__PURE__ */ y("div", { className: "nc-dialog-header", children: [
719
719
  /* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
720
720
  /* @__PURE__ */ s(De, { onClick: t, "aria-label": "Close dialog" })
721
721
  ] }),
@@ -724,7 +724,7 @@ function Bn({
724
724
  ]
725
725
  }
726
726
  ) }) });
727
- return b ? pe(z, document.body) : z;
727
+ return w ? pe(z, document.body) : z;
728
728
  }
729
729
  function yt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
730
730
  const r = t === "small" ? 28 : 34;
@@ -793,48 +793,50 @@ function Dn({
793
793
  disabled: l,
794
794
  label: a,
795
795
  clearable: d = !0,
796
- type: f = "text",
797
- className: u = "",
798
- size: w = "default",
796
+ type: p = "text",
797
+ className: f = "",
798
+ size: g = "default",
799
799
  style: c,
800
- showPasswordToggle: p = !1,
801
- multiline: b = !1,
802
- rows: g = 3,
800
+ showPasswordToggle: u = !1,
801
+ multiline: w = !1,
802
+ rows: m = 3,
803
803
  validator: v,
804
804
  showErrorMessage: N = !0
805
805
  }) {
806
- const h = W(null), k = W(null), [m, S] = T(!1), [E, I] = T(!1), z = e !== void 0, [x, A] = T(t), $ = z ? e : x, C = v ? v($) : null, D = !!C, R = f === "password", P = R && p && !l && !b, H = d && $ && !l && E, ee = w === "small" ? 32 : 44;
806
+ const h = W(null), k = W(null), [b, S] = T(!1), [R, I] = T(!1), z = e !== void 0, [x, E] = T(t), A = z ? e : x, C = v ? v(A) : null, L = !!C, $ = p === "password", P = $ && u && !l && !w, H = d && A && !l && R, ee = g === "small" ? 32 : 44;
807
807
  let K = 12;
808
808
  H && P ? K = ee * 2 : (H || P) && (K = ee);
809
809
  const Q = () => {
810
810
  var te, ae;
811
- z || A(""), n == null || n(""), o == null || o(), b ? (te = k.current) == null || te.focus() : (ae = h.current) == null || ae.focus();
811
+ z || E(""), n == null || n(""), o == null || o(), w ? (te = k.current) == null || te.focus() : (ae = h.current) == null || ae.focus();
812
812
  }, ce = (te) => {
813
- te.key === "Enter" && !b && (r == null || r());
813
+ te.key === "Enter" && !w && (r == null || r());
814
814
  }, F = (te) => {
815
815
  const ae = te.target.value;
816
- z || A(ae), n == null || n(ae);
816
+ z || E(ae), n == null || n(ae);
817
817
  }, Se = () => {
818
818
  I(!0);
819
819
  }, Ce = () => {
820
820
  I(!1);
821
- }, Ie = `nc-input ${w === "small" ? "nc-small " : ""} ${D ? "nc-error " : ""}${u}`;
821
+ }, Ie = `nc-input ${g === "small" ? "nc-small " : ""} ${L ? "nc-error " : ""}${f}`;
822
822
  return /* @__PURE__ */ y("div", { className: "nc-col", style: { position: "relative", flex: 1, ...c }, children: [
823
823
  a && /* @__PURE__ */ s("span", { className: "nc-label", children: a }),
824
- /* @__PURE__ */ y("div", { style: { position: "relative", display: "flex", alignItems: b ? "flex-start" : "center" }, children: [
825
- b ? /* @__PURE__ */ s(
824
+ /* @__PURE__ */ y("div", { style: { position: "relative", display: "flex", alignItems: w ? "flex-start" : "center" }, children: [
825
+ w ? /* @__PURE__ */ s(
826
826
  "textarea",
827
827
  {
828
828
  ref: k,
829
829
  className: Ie,
830
830
  placeholder: i,
831
- value: $,
831
+ value: A,
832
832
  onChange: F,
833
833
  onKeyDown: ce,
834
834
  onFocus: Se,
835
835
  onBlur: Ce,
836
- disabled: l,
837
- rows: g,
836
+ readOnly: l,
837
+ "aria-disabled": l,
838
+ tabIndex: l ? -1 : void 0,
839
+ rows: m,
838
840
  style: {
839
841
  width: "100%",
840
842
  paddingRight: K
@@ -844,25 +846,27 @@ function Dn({
844
846
  "input",
845
847
  {
846
848
  ref: h,
847
- type: R && m ? "text" : f,
849
+ type: $ && b ? "text" : p,
848
850
  className: Ie,
849
851
  placeholder: i,
850
- value: $,
852
+ value: A,
851
853
  onChange: F,
852
854
  onKeyDown: ce,
853
855
  onFocus: Se,
854
856
  onBlur: Ce,
855
- disabled: l,
857
+ readOnly: l,
858
+ "aria-disabled": l,
859
+ tabIndex: l ? -1 : void 0,
856
860
  style: {
857
861
  width: "100%",
858
862
  paddingRight: K
859
863
  }
860
864
  }
861
865
  ),
862
- H && /* @__PURE__ */ s(yt, { onClick: Q, size: w, rightOffset: P ? ee + 4 : 4 }),
863
- P && /* @__PURE__ */ s(xt, { visible: m, onClick: () => S(!m), size: w })
866
+ H && /* @__PURE__ */ s(yt, { onClick: Q, size: g, rightOffset: P ? ee + 4 : 4 }),
867
+ P && /* @__PURE__ */ s(xt, { visible: b, onClick: () => S(!b), size: g })
864
868
  ] }),
865
- D && N && /* @__PURE__ */ s("span", { className: "nc-error-message", children: C })
869
+ L && N && /* @__PURE__ */ s("span", { className: "nc-error-message", children: C })
866
870
  ] });
867
871
  }
868
872
  function Hn({
@@ -879,8 +883,8 @@ function Hn({
879
883
  onClick: (d) => {
880
884
  if (t) {
881
885
  if (r) {
882
- const f = window.getSelection();
883
- if (f && f.toString().length > 0)
886
+ const p = window.getSelection();
887
+ if (p && p.toString().length > 0)
884
888
  return;
885
889
  }
886
890
  t(d);
@@ -916,31 +920,31 @@ function Wn({ title: e, titleTools: t, children: n, style: r }) {
916
920
  ] });
917
921
  }
918
922
  function On({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
919
- const [i, l] = T(!1), [a, d] = T(""), f = W(null), u = ge(() => n.filter((c) => c.label.toLowerCase().includes(a.toLowerCase())), [n, a]);
920
- L(() => {
921
- function c(p) {
922
- !(p.target instanceof Node) || !f.current || f.current.contains(p.target) || l(!1);
923
+ const [i, l] = T(!1), [a, d] = T(""), p = W(null), f = ge(() => n.filter((c) => c.label.toLowerCase().includes(a.toLowerCase())), [n, a]);
924
+ B(() => {
925
+ function c(u) {
926
+ !(u.target instanceof Node) || !p.current || p.current.contains(u.target) || l(!1);
923
927
  }
924
928
  return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
925
929
  }, []);
926
- const w = (c) => {
927
- e.includes(c) ? t(e.filter((p) => p !== c)) : t([...e, c]);
930
+ const g = (c) => {
931
+ e.includes(c) ? t(e.filter((u) => u !== c)) : t([...e, c]);
928
932
  };
929
- return /* @__PURE__ */ y("div", { ref: f, className: "nc-col", style: { position: "relative" }, children: [
933
+ return /* @__PURE__ */ y("div", { ref: p, className: "nc-col", style: { position: "relative" }, children: [
930
934
  o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
931
935
  /* @__PURE__ */ y("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
932
936
  e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
933
937
  e.map((c) => {
934
- const p = n.find((b) => b.value === c);
935
- return p ? /* @__PURE__ */ y("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
936
- p.label,
938
+ const u = n.find((w) => w.value === c);
939
+ return u ? /* @__PURE__ */ y("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
940
+ u.label,
937
941
  /* @__PURE__ */ s(
938
942
  "button",
939
943
  {
940
944
  className: "nc-button nc-ghost",
941
945
  style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
942
- onClick: () => w(c),
943
- "aria-label": `Remove ${p.label}`,
946
+ onClick: () => g(c),
947
+ "aria-label": `Remove ${u.label}`,
944
948
  children: "✕"
945
949
  }
946
950
  )
@@ -958,14 +962,14 @@ function On({ values: e, onChange: t, options: n, placeholder: r = "Select…",
958
962
  )
959
963
  ] }),
960
964
  i && /* @__PURE__ */ y("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
961
- u.map((c) => {
962
- const p = e.includes(c.value);
963
- return /* @__PURE__ */ y("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => w(c.value), children: [
965
+ f.map((c) => {
966
+ const u = e.includes(c.value);
967
+ return /* @__PURE__ */ y("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => g(c.value), children: [
964
968
  /* @__PURE__ */ s("span", { children: c.label }),
965
- /* @__PURE__ */ s("span", { children: p ? "✔️" : "" })
969
+ /* @__PURE__ */ s("span", { children: u ? "✔️" : "" })
966
970
  ] }, c.value);
967
971
  }),
968
- u.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
972
+ f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
969
973
  ] })
970
974
  ] });
971
975
  }
@@ -1006,53 +1010,54 @@ function Fn({
1006
1010
  onChange: n,
1007
1011
  label: r,
1008
1012
  className: o = "",
1009
- disabled: i = !1
1013
+ disabled: i = !1,
1014
+ size: l = "default"
1010
1015
  }) {
1011
- const [l, a] = T(!1), [d, f] = T(""), [u, w] = T(""), [c, p] = T({ top: 0, left: 0, width: 0, right: void 0 }), b = W(null), g = W(null);
1012
- L(() => {
1013
- if (l && b.current) {
1014
- const A = b.current.getBoundingClientRect(), C = Math.max(A.width, 400);
1015
- window.innerWidth - A.left < C && A.right >= C ? p({
1016
+ const [a, d] = T(!1), [p, f] = T(""), [g, c] = T(""), [u, w] = T({ top: 0, left: 0, width: 0, right: void 0 }), m = W(null), v = W(null);
1017
+ B(() => {
1018
+ if (a && m.current) {
1019
+ const A = m.current.getBoundingClientRect(), L = Math.max(A.width, 400);
1020
+ window.innerWidth - A.left < L && A.right >= L ? w({
1016
1021
  top: A.bottom + 4,
1017
1022
  left: 0,
1018
1023
  // Not used but type needs it, let's just use 0
1019
1024
  right: window.innerWidth - A.right,
1020
- width: C
1021
- }) : p({
1025
+ width: L
1026
+ }) : w({
1022
1027
  top: A.bottom + 4,
1023
1028
  left: A.left,
1024
1029
  right: void 0,
1025
- width: C
1030
+ width: L
1026
1031
  });
1027
1032
  }
1028
- }, [l]), L(() => {
1029
- if (!l) return;
1030
- const A = ($) => {
1031
- b.current && !b.current.contains($.target) && g.current && !g.current.contains($.target) && a(!1);
1033
+ }, [a]), B(() => {
1034
+ if (!a) return;
1035
+ const A = (C) => {
1036
+ m.current && !m.current.contains(C.target) && v.current && !v.current.contains(C.target) && d(!1);
1032
1037
  };
1033
1038
  return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
1034
- }, [l]);
1035
- const v = () => {
1036
- f(e || $e()), w(t || $e()), a(!0);
1037
- }, N = () => {
1038
- a(!1);
1039
+ }, [a]);
1040
+ const N = () => {
1041
+ f(e || $e()), c(t || $e()), d(!0);
1039
1042
  }, h = () => {
1040
- const A = fe(d), $ = fe(u);
1041
- if (A || $)
1043
+ d(!1);
1044
+ }, k = () => {
1045
+ const A = fe(p), C = fe(g);
1046
+ if (A || C)
1042
1047
  return;
1043
- const C = ue(d), D = ue(u);
1044
- C && D && (n == null || n(C, D)), a(!1);
1045
- }, k = e && t ? `${Me(e)} - ${Me(t)}` : "Select month range", m = fe(d), S = fe(u), E = ue(d), I = ue(u), z = E && I && E > I, x = l ? pe(
1048
+ const L = ue(p), $ = ue(g);
1049
+ L && $ && (n == null || n(L, $)), d(!1);
1050
+ }, b = e && t ? `${Me(e)} - ${Me(t)}` : "Select month range", S = fe(p), R = fe(g), I = ue(p), z = ue(g), x = I && z && I > z, E = a ? pe(
1046
1051
  /* @__PURE__ */ s(
1047
1052
  "div",
1048
1053
  {
1049
- ref: g,
1054
+ ref: v,
1050
1055
  className: "nc-month-range-picker-popup",
1051
1056
  style: {
1052
1057
  position: "fixed",
1053
- top: c.top,
1054
- ...c.right !== void 0 ? { right: c.right } : { left: c.left },
1055
- width: c.width,
1058
+ top: u.top,
1059
+ ...u.right !== void 0 ? { right: u.right } : { left: u.left },
1060
+ width: u.width,
1056
1061
  zIndex: 1e3
1057
1062
  },
1058
1063
  children: /* @__PURE__ */ y("div", { className: "nc-month-range-picker-content", children: [
@@ -1063,13 +1068,13 @@ function Fn({
1063
1068
  "input",
1064
1069
  {
1065
1070
  type: "text",
1066
- className: `nc-month-input ${m ? "nc-error" : ""}`,
1067
- value: d,
1071
+ className: `nc-month-input ${S ? "nc-error" : ""}`,
1072
+ value: p,
1068
1073
  onChange: (A) => f(A.target.value),
1069
1074
  placeholder: "YY-M(M) or YYYY-M(M)"
1070
1075
  }
1071
1076
  ),
1072
- m && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: m })
1077
+ S && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: S })
1073
1078
  ] }),
1074
1079
  /* @__PURE__ */ y("div", { className: "nc-month-range-picker-column", children: [
1075
1080
  /* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
@@ -1077,53 +1082,53 @@ function Fn({
1077
1082
  "input",
1078
1083
  {
1079
1084
  type: "text",
1080
- className: `nc-month-input ${S ? "nc-error" : ""}`,
1081
- value: u,
1082
- onChange: (A) => w(A.target.value),
1085
+ className: `nc-month-input ${R ? "nc-error" : ""}`,
1086
+ value: g,
1087
+ onChange: (A) => c(A.target.value),
1083
1088
  placeholder: "YY-M(M) or YYYY-M(M)"
1084
1089
  }
1085
1090
  ),
1086
- S && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: S })
1091
+ R && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: R })
1087
1092
  ] })
1088
1093
  ] }),
1089
- z && !m && !S && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1094
+ x && !S && !R && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1090
1095
  /* @__PURE__ */ y("div", { className: "nc-month-range-picker-footer", children: [
1091
1096
  /* @__PURE__ */ s(
1092
1097
  Y,
1093
1098
  {
1094
1099
  variant: "primary",
1095
- onClick: h,
1096
- disabled: !d || !u || !!m || !!S || !!z,
1100
+ onClick: k,
1101
+ disabled: !p || !g || !!S || !!R || !!x,
1097
1102
  children: "Apply"
1098
1103
  }
1099
1104
  ),
1100
- /* @__PURE__ */ s(Y, { variant: "ghost", onClick: N, children: "Cancel" })
1105
+ /* @__PURE__ */ s(Y, { variant: "ghost", onClick: h, children: "Cancel" })
1101
1106
  ] })
1102
1107
  ] })
1103
1108
  }
1104
1109
  ),
1105
1110
  document.body
1106
1111
  ) : null;
1107
- return /* @__PURE__ */ y("div", { className: `nc-month-range-picker ${o}`, children: [
1108
- r && /* @__PURE__ */ s("label", { className: "nc-label", children: r }),
1112
+ return /* @__PURE__ */ y("div", { className: `nc-month-range-picker ${l === "small" ? "nc-small " : ""}${o}`, children: [
1113
+ r && /* @__PURE__ */ s("label", { className: `nc-label${l === "small" ? " nc-small" : ""}`, children: r }),
1109
1114
  /* @__PURE__ */ s(
1110
1115
  "button",
1111
1116
  {
1112
- ref: b,
1113
- className: "nc-month-range-picker-input",
1114
- onClick: v,
1117
+ ref: m,
1118
+ className: `nc-month-range-picker-input${l === "small" ? " nc-small" : ""}`,
1119
+ onClick: N,
1115
1120
  disabled: i,
1116
- children: k
1121
+ children: b
1117
1122
  }
1118
1123
  ),
1119
- x
1124
+ E
1120
1125
  ] });
1121
1126
  }
1122
1127
  function Vn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: l, size: a = "default" }) {
1123
- const d = a === "small", f = () => {
1128
+ const d = a === "small", p = () => {
1124
1129
  const c = e - o;
1125
1130
  n !== void 0 && c < n || t(parseFloat(c.toFixed(10)));
1126
- }, u = () => {
1131
+ }, f = () => {
1127
1132
  const c = e + o;
1128
1133
  r !== void 0 && c > r || t(parseFloat(c.toFixed(10)));
1129
1134
  };
@@ -1137,8 +1142,8 @@ function Vn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1137
1142
  type: "number",
1138
1143
  value: e,
1139
1144
  onChange: (c) => {
1140
- const p = parseFloat(c.target.value);
1141
- isNaN(p) || n !== void 0 && p < n || r !== void 0 && p > r || t(p);
1145
+ const u = parseFloat(c.target.value);
1146
+ isNaN(u) || n !== void 0 && u < n || r !== void 0 && u > r || t(u);
1142
1147
  },
1143
1148
  min: n,
1144
1149
  max: r,
@@ -1150,7 +1155,7 @@ function Vn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1150
1155
  "button",
1151
1156
  {
1152
1157
  className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
1153
- onClick: f,
1158
+ onClick: p,
1154
1159
  disabled: l || n !== void 0 && e <= n,
1155
1160
  children: "−"
1156
1161
  }
@@ -1159,7 +1164,7 @@ function Vn({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1159
1164
  "button",
1160
1165
  {
1161
1166
  className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
1162
- onClick: u,
1167
+ onClick: f,
1163
1168
  disabled: l || r !== void 0 && e >= r,
1164
1169
  children: "+"
1165
1170
  }
@@ -1176,13 +1181,13 @@ function Gn({
1176
1181
  label: i,
1177
1182
  disabled: l,
1178
1183
  showValue: a = !0,
1179
- formatValue: d = (u) => u.toString(),
1180
- width: f = 200
1184
+ formatValue: d = (f) => f.toString(),
1185
+ width: p = 200
1181
1186
  }) {
1182
- const u = (c) => {
1183
- const p = parseFloat(c.target.value);
1184
- t(p);
1185
- }, w = (e - n) / (r - n) * 100;
1187
+ const f = (c) => {
1188
+ const u = parseFloat(c.target.value);
1189
+ t(u);
1190
+ }, g = (e - n) / (r - n) * 100;
1186
1191
  return /* @__PURE__ */ y("div", { className: "nc-col", style: { gap: 6 }, children: [
1187
1192
  i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
1188
1193
  /* @__PURE__ */ y("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
@@ -1192,14 +1197,14 @@ function Gn({
1192
1197
  type: "range",
1193
1198
  className: "nc-slider",
1194
1199
  value: e,
1195
- onChange: u,
1200
+ onChange: f,
1196
1201
  min: n,
1197
1202
  max: r,
1198
1203
  step: o,
1199
1204
  disabled: l,
1200
1205
  style: {
1201
- width: f,
1202
- "--nc-slider-percentage": `${w}%`
1206
+ width: p,
1207
+ "--nc-slider-percentage": `${g}%`
1203
1208
  }
1204
1209
  }
1205
1210
  ),
@@ -1244,87 +1249,87 @@ function Yn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
1244
1249
  const l = i.find((a) => a.props.tab === e);
1245
1250
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: l });
1246
1251
  }
1247
- function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: l, multiline: a, orientation: d = "horizontal", style: f }) {
1248
- const u = W(null), [w, c] = T(!1), [p, b] = T(!1), g = d === "verticalLeft" || d === "verticalRight", v = W(!1), N = W(0), h = W(0), k = W(!1);
1249
- L(() => {
1252
+ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: l, multiline: a, orientation: d = "horizontal", style: p }) {
1253
+ const f = W(null), [g, c] = T(!1), [u, w] = T(!1), m = d === "verticalLeft" || d === "verticalRight", v = W(!1), N = W(0), h = W(0), k = W(!1);
1254
+ B(() => {
1250
1255
  const x = () => {
1251
- if (u.current)
1252
- if (g) {
1253
- const { scrollTop: $, scrollHeight: C, clientHeight: D } = u.current;
1254
- c($ > 1), b($ < C - D - 1);
1256
+ if (f.current)
1257
+ if (m) {
1258
+ const { scrollTop: A, scrollHeight: C, clientHeight: L } = f.current;
1259
+ c(A > 1), w(A < C - L - 1);
1255
1260
  } else {
1256
- const { scrollLeft: $, scrollWidth: C, clientWidth: D } = u.current;
1257
- c($ > 1), b($ < C - D - 1);
1261
+ const { scrollLeft: A, scrollWidth: C, clientWidth: L } = f.current;
1262
+ c(A > 1), w(A < C - L - 1);
1258
1263
  }
1259
- }, A = u.current;
1260
- if (A)
1261
- return x(), A.addEventListener("scroll", x), window.addEventListener("resize", x), () => {
1262
- A.removeEventListener("scroll", x), window.removeEventListener("resize", x);
1264
+ }, E = f.current;
1265
+ if (E)
1266
+ return x(), E.addEventListener("scroll", x), window.addEventListener("resize", x), () => {
1267
+ E.removeEventListener("scroll", x), window.removeEventListener("resize", x);
1263
1268
  };
1264
- }, [e, g]);
1265
- const m = (x) => {
1266
- u.current && (v.current = !0, k.current = !1, N.current = g ? x.clientY : x.clientX, h.current = g ? u.current.scrollTop : u.current.scrollLeft, u.current.style.cursor = "grabbing", u.current.style.userSelect = "none");
1269
+ }, [e, m]);
1270
+ const b = (x) => {
1271
+ f.current && (v.current = !0, k.current = !1, N.current = m ? x.clientY : x.clientX, h.current = m ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
1267
1272
  }, S = (x) => {
1268
- if (!v.current || !u.current) return;
1269
- const A = g ? x.clientY : x.clientX, $ = N.current - A;
1270
- Math.abs($) > 3 && (k.current = !0), g ? u.current.scrollTop = h.current + $ : u.current.scrollLeft = h.current + $;
1271
- }, E = () => {
1272
- u.current && (v.current = !1, u.current.style.cursor = "", u.current.style.userSelect = "");
1273
+ if (!v.current || !f.current) return;
1274
+ const E = m ? x.clientY : x.clientX, A = N.current - E;
1275
+ Math.abs(A) > 3 && (k.current = !0), m ? f.current.scrollTop = h.current + A : f.current.scrollLeft = h.current + A;
1276
+ }, R = () => {
1277
+ f.current && (v.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
1273
1278
  }, I = () => {
1274
- E();
1279
+ R();
1275
1280
  };
1276
- L(() => {
1277
- const x = u.current;
1278
- if (!x || g) return;
1279
- const A = ($) => {
1280
- $.deltaY !== 0 && ($.preventDefault(), x.scrollLeft += $.deltaY * 0.3);
1281
+ B(() => {
1282
+ const x = f.current;
1283
+ if (!x || m) return;
1284
+ const E = (A) => {
1285
+ A.deltaY !== 0 && (A.preventDefault(), x.scrollLeft += A.deltaY * 0.3);
1281
1286
  };
1282
- return x.addEventListener("wheel", A, { passive: !1 }), () => {
1283
- x.removeEventListener("wheel", A);
1287
+ return x.addEventListener("wheel", E, { passive: !1 }), () => {
1288
+ x.removeEventListener("wheel", E);
1284
1289
  };
1285
- }, [g]);
1290
+ }, [m]);
1286
1291
  const z = (x) => {
1287
1292
  k.current || n(x);
1288
1293
  };
1289
- return /* @__PURE__ */ y("div", { className: `nc-tab-container ${g ? `nc-vertical nc-${d}` : ""} ${i || ""}`, style: f, children: [
1294
+ return /* @__PURE__ */ y("div", { className: `nc-tab-container ${m ? `nc-vertical nc-${d}` : ""} ${i || ""}`, style: p, children: [
1290
1295
  /* @__PURE__ */ y("div", { className: "nc-tab-scroll-wrapper", children: [
1291
- w && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-top" : "nc-left"}`, children: g ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(lt, { size: 16 }) }),
1296
+ g && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-top" : "nc-left"}`, children: m ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(lt, { size: 16 }) }),
1292
1297
  /* @__PURE__ */ s(
1293
1298
  "div",
1294
1299
  {
1295
- ref: u,
1300
+ ref: f,
1296
1301
  className: `nc-tab-scroll ${a ? "nc-multiline" : ""}`,
1297
- onMouseDown: m,
1302
+ onMouseDown: b,
1298
1303
  onMouseMove: S,
1299
- onMouseUp: E,
1304
+ onMouseUp: R,
1300
1305
  onMouseLeave: I,
1301
1306
  style: { cursor: "grab" },
1302
1307
  children: e.map((x) => {
1303
- const A = typeof x == "string" ? x : x.id, $ = typeof x == "string" ? x : x.label, C = r && !(o != null && o.includes(A));
1308
+ const E = typeof x == "string" ? x : x.id, A = typeof x == "string" ? x : x.label, C = r && !(o != null && o.includes(E));
1304
1309
  return /* @__PURE__ */ y(
1305
1310
  "div",
1306
1311
  {
1307
- className: `nc-tab-item ${t === A ? "nc-active" : ""} ${C ? "nc-closable" : ""}`,
1308
- onClick: () => z(A),
1312
+ className: `nc-tab-item ${t === E ? "nc-active" : ""} ${C ? "nc-closable" : ""}`,
1313
+ onClick: () => z(E),
1309
1314
  role: "button",
1310
1315
  tabIndex: 0,
1311
- onKeyDown: (D) => {
1312
- (D.key === "Enter" || D.key === " ") && n(A);
1316
+ onKeyDown: (L) => {
1317
+ (L.key === "Enter" || L.key === " ") && n(E);
1313
1318
  },
1314
1319
  children: [
1315
- /* @__PURE__ */ s("span", { className: "nc-tab-label", children: g ? $ : typeof $ == "string" ? $.toUpperCase() : $ }),
1320
+ /* @__PURE__ */ s("span", { className: "nc-tab-label", children: m ? A : typeof A == "string" ? A.toUpperCase() : A }),
1316
1321
  C && /* @__PURE__ */ s(
1317
1322
  "span",
1318
1323
  {
1319
1324
  className: "nc-tab-close",
1320
1325
  role: "button",
1321
1326
  tabIndex: 0,
1322
- "aria-label": `Close ${typeof $ == "string" ? $ : A}`,
1323
- onClick: (D) => {
1324
- D.stopPropagation(), r(A);
1327
+ "aria-label": `Close ${typeof A == "string" ? A : E}`,
1328
+ onClick: (L) => {
1329
+ L.stopPropagation(), r(E);
1325
1330
  },
1326
- onKeyDown: (D) => {
1327
- (D.key === "Enter" || D.key === " ") && (D.stopPropagation(), r(A));
1331
+ onKeyDown: (L) => {
1332
+ (L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(E));
1328
1333
  },
1329
1334
  children: /* @__PURE__ */ y("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1330
1335
  /* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
@@ -1334,12 +1339,12 @@ function jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
1334
1339
  )
1335
1340
  ]
1336
1341
  },
1337
- A
1342
+ E
1338
1343
  );
1339
1344
  })
1340
1345
  }
1341
1346
  ),
1342
- p && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-bottom" : "nc-right"}`, children: g ? /* @__PURE__ */ s(dt, { size: 16 }) : /* @__PURE__ */ s(ut, { size: 16 }) })
1347
+ u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${m ? "nc-bottom" : "nc-right"}`, children: m ? /* @__PURE__ */ s(dt, { size: 16 }) : /* @__PURE__ */ s(ut, { size: 16 }) })
1343
1348
  ] }),
1344
1349
  l && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: l })
1345
1350
  ] });
@@ -1417,13 +1422,13 @@ function St(e, t, n, r) {
1417
1422
  const o = e.split(`
1418
1423
  `), i = Math.max(1, Math.min(t, o.length));
1419
1424
  let l = 0;
1420
- for (let w = 0; w < i - 1; w++)
1421
- l += o[w].length + 1;
1422
- const d = o[i - 1].split(" "), f = Math.max(1, Math.min(n, d.length));
1423
- for (let w = 0; w < f - 1; w++)
1424
- l += d[w].length + 1;
1425
- const u = Math.max(1, Math.min(r, d[f - 1].length + 1));
1426
- return l += u - 1, l;
1425
+ for (let g = 0; g < i - 1; g++)
1426
+ l += o[g].length + 1;
1427
+ const d = o[i - 1].split(" "), p = Math.max(1, Math.min(n, d.length));
1428
+ for (let g = 0; g < p - 1; g++)
1429
+ l += d[g].length + 1;
1430
+ const f = Math.max(1, Math.min(r, d[p - 1].length + 1));
1431
+ return l += f - 1, l;
1427
1432
  }
1428
1433
  function Ct(e, t) {
1429
1434
  const n = e.split(`
@@ -1434,78 +1439,78 @@ function Ct(e, t) {
1434
1439
  return o;
1435
1440
  }
1436
1441
  const _n = tt(
1437
- function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: l = !1, onCursorChange: a, highlightLine: d }, f) {
1438
- const u = W(null), w = W(null), c = W(null);
1439
- nt(f, () => ({
1442
+ function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: l = !1, onCursorChange: a, highlightLine: d }, p) {
1443
+ const f = W(null), g = W(null), c = W(null);
1444
+ nt(p, () => ({
1440
1445
  goToLine(h) {
1441
- const k = u.current;
1446
+ const k = f.current;
1442
1447
  if (!k) return;
1443
- const m = Ct(t, h);
1444
- k.focus(), k.setSelectionRange(m, m);
1448
+ const b = Ct(t, h);
1449
+ k.focus(), k.setSelectionRange(b, b);
1445
1450
  const S = parseFloat(getComputedStyle(k).lineHeight) || 18;
1446
- k.scrollTop = (Math.max(1, h) - 1) * S, b(), p();
1451
+ k.scrollTop = (Math.max(1, h) - 1) * S, w(), u();
1447
1452
  },
1448
- goToPosition(h, k, m) {
1449
- const S = u.current;
1453
+ goToPosition(h, k, b) {
1454
+ const S = f.current;
1450
1455
  if (!S) return;
1451
- const E = St(t, h, k, m);
1452
- S.focus(), S.setSelectionRange(E, E);
1456
+ const R = St(t, h, k, b);
1457
+ S.focus(), S.setSelectionRange(R, R);
1453
1458
  const I = parseFloat(getComputedStyle(S).lineHeight) || 18;
1454
- S.scrollTop = (Math.max(1, h) - 1) * I, b(), p();
1459
+ S.scrollTop = (Math.max(1, h) - 1) * I, w(), u();
1455
1460
  }
1456
1461
  }), [t]);
1457
- const p = O(() => {
1458
- if (!a || !u.current) return;
1459
- const h = At(t, u.current.selectionStart);
1462
+ const u = O(() => {
1463
+ if (!a || !f.current) return;
1464
+ const h = At(t, f.current.selectionStart);
1460
1465
  a(h);
1461
- }, [a, t]), b = O(() => {
1462
- const h = u.current;
1463
- h && (w.current && (w.current.scrollTop = h.scrollTop, w.current.scrollLeft = h.scrollLeft), c.current && (c.current.scrollTop = h.scrollTop));
1466
+ }, [a, t]), w = O(() => {
1467
+ const h = f.current;
1468
+ h && (g.current && (g.current.scrollTop = h.scrollTop, g.current.scrollLeft = h.scrollLeft), c.current && (c.current.scrollTop = h.scrollTop));
1464
1469
  }, []);
1465
- L(() => {
1470
+ B(() => {
1466
1471
  if (d == null || d < 1) return;
1467
- const h = u.current;
1472
+ const h = f.current;
1468
1473
  if (!h) return;
1469
- const k = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (d - 1) * k, S = m + k;
1470
- (m < h.scrollTop || S > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 + k / 2), b();
1474
+ const k = parseFloat(getComputedStyle(h).lineHeight) || 18, b = (d - 1) * k, S = b + k;
1475
+ (b < h.scrollTop || S > h.scrollTop + h.clientHeight) && (h.scrollTop = b - h.clientHeight / 2 + k / 2), w();
1471
1476
  }, [d]);
1472
- const g = ge(() => t.split(`
1477
+ const m = ge(() => t.split(`
1473
1478
  `).length, [t]), v = () => {
1474
1479
  const h = [];
1475
- for (let k = 1; k <= g; k++)
1480
+ for (let k = 1; k <= m; k++)
1476
1481
  h.push(
1477
1482
  /* @__PURE__ */ s("div", { className: `nc-csv-line-number ${d === k ? "nc-csv-highlight" : ""}`, children: k }, k)
1478
1483
  );
1479
1484
  return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: c, children: h });
1480
1485
  }, N = (h) => h ? h.split(`
1481
- `).map((m, S) => {
1482
- const E = m.split(" ");
1486
+ `).map((b, S) => {
1487
+ const R = b.split(" ");
1483
1488
  return /* @__PURE__ */ y("div", { className: `nc-csv-line ${d === S + 1 ? "nc-csv-highlight" : ""}`, children: [
1484
- E.map((I, z) => /* @__PURE__ */ y("span", { children: [
1489
+ R.map((I, z) => /* @__PURE__ */ y("span", { children: [
1485
1490
  z > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1486
1491
  /* @__PURE__ */ s("span", { style: { color: Re[z % Re.length] }, children: I })
1487
1492
  ] }, z)),
1488
- m === "" && `
1493
+ b === "" && `
1489
1494
  `
1490
1495
  ] }, S);
1491
1496
  }) : null;
1492
1497
  return /* @__PURE__ */ y("div", { className: `nc-csv-textarea-container ${l ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
1493
1498
  l && v(),
1494
1499
  /* @__PURE__ */ y("div", { className: "nc-csv-textarea-editor", children: [
1495
- /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: w, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: N(t) }) }),
1500
+ /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: g, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: N(t) }) }),
1496
1501
  /* @__PURE__ */ s(
1497
1502
  "textarea",
1498
1503
  {
1499
- ref: u,
1504
+ ref: f,
1500
1505
  className: "nc-csv-textarea-input",
1501
1506
  value: t,
1502
1507
  onChange: (h) => {
1503
- n(h.target.value), requestAnimationFrame(p);
1508
+ n(h.target.value), requestAnimationFrame(u);
1504
1509
  },
1505
- onScroll: b,
1506
- onSelect: p,
1507
- onKeyUp: p,
1508
- onClick: p,
1510
+ onScroll: w,
1511
+ onSelect: u,
1512
+ onKeyUp: u,
1513
+ onClick: u,
1509
1514
  placeholder: r,
1510
1515
  spellCheck: !1,
1511
1516
  autoComplete: "off",
@@ -1595,22 +1600,22 @@ function $t({ notification: e }) {
1595
1600
  }
1596
1601
  function Un() {
1597
1602
  const [e, t] = T([]), [n, r] = T(/* @__PURE__ */ new Map()), [o, i] = T(/* @__PURE__ */ new Set()), l = W(null), a = W([]);
1598
- return L(() => It((f) => {
1599
- const u = new Set(a.current.map((c) => c.id)), w = f.filter((c) => !u.has(c.id)).map((c) => c.id);
1600
- w.length > 0 ? (t(f), i(new Set(w)), requestAnimationFrame(() => {
1603
+ return B(() => It((p) => {
1604
+ const f = new Set(a.current.map((c) => c.id)), g = p.filter((c) => !f.has(c.id)).map((c) => c.id);
1605
+ g.length > 0 ? (t(p), i(new Set(g)), requestAnimationFrame(() => {
1601
1606
  requestAnimationFrame(() => {
1602
1607
  i(/* @__PURE__ */ new Set());
1603
1608
  });
1604
- })) : t(f), a.current = f;
1605
- }), []), L(() => {
1609
+ })) : t(p), a.current = p;
1610
+ }), []), B(() => {
1606
1611
  if (!l.current) return;
1607
1612
  const d = /* @__PURE__ */ new Map();
1608
- let f = 0;
1609
- const u = l.current.children;
1610
- e.forEach((w, c) => {
1611
- if (d.set(w.id, f), u[c]) {
1612
- const p = u[c].offsetHeight;
1613
- w.isRemoving || (f += p + 12);
1613
+ let p = 0;
1614
+ const f = l.current.children;
1615
+ e.forEach((g, c) => {
1616
+ if (d.set(g.id, p), f[c]) {
1617
+ const u = f[c].offsetHeight;
1618
+ g.isRemoving || (p += u + 12);
1614
1619
  }
1615
1620
  }), r(d);
1616
1621
  }, [e]), /* @__PURE__ */ s(
@@ -1632,7 +1637,7 @@ function Un() {
1632
1637
  position: "relative"
1633
1638
  },
1634
1639
  children: e.map((d) => {
1635
- const f = o.has(d.id), u = d.isRemoving, w = n.get(d.id) || 0;
1640
+ const p = o.has(d.id), f = d.isRemoving, g = n.get(d.id) || 0;
1636
1641
  return /* @__PURE__ */ s(
1637
1642
  "div",
1638
1643
  {
@@ -1640,10 +1645,10 @@ function Un() {
1640
1645
  position: "absolute",
1641
1646
  top: 0,
1642
1647
  left: 0,
1643
- transform: f ? "translateY(-120px)" : `translateY(${w}px)`,
1648
+ transform: p ? "translateY(-120px)" : `translateY(${g}px)`,
1644
1649
  // Only animate transform when not leaving, animate opacity always
1645
- transition: u ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
1646
- opacity: u ? 0 : 1,
1650
+ transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
1651
+ opacity: f ? 0 : 1,
1647
1652
  width: "100%"
1648
1653
  },
1649
1654
  children: /* @__PURE__ */ s($t, { notification: d })
@@ -1969,37 +1974,37 @@ class Bt extends xe.Component {
1969
1974
  }
1970
1975
  }
1971
1976
  function Fe({ appId: e, isActive: t, onClose: n }) {
1972
- const { t: r } = J(), o = oe.get(e), [i, l] = T(""), [a, d] = T(null), [f, u] = T(null), [w, c] = T(!1), [p, b] = T(!1);
1977
+ const { t: r } = J(), o = oe.get(e), [i, l] = T(""), [a, d] = T(null), [p, f] = T(null), [g, c] = T(!1), [u, w] = T(!1);
1973
1978
  xe.useEffect(() => {
1974
1979
  o != null && o.titleKey && l(r(o.titleKey));
1975
1980
  }, [o, r]);
1976
- const g = O((x) => {
1981
+ const m = O((x) => {
1977
1982
  l(x);
1978
1983
  }, []), v = O((x) => {
1979
1984
  d(() => x);
1980
1985
  }, []), N = O(() => {
1981
1986
  d(null);
1982
1987
  }, []), h = O((x) => {
1983
- u(x);
1988
+ f(x);
1984
1989
  }, []), k = O(() => {
1985
- u(null);
1986
- }, []), m = O((x) => {
1990
+ f(null);
1991
+ }, []), b = O((x) => {
1987
1992
  c(x);
1988
1993
  }, []), S = O((x) => {
1989
- b(x);
1990
- }, []), E = ge(() => ({
1991
- setTitle: g,
1994
+ w(x);
1995
+ }, []), R = ge(() => ({
1996
+ setTitle: m,
1992
1997
  setBackHandler: v,
1993
1998
  clearBackHandler: N,
1994
1999
  setToolbar: h,
1995
2000
  clearToolbar: k,
1996
- setHideBackButton: m,
2001
+ setHideBackButton: b,
1997
2002
  setHideTitleBar: S,
1998
2003
  close: n
1999
- }), [g, v, N, h, k, m, S, n]);
2004
+ }), [m, v, N, h, k, b, S, n]);
2000
2005
  if (!o)
2001
2006
  return null;
2002
- const I = o.component, z = !o.hideTitleBar && !p;
2007
+ const I = o.component, z = !o.hideTitleBar && !u;
2003
2008
  return /* @__PURE__ */ y(
2004
2009
  "div",
2005
2010
  {
@@ -2016,8 +2021,8 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
2016
2021
  title: i,
2017
2022
  onClose: n,
2018
2023
  onBack: a ?? void 0,
2019
- toolbar: f,
2020
- hideBackButton: w
2024
+ toolbar: p,
2025
+ hideBackButton: g
2021
2026
  }
2022
2027
  ),
2023
2028
  /* @__PURE__ */ s(
@@ -2033,7 +2038,7 @@ function Fe({ appId: e, isActive: t, onClose: n }) {
2033
2038
  backgroundColor: "var(--nc-bg-secondary)",
2034
2039
  position: "relative"
2035
2040
  },
2036
- children: /* @__PURE__ */ s(Oe.Provider, { value: E, children: /* @__PURE__ */ s(Bt, { appId: e, children: /* @__PURE__ */ s(
2041
+ children: /* @__PURE__ */ s(Oe.Provider, { value: R, children: /* @__PURE__ */ s(Bt, { appId: e, children: /* @__PURE__ */ s(
2037
2042
  rt,
2038
2043
  {
2039
2044
  fallback: /* @__PURE__ */ s(
@@ -2076,7 +2081,7 @@ function Jn({ children: e }) {
2076
2081
  height: o
2077
2082
  };
2078
2083
  });
2079
- return L(() => {
2084
+ return B(() => {
2080
2085
  const r = () => {
2081
2086
  const o = window.innerWidth, i = window.innerHeight;
2082
2087
  n({
@@ -2201,27 +2206,27 @@ const ke = "-", Dt = (e) => {
2201
2206
  experimentalParseClassName: n
2202
2207
  } = e, r = t.length === 1, o = t[0], i = t.length, l = (a) => {
2203
2208
  const d = [];
2204
- let f = 0, u = 0, w;
2209
+ let p = 0, f = 0, g;
2205
2210
  for (let v = 0; v < a.length; v++) {
2206
2211
  let N = a[v];
2207
- if (f === 0) {
2212
+ if (p === 0) {
2208
2213
  if (N === o && (r || a.slice(v, v + i) === t)) {
2209
- d.push(a.slice(u, v)), u = v + i;
2214
+ d.push(a.slice(f, v)), f = v + i;
2210
2215
  continue;
2211
2216
  }
2212
2217
  if (N === "/") {
2213
- w = v;
2218
+ g = v;
2214
2219
  continue;
2215
2220
  }
2216
2221
  }
2217
- N === "[" ? f++ : N === "]" && f--;
2222
+ N === "[" ? p++ : N === "]" && p--;
2218
2223
  }
2219
- const c = d.length === 0 ? a : a.substring(u), p = c.startsWith(Ke), b = p ? c.substring(1) : c, g = w && w > u ? w - u : void 0;
2224
+ const c = d.length === 0 ? a : a.substring(f), u = c.startsWith(Ke), w = u ? c.substring(1) : c, m = g && g > f ? g - f : void 0;
2220
2225
  return {
2221
2226
  modifiers: d,
2222
- hasImportantModifier: p,
2223
- baseClassName: b,
2224
- maybePostfixModifierPosition: g
2227
+ hasImportantModifier: u,
2228
+ baseClassName: w,
2229
+ maybePostfixModifierPosition: m
2225
2230
  };
2226
2231
  };
2227
2232
  return n ? (a) => n({
@@ -2248,34 +2253,34 @@ const ke = "-", Dt = (e) => {
2248
2253
  } = t, i = [], l = e.trim().split(Kt);
2249
2254
  let a = "";
2250
2255
  for (let d = l.length - 1; d >= 0; d -= 1) {
2251
- const f = l[d], {
2252
- modifiers: u,
2253
- hasImportantModifier: w,
2256
+ const p = l[d], {
2257
+ modifiers: f,
2258
+ hasImportantModifier: g,
2254
2259
  baseClassName: c,
2255
- maybePostfixModifierPosition: p
2256
- } = n(f);
2257
- let b = !!p, g = r(b ? c.substring(0, p) : c);
2258
- if (!g) {
2259
- if (!b) {
2260
- a = f + (a.length > 0 ? " " + a : a);
2260
+ maybePostfixModifierPosition: u
2261
+ } = n(p);
2262
+ let w = !!u, m = r(w ? c.substring(0, u) : c);
2263
+ if (!m) {
2264
+ if (!w) {
2265
+ a = p + (a.length > 0 ? " " + a : a);
2261
2266
  continue;
2262
2267
  }
2263
- if (g = r(c), !g) {
2264
- a = f + (a.length > 0 ? " " + a : a);
2268
+ if (m = r(c), !m) {
2269
+ a = p + (a.length > 0 ? " " + a : a);
2265
2270
  continue;
2266
2271
  }
2267
- b = !1;
2272
+ w = !1;
2268
2273
  }
2269
- const v = Yt(u).join(":"), N = w ? v + Ke : v, h = N + g;
2274
+ const v = Yt(f).join(":"), N = g ? v + Ke : v, h = N + m;
2270
2275
  if (i.includes(h))
2271
2276
  continue;
2272
2277
  i.push(h);
2273
- const k = o(g, b);
2274
- for (let m = 0; m < k.length; ++m) {
2275
- const S = k[m];
2278
+ const k = o(m, w);
2279
+ for (let b = 0; b < k.length; ++b) {
2280
+ const S = k[b];
2276
2281
  i.push(N + S);
2277
2282
  }
2278
- a = f + (a.length > 0 ? " " + a : a);
2283
+ a = p + (a.length > 0 ? " " + a : a);
2279
2284
  }
2280
2285
  return a;
2281
2286
  };
@@ -2296,21 +2301,21 @@ const _e = (e) => {
2296
2301
  function qt(e, ...t) {
2297
2302
  let n, r, o, i = l;
2298
2303
  function l(d) {
2299
- const f = t.reduce((u, w) => w(u), e());
2300
- return n = jt(f), r = n.cache.get, o = n.cache.set, i = a, a(d);
2304
+ const p = t.reduce((f, g) => g(f), e());
2305
+ return n = jt(p), r = n.cache.get, o = n.cache.set, i = a, a(d);
2301
2306
  }
2302
2307
  function a(d) {
2303
- const f = r(d);
2304
- if (f)
2305
- return f;
2306
- const u = _t(d, n);
2307
- return o(d, u), u;
2308
+ const p = r(d);
2309
+ if (p)
2310
+ return p;
2311
+ const f = _t(d, n);
2312
+ return o(d, f), f;
2308
2313
  }
2309
2314
  return function() {
2310
2315
  return i(Ut.apply(null, arguments));
2311
2316
  };
2312
2317
  }
2313
- const B = (e) => {
2318
+ const D = (e) => {
2314
2319
  const t = (n) => n[e] || [];
2315
2320
  return t.isThemeGetter = !0, t;
2316
2321
  }, Ue = /^\[(?:([a-z-]+):)?(.+)\]$/i, Xt = /^\d+\/\d+$/, Jt = /* @__PURE__ */ new Set(["px", "full", "screen"]), Qt = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zt = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, en = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, tn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, nn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, G = (e) => re(e) || Jt.has(e) || Xt.test(e), U = (e) => ie(e, "length", un), re = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => ie(e, "number", re), le = (e) => !!e && Number.isInteger(Number(e)), rn = (e) => e.endsWith("%") && re(e.slice(0, -1)), M = (e) => Ue.test(e), q = (e) => Qt.test(e), on = /* @__PURE__ */ new Set(["length", "size", "percentage"]), sn = (e) => ie(e, on, qe), cn = (e) => ie(e, "position", qe), an = /* @__PURE__ */ new Set(["image", "url"]), ln = (e) => ie(e, an, fn), dn = (e) => ie(e, "", pn), de = () => !0, ie = (e, t, n) => {
@@ -2322,7 +2327,7 @@ const B = (e) => {
2322
2327
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
2323
2328
  Zt.test(e) && !en.test(e)
2324
2329
  ), qe = () => !1, pn = (e) => tn.test(e), fn = (e) => nn.test(e), hn = () => {
2325
- const e = B("colors"), t = B("spacing"), n = B("blur"), r = B("brightness"), o = B("borderColor"), i = B("borderRadius"), l = B("borderSpacing"), a = B("borderWidth"), d = B("contrast"), f = B("grayscale"), u = B("hueRotate"), w = B("invert"), c = B("gap"), p = B("gradientColorStops"), b = B("gradientColorStopPositions"), g = B("inset"), v = B("margin"), N = B("opacity"), h = B("padding"), k = B("saturate"), m = B("scale"), S = B("sepia"), E = B("skew"), I = B("space"), z = B("translate"), x = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", M, t], C = () => [M, t], D = () => ["", G, U], R = () => ["auto", re, M], P = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Q = () => ["", "0", M], ce = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [re, M];
2330
+ const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), l = D("borderSpacing"), a = D("borderWidth"), d = D("contrast"), p = D("grayscale"), f = D("hueRotate"), g = D("invert"), c = D("gap"), u = D("gradientColorStops"), w = D("gradientColorStopPositions"), m = D("inset"), v = D("margin"), N = D("opacity"), h = D("padding"), k = D("saturate"), b = D("scale"), S = D("sepia"), R = D("skew"), I = D("space"), z = D("translate"), x = () => ["auto", "contain", "none"], E = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", M, t], C = () => [M, t], L = () => ["", G, U], $ = () => ["auto", re, M], P = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Q = () => ["", "0", M], ce = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [re, M];
2326
2331
  return {
2327
2332
  cacheSize: 500,
2328
2333
  separator: ":",
@@ -2334,7 +2339,7 @@ const B = (e) => {
2334
2339
  borderColor: [e],
2335
2340
  borderRadius: ["none", "", "full", q, M],
2336
2341
  borderSpacing: C(),
2337
- borderWidth: D(),
2342
+ borderWidth: L(),
2338
2343
  contrast: F(),
2339
2344
  grayscale: Q(),
2340
2345
  hueRotate: F(),
@@ -2342,8 +2347,8 @@ const B = (e) => {
2342
2347
  gap: C(),
2343
2348
  gradientColorStops: [e],
2344
2349
  gradientColorStopPositions: [rn, U],
2345
- inset: $(),
2346
- margin: $(),
2350
+ inset: A(),
2351
+ margin: A(),
2347
2352
  opacity: F(),
2348
2353
  padding: C(),
2349
2354
  saturate: F(),
@@ -2452,21 +2457,21 @@ const B = (e) => {
2452
2457
  * @see https://tailwindcss.com/docs/overflow
2453
2458
  */
2454
2459
  overflow: [{
2455
- overflow: A()
2460
+ overflow: E()
2456
2461
  }],
2457
2462
  /**
2458
2463
  * Overflow X
2459
2464
  * @see https://tailwindcss.com/docs/overflow
2460
2465
  */
2461
2466
  "overflow-x": [{
2462
- "overflow-x": A()
2467
+ "overflow-x": E()
2463
2468
  }],
2464
2469
  /**
2465
2470
  * Overflow Y
2466
2471
  * @see https://tailwindcss.com/docs/overflow
2467
2472
  */
2468
2473
  "overflow-y": [{
2469
- "overflow-y": A()
2474
+ "overflow-y": E()
2470
2475
  }],
2471
2476
  /**
2472
2477
  * Overscroll Behavior
@@ -2499,63 +2504,63 @@ const B = (e) => {
2499
2504
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2500
2505
  */
2501
2506
  inset: [{
2502
- inset: [g]
2507
+ inset: [m]
2503
2508
  }],
2504
2509
  /**
2505
2510
  * Right / Left
2506
2511
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2507
2512
  */
2508
2513
  "inset-x": [{
2509
- "inset-x": [g]
2514
+ "inset-x": [m]
2510
2515
  }],
2511
2516
  /**
2512
2517
  * Top / Bottom
2513
2518
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2514
2519
  */
2515
2520
  "inset-y": [{
2516
- "inset-y": [g]
2521
+ "inset-y": [m]
2517
2522
  }],
2518
2523
  /**
2519
2524
  * Start
2520
2525
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2521
2526
  */
2522
2527
  start: [{
2523
- start: [g]
2528
+ start: [m]
2524
2529
  }],
2525
2530
  /**
2526
2531
  * End
2527
2532
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2528
2533
  */
2529
2534
  end: [{
2530
- end: [g]
2535
+ end: [m]
2531
2536
  }],
2532
2537
  /**
2533
2538
  * Top
2534
2539
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2535
2540
  */
2536
2541
  top: [{
2537
- top: [g]
2542
+ top: [m]
2538
2543
  }],
2539
2544
  /**
2540
2545
  * Right
2541
2546
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2542
2547
  */
2543
2548
  right: [{
2544
- right: [g]
2549
+ right: [m]
2545
2550
  }],
2546
2551
  /**
2547
2552
  * Bottom
2548
2553
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2549
2554
  */
2550
2555
  bottom: [{
2551
- bottom: [g]
2556
+ bottom: [m]
2552
2557
  }],
2553
2558
  /**
2554
2559
  * Left
2555
2560
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2556
2561
  */
2557
2562
  left: [{
2558
- left: [g]
2563
+ left: [m]
2559
2564
  }],
2560
2565
  /**
2561
2566
  * Visibility
@@ -2575,7 +2580,7 @@ const B = (e) => {
2575
2580
  * @see https://tailwindcss.com/docs/flex-basis
2576
2581
  */
2577
2582
  basis: [{
2578
- basis: $()
2583
+ basis: A()
2579
2584
  }],
2580
2585
  /**
2581
2586
  * Flex Direction
@@ -2640,14 +2645,14 @@ const B = (e) => {
2640
2645
  * @see https://tailwindcss.com/docs/grid-column
2641
2646
  */
2642
2647
  "col-start": [{
2643
- "col-start": R()
2648
+ "col-start": $()
2644
2649
  }],
2645
2650
  /**
2646
2651
  * Grid Column End
2647
2652
  * @see https://tailwindcss.com/docs/grid-column
2648
2653
  */
2649
2654
  "col-end": [{
2650
- "col-end": R()
2655
+ "col-end": $()
2651
2656
  }],
2652
2657
  /**
2653
2658
  * Grid Template Rows
@@ -2670,14 +2675,14 @@ const B = (e) => {
2670
2675
  * @see https://tailwindcss.com/docs/grid-row
2671
2676
  */
2672
2677
  "row-start": [{
2673
- "row-start": R()
2678
+ "row-start": $()
2674
2679
  }],
2675
2680
  /**
2676
2681
  * Grid Row End
2677
2682
  * @see https://tailwindcss.com/docs/grid-row
2678
2683
  */
2679
2684
  "row-end": [{
2680
- "row-end": R()
2685
+ "row-end": $()
2681
2686
  }],
2682
2687
  /**
2683
2688
  * Grid Auto Flow
@@ -3293,42 +3298,42 @@ const B = (e) => {
3293
3298
  * @see https://tailwindcss.com/docs/gradient-color-stops
3294
3299
  */
3295
3300
  "gradient-from-pos": [{
3296
- from: [b]
3301
+ from: [w]
3297
3302
  }],
3298
3303
  /**
3299
3304
  * Gradient Color Stops Via Position
3300
3305
  * @see https://tailwindcss.com/docs/gradient-color-stops
3301
3306
  */
3302
3307
  "gradient-via-pos": [{
3303
- via: [b]
3308
+ via: [w]
3304
3309
  }],
3305
3310
  /**
3306
3311
  * Gradient Color Stops To Position
3307
3312
  * @see https://tailwindcss.com/docs/gradient-color-stops
3308
3313
  */
3309
3314
  "gradient-to-pos": [{
3310
- to: [b]
3315
+ to: [w]
3311
3316
  }],
3312
3317
  /**
3313
3318
  * Gradient Color Stops From
3314
3319
  * @see https://tailwindcss.com/docs/gradient-color-stops
3315
3320
  */
3316
3321
  "gradient-from": [{
3317
- from: [p]
3322
+ from: [u]
3318
3323
  }],
3319
3324
  /**
3320
3325
  * Gradient Color Stops Via
3321
3326
  * @see https://tailwindcss.com/docs/gradient-color-stops
3322
3327
  */
3323
3328
  "gradient-via": [{
3324
- via: [p]
3329
+ via: [u]
3325
3330
  }],
3326
3331
  /**
3327
3332
  * Gradient Color Stops To
3328
3333
  * @see https://tailwindcss.com/docs/gradient-color-stops
3329
3334
  */
3330
3335
  "gradient-to": [{
3331
- to: [p]
3336
+ to: [u]
3332
3337
  }],
3333
3338
  // Borders
3334
3339
  /**
@@ -3654,7 +3659,7 @@ const B = (e) => {
3654
3659
  * @see https://tailwindcss.com/docs/ring-width
3655
3660
  */
3656
3661
  "ring-w": [{
3657
- ring: D()
3662
+ ring: L()
3658
3663
  }],
3659
3664
  /**
3660
3665
  * Ring Width Inset
@@ -3767,21 +3772,21 @@ const B = (e) => {
3767
3772
  * @see https://tailwindcss.com/docs/grayscale
3768
3773
  */
3769
3774
  grayscale: [{
3770
- grayscale: [f]
3775
+ grayscale: [p]
3771
3776
  }],
3772
3777
  /**
3773
3778
  * Hue Rotate
3774
3779
  * @see https://tailwindcss.com/docs/hue-rotate
3775
3780
  */
3776
3781
  "hue-rotate": [{
3777
- "hue-rotate": [u]
3782
+ "hue-rotate": [f]
3778
3783
  }],
3779
3784
  /**
3780
3785
  * Invert
3781
3786
  * @see https://tailwindcss.com/docs/invert
3782
3787
  */
3783
3788
  invert: [{
3784
- invert: [w]
3789
+ invert: [g]
3785
3790
  }],
3786
3791
  /**
3787
3792
  * Saturate
@@ -3831,21 +3836,21 @@ const B = (e) => {
3831
3836
  * @see https://tailwindcss.com/docs/backdrop-grayscale
3832
3837
  */
3833
3838
  "backdrop-grayscale": [{
3834
- "backdrop-grayscale": [f]
3839
+ "backdrop-grayscale": [p]
3835
3840
  }],
3836
3841
  /**
3837
3842
  * Backdrop Hue Rotate
3838
3843
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
3839
3844
  */
3840
3845
  "backdrop-hue-rotate": [{
3841
- "backdrop-hue-rotate": [u]
3846
+ "backdrop-hue-rotate": [f]
3842
3847
  }],
3843
3848
  /**
3844
3849
  * Backdrop Invert
3845
3850
  * @see https://tailwindcss.com/docs/backdrop-invert
3846
3851
  */
3847
3852
  "backdrop-invert": [{
3848
- "backdrop-invert": [w]
3853
+ "backdrop-invert": [g]
3849
3854
  }],
3850
3855
  /**
3851
3856
  * Backdrop Opacity
@@ -3960,21 +3965,21 @@ const B = (e) => {
3960
3965
  * @see https://tailwindcss.com/docs/scale
3961
3966
  */
3962
3967
  scale: [{
3963
- scale: [m]
3968
+ scale: [b]
3964
3969
  }],
3965
3970
  /**
3966
3971
  * Scale X
3967
3972
  * @see https://tailwindcss.com/docs/scale
3968
3973
  */
3969
3974
  "scale-x": [{
3970
- "scale-x": [m]
3975
+ "scale-x": [b]
3971
3976
  }],
3972
3977
  /**
3973
3978
  * Scale Y
3974
3979
  * @see https://tailwindcss.com/docs/scale
3975
3980
  */
3976
3981
  "scale-y": [{
3977
- "scale-y": [m]
3982
+ "scale-y": [b]
3978
3983
  }],
3979
3984
  /**
3980
3985
  * Rotate
@@ -4002,14 +4007,14 @@ const B = (e) => {
4002
4007
  * @see https://tailwindcss.com/docs/skew
4003
4008
  */
4004
4009
  "skew-x": [{
4005
- "skew-x": [E]
4010
+ "skew-x": [R]
4006
4011
  }],
4007
4012
  /**
4008
4013
  * Skew Y
4009
4014
  * @see https://tailwindcss.com/docs/skew
4010
4015
  */
4011
4016
  "skew-y": [{
4012
- "skew-y": [E]
4017
+ "skew-y": [R]
4013
4018
  }],
4014
4019
  /**
4015
4020
  * Transform Origin
@@ -4356,16 +4361,16 @@ function gn(...e) {
4356
4361
  }
4357
4362
  function Qn({ autoWidth: e = !0, className: t, style: n }) {
4358
4363
  const [r, o] = T(() => j.getActiveAppId()), [i, l] = T(() => V.getRunningApps()), { isMobile: a } = Ye();
4359
- L(() => {
4364
+ B(() => {
4360
4365
  const v = j.subscribe("activeAppId", (N) => {
4361
4366
  o(N);
4362
4367
  });
4363
4368
  return () => {
4364
4369
  v();
4365
4370
  };
4366
- }, []), L(() => V.subscribe(() => {
4371
+ }, []), B(() => V.subscribe(() => {
4367
4372
  l(V.getRunningApps());
4368
- }), []), L(() => {
4373
+ }), []), B(() => {
4369
4374
  if (!new URLSearchParams(window.location.search).has("app")) {
4370
4375
  const h = j.getActiveAppId();
4371
4376
  h && !V.isRunning(h) && V.launchApp(h);
@@ -4373,15 +4378,15 @@ function Qn({ autoWidth: e = !0, className: t, style: n }) {
4373
4378
  }, []);
4374
4379
  const d = (v) => {
4375
4380
  V.closeApp(v);
4376
- }, f = r ? oe.get(r) : null, w = (f == null ? void 0 : f.width) ?? 400, c = r !== null, g = { ...{
4381
+ }, p = r ? oe.get(r) : null, g = (p == null ? void 0 : p.width) ?? 400, c = r !== null, m = { ...{
4377
4382
  overflow: "hidden",
4378
4383
  display: c ? "flex" : "none",
4379
4384
  flexDirection: "column",
4380
4385
  flexShrink: 0,
4381
4386
  // Only set width if autoWidth is enabled
4382
- ...e && c ? { width: a ? "100%" : w } : {}
4387
+ ...e && c ? { width: a ? "100%" : g } : {}
4383
4388
  }, ...n };
4384
- return /* @__PURE__ */ s("div", { className: gn("nc-app-panel", t), style: g, children: i.map((v) => /* @__PURE__ */ s(
4389
+ return /* @__PURE__ */ s("div", { className: gn("nc-app-panel", t), style: m, children: i.map((v) => /* @__PURE__ */ s(
4385
4390
  Fe,
4386
4391
  {
4387
4392
  appId: v.appId,
@@ -4393,47 +4398,47 @@ function Qn({ autoWidth: e = !0, className: t, style: n }) {
4393
4398
  }
4394
4399
  function Zn({ pinnedAppIds: e, className: t = "" }) {
4395
4400
  const { isMobile: n } = Ye(), [r, o] = T(() => j.getActiveAppId()), [i, l] = T(() => V.getRunningApps());
4396
- L(() => {
4397
- const c = j.subscribe("activeAppId", (p) => {
4398
- o(p);
4401
+ B(() => {
4402
+ const c = j.subscribe("activeAppId", (u) => {
4403
+ o(u);
4399
4404
  });
4400
4405
  return () => {
4401
4406
  c();
4402
4407
  };
4403
- }, []), L(() => V.subscribe(() => {
4408
+ }, []), B(() => V.subscribe(() => {
4404
4409
  l(V.getRunningApps());
4405
4410
  }), []);
4406
4411
  const a = (c) => {
4407
4412
  r === c ? V.setActiveApp(null) : V.launchApp(c);
4408
- }, d = e.map((c) => oe.get(c)).filter((c) => !!c), f = i.filter((c) => !e.includes(c.appId)).map((c) => ({ running: c, def: oe.get(c.appId) })).filter((c) => !!c.def), u = (c) => i.some((p) => p.appId === c), w = n ? 24 : 28;
4413
+ }, d = e.map((c) => oe.get(c)).filter((c) => !!c), p = i.filter((c) => !e.includes(c.appId)).map((c) => ({ running: c, def: oe.get(c.appId) })).filter((c) => !!c.def), f = (c) => i.some((u) => u.appId === c), g = n ? 24 : 28;
4409
4414
  return /* @__PURE__ */ y("div", { className: `nc-app-taskbar ${n ? "nc-mobile" : "nc-desktop"} ${t}`, children: [
4410
4415
  d.map((c) => {
4411
- const p = c.icon, b = r === c.id, g = u(c.id);
4416
+ const u = c.icon, w = r === c.id, m = f(c.id);
4412
4417
  return /* @__PURE__ */ y(
4413
4418
  "button",
4414
4419
  {
4415
- className: `nc-app-taskbar-button ${b ? "nc-active" : ""} ${g ? "nc-running" : ""}`,
4420
+ className: `nc-app-taskbar-button ${w ? "nc-active" : ""} ${m ? "nc-running" : ""}`,
4416
4421
  onClick: () => a(c.id),
4417
4422
  title: c.titleKey || c.id,
4418
4423
  children: [
4419
- /* @__PURE__ */ s(p, { size: w }),
4420
- g && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4424
+ /* @__PURE__ */ s(u, { size: g }),
4425
+ m && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4421
4426
  ]
4422
4427
  },
4423
4428
  c.id
4424
4429
  );
4425
4430
  }),
4426
- f.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
4427
- f.map(({ running: c, def: p }) => {
4428
- const b = p.icon, g = r === c.appId;
4431
+ p.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
4432
+ p.map(({ running: c, def: u }) => {
4433
+ const w = u.icon, m = r === c.appId;
4429
4434
  return /* @__PURE__ */ y(
4430
4435
  "button",
4431
4436
  {
4432
- className: `nc-app-taskbar-button ${g ? "nc-active" : ""} nc-running`,
4437
+ className: `nc-app-taskbar-button ${m ? "nc-active" : ""} nc-running`,
4433
4438
  onClick: () => a(c.appId),
4434
- title: p.titleKey || p.id,
4439
+ title: u.titleKey || u.id,
4435
4440
  children: [
4436
- /* @__PURE__ */ s(b, { size: w }),
4441
+ /* @__PURE__ */ s(w, { size: g }),
4437
4442
  /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4438
4443
  ]
4439
4444
  },
@@ -4494,44 +4499,44 @@ function nr() {
4494
4499
  }
4495
4500
  const Ae = se(null);
4496
4501
  function rr({ rootView: e, children: t }) {
4497
- const { t: n } = J(), r = zt(), [o, i] = T([e]), [l, a] = T([null]), d = O((m, S) => {
4498
- a((E) => {
4499
- const I = [...E];
4500
- return I[m] = S, I;
4502
+ const { t: n } = J(), r = zt(), [o, i] = T([e]), [l, a] = T([null]), d = O((b, S) => {
4503
+ a((R) => {
4504
+ const I = [...R];
4505
+ return I[b] = S, I;
4501
4506
  });
4502
- }, []), f = O((m) => {
4507
+ }, []), p = O((b) => {
4503
4508
  a((S) => {
4504
- const E = [...S];
4505
- return E[m] = null, E;
4509
+ const R = [...S];
4510
+ return R[b] = null, R;
4506
4511
  });
4507
- }, []), u = O((m) => {
4508
- i((S) => [...S, m]), a((S) => [...S, null]);
4509
- }, []), w = O(() => {
4510
- i((m) => m.length <= 1 ? m : m.slice(0, -1)), a((m) => m.slice(0, -1));
4512
+ }, []), f = O((b) => {
4513
+ i((S) => [...S, b]), a((S) => [...S, null]);
4514
+ }, []), g = O(() => {
4515
+ i((b) => b.length <= 1 ? b : b.slice(0, -1)), a((b) => b.slice(0, -1));
4511
4516
  }, []), c = O(() => {
4512
4517
  i([e]), a([null]);
4513
- }, [e]), p = o.length, b = p > 1, g = o.length - 1, v = o[o.length - 1], N = v != null && v.titleKey ? n(v.titleKey) : (v == null ? void 0 : v.title) ?? "";
4514
- L(() => {
4518
+ }, [e]), u = o.length, w = u > 1, m = o.length - 1, v = o[o.length - 1], N = v != null && v.titleKey ? n(v.titleKey) : (v == null ? void 0 : v.title) ?? "";
4519
+ B(() => {
4515
4520
  r.setTitle(N);
4516
- }, [N, r]), L(() => {
4517
- b ? r.setBackHandler(w) : r.clearBackHandler();
4518
- }, [b, w, r]), L(() => {
4519
- const m = l[l.length - 1];
4520
- m ? r.setToolbar(m) : r.clearToolbar();
4521
+ }, [N, r]), B(() => {
4522
+ w ? r.setBackHandler(g) : r.clearBackHandler();
4523
+ }, [w, g, r]), B(() => {
4524
+ const b = l[l.length - 1];
4525
+ b ? r.setToolbar(b) : r.clearToolbar();
4521
4526
  }, [l, r]);
4522
4527
  const h = {
4523
- push: u,
4524
- pop: w,
4528
+ push: f,
4529
+ pop: g,
4525
4530
  reset: c,
4526
- depth: p,
4527
- canGoBack: b,
4531
+ depth: u,
4532
+ canGoBack: w,
4528
4533
  currentTitle: N
4529
4534
  }, k = {
4530
4535
  stack: o,
4531
4536
  toolbarStack: l,
4532
4537
  updateToolbar: d,
4533
- clearToolbarAt: f,
4534
- topIndex: g
4538
+ clearToolbarAt: p,
4539
+ topIndex: m
4535
4540
  };
4536
4541
  return /* @__PURE__ */ s(Ne.Provider, { value: h, children: /* @__PURE__ */ s(Ae.Provider, { value: k, children: t }) });
4537
4542
  }
@@ -4539,8 +4544,8 @@ function bn({ index: e, children: t }) {
4539
4544
  const n = X(Ae);
4540
4545
  if (!n)
4541
4546
  throw new Error("NavViewProvider must be used within NavStackProvider");
4542
- const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, l = O((f) => {
4543
- e === i && r(e, f);
4547
+ const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, l = O((p) => {
4548
+ e === i && r(e, p);
4544
4549
  }, [e, i, r]), a = O(() => {
4545
4550
  e === i && o(e);
4546
4551
  }, [e, i, o]), d = {