neatkit 0.3.2 → 0.4.1

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
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as A, Fragment as We } from "react/jsx-runtime";
3
- import { forwardRef as y, useState as Y, createElement as Te, isValidElement as kn, Fragment as ze, createContext as Ze, useContext as Pe, useRef as H, useCallback as W, useEffect as q, Children as Hn, useLayoutEffect as on, useId as Me, cloneElement as He, useReducer as xn, useMemo as Le, version as Fn } from "react";
4
- import { createPortal as Wn } from "react-dom";
5
- const zn = 36, In = [2, 4, 8, 12, 16, 24, 32, 48], ln = {
2
+ import { jsx as a, jsxs as O, Fragment as je } from "react/jsx-runtime";
3
+ import { forwardRef as g, useState as $, createElement as Ae, isValidElement as Ze, Fragment as _e, createContext as qe, useContext as Ne, useRef as D, useCallback as W, useEffect as q, Children as ln, useLayoutEffect as $e, useId as Le, cloneElement as Pe, useReducer as xn, useMemo as Me, version as jn } from "react";
4
+ import { createPortal as Zn } from "react-dom";
5
+ const qn = 36, Cn = [2, 4, 8, 12, 16, 24, 32, 48], dn = {
6
6
  sm: 768,
7
7
  md: 960,
8
8
  lg: 1440,
@@ -10,33 +10,33 @@ const zn = 36, In = [2, 4, 8, 12, 16, 24, 32, 48], ln = {
10
10
  };
11
11
  ({
12
12
  ...Object.fromEntries(
13
- In.map((n) => [`--nk-space-${n}`, `${n}px`])
13
+ Cn.map((n) => [`--nk-space-${n}`, `${n}px`])
14
14
  )
15
15
  });
16
- function Uo(n) {
16
+ function mr(n) {
17
17
  if (typeof n != "number" || !Number.isFinite(n))
18
18
  throw new RangeError("Cell amount must be a finite number.");
19
- const t = n * zn;
19
+ const t = n * qn;
20
20
  if (!Number.isFinite(t))
21
21
  throw new RangeError("Calculated cell value must be finite.");
22
22
  return t;
23
23
  }
24
- function Yo(n) {
25
- if (!In.some((t) => t === n))
24
+ function gr(n) {
25
+ if (!Cn.some((t) => t === n))
26
26
  throw new RangeError(`Unsupported spacing size: ${String(n)}.`);
27
27
  return n;
28
28
  }
29
29
  function Ce(n) {
30
- if (!Object.prototype.hasOwnProperty.call(ln, n))
30
+ if (!Object.prototype.hasOwnProperty.call(dn, n))
31
31
  throw new RangeError(`Unsupported breakpoint: ${String(n)}.`);
32
- return ln[n];
32
+ return dn[n];
33
33
  }
34
- function Qo(n) {
34
+ function wr(n) {
35
35
  if (typeof n != "number" || !Number.isFinite(n))
36
36
  throw new RangeError("Pixel value must be a finite number.");
37
37
  return `${n}px`;
38
38
  }
39
- const Oe = y(function(t, e) {
39
+ const He = g(function(t, e) {
40
40
  const { children: o, className: i, ...r } = t;
41
41
  return /* @__PURE__ */ a(
42
42
  "div",
@@ -47,7 +47,7 @@ const Oe = y(function(t, e) {
47
47
  children: o
48
48
  }
49
49
  );
50
- }), Xo = y(function(t, e) {
50
+ }), br = g(function(t, e) {
51
51
  const {
52
52
  children: o,
53
53
  className: i,
@@ -55,8 +55,8 @@ const Oe = y(function(t, e) {
55
55
  tone: l = "info",
56
56
  ...s
57
57
  } = t;
58
- return /* @__PURE__ */ A(
59
- Oe,
58
+ return /* @__PURE__ */ O(
59
+ He,
60
60
  {
61
61
  ...s,
62
62
  ref: e,
@@ -70,10 +70,10 @@ const Oe = y(function(t, e) {
70
70
  }
71
71
  );
72
72
  });
73
- function Zn(n) {
73
+ function $n(n) {
74
74
  return (Array.from((n == null ? void 0 : n.trim()) ?? "")[0] ?? "?").trim().toUpperCase() || "?";
75
75
  }
76
- function jn(n) {
76
+ function Gn(n) {
77
77
  if (n === "?") return "neutral";
78
78
  const t = Array.from(n)[0] ?? "";
79
79
  if ("AJO".includes(t)) return "1";
@@ -85,28 +85,28 @@ function jn(n) {
85
85
  const e = t.codePointAt(0) ?? 0;
86
86
  return String(e % 6 + 1);
87
87
  }
88
- const Jo = y(function(t, e) {
88
+ const yr = g(function(t, e) {
89
89
  const {
90
90
  alt: o,
91
91
  className: i,
92
92
  image: r,
93
93
  size: l = 32,
94
94
  style: s,
95
- ...h
96
- } = t, [f, d] = Y(), c = !!r && r !== f, p = (o == null ? void 0 : o.trim()) ?? "", v = Zn(p), g = typeof l == "number" ? `${l}px` : l, x = p ? { "aria-label": p, role: "img" } : { "aria-hidden": !0, role: void 0 };
95
+ ...u
96
+ } = t, [f, d] = $(), c = !!r && r !== f, p = (o == null ? void 0 : o.trim()) ?? "", v = $n(p), m = typeof l == "number" ? `${l}px` : l, x = p ? { "aria-label": p, role: "img" } : { "aria-hidden": !0, role: void 0 };
97
97
  function b() {
98
98
  d(r);
99
99
  }
100
100
  return /* @__PURE__ */ a(
101
101
  "div",
102
102
  {
103
- ...h,
103
+ ...u,
104
104
  ...c ? void 0 : x,
105
105
  ref: e,
106
106
  className: ["nk-avatar", i].filter(Boolean).join(" "),
107
- "data-palette": jn(v),
107
+ "data-palette": Gn(v),
108
108
  "data-state": c ? "image" : "fallback",
109
- style: { ...s, "--nk-avatar-size": g },
109
+ style: { ...s, "--nk-avatar-size": m },
110
110
  children: c ? /* @__PURE__ */ a(
111
111
  "img",
112
112
  {
@@ -118,7 +118,7 @@ const Jo = y(function(t, e) {
118
118
  ) : /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-avatar__initial", children: v })
119
119
  }
120
120
  );
121
- }), er = y(function(t, e) {
121
+ }), kr = g(function(t, e) {
122
122
  const {
123
123
  children: o,
124
124
  className: i,
@@ -137,7 +137,7 @@ const Jo = y(function(t, e) {
137
137
  children: o
138
138
  }
139
139
  );
140
- }), qn = y(function(t, e) {
140
+ }), Kn = g(function(t, e) {
141
141
  const { height: o = 14, width: i = 14, ...r } = t;
142
142
  return /* @__PURE__ */ a(
143
143
  "svg",
@@ -160,7 +160,7 @@ const Jo = y(function(t, e) {
160
160
  )
161
161
  }
162
162
  );
163
- }), $n = y(function(t, e) {
163
+ }), Un = g(function(t, e) {
164
164
  const { height: o = 14, width: i = 14, ...r } = t;
165
165
  return /* @__PURE__ */ a(
166
166
  "svg",
@@ -184,7 +184,7 @@ const Jo = y(function(t, e) {
184
184
  )
185
185
  }
186
186
  );
187
- }), Gn = y(function(t, e) {
187
+ }), Yn = g(function(t, e) {
188
188
  const { height: o = 14, width: i = 14, ...r } = t;
189
189
  return /* @__PURE__ */ a(
190
190
  "svg",
@@ -208,9 +208,9 @@ const Jo = y(function(t, e) {
208
208
  )
209
209
  }
210
210
  );
211
- }), Kn = y(function(t, e) {
211
+ }), Xn = g(function(t, e) {
212
212
  const { height: o = 14, width: i = 14, ...r } = t;
213
- return /* @__PURE__ */ A(
213
+ return /* @__PURE__ */ O(
214
214
  "svg",
215
215
  {
216
216
  ...r,
@@ -254,7 +254,7 @@ const Jo = y(function(t, e) {
254
254
  ]
255
255
  }
256
256
  );
257
- }), Un = y(function(t, e) {
257
+ }), Qn = g(function(t, e) {
258
258
  const { height: o = 14, width: i = 14, ...r } = t;
259
259
  return /* @__PURE__ */ a(
260
260
  "svg",
@@ -269,9 +269,9 @@ const Jo = y(function(t, e) {
269
269
  children: /* @__PURE__ */ a("path", { fill: "currentColor", d: "M13 2.229c0-.413-.112-.818-.324-1.17a2.2 2.2 0 0 0-.88-.822A2.15 2.15 0 0 0 9.51.441c-.325.246-.577.58-.726.964a2.27 2.27 0 0 0 .4 2.303c.27.308.618.534 1.006.652v.095c0 .507-.197.992-.548 1.35a1.86 1.86 0 0 1-1.325.559H5.82c-.675.007-1.33.23-1.874.636V4.36a2.2 2.2 0 0 0 1.218-.936A2.26 2.26 0 0 0 4.751.542 2.16 2.16 0 0 0 3.322 0c-.525 0-1.032.193-1.43.542a2.26 2.26 0 0 0-.413 2.882c.283.451.716.783 1.219.936v5.28a2.2 2.2 0 0 0-1.218.936 2.26 2.26 0 0 0 .413 2.882c.397.35.904.542 1.43.542.524 0 1.031-.193 1.428-.542a2.26 2.26 0 0 0 .413-2.882 2.2 2.2 0 0 0-1.218-.936v-.095c0-.507.198-.992.55-1.35a1.86 1.86 0 0 1 1.324-.559h2.497c.828 0 1.622-.335 2.208-.931a3.2 3.2 0 0 0 .914-2.25V4.36c.45-.137.846-.418 1.127-.802S13 2.708 13 2.229" })
270
270
  }
271
271
  );
272
- }), Yn = y(function(t, e) {
272
+ }), Jn = g(function(t, e) {
273
273
  const { height: o = 14, width: i = 14, ...r } = t;
274
- return /* @__PURE__ */ A(
274
+ return /* @__PURE__ */ O(
275
275
  "svg",
276
276
  {
277
277
  ...r,
@@ -288,9 +288,9 @@ const Jo = y(function(t, e) {
288
288
  ]
289
289
  }
290
290
  );
291
- }), Qn = y(function(t, e) {
291
+ }), et = g(function(t, e) {
292
292
  const { height: o = 14, width: i = 14, ...r } = t;
293
- return /* @__PURE__ */ A(
293
+ return /* @__PURE__ */ O(
294
294
  "svg",
295
295
  {
296
296
  ...r,
@@ -320,7 +320,7 @@ const Jo = y(function(t, e) {
320
320
  ]
321
321
  }
322
322
  );
323
- }), Xn = y(function(t, e) {
323
+ }), nt = g(function(t, e) {
324
324
  const { height: o = 14, width: i = 14, ...r } = t;
325
325
  return /* @__PURE__ */ a(
326
326
  "svg",
@@ -341,7 +341,7 @@ const Jo = y(function(t, e) {
341
341
  )
342
342
  }
343
343
  );
344
- }), Jn = y(function(t, e) {
344
+ }), tt = g(function(t, e) {
345
345
  const { height: o = 14, width: i = 14, ...r } = t;
346
346
  return /* @__PURE__ */ a(
347
347
  "svg",
@@ -364,7 +364,7 @@ const Jo = y(function(t, e) {
364
364
  )
365
365
  }
366
366
  );
367
- }), et = y(function(t, e) {
367
+ }), ot = g(function(t, e) {
368
368
  const { height: o = 14, width: i = 14, ...r } = t;
369
369
  return /* @__PURE__ */ a(
370
370
  "svg",
@@ -388,7 +388,7 @@ const Jo = y(function(t, e) {
388
388
  )
389
389
  }
390
390
  );
391
- }), nt = y(function(t, e) {
391
+ }), rt = g(function(t, e) {
392
392
  const { height: o = 14, width: i = 14, ...r } = t;
393
393
  return /* @__PURE__ */ a(
394
394
  "svg",
@@ -412,7 +412,7 @@ const Jo = y(function(t, e) {
412
412
  )
413
413
  }
414
414
  );
415
- }), tt = y(function(t, e) {
415
+ }), it = g(function(t, e) {
416
416
  const { height: o = 14, width: i = 14, ...r } = t;
417
417
  return /* @__PURE__ */ a(
418
418
  "svg",
@@ -436,7 +436,7 @@ const Jo = y(function(t, e) {
436
436
  )
437
437
  }
438
438
  );
439
- }), ot = y(function(t, e) {
439
+ }), at = g(function(t, e) {
440
440
  const { height: o = 14, width: i = 14, ...r } = t;
441
441
  return /* @__PURE__ */ a(
442
442
  "svg",
@@ -460,7 +460,7 @@ const Jo = y(function(t, e) {
460
460
  )
461
461
  }
462
462
  );
463
- }), rt = y(function(t, e) {
463
+ }), lt = g(function(t, e) {
464
464
  const { height: o = 14, width: i = 14, ...r } = t;
465
465
  return /* @__PURE__ */ a(
466
466
  "svg",
@@ -475,7 +475,7 @@ const Jo = y(function(t, e) {
475
475
  children: /* @__PURE__ */ a("path", { fill: "currentColor", fillRule: "evenodd", d: "M10.391 7.868a3.501 3.501 0 0 1-6.782 0 1 1 0 0 1-.109.007H.875a.875.875 0 1 1 0-1.75H3.5q.055 0 .109.007a3.501 3.501 0 0 1 6.782 0 1 1 0 0 1 .109-.007h2.625a.875.875 0 1 1 0 1.75H10.5a1 1 0 0 1-.109-.007M7 8.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5", clipRule: "evenodd" })
476
476
  }
477
477
  );
478
- }), it = y(function(t, e) {
478
+ }), st = g(function(t, e) {
479
479
  const { height: o = 14, width: i = 14, ...r } = t;
480
480
  return /* @__PURE__ */ a(
481
481
  "svg",
@@ -498,7 +498,7 @@ const Jo = y(function(t, e) {
498
498
  )
499
499
  }
500
500
  );
501
- }), at = y(function(t, e) {
501
+ }), ct = g(function(t, e) {
502
502
  const { height: o = 14, width: i = 14, ...r } = t;
503
503
  return /* @__PURE__ */ a(
504
504
  "svg",
@@ -522,7 +522,7 @@ const Jo = y(function(t, e) {
522
522
  )
523
523
  }
524
524
  );
525
- }), st = y(function(t, e) {
525
+ }), dt = g(function(t, e) {
526
526
  const { height: o = 14, width: i = 14, ...r } = t;
527
527
  return /* @__PURE__ */ a(
528
528
  "svg",
@@ -543,9 +543,9 @@ const Jo = y(function(t, e) {
543
543
  )
544
544
  }
545
545
  );
546
- }), lt = y(function(t, e) {
546
+ }), ut = g(function(t, e) {
547
547
  const { height: o = 14, width: i = 14, ...r } = t;
548
- return /* @__PURE__ */ A(
548
+ return /* @__PURE__ */ O(
549
549
  "svg",
550
550
  {
551
551
  ...r,
@@ -577,9 +577,9 @@ const Jo = y(function(t, e) {
577
577
  ]
578
578
  }
579
579
  );
580
- }), ct = y(function(t, e) {
580
+ }), ft = g(function(t, e) {
581
581
  const { height: o = 14, width: i = 14, ...r } = t;
582
- return /* @__PURE__ */ A(
582
+ return /* @__PURE__ */ O(
583
583
  "svg",
584
584
  {
585
585
  ...r,
@@ -607,7 +607,7 @@ const Jo = y(function(t, e) {
607
607
  ]
608
608
  }
609
609
  );
610
- }), dt = y(function(t, e) {
610
+ }), ht = g(function(t, e) {
611
611
  const { height: o = 14, width: i = 14, ...r } = t;
612
612
  return /* @__PURE__ */ a(
613
613
  "svg",
@@ -631,7 +631,7 @@ const Jo = y(function(t, e) {
631
631
  )
632
632
  }
633
633
  );
634
- }), ut = y(function(t, e) {
634
+ }), pt = g(function(t, e) {
635
635
  const { height: o = 14, width: i = 14, ...r } = t;
636
636
  return /* @__PURE__ */ a(
637
637
  "svg",
@@ -646,7 +646,7 @@ const Jo = y(function(t, e) {
646
646
  children: /* @__PURE__ */ a("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M12 5.5v4.867c0 .746 0 1.12-.14 1.405a1.3 1.3 0 0 1-.562.583c-.275.145-.635.145-1.355.145H4.557c-.72 0-1.08 0-1.355-.145a1.3 1.3 0 0 1-.562-.583c-.14-.285-.14-.659-.14-1.405V3.633c0-.746 0-1.12.14-1.405.123-.25.32-.455.562-.583.275-.145.635-.145 1.355-.145h3.586M12 5.5l-3.857-4M12 5.5H8.786a.655.655 0 0 1-.643-.667V1.5" })
647
647
  }
648
648
  );
649
- }), ft = y(function(t, e) {
649
+ }), vt = g(function(t, e) {
650
650
  const { height: o = 14, width: i = 14, ...r } = t;
651
651
  return /* @__PURE__ */ a(
652
652
  "svg",
@@ -661,7 +661,7 @@ const Jo = y(function(t, e) {
661
661
  children: /* @__PURE__ */ a("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M2.49 2.25H5.19c.413 0 .508.004.588.021q.133.03.243.093c.064.036.128.088.421.358l.098.09c.244.224.45.42.7.56q.232.13.486.205l.17.044c.278.061.564.058.912.058h2.702c.447 0 .74 0 .966.017.217.017.307.045.356.068a.75.75 0 0 1 .342.308c.013.024.04.084.056.27.018.198.019.459.019.872v5c0 .413-.001.675-.019.872-.016.186-.043.246-.056.27a.75.75 0 0 1-.342.309c-.049.023-.139.051-.356.067-.225.017-.52.018-.966.018H2.489c-.447 0-.74 0-.966-.018-.217-.016-.307-.044-.356-.067a.75.75 0 0 1-.342-.309c-.013-.024-.04-.084-.056-.27a11 11 0 0 1-.019-.872V3.786c0-.413.001-.675.019-.872.016-.186.043-.246.056-.27a.75.75 0 0 1 .342-.309c.049-.023.139-.051.356-.067.225-.017.52-.018.966-.018" })
662
662
  }
663
663
  );
664
- }), ht = y(function(t, e) {
664
+ }), mt = g(function(t, e) {
665
665
  const { height: o = 14, width: i = 14, ...r } = t;
666
666
  return /* @__PURE__ */ a(
667
667
  "svg",
@@ -682,7 +682,7 @@ const Jo = y(function(t, e) {
682
682
  )
683
683
  }
684
684
  );
685
- }), pt = y(function(t, e) {
685
+ }), gt = g(function(t, e) {
686
686
  const { height: o = 14, width: i = 14, ...r } = t;
687
687
  return /* @__PURE__ */ a(
688
688
  "svg",
@@ -705,7 +705,7 @@ const Jo = y(function(t, e) {
705
705
  )
706
706
  }
707
707
  );
708
- }), vt = y(function(t, e) {
708
+ }), wt = g(function(t, e) {
709
709
  const { height: o = 14, width: i = 14, ...r } = t;
710
710
  return /* @__PURE__ */ a(
711
711
  "svg",
@@ -728,7 +728,7 @@ const Jo = y(function(t, e) {
728
728
  )
729
729
  }
730
730
  );
731
- }), mt = y(function(t, e) {
731
+ }), bt = g(function(t, e) {
732
732
  const { height: o = 14, width: i = 14, ...r } = t;
733
733
  return /* @__PURE__ */ a(
734
734
  "svg",
@@ -749,7 +749,7 @@ const Jo = y(function(t, e) {
749
749
  )
750
750
  }
751
751
  );
752
- }), gt = y(function(t, e) {
752
+ }), yt = g(function(t, e) {
753
753
  const { height: o = 14, width: i = 14, ...r } = t;
754
754
  return /* @__PURE__ */ a(
755
755
  "svg",
@@ -770,9 +770,9 @@ const Jo = y(function(t, e) {
770
770
  )
771
771
  }
772
772
  );
773
- }), wt = y(function(t, e) {
773
+ }), kt = g(function(t, e) {
774
774
  const { height: o = 14, width: i = 14, ...r } = t;
775
- return /* @__PURE__ */ A(
775
+ return /* @__PURE__ */ O(
776
776
  "svg",
777
777
  {
778
778
  ...r,
@@ -797,7 +797,7 @@ const Jo = y(function(t, e) {
797
797
  ]
798
798
  }
799
799
  );
800
- }), bt = y(function(t, e) {
800
+ }), It = g(function(t, e) {
801
801
  const { height: o = 14, width: i = 14, ...r } = t;
802
802
  return /* @__PURE__ */ a(
803
803
  "svg",
@@ -820,7 +820,7 @@ const Jo = y(function(t, e) {
820
820
  )
821
821
  }
822
822
  );
823
- }), yt = y(function(t, e) {
823
+ }), xt = g(function(t, e) {
824
824
  const { height: o = 14, width: i = 14, ...r } = t;
825
825
  return /* @__PURE__ */ a(
826
826
  "svg",
@@ -843,9 +843,9 @@ const Jo = y(function(t, e) {
843
843
  )
844
844
  }
845
845
  );
846
- }), kt = y(function(t, e) {
846
+ }), Ct = g(function(t, e) {
847
847
  const { height: o = 14, width: i = 14, ...r } = t;
848
- return /* @__PURE__ */ A(
848
+ return /* @__PURE__ */ O(
849
849
  "svg",
850
850
  {
851
851
  ...r,
@@ -879,7 +879,7 @@ const Jo = y(function(t, e) {
879
879
  ]
880
880
  }
881
881
  );
882
- }), xt = y(function(t, e) {
882
+ }), Pt = g(function(t, e) {
883
883
  const { height: o = 14, width: i = 14, ...r } = t;
884
884
  return /* @__PURE__ */ a(
885
885
  "svg",
@@ -902,7 +902,7 @@ const Jo = y(function(t, e) {
902
902
  )
903
903
  }
904
904
  );
905
- }), It = y(function(t, e) {
905
+ }), _t = g(function(t, e) {
906
906
  const { height: o = 14, width: i = 14, ...r } = t;
907
907
  return /* @__PURE__ */ a(
908
908
  "svg",
@@ -923,7 +923,7 @@ const Jo = y(function(t, e) {
923
923
  )
924
924
  }
925
925
  );
926
- }), Ct = y(function(t, e) {
926
+ }), Nt = g(function(t, e) {
927
927
  const { height: o = 14, width: i = 14, ...r } = t;
928
928
  return /* @__PURE__ */ a(
929
929
  "svg",
@@ -946,9 +946,9 @@ const Jo = y(function(t, e) {
946
946
  )
947
947
  }
948
948
  );
949
- }), Pt = y(function(t, e) {
949
+ }), Lt = g(function(t, e) {
950
950
  const { height: o = 14, width: i = 14, ...r } = t;
951
- return /* @__PURE__ */ A(
951
+ return /* @__PURE__ */ O(
952
952
  "svg",
953
953
  {
954
954
  ...r,
@@ -966,7 +966,7 @@ const Jo = y(function(t, e) {
966
966
  ]
967
967
  }
968
968
  );
969
- }), Mt = y(function(t, e) {
969
+ }), Mt = g(function(t, e) {
970
970
  const { height: o = 14, width: i = 14, ...r } = t;
971
971
  return /* @__PURE__ */ a(
972
972
  "svg",
@@ -978,13 +978,13 @@ const Jo = y(function(t, e) {
978
978
  height: o,
979
979
  viewBox: "0 0 14 14",
980
980
  fill: "none",
981
- children: /* @__PURE__ */ A("g", { fill: "currentColor", children: [
981
+ children: /* @__PURE__ */ O("g", { fill: "currentColor", children: [
982
982
  /* @__PURE__ */ a("path", { d: "M14 14h-3.111v-1.556h1.555V10.89H14V14ZM0 0h6.222v6.222H0V0Zm1.556 1.556v3.11h3.11v-3.11h-3.11ZM7.778 0H14v6.222H7.778V0Zm1.555 1.556v3.11h3.111v-3.11h-3.11ZM0 7.778h6.222V14H0V7.778Zm1.556 1.555v3.111h3.11v-3.11h-3.11Zm10.11-1.555H14V9h-2.333V7.778ZM9.333 10H7.778V7.778h1.555V10ZM9.31 12.444V14H7.779v-2H9.31v.444ZM9.3 11h1v1h-1zM10.3 11h1v1h-1z" }),
983
983
  /* @__PURE__ */ a("path", { d: "M11.3 10H14v1h-2.7zM10.3 9h1v1h-1z" })
984
984
  ] })
985
985
  }
986
986
  );
987
- }), Lt = y(function(t, e) {
987
+ }), Et = g(function(t, e) {
988
988
  const { height: o = 14, width: i = 14, ...r } = t;
989
989
  return /* @__PURE__ */ a(
990
990
  "svg",
@@ -1007,9 +1007,9 @@ const Jo = y(function(t, e) {
1007
1007
  )
1008
1008
  }
1009
1009
  );
1010
- }), Et = y(function(t, e) {
1010
+ }), St = g(function(t, e) {
1011
1011
  const { height: o = 14, width: i = 14, ...r } = t;
1012
- return /* @__PURE__ */ A(
1012
+ return /* @__PURE__ */ O(
1013
1013
  "svg",
1014
1014
  {
1015
1015
  ...r,
@@ -1025,7 +1025,7 @@ const Jo = y(function(t, e) {
1025
1025
  ]
1026
1026
  }
1027
1027
  );
1028
- }), Nt = y(function(t, e) {
1028
+ }), Rt = g(function(t, e) {
1029
1029
  const { height: o = 14, width: i = 14, ...r } = t;
1030
1030
  return /* @__PURE__ */ a(
1031
1031
  "svg",
@@ -1046,9 +1046,9 @@ const Jo = y(function(t, e) {
1046
1046
  )
1047
1047
  }
1048
1048
  );
1049
- }), _t = y(function(t, e) {
1049
+ }), Tt = g(function(t, e) {
1050
1050
  const { height: o = 14, width: i = 14, ...r } = t;
1051
- return /* @__PURE__ */ A(
1051
+ return /* @__PURE__ */ O(
1052
1052
  "svg",
1053
1053
  {
1054
1054
  ...r,
@@ -1070,7 +1070,7 @@ const Jo = y(function(t, e) {
1070
1070
  ]
1071
1071
  }
1072
1072
  );
1073
- }), Rt = y(function(t, e) {
1073
+ }), Vt = g(function(t, e) {
1074
1074
  const { height: o = 14, width: i = 14, ...r } = t;
1075
1075
  return /* @__PURE__ */ a(
1076
1076
  "svg",
@@ -1085,7 +1085,7 @@ const Jo = y(function(t, e) {
1085
1085
  children: /* @__PURE__ */ a("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M4.031 4.031h.006M6.195 1.5H4.5c-1.05 0-1.575 0-1.976.204-.353.18-.64.467-.82.82-.204.4-.204.926-.204 1.976v1.695c0 .458 0 .688.052.904.046.19.121.374.224.542.116.189.278.35.603.675l2.937 2.938c.743.742 1.114 1.114 1.542 1.253.377.122.782.122 1.159 0 .428-.14.8-.51 1.542-1.253l1.695-1.695c.742-.743 1.114-1.114 1.253-1.542a1.88 1.88 0 0 0 0-1.159c-.14-.428-.51-.8-1.253-1.542L8.316 2.38c-.324-.325-.486-.487-.675-.603a1.9 1.9 0 0 0-.542-.224C6.883 1.5 6.653 1.5 6.195 1.5M4.344 4.031a.312.312 0 1 1-.625 0 .312.312 0 0 1 .625 0" })
1086
1086
  }
1087
1087
  );
1088
- }), St = y(function(t, e) {
1088
+ }), At = g(function(t, e) {
1089
1089
  const { height: o = 14, width: i = 14, ...r } = t;
1090
1090
  return /* @__PURE__ */ a(
1091
1091
  "svg",
@@ -1106,9 +1106,9 @@ const Jo = y(function(t, e) {
1106
1106
  )
1107
1107
  }
1108
1108
  );
1109
- }), Vt = y(function(t, e) {
1109
+ }), Ot = g(function(t, e) {
1110
1110
  const { height: o = 14, width: i = 14, ...r } = t;
1111
- return /* @__PURE__ */ A(
1111
+ return /* @__PURE__ */ O(
1112
1112
  "svg",
1113
1113
  {
1114
1114
  ...r,
@@ -1141,7 +1141,7 @@ const Jo = y(function(t, e) {
1141
1141
  ]
1142
1142
  }
1143
1143
  );
1144
- }), Tt = y(function(t, e) {
1144
+ }), Bt = g(function(t, e) {
1145
1145
  const { height: o = 14, width: i = 14, ...r } = t;
1146
1146
  return /* @__PURE__ */ a(
1147
1147
  "svg",
@@ -1162,83 +1162,83 @@ const Jo = y(function(t, e) {
1162
1162
  )
1163
1163
  }
1164
1164
  );
1165
- }), At = {
1166
- projects: Pt,
1167
- chat: Xn,
1168
- articles: qn,
1169
- mail: kt,
1170
- github: pt,
1171
- globe: vt,
1172
- linkedin: yt,
1173
- reddit: Lt,
1174
- exit: dt,
1175
- camera: Qn,
1165
+ }), Dt = {
1166
+ projects: Lt,
1167
+ chat: nt,
1168
+ articles: Kn,
1169
+ mail: Ct,
1170
+ github: gt,
1171
+ globe: wt,
1172
+ linkedin: xt,
1173
+ reddit: Et,
1174
+ exit: ht,
1175
+ camera: et,
1176
1176
  "qr-code": Mt,
1177
- download: at,
1178
- save: Nt,
1179
- pencil: It,
1180
- "arrow-left": $n,
1181
- "arrow-right": Gn,
1182
- cross: it,
1183
- checkmark: Jn,
1184
- plus: Ct,
1185
- minus: xt,
1186
- window: Tt,
1187
- user: St,
1188
- duplicate: st,
1189
- eye: lt,
1190
- "eye-off": ct,
1191
- signal: _t,
1192
- audio: Kn,
1193
- hardware: mt,
1194
- burger: Yn,
1195
- repository: Et,
1196
- "chevron-down": et,
1197
- "chevron-up": ot,
1198
- "chevron-left": nt,
1199
- "chevron-right": tt,
1200
- branch: Un,
1201
- commit: rt,
1202
- folder: ft,
1203
- file: ut,
1204
- tag: Rt,
1205
- key: bt,
1206
- git: ht,
1207
- home: gt,
1208
- info: wt,
1209
- warning: Vt
1210
- }, me = y(function(t, e) {
1177
+ download: ct,
1178
+ save: Rt,
1179
+ pencil: _t,
1180
+ "arrow-left": Un,
1181
+ "arrow-right": Yn,
1182
+ cross: st,
1183
+ checkmark: tt,
1184
+ plus: Nt,
1185
+ minus: Pt,
1186
+ window: Bt,
1187
+ user: At,
1188
+ duplicate: dt,
1189
+ eye: ut,
1190
+ "eye-off": ft,
1191
+ signal: Tt,
1192
+ audio: Xn,
1193
+ hardware: bt,
1194
+ burger: Jn,
1195
+ repository: St,
1196
+ "chevron-down": ot,
1197
+ "chevron-up": at,
1198
+ "chevron-left": rt,
1199
+ "chevron-right": it,
1200
+ branch: Qn,
1201
+ commit: lt,
1202
+ folder: vt,
1203
+ file: pt,
1204
+ tag: Vt,
1205
+ key: It,
1206
+ git: mt,
1207
+ home: yt,
1208
+ info: kt,
1209
+ warning: Ot
1210
+ }, me = g(function(t, e) {
1211
1211
  const {
1212
1212
  "aria-hidden": o,
1213
1213
  "aria-label": i,
1214
1214
  "aria-labelledby": r,
1215
1215
  color: l,
1216
1216
  role: s,
1217
- size: h = 14,
1217
+ size: u = 14,
1218
1218
  style: f,
1219
1219
  type: d,
1220
1220
  ...c
1221
- } = t, p = At[d];
1221
+ } = t, p = Dt[d];
1222
1222
  if (!p)
1223
1223
  return console.warn(`Icon type "${d}" not found`), null;
1224
1224
  const v = i !== void 0 || r !== void 0;
1225
- return Te(p, {
1225
+ return Ae(p, {
1226
1226
  ...c,
1227
1227
  "aria-hidden": o ?? (v ? void 0 : !0),
1228
1228
  "aria-label": i,
1229
1229
  "aria-labelledby": r,
1230
1230
  ref: e,
1231
- height: h,
1231
+ height: u,
1232
1232
  role: s ?? (v ? "img" : void 0),
1233
1233
  style: {
1234
1234
  flexShrink: 0,
1235
1235
  ...f,
1236
1236
  ...l ? { color: l } : void 0
1237
1237
  },
1238
- width: h
1238
+ width: u
1239
1239
  });
1240
- }), Cn = y(function(t, e) {
1241
- const { className: o = "", color: i, size: r = 48, style: l, ...s } = t, h = typeof r == "number" ? `${r}px` : r;
1240
+ }), Pn = g(function(t, e) {
1241
+ const { className: o = "", color: i, size: r = 48, style: l, ...s } = t, u = typeof r == "number" ? `${r}px` : r;
1242
1242
  return /* @__PURE__ */ a(
1243
1243
  "div",
1244
1244
  {
@@ -1248,7 +1248,7 @@ const Jo = y(function(t, e) {
1248
1248
  ...l,
1249
1249
  width: r,
1250
1250
  height: r,
1251
- fontSize: h,
1251
+ fontSize: u,
1252
1252
  ...i ? { color: i } : void 0
1253
1253
  },
1254
1254
  role: "status",
@@ -1257,86 +1257,86 @@ const Jo = y(function(t, e) {
1257
1257
  }
1258
1258
  );
1259
1259
  });
1260
- function nn(n) {
1261
- return n == null || typeof n == "boolean" || typeof n == "string" && !n.trim() ? !1 : Array.isArray(n) ? n.some(nn) : kn(n) && n.type === ze ? nn(n.props.children) : !0;
1260
+ function rn(n) {
1261
+ return n == null || typeof n == "boolean" || typeof n == "string" && !n.trim() ? !1 : Array.isArray(n) ? n.some(rn) : Ze(n) && n.type === _e ? rn(n.props.children) : !0;
1262
1262
  }
1263
- function Dt(n, t) {
1263
+ function Ht(n, t) {
1264
1264
  const e = n.getBoundingClientRect(), o = t.clientX - e.left, i = t.clientY - e.top;
1265
1265
  n.style.setProperty("--nk-button-glow-x", `${o}px`), n.style.setProperty("--nk-button-glow-y", `${i}px`);
1266
1266
  }
1267
- const tn = y(function(t, e) {
1267
+ const ze = g(function(t, e) {
1268
1268
  const {
1269
1269
  as: o,
1270
1270
  children: i,
1271
1271
  className: r,
1272
1272
  disabled: l,
1273
1273
  fullWidth: s = !1,
1274
- icon: h,
1274
+ icon: u,
1275
1275
  iconAlignment: f = "left",
1276
1276
  loading: d = !1,
1277
1277
  onClick: c,
1278
1278
  onKeyDown: p,
1279
1279
  onMouseMove: v,
1280
- role: g,
1280
+ role: m,
1281
1281
  shape: x,
1282
1282
  tabIndex: b,
1283
1283
  textAlignment: w = "center",
1284
- tone: T,
1285
- variant: L = "primary",
1286
- ...V
1287
- } = t, P = o ?? "button", E = l || d, C = !!h && !nn(i), _ = P === "a" && "href" in V && typeof V.href == "string", D = typeof P == "string" && P !== "button" && !_, Z = (k) => {
1288
- if (E) {
1289
- k.preventDefault(), k.stopPropagation();
1284
+ tone: M,
1285
+ variant: _ = "primary",
1286
+ ...R
1287
+ } = t, k = o ?? "button", C = l || d, I = !!u && !rn(i), N = k === "a" && "href" in R && typeof R.href == "string", T = typeof k == "string" && k !== "button" && !N, z = (P) => {
1288
+ if (C) {
1289
+ P.preventDefault(), P.stopPropagation();
1290
1290
  return;
1291
1291
  }
1292
- const R = c;
1293
- R == null || R(k);
1294
- }, j = (k) => {
1295
- Dt(k.currentTarget, k);
1296
- const R = v;
1297
- R == null || R(k);
1298
- }, F = (k) => {
1299
- const R = p;
1300
- R == null || R(k), !(k.defaultPrevented || E || !D || k.key !== "Enter" && k.key !== " ") && (k.preventDefault(), k.currentTarget.click());
1301
- }, N = P === "button" ? {
1302
- disabled: E,
1303
- type: V.type ?? "button"
1304
- } : { "aria-disabled": E || void 0 }, K = _ && E ? { href: void 0 } : void 0, M = _ && E ? g ?? "link" : D ? g ?? "button" : g, m = P === "button" ? b : _ && E ? void 0 : E ? -1 : D ? b ?? 0 : b;
1305
- return Te(
1306
- P,
1292
+ const A = c;
1293
+ A == null || A(P);
1294
+ }, Z = (P) => {
1295
+ Ht(P.currentTarget, P);
1296
+ const A = v;
1297
+ A == null || A(P);
1298
+ }, H = (P) => {
1299
+ const A = p;
1300
+ A == null || A(P), !(P.defaultPrevented || C || !T || P.key !== "Enter" && P.key !== " ") && (P.preventDefault(), P.currentTarget.click());
1301
+ }, E = k === "button" ? {
1302
+ disabled: C,
1303
+ type: R.type ?? "button"
1304
+ } : { "aria-disabled": C || void 0 }, U = N && C ? { href: void 0 } : void 0, S = N && C ? m ?? "link" : T ? m ?? "button" : m, y = k === "button" ? b : N && C ? void 0 : C ? -1 : T ? b ?? 0 : b;
1305
+ return Ae(
1306
+ k,
1307
1307
  {
1308
- ...V,
1309
- ...N,
1310
- ...K,
1308
+ ...R,
1309
+ ...E,
1310
+ ...U,
1311
1311
  ref: e,
1312
1312
  "aria-busy": d || void 0,
1313
1313
  className: ["nk-button", r].filter(Boolean).join(" "),
1314
1314
  "data-full-width": s || void 0,
1315
- "data-icon-only": C || void 0,
1315
+ "data-icon-only": I || void 0,
1316
1316
  "data-shape": x,
1317
- "data-tone": T,
1318
- "data-variant": L,
1319
- onClick: Z,
1320
- onKeyDown: D ? F : p,
1321
- onMouseMove: j,
1322
- role: M,
1323
- tabIndex: m
1317
+ "data-tone": M,
1318
+ "data-variant": _,
1319
+ onClick: z,
1320
+ onKeyDown: T ? H : p,
1321
+ onMouseMove: Z,
1322
+ role: S,
1323
+ tabIndex: y
1324
1324
  },
1325
- /* @__PURE__ */ A(We, { children: [
1326
- /* @__PURE__ */ A(
1325
+ /* @__PURE__ */ O(je, { children: [
1326
+ /* @__PURE__ */ O(
1327
1327
  "span",
1328
1328
  {
1329
1329
  className: "nk-button__content",
1330
1330
  style: { justifyContent: w },
1331
1331
  children: [
1332
- h && f === "left" ? /* @__PURE__ */ a(me, { size: 14, type: h }) : null,
1332
+ u && f === "left" ? /* @__PURE__ */ a(me, { size: 14, type: u }) : null,
1333
1333
  i,
1334
- h && f === "right" ? /* @__PURE__ */ a(me, { size: 14, type: h }) : null
1334
+ u && f === "right" ? /* @__PURE__ */ a(me, { size: 14, type: u }) : null
1335
1335
  ]
1336
1336
  }
1337
1337
  ),
1338
1338
  d ? /* @__PURE__ */ a(
1339
- Cn,
1339
+ Pn,
1340
1340
  {
1341
1341
  "aria-hidden": "true",
1342
1342
  "aria-label": void 0,
@@ -1347,26 +1347,26 @@ const tn = y(function(t, e) {
1347
1347
  ) : null
1348
1348
  ] })
1349
1349
  );
1350
- }), fe = y(function(t, e) {
1350
+ }), fe = g(function(t, e) {
1351
1351
  const {
1352
1352
  align: o = "left",
1353
1353
  as: i,
1354
1354
  className: r,
1355
1355
  size: l = "body",
1356
1356
  tone: s = "default",
1357
- weight: h,
1357
+ weight: u,
1358
1358
  ...f
1359
1359
  } = t;
1360
- return Te(i ?? "p", {
1360
+ return Ae(i ?? "p", {
1361
1361
  ...f,
1362
1362
  ref: e,
1363
1363
  className: ["nk-text", r].filter(Boolean).join(" "),
1364
1364
  "data-align": o,
1365
1365
  "data-size": l,
1366
1366
  "data-tone": s,
1367
- "data-weight": h
1367
+ "data-weight": u
1368
1368
  });
1369
- }), nr = y(function(t, e) {
1369
+ }), Ir = g(function(t, e) {
1370
1370
  const {
1371
1371
  children: o,
1372
1372
  className: i,
@@ -1374,8 +1374,8 @@ const tn = y(function(t, e) {
1374
1374
  spacing: l = "standard",
1375
1375
  ...s
1376
1376
  } = t;
1377
- return /* @__PURE__ */ A(
1378
- Oe,
1377
+ return /* @__PURE__ */ O(
1378
+ He,
1379
1379
  {
1380
1380
  ...s,
1381
1381
  ref: e,
@@ -1383,7 +1383,7 @@ const tn = y(function(t, e) {
1383
1383
  "data-has-header": r ? !0 : void 0,
1384
1384
  "data-spacing": l,
1385
1385
  children: [
1386
- r ? /* @__PURE__ */ A("div", { className: "nk-card__header", children: [
1386
+ r ? /* @__PURE__ */ O("div", { className: "nk-card__header", children: [
1387
1387
  r.title ? /* @__PURE__ */ a(fe, { as: "span", size: "caption", tone: "muted", weight: "semibold", children: r.title }) : null,
1388
1388
  r.title && r.subtitle ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-card__separator", children: "•" }) : null,
1389
1389
  r.subtitle ? /* @__PURE__ */ a(fe, { as: "span", size: "caption", tone: "muted", weight: "semibold", children: r.subtitle }) : null
@@ -1399,36 +1399,36 @@ function he(n) {
1399
1399
  function ge(n, t) {
1400
1400
  return n ? !0 : t;
1401
1401
  }
1402
- const Pn = Ze(void 0);
1403
- function Ot() {
1404
- return Pe(Pn);
1402
+ const _n = qe(void 0);
1403
+ function Ft() {
1404
+ return Ne(_n);
1405
1405
  }
1406
- const Bt = y(function(t, e) {
1407
- var C;
1406
+ const Wt = g(function(t, e) {
1407
+ var I;
1408
1408
  const {
1409
1409
  "aria-invalid": o,
1410
1410
  checked: i,
1411
1411
  children: r,
1412
1412
  className: l,
1413
1413
  defaultChecked: s,
1414
- disabled: h = !1,
1414
+ disabled: u = !1,
1415
1415
  invalid: f = !1,
1416
1416
  name: d,
1417
1417
  onChange: c,
1418
1418
  required: p = !1,
1419
1419
  style: v,
1420
- value: g = "on",
1420
+ value: m = "on",
1421
1421
  ...x
1422
- } = t, b = Ot(), w = String(g), T = (b == null ? void 0 : b.value) !== void 0, L = h || !!(b != null && b.disabled), V = !!(b != null && b.required && !b.hasSelection && b.validationValue === w), P = f || he(o);
1423
- function E(_) {
1424
- c == null || c(_), _.defaultPrevented || b == null || b.handleChange(_);
1422
+ } = t, b = Ft(), w = String(m), M = (b == null ? void 0 : b.value) !== void 0, _ = u || !!(b != null && b.disabled), R = !!(b != null && b.required && !b.hasSelection && b.validationValue === w), k = f || he(o);
1423
+ function C(N) {
1424
+ c == null || c(N), N.defaultPrevented || b == null || b.handleChange(N);
1425
1425
  }
1426
- return /* @__PURE__ */ A(
1426
+ return /* @__PURE__ */ O(
1427
1427
  "label",
1428
1428
  {
1429
1429
  className: ["nk-checkbox", l].filter(Boolean).join(" "),
1430
- "data-disabled": L || void 0,
1431
- "data-invalid": P || void 0,
1430
+ "data-disabled": _ || void 0,
1431
+ "data-invalid": k || void 0,
1432
1432
  style: v,
1433
1433
  children: [
1434
1434
  /* @__PURE__ */ a(
@@ -1437,51 +1437,51 @@ const Bt = y(function(t, e) {
1437
1437
  ...x,
1438
1438
  ref: e,
1439
1439
  "aria-invalid": ge(f, o),
1440
- checked: b ? T ? (C = b.value) == null ? void 0 : C.includes(w) : void 0 : i,
1440
+ checked: b ? M ? (I = b.value) == null ? void 0 : I.includes(w) : void 0 : i,
1441
1441
  className: "nk-checkbox__control",
1442
- defaultChecked: b && !T ? b.defaultValue.includes(w) : s,
1443
- disabled: L,
1442
+ defaultChecked: b && !M ? b.defaultValue.includes(w) : s,
1443
+ disabled: _,
1444
1444
  name: (b == null ? void 0 : b.name) ?? d,
1445
- onChange: E,
1446
- required: p || V,
1445
+ onChange: C,
1446
+ required: p || R,
1447
1447
  type: "checkbox",
1448
- value: g
1448
+ value: m
1449
1449
  }
1450
1450
  ),
1451
1451
  /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-checkbox__visual", children: /* @__PURE__ */ a(me, { className: "nk-checkbox__icon", size: 12, type: "checkmark" }) }),
1452
- r !== void 0 ? /* @__PURE__ */ A(fe, { as: "span", className: "nk-checkbox__label", children: [
1452
+ r !== void 0 ? /* @__PURE__ */ O(fe, { as: "span", className: "nk-checkbox__label", children: [
1453
1453
  r,
1454
1454
  p ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-checkbox__required", children: "*" }) : null
1455
1455
  ] }) : null
1456
1456
  ]
1457
1457
  }
1458
1458
  );
1459
- }), Mn = Symbol("nk-field-control-metadata");
1459
+ }), Nn = Symbol("nk-field-control-metadata");
1460
1460
  function Ln(n) {
1461
1461
  if (typeof n != "function" && typeof n != "object" || n === null)
1462
1462
  return;
1463
- const t = n, e = t[Mn];
1463
+ const t = n, e = t[Nn];
1464
1464
  return e || (t.type !== void 0 && t.type !== n ? Ln(t.type) : void 0);
1465
1465
  }
1466
- function En(n, t) {
1466
+ function Mn(n, t) {
1467
1467
  Object.assign(n, {
1468
- [Mn]: { requiredCommunication: t }
1468
+ [Nn]: { requiredCommunication: t }
1469
1469
  });
1470
1470
  }
1471
- const Ht = Object.freeze([]);
1472
- function Nn(n, t) {
1473
- Hn.forEach(n, (e) => {
1471
+ const zt = Object.freeze([]);
1472
+ function En(n, t) {
1473
+ ln.forEach(n, (e) => {
1474
1474
  if (e == null || typeof e == "boolean")
1475
1475
  return;
1476
- if (!kn(e))
1476
+ if (!Ze(e))
1477
1477
  throw new Error(
1478
1478
  "CheckboxGroup children must be direct Checkbox elements or fragments"
1479
1479
  );
1480
- if (e.type === ze) {
1481
- Nn(e.props.children, t);
1480
+ if (e.type === _e) {
1481
+ En(e.props.children, t);
1482
1482
  return;
1483
1483
  }
1484
- if (e.type !== Bt)
1484
+ if (e.type !== Wt)
1485
1485
  throw new Error(
1486
1486
  "CheckboxGroup children must be direct Checkbox elements or fragments"
1487
1487
  );
@@ -1493,9 +1493,9 @@ function Nn(n, t) {
1493
1493
  });
1494
1494
  });
1495
1495
  }
1496
- function Ft(n) {
1496
+ function jt(n) {
1497
1497
  const t = [];
1498
- Nn(n, t);
1498
+ En(n, t);
1499
1499
  const e = /* @__PURE__ */ new Set();
1500
1500
  return t.forEach((o) => {
1501
1501
  if (e.has(o.value))
@@ -1503,98 +1503,98 @@ function Ft(n) {
1503
1503
  e.add(o.value);
1504
1504
  }), t;
1505
1505
  }
1506
- function Wt(n, t, e) {
1506
+ function Zt(n, t, e) {
1507
1507
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
1508
1508
  }
1509
- const zt = y(
1509
+ const qt = g(
1510
1510
  function(t, e) {
1511
1511
  const {
1512
1512
  "aria-invalid": o,
1513
1513
  children: i,
1514
1514
  className: r,
1515
- defaultValue: l = Ht,
1515
+ defaultValue: l = zt,
1516
1516
  disabled: s = !1,
1517
- invalid: h = !1,
1517
+ invalid: u = !1,
1518
1518
  name: f,
1519
1519
  onChange: d,
1520
1520
  orientation: c = "vertical",
1521
1521
  required: p = !1,
1522
1522
  value: v,
1523
- ...g
1524
- } = t, x = H(null), [b, w] = Y(l), T = v !== void 0, L = T ? v : b, V = h || he(o), P = Ft(i), E = s ? [] : P.filter((m) => !m.disabled).map((m) => m.value), C = new Set(E), _ = L.some(
1525
- (m) => C.has(m)
1526
- ), D = E[0], Z = P.find(
1527
- (m) => !m.disabled && m.value === D
1528
- ), j = l.some(
1529
- (m) => C.has(m)
1530
- ), F = !!(Z != null && Z.required), N = W(
1531
- (m) => Wt(
1532
- m,
1523
+ ...m
1524
+ } = t, x = D(null), [b, w] = $(l), M = v !== void 0, _ = M ? v : b, R = u || he(o), k = jt(i), C = s ? [] : k.filter((y) => !y.disabled).map((y) => y.value), I = new Set(C), N = _.some(
1525
+ (y) => I.has(y)
1526
+ ), T = C[0], z = k.find(
1527
+ (y) => !y.disabled && y.value === T
1528
+ ), Z = l.some(
1529
+ (y) => I.has(y)
1530
+ ), H = !!(z != null && z.required), E = W(
1531
+ (y) => Zt(
1532
+ y,
1533
1533
  x,
1534
1534
  e
1535
1535
  ),
1536
1536
  [e]
1537
1537
  );
1538
1538
  q(() => {
1539
- var S;
1540
- if (T) return;
1541
- const m = (S = x.current) == null ? void 0 : S.querySelector(
1539
+ var V;
1540
+ if (M) return;
1541
+ const y = (V = x.current) == null ? void 0 : V.querySelector(
1542
1542
  'input[type="checkbox"]'
1543
- ), k = m instanceof HTMLInputElement ? m.form : null;
1544
- if (!k) return;
1545
- const R = k.getRootNode();
1546
- function O(z) {
1543
+ ), P = y instanceof HTMLInputElement ? y.form : null;
1544
+ if (!P) return;
1545
+ const A = P.getRootNode();
1546
+ function B(j) {
1547
1547
  var ee;
1548
- if (z.target !== k || z.defaultPrevented) return;
1548
+ if (j.target !== P || j.defaultPrevented) return;
1549
1549
  const te = Array.from(
1550
1550
  ((ee = x.current) == null ? void 0 : ee.querySelectorAll(
1551
1551
  'input[type="checkbox"]'
1552
1552
  )) ?? []
1553
1553
  ).find(
1554
- (Q) => !Q.disabled && Q.value === D
1554
+ (X) => !X.disabled && X.value === T
1555
1555
  );
1556
- te && (te.required = !!(F || p && !j)), w(l);
1556
+ te && (te.required = !!(H || p && !Z)), w(l);
1557
1557
  }
1558
- return R.addEventListener("reset", O), () => R.removeEventListener("reset", O);
1558
+ return A.addEventListener("reset", B), () => A.removeEventListener("reset", B);
1559
1559
  }, [
1560
1560
  i,
1561
1561
  l,
1562
- j,
1563
- T,
1562
+ Z,
1563
+ M,
1564
1564
  p,
1565
- F,
1566
- D
1565
+ H,
1566
+ T
1567
1567
  ]);
1568
- function K(m) {
1569
- if (!T) {
1570
- const k = m.currentTarget.value, R = m.currentTarget.checked;
1571
- w((O) => R ? [.../* @__PURE__ */ new Set([...O, k])] : O.filter((S) => S !== k));
1568
+ function U(y) {
1569
+ if (!M) {
1570
+ const P = y.currentTarget.value, A = y.currentTarget.checked;
1571
+ w((B) => A ? [.../* @__PURE__ */ new Set([...B, P])] : B.filter((V) => V !== P));
1572
1572
  }
1573
- d == null || d(m);
1573
+ d == null || d(y);
1574
1574
  }
1575
- const M = {
1575
+ const S = {
1576
1576
  defaultValue: l,
1577
1577
  disabled: s,
1578
- handleChange: K,
1579
- hasSelection: _,
1578
+ handleChange: U,
1579
+ hasSelection: N,
1580
1580
  name: f,
1581
1581
  required: p,
1582
1582
  value: v,
1583
- validationValue: D
1583
+ validationValue: T
1584
1584
  };
1585
- return /* @__PURE__ */ a(Pn.Provider, { value: M, children: /* @__PURE__ */ a(
1585
+ return /* @__PURE__ */ a(_n.Provider, { value: S, children: /* @__PURE__ */ a(
1586
1586
  "div",
1587
1587
  {
1588
- ...g,
1589
- ref: N,
1588
+ ...m,
1589
+ ref: E,
1590
1590
  "aria-disabled": s || void 0,
1591
- "aria-invalid": ge(h, o),
1591
+ "aria-invalid": ge(u, o),
1592
1592
  className: [
1593
1593
  "nk-checkbox-group",
1594
1594
  r
1595
1595
  ].filter(Boolean).join(" "),
1596
1596
  "data-disabled": s || void 0,
1597
- "data-invalid": V || void 0,
1597
+ "data-invalid": R || void 0,
1598
1598
  "data-orientation": c,
1599
1599
  role: "group",
1600
1600
  children: i
@@ -1602,8 +1602,8 @@ const zt = y(
1602
1602
  ) });
1603
1603
  }
1604
1604
  );
1605
- En(zt, "label");
1606
- const Zt = [
1605
+ Mn(qt, "label");
1606
+ const $t = [
1607
1607
  {
1608
1608
  minWidth: Ce("xl"),
1609
1609
  marginPercent: 32,
@@ -1624,36 +1624,36 @@ const Zt = [
1624
1624
  marginPercent: 8,
1625
1625
  preferredWidth: 650
1626
1626
  }
1627
- ], jt = 16;
1628
- function qt(n) {
1629
- for (const t of Zt)
1627
+ ], Gt = 16;
1628
+ function Kt(n) {
1629
+ for (const t of $t)
1630
1630
  if (n >= t.minWidth) return t;
1631
1631
  }
1632
- function $t(n, t) {
1632
+ function Ut(n, t) {
1633
1633
  if (!Number.isFinite(n) || !Number.isFinite(t) || n < Ce("sm") || t <= 0)
1634
1634
  return;
1635
- const e = qt(n);
1635
+ const e = Kt(n);
1636
1636
  if (!e) return;
1637
1637
  const o = n * e.marginPercent / 100, i = n - o * 2, r = Math.min(
1638
1638
  e.preferredWidth,
1639
- n - jt
1639
+ n - Gt
1640
1640
  ), l = Math.max(i, r);
1641
1641
  let s = Math.floor(l / t);
1642
1642
  return s % 2 === 0 && (s -= 1), s = Math.max(s, 1), Math.min((s - 1) * t, n);
1643
1643
  }
1644
- const Gt = typeof window > "u" ? q : on;
1645
- function Kt(n, t) {
1644
+ const Yt = typeof window > "u" ? q : $e;
1645
+ function Xt(n, t) {
1646
1646
  if (typeof n == "function") {
1647
1647
  n(t);
1648
1648
  return;
1649
1649
  }
1650
1650
  n && (n.current = t);
1651
1651
  }
1652
- function Ut(n) {
1652
+ function Qt(n) {
1653
1653
  const t = window.getComputedStyle(n), e = Number.parseFloat(t.paddingLeft) + Number.parseFloat(t.paddingRight);
1654
1654
  return Math.max(n.clientWidth - e, 0);
1655
1655
  }
1656
- function Yt(n) {
1656
+ function Jt(n) {
1657
1657
  const e = window.getComputedStyle(n).getPropertyValue("--nk-cell").trim().match(
1658
1658
  /^([+]?(?:\d+\.?\d*|\.\d+))px$/i
1659
1659
  );
@@ -1661,16 +1661,16 @@ function Yt(n) {
1661
1661
  const o = Number.parseFloat(e[1]);
1662
1662
  return Number.isFinite(o) && o > 0 ? o : void 0;
1663
1663
  }
1664
- function Qt(n, t) {
1665
- const e = H(null), o = H(null), i = H(void 0), [r, l] = Y(void 0), s = W((d) => {
1664
+ function eo(n, t) {
1665
+ const e = D(null), o = D(null), i = D(void 0), [r, l] = $(void 0), s = W((d) => {
1666
1666
  if (!t) {
1667
1667
  if (i.current === void 0) return;
1668
1668
  i.current = void 0, l(void 0);
1669
1669
  return;
1670
1670
  }
1671
- const c = Ut(d), p = Yt(d), v = p === void 0 ? void 0 : $t(c, p);
1671
+ const c = Qt(d), p = Jt(d), v = p === void 0 ? void 0 : Ut(c, p);
1672
1672
  i.current !== v && (i.current = v, l(v));
1673
- }, [t]), h = W(
1673
+ }, [t]), u = W(
1674
1674
  (d) => {
1675
1675
  var p;
1676
1676
  if ((p = o.current) == null || p.disconnect(), o.current = null, typeof ResizeObserver > "u") return;
@@ -1683,23 +1683,23 @@ function Qt(n, t) {
1683
1683
  ), f = W(
1684
1684
  (d) => {
1685
1685
  var c;
1686
- (c = o.current) == null || c.disconnect(), o.current = null, e.current = d, Kt(n, d), !(!d || typeof window > "u" || !t) && (s(d), h(d));
1686
+ (c = o.current) == null || c.disconnect(), o.current = null, e.current = d, Xt(n, d), !(!d || typeof window > "u" || !t) && (s(d), u(d));
1687
1687
  },
1688
1688
  [
1689
- h,
1689
+ u,
1690
1690
  t,
1691
1691
  n,
1692
1692
  s
1693
1693
  ]
1694
1694
  );
1695
- return Gt(() => {
1695
+ return Yt(() => {
1696
1696
  e.current && s(e.current);
1697
- }), q(() => (e.current && t && h(e.current), () => {
1697
+ }), q(() => (e.current && t && u(e.current), () => {
1698
1698
  var d;
1699
1699
  (d = o.current) == null || d.disconnect(), o.current = null;
1700
- }), [h, t]), { rootReference: f, innerWidth: r };
1700
+ }), [u, t]), { rootReference: f, innerWidth: r };
1701
1701
  }
1702
- const tr = y(
1702
+ const xr = g(
1703
1703
  function(t, e) {
1704
1704
  const {
1705
1705
  accent: o,
@@ -1707,30 +1707,30 @@ const tr = y(
1707
1707
  children: r,
1708
1708
  className: l,
1709
1709
  constrain: s = !0,
1710
- fill: h = "none",
1710
+ fill: u = "none",
1711
1711
  mode: f = "grid",
1712
1712
  spacing: d = "standard",
1713
1713
  style: c,
1714
1714
  theme: p = "light",
1715
1715
  ...v
1716
- } = t, { rootReference: g, innerWidth: x } = Qt(
1716
+ } = t, { rootReference: m, innerWidth: x } = eo(
1717
1717
  e,
1718
1718
  s
1719
1719
  ), b = i ?? "div", w = o !== void 0 ? { ...c, "--nk-accent": o } : c;
1720
- return Te(
1720
+ return Ae(
1721
1721
  b,
1722
1722
  {
1723
1723
  ...v,
1724
- ref: g,
1724
+ ref: m,
1725
1725
  className: ["nk-content", l].filter(Boolean).join(" "),
1726
1726
  "data-constrain": s,
1727
- "data-fill": h,
1727
+ "data-fill": u,
1728
1728
  "data-mode": f,
1729
1729
  "data-spacing": d,
1730
1730
  "data-theme": p,
1731
1731
  style: w
1732
1732
  },
1733
- Te(
1733
+ Ae(
1734
1734
  "div",
1735
1735
  {
1736
1736
  className: "nk-content__inner",
@@ -1740,14 +1740,14 @@ const tr = y(
1740
1740
  )
1741
1741
  );
1742
1742
  }
1743
- ), or = y(function(t, e) {
1743
+ ), Cr = g(function(t, e) {
1744
1744
  const {
1745
1745
  "aria-hidden": o,
1746
1746
  "aria-label": i,
1747
1747
  "aria-labelledby": r,
1748
1748
  "aria-orientation": l,
1749
1749
  className: s,
1750
- decorative: h = !1,
1750
+ decorative: u = !1,
1751
1751
  orientation: f = "horizontal",
1752
1752
  role: d,
1753
1753
  text: c,
@@ -1757,7 +1757,7 @@ const tr = y(
1757
1757
  "div",
1758
1758
  {
1759
1759
  ...p,
1760
- ...h ? {
1760
+ ...u ? {
1761
1761
  "aria-hidden": !0,
1762
1762
  "aria-label": void 0,
1763
1763
  "aria-labelledby": void 0,
@@ -1777,86 +1777,86 @@ const tr = y(
1777
1777
  }
1778
1778
  );
1779
1779
  });
1780
- function Ye(n) {
1780
+ function Je(n) {
1781
1781
  return typeof n == "string" ? n.trim().length > 0 : n != null && n !== !1 && n !== !0;
1782
1782
  }
1783
- function cn(...n) {
1783
+ function un(...n) {
1784
1784
  const t = n.flatMap(
1785
1785
  (o) => (o == null ? void 0 : o.split(/\s+/).filter(Boolean)) ?? []
1786
1786
  ), e = [...new Set(t)];
1787
1787
  return e.length > 0 ? e.join(" ") : void 0;
1788
1788
  }
1789
- const rr = y(function(t, e) {
1789
+ const Pr = g(function(t, e) {
1790
1790
  const {
1791
1791
  children: o,
1792
1792
  className: i,
1793
1793
  description: r,
1794
1794
  disabled: l = !1,
1795
1795
  error: s,
1796
- label: h,
1796
+ label: u,
1797
1797
  orientation: f = "vertical",
1798
1798
  required: d = !1,
1799
1799
  ...c
1800
- } = t, p = Me(), v = o.props.id ?? `${p}-control`, g = `${p}-label`, x = `${p}-description`, b = `${p}-error`, w = Ye(h), T = Ye(r), L = Ye(s), V = Ln(o.type), P = V !== void 0, E = l || !!o.props.disabled, C = d || !!o.props.required, _ = C && (V == null ? void 0 : V.requiredCommunication) === "label", D = cn(
1800
+ } = t, p = Le(), v = o.props.id ?? `${p}-control`, m = `${p}-label`, x = `${p}-description`, b = `${p}-error`, w = Je(u), M = Je(r), _ = Je(s), R = Ln(o.type), k = R !== void 0, C = l || !!o.props.disabled, I = d || !!o.props.required, N = I && (R == null ? void 0 : R.requiredCommunication) === "label", T = un(
1801
1801
  o.props["aria-describedby"],
1802
- T ? x : void 0,
1803
- L ? b : void 0
1804
- ), Z = cn(
1805
- w ? g : void 0,
1802
+ M ? x : void 0,
1803
+ _ ? b : void 0
1804
+ ), z = un(
1805
+ w ? m : void 0,
1806
1806
  o.props["aria-labelledby"]
1807
- ), j = C ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-field__required", children: "*" }) : null, F = _ ? /* @__PURE__ */ a("span", { className: "nk-field__required-text", children: ", select at least one" }) : null, N = He(o, {
1808
- "aria-describedby": D,
1809
- "aria-invalid": L ? !0 : o.props["aria-invalid"],
1810
- "aria-labelledby": Z,
1811
- disabled: E || void 0,
1807
+ ), Z = I ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-field__required", children: "*" }) : null, H = N ? /* @__PURE__ */ a("span", { className: "nk-field__required-text", children: ", select at least one" }) : null, E = Pe(o, {
1808
+ "aria-describedby": T,
1809
+ "aria-invalid": _ ? !0 : o.props["aria-invalid"],
1810
+ "aria-labelledby": z,
1811
+ disabled: C || void 0,
1812
1812
  id: v,
1813
- required: C || void 0
1813
+ required: I || void 0
1814
1814
  });
1815
- return /* @__PURE__ */ A(
1815
+ return /* @__PURE__ */ O(
1816
1816
  "div",
1817
1817
  {
1818
1818
  ...c,
1819
1819
  ref: e,
1820
1820
  className: ["nk-field", i].filter(Boolean).join(" "),
1821
- "data-disabled": E || void 0,
1821
+ "data-disabled": C || void 0,
1822
1822
  "data-has-label": w || void 0,
1823
- "data-invalid": L || void 0,
1823
+ "data-invalid": _ || void 0,
1824
1824
  "data-orientation": f,
1825
- "data-required": C || void 0,
1825
+ "data-required": I || void 0,
1826
1826
  children: [
1827
- w && P ? /* @__PURE__ */ A(
1827
+ w && k ? /* @__PURE__ */ O(
1828
1828
  fe,
1829
1829
  {
1830
1830
  as: "span",
1831
1831
  className: "nk-field__label",
1832
- id: g,
1832
+ id: m,
1833
1833
  size: "caption",
1834
1834
  weight: "medium",
1835
1835
  children: [
1836
- h,
1837
- j,
1838
- F
1836
+ u,
1837
+ Z,
1838
+ H
1839
1839
  ]
1840
1840
  }
1841
1841
  ) : null,
1842
- w && !P ? /* @__PURE__ */ A(
1842
+ w && !k ? /* @__PURE__ */ O(
1843
1843
  fe,
1844
1844
  {
1845
1845
  as: "label",
1846
1846
  className: "nk-field__label",
1847
1847
  htmlFor: v,
1848
- id: g,
1848
+ id: m,
1849
1849
  size: "caption",
1850
1850
  weight: "medium",
1851
1851
  children: [
1852
- h,
1853
- j
1852
+ u,
1853
+ Z
1854
1854
  ]
1855
1855
  }
1856
1856
  ) : null,
1857
- /* @__PURE__ */ A("div", { className: "nk-field__body", children: [
1858
- N,
1859
- T ? /* @__PURE__ */ a(
1857
+ /* @__PURE__ */ O("div", { className: "nk-field__body", children: [
1858
+ E,
1859
+ M ? /* @__PURE__ */ a(
1860
1860
  fe,
1861
1861
  {
1862
1862
  as: "p",
@@ -1867,7 +1867,7 @@ const rr = y(function(t, e) {
1867
1867
  children: r
1868
1868
  }
1869
1869
  ) : null,
1870
- L ? /* @__PURE__ */ a(
1870
+ _ ? /* @__PURE__ */ a(
1871
1871
  fe,
1872
1872
  {
1873
1873
  as: "p",
@@ -1884,16 +1884,16 @@ const rr = y(function(t, e) {
1884
1884
  }
1885
1885
  );
1886
1886
  });
1887
- function Qe(n) {
1887
+ function en(n) {
1888
1888
  return Array.isArray(n) ? n.length > 0 : n != null && String(n).length > 0;
1889
1889
  }
1890
- function Xt(n, t, e) {
1890
+ function no(n, t, e) {
1891
1891
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
1892
1892
  }
1893
- function dn(n) {
1893
+ function fn(n) {
1894
1894
  return n != null && n !== !1 && n !== !0 && n !== "";
1895
1895
  }
1896
- function Jt(n) {
1896
+ function to(n) {
1897
1897
  var e;
1898
1898
  const t = (e = Object.getOwnPropertyDescriptor(
1899
1899
  Object.getPrototypeOf(n),
@@ -1901,87 +1901,87 @@ function Jt(n) {
1901
1901
  )) == null ? void 0 : e.set;
1902
1902
  t ? t.call(n, "") : n.value = "";
1903
1903
  }
1904
- const ir = y(function(t, e) {
1904
+ const _r = g(function(t, e) {
1905
1905
  const {
1906
1906
  "aria-busy": o,
1907
1907
  "aria-invalid": i,
1908
1908
  className: r,
1909
1909
  clearable: l = !1,
1910
1910
  defaultValue: s,
1911
- disabled: h = !1,
1911
+ disabled: u = !1,
1912
1912
  id: f,
1913
1913
  invalid: d = !1,
1914
1914
  leading: c,
1915
1915
  loading: p = !1,
1916
1916
  onChange: v,
1917
- readOnly: g = !1,
1917
+ readOnly: m = !1,
1918
1918
  style: x,
1919
1919
  trailing: b,
1920
1920
  type: w = "text",
1921
- value: T,
1922
- ...L
1923
- } = t, V = Me(), P = H(null), [E, C] = Y(
1924
- Qe(s)
1925
- ), [_, D] = Y(!1);
1921
+ value: M,
1922
+ ..._
1923
+ } = t, R = Le(), k = D(null), [C, I] = $(
1924
+ en(s)
1925
+ ), [N, T] = $(!1);
1926
1926
  q(() => {
1927
- w !== "password" && D(!1);
1927
+ w !== "password" && T(!1);
1928
1928
  }, [w]);
1929
- const Z = W(
1930
- ($) => Xt(
1931
- $,
1932
- P,
1929
+ const z = W(
1930
+ (K) => no(
1931
+ K,
1932
+ k,
1933
1933
  e
1934
1934
  ),
1935
1935
  [e]
1936
- ), j = f ?? `${V}-control`, F = h || p, N = d || he(i), K = T !== void 0 ? Qe(T) : E, M = w === "password" && _ ? "text" : w, m = ge(d, i), k = l && K && !g && !F, R = w === "password" && !p, O = k || R, S = dn(c), z = dn(b) || O;
1937
- function te($) {
1938
- T === void 0 && C(Qe($.currentTarget.value)), v == null || v($);
1936
+ ), Z = f ?? `${R}-control`, H = u || p, E = d || he(i), U = M !== void 0 ? en(M) : C, S = w === "password" && N ? "text" : w, y = ge(d, i), P = l && U && !m && !H, A = w === "password" && !p, B = P || A, V = fn(c), j = fn(b) || B;
1937
+ function te(K) {
1938
+ M === void 0 && I(en(K.currentTarget.value)), v == null || v(K);
1939
1939
  }
1940
1940
  function ee() {
1941
- const $ = P.current;
1942
- $ && (Jt($), $.dispatchEvent(new Event("input", { bubbles: !0 })), $.focus());
1941
+ const K = k.current;
1942
+ K && (to(K), K.dispatchEvent(new Event("input", { bubbles: !0 })), K.focus());
1943
1943
  }
1944
- function Q() {
1945
- D(($) => !$);
1944
+ function X() {
1945
+ T((K) => !K);
1946
1946
  }
1947
- return /* @__PURE__ */ A(
1947
+ return /* @__PURE__ */ O(
1948
1948
  "div",
1949
1949
  {
1950
1950
  className: ["nk-input", r].filter(Boolean).join(" "),
1951
1951
  "data-clearable": l || void 0,
1952
- "data-disabled": F || void 0,
1953
- "data-invalid": N || void 0,
1954
- "data-leading": S || void 0,
1952
+ "data-disabled": H || void 0,
1953
+ "data-invalid": E || void 0,
1954
+ "data-leading": V || void 0,
1955
1955
  "data-loading": p || void 0,
1956
- "data-read-only": g || void 0,
1957
- "data-has-trailing-action": O || void 0,
1958
- "data-trailing": z || void 0,
1956
+ "data-read-only": m || void 0,
1957
+ "data-has-trailing-action": B || void 0,
1958
+ "data-trailing": j || void 0,
1959
1959
  style: x,
1960
1960
  children: [
1961
- S ? /* @__PURE__ */ a("span", { className: "nk-input__leading", children: c }) : null,
1961
+ V ? /* @__PURE__ */ a("span", { className: "nk-input__leading", children: c }) : null,
1962
1962
  /* @__PURE__ */ a(
1963
1963
  "input",
1964
1964
  {
1965
- ...L,
1966
- ref: Z,
1965
+ ..._,
1966
+ ref: z,
1967
1967
  "aria-busy": p ? !0 : o,
1968
- "aria-invalid": m,
1968
+ "aria-invalid": y,
1969
1969
  className: "nk-input__control",
1970
1970
  defaultValue: s,
1971
- disabled: F,
1972
- id: j,
1971
+ disabled: H,
1972
+ id: Z,
1973
1973
  onChange: te,
1974
- readOnly: g,
1975
- type: M,
1976
- value: T
1974
+ readOnly: m,
1975
+ type: S,
1976
+ value: M
1977
1977
  }
1978
1978
  ),
1979
- z ? /* @__PURE__ */ A("span", { className: "nk-input__trailing", children: [
1979
+ j ? /* @__PURE__ */ O("span", { className: "nk-input__trailing", children: [
1980
1980
  b,
1981
- k ? /* @__PURE__ */ a(
1982
- tn,
1981
+ P ? /* @__PURE__ */ a(
1982
+ ze,
1983
1983
  {
1984
- "aria-controls": j,
1984
+ "aria-controls": Z,
1985
1985
  "aria-label": "Clear input",
1986
1986
  className: "nk-input__action",
1987
1987
  icon: "cross",
@@ -1991,16 +1991,16 @@ const ir = y(function(t, e) {
1991
1991
  variant: "ghost"
1992
1992
  }
1993
1993
  ) : null,
1994
- R ? /* @__PURE__ */ a(
1995
- tn,
1994
+ A ? /* @__PURE__ */ a(
1995
+ ze,
1996
1996
  {
1997
- "aria-controls": j,
1998
- "aria-label": _ ? "Hide password" : "Show password",
1999
- "aria-pressed": _,
1997
+ "aria-controls": Z,
1998
+ "aria-label": N ? "Hide password" : "Show password",
1999
+ "aria-pressed": N,
2000
2000
  className: "nk-input__action",
2001
- disabled: F,
2002
- icon: _ ? "eye-off" : "eye",
2003
- onClick: Q,
2001
+ disabled: H,
2002
+ icon: N ? "eye-off" : "eye",
2003
+ onClick: X,
2004
2004
  shape: "rectangle",
2005
2005
  type: "button",
2006
2006
  variant: "ghost"
@@ -2008,7 +2008,7 @@ const ir = y(function(t, e) {
2008
2008
  ) : null
2009
2009
  ] }) : null,
2010
2010
  p ? /* @__PURE__ */ a(
2011
- Cn,
2011
+ Pn,
2012
2012
  {
2013
2013
  "aria-hidden": "true",
2014
2014
  "aria-label": void 0,
@@ -2020,8 +2020,8 @@ const ir = y(function(t, e) {
2020
2020
  ]
2021
2021
  }
2022
2022
  );
2023
- }), Ae = Ze(void 0), un = typeof window > "u" ? q : on;
2024
- function fn(n, t) {
2023
+ }), Oe = qe(void 0), hn = typeof window > "u" ? q : $e;
2024
+ function pn(n, t) {
2025
2025
  const e = n.ownerDocument.defaultView;
2026
2026
  if (!e) return;
2027
2027
  const o = e.getComputedStyle(n);
@@ -2036,98 +2036,98 @@ function fn(n, t) {
2036
2036
  );
2037
2037
  }
2038
2038
  }
2039
- function eo(n) {
2040
- const { children: t, source: e } = n, o = H(null), i = Pe(Ae);
2041
- return un(() => {
2042
- const r = o.current;
2043
- if (!(!r || !i))
2044
- return i.registerBranch(r);
2045
- }, [i]), un(() => {
2046
- var d;
2047
- const r = o.current;
2048
- if (!r) return;
2049
- fn(e, r);
2050
- const s = e.closest(".nk-content") ?? e, h = (d = e.ownerDocument.defaultView) == null ? void 0 : d.MutationObserver;
2051
- if (!h) return;
2052
- const f = new h(() => {
2053
- fn(e, r);
2039
+ function oo(n) {
2040
+ const { children: t, source: e } = n, o = D(null), i = Ne(Oe), [r, l] = $(null);
2041
+ return hn(() => {
2042
+ const s = o.current;
2043
+ if (!(!s || !i))
2044
+ return i.registerBranch(s);
2045
+ }, [i]), hn(() => {
2046
+ var p;
2047
+ const s = o.current;
2048
+ if (!s) return;
2049
+ pn(e, s), l(e);
2050
+ const f = e.closest(".nk-content") ?? e, d = (p = e.ownerDocument.defaultView) == null ? void 0 : p.MutationObserver;
2051
+ if (!d) return;
2052
+ const c = new d(() => {
2053
+ pn(e, s);
2054
2054
  });
2055
- return f.observe(s, {
2055
+ return c.observe(f, {
2056
2056
  attributeFilter: ["class", "data-theme", "style"],
2057
2057
  attributes: !0
2058
- }), () => f.disconnect();
2058
+ }), () => c.disconnect();
2059
2059
  }, [e]), /* @__PURE__ */ a(
2060
2060
  "div",
2061
2061
  {
2062
2062
  className: "nk-portal",
2063
2063
  ref: o,
2064
2064
  style: { display: "contents" },
2065
- children: t
2065
+ children: r === e ? t : null
2066
2066
  }
2067
2067
  );
2068
2068
  }
2069
- function je(n) {
2070
- const { children: t, container: e, inheritFrom: o } = n, i = H(null), [r, l] = Y(!1);
2069
+ function Ge(n) {
2070
+ const { children: t, container: e, inheritFrom: o } = n, i = D(null), [r, l] = $(!1);
2071
2071
  q(() => {
2072
2072
  l(!0);
2073
2073
  }, []);
2074
- const s = o ?? i.current, h = (s == null ? void 0 : s.ownerDocument) ?? (typeof document > "u" ? null : document), f = e ?? (h == null ? void 0 : h.body) ?? null;
2075
- return /* @__PURE__ */ A(We, { children: [
2074
+ const s = o ?? i.current, u = (s == null ? void 0 : s.ownerDocument) ?? (typeof document > "u" ? null : document), f = e ?? (u == null ? void 0 : u.body) ?? null;
2075
+ return /* @__PURE__ */ O(je, { children: [
2076
2076
  o ? null : /* @__PURE__ */ a("span", { "aria-hidden": "true", hidden: !0, ref: i }),
2077
- r && s && f ? Wn(
2078
- /* @__PURE__ */ a(eo, { source: s, children: t }),
2077
+ r && s && f ? Zn(
2078
+ /* @__PURE__ */ a(oo, { source: s, children: t }),
2079
2079
  f
2080
2080
  ) : null
2081
2081
  ] });
2082
2082
  }
2083
- const no = 1e3, to = 10, hn = /* @__PURE__ */ new WeakMap();
2084
- function De(n) {
2085
- const t = hn.get(n);
2083
+ const ro = 1e3, io = 10, vn = /* @__PURE__ */ new WeakMap();
2084
+ function Be(n) {
2085
+ const t = vn.get(n);
2086
2086
  if (t) return t;
2087
2087
  const e = {
2088
2088
  focusLayers: /* @__PURE__ */ new Set(),
2089
2089
  layers: [],
2090
2090
  listeners: /* @__PURE__ */ new Set()
2091
2091
  };
2092
- return hn.set(n, e), e;
2092
+ return vn.set(n, e), e;
2093
2093
  }
2094
- function pn(n) {
2094
+ function mn(n) {
2095
2095
  n.listeners.forEach((t) => t());
2096
2096
  }
2097
- function qe(n, t) {
2098
- const e = H(Symbol("nk-overlay-layer")), [, o] = xn((s) => s + 1, 0);
2097
+ function Ke(n, t) {
2098
+ const e = D(Symbol("nk-overlay-layer")), [, o] = xn((s) => s + 1, 0);
2099
2099
  q(() => {
2100
2100
  if (!n || !t) return;
2101
- const s = De(t), h = () => o();
2102
- return s.listeners.add(h), s.layers.push(e.current), pn(s), () => {
2103
- s.listeners.delete(h);
2101
+ const s = Be(t), u = () => o();
2102
+ return s.listeners.add(u), s.layers.push(e.current), mn(s), () => {
2103
+ s.listeners.delete(u);
2104
2104
  const f = s.layers.indexOf(e.current);
2105
- f >= 0 && s.layers.splice(f, 1), pn(s);
2105
+ f >= 0 && s.layers.splice(f, 1), mn(s);
2106
2106
  };
2107
2107
  }, [n, t]);
2108
- const i = t ? De(t) : null, r = (i == null ? void 0 : i.layers.indexOf(
2108
+ const i = t ? Be(t) : null, r = (i == null ? void 0 : i.layers.indexOf(
2109
2109
  e.current
2110
2110
  )) ?? -1, l = r >= 0 ? r : (i == null ? void 0 : i.layers.length) ?? 0;
2111
2111
  return {
2112
2112
  id: e.current,
2113
- zIndex: no + l * to
2113
+ zIndex: ro + l * io
2114
2114
  };
2115
2115
  }
2116
- function vn(n, t) {
2117
- const e = De(n).layers;
2116
+ function gn(n, t) {
2117
+ const e = Be(n).layers;
2118
2118
  return e.length > 0 && e[e.length - 1] === t;
2119
2119
  }
2120
- function oo(n, t, e) {
2120
+ function ao(n, t, e) {
2121
2121
  q(() => {
2122
2122
  if (!n || !t) return;
2123
- const o = De(t);
2123
+ const o = Be(t);
2124
2124
  return o.focusLayers.add(e), () => {
2125
2125
  o.focusLayers.delete(e);
2126
2126
  };
2127
2127
  }, [n, e, t]);
2128
2128
  }
2129
- function mn(n, t) {
2130
- const e = De(n);
2129
+ function wn(n, t) {
2130
+ const e = Be(n);
2131
2131
  for (let o = e.layers.length - 1; o >= 0; o -= 1) {
2132
2132
  const i = e.layers[o];
2133
2133
  if (e.focusLayers.has(i))
@@ -2135,7 +2135,7 @@ function mn(n, t) {
2135
2135
  }
2136
2136
  return !1;
2137
2137
  }
2138
- function ro(n, t) {
2138
+ function lo(n, t) {
2139
2139
  const e = n.composedPath();
2140
2140
  return t.some((o) => {
2141
2141
  var l;
@@ -2146,7 +2146,7 @@ function ro(n, t) {
2146
2146
  return r && n.target instanceof r ? i.contains(n.target) : !1;
2147
2147
  });
2148
2148
  }
2149
- function $e(n) {
2149
+ function Ue(n) {
2150
2150
  const {
2151
2151
  active: t,
2152
2152
  boundaries: e,
@@ -2155,17 +2155,17 @@ function $e(n) {
2155
2155
  layerId: r,
2156
2156
  onEscapeDismiss: l,
2157
2157
  onEscapeKeyDown: s,
2158
- onPointerDownOutside: h,
2158
+ onPointerDownOutside: u,
2159
2159
  onPointerDownOutsideDismiss: f,
2160
2160
  ownerDocument: d
2161
2161
  } = n;
2162
2162
  q(() => {
2163
2163
  if (!t || !d) return;
2164
2164
  function c(v) {
2165
- v.key !== "Escape" || !o || !vn(d, r) || (s == null || s(v), !v.defaultPrevented && (v.preventDefault(), l == null || l()));
2165
+ v.key !== "Escape" || !o || !gn(d, r) || (s == null || s(v), !v.defaultPrevented && (v.preventDefault(), l == null || l()));
2166
2166
  }
2167
2167
  function p(v) {
2168
- !i || !vn(d, r) || ro(v, e) || (h == null || h(v), !v.defaultPrevented && (f == null || f()));
2168
+ !i || !gn(d, r) || lo(v, e) || (u == null || u(v), !v.defaultPrevented && (f == null || f()));
2169
2169
  }
2170
2170
  return d.addEventListener("keydown", c, !0), d.addEventListener("pointerdown", p, !0), () => {
2171
2171
  d.removeEventListener("keydown", c, !0), d.removeEventListener("pointerdown", p, !0);
@@ -2178,12 +2178,24 @@ function $e(n) {
2178
2178
  r,
2179
2179
  l,
2180
2180
  s,
2181
- h,
2181
+ u,
2182
2182
  f,
2183
2183
  d
2184
2184
  ]);
2185
2185
  }
2186
- const io = [
2186
+ const an = /* @__PURE__ */ new WeakSet();
2187
+ function so(n) {
2188
+ an.add(n);
2189
+ try {
2190
+ n.focus({ preventScroll: !0 });
2191
+ } finally {
2192
+ an.delete(n);
2193
+ }
2194
+ }
2195
+ function co(n) {
2196
+ return an.has(n);
2197
+ }
2198
+ const uo = [
2187
2199
  "a[href]",
2188
2200
  "area[href]",
2189
2201
  "button",
@@ -2194,7 +2206,7 @@ const io = [
2194
2206
  "[contenteditable]:not([contenteditable='false'])",
2195
2207
  "[tabindex]"
2196
2208
  ].join(",");
2197
- function ao(n, t) {
2209
+ function fo(n, t) {
2198
2210
  let e = n;
2199
2211
  for (; e; ) {
2200
2212
  if (e.hidden || e.inert || e.getAttribute("aria-hidden") === "true")
@@ -2207,7 +2219,7 @@ function ao(n, t) {
2207
2219
  }
2208
2220
  return !1;
2209
2221
  }
2210
- function so(n, t) {
2222
+ function ho(n, t) {
2211
2223
  var r;
2212
2224
  const e = (r = n.ownerDocument.defaultView) == null ? void 0 : r.HTMLInputElement;
2213
2225
  if (!e || !(n instanceof e) || n.type !== "radio" || !n.name)
@@ -2217,31 +2229,31 @@ function so(n, t) {
2217
2229
  ), i = o.find((l) => l.checked);
2218
2230
  return i ? i === n : o[0] === n;
2219
2231
  }
2220
- function lo(n) {
2232
+ function po(n) {
2221
2233
  const t = Array.from(
2222
- n.querySelectorAll(io)
2223
- ).filter((e) => !e.matches(":disabled") && e.tabIndex >= 0 && !ao(e, n));
2234
+ n.querySelectorAll(uo)
2235
+ ).filter((e) => !e.matches(":disabled") && e.tabIndex >= 0 && !fo(e, n));
2224
2236
  return t.filter(
2225
- (e) => so(e, t)
2237
+ (e) => ho(e, t)
2226
2238
  );
2227
2239
  }
2228
- function gn(n, t) {
2240
+ function bn(n, t) {
2229
2241
  const e = [n, ...t];
2230
2242
  return [...new Set(
2231
2243
  e.flatMap(
2232
- (i) => lo(i)
2244
+ (i) => po(i)
2233
2245
  )
2234
2246
  )].sort((i, r) => {
2235
- var h;
2247
+ var u;
2236
2248
  if (i === r) return 0;
2237
- const l = i.compareDocumentPosition(r), s = ((h = i.ownerDocument.defaultView) == null ? void 0 : h.Node.DOCUMENT_POSITION_FOLLOWING) ?? 4;
2249
+ const l = i.compareDocumentPosition(r), s = ((u = i.ownerDocument.defaultView) == null ? void 0 : u.Node.DOCUMENT_POSITION_FOLLOWING) ?? 4;
2238
2250
  return l & s ? -1 : 1;
2239
2251
  });
2240
2252
  }
2241
- function Xe(n, t, e) {
2253
+ function nn(n, t, e) {
2242
2254
  return e ? n.contains(e) || [...t].some((o) => o.contains(e)) : !1;
2243
2255
  }
2244
- function _n(n) {
2256
+ function Sn(n) {
2245
2257
  const {
2246
2258
  active: t,
2247
2259
  autoFocus: e = !0,
@@ -2249,52 +2261,58 @@ function _n(n) {
2249
2261
  initialFocusReference: i,
2250
2262
  layerId: r,
2251
2263
  restoreFocus: l = !0
2252
- } = n, s = (o == null ? void 0 : o.ownerDocument) ?? null, h = H(/* @__PURE__ */ new Set()), f = W((c) => (h.current.add(c), () => h.current.delete(c)), []), d = Le(() => ({ registerBranch: f }), [f]);
2253
- return oo(t && !!o, s, r), q(() => {
2254
- var L, V;
2264
+ } = n, s = (o == null ? void 0 : o.ownerDocument) ?? null, u = D(/* @__PURE__ */ new Set()), f = W((c) => (u.current.add(c), () => u.current.delete(c)), []), d = Me(() => ({ registerBranch: f }), [f]);
2265
+ return ao(t && !!o, s, r), q(() => {
2266
+ var _, R;
2255
2267
  if (!t || !o) return;
2256
- const c = o.ownerDocument, p = (L = c.defaultView) == null ? void 0 : L.HTMLElement, v = (V = c.defaultView) == null ? void 0 : V.Node, g = p && c.activeElement instanceof p ? c.activeElement : null;
2268
+ const c = o.ownerDocument, p = (_ = c.defaultView) == null ? void 0 : _.HTMLElement, v = (R = c.defaultView) == null ? void 0 : R.Node, m = p && c.activeElement instanceof p ? c.activeElement : null;
2257
2269
  let x = !0;
2258
2270
  function b() {
2259
- const P = i == null ? void 0 : i.current;
2260
- (P && Xe(
2271
+ const k = i == null ? void 0 : i.current;
2272
+ (k && nn(
2261
2273
  o,
2262
- h.current,
2263
- P
2264
- ) ? P : gn(
2274
+ u.current,
2275
+ k
2276
+ ) ? k : bn(
2265
2277
  o,
2266
- h.current
2278
+ u.current
2267
2279
  )[0] ?? o).focus({ preventScroll: !0 });
2268
2280
  }
2269
- function w(P) {
2270
- if (P.key !== "Tab" || !mn(c, r))
2281
+ function w(k) {
2282
+ if (k.key !== "Tab" || !wn(c, r))
2271
2283
  return;
2272
- const E = gn(
2284
+ const C = bn(
2273
2285
  o,
2274
- h.current
2286
+ u.current
2275
2287
  );
2276
- if (E.length === 0) {
2277
- P.preventDefault(), o == null || o.focus({ preventScroll: !0 });
2288
+ if (C.length === 0) {
2289
+ k.preventDefault(), o == null || o.focus({ preventScroll: !0 });
2278
2290
  return;
2279
2291
  }
2280
- const C = E[0], _ = E[E.length - 1], D = c.activeElement, Z = Xe(
2292
+ const I = C[0], N = C[C.length - 1], T = c.activeElement, z = nn(
2281
2293
  o,
2282
- h.current,
2283
- D
2284
- );
2285
- P.shiftKey && (D === C || !Z) ? (P.preventDefault(), _.focus()) : !P.shiftKey && (D === _ || !Z) && (P.preventDefault(), C.focus());
2294
+ u.current,
2295
+ T
2296
+ ), H = !C.some(
2297
+ (E) => E === T
2298
+ ) && (T === o || T === (i == null ? void 0 : i.current));
2299
+ if (!z || H) {
2300
+ k.preventDefault(), (k.shiftKey ? N : I).focus();
2301
+ return;
2302
+ }
2303
+ k.shiftKey && T === I ? (k.preventDefault(), N.focus()) : !k.shiftKey && T === N && (k.preventDefault(), I.focus());
2286
2304
  }
2287
- function T(P) {
2288
- mn(c, r) && v && P.target instanceof v && !Xe(
2305
+ function M(k) {
2306
+ wn(c, r) && v && k.target instanceof v && !nn(
2289
2307
  o,
2290
- h.current,
2291
- P.target
2308
+ u.current,
2309
+ k.target
2292
2310
  ) && b();
2293
2311
  }
2294
- return c.addEventListener("keydown", w, !0), c.addEventListener("focusin", T, !0), e && Promise.resolve().then(() => {
2312
+ return c.addEventListener("keydown", w, !0), c.addEventListener("focusin", M, !0), e && Promise.resolve().then(() => {
2295
2313
  x && b();
2296
2314
  }), () => {
2297
- x = !1, c.removeEventListener("keydown", w, !0), c.removeEventListener("focusin", T, !0), l && (g != null && g.isConnected) && g.focus({ preventScroll: !0 });
2315
+ x = !1, c.removeEventListener("keydown", w, !0), c.removeEventListener("focusin", M, !0), l && (m != null && m.isConnected) && so(m);
2298
2316
  };
2299
2317
  }, [
2300
2318
  t,
@@ -2305,8 +2323,8 @@ function _n(n) {
2305
2323
  l
2306
2324
  ]), d;
2307
2325
  }
2308
- function co() {
2309
- const [n, t] = Y(!1);
2326
+ function vo() {
2327
+ const [n, t] = $(!1);
2310
2328
  return q(() => {
2311
2329
  const e = typeof window > "u" ? null : window;
2312
2330
  if (!(e != null && e.matchMedia)) return;
@@ -2318,8 +2336,8 @@ function co() {
2318
2336
  return i(), o.addEventListener("change", i), () => o.removeEventListener("change", i);
2319
2337
  }, []), n;
2320
2338
  }
2321
- function Ge(n, t = 200) {
2322
- const e = co(), [o, i] = Y(n);
2339
+ function Ye(n, t = 200) {
2340
+ const e = vo(), [o, i] = $(n);
2323
2341
  return q(() => {
2324
2342
  if (n) {
2325
2343
  i(!0);
@@ -2339,11 +2357,11 @@ function Ge(n, t = 200) {
2339
2357
  state: n ? "open" : o ? "closing" : "closed"
2340
2358
  };
2341
2359
  }
2342
- const Be = /* @__PURE__ */ new WeakMap();
2343
- function uo(n, t) {
2360
+ const We = /* @__PURE__ */ new WeakMap();
2361
+ function mo(n, t) {
2344
2362
  q(() => {
2345
2363
  if (!n || !t) return;
2346
- const e = Be.get(t);
2364
+ const e = We.get(t);
2347
2365
  if (e)
2348
2366
  e.count += 1;
2349
2367
  else {
@@ -2352,23 +2370,23 @@ function uo(n, t) {
2352
2370
  ) || 0, l = t.documentElement.clientWidth, s = i && l > 0 ? Math.max(
2353
2371
  0,
2354
2372
  i.innerWidth - l
2355
- ) : 0, h = {
2373
+ ) : 0, u = {
2356
2374
  count: 1,
2357
2375
  overflow: o.style.overflow,
2358
2376
  paddingRight: o.style.paddingRight
2359
2377
  };
2360
- Be.set(t, h), o.style.overflow = "hidden", s > 0 && (o.style.paddingRight = `${r + s}px`);
2378
+ We.set(t, u), o.style.overflow = "hidden", s > 0 && (o.style.paddingRight = `${r + s}px`);
2361
2379
  }
2362
2380
  return () => {
2363
- const o = Be.get(t);
2364
- o && (o.count -= 1, !(o.count > 0) && (t.body.style.overflow = o.overflow, t.body.style.paddingRight = o.paddingRight, Be.delete(t)));
2381
+ const o = We.get(t);
2382
+ o && (o.count -= 1, !(o.count > 0) && (t.body.style.overflow = o.overflow, t.body.style.paddingRight = o.paddingRight, We.delete(t)));
2365
2383
  };
2366
2384
  }, [n, t]);
2367
2385
  }
2368
- function fo(n, t, e) {
2386
+ function go(n, t, e) {
2369
2387
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
2370
2388
  }
2371
- function ho(n) {
2389
+ function wo(n) {
2372
2390
  const {
2373
2391
  "aria-label": t,
2374
2392
  "aria-labelledby": e,
@@ -2377,52 +2395,52 @@ function ho(n) {
2377
2395
  closeButtonLabel: r = "Close modal",
2378
2396
  exitable: l = !0,
2379
2397
  forwardedReference: s,
2380
- initialFocusReference: h,
2398
+ initialFocusReference: u,
2381
2399
  lockScroll: f = !0,
2382
2400
  onClose: d,
2383
2401
  open: c,
2384
2402
  ownerDocument: p,
2385
2403
  presenceState: v,
2386
- restoreFocus: g = !0,
2404
+ restoreFocus: m = !0,
2387
2405
  role: x = "dialog",
2388
2406
  style: b,
2389
2407
  title: w,
2390
- trapFocus: T = !0,
2391
- ...L
2392
- } = n, V = H(null), P = Pe(Ae), E = `${Me()}-title`, [C, _] = Y(null), D = qe(!0, p), Z = Le(() => [V], []), j = !!(w != null && w.trim()), F = e ?? (t === void 0 && j ? E : void 0), N = W(
2393
- (R) => {
2394
- fo(R, V, s), _(R);
2408
+ trapFocus: M = !0,
2409
+ ..._
2410
+ } = n, R = D(null), k = D(null), C = Ne(Oe), I = `${Le()}-title`, [N, T] = $(null), z = Ke(!0, p), Z = Me(() => [R], []), H = !!(w != null && w.trim()), E = u ?? (H ? k : void 0), U = e ?? (t === void 0 && H ? I : void 0), S = W(
2411
+ (V) => {
2412
+ go(V, R, s), T(V);
2395
2413
  },
2396
2414
  [s]
2397
2415
  );
2398
- on(() => {
2399
- C && (C.inert = !c);
2400
- }, [C, c]);
2401
- const K = W(() => {
2416
+ $e(() => {
2417
+ N && (N.inert = !c);
2418
+ }, [N, c]);
2419
+ const y = W(() => {
2402
2420
  d == null || d("escape");
2403
- }, [d]), M = W(() => {
2421
+ }, [d]), P = W(() => {
2404
2422
  d == null || d("outside");
2405
2423
  }, [d]);
2406
- $e({
2424
+ Ue({
2407
2425
  active: c,
2408
2426
  boundaries: Z,
2409
2427
  dismissOnEscape: l,
2410
2428
  dismissOnPointerDownOutside: l,
2411
- layerId: D.id,
2412
- onEscapeDismiss: K,
2413
- onPointerDownOutsideDismiss: M,
2429
+ layerId: z.id,
2430
+ onEscapeDismiss: y,
2431
+ onPointerDownOutsideDismiss: P,
2414
2432
  ownerDocument: p
2415
2433
  });
2416
- const m = _n({
2417
- active: c && T,
2418
- container: C,
2419
- initialFocusReference: h,
2420
- layerId: D.id,
2421
- restoreFocus: g
2434
+ const A = Sn({
2435
+ active: c && M,
2436
+ container: N,
2437
+ initialFocusReference: E,
2438
+ layerId: z.id,
2439
+ restoreFocus: m
2422
2440
  });
2423
- uo(f, p);
2424
- const k = l ? /* @__PURE__ */ a(
2425
- tn,
2441
+ mo(f, p);
2442
+ const B = l ? /* @__PURE__ */ a(
2443
+ ze,
2426
2444
  {
2427
2445
  "aria-label": r,
2428
2446
  className: "nk-modal__close",
@@ -2434,24 +2452,24 @@ function ho(n) {
2434
2452
  }
2435
2453
  ) : null;
2436
2454
  return /* @__PURE__ */ a(
2437
- Ae.Provider,
2455
+ Oe.Provider,
2438
2456
  {
2439
- value: c && T ? m : P,
2457
+ value: c && M ? A : C,
2440
2458
  children: /* @__PURE__ */ a(
2441
2459
  "div",
2442
2460
  {
2443
2461
  className: "nk-modal__overlay",
2444
2462
  "data-state": v,
2445
2463
  role: "presentation",
2446
- style: { zIndex: D.zIndex },
2447
- children: /* @__PURE__ */ A(
2448
- Oe,
2464
+ style: { zIndex: z.zIndex },
2465
+ children: /* @__PURE__ */ O(
2466
+ He,
2449
2467
  {
2450
- ...L,
2451
- ref: N,
2468
+ ..._,
2469
+ ref: S,
2452
2470
  "aria-hidden": c ? void 0 : !0,
2453
2471
  "aria-label": c ? t : void 0,
2454
- "aria-labelledby": c ? F : void 0,
2472
+ "aria-labelledby": c ? U : void 0,
2455
2473
  "aria-modal": c ? "true" : void 0,
2456
2474
  className: ["nk-modal", i].filter(Boolean).join(" "),
2457
2475
  "data-state": v,
@@ -2459,20 +2477,22 @@ function ho(n) {
2459
2477
  style: b,
2460
2478
  tabIndex: -1,
2461
2479
  children: [
2462
- j ? /* @__PURE__ */ A("div", { className: "nk-modal__header", children: [
2480
+ H ? /* @__PURE__ */ O("div", { className: "nk-modal__header", children: [
2463
2481
  /* @__PURE__ */ a(
2464
2482
  fe,
2465
2483
  {
2466
2484
  as: "h2",
2467
2485
  className: "nk-modal__title",
2468
- id: E,
2486
+ id: I,
2487
+ ref: k,
2469
2488
  size: "subtitle",
2489
+ tabIndex: -1,
2470
2490
  weight: "semibold",
2471
2491
  children: w
2472
2492
  }
2473
2493
  ),
2474
- k
2475
- ] }) : k,
2494
+ B
2495
+ ] }) : B,
2476
2496
  o
2477
2497
  ]
2478
2498
  }
@@ -2482,47 +2502,50 @@ function ho(n) {
2482
2502
  }
2483
2503
  );
2484
2504
  }
2485
- const ar = y(function(t, e) {
2486
- const { open: o, portalContainer: i } = t, r = Ge(o), l = (i == null ? void 0 : i.ownerDocument) ?? (typeof document > "u" ? null : document);
2487
- return r.present ? /* @__PURE__ */ a(je, { container: i, children: /* @__PURE__ */ a(
2488
- ho,
2505
+ const Nr = g(function(t, e) {
2506
+ const { open: o } = t, i = D(t);
2507
+ o && (i.current = t);
2508
+ const r = o ? t : i.current, { portalContainer: l } = r, s = Ye(o), u = (l == null ? void 0 : l.ownerDocument) ?? (typeof document > "u" ? null : document);
2509
+ return s.present ? /* @__PURE__ */ a(Ge, { container: l, children: /* @__PURE__ */ a(
2510
+ wo,
2489
2511
  {
2490
- ...t,
2512
+ ...r,
2491
2513
  forwardedReference: e,
2492
- ownerDocument: l,
2493
- presenceState: r.state === "closing" ? "closing" : "open"
2514
+ open: o,
2515
+ ownerDocument: u,
2516
+ presenceState: s.state === "closing" ? "closing" : "open"
2494
2517
  }
2495
2518
  ) }) : null;
2496
- }), po = Number.parseInt(Fn, 10);
2519
+ }), bo = Number.parseInt(jn, 10);
2497
2520
  function Rn(n) {
2498
- return po >= 19 ? n.props.ref : n.ref;
2521
+ return bo >= 19 ? n.props.ref : n.ref;
2499
2522
  }
2500
- function Fe(n, t) {
2523
+ function De(n, t) {
2501
2524
  typeof n == "function" ? n(t) : n && (n.current = t);
2502
2525
  }
2503
- const vo = 12, mo = {
2526
+ const yo = 12, ko = {
2504
2527
  bottom: "top",
2505
2528
  left: "right",
2506
2529
  right: "left",
2507
2530
  top: "bottom"
2508
2531
  };
2509
- function wn(n, t) {
2510
- const e = Math.min(vo, t / 2);
2532
+ function yn(n, t) {
2533
+ const e = Math.min(yo, t / 2);
2511
2534
  return Math.min(Math.max(e, n), t - e);
2512
2535
  }
2513
- function go(n) {
2514
- return mo[n];
2536
+ function Io(n) {
2537
+ return ko[n];
2515
2538
  }
2516
- function wo(n, t) {
2539
+ function xo(n, t) {
2517
2540
  return t === "left" || t === "right" ? n.width : n.height;
2518
2541
  }
2519
- function bo(n, t, e, o, i, r) {
2542
+ function Co(n, t, e, o, i, r) {
2520
2543
  const l = {
2521
2544
  bottom: r - e.bottom - t * 2,
2522
2545
  left: e.left - t * 2,
2523
2546
  right: i - e.right - t * 2,
2524
2547
  top: e.top - t * 2
2525
- }, s = go(n), h = wo(o, n), f = l[n] < h && l[s] > l[n] ? s : n;
2548
+ }, s = Io(n), u = xo(o, n), f = l[n] < u && l[s] > l[n] ? s : n;
2526
2549
  let d = e.left + (e.width - o.width) / 2, c = e.top + (e.height - o.height) / 2;
2527
2550
  return f === "top" ? c = e.top - o.height - t : f === "bottom" ? c = e.bottom + t : f === "left" ? d = e.left - o.width - t : d = e.right + t, d = Math.min(
2528
2551
  Math.max(t, d),
@@ -2530,17 +2553,17 @@ function bo(n, t, e, o, i, r) {
2530
2553
  ), c = Math.min(
2531
2554
  Math.max(t, c),
2532
2555
  Math.max(t, r - t - o.height)
2533
- ), { arrowOffset: f === "top" || f === "bottom" ? wn(
2556
+ ), { arrowOffset: f === "top" || f === "bottom" ? yn(
2534
2557
  e.left + e.width / 2 - d,
2535
2558
  o.width
2536
- ) : wn(
2559
+ ) : yn(
2537
2560
  e.top + e.height / 2 - c,
2538
2561
  o.height
2539
2562
  ), left: d, placement: f, top: c };
2540
2563
  }
2541
- const yo = 8;
2542
- function Sn(n, t, e, o) {
2543
- const [i, r] = Y(null);
2564
+ const Po = 8;
2565
+ function Tn(n, t, e, o) {
2566
+ const [i, r] = $(null);
2544
2567
  return q(() => {
2545
2568
  if (!n || !e || !o) {
2546
2569
  r(null);
@@ -2548,15 +2571,15 @@ function Sn(n, t, e, o) {
2548
2571
  }
2549
2572
  const l = e.ownerDocument.defaultView;
2550
2573
  if (!l) return;
2551
- const s = l, h = s.getComputedStyle(e), f = Number.parseFloat(
2552
- h.getPropertyValue("--nk-space-8")
2553
- ), d = Number.isFinite(f) ? f : yo;
2574
+ const s = l, u = s.getComputedStyle(e), f = Number.parseFloat(
2575
+ u.getPropertyValue("--nk-space-8")
2576
+ ), d = Number.isFinite(f) ? f : Po;
2554
2577
  function c() {
2555
- const g = e == null ? void 0 : e.getBoundingClientRect(), x = o == null ? void 0 : o.getBoundingClientRect();
2556
- !g || !x || r(bo(
2578
+ const m = e == null ? void 0 : e.getBoundingClientRect(), x = o == null ? void 0 : o.getBoundingClientRect();
2579
+ !m || !x || r(Co(
2557
2580
  t,
2558
2581
  d,
2559
- g,
2582
+ m,
2560
2583
  x,
2561
2584
  s.innerWidth,
2562
2585
  s.innerHeight
@@ -2569,212 +2592,224 @@ function Sn(n, t, e, o) {
2569
2592
  };
2570
2593
  }, [n, o, t, e]), i;
2571
2594
  }
2572
- function ko(n, t, e) {
2573
- t.current = n, Fe(e, n);
2595
+ function _o(n) {
2596
+ const { inert: t, panelElement: e } = n;
2597
+ return $e(() => {
2598
+ e && (e.inert = t);
2599
+ }, [t, e]), null;
2600
+ }
2601
+ function No(n, t, e) {
2602
+ t.current = n, De(e, n);
2574
2603
  }
2575
- function xo(n, t, e) {
2576
- t.current = n, Fe(e, n);
2604
+ function Lo(n, t, e) {
2605
+ t.current = n, De(e, n);
2577
2606
  }
2578
- function Io(n, t) {
2607
+ function Mo(n, t) {
2579
2608
  const e = (n == null ? void 0 : n.split(/\s+/).filter(Boolean)) ?? [];
2580
2609
  return e.includes(t) || e.push(t), e.join(" ");
2581
2610
  }
2582
- function Co(n) {
2611
+ function Eo(n) {
2583
2612
  const t = n.tagName.toLowerCase();
2584
2613
  return n.getAttribute("role") === "button" && t !== "button" ? !1 : ["button", "input", "select", "summary", "textarea"].includes(t) ? !0 : t === "a" && n.hasAttribute("href");
2585
2614
  }
2586
- function Po(n) {
2615
+ function So(n) {
2587
2616
  return n === "grid" || n === "listbox" || n === "menu" || n === "tree" ? n : "dialog";
2588
2617
  }
2589
- const sr = y(function(t, e) {
2618
+ const Lr = g(function(t, e) {
2590
2619
  const {
2591
2620
  "aria-label": o,
2592
2621
  "aria-labelledby": i,
2593
2622
  autoFocus: r = !0,
2594
2623
  children: l,
2595
2624
  className: s,
2596
- closeOnEscape: h = !0,
2625
+ closeOnEscape: u = !0,
2597
2626
  closeOnOutsideInteraction: f = !0,
2598
2627
  defaultOpen: d = !1,
2599
2628
  disabled: c = !1,
2600
2629
  initialFocusReference: p,
2601
2630
  onEscapeKeyDown: v,
2602
- onOpenChange: g,
2631
+ onOpenChange: m,
2603
2632
  onPointerDownOutside: x,
2604
2633
  open: b,
2605
2634
  placement: w = "bottom",
2606
- portalContainer: T,
2607
- restoreFocus: L = !0,
2608
- role: V = "dialog",
2609
- style: P,
2610
- tabIndex: E,
2611
- trapFocus: C = !1,
2612
- trigger: _,
2613
- ...D
2635
+ portalContainer: M,
2636
+ restoreFocus: _ = !0,
2637
+ role: R = "dialog",
2638
+ style: k,
2639
+ tabIndex: C,
2640
+ trapFocus: I = !1,
2641
+ trigger: N,
2642
+ ...T
2614
2643
  } = t;
2615
- if (_.type === ze)
2644
+ if (N.type === _e)
2616
2645
  throw new Error("Popover requires a single non-Fragment trigger");
2617
- const Z = Me(), j = Pe(Ae), F = `${Z}-popover`, N = _.props, K = Rn(_), M = N.id ?? `${Z}-trigger`, m = c || N.disabled === !0 || N["aria-disabled"] === !0 || N["aria-disabled"] === "true", k = b !== void 0, [R, O] = Y(d), S = k ? b : R, z = Ge(S), te = H(null), ee = H(null), Q = H("programmatic"), $ = H(null), de = H(S), pe = H(null), [we, Ee] = xn(
2618
- (B) => B + 1,
2646
+ const z = Le(), Z = Ne(Oe), H = `${z}-popover`, E = N.props, U = Rn(N), S = E.id ?? `${z}-trigger`, y = c || E.disabled === !0 || E["aria-disabled"] === !0 || E["aria-disabled"] === "true", P = b !== void 0, [A, B] = $(d), V = P ? b : A, j = Ye(V), te = D(null), ee = D(null), X = D("programmatic"), K = D(null), ce = D(V), pe = D(null), [be, Ee] = xn(
2647
+ (F) => F + 1,
2619
2648
  0
2620
- ), [G, ne] = Y(null), [ae, oe] = Y(null), U = (T == null ? void 0 : T.ownerDocument) ?? (G == null ? void 0 : G.ownerDocument) ?? (typeof document > "u" ? null : document), ve = qe(z.present, U), re = Le(
2649
+ ), [G, ne] = $(null), [le, re] = $(null), Y = (M == null ? void 0 : M.ownerDocument) ?? (G == null ? void 0 : G.ownerDocument) ?? (typeof document > "u" ? null : document), ve = Ke(j.present, Y), ie = Me(
2621
2650
  () => [te, ee],
2622
2651
  []
2623
- ), se = Sn(
2624
- z.present,
2652
+ ), se = Tn(
2653
+ j.present,
2625
2654
  w,
2626
2655
  G,
2627
- ae
2628
- ), be = S ? {} : { inert: "" }, Ne = W(
2629
- (B) => {
2630
- xo(
2631
- B,
2656
+ le
2657
+ ), ye = W(
2658
+ (F) => {
2659
+ Lo(
2660
+ F,
2632
2661
  te,
2633
- K
2634
- ), ne(B);
2662
+ U
2663
+ ), ne(F);
2635
2664
  },
2636
- [K]
2637
- ), _e = W(
2638
- (B) => {
2639
- ko(
2640
- B,
2665
+ [U]
2666
+ ), Se = W(
2667
+ (F) => {
2668
+ No(
2669
+ F,
2641
2670
  ee,
2642
2671
  e
2643
- ), oe(B);
2672
+ ), re(F);
2644
2673
  },
2645
2674
  [e]
2646
- ), ue = W((B, J) => {
2647
- S !== B && (k ? ($.current = {
2648
- open: B,
2675
+ ), de = W((F, J) => {
2676
+ V !== F && (P ? (K.current = {
2677
+ open: F,
2649
2678
  reason: J
2650
- }, Ee()) : (Q.current = J, O(B)), g == null || g(B, J));
2651
- }, [k, g, S]), Re = W(() => {
2652
- ue(!1, "escape");
2653
- }, [ue]), ye = W(() => {
2654
- ue(!1, "outside");
2655
- }, [ue]), u = W((B) => {
2679
+ }, Ee()) : (X.current = J, B(F)), m == null || m(F, J));
2680
+ }, [P, m, V]), Re = W(() => {
2681
+ de(!1, "escape");
2682
+ }, [de]), Te = W(() => {
2683
+ de(!1, "outside");
2684
+ }, [de]), ke = W((F) => {
2656
2685
  var Ve;
2657
- if (x == null || x(B), B.defaultPrevented) return;
2658
- const J = (Ve = U == null ? void 0 : U.defaultView) == null ? void 0 : Ve.HTMLElement;
2659
- pe.current = J ? B.composedPath().find(
2660
- (xe) => xe instanceof J && xe.tabIndex >= 0
2661
- ) ?? B.target : B.target;
2662
- }, [x, U]);
2663
- $e({
2664
- active: S,
2665
- boundaries: re,
2666
- dismissOnEscape: h,
2686
+ if (x == null || x(F), F.defaultPrevented) return;
2687
+ const J = (Ve = Y == null ? void 0 : Y.defaultView) == null ? void 0 : Ve.HTMLElement;
2688
+ pe.current = J ? F.composedPath().find(
2689
+ (Ie) => Ie instanceof J && Ie.tabIndex >= 0
2690
+ ) ?? F.target : F.target;
2691
+ }, [x, Y]);
2692
+ Ue({
2693
+ active: V,
2694
+ boundaries: ie,
2695
+ dismissOnEscape: u,
2667
2696
  dismissOnPointerDownOutside: f,
2668
2697
  layerId: ve.id,
2669
2698
  onEscapeDismiss: Re,
2670
2699
  onEscapeKeyDown: v,
2671
- onPointerDownOutside: u,
2672
- onPointerDownOutsideDismiss: ye,
2673
- ownerDocument: U
2700
+ onPointerDownOutside: ke,
2701
+ onPointerDownOutsideDismiss: Te,
2702
+ ownerDocument: Y
2674
2703
  });
2675
- const I = _n({
2676
- active: S && C,
2704
+ const h = Sn({
2705
+ active: V && I,
2677
2706
  autoFocus: r,
2678
- container: ae,
2707
+ container: le,
2679
2708
  initialFocusReference: p,
2680
2709
  layerId: ve.id,
2681
- restoreFocus: L
2710
+ restoreFocus: _
2682
2711
  });
2683
2712
  q(() => {
2684
- if (!S || C || !r || !ae) return;
2685
- let B = !0;
2713
+ if (!V || I || !r || !le) return;
2714
+ let F = !0;
2686
2715
  return Promise.resolve().then(() => {
2687
- if (!B) return;
2716
+ if (!F) return;
2688
2717
  const J = p == null ? void 0 : p.current;
2689
- (J && ae.contains(J) ? J : ae).focus({ preventScroll: !0 });
2718
+ (J && le.contains(J) ? J : le).focus({ preventScroll: !0 });
2690
2719
  }), () => {
2691
- B = !1;
2720
+ F = !1;
2692
2721
  };
2693
- }, [r, p, S, ae, C]), q(() => {
2694
- var sn;
2695
- const B = de.current;
2696
- de.current = S;
2697
- const J = $.current, Ve = k ? B !== S && (J == null ? void 0 : J.open) === S ? J.reason : "programmatic" : Q.current;
2698
- if ($.current = null, S) {
2699
- Q.current = "programmatic", pe.current = null;
2722
+ }, [r, p, V, le, I]), q(() => {
2723
+ var cn;
2724
+ const F = ce.current;
2725
+ ce.current = V;
2726
+ const J = K.current, Ve = P ? F !== V && (J == null ? void 0 : J.open) === V ? J.reason : "programmatic" : X.current;
2727
+ if (K.current = null, V) {
2728
+ X.current = "programmatic", pe.current = null;
2700
2729
  return;
2701
2730
  }
2702
- const xe = U == null ? void 0 : U.activeElement, Ke = pe.current, Ue = (sn = U == null ? void 0 : U.defaultView) == null ? void 0 : sn.HTMLElement, Bn = Ve === "outside" && Ue && Ke instanceof Ue && xe instanceof Ue && (Ke === xe || Ke.contains(xe));
2703
- B && !C && L && !Bn && (G == null || G.focus({ preventScroll: !0 })), pe.current = null;
2731
+ const Ie = Y == null ? void 0 : Y.activeElement, Xe = pe.current, Qe = (cn = Y == null ? void 0 : Y.defaultView) == null ? void 0 : cn.HTMLElement, zn = Ve === "outside" && Qe && Xe instanceof Qe && Ie instanceof Qe && (Xe === Ie || Xe.contains(Ie));
2732
+ F && !I && _ && !zn && (G == null || G.focus({ preventScroll: !0 })), pe.current = null;
2704
2733
  }, [
2705
- we,
2706
- k,
2707
- S,
2708
- U,
2709
- L,
2710
- C,
2734
+ be,
2735
+ P,
2736
+ V,
2737
+ Y,
2738
+ _,
2739
+ I,
2711
2740
  G
2712
2741
  ]), q(() => {
2713
- c && S && ue(!1, "programmatic");
2714
- }, [c, S, ue]);
2715
- function X(B) {
2742
+ c && V && de(!1, "programmatic");
2743
+ }, [c, V, de]);
2744
+ function L(F) {
2716
2745
  var J;
2717
- if (m) {
2718
- B.preventDefault(), B.stopPropagation();
2746
+ if (y) {
2747
+ F.preventDefault(), F.stopPropagation();
2719
2748
  return;
2720
2749
  }
2721
- (J = N.onClick) == null || J.call(N, B), !B.defaultPrevented && ue(!S, "trigger");
2750
+ (J = E.onClick) == null || J.call(E, F), !F.defaultPrevented && de(!V, "trigger");
2722
2751
  }
2723
- function ie(B) {
2752
+ function Q(F) {
2724
2753
  var J;
2725
- (J = N.onKeyDown) == null || J.call(N, B), !(B.defaultPrevented || m || Co(B.currentTarget) || B.key !== "Enter" && B.key !== " ") && (B.preventDefault(), B.currentTarget.click());
2754
+ (J = E.onKeyDown) == null || J.call(E, F), !(F.defaultPrevented || y || Eo(F.currentTarget) || F.key !== "Enter" && F.key !== " ") && (F.preventDefault(), F.currentTarget.click());
2726
2755
  }
2727
- if (c) return _;
2728
- const le = typeof _.type == "string", ce = le ? _.type : null, ke = ce === "a" && typeof N.href == "string", rn = le && !(ce === "button" || ce === "input" || ce === "select" || ce === "summary" || ce === "textarea" || ke), an = ke && m, On = He(
2729
- _,
2756
+ if (c) return N;
2757
+ const oe = typeof N.type == "string", ae = oe ? N.type : null, ue = ae === "a" && typeof E.href == "string", we = oe && !(ae === "button" || ae === "input" || ae === "select" || ae === "summary" || ae === "textarea" || ue), sn = ue && y, Wn = Pe(
2758
+ N,
2730
2759
  {
2731
- "aria-controls": S ? Io(N["aria-controls"], F) : N["aria-controls"],
2732
- "aria-expanded": S,
2733
- "aria-haspopup": N["aria-haspopup"] ?? Po(V),
2734
- "aria-disabled": m ? !0 : N["aria-disabled"],
2735
- className: [N.className, "nk-popover__trigger"].filter(Boolean).join(" "),
2736
- href: an ? void 0 : N.href,
2737
- id: M,
2738
- onClick: X,
2739
- onKeyDown: le ? ie : N.onKeyDown,
2740
- ref: Ne,
2741
- role: N.role ?? (an ? "link" : rn ? "button" : void 0),
2742
- tabIndex: m ? -1 : N.tabIndex ?? (rn ? 0 : void 0)
2743
- }
2744
- );
2745
- return /* @__PURE__ */ A(We, { children: [
2746
- On,
2760
+ "aria-controls": V ? Mo(E["aria-controls"], H) : E["aria-controls"],
2761
+ "aria-expanded": V,
2762
+ "aria-haspopup": E["aria-haspopup"] ?? So(R),
2763
+ "aria-disabled": y ? !0 : E["aria-disabled"],
2764
+ className: [E.className, "nk-popover__trigger"].filter(Boolean).join(" "),
2765
+ href: sn ? void 0 : E.href,
2766
+ id: S,
2767
+ onClick: L,
2768
+ onKeyDown: oe ? Q : E.onKeyDown,
2769
+ ref: ye,
2770
+ role: E.role ?? (sn ? "link" : we ? "button" : void 0),
2771
+ tabIndex: y ? -1 : E.tabIndex ?? (we ? 0 : void 0)
2772
+ }
2773
+ );
2774
+ return /* @__PURE__ */ O(je, { children: [
2775
+ Wn,
2747
2776
  /* @__PURE__ */ a(
2748
- Ae.Provider,
2777
+ Oe.Provider,
2749
2778
  {
2750
- value: S && C ? I : j,
2751
- children: z.present && U ? /* @__PURE__ */ a(je, { container: T, inheritFrom: G, children: /* @__PURE__ */ A(
2752
- Oe,
2779
+ value: V && I ? h : Z,
2780
+ children: j.present && Y ? /* @__PURE__ */ a(Ge, { container: M, inheritFrom: G, children: /* @__PURE__ */ O(
2781
+ He,
2753
2782
  {
2754
- ...D,
2755
- ...be,
2756
- ref: _e,
2757
- "aria-hidden": S ? void 0 : !0,
2758
- "aria-label": S ? o : void 0,
2759
- "aria-labelledby": S ? i ?? (o === void 0 ? M : void 0) : void 0,
2783
+ ...T,
2784
+ ref: Se,
2785
+ "aria-hidden": V ? void 0 : !0,
2786
+ "aria-label": V ? o : void 0,
2787
+ "aria-labelledby": V ? i ?? (o === void 0 ? S : void 0) : void 0,
2760
2788
  className: ["nk-popover", s].filter(Boolean).join(" "),
2761
2789
  "data-placement": (se == null ? void 0 : se.placement) ?? w,
2762
- "data-state": z.state === "closing" ? "closing" : "open",
2763
- id: F,
2764
- role: S ? V : void 0,
2790
+ "data-state": j.state === "closing" ? "closing" : "open",
2791
+ id: H,
2792
+ role: V ? R : void 0,
2765
2793
  style: se ? {
2766
- ...P,
2794
+ ...k,
2767
2795
  "--nk-popover-arrow-offset": `${se.arrowOffset}px`,
2768
2796
  left: se.left,
2769
2797
  top: se.top,
2770
2798
  zIndex: ve.zIndex
2771
2799
  } : {
2772
- ...P,
2800
+ ...k,
2773
2801
  visibility: "hidden",
2774
2802
  zIndex: ve.zIndex
2775
2803
  },
2776
- tabIndex: E ?? -1,
2804
+ tabIndex: C ?? -1,
2777
2805
  children: [
2806
+ /* @__PURE__ */ a(
2807
+ _o,
2808
+ {
2809
+ inert: !V,
2810
+ panelElement: le
2811
+ }
2812
+ ),
2778
2813
  /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-popover__arrow" }),
2779
2814
  /* @__PURE__ */ a("div", { className: "nk-popover__content", children: l })
2780
2815
  ]
@@ -2783,20 +2818,20 @@ const sr = y(function(t, e) {
2783
2818
  }
2784
2819
  )
2785
2820
  ] });
2786
- }), Mo = 3, Lo = 10, Vn = 4;
2787
- function Eo(n) {
2821
+ }), Ro = 3, To = 10, Vn = 4;
2822
+ function Vo(n) {
2788
2823
  return Number.isFinite(n) ? Math.min(
2789
- Lo,
2790
- Math.max(Mo, Math.trunc(n))
2824
+ To,
2825
+ Math.max(Ro, Math.trunc(n))
2791
2826
  ) : Vn;
2792
2827
  }
2793
- function Ie(n, t, e) {
2828
+ function xe(n, t, e) {
2794
2829
  return (t === "numeric" ? n.replace(/[^0-9]/g, "") : n.replace(/[^0-9a-z]/gi, "").toUpperCase()).slice(0, e);
2795
2830
  }
2796
- function No(n, t, e) {
2831
+ function Ao(n, t, e) {
2797
2832
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
2798
2833
  }
2799
- function _o(n, t) {
2834
+ function Oo(n, t) {
2800
2835
  var o;
2801
2836
  const e = (o = Object.getOwnPropertyDescriptor(
2802
2837
  Object.getPrototypeOf(n),
@@ -2804,11 +2839,11 @@ function _o(n, t) {
2804
2839
  )) == null ? void 0 : o.set;
2805
2840
  e ? e.call(n, t) : n.value = t;
2806
2841
  }
2807
- function Je(n, t, e) {
2842
+ function tn(n, t, e) {
2808
2843
  const o = Math.min(e - 1, Math.max(0, t)), i = Math.min(o + 1, n.value.length);
2809
2844
  n.focus(), n.setSelectionRange(o, i);
2810
2845
  }
2811
- function Ro(n) {
2846
+ function Bo(n) {
2812
2847
  const {
2813
2848
  defaultValue: t,
2814
2849
  disabled: e,
@@ -2817,232 +2852,232 @@ function Ro(n) {
2817
2852
  mode: r,
2818
2853
  onChange: l,
2819
2854
  onComplete: s,
2820
- onFocus: h,
2855
+ onFocus: u,
2821
2856
  onKeyDown: f,
2822
2857
  onPaste: d,
2823
2858
  onSelect: c,
2824
2859
  readOnly: p,
2825
2860
  value: v
2826
- } = n, g = Eo(i), x = Ie(
2861
+ } = n, m = Vo(i), x = xe(
2827
2862
  t,
2828
2863
  r,
2829
- g
2830
- ), b = H(null), [w, T] = Y(
2864
+ m
2865
+ ), b = D(null), [w, M] = $(
2831
2866
  x
2832
- ), [L, V] = Y(0), P = v !== void 0, E = Ie(
2833
- P ? v : w,
2867
+ ), [_, R] = $(0), k = v !== void 0, C = xe(
2868
+ k ? v : w,
2834
2869
  r,
2835
- g
2836
- ), C = W(
2837
- (M) => No(
2838
- M,
2870
+ m
2871
+ ), I = W(
2872
+ (S) => Ao(
2873
+ S,
2839
2874
  b,
2840
2875
  o
2841
2876
  ),
2842
2877
  [o]
2843
2878
  );
2844
2879
  q(() => {
2845
- !P && w !== E && T(E);
2846
- }, [P, E, w]), q(() => {
2847
- var R;
2848
- if (P) return;
2849
- const M = (R = b.current) == null ? void 0 : R.form;
2850
- if (!M) return;
2851
- const m = M.getRootNode();
2852
- function k(O) {
2853
- O.target !== M || O.defaultPrevented || (T(x), V(0));
2854
- }
2855
- return m.addEventListener("reset", k), () => m.removeEventListener("reset", k);
2856
- }, [P, x]);
2857
- function _(M) {
2858
- const m = M.selectionStart ?? E.length;
2859
- return Math.min(g - 1, Math.max(0, m));
2880
+ !k && w !== C && M(C);
2881
+ }, [k, C, w]), q(() => {
2882
+ var A;
2883
+ if (k) return;
2884
+ const S = (A = b.current) == null ? void 0 : A.form;
2885
+ if (!S) return;
2886
+ const y = S.getRootNode();
2887
+ function P(B) {
2888
+ B.target !== S || B.defaultPrevented || (M(x), R(0));
2889
+ }
2890
+ return y.addEventListener("reset", P), () => y.removeEventListener("reset", P);
2891
+ }, [k, x]);
2892
+ function N(S) {
2893
+ const y = S.selectionStart ?? C.length;
2894
+ return Math.min(m - 1, Math.max(0, y));
2860
2895
  }
2861
- function D(M) {
2862
- const m = M.currentTarget, k = m.selectionStart ?? m.value.length, R = Ie(m.value, r, g), O = Ie(
2863
- m.value.slice(0, k),
2896
+ function T(S) {
2897
+ const y = S.currentTarget, P = y.selectionStart ?? y.value.length, A = xe(y.value, r, m), B = xe(
2898
+ y.value.slice(0, P),
2864
2899
  r,
2865
- g
2900
+ m
2866
2901
  ).length;
2867
- m.value = R, P || T(R), l == null || l(M), R.length === g && R !== E && (s == null || s(R));
2868
- const S = Math.min(g - 1, O);
2869
- V(S), m.setSelectionRange(
2870
- S,
2871
- Math.min(S + 1, R.length)
2902
+ y.value = A, k || M(A), l == null || l(S), A.length === m && A !== C && (s == null || s(A));
2903
+ const V = Math.min(m - 1, B);
2904
+ R(V), y.setSelectionRange(
2905
+ V,
2906
+ Math.min(V + 1, A.length)
2872
2907
  );
2873
2908
  }
2874
- function Z(M) {
2875
- if (d == null || d(M), M.defaultPrevented || e || p) return;
2876
- const m = Ie(
2877
- M.clipboardData.getData("text"),
2909
+ function z(S) {
2910
+ if (d == null || d(S), S.defaultPrevented || e || p) return;
2911
+ const y = xe(
2912
+ S.clipboardData.getData("text"),
2878
2913
  r,
2879
- g
2914
+ m
2880
2915
  );
2881
- if (M.preventDefault(), m.length === 0) return;
2882
- const k = M.currentTarget, R = k.selectionStart ?? E.length, O = k.selectionEnd ?? R, S = m.length === g ? m : Ie(
2883
- E.slice(0, R) + m + E.slice(O),
2916
+ if (S.preventDefault(), y.length === 0) return;
2917
+ const P = S.currentTarget, A = P.selectionStart ?? C.length, B = P.selectionEnd ?? A, V = y.length === m ? y : xe(
2918
+ C.slice(0, A) + y + C.slice(B),
2884
2919
  r,
2885
- g
2886
- ), z = m.length === g ? g : Math.min(g, R + m.length);
2887
- _o(k, S), k.setSelectionRange(z, z), k.dispatchEvent(new Event("input", { bubbles: !0 }));
2920
+ m
2921
+ ), j = y.length === m ? m : Math.min(m, A + y.length);
2922
+ Oo(P, V), P.setSelectionRange(j, j), P.dispatchEvent(new Event("input", { bubbles: !0 }));
2888
2923
  }
2889
- function j(M) {
2890
- if (f == null || f(M), M.defaultPrevented || M.key !== "ArrowLeft" && M.key !== "ArrowRight") return;
2891
- M.preventDefault();
2892
- const m = M.key === "ArrowLeft" ? -1 : 1, k = Math.min(
2893
- g - 1,
2894
- Math.max(0, _(M.currentTarget) + m)
2924
+ function Z(S) {
2925
+ if (f == null || f(S), S.defaultPrevented || S.key !== "ArrowLeft" && S.key !== "ArrowRight") return;
2926
+ S.preventDefault();
2927
+ const y = S.key === "ArrowLeft" ? -1 : 1, P = Math.min(
2928
+ m - 1,
2929
+ Math.max(0, N(S.currentTarget) + y)
2895
2930
  );
2896
- V(k), Je(M.currentTarget, k, g);
2931
+ R(P), tn(S.currentTarget, P, m);
2897
2932
  }
2898
- function F(M) {
2899
- h == null || h(M);
2900
- const m = Math.min(g - 1, E.length);
2901
- V(m), Je(M.currentTarget, m, g);
2933
+ function H(S) {
2934
+ u == null || u(S);
2935
+ const y = Math.min(m - 1, C.length);
2936
+ R(y), tn(S.currentTarget, y, m);
2902
2937
  }
2903
- function N(M) {
2904
- c == null || c(M), V(_(M.currentTarget));
2938
+ function E(S) {
2939
+ c == null || c(S), R(N(S.currentTarget));
2905
2940
  }
2906
- function K(M, m) {
2907
- if (M.preventDefault(), e) return;
2908
- const k = b.current;
2909
- k && (V(m), Je(k, m, g));
2941
+ function U(S, y) {
2942
+ if (S.preventDefault(), e) return;
2943
+ const P = b.current;
2944
+ P && (R(y), tn(P, y, m));
2910
2945
  }
2911
2946
  return {
2912
- activeIndex: L,
2913
- handleChange: D,
2914
- handleFocus: F,
2915
- handleKeyDown: j,
2916
- handlePaste: Z,
2917
- handleSelect: N,
2918
- handleSlotPointerDown: K,
2919
- inputCallbackReference: C,
2920
- length: g,
2921
- renderedValue: E
2947
+ activeIndex: _,
2948
+ handleChange: T,
2949
+ handleFocus: H,
2950
+ handleKeyDown: Z,
2951
+ handlePaste: z,
2952
+ handleSelect: E,
2953
+ handleSlotPointerDown: U,
2954
+ inputCallbackReference: I,
2955
+ length: m,
2956
+ renderedValue: C
2922
2957
  };
2923
2958
  }
2924
- const lr = y(function(t, e) {
2959
+ const Mr = g(function(t, e) {
2925
2960
  const {
2926
2961
  "aria-invalid": o,
2927
2962
  autoCapitalize: i,
2928
2963
  autoComplete: r = "one-time-code",
2929
2964
  className: l,
2930
2965
  censored: s = !1,
2931
- defaultValue: h = "",
2966
+ defaultValue: u = "",
2932
2967
  disabled: f = !1,
2933
2968
  invalid: d = !1,
2934
2969
  length: c = Vn,
2935
2970
  mode: p = "numeric",
2936
2971
  onChange: v,
2937
- onComplete: g,
2972
+ onComplete: m,
2938
2973
  onFocus: x,
2939
2974
  onKeyDown: b,
2940
2975
  onPaste: w,
2941
- onSelect: T,
2942
- readOnly: L = !1,
2943
- style: V,
2944
- value: P,
2945
- wrap: E = !1,
2946
- ...C
2976
+ onSelect: M,
2977
+ readOnly: _ = !1,
2978
+ style: R,
2979
+ value: k,
2980
+ wrap: C = !1,
2981
+ ...I
2947
2982
  } = t, {
2948
- activeIndex: _,
2949
- handleChange: D,
2950
- handleFocus: Z,
2951
- handleKeyDown: j,
2952
- handlePaste: F,
2953
- handleSelect: N,
2954
- handleSlotPointerDown: K,
2955
- inputCallbackReference: M,
2956
- length: m,
2957
- renderedValue: k
2958
- } = Ro({
2959
- defaultValue: h,
2983
+ activeIndex: N,
2984
+ handleChange: T,
2985
+ handleFocus: z,
2986
+ handleKeyDown: Z,
2987
+ handlePaste: H,
2988
+ handleSelect: E,
2989
+ handleSlotPointerDown: U,
2990
+ inputCallbackReference: S,
2991
+ length: y,
2992
+ renderedValue: P
2993
+ } = Bo({
2994
+ defaultValue: u,
2960
2995
  disabled: f,
2961
2996
  forwardedReference: e,
2962
2997
  length: c,
2963
2998
  mode: p,
2964
2999
  onChange: v,
2965
- onComplete: g,
3000
+ onComplete: m,
2966
3001
  onFocus: x,
2967
3002
  onKeyDown: b,
2968
3003
  onPaste: w,
2969
- onSelect: T,
2970
- readOnly: L,
2971
- value: P
2972
- }), R = d || he(o), O = !E && m >= 6 && m % 2 === 0, S = m / 2, z = {
2973
- ...V,
2974
- "--nk-pin-input-columns": Math.ceil(m / 2)
3004
+ onSelect: M,
3005
+ readOnly: _,
3006
+ value: k
3007
+ }), A = d || he(o), B = !C && y >= 6 && y % 2 === 0, V = y / 2, j = {
3008
+ ...R,
3009
+ "--nk-pin-input-columns": Math.ceil(y / 2)
2975
3010
  };
2976
- return /* @__PURE__ */ A(
3011
+ return /* @__PURE__ */ O(
2977
3012
  "span",
2978
3013
  {
2979
3014
  className: ["nk-pin-input", l].filter(Boolean).join(" "),
2980
3015
  "data-disabled": f || void 0,
2981
- "data-invalid": R || void 0,
2982
- "data-read-only": L || void 0,
2983
- "data-wrap": E || void 0,
2984
- style: z,
3016
+ "data-invalid": A || void 0,
3017
+ "data-read-only": _ || void 0,
3018
+ "data-wrap": C || void 0,
3019
+ style: j,
2985
3020
  children: [
2986
3021
  /* @__PURE__ */ a(
2987
3022
  "input",
2988
3023
  {
2989
- ...C,
2990
- ref: M,
3024
+ ...I,
3025
+ ref: S,
2991
3026
  "aria-invalid": ge(d, o),
2992
3027
  autoCapitalize: i ?? (p === "alphanumeric" ? "characters" : "off"),
2993
3028
  autoComplete: r,
2994
3029
  className: "nk-pin-input__control",
2995
3030
  disabled: f,
2996
3031
  inputMode: p === "numeric" ? "numeric" : "text",
2997
- maxLength: m,
2998
- minLength: m,
2999
- onChange: D,
3000
- onFocus: Z,
3001
- onKeyDown: j,
3002
- onPaste: F,
3003
- onSelect: N,
3004
- pattern: p === "numeric" ? `[0-9]{${m}}` : `[0-9A-Za-z]{${m}}`,
3005
- readOnly: L,
3032
+ maxLength: y,
3033
+ minLength: y,
3034
+ onChange: T,
3035
+ onFocus: z,
3036
+ onKeyDown: Z,
3037
+ onPaste: H,
3038
+ onSelect: E,
3039
+ pattern: p === "numeric" ? `[0-9]{${y}}` : `[0-9A-Za-z]{${y}}`,
3040
+ readOnly: _,
3006
3041
  spellCheck: !1,
3007
3042
  type: "text",
3008
- value: k
3043
+ value: P
3009
3044
  }
3010
3045
  ),
3011
- /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-pin-input__slots", children: Array.from({ length: m }, (te, ee) => /* @__PURE__ */ A("span", { className: "nk-pin-input__slot-group", children: [
3012
- O && ee === S ? /* @__PURE__ */ a("span", { className: "nk-pin-input__separator", children: "-" }) : null,
3046
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-pin-input__slots", children: Array.from({ length: y }, (te, ee) => /* @__PURE__ */ O("span", { className: "nk-pin-input__slot-group", children: [
3047
+ B && ee === V ? /* @__PURE__ */ a("span", { className: "nk-pin-input__separator", children: "-" }) : null,
3013
3048
  /* @__PURE__ */ a(
3014
3049
  "span",
3015
3050
  {
3016
3051
  className: "nk-pin-input__slot",
3017
- "data-active": _ === ee || void 0,
3018
- onPointerDown: (Q) => K(Q, ee),
3019
- children: s && k[ee] ? /* @__PURE__ */ a("span", { className: "nk-pin-input__censor" }) : k[ee] ?? ""
3052
+ "data-active": N === ee || void 0,
3053
+ onPointerDown: (X) => U(X, ee),
3054
+ children: s && P[ee] ? /* @__PURE__ */ a("span", { className: "nk-pin-input__censor" }) : P[ee] ?? ""
3020
3055
  }
3021
3056
  )
3022
3057
  ] }, ee)) })
3023
3058
  ]
3024
3059
  }
3025
3060
  );
3026
- }), Tn = Ze(void 0);
3027
- function So() {
3028
- const n = Pe(Tn);
3061
+ }), An = qe(void 0);
3062
+ function Do() {
3063
+ const n = Ne(An);
3029
3064
  if (!n)
3030
3065
  throw new Error("Radio must be rendered within RadioGroup");
3031
3066
  return n;
3032
3067
  }
3033
- function Vo(n, t, e) {
3068
+ function Ho(n, t, e) {
3034
3069
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
3035
3070
  }
3036
- const cr = y(function(t, e) {
3071
+ const Er = g(function(t, e) {
3037
3072
  const {
3038
3073
  children: o,
3039
3074
  className: i,
3040
3075
  disabled: r = !1,
3041
3076
  style: l,
3042
3077
  value: s,
3043
- ...h
3044
- } = t, f = So(), d = H(null), c = f.disabled || r, p = f.value !== void 0, v = f.value === s, g = W(
3045
- (x) => Vo(
3078
+ ...u
3079
+ } = t, f = Do(), d = D(null), c = f.disabled || r, p = f.value !== void 0, v = f.value === s, m = W(
3080
+ (x) => Ho(
3046
3081
  x,
3047
3082
  d,
3048
3083
  e
@@ -3052,7 +3087,7 @@ const cr = y(function(t, e) {
3052
3087
  return q(() => {
3053
3088
  var x;
3054
3089
  !p && c && ((x = d.current) != null && x.checked) && (d.current.checked = !1);
3055
- }, [p, c]), /* @__PURE__ */ A(
3090
+ }, [p, c]), /* @__PURE__ */ O(
3056
3091
  "label",
3057
3092
  {
3058
3093
  className: ["nk-radio", i].filter(Boolean).join(" "),
@@ -3062,8 +3097,8 @@ const cr = y(function(t, e) {
3062
3097
  /* @__PURE__ */ a(
3063
3098
  "input",
3064
3099
  {
3065
- ...h,
3066
- ref: g,
3100
+ ...u,
3101
+ ref: m,
3067
3102
  checked: p ? !c && v : void 0,
3068
3103
  className: "nk-radio__control",
3069
3104
  defaultChecked: p ? void 0 : !c && f.defaultValue === s,
@@ -3080,7 +3115,7 @@ const cr = y(function(t, e) {
3080
3115
  ]
3081
3116
  }
3082
3117
  );
3083
- }), To = y(
3118
+ }), Fo = g(
3084
3119
  function(t, e) {
3085
3120
  const {
3086
3121
  "aria-invalid": o,
@@ -3088,14 +3123,14 @@ const cr = y(function(t, e) {
3088
3123
  className: r,
3089
3124
  defaultValue: l,
3090
3125
  disabled: s = !1,
3091
- invalid: h = !1,
3126
+ invalid: u = !1,
3092
3127
  name: f,
3093
3128
  onChange: d,
3094
3129
  orientation: c = "vertical",
3095
3130
  required: p = !1,
3096
3131
  value: v,
3097
- ...g
3098
- } = t, x = h || he(o), b = {
3132
+ ...m
3133
+ } = t, x = u || he(o), b = {
3099
3134
  defaultValue: l,
3100
3135
  disabled: s,
3101
3136
  name: f,
@@ -3103,13 +3138,13 @@ const cr = y(function(t, e) {
3103
3138
  required: p,
3104
3139
  value: v
3105
3140
  };
3106
- return /* @__PURE__ */ a(Tn.Provider, { value: b, children: /* @__PURE__ */ a(
3141
+ return /* @__PURE__ */ a(An.Provider, { value: b, children: /* @__PURE__ */ a(
3107
3142
  "div",
3108
3143
  {
3109
- ...g,
3144
+ ...m,
3110
3145
  ref: e,
3111
3146
  "aria-disabled": s || void 0,
3112
- "aria-invalid": ge(h, o),
3147
+ "aria-invalid": ge(u, o),
3113
3148
  "aria-required": p || void 0,
3114
3149
  className: ["nk-radio-group", r].filter(Boolean).join(" "),
3115
3150
  "data-disabled": s || void 0,
@@ -3121,8 +3156,8 @@ const cr = y(function(t, e) {
3121
3156
  ) });
3122
3157
  }
3123
3158
  );
3124
- En(To, "group");
3125
- function en(n, t, e) {
3159
+ Mn(Fo, "group");
3160
+ function on(n, t, e) {
3126
3161
  if (n.length === 0) return -1;
3127
3162
  for (let o = 1; o <= n.length; o += 1) {
3128
3163
  const i = (t + e * o + n.length) % n.length;
@@ -3130,7 +3165,7 @@ function en(n, t, e) {
3130
3165
  }
3131
3166
  return -1;
3132
3167
  }
3133
- function Ao(n, t, e) {
3168
+ function Wo(n, t, e) {
3134
3169
  for (let o = 1; o <= n.length; o += 1) {
3135
3170
  const i = (e + o + n.length) % n.length, r = n[i];
3136
3171
  if (!r.disabled && r.label.toLocaleLowerCase().startsWith(t))
@@ -3138,7 +3173,7 @@ function Ao(n, t, e) {
3138
3173
  }
3139
3174
  return -1;
3140
3175
  }
3141
- function Do(n) {
3176
+ function zo(n) {
3142
3177
  const t = /* @__PURE__ */ new Set();
3143
3178
  n.forEach((e) => {
3144
3179
  if (t.has(e.value))
@@ -3146,10 +3181,10 @@ function Do(n) {
3146
3181
  t.add(e.value);
3147
3182
  });
3148
3183
  }
3149
- function Oo(n, t, e) {
3184
+ function jo(n, t, e) {
3150
3185
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
3151
3186
  }
3152
- function Bo(n) {
3187
+ function Zo(n) {
3153
3188
  const {
3154
3189
  "aria-invalid": t,
3155
3190
  children: e,
@@ -3158,12 +3193,12 @@ function Bo(n) {
3158
3193
  disabled: r = !1,
3159
3194
  forwardedReference: l,
3160
3195
  invalid: s = !1,
3161
- placeholder: h,
3196
+ placeholder: u,
3162
3197
  style: f,
3163
3198
  value: d,
3164
3199
  ...c
3165
3200
  } = n, p = ge(s, t), v = s || he(t);
3166
- return /* @__PURE__ */ A(
3201
+ return /* @__PURE__ */ O(
3167
3202
  "span",
3168
3203
  {
3169
3204
  className: ["nk-select", o].filter(Boolean).join(" "),
@@ -3172,18 +3207,18 @@ function Bo(n) {
3172
3207
  "data-mode": "native",
3173
3208
  style: f,
3174
3209
  children: [
3175
- /* @__PURE__ */ A(
3210
+ /* @__PURE__ */ O(
3176
3211
  "select",
3177
3212
  {
3178
3213
  ...c,
3179
3214
  ref: l,
3180
3215
  "aria-invalid": p,
3181
3216
  className: "nk-select__control",
3182
- defaultValue: d === void 0 ? i ?? (h !== void 0 ? "" : void 0) : void 0,
3217
+ defaultValue: d === void 0 ? i ?? (u !== void 0 ? "" : void 0) : void 0,
3183
3218
  disabled: r,
3184
3219
  value: d,
3185
3220
  children: [
3186
- h !== void 0 ? /* @__PURE__ */ a("option", { disabled: !0, value: "", children: h }) : null,
3221
+ u !== void 0 ? /* @__PURE__ */ a("option", { disabled: !0, value: "", children: u }) : null,
3187
3222
  e
3188
3223
  ]
3189
3224
  }
@@ -3193,8 +3228,8 @@ function Bo(n) {
3193
3228
  }
3194
3229
  );
3195
3230
  }
3196
- function Ho(n, t, e) {
3197
- const [o, i] = Y(null);
3231
+ function qo(n, t, e) {
3232
+ const [o, i] = $(null);
3198
3233
  return q(() => {
3199
3234
  if (!n || !t) {
3200
3235
  i(null);
@@ -3206,19 +3241,19 @@ function Ho(n, t, e) {
3206
3241
  function s() {
3207
3242
  const d = t == null ? void 0 : t.getBoundingClientRect();
3208
3243
  if (!d) return;
3209
- const c = 8, p = 4, v = l.innerHeight - d.bottom - p - c, g = d.top - p - c, x = v < 160 && g > v, b = Math.max(
3244
+ const c = 8, p = 4, v = l.innerHeight - d.bottom - p - c, m = d.top - p - c, x = v < 160 && m > v, b = Math.max(
3210
3245
  72,
3211
- x ? g : v
3212
- ), w = e == null ? void 0 : e.getBoundingClientRect(), T = Math.max(
3246
+ x ? m : v
3247
+ ), w = e == null ? void 0 : e.getBoundingClientRect(), M = Math.max(
3213
3248
  d.width,
3214
3249
  (w == null ? void 0 : w.width) ?? d.width
3215
- ), L = Math.min(
3250
+ ), _ = Math.min(
3216
3251
  Math.max(c, d.left),
3217
3252
  Math.max(
3218
3253
  c,
3219
- l.innerWidth - c - T
3254
+ l.innerWidth - c - M
3220
3255
  )
3221
- ), V = x ? Math.max(
3256
+ ), R = x ? Math.max(
3222
3257
  c,
3223
3258
  d.top - p - Math.min(
3224
3259
  (w == null ? void 0 : w.height) ?? b,
@@ -3226,20 +3261,20 @@ function Ho(n, t, e) {
3226
3261
  )
3227
3262
  ) : d.bottom + p;
3228
3263
  i({
3229
- left: L,
3264
+ left: _,
3230
3265
  maxHeight: b,
3231
3266
  minWidth: d.width,
3232
- top: V
3267
+ top: R
3233
3268
  });
3234
3269
  }
3235
3270
  s(), l.addEventListener("resize", s), l.addEventListener("scroll", s, !0);
3236
- const h = l.ResizeObserver, f = h ? new h(s) : null;
3271
+ const u = l.ResizeObserver, f = u ? new u(s) : null;
3237
3272
  return f == null || f.observe(t), e && (f == null || f.observe(e)), () => {
3238
3273
  l.removeEventListener("resize", s), l.removeEventListener("scroll", s, !0), f == null || f.disconnect();
3239
3274
  };
3240
3275
  }, [n, e, t]), o;
3241
3276
  }
3242
- function Fo(n) {
3277
+ function $o(n) {
3243
3278
  const {
3244
3279
  active: t,
3245
3280
  closeOnEscape: e,
@@ -3248,37 +3283,37 @@ function Fo(n) {
3248
3283
  id: r,
3249
3284
  listboxReference: l,
3250
3285
  onEscapeDismiss: s,
3251
- onEscapeKeyDown: h,
3286
+ onEscapeKeyDown: u,
3252
3287
  onHighlight: f,
3253
3288
  onOutsideDismiss: d,
3254
3289
  onPointerDownOutside: c,
3255
3290
  onSelect: p,
3256
3291
  options: v,
3257
- ownerDocument: g,
3292
+ ownerDocument: m,
3258
3293
  position: x,
3259
3294
  selectedValue: b,
3260
3295
  state: w,
3261
- triggerReference: T
3262
- } = n, L = H(null), V = qe(!0, g), P = Le(
3263
- () => [T, L],
3264
- [T]
3265
- ), E = W(
3266
- (C) => {
3267
- L.current = C, l(C);
3296
+ triggerReference: M
3297
+ } = n, _ = D(null), R = Ke(!0, m), k = Me(
3298
+ () => [M, _],
3299
+ [M]
3300
+ ), C = W(
3301
+ (I) => {
3302
+ _.current = I, l(I);
3268
3303
  },
3269
3304
  [l]
3270
3305
  );
3271
- return $e({
3306
+ return Ue({
3272
3307
  active: t,
3273
- boundaries: P,
3308
+ boundaries: k,
3274
3309
  dismissOnEscape: e,
3275
3310
  dismissOnPointerDownOutside: o,
3276
- layerId: V.id,
3311
+ layerId: R.id,
3277
3312
  onEscapeDismiss: s,
3278
- onEscapeKeyDown: h,
3313
+ onEscapeKeyDown: u,
3279
3314
  onPointerDownOutside: c,
3280
3315
  onPointerDownOutsideDismiss: d,
3281
- ownerDocument: g
3316
+ ownerDocument: m
3282
3317
  }), /* @__PURE__ */ a(
3283
3318
  "div",
3284
3319
  {
@@ -3287,44 +3322,44 @@ function Fo(n) {
3287
3322
  className: "nk-select__listbox",
3288
3323
  "data-state": w,
3289
3324
  id: `${r}-listbox`,
3290
- ref: E,
3325
+ ref: C,
3291
3326
  role: "listbox",
3292
3327
  style: x ? {
3293
3328
  left: x.left,
3294
3329
  maxHeight: x.maxHeight,
3295
3330
  minWidth: x.minWidth,
3296
3331
  top: x.top,
3297
- zIndex: V.zIndex
3298
- } : { visibility: "hidden", zIndex: V.zIndex },
3299
- children: v.map((C, _) => /* @__PURE__ */ A(
3332
+ zIndex: R.zIndex
3333
+ } : { visibility: "hidden", zIndex: R.zIndex },
3334
+ children: v.map((I, N) => /* @__PURE__ */ O(
3300
3335
  "div",
3301
3336
  {
3302
- "aria-disabled": C.disabled || void 0,
3303
- "aria-selected": C.value === b,
3337
+ "aria-disabled": I.disabled || void 0,
3338
+ "aria-selected": I.value === b,
3304
3339
  className: "nk-select__option",
3305
- "data-highlighted": _ === i || void 0,
3306
- "data-selected": C.value === b || void 0,
3307
- id: `${r}-option-${_}`,
3308
- onPointerDown: (D) => {
3309
- D.preventDefault(), C.disabled || p(C);
3340
+ "data-highlighted": N === i || void 0,
3341
+ "data-selected": I.value === b || void 0,
3342
+ id: `${r}-option-${N}`,
3343
+ onPointerDown: (T) => {
3344
+ T.preventDefault(), I.disabled || p(I);
3310
3345
  },
3311
3346
  onPointerMove: () => {
3312
- C.disabled || f(_);
3347
+ I.disabled || f(N);
3313
3348
  },
3314
3349
  role: "option",
3315
3350
  children: [
3316
- C.icon ? /* @__PURE__ */ a(me, { type: C.icon }) : null,
3317
- /* @__PURE__ */ a("span", { className: "nk-select__option-label", children: C.label }),
3318
- C.value === b ? /* @__PURE__ */ a(me, { className: "nk-select__check", type: "checkmark" }) : null
3351
+ I.icon ? /* @__PURE__ */ a(me, { type: I.icon }) : null,
3352
+ /* @__PURE__ */ a("span", { className: "nk-select__option-label", children: I.label }),
3353
+ I.value === b ? /* @__PURE__ */ a(me, { className: "nk-select__check", type: "checkmark" }) : null
3319
3354
  ]
3320
3355
  },
3321
- C.value
3356
+ I.value
3322
3357
  ))
3323
3358
  }
3324
3359
  );
3325
3360
  }
3326
- function Wo(n) {
3327
- var ye;
3361
+ function Go(n) {
3362
+ var ke;
3328
3363
  const {
3329
3364
  "aria-invalid": t,
3330
3365
  className: e,
@@ -3333,235 +3368,235 @@ function Wo(n) {
3333
3368
  defaultValue: r = "",
3334
3369
  disabled: l = !1,
3335
3370
  displayOverride: s,
3336
- form: h,
3371
+ form: u,
3337
3372
  forwardedReference: f,
3338
3373
  id: d,
3339
3374
  invalid: c = !1,
3340
3375
  name: p,
3341
3376
  onChange: v,
3342
- onClick: g,
3377
+ onClick: m,
3343
3378
  onEscapeKeyDown: x,
3344
3379
  onKeyDown: b,
3345
3380
  onOpenChange: w,
3346
- onPointerDownOutside: T,
3347
- options: L,
3348
- placeholder: V,
3349
- portalContainer: P,
3350
- required: E = !1,
3351
- style: C,
3352
- value: _,
3353
- width: D,
3354
- ...Z
3381
+ onPointerDownOutside: M,
3382
+ options: _,
3383
+ placeholder: R,
3384
+ portalContainer: k,
3385
+ required: C = !1,
3386
+ style: I,
3387
+ value: N,
3388
+ width: T,
3389
+ ...z
3355
3390
  } = n;
3356
- Do(L);
3357
- const j = Me(), F = d ?? j, N = H(null), K = H(null), M = H(null), m = H(""), [k, R] = Y(null), [O, S] = Y(!1), [z, te] = Y(-1), [ee, Q] = Y(r), $ = _ !== void 0, de = $ ? _ : ee, pe = L.find(
3358
- (u) => u.value === de
3359
- ), we = c || he(t), Ee = ge(c, t), G = Ge(O), ne = (P == null ? void 0 : P.ownerDocument) ?? ((ye = N.current) == null ? void 0 : ye.ownerDocument) ?? (typeof document > "u" ? null : document), ae = Ho(
3391
+ zo(_);
3392
+ const Z = Le(), H = d ?? Z, E = D(null), U = D(null), S = D(null), y = D(""), [P, A] = $(null), [B, V] = $(!1), [j, te] = $(-1), [ee, X] = $(r), K = N !== void 0, ce = K ? N : ee, pe = _.find(
3393
+ (h) => h.value === ce
3394
+ ), be = c || he(t), Ee = ge(c, t), G = Ye(B), ne = (k == null ? void 0 : k.ownerDocument) ?? ((ke = E.current) == null ? void 0 : ke.ownerDocument) ?? (typeof document > "u" ? null : document), le = qo(
3360
3395
  G.present,
3361
- N.current,
3362
- k
3363
- ), oe = D === void 0 ? C : { ...C, width: D }, U = s ?? pe, ve = W(
3364
- (u) => {
3365
- Oo(
3366
- u,
3367
- N,
3396
+ E.current,
3397
+ P
3398
+ ), re = T === void 0 ? I : { ...I, width: T }, Y = s ?? pe, ve = W(
3399
+ (h) => {
3400
+ jo(
3401
+ h,
3402
+ E,
3368
3403
  f
3369
3404
  );
3370
3405
  },
3371
3406
  [f]
3372
- ), re = W((u) => {
3373
- O !== u && (S(u), w == null || w(u));
3374
- }, [w, O]), se = W((u = 1) => {
3375
- const I = L.findIndex(
3376
- (ie) => ie.value === de && !ie.disabled
3377
- ), X = u === 1 ? -1 : L.length;
3407
+ ), ie = W((h) => {
3408
+ B !== h && (V(h), w == null || w(h));
3409
+ }, [w, B]), se = W((h = 1) => {
3410
+ const L = _.findIndex(
3411
+ (oe) => oe.value === ce && !oe.disabled
3412
+ ), Q = h === 1 ? -1 : _.length;
3378
3413
  te(
3379
- I >= 0 ? I : en(L, X, u)
3380
- ), re(!0);
3381
- }, [L, de, re]), be = W((u) => {
3382
- var I;
3383
- u.disabled || ($ || Q(u.value), re(!1), (I = N.current) == null || I.focus(), v == null || v(u.value));
3384
- }, [$, v, re]), Ne = W(() => {
3385
- var u;
3386
- re(!1), (u = N.current) == null || u.focus();
3387
- }, [re]), _e = W(() => {
3388
- re(!1);
3389
- }, [re]);
3390
- function ue(u) {
3391
- g == null || g(u), !(u.defaultPrevented || l) && (O ? re(!1) : se());
3414
+ L >= 0 ? L : on(_, Q, h)
3415
+ ), ie(!0);
3416
+ }, [_, ce, ie]), ye = W((h) => {
3417
+ var L;
3418
+ h.disabled || (K || X(h.value), ie(!1), (L = E.current) == null || L.focus(), v == null || v(h.value));
3419
+ }, [K, v, ie]), Se = W(() => {
3420
+ var h;
3421
+ ie(!1), (h = E.current) == null || h.focus();
3422
+ }, [ie]), de = W(() => {
3423
+ ie(!1);
3424
+ }, [ie]);
3425
+ function Re(h) {
3426
+ m == null || m(h), !(h.defaultPrevented || l) && (B ? ie(!1) : se());
3392
3427
  }
3393
- function Re(u) {
3394
- if (b == null || b(u), !(u.defaultPrevented || l)) {
3395
- if (u.key === "ArrowDown" || u.key === "ArrowUp") {
3396
- u.preventDefault();
3397
- const I = u.key === "ArrowDown" ? 1 : -1;
3398
- O ? te(
3399
- (X) => en(L, X, I)
3400
- ) : se(I);
3428
+ function Te(h) {
3429
+ if (b == null || b(h), !(h.defaultPrevented || l)) {
3430
+ if (h.key === "ArrowDown" || h.key === "ArrowUp") {
3431
+ h.preventDefault();
3432
+ const L = h.key === "ArrowDown" ? 1 : -1;
3433
+ B ? te(
3434
+ (Q) => on(_, Q, L)
3435
+ ) : se(L);
3401
3436
  return;
3402
3437
  }
3403
- if (u.key === "Home" || u.key === "End") {
3404
- if (u.preventDefault(), !O) se(u.key === "Home" ? 1 : -1);
3438
+ if (h.key === "Home" || h.key === "End") {
3439
+ if (h.preventDefault(), !B) se(h.key === "Home" ? 1 : -1);
3405
3440
  else {
3406
- const I = u.key === "Home" ? 1 : -1, X = I === 1 ? -1 : L.length;
3441
+ const L = h.key === "Home" ? 1 : -1, Q = L === 1 ? -1 : _.length;
3407
3442
  te(
3408
- en(L, X, I)
3443
+ on(_, Q, L)
3409
3444
  );
3410
3445
  }
3411
3446
  return;
3412
3447
  }
3413
- if (u.key === "Enter" || u.key === " ") {
3414
- u.preventDefault();
3415
- const I = L[z];
3416
- O && I ? be(I) : O || se();
3448
+ if (h.key === "Enter" || h.key === " ") {
3449
+ h.preventDefault();
3450
+ const L = _[j];
3451
+ B && L ? ye(L) : B || se();
3417
3452
  return;
3418
3453
  }
3419
- if (u.key === "Tab") {
3420
- re(!1);
3454
+ if (h.key === "Tab") {
3455
+ ie(!1);
3421
3456
  return;
3422
3457
  }
3423
- if (u.key.length === 1 && !u.altKey && !u.ctrlKey && !u.metaKey) {
3424
- const I = u.currentTarget.ownerDocument.defaultView;
3425
- if (!I) return;
3426
- const X = u.key.toLocaleLowerCase(), ie = m.current + X, le = Array.from(ie).every((ke) => ke === X);
3427
- m.current = le ? X : ie, M.current !== null && I.clearTimeout(M.current), M.current = I.setTimeout(() => {
3428
- m.current = "", M.current = null;
3458
+ if (h.key.length === 1 && !h.altKey && !h.ctrlKey && !h.metaKey) {
3459
+ const L = h.currentTarget.ownerDocument.defaultView;
3460
+ if (!L) return;
3461
+ const Q = h.key.toLocaleLowerCase(), oe = y.current + Q, ae = Array.from(oe).every((Fe) => Fe === Q);
3462
+ y.current = ae ? Q : oe, S.current !== null && L.clearTimeout(S.current), S.current = L.setTimeout(() => {
3463
+ y.current = "", S.current = null;
3429
3464
  }, 500);
3430
- const ce = Ao(
3431
- L,
3432
- m.current,
3433
- z
3465
+ const ue = Wo(
3466
+ _,
3467
+ y.current,
3468
+ j
3434
3469
  );
3435
- ce >= 0 && (u.preventDefault(), O || re(!0), te(ce));
3470
+ ue >= 0 && (h.preventDefault(), B || ie(!0), te(ue));
3436
3471
  }
3437
3472
  }
3438
3473
  }
3439
3474
  return q(() => {
3440
- var u;
3441
- if (O && z >= 0) {
3442
- const I = ne == null ? void 0 : ne.getElementById(
3443
- `${F}-option-${z}`
3475
+ var h;
3476
+ if (B && j >= 0) {
3477
+ const L = ne == null ? void 0 : ne.getElementById(
3478
+ `${H}-option-${j}`
3444
3479
  );
3445
- I && (k != null && k.contains(I)) && ((u = I.scrollIntoView) == null || u.call(I, { block: "nearest" }));
3446
- }
3447
- }, [z, F, k, O]), q(() => {
3448
- var X;
3449
- const u = (X = N.current) == null ? void 0 : X.form;
3450
- if (!u) return;
3451
- function I() {
3452
- const ie = K.current, le = $ ? de : r;
3453
- if (ie) {
3454
- const ce = Array.from(ie.options), ke = ce.find(
3455
- (Se) => Se.value === le
3456
- ) ?? ce[0];
3457
- ce.forEach((Se) => {
3458
- Se.defaultSelected = Se === ke;
3480
+ L && (P != null && P.contains(L)) && ((h = L.scrollIntoView) == null || h.call(L, { block: "nearest" }));
3481
+ }
3482
+ }, [j, H, P, B]), q(() => {
3483
+ var Q;
3484
+ const h = (Q = E.current) == null ? void 0 : Q.form;
3485
+ if (!h) return;
3486
+ function L() {
3487
+ const oe = U.current, ae = K ? ce : r;
3488
+ if (oe) {
3489
+ const ue = Array.from(oe.options), Fe = ue.find(
3490
+ (we) => we.value === ae
3491
+ ) ?? ue[0];
3492
+ ue.forEach((we) => {
3493
+ we.defaultSelected = we === Fe;
3459
3494
  });
3460
3495
  }
3461
- $ || Q(r), re(!1);
3462
- }
3463
- return u.addEventListener("reset", I), () => u.removeEventListener("reset", I);
3464
- }, [r, h, $, de, re]), q(() => () => {
3465
- var I;
3466
- const u = (I = N.current) == null ? void 0 : I.ownerDocument.defaultView;
3467
- u && M.current !== null && u.clearTimeout(M.current);
3468
- }, []), /* @__PURE__ */ A(
3496
+ K || X(r), ie(!1);
3497
+ }
3498
+ return h.addEventListener("reset", L), () => h.removeEventListener("reset", L);
3499
+ }, [r, u, K, ce, ie]), q(() => () => {
3500
+ var L;
3501
+ const h = (L = E.current) == null ? void 0 : L.ownerDocument.defaultView;
3502
+ h && S.current !== null && h.clearTimeout(S.current);
3503
+ }, []), /* @__PURE__ */ O(
3469
3504
  "span",
3470
3505
  {
3471
3506
  className: ["nk-select", e].filter(Boolean).join(" "),
3472
3507
  "data-disabled": l || void 0,
3473
- "data-invalid": we || void 0,
3508
+ "data-invalid": be || void 0,
3474
3509
  "data-mode": "custom",
3475
- "data-open": O || void 0,
3476
- style: oe,
3510
+ "data-open": B || void 0,
3511
+ style: re,
3477
3512
  children: [
3478
- /* @__PURE__ */ A(
3513
+ /* @__PURE__ */ O(
3479
3514
  "button",
3480
3515
  {
3481
- ...Z,
3516
+ ...z,
3482
3517
  ref: ve,
3483
- "aria-activedescendant": O && z >= 0 ? `${F}-option-${z}` : void 0,
3484
- "aria-controls": `${F}-listbox`,
3485
- "aria-expanded": O,
3518
+ "aria-activedescendant": B && j >= 0 ? `${H}-option-${j}` : void 0,
3519
+ "aria-controls": `${H}-listbox`,
3520
+ "aria-expanded": B,
3486
3521
  "aria-haspopup": "listbox",
3487
3522
  "aria-invalid": Ee,
3488
- "aria-required": E || void 0,
3523
+ "aria-required": C || void 0,
3489
3524
  "aria-autocomplete": "none",
3490
3525
  className: "nk-select__trigger",
3491
3526
  disabled: l,
3492
- form: h,
3493
- id: F,
3494
- onClick: ue,
3495
- onKeyDown: Re,
3527
+ form: u,
3528
+ id: H,
3529
+ onClick: Re,
3530
+ onKeyDown: Te,
3496
3531
  role: "combobox",
3497
3532
  type: "button",
3498
3533
  children: [
3499
- U ? /* @__PURE__ */ A("span", { className: "nk-select__value", children: [
3500
- U.icon ? /* @__PURE__ */ a(me, { type: U.icon }) : null,
3501
- /* @__PURE__ */ a("span", { className: "nk-select__value-label", children: U.label })
3502
- ] }) : /* @__PURE__ */ a("span", { className: "nk-select__placeholder", children: V }),
3534
+ Y ? /* @__PURE__ */ O("span", { className: "nk-select__value", children: [
3535
+ Y.icon ? /* @__PURE__ */ a(me, { type: Y.icon }) : null,
3536
+ /* @__PURE__ */ a("span", { className: "nk-select__value-label", children: Y.label })
3537
+ ] }) : /* @__PURE__ */ a("span", { className: "nk-select__placeholder", children: R }),
3503
3538
  /* @__PURE__ */ a(me, { className: "nk-select__icon", type: "chevron-down" })
3504
3539
  ]
3505
3540
  }
3506
3541
  ),
3507
- p || E ? /* @__PURE__ */ A(
3542
+ p || C ? /* @__PURE__ */ O(
3508
3543
  "select",
3509
3544
  {
3510
- ref: K,
3545
+ ref: U,
3511
3546
  "aria-hidden": "true",
3512
3547
  className: "nk-select__form-control",
3513
3548
  disabled: l,
3514
- form: h,
3549
+ form: u,
3515
3550
  name: p,
3516
3551
  onChange: () => {
3517
3552
  },
3518
- onInvalid: (u) => {
3519
- var I;
3520
- u.preventDefault(), (I = N.current) == null || I.focus();
3553
+ onInvalid: (h) => {
3554
+ var L;
3555
+ h.preventDefault(), (L = E.current) == null || L.focus();
3521
3556
  },
3522
- required: E,
3557
+ required: C,
3523
3558
  tabIndex: -1,
3524
- value: de,
3559
+ value: ce,
3525
3560
  children: [
3526
3561
  /* @__PURE__ */ a("option", { value: "" }),
3527
- L.map((u) => /* @__PURE__ */ a(
3562
+ _.map((h) => /* @__PURE__ */ a(
3528
3563
  "option",
3529
3564
  {
3530
- disabled: u.disabled,
3531
- value: u.value,
3532
- children: u.label
3565
+ disabled: h.disabled,
3566
+ value: h.value,
3567
+ children: h.label
3533
3568
  },
3534
- u.value
3569
+ h.value
3535
3570
  ))
3536
3571
  ]
3537
3572
  }
3538
3573
  ) : null,
3539
3574
  G.present && ne ? /* @__PURE__ */ a(
3540
- je,
3575
+ Ge,
3541
3576
  {
3542
- container: P,
3543
- inheritFrom: N.current,
3577
+ container: k,
3578
+ inheritFrom: E.current,
3544
3579
  children: /* @__PURE__ */ a(
3545
- Fo,
3580
+ $o,
3546
3581
  {
3547
- active: O,
3582
+ active: B,
3548
3583
  closeOnEscape: o,
3549
3584
  closeOnOutsideInteraction: i,
3550
- highlightedIndex: z,
3551
- id: F,
3552
- listboxReference: R,
3553
- onEscapeDismiss: Ne,
3585
+ highlightedIndex: j,
3586
+ id: H,
3587
+ listboxReference: A,
3588
+ onEscapeDismiss: Se,
3554
3589
  onEscapeKeyDown: x,
3555
3590
  onHighlight: te,
3556
- onOutsideDismiss: _e,
3557
- onPointerDownOutside: T,
3558
- onSelect: be,
3559
- options: L,
3591
+ onOutsideDismiss: de,
3592
+ onPointerDownOutside: M,
3593
+ onSelect: ye,
3594
+ options: _,
3560
3595
  ownerDocument: ne,
3561
- position: ae,
3562
- selectedValue: de,
3596
+ position: le,
3597
+ selectedValue: ce,
3563
3598
  state: G.state === "closing" ? "closing" : "open",
3564
- triggerReference: N
3599
+ triggerReference: E
3565
3600
  }
3566
3601
  )
3567
3602
  }
@@ -3570,29 +3605,29 @@ function Wo(n) {
3570
3605
  }
3571
3606
  );
3572
3607
  }
3573
- const dr = y(function(t, e) {
3608
+ const Sr = g(function(t, e) {
3574
3609
  const { options: o } = t;
3575
3610
  return o !== void 0 ? /* @__PURE__ */ a(
3576
- Wo,
3611
+ Go,
3577
3612
  {
3578
3613
  ...t,
3579
3614
  forwardedReference: e
3580
3615
  }
3581
3616
  ) : /* @__PURE__ */ a(
3582
- Bo,
3617
+ Zo,
3583
3618
  {
3584
3619
  ...t,
3585
3620
  forwardedReference: e
3586
3621
  }
3587
3622
  );
3588
- }), ur = y(function(t, e) {
3623
+ }), Rr = g(function(t, e) {
3589
3624
  const {
3590
3625
  "aria-hidden": o = !0,
3591
3626
  className: i,
3592
3627
  height: r = "1em",
3593
3628
  shape: l = "rectangle",
3594
3629
  style: s,
3595
- width: h = l === "circle" ? "1em" : "100%",
3630
+ width: u = l === "circle" ? "1em" : "100%",
3596
3631
  ...f
3597
3632
  } = t;
3598
3633
  return /* @__PURE__ */ a(
@@ -3603,10 +3638,10 @@ const dr = y(function(t, e) {
3603
3638
  "aria-hidden": o,
3604
3639
  className: ["nk-skeleton", i].filter(Boolean).join(" "),
3605
3640
  "data-shape": l,
3606
- style: { ...s, width: h, height: r }
3641
+ style: { ...s, width: u, height: r }
3607
3642
  }
3608
3643
  );
3609
- }), fr = y(function(t, e) {
3644
+ }), Tr = g(function(t, e) {
3610
3645
  const {
3611
3646
  "aria-invalid": o,
3612
3647
  className: i,
@@ -3614,7 +3649,7 @@ const dr = y(function(t, e) {
3614
3649
  style: l,
3615
3650
  ...s
3616
3651
  } = t;
3617
- return /* @__PURE__ */ A(
3652
+ return /* @__PURE__ */ O(
3618
3653
  "span",
3619
3654
  {
3620
3655
  className: ["nk-switch", i].filter(Boolean).join(" "),
@@ -3638,69 +3673,32 @@ const dr = y(function(t, e) {
3638
3673
  ]
3639
3674
  }
3640
3675
  );
3641
- });
3642
- function bn(n) {
3643
- return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : 1;
3644
- }
3645
- const hr = y(
3646
- function(t, e) {
3647
- const {
3648
- "aria-invalid": o,
3649
- className: i,
3650
- disabled: r = !1,
3651
- invalid: l = !1,
3652
- minRows: s,
3653
- readOnly: h = !1,
3654
- resize: f = "vertical",
3655
- rows: d,
3656
- style: c,
3657
- ...p
3658
- } = t, v = bn(d ?? s ?? 3), x = `calc(${bn(s ?? d ?? 3) * 1.25}em + var(--nk-text-area-padding) * 2 + var(--nk-text-area-border-width) * 2)`, b = {
3659
- ...c,
3660
- "--nk-text-area-min-height": x
3661
- };
3662
- return /* @__PURE__ */ a(
3663
- "textarea",
3664
- {
3665
- ...p,
3666
- ref: e,
3667
- "aria-invalid": ge(l, o),
3668
- className: ["nk-text-area", i].filter(Boolean).join(" "),
3669
- "data-invalid": l || he(o) || void 0,
3670
- "data-resize": f,
3671
- disabled: r,
3672
- readOnly: h,
3673
- rows: v,
3674
- style: b
3675
- }
3676
- );
3677
- }
3678
- ), zo = 500, An = Ze(null);
3679
- function pr(n) {
3680
- const { children: t, delay: e = zo } = n, o = Le(() => ({
3676
+ }), Ko = 500, On = qe(null);
3677
+ function Vr(n) {
3678
+ const { children: t, delay: e = Ko } = n, o = Me(() => ({
3681
3679
  delay: e
3682
3680
  }), [e]);
3683
- return /* @__PURE__ */ a(An.Provider, { value: o, children: t });
3681
+ return /* @__PURE__ */ a(On.Provider, { value: o, children: t });
3684
3682
  }
3685
- const Dn = 500, yn = 100;
3686
- function Zo(n, t, e, o) {
3687
- t.current = n, Fe(e, n), Fe(o, n);
3683
+ const Bn = 500, kn = 100;
3684
+ function Uo(n, t, e, o) {
3685
+ t.current = n, De(e, n), De(o, n);
3688
3686
  }
3689
- function jo(n) {
3690
- return Number.isFinite(n) ? Math.max(0, n) : Dn;
3687
+ function Yo(n) {
3688
+ return Number.isFinite(n) ? Math.max(0, n) : Bn;
3691
3689
  }
3692
- function qo(n, t) {
3690
+ function Xo(n, t) {
3693
3691
  const e = (n == null ? void 0 : n.split(/\s+/).filter(Boolean)) ?? [];
3694
3692
  return e.includes(t) || e.push(t), e.join(" ");
3695
3693
  }
3696
- const vr = y(function(t, e) {
3694
+ const Qo = g(function(t, e) {
3697
3695
  const {
3698
3696
  children: o,
3699
3697
  className: i,
3700
3698
  content: r,
3701
3699
  contentClassName: l,
3702
3700
  contentStyle: s,
3703
- delay: h,
3701
+ delay: u,
3704
3702
  disabled: f = !1,
3705
3703
  onOpenChange: d,
3706
3704
  placement: c = "top",
@@ -3709,176 +3707,180 @@ const vr = y(function(t, e) {
3709
3707
  } = t;
3710
3708
  if (r == null || typeof r == "boolean" || typeof r == "string" && !r.trim())
3711
3709
  throw new Error("Tooltip content must not be empty");
3712
- if (o.type === ze)
3710
+ if (o.type === _e)
3713
3711
  throw new Error("Tooltip requires a single non-Fragment trigger");
3714
- const x = `${Me()}-tooltip`, b = Pe(An), w = o.props, T = Rn(o), L = H(null), V = H(null), P = H(f), E = H(!1), C = H(null), _ = H(null), D = H(null), Z = H(!1), j = H(!1), F = H(!1), N = H(!1), [K, M] = Y(null), [m, k] = Y(null), [R, O] = Y(!1);
3715
- P.current = f;
3716
- const S = jo(
3717
- h ?? (b == null ? void 0 : b.delay) ?? Dn
3718
- ), z = Ge(R), te = (p == null ? void 0 : p.ownerDocument) ?? (K == null ? void 0 : K.ownerDocument) ?? (typeof document > "u" ? null : document), ee = qe(z.present, te), Q = Sn(
3719
- z.present,
3712
+ const x = `${Le()}-tooltip`, b = Ne(On), w = o.props, M = Rn(o), _ = D(null), R = D(null), k = D(f), C = D(!1), I = D(null), N = D(null), T = D(null), z = D(!1), Z = D(!1), H = D(!1), E = D(!1), [U, S] = $(null), [y, P] = $(null), [A, B] = $(!1);
3713
+ k.current = f;
3714
+ const V = Yo(
3715
+ u ?? (b == null ? void 0 : b.delay) ?? Bn
3716
+ ), j = Ye(A), te = (p == null ? void 0 : p.ownerDocument) ?? (U == null ? void 0 : U.ownerDocument) ?? (typeof document > "u" ? null : document), ee = Ke(j.present, te), X = Tn(
3717
+ j.present,
3720
3718
  c,
3721
- K,
3722
- m
3723
- ), $ = Le(
3724
- () => [L, V],
3719
+ U,
3720
+ y
3721
+ ), K = Me(
3722
+ () => [_, R],
3725
3723
  []
3726
- ), de = qo(
3724
+ ), ce = Xo(
3727
3725
  w["aria-describedby"],
3728
3726
  x
3729
- ), pe = R && z.present ? de : w["aria-describedby"], we = W(
3730
- (u) => {
3731
- Zo(
3732
- u,
3733
- L,
3734
- T,
3727
+ ), pe = A && j.present ? ce : w["aria-describedby"], be = W(
3728
+ (h) => {
3729
+ Uo(
3730
+ h,
3731
+ _,
3732
+ M,
3735
3733
  e
3736
- ), M(u);
3734
+ ), S(h);
3737
3735
  },
3738
- [e, T]
3736
+ [e, M]
3739
3737
  ), Ee = W(
3740
- (u) => {
3741
- V.current = u, u || (N.current = !1), k(u);
3738
+ (h) => {
3739
+ R.current = h, h || (E.current = !1), P(h);
3742
3740
  },
3743
3741
  []
3744
3742
  ), G = W(() => {
3745
- const u = C.current;
3746
- u && u.ownerWindow.clearTimeout(u.timerId), C.current = null;
3743
+ const h = I.current;
3744
+ h && h.ownerWindow.clearTimeout(h.timerId), I.current = null;
3747
3745
  }, []), ne = W(() => {
3748
- const u = _.current;
3749
- u && u.ownerWindow.clearTimeout(u.timerId), _.current = null;
3750
- }, []), ae = W(() => {
3751
- const u = D.current;
3752
- u && u.ownerWindow.clearTimeout(u.timerId), D.current = null;
3753
- }, []), oe = W((u) => {
3754
- E.current !== u && (u || (N.current = !1), E.current = u, O(u), d == null || d(u));
3755
- }, [d]), U = W((u) => {
3756
- var ie, le;
3757
- if (ne(), j.current || F.current || N.current)
3746
+ const h = N.current;
3747
+ h && h.ownerWindow.clearTimeout(h.timerId), N.current = null;
3748
+ }, []), le = W(() => {
3749
+ const h = T.current;
3750
+ h && h.ownerWindow.clearTimeout(h.timerId), T.current = null;
3751
+ }, []), re = W((h) => {
3752
+ C.current !== h && (h || (E.current = !1), C.current = h, B(h), d == null || d(h));
3753
+ }, [d]), Y = W((h) => {
3754
+ var oe, ae;
3755
+ if (ne(), Z.current || H.current || E.current)
3758
3756
  return;
3759
- if (u === 0) {
3760
- oe(!1);
3757
+ if (h === 0) {
3758
+ re(!1);
3761
3759
  return;
3762
3760
  }
3763
- const I = ((ie = L.current) == null ? void 0 : ie.ownerDocument.defaultView) ?? ((le = V.current) == null ? void 0 : le.ownerDocument.defaultView);
3764
- if (!I) {
3765
- oe(!1);
3761
+ const L = ((oe = _.current) == null ? void 0 : oe.ownerDocument.defaultView) ?? ((ae = R.current) == null ? void 0 : ae.ownerDocument.defaultView);
3762
+ if (!L) {
3763
+ re(!1);
3766
3764
  return;
3767
3765
  }
3768
- const X = I.setTimeout(() => {
3769
- _.current = null, !j.current && !F.current && !N.current && oe(!1);
3770
- }, u);
3771
- _.current = {
3772
- ownerWindow: I,
3773
- timerId: X
3766
+ const Q = L.setTimeout(() => {
3767
+ N.current = null, !Z.current && !H.current && !E.current && re(!1);
3768
+ }, h);
3769
+ N.current = {
3770
+ ownerWindow: L,
3771
+ timerId: Q
3774
3772
  };
3775
- }, [ne, oe]), ve = W(() => {
3776
- var X;
3777
- if (G(), ne(), S === 0) {
3778
- oe(!0);
3773
+ }, [ne, re]), ve = W(() => {
3774
+ var Q;
3775
+ if (G(), ne(), V === 0) {
3776
+ re(!0);
3779
3777
  return;
3780
3778
  }
3781
- const u = (X = L.current) == null ? void 0 : X.ownerDocument.defaultView;
3782
- if (!u) return;
3783
- const I = u.setTimeout(() => {
3784
- C.current = null, P.current || oe(!0);
3785
- }, S);
3786
- C.current = { ownerWindow: u, timerId: I };
3787
- }, [ne, G, S, oe]);
3788
- function re(u) {
3789
- var I;
3790
- (I = w.onFocus) == null || I.call(w, u), j.current = !0, ne(), !Z.current && (G(), oe(!0));
3779
+ const h = (Q = _.current) == null ? void 0 : Q.ownerDocument.defaultView;
3780
+ if (!h) return;
3781
+ const L = h.setTimeout(() => {
3782
+ I.current = null, k.current || re(!0);
3783
+ }, V);
3784
+ I.current = { ownerWindow: h, timerId: L };
3785
+ }, [ne, G, V, re]);
3786
+ function ie(h) {
3787
+ var L;
3788
+ if ((L = w.onFocus) == null || L.call(w, h), Z.current = !0, ne(), z.current || co(h.currentTarget)) {
3789
+ G();
3790
+ return;
3791
+ }
3792
+ G(), re(!0);
3791
3793
  }
3792
- function se(u) {
3793
- var I;
3794
- (I = w.onBlur) == null || I.call(w, u), !u.currentTarget.contains(u.relatedTarget) && (j.current = !1, G(), U(0));
3794
+ function se(h) {
3795
+ var L;
3796
+ (L = w.onBlur) == null || L.call(w, h), !h.currentTarget.contains(h.relatedTarget) && (Z.current = !1, G(), Y(0));
3795
3797
  }
3796
- function be(u) {
3797
- var I;
3798
- (I = w.onMouseEnter) == null || I.call(w, u), F.current = !0, ve();
3798
+ function ye(h) {
3799
+ var L;
3800
+ (L = w.onMouseEnter) == null || L.call(w, h), H.current = !0, ve();
3799
3801
  }
3800
- function Ne(u) {
3801
- var I;
3802
- (I = w.onMouseLeave) == null || I.call(w, u), F.current = !1, G(), U(yn);
3802
+ function Se(h) {
3803
+ var L;
3804
+ (L = w.onMouseLeave) == null || L.call(w, h), H.current = !1, G(), Y(kn);
3803
3805
  }
3804
- function _e() {
3805
- N.current = !0, ne();
3806
+ function de() {
3807
+ E.current = !0, ne();
3806
3808
  }
3807
- function ue() {
3808
- N.current = !1, U(yn);
3809
+ function Re() {
3810
+ E.current = !1, Y(kn);
3809
3811
  }
3810
- function Re(u) {
3811
- var ie, le;
3812
- (ie = w.onPointerDown) == null || ie.call(w, u), G(), ne(), oe(!1);
3813
- const I = (le = L.current) == null ? void 0 : le.ownerDocument.defaultView;
3814
- if (!I) return;
3815
- Z.current = !0, ae();
3816
- const X = I.setTimeout(() => {
3817
- Z.current = !1, D.current = null;
3812
+ function Te(h) {
3813
+ var oe, ae;
3814
+ (oe = w.onPointerDown) == null || oe.call(w, h), G(), ne(), re(!1);
3815
+ const L = (ae = _.current) == null ? void 0 : ae.ownerDocument.defaultView;
3816
+ if (!L) return;
3817
+ z.current = !0, le();
3818
+ const Q = L.setTimeout(() => {
3819
+ z.current = !1, T.current = null;
3818
3820
  }, 0);
3819
- D.current = { ownerWindow: I, timerId: X };
3821
+ T.current = { ownerWindow: L, timerId: Q };
3820
3822
  }
3821
- if ($e({
3822
- active: R,
3823
- boundaries: $,
3823
+ if (Ue({
3824
+ active: A,
3825
+ boundaries: K,
3824
3826
  dismissOnPointerDownOutside: !0,
3825
3827
  layerId: ee.id,
3826
- onEscapeDismiss: () => oe(!1),
3827
- onPointerDownOutsideDismiss: () => oe(!1),
3828
+ onEscapeDismiss: () => re(!1),
3829
+ onPointerDownOutsideDismiss: () => re(!1),
3828
3830
  ownerDocument: te
3829
3831
  }), q(() => {
3830
- f && (G(), ne(), ae(), Z.current = !1, j.current = !1, F.current = !1, N.current = !1, E.current && oe(!1));
3832
+ f && (G(), ne(), le(), z.current = !1, Z.current = !1, H.current = !1, E.current = !1, C.current && re(!1));
3831
3833
  }, [
3832
3834
  ne,
3833
3835
  G,
3834
- ae,
3836
+ le,
3835
3837
  f,
3836
- oe
3838
+ re
3837
3839
  ]), q(() => () => {
3838
- G(), ne(), ae();
3839
- }, [ne, G, ae]), f)
3840
- return He(
3840
+ G(), ne(), le();
3841
+ }, [ne, G, le]), f)
3842
+ return Pe(
3841
3843
  o,
3842
- { ref: we }
3844
+ { ref: be }
3843
3845
  );
3844
- const ye = He(
3846
+ const ke = Pe(
3845
3847
  o,
3846
3848
  {
3847
3849
  "aria-describedby": pe,
3848
3850
  className: [w.className, "nk-tooltip__trigger", i].filter(Boolean).join(" "),
3849
3851
  onBlur: se,
3850
- onFocus: re,
3851
- onMouseEnter: be,
3852
- onMouseLeave: Ne,
3853
- onPointerDown: Re,
3854
- ref: we,
3852
+ onFocus: ie,
3853
+ onMouseEnter: ye,
3854
+ onMouseLeave: Se,
3855
+ onPointerDown: Te,
3856
+ ref: be,
3855
3857
  style: { ...w.style, ...v }
3856
3858
  }
3857
3859
  );
3858
- return /* @__PURE__ */ A(We, { children: [
3859
- ye,
3860
- z.present && te ? /* @__PURE__ */ a(
3861
- je,
3860
+ return /* @__PURE__ */ O(je, { children: [
3861
+ ke,
3862
+ j.present && te ? /* @__PURE__ */ a(
3863
+ Ge,
3862
3864
  {
3863
3865
  container: p,
3864
- inheritFrom: K,
3865
- children: /* @__PURE__ */ A(
3866
- Oe,
3866
+ inheritFrom: U,
3867
+ children: /* @__PURE__ */ O(
3868
+ He,
3867
3869
  {
3868
3870
  ref: Ee,
3869
- "aria-hidden": R ? void 0 : !0,
3871
+ "aria-hidden": A ? void 0 : !0,
3870
3872
  className: ["nk-tooltip", l].filter(Boolean).join(" "),
3871
- "data-placement": (Q == null ? void 0 : Q.placement) ?? c,
3872
- "data-state": z.state === "closing" ? "closing" : "open",
3873
+ "data-placement": (X == null ? void 0 : X.placement) ?? c,
3874
+ "data-state": j.state === "closing" ? "closing" : "open",
3873
3875
  id: x,
3874
- onMouseEnter: _e,
3875
- onMouseLeave: ue,
3876
+ onMouseEnter: de,
3877
+ onMouseLeave: Re,
3876
3878
  role: "tooltip",
3877
- style: Q ? {
3879
+ style: X ? {
3878
3880
  ...s,
3879
- "--nk-tooltip-arrow-offset": `${Q.arrowOffset}px`,
3880
- left: Q.left,
3881
- top: Q.top,
3881
+ "--nk-tooltip-arrow-offset": `${X.arrowOffset}px`,
3882
+ left: X.left,
3883
+ top: X.top,
3882
3884
  zIndex: ee.zIndex
3883
3885
  } : {
3884
3886
  ...s,
@@ -3894,35 +3896,466 @@ const vr = y(function(t, e) {
3894
3896
  }
3895
3897
  ) : null
3896
3898
  ] });
3899
+ }), Jo = [
3900
+ "a[href]",
3901
+ "audio[controls]",
3902
+ "button",
3903
+ "iframe",
3904
+ "input",
3905
+ "label",
3906
+ "select",
3907
+ "summary",
3908
+ "textarea",
3909
+ "video[controls]",
3910
+ "[contenteditable]:not([contenteditable='false'])"
3911
+ ].join(","), er = /* @__PURE__ */ new Set([
3912
+ "button",
3913
+ "checkbox",
3914
+ "combobox",
3915
+ "grid",
3916
+ "link",
3917
+ "listbox",
3918
+ "menu",
3919
+ "menubar",
3920
+ "menuitem",
3921
+ "menuitemcheckbox",
3922
+ "menuitemradio",
3923
+ "option",
3924
+ "radio",
3925
+ "radiogroup",
3926
+ "scrollbar",
3927
+ "searchbox",
3928
+ "slider",
3929
+ "spinbutton",
3930
+ "switch",
3931
+ "tab",
3932
+ "tablist",
3933
+ "textbox",
3934
+ "tree",
3935
+ "treegrid",
3936
+ "treeitem"
3937
+ ]);
3938
+ function nr(n, t) {
3939
+ var o;
3940
+ let e = n;
3941
+ for (; e && e !== t; ) {
3942
+ if (e.matches(Jo) || (((o = e.getAttribute("role")) == null ? void 0 : o.split(/\s+/)) ?? []).some((r) => er.has(r)))
3943
+ return !0;
3944
+ e = e.parentElement;
3945
+ }
3946
+ return !1;
3947
+ }
3948
+ function tr(n, t, e) {
3949
+ return n === void 0 ? t : e ? e(n) : n instanceof Date ? Number.isNaN(n.getTime()) ? "Invalid Date" : n.toISOString().slice(0, 10) : typeof n == "boolean" ? n ? "Yes" : "No" : n;
3950
+ }
3951
+ function or(n) {
3952
+ if (typeof n == "number" || typeof n == "string")
3953
+ return String(n);
3954
+ }
3955
+ function Dn(n) {
3956
+ for (const t of ln.toArray(n)) {
3957
+ if (Ze(t) && t.type === _e) {
3958
+ if (Dn(t.props.children)) return !0;
3959
+ continue;
3960
+ }
3961
+ return !0;
3962
+ }
3963
+ return !1;
3964
+ }
3965
+ function rr(n, t) {
3966
+ let e = !1;
3967
+ function o(r) {
3968
+ return ln.map(r, (l) => Ze(l) ? l.type === _e ? Pe(
3969
+ l,
3970
+ void 0,
3971
+ o(
3972
+ l.props.children
3973
+ )
3974
+ ) : !e && l.type === Fn ? (e = !0, Pe(
3975
+ l,
3976
+ { rowTrigger: t }
3977
+ )) : l : l);
3978
+ }
3979
+ const i = o(n);
3980
+ return { attached: e, content: i };
3981
+ }
3982
+ const ir = g(
3983
+ function(t, e) {
3984
+ const { children: o, className: i, ...r } = t;
3985
+ return /* @__PURE__ */ a(
3986
+ "thead",
3987
+ {
3988
+ ...r,
3989
+ ref: e,
3990
+ className: ["nk-table__head", i].filter(Boolean).join(" "),
3991
+ children: o
3992
+ }
3993
+ );
3994
+ }
3995
+ ), ar = g(
3996
+ function(t, e) {
3997
+ const {
3998
+ children: o,
3999
+ className: i,
4000
+ emptyColumnCount: r = 1,
4001
+ emptyMessage: l,
4002
+ ...s
4003
+ } = t, u = !Dn(o), f = Number.isFinite(r) ? Math.max(1, Math.floor(r)) : 1;
4004
+ return /* @__PURE__ */ a(
4005
+ "tbody",
4006
+ {
4007
+ ...s,
4008
+ ref: e,
4009
+ className: ["nk-table__body", i].filter(Boolean).join(" "),
4010
+ children: u && l !== void 0 ? /* @__PURE__ */ a("tr", { className: "nk-table__row", children: /* @__PURE__ */ a(
4011
+ "td",
4012
+ {
4013
+ className: "nk-table__cell nk-table__empty-cell",
4014
+ colSpan: f,
4015
+ children: /* @__PURE__ */ a("div", { className: "nk-table__empty-content", children: l })
4016
+ }
4017
+ ) }) : o
4018
+ }
4019
+ );
4020
+ }
4021
+ ), lr = g(
4022
+ function(t, e) {
4023
+ const { children: o, className: i, ...r } = t;
4024
+ return /* @__PURE__ */ a(
4025
+ "tfoot",
4026
+ {
4027
+ ...r,
4028
+ ref: e,
4029
+ className: ["nk-table__foot", i].filter(Boolean).join(" "),
4030
+ children: o
4031
+ }
4032
+ );
4033
+ }
4034
+ ), sr = g(
4035
+ function(t, e) {
4036
+ const {
4037
+ children: o,
4038
+ className: i,
4039
+ download: r,
4040
+ href: l,
4041
+ hrefLang: s,
4042
+ label: u,
4043
+ onClick: f,
4044
+ onNavigate: d,
4045
+ rel: c,
4046
+ target: p,
4047
+ ...v
4048
+ } = t, m = D(null), x = l !== void 0 || f !== void 0, b = (u == null ? void 0 : u.trim()) || (l !== void 0 ? "Open row" : "Activate row");
4049
+ function w(k) {
4050
+ m.current = k;
4051
+ }
4052
+ const M = l !== void 0 ? {
4053
+ kind: "link",
4054
+ label: b,
4055
+ linkProperties: {
4056
+ download: r,
4057
+ href: l,
4058
+ hrefLang: s,
4059
+ onNavigate: d,
4060
+ rel: c,
4061
+ target: p
4062
+ },
4063
+ reference: w
4064
+ } : f !== void 0 ? {
4065
+ kind: "button",
4066
+ label: b,
4067
+ onClick: f,
4068
+ reference: w
4069
+ } : void 0, _ = M ? rr(o, M) : { content: o };
4070
+ function R(k) {
4071
+ if (k.defaultPrevented) return;
4072
+ const C = k.target;
4073
+ if (!(C instanceof Element) || nr(C, k.currentTarget)) return;
4074
+ const I = m.current;
4075
+ if (!I) return;
4076
+ const N = I.ownerDocument.defaultView;
4077
+ if (!N) {
4078
+ I.click();
4079
+ return;
4080
+ }
4081
+ I.dispatchEvent(new N.MouseEvent("click", {
4082
+ altKey: k.altKey,
4083
+ bubbles: !0,
4084
+ button: k.button,
4085
+ buttons: k.buttons,
4086
+ cancelable: !0,
4087
+ clientX: k.clientX,
4088
+ clientY: k.clientY,
4089
+ ctrlKey: k.ctrlKey,
4090
+ metaKey: k.metaKey,
4091
+ shiftKey: k.shiftKey
4092
+ }));
4093
+ }
4094
+ return /* @__PURE__ */ a(
4095
+ "tr",
4096
+ {
4097
+ ...v,
4098
+ ref: e,
4099
+ className: ["nk-table__row", i].filter(Boolean).join(" "),
4100
+ "data-interactive": x || void 0,
4101
+ onClick: x ? R : void 0,
4102
+ children: _.content
4103
+ }
4104
+ );
4105
+ }
4106
+ ), Hn = g(function(t, e) {
4107
+ const {
4108
+ align: o = "left",
4109
+ children: i,
4110
+ className: r,
4111
+ scope: l = "col",
4112
+ sticky: s = !1,
4113
+ ...u
4114
+ } = t;
4115
+ return /* @__PURE__ */ a(
4116
+ "th",
4117
+ {
4118
+ ...u,
4119
+ ref: e,
4120
+ className: ["nk-table__header-cell", r].filter(Boolean).join(" "),
4121
+ "data-align": o,
4122
+ "data-sticky": s || void 0,
4123
+ scope: l,
4124
+ children: i
4125
+ }
4126
+ );
4127
+ }), cr = g(function(t, e) {
4128
+ const { children: o, className: i, ...r } = t;
4129
+ return /* @__PURE__ */ a(
4130
+ Hn,
4131
+ {
4132
+ ...r,
4133
+ ref: e,
4134
+ align: "right",
4135
+ className: ["nk-table__action-header-cell", i].filter(Boolean).join(" "),
4136
+ children: o ?? /* @__PURE__ */ a("span", { className: "nk-table__visually-hidden", children: "Row actions" })
4137
+ }
4138
+ );
4139
+ }), Fn = g(
4140
+ function(t, e) {
4141
+ const {
4142
+ align: o = "left",
4143
+ children: i,
4144
+ className: r,
4145
+ format: l,
4146
+ title: s,
4147
+ truncate: u,
4148
+ value: f,
4149
+ ...d
4150
+ } = t, { rowTrigger: c, ...p } = d, v = tr(f, i, l), m = u === void 0 ? void 0 : { maxWidth: u }, x = s ?? (u === void 0 ? void 0 : or(v));
4151
+ return /* @__PURE__ */ O(
4152
+ "td",
4153
+ {
4154
+ ...p,
4155
+ ref: e,
4156
+ className: ["nk-table__cell", r].filter(Boolean).join(" "),
4157
+ "data-align": o,
4158
+ title: x,
4159
+ children: [
4160
+ (c == null ? void 0 : c.kind) === "link" && c.linkProperties ? /* @__PURE__ */ a(
4161
+ "a",
4162
+ {
4163
+ ref: c.reference,
4164
+ "aria-label": c.label,
4165
+ className: "nk-table__row-trigger",
4166
+ download: c.linkProperties.download,
4167
+ href: c.linkProperties.href,
4168
+ hrefLang: c.linkProperties.hrefLang,
4169
+ onClick: c.linkProperties.onNavigate,
4170
+ rel: c.linkProperties.rel,
4171
+ target: c.linkProperties.target
4172
+ }
4173
+ ) : null,
4174
+ (c == null ? void 0 : c.kind) === "button" ? /* @__PURE__ */ a(
4175
+ "button",
4176
+ {
4177
+ ref: c.reference,
4178
+ "aria-label": c.label,
4179
+ className: "nk-table__row-trigger",
4180
+ onClick: c.onClick,
4181
+ type: "button"
4182
+ }
4183
+ ) : null,
4184
+ u !== void 0 ? /* @__PURE__ */ a("span", { className: "nk-table__truncated-content", style: m, children: v }) : v
4185
+ ]
4186
+ }
4187
+ );
4188
+ }
4189
+ ), dr = g(
4190
+ function(t, e) {
4191
+ const {
4192
+ "aria-label": o,
4193
+ icon: i,
4194
+ label: r,
4195
+ ...l
4196
+ } = t;
4197
+ return /* @__PURE__ */ a(Qo, { content: r, children: /* @__PURE__ */ a(
4198
+ ze,
4199
+ {
4200
+ ...l,
4201
+ ref: e,
4202
+ "aria-label": o ?? r,
4203
+ className: "nk-table__action",
4204
+ icon: i,
4205
+ shape: "rectangle",
4206
+ type: "button",
4207
+ variant: "ghost"
4208
+ }
4209
+ ) });
4210
+ }
4211
+ ), ur = g(function(t, e) {
4212
+ const { children: o, className: i, onClick: r, ...l } = t;
4213
+ function s(u) {
4214
+ u.stopPropagation(), r == null || r(u);
4215
+ }
4216
+ return /* @__PURE__ */ a(
4217
+ "td",
4218
+ {
4219
+ ...l,
4220
+ ref: e,
4221
+ className: ["nk-table__cell", "nk-table__action-cell", i].filter(Boolean).join(" "),
4222
+ "data-align": "right",
4223
+ onClick: s,
4224
+ children: /* @__PURE__ */ a("span", { className: "nk-table__action-list", children: o })
4225
+ }
4226
+ );
4227
+ }), fr = g(function(t, e) {
4228
+ const {
4229
+ "aria-label": o,
4230
+ children: i,
4231
+ className: r,
4232
+ containerClassName: l,
4233
+ scrollContainerLabel: s,
4234
+ ...u
4235
+ } = t, f = D(null), d = D(null), [c, p] = $(!1), [v, m] = $(!1), x = s ?? (o ? `${o} scroll area` : "Scrollable table"), b = W(
4236
+ (M) => {
4237
+ d.current = M, De(e, M);
4238
+ },
4239
+ [e]
4240
+ );
4241
+ q(() => {
4242
+ const M = f.current, _ = d.current;
4243
+ if (!M || !_) return;
4244
+ const R = M, k = _;
4245
+ function C() {
4246
+ const z = R.scrollWidth > R.clientWidth;
4247
+ p(z), z || m(!1);
4248
+ }
4249
+ C();
4250
+ const I = R.ownerDocument.defaultView;
4251
+ I == null || I.addEventListener("resize", C);
4252
+ const N = I == null ? void 0 : I.ResizeObserver, T = N ? new N(C) : void 0;
4253
+ return T == null || T.observe(R), T == null || T.observe(k), () => {
4254
+ I == null || I.removeEventListener("resize", C), T == null || T.disconnect();
4255
+ };
4256
+ }, []);
4257
+ function w(M) {
4258
+ m(c && M.currentTarget.scrollLeft > 1);
4259
+ }
4260
+ return /* @__PURE__ */ a(
4261
+ "div",
4262
+ {
4263
+ ref: f,
4264
+ "aria-label": c ? x : void 0,
4265
+ className: ["nk-table__container", l].filter(Boolean).join(" "),
4266
+ "data-scrolled": v || void 0,
4267
+ onScroll: w,
4268
+ role: c ? "region" : void 0,
4269
+ tabIndex: c ? 0 : void 0,
4270
+ children: /* @__PURE__ */ a(
4271
+ "table",
4272
+ {
4273
+ ...u,
4274
+ ref: b,
4275
+ "aria-label": o,
4276
+ className: ["nk-table", r].filter(Boolean).join(" "),
4277
+ children: i
4278
+ }
4279
+ )
4280
+ }
4281
+ );
4282
+ }), Ar = Object.assign(fr, {
4283
+ Action: dr,
4284
+ ActionCell: ur,
4285
+ ActionHeaderCell: cr,
4286
+ Body: ar,
4287
+ Cell: Fn,
4288
+ Foot: lr,
4289
+ HeaderCell: Hn,
4290
+ Head: ir,
4291
+ Row: sr
3897
4292
  });
4293
+ function In(n) {
4294
+ return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : 1;
4295
+ }
4296
+ const Or = g(
4297
+ function(t, e) {
4298
+ const {
4299
+ "aria-invalid": o,
4300
+ className: i,
4301
+ disabled: r = !1,
4302
+ invalid: l = !1,
4303
+ minRows: s,
4304
+ readOnly: u = !1,
4305
+ resize: f = "vertical",
4306
+ rows: d,
4307
+ style: c,
4308
+ ...p
4309
+ } = t, v = In(d ?? s ?? 3), x = `calc(${In(s ?? d ?? 3) * 1.25}em + var(--nk-text-area-padding) * 2 + var(--nk-text-area-border-width) * 2)`, b = {
4310
+ ...c,
4311
+ "--nk-text-area-min-height": x
4312
+ };
4313
+ return /* @__PURE__ */ a(
4314
+ "textarea",
4315
+ {
4316
+ ...p,
4317
+ ref: e,
4318
+ "aria-invalid": ge(l, o),
4319
+ className: ["nk-text-area", i].filter(Boolean).join(" "),
4320
+ "data-invalid": l || he(o) || void 0,
4321
+ "data-resize": f,
4322
+ disabled: r,
4323
+ readOnly: u,
4324
+ rows: v,
4325
+ style: b
4326
+ }
4327
+ );
4328
+ }
4329
+ );
3898
4330
  export {
3899
- Xo as Alert,
3900
- Jo as Avatar,
3901
- er as Badge,
3902
- tn as Button,
3903
- nr as Card,
3904
- Bt as Checkbox,
3905
- zt as CheckboxGroup,
3906
- tr as Content,
3907
- or as Divider,
3908
- rr as Field,
4331
+ br as Alert,
4332
+ yr as Avatar,
4333
+ kr as Badge,
4334
+ ze as Button,
4335
+ Ir as Card,
4336
+ Wt as Checkbox,
4337
+ qt as CheckboxGroup,
4338
+ xr as Content,
4339
+ Cr as Divider,
4340
+ Pr as Field,
3909
4341
  me as Icon,
3910
- ir as Input,
3911
- ar as Modal,
3912
- lr as PinInput,
3913
- sr as Popover,
3914
- cr as Radio,
3915
- To as RadioGroup,
3916
- dr as Select,
3917
- ur as Skeleton,
3918
- Cn as Spinner,
3919
- fr as Switch,
4342
+ _r as Input,
4343
+ Nr as Modal,
4344
+ Mr as PinInput,
4345
+ Lr as Popover,
4346
+ Er as Radio,
4347
+ Fo as RadioGroup,
4348
+ Sr as Select,
4349
+ Rr as Skeleton,
4350
+ Pn as Spinner,
4351
+ Tr as Switch,
4352
+ Ar as Table,
3920
4353
  fe as Text,
3921
- hr as TextArea,
3922
- vr as Tooltip,
3923
- pr as TooltipProvider,
4354
+ Or as TextArea,
4355
+ Qo as Tooltip,
4356
+ Vr as TooltipProvider,
3924
4357
  Ce as breakpoint,
3925
- Uo as cell,
3926
- Qo as px,
3927
- Yo as space
4358
+ mr as cell,
4359
+ wr as px,
4360
+ gr as space
3928
4361
  };