@agentatom/design-system 1.4.86 → 1.4.87

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.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import X, { useMemo as ht, useContext as ie, createContext as Le, useState as P, useRef as B, useEffect as F, useLayoutEffect as it, useId as xt, useCallback as te, forwardRef as lt } from "react";
2
- import { Check as Pe, X as se, ChevronDown as we, Minus as vt, Plus as _t, XCircle as Me, AlertTriangle as ze, CheckCircle as Fe, Info as We, ChevronUp as bt, ChevronsUpDown as jt, ChevronLeft as gt, ChevronRight as Nt, Copy as wt, Brain as yt, Loader as kt, Paperclip as Ye, Square as Et, ArrowUp as Tt, Zap as $t, Cpu as qe, FileText as Rt, ThumbsUp as St, ThumbsDown as At } from "lucide-react";
1
+ import X, { useMemo as ht, useContext as ie, createContext as De, useState as P, useRef as I, useEffect as F, useLayoutEffect as it, useId as xt, useCallback as se, forwardRef as lt } from "react";
2
+ import { Check as Pe, X as ee, ChevronDown as ye, Minus as vt, Plus as bt, XCircle as Me, AlertTriangle as ze, CheckCircle as Fe, Info as We, ChevronUp as _t, ChevronsUpDown as jt, ChevronLeft as Nt, ChevronRight as wt, Copy as gt, Brain as yt, Loader as kt, Paperclip as Ye, Square as Et, ArrowUp as Tt, Zap as $t, Cpu as qe, FileText as Rt, ThumbsUp as St, ThumbsDown as At } from "lucide-react";
3
3
  import re from "react-dom";
4
4
  const q = {
5
5
  1: 16,
@@ -8,7 +8,7 @@ const q = {
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var Be = { exports: {} }, ge = {};
11
+ var Ie = { exports: {} }, we = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -19,28 +19,28 @@ var Be = { exports: {} }, ge = {};
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
  var Ge;
22
- function It() {
23
- if (Ge) return ge;
22
+ function Bt() {
23
+ if (Ge) return we;
24
24
  Ge = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
- function n(a, r, o) {
26
+ function n(r, a, o) {
27
27
  var i = null;
28
- if (o !== void 0 && (i = "" + o), r.key !== void 0 && (i = "" + r.key), "key" in r) {
28
+ if (o !== void 0 && (i = "" + o), a.key !== void 0 && (i = "" + a.key), "key" in a) {
29
29
  o = {};
30
- for (var l in r)
31
- l !== "key" && (o[l] = r[l]);
32
- } else o = r;
33
- return r = o.ref, {
30
+ for (var l in a)
31
+ l !== "key" && (o[l] = a[l]);
32
+ } else o = a;
33
+ return a = o.ref, {
34
34
  $$typeof: t,
35
- type: a,
35
+ type: r,
36
36
  key: i,
37
- ref: r !== void 0 ? r : null,
37
+ ref: a !== void 0 ? a : null,
38
38
  props: o
39
39
  };
40
40
  }
41
- return ge.Fragment = s, ge.jsx = n, ge.jsxs = n, ge;
41
+ return we.Fragment = s, we.jsx = n, we.jsxs = n, we;
42
42
  }
43
- var Ne = {};
43
+ var ge = {};
44
44
  /**
45
45
  * @license React
46
46
  * react-jsx-runtime.development.js
@@ -51,19 +51,19 @@ var Ne = {};
51
51
  * LICENSE file in the root directory of this source tree.
52
52
  */
53
53
  var Ke;
54
- function Bt() {
54
+ function It() {
55
55
  return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function t(m) {
57
57
  if (m == null) return null;
58
58
  if (typeof m == "function")
59
- return m.$$typeof === L ? null : m.displayName || m.name || null;
59
+ return m.$$typeof === D ? null : m.displayName || m.name || null;
60
60
  if (typeof m == "string") return m;
61
61
  switch (m) {
62
- case N:
62
+ case w:
63
63
  return "Fragment";
64
64
  case y:
65
65
  return "Profiler";
66
- case w:
66
+ case g:
67
67
  return "StrictMode";
68
68
  case S:
69
69
  return "Suspense";
@@ -78,16 +78,16 @@ function Bt() {
78
78
  ), m.$$typeof) {
79
79
  case j:
80
80
  return "Portal";
81
- case g:
81
+ case N:
82
82
  return m.displayName || "Context";
83
83
  case E:
84
84
  return (m._context.displayName || "Context") + ".Consumer";
85
- case b:
85
+ case _:
86
86
  var x = m.render;
87
87
  return m = m.displayName, m || (m = x.displayName || x.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
88
- case D:
88
+ case L:
89
89
  return x = m.displayName || null, x !== null ? x : t(m.type) || "Memo";
90
- case C:
90
+ case O:
91
91
  x = m._payload, m = m._init;
92
92
  try {
93
93
  return t(m(x));
@@ -108,17 +108,17 @@ function Bt() {
108
108
  }
109
109
  if (x) {
110
110
  x = console;
111
- var I = x.error, U = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
112
- return I.call(
111
+ var B = x.error, U = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
112
+ return B.call(
113
113
  x,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  U
116
116
  ), s(m);
117
117
  }
118
118
  }
119
- function a(m) {
120
- if (m === N) return "<>";
121
- if (typeof m == "object" && m !== null && m.$$typeof === C)
119
+ function r(m) {
120
+ if (m === w) return "<>";
121
+ if (typeof m == "object" && m !== null && m.$$typeof === O)
122
122
  return "<...>";
123
123
  try {
124
124
  var x = t(m);
@@ -127,8 +127,8 @@ function Bt() {
127
127
  return "<...>";
128
128
  }
129
129
  }
130
- function r() {
131
- var m = O.A;
130
+ function a() {
131
+ var m = C.A;
132
132
  return m === null ? null : m.getOwner();
133
133
  }
134
134
  function o() {
@@ -142,14 +142,14 @@ function Bt() {
142
142
  return m.key !== void 0;
143
143
  }
144
144
  function l(m, x) {
145
- function I() {
145
+ function B() {
146
146
  $ || ($ = !0, console.error(
147
147
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
148
148
  x
149
149
  ));
150
150
  }
151
- I.isReactWarning = !0, Object.defineProperty(m, "key", {
152
- get: I,
151
+ B.isReactWarning = !0, Object.defineProperty(m, "key", {
152
+ get: B,
153
153
  configurable: !0
154
154
  });
155
155
  }
@@ -159,13 +159,13 @@ function Bt() {
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), m = this.props.ref, m !== void 0 ? m : null;
161
161
  }
162
- function f(m, x, I, U, ee, le) {
163
- var G = I.ref;
162
+ function u(m, x, B, U, te, le) {
163
+ var G = B.ref;
164
164
  return m = {
165
165
  $$typeof: v,
166
166
  type: m,
167
167
  key: x,
168
- props: I,
168
+ props: B,
169
169
  _owner: U
170
170
  }, (G !== void 0 ? G : null) !== null ? Object.defineProperty(m, "ref", {
171
171
  enumerable: !1,
@@ -184,7 +184,7 @@ function Bt() {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: ee
187
+ value: te
188
188
  }), Object.defineProperty(m, "_debugTask", {
189
189
  configurable: !1,
190
190
  enumerable: !1,
@@ -192,7 +192,7 @@ function Bt() {
192
192
  value: le
193
193
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
194
194
  }
195
- function d(m, x, I, U, ee, le) {
195
+ function d(m, x, B, U, te, le) {
196
196
  var G = x.children;
197
197
  if (G !== void 0)
198
198
  if (U)
@@ -207,8 +207,8 @@ function Bt() {
207
207
  else p(G);
208
208
  if (W.call(x, "key")) {
209
209
  G = t(m);
210
- var Z = Object.keys(x).filter(function(be) {
211
- return be !== "key";
210
+ var Z = Object.keys(x).filter(function(je) {
211
+ return je !== "key";
212
212
  });
213
213
  U = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", Y[G + U] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
@@ -223,66 +223,66 @@ React keys must be passed directly to JSX without using spread:
223
223
  G
224
224
  ), Y[G + U] = !0);
225
225
  }
226
- if (G = null, I !== void 0 && (n(I), G = "" + I), i(x) && (n(x.key), G = "" + x.key), "key" in x) {
227
- I = {};
226
+ if (G = null, B !== void 0 && (n(B), G = "" + B), i(x) && (n(x.key), G = "" + x.key), "key" in x) {
227
+ B = {};
228
228
  for (var fe in x)
229
- fe !== "key" && (I[fe] = x[fe]);
230
- } else I = x;
229
+ fe !== "key" && (B[fe] = x[fe]);
230
+ } else B = x;
231
231
  return G && l(
232
- I,
232
+ B,
233
233
  typeof m == "function" ? m.displayName || m.name || "Unknown" : m
234
- ), f(
234
+ ), u(
235
235
  m,
236
236
  G,
237
- I,
238
- r(),
239
- ee,
237
+ B,
238
+ a(),
239
+ te,
240
240
  le
241
241
  );
242
242
  }
243
243
  function p(m) {
244
- h(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === C && (m._payload.status === "fulfilled" ? h(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
244
+ h(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === O && (m._payload.status === "fulfilled" ? h(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
245
245
  }
246
246
  function h(m) {
247
247
  return typeof m == "object" && m !== null && m.$$typeof === v;
248
248
  }
249
- var u = X, v = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), g = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), k = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), O = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, M = Array.isArray, _ = console.createTask ? console.createTask : function() {
249
+ var f = X, v = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), N = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), k = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, M = Array.isArray, b = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
- u = {
252
+ f = {
253
253
  react_stack_bottom_frame: function(m) {
254
254
  return m();
255
255
  }
256
256
  };
257
- var $, R = {}, V = u.react_stack_bottom_frame.bind(
258
- u,
257
+ var $, R = {}, V = f.react_stack_bottom_frame.bind(
258
+ f,
259
259
  o
260
- )(), H = _(a(o)), Y = {};
261
- Ne.Fragment = N, Ne.jsx = function(m, x, I) {
262
- var U = 1e4 > O.recentlyCreatedOwnerStacks++;
260
+ )(), H = b(r(o)), Y = {};
261
+ ge.Fragment = w, ge.jsx = function(m, x, B) {
262
+ var U = 1e4 > C.recentlyCreatedOwnerStacks++;
263
263
  return d(
264
264
  m,
265
265
  x,
266
- I,
266
+ B,
267
267
  !1,
268
268
  U ? Error("react-stack-top-frame") : V,
269
- U ? _(a(m)) : H
269
+ U ? b(r(m)) : H
270
270
  );
271
- }, Ne.jsxs = function(m, x, I) {
272
- var U = 1e4 > O.recentlyCreatedOwnerStacks++;
271
+ }, ge.jsxs = function(m, x, B) {
272
+ var U = 1e4 > C.recentlyCreatedOwnerStacks++;
273
273
  return d(
274
274
  m,
275
275
  x,
276
- I,
276
+ B,
277
277
  !0,
278
278
  U ? Error("react-stack-top-frame") : V,
279
- U ? _(a(m)) : H
279
+ U ? b(r(m)) : H
280
280
  );
281
281
  };
282
- }()), Ne;
282
+ }()), ge;
283
283
  }
284
- process.env.NODE_ENV === "production" ? Be.exports = It() : Be.exports = Bt();
285
- var e = Be.exports;
284
+ process.env.NODE_ENV === "production" ? Ie.exports = Bt() : Ie.exports = It();
285
+ var e = Ie.exports;
286
286
  const $e = {
287
287
  // Close / dismiss
288
288
  close: "Close",
@@ -330,53 +330,55 @@ const $e = {
330
330
  filesSkipped: "Skipped unsupported file(s): {names}",
331
331
  maxImages: "Max {n} images per message",
332
332
  uploading: "Uploading...",
333
- removeAttachment: "Remove attachment"
333
+ removeAttachment: "Remove attachment",
334
+ // Browser tabs
335
+ closeTab: "Close {label}"
334
336
  };
335
337
  function ct(t, s = {}) {
336
338
  return typeof t == "function" ? t(s) : typeof t != "string" ? "" : t.replace(
337
339
  /\{(\w+)\}/g,
338
- (n, a) => s[a] !== void 0 && s[a] !== null ? String(s[a]) : ""
340
+ (n, r) => s[r] !== void 0 && s[r] !== null ? String(s[r]) : ""
339
341
  );
340
342
  }
341
- const Ce = Le({
343
+ const Oe = De({
342
344
  strings: $e,
343
345
  t: (t, s) => ct($e[t] ?? t, s)
344
346
  });
345
- function ws({ strings: t, children: s }) {
347
+ function gs({ strings: t, children: s }) {
346
348
  const n = ht(() => {
347
- const a = { ...$e, ...t };
349
+ const r = { ...$e, ...t };
348
350
  return {
349
- strings: a,
350
- t: (r, o) => ct(a[r] ?? $e[r] ?? r, o)
351
+ strings: r,
352
+ t: (a, o) => ct(r[a] ?? $e[a] ?? a, o)
351
353
  };
352
354
  }, [t]);
353
- return /* @__PURE__ */ e.jsx(Ce.Provider, { value: n, children: s });
355
+ return /* @__PURE__ */ e.jsx(Oe.Provider, { value: n, children: s });
354
356
  }
355
- function ye() {
356
- return ie(Ce);
357
+ function be() {
358
+ return ie(Oe);
357
359
  }
358
360
  function K() {
359
- return ie(Ce).strings;
361
+ return ie(Oe).strings;
360
362
  }
361
- function Dt({ size: t = "m", color: s = "default", className: n = "", "aria-label": a, ...r }) {
363
+ function Lt({ size: t = "m", color: s = "default", className: n = "", "aria-label": r, ...a }) {
362
364
  const o = K();
363
365
  return /* @__PURE__ */ e.jsx(
364
366
  "span",
365
367
  {
366
368
  className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${s}`, n].filter(Boolean).join(" "),
367
369
  role: "status",
368
- "aria-label": a ?? o.loading,
369
- ...r
370
+ "aria-label": r ?? o.loading,
371
+ ...a
370
372
  }
371
373
  );
372
374
  }
373
- const Lt = { xs: 12, s: 14, m: 16, l: 20 };
375
+ const Dt = { xs: 12, s: 14, m: 16, l: 20 };
374
376
  function de({
375
377
  children: t,
376
378
  variant: s = "primary",
377
379
  size: n = "m",
378
- fullWidth: a = !1,
379
- icon: r,
380
+ fullWidth: r = !1,
381
+ icon: a,
380
382
  disabled: o = !1,
381
383
  state: i = "idle",
382
384
  /**
@@ -387,45 +389,45 @@ function de({
387
389
  active: l = !1,
388
390
  /** Alias of `active` — same toggle-on style. */
389
391
  pressed: c = !1,
390
- onClick: f,
392
+ onClick: u,
391
393
  type: d = "button",
392
394
  href: p,
393
395
  "aria-label": h,
394
- "aria-pressed": u,
396
+ "aria-pressed": f,
395
397
  className: v = "",
396
398
  ...j
397
399
  }) {
398
- const N = r && !t, w = i === "loading", y = i === "success", E = i === "error", g = w || y || E, b = !!(l || c), S = n === "xs" ? "s" : "m", A = s === "danger" ? "on-accent" : "default", D = Lt[n] ?? 16, C = w ? /* @__PURE__ */ e.jsx(Dt, { size: S, color: A }) : y ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: D, strokeWidth: 2.5 }) }) : E ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(se, { size: D, strokeWidth: 2.5 }) }) : null, k = [
400
+ const w = a && !t, g = i === "loading", y = i === "success", E = i === "error", N = g || y || E, _ = !!(l || c), S = n === "xs" ? "s" : "m", A = s === "danger" ? "on-accent" : "default", L = Dt[n] ?? 16, O = g ? /* @__PURE__ */ e.jsx(Lt, { size: S, color: A }) : y ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: L, strokeWidth: 2.5 }) }) : E ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: L, strokeWidth: 2.5 }) }) : null, k = [
399
401
  "ds-button",
400
402
  `ds-button--${s}`,
401
403
  `ds-button--${n}`,
402
- a && "ds-button--full",
403
- N && "ds-button--icon-only",
404
+ r && "ds-button--full",
405
+ w && "ds-button--icon-only",
404
406
  v
405
- ].filter(Boolean).join(" "), L = i !== "idle" ? i : void 0, O = u !== void 0 ? u : b ? !0 : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
406
- g ? C : r && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: r }),
407
+ ].filter(Boolean).join(" "), D = i !== "idle" ? i : void 0, C = f !== void 0 ? f : _ ? !0 : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
408
+ N ? O : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
407
409
  t
408
410
  ] });
409
411
  if (p) {
410
- const M = (_) => {
411
- if (o || w) {
412
- _.preventDefault();
412
+ const M = (b) => {
413
+ if (o || g) {
414
+ b.preventDefault();
413
415
  return;
414
416
  }
415
- _.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), f == null || f(_));
417
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), u == null || u(b));
416
418
  };
417
419
  return /* @__PURE__ */ e.jsx(
418
420
  "a",
419
421
  {
420
422
  className: k,
421
- href: o || w ? void 0 : p,
423
+ href: o || g ? void 0 : p,
422
424
  onClick: M,
423
425
  "aria-label": h,
424
- "aria-disabled": o || w ? "true" : void 0,
425
- "aria-busy": w ? "true" : void 0,
426
- "aria-pressed": O,
427
- "data-state": L,
428
- "data-active": b ? "true" : void 0,
426
+ "aria-disabled": o || g ? "true" : void 0,
427
+ "aria-busy": g ? "true" : void 0,
428
+ "aria-pressed": C,
429
+ "data-state": D,
430
+ "data-active": _ ? "true" : void 0,
429
431
  ...j,
430
432
  children: W
431
433
  }
@@ -437,12 +439,12 @@ function de({
437
439
  type: d,
438
440
  className: k,
439
441
  disabled: o,
440
- onClick: w ? void 0 : f,
442
+ onClick: g ? void 0 : u,
441
443
  "aria-label": h,
442
- "aria-busy": w ? "true" : void 0,
443
- "aria-pressed": O,
444
- "data-state": L,
445
- "data-active": b ? "true" : void 0,
444
+ "aria-busy": g ? "true" : void 0,
445
+ "aria-pressed": C,
446
+ "data-state": D,
447
+ "data-active": _ ? "true" : void 0,
446
448
  ...j,
447
449
  children: W
448
450
  }
@@ -452,29 +454,29 @@ function ys({
452
454
  label: t,
453
455
  error: s,
454
456
  hint: n,
455
- fullWidth: a = !0,
456
- icon: r,
457
+ fullWidth: r = !0,
458
+ icon: a,
457
459
  iconRight: o,
458
460
  onIconRightClick: i,
459
461
  size: l = "m",
460
462
  disabled: c,
461
- id: f,
463
+ id: u,
462
464
  iconRightLabel: d,
463
465
  ...p
464
466
  }) {
465
- const h = K(), u = f || `input-${X.useId()}`, v = n ? `${u}-hint` : void 0, j = s ? `${u}-error` : void 0, N = j || v;
466
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
467
- t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: u, children: t }),
467
+ const h = K(), f = u || `input-${X.useId()}`, v = n ? `${f}-hint` : void 0, j = s ? `${f}-error` : void 0, w = j || v;
468
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
469
+ t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: t }),
468
470
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
469
- r && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: r }),
471
+ a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
470
472
  /* @__PURE__ */ e.jsx(
471
473
  "input",
472
474
  {
473
- id: u,
474
- className: `ds-input ds-input--${l} ${r ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
475
+ id: f,
476
+ className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
475
477
  disabled: c,
476
478
  "aria-invalid": s ? "true" : "false",
477
- "aria-describedby": N,
479
+ "aria-describedby": w,
478
480
  ...p
479
481
  }
480
482
  ),
@@ -498,27 +500,27 @@ function ks({
498
500
  label: t,
499
501
  error: s,
500
502
  hint: n,
501
- fullWidth: a = !0,
502
- size: r = "m",
503
+ fullWidth: r = !0,
504
+ size: a = "m",
503
505
  disabled: o,
504
506
  id: i,
505
507
  resize: l = !0,
506
508
  rows: c = 3,
507
- ...f
509
+ ...u
508
510
  }) {
509
- const d = i || `textarea-${X.useId()}`, p = n ? `${d}-hint` : void 0, h = s ? `${d}-error` : void 0, u = h || p;
510
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
511
+ const d = i || `textarea-${X.useId()}`, p = n ? `${d}-hint` : void 0, h = s ? `${d}-error` : void 0, f = h || p;
512
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
511
513
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
512
514
  /* @__PURE__ */ e.jsx(
513
515
  "textarea",
514
516
  {
515
517
  id: d,
516
- className: `ds-textarea ds-textarea--${r} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
518
+ className: `ds-textarea ds-textarea--${a} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
517
519
  disabled: o,
518
520
  "aria-invalid": s ? "true" : "false",
519
- "aria-describedby": u,
521
+ "aria-describedby": f,
520
522
  rows: c,
521
- ...f
523
+ ...u
522
524
  }
523
525
  ),
524
526
  n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
@@ -529,82 +531,82 @@ function Es({
529
531
  label: t,
530
532
  value: s,
531
533
  onChange: n,
532
- options: a = [],
533
- placeholder: r,
534
+ options: r = [],
535
+ placeholder: a,
534
536
  error: o,
535
537
  fullWidth: i = !0,
536
538
  size: l = "m",
537
539
  disabled: c = !1,
538
- id: f,
540
+ id: u,
539
541
  ...d
540
542
  }) {
541
- const p = K(), h = r ?? p.selectOption, [u, v] = P(!1), [j, N] = P(!1), [w, y] = P({}), [E, g] = P("down"), [b, S] = P(-1), A = B(null), D = B(null), C = B(null), k = B(null), L = f || `select-${X.useId()}`, O = `${L}-label`, W = o ? `${L}-error` : void 0, M = 150, _ = (x = !1) => {
542
- j || (N(!0), S(-1), k.current = setTimeout(() => {
543
- var I;
544
- v(!1), N(!1), x && ((I = C.current) == null || I.focus());
543
+ const p = K(), h = a ?? p.selectOption, [f, v] = P(!1), [j, w] = P(!1), [g, y] = P({}), [E, N] = P("down"), [_, S] = P(-1), A = I(null), L = I(null), O = I(null), k = I(null), D = u || `select-${X.useId()}`, C = `${D}-label`, W = o ? `${D}-error` : void 0, M = 150, b = (x = !1) => {
544
+ j || (w(!0), S(-1), k.current = setTimeout(() => {
545
+ var B;
546
+ v(!1), w(!1), x && ((B = O.current) == null || B.focus());
545
547
  }, M));
546
548
  }, $ = (x) => {
547
- clearTimeout(k.current), N(!1);
548
- const I = x !== void 0 ? x : Math.max(a.findIndex((U) => U.value === s), 0);
549
- S(I), v(!0);
549
+ clearTimeout(k.current), w(!1);
550
+ const B = x !== void 0 ? x : Math.max(r.findIndex((U) => U.value === s), 0);
551
+ S(B), v(!0);
550
552
  };
551
553
  F(() => () => clearTimeout(k.current), []);
552
554
  const R = () => {
553
555
  var Z;
554
556
  const x = (Z = A.current) == null ? void 0 : Z.getBoundingClientRect();
555
557
  if (!x) return;
556
- const I = window.innerHeight, U = I - x.bottom, ee = x.top, G = U < 300 && ee > U;
557
- g(G ? "up" : "down"), y(
558
- G ? { bottom: I - x.top + 4, left: x.left, width: x.width } : { top: x.bottom + 4, left: x.left, width: x.width }
558
+ const B = window.innerHeight, U = B - x.bottom, te = x.top, G = U < 300 && te > U;
559
+ N(G ? "up" : "down"), y(
560
+ G ? { bottom: B - x.top + 4, left: x.left, width: x.width } : { top: x.bottom + 4, left: x.left, width: x.width }
559
561
  );
560
562
  };
561
563
  F(() => {
562
- if (u)
564
+ if (f)
563
565
  return R(), window.addEventListener("scroll", R, !0), window.addEventListener("resize", R), () => {
564
566
  window.removeEventListener("scroll", R, !0), window.removeEventListener("resize", R);
565
567
  };
566
- }, [u]), F(() => {
567
- const x = (I) => {
568
- A.current && !A.current.contains(I.target) && D.current && !D.current.contains(I.target) && _();
568
+ }, [f]), F(() => {
569
+ const x = (B) => {
570
+ A.current && !A.current.contains(B.target) && L.current && !L.current.contains(B.target) && b();
569
571
  };
570
572
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
571
573
  }, [j]), F(() => {
572
- var I;
573
- if (!u || b < 0 || !D.current) return;
574
- (I = D.current.querySelectorAll(".ds-select-option")[b]) == null || I.scrollIntoView({ block: "nearest" });
575
- }, [b, u]);
574
+ var B;
575
+ if (!f || _ < 0 || !L.current) return;
576
+ (B = L.current.querySelectorAll(".ds-select-option")[_]) == null || B.scrollIntoView({ block: "nearest" });
577
+ }, [_, f]);
576
578
  const V = (x) => {
577
579
  switch (x.key) {
578
580
  case "ArrowDown":
579
- x.preventDefault(), u ? S((I) => Math.min(I + 1, a.length - 1)) : $();
581
+ x.preventDefault(), f ? S((B) => Math.min(B + 1, r.length - 1)) : $();
580
582
  break;
581
583
  case "ArrowUp":
582
- x.preventDefault(), u ? S((I) => Math.max(I - 1, 0)) : $(a.length - 1);
584
+ x.preventDefault(), f ? S((B) => Math.max(B - 1, 0)) : $(r.length - 1);
583
585
  break;
584
586
  case "Home":
585
- u && (x.preventDefault(), S(0));
587
+ f && (x.preventDefault(), S(0));
586
588
  break;
587
589
  case "End":
588
- u && (x.preventDefault(), S(a.length - 1));
590
+ f && (x.preventDefault(), S(r.length - 1));
589
591
  break;
590
592
  case "Enter":
591
593
  case " ":
592
- x.preventDefault(), u ? b >= 0 && (n == null || n(a[b].value), _(!0)) : $();
594
+ x.preventDefault(), f ? _ >= 0 && (n == null || n(r[_].value), b(!0)) : $();
593
595
  break;
594
596
  case "Escape":
595
- u && (x.preventDefault(), _(!0));
597
+ f && (x.preventDefault(), b(!0));
596
598
  break;
597
599
  case "Tab":
598
- u && _(!1);
600
+ f && b(!1);
599
601
  break;
600
602
  }
601
- }, H = a.find((x) => x.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = u && /* @__PURE__ */ e.jsx(
603
+ }, H = r.find((x) => x.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = f && /* @__PURE__ */ e.jsx(
602
604
  "div",
603
605
  {
604
- ref: D,
606
+ ref: L,
605
607
  "data-ds-portal": "",
606
608
  role: "listbox",
607
- "aria-labelledby": t ? O : void 0,
609
+ "aria-labelledby": t ? C : void 0,
608
610
  tabIndex: -1,
609
611
  className: [
610
612
  "ds-select-dropdown ds-scrollable",
@@ -612,11 +614,11 @@ function Es({
612
614
  `ds-select-dropdown--${E}`,
613
615
  j && "ds-select-dropdown--closing"
614
616
  ].filter(Boolean).join(" "),
615
- style: w,
616
- children: a.map((x, I) => /* @__PURE__ */ e.jsx(
617
+ style: g,
618
+ children: r.map((x, B) => /* @__PURE__ */ e.jsx(
617
619
  "button",
618
620
  {
619
- id: `${L}-opt-${I}`,
621
+ id: `${D}-opt-${B}`,
620
622
  type: "button",
621
623
  role: "option",
622
624
  tabIndex: -1,
@@ -625,10 +627,10 @@ function Es({
625
627
  "ds-select-option",
626
628
  `ds-select-option--${l}`,
627
629
  s === x.value && "ds-select-option--selected",
628
- I === b && "ds-select-option--active"
630
+ B === _ && "ds-select-option--active"
629
631
  ].filter(Boolean).join(" "),
630
632
  onClick: () => {
631
- n == null || n(x.value), _(!0);
633
+ n == null || n(x.value), b(!0);
632
634
  },
633
635
  children: x.label
634
636
  },
@@ -637,23 +639,23 @@ function Es({
637
639
  }
638
640
  );
639
641
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
640
- t && /* @__PURE__ */ e.jsx("label", { id: O, className: "ds-select-label", children: t }),
642
+ t && /* @__PURE__ */ e.jsx("label", { id: C, className: "ds-select-label", children: t }),
641
643
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: A, children: /* @__PURE__ */ e.jsxs(
642
644
  "button",
643
645
  {
644
- ref: C,
646
+ ref: O,
645
647
  type: "button",
646
- id: L,
648
+ id: D,
647
649
  role: "combobox",
648
650
  "aria-haspopup": "listbox",
649
- "aria-expanded": u,
650
- "aria-activedescendant": u && b >= 0 ? `${L}-opt-${b}` : void 0,
651
- "aria-labelledby": t ? O : void 0,
651
+ "aria-expanded": f,
652
+ "aria-activedescendant": f && _ >= 0 ? `${D}-opt-${_}` : void 0,
653
+ "aria-labelledby": t ? C : void 0,
652
654
  "aria-invalid": o ? "true" : "false",
653
655
  "aria-describedby": W,
654
656
  className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
655
657
  onClick: () => {
656
- c || (u ? _() : $());
658
+ c || (f ? b() : $());
657
659
  },
658
660
  onKeyDown: V,
659
661
  disabled: c,
@@ -661,11 +663,11 @@ function Es({
661
663
  children: [
662
664
  /* @__PURE__ */ e.jsx("span", { className: H ? "" : "ds-select-placeholder", children: (H == null ? void 0 : H.label) || h }),
663
665
  /* @__PURE__ */ e.jsx(
664
- we,
666
+ ye,
665
667
  {
666
668
  size: Y,
667
669
  strokeWidth: 1.5,
668
- className: `ds-select-icon ${u && E === "down" ? "ds-select-icon--open" : ""} ${u && E === "up" ? "ds-select-icon--up" : ""}`,
670
+ className: `ds-select-icon ${f && E === "down" ? "ds-select-icon--open" : ""} ${f && E === "up" ? "ds-select-icon--up" : ""}`,
669
671
  "aria-hidden": "true"
670
672
  }
671
673
  )
@@ -680,47 +682,47 @@ function Ts({
680
682
  label: t,
681
683
  value: s = 0,
682
684
  onChange: n,
683
- min: a = 0,
684
- max: r = 100,
685
+ min: r = 0,
686
+ max: a = 100,
685
687
  step: o = 1,
686
688
  size: i = "m",
687
689
  disabled: l = !1,
688
690
  hint: c,
689
- error: f,
691
+ error: u,
690
692
  decreaseLabel: d,
691
693
  increaseLabel: p,
692
694
  ...h
693
695
  }) {
694
- const u = K(), v = () => {
696
+ const f = K(), v = () => {
695
697
  if (l) return;
696
- const g = Math.min(Number(s) + o, r);
697
- n == null || n(g);
698
+ const N = Math.min(Number(s) + o, a);
699
+ n == null || n(N);
698
700
  }, j = () => {
699
701
  if (l) return;
700
- const g = Math.max(Number(s) - o, a);
701
- n == null || n(g);
702
- }, N = (g) => {
702
+ const N = Math.max(Number(s) - o, r);
703
+ n == null || n(N);
704
+ }, w = (N) => {
703
705
  if (l) return;
704
- const b = g.target.value;
705
- if (b === "") {
706
- n == null || n(a);
706
+ const _ = N.target.value;
707
+ if (_ === "") {
708
+ n == null || n(r);
707
709
  return;
708
710
  }
709
- const S = Number(b);
711
+ const S = Number(_);
710
712
  if (!isNaN(S)) {
711
- const A = Math.min(Math.max(S, a), r);
713
+ const A = Math.min(Math.max(S, r), a);
712
714
  n == null || n(A);
713
715
  }
714
- }, w = [
716
+ }, g = [
715
717
  "ds-stepper-wrapper",
716
718
  l && "ds-stepper-wrapper--disabled",
717
- f && "ds-stepper-wrapper--error"
719
+ u && "ds-stepper-wrapper--error"
718
720
  ].filter(Boolean).join(" "), y = [
719
721
  "ds-stepper",
720
722
  `ds-stepper--${i}`,
721
723
  l && "ds-stepper--disabled"
722
724
  ].filter(Boolean).join(" "), E = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
723
- return /* @__PURE__ */ e.jsxs("div", { className: w, children: [
725
+ return /* @__PURE__ */ e.jsxs("div", { className: g, children: [
724
726
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
725
727
  /* @__PURE__ */ e.jsxs("div", { className: y, children: [
726
728
  /* @__PURE__ */ e.jsx(
@@ -729,8 +731,8 @@ function Ts({
729
731
  type: "button",
730
732
  className: "ds-stepper-button ds-stepper-button--minus",
731
733
  onClick: j,
732
- disabled: l || s <= a,
733
- "aria-label": d ?? u.decrease,
734
+ disabled: l || s <= r,
735
+ "aria-label": d ?? f.decrease,
734
736
  children: /* @__PURE__ */ e.jsx(vt, { size: E, strokeWidth: 1.5 })
735
737
  }
736
738
  ),
@@ -740,9 +742,9 @@ function Ts({
740
742
  type: "number",
741
743
  className: "ds-stepper-input",
742
744
  value: s,
743
- onChange: N,
744
- min: a,
745
- max: r,
745
+ onChange: w,
746
+ min: r,
747
+ max: a,
746
748
  step: o,
747
749
  disabled: l,
748
750
  ...h
@@ -754,29 +756,29 @@ function Ts({
754
756
  type: "button",
755
757
  className: "ds-stepper-button ds-stepper-button--plus",
756
758
  onClick: v,
757
- disabled: l || s >= r,
758
- "aria-label": p ?? u.increase,
759
- children: /* @__PURE__ */ e.jsx(_t, { size: E, strokeWidth: 1.5 })
759
+ disabled: l || s >= a,
760
+ "aria-label": p ?? f.increase,
761
+ children: /* @__PURE__ */ e.jsx(bt, { size: E, strokeWidth: 1.5 })
760
762
  }
761
763
  )
762
764
  ] }),
763
- c && !f && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
764
- f && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: f })
765
+ c && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
766
+ u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
765
767
  ] });
766
768
  }
767
769
  function $s({
768
770
  children: t,
769
771
  padding: s = "m",
770
772
  variant: n = "default",
771
- hover: a = !1,
773
+ hover: r = !1,
772
774
  // deprecated, use variant="interactive"
773
- onClick: r,
775
+ onClick: a,
774
776
  href: o,
775
777
  disabled: i = !1,
776
778
  className: l = "",
777
779
  ...c
778
780
  }) {
779
- const d = (a ? "interactive" : n) === "interactive" || r || o, p = [
781
+ const d = (r ? "interactive" : n) === "interactive" || a || o, p = [
780
782
  "ds-card",
781
783
  `ds-card--${s}`,
782
784
  d && "ds-card--interactive",
@@ -788,7 +790,7 @@ function $s({
788
790
  j.preventDefault();
789
791
  return;
790
792
  }
791
- j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), r == null || r(j));
793
+ j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), a == null || a(j));
792
794
  };
793
795
  return /* @__PURE__ */ e.jsx(
794
796
  "a",
@@ -802,17 +804,17 @@ function $s({
802
804
  }
803
805
  );
804
806
  }
805
- const h = d && r ? "button" : "div", u = d && r ? {
807
+ const h = d && a ? "button" : "div", f = d && a ? {
806
808
  type: "button",
807
- onClick: r,
809
+ onClick: a,
808
810
  disabled: i
809
811
  } : {};
810
812
  return /* @__PURE__ */ e.jsx(
811
813
  h,
812
814
  {
813
815
  className: p,
814
- role: d && !r ? "article" : void 0,
815
- ...u,
816
+ role: d && !a ? "article" : void 0,
817
+ ...f,
816
818
  ...c,
817
819
  children: t
818
820
  }
@@ -827,10 +829,10 @@ function Ss({ children: t, ...s }) {
827
829
  function As({ children: t, ...s }) {
828
830
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
829
831
  }
830
- function Is({ children: t, ...s }) {
832
+ function Bs({ children: t, ...s }) {
831
833
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
832
834
  }
833
- function Bs({ children: t, secondary: s = !1, ...n }) {
835
+ function Is({ children: t, secondary: s = !1, ...n }) {
834
836
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
835
837
  }
836
838
  function Pt({ children: t, secondary: s = !1, ...n }) {
@@ -843,81 +845,81 @@ function he({
843
845
  children: t,
844
846
  variant: s = "default",
845
847
  size: n = "m",
846
- role: a,
847
- ...r
848
+ role: r,
849
+ ...a
848
850
  }) {
849
851
  const o = [
850
852
  "ds-badge",
851
853
  `ds-badge--${s}`,
852
854
  `ds-badge--${n}`
853
- ].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
854
- return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...r, children: t });
855
+ ].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
856
+ return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...a, children: t });
855
857
  }
856
858
  const Mt = {
857
859
  info: We,
858
860
  success: Fe,
859
861
  warning: ze,
860
862
  error: Me
861
- }, Ds = X.forwardRef(function({
863
+ }, Ls = X.forwardRef(function({
862
864
  children: s,
863
865
  variant: n = "info",
864
- title: a,
865
- onClose: r,
866
+ title: r,
867
+ onClose: a,
866
868
  role: o,
867
869
  closeLabel: i,
868
870
  ...l
869
871
  }, c) {
870
- const f = K(), d = Mt[n], p = o || (n === "error" ? "alert" : "status");
871
- return /* @__PURE__ */ e.jsxs("div", { ref: c, className: `ds-alert ds-alert--${n} ${a ? "" : "ds-alert--no-title"}`, role: p, ...l, children: [
872
+ const u = K(), d = Mt[n], p = o || (n === "error" ? "alert" : "status");
873
+ return /* @__PURE__ */ e.jsxs("div", { ref: c, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: p, ...l, children: [
872
874
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: q[3], strokeWidth: 1.5 }) }),
873
875
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
874
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: a }),
876
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
875
877
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
876
878
  ] }),
877
- r && /* @__PURE__ */ e.jsx(
879
+ a && /* @__PURE__ */ e.jsx(
878
880
  "button",
879
881
  {
880
882
  type: "button",
881
883
  className: "ds-alert__close",
882
- onClick: r,
883
- "aria-label": i ?? f.closeAlert,
884
- children: /* @__PURE__ */ e.jsx(se, { size: q[3], strokeWidth: 1.5 })
884
+ onClick: a,
885
+ "aria-label": i ?? u.closeAlert,
886
+ children: /* @__PURE__ */ e.jsx(ee, { size: q[3], strokeWidth: 1.5 })
885
887
  }
886
888
  )
887
889
  ] });
888
890
  }), zt = 200;
889
- function Ls({
891
+ function Ds({
890
892
  children: t,
891
893
  title: s,
892
894
  onClose: n,
893
- size: a = "m",
894
- scrollable: r = !1,
895
+ size: r = "m",
896
+ scrollable: a = !1,
895
897
  subHeader: o,
896
898
  closeLabel: i,
897
899
  ...l
898
900
  }) {
899
- const c = K(), f = B(null), d = X.useId(), [p, h] = P(!1), u = () => {
901
+ const c = K(), u = I(null), d = X.useId(), [p, h] = P(!1), f = () => {
900
902
  !n || p || (h(!0), setTimeout(() => {
901
903
  h(!1), n();
902
904
  }, zt));
903
905
  };
904
906
  F(() => {
905
- const y = (g) => {
906
- g.key === "Escape" && u();
907
- }, E = (g) => {
908
- var S, A, D;
909
- const b = ((A = (S = g.composedPath) == null ? void 0 : S.call(g)) == null ? void 0 : A[0]) ?? g.target;
910
- f.current && !f.current.contains(b) && !((D = b.closest) != null && D.call(b, "[data-ds-portal]")) && u();
907
+ const y = (N) => {
908
+ N.key === "Escape" && f();
909
+ }, E = (N) => {
910
+ var S, A, L;
911
+ const _ = ((A = (S = N.composedPath) == null ? void 0 : S.call(N)) == null ? void 0 : A[0]) ?? N.target;
912
+ u.current && !u.current.contains(_) && !((L = _.closest) != null && L.call(_, "[data-ds-portal]")) && f();
911
913
  };
912
914
  return document.addEventListener("keydown", y), document.addEventListener("mousedown", E), () => {
913
915
  document.removeEventListener("keydown", y), document.removeEventListener("mousedown", E);
914
916
  };
915
917
  }, [n, p]);
916
- const v = X.Children.toArray(t), j = v.find((y) => (y == null ? void 0 : y.type) === xe), N = v.filter((y) => (y == null ? void 0 : y.type) !== xe), w = /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", p && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...l, children: /* @__PURE__ */ e.jsxs(
918
+ const v = X.Children.toArray(t), j = v.find((y) => (y == null ? void 0 : y.type) === xe), w = v.filter((y) => (y == null ? void 0 : y.type) !== xe), g = /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", p && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...l, children: /* @__PURE__ */ e.jsxs(
917
919
  "div",
918
920
  {
919
- className: [`ds-modal ds-modal--${a}`, r && "ds-modal--scrollable"].filter(Boolean).join(" "),
920
- ref: f,
921
+ className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
922
+ ref: u,
921
923
  role: "dialog",
922
924
  "aria-modal": "true",
923
925
  "aria-labelledby": s ? d : void 0,
@@ -928,8 +930,8 @@ function Ls({
928
930
  className: "ds-modal__close",
929
931
  variant: "ghost",
930
932
  size: "small",
931
- icon: /* @__PURE__ */ e.jsx(se, { size: q[2], strokeWidth: 1.5 }),
932
- onClick: u,
933
+ icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
934
+ onClick: f,
933
935
  "aria-label": i ?? c.closeModal
934
936
  }
935
937
  ),
@@ -937,12 +939,12 @@ function Ls({
937
939
  s && /* @__PURE__ */ e.jsx("h3", { id: d, className: "ds-modal__title", children: s }),
938
940
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
939
941
  ] }),
940
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: N }),
942
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: w }),
941
943
  j
942
944
  ]
943
945
  }
944
946
  ) });
945
- return typeof document > "u" ? w : re.createPortal(w, document.body);
947
+ return typeof document > "u" ? g : re.createPortal(g, document.body);
946
948
  }
947
949
  function xe({ children: t }) {
948
950
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
@@ -952,37 +954,37 @@ function Ps({
952
954
  children: t,
953
955
  title: s,
954
956
  onClose: n,
955
- subHeader: a,
956
- closeLabel: r,
957
+ subHeader: r,
958
+ closeLabel: a,
957
959
  ...o
958
960
  }) {
959
- const i = K(), l = B(null), c = X.useId(), [f, d] = P(!1), p = () => {
960
- !n || f || (d(!0), setTimeout(() => {
961
+ const i = K(), l = I(null), c = X.useId(), [u, d] = P(!1), p = () => {
962
+ !n || u || (d(!0), setTimeout(() => {
961
963
  d(!1), n();
962
964
  }, Ft));
963
965
  };
964
966
  F(() => {
965
- const N = (y) => {
967
+ const w = (y) => {
966
968
  y.key === "Escape" && p();
967
- }, w = (y) => {
968
- var g, b, S;
969
- const E = ((b = (g = y.composedPath) == null ? void 0 : g.call(y)) == null ? void 0 : b[0]) ?? y.target;
969
+ }, g = (y) => {
970
+ var N, _, S;
971
+ const E = ((_ = (N = y.composedPath) == null ? void 0 : N.call(y)) == null ? void 0 : _[0]) ?? y.target;
970
972
  l.current && !l.current.contains(E) && !((S = E.closest) != null && S.call(E, "[data-ds-portal]")) && p();
971
973
  };
972
- return document.addEventListener("keydown", N), document.addEventListener("mousedown", w), () => {
973
- document.removeEventListener("keydown", N), document.removeEventListener("mousedown", w);
974
+ return document.addEventListener("keydown", w), document.addEventListener("mousedown", g), () => {
975
+ document.removeEventListener("keydown", w), document.removeEventListener("mousedown", g);
974
976
  };
975
- }, [n, f]);
976
- const h = X.Children.toArray(t), u = h.find((N) => (N == null ? void 0 : N.type) === xe), v = h.filter((N) => (N == null ? void 0 : N.type) !== xe), j = /* @__PURE__ */ e.jsx(
977
+ }, [n, u]);
978
+ const h = X.Children.toArray(t), f = h.find((w) => (w == null ? void 0 : w.type) === xe), v = h.filter((w) => (w == null ? void 0 : w.type) !== xe), j = /* @__PURE__ */ e.jsx(
977
979
  "div",
978
980
  {
979
- className: ["ds-bottom-sheet-overlay", f && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
981
+ className: ["ds-bottom-sheet-overlay", u && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
980
982
  ...o,
981
983
  children: /* @__PURE__ */ e.jsxs(
982
984
  "div",
983
985
  {
984
986
  ref: l,
985
- className: ["ds-bottom-sheet", f && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
987
+ className: ["ds-bottom-sheet", u && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
986
988
  role: "dialog",
987
989
  "aria-modal": "true",
988
990
  "aria-labelledby": s ? c : void 0,
@@ -994,17 +996,17 @@ function Ps({
994
996
  className: "ds-bottom-sheet__close",
995
997
  variant: "ghost",
996
998
  size: "small",
997
- icon: /* @__PURE__ */ e.jsx(se, { size: q[2], strokeWidth: 1.5 }),
999
+ icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
998
1000
  onClick: p,
999
- "aria-label": r ?? i.close
1001
+ "aria-label": a ?? i.close
1000
1002
  }
1001
1003
  ),
1002
- (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
1004
+ (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
1003
1005
  s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-bottom-sheet__title", children: s }),
1004
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: a })
1006
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
1005
1007
  ] }),
1006
1008
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: v }),
1007
- u
1009
+ f
1008
1010
  ]
1009
1011
  }
1010
1012
  )
@@ -1016,18 +1018,18 @@ function Wt({
1016
1018
  children: t,
1017
1019
  title: s,
1018
1020
  defaultExpanded: n = !1,
1019
- expanded: a,
1020
- onToggle: r,
1021
+ expanded: r,
1022
+ onToggle: a,
1021
1023
  padding: o = "s",
1022
1024
  className: i = "",
1023
1025
  ...l
1024
1026
  }) {
1025
- const c = K(), f = s ?? c.code, [d, p] = P(n), h = a !== void 0, u = h ? a : d, v = () => {
1026
- h ? r == null || r(!a) : p((N) => !N);
1027
+ const c = K(), u = s ?? c.code, [d, p] = P(n), h = r !== void 0, f = h ? r : d, v = () => {
1028
+ h ? a == null || a(!r) : p((w) => !w);
1027
1029
  }, j = [
1028
1030
  "ds-code-accordion",
1029
1031
  `ds-code-accordion--${o}`,
1030
- u && "ds-code-accordion--expanded",
1032
+ f && "ds-code-accordion--expanded",
1031
1033
  i
1032
1034
  ].filter(Boolean).join(" ");
1033
1035
  return /* @__PURE__ */ e.jsxs("div", { className: j, ...l, children: [
@@ -1037,15 +1039,15 @@ function Wt({
1037
1039
  type: "button",
1038
1040
  className: "ds-code-accordion__header",
1039
1041
  onClick: v,
1040
- "aria-expanded": u,
1042
+ "aria-expanded": f,
1041
1043
  children: [
1042
- /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: f }),
1044
+ /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: u }),
1043
1045
  /* @__PURE__ */ e.jsx(
1044
- we,
1046
+ ye,
1045
1047
  {
1046
1048
  size: q[2],
1047
1049
  strokeWidth: 1.5,
1048
- className: `ds-code-accordion__icon ${u ? "ds-code-accordion__icon--expanded" : ""}`
1050
+ className: `ds-code-accordion__icon ${f ? "ds-code-accordion__icon--expanded" : ""}`
1049
1051
  }
1050
1052
  )
1051
1053
  ]
@@ -1054,46 +1056,46 @@ function Wt({
1054
1056
  /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
1055
1057
  ] });
1056
1058
  }
1057
- function Ms({ children: t, block: s = !1, collapsible: n = !1, title: a, defaultExpanded: r = !1, ...o }) {
1058
- const i = K(), l = a ?? i.code;
1059
- return s ? n ? /* @__PURE__ */ e.jsx(Wt, { title: l, defaultExpanded: r, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
1059
+ function Ms({ children: t, block: s = !1, collapsible: n = !1, title: r, defaultExpanded: a = !1, ...o }) {
1060
+ const i = K(), l = r ?? i.code;
1061
+ return s ? n ? /* @__PURE__ */ e.jsx(Wt, { title: l, defaultExpanded: a, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
1060
1062
  }
1061
- function zs({ href: t, children: s, onClick: n, target: a, rel: r, ...o }) {
1062
- const l = a === "_blank" ? r ? `${r} noopener noreferrer` : "noopener noreferrer" : r;
1063
+ function zs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
1064
+ const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
1063
1065
  return /* @__PURE__ */ e.jsx(
1064
1066
  "a",
1065
1067
  {
1066
1068
  href: t,
1067
1069
  className: "ds-link",
1068
1070
  onClick: n,
1069
- target: a,
1071
+ target: r,
1070
1072
  rel: l,
1071
1073
  ...o,
1072
1074
  children: s
1073
1075
  }
1074
1076
  );
1075
1077
  }
1076
- function Fs({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
1077
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: X.Children.map(t, (r) => X.isValidElement(r) ? X.cloneElement(r, { size: s, variant: n }) : r) });
1078
+ function Fs({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
1079
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: X.Children.map(t, (a) => X.isValidElement(a) ? X.cloneElement(a, { size: s, variant: n }) : a) });
1078
1080
  }
1079
- function Ws({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: r = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
1080
- const f = i && !t, d = [
1081
+ function Ws({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
1082
+ const u = i && !t, d = [
1081
1083
  "ds-tab",
1082
- `ds-tab--${a}`,
1083
1084
  `ds-tab--${r}`,
1085
+ `ds-tab--${a}`,
1084
1086
  s && "ds-tab--selected",
1085
- f && "ds-tab--icon-only"
1087
+ u && "ds-tab--icon-only"
1086
1088
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1087
1089
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
1088
1090
  t
1089
1091
  ] });
1090
1092
  if (l) {
1091
- const h = (u) => {
1093
+ const h = (f) => {
1092
1094
  if (o) {
1093
- u.preventDefault();
1095
+ f.preventDefault();
1094
1096
  return;
1095
1097
  }
1096
- u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), n == null || n(u));
1098
+ f.metaKey || f.ctrlKey || f.button === 1 || (f.preventDefault(), n == null || n(f));
1097
1099
  };
1098
1100
  return /* @__PURE__ */ e.jsx(
1099
1101
  "a",
@@ -1122,36 +1124,120 @@ function Ws({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
1122
1124
  }
1123
1125
  );
1124
1126
  }
1125
- function Cs({ options: t, value: s, onChange: n, size: a = "m", disabled: r = !1 }) {
1126
- const o = B(null), i = B(null), [l, c] = P(!1), f = B(!1), d = B(null), p = B(null), h = () => {
1127
+ function Os({ children: t, className: s = "", ...n }) {
1128
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-browser-pane", s].filter(Boolean).join(" "), ...n, children: t });
1129
+ }
1130
+ function Cs({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ...o }) {
1131
+ const { t: i } = be();
1132
+ return /* @__PURE__ */ e.jsx(
1133
+ "div",
1134
+ {
1135
+ className: ["ds-browser-tabs", a].filter(Boolean).join(" "),
1136
+ role: "tablist",
1137
+ ...o,
1138
+ children: t.map((l) => {
1139
+ const c = l.id === s, u = !!l.closable;
1140
+ return /* @__PURE__ */ e.jsxs(
1141
+ "div",
1142
+ {
1143
+ className: [
1144
+ "ds-browser-tab",
1145
+ c && "ds-browser-tab--active",
1146
+ u && "ds-browser-tab--closable"
1147
+ ].filter(Boolean).join(" "),
1148
+ title: l.label,
1149
+ children: [
1150
+ /* @__PURE__ */ e.jsxs(
1151
+ "button",
1152
+ {
1153
+ type: "button",
1154
+ role: "tab",
1155
+ "aria-selected": c,
1156
+ className: "ds-browser-tab__hit",
1157
+ onClick: () => n == null ? void 0 : n(l.id),
1158
+ children: [
1159
+ l.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-browser-tab__icon", "aria-hidden": !0, children: l.icon }) : null,
1160
+ /* @__PURE__ */ e.jsx("span", { className: "ds-browser-tab__label", children: l.label })
1161
+ ]
1162
+ }
1163
+ ),
1164
+ u ? /* @__PURE__ */ e.jsx(
1165
+ "button",
1166
+ {
1167
+ type: "button",
1168
+ className: "ds-browser-tab__close",
1169
+ "aria-label": i("closeTab", { label: l.label }),
1170
+ onClick: (d) => {
1171
+ d.stopPropagation(), r == null || r(l.id);
1172
+ },
1173
+ children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
1174
+ }
1175
+ ) : null
1176
+ ]
1177
+ },
1178
+ l.id
1179
+ );
1180
+ })
1181
+ }
1182
+ );
1183
+ }
1184
+ function Us({ children: t, className: s = "", ...n }) {
1185
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-list", s].filter(Boolean).join(" "), role: "list", ...n, children: t });
1186
+ }
1187
+ function Hs({
1188
+ icon: t,
1189
+ title: s,
1190
+ subtitle: n,
1191
+ meta: r,
1192
+ onClick: a,
1193
+ className: o = "",
1194
+ ...i
1195
+ }) {
1196
+ const l = r == null ? [] : Array.isArray(r) ? r : [r], c = [
1197
+ "ds-list-row",
1198
+ !t && "ds-list-row--no-icon",
1199
+ a && "ds-list-row--interactive",
1200
+ o
1201
+ ].filter(Boolean).join(" "), u = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1202
+ t ? /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__icon", "aria-hidden": !0, children: t }) : null,
1203
+ /* @__PURE__ */ e.jsxs("span", { className: "ds-list-row__name", children: [
1204
+ /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__title", children: s }),
1205
+ n ? /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__subtitle", children: n }) : null
1206
+ ] }),
1207
+ l.map((d, p) => /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__meta", children: d }, p))
1208
+ ] });
1209
+ return a ? /* @__PURE__ */ e.jsx("button", { type: "button", role: "listitem", className: c, onClick: a, ...i, children: u }) : /* @__PURE__ */ e.jsx("div", { role: "listitem", className: c, ...i, children: u });
1210
+ }
1211
+ function Vs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1212
+ const o = I(null), i = I(null), [l, c] = P(!1), u = I(!1), d = I(null), p = I(null), h = () => {
1127
1213
  if (!o.current) return;
1128
- const u = o.current.querySelector(`[data-value="${s}"]`);
1129
- if (!u) return;
1130
- const v = o.current.getBoundingClientRect(), j = u.getBoundingClientRect(), N = j.left - v.left, w = j.width;
1131
- i.current ? (i.current.style.transition = f.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = N + "px", i.current.style.width = w + "px", f.current = !1) : (c(!0), requestAnimationFrame(() => {
1214
+ const f = o.current.querySelector(`[data-value="${s}"]`);
1215
+ if (!f) return;
1216
+ const v = o.current.getBoundingClientRect(), j = f.getBoundingClientRect(), w = j.left - v.left, g = j.width;
1217
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = w + "px", i.current.style.width = g + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1132
1218
  if (!i.current || !o.current) return;
1133
1219
  const y = o.current.querySelector(`[data-value="${s}"]`);
1134
1220
  if (!y) return;
1135
- const E = o.current.getBoundingClientRect(), g = y.getBoundingClientRect();
1136
- i.current.style.transition = "none", i.current.style.left = g.left - E.left + "px", i.current.style.width = g.width + "px";
1221
+ const E = o.current.getBoundingClientRect(), N = y.getBoundingClientRect();
1222
+ i.current.style.transition = "none", i.current.style.left = N.left - E.left + "px", i.current.style.width = N.width + "px";
1137
1223
  }));
1138
1224
  };
1139
1225
  return p.current = h, it(() => {
1140
- const u = d.current !== s;
1141
- d.current = s, f.current = l && u, h();
1226
+ const f = d.current !== s;
1227
+ d.current = s, u.current = l && f, h();
1142
1228
  }), F(() => {
1143
1229
  if (!o.current) return;
1144
- const u = new ResizeObserver(() => {
1145
- f.current = !1, p.current();
1230
+ const f = new ResizeObserver(() => {
1231
+ u.current = !1, p.current();
1146
1232
  });
1147
- return u.observe(o.current), () => u.disconnect();
1233
+ return f.observe(o.current), () => f.disconnect();
1148
1234
  }, []), /* @__PURE__ */ e.jsxs(
1149
1235
  "div",
1150
1236
  {
1151
1237
  className: [
1152
1238
  "ds-seg",
1153
- `ds-seg--${a}`,
1154
- r && "ds-seg--disabled"
1239
+ `ds-seg--${r}`,
1240
+ a && "ds-seg--disabled"
1155
1241
  ].filter(Boolean).join(" "),
1156
1242
  ref: o,
1157
1243
  role: "group",
@@ -1164,37 +1250,37 @@ function Cs({ options: t, value: s, onChange: n, size: a = "m", disabled: r = !1
1164
1250
  "aria-hidden": "true"
1165
1251
  }
1166
1252
  ),
1167
- t.map((u) => /* @__PURE__ */ e.jsxs(
1253
+ t.map((f) => /* @__PURE__ */ e.jsxs(
1168
1254
  "button",
1169
1255
  {
1170
1256
  type: "button",
1171
- "data-value": u.value,
1172
- className: ["ds-seg__btn", s === u.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1173
- onClick: () => !r && n(u.value),
1174
- "aria-pressed": s === u.value,
1175
- disabled: r,
1257
+ "data-value": f.value,
1258
+ className: ["ds-seg__btn", s === f.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1259
+ onClick: () => !a && n(f.value),
1260
+ "aria-pressed": s === f.value,
1261
+ disabled: a,
1176
1262
  children: [
1177
- u.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: u.icon }),
1178
- u.label
1263
+ f.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: f.icon }),
1264
+ f.label
1179
1265
  ]
1180
1266
  },
1181
- u.value
1267
+ f.value
1182
1268
  ))
1183
1269
  ]
1184
1270
  }
1185
1271
  );
1186
1272
  }
1187
- function Oe({
1273
+ function Ce({
1188
1274
  children: t,
1189
1275
  title: s,
1190
1276
  defaultExpanded: n = !1,
1191
- expanded: a,
1192
- onToggle: r,
1277
+ expanded: r,
1278
+ onToggle: a,
1193
1279
  padding: o = "m",
1194
1280
  ...i
1195
1281
  }) {
1196
- const [l, c] = P(n), f = a !== void 0, d = f ? a : l, p = () => {
1197
- f ? r == null || r(!a) : c((u) => !u);
1282
+ const [l, c] = P(n), u = r !== void 0, d = u ? r : l, p = () => {
1283
+ u ? a == null || a(!r) : c((f) => !f);
1198
1284
  }, h = [
1199
1285
  "ds-accordion",
1200
1286
  `ds-accordion--${o}`,
@@ -1211,7 +1297,7 @@ function Oe({
1211
1297
  children: [
1212
1298
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
1213
1299
  /* @__PURE__ */ e.jsx(
1214
- we,
1300
+ ye,
1215
1301
  {
1216
1302
  size: q[2],
1217
1303
  strokeWidth: 1.5,
@@ -1225,64 +1311,64 @@ function Oe({
1225
1311
  ] });
1226
1312
  }
1227
1313
  const ce = 8, pe = 8;
1228
- function Ct(t, s, n) {
1229
- const a = window.innerWidth;
1230
- let r, o;
1314
+ function Ot(t, s, n) {
1315
+ const r = window.innerWidth;
1316
+ let a, o;
1231
1317
  switch (t) {
1232
1318
  case "top":
1233
- r = s.top - n.height - ce, o = s.left + s.width / 2 - n.width / 2;
1319
+ a = s.top - n.height - ce, o = s.left + s.width / 2 - n.width / 2;
1234
1320
  break;
1235
1321
  case "bottom":
1236
- r = s.bottom + ce, o = s.left + s.width / 2 - n.width / 2;
1322
+ a = s.bottom + ce, o = s.left + s.width / 2 - n.width / 2;
1237
1323
  break;
1238
1324
  case "left":
1239
- r = s.top + s.height / 2 - n.height / 2, o = s.left - n.width - ce;
1325
+ a = s.top + s.height / 2 - n.height / 2, o = s.left - n.width - ce;
1240
1326
  break;
1241
1327
  case "right":
1242
- r = s.top + s.height / 2 - n.height / 2, o = s.right + ce;
1328
+ a = s.top + s.height / 2 - n.height / 2, o = s.right + ce;
1243
1329
  break;
1244
1330
  default:
1245
- r = s.bottom + ce, o = s.left;
1331
+ a = s.bottom + ce, o = s.left;
1246
1332
  }
1247
- const i = Math.max(pe, Math.min(a - n.width - pe, o)), l = o - i;
1248
- return { top: r, left: i, arrowOffset: l };
1333
+ const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
1334
+ return { top: a, left: i, arrowOffset: l };
1249
1335
  }
1250
- function Ot(t, s, n) {
1251
- const a = window.innerWidth, r = window.innerHeight;
1336
+ function Ct(t, s, n) {
1337
+ const r = window.innerWidth, a = window.innerHeight;
1252
1338
  if (t.top >= s + ce + pe) return "top";
1253
- if (r - t.bottom >= s + ce + pe) return "bottom";
1254
- if (a - t.right >= n + ce + pe) return "right";
1339
+ if (a - t.bottom >= s + ce + pe) return "bottom";
1340
+ if (r - t.right >= n + ce + pe) return "right";
1255
1341
  if (t.left >= n + ce + pe) return "left";
1256
- const o = Math.max(t.top, r - t.bottom, t.left, a - t.right);
1257
- return o === t.top ? "top" : o === r - t.bottom ? "bottom" : o === a - t.right ? "right" : "left";
1342
+ const o = Math.max(t.top, a - t.bottom, t.left, r - t.right);
1343
+ return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1258
1344
  }
1259
- function Ue({ children: t, content: s, position: n, ...a }) {
1260
- const [r, o] = P(!1), [i, l] = P({ visibility: "hidden" }), [c, f] = P(n || "top"), d = B(null), p = B(null), h = B(!1), u = () => {
1345
+ function Ue({ children: t, content: s, position: n, ...r }) {
1346
+ const [a, o] = P(!1), [i, l] = P({ visibility: "hidden" }), [c, u] = P(n || "top"), d = I(null), p = I(null), h = I(!1), f = () => {
1261
1347
  if (!d.current || !p.current) return;
1262
- const j = d.current.getBoundingClientRect(), N = p.current.getBoundingClientRect(), w = n || Ot(j, N.height, N.width), { top: y, left: E, arrowOffset: g } = Ct(w, j, N);
1263
- f(w), l({
1348
+ const j = d.current.getBoundingClientRect(), w = p.current.getBoundingClientRect(), g = n || Ct(j, w.height, w.width), { top: y, left: E, arrowOffset: N } = Ot(g, j, w);
1349
+ u(g), l({
1264
1350
  position: "fixed",
1265
1351
  top: y,
1266
1352
  left: E,
1267
1353
  visibility: "visible",
1268
- "--arrow-offset": `${g}px`
1354
+ "--arrow-offset": `${N}px`
1269
1355
  });
1270
1356
  };
1271
1357
  if (F(() => {
1272
- if (!r) return;
1358
+ if (!a) return;
1273
1359
  l({ position: "fixed", visibility: "hidden" });
1274
- const j = requestAnimationFrame(u);
1275
- return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1276
- cancelAnimationFrame(j), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1360
+ const j = requestAnimationFrame(f);
1361
+ return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1362
+ cancelAnimationFrame(j), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1277
1363
  };
1278
- }, [r, n]), F(() => {
1279
- if (!r) return;
1280
- const j = (N) => {
1281
- d.current && !d.current.contains(N.target) && o(!1);
1364
+ }, [a, n]), F(() => {
1365
+ if (!a) return;
1366
+ const j = (w) => {
1367
+ d.current && !d.current.contains(w.target) && o(!1);
1282
1368
  };
1283
1369
  return document.addEventListener("touchstart", j), () => document.removeEventListener("touchstart", j);
1284
- }, [r]), !s) return t;
1285
- const v = r && /* @__PURE__ */ e.jsx(
1370
+ }, [a]), !s) return t;
1371
+ const v = a && /* @__PURE__ */ e.jsx(
1286
1372
  "div",
1287
1373
  {
1288
1374
  ref: p,
@@ -1307,7 +1393,7 @@ function Ue({ children: t, content: s, position: n, ...a }) {
1307
1393
  onTouchStart: () => {
1308
1394
  h.current = !0, o((j) => !j);
1309
1395
  },
1310
- ...a,
1396
+ ...r,
1311
1397
  children: [
1312
1398
  t,
1313
1399
  typeof document < "u" && re.createPortal(v, document.body)
@@ -1320,32 +1406,32 @@ function Je(t) {
1320
1406
  const s = String(t ?? "").replace(/^@/, "").trim();
1321
1407
  return s ? `@${s}` : "";
1322
1408
  }
1323
- function Os({
1409
+ function Ys({
1324
1410
  label: t,
1325
1411
  children: s,
1326
1412
  mode: n = "click",
1327
- avatar: a,
1328
- name: r,
1413
+ avatar: r,
1414
+ name: a,
1329
1415
  handle: o,
1330
1416
  description: i,
1331
1417
  actions: l,
1332
1418
  className: c = "",
1333
- popoverClassName: f = "",
1419
+ popoverClassName: u = "",
1334
1420
  ...d
1335
1421
  }) {
1336
- const p = xt(), h = B(null), u = B(null), v = B(null), [j, N] = P(!1), [w, y] = P(null), E = s != null, g = r || t || "", b = Je(t || r), S = Je(o), A = te(() => {
1422
+ const p = xt(), h = I(null), f = I(null), v = I(null), [j, w] = P(!1), [g, y] = P(null), E = s != null, N = a || t || "", _ = Je(t || a), S = Je(o), A = se(() => {
1337
1423
  v.current != null && (window.clearTimeout(v.current), v.current = null);
1338
- }, []), D = te(() => {
1339
- A(), N(!0);
1340
- }, [A]), C = te(() => {
1341
- A(), v.current = window.setTimeout(() => N(!1), Ut);
1342
- }, [A]), k = te(() => {
1343
- const W = h.current, M = u.current;
1424
+ }, []), L = se(() => {
1425
+ A(), w(!0);
1426
+ }, [A]), O = se(() => {
1427
+ A(), v.current = window.setTimeout(() => w(!1), Ut);
1428
+ }, [A]), k = se(() => {
1429
+ const W = h.current, M = f.current;
1344
1430
  if (!W) return;
1345
- const _ = W.getBoundingClientRect(), $ = (M == null ? void 0 : M.offsetHeight) ?? 160, R = (M == null ? void 0 : M.offsetWidth) ?? 260;
1346
- let V = _.bottom + Xe;
1347
- V + $ > window.innerHeight - Ee && (V = Math.max(Ee, _.top - $ - Xe));
1348
- const H = Math.max(Ee, Math.min(_.left, window.innerWidth - R - Ee));
1431
+ const b = W.getBoundingClientRect(), $ = (M == null ? void 0 : M.offsetHeight) ?? 160, R = (M == null ? void 0 : M.offsetWidth) ?? 260;
1432
+ let V = b.bottom + Xe;
1433
+ V + $ > window.innerHeight - Ee && (V = Math.max(Ee, b.top - $ - Xe));
1434
+ const H = Math.max(Ee, Math.min(b.left, window.innerWidth - R - Ee));
1349
1435
  y({ top: V, left: H });
1350
1436
  }, []);
1351
1437
  it(() => {
@@ -1353,39 +1439,39 @@ function Os({
1353
1439
  }, [j, k]), F(() => {
1354
1440
  if (!j) return;
1355
1441
  const W = () => k(), M = ($) => {
1356
- $.key === "Escape" && N(!1);
1357
- }, _ = ($) => {
1442
+ $.key === "Escape" && w(!1);
1443
+ }, b = ($) => {
1358
1444
  var V, H;
1359
1445
  if (n === "hover") return;
1360
1446
  const R = $.target;
1361
- (V = u.current) != null && V.contains(R) || (H = h.current) != null && H.contains(R) || N(!1);
1447
+ (V = f.current) != null && V.contains(R) || (H = h.current) != null && H.contains(R) || w(!1);
1362
1448
  };
1363
- return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("keydown", M), document.addEventListener("mousedown", _), () => {
1364
- window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("keydown", M), document.removeEventListener("mousedown", _);
1449
+ return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("keydown", M), document.addEventListener("mousedown", b), () => {
1450
+ window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("keydown", M), document.removeEventListener("mousedown", b);
1365
1451
  };
1366
1452
  }, [j, k, n]), F(() => () => A(), [A]);
1367
- const L = n === "hover" ? { onMouseEnter: D, onMouseLeave: C } : {}, O = j ? re.createPortal(
1453
+ const D = n === "hover" ? { onMouseEnter: L, onMouseLeave: O } : {}, C = j ? re.createPortal(
1368
1454
  /* @__PURE__ */ e.jsxs(
1369
1455
  "div",
1370
1456
  {
1371
- ref: u,
1457
+ ref: f,
1372
1458
  id: p,
1373
1459
  role: "dialog",
1374
- "aria-label": g || b || "Mention",
1460
+ "aria-label": N || _ || "Mention",
1375
1461
  "data-ds-portal": "",
1376
- className: ["ds-mention__popover", f].filter(Boolean).join(" "),
1377
- style: w ? { top: w.top, left: w.left } : { top: -9999, left: -9999, visibility: "hidden" },
1378
- ...L,
1462
+ className: ["ds-mention__popover", u].filter(Boolean).join(" "),
1463
+ style: g ? { top: g.top, left: g.left } : { top: -9999, left: -9999, visibility: "hidden" },
1464
+ ...D,
1379
1465
  children: [
1380
- (a || g || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1381
- a,
1382
- (g || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1383
- g ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: g }) : null,
1466
+ (r || N || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1467
+ r,
1468
+ (N || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1469
+ N ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: N }) : null,
1384
1470
  S ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: S }) : null
1385
1471
  ] })
1386
1472
  ] }),
1387
1473
  i ? /* @__PURE__ */ e.jsx("p", { className: "ds-mention__desc", children: i }) : null,
1388
- l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => N(!1), children: l }) : null
1474
+ l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => w(!1), children: l }) : null
1389
1475
  ]
1390
1476
  }
1391
1477
  ),
@@ -1405,38 +1491,38 @@ function Os({
1405
1491
  ].filter(Boolean).join(" "),
1406
1492
  "aria-expanded": j,
1407
1493
  "aria-haspopup": "dialog",
1408
- "aria-label": E && (b || g) || void 0,
1494
+ "aria-label": E && (_ || N) || void 0,
1409
1495
  "aria-controls": j ? p : void 0,
1410
1496
  onClick: (W) => {
1411
1497
  var M;
1412
1498
  if ((M = d.onClick) == null || M.call(d, W), !W.defaultPrevented) {
1413
1499
  if (W.preventDefault(), W.stopPropagation(), n === "hover") {
1414
- D();
1500
+ L();
1415
1501
  return;
1416
1502
  }
1417
- N((_) => !_);
1503
+ w((b) => !b);
1418
1504
  }
1419
1505
  },
1420
- ...L,
1421
- children: E ? s : b
1506
+ ...D,
1507
+ children: E ? s : _
1422
1508
  }
1423
1509
  ),
1424
- typeof document < "u" ? O : null
1510
+ typeof document < "u" ? C : null
1425
1511
  ] });
1426
1512
  }
1427
- function Us({
1513
+ function qs({
1428
1514
  checked: t = !1,
1429
1515
  onChange: s,
1430
1516
  size: n = "m",
1431
- disabled: a = !1,
1432
- label: r,
1517
+ disabled: r = !1,
1518
+ label: a,
1433
1519
  id: o,
1434
1520
  ...i
1435
1521
  }) {
1436
1522
  const l = o || `toggle-${X.useId()}`, c = [
1437
1523
  "ds-toggle",
1438
1524
  `ds-toggle--${n}`,
1439
- a && "ds-toggle--disabled"
1525
+ r && "ds-toggle--disabled"
1440
1526
  ].filter(Boolean).join(" ");
1441
1527
  return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1442
1528
  /* @__PURE__ */ e.jsx(
@@ -1446,29 +1532,29 @@ function Us({
1446
1532
  id: l,
1447
1533
  className: "ds-toggle__input",
1448
1534
  checked: t,
1449
- onChange: (f) => s == null ? void 0 : s(f.target.checked),
1450
- disabled: a,
1535
+ onChange: (u) => s == null ? void 0 : s(u.target.checked),
1536
+ disabled: r,
1451
1537
  ...i
1452
1538
  }
1453
1539
  ),
1454
1540
  /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
1455
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: r })
1541
+ a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1456
1542
  ] });
1457
1543
  }
1458
- function Hs({
1544
+ function Gs({
1459
1545
  checked: t = !1,
1460
1546
  onChange: s,
1461
1547
  size: n = "m",
1462
- disabled: a = !1,
1463
- label: r,
1548
+ disabled: r = !1,
1549
+ label: a,
1464
1550
  id: o,
1465
1551
  ...i
1466
1552
  }) {
1467
1553
  const l = o || `checkbox-${X.useId()}`, c = [
1468
1554
  "ds-checkbox",
1469
1555
  `ds-checkbox--${n}`,
1470
- a && "ds-checkbox--disabled"
1471
- ].filter(Boolean).join(" "), f = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1556
+ r && "ds-checkbox--disabled"
1557
+ ].filter(Boolean).join(" "), u = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1472
1558
  return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1473
1559
  /* @__PURE__ */ e.jsx(
1474
1560
  "input",
@@ -1478,73 +1564,73 @@ function Hs({
1478
1564
  className: "ds-checkbox__input",
1479
1565
  checked: t,
1480
1566
  onChange: (d) => s == null ? void 0 : s(d.target.checked),
1481
- disabled: a,
1567
+ disabled: r,
1482
1568
  ...i
1483
1569
  }
1484
1570
  ),
1485
1571
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1486
1572
  Pe,
1487
1573
  {
1488
- size: f,
1574
+ size: u,
1489
1575
  strokeWidth: 2.5,
1490
1576
  className: "ds-checkbox__icon"
1491
1577
  }
1492
1578
  ) }),
1493
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: r })
1579
+ a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1494
1580
  ] });
1495
1581
  }
1496
- function Vs({
1582
+ function Ks({
1497
1583
  checked: t = !1,
1498
1584
  onChange: s,
1499
1585
  size: n = "m",
1500
- disabled: a = !1,
1501
- label: r,
1586
+ disabled: r = !1,
1587
+ label: a,
1502
1588
  name: o,
1503
1589
  value: i,
1504
1590
  id: l,
1505
1591
  ...c
1506
1592
  }) {
1507
- const f = l || `radio-${X.useId()}`, d = [
1593
+ const u = l || `radio-${X.useId()}`, d = [
1508
1594
  "ds-radio",
1509
1595
  `ds-radio--${n}`,
1510
- a && "ds-radio--disabled"
1596
+ r && "ds-radio--disabled"
1511
1597
  ].filter(Boolean).join(" ");
1512
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: f, children: [
1598
+ return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: u, children: [
1513
1599
  /* @__PURE__ */ e.jsx(
1514
1600
  "input",
1515
1601
  {
1516
1602
  type: "radio",
1517
- id: f,
1603
+ id: u,
1518
1604
  className: "ds-radio__input",
1519
1605
  checked: t,
1520
1606
  onChange: (p) => s == null ? void 0 : s(p.target.checked),
1521
- disabled: a,
1607
+ disabled: r,
1522
1608
  name: o,
1523
1609
  value: i,
1524
1610
  ...c
1525
1611
  }
1526
1612
  ),
1527
1613
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1528
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: r })
1614
+ a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1529
1615
  ] });
1530
1616
  }
1531
- function Ht({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: r = "", style: o = {}, ...i }) {
1617
+ function Ht({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1532
1618
  return /* @__PURE__ */ e.jsx(
1533
1619
  "span",
1534
1620
  {
1535
- className: ["ds-skeleton", `ds-skeleton--${n}`, r].filter(Boolean).join(" "),
1536
- style: { width: t, height: s, aspectRatio: a, ...o },
1621
+ className: ["ds-skeleton", `ds-skeleton--${n}`, a].filter(Boolean).join(" "),
1622
+ style: { width: t, height: s, aspectRatio: r, ...o },
1537
1623
  "aria-hidden": "true",
1538
1624
  ...i
1539
1625
  }
1540
1626
  );
1541
1627
  }
1542
- function Vt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: r = {}, ...o }) {
1628
+ function Vt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1543
1629
  return /* @__PURE__ */ e.jsx(
1544
1630
  "span",
1545
1631
  {
1546
- className: ["ds-skeleton-text", a].filter(Boolean).join(" "),
1547
- style: { gap: n, ...r },
1632
+ className: ["ds-skeleton-text", r].filter(Boolean).join(" "),
1633
+ style: { gap: n, ...a },
1548
1634
  "aria-hidden": "true",
1549
1635
  ...o,
1550
1636
  children: Array.from({ length: t }, (i, l) => /* @__PURE__ */ e.jsx(
@@ -1570,42 +1656,42 @@ function qt(t) {
1570
1656
  const s = t.trim().split(/\s+/);
1571
1657
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1572
1658
  }
1573
- function Ys({ seed: t, icon: s, src: n, size: a = 32, className: r = "", style: o = {}, ...i }) {
1574
- const l = Yt(t ?? ""), [c, f] = P(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: qt(t) });
1659
+ function Xs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1660
+ const l = Yt(t ?? ""), [c, u] = P(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: qt(t) });
1575
1661
  return /* @__PURE__ */ e.jsx(
1576
1662
  "div",
1577
1663
  {
1578
- className: ["ds-avatar", r].filter(Boolean).join(" "),
1579
- style: { width: a, height: a, "--ds-avatar-h": l, ...o },
1664
+ className: ["ds-avatar", a].filter(Boolean).join(" "),
1665
+ style: { width: r, height: r, "--ds-avatar-h": l, ...o },
1580
1666
  "aria-hidden": "true",
1581
1667
  ...i,
1582
- children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => f(!0) }) : d
1668
+ children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => u(!0) }) : d
1583
1669
  }
1584
1670
  );
1585
1671
  }
1586
- function qs({
1672
+ function Js({
1587
1673
  children: t,
1588
1674
  size: s = "compact",
1589
1675
  stickyTop: n,
1590
- maxHeight: a,
1591
- className: r = "",
1676
+ maxHeight: r,
1677
+ className: a = "",
1592
1678
  style: o = {},
1593
1679
  ...i
1594
1680
  }) {
1595
1681
  const l = {
1596
- ...a ? { maxHeight: a } : {},
1682
+ ...r ? { maxHeight: r } : {},
1597
1683
  ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1598
1684
  ...o
1599
1685
  };
1600
1686
  return /* @__PURE__ */ e.jsx(
1601
1687
  "div",
1602
1688
  {
1603
- className: ["ds-table-wrap", "ds-scrollable", a ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1689
+ className: ["ds-table-wrap", "ds-scrollable", r ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1604
1690
  style: l,
1605
1691
  children: /* @__PURE__ */ e.jsx(
1606
1692
  "table",
1607
1693
  {
1608
- className: ["ds-table", `ds-table--${s}`, r].filter(Boolean).join(" "),
1694
+ className: ["ds-table", `ds-table--${s}`, a].filter(Boolean).join(" "),
1609
1695
  ...i,
1610
1696
  children: t
1611
1697
  }
@@ -1613,13 +1699,13 @@ function qs({
1613
1699
  }
1614
1700
  );
1615
1701
  }
1616
- function Gs({ children: t, ...s }) {
1702
+ function Zs({ children: t, ...s }) {
1617
1703
  return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
1618
1704
  }
1619
- function Ks({ children: t, ...s }) {
1705
+ function Qs({ children: t, ...s }) {
1620
1706
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1621
1707
  }
1622
- function Xs({ children: t, interactive: s, selected: n, subheader: a, exiting: r, updated: o, className: i = "", onClick: l, ...c }) {
1708
+ function en({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
1623
1709
  return /* @__PURE__ */ e.jsx(
1624
1710
  "tr",
1625
1711
  {
@@ -1627,8 +1713,8 @@ function Xs({ children: t, interactive: s, selected: n, subheader: a, exiting: r
1627
1713
  "ds-table-row",
1628
1714
  s || l ? "ds-table-row--interactive" : "",
1629
1715
  n ? "ds-table-row--selected" : "",
1630
- a ? "ds-table-row--subheader" : "",
1631
- r ? "ds-table-row--exiting" : "",
1716
+ r ? "ds-table-row--subheader" : "",
1717
+ a ? "ds-table-row--exiting" : "",
1632
1718
  o ? "ds-table-row--updated" : "",
1633
1719
  i
1634
1720
  ].filter(Boolean).join(" "),
@@ -1638,11 +1724,11 @@ function Xs({ children: t, interactive: s, selected: n, subheader: a, exiting: r
1638
1724
  }
1639
1725
  );
1640
1726
  }
1641
- function Js({ children: t, colSpan: s = 999, ...n }) {
1727
+ function tn({ children: t, colSpan: s = 999, ...n }) {
1642
1728
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1643
1729
  }
1644
- function Zs({ children: t, align: s = "left", sortDir: n, onSort: a, width: r, className: o = "", style: i = {}, ...l }) {
1645
- const c = !!a || n !== void 0, f = n === "asc" ? bt : n === "desc" ? we : jt;
1730
+ function sn({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1731
+ const c = !!r || n !== void 0, u = n === "asc" ? _t : n === "desc" ? ye : jt;
1646
1732
  return /* @__PURE__ */ e.jsx(
1647
1733
  "th",
1648
1734
  {
@@ -1653,17 +1739,17 @@ function Zs({ children: t, align: s = "left", sortDir: n, onSort: a, width: r, c
1653
1739
  s !== "left" ? `ds-table-cell--${s}` : "",
1654
1740
  o
1655
1741
  ].filter(Boolean).join(" "),
1656
- onClick: a,
1657
- style: { width: r, ...i },
1742
+ onClick: r,
1743
+ style: { width: a, ...i },
1658
1744
  ...l,
1659
1745
  children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1660
1746
  t,
1661
- /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(f, { size: 11, strokeWidth: 2.5 }) })
1747
+ /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(u, { size: 11, strokeWidth: 2.5 }) })
1662
1748
  ] }) : t
1663
1749
  }
1664
1750
  );
1665
1751
  }
1666
- function Qs({ children: t, align: s = "left", secondary: n, muted: a, truncate: r, nowrap: o, className: i = "", ...l }) {
1752
+ function nn({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1667
1753
  return /* @__PURE__ */ e.jsx(
1668
1754
  "td",
1669
1755
  {
@@ -1671,8 +1757,8 @@ function Qs({ children: t, align: s = "left", secondary: n, muted: a, truncate:
1671
1757
  "ds-td",
1672
1758
  s !== "left" ? `ds-table-cell--${s}` : "",
1673
1759
  n ? "ds-table-cell--secondary" : "",
1674
- a ? "ds-table-cell--muted" : "",
1675
- r ? "ds-table-cell--truncate" : "",
1760
+ r ? "ds-table-cell--muted" : "",
1761
+ a ? "ds-table-cell--truncate" : "",
1676
1762
  o ? "ds-table-cell--nowrap" : "",
1677
1763
  i
1678
1764
  ].filter(Boolean).join(" "),
@@ -1681,69 +1767,69 @@ function Qs({ children: t, align: s = "left", secondary: n, muted: a, truncate:
1681
1767
  }
1682
1768
  );
1683
1769
  }
1684
- function en({
1770
+ function rn({
1685
1771
  icon: t,
1686
1772
  title: s,
1687
1773
  description: n,
1688
- action: a,
1689
- size: r = "m",
1774
+ action: r,
1775
+ size: a = "m",
1690
1776
  className: o = "",
1691
1777
  ...i
1692
1778
  }) {
1693
1779
  return /* @__PURE__ */ e.jsxs(
1694
1780
  "div",
1695
1781
  {
1696
- className: ["ds-empty-state", `ds-empty-state--${r}`, o].filter(Boolean).join(" "),
1782
+ className: ["ds-empty-state", `ds-empty-state--${a}`, o].filter(Boolean).join(" "),
1697
1783
  ...i,
1698
1784
  children: [
1699
1785
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: t }),
1700
1786
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: s }),
1701
1787
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
1702
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: a })
1788
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: r })
1703
1789
  ]
1704
1790
  }
1705
1791
  );
1706
1792
  }
1707
- function tn({
1793
+ function an({
1708
1794
  label: t,
1709
1795
  hint: s,
1710
1796
  error: n,
1711
- required: a = !1,
1712
- disabled: r = !1,
1797
+ required: r = !1,
1798
+ disabled: a = !1,
1713
1799
  htmlFor: o,
1714
1800
  children: i,
1715
1801
  className: l = "",
1716
1802
  style: c,
1717
- ...f
1803
+ ...u
1718
1804
  }) {
1719
- const d = X.useId(), p = o ?? d, h = `${p}-hint`, u = `${p}-error`;
1805
+ const d = X.useId(), p = o ?? d, h = `${p}-hint`, f = `${p}-error`;
1720
1806
  return /* @__PURE__ */ e.jsxs(
1721
1807
  "div",
1722
1808
  {
1723
1809
  className: `ds-field${l ? ` ${l}` : ""}`,
1724
1810
  "data-state": n ? "error" : void 0,
1725
- "data-required": a ? "" : void 0,
1726
- "data-disabled": r ? "" : void 0,
1811
+ "data-required": r ? "" : void 0,
1812
+ "data-disabled": a ? "" : void 0,
1727
1813
  style: c,
1728
- ...f,
1814
+ ...u,
1729
1815
  children: [
1730
1816
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
1731
1817
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1732
1818
  s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: s }),
1733
- n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: n })
1819
+ n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: f, role: "alert", children: n })
1734
1820
  ]
1735
1821
  }
1736
1822
  );
1737
1823
  }
1738
- function sn({ label: t, value: s, delta: n, size: a = "m", inline: r = !1, className: o = "", style: i, ...l }) {
1824
+ function on({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1739
1825
  const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1740
1826
  return /* @__PURE__ */ e.jsxs(
1741
1827
  "div",
1742
1828
  {
1743
1829
  className: [
1744
1830
  "ds-stat",
1745
- `ds-stat--${a}`,
1746
- r && "ds-stat--inline",
1831
+ `ds-stat--${r}`,
1832
+ a && "ds-stat--inline",
1747
1833
  o
1748
1834
  ].filter(Boolean).join(" "),
1749
1835
  style: i,
@@ -1756,49 +1842,49 @@ function sn({ label: t, value: s, delta: n, size: a = "m", inline: r = !1, class
1756
1842
  }
1757
1843
  );
1758
1844
  }
1759
- function nn({
1845
+ function ln({
1760
1846
  children: t,
1761
1847
  separator: s = "/",
1762
1848
  "aria-label": n,
1763
- className: a = "",
1764
- style: r,
1849
+ className: r = "",
1850
+ style: a,
1765
1851
  ...o
1766
1852
  }) {
1767
1853
  const i = K(), l = X.Children.toArray(t).filter(Boolean);
1768
1854
  return /* @__PURE__ */ e.jsx(
1769
1855
  "nav",
1770
1856
  {
1771
- className: `ds-breadcrumb${a ? ` ${a}` : ""}`,
1857
+ className: `ds-breadcrumb${r ? ` ${r}` : ""}`,
1772
1858
  "aria-label": n ?? i.breadcrumb,
1773
- style: r,
1859
+ style: a,
1774
1860
  ...o,
1775
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: l.map((c, f) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1861
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: l.map((c, u) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1776
1862
  c,
1777
- f < l.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1778
- ] }, f)) })
1863
+ u < l.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1864
+ ] }, u)) })
1779
1865
  }
1780
1866
  );
1781
1867
  }
1782
- function rn({
1868
+ function cn({
1783
1869
  page: t,
1784
1870
  total: s,
1785
1871
  onChange: n,
1786
- siblings: a = 1,
1787
- "aria-label": r,
1872
+ siblings: r = 1,
1873
+ "aria-label": a,
1788
1874
  previousLabel: o,
1789
1875
  nextLabel: i,
1790
1876
  className: l = "",
1791
1877
  style: c,
1792
- ...f
1878
+ ...u
1793
1879
  }) {
1794
- const d = K(), { t: p } = ye(), h = Gt(t, s, a);
1880
+ const d = K(), { t: p } = be(), h = Gt(t, s, r);
1795
1881
  return /* @__PURE__ */ e.jsxs(
1796
1882
  "nav",
1797
1883
  {
1798
1884
  className: `ds-pagination${l ? ` ${l}` : ""}`,
1799
- "aria-label": r ?? d.pagination,
1885
+ "aria-label": a ?? d.pagination,
1800
1886
  style: c,
1801
- ...f,
1887
+ ...u,
1802
1888
  children: [
1803
1889
  /* @__PURE__ */ e.jsx(
1804
1890
  "button",
@@ -1807,20 +1893,20 @@ function rn({
1807
1893
  onClick: () => n == null ? void 0 : n(t - 1),
1808
1894
  disabled: t <= 1,
1809
1895
  "aria-label": o ?? d.previousPage,
1810
- children: /* @__PURE__ */ e.jsx(gt, { size: 16 })
1896
+ children: /* @__PURE__ */ e.jsx(Nt, { size: 16 })
1811
1897
  }
1812
1898
  ),
1813
1899
  h.map(
1814
- (u, v) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${v}`) : /* @__PURE__ */ e.jsx(
1900
+ (f, v) => f === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${v}`) : /* @__PURE__ */ e.jsx(
1815
1901
  "button",
1816
1902
  {
1817
- className: `ds-pagination-page${u === t ? " ds-pagination-page--current" : ""}`,
1818
- onClick: () => u !== t && (n == null ? void 0 : n(u)),
1819
- "aria-current": u === t ? "page" : void 0,
1820
- "aria-label": p("pageN", { n: u }),
1821
- children: u
1903
+ className: `ds-pagination-page${f === t ? " ds-pagination-page--current" : ""}`,
1904
+ onClick: () => f !== t && (n == null ? void 0 : n(f)),
1905
+ "aria-current": f === t ? "page" : void 0,
1906
+ "aria-label": p("pageN", { n: f }),
1907
+ children: f
1822
1908
  },
1823
- u
1909
+ f
1824
1910
  )
1825
1911
  ),
1826
1912
  /* @__PURE__ */ e.jsx(
@@ -1830,7 +1916,7 @@ function rn({
1830
1916
  onClick: () => n == null ? void 0 : n(t + 1),
1831
1917
  disabled: t >= s,
1832
1918
  "aria-label": i ?? d.nextPage,
1833
- children: /* @__PURE__ */ e.jsx(Nt, { size: 16 })
1919
+ children: /* @__PURE__ */ e.jsx(wt, { size: 16 })
1834
1920
  }
1835
1921
  )
1836
1922
  ]
@@ -1839,47 +1925,47 @@ function rn({
1839
1925
  }
1840
1926
  function Gt(t, s, n) {
1841
1927
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1842
- const a = Math.max(2, t - n), r = Math.min(s - 1, t + n), o = [1];
1843
- a > 2 && o.push("…");
1844
- for (let i = a; i <= r; i++) o.push(i);
1845
- return r < s - 1 && o.push("…"), o.push(s), o;
1928
+ const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
1929
+ r > 2 && o.push("…");
1930
+ for (let i = r; i <= a; i++) o.push(i);
1931
+ return a < s - 1 && o.push("…"), o.push(s), o;
1846
1932
  }
1847
1933
  const Kt = 300;
1848
- function an({
1934
+ function dn({
1849
1935
  children: t,
1850
1936
  title: s,
1851
1937
  onClose: n,
1852
- subHeader: a,
1853
- side: r = "right",
1938
+ subHeader: r,
1939
+ side: a = "right",
1854
1940
  size: o = "wide",
1855
1941
  offsetLeft: i = 0,
1856
1942
  offsetRight: l = 0,
1857
1943
  keepOpenRef: c,
1858
- closeLabel: f,
1944
+ closeLabel: u,
1859
1945
  ...d
1860
1946
  }) {
1861
- const p = K(), h = B(null), u = X.useId(), [v, j] = P(!1), N = () => {
1947
+ const p = K(), h = I(null), f = X.useId(), [v, j] = P(!1), w = () => {
1862
1948
  !n || v || (j(!0), setTimeout(() => {
1863
1949
  j(!1), n();
1864
1950
  }, Kt));
1865
1951
  };
1866
1952
  F(() => {
1867
- const b = (A) => {
1868
- A.key === "Escape" && N();
1953
+ const _ = (A) => {
1954
+ A.key === "Escape" && w();
1869
1955
  }, S = (A) => {
1870
- var C, k, L, O;
1871
- const D = ((k = (C = A.composedPath) == null ? void 0 : C.call(A)) == null ? void 0 : k[0]) ?? A.target;
1872
- (L = c == null ? void 0 : c.current) != null && L.contains(D) || h.current && !h.current.contains(D) && !((O = D.closest) != null && O.call(D, "[data-ds-portal]")) && N();
1956
+ var O, k, D, C;
1957
+ const L = ((k = (O = A.composedPath) == null ? void 0 : O.call(A)) == null ? void 0 : k[0]) ?? A.target;
1958
+ (D = c == null ? void 0 : c.current) != null && D.contains(L) || h.current && !h.current.contains(L) && !((C = L.closest) != null && C.call(L, "[data-ds-portal]")) && w();
1873
1959
  };
1874
- return document.addEventListener("keydown", b), document.addEventListener("mousedown", S), () => {
1875
- document.removeEventListener("keydown", b), document.removeEventListener("mousedown", S);
1960
+ return document.addEventListener("keydown", _), document.addEventListener("mousedown", S), () => {
1961
+ document.removeEventListener("keydown", _), document.removeEventListener("mousedown", S);
1876
1962
  };
1877
1963
  }, [n, v, c]);
1878
- const w = X.Children.toArray(t), y = w.find((b) => (b == null ? void 0 : b.type) === Ze || (b == null ? void 0 : b.type) === xe), E = w.filter((b) => (b == null ? void 0 : b.type) !== Ze && (b == null ? void 0 : b.type) !== xe), g = /* @__PURE__ */ e.jsx(
1964
+ const g = X.Children.toArray(t), y = g.find((_) => (_ == null ? void 0 : _.type) === Ze || (_ == null ? void 0 : _.type) === xe), E = g.filter((_) => (_ == null ? void 0 : _.type) !== Ze && (_ == null ? void 0 : _.type) !== xe), N = /* @__PURE__ */ e.jsx(
1879
1965
  "div",
1880
1966
  {
1881
1967
  className: ["ds-side-page-overlay", v && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1882
- "data-side": r,
1968
+ "data-side": a,
1883
1969
  style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1884
1970
  ...d,
1885
1971
  children: /* @__PURE__ */ e.jsxs(
@@ -1887,11 +1973,11 @@ function an({
1887
1973
  {
1888
1974
  ref: h,
1889
1975
  className: ["ds-side-page", v && "ds-side-page--closing"].filter(Boolean).join(" "),
1890
- "data-side": r,
1976
+ "data-side": a,
1891
1977
  "data-size": o,
1892
1978
  role: "dialog",
1893
1979
  "aria-modal": "true",
1894
- "aria-labelledby": s ? u : void 0,
1980
+ "aria-labelledby": s ? f : void 0,
1895
1981
  children: [
1896
1982
  n && /* @__PURE__ */ e.jsx(
1897
1983
  de,
@@ -1899,14 +1985,14 @@ function an({
1899
1985
  className: "ds-side-page__close",
1900
1986
  variant: "ghost",
1901
1987
  size: "small",
1902
- icon: /* @__PURE__ */ e.jsx(se, { size: q[2], strokeWidth: 1.5 }),
1903
- onClick: N,
1904
- "aria-label": f ?? p.close
1988
+ icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
1989
+ onClick: w,
1990
+ "aria-label": u ?? p.close
1905
1991
  }
1906
1992
  ),
1907
- (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1908
- s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-side-page__title", children: s }),
1909
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: a })
1993
+ (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1994
+ s && /* @__PURE__ */ e.jsx("h3", { id: f, className: "ds-side-page__title", children: s }),
1995
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
1910
1996
  ] }),
1911
1997
  /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: E }),
1912
1998
  y
@@ -1915,79 +2001,79 @@ function an({
1915
2001
  )
1916
2002
  }
1917
2003
  );
1918
- return typeof document > "u" ? g : re.createPortal(g, document.body);
2004
+ return typeof document > "u" ? N : re.createPortal(N, document.body);
1919
2005
  }
1920
2006
  function Ze({ children: t }) {
1921
2007
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1922
2008
  }
1923
- const _e = Le({ collapsed: !1, side: "left" }), Re = Le(!1), on = lt(function({
2009
+ const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), un = lt(function({
1924
2010
  children: s,
1925
2011
  collapsed: n = !1,
1926
- side: a = "left",
1927
- onExpand: r,
2012
+ side: r = "left",
2013
+ onExpand: a,
1928
2014
  onCollapse: o,
1929
2015
  className: i = "",
1930
2016
  ...l
1931
2017
  }, c) {
1932
- const f = [
2018
+ const u = [
1933
2019
  "ds-nav-rail",
1934
2020
  n && "ds-nav-rail--collapsed",
1935
- `ds-nav-rail--${a}`,
2021
+ `ds-nav-rail--${r}`,
1936
2022
  i
1937
- ].filter(Boolean).join(" "), d = te((p) => {
2023
+ ].filter(Boolean).join(" "), d = se((p) => {
1938
2024
  if (!p.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]')) {
1939
- if (n && r) {
1940
- r();
2025
+ if (n && a) {
2026
+ a();
1941
2027
  return;
1942
2028
  }
1943
2029
  !n && o && o();
1944
2030
  }
1945
- }, [n, r, o]);
1946
- return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: n, side: a }, children: /* @__PURE__ */ e.jsx(
2031
+ }, [n, a, o]);
2032
+ return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: n, side: r }, children: /* @__PURE__ */ e.jsx(
1947
2033
  "nav",
1948
2034
  {
1949
2035
  ref: c,
1950
- className: f,
2036
+ className: u,
1951
2037
  onClick: d,
1952
- "data-expandable": n && r ? "" : void 0,
2038
+ "data-expandable": n && a ? "" : void 0,
1953
2039
  "data-collapsible": !n && o ? "" : void 0,
1954
2040
  ...l,
1955
2041
  children: s
1956
2042
  }
1957
2043
  ) });
1958
2044
  });
1959
- function ln({
2045
+ function fn({
1960
2046
  icon: t,
1961
2047
  label: s,
1962
2048
  selected: n = !1,
1963
- disabled: a = !1,
1964
- href: r,
2049
+ disabled: r = !1,
2050
+ href: a,
1965
2051
  onClick: o,
1966
2052
  count: i,
1967
2053
  updated: l = !1,
1968
2054
  open: c = !1,
1969
- onboarding: f = !1,
2055
+ onboarding: u = !1,
1970
2056
  className: d = "",
1971
2057
  ...p
1972
2058
  }) {
1973
- const { collapsed: h, side: u } = ie(_e), v = ie(Re), w = {
2059
+ const { collapsed: h, side: f } = ie(_e), v = ie(Re), g = {
1974
2060
  className: [
1975
2061
  "ds-nav-rail__item",
1976
2062
  d
1977
2063
  ].filter(Boolean).join(" "),
1978
- onClick: a ? void 0 : o,
2064
+ onClick: r ? void 0 : o,
1979
2065
  "aria-current": n ? "page" : void 0,
1980
- "aria-disabled": a ? "true" : void 0,
2066
+ "aria-disabled": r ? "true" : void 0,
1981
2067
  "aria-label": h ? s : void 0,
1982
- tabIndex: a ? -1 : void 0,
2068
+ tabIndex: r ? -1 : void 0,
1983
2069
  ...{
1984
2070
  "data-selected": n || void 0,
1985
- "data-disabled": a || void 0,
2071
+ "data-disabled": r || void 0,
1986
2072
  "data-open": c || void 0,
1987
- "data-onboarding": f || void 0
2073
+ "data-onboarding": u || void 0
1988
2074
  },
1989
2075
  ...p
1990
- }, y = i != null, E = u === "left" ? "right" : "left", g = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2076
+ }, y = i != null, E = f === "left" ? "right" : "left", N = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1991
2077
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1992
2078
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1993
2079
  !h && y && /* @__PURE__ */ e.jsx(
@@ -2001,117 +2087,117 @@ function ln({
2001
2087
  !h && l && (!y || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
2002
2088
  h && y && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
2003
2089
  h && l && (!y || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
2004
- ] }), b = r ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : r, ...w, children: g }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...w, children: g });
2005
- return h && !v ? /* @__PURE__ */ e.jsx(Ue, { content: s, position: E, children: b }) : b;
2090
+ ] }), _ = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...g, children: N }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: N });
2091
+ return h && !v ? /* @__PURE__ */ e.jsx(Ue, { content: s, position: E, children: _ }) : _;
2006
2092
  }
2007
- function cn({ children: t, className: s = "", ...n }) {
2093
+ function mn({ children: t, className: s = "", ...n }) {
2008
2094
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
2009
2095
  }
2010
- function dn({ children: t, className: s = "", ...n }) {
2096
+ function pn({ children: t, className: s = "", ...n }) {
2011
2097
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
2012
2098
  }
2013
- function un({ children: t, className: s = "", ...n }) {
2099
+ function hn({ children: t, className: s = "", ...n }) {
2014
2100
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
2015
2101
  }
2016
- function fn({ className: t = "", ...s }) {
2102
+ function xn({ className: t = "", ...s }) {
2017
2103
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
2018
2104
  }
2019
- function mn({ children: t, label: s, defaultOpen: n = !0, className: a = "", ...r }) {
2020
- const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, f] = P(n);
2021
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", a].filter(Boolean).join(" "), ...r, children: [
2105
+ function vn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...a }) {
2106
+ const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] = P(n);
2107
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
2022
2108
  !o && /* @__PURE__ */ e.jsxs(
2023
2109
  "button",
2024
2110
  {
2025
2111
  type: "button",
2026
2112
  className: ["ds-nav-rail__recents-toggle", !c && "ds-nav-rail__recents-toggle--closed"].filter(Boolean).join(" "),
2027
- onClick: () => f((d) => !d),
2113
+ onClick: () => u((d) => !d),
2028
2114
  "aria-expanded": c,
2029
2115
  children: [
2030
2116
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: l }),
2031
- /* @__PURE__ */ e.jsx(we, { size: 12, strokeWidth: 2, className: "ds-nav-rail__recents-chevron", "aria-hidden": "true" })
2117
+ /* @__PURE__ */ e.jsx(ye, { size: 12, strokeWidth: 2, className: "ds-nav-rail__recents-chevron", "aria-hidden": "true" })
2032
2118
  ]
2033
2119
  }
2034
2120
  ),
2035
2121
  (c || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
2036
2122
  ] });
2037
2123
  }
2038
- const pn = lt(function({
2124
+ const bn = lt(function({
2039
2125
  as: s = "button",
2040
2126
  avatar: n,
2041
- label: a,
2042
- className: r = "",
2127
+ label: r,
2128
+ className: a = "",
2043
2129
  ...o
2044
2130
  }, i) {
2045
- const { collapsed: l, side: c } = ie(_e), f = ie(Re), d = c === "left" ? "right" : "left", p = [
2131
+ const { collapsed: l, side: c } = ie(_e), u = ie(Re), d = c === "left" ? "right" : "left", p = [
2046
2132
  "ds-nav-rail__item",
2047
2133
  "ds-nav-rail__agent",
2048
- r
2134
+ a
2049
2135
  ].filter(Boolean).join(" "), h = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2050
2136
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
2051
- !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: a })
2052
- ] }), u = /* @__PURE__ */ e.jsx(
2137
+ !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: r })
2138
+ ] }), f = /* @__PURE__ */ e.jsx(
2053
2139
  s,
2054
2140
  {
2055
2141
  ref: i,
2056
2142
  className: p,
2057
- "aria-label": l ? a : void 0,
2143
+ "aria-label": l ? r : void 0,
2058
2144
  ...s === "button" ? { type: "button" } : {},
2059
2145
  ...o,
2060
2146
  children: h
2061
2147
  }
2062
2148
  );
2063
- return l && !f ? /* @__PURE__ */ e.jsx(Ue, { content: a, position: d, children: u }) : u;
2149
+ return l && !u ? /* @__PURE__ */ e.jsx(Ue, { content: r, position: d, children: f }) : f;
2064
2150
  });
2065
- function hn({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: r, onClick: o, className: i = "", ...l }) {
2066
- const { collapsed: c, side: f } = ie(_e), d = ie(Re), u = {
2151
+ function _n({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
2152
+ const { collapsed: c, side: u } = ie(_e), d = ie(Re), f = {
2067
2153
  className: [
2068
2154
  "ds-nav-rail__item",
2069
2155
  "ds-nav-rail__agent",
2070
2156
  i
2071
2157
  ].filter(Boolean).join(" "),
2072
- onClick: a ? void 0 : o,
2158
+ onClick: r ? void 0 : o,
2073
2159
  "aria-current": n ? "page" : void 0,
2074
- "aria-disabled": a ? "true" : void 0,
2075
- tabIndex: a ? -1 : void 0,
2160
+ "aria-disabled": r ? "true" : void 0,
2161
+ tabIndex: r ? -1 : void 0,
2076
2162
  ...{
2077
2163
  "data-selected": n || void 0,
2078
- "data-disabled": a || void 0
2164
+ "data-disabled": r || void 0
2079
2165
  },
2080
2166
  ...l
2081
2167
  }, v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2082
2168
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
2083
2169
  !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
2084
- ] }), j = f === "left" ? "right" : "left", N = r ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : r, ...u, children: v }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...u, children: v });
2085
- return c && !d ? /* @__PURE__ */ e.jsx(Ue, { content: s, position: j, children: N }) : N;
2170
+ ] }), j = u === "left" ? "right" : "left", w = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...f, children: v }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: v });
2171
+ return c && !d ? /* @__PURE__ */ e.jsx(Ue, { content: s, position: j, children: w }) : w;
2086
2172
  }
2087
2173
  const Qe = 240, et = 6, tt = 8;
2088
- function xn({
2174
+ function jn({
2089
2175
  trigger: t,
2090
2176
  title: s,
2091
2177
  children: n,
2092
- open: a,
2093
- onOpenChange: r,
2178
+ open: r,
2179
+ onOpenChange: a,
2094
2180
  defaultOpen: o = !1,
2095
2181
  closeLabel: i
2096
2182
  }) {
2097
- const l = K(), { side: c } = ie(_e), [f, d] = P(o), p = a !== void 0, h = p ? a : f, [u, v] = P(!1), j = B(null), N = B(null), [w, y] = P({}), E = te(() => {
2098
- p ? r == null || r(!0) : d(!0);
2099
- }, [p, r]), g = te(() => {
2100
- p ? r == null || r(!1) : d(!1);
2101
- }, [p, r]), b = te(() => h ? g() : E(), [h, E, g]), S = te(() => {
2183
+ const l = K(), { side: c } = ie(_e), [u, d] = P(o), p = r !== void 0, h = p ? r : u, [f, v] = P(!1), j = I(null), w = I(null), [g, y] = P({}), E = se(() => {
2184
+ p ? a == null || a(!0) : d(!0);
2185
+ }, [p, a]), N = se(() => {
2186
+ p ? a == null || a(!1) : d(!1);
2187
+ }, [p, a]), _ = se(() => h ? N() : E(), [h, E, N]), S = se(() => {
2102
2188
  var W;
2103
- const D = j.current;
2104
- if (!D) return;
2105
- const C = D.getBoundingClientRect(), k = window.innerHeight, L = ((W = N.current) == null ? void 0 : W.offsetHeight) ?? 300, O = Math.max(tt, Math.min(k - L - tt, C.top));
2189
+ const L = j.current;
2190
+ if (!L) return;
2191
+ const O = L.getBoundingClientRect(), k = window.innerHeight, D = ((W = w.current) == null ? void 0 : W.offsetHeight) ?? 300, C = Math.max(tt, Math.min(k - D - tt, O.top));
2106
2192
  y(c === "right" ? {
2107
2193
  position: "fixed",
2108
- top: O,
2109
- right: window.innerWidth - C.left + et,
2194
+ top: C,
2195
+ right: window.innerWidth - O.left + et,
2110
2196
  width: Qe
2111
2197
  } : {
2112
2198
  position: "fixed",
2113
- top: O,
2114
- left: C.right + et,
2199
+ top: C,
2200
+ left: O.right + et,
2115
2201
  width: Qe
2116
2202
  });
2117
2203
  }, [c]);
@@ -2125,26 +2211,26 @@ function xn({
2125
2211
  };
2126
2212
  }, [h, S]), F(() => {
2127
2213
  if (!h) return;
2128
- const D = (k) => {
2129
- var L, O;
2130
- !((L = N.current) != null && L.contains(k.target)) && !((O = j.current) != null && O.contains(k.target)) && g();
2131
- }, C = (k) => {
2132
- k.key === "Escape" && g();
2214
+ const L = (k) => {
2215
+ var D, C;
2216
+ !((D = w.current) != null && D.contains(k.target)) && !((C = j.current) != null && C.contains(k.target)) && N();
2217
+ }, O = (k) => {
2218
+ k.key === "Escape" && N();
2133
2219
  };
2134
- return document.addEventListener("mousedown", D), document.addEventListener("keydown", C), () => {
2135
- document.removeEventListener("mousedown", D), document.removeEventListener("keydown", C);
2220
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", O), () => {
2221
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", O);
2136
2222
  };
2137
- }, [h, g]);
2223
+ }, [h, N]);
2138
2224
  const A = h && /* @__PURE__ */ e.jsxs(
2139
2225
  "div",
2140
2226
  {
2141
- ref: N,
2227
+ ref: w,
2142
2228
  className: [
2143
2229
  "ds-nav-rail-flyout",
2144
2230
  `ds-nav-rail-flyout--${c}`,
2145
- u && "ds-nav-rail-flyout--visible"
2231
+ f && "ds-nav-rail-flyout--visible"
2146
2232
  ].filter(Boolean).join(" "),
2147
- style: w,
2233
+ style: g,
2148
2234
  "data-ds-portal": "",
2149
2235
  role: "dialog",
2150
2236
  "aria-modal": "false",
@@ -2156,9 +2242,9 @@ function xn({
2156
2242
  {
2157
2243
  type: "button",
2158
2244
  className: "ds-nav-rail-flyout__close",
2159
- onClick: g,
2245
+ onClick: N,
2160
2246
  "aria-label": i ?? l.close,
2161
- children: /* @__PURE__ */ e.jsx(se, { size: 16, strokeWidth: 2 })
2247
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
2162
2248
  }
2163
2249
  )
2164
2250
  ] }),
@@ -2167,7 +2253,7 @@ function xn({
2167
2253
  }
2168
2254
  );
2169
2255
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2170
- /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: j, onClick: b, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2256
+ /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: j, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2171
2257
  typeof document < "u" && re.createPortal(A, document.body)
2172
2258
  ] });
2173
2259
  }
@@ -2177,17 +2263,17 @@ const Xt = {
2177
2263
  warning: ze,
2178
2264
  error: Me
2179
2265
  };
2180
- function vn({
2266
+ function Nn({
2181
2267
  children: t,
2182
2268
  variant: s = "info",
2183
2269
  action: n,
2184
- onAction: a,
2185
- onDismiss: r,
2270
+ onAction: r,
2271
+ onDismiss: a,
2186
2272
  role: o,
2187
2273
  dismissLabel: i,
2188
2274
  ...l
2189
2275
  }) {
2190
- const c = K(), f = Xt[s], d = o || (s === "error" ? "alert" : "status");
2276
+ const c = K(), u = Xt[s], d = o || (s === "error" ? "alert" : "status");
2191
2277
  return /* @__PURE__ */ e.jsxs(
2192
2278
  "div",
2193
2279
  {
@@ -2195,123 +2281,123 @@ function vn({
2195
2281
  role: d,
2196
2282
  ...l,
2197
2283
  children: [
2198
- f && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(f, { size: q[2], strokeWidth: 1.5 }) }),
2284
+ u && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(u, { size: q[2], strokeWidth: 1.5 }) }),
2199
2285
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
2200
2286
  n && /* @__PURE__ */ e.jsx(
2201
2287
  "button",
2202
2288
  {
2203
2289
  type: "button",
2204
2290
  className: "ds-banner-action",
2205
- onClick: a,
2291
+ onClick: r,
2206
2292
  children: n
2207
2293
  }
2208
2294
  ),
2209
- r && /* @__PURE__ */ e.jsx(
2295
+ a && /* @__PURE__ */ e.jsx(
2210
2296
  "button",
2211
2297
  {
2212
2298
  type: "button",
2213
2299
  className: "ds-banner-dismiss",
2214
- onClick: r,
2300
+ onClick: a,
2215
2301
  "aria-label": i ?? c.dismiss,
2216
- children: /* @__PURE__ */ e.jsx(se, { size: q[2], strokeWidth: 1.5 })
2302
+ children: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 })
2217
2303
  }
2218
2304
  )
2219
2305
  ]
2220
2306
  }
2221
2307
  );
2222
2308
  }
2223
- function _n({
2309
+ function wn({
2224
2310
  trigger: t,
2225
2311
  items: s = [],
2226
2312
  open: n,
2227
- onOpenChange: a,
2228
- align: r = "left",
2313
+ onOpenChange: r,
2314
+ align: a = "left",
2229
2315
  fullWidth: o = !1,
2230
2316
  className: i = "",
2231
2317
  style: l,
2232
2318
  ...c
2233
2319
  }) {
2234
- const [f, d] = P(!1), [p, h] = P(!1), u = n !== void 0, v = u ? n : f, j = B(null), N = B(null), w = B(null), y = B(null), [E, g] = P({}), b = B(null), S = 150, A = () => {
2235
- if (u)
2236
- a == null || a(!1);
2320
+ const [u, d] = P(!1), [p, h] = P(!1), f = n !== void 0, v = f ? n : u, j = I(null), w = I(null), g = I(null), y = I(null), [E, N] = P({}), _ = I(null), S = 150, A = () => {
2321
+ if (f)
2322
+ r == null || r(!1);
2237
2323
  else {
2238
2324
  if (p) return;
2239
- h(!0), b.current = setTimeout(() => {
2325
+ h(!0), _.current = setTimeout(() => {
2240
2326
  d(!1), h(!1);
2241
2327
  }, S);
2242
2328
  }
2243
- }, D = () => {
2244
- const _ = !v;
2245
- u ? a == null || a(_) : _ ? (clearTimeout(b.current), h(!1), d(!0)) : A();
2246
- }, C = () => {
2247
- v || (u ? a == null || a(!0) : (clearTimeout(b.current), h(!1), d(!0)));
2329
+ }, L = () => {
2330
+ const b = !v;
2331
+ f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) : A();
2332
+ }, O = () => {
2333
+ v || (f ? r == null || r(!0) : (clearTimeout(_.current), h(!1), d(!0)));
2248
2334
  };
2249
- F(() => () => clearTimeout(b.current), []), F(() => {
2335
+ F(() => () => clearTimeout(_.current), []), F(() => {
2250
2336
  if (!v) return;
2251
- const _ = 300, $ = () => {
2337
+ const b = 300, $ = () => {
2252
2338
  var Y;
2253
2339
  const R = (Y = j.current) == null ? void 0 : Y.getBoundingClientRect();
2254
2340
  if (!R) return;
2255
- const V = window.innerHeight - R.bottom, H = V < _ + 8 && R.top > V;
2256
- g(
2257
- r === "right" ? H ? { bottom: window.innerHeight - R.top + 4, top: "auto", right: window.innerWidth - R.right } : { top: R.bottom + 4, bottom: "auto", right: window.innerWidth - R.right } : H ? { bottom: window.innerHeight - R.top + 4, top: "auto", left: R.left } : { top: R.bottom + 4, bottom: "auto", left: R.left }
2341
+ const V = window.innerHeight - R.bottom, H = V < b + 8 && R.top > V;
2342
+ N(
2343
+ a === "right" ? H ? { bottom: window.innerHeight - R.top + 4, top: "auto", right: window.innerWidth - R.right } : { top: R.bottom + 4, bottom: "auto", right: window.innerWidth - R.right } : H ? { bottom: window.innerHeight - R.top + 4, top: "auto", left: R.left } : { top: R.bottom + 4, bottom: "auto", left: R.left }
2258
2344
  );
2259
2345
  };
2260
2346
  return $(), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
2261
2347
  window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
2262
2348
  };
2263
- }, [v, r]);
2349
+ }, [v, a]);
2264
2350
  const k = () => {
2265
2351
  var $;
2266
- const _ = ($ = w.current) == null ? void 0 : $.querySelector(
2352
+ const b = ($ = g.current) == null ? void 0 : $.querySelector(
2267
2353
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
2268
2354
  );
2269
- _ == null || _.focus();
2355
+ b == null || b.focus();
2270
2356
  };
2271
2357
  F(() => {
2272
2358
  if (!v) return;
2273
- const _ = (R) => {
2359
+ const b = (R) => {
2274
2360
  var V, H;
2275
- !((V = j.current) != null && V.contains(R.target)) && !((H = N.current) != null && H.contains(R.target)) && A();
2361
+ !((V = j.current) != null && V.contains(R.target)) && !((H = w.current) != null && H.contains(R.target)) && A();
2276
2362
  }, $ = (R) => {
2277
2363
  R.key === "Escape" && (A(), k());
2278
2364
  };
2279
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", $), () => {
2280
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", $);
2365
+ return document.addEventListener("mousedown", b), document.addEventListener("keydown", $), () => {
2366
+ document.removeEventListener("mousedown", b), document.removeEventListener("keydown", $);
2281
2367
  };
2282
2368
  }, [v]), F(() => {
2283
- if (!v || !y.current || !N.current) return;
2284
- const _ = L(), $ = y.current === "last" ? _[_.length - 1] : _[0];
2369
+ if (!v || !y.current || !w.current) return;
2370
+ const b = D(), $ = y.current === "last" ? b[b.length - 1] : b[0];
2285
2371
  $ == null || $.focus(), y.current = null;
2286
2372
  }, [v]);
2287
- const L = () => N.current ? [...N.current.querySelectorAll(
2373
+ const D = () => w.current ? [...w.current.querySelectorAll(
2288
2374
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2289
- )] : [], O = (_) => {
2375
+ )] : [], C = (b) => {
2290
2376
  var $, R;
2291
- if (_.key === "ArrowDown")
2292
- _.preventDefault(), v ? ($ = L()[0]) == null || $.focus() : (y.current = "first", C());
2293
- else if (_.key === "ArrowUp")
2294
- if (_.preventDefault(), !v)
2295
- y.current = "last", C();
2377
+ if (b.key === "ArrowDown")
2378
+ b.preventDefault(), v ? ($ = D()[0]) == null || $.focus() : (y.current = "first", O());
2379
+ else if (b.key === "ArrowUp")
2380
+ if (b.preventDefault(), !v)
2381
+ y.current = "last", O();
2296
2382
  else {
2297
- const V = L();
2383
+ const V = D();
2298
2384
  (R = V[V.length - 1]) == null || R.focus();
2299
2385
  }
2300
- }, W = (_) => {
2386
+ }, W = (b) => {
2301
2387
  var V, H, Y, m;
2302
- const $ = L(), R = $.findIndex((x) => x === document.activeElement);
2303
- switch (_.key) {
2388
+ const $ = D(), R = $.findIndex((x) => x === document.activeElement);
2389
+ switch (b.key) {
2304
2390
  case "ArrowDown":
2305
- _.preventDefault(), (V = $[Math.min(R + 1, $.length - 1)]) == null || V.focus();
2391
+ b.preventDefault(), (V = $[Math.min(R + 1, $.length - 1)]) == null || V.focus();
2306
2392
  break;
2307
2393
  case "ArrowUp":
2308
- _.preventDefault(), R <= 0 ? k() : (H = $[R - 1]) == null || H.focus();
2394
+ b.preventDefault(), R <= 0 ? k() : (H = $[R - 1]) == null || H.focus();
2309
2395
  break;
2310
2396
  case "Home":
2311
- _.preventDefault(), (Y = $[0]) == null || Y.focus();
2397
+ b.preventDefault(), (Y = $[0]) == null || Y.focus();
2312
2398
  break;
2313
2399
  case "End":
2314
- _.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
2400
+ b.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
2315
2401
  break;
2316
2402
  case "Tab":
2317
2403
  A();
@@ -2320,42 +2406,42 @@ function _n({
2320
2406
  }, M = v && /* @__PURE__ */ e.jsx(
2321
2407
  "div",
2322
2408
  {
2323
- ref: N,
2409
+ ref: w,
2324
2410
  role: "menu",
2325
2411
  "data-ds-portal": "",
2326
2412
  className: [
2327
2413
  "ds-dropdown__menu",
2328
- `ds-dropdown__menu--${r}`,
2414
+ `ds-dropdown__menu--${a}`,
2329
2415
  p && "ds-dropdown__menu--closing"
2330
2416
  ].filter(Boolean).join(" "),
2331
2417
  style: E,
2332
2418
  onKeyDown: W,
2333
- children: s.map((_, $) => {
2334
- if (_.separator)
2419
+ children: s.map((b, $) => {
2420
+ if (b.separator)
2335
2421
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, $);
2336
- if (_.type === "section")
2422
+ if (b.type === "section")
2337
2423
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2338
- _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
2339
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
2424
+ b.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: b.label }),
2425
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: b.content })
2340
2426
  ] }, $);
2341
- const R = !!_.href, V = R ? "a" : "button", H = R ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
2427
+ const R = !!b.href, V = R ? "a" : "button", H = R ? { href: b.disabled ? void 0 : b.href, "aria-disabled": b.disabled ? "true" : void 0 } : { type: "button", disabled: b.disabled };
2342
2428
  return /* @__PURE__ */ e.jsxs(
2343
2429
  V,
2344
2430
  {
2345
2431
  role: "menuitem",
2346
2432
  className: [
2347
2433
  "ds-dropdown__item",
2348
- _.danger && "ds-dropdown__item--danger"
2434
+ b.danger && "ds-dropdown__item--danger"
2349
2435
  ].filter(Boolean).join(" "),
2350
2436
  ...H,
2351
2437
  onClick: () => {
2352
2438
  var Y;
2353
- (Y = _.onClick) == null || Y.call(_), A();
2439
+ (Y = b.onClick) == null || Y.call(b), A();
2354
2440
  },
2355
2441
  children: [
2356
- _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
2357
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
2358
- _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
2442
+ b.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: b.icon }),
2443
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: b.label }),
2444
+ b.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: b.shortcut })
2359
2445
  ]
2360
2446
  },
2361
2447
  $
@@ -2374,10 +2460,10 @@ function _n({
2374
2460
  /* @__PURE__ */ e.jsx(
2375
2461
  "div",
2376
2462
  {
2377
- ref: w,
2463
+ ref: g,
2378
2464
  className: "ds-dropdown__trigger",
2379
- onClick: D,
2380
- onKeyDown: O,
2465
+ onClick: L,
2466
+ onKeyDown: C,
2381
2467
  children: t
2382
2468
  }
2383
2469
  ),
@@ -2386,15 +2472,15 @@ function _n({
2386
2472
  }
2387
2473
  );
2388
2474
  }
2389
- function bn({
2475
+ function gn({
2390
2476
  value: t = 0,
2391
2477
  size: s = "m",
2392
2478
  variant: n = "default",
2393
- showValue: a = !1,
2394
- min: r = 2,
2479
+ showValue: r = !1,
2480
+ min: a = 2,
2395
2481
  animate: o = !0
2396
2482
  }) {
2397
- const i = Math.min(100, Math.max(0, t)), l = Math.max(r, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2483
+ const i = Math.min(100, Math.max(0, t)), l = Math.max(a, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2398
2484
  return /* @__PURE__ */ e.jsxs(
2399
2485
  "div",
2400
2486
  {
@@ -2415,7 +2501,7 @@ function bn({
2415
2501
  style: { width: `${l}%` }
2416
2502
  }
2417
2503
  ) }),
2418
- a && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
2504
+ r && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
2419
2505
  Math.round(i),
2420
2506
  "%"
2421
2507
  ] })
@@ -2425,37 +2511,37 @@ function bn({
2425
2511
  }
2426
2512
  const Jt = (t) => 1 - Math.pow(1 - t, 3), Zt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2427
2513
  function Qt(t, { duration: s = 600 } = {}) {
2428
- const [n, a] = P(t), r = B(t), o = B(null);
2514
+ const [n, r] = P(t), a = I(t), o = I(null);
2429
2515
  return F(() => {
2430
2516
  if (Zt()) {
2431
- a(t), r.current = t;
2517
+ r(t), a.current = t;
2432
2518
  return;
2433
2519
  }
2434
- const i = r.current, l = t - i;
2520
+ const i = a.current, l = t - i;
2435
2521
  if (l === 0) return;
2436
2522
  let c = null;
2437
- const f = (d) => {
2523
+ const u = (d) => {
2438
2524
  c || (c = d);
2439
2525
  const p = Math.min((d - c) / s, 1);
2440
- a(i + l * Jt(p)), p < 1 ? o.current = requestAnimationFrame(f) : r.current = t;
2526
+ r(i + l * Jt(p)), p < 1 ? o.current = requestAnimationFrame(u) : a.current = t;
2441
2527
  };
2442
- return o.current = requestAnimationFrame(f), () => cancelAnimationFrame(o.current);
2528
+ return o.current = requestAnimationFrame(u), () => cancelAnimationFrame(o.current);
2443
2529
  }, [t, s]), n;
2444
2530
  }
2445
- function jn({
2531
+ function yn({
2446
2532
  value: t,
2447
2533
  duration: s = 600,
2448
2534
  decimals: n = 0,
2449
- prefix: a = "",
2450
- suffix: r = ""
2535
+ prefix: r = "",
2536
+ suffix: a = ""
2451
2537
  }) {
2452
2538
  const i = Qt(t, { duration: s }).toFixed(n);
2453
- return `${a}${i}${r}`;
2539
+ return `${r}${i}${a}`;
2454
2540
  }
2455
2541
  function es({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2456
- const a = B(null), [r, o] = P(!1);
2542
+ const r = I(null), [a, o] = P(!1);
2457
2543
  return F(() => {
2458
- const i = a.current;
2544
+ const i = r.current;
2459
2545
  if (!i) return;
2460
2546
  const l = new IntersectionObserver(
2461
2547
  ([c]) => {
@@ -2464,22 +2550,22 @@ function es({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2464
2550
  { threshold: t, rootMargin: s }
2465
2551
  );
2466
2552
  return l.observe(i), () => l.disconnect();
2467
- }, [t, s, n]), { ref: a, inView: r };
2553
+ }, [t, s, n]), { ref: r, inView: a };
2468
2554
  }
2469
- function gn({
2555
+ function kn({
2470
2556
  children: t,
2471
2557
  as: s = "div",
2472
2558
  once: n = !1,
2473
- threshold: a = 0.1,
2474
- rootMargin: r = "0px",
2559
+ threshold: r = 0.1,
2560
+ rootMargin: a = "0px",
2475
2561
  onEnter: o,
2476
2562
  onLeave: i,
2477
2563
  ...l
2478
2564
  }) {
2479
- const { ref: c, inView: f } = es({ threshold: a, rootMargin: r, once: n }), d = B(!1);
2565
+ const { ref: c, inView: u } = es({ threshold: r, rootMargin: a, once: n }), d = I(!1);
2480
2566
  return F(() => {
2481
- f && !d.current && (o == null || o()), !f && d.current && (i == null || i()), d.current = f;
2482
- }, [f]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(f) : t });
2567
+ u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
2568
+ }, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
2483
2569
  }
2484
2570
  const st = {
2485
2571
  default: We,
@@ -2488,9 +2574,9 @@ const st = {
2488
2574
  error: Me
2489
2575
  };
2490
2576
  let ve = [];
2491
- const De = /* @__PURE__ */ new Set();
2577
+ const Le = /* @__PURE__ */ new Set();
2492
2578
  function ut() {
2493
- De.forEach((t) => t([...ve]));
2579
+ Le.forEach((t) => t([...ve]));
2494
2580
  }
2495
2581
  function ts(t) {
2496
2582
  ve = [...ve, t], ut();
@@ -2498,7 +2584,7 @@ function ts(t) {
2498
2584
  function ss(t) {
2499
2585
  ve = ve.filter((s) => s.id !== t), ut();
2500
2586
  }
2501
- function Nn() {
2587
+ function En() {
2502
2588
  const t = (s, n = {}) => {
2503
2589
  ts({
2504
2590
  id: `${Date.now()}-${Math.random()}`,
@@ -2511,10 +2597,10 @@ function Nn() {
2511
2597
  return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
2512
2598
  }
2513
2599
  function ns({ data: t, onDismiss: s }) {
2514
- const n = K(), [a, r] = P(!1), o = B(null);
2515
- F(() => (requestAnimationFrame(() => r(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
2600
+ const n = K(), [r, a] = P(!1), o = I(null);
2601
+ F(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
2516
2602
  function i() {
2517
- r(!1), setTimeout(() => s(t.id), 250);
2603
+ a(!1), setTimeout(() => s(t.id), 250);
2518
2604
  }
2519
2605
  const l = st[t.type] ?? st.default;
2520
2606
  return /* @__PURE__ */ e.jsxs(
@@ -2523,7 +2609,7 @@ function ns({ data: t, onDismiss: s }) {
2523
2609
  className: [
2524
2610
  "ds-toast",
2525
2611
  `ds-toast--${t.type}`,
2526
- a && "ds-toast--visible"
2612
+ r && "ds-toast--visible"
2527
2613
  ].filter(Boolean).join(" "),
2528
2614
  role: t.type === "error" ? "alert" : "status",
2529
2615
  "aria-live": "polite",
@@ -2536,17 +2622,17 @@ function ns({ data: t, onDismiss: s }) {
2536
2622
  className: "ds-toast__close",
2537
2623
  onClick: i,
2538
2624
  "aria-label": n.close,
2539
- children: /* @__PURE__ */ e.jsx(se, { size: q[3], strokeWidth: 1.5 })
2625
+ children: /* @__PURE__ */ e.jsx(ee, { size: q[3], strokeWidth: 1.5 })
2540
2626
  }
2541
2627
  )
2542
2628
  ]
2543
2629
  }
2544
2630
  );
2545
2631
  }
2546
- function wn({ position: t = "bottom-right" }) {
2632
+ function Tn({ position: t = "bottom-right" }) {
2547
2633
  const [s, n] = P(() => [...ve]);
2548
- return F(() => (De.add(n), () => De.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2549
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(ns, { data: a, onDismiss: ss }, a.id)) }),
2634
+ return F(() => (Le.add(n), () => Le.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2635
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(ns, { data: r, onDismiss: ss }, r.id)) }),
2550
2636
  document.body
2551
2637
  );
2552
2638
  }
@@ -2555,35 +2641,35 @@ const rs = {
2555
2641
  success: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "success", children: "Done" }),
2556
2642
  error: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "error", children: "Error" })
2557
2643
  };
2558
- function yn({
2644
+ function $n({
2559
2645
  label: t,
2560
2646
  status: s = "idle",
2561
2647
  icon: n,
2562
- badge: a,
2563
- defaultExpanded: r = !1,
2648
+ badge: r,
2649
+ defaultExpanded: a = !1,
2564
2650
  expanded: o,
2565
2651
  onToggle: i,
2566
2652
  children: l,
2567
2653
  className: c = "",
2568
- ...f
2654
+ ...u
2569
2655
  }) {
2570
2656
  const d = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2571
2657
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2572
2658
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2573
2659
  rs[s],
2574
- a
2660
+ r
2575
2661
  ] });
2576
2662
  return l ? /* @__PURE__ */ e.jsx(
2577
2663
  "div",
2578
2664
  {
2579
2665
  className: ["ds-tool-card", d && "ds-tool-card--running", c].filter(Boolean).join(" "),
2580
- ...f,
2666
+ ...u,
2581
2667
  children: /* @__PURE__ */ e.jsx(
2582
- Oe,
2668
+ Ce,
2583
2669
  {
2584
2670
  title: p,
2585
2671
  padding: "s",
2586
- defaultExpanded: r,
2672
+ defaultExpanded: a,
2587
2673
  expanded: d ? !1 : o,
2588
2674
  onToggle: d ? void 0 : i,
2589
2675
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
@@ -2594,7 +2680,7 @@ function yn({
2594
2680
  "div",
2595
2681
  {
2596
2682
  className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
2597
- ...f,
2683
+ ...u,
2598
2684
  children: p
2599
2685
  }
2600
2686
  );
@@ -2603,11 +2689,11 @@ function as({
2603
2689
  text: t,
2604
2690
  size: s = "xs",
2605
2691
  timeout: n = 800,
2606
- "aria-label": a,
2607
- ...r
2692
+ "aria-label": r,
2693
+ ...a
2608
2694
  }) {
2609
- const o = K(), [i, l] = P(!1), c = (f) => {
2610
- f.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2695
+ const o = K(), [i, l] = P(!1), c = (u) => {
2696
+ u.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2611
2697
  l(!0), setTimeout(() => l(!1), n);
2612
2698
  });
2613
2699
  };
@@ -2617,22 +2703,22 @@ function as({
2617
2703
  variant: "ghost",
2618
2704
  size: s,
2619
2705
  state: i ? "success" : "idle",
2620
- icon: /* @__PURE__ */ e.jsx(wt, { size: q[1], strokeWidth: 1.5 }),
2621
- "aria-label": a ?? o.copyToClipboard,
2706
+ icon: /* @__PURE__ */ e.jsx(gt, { size: q[1], strokeWidth: 1.5 }),
2707
+ "aria-label": r ?? o.copyToClipboard,
2622
2708
  onClick: c,
2623
- ...r
2709
+ ...a
2624
2710
  }
2625
2711
  );
2626
2712
  }
2627
- function kn({ content: t, streaming: s = !1, ...n }) {
2628
- const [a, r] = P(s);
2713
+ function Rn({ content: t, streaming: s = !1, ...n }) {
2714
+ const [r, a] = P(s);
2629
2715
  return F(() => {
2630
- r(!!s);
2716
+ a(!!s);
2631
2717
  }, [s]), /* @__PURE__ */ e.jsx(
2632
- Oe,
2718
+ Ce,
2633
2719
  {
2634
- expanded: a,
2635
- onToggle: r,
2720
+ expanded: r,
2721
+ onToggle: a,
2636
2722
  padding: "s",
2637
2723
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2638
2724
  /* @__PURE__ */ e.jsx(yt, { size: q[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
@@ -2646,23 +2732,23 @@ function kn({ content: t, streaming: s = !1, ...n }) {
2646
2732
  }
2647
2733
  );
2648
2734
  }
2649
- function En({
2735
+ function Sn({
2650
2736
  count: t,
2651
2737
  current: s = 0,
2652
2738
  done: n = [],
2653
- onChange: a,
2654
- showCounter: r = !0,
2739
+ onChange: r,
2740
+ showCounter: a = !0,
2655
2741
  className: o = "",
2656
2742
  "aria-label": i,
2657
2743
  ...l
2658
2744
  }) {
2659
- const c = K(), { t: f } = ye();
2745
+ const c = K(), { t: u } = be();
2660
2746
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2661
2747
  /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i ?? c.steps, children: Array.from({ length: t }, (d, p) => {
2662
- const h = p === s, u = n.includes(p) && !h, v = a && (p <= s || n.includes(p)), j = [
2748
+ const h = p === s, f = n.includes(p) && !h, v = r && (p <= s || n.includes(p)), j = [
2663
2749
  "ds-step-indicator__dot",
2664
2750
  h && "ds-step-indicator__dot--active",
2665
- u && "ds-step-indicator__dot--done"
2751
+ f && "ds-step-indicator__dot--done"
2666
2752
  ].filter(Boolean).join(" ");
2667
2753
  return /* @__PURE__ */ e.jsx(
2668
2754
  "button",
@@ -2671,43 +2757,43 @@ function En({
2671
2757
  className: j,
2672
2758
  role: "tab",
2673
2759
  "aria-selected": h,
2674
- "aria-label": f("stepN", { n: p + 1 }),
2760
+ "aria-label": u("stepN", { n: p + 1 }),
2675
2761
  disabled: !v || p === s,
2676
- onClick: () => a == null ? void 0 : a(p),
2677
- children: u ? /* @__PURE__ */ e.jsx(Pe, { size: 8, strokeWidth: 3 }) : null
2762
+ onClick: () => r == null ? void 0 : r(p),
2763
+ children: f ? /* @__PURE__ */ e.jsx(Pe, { size: 8, strokeWidth: 3 }) : null
2678
2764
  },
2679
2765
  p
2680
2766
  );
2681
2767
  }) }),
2682
- r && /* @__PURE__ */ e.jsxs(dt, { secondary: !0, className: "ds-step-indicator__counter", children: [
2768
+ a && /* @__PURE__ */ e.jsxs(dt, { secondary: !0, className: "ds-step-indicator__counter", children: [
2683
2769
  s + 1,
2684
2770
  " / ",
2685
2771
  t
2686
2772
  ] })
2687
2773
  ] });
2688
2774
  }
2689
- function Tn({
2775
+ function An({
2690
2776
  content: t,
2691
2777
  isStreaming: s = !1,
2692
2778
  cursor: n = "line",
2693
- onChunk: a,
2694
- className: r = "",
2779
+ onChunk: r,
2780
+ className: a = "",
2695
2781
  ...o
2696
2782
  }) {
2697
- const i = B(t);
2783
+ const i = I(t);
2698
2784
  return F(() => {
2699
- t !== i.current && (a == null || a(t), i.current = t);
2700
- }, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", r].filter(Boolean).join(" "), ...o, children: [
2785
+ t !== i.current && (r == null || r(t), i.current = t);
2786
+ }, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...o, children: [
2701
2787
  t,
2702
2788
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2703
2789
  ] });
2704
2790
  }
2705
- function $n({
2791
+ function Bn({
2706
2792
  role: t = "assistant",
2707
2793
  header: s,
2708
2794
  footer: n,
2709
- attachments: a,
2710
- isStreaming: r = !1,
2795
+ attachments: r,
2796
+ isStreaming: a = !1,
2711
2797
  children: o,
2712
2798
  className: i = "",
2713
2799
  ...l
@@ -2715,113 +2801,113 @@ function $n({
2715
2801
  const c = [
2716
2802
  "ds-chat-message",
2717
2803
  `ds-chat-message--${t}`,
2718
- r && "ds-chat-message--streaming",
2804
+ a && "ds-chat-message--streaming",
2719
2805
  i
2720
2806
  ].filter(Boolean).join(" ");
2721
2807
  return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: c, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: o }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2722
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2808
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2723
2809
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: o }),
2724
2810
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2725
2811
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2726
2812
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
2727
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2813
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2728
2814
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: o }),
2729
2815
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2730
2816
  ] });
2731
2817
  }
2732
- function Rn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2733
- const a = B(!1), r = B(0);
2818
+ function In(t, { containerRef: s, smartPause: n = !0 } = {}) {
2819
+ const r = I(!1), a = I(0);
2734
2820
  F(() => {
2735
2821
  const o = s == null ? void 0 : s.current;
2736
2822
  if (!o) return;
2737
2823
  const i = () => {
2738
2824
  const l = o.scrollHeight - o.scrollTop - o.clientHeight < 64;
2739
- !l && o.scrollTop < r.current && (a.current = !0), l && (a.current = !1), r.current = o.scrollTop;
2825
+ !l && o.scrollTop < a.current && (r.current = !0), l && (r.current = !1), a.current = o.scrollTop;
2740
2826
  };
2741
2827
  return o.addEventListener("scroll", i, { passive: !0 }), () => o.removeEventListener("scroll", i);
2742
2828
  }, [s]), F(() => {
2743
2829
  const o = s == null ? void 0 : s.current;
2744
- o && (n && a.current || (o.scrollTop = o.scrollHeight));
2830
+ o && (n && r.current || (o.scrollTop = o.scrollHeight));
2745
2831
  }, t);
2746
2832
  }
2747
2833
  function os({
2748
2834
  prompts: t,
2749
2835
  enabled: s,
2750
2836
  typingSpeed: n = 38,
2751
- erasingSpeed: a = 18,
2752
- holdTime: r = 2200,
2837
+ erasingSpeed: r = 18,
2838
+ holdTime: a = 2200,
2753
2839
  betweenTime: o = 380,
2754
2840
  manualPauseMs: i = 5e3
2755
2841
  }) {
2756
- const [l, c] = P(0), [f, d] = P(""), p = B("typing"), h = B(0), u = B(0), v = B(null), j = B(0);
2842
+ const [l, c] = P(0), [u, d] = P(""), p = I("typing"), h = I(0), f = I(0), v = I(null), j = I(0);
2757
2843
  F(() => {
2758
- u.current = l;
2844
+ f.current = l;
2759
2845
  }, [l]), F(() => {
2760
2846
  if (v.current && (clearTimeout(v.current), v.current = null), !s || t.length === 0) {
2761
2847
  d(""), h.current = 0, p.current = "typing";
2762
2848
  return;
2763
2849
  }
2764
- const g = () => {
2765
- const b = Date.now();
2766
- if (j.current > b) {
2767
- v.current = setTimeout(g, j.current - b);
2850
+ const N = () => {
2851
+ const _ = Date.now();
2852
+ if (j.current > _) {
2853
+ v.current = setTimeout(N, j.current - _);
2768
2854
  return;
2769
2855
  }
2770
- const S = t[u.current % t.length] ?? "";
2771
- p.current === "typing" ? (h.current += 1, d(S.slice(0, h.current)), h.current >= S.length ? (p.current = "holding", v.current = setTimeout(g, r)) : v.current = setTimeout(g, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(g, a)) : (h.current = Math.max(0, h.current - 1), d(S.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % t.length, c(u.current), v.current = setTimeout(g, o)) : v.current = setTimeout(g, a));
2856
+ const S = t[f.current % t.length] ?? "";
2857
+ p.current === "typing" ? (h.current += 1, d(S.slice(0, h.current)), h.current >= S.length ? (p.current = "holding", v.current = setTimeout(N, a)) : v.current = setTimeout(N, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(N, r)) : (h.current = Math.max(0, h.current - 1), d(S.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), v.current = setTimeout(N, o)) : v.current = setTimeout(N, r));
2772
2858
  };
2773
- return v.current = setTimeout(g, 260), () => {
2859
+ return v.current = setTimeout(N, 260), () => {
2774
2860
  v.current && clearTimeout(v.current);
2775
2861
  };
2776
- }, [s, t, n, a, r, o]);
2777
- const N = (g) => {
2862
+ }, [s, t, n, r, a, o]);
2863
+ const w = (N) => {
2778
2864
  if (t.length === 0) return;
2779
- const b = (g % t.length + t.length) % t.length, S = t[b];
2780
- u.current = b, h.current = S.length, p.current = "holding", j.current = Date.now() + i, c(b), d(S);
2781
- }, w = () => N(u.current + 1), y = () => N(u.current - 1), E = t[l % t.length] ?? "";
2782
- return { displayed: f, currentPrompt: E, index: l, next: w, prev: y };
2865
+ const _ = (N % t.length + t.length) % t.length, S = t[_];
2866
+ f.current = _, h.current = S.length, p.current = "holding", j.current = Date.now() + i, c(_), d(S);
2867
+ }, g = () => w(f.current + 1), y = () => w(f.current - 1), E = t[l % t.length] ?? "";
2868
+ return { displayed: u, currentPrompt: E, index: l, next: g, prev: y };
2783
2869
  }
2784
2870
  let is = 0;
2785
- function Sn({
2871
+ function Ln({
2786
2872
  value: t = "",
2787
2873
  onChange: s,
2788
2874
  onSubmit: n,
2789
- onStop: a,
2790
- onKeyDown: r,
2875
+ onStop: r,
2876
+ onKeyDown: a,
2791
2877
  loading: o = !1,
2792
2878
  disabled: i = !1,
2793
2879
  placeholder: l,
2794
2880
  animatedPlaceholders: c,
2795
- attachments: f,
2881
+ attachments: u,
2796
2882
  images: d,
2797
2883
  onAttachFiles: p,
2798
2884
  onAttachImages: h,
2799
- onRemoveAttachment: u,
2885
+ onRemoveAttachment: f,
2800
2886
  onRemoveImage: v,
2801
2887
  acceptImage: j,
2802
- acceptFile: N,
2803
- maxImages: w,
2888
+ acceptFile: w,
2889
+ maxImages: g,
2804
2890
  maxImageSize: y,
2805
2891
  leftSlot: E,
2806
- rightSlot: g,
2807
- className: b = "",
2892
+ rightSlot: N,
2893
+ className: _ = "",
2808
2894
  ...S
2809
2895
  }) {
2810
- const A = K(), { t: D } = ye(), C = B(null), k = B(null), L = B(0), [O, W] = P(!1), [M, _] = P([]), $ = l ?? A.promptPlaceholder, R = (T) => {
2896
+ const A = K(), { t: L } = be(), O = I(null), k = I(null), D = I(0), [C, W] = P(!1), [M, b] = P([]), $ = l ?? A.promptPlaceholder, R = (T) => {
2811
2897
  const z = ++is;
2812
- _((J) => [...J, { id: z, msg: T }]), setTimeout(() => _((J) => J.filter((Q) => Q.id !== z)), 6e3);
2813
- }, V = (T) => _((z) => z.filter((J) => J.id !== T)), H = (T) => T.type.startsWith("image/"), Y = () => !0, m = j ?? H, x = N ?? Y, I = (T) => {
2898
+ b((J) => [...J, { id: z, msg: T }]), setTimeout(() => b((J) => J.filter((Q) => Q.id !== z)), 6e3);
2899
+ }, V = (T) => b((z) => z.filter((J) => J.id !== T)), H = (T) => T.type.startsWith("image/"), Y = () => !0, m = j ?? H, x = w ?? Y, B = (T) => {
2814
2900
  const z = [], J = [], Q = [], ne = [];
2815
- let ae = 0, me = w != null ? w - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2901
+ let ae = 0, me = g != null ? g - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2816
2902
  for (const oe of T)
2817
2903
  m(oe) ? y && oe.size > y ? Q.push(oe.name) : me > 0 ? (z.push(oe), me--) : ae++ : x(oe) ? J.push(oe) : ne.push(oe.name);
2818
2904
  return { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae };
2819
2905
  }, U = (T) => {
2820
- const z = y ? D("fileTooLargeMaxHint", { maxMb: y / 1024 / 1024 }) : "";
2821
- R(D("fileTooLarge", { maxHint: z, names: T.join(", ") }));
2822
- }, ee = (T) => {
2823
- const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = I(T);
2824
- Q.length && U(Q), ne.length && R(D("filesSkipped", { names: ne.join(", ") })), ae && R(D("maxImages", { n: w })), h && z.length && h(z);
2906
+ const z = y ? L("fileTooLargeMaxHint", { maxMb: y / 1024 / 1024 }) : "";
2907
+ R(L("fileTooLarge", { maxHint: z, names: T.join(", ") }));
2908
+ }, te = (T) => {
2909
+ const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(T);
2910
+ Q.length && U(Q), ne.length && R(L("filesSkipped", { names: ne.join(", ") })), ae && R(L("maxImages", { n: g })), h && z.length && h(z);
2825
2911
  const me = J.concat(h ? [] : z);
2826
2912
  p && me.length && p(me);
2827
2913
  };
@@ -2838,16 +2924,16 @@ function Sn({
2838
2924
  return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
2839
2925
  }, [o, i]);
2840
2926
  const le = (T) => {
2841
- T.preventDefault(), L.current++, T.dataTransfer.types.includes("Files") && W(!0);
2927
+ T.preventDefault(), D.current++, T.dataTransfer.types.includes("Files") && W(!0);
2842
2928
  }, G = (T) => {
2843
- T.preventDefault(), L.current--, L.current === 0 && W(!1);
2929
+ T.preventDefault(), D.current--, D.current === 0 && W(!1);
2844
2930
  }, Z = (T) => T.preventDefault(), fe = (T) => {
2845
- T.preventDefault(), L.current = 0, W(!1);
2931
+ T.preventDefault(), D.current = 0, W(!1);
2846
2932
  const z = Array.from(T.dataTransfer.files);
2847
- z.length && ee(z);
2848
- }, be = (T) => {
2933
+ z.length && te(z);
2934
+ }, je = (T) => {
2849
2935
  const z = Array.from(T.target.files || []);
2850
- C.current && (C.current.value = ""), z.length && ee(z);
2936
+ O.current && (O.current.value = ""), z.length && te(z);
2851
2937
  }, Se = (T) => {
2852
2938
  var oe;
2853
2939
  if (!h) return;
@@ -2859,13 +2945,13 @@ function Sn({
2859
2945
  Ve && J.push(Ve);
2860
2946
  }
2861
2947
  if (J.length === 0) return;
2862
- const { imageFiles: Q, tooLarge: ne, skipped: ae, limitExceeded: me } = I(J);
2863
- ne.length && U(ne), ae.length && R(D("filesSkipped", { names: ae.join(", ") })), me && R(D("maxImages", { n: w })), Q.length && (T.preventDefault(), h(Q));
2864
- }, je = !o && !i && !!(c != null && c.length) && t.length === 0, ke = os({
2948
+ const { imageFiles: Q, tooLarge: ne, skipped: ae, limitExceeded: me } = B(J);
2949
+ ne.length && U(ne), ae.length && R(L("filesSkipped", { names: ae.join(", ") })), me && R(L("maxImages", { n: g })), Q.length && (T.preventDefault(), h(Q));
2950
+ }, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke = os({
2865
2951
  prompts: c ?? [],
2866
- enabled: je
2952
+ enabled: Ne
2867
2953
  }), ft = (T) => {
2868
- if (je) {
2954
+ if (Ne) {
2869
2955
  if (T.key === "ArrowDown" || T.key === "ArrowRight") {
2870
2956
  T.preventDefault(), ke.next();
2871
2957
  return;
@@ -2879,30 +2965,30 @@ function Sn({
2879
2965
  return;
2880
2966
  }
2881
2967
  }
2882
- r == null || r(T);
2883
- }, mt = (t.trim() || (d == null ? void 0 : d.length) > 0 || (f == null ? void 0 : f.length) > 0) && !i, He = p || h;
2884
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", b].filter(Boolean).join(" "), ...S, children: [
2968
+ a == null || a(T);
2969
+ }, mt = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, He = p || h;
2970
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...S, children: [
2885
2971
  He && /* @__PURE__ */ e.jsx(
2886
2972
  "input",
2887
2973
  {
2888
- ref: C,
2974
+ ref: O,
2889
2975
  type: "file",
2890
2976
  multiple: !0,
2891
2977
  accept: "*/*",
2892
2978
  className: "ds-prompt-input__file-input",
2893
- onChange: be
2979
+ onChange: je
2894
2980
  }
2895
2981
  ),
2896
2982
  /* @__PURE__ */ e.jsxs(
2897
2983
  "div",
2898
2984
  {
2899
- className: ["ds-prompt-input__box", O && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2985
+ className: ["ds-prompt-input__box", C && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2900
2986
  onDragEnter: le,
2901
2987
  onDragLeave: G,
2902
2988
  onDragOver: Z,
2903
2989
  onDrop: fe,
2904
2990
  children: [
2905
- O && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: A.dropFilesHere }),
2991
+ C && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: A.dropFilesHere }),
2906
2992
  /* @__PURE__ */ e.jsx(
2907
2993
  "textarea",
2908
2994
  {
@@ -2911,13 +2997,13 @@ function Sn({
2911
2997
  onChange: (T) => s == null ? void 0 : s(T.target.value),
2912
2998
  onKeyDown: ft,
2913
2999
  onPaste: Se,
2914
- placeholder: je ? "" : $,
3000
+ placeholder: Ne ? "" : $,
2915
3001
  disabled: o || i,
2916
3002
  rows: 1,
2917
- className: ["ds-prompt-input__textarea", je && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
3003
+ className: ["ds-prompt-input__textarea", Ne && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2918
3004
  }
2919
3005
  ),
2920
- je && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
3006
+ Ne && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2921
3007
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ke.displayed }),
2922
3008
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2923
3009
  ] }),
@@ -2930,7 +3016,7 @@ function Sn({
2930
3016
  onClick: () => v == null ? void 0 : v(z),
2931
3017
  "aria-label": A.removeImage,
2932
3018
  type: "button",
2933
- children: /* @__PURE__ */ e.jsx(se, { size: 12, strokeWidth: 2 })
3019
+ children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
2934
3020
  }
2935
3021
  )
2936
3022
  ] }, z)) }),
@@ -2943,11 +3029,11 @@ function Sn({
2943
3029
  className: "ds-prompt-input__warning-close",
2944
3030
  onClick: () => V(T.id),
2945
3031
  "aria-label": A.dismiss,
2946
- children: /* @__PURE__ */ e.jsx(se, { size: q[1], strokeWidth: 1.5 })
3032
+ children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
2947
3033
  }
2948
3034
  )
2949
3035
  ] }, T.id)) }),
2950
- f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: f.map((T, z) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
3036
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((T, z) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2951
3037
  T.uploading ? /* @__PURE__ */ e.jsx(kt, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ye, { size: q[1], strokeWidth: 1.5 }),
2952
3038
  T.filename,
2953
3039
  T.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: A.uploading }) : /* @__PURE__ */ e.jsx(
@@ -2955,9 +3041,9 @@ function Sn({
2955
3041
  {
2956
3042
  type: "button",
2957
3043
  className: "ds-prompt-input__remove-btn",
2958
- onClick: () => u == null ? void 0 : u(z),
3044
+ onClick: () => f == null ? void 0 : f(z),
2959
3045
  "aria-label": A.removeAttachment,
2960
- children: /* @__PURE__ */ e.jsx(se, { size: q[1], strokeWidth: 1.5 })
3046
+ children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
2961
3047
  }
2962
3048
  )
2963
3049
  ] }) }, z)) }),
@@ -2971,12 +3057,12 @@ function Sn({
2971
3057
  "aria-label": A.attachFiles,
2972
3058
  onClick: () => {
2973
3059
  var T;
2974
- return (T = C.current) == null ? void 0 : T.click();
3060
+ return (T = O.current) == null ? void 0 : T.click();
2975
3061
  }
2976
3062
  }
2977
3063
  ),
2978
3064
  E,
2979
- g,
3065
+ N,
2980
3066
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2981
3067
  o ? /* @__PURE__ */ e.jsx(
2982
3068
  de,
@@ -2984,7 +3070,7 @@ function Sn({
2984
3070
  variant: "primary",
2985
3071
  size: "xs",
2986
3072
  icon: /* @__PURE__ */ e.jsx(Et, { size: q[2], strokeWidth: 1.5 }),
2987
- onClick: a,
3073
+ onClick: r,
2988
3074
  "aria-label": A.stop
2989
3075
  }
2990
3076
  ) : /* @__PURE__ */ e.jsx(
@@ -3005,25 +3091,25 @@ function Sn({
3005
3091
  ] });
3006
3092
  }
3007
3093
  const nt = { fast: 0, standard: 1, premium: 2 }, rt = { fast: "data-5", standard: "data-3", premium: "data-6" };
3008
- function An({
3094
+ function Dn({
3009
3095
  models: t = [],
3010
3096
  value: s,
3011
3097
  onChange: n,
3012
- size: a = "xs",
3013
- minTier: r,
3098
+ size: r = "xs",
3099
+ minTier: a,
3014
3100
  showAutoOption: o = !1,
3015
3101
  groupByTier: i = !0,
3016
3102
  className: l = "",
3017
3103
  ...c
3018
3104
  }) {
3019
- const [f, d] = P(!1), p = B(null), h = B(null), u = B(null), [v, j] = P({}), N = t.filter((k) => !r || k.name === "auto" ? !0 : (nt[k.tier] ?? 1) >= (nt[r] ?? 1)), w = N.find((k) => k.name === "auto"), y = N.filter((k) => k.name !== "auto"), E = t.find((k) => k.name === s), b = new Set(y.map((k) => k.tier).filter(Boolean)).size > 1;
3105
+ const [u, d] = P(!1), p = I(null), h = I(null), f = I(null), [v, j] = P({}), w = t.filter((k) => !a || k.name === "auto" ? !0 : (nt[k.tier] ?? 1) >= (nt[a] ?? 1)), g = w.find((k) => k.name === "auto"), y = w.filter((k) => k.name !== "auto"), E = t.find((k) => k.name === s), _ = new Set(y.map((k) => k.tier).filter(Boolean)).size > 1;
3020
3106
  F(() => {
3021
- if (!f) return;
3022
- const k = 320, L = () => {
3107
+ if (!u) return;
3108
+ const k = 320, D = () => {
3023
3109
  var R;
3024
3110
  const M = (R = h.current) == null ? void 0 : R.getBoundingClientRect();
3025
3111
  if (!M) return;
3026
- const _ = window.innerHeight - M.bottom, $ = _ < k + 8 && M.top > _;
3112
+ const b = window.innerHeight - M.bottom, $ = b < k + 8 && M.top > b;
3027
3113
  j({
3028
3114
  position: "fixed",
3029
3115
  zIndex: "var(--z-dropdown, 500)",
@@ -3031,17 +3117,17 @@ function An({
3031
3117
  ...$ ? { bottom: window.innerHeight - M.top + 4, top: "auto" } : { top: M.bottom + 4, bottom: "auto" }
3032
3118
  });
3033
3119
  };
3034
- L(), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L);
3035
- const O = (M) => {
3036
- var _, $;
3037
- !((_ = p.current) != null && _.contains(M.target)) && !(($ = u.current) != null && $.contains(M.target)) && d(!1);
3120
+ D(), window.addEventListener("scroll", D, !0), window.addEventListener("resize", D);
3121
+ const C = (M) => {
3122
+ var b, $;
3123
+ !((b = p.current) != null && b.contains(M.target)) && !(($ = f.current) != null && $.contains(M.target)) && d(!1);
3038
3124
  }, W = (M) => {
3039
3125
  M.key === "Escape" && d(!1);
3040
3126
  };
3041
- return document.addEventListener("mousedown", O), document.addEventListener("keydown", W), () => {
3042
- window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L), document.removeEventListener("mousedown", O), document.removeEventListener("keydown", W);
3127
+ return document.addEventListener("mousedown", C), document.addEventListener("keydown", W), () => {
3128
+ window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D), document.removeEventListener("mousedown", C), document.removeEventListener("keydown", W);
3043
3129
  };
3044
- }, [f]);
3130
+ }, [u]);
3045
3131
  const S = (k) => {
3046
3132
  n == null || n(k), d(!1);
3047
3133
  }, A = (k) => /* @__PURE__ */ e.jsxs(
@@ -3056,18 +3142,18 @@ function An({
3056
3142
  children: [
3057
3143
  k.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon }) : /* @__PURE__ */ e.jsx(qe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
3058
3144
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: k.displayName || k.name }),
3059
- b && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: rt[k.tier] || "default", children: k.tier })
3145
+ _ && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: rt[k.tier] || "default", children: k.tier })
3060
3146
  ]
3061
3147
  },
3062
3148
  k.name
3063
- ), D = () => !i || !b ? y.map(A) : ["fast", "standard", "premium"].flatMap((k) => {
3064
- const L = y.filter((O) => O.tier === k);
3065
- return L.length ? [
3149
+ ), L = () => !i || !_ ? y.map(A) : ["fast", "standard", "premium"].flatMap((k) => {
3150
+ const D = y.filter((C) => C.tier === k);
3151
+ return D.length ? [
3066
3152
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": k, children: k.charAt(0).toUpperCase() + k.slice(1) }, `lbl-${k}`),
3067
- ...L.map(A)
3153
+ ...D.map(A)
3068
3154
  ] : [];
3069
- }), C = f && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
3070
- o && w && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3155
+ }), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
3156
+ o && g && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3071
3157
  /* @__PURE__ */ e.jsxs(
3072
3158
  "button",
3073
3159
  {
@@ -3086,7 +3172,7 @@ function An({
3086
3172
  ),
3087
3173
  y.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
3088
3174
  ] }),
3089
- D()
3175
+ L()
3090
3176
  ] });
3091
3177
  return /* @__PURE__ */ e.jsxs(
3092
3178
  "div",
@@ -3103,15 +3189,15 @@ function An({
3103
3189
  className: "ds-model-picker__trigger",
3104
3190
  onClick: () => d((k) => !k),
3105
3191
  "aria-haspopup": "listbox",
3106
- "aria-expanded": f,
3192
+ "aria-expanded": u,
3107
3193
  children: [
3108
3194
  E != null && E.icon ? /* @__PURE__ */ e.jsx("span", { children: E.icon }) : /* @__PURE__ */ e.jsx(qe, { size: 12, strokeWidth: 1.5 }),
3109
3195
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (E == null ? void 0 : E.displayName) || (E == null ? void 0 : E.name) || s }),
3110
- b && (E == null ? void 0 : E.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: rt[E.tier] || "default", children: E.tier })
3196
+ _ && (E == null ? void 0 : E.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: rt[E.tier] || "default", children: E.tier })
3111
3197
  ]
3112
3198
  }
3113
3199
  ),
3114
- typeof document < "u" && re.createPortal(C, document.body)
3200
+ typeof document < "u" && re.createPortal(O, document.body)
3115
3201
  ]
3116
3202
  }
3117
3203
  );
@@ -3126,81 +3212,81 @@ function cs(t) {
3126
3212
  s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
3127
3213
  return [...s.values()];
3128
3214
  }
3129
- function In({
3215
+ function Pn({
3130
3216
  sources: t = [],
3131
3217
  layout: s = "list",
3132
3218
  title: n,
3133
- maxVisible: a = 5,
3134
- onSourceClick: r
3219
+ maxVisible: r = 5,
3220
+ onSourceClick: a
3135
3221
  }) {
3136
- const o = K(), { t: i } = ye(), l = n ?? o.sources, [c, f] = P(!1), d = cs(t), p = d.length > a, h = c ? d : d.slice(0, a), u = t.some((w) => w.snippet), v = (w) => w != null && w.length ? i("pageAbbrev", { pages: w.join(", ") }) : null, j = i("moreSources", { n: d.length - a }), N = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3137
- return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: N, children: [
3138
- h.map((w) => {
3139
- const y = w.items.map((b) => b.page).filter(Boolean), E = v(y), g = !!r;
3222
+ const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] = P(!1), d = cs(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((g) => g.snippet), v = (g) => g != null && g.length ? i("pageAbbrev", { pages: g.join(", ") }) : null, j = i("moreSources", { n: d.length - r }), w = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3223
+ return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: w, children: [
3224
+ h.map((g) => {
3225
+ const y = g.items.map((_) => _.page).filter(Boolean), E = v(y), N = !!a;
3140
3226
  return /* @__PURE__ */ e.jsxs(
3141
3227
  "div",
3142
3228
  {
3143
- className: `ds-sources-panel__compact-row${g ? " ds-sources-panel__compact-row--clickable" : ""}`,
3144
- onClick: g ? () => r(w.items[0]) : void 0,
3229
+ className: `ds-sources-panel__compact-row${N ? " ds-sources-panel__compact-row--clickable" : ""}`,
3230
+ onClick: N ? () => a(g.items[0]) : void 0,
3145
3231
  children: [
3146
3232
  /* @__PURE__ */ e.jsx(Rt, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
3147
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: w.filename }),
3233
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: g.filename }),
3148
3234
  E && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: E })
3149
3235
  ]
3150
3236
  },
3151
- w.filename
3237
+ g.filename
3152
3238
  );
3153
3239
  }),
3154
- p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => f(!0), children: j })
3155
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: N, children: [
3240
+ p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: j })
3241
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: w, children: [
3156
3242
  l && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: l }),
3157
- h.map((w) => {
3158
- const y = w.items.map((b) => b.page).filter(Boolean), E = v(y), g = !!r;
3159
- return u ? /* @__PURE__ */ e.jsx(
3160
- Oe,
3243
+ h.map((g) => {
3244
+ const y = g.items.map((_) => _.page).filter(Boolean), E = v(y), N = !!a;
3245
+ return f ? /* @__PURE__ */ e.jsx(
3246
+ Ce,
3161
3247
  {
3162
- title: /* @__PURE__ */ e.jsx(ls, { filename: w.filename, pagesLabel: E }),
3248
+ title: /* @__PURE__ */ e.jsx(ls, { filename: g.filename, pagesLabel: E }),
3163
3249
  padding: "s",
3164
- children: w.items.map((b, S) => /* @__PURE__ */ e.jsx(
3250
+ children: g.items.map((_, S) => /* @__PURE__ */ e.jsx(
3165
3251
  "div",
3166
3252
  {
3167
- className: `ds-sources-panel__snippet${g ? " ds-sources-panel__snippet--clickable" : ""}`,
3168
- onClick: g ? () => r(b) : void 0,
3169
- children: b.snippet ?? i("pageAbbrev", { pages: b.page })
3253
+ className: `ds-sources-panel__snippet${N ? " ds-sources-panel__snippet--clickable" : ""}`,
3254
+ onClick: N ? () => a(_) : void 0,
3255
+ children: _.snippet ?? i("pageAbbrev", { pages: _.page })
3170
3256
  },
3171
3257
  S
3172
3258
  ))
3173
3259
  },
3174
- w.filename
3260
+ g.filename
3175
3261
  ) : /* @__PURE__ */ e.jsxs(
3176
3262
  "div",
3177
3263
  {
3178
- className: `ds-sources-panel__row${g ? " ds-sources-panel__row--clickable" : ""}`,
3179
- onClick: g ? () => r(w.items[0]) : void 0,
3264
+ className: `ds-sources-panel__row${N ? " ds-sources-panel__row--clickable" : ""}`,
3265
+ onClick: N ? () => a(g.items[0]) : void 0,
3180
3266
  children: [
3181
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: w.filename }),
3267
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: g.filename }),
3182
3268
  E && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: E })
3183
3269
  ]
3184
3270
  },
3185
- w.filename
3271
+ g.filename
3186
3272
  );
3187
3273
  }),
3188
- p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => f(!0), children: j })
3274
+ p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: j })
3189
3275
  ] });
3190
3276
  }
3191
3277
  function at(t) {
3192
3278
  return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
3193
3279
  }
3194
- function Bn({
3280
+ function Mn({
3195
3281
  used: t,
3196
3282
  limit: s,
3197
3283
  size: n = "s",
3198
- showCount: a = !0,
3199
- showPercent: r = !1,
3284
+ showCount: r = !0,
3285
+ showPercent: a = !1,
3200
3286
  warningThreshold: o = 0.8,
3201
3287
  errorThreshold: i = 1
3202
3288
  }) {
3203
- const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), f = l >= i ? "error" : l >= o ? "warning" : "normal";
3289
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), u = l >= i ? "error" : l >= o ? "warning" : "normal";
3204
3290
  return /* @__PURE__ */ e.jsxs(
3205
3291
  "div",
3206
3292
  {
@@ -3212,17 +3298,17 @@ function Bn({
3212
3298
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
3213
3299
  "div",
3214
3300
  {
3215
- className: `ds-token-counter__fill ds-token-counter__fill--${f}`,
3301
+ className: `ds-token-counter__fill ds-token-counter__fill--${u}`,
3216
3302
  style: { width: `${c}%` }
3217
3303
  }
3218
3304
  ) }),
3219
- (a || r) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${f}`, children: [
3220
- a && /* @__PURE__ */ e.jsxs("span", { children: [
3305
+ (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
3306
+ r && /* @__PURE__ */ e.jsxs("span", { children: [
3221
3307
  at(t),
3222
3308
  " / ",
3223
3309
  at(s)
3224
3310
  ] }),
3225
- r && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3311
+ a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3226
3312
  Math.round(l * 100),
3227
3313
  "%"
3228
3314
  ] })
@@ -3235,18 +3321,18 @@ const ot = 5;
3235
3321
  function ds(t) {
3236
3322
  return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
3237
3323
  }
3238
- function Dn({
3324
+ function zn({
3239
3325
  value: t = 0,
3240
3326
  size: s = "xs",
3241
3327
  showLabel: n = "none",
3242
- layout: a = "inline"
3328
+ layout: r = "inline"
3243
3329
  }) {
3244
- const r = Math.max(0, Math.min(1, t)), o = Math.round(r * ot), i = ds(r);
3330
+ const a = Math.max(0, Math.min(1, t)), o = Math.round(a * ot), i = ds(a);
3245
3331
  return /* @__PURE__ */ e.jsxs("div", { className: [
3246
3332
  "ds-confidence-bar",
3247
3333
  `ds-confidence-bar--${s}`,
3248
3334
  `ds-confidence-bar--${i}`,
3249
- a === "block" && "ds-confidence-bar--block"
3335
+ r === "block" && "ds-confidence-bar--block"
3250
3336
  ].filter(Boolean).join(" "), children: [
3251
3337
  /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: ot }, (l, c) => /* @__PURE__ */ e.jsx(
3252
3338
  "div",
@@ -3266,40 +3352,40 @@ function Ae({ line: t, lineNumbers: s }) {
3266
3352
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
3267
3353
  ] });
3268
3354
  }
3269
- function Ln({
3355
+ function Fn({
3270
3356
  lines: t = [],
3271
3357
  layout: s = "inline",
3272
3358
  wordWrap: n = !1,
3273
- lineNumbers: a = !0,
3274
- maxHeight: r,
3359
+ lineNumbers: r = !0,
3360
+ maxHeight: a,
3275
3361
  title: o
3276
3362
  }) {
3277
3363
  const i = [
3278
3364
  "ds-diff-view",
3279
3365
  `ds-diff-view--${s}`,
3280
3366
  n && "ds-diff-view--wrap"
3281
- ].filter(Boolean).join(" "), l = r ? { maxHeight: r, overflowY: "auto" } : void 0;
3367
+ ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
3282
3368
  if (s === "split") {
3283
- const c = t.filter((d) => d.type === "remove" || d.type === "context"), f = t.filter((d) => d.type === "add" || d.type === "context");
3369
+ const c = t.filter((d) => d.type === "remove" || d.type === "context"), u = t.filter((d) => d.type === "add" || d.type === "context");
3284
3370
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3285
3371
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3286
3372
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3287
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: a }, p)) }),
3288
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: f.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: a }, p)) })
3373
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: r }, p)) }),
3374
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: r }, p)) })
3289
3375
  ] })
3290
3376
  ] });
3291
3377
  }
3292
3378
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3293
3379
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3294
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, f) => /* @__PURE__ */ e.jsx(Ae, { line: c, lineNumbers: a }, f)) })
3380
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, u) => /* @__PURE__ */ e.jsx(Ae, { line: c, lineNumbers: r }, u)) })
3295
3381
  ] });
3296
3382
  }
3297
3383
  function fs({
3298
3384
  value: t = "idle",
3299
3385
  onLike: s,
3300
3386
  onDislike: n,
3301
- className: a = "",
3302
- likeLabel: r,
3387
+ className: r = "",
3388
+ likeLabel: a,
3303
3389
  dislikeLabel: o,
3304
3390
  ...i
3305
3391
  }) {
@@ -3310,7 +3396,7 @@ function fs({
3310
3396
  className: [
3311
3397
  "ds-message-feedback",
3312
3398
  c && "ds-message-feedback--voted",
3313
- a
3399
+ r
3314
3400
  ].filter(Boolean).join(" "),
3315
3401
  ...i,
3316
3402
  children: [
@@ -3323,7 +3409,7 @@ function fs({
3323
3409
  ].filter(Boolean).join(" "),
3324
3410
  onClick: s,
3325
3411
  disabled: c,
3326
- "aria-label": r ?? l.like,
3412
+ "aria-label": a ?? l.like,
3327
3413
  "aria-pressed": t === "liked",
3328
3414
  children: /* @__PURE__ */ e.jsx(
3329
3415
  St,
@@ -3363,44 +3449,44 @@ function fs({
3363
3449
  function ms(t) {
3364
3450
  const s = t instanceof Date ? t : new Date(t);
3365
3451
  if (isNaN(s)) return null;
3366
- const n = /* @__PURE__ */ new Date(), a = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = new Date(r - 864e5);
3367
- if (s >= r) return a;
3368
- if (s >= o) return `Yesterday ${a}`;
3452
+ const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = new Date(a - 864e5);
3453
+ if (s >= a) return r;
3454
+ if (s >= o) return `Yesterday ${r}`;
3369
3455
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3370
- return `${i} ${l} ${a}`;
3456
+ return `${i} ${l} ${r}`;
3371
3457
  }
3372
- function Pn({
3458
+ function Wn({
3373
3459
  role: t = "assistant",
3374
3460
  text: s,
3375
3461
  timestamp: n,
3376
- feedbackValue: a = "idle",
3377
- onLike: r,
3462
+ feedbackValue: r = "idle",
3463
+ onLike: a,
3378
3464
  onDislike: o,
3379
3465
  className: i = "",
3380
3466
  ...l
3381
3467
  }) {
3382
- const c = t === "assistant" && (r || o), f = !!s, d = n ? ms(n) : null;
3383
- return !c && !f && !d ? null : /* @__PURE__ */ e.jsxs(
3468
+ const c = t === "assistant" && (a || o), u = !!s, d = n ? ms(n) : null;
3469
+ return !c && !u && !d ? null : /* @__PURE__ */ e.jsxs(
3384
3470
  "div",
3385
3471
  {
3386
3472
  className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
3387
3473
  ...l,
3388
3474
  children: [
3389
3475
  t === "user" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d }),
3390
- c && /* @__PURE__ */ e.jsx(fs, { className: "ds-message-action", value: a, onLike: r, onDislike: o }),
3391
- f && /* @__PURE__ */ e.jsx(as, { className: "ds-message-action", text: s }),
3476
+ c && /* @__PURE__ */ e.jsx(fs, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3477
+ u && /* @__PURE__ */ e.jsx(as, { className: "ds-message-action", text: s }),
3392
3478
  t === "assistant" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d })
3393
3479
  ]
3394
3480
  }
3395
3481
  );
3396
3482
  }
3397
- function Mn({ label: t, className: s = "", ...n }) {
3483
+ function On({ label: t, className: s = "", ...n }) {
3398
3484
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
3399
3485
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
3400
3486
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3401
3487
  ] });
3402
3488
  }
3403
- function zn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...r }) {
3489
+ function Cn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3404
3490
  const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3405
3491
  return /* @__PURE__ */ e.jsx(
3406
3492
  "div",
@@ -3414,9 +3500,9 @@ function zn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...r }) {
3414
3500
  ...i && {
3415
3501
  background: "radial-gradient(ellipse 1000px 500px at 50% 30%, rgba(234,100,100,0.18), transparent 70%)"
3416
3502
  },
3417
- ...a
3503
+ ...r
3418
3504
  },
3419
- ...r,
3505
+ ...a,
3420
3506
  children: /* @__PURE__ */ e.jsx(
3421
3507
  "div",
3422
3508
  {
@@ -3441,83 +3527,83 @@ function zn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...r }) {
3441
3527
  }
3442
3528
  );
3443
3529
  }
3444
- function Fn({ children: t, axis: s = "y", style: n, className: a = "", ...r }) {
3530
+ function Un({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3445
3531
  const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3446
3532
  return /* @__PURE__ */ e.jsx(
3447
3533
  "div",
3448
3534
  {
3449
- className: `ds-scrollable ${a}`,
3535
+ className: `ds-scrollable ${r}`,
3450
3536
  style: { ...o, ...n },
3451
- ...r,
3537
+ ...a,
3452
3538
  children: t
3453
3539
  }
3454
3540
  );
3455
3541
  }
3456
- const Ie = 280, ps = 22, hs = 14, ue = 8, Te = 6, xs = 200;
3542
+ const Be = 280, ps = 22, hs = 14, ue = 8, Te = 6, xs = 200;
3457
3543
  function vs(t) {
3458
3544
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3459
3545
  }
3460
- function _s(t, s, n, a) {
3461
- const r = window.innerWidth, o = window.innerHeight;
3462
- if (o - t.bottom >= s + a + ue) return "bottom";
3463
- if (t.top >= s + a + ue) return "top";
3464
- if (r - t.right >= n + a + ue) return "right";
3465
- if (t.left >= n + a + ue) return "left";
3466
- const i = Math.max(t.top, o - t.bottom, r - t.right, t.left);
3467
- return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === r - t.right ? "right" : "left";
3546
+ function bs(t, s, n, r) {
3547
+ const a = window.innerWidth, o = window.innerHeight;
3548
+ if (o - t.bottom >= s + r + ue) return "bottom";
3549
+ if (t.top >= s + r + ue) return "top";
3550
+ if (a - t.right >= n + r + ue) return "right";
3551
+ if (t.left >= n + r + ue) return "left";
3552
+ const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
3553
+ return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
3468
3554
  }
3469
- function bs(t, s, n, a, r) {
3555
+ function _s(t, s, n, r, a) {
3470
3556
  const o = window.innerWidth, i = window.innerHeight;
3471
3557
  let l, c;
3472
3558
  switch (t) {
3473
3559
  case "top":
3474
- l = s.top - n - r, c = s.left + s.width / 2 - a / 2;
3560
+ l = s.top - n - a, c = s.left + s.width / 2 - r / 2;
3475
3561
  break;
3476
3562
  case "bottom":
3477
- l = s.bottom + r, c = s.left + s.width / 2 - a / 2;
3563
+ l = s.bottom + a, c = s.left + s.width / 2 - r / 2;
3478
3564
  break;
3479
3565
  case "left":
3480
- l = s.top + s.height / 2 - n / 2, c = s.left - a - r;
3566
+ l = s.top + s.height / 2 - n / 2, c = s.left - r - a;
3481
3567
  break;
3482
3568
  default:
3483
- l = s.top + s.height / 2 - n / 2, c = s.right + r;
3569
+ l = s.top + s.height / 2 - n / 2, c = s.right + a;
3484
3570
  }
3485
- const f = Math.max(ue, Math.min(o - a - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
3486
- return { top: d, left: f, arrowOffset: c - f, arrowOffsetY: l - d };
3571
+ const u = Math.max(ue, Math.min(o - r - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
3572
+ return { top: d, left: u, arrowOffset: c - u, arrowOffsetY: l - d };
3487
3573
  }
3488
- function Wn({
3574
+ function Hn({
3489
3575
  steps: t,
3490
3576
  currentStep: s,
3491
3577
  onNext: n,
3492
- onBack: a,
3493
- onSkip: r,
3578
+ onBack: r,
3579
+ onSkip: a,
3494
3580
  onFinish: o,
3495
3581
  overlay: i = !0,
3496
3582
  ring: l = !0,
3497
3583
  labelNext: c,
3498
- labelBack: f,
3584
+ labelBack: u,
3499
3585
  labelSkip: d,
3500
3586
  labelFinish: p,
3501
3587
  statePrimary: h = "idle",
3502
- stateBack: u = "idle"
3588
+ stateBack: f = "idle"
3503
3589
  }) {
3504
- const v = K(), { t: j } = ye(), N = c ?? v.next, w = f ?? v.back, y = d ?? v.skipTour, E = p ?? v.done, g = B(null), b = B(t), S = B(s), A = B(l);
3505
- b.current = t, S.current = s, A.current = l;
3506
- const [D, C] = P(!1), [k, L] = P({ position: "fixed", visibility: "hidden", width: Ie }), [O, W] = P("bottom"), [M, _] = P(null), $ = B(!1), R = t[s], V = s === t.length - 1, H = te(() => {
3507
- const Y = b.current[S.current];
3508
- if (!Y || !g.current) return;
3590
+ const v = K(), { t: j } = be(), w = c ?? v.next, g = u ?? v.back, y = d ?? v.skipTour, E = p ?? v.done, N = I(null), _ = I(t), S = I(s), A = I(l);
3591
+ _.current = t, S.current = s, A.current = l;
3592
+ const [L, O] = P(!1), [k, D] = P({ position: "fixed", visibility: "hidden", width: Be }), [C, W] = P("bottom"), [M, b] = P(null), $ = I(!1), R = t[s], V = s === t.length - 1, H = se(() => {
3593
+ const Y = _.current[S.current];
3594
+ if (!Y || !N.current) return;
3509
3595
  const m = vs(Y.target);
3510
3596
  if (!m) return;
3511
- const x = m.getBoundingClientRect(), U = g.current.getBoundingClientRect().height || 160, ee = Ie, le = A.current ? ps : hs, G = Y.position || _s(x, U, ee, le), { top: Z, left: fe, arrowOffset: be, arrowOffsetY: Se } = bs(G, x, U, ee, le);
3512
- W(G), L({
3597
+ const x = m.getBoundingClientRect(), U = N.current.getBoundingClientRect().height || 160, te = Be, le = A.current ? ps : hs, G = Y.position || bs(x, U, te, le), { top: Z, left: fe, arrowOffset: je, arrowOffsetY: Se } = _s(G, x, U, te, le);
3598
+ W(G), D({
3513
3599
  position: "fixed",
3514
3600
  top: Z,
3515
3601
  left: fe,
3516
- width: Ie,
3602
+ width: Be,
3517
3603
  visibility: "visible",
3518
- "--arrow-offset": `${be}px`,
3604
+ "--arrow-offset": `${je}px`,
3519
3605
  "--arrow-offset-y": `${Se}px`
3520
- }), _({
3606
+ }), b({
3521
3607
  top: x.top - Te,
3522
3608
  left: x.left - Te,
3523
3609
  width: x.width + Te * 2,
@@ -3527,40 +3613,40 @@ function Wn({
3527
3613
  return F(() => {
3528
3614
  window.addEventListener("scroll", H, !0), window.addEventListener("resize", H);
3529
3615
  const Y = requestAnimationFrame(() => {
3530
- H(), C(!0), $.current = !0;
3616
+ H(), O(!0), $.current = !0;
3531
3617
  });
3532
3618
  return () => {
3533
3619
  cancelAnimationFrame(Y), window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
3534
3620
  };
3535
3621
  }, []), F(() => {
3536
3622
  if (!$.current) return;
3537
- C(!1);
3623
+ O(!1);
3538
3624
  const Y = setTimeout(() => {
3539
- L((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3540
- H(), C(!0);
3625
+ D((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3626
+ H(), O(!0);
3541
3627
  });
3542
3628
  }, xs + 20);
3543
3629
  return () => clearTimeout(Y);
3544
3630
  }, [s]), F(() => {
3545
- D && g.current && g.current.focus({ preventScroll: !0 });
3546
- }, [D]), F(() => {
3631
+ L && N.current && N.current.focus({ preventScroll: !0 });
3632
+ }, [L]), F(() => {
3547
3633
  const Y = (m) => {
3548
- m.key === "Escape" && r();
3634
+ m.key === "Escape" && a();
3549
3635
  };
3550
3636
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3551
- }, [r]), F(() => {
3552
- if (!D) return;
3637
+ }, [a]), F(() => {
3638
+ if (!L) return;
3553
3639
  const Y = (m) => {
3554
- if (m.key !== "Tab" || !g.current) return;
3640
+ if (m.key !== "Tab" || !N.current) return;
3555
3641
  const x = Array.from(
3556
- g.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3642
+ N.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3557
3643
  );
3558
3644
  if (!x.length) return;
3559
- const I = x[0], U = x[x.length - 1];
3560
- m.shiftKey && document.activeElement === I ? (m.preventDefault(), U.focus()) : !m.shiftKey && document.activeElement === U && (m.preventDefault(), I.focus());
3645
+ const B = x[0], U = x[x.length - 1];
3646
+ m.shiftKey && document.activeElement === B ? (m.preventDefault(), U.focus()) : !m.shiftKey && document.activeElement === U && (m.preventDefault(), B.focus());
3561
3647
  };
3562
3648
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3563
- }, [D]), !R || typeof document > "u" ? null : re.createPortal(
3649
+ }, [L]), !R || typeof document > "u" ? null : re.createPortal(
3564
3650
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3565
3651
  M && /* @__PURE__ */ e.jsx(
3566
3652
  "div",
@@ -3569,7 +3655,7 @@ function Wn({
3569
3655
  "ds-coachmark__spotlight",
3570
3656
  i && "ds-coachmark__spotlight--overlay",
3571
3657
  !l && "ds-coachmark__spotlight--no-ring",
3572
- D && "ds-coachmark__spotlight--visible"
3658
+ L && "ds-coachmark__spotlight--visible"
3573
3659
  ].filter(Boolean).join(" "),
3574
3660
  style: M,
3575
3661
  "aria-hidden": "true"
@@ -3578,7 +3664,7 @@ function Wn({
3578
3664
  /* @__PURE__ */ e.jsxs(
3579
3665
  "div",
3580
3666
  {
3581
- ref: g,
3667
+ ref: N,
3582
3668
  "data-ds-portal": "",
3583
3669
  role: "dialog",
3584
3670
  "aria-modal": "false",
@@ -3586,8 +3672,8 @@ function Wn({
3586
3672
  "aria-label": R.title ?? j("stepOf", { current: s + 1, total: t.length }),
3587
3673
  className: [
3588
3674
  "ds-coachmark__bubble",
3589
- `ds-coachmark__bubble--${O}`,
3590
- D && "ds-coachmark__bubble--visible"
3675
+ `ds-coachmark__bubble--${C}`,
3676
+ L && "ds-coachmark__bubble--visible"
3591
3677
  ].filter(Boolean).join(" "),
3592
3678
  style: k,
3593
3679
  tabIndex: -1,
@@ -3597,9 +3683,9 @@ function Wn({
3597
3683
  {
3598
3684
  type: "button",
3599
3685
  className: "ds-coachmark__close",
3600
- onClick: r,
3686
+ onClick: a,
3601
3687
  "aria-label": y,
3602
- children: /* @__PURE__ */ e.jsx(se, { size: 16, strokeWidth: 2 })
3688
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3603
3689
  }
3604
3690
  ),
3605
3691
  R.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: R.title }),
@@ -3611,8 +3697,8 @@ function Wn({
3611
3697
  t.length
3612
3698
  ] }),
3613
3699
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3614
- s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: u, onClick: a, children: w }),
3615
- /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ? E : N })
3700
+ s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: g }),
3701
+ /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ? E : w })
3616
3702
  ] })
3617
3703
  ] })
3618
3704
  ]
@@ -3622,128 +3708,132 @@ function Wn({
3622
3708
  document.body
3623
3709
  );
3624
3710
  }
3625
- function Cn(t, s = {}) {
3626
- const { storageKey: n } = s, [a, r] = P(0), [o, i] = P(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = te(() => {
3711
+ function Vn(t, s = {}) {
3712
+ const { storageKey: n } = s, [r, a] = P(0), [o, i] = P(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = se(() => {
3627
3713
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3628
3714
  }, [n]);
3629
3715
  return {
3630
- currentStep: a,
3716
+ currentStep: r,
3631
3717
  isActive: o,
3632
3718
  start: () => {
3633
- l() || (r(0), i(!0));
3719
+ l() || (a(0), i(!0));
3634
3720
  },
3635
- next: () => r((f) => Math.min(f + 1, t.length - 1)),
3636
- back: () => r((f) => Math.max(f - 1, 0)),
3721
+ next: () => a((u) => Math.min(u + 1, t.length - 1)),
3722
+ back: () => a((u) => Math.max(u - 1, 0)),
3637
3723
  skip: c,
3638
3724
  finish: c
3639
3725
  };
3640
3726
  }
3641
- function On() {
3642
- const t = B(null), s = te(() => {
3727
+ function Yn() {
3728
+ const t = I(null), s = se(() => {
3643
3729
  const n = t.current;
3644
3730
  if (!n) return;
3645
3731
  n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
3646
- const a = () => {
3647
- n.classList.remove("ds-shake"), n.removeEventListener("animationend", a);
3732
+ const r = () => {
3733
+ n.classList.remove("ds-shake"), n.removeEventListener("animationend", r);
3648
3734
  };
3649
- n.addEventListener("animationend", a);
3735
+ n.addEventListener("animationend", r);
3650
3736
  }, []);
3651
3737
  return { ref: t, shake: s };
3652
3738
  }
3653
3739
  export {
3654
- Oe as Accordion,
3655
- Ds as Alert,
3656
- jn as AnimatedNumber,
3657
- Ys as Avatar,
3740
+ Ce as Accordion,
3741
+ Ls as Alert,
3742
+ yn as AnimatedNumber,
3743
+ Xs as Avatar,
3658
3744
  he as Badge,
3659
- vn as Banner,
3745
+ Nn as Banner,
3660
3746
  Ps as BottomSheet,
3661
- nn as Breadcrumb,
3747
+ ln as Breadcrumb,
3748
+ Os as BrowserPane,
3749
+ Cs as BrowserTabs,
3662
3750
  de as Button,
3663
3751
  $s as Card,
3664
- $n as ChatMessage,
3665
- Hs as Checkbox,
3666
- Wn as Coachmark,
3752
+ Bn as ChatMessage,
3753
+ Gs as Checkbox,
3754
+ Hn as Coachmark,
3667
3755
  Ms as Code,
3668
3756
  Wt as CodeAccordion,
3669
- Dn as ConfidenceBar,
3757
+ zn as ConfidenceBar,
3670
3758
  as as CopyButton,
3671
- Ln as DiffView,
3672
- _n as Dropdown,
3673
- en as EmptyState,
3674
- zn as EngineerGrid,
3675
- tn as FormField,
3759
+ Fn as DiffView,
3760
+ wn as Dropdown,
3761
+ rn as EmptyState,
3762
+ Cn as EngineerGrid,
3763
+ an as FormField,
3676
3764
  Rs as H1,
3677
3765
  Ss as H2,
3678
3766
  As as H3,
3679
- Is as H4,
3680
- gn as InView,
3767
+ Bs as H4,
3768
+ kn as InView,
3681
3769
  ys as Input,
3682
3770
  zs as Link,
3683
- ws as LocaleProvider,
3684
- Os as Mention,
3771
+ Us as List,
3772
+ Hs as ListRow,
3773
+ gs as LocaleProvider,
3774
+ Ys as Mention,
3685
3775
  fs as MessageFeedback,
3686
- Pn as MessageFooter,
3687
- Ls as Modal,
3776
+ Wn as MessageFooter,
3777
+ Ds as Modal,
3688
3778
  xe as ModalFooter,
3689
- An as ModelPicker,
3690
- on as NavRail,
3691
- hn as NavRailAgent,
3692
- cn as NavRailBody,
3693
- pn as NavRailCustomItem,
3694
- fn as NavRailDivider,
3695
- xn as NavRailFlyout,
3696
- un as NavRailFooter,
3697
- dn as NavRailHeader,
3698
- ln as NavRailItem,
3699
- mn as NavRailRecents,
3700
- Bs as P1,
3779
+ Dn as ModelPicker,
3780
+ un as NavRail,
3781
+ _n as NavRailAgent,
3782
+ mn as NavRailBody,
3783
+ bn as NavRailCustomItem,
3784
+ xn as NavRailDivider,
3785
+ jn as NavRailFlyout,
3786
+ hn as NavRailFooter,
3787
+ pn as NavRailHeader,
3788
+ fn as NavRailItem,
3789
+ vn as NavRailRecents,
3790
+ Is as P1,
3701
3791
  Pt as P2,
3702
3792
  dt as P3,
3703
- rn as Pagination,
3704
- bn as ProgressBar,
3705
- Sn as PromptInput,
3706
- Vs as Radio,
3707
- kn as ReasoningBlock,
3708
- Fn as Scrollable,
3709
- Cs as SegmentedControl,
3793
+ cn as Pagination,
3794
+ gn as ProgressBar,
3795
+ Ln as PromptInput,
3796
+ Ks as Radio,
3797
+ Rn as ReasoningBlock,
3798
+ Un as Scrollable,
3799
+ Vs as SegmentedControl,
3710
3800
  Es as Select,
3711
- an as SidePage,
3801
+ dn as SidePage,
3712
3802
  Ze as SidePageFooter,
3713
3803
  Ht as Skeleton,
3714
- In as SourcesPanel,
3715
- Dt as Spinner,
3716
- sn as Stat,
3717
- En as StepIndicator,
3804
+ Pn as SourcesPanel,
3805
+ Lt as Spinner,
3806
+ on as Stat,
3807
+ Sn as StepIndicator,
3718
3808
  Ts as Stepper,
3719
- Tn as StreamingText,
3809
+ An as StreamingText,
3720
3810
  Ws as Tab,
3721
- qs as Table,
3722
- Ks as TableBody,
3723
- Gs as TableHead,
3724
- Xs as TableRow,
3725
- Js as TableSubheaderRow,
3811
+ Js as Table,
3812
+ Qs as TableBody,
3813
+ Zs as TableHead,
3814
+ en as TableRow,
3815
+ tn as TableSubheaderRow,
3726
3816
  Fs as Tabs,
3727
- Qs as Td,
3817
+ nn as Td,
3728
3818
  ks as Textarea,
3729
- Zs as Th,
3730
- Mn as ThinkingDot,
3731
- wn as ToastContainer,
3732
- Us as Toggle,
3733
- Bn as TokenCounter,
3734
- yn as ToolCallBubble,
3735
- yn as ToolCallCard,
3819
+ sn as Th,
3820
+ On as ThinkingDot,
3821
+ Tn as ToastContainer,
3822
+ qs as Toggle,
3823
+ Mn as TokenCounter,
3824
+ $n as ToolCallBubble,
3825
+ $n as ToolCallCard,
3736
3826
  Ue as Tooltip,
3737
3827
  $e as defaultStrings,
3738
3828
  ct as formatString,
3739
3829
  q as iconSizes,
3740
3830
  Qt as useAnimatedNumber,
3741
3831
  os as useAnimatedPlaceholder,
3742
- Cn as useCoachmark,
3832
+ Vn as useCoachmark,
3743
3833
  es as useInView,
3744
- ye as useLocale,
3745
- On as useShake,
3746
- Rn as useStreamScroll,
3834
+ be as useLocale,
3835
+ Yn as useShake,
3836
+ In as useStreamScroll,
3747
3837
  K as useStrings,
3748
- Nn as useToast
3838
+ En as useToast
3749
3839
  };