@donkit-ai/design-system 1.4.70 → 1.4.71

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,7 +1,7 @@
1
- import H, { useState as I, useRef as R, useEffect as P, useLayoutEffect as rt, forwardRef as Ze, useCallback as le, useContext as de, createContext as Qe } from "react";
2
- import { Check as Re, X as Q, ChevronDown as je, Minus as at, Plus as ot, XCircle as Se, AlertTriangle as Ae, CheckCircle as Ie, Info as De, ChevronUp as it, ChevronsUpDown as lt, ChevronLeft as ct, ChevronRight as dt, Copy as ut, Brain as ft, Loader as mt, Paperclip as ze, Square as pt, ArrowUp as ht, Zap as xt, Cpu as Fe, FileText as vt, ThumbsUp as _t, ThumbsDown as bt } from "lucide-react";
1
+ import q, { useState as I, useRef as R, useEffect as P, useLayoutEffect as nt, forwardRef as Je, useCallback as le, useContext as de, createContext as Ze } from "react";
2
+ import { Check as Re, X as ee, ChevronDown as je, Minus as rt, Plus as at, XCircle as Se, AlertTriangle as Ae, CheckCircle as De, Info as Ie, ChevronUp as ot, ChevronsUpDown as it, ChevronLeft as lt, ChevronRight as ct, Copy as dt, Brain as ut, Loader as ft, Paperclip as ze, Square as mt, ArrowUp as pt, Zap as ht, Cpu as Fe, FileText as xt, ThumbsUp as vt, ThumbsDown as _t } from "lucide-react";
3
3
  import me from "react-dom";
4
- const F = {
4
+ const C = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
@@ -18,10 +18,10 @@ var Ee = { exports: {} }, _e = {};
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
- var Ce;
22
- function jt() {
23
- if (Ce) return _e;
24
- Ce = 1;
21
+ var We;
22
+ function bt() {
23
+ if (We) return _e;
24
+ We = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
26
  function n(r, a, o) {
27
27
  var i = null;
@@ -50,26 +50,26 @@ var be = {};
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
52
  */
53
- var We;
54
- function Nt() {
55
- return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var Ce;
54
+ function jt() {
55
+ return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function t(f) {
57
57
  if (f == null) return null;
58
58
  if (typeof f == "function")
59
- return f.$$typeof === z ? null : f.displayName || f.name || null;
59
+ return f.$$typeof === F ? null : f.displayName || f.name || null;
60
60
  if (typeof f == "string") return f;
61
61
  switch (f) {
62
- case v:
62
+ case g:
63
63
  return "Fragment";
64
- case j:
64
+ case _:
65
65
  return "Profiler";
66
- case y:
66
+ case $:
67
67
  return "StrictMode";
68
68
  case B:
69
69
  return "Suspense";
70
- case L:
70
+ case M:
71
71
  return "SuspenseList";
72
- case w:
72
+ case j:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof f == "object")
@@ -78,16 +78,16 @@ function Nt() {
78
78
  ), f.$$typeof) {
79
79
  case b:
80
80
  return "Portal";
81
- case k:
81
+ case y:
82
82
  return f.displayName || "Context";
83
83
  case N:
84
84
  return (f._context.displayName || "Context") + ".Consumer";
85
85
  case S:
86
86
  var T = f.render;
87
87
  return f = f.displayName, f || (f = T.displayName || T.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
88
- case O:
88
+ case W:
89
89
  return T = f.displayName || null, T !== null ? T : t(f.type) || "Memo";
90
- case C:
90
+ case z:
91
91
  T = f._payload, f = f._init;
92
92
  try {
93
93
  return t(f(T));
@@ -108,8 +108,8 @@ function Nt() {
108
108
  }
109
109
  if (T) {
110
110
  T = console;
111
- var W = T.error, Y = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
- return W.call(
111
+ var O = T.error, Y = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
+ return O.call(
113
113
  T,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  Y
@@ -117,8 +117,8 @@ function Nt() {
117
117
  }
118
118
  }
119
119
  function r(f) {
120
- if (f === v) return "<>";
121
- if (typeof f == "object" && f !== null && f.$$typeof === C)
120
+ if (f === g) return "<>";
121
+ if (typeof f == "object" && f !== null && f.$$typeof === z)
122
122
  return "<...>";
123
123
  try {
124
124
  var T = t(f);
@@ -142,34 +142,34 @@ function Nt() {
142
142
  return f.key !== void 0;
143
143
  }
144
144
  function l(f, T) {
145
- function W() {
146
- E || (E = !0, console.error(
145
+ function O() {
146
+ k || (k = !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
  T
149
149
  ));
150
150
  }
151
- W.isReactWarning = !0, Object.defineProperty(f, "key", {
152
- get: W,
151
+ O.isReactWarning = !0, Object.defineProperty(f, "key", {
152
+ get: O,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function d() {
156
+ function c() {
157
157
  var f = t(this.type);
158
158
  return A[f] || (A[f] = !0, console.error(
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
  )), f = this.props.ref, f !== void 0 ? f : null;
161
161
  }
162
- function c(f, T, W, Y, ne, oe) {
163
- var q = W.ref;
162
+ function d(f, T, O, Y, ne, oe) {
163
+ var H = O.ref;
164
164
  return f = {
165
165
  $$typeof: x,
166
166
  type: f,
167
167
  key: T,
168
- props: W,
168
+ props: O,
169
169
  _owner: Y
170
- }, (q !== void 0 ? q : null) !== null ? Object.defineProperty(f, "ref", {
170
+ }, (H !== void 0 ? H : null) !== null ? Object.defineProperty(f, "ref", {
171
171
  enumerable: !1,
172
- get: d
172
+ get: c
173
173
  }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -192,25 +192,25 @@ function Nt() {
192
192
  value: oe
193
193
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
194
194
  }
195
- function u(f, T, W, Y, ne, oe) {
196
- var q = T.children;
197
- if (q !== void 0)
195
+ function u(f, T, O, Y, ne, oe) {
196
+ var H = T.children;
197
+ if (H !== void 0)
198
198
  if (Y)
199
- if (D(q)) {
200
- for (Y = 0; Y < q.length; Y++)
201
- p(q[Y]);
202
- Object.freeze && Object.freeze(q);
199
+ if (D(H)) {
200
+ for (Y = 0; Y < H.length; Y++)
201
+ p(H[Y]);
202
+ Object.freeze && Object.freeze(H);
203
203
  } else
204
204
  console.error(
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
- else p(q);
207
+ else p(H);
208
208
  if (V.call(T, "key")) {
209
- q = t(f);
210
- var ee = Object.keys(T).filter(function(ge) {
209
+ H = t(f);
210
+ var Q = Object.keys(T).filter(function(ge) {
211
211
  return ge !== "key";
212
212
  });
213
- Y = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", $[q + Y] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ Y = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", E[H + Y] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
@@ -218,35 +218,35 @@ React keys must be passed directly to JSX without using spread:
218
218
  let props = %s;
219
219
  <%s key={someKey} {...props} />`,
220
220
  Y,
221
- q,
222
- ee,
223
- q
224
- ), $[q + Y] = !0);
221
+ H,
222
+ Q,
223
+ H
224
+ ), E[H + Y] = !0);
225
225
  }
226
- if (q = null, W !== void 0 && (n(W), q = "" + W), i(T) && (n(T.key), q = "" + T.key), "key" in T) {
227
- W = {};
226
+ if (H = null, O !== void 0 && (n(O), H = "" + O), i(T) && (n(T.key), H = "" + T.key), "key" in T) {
227
+ O = {};
228
228
  for (var ie in T)
229
- ie !== "key" && (W[ie] = T[ie]);
230
- } else W = T;
231
- return q && l(
232
- W,
229
+ ie !== "key" && (O[ie] = T[ie]);
230
+ } else O = T;
231
+ return H && l(
232
+ O,
233
233
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
234
- ), c(
234
+ ), d(
235
235
  f,
236
- q,
237
- W,
236
+ H,
237
+ O,
238
238
  a(),
239
239
  ne,
240
240
  oe
241
241
  );
242
242
  }
243
243
  function p(f) {
244
- h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === C && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
244
+ h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
245
245
  }
246
246
  function h(f) {
247
247
  return typeof f == "object" && f !== null && f.$$typeof === x;
248
248
  }
249
- var m = H, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), k = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, D = Array.isArray, _ = console.createTask ? console.createTask : function() {
249
+ var m = q, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, D = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  m = {
@@ -254,36 +254,36 @@ React keys must be passed directly to JSX without using spread:
254
254
  return f();
255
255
  }
256
256
  };
257
- var E, A = {}, U = m.react_stack_bottom_frame.bind(
257
+ var k, A = {}, U = m.react_stack_bottom_frame.bind(
258
258
  m,
259
259
  o
260
- )(), G = _(r(o)), $ = {};
261
- be.Fragment = v, be.jsx = function(f, T, W) {
260
+ )(), G = v(r(o)), E = {};
261
+ be.Fragment = g, be.jsx = function(f, T, O) {
262
262
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
263
263
  return u(
264
264
  f,
265
265
  T,
266
- W,
266
+ O,
267
267
  !1,
268
268
  Y ? Error("react-stack-top-frame") : U,
269
- Y ? _(r(f)) : G
269
+ Y ? v(r(f)) : G
270
270
  );
271
- }, be.jsxs = function(f, T, W) {
271
+ }, be.jsxs = function(f, T, O) {
272
272
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
273
273
  return u(
274
274
  f,
275
275
  T,
276
- W,
276
+ O,
277
277
  !0,
278
278
  Y ? Error("react-stack-top-frame") : U,
279
- Y ? _(r(f)) : G
279
+ Y ? v(r(f)) : G
280
280
  );
281
281
  };
282
282
  }()), be;
283
283
  }
284
- process.env.NODE_ENV === "production" ? Ee.exports = jt() : Ee.exports = Nt();
284
+ process.env.NODE_ENV === "production" ? Ee.exports = bt() : Ee.exports = jt();
285
285
  var e = Ee.exports;
286
- function wt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
286
+ function Nt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
@@ -294,7 +294,7 @@ function wt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
294
294
  }
295
295
  );
296
296
  }
297
- const gt = { xs: 12, s: 14, m: 16, l: 20 };
297
+ const wt = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function ae({
299
299
  children: t,
300
300
  variant: s = "primary",
@@ -304,62 +304,62 @@ function ae({
304
304
  disabled: o = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
- type: d = "button",
308
- href: c,
307
+ type: c = "button",
308
+ href: d,
309
309
  "aria-label": u,
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const m = a && !t, x = i === "loading", b = i === "success", v = i === "error", y = x || b || v, j = n === "xs" ? "s" : "m", N = s === "danger" ? "on-accent" : "default", k = gt[n] ?? 16, S = x ? /* @__PURE__ */ e.jsx(wt, { size: j, color: N }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: k, strokeWidth: 2.5 }) }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Q, { size: k, strokeWidth: 2.5 }) }) : null, B = [
313
+ const m = a && !t, x = i === "loading", b = i === "success", g = i === "error", $ = x || b || g, _ = n === "xs" ? "s" : "m", N = s === "danger" ? "on-accent" : "default", y = wt[n] ?? 16, S = x ? /* @__PURE__ */ e.jsx(Nt, { size: _, color: N }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: y, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: y, strokeWidth: 2.5 }) }) : null, B = [
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
317
317
  r && "ds-button--full",
318
318
  m && "ds-button--icon-only",
319
319
  p
320
- ].filter(Boolean).join(" "), L = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- y ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
320
+ ].filter(Boolean).join(" "), M = i !== "idle" ? i : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
+ $ ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
322
322
  t
323
323
  ] });
324
- if (c) {
325
- const C = (w) => {
324
+ if (d) {
325
+ const z = (j) => {
326
326
  if (o || x) {
327
- w.preventDefault();
327
+ j.preventDefault();
328
328
  return;
329
329
  }
330
- w.metaKey || w.ctrlKey || w.button === 1 || (w.preventDefault(), l == null || l(w));
330
+ j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), l == null || l(j));
331
331
  };
332
332
  return /* @__PURE__ */ e.jsx(
333
333
  "a",
334
334
  {
335
335
  className: B,
336
- href: o || x ? void 0 : c,
337
- onClick: C,
336
+ href: o || x ? void 0 : d,
337
+ onClick: z,
338
338
  "aria-label": u,
339
339
  "aria-disabled": o || x ? "true" : void 0,
340
340
  "aria-busy": x ? "true" : void 0,
341
- "data-state": L,
341
+ "data-state": M,
342
342
  ...h,
343
- children: O
343
+ children: W
344
344
  }
345
345
  );
346
346
  }
347
347
  return /* @__PURE__ */ e.jsx(
348
348
  "button",
349
349
  {
350
- type: d,
350
+ type: c,
351
351
  className: B,
352
352
  disabled: o,
353
353
  onClick: x ? void 0 : l,
354
354
  "aria-label": u,
355
355
  "aria-busy": x ? "true" : void 0,
356
- "data-state": L,
356
+ "data-state": M,
357
357
  ...h,
358
- children: O
358
+ children: W
359
359
  }
360
360
  );
361
361
  }
362
- function us({
362
+ function cs({
363
363
  label: t,
364
364
  error: s,
365
365
  hint: n,
@@ -368,12 +368,12 @@ function us({
368
368
  iconRight: o,
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
- disabled: d,
372
- id: c,
371
+ disabled: c,
372
+ id: d,
373
373
  ...u
374
374
  }) {
375
- const p = c || `input-${H.useId()}`, h = n ? `${p}-hint` : void 0, m = s ? `${p}-error` : void 0, x = m || h;
376
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${d ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
375
+ const p = d || `input-${q.useId()}`, h = n ? `${p}-hint` : void 0, m = s ? `${p}-error` : void 0, x = m || h;
376
+ 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: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
379
379
  a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
@@ -382,7 +382,7 @@ function us({
382
382
  {
383
383
  id: p,
384
384
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
- disabled: d,
385
+ disabled: c,
386
386
  "aria-invalid": s ? "true" : "false",
387
387
  "aria-describedby": x,
388
388
  ...u
@@ -404,7 +404,7 @@ function us({
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: m, className: "ds-input-error", role: "alert", children: s }) }) })
405
405
  ] });
406
406
  }
407
- function fs({
407
+ function ds({
408
408
  label: t,
409
409
  error: s,
410
410
  hint: n,
@@ -413,10 +413,10 @@ function fs({
413
413
  disabled: o,
414
414
  id: i,
415
415
  resize: l = !0,
416
- rows: d = 3,
417
- ...c
416
+ rows: c = 3,
417
+ ...d
418
418
  }) {
419
- const u = i || `textarea-${H.useId()}`, p = n ? `${u}-hint` : void 0, h = s ? `${u}-error` : void 0, m = h || p;
419
+ const u = i || `textarea-${q.useId()}`, p = n ? `${u}-hint` : void 0, h = s ? `${u}-error` : void 0, m = h || p;
420
420
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: u, children: t }),
422
422
  /* @__PURE__ */ e.jsx(
@@ -427,15 +427,15 @@ function fs({
427
427
  disabled: o,
428
428
  "aria-invalid": s ? "true" : "false",
429
429
  "aria-describedby": m,
430
- rows: d,
431
- ...c
430
+ rows: c,
431
+ ...d
432
432
  }
433
433
  ),
434
434
  n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
435
435
  s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
436
436
  ] });
437
437
  }
438
- function ms({
438
+ function us({
439
439
  label: t,
440
440
  value: s,
441
441
  onChange: n,
@@ -444,129 +444,129 @@ function ms({
444
444
  error: o,
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
- disabled: d = !1,
448
- id: c,
447
+ disabled: c = !1,
448
+ id: d,
449
449
  ...u
450
450
  }) {
451
- const [p, h] = I(!1), [m, x] = I(!1), [b, v] = I({}), [y, j] = I("down"), [N, k] = I(-1), S = R(null), B = R(null), L = R(null), O = R(null), C = c || `select-${H.useId()}`, w = `${C}-label`, z = o ? `${C}-error` : void 0, K = 150, V = ($ = !1) => {
452
- m || (x(!0), k(-1), O.current = setTimeout(() => {
451
+ const [p, h] = I(!1), [m, x] = I(!1), [b, g] = I({}), [$, _] = I("down"), [N, y] = I(-1), S = R(null), B = R(null), M = R(null), W = R(null), z = d || `select-${q.useId()}`, j = `${z}-label`, F = o ? `${z}-error` : void 0, K = 150, V = (E = !1) => {
452
+ m || (x(!0), y(-1), W.current = setTimeout(() => {
453
453
  var f;
454
- h(!1), x(!1), $ && ((f = L.current) == null || f.focus());
454
+ h(!1), x(!1), E && ((f = M.current) == null || f.focus());
455
455
  }, K));
456
- }, D = ($) => {
457
- clearTimeout(O.current), x(!1);
458
- const f = $ !== void 0 ? $ : Math.max(r.findIndex((T) => T.value === s), 0);
459
- k(f), h(!0);
456
+ }, D = (E) => {
457
+ clearTimeout(W.current), x(!1);
458
+ const f = E !== void 0 ? E : Math.max(r.findIndex((T) => T.value === s), 0);
459
+ y(f), h(!0);
460
460
  };
461
- P(() => () => clearTimeout(O.current), []);
462
- const _ = () => {
461
+ P(() => () => clearTimeout(W.current), []);
462
+ const v = () => {
463
463
  var oe;
464
- const $ = (oe = S.current) == null ? void 0 : oe.getBoundingClientRect();
465
- if (!$) return;
466
- const f = window.innerHeight, T = f - $.bottom, W = $.top, ne = T < 300 && W > T;
467
- j(ne ? "up" : "down"), v(
468
- ne ? { bottom: f - $.top + 4, left: $.left, width: $.width } : { top: $.bottom + 4, left: $.left, width: $.width }
464
+ const E = (oe = S.current) == null ? void 0 : oe.getBoundingClientRect();
465
+ if (!E) return;
466
+ const f = window.innerHeight, T = f - E.bottom, O = E.top, ne = T < 300 && O > T;
467
+ _(ne ? "up" : "down"), g(
468
+ ne ? { bottom: f - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
469
469
  );
470
470
  };
471
471
  P(() => {
472
472
  if (p)
473
- return _(), window.addEventListener("scroll", _, !0), window.addEventListener("resize", _), () => {
474
- window.removeEventListener("scroll", _, !0), window.removeEventListener("resize", _);
473
+ return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
474
+ window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
475
475
  };
476
476
  }, [p]), P(() => {
477
- const $ = (f) => {
477
+ const E = (f) => {
478
478
  S.current && !S.current.contains(f.target) && B.current && !B.current.contains(f.target) && V();
479
479
  };
480
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
480
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
481
481
  }, [m]), P(() => {
482
482
  var f;
483
483
  if (!p || N < 0 || !B.current) return;
484
484
  (f = B.current.querySelectorAll(".ds-select-option")[N]) == null || f.scrollIntoView({ block: "nearest" });
485
485
  }, [N, p]);
486
- const E = ($) => {
487
- switch ($.key) {
486
+ const k = (E) => {
487
+ switch (E.key) {
488
488
  case "ArrowDown":
489
- $.preventDefault(), p ? k((f) => Math.min(f + 1, r.length - 1)) : D();
489
+ E.preventDefault(), p ? y((f) => Math.min(f + 1, r.length - 1)) : D();
490
490
  break;
491
491
  case "ArrowUp":
492
- $.preventDefault(), p ? k((f) => Math.max(f - 1, 0)) : D(r.length - 1);
492
+ E.preventDefault(), p ? y((f) => Math.max(f - 1, 0)) : D(r.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && ($.preventDefault(), k(0));
495
+ p && (E.preventDefault(), y(0));
496
496
  break;
497
497
  case "End":
498
- p && ($.preventDefault(), k(r.length - 1));
498
+ p && (E.preventDefault(), y(r.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- $.preventDefault(), p ? N >= 0 && (n == null || n(r[N].value), V(!0)) : D();
502
+ E.preventDefault(), p ? N >= 0 && (n == null || n(r[N].value), V(!0)) : D();
503
503
  break;
504
504
  case "Escape":
505
- p && ($.preventDefault(), V(!0));
505
+ p && (E.preventDefault(), V(!0));
506
506
  break;
507
507
  case "Tab":
508
508
  p && V(!1);
509
509
  break;
510
510
  }
511
- }, A = r.find(($) => $.value === s), U = l === "xs" ? F[1] : l === "small" ? F[2] : F[3], G = p && /* @__PURE__ */ e.jsx(
511
+ }, A = r.find((E) => E.value === s), U = l === "xs" ? C[1] : l === "small" ? C[2] : C[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
514
  ref: B,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
- "aria-labelledby": t ? w : void 0,
517
+ "aria-labelledby": t ? j : void 0,
518
518
  tabIndex: -1,
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
- `ds-select-dropdown--${y}`,
522
+ `ds-select-dropdown--${$}`,
523
523
  m && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
525
  style: b,
526
- children: r.map(($, f) => /* @__PURE__ */ e.jsx(
526
+ children: r.map((E, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
- id: `${C}-opt-${f}`,
529
+ id: `${z}-opt-${f}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": s === $.value,
533
+ "aria-selected": s === E.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- s === $.value && "ds-select-option--selected",
537
+ s === E.value && "ds-select-option--selected",
538
538
  f === N && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- n == null || n($.value), V(!0);
541
+ n == null || n(E.value), V(!0);
542
542
  },
543
- children: $.label
543
+ children: E.label
544
544
  },
545
- $.value
545
+ E.value
546
546
  ))
547
547
  }
548
548
  );
549
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${d ? "ds-select-wrapper--disabled" : ""}`, children: [
550
- t && /* @__PURE__ */ e.jsx("label", { id: w, className: "ds-select-label", children: t }),
549
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
550
+ t && /* @__PURE__ */ e.jsx("label", { id: j, className: "ds-select-label", children: t }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: S, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
- ref: L,
554
+ ref: M,
555
555
  type: "button",
556
- id: C,
556
+ id: z,
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && N >= 0 ? `${C}-opt-${N}` : void 0,
561
- "aria-labelledby": t ? w : void 0,
560
+ "aria-activedescendant": p && N >= 0 ? `${z}-opt-${N}` : void 0,
561
+ "aria-labelledby": t ? j : void 0,
562
562
  "aria-invalid": o ? "true" : "false",
563
- "aria-describedby": z,
563
+ "aria-describedby": F,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- d || (p ? V() : D());
566
+ c || (p ? V() : D());
567
567
  },
568
- onKeyDown: E,
569
- disabled: d,
568
+ onKeyDown: k,
569
+ disabled: c,
570
570
  ...u,
571
571
  children: [
572
572
  /* @__PURE__ */ e.jsx("span", { className: A ? "" : "ds-select-placeholder", children: (A == null ? void 0 : A.label) || a }),
@@ -575,18 +575,18 @@ function ms({
575
575
  {
576
576
  size: U,
577
577
  strokeWidth: 1.5,
578
- className: `ds-select-icon ${p && y === "down" ? "ds-select-icon--open" : ""} ${p && y === "up" ? "ds-select-icon--up" : ""}`,
578
+ className: `ds-select-icon ${p && $ === "down" ? "ds-select-icon--open" : ""} ${p && $ === "up" ? "ds-select-icon--up" : ""}`,
579
579
  "aria-hidden": "true"
580
580
  }
581
581
  )
582
582
  ]
583
583
  }
584
584
  ) }),
585
- o && /* @__PURE__ */ e.jsx("span", { id: z, className: "ds-select-error", role: "alert", children: o }),
585
+ o && /* @__PURE__ */ e.jsx("span", { id: F, className: "ds-select-error", role: "alert", children: o }),
586
586
  typeof document < "u" && me.createPortal(G, document.body)
587
587
  ] });
588
588
  }
589
- function ps({
589
+ function fs({
590
590
  label: t,
591
591
  value: s = 0,
592
592
  onChange: n,
@@ -595,39 +595,39 @@ function ps({
595
595
  step: o = 1,
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
- hint: d,
599
- error: c,
598
+ hint: c,
599
+ error: d,
600
600
  ...u
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const y = Math.min(Number(s) + o, a);
605
- n == null || n(y);
604
+ const $ = Math.min(Number(s) + o, a);
605
+ n == null || n($);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const y = Math.max(Number(s) - o, r);
609
- n == null || n(y);
610
- }, m = (y) => {
608
+ const $ = Math.max(Number(s) - o, r);
609
+ n == null || n($);
610
+ }, m = ($) => {
611
611
  if (l) return;
612
- const j = y.target.value;
613
- if (j === "") {
612
+ const _ = $.target.value;
613
+ if (_ === "") {
614
614
  n == null || n(r);
615
615
  return;
616
616
  }
617
- const N = Number(j);
617
+ const N = Number(_);
618
618
  if (!isNaN(N)) {
619
- const k = Math.min(Math.max(N, r), a);
620
- n == null || n(k);
619
+ const y = Math.min(Math.max(N, r), a);
620
+ n == null || n(y);
621
621
  }
622
622
  }, x = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
- c && "ds-stepper-wrapper--error"
625
+ d && "ds-stepper-wrapper--error"
626
626
  ].filter(Boolean).join(" "), b = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), v = i === "xs" ? F[1] : i === "small" ? F[2] : F[3];
630
+ ].filter(Boolean).join(" "), g = i === "xs" ? C[1] : i === "small" ? C[2] : C[3];
631
631
  return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
632
632
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
633
633
  /* @__PURE__ */ e.jsxs("div", { className: b, children: [
@@ -639,7 +639,7 @@ function ps({
639
639
  onClick: h,
640
640
  disabled: l || s <= r,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(at, { size: v, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(rt, { size: g, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -664,15 +664,15 @@ function ps({
664
664
  onClick: p,
665
665
  disabled: l || s >= a,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(ot, { size: v, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(at, { size: g, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
671
- d && !c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: d }),
672
- c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: c })
671
+ c && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
672
+ d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
673
673
  ] });
674
674
  }
675
- function hs({
675
+ function ms({
676
676
  children: t,
677
677
  padding: s = "m",
678
678
  variant: n = "info",
@@ -683,10 +683,10 @@ function hs({
683
683
  disabled: i = !1,
684
684
  ...l
685
685
  }) {
686
- const c = (r ? "interactive" : n) === "interactive" || a || o, u = [
686
+ const d = (r ? "interactive" : n) === "interactive" || a || o, u = [
687
687
  "ds-card",
688
688
  `ds-card--${s}`,
689
- c && "ds-card--interactive"
689
+ d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
691
  if (o) {
692
692
  const m = (x) => {
@@ -708,7 +708,7 @@ function hs({
708
708
  }
709
709
  );
710
710
  }
711
- const p = c && a ? "button" : "div", h = c && a ? {
711
+ const p = d && a ? "button" : "div", h = d && a ? {
712
712
  type: "button",
713
713
  onClick: a,
714
714
  disabled: i
@@ -717,32 +717,32 @@ function hs({
717
717
  p,
718
718
  {
719
719
  className: u,
720
- role: c && !a ? "article" : void 0,
720
+ role: d && !a ? "article" : void 0,
721
721
  ...h,
722
722
  ...l,
723
723
  children: t
724
724
  }
725
725
  );
726
726
  }
727
- function xs({ children: t, ...s }) {
727
+ function ps({ children: t, ...s }) {
728
728
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
729
729
  }
730
- function vs({ children: t, ...s }) {
730
+ function hs({ children: t, ...s }) {
731
731
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
732
732
  }
733
- function _s({ children: t, ...s }) {
733
+ function xs({ children: t, ...s }) {
734
734
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
735
735
  }
736
- function bs({ children: t, ...s }) {
736
+ function vs({ children: t, ...s }) {
737
737
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
738
738
  }
739
- function js({ children: t, secondary: s = !1, ...n }) {
739
+ function _s({ children: t, secondary: s = !1, ...n }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
741
741
  }
742
- function yt({ children: t, secondary: s = !1, ...n }) {
742
+ function gt({ children: t, secondary: s = !1, ...n }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
744
744
  }
745
- function et({ children: t, secondary: s = !1, ...n }) {
745
+ function Qe({ children: t, secondary: s = !1, ...n }) {
746
746
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
747
747
  }
748
748
  function fe({
@@ -759,12 +759,12 @@ function fe({
759
759
  ].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
760
760
  return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...a, children: t });
761
761
  }
762
- const kt = {
763
- info: De,
764
- success: Ie,
762
+ const yt = {
763
+ info: Ie,
764
+ success: De,
765
765
  warning: Ae,
766
766
  error: Se
767
- }, Ns = H.forwardRef(function({
767
+ }, bs = q.forwardRef(function({
768
768
  children: s,
769
769
  variant: n = "info",
770
770
  title: r,
@@ -772,9 +772,9 @@ const kt = {
772
772
  role: o,
773
773
  ...i
774
774
  }, l) {
775
- const d = kt[n], c = o || (n === "error" ? "alert" : "status");
776
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: c, ...i, children: [
777
- d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: F[3], strokeWidth: 1.5 }) }),
775
+ const c = yt[n], d = o || (n === "error" ? "alert" : "status");
776
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: d, ...i, children: [
777
+ c && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(c, { size: C[3], strokeWidth: 1.5 }) }),
778
778
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
779
779
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
780
780
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
@@ -786,12 +786,12 @@ const kt = {
786
786
  className: "ds-alert__close",
787
787
  onClick: a,
788
788
  "aria-label": "Close alert",
789
- children: /* @__PURE__ */ e.jsx(Q, { size: F[3], strokeWidth: 1.5 })
789
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[3], strokeWidth: 1.5 })
790
790
  }
791
791
  )
792
792
  ] });
793
- }), Et = 200;
794
- function ws({
793
+ }), kt = 200;
794
+ function js({
795
795
  children: t,
796
796
  title: s,
797
797
  onClose: n,
@@ -800,32 +800,32 @@ function ws({
800
800
  subHeader: o,
801
801
  ...i
802
802
  }) {
803
- const l = R(null), d = H.useId(), [c, u] = I(!1), p = () => {
804
- !n || c || (u(!0), setTimeout(() => {
803
+ const l = R(null), c = q.useId(), [d, u] = I(!1), p = () => {
804
+ !n || d || (u(!0), setTimeout(() => {
805
805
  u(!1), n();
806
- }, Et));
806
+ }, kt));
807
807
  };
808
808
  P(() => {
809
- const b = (y) => {
810
- y.key === "Escape" && p();
811
- }, v = (y) => {
812
- var N, k, S;
813
- const j = ((k = (N = y.composedPath) == null ? void 0 : N.call(y)) == null ? void 0 : k[0]) ?? y.target;
814
- l.current && !l.current.contains(j) && !((S = j.closest) != null && S.call(j, "[data-ds-portal]")) && p();
809
+ const b = ($) => {
810
+ $.key === "Escape" && p();
811
+ }, g = ($) => {
812
+ var N, y, S;
813
+ const _ = ((y = (N = $.composedPath) == null ? void 0 : N.call($)) == null ? void 0 : y[0]) ?? $.target;
814
+ l.current && !l.current.contains(_) && !((S = _.closest) != null && S.call(_, "[data-ds-portal]")) && p();
815
815
  };
816
- return document.addEventListener("keydown", b), document.addEventListener("mousedown", v), () => {
817
- document.removeEventListener("keydown", b), document.removeEventListener("mousedown", v);
816
+ return document.addEventListener("keydown", b), document.addEventListener("mousedown", g), () => {
817
+ document.removeEventListener("keydown", b), document.removeEventListener("mousedown", g);
818
818
  };
819
- }, [n, c]);
820
- const h = H.Children.toArray(t), m = h.find((b) => (b == null ? void 0 : b.type) === he), x = h.filter((b) => (b == null ? void 0 : b.type) !== he);
821
- return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", c && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
819
+ }, [n, d]);
820
+ const h = q.Children.toArray(t), m = h.find((b) => (b == null ? void 0 : b.type) === he), x = h.filter((b) => (b == null ? void 0 : b.type) !== he);
821
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
822
822
  "div",
823
823
  {
824
824
  className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
825
825
  ref: l,
826
826
  role: "dialog",
827
827
  "aria-modal": "true",
828
- "aria-labelledby": s ? d : void 0,
828
+ "aria-labelledby": s ? c : void 0,
829
829
  children: [
830
830
  n && /* @__PURE__ */ e.jsx(
831
831
  ae,
@@ -833,13 +833,13 @@ function ws({
833
833
  className: "ds-modal__close",
834
834
  variant: "ghost",
835
835
  size: "small",
836
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
836
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
837
837
  onClick: p,
838
838
  "aria-label": "Close modal"
839
839
  }
840
840
  ),
841
841
  (s || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
842
- s && /* @__PURE__ */ e.jsx("h3", { id: d, className: "ds-modal__title", children: s }),
842
+ s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-modal__title", children: s }),
843
843
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
844
844
  ] }),
845
845
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
@@ -849,34 +849,34 @@ function ws({
849
849
  ) });
850
850
  }
851
851
  function he({ children: t }) {
852
- return !t || H.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
852
+ return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
853
853
  }
854
- const $t = 320;
855
- function gs({
854
+ const Et = 320;
855
+ function Ns({
856
856
  children: t,
857
857
  title: s,
858
858
  onClose: n,
859
859
  subHeader: r,
860
860
  ...a
861
861
  }) {
862
- const o = R(null), i = H.useId(), [l, d] = I(!1), c = () => {
863
- !n || l || (d(!0), setTimeout(() => {
864
- d(!1), n();
865
- }, $t));
862
+ const o = R(null), i = q.useId(), [l, c] = I(!1), d = () => {
863
+ !n || l || (c(!0), setTimeout(() => {
864
+ c(!1), n();
865
+ }, Et));
866
866
  };
867
867
  P(() => {
868
868
  const m = (b) => {
869
- b.key === "Escape" && c();
869
+ b.key === "Escape" && d();
870
870
  }, x = (b) => {
871
- var y, j, N;
872
- const v = ((j = (y = b.composedPath) == null ? void 0 : y.call(b)) == null ? void 0 : j[0]) ?? b.target;
873
- o.current && !o.current.contains(v) && !((N = v.closest) != null && N.call(v, "[data-ds-portal]")) && c();
871
+ var $, _, N;
872
+ const g = ((_ = ($ = b.composedPath) == null ? void 0 : $.call(b)) == null ? void 0 : _[0]) ?? b.target;
873
+ o.current && !o.current.contains(g) && !((N = g.closest) != null && N.call(g, "[data-ds-portal]")) && d();
874
874
  };
875
875
  return document.addEventListener("keydown", m), document.addEventListener("mousedown", x), () => {
876
876
  document.removeEventListener("keydown", m), document.removeEventListener("mousedown", x);
877
877
  };
878
878
  }, [n, l]);
879
- const u = H.Children.toArray(t), p = u.find((m) => (m == null ? void 0 : m.type) === he), h = u.filter((m) => (m == null ? void 0 : m.type) !== he);
879
+ const u = q.Children.toArray(t), p = u.find((m) => (m == null ? void 0 : m.type) === he), h = u.filter((m) => (m == null ? void 0 : m.type) !== he);
880
880
  return /* @__PURE__ */ e.jsx(
881
881
  "div",
882
882
  {
@@ -898,8 +898,8 @@ function gs({
898
898
  className: "ds-bottom-sheet__close",
899
899
  variant: "ghost",
900
900
  size: "small",
901
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
902
- onClick: c,
901
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
902
+ onClick: d,
903
903
  "aria-label": "Close"
904
904
  }
905
905
  ),
@@ -915,7 +915,7 @@ function gs({
915
915
  }
916
916
  );
917
917
  }
918
- function Tt({
918
+ function $t({
919
919
  children: t,
920
920
  title: s = "Code",
921
921
  defaultExpanded: n = !1,
@@ -925,8 +925,8 @@ function Tt({
925
925
  className: i = "",
926
926
  ...l
927
927
  }) {
928
- const [d, c] = I(n), u = r !== void 0, p = u ? r : d, h = () => {
929
- u ? a == null || a(!r) : c((x) => !x);
928
+ const [c, d] = I(n), u = r !== void 0, p = u ? r : c, h = () => {
929
+ u ? a == null || a(!r) : d((x) => !x);
930
930
  }, m = [
931
931
  "ds-code-accordion",
932
932
  `ds-code-accordion--${o}`,
@@ -946,7 +946,7 @@ function Tt({
946
946
  /* @__PURE__ */ e.jsx(
947
947
  je,
948
948
  {
949
- size: F[2],
949
+ size: C[2],
950
950
  strokeWidth: 1.5,
951
951
  className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
952
952
  }
@@ -957,10 +957,10 @@ function Tt({
957
957
  /* @__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 }) }) }) })
958
958
  ] });
959
959
  }
960
- function ys({ children: t, block: s = !1, collapsible: n = !1, title: r = "Code", defaultExpanded: a = !1, ...o }) {
961
- return s ? n ? /* @__PURE__ */ e.jsx(Tt, { title: r, 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 });
960
+ function ws({ children: t, block: s = !1, collapsible: n = !1, title: r = "Code", defaultExpanded: a = !1, ...o }) {
961
+ return s ? n ? /* @__PURE__ */ e.jsx($t, { title: r, 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 });
962
962
  }
963
- function ks({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
963
+ function gs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
964
964
  const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
965
965
  return /* @__PURE__ */ e.jsx(
966
966
  "a",
@@ -975,16 +975,16 @@ function ks({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
975
975
  }
976
976
  );
977
977
  }
978
- function Es({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: H.Children.map(t, (a) => H.isValidElement(a) ? H.cloneElement(a, { size: s, variant: n }) : a) });
978
+ function ys({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: q.Children.map(t, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: s, variant: n }) : a) });
980
980
  }
981
- function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...d }) {
982
- const c = i && !t, u = [
981
+ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
982
+ const d = i && !t, u = [
983
983
  "ds-tab",
984
984
  `ds-tab--${r}`,
985
985
  `ds-tab--${a}`,
986
986
  s && "ds-tab--selected",
987
- c && "ds-tab--icon-only"
987
+ d && "ds-tab--icon-only"
988
988
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
989
989
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
990
990
  t
@@ -1006,7 +1006,7 @@ function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1006
1006
  className: u,
1007
1007
  href: o ? void 0 : l,
1008
1008
  onClick: h,
1009
- ...d,
1009
+ ...c,
1010
1010
  children: p
1011
1011
  }
1012
1012
  );
@@ -1019,32 +1019,32 @@ function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1019
1019
  className: u,
1020
1020
  onClick: n,
1021
1021
  disabled: o,
1022
- ...d,
1022
+ ...c,
1023
1023
  children: p
1024
1024
  }
1025
1025
  );
1026
1026
  }
1027
- function Ts({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1028
- const o = R(null), i = R(null), [l, d] = I(!1), c = R(!1), u = R(null), p = R(null), h = () => {
1027
+ function Es({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1028
+ const o = R(null), i = R(null), [l, c] = I(!1), d = R(!1), u = R(null), p = R(null), h = () => {
1029
1029
  if (!o.current) return;
1030
1030
  const m = o.current.querySelector(`[data-value="${s}"]`);
1031
1031
  if (!m) return;
1032
- const x = o.current.getBoundingClientRect(), b = m.getBoundingClientRect(), v = b.left - x.left, y = b.width;
1033
- i.current ? (i.current.style.transition = c.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = v + "px", i.current.style.width = y + "px", c.current = !1) : (d(!0), requestAnimationFrame(() => {
1032
+ const x = o.current.getBoundingClientRect(), b = m.getBoundingClientRect(), g = b.left - x.left, $ = b.width;
1033
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = $ + "px", d.current = !1) : (c(!0), requestAnimationFrame(() => {
1034
1034
  if (!i.current || !o.current) return;
1035
- const j = o.current.querySelector(`[data-value="${s}"]`);
1036
- if (!j) return;
1037
- const N = o.current.getBoundingClientRect(), k = j.getBoundingClientRect();
1038
- i.current.style.transition = "none", i.current.style.left = k.left - N.left + "px", i.current.style.width = k.width + "px";
1035
+ const _ = o.current.querySelector(`[data-value="${s}"]`);
1036
+ if (!_) return;
1037
+ const N = o.current.getBoundingClientRect(), y = _.getBoundingClientRect();
1038
+ i.current.style.transition = "none", i.current.style.left = y.left - N.left + "px", i.current.style.width = y.width + "px";
1039
1039
  }));
1040
1040
  };
1041
- return p.current = h, rt(() => {
1041
+ return p.current = h, nt(() => {
1042
1042
  const m = u.current !== s;
1043
- u.current = s, c.current = l && m, h();
1043
+ u.current = s, d.current = l && m, h();
1044
1044
  }), P(() => {
1045
1045
  if (!o.current) return;
1046
1046
  const m = new ResizeObserver(() => {
1047
- c.current = !1, p.current();
1047
+ d.current = !1, p.current();
1048
1048
  });
1049
1049
  return m.observe(o.current), () => m.disconnect();
1050
1050
  }, []), /* @__PURE__ */ e.jsxs(
@@ -1095,8 +1095,8 @@ function Be({
1095
1095
  padding: o = "m",
1096
1096
  ...i
1097
1097
  }) {
1098
- const [l, d] = I(n), c = r !== void 0, u = c ? r : l, p = () => {
1099
- c ? a == null || a(!r) : d((m) => !m);
1098
+ const [l, c] = I(n), d = r !== void 0, u = d ? r : l, p = () => {
1099
+ d ? a == null || a(!r) : c((m) => !m);
1100
1100
  }, h = [
1101
1101
  "ds-accordion",
1102
1102
  `ds-accordion--${o}`,
@@ -1115,7 +1115,7 @@ function Be({
1115
1115
  /* @__PURE__ */ e.jsx(
1116
1116
  je,
1117
1117
  {
1118
- size: F[2],
1118
+ size: C[2],
1119
1119
  strokeWidth: 1.5,
1120
1120
  className: `ds-accordion__icon ${u ? "ds-accordion__icon--expanded" : ""}`
1121
1121
  }
@@ -1127,7 +1127,7 @@ function Be({
1127
1127
  ] });
1128
1128
  }
1129
1129
  const re = 8, pe = 8;
1130
- function Rt(t, s, n) {
1130
+ function Tt(t, s, n) {
1131
1131
  const r = window.innerWidth;
1132
1132
  let a, o;
1133
1133
  switch (t) {
@@ -1149,7 +1149,7 @@ function Rt(t, s, n) {
1149
1149
  const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
1150
1150
  return { top: a, left: i, arrowOffset: l };
1151
1151
  }
1152
- function St(t, s, n) {
1152
+ function Rt(t, s, n) {
1153
1153
  const r = window.innerWidth, a = window.innerHeight;
1154
1154
  if (t.top >= s + re + pe) return "top";
1155
1155
  if (a - t.bottom >= s + re + pe) return "bottom";
@@ -1159,15 +1159,15 @@ function St(t, s, n) {
1159
1159
  return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1160
1160
  }
1161
1161
  function Le({ children: t, content: s, position: n, ...r }) {
1162
- const [a, o] = I(!1), [i, l] = I({ visibility: "hidden" }), [d, c] = I(n || "top"), u = R(null), p = R(null), h = R(!1), m = () => {
1162
+ const [a, o] = I(!1), [i, l] = I({ visibility: "hidden" }), [c, d] = I(n || "top"), u = R(null), p = R(null), h = R(!1), m = () => {
1163
1163
  if (!u.current || !p.current) return;
1164
- const b = u.current.getBoundingClientRect(), v = p.current.getBoundingClientRect(), y = n || St(b, v.height, v.width), { top: j, left: N, arrowOffset: k } = Rt(y, b, v);
1165
- c(y), l({
1164
+ const b = u.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), $ = n || Rt(b, g.height, g.width), { top: _, left: N, arrowOffset: y } = Tt($, b, g);
1165
+ d($), l({
1166
1166
  position: "fixed",
1167
- top: j,
1167
+ top: _,
1168
1168
  left: N,
1169
1169
  visibility: "visible",
1170
- "--arrow-offset": `${k}px`
1170
+ "--arrow-offset": `${y}px`
1171
1171
  });
1172
1172
  };
1173
1173
  if (P(() => {
@@ -1179,8 +1179,8 @@ function Le({ children: t, content: s, position: n, ...r }) {
1179
1179
  };
1180
1180
  }, [a, n]), P(() => {
1181
1181
  if (!a) return;
1182
- const b = (v) => {
1183
- u.current && !u.current.contains(v.target) && o(!1);
1182
+ const b = (g) => {
1183
+ u.current && !u.current.contains(g.target) && o(!1);
1184
1184
  };
1185
1185
  return document.addEventListener("touchstart", b), () => document.removeEventListener("touchstart", b);
1186
1186
  }, [a]), !s) return t;
@@ -1189,7 +1189,7 @@ function Le({ children: t, content: s, position: n, ...r }) {
1189
1189
  {
1190
1190
  ref: p,
1191
1191
  "data-ds-portal": "",
1192
- className: `ds-tooltip ds-tooltip--${d}`,
1192
+ className: `ds-tooltip ds-tooltip--${c}`,
1193
1193
  role: "tooltip",
1194
1194
  style: i,
1195
1195
  children: s
@@ -1217,7 +1217,7 @@ function Le({ children: t, content: s, position: n, ...r }) {
1217
1217
  }
1218
1218
  );
1219
1219
  }
1220
- function Rs({
1220
+ function $s({
1221
1221
  checked: t = !1,
1222
1222
  onChange: s,
1223
1223
  size: n = "m",
@@ -1226,12 +1226,12 @@ function Rs({
1226
1226
  id: o,
1227
1227
  ...i
1228
1228
  }) {
1229
- const l = o || `toggle-${H.useId()}`, d = [
1229
+ const l = o || `toggle-${q.useId()}`, c = [
1230
1230
  "ds-toggle",
1231
1231
  `ds-toggle--${n}`,
1232
1232
  r && "ds-toggle--disabled"
1233
1233
  ].filter(Boolean).join(" ");
1234
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1234
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1235
1235
  /* @__PURE__ */ e.jsx(
1236
1236
  "input",
1237
1237
  {
@@ -1239,7 +1239,7 @@ function Rs({
1239
1239
  id: l,
1240
1240
  className: "ds-toggle__input",
1241
1241
  checked: t,
1242
- onChange: (c) => s == null ? void 0 : s(c.target.checked),
1242
+ onChange: (d) => s == null ? void 0 : s(d.target.checked),
1243
1243
  disabled: r,
1244
1244
  ...i
1245
1245
  }
@@ -1248,7 +1248,7 @@ function Rs({
1248
1248
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1249
1249
  ] });
1250
1250
  }
1251
- function Ss({
1251
+ function Ts({
1252
1252
  checked: t = !1,
1253
1253
  onChange: s,
1254
1254
  size: n = "m",
@@ -1257,12 +1257,12 @@ function Ss({
1257
1257
  id: o,
1258
1258
  ...i
1259
1259
  }) {
1260
- const l = o || `checkbox-${H.useId()}`, d = [
1260
+ const l = o || `checkbox-${q.useId()}`, c = [
1261
1261
  "ds-checkbox",
1262
1262
  `ds-checkbox--${n}`,
1263
1263
  r && "ds-checkbox--disabled"
1264
- ].filter(Boolean).join(" "), c = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1264
+ ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1266
1266
  /* @__PURE__ */ e.jsx(
1267
1267
  "input",
1268
1268
  {
@@ -1278,7 +1278,7 @@ function Ss({
1278
1278
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1279
1279
  Re,
1280
1280
  {
1281
- size: c,
1281
+ size: d,
1282
1282
  strokeWidth: 2.5,
1283
1283
  className: "ds-checkbox__icon"
1284
1284
  }
@@ -1286,7 +1286,7 @@ function Ss({
1286
1286
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1287
1287
  ] });
1288
1288
  }
1289
- function As({
1289
+ function Rs({
1290
1290
  checked: t = !1,
1291
1291
  onChange: s,
1292
1292
  size: n = "m",
@@ -1295,33 +1295,33 @@ function As({
1295
1295
  name: o,
1296
1296
  value: i,
1297
1297
  id: l,
1298
- ...d
1298
+ ...c
1299
1299
  }) {
1300
- const c = l || `radio-${H.useId()}`, u = [
1300
+ const d = l || `radio-${q.useId()}`, u = [
1301
1301
  "ds-radio",
1302
1302
  `ds-radio--${n}`,
1303
1303
  r && "ds-radio--disabled"
1304
1304
  ].filter(Boolean).join(" ");
1305
- return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: c, children: [
1305
+ return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: d, children: [
1306
1306
  /* @__PURE__ */ e.jsx(
1307
1307
  "input",
1308
1308
  {
1309
1309
  type: "radio",
1310
- id: c,
1310
+ id: d,
1311
1311
  className: "ds-radio__input",
1312
1312
  checked: t,
1313
1313
  onChange: (p) => s == null ? void 0 : s(p.target.checked),
1314
1314
  disabled: r,
1315
1315
  name: o,
1316
1316
  value: i,
1317
- ...d
1317
+ ...c
1318
1318
  }
1319
1319
  ),
1320
1320
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1321
1321
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1322
1322
  ] });
1323
1323
  }
1324
- function At({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1324
+ function St({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1325
1325
  return /* @__PURE__ */ e.jsx(
1326
1326
  "span",
1327
1327
  {
@@ -1332,7 +1332,7 @@ function At({ width: t, height: s, shape: n = "rect", aspectRatio: r, className:
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- function It({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1335
+ function At({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1336
1336
  return /* @__PURE__ */ e.jsx(
1337
1337
  "span",
1338
1338
  {
@@ -1351,20 +1351,20 @@ function It({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "",
1351
1351
  }
1352
1352
  );
1353
1353
  }
1354
- At.Text = It;
1354
+ St.Text = At;
1355
1355
  function Dt(t) {
1356
1356
  let s = 2166136261;
1357
1357
  for (let n = 0; n < t.length; n++)
1358
1358
  s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
1359
1359
  return s % 360;
1360
1360
  }
1361
- function Bt(t) {
1361
+ function It(t) {
1362
1362
  if (!t) return "";
1363
1363
  const s = t.trim().split(/\s+/);
1364
1364
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1365
1365
  }
1366
- function Is({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1367
- const l = Dt(t ?? ""), [d, c] = I(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Bt(t) });
1366
+ function Ss({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1367
+ const l = Dt(t ?? ""), [c, d] = I(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: It(t) });
1368
1368
  return /* @__PURE__ */ e.jsx(
1369
1369
  "div",
1370
1370
  {
@@ -1372,11 +1372,11 @@ function Is({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style:
1372
1372
  style: { width: r, height: r, "--ds-avatar-h": l, ...o },
1373
1373
  "aria-hidden": "true",
1374
1374
  ...i,
1375
- children: n && !d ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => c(!0) }) : u
1375
+ children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : u
1376
1376
  }
1377
1377
  );
1378
1378
  }
1379
- function Ds({
1379
+ function As({
1380
1380
  children: t,
1381
1381
  size: s = "compact",
1382
1382
  stickyTop: n,
@@ -1406,13 +1406,13 @@ function Ds({
1406
1406
  }
1407
1407
  );
1408
1408
  }
1409
- function Bs({ children: t, ...s }) {
1409
+ function Ds({ children: t, ...s }) {
1410
1410
  return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
1411
1411
  }
1412
- function Ls({ children: t, ...s }) {
1412
+ function Is({ children: t, ...s }) {
1413
1413
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1414
1414
  }
1415
- function Ps({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...d }) {
1415
+ function Bs({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
1416
1416
  return /* @__PURE__ */ e.jsx(
1417
1417
  "tr",
1418
1418
  {
@@ -1426,22 +1426,22 @@ function Ps({ children: t, interactive: s, selected: n, subheader: r, exiting: a
1426
1426
  i
1427
1427
  ].filter(Boolean).join(" "),
1428
1428
  onClick: l,
1429
- ...d,
1429
+ ...c,
1430
1430
  children: t
1431
1431
  }
1432
1432
  );
1433
1433
  }
1434
- function Ms({ children: t, colSpan: s = 999, ...n }) {
1434
+ function Ls({ children: t, colSpan: s = 999, ...n }) {
1435
1435
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1436
1436
  }
1437
- function zs({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1438
- const d = !!r || n !== void 0, c = n === "asc" ? it : n === "desc" ? je : lt;
1437
+ function Ps({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1438
+ const c = !!r || n !== void 0, d = n === "asc" ? ot : n === "desc" ? je : it;
1439
1439
  return /* @__PURE__ */ e.jsx(
1440
1440
  "th",
1441
1441
  {
1442
1442
  className: [
1443
1443
  "ds-th",
1444
- d ? "ds-th--sortable" : "",
1444
+ c ? "ds-th--sortable" : "",
1445
1445
  n ? "ds-th--sorted" : "",
1446
1446
  s !== "left" ? `ds-table-cell--${s}` : "",
1447
1447
  o
@@ -1449,14 +1449,14 @@ function zs({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
1449
1449
  onClick: r,
1450
1450
  style: { width: a, ...i },
1451
1451
  ...l,
1452
- children: d ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1452
+ children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1453
1453
  t,
1454
- /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(c, { size: 11, strokeWidth: 2.5 }) })
1454
+ /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
1455
1455
  ] }) : t
1456
1456
  }
1457
1457
  );
1458
1458
  }
1459
- function Fs({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1459
+ function Ms({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1460
1460
  return /* @__PURE__ */ e.jsx(
1461
1461
  "td",
1462
1462
  {
@@ -1474,7 +1474,7 @@ function Fs({ children: t, align: s = "left", secondary: n, muted: r, truncate:
1474
1474
  }
1475
1475
  );
1476
1476
  }
1477
- function Cs({
1477
+ function zs({
1478
1478
  icon: t,
1479
1479
  title: s,
1480
1480
  description: n,
@@ -1497,7 +1497,7 @@ function Cs({
1497
1497
  }
1498
1498
  );
1499
1499
  }
1500
- function Ws({
1500
+ function Fs({
1501
1501
  label: t,
1502
1502
  hint: s,
1503
1503
  error: n,
@@ -1506,10 +1506,10 @@ function Ws({
1506
1506
  htmlFor: o,
1507
1507
  children: i,
1508
1508
  className: l = "",
1509
- style: d,
1510
- ...c
1509
+ style: c,
1510
+ ...d
1511
1511
  }) {
1512
- const u = H.useId(), p = o ?? u, h = `${p}-hint`, m = `${p}-error`;
1512
+ const u = q.useId(), p = o ?? u, h = `${p}-hint`, m = `${p}-error`;
1513
1513
  return /* @__PURE__ */ e.jsxs(
1514
1514
  "div",
1515
1515
  {
@@ -1517,8 +1517,8 @@ function Ws({
1517
1517
  "data-state": n ? "error" : void 0,
1518
1518
  "data-required": r ? "" : void 0,
1519
1519
  "data-disabled": a ? "" : void 0,
1520
- style: d,
1521
- ...c,
1520
+ style: c,
1521
+ ...d,
1522
1522
  children: [
1523
1523
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
1524
1524
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
@@ -1528,8 +1528,8 @@ function Ws({
1528
1528
  }
1529
1529
  );
1530
1530
  }
1531
- function Os({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1532
- const d = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1531
+ function Ws({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1532
+ const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1533
1533
  return /* @__PURE__ */ e.jsxs(
1534
1534
  "div",
1535
1535
  {
@@ -1544,12 +1544,12 @@ function Os({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
1544
1544
  children: [
1545
1545
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: t }),
1546
1546
  s != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: s }),
1547
- n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${d}`, children: n })
1547
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${c}`, children: n })
1548
1548
  ]
1549
1549
  }
1550
1550
  );
1551
1551
  }
1552
- function Us({
1552
+ function Cs({
1553
1553
  children: t,
1554
1554
  separator: s = "/",
1555
1555
  "aria-label": n = "Breadcrumb",
@@ -1557,7 +1557,7 @@ function Us({
1557
1557
  style: a,
1558
1558
  ...o
1559
1559
  }) {
1560
- const i = H.Children.toArray(t).filter(Boolean);
1560
+ const i = q.Children.toArray(t).filter(Boolean);
1561
1561
  return /* @__PURE__ */ e.jsx(
1562
1562
  "nav",
1563
1563
  {
@@ -1565,14 +1565,14 @@ function Us({
1565
1565
  "aria-label": n,
1566
1566
  style: a,
1567
1567
  ...o,
1568
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, d) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1568
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, c) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1569
1569
  l,
1570
- d < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
- ] }, d)) })
1570
+ c < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
+ ] }, c)) })
1572
1572
  }
1573
1573
  );
1574
1574
  }
1575
- function Vs({
1575
+ function Os({
1576
1576
  page: t,
1577
1577
  total: s,
1578
1578
  onChange: n,
@@ -1582,7 +1582,7 @@ function Vs({
1582
1582
  style: i,
1583
1583
  ...l
1584
1584
  }) {
1585
- const d = Lt(t, s, r);
1585
+ const c = Bt(t, s, r);
1586
1586
  return /* @__PURE__ */ e.jsxs(
1587
1587
  "nav",
1588
1588
  {
@@ -1598,20 +1598,20 @@ function Vs({
1598
1598
  onClick: () => n == null ? void 0 : n(t - 1),
1599
1599
  disabled: t <= 1,
1600
1600
  "aria-label": "Previous page",
1601
- children: /* @__PURE__ */ e.jsx(ct, { size: 16 })
1601
+ children: /* @__PURE__ */ e.jsx(lt, { size: 16 })
1602
1602
  }
1603
1603
  ),
1604
- d.map(
1605
- (c, u) => c === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1604
+ c.map(
1605
+ (d, u) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1606
1606
  "button",
1607
1607
  {
1608
- className: `ds-pagination-page${c === t ? " ds-pagination-page--current" : ""}`,
1609
- onClick: () => c !== t && (n == null ? void 0 : n(c)),
1610
- "aria-current": c === t ? "page" : void 0,
1611
- "aria-label": `Page ${c}`,
1612
- children: c
1608
+ className: `ds-pagination-page${d === t ? " ds-pagination-page--current" : ""}`,
1609
+ onClick: () => d !== t && (n == null ? void 0 : n(d)),
1610
+ "aria-current": d === t ? "page" : void 0,
1611
+ "aria-label": `Page ${d}`,
1612
+ children: d
1613
1613
  },
1614
- c
1614
+ d
1615
1615
  )
1616
1616
  ),
1617
1617
  /* @__PURE__ */ e.jsx(
@@ -1621,123 +1621,68 @@ function Vs({
1621
1621
  onClick: () => n == null ? void 0 : n(t + 1),
1622
1622
  disabled: t >= s,
1623
1623
  "aria-label": "Next page",
1624
- children: /* @__PURE__ */ e.jsx(dt, { size: 16 })
1624
+ children: /* @__PURE__ */ e.jsx(ct, { size: 16 })
1625
1625
  }
1626
1626
  )
1627
1627
  ]
1628
1628
  }
1629
1629
  );
1630
1630
  }
1631
- function Lt(t, s, n) {
1631
+ function Bt(t, s, n) {
1632
1632
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1633
1633
  const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
1634
1634
  r > 2 && o.push("…");
1635
1635
  for (let i = r; i <= a; i++) o.push(i);
1636
1636
  return a < s - 1 && o.push("…"), o.push(s), o;
1637
1637
  }
1638
- const Pt = 200;
1639
- function Ys({
1640
- children: t,
1641
- title: s,
1642
- onClose: n,
1643
- side: r = "right",
1644
- offsetLeft: a = 0,
1645
- offsetRight: o = 0,
1646
- keepOpenRef: i,
1647
- ...l
1648
- }) {
1649
- const d = R(null), c = H.useId(), [u, p] = I(!1), h = () => {
1650
- !n || u || (p(!0), setTimeout(() => {
1651
- p(!1), n();
1652
- }, Pt));
1653
- };
1654
- P(() => {
1655
- const v = (j) => {
1656
- j.key === "Escape" && h();
1657
- }, y = (j) => {
1658
- var k, S, B, L;
1659
- const N = ((S = (k = j.composedPath) == null ? void 0 : k.call(j)) == null ? void 0 : S[0]) ?? j.target;
1660
- (B = i == null ? void 0 : i.current) != null && B.contains(N) || d.current && !d.current.contains(N) && !((L = N.closest) != null && L.call(N, "[data-ds-portal]")) && h();
1661
- };
1662
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", y), () => {
1663
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", y);
1664
- };
1665
- }, [n, u, i]);
1666
- const m = H.Children.toArray(t), x = m.find((v) => (v == null ? void 0 : v.type) === Oe), b = m.filter((v) => (v == null ? void 0 : v.type) !== Oe);
1667
- return /* @__PURE__ */ e.jsx(
1668
- "div",
1669
- {
1670
- className: ["ds-drawer-overlay", u && "ds-drawer-overlay--closing"].filter(Boolean).join(" "),
1671
- style: { "--ds-drawer-offset-left": `${a}px`, "--ds-drawer-offset-right": `${o}px` },
1672
- ...l,
1673
- children: /* @__PURE__ */ e.jsxs(
1674
- "aside",
1675
- {
1676
- className: ["ds-drawer", u && "ds-drawer--closing"].filter(Boolean).join(" "),
1677
- "data-side": r,
1678
- ref: d,
1679
- role: "dialog",
1680
- "aria-modal": "true",
1681
- "aria-labelledby": s ? c : void 0,
1682
- children: [
1683
- /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1684
- s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-drawer-title", children: s }),
1685
- n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: h, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }) })
1686
- ] }),
1687
- /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: b }),
1688
- x
1689
- ]
1690
- }
1691
- )
1692
- }
1693
- );
1694
- }
1695
- function Oe({ children: t }) {
1696
- return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
1697
- }
1698
- const Mt = 320;
1699
- function Hs({
1638
+ const Lt = 300;
1639
+ function Us({
1700
1640
  children: t,
1701
1641
  title: s,
1702
1642
  onClose: n,
1703
1643
  subHeader: r,
1704
- offsetLeft: a = 0,
1705
- offsetRight: o = 0,
1706
- keepOpenRef: i,
1707
- ...l
1644
+ side: a = "right",
1645
+ size: o = "wide",
1646
+ offsetLeft: i = 0,
1647
+ offsetRight: l = 0,
1648
+ keepOpenRef: c,
1649
+ ...d
1708
1650
  }) {
1709
- const d = R(null), c = H.useId(), [u, p] = I(!1), h = () => {
1710
- !n || u || (p(!0), setTimeout(() => {
1711
- p(!1), n();
1712
- }, Mt));
1651
+ const u = R(null), p = q.useId(), [h, m] = I(!1), x = () => {
1652
+ !n || h || (m(!0), setTimeout(() => {
1653
+ m(!1), n();
1654
+ }, Lt));
1713
1655
  };
1714
1656
  P(() => {
1715
- const v = (j) => {
1716
- j.key === "Escape" && h();
1717
- }, y = (j) => {
1718
- var k, S, B, L;
1719
- const N = ((S = (k = j.composedPath) == null ? void 0 : k.call(j)) == null ? void 0 : S[0]) ?? j.target;
1720
- (B = i == null ? void 0 : i.current) != null && B.contains(N) || d.current && !d.current.contains(N) && !((L = N.closest) != null && L.call(N, "[data-ds-portal]")) && h();
1657
+ const _ = (y) => {
1658
+ y.key === "Escape" && x();
1659
+ }, N = (y) => {
1660
+ var B, M, W, z;
1661
+ const S = ((M = (B = y.composedPath) == null ? void 0 : B.call(y)) == null ? void 0 : M[0]) ?? y.target;
1662
+ (W = c == null ? void 0 : c.current) != null && W.contains(S) || u.current && !u.current.contains(S) && !((z = S.closest) != null && z.call(S, "[data-ds-portal]")) && x();
1721
1663
  };
1722
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", y), () => {
1723
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", y);
1664
+ return document.addEventListener("keydown", _), document.addEventListener("mousedown", N), () => {
1665
+ document.removeEventListener("keydown", _), document.removeEventListener("mousedown", N);
1724
1666
  };
1725
- }, [n, u, i]);
1726
- const m = H.Children.toArray(t), x = m.find((v) => (v == null ? void 0 : v.type) === Ue || (v == null ? void 0 : v.type) === he), b = m.filter((v) => (v == null ? void 0 : v.type) !== Ue && (v == null ? void 0 : v.type) !== he);
1667
+ }, [n, h, c]);
1668
+ const b = q.Children.toArray(t), g = b.find((_) => (_ == null ? void 0 : _.type) === Oe || (_ == null ? void 0 : _.type) === he), $ = b.filter((_) => (_ == null ? void 0 : _.type) !== Oe && (_ == null ? void 0 : _.type) !== he);
1727
1669
  return /* @__PURE__ */ e.jsx(
1728
1670
  "div",
1729
1671
  {
1730
- className: ["ds-side-page-overlay", u && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1731
- style: { "--ds-side-page-offset-left": `${a}px`, "--ds-side-page-offset-right": `${o}px` },
1732
- ...l,
1672
+ className: ["ds-side-page-overlay", h && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1673
+ "data-side": a,
1674
+ style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1675
+ ...d,
1733
1676
  children: /* @__PURE__ */ e.jsxs(
1734
1677
  "div",
1735
1678
  {
1736
- ref: d,
1737
- className: ["ds-side-page", u && "ds-side-page--closing"].filter(Boolean).join(" "),
1679
+ ref: u,
1680
+ className: ["ds-side-page", h && "ds-side-page--closing"].filter(Boolean).join(" "),
1681
+ "data-side": a,
1682
+ "data-size": o,
1738
1683
  role: "dialog",
1739
1684
  "aria-modal": "true",
1740
- "aria-labelledby": s ? c : void 0,
1685
+ "aria-labelledby": s ? p : void 0,
1741
1686
  children: [
1742
1687
  n && /* @__PURE__ */ e.jsx(
1743
1688
  ae,
@@ -1745,27 +1690,27 @@ function Hs({
1745
1690
  className: "ds-side-page__close",
1746
1691
  variant: "ghost",
1747
1692
  size: "small",
1748
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
1749
- onClick: h,
1693
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
1694
+ onClick: x,
1750
1695
  "aria-label": "Close"
1751
1696
  }
1752
1697
  ),
1753
1698
  (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1754
- s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-side-page__title", children: s }),
1699
+ s && /* @__PURE__ */ e.jsx("h3", { id: p, className: "ds-side-page__title", children: s }),
1755
1700
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
1756
1701
  ] }),
1757
- /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: b }),
1758
- x
1702
+ /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: $ }),
1703
+ g
1759
1704
  ]
1760
1705
  }
1761
1706
  )
1762
1707
  }
1763
1708
  );
1764
1709
  }
1765
- function Ue({ children: t }) {
1766
- return !t || H.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1710
+ function Oe({ children: t }) {
1711
+ return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1767
1712
  }
1768
- const ve = Qe({ collapsed: !1, side: "left" }), we = Qe(!1), qs = Ze(function({
1713
+ const ve = Ze({ collapsed: !1, side: "left" }), we = Ze(!1), Vs = Je(function({
1769
1714
  children: s,
1770
1715
  collapsed: n = !1,
1771
1716
  side: r = "left",
@@ -1773,27 +1718,27 @@ const ve = Qe({ collapsed: !1, side: "left" }), we = Qe(!1), qs = Ze(function({
1773
1718
  className: o = "",
1774
1719
  ...i
1775
1720
  }, l) {
1776
- const d = [
1721
+ const c = [
1777
1722
  "ds-nav-rail",
1778
1723
  n && "ds-nav-rail--collapsed",
1779
1724
  `ds-nav-rail--${r}`,
1780
1725
  o
1781
- ].filter(Boolean).join(" "), c = le((u) => {
1726
+ ].filter(Boolean).join(" "), d = le((u) => {
1782
1727
  !n || !a || u.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]') || a();
1783
1728
  }, [n, a]);
1784
1729
  return /* @__PURE__ */ e.jsx(ve.Provider, { value: { collapsed: n, side: r }, children: /* @__PURE__ */ e.jsx(
1785
1730
  "nav",
1786
1731
  {
1787
1732
  ref: l,
1788
- className: d,
1789
- onClick: c,
1733
+ className: c,
1734
+ onClick: d,
1790
1735
  "data-expandable": n && a ? "" : void 0,
1791
1736
  ...i,
1792
1737
  children: s
1793
1738
  }
1794
1739
  ) });
1795
1740
  });
1796
- function Gs({
1741
+ function Ys({
1797
1742
  icon: t,
1798
1743
  label: s,
1799
1744
  selected: n = !1,
@@ -1802,12 +1747,12 @@ function Gs({
1802
1747
  onClick: o,
1803
1748
  count: i,
1804
1749
  updated: l = !1,
1805
- open: d = !1,
1806
- onboarding: c = !1,
1750
+ open: c = !1,
1751
+ onboarding: d = !1,
1807
1752
  className: u = "",
1808
1753
  ...p
1809
1754
  }) {
1810
- const { collapsed: h, side: m } = de(ve), x = de(we), y = {
1755
+ const { collapsed: h, side: m } = de(ve), x = de(we), $ = {
1811
1756
  className: [
1812
1757
  "ds-nav-rail__item",
1813
1758
  u
@@ -1820,32 +1765,32 @@ function Gs({
1820
1765
  ...{
1821
1766
  "data-selected": n || void 0,
1822
1767
  "data-disabled": r || void 0,
1823
- "data-open": d || void 0,
1824
- "data-onboarding": c || void 0
1768
+ "data-open": c || void 0,
1769
+ "data-onboarding": d || void 0
1825
1770
  },
1826
1771
  ...p
1827
- }, j = i != null, N = m === "left" ? "right" : "left", k = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1772
+ }, _ = i != null, N = m === "left" ? "right" : "left", y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1828
1773
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1829
1774
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1830
1775
  !h && l && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1831
- !h && j && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1776
+ !h && _ && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1832
1777
  h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1833
- ] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...y, children: k }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...y, children: k });
1778
+ ] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...$, children: y }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...$, children: y });
1834
1779
  return h && !x ? /* @__PURE__ */ e.jsx(Le, { content: s, position: N, children: S }) : S;
1835
1780
  }
1836
- function Ks({ children: t, className: s = "", ...n }) {
1781
+ function Hs({ children: t, className: s = "", ...n }) {
1837
1782
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
1838
1783
  }
1839
- function Xs({ children: t, className: s = "", ...n }) {
1784
+ function qs({ children: t, className: s = "", ...n }) {
1840
1785
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
1841
1786
  }
1842
- function Js({ children: t, className: s = "", ...n }) {
1787
+ function Gs({ children: t, className: s = "", ...n }) {
1843
1788
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
1844
1789
  }
1845
- function Zs({ className: t = "", ...s }) {
1790
+ function Ks({ className: t = "", ...s }) {
1846
1791
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
1847
1792
  }
1848
- function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...a }) {
1793
+ function Xs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...a }) {
1849
1794
  const { collapsed: o } = de(ve), [i, l] = I(n);
1850
1795
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
1851
1796
  !o && /* @__PURE__ */ e.jsxs(
@@ -1853,7 +1798,7 @@ function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1853
1798
  {
1854
1799
  type: "button",
1855
1800
  className: ["ds-nav-rail__recents-toggle", !i && "ds-nav-rail__recents-toggle--closed"].filter(Boolean).join(" "),
1856
- onClick: () => l((d) => !d),
1801
+ onClick: () => l((c) => !c),
1857
1802
  "aria-expanded": i,
1858
1803
  children: [
1859
1804
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: s }),
@@ -1864,14 +1809,14 @@ function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1864
1809
  (i || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
1865
1810
  ] });
1866
1811
  }
1867
- const en = Ze(function({
1812
+ const Js = Je(function({
1868
1813
  as: s = "button",
1869
1814
  avatar: n,
1870
1815
  label: r,
1871
1816
  className: a = "",
1872
1817
  ...o
1873
1818
  }, i) {
1874
- const { collapsed: l, side: d } = de(ve), c = de(we), u = d === "left" ? "right" : "left", p = [
1819
+ const { collapsed: l, side: c } = de(ve), d = de(we), u = c === "left" ? "right" : "left", p = [
1875
1820
  "ds-nav-rail__item",
1876
1821
  "ds-nav-rail__agent",
1877
1822
  a
@@ -1889,10 +1834,10 @@ const en = Ze(function({
1889
1834
  children: h
1890
1835
  }
1891
1836
  );
1892
- return l && !c ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: m }) : m;
1837
+ return l && !d ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: m }) : m;
1893
1838
  });
1894
- function tn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
1895
- const { collapsed: d, side: c } = de(ve), u = de(we), m = {
1839
+ function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
1840
+ const { collapsed: c, side: d } = de(ve), u = de(we), m = {
1896
1841
  className: [
1897
1842
  "ds-nav-rail__item",
1898
1843
  "ds-nav-rail__agent",
@@ -1909,12 +1854,12 @@ function tn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
1909
1854
  ...l
1910
1855
  }, x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1911
1856
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1912
- !d && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1913
- ] }), b = c === "left" ? "right" : "left", v = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...m, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...m, children: x });
1914
- return d && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: b, children: v }) : v;
1857
+ !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1858
+ ] }), b = d === "left" ? "right" : "left", g = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...m, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...m, children: x });
1859
+ return c && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: b, children: g }) : g;
1915
1860
  }
1916
- const Ve = 240, Ye = 6, He = 8;
1917
- function sn({
1861
+ const Ue = 240, Ve = 6, Ye = 8;
1862
+ function Qs({
1918
1863
  trigger: t,
1919
1864
  title: s,
1920
1865
  children: n,
@@ -1922,25 +1867,25 @@ function sn({
1922
1867
  onOpenChange: a,
1923
1868
  defaultOpen: o = !1
1924
1869
  }) {
1925
- const { side: i } = de(ve), [l, d] = I(o), c = r !== void 0, u = c ? r : l, [p, h] = I(!1), m = R(null), x = R(null), [b, v] = I({}), y = le(() => {
1926
- c ? a == null || a(!0) : d(!0);
1927
- }, [c, a]), j = le(() => {
1928
- c ? a == null || a(!1) : d(!1);
1929
- }, [c, a]), N = le(() => u ? j() : y(), [u, y, j]), k = le(() => {
1930
- var z;
1870
+ const { side: i } = de(ve), [l, c] = I(o), d = r !== void 0, u = d ? r : l, [p, h] = I(!1), m = R(null), x = R(null), [b, g] = I({}), $ = le(() => {
1871
+ d ? a == null || a(!0) : c(!0);
1872
+ }, [d, a]), _ = le(() => {
1873
+ d ? a == null || a(!1) : c(!1);
1874
+ }, [d, a]), N = le(() => u ? _() : $(), [u, $, _]), y = le(() => {
1875
+ var F;
1931
1876
  const B = m.current;
1932
1877
  if (!B) return;
1933
- const L = B.getBoundingClientRect(), O = window.innerHeight, C = ((z = x.current) == null ? void 0 : z.offsetHeight) ?? 300, w = Math.max(He, Math.min(O - C - He, L.top));
1934
- v(i === "right" ? {
1878
+ const M = B.getBoundingClientRect(), W = window.innerHeight, z = ((F = x.current) == null ? void 0 : F.offsetHeight) ?? 300, j = Math.max(Ye, Math.min(W - z - Ye, M.top));
1879
+ g(i === "right" ? {
1935
1880
  position: "fixed",
1936
- top: w,
1937
- right: window.innerWidth - L.left + Ye,
1938
- width: Ve
1881
+ top: j,
1882
+ right: window.innerWidth - M.left + Ve,
1883
+ width: Ue
1939
1884
  } : {
1940
1885
  position: "fixed",
1941
- top: w,
1942
- left: L.right + Ye,
1943
- width: Ve
1886
+ top: j,
1887
+ left: M.right + Ve,
1888
+ width: Ue
1944
1889
  });
1945
1890
  }, [i]);
1946
1891
  P(() => {
@@ -1948,21 +1893,21 @@ function sn({
1948
1893
  h(!1);
1949
1894
  return;
1950
1895
  }
1951
- return k(), requestAnimationFrame(() => h(!0)), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
1952
- window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
1896
+ return y(), requestAnimationFrame(() => h(!0)), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1897
+ window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1953
1898
  };
1954
- }, [u, k]), P(() => {
1899
+ }, [u, y]), P(() => {
1955
1900
  if (!u) return;
1956
- const B = (O) => {
1957
- var C, w;
1958
- !((C = x.current) != null && C.contains(O.target)) && !((w = m.current) != null && w.contains(O.target)) && j();
1959
- }, L = (O) => {
1960
- O.key === "Escape" && j();
1901
+ const B = (W) => {
1902
+ var z, j;
1903
+ !((z = x.current) != null && z.contains(W.target)) && !((j = m.current) != null && j.contains(W.target)) && _();
1904
+ }, M = (W) => {
1905
+ W.key === "Escape" && _();
1961
1906
  };
1962
- return document.addEventListener("mousedown", B), document.addEventListener("keydown", L), () => {
1963
- document.removeEventListener("mousedown", B), document.removeEventListener("keydown", L);
1907
+ return document.addEventListener("mousedown", B), document.addEventListener("keydown", M), () => {
1908
+ document.removeEventListener("mousedown", B), document.removeEventListener("keydown", M);
1964
1909
  };
1965
- }, [u, j]);
1910
+ }, [u, _]);
1966
1911
  const S = u && /* @__PURE__ */ e.jsxs(
1967
1912
  "div",
1968
1913
  {
@@ -1984,9 +1929,9 @@ function sn({
1984
1929
  {
1985
1930
  type: "button",
1986
1931
  className: "ds-nav-rail-flyout__close",
1987
- onClick: j,
1932
+ onClick: _,
1988
1933
  "aria-label": "Close",
1989
- children: /* @__PURE__ */ e.jsx(Q, { size: 16, strokeWidth: 2 })
1934
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
1990
1935
  }
1991
1936
  )
1992
1937
  ] }),
@@ -1999,13 +1944,13 @@ function sn({
1999
1944
  typeof document < "u" && me.createPortal(S, document.body)
2000
1945
  ] });
2001
1946
  }
2002
- const zt = {
2003
- info: De,
2004
- success: Ie,
1947
+ const Pt = {
1948
+ info: Ie,
1949
+ success: De,
2005
1950
  warning: Ae,
2006
1951
  error: Se
2007
1952
  };
2008
- function nn({
1953
+ function en({
2009
1954
  children: t,
2010
1955
  variant: s = "info",
2011
1956
  action: n,
@@ -2014,15 +1959,15 @@ function nn({
2014
1959
  role: o,
2015
1960
  ...i
2016
1961
  }) {
2017
- const l = zt[s], d = o || (s === "error" ? "alert" : "status");
1962
+ const l = Pt[s], c = o || (s === "error" ? "alert" : "status");
2018
1963
  return /* @__PURE__ */ e.jsxs(
2019
1964
  "div",
2020
1965
  {
2021
1966
  className: `ds-banner ds-banner--${s}`,
2022
- role: d,
1967
+ role: c,
2023
1968
  ...i,
2024
1969
  children: [
2025
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: F[2], strokeWidth: 1.5 }) }),
1970
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: C[2], strokeWidth: 1.5 }) }),
2026
1971
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
2027
1972
  n && /* @__PURE__ */ e.jsx(
2028
1973
  "button",
@@ -2040,14 +1985,14 @@ function nn({
2040
1985
  className: "ds-banner-dismiss",
2041
1986
  onClick: a,
2042
1987
  "aria-label": "Dismiss",
2043
- children: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 })
1988
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 })
2044
1989
  }
2045
1990
  )
2046
1991
  ]
2047
1992
  }
2048
1993
  );
2049
1994
  }
2050
- function rn({
1995
+ function tn({
2051
1996
  trigger: t,
2052
1997
  items: s = [],
2053
1998
  open: n,
@@ -2056,9 +2001,9 @@ function rn({
2056
2001
  fullWidth: o = !1,
2057
2002
  className: i = "",
2058
2003
  style: l,
2059
- ...d
2004
+ ...c
2060
2005
  }) {
2061
- const [c, u] = I(!1), [p, h] = I(!1), m = n !== void 0, x = m ? n : c, b = R(null), v = R(null), y = R(null), j = R(null), [N, k] = I({}), S = R(null), B = 150, L = () => {
2006
+ const [d, u] = I(!1), [p, h] = I(!1), m = n !== void 0, x = m ? n : d, b = R(null), g = R(null), $ = R(null), _ = R(null), [N, y] = I({}), S = R(null), B = 150, M = () => {
2062
2007
  if (m)
2063
2008
  r == null || r(!1);
2064
2009
  else {
@@ -2067,87 +2012,87 @@ function rn({
2067
2012
  u(!1), h(!1);
2068
2013
  }, B);
2069
2014
  }
2070
- }, O = () => {
2071
- const _ = !x;
2072
- m ? r == null || r(_) : _ ? (clearTimeout(S.current), h(!1), u(!0)) : L();
2073
- }, C = () => {
2015
+ }, W = () => {
2016
+ const v = !x;
2017
+ m ? r == null || r(v) : v ? (clearTimeout(S.current), h(!1), u(!0)) : M();
2018
+ }, z = () => {
2074
2019
  x || (m ? r == null || r(!0) : (clearTimeout(S.current), h(!1), u(!0)));
2075
2020
  };
2076
2021
  P(() => () => clearTimeout(S.current), []), P(() => {
2077
2022
  if (!x) return;
2078
- const _ = 300, E = () => {
2079
- var $;
2080
- const A = ($ = b.current) == null ? void 0 : $.getBoundingClientRect();
2023
+ const v = 300, k = () => {
2024
+ var E;
2025
+ const A = (E = b.current) == null ? void 0 : E.getBoundingClientRect();
2081
2026
  if (!A) return;
2082
- const U = window.innerHeight - A.bottom, G = U < _ + 8 && A.top > U;
2083
- k(
2027
+ const U = window.innerHeight - A.bottom, G = U < v + 8 && A.top > U;
2028
+ y(
2084
2029
  a === "right" ? G ? { bottom: window.innerHeight - A.top + 4, top: "auto", right: window.innerWidth - A.right } : { top: A.bottom + 4, bottom: "auto", right: window.innerWidth - A.right } : G ? { bottom: window.innerHeight - A.top + 4, top: "auto", left: A.left } : { top: A.bottom + 4, bottom: "auto", left: A.left }
2085
2030
  );
2086
2031
  };
2087
- return E(), window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
2088
- window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
2032
+ return k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
2033
+ window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
2089
2034
  };
2090
2035
  }, [x, a]);
2091
- const w = () => {
2092
- var E;
2093
- const _ = (E = y.current) == null ? void 0 : E.querySelector(
2036
+ const j = () => {
2037
+ var k;
2038
+ const v = (k = $.current) == null ? void 0 : k.querySelector(
2094
2039
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
2095
2040
  );
2096
- _ == null || _.focus();
2041
+ v == null || v.focus();
2097
2042
  };
2098
2043
  P(() => {
2099
2044
  if (!x) return;
2100
- const _ = (A) => {
2045
+ const v = (A) => {
2101
2046
  var U, G;
2102
- !((U = b.current) != null && U.contains(A.target)) && !((G = v.current) != null && G.contains(A.target)) && L();
2103
- }, E = (A) => {
2104
- A.key === "Escape" && (L(), w());
2047
+ !((U = b.current) != null && U.contains(A.target)) && !((G = g.current) != null && G.contains(A.target)) && M();
2048
+ }, k = (A) => {
2049
+ A.key === "Escape" && (M(), j());
2105
2050
  };
2106
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", E), () => {
2107
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", E);
2051
+ return document.addEventListener("mousedown", v), document.addEventListener("keydown", k), () => {
2052
+ document.removeEventListener("mousedown", v), document.removeEventListener("keydown", k);
2108
2053
  };
2109
2054
  }, [x]), P(() => {
2110
- if (!x || !j.current || !v.current) return;
2111
- const _ = z(), E = j.current === "last" ? _[_.length - 1] : _[0];
2112
- E == null || E.focus(), j.current = null;
2055
+ if (!x || !_.current || !g.current) return;
2056
+ const v = F(), k = _.current === "last" ? v[v.length - 1] : v[0];
2057
+ k == null || k.focus(), _.current = null;
2113
2058
  }, [x]);
2114
- const z = () => v.current ? [...v.current.querySelectorAll(
2059
+ const F = () => g.current ? [...g.current.querySelectorAll(
2115
2060
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2116
- )] : [], K = (_) => {
2117
- var E, A;
2118
- if (_.key === "ArrowDown")
2119
- _.preventDefault(), x ? (E = z()[0]) == null || E.focus() : (j.current = "first", C());
2120
- else if (_.key === "ArrowUp")
2121
- if (_.preventDefault(), !x)
2122
- j.current = "last", C();
2061
+ )] : [], K = (v) => {
2062
+ var k, A;
2063
+ if (v.key === "ArrowDown")
2064
+ v.preventDefault(), x ? (k = F()[0]) == null || k.focus() : (_.current = "first", z());
2065
+ else if (v.key === "ArrowUp")
2066
+ if (v.preventDefault(), !x)
2067
+ _.current = "last", z();
2123
2068
  else {
2124
- const U = z();
2069
+ const U = F();
2125
2070
  (A = U[U.length - 1]) == null || A.focus();
2126
2071
  }
2127
- }, V = (_) => {
2128
- var U, G, $, f;
2129
- const E = z(), A = E.findIndex((T) => T === document.activeElement);
2130
- switch (_.key) {
2072
+ }, V = (v) => {
2073
+ var U, G, E, f;
2074
+ const k = F(), A = k.findIndex((T) => T === document.activeElement);
2075
+ switch (v.key) {
2131
2076
  case "ArrowDown":
2132
- _.preventDefault(), (U = E[Math.min(A + 1, E.length - 1)]) == null || U.focus();
2077
+ v.preventDefault(), (U = k[Math.min(A + 1, k.length - 1)]) == null || U.focus();
2133
2078
  break;
2134
2079
  case "ArrowUp":
2135
- _.preventDefault(), A <= 0 ? w() : (G = E[A - 1]) == null || G.focus();
2080
+ v.preventDefault(), A <= 0 ? j() : (G = k[A - 1]) == null || G.focus();
2136
2081
  break;
2137
2082
  case "Home":
2138
- _.preventDefault(), ($ = E[0]) == null || $.focus();
2083
+ v.preventDefault(), (E = k[0]) == null || E.focus();
2139
2084
  break;
2140
2085
  case "End":
2141
- _.preventDefault(), (f = E[E.length - 1]) == null || f.focus();
2086
+ v.preventDefault(), (f = k[k.length - 1]) == null || f.focus();
2142
2087
  break;
2143
2088
  case "Tab":
2144
- L();
2089
+ M();
2145
2090
  break;
2146
2091
  }
2147
2092
  }, D = x && /* @__PURE__ */ e.jsx(
2148
2093
  "div",
2149
2094
  {
2150
- ref: v,
2095
+ ref: g,
2151
2096
  role: "menu",
2152
2097
  "data-ds-portal": "",
2153
2098
  className: [
@@ -2157,35 +2102,35 @@ function rn({
2157
2102
  ].filter(Boolean).join(" "),
2158
2103
  style: N,
2159
2104
  onKeyDown: V,
2160
- children: s.map((_, E) => {
2161
- if (_.separator)
2162
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, E);
2163
- if (_.type === "section")
2105
+ children: s.map((v, k) => {
2106
+ if (v.separator)
2107
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, k);
2108
+ if (v.type === "section")
2164
2109
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2165
- _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
2166
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
2167
- ] }, E);
2168
- const A = !!_.href, U = A ? "a" : "button", G = A ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
2110
+ v.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: v.label }),
2111
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: v.content })
2112
+ ] }, k);
2113
+ const A = !!v.href, U = A ? "a" : "button", G = A ? { href: v.disabled ? void 0 : v.href, "aria-disabled": v.disabled ? "true" : void 0 } : { type: "button", disabled: v.disabled };
2169
2114
  return /* @__PURE__ */ e.jsxs(
2170
2115
  U,
2171
2116
  {
2172
2117
  role: "menuitem",
2173
2118
  className: [
2174
2119
  "ds-dropdown__item",
2175
- _.danger && "ds-dropdown__item--danger"
2120
+ v.danger && "ds-dropdown__item--danger"
2176
2121
  ].filter(Boolean).join(" "),
2177
2122
  ...G,
2178
2123
  onClick: () => {
2179
- var $;
2180
- ($ = _.onClick) == null || $.call(_), L();
2124
+ var E;
2125
+ (E = v.onClick) == null || E.call(v), M();
2181
2126
  },
2182
2127
  children: [
2183
- _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
2184
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
2185
- _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
2128
+ v.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: v.icon }),
2129
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: v.label }),
2130
+ v.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: v.shortcut })
2186
2131
  ]
2187
2132
  },
2188
- E
2133
+ k
2189
2134
  );
2190
2135
  })
2191
2136
  }
@@ -2196,14 +2141,14 @@ function rn({
2196
2141
  ref: b,
2197
2142
  className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2198
2143
  style: l,
2199
- ...d,
2144
+ ...c,
2200
2145
  children: [
2201
2146
  /* @__PURE__ */ e.jsx(
2202
2147
  "div",
2203
2148
  {
2204
- ref: y,
2149
+ ref: $,
2205
2150
  className: "ds-dropdown__trigger",
2206
- onClick: O,
2151
+ onClick: W,
2207
2152
  onKeyDown: K,
2208
2153
  children: t
2209
2154
  }
@@ -2213,7 +2158,7 @@ function rn({
2213
2158
  }
2214
2159
  );
2215
2160
  }
2216
- function an({
2161
+ function sn({
2217
2162
  value: t = 0,
2218
2163
  size: s = "m",
2219
2164
  variant: n = "default",
@@ -2221,7 +2166,7 @@ function an({
2221
2166
  min: a = 2,
2222
2167
  animate: o = !0
2223
2168
  }) {
2224
- const i = Math.min(100, Math.max(0, t)), l = Math.max(a, i), d = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2169
+ 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;
2225
2170
  return /* @__PURE__ */ e.jsxs(
2226
2171
  "div",
2227
2172
  {
@@ -2238,7 +2183,7 @@ function an({
2238
2183
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
2239
2184
  "div",
2240
2185
  {
2241
- className: `ds-progress__fill ds-progress__fill--${d}`,
2186
+ className: `ds-progress__fill ds-progress__fill--${c}`,
2242
2187
  style: { width: `${l}%` }
2243
2188
  }
2244
2189
  ) }),
@@ -2250,50 +2195,50 @@ function an({
2250
2195
  }
2251
2196
  );
2252
2197
  }
2253
- const Ft = (t) => 1 - Math.pow(1 - t, 3), Ct = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2254
- function Wt(t, { duration: s = 600 } = {}) {
2198
+ const Mt = (t) => 1 - Math.pow(1 - t, 3), zt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2199
+ function Ft(t, { duration: s = 600 } = {}) {
2255
2200
  const [n, r] = I(t), a = R(t), o = R(null);
2256
2201
  return P(() => {
2257
- if (Ct()) {
2202
+ if (zt()) {
2258
2203
  r(t), a.current = t;
2259
2204
  return;
2260
2205
  }
2261
2206
  const i = a.current, l = t - i;
2262
2207
  if (l === 0) return;
2263
- let d = null;
2264
- const c = (u) => {
2265
- d || (d = u);
2266
- const p = Math.min((u - d) / s, 1);
2267
- r(i + l * Ft(p)), p < 1 ? o.current = requestAnimationFrame(c) : a.current = t;
2208
+ let c = null;
2209
+ const d = (u) => {
2210
+ c || (c = u);
2211
+ const p = Math.min((u - c) / s, 1);
2212
+ r(i + l * Mt(p)), p < 1 ? o.current = requestAnimationFrame(d) : a.current = t;
2268
2213
  };
2269
- return o.current = requestAnimationFrame(c), () => cancelAnimationFrame(o.current);
2214
+ return o.current = requestAnimationFrame(d), () => cancelAnimationFrame(o.current);
2270
2215
  }, [t, s]), n;
2271
2216
  }
2272
- function on({
2217
+ function nn({
2273
2218
  value: t,
2274
2219
  duration: s = 600,
2275
2220
  decimals: n = 0,
2276
2221
  prefix: r = "",
2277
2222
  suffix: a = ""
2278
2223
  }) {
2279
- const i = Wt(t, { duration: s }).toFixed(n);
2224
+ const i = Ft(t, { duration: s }).toFixed(n);
2280
2225
  return `${r}${i}${a}`;
2281
2226
  }
2282
- function Ot({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2227
+ function Wt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2283
2228
  const r = R(null), [a, o] = I(!1);
2284
2229
  return P(() => {
2285
2230
  const i = r.current;
2286
2231
  if (!i) return;
2287
2232
  const l = new IntersectionObserver(
2288
- ([d]) => {
2289
- d.isIntersecting ? (o(!0), n && l.disconnect()) : n || o(!1);
2233
+ ([c]) => {
2234
+ c.isIntersecting ? (o(!0), n && l.disconnect()) : n || o(!1);
2290
2235
  },
2291
2236
  { threshold: t, rootMargin: s }
2292
2237
  );
2293
2238
  return l.observe(i), () => l.disconnect();
2294
2239
  }, [t, s, n]), { ref: r, inView: a };
2295
2240
  }
2296
- function ln({
2241
+ function rn({
2297
2242
  children: t,
2298
2243
  as: s = "div",
2299
2244
  once: n = !1,
@@ -2303,31 +2248,31 @@ function ln({
2303
2248
  onLeave: i,
2304
2249
  ...l
2305
2250
  }) {
2306
- const { ref: d, inView: c } = Ot({ threshold: r, rootMargin: a, once: n }), u = R(!1);
2251
+ const { ref: c, inView: d } = Wt({ threshold: r, rootMargin: a, once: n }), u = R(!1);
2307
2252
  return P(() => {
2308
- c && !u.current && (o == null || o()), !c && u.current && (i == null || i()), u.current = c;
2309
- }, [c]), /* @__PURE__ */ e.jsx(s, { ref: d, ...l, children: typeof t == "function" ? t(c) : t });
2253
+ d && !u.current && (o == null || o()), !d && u.current && (i == null || i()), u.current = d;
2254
+ }, [d]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(d) : t });
2310
2255
  }
2311
- const qe = {
2312
- default: De,
2313
- success: Ie,
2256
+ const He = {
2257
+ default: Ie,
2258
+ success: De,
2314
2259
  warning: Ae,
2315
2260
  error: Se
2316
2261
  };
2317
2262
  let xe = [];
2318
2263
  const $e = /* @__PURE__ */ new Set();
2319
- function tt() {
2264
+ function et() {
2320
2265
  $e.forEach((t) => t([...xe]));
2321
2266
  }
2322
- function Ut(t) {
2323
- xe = [...xe, t], tt();
2267
+ function Ct(t) {
2268
+ xe = [...xe, t], et();
2324
2269
  }
2325
- function Vt(t) {
2326
- xe = xe.filter((s) => s.id !== t), tt();
2270
+ function Ot(t) {
2271
+ xe = xe.filter((s) => s.id !== t), et();
2327
2272
  }
2328
- function cn() {
2273
+ function an() {
2329
2274
  const t = (s, n = {}) => {
2330
- Ut({
2275
+ Ct({
2331
2276
  id: `${Date.now()}-${Math.random()}`,
2332
2277
  message: s,
2333
2278
  type: "default",
@@ -2337,13 +2282,13 @@ function cn() {
2337
2282
  };
2338
2283
  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 };
2339
2284
  }
2340
- function Yt({ data: t, onDismiss: s }) {
2285
+ function Ut({ data: t, onDismiss: s }) {
2341
2286
  const [n, r] = I(!1), a = R(null);
2342
2287
  P(() => (requestAnimationFrame(() => r(!0)), t.duration > 0 && (a.current = setTimeout(() => o(), t.duration)), () => clearTimeout(a.current)), []);
2343
2288
  function o() {
2344
2289
  r(!1), setTimeout(() => s(t.id), 250);
2345
2290
  }
2346
- const i = qe[t.type] ?? qe.default;
2291
+ const i = He[t.type] ?? He.default;
2347
2292
  return /* @__PURE__ */ e.jsxs(
2348
2293
  "div",
2349
2294
  {
@@ -2355,7 +2300,7 @@ function Yt({ data: t, onDismiss: s }) {
2355
2300
  role: t.type === "error" ? "alert" : "status",
2356
2301
  "aria-live": "polite",
2357
2302
  children: [
2358
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: F[3], strokeWidth: 1.5 }) }),
2303
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: C[3], strokeWidth: 1.5 }) }),
2359
2304
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: t.message }),
2360
2305
  /* @__PURE__ */ e.jsx(
2361
2306
  "button",
@@ -2363,26 +2308,26 @@ function Yt({ data: t, onDismiss: s }) {
2363
2308
  className: "ds-toast__close",
2364
2309
  onClick: o,
2365
2310
  "aria-label": "Закрыть",
2366
- children: /* @__PURE__ */ e.jsx(Q, { size: F[3], strokeWidth: 1.5 })
2311
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[3], strokeWidth: 1.5 })
2367
2312
  }
2368
2313
  )
2369
2314
  ]
2370
2315
  }
2371
2316
  );
2372
2317
  }
2373
- function dn({ position: t = "bottom-right" }) {
2318
+ function on({ position: t = "bottom-right" }) {
2374
2319
  const [s, n] = I(() => [...xe]);
2375
2320
  return P(() => ($e.add(n), () => $e.delete(n)), []), !s.length || typeof document > "u" ? null : me.createPortal(
2376
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Yt, { data: r, onDismiss: Vt }, r.id)) }),
2321
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Ut, { data: r, onDismiss: Ot }, r.id)) }),
2377
2322
  document.body
2378
2323
  );
2379
2324
  }
2380
- const Ht = {
2325
+ const Vt = {
2381
2326
  running: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "info", children: "Running..." }),
2382
2327
  success: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "success", children: "Done" }),
2383
2328
  error: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "error", children: "Error" })
2384
2329
  };
2385
- function un({
2330
+ function ln({
2386
2331
  label: t,
2387
2332
  status: s = "idle",
2388
2333
  icon: n,
@@ -2391,20 +2336,20 @@ function un({
2391
2336
  expanded: o,
2392
2337
  onToggle: i,
2393
2338
  children: l,
2394
- className: d = "",
2395
- ...c
2339
+ className: c = "",
2340
+ ...d
2396
2341
  }) {
2397
2342
  const u = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2398
2343
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2399
2344
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2400
- Ht[s],
2345
+ Vt[s],
2401
2346
  r
2402
2347
  ] });
2403
2348
  return l ? /* @__PURE__ */ e.jsx(
2404
2349
  "div",
2405
2350
  {
2406
- className: ["ds-tool-card", u && "ds-tool-card--running", d].filter(Boolean).join(" "),
2407
- ...c,
2351
+ className: ["ds-tool-card", u && "ds-tool-card--running", c].filter(Boolean).join(" "),
2352
+ ...d,
2408
2353
  children: /* @__PURE__ */ e.jsx(
2409
2354
  Be,
2410
2355
  {
@@ -2420,21 +2365,21 @@ function un({
2420
2365
  ) : /* @__PURE__ */ e.jsx(
2421
2366
  "div",
2422
2367
  {
2423
- className: ["ds-tool-card", "ds-tool-card--bubble", d].filter(Boolean).join(" "),
2424
- ...c,
2368
+ className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
2369
+ ...d,
2425
2370
  children: p
2426
2371
  }
2427
2372
  );
2428
2373
  }
2429
- function qt({
2374
+ function Yt({
2430
2375
  text: t,
2431
2376
  size: s = "xs",
2432
2377
  timeout: n = 800,
2433
2378
  "aria-label": r = "Copy to clipboard",
2434
2379
  ...a
2435
2380
  }) {
2436
- const [o, i] = I(!1), l = (d) => {
2437
- d.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2381
+ const [o, i] = I(!1), l = (c) => {
2382
+ c.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2438
2383
  i(!0), setTimeout(() => i(!1), n);
2439
2384
  });
2440
2385
  };
@@ -2444,14 +2389,14 @@ function qt({
2444
2389
  variant: "ghost",
2445
2390
  size: s,
2446
2391
  state: o ? "success" : "idle",
2447
- icon: /* @__PURE__ */ e.jsx(ut, { size: F[1], strokeWidth: 1.5 }),
2392
+ icon: /* @__PURE__ */ e.jsx(dt, { size: C[1], strokeWidth: 1.5 }),
2448
2393
  "aria-label": r,
2449
2394
  onClick: l,
2450
2395
  ...a
2451
2396
  }
2452
2397
  );
2453
2398
  }
2454
- function fn({ content: t, streaming: s = !1, ...n }) {
2399
+ function cn({ content: t, streaming: s = !1, ...n }) {
2455
2400
  const [r, a] = I(s);
2456
2401
  return P(() => {
2457
2402
  a(!!s);
@@ -2462,18 +2407,18 @@ function fn({ content: t, streaming: s = !1, ...n }) {
2462
2407
  onToggle: a,
2463
2408
  padding: "s",
2464
2409
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2465
- /* @__PURE__ */ e.jsx(ft, { size: F[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2466
- /* @__PURE__ */ e.jsx(yt, { secondary: !0, children: "Thinking" })
2410
+ /* @__PURE__ */ e.jsx(ut, { size: C[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2411
+ /* @__PURE__ */ e.jsx(gt, { secondary: !0, children: "Thinking" })
2467
2412
  ] }),
2468
2413
  ...n,
2469
- children: /* @__PURE__ */ e.jsxs(et, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2414
+ children: /* @__PURE__ */ e.jsxs(Qe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2470
2415
  t,
2471
2416
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2472
2417
  ] })
2473
2418
  }
2474
2419
  );
2475
2420
  }
2476
- function mn({
2421
+ function dn({
2477
2422
  count: t,
2478
2423
  current: s = 0,
2479
2424
  done: n = [],
@@ -2484,8 +2429,8 @@ function mn({
2484
2429
  ...l
2485
2430
  }) {
2486
2431
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2487
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (d, c) => {
2488
- const u = c === s, p = n.includes(c) && !u, h = r && (c <= s || n.includes(c)), m = [
2432
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, d) => {
2433
+ const u = d === s, p = n.includes(d) && !u, h = r && (d <= s || n.includes(d)), m = [
2489
2434
  "ds-step-indicator__dot",
2490
2435
  u && "ds-step-indicator__dot--active",
2491
2436
  p && "ds-step-indicator__dot--done"
@@ -2497,22 +2442,22 @@ function mn({
2497
2442
  className: m,
2498
2443
  role: "tab",
2499
2444
  "aria-selected": u,
2500
- "aria-label": `Step ${c + 1}`,
2501
- disabled: !h || c === s,
2502
- onClick: () => r == null ? void 0 : r(c),
2445
+ "aria-label": `Step ${d + 1}`,
2446
+ disabled: !h || d === s,
2447
+ onClick: () => r == null ? void 0 : r(d),
2503
2448
  children: p ? /* @__PURE__ */ e.jsx(Re, { size: 8, strokeWidth: 3 }) : null
2504
2449
  },
2505
- c
2450
+ d
2506
2451
  );
2507
2452
  }) }),
2508
- a && /* @__PURE__ */ e.jsxs(et, { secondary: !0, className: "ds-step-indicator__counter", children: [
2453
+ a && /* @__PURE__ */ e.jsxs(Qe, { secondary: !0, className: "ds-step-indicator__counter", children: [
2509
2454
  s + 1,
2510
2455
  " / ",
2511
2456
  t
2512
2457
  ] })
2513
2458
  ] });
2514
2459
  }
2515
- function pn({
2460
+ function un({
2516
2461
  content: t,
2517
2462
  isStreaming: s = !1,
2518
2463
  cursor: n = "line",
@@ -2528,7 +2473,7 @@ function pn({
2528
2473
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2529
2474
  ] });
2530
2475
  }
2531
- function hn({
2476
+ function fn({
2532
2477
  role: t = "assistant",
2533
2478
  header: s,
2534
2479
  footer: n,
@@ -2538,24 +2483,24 @@ function hn({
2538
2483
  className: i = "",
2539
2484
  ...l
2540
2485
  }) {
2541
- const d = [
2486
+ const c = [
2542
2487
  "ds-chat-message",
2543
2488
  `ds-chat-message--${t}`,
2544
2489
  a && "ds-chat-message--streaming",
2545
2490
  i
2546
2491
  ].filter(Boolean).join(" ");
2547
- return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: d, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: o }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2492
+ 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: [
2548
2493
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2549
2494
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: o }),
2550
2495
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2551
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2496
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2552
2497
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
2553
2498
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2554
2499
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: o }),
2555
2500
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2556
2501
  ] });
2557
2502
  }
2558
- function xn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2503
+ function mn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2559
2504
  const r = R(!1), a = R(0);
2560
2505
  P(() => {
2561
2506
  const o = s == null ? void 0 : s.current;
@@ -2570,7 +2515,7 @@ function xn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2570
2515
  o && (n && r.current || (o.scrollTop = o.scrollHeight));
2571
2516
  }, t);
2572
2517
  }
2573
- function Gt({
2518
+ function Ht({
2574
2519
  prompts: t,
2575
2520
  enabled: s,
2576
2521
  typingSpeed: n = 38,
@@ -2579,7 +2524,7 @@ function Gt({
2579
2524
  betweenTime: o = 380,
2580
2525
  manualPauseMs: i = 5e3
2581
2526
  }) {
2582
- const [l, d] = I(0), [c, u] = I(""), p = R("typing"), h = R(0), m = R(0), x = R(null), b = R(0);
2527
+ const [l, c] = I(0), [d, u] = I(""), p = R("typing"), h = R(0), m = R(0), x = R(null), b = R(0);
2583
2528
  P(() => {
2584
2529
  m.current = l;
2585
2530
  }, [l]), P(() => {
@@ -2587,28 +2532,28 @@ function Gt({
2587
2532
  u(""), h.current = 0, p.current = "typing";
2588
2533
  return;
2589
2534
  }
2590
- const k = () => {
2535
+ const y = () => {
2591
2536
  const S = Date.now();
2592
2537
  if (b.current > S) {
2593
- x.current = setTimeout(k, b.current - S);
2538
+ x.current = setTimeout(y, b.current - S);
2594
2539
  return;
2595
2540
  }
2596
2541
  const B = t[m.current % t.length] ?? "";
2597
- p.current === "typing" ? (h.current += 1, u(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", x.current = setTimeout(k, a)) : x.current = setTimeout(k, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(k, r)) : (h.current = Math.max(0, h.current - 1), u(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", m.current = (m.current + 1) % t.length, d(m.current), x.current = setTimeout(k, o)) : x.current = setTimeout(k, r));
2542
+ p.current === "typing" ? (h.current += 1, u(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", x.current = setTimeout(y, a)) : x.current = setTimeout(y, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(y, r)) : (h.current = Math.max(0, h.current - 1), u(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", m.current = (m.current + 1) % t.length, c(m.current), x.current = setTimeout(y, o)) : x.current = setTimeout(y, r));
2598
2543
  };
2599
- return x.current = setTimeout(k, 260), () => {
2544
+ return x.current = setTimeout(y, 260), () => {
2600
2545
  x.current && clearTimeout(x.current);
2601
2546
  };
2602
2547
  }, [s, t, n, r, a, o]);
2603
- const v = (k) => {
2548
+ const g = (y) => {
2604
2549
  if (t.length === 0) return;
2605
- const S = (k % t.length + t.length) % t.length, B = t[S];
2606
- m.current = S, h.current = B.length, p.current = "holding", b.current = Date.now() + i, d(S), u(B);
2607
- }, y = () => v(m.current + 1), j = () => v(m.current - 1), N = t[l % t.length] ?? "";
2608
- return { displayed: c, currentPrompt: N, index: l, next: y, prev: j };
2550
+ const S = (y % t.length + t.length) % t.length, B = t[S];
2551
+ m.current = S, h.current = B.length, p.current = "holding", b.current = Date.now() + i, c(S), u(B);
2552
+ }, $ = () => g(m.current + 1), _ = () => g(m.current - 1), N = t[l % t.length] ?? "";
2553
+ return { displayed: d, currentPrompt: N, index: l, next: $, prev: _ };
2609
2554
  }
2610
- let Kt = 0;
2611
- function vn({
2555
+ let qt = 0;
2556
+ function pn({
2612
2557
  value: t = "",
2613
2558
  onChange: s,
2614
2559
  onSubmit: n,
@@ -2617,98 +2562,98 @@ function vn({
2617
2562
  loading: o = !1,
2618
2563
  disabled: i = !1,
2619
2564
  placeholder: l = "Let's get things done...",
2620
- animatedPlaceholders: d,
2621
- attachments: c,
2565
+ animatedPlaceholders: c,
2566
+ attachments: d,
2622
2567
  images: u,
2623
2568
  onAttachFiles: p,
2624
2569
  onAttachImages: h,
2625
2570
  onRemoveAttachment: m,
2626
2571
  onRemoveImage: x,
2627
2572
  acceptImage: b,
2628
- acceptFile: v,
2629
- maxImages: y,
2630
- maxImageSize: j,
2573
+ acceptFile: g,
2574
+ maxImages: $,
2575
+ maxImageSize: _,
2631
2576
  leftSlot: N,
2632
- rightSlot: k,
2577
+ rightSlot: y,
2633
2578
  className: S = "",
2634
2579
  ...B
2635
2580
  }) {
2636
- const L = R(null), O = R(null), C = R(0), [w, z] = I(!1), [K, V] = I([]), D = (g) => {
2637
- const M = ++Kt;
2638
- V((X) => [...X, { id: M, msg: g }]), setTimeout(() => V((X) => X.filter((J) => J.id !== M)), 6e3);
2639
- }, _ = (g) => V((M) => M.filter((X) => X.id !== g)), E = (g) => g.type.startsWith("image/"), A = () => !0, U = b ?? E, G = v ?? A, $ = (g) => {
2640
- const M = [], X = [], J = [], Z = [];
2641
- let te = 0, ue = y != null ? y - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2642
- for (const se of g)
2643
- U(se) ? j && se.size > j ? J.push(se.name) : ue > 0 ? (M.push(se), ue--) : te++ : G(se) ? X.push(se) : Z.push(se.name);
2644
- return { imageFiles: M, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te };
2645
- }, f = (g) => {
2646
- const { imageFiles: M, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te } = $(g);
2647
- J.length && D(`File${J.length > 1 ? "s" : ""} too large${j ? ` (max ${j / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && D(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && D(`Max ${y} images per message`), h && M.length && h(M);
2648
- const ue = X.concat(h ? [] : M);
2581
+ const M = R(null), W = R(null), z = R(0), [j, F] = I(!1), [K, V] = I([]), D = (w) => {
2582
+ const L = ++qt;
2583
+ V((X) => [...X, { id: L, msg: w }]), setTimeout(() => V((X) => X.filter((J) => J.id !== L)), 6e3);
2584
+ }, v = (w) => V((L) => L.filter((X) => X.id !== w)), k = (w) => w.type.startsWith("image/"), A = () => !0, U = b ?? k, G = g ?? A, E = (w) => {
2585
+ const L = [], X = [], J = [], Z = [];
2586
+ let te = 0, ue = $ != null ? $ - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2587
+ for (const se of w)
2588
+ U(se) ? _ && se.size > _ ? J.push(se.name) : ue > 0 ? (L.push(se), ue--) : te++ : G(se) ? X.push(se) : Z.push(se.name);
2589
+ return { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te };
2590
+ }, f = (w) => {
2591
+ const { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te } = E(w);
2592
+ J.length && D(`File${J.length > 1 ? "s" : ""} too large${_ ? ` (max ${_ / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && D(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && D(`Max ${$} images per message`), h && L.length && h(L);
2593
+ const ue = X.concat(h ? [] : L);
2649
2594
  p && ue.length && p(ue);
2650
2595
  };
2651
2596
  P(() => {
2652
- const g = O.current;
2653
- g && (g.style.height = "auto", g.style.height = `${Math.min(g.scrollHeight, 200)}px`);
2597
+ const w = W.current;
2598
+ w && (w.style.height = "auto", w.style.height = `${Math.min(w.scrollHeight, 200)}px`);
2654
2599
  }, [t]), P(() => {
2655
- const g = (M) => {
2600
+ const w = (L) => {
2656
2601
  var J, Z, te;
2657
2602
  if (o || i) return;
2658
- const X = (J = M.target) == null ? void 0 : J.tagName;
2659
- X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = M.target) != null && Z.isContentEditable || M.ctrlKey || M.metaKey || M.altKey || M.key.length !== 1 && M.key !== "Backspace" && M.key !== "Delete" || (te = O.current) == null || te.focus();
2603
+ const X = (J = L.target) == null ? void 0 : J.tagName;
2604
+ X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = L.target) != null && Z.isContentEditable || L.ctrlKey || L.metaKey || L.altKey || L.key.length !== 1 && L.key !== "Backspace" && L.key !== "Delete" || (te = W.current) == null || te.focus();
2660
2605
  };
2661
- return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
2606
+ return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2662
2607
  }, [o, i]);
2663
- const T = (g) => {
2664
- g.preventDefault(), C.current++, g.dataTransfer.types.includes("Files") && z(!0);
2665
- }, W = (g) => {
2666
- g.preventDefault(), C.current--, C.current === 0 && z(!1);
2667
- }, Y = (g) => g.preventDefault(), ne = (g) => {
2668
- g.preventDefault(), C.current = 0, z(!1);
2669
- const M = Array.from(g.dataTransfer.files);
2670
- M.length && f(M);
2671
- }, oe = (g) => {
2672
- const M = Array.from(g.target.files || []);
2673
- L.current && (L.current.value = ""), M.length && f(M);
2674
- }, q = (g) => {
2608
+ const T = (w) => {
2609
+ w.preventDefault(), z.current++, w.dataTransfer.types.includes("Files") && F(!0);
2610
+ }, O = (w) => {
2611
+ w.preventDefault(), z.current--, z.current === 0 && F(!1);
2612
+ }, Y = (w) => w.preventDefault(), ne = (w) => {
2613
+ w.preventDefault(), z.current = 0, F(!1);
2614
+ const L = Array.from(w.dataTransfer.files);
2615
+ L.length && f(L);
2616
+ }, oe = (w) => {
2617
+ const L = Array.from(w.target.files || []);
2618
+ M.current && (M.current.value = ""), L.length && f(L);
2619
+ }, H = (w) => {
2675
2620
  var se;
2676
2621
  if (!h) return;
2677
- const M = (se = g.clipboardData) == null ? void 0 : se.items;
2678
- if (!M) return;
2622
+ const L = (se = w.clipboardData) == null ? void 0 : se.items;
2623
+ if (!L) return;
2679
2624
  const X = [];
2680
- for (const nt of M) {
2681
- const Me = nt.getAsFile();
2625
+ for (const st of L) {
2626
+ const Me = st.getAsFile();
2682
2627
  Me && X.push(Me);
2683
2628
  }
2684
2629
  if (X.length === 0) return;
2685
- const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ue } = $(X);
2686
- Z.length && D(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && D(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ue && D(`Max ${y} images per message`), J.length && (g.preventDefault(), h(J));
2687
- }, ee = !o && !i && !!(d != null && d.length) && t.length === 0, ie = Gt({
2688
- prompts: d ?? [],
2689
- enabled: ee
2690
- }), ge = (g) => {
2691
- if (ee) {
2692
- if (g.key === "ArrowDown" || g.key === "ArrowRight") {
2693
- g.preventDefault(), ie.next();
2630
+ const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ue } = E(X);
2631
+ Z.length && D(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && D(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ue && D(`Max ${$} images per message`), J.length && (w.preventDefault(), h(J));
2632
+ }, Q = !o && !i && !!(c != null && c.length) && t.length === 0, ie = Ht({
2633
+ prompts: c ?? [],
2634
+ enabled: Q
2635
+ }), ge = (w) => {
2636
+ if (Q) {
2637
+ if (w.key === "ArrowDown" || w.key === "ArrowRight") {
2638
+ w.preventDefault(), ie.next();
2694
2639
  return;
2695
2640
  }
2696
- if (g.key === "ArrowUp" || g.key === "ArrowLeft") {
2697
- g.preventDefault(), ie.prev();
2641
+ if (w.key === "ArrowUp" || w.key === "ArrowLeft") {
2642
+ w.preventDefault(), ie.prev();
2698
2643
  return;
2699
2644
  }
2700
- if (g.key === "Tab" && !g.shiftKey) {
2701
- g.preventDefault(), s == null || s(ie.currentPrompt);
2645
+ if (w.key === "Tab" && !w.shiftKey) {
2646
+ w.preventDefault(), s == null || s(ie.currentPrompt);
2702
2647
  return;
2703
2648
  }
2704
2649
  }
2705
- a == null || a(g);
2706
- }, st = (t.trim() || (u == null ? void 0 : u.length) > 0 || (c == null ? void 0 : c.length) > 0) && !i, Pe = p || h;
2650
+ a == null || a(w);
2651
+ }, tt = (t.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Pe = p || h;
2707
2652
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", S].filter(Boolean).join(" "), ...B, children: [
2708
2653
  Pe && /* @__PURE__ */ e.jsx(
2709
2654
  "input",
2710
2655
  {
2711
- ref: L,
2656
+ ref: M,
2712
2657
  type: "file",
2713
2658
  multiple: !0,
2714
2659
  accept: "*/*",
@@ -2719,93 +2664,93 @@ function vn({
2719
2664
  /* @__PURE__ */ e.jsxs(
2720
2665
  "div",
2721
2666
  {
2722
- className: ["ds-prompt-input__box", w && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2667
+ className: ["ds-prompt-input__box", j && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2723
2668
  onDragEnter: T,
2724
- onDragLeave: W,
2669
+ onDragLeave: O,
2725
2670
  onDragOver: Y,
2726
2671
  onDrop: ne,
2727
2672
  children: [
2728
- w && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2673
+ j && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2729
2674
  /* @__PURE__ */ e.jsx(
2730
2675
  "textarea",
2731
2676
  {
2732
- ref: O,
2677
+ ref: W,
2733
2678
  value: t,
2734
- onChange: (g) => s == null ? void 0 : s(g.target.value),
2679
+ onChange: (w) => s == null ? void 0 : s(w.target.value),
2735
2680
  onKeyDown: ge,
2736
- onPaste: q,
2737
- placeholder: ee ? "" : l,
2681
+ onPaste: H,
2682
+ placeholder: Q ? "" : l,
2738
2683
  disabled: o || i,
2739
2684
  rows: 1,
2740
- className: ["ds-prompt-input__textarea", ee && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2685
+ className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2741
2686
  }
2742
2687
  ),
2743
- ee && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2688
+ Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2744
2689
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2745
2690
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2746
2691
  ] }),
2747
- u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((g, M) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2748
- /* @__PURE__ */ e.jsx("img", { src: g.preview, alt: "" }),
2692
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((w, L) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2693
+ /* @__PURE__ */ e.jsx("img", { src: w.preview, alt: "" }),
2749
2694
  /* @__PURE__ */ e.jsx(
2750
2695
  "button",
2751
2696
  {
2752
2697
  className: "ds-prompt-input__image-remove",
2753
- onClick: () => x == null ? void 0 : x(M),
2698
+ onClick: () => x == null ? void 0 : x(L),
2754
2699
  "aria-label": "Remove image",
2755
2700
  type: "button",
2756
- children: /* @__PURE__ */ e.jsx(Q, { size: 12, strokeWidth: 2 })
2701
+ children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
2757
2702
  }
2758
2703
  )
2759
- ] }, M)) }),
2760
- K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((g) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2761
- /* @__PURE__ */ e.jsx("span", { children: g.msg }),
2704
+ ] }, L)) }),
2705
+ K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((w) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2706
+ /* @__PURE__ */ e.jsx("span", { children: w.msg }),
2762
2707
  /* @__PURE__ */ e.jsx(
2763
2708
  "button",
2764
2709
  {
2765
2710
  type: "button",
2766
2711
  className: "ds-prompt-input__warning-close",
2767
- onClick: () => _(g.id),
2712
+ onClick: () => v(w.id),
2768
2713
  "aria-label": "Dismiss",
2769
- children: /* @__PURE__ */ e.jsx(Q, { size: F[1], strokeWidth: 1.5 })
2714
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
2770
2715
  }
2771
2716
  )
2772
- ] }, g.id)) }),
2773
- c && c.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: c.map((g, M) => /* @__PURE__ */ e.jsx(fe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2774
- g.uploading ? /* @__PURE__ */ e.jsx(mt, { size: F[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: F[1], strokeWidth: 1.5 }),
2775
- g.filename,
2776
- g.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2717
+ ] }, w.id)) }),
2718
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((w, L) => /* @__PURE__ */ e.jsx(fe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2719
+ w.uploading ? /* @__PURE__ */ e.jsx(ft, { size: C[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: C[1], strokeWidth: 1.5 }),
2720
+ w.filename,
2721
+ w.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2777
2722
  "button",
2778
2723
  {
2779
2724
  type: "button",
2780
2725
  className: "ds-prompt-input__remove-btn",
2781
- onClick: () => m == null ? void 0 : m(M),
2782
- children: /* @__PURE__ */ e.jsx(Q, { size: F[1], strokeWidth: 1.5 })
2726
+ onClick: () => m == null ? void 0 : m(L),
2727
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
2783
2728
  }
2784
2729
  )
2785
- ] }) }, M)) }),
2730
+ ] }) }, L)) }),
2786
2731
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2787
2732
  Pe && /* @__PURE__ */ e.jsx(
2788
2733
  ae,
2789
2734
  {
2790
2735
  variant: "ghost",
2791
2736
  size: "xs",
2792
- icon: /* @__PURE__ */ e.jsx(ze, { size: F[2], strokeWidth: 1.5 }),
2737
+ icon: /* @__PURE__ */ e.jsx(ze, { size: C[2], strokeWidth: 1.5 }),
2793
2738
  "aria-label": "Attach files",
2794
2739
  onClick: () => {
2795
- var g;
2796
- return (g = L.current) == null ? void 0 : g.click();
2740
+ var w;
2741
+ return (w = M.current) == null ? void 0 : w.click();
2797
2742
  }
2798
2743
  }
2799
2744
  ),
2800
2745
  N,
2801
- k,
2746
+ y,
2802
2747
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2803
2748
  o ? /* @__PURE__ */ e.jsx(
2804
2749
  ae,
2805
2750
  {
2806
2751
  variant: "primary",
2807
2752
  size: "xs",
2808
- icon: /* @__PURE__ */ e.jsx(pt, { size: F[2], strokeWidth: 1.5 }),
2753
+ icon: /* @__PURE__ */ e.jsx(mt, { size: C[2], strokeWidth: 1.5 }),
2809
2754
  onClick: r,
2810
2755
  "aria-label": "Stop"
2811
2756
  }
@@ -2814,9 +2759,9 @@ function vn({
2814
2759
  {
2815
2760
  variant: "primary",
2816
2761
  size: "xs",
2817
- icon: /* @__PURE__ */ e.jsx(ht, { size: F[2], strokeWidth: 1.5 }),
2762
+ icon: /* @__PURE__ */ e.jsx(pt, { size: C[2], strokeWidth: 1.5 }),
2818
2763
  onClick: n,
2819
- disabled: !st,
2764
+ disabled: !tt,
2820
2765
  "aria-label": "Send"
2821
2766
  }
2822
2767
  )
@@ -2826,8 +2771,8 @@ function vn({
2826
2771
  )
2827
2772
  ] });
2828
2773
  }
2829
- const Ge = { fast: 0, standard: 1, premium: 2 }, Ke = { fast: "data-5", standard: "data-3", premium: "data-6" };
2830
- function _n({
2774
+ const qe = { fast: 0, standard: 1, premium: 2 }, Ge = { fast: "data-5", standard: "data-3", premium: "data-6" };
2775
+ function hn({
2831
2776
  models: t = [],
2832
2777
  value: s,
2833
2778
  onChange: n,
@@ -2836,60 +2781,60 @@ function _n({
2836
2781
  showAutoOption: o = !1,
2837
2782
  groupByTier: i = !0,
2838
2783
  className: l = "",
2839
- ...d
2784
+ ...c
2840
2785
  }) {
2841
- const [c, u] = I(!1), p = R(null), h = R(null), m = R(null), [x, b] = I({}), v = t.filter((w) => !a || w.name === "auto" ? !0 : (Ge[w.tier] ?? 1) >= (Ge[a] ?? 1)), y = v.find((w) => w.name === "auto"), j = v.filter((w) => w.name !== "auto"), N = t.find((w) => w.name === s), S = new Set(j.map((w) => w.tier).filter(Boolean)).size > 1;
2786
+ const [d, u] = I(!1), p = R(null), h = R(null), m = R(null), [x, b] = I({}), g = t.filter((j) => !a || j.name === "auto" ? !0 : (qe[j.tier] ?? 1) >= (qe[a] ?? 1)), $ = g.find((j) => j.name === "auto"), _ = g.filter((j) => j.name !== "auto"), N = t.find((j) => j.name === s), S = new Set(_.map((j) => j.tier).filter(Boolean)).size > 1;
2842
2787
  P(() => {
2843
- if (!c) return;
2844
- const w = 320, z = () => {
2788
+ if (!d) return;
2789
+ const j = 320, F = () => {
2845
2790
  var A;
2846
2791
  const D = (A = h.current) == null ? void 0 : A.getBoundingClientRect();
2847
2792
  if (!D) return;
2848
- const _ = window.innerHeight - D.bottom, E = _ < w + 8 && D.top > _;
2793
+ const v = window.innerHeight - D.bottom, k = v < j + 8 && D.top > v;
2849
2794
  b({
2850
2795
  position: "fixed",
2851
2796
  zIndex: "var(--z-dropdown, 500)",
2852
2797
  left: D.left,
2853
- ...E ? { bottom: window.innerHeight - D.top + 4, top: "auto" } : { top: D.bottom + 4, bottom: "auto" }
2798
+ ...k ? { bottom: window.innerHeight - D.top + 4, top: "auto" } : { top: D.bottom + 4, bottom: "auto" }
2854
2799
  });
2855
2800
  };
2856
- z(), window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
2801
+ F(), window.addEventListener("scroll", F, !0), window.addEventListener("resize", F);
2857
2802
  const K = (D) => {
2858
- var _, E;
2859
- !((_ = p.current) != null && _.contains(D.target)) && !((E = m.current) != null && E.contains(D.target)) && u(!1);
2803
+ var v, k;
2804
+ !((v = p.current) != null && v.contains(D.target)) && !((k = m.current) != null && k.contains(D.target)) && u(!1);
2860
2805
  }, V = (D) => {
2861
2806
  D.key === "Escape" && u(!1);
2862
2807
  };
2863
2808
  return document.addEventListener("mousedown", K), document.addEventListener("keydown", V), () => {
2864
- window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
2809
+ window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
2865
2810
  };
2866
- }, [c]);
2867
- const B = (w) => {
2868
- n == null || n(w), u(!1);
2869
- }, L = (w) => /* @__PURE__ */ e.jsxs(
2811
+ }, [d]);
2812
+ const B = (j) => {
2813
+ n == null || n(j), u(!1);
2814
+ }, M = (j) => /* @__PURE__ */ e.jsxs(
2870
2815
  "button",
2871
2816
  {
2872
2817
  type: "button",
2873
2818
  className: [
2874
2819
  "ds-model-picker__item",
2875
- w.name === s && "ds-model-picker__item--active"
2820
+ j.name === s && "ds-model-picker__item--active"
2876
2821
  ].filter(Boolean).join(" "),
2877
- onClick: () => B(w.name),
2822
+ onClick: () => B(j.name),
2878
2823
  children: [
2879
- w.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: w.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2880
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: w.displayName || w.name }),
2881
- S && w.tier && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ke[w.tier] || "default", children: w.tier })
2824
+ j.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: j.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2825
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: j.displayName || j.name }),
2826
+ S && j.tier && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ge[j.tier] || "default", children: j.tier })
2882
2827
  ]
2883
2828
  },
2884
- w.name
2885
- ), O = () => !i || !S ? j.map(L) : ["fast", "standard", "premium"].flatMap((w) => {
2886
- const z = j.filter((K) => K.tier === w);
2887
- return z.length ? [
2888
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": w, children: w.charAt(0).toUpperCase() + w.slice(1) }, `lbl-${w}`),
2889
- ...z.map(L)
2829
+ j.name
2830
+ ), W = () => !i || !S ? _.map(M) : ["fast", "standard", "premium"].flatMap((j) => {
2831
+ const F = _.filter((K) => K.tier === j);
2832
+ return F.length ? [
2833
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": j, children: j.charAt(0).toUpperCase() + j.slice(1) }, `lbl-${j}`),
2834
+ ...F.map(M)
2890
2835
  ] : [];
2891
- }), C = c && /* @__PURE__ */ e.jsxs("div", { ref: m, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2892
- o && y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2836
+ }), z = d && /* @__PURE__ */ e.jsxs("div", { ref: m, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2837
+ o && $ && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2893
2838
  /* @__PURE__ */ e.jsxs(
2894
2839
  "button",
2895
2840
  {
@@ -2901,21 +2846,21 @@ function _n({
2901
2846
  ].filter(Boolean).join(" "),
2902
2847
  onClick: () => B("auto"),
2903
2848
  children: [
2904
- /* @__PURE__ */ e.jsx(xt, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2849
+ /* @__PURE__ */ e.jsx(ht, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2905
2850
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2906
2851
  ]
2907
2852
  }
2908
2853
  ),
2909
- j.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2854
+ _.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2910
2855
  ] }),
2911
- O()
2856
+ W()
2912
2857
  ] });
2913
2858
  return /* @__PURE__ */ e.jsxs(
2914
2859
  "div",
2915
2860
  {
2916
2861
  ref: p,
2917
2862
  className: ["ds-model-picker", l].filter(Boolean).join(" "),
2918
- ...d,
2863
+ ...c,
2919
2864
  children: [
2920
2865
  /* @__PURE__ */ e.jsxs(
2921
2866
  "button",
@@ -2923,44 +2868,44 @@ function _n({
2923
2868
  ref: h,
2924
2869
  type: "button",
2925
2870
  className: "ds-model-picker__trigger",
2926
- onClick: () => u((w) => !w),
2871
+ onClick: () => u((j) => !j),
2927
2872
  "aria-haspopup": "listbox",
2928
- "aria-expanded": c,
2873
+ "aria-expanded": d,
2929
2874
  children: [
2930
2875
  N != null && N.icon ? /* @__PURE__ */ e.jsx("span", { children: N.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5 }),
2931
2876
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (N == null ? void 0 : N.displayName) || (N == null ? void 0 : N.name) || s }),
2932
- S && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ke[N.tier] || "default", children: N.tier })
2877
+ S && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ge[N.tier] || "default", children: N.tier })
2933
2878
  ]
2934
2879
  }
2935
2880
  ),
2936
- typeof document < "u" && me.createPortal(C, document.body)
2881
+ typeof document < "u" && me.createPortal(z, document.body)
2937
2882
  ]
2938
2883
  }
2939
2884
  );
2940
2885
  }
2941
- const Xt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2886
+ const Gt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2942
2887
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
2943
2888
  s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(s) })
2944
2889
  ] });
2945
2890
  function Te(t) {
2946
2891
  return t != null && t.length ? "p. " + t.join(", ") : null;
2947
2892
  }
2948
- function Jt(t) {
2893
+ function Kt(t) {
2949
2894
  const s = /* @__PURE__ */ new Map();
2950
2895
  for (const n of t)
2951
2896
  s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
2952
2897
  return [...s.values()];
2953
2898
  }
2954
- function bn({
2899
+ function xn({
2955
2900
  sources: t = [],
2956
2901
  layout: s = "list",
2957
2902
  title: n = "Sources",
2958
2903
  maxVisible: r = 5,
2959
2904
  onSourceClick: a
2960
2905
  }) {
2961
- const [o, i] = I(!1), l = Jt(t), d = l.length > r, c = o ? l : l.slice(0, r), u = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2906
+ const [o, i] = I(!1), l = Kt(t), c = l.length > r, d = o ? l : l.slice(0, r), u = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2962
2907
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2963
- c.map((h) => {
2908
+ d.map((h) => {
2964
2909
  const m = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2965
2910
  return /* @__PURE__ */ e.jsxs(
2966
2911
  "div",
@@ -2968,7 +2913,7 @@ function bn({
2968
2913
  className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2969
2914
  onClick: x ? () => a(h.items[0]) : void 0,
2970
2915
  children: [
2971
- /* @__PURE__ */ e.jsx(vt, { size: F[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2916
+ /* @__PURE__ */ e.jsx(xt, { size: C[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2972
2917
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2973
2918
  m.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(m) })
2974
2919
  ]
@@ -2976,28 +2921,28 @@ function bn({
2976
2921
  h.filename
2977
2922
  );
2978
2923
  }),
2979
- d && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2924
+ c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2980
2925
  "+",
2981
2926
  l.length - r,
2982
2927
  " more sources"
2983
2928
  ] })
2984
2929
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2985
2930
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2986
- c.map((h) => {
2931
+ d.map((h) => {
2987
2932
  const m = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2988
2933
  return u ? /* @__PURE__ */ e.jsx(
2989
2934
  Be,
2990
2935
  {
2991
- title: /* @__PURE__ */ e.jsx(Xt, { filename: h.filename, pages: m }),
2936
+ title: /* @__PURE__ */ e.jsx(Gt, { filename: h.filename, pages: m }),
2992
2937
  padding: "s",
2993
- children: h.items.map((b, v) => /* @__PURE__ */ e.jsx(
2938
+ children: h.items.map((b, g) => /* @__PURE__ */ e.jsx(
2994
2939
  "div",
2995
2940
  {
2996
2941
  className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2997
2942
  onClick: x ? () => a(b) : void 0,
2998
2943
  children: b.snippet ?? `p. ${b.page}`
2999
2944
  },
3000
- v
2945
+ g
3001
2946
  ))
3002
2947
  },
3003
2948
  h.filename
@@ -3014,17 +2959,17 @@ function bn({
3014
2959
  h.filename
3015
2960
  );
3016
2961
  }),
3017
- d && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2962
+ c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
3018
2963
  "+",
3019
2964
  l.length - r,
3020
2965
  " more sources"
3021
2966
  ] })
3022
2967
  ] });
3023
2968
  }
3024
- function Xe(t) {
2969
+ function Ke(t) {
3025
2970
  return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
3026
2971
  }
3027
- function jn({
2972
+ function vn({
3028
2973
  used: t,
3029
2974
  limit: s,
3030
2975
  size: n = "s",
@@ -3033,7 +2978,7 @@ function jn({
3033
2978
  warningThreshold: o = 0.8,
3034
2979
  errorThreshold: i = 1
3035
2980
  }) {
3036
- const l = s > 0 ? t / s : 0, d = Math.min(l * 100, 100), c = l >= i ? "error" : l >= o ? "warning" : "normal";
2981
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), d = l >= i ? "error" : l >= o ? "warning" : "normal";
3037
2982
  return /* @__PURE__ */ e.jsxs(
3038
2983
  "div",
3039
2984
  {
@@ -3045,15 +2990,15 @@ function jn({
3045
2990
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
3046
2991
  "div",
3047
2992
  {
3048
- className: `ds-token-counter__fill ds-token-counter__fill--${c}`,
3049
- style: { width: `${d}%` }
2993
+ className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
2994
+ style: { width: `${c}%` }
3050
2995
  }
3051
2996
  ) }),
3052
- (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${c}`, children: [
2997
+ (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
3053
2998
  r && /* @__PURE__ */ e.jsxs("span", { children: [
3054
- Xe(t),
2999
+ Ke(t),
3055
3000
  " / ",
3056
- Xe(s)
3001
+ Ke(s)
3057
3002
  ] }),
3058
3003
  a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3059
3004
  Math.round(l * 100),
@@ -3064,42 +3009,42 @@ function jn({
3064
3009
  }
3065
3010
  );
3066
3011
  }
3067
- const Je = 5;
3068
- function Zt(t) {
3012
+ const Xe = 5;
3013
+ function Xt(t) {
3069
3014
  return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
3070
3015
  }
3071
- function Nn({
3016
+ function _n({
3072
3017
  value: t = 0,
3073
3018
  size: s = "xs",
3074
3019
  showLabel: n = "none",
3075
3020
  layout: r = "inline"
3076
3021
  }) {
3077
- const a = Math.max(0, Math.min(1, t)), o = Math.round(a * Je), i = Zt(a);
3022
+ const a = Math.max(0, Math.min(1, t)), o = Math.round(a * Xe), i = Xt(a);
3078
3023
  return /* @__PURE__ */ e.jsxs("div", { className: [
3079
3024
  "ds-confidence-bar",
3080
3025
  `ds-confidence-bar--${s}`,
3081
3026
  `ds-confidence-bar--${i}`,
3082
3027
  r === "block" && "ds-confidence-bar--block"
3083
3028
  ].filter(Boolean).join(" "), children: [
3084
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Je }, (l, d) => /* @__PURE__ */ e.jsx(
3029
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Xe }, (l, c) => /* @__PURE__ */ e.jsx(
3085
3030
  "div",
3086
3031
  {
3087
- className: `ds-confidence-bar__seg${d < o ? " ds-confidence-bar__seg--filled" : ""}`
3032
+ className: `ds-confidence-bar__seg${c < o ? " ds-confidence-bar__seg--filled" : ""}`
3088
3033
  },
3089
- d
3034
+ c
3090
3035
  )) }),
3091
3036
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
3092
3037
  ] });
3093
3038
  }
3094
- const Qt = { add: "+", remove: "-", context: " " };
3039
+ const Jt = { add: "+", remove: "-", context: " " };
3095
3040
  function ye({ line: t, lineNumbers: s }) {
3096
3041
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
3097
3042
  s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
3098
- /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Qt[t.type] }),
3043
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Jt[t.type] }),
3099
3044
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
3100
3045
  ] });
3101
3046
  }
3102
- function wn({
3047
+ function bn({
3103
3048
  lines: t = [],
3104
3049
  layout: s = "inline",
3105
3050
  wordWrap: n = !1,
@@ -3113,21 +3058,21 @@ function wn({
3113
3058
  n && "ds-diff-view--wrap"
3114
3059
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
3115
3060
  if (s === "split") {
3116
- const d = t.filter((u) => u.type === "remove" || u.type === "context"), c = t.filter((u) => u.type === "add" || u.type === "context");
3061
+ const c = t.filter((u) => u.type === "remove" || u.type === "context"), d = t.filter((u) => u.type === "add" || u.type === "context");
3117
3062
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3118
3063
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3119
3064
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3120
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) }),
3121
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) })
3065
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) }),
3066
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) })
3122
3067
  ] })
3123
3068
  ] });
3124
3069
  }
3125
3070
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3126
3071
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3127
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((d, c) => /* @__PURE__ */ e.jsx(ye, { line: d, lineNumbers: r }, c)) })
3072
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, d) => /* @__PURE__ */ e.jsx(ye, { line: c, lineNumbers: r }, d)) })
3128
3073
  ] });
3129
3074
  }
3130
- function es({
3075
+ function Zt({
3131
3076
  value: t = "idle",
3132
3077
  onLike: s,
3133
3078
  onDislike: n,
@@ -3157,9 +3102,9 @@ function es({
3157
3102
  "aria-label": "Like",
3158
3103
  "aria-pressed": t === "liked",
3159
3104
  children: /* @__PURE__ */ e.jsx(
3160
- _t,
3105
+ vt,
3161
3106
  {
3162
- size: F[1],
3107
+ size: C[1],
3163
3108
  strokeWidth: 1.5,
3164
3109
  fill: t === "liked" ? "currentColor" : "none"
3165
3110
  }
@@ -3178,9 +3123,9 @@ function es({
3178
3123
  "aria-label": "Dislike",
3179
3124
  "aria-pressed": t === "disliked",
3180
3125
  children: /* @__PURE__ */ e.jsx(
3181
- bt,
3126
+ _t,
3182
3127
  {
3183
- size: F[1],
3128
+ size: C[1],
3184
3129
  strokeWidth: 1.5,
3185
3130
  fill: t === "disliked" ? "currentColor" : "none"
3186
3131
  }
@@ -3191,7 +3136,7 @@ function es({
3191
3136
  }
3192
3137
  );
3193
3138
  }
3194
- function ts(t) {
3139
+ function Qt(t) {
3195
3140
  const s = t instanceof Date ? t : new Date(t);
3196
3141
  if (isNaN(s)) return null;
3197
3142
  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);
@@ -3200,7 +3145,7 @@ function ts(t) {
3200
3145
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3201
3146
  return `${i} ${l} ${r}`;
3202
3147
  }
3203
- function gn({
3148
+ function jn({
3204
3149
  role: t = "assistant",
3205
3150
  text: s,
3206
3151
  timestamp: n,
@@ -3210,29 +3155,29 @@ function gn({
3210
3155
  className: i = "",
3211
3156
  ...l
3212
3157
  }) {
3213
- const d = t === "assistant" && (a || o), c = !!s, u = n ? ts(n) : null;
3214
- return !d && !c && !u ? null : /* @__PURE__ */ e.jsxs(
3158
+ const c = t === "assistant" && (a || o), d = !!s, u = n ? Qt(n) : null;
3159
+ return !c && !d && !u ? null : /* @__PURE__ */ e.jsxs(
3215
3160
  "div",
3216
3161
  {
3217
3162
  className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
3218
3163
  ...l,
3219
3164
  children: [
3220
3165
  t === "user" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u }),
3221
- d && /* @__PURE__ */ e.jsx(es, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3222
- c && /* @__PURE__ */ e.jsx(qt, { className: "ds-message-action", text: s }),
3166
+ c && /* @__PURE__ */ e.jsx(Zt, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3167
+ d && /* @__PURE__ */ e.jsx(Yt, { className: "ds-message-action", text: s }),
3223
3168
  t === "assistant" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u })
3224
3169
  ]
3225
3170
  }
3226
3171
  );
3227
3172
  }
3228
- function yn({ label: t, className: s = "", ...n }) {
3173
+ function Nn({ label: t, className: s = "", ...n }) {
3229
3174
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
3230
3175
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
3231
3176
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3232
3177
  ] });
3233
3178
  }
3234
- function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3235
- const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", d = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3179
+ function wn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3180
+ 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)";
3236
3181
  return /* @__PURE__ */ e.jsx(
3237
3182
  "div",
3238
3183
  {
@@ -3257,8 +3202,8 @@ function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3257
3202
  backgroundImage: [
3258
3203
  `linear-gradient(${l} 1px, transparent 1px)`,
3259
3204
  `linear-gradient(90deg, ${l} 1px, transparent 1px)`,
3260
- `linear-gradient(${d} 1px, transparent 1px)`,
3261
- `linear-gradient(90deg, ${d} 1px, transparent 1px)`
3205
+ `linear-gradient(${c} 1px, transparent 1px)`,
3206
+ `linear-gradient(90deg, ${c} 1px, transparent 1px)`
3262
3207
  ].join(", "),
3263
3208
  backgroundSize: "80px 80px, 80px 80px, 16px 16px, 16px 16px",
3264
3209
  backgroundPosition: "-1px -1px, -1px -1px, -1px -1px, -1px -1px",
@@ -3272,7 +3217,7 @@ function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3272
3217
  }
3273
3218
  );
3274
3219
  }
3275
- function En({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3220
+ function gn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3276
3221
  const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3277
3222
  return /* @__PURE__ */ e.jsx(
3278
3223
  "div",
@@ -3284,11 +3229,11 @@ function En({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3284
3229
  }
3285
3230
  );
3286
3231
  }
3287
- const ke = 280, ss = 22, ns = 14, ce = 8, Ne = 6, rs = 200;
3288
- function as(t) {
3232
+ const ke = 280, es = 22, ts = 14, ce = 8, Ne = 6, ss = 200;
3233
+ function ns(t) {
3289
3234
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3290
3235
  }
3291
- function os(t, s, n, r) {
3236
+ function rs(t, s, n, r) {
3292
3237
  const a = window.innerWidth, o = window.innerHeight;
3293
3238
  if (o - t.bottom >= s + r + ce) return "bottom";
3294
3239
  if (t.top >= s + r + ce) return "top";
@@ -3297,26 +3242,26 @@ function os(t, s, n, r) {
3297
3242
  const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
3298
3243
  return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
3299
3244
  }
3300
- function is(t, s, n, r, a) {
3245
+ function as(t, s, n, r, a) {
3301
3246
  const o = window.innerWidth, i = window.innerHeight;
3302
- let l, d;
3247
+ let l, c;
3303
3248
  switch (t) {
3304
3249
  case "top":
3305
- l = s.top - n - a, d = s.left + s.width / 2 - r / 2;
3250
+ l = s.top - n - a, c = s.left + s.width / 2 - r / 2;
3306
3251
  break;
3307
3252
  case "bottom":
3308
- l = s.bottom + a, d = s.left + s.width / 2 - r / 2;
3253
+ l = s.bottom + a, c = s.left + s.width / 2 - r / 2;
3309
3254
  break;
3310
3255
  case "left":
3311
- l = s.top + s.height / 2 - n / 2, d = s.left - r - a;
3256
+ l = s.top + s.height / 2 - n / 2, c = s.left - r - a;
3312
3257
  break;
3313
3258
  default:
3314
- l = s.top + s.height / 2 - n / 2, d = s.right + a;
3259
+ l = s.top + s.height / 2 - n / 2, c = s.right + a;
3315
3260
  }
3316
- const c = Math.max(ce, Math.min(o - r - ce, d));
3317
- return { top: Math.max(ce, Math.min(i - n - ce, l)), left: c, arrowOffset: d - c };
3261
+ const d = Math.max(ce, Math.min(o - r - ce, c));
3262
+ return { top: Math.max(ce, Math.min(i - n - ce, l)), left: d, arrowOffset: c - d };
3318
3263
  }
3319
- function $n({
3264
+ function yn({
3320
3265
  steps: t,
3321
3266
  currentStep: s,
3322
3267
  onNext: n,
@@ -3325,83 +3270,83 @@ function $n({
3325
3270
  onFinish: o,
3326
3271
  overlay: i = !0,
3327
3272
  ring: l = !0,
3328
- labelNext: d = "Next",
3329
- labelBack: c = "Back",
3273
+ labelNext: c = "Next",
3274
+ labelBack: d = "Back",
3330
3275
  labelSkip: u = "Skip tour",
3331
3276
  labelFinish: p = "Done",
3332
3277
  statePrimary: h = "idle",
3333
3278
  stateBack: m = "idle"
3334
3279
  }) {
3335
- const x = R(null), b = R(t), v = R(s), y = R(l);
3336
- b.current = t, v.current = s, y.current = l;
3337
- const [j, N] = I(!1), [k, S] = I({ position: "fixed", visibility: "hidden", width: ke }), [B, L] = I("bottom"), [O, C] = I(null), w = R(!1), z = t[s], K = s === t.length - 1, V = le(() => {
3338
- const D = b.current[v.current];
3280
+ const x = R(null), b = R(t), g = R(s), $ = R(l);
3281
+ b.current = t, g.current = s, $.current = l;
3282
+ const [_, N] = I(!1), [y, S] = I({ position: "fixed", visibility: "hidden", width: ke }), [B, M] = I("bottom"), [W, z] = I(null), j = R(!1), F = t[s], K = s === t.length - 1, V = le(() => {
3283
+ const D = b.current[g.current];
3339
3284
  if (!D || !x.current) return;
3340
- const _ = as(D.target);
3341
- if (!_) return;
3342
- const E = _.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, G = ke, $ = y.current ? ss : ns, f = D.position || os(E, U, G, $), { top: T, left: W, arrowOffset: Y } = is(f, E, U, G, $);
3343
- L(f), S({
3285
+ const v = ns(D.target);
3286
+ if (!v) return;
3287
+ const k = v.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, G = ke, E = $.current ? es : ts, f = D.position || rs(k, U, G, E), { top: T, left: O, arrowOffset: Y } = as(f, k, U, G, E);
3288
+ M(f), S({
3344
3289
  position: "fixed",
3345
3290
  top: T,
3346
- left: W,
3291
+ left: O,
3347
3292
  width: ke,
3348
3293
  visibility: "visible",
3349
3294
  "--arrow-offset": `${Y}px`
3350
- }), C({
3351
- top: E.top - Ne,
3352
- left: E.left - Ne,
3353
- width: E.width + Ne * 2,
3354
- height: E.height + Ne * 2
3295
+ }), z({
3296
+ top: k.top - Ne,
3297
+ left: k.left - Ne,
3298
+ width: k.width + Ne * 2,
3299
+ height: k.height + Ne * 2
3355
3300
  });
3356
3301
  }, []);
3357
3302
  return P(() => {
3358
3303
  window.addEventListener("scroll", V, !0), window.addEventListener("resize", V);
3359
3304
  const D = requestAnimationFrame(() => {
3360
- V(), N(!0), w.current = !0;
3305
+ V(), N(!0), j.current = !0;
3361
3306
  });
3362
3307
  return () => {
3363
3308
  cancelAnimationFrame(D), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V);
3364
3309
  };
3365
3310
  }, []), P(() => {
3366
- if (!w.current) return;
3311
+ if (!j.current) return;
3367
3312
  N(!1);
3368
3313
  const D = setTimeout(() => {
3369
- S((_) => ({ ..._, visibility: "hidden" })), requestAnimationFrame(() => {
3314
+ S((v) => ({ ...v, visibility: "hidden" })), requestAnimationFrame(() => {
3370
3315
  V(), N(!0);
3371
3316
  });
3372
- }, rs + 20);
3317
+ }, ss + 20);
3373
3318
  return () => clearTimeout(D);
3374
3319
  }, [s]), P(() => {
3375
- j && x.current && x.current.focus({ preventScroll: !0 });
3376
- }, [j]), P(() => {
3377
- const D = (_) => {
3378
- _.key === "Escape" && a();
3320
+ _ && x.current && x.current.focus({ preventScroll: !0 });
3321
+ }, [_]), P(() => {
3322
+ const D = (v) => {
3323
+ v.key === "Escape" && a();
3379
3324
  };
3380
3325
  return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
3381
3326
  }, [a]), P(() => {
3382
- if (!j) return;
3383
- const D = (_) => {
3384
- if (_.key !== "Tab" || !x.current) return;
3385
- const E = Array.from(
3327
+ if (!_) return;
3328
+ const D = (v) => {
3329
+ if (v.key !== "Tab" || !x.current) return;
3330
+ const k = Array.from(
3386
3331
  x.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3387
3332
  );
3388
- if (!E.length) return;
3389
- const A = E[0], U = E[E.length - 1];
3390
- _.shiftKey && document.activeElement === A ? (_.preventDefault(), U.focus()) : !_.shiftKey && document.activeElement === U && (_.preventDefault(), A.focus());
3333
+ if (!k.length) return;
3334
+ const A = k[0], U = k[k.length - 1];
3335
+ v.shiftKey && document.activeElement === A ? (v.preventDefault(), U.focus()) : !v.shiftKey && document.activeElement === U && (v.preventDefault(), A.focus());
3391
3336
  };
3392
3337
  return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
3393
- }, [j]), !z || typeof document > "u" ? null : me.createPortal(
3338
+ }, [_]), !F || typeof document > "u" ? null : me.createPortal(
3394
3339
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3395
- O && /* @__PURE__ */ e.jsx(
3340
+ W && /* @__PURE__ */ e.jsx(
3396
3341
  "div",
3397
3342
  {
3398
3343
  className: [
3399
3344
  "ds-coachmark__spotlight",
3400
3345
  i && "ds-coachmark__spotlight--overlay",
3401
3346
  !l && "ds-coachmark__spotlight--no-ring",
3402
- j && "ds-coachmark__spotlight--visible"
3347
+ _ && "ds-coachmark__spotlight--visible"
3403
3348
  ].filter(Boolean).join(" "),
3404
- style: O,
3349
+ style: W,
3405
3350
  "aria-hidden": "true"
3406
3351
  }
3407
3352
  ),
@@ -3413,13 +3358,13 @@ function $n({
3413
3358
  role: "dialog",
3414
3359
  "aria-modal": "false",
3415
3360
  "aria-live": "polite",
3416
- "aria-label": z.title ?? `Step ${s + 1} of ${t.length}`,
3361
+ "aria-label": F.title ?? `Step ${s + 1} of ${t.length}`,
3417
3362
  className: [
3418
3363
  "ds-coachmark__bubble",
3419
3364
  `ds-coachmark__bubble--${B}`,
3420
- j && "ds-coachmark__bubble--visible"
3365
+ _ && "ds-coachmark__bubble--visible"
3421
3366
  ].filter(Boolean).join(" "),
3422
- style: k,
3367
+ style: y,
3423
3368
  tabIndex: -1,
3424
3369
  children: [
3425
3370
  /* @__PURE__ */ e.jsx(
@@ -3429,11 +3374,11 @@ function $n({
3429
3374
  className: "ds-coachmark__close",
3430
3375
  onClick: a,
3431
3376
  "aria-label": u,
3432
- children: /* @__PURE__ */ e.jsx(Q, { size: 16, strokeWidth: 2 })
3377
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3433
3378
  }
3434
3379
  ),
3435
- z.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: z.title }),
3436
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: z.content }),
3380
+ F.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: F.title }),
3381
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: F.content }),
3437
3382
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3438
3383
  t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3439
3384
  s + 1,
@@ -3441,8 +3386,8 @@ function $n({
3441
3386
  t.length
3442
3387
  ] }),
3443
3388
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3444
- s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: m, onClick: r, children: c }),
3445
- /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? o : n, children: K ? p : d })
3389
+ s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: m, onClick: r, children: d }),
3390
+ /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? o : n, children: K ? p : c })
3446
3391
  ] })
3447
3392
  ] })
3448
3393
  ]
@@ -3452,8 +3397,8 @@ function $n({
3452
3397
  document.body
3453
3398
  );
3454
3399
  }
3455
- function Tn(t, s = {}) {
3456
- const { storageKey: n } = s, [r, a] = I(0), [o, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", d = le(() => {
3400
+ function kn(t, s = {}) {
3401
+ const { storageKey: n } = s, [r, a] = I(0), [o, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = le(() => {
3457
3402
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3458
3403
  }, [n]);
3459
3404
  return {
@@ -3462,13 +3407,13 @@ function Tn(t, s = {}) {
3462
3407
  start: () => {
3463
3408
  l() || (a(0), i(!0));
3464
3409
  },
3465
- next: () => a((c) => Math.min(c + 1, t.length - 1)),
3466
- back: () => a((c) => Math.max(c - 1, 0)),
3467
- skip: d,
3468
- finish: d
3410
+ next: () => a((d) => Math.min(d + 1, t.length - 1)),
3411
+ back: () => a((d) => Math.max(d - 1, 0)),
3412
+ skip: c,
3413
+ finish: c
3469
3414
  };
3470
3415
  }
3471
- function Rn() {
3416
+ function En() {
3472
3417
  const t = R(null), s = le(() => {
3473
3418
  const n = t.current;
3474
3419
  if (!n) return;
@@ -3482,94 +3427,92 @@ function Rn() {
3482
3427
  }
3483
3428
  export {
3484
3429
  Be as Accordion,
3485
- Ns as Alert,
3486
- on as AnimatedNumber,
3487
- Is as Avatar,
3430
+ bs as Alert,
3431
+ nn as AnimatedNumber,
3432
+ Ss as Avatar,
3488
3433
  fe as Badge,
3489
- nn as Banner,
3490
- gs as BottomSheet,
3491
- Us as Breadcrumb,
3434
+ en as Banner,
3435
+ Ns as BottomSheet,
3436
+ Cs as Breadcrumb,
3492
3437
  ae as Button,
3493
- hs as Card,
3494
- hn as ChatMessage,
3495
- Ss as Checkbox,
3496
- $n as Coachmark,
3497
- ys as Code,
3498
- Tt as CodeAccordion,
3499
- Nn as ConfidenceBar,
3500
- qt as CopyButton,
3501
- wn as DiffView,
3502
- Ys as Drawer,
3503
- Oe as DrawerFooter,
3504
- rn as Dropdown,
3505
- Cs as EmptyState,
3506
- kn as EngineerGrid,
3507
- Ws as FormField,
3508
- xs as H1,
3509
- vs as H2,
3510
- _s as H3,
3511
- bs as H4,
3512
- ln as InView,
3513
- us as Input,
3514
- ks as Link,
3515
- es as MessageFeedback,
3516
- gn as MessageFooter,
3517
- ws as Modal,
3438
+ ms as Card,
3439
+ fn as ChatMessage,
3440
+ Ts as Checkbox,
3441
+ yn as Coachmark,
3442
+ ws as Code,
3443
+ $t as CodeAccordion,
3444
+ _n as ConfidenceBar,
3445
+ Yt as CopyButton,
3446
+ bn as DiffView,
3447
+ tn as Dropdown,
3448
+ zs as EmptyState,
3449
+ wn as EngineerGrid,
3450
+ Fs as FormField,
3451
+ ps as H1,
3452
+ hs as H2,
3453
+ xs as H3,
3454
+ vs as H4,
3455
+ rn as InView,
3456
+ cs as Input,
3457
+ gs as Link,
3458
+ Zt as MessageFeedback,
3459
+ jn as MessageFooter,
3460
+ js as Modal,
3518
3461
  he as ModalFooter,
3519
- _n as ModelPicker,
3520
- qs as NavRail,
3521
- tn as NavRailAgent,
3522
- Ks as NavRailBody,
3523
- en as NavRailCustomItem,
3524
- Zs as NavRailDivider,
3525
- sn as NavRailFlyout,
3526
- Js as NavRailFooter,
3527
- Xs as NavRailHeader,
3528
- Gs as NavRailItem,
3529
- Qs as NavRailRecents,
3530
- js as P1,
3531
- yt as P2,
3532
- et as P3,
3533
- Vs as Pagination,
3534
- an as ProgressBar,
3535
- vn as PromptInput,
3536
- As as Radio,
3537
- fn as ReasoningBlock,
3538
- En as Scrollable,
3539
- Ts as SegmentedControl,
3540
- ms as Select,
3541
- Hs as SidePage,
3542
- Ue as SidePageFooter,
3543
- At as Skeleton,
3544
- bn as SourcesPanel,
3545
- wt as Spinner,
3546
- Os as Stat,
3547
- mn as StepIndicator,
3548
- ps as Stepper,
3549
- pn as StreamingText,
3550
- $s as Tab,
3551
- Ds as Table,
3552
- Ls as TableBody,
3553
- Bs as TableHead,
3554
- Ps as TableRow,
3555
- Ms as TableSubheaderRow,
3556
- Es as Tabs,
3557
- Fs as Td,
3558
- fs as Textarea,
3559
- zs as Th,
3560
- yn as ThinkingDot,
3561
- dn as ToastContainer,
3562
- Rs as Toggle,
3563
- jn as TokenCounter,
3564
- un as ToolCallBubble,
3565
- un as ToolCallCard,
3462
+ hn as ModelPicker,
3463
+ Vs as NavRail,
3464
+ Zs as NavRailAgent,
3465
+ Hs as NavRailBody,
3466
+ Js as NavRailCustomItem,
3467
+ Ks as NavRailDivider,
3468
+ Qs as NavRailFlyout,
3469
+ Gs as NavRailFooter,
3470
+ qs as NavRailHeader,
3471
+ Ys as NavRailItem,
3472
+ Xs as NavRailRecents,
3473
+ _s as P1,
3474
+ gt as P2,
3475
+ Qe as P3,
3476
+ Os as Pagination,
3477
+ sn as ProgressBar,
3478
+ pn as PromptInput,
3479
+ Rs as Radio,
3480
+ cn as ReasoningBlock,
3481
+ gn as Scrollable,
3482
+ Es as SegmentedControl,
3483
+ us as Select,
3484
+ Us as SidePage,
3485
+ Oe as SidePageFooter,
3486
+ St as Skeleton,
3487
+ xn as SourcesPanel,
3488
+ Nt as Spinner,
3489
+ Ws as Stat,
3490
+ dn as StepIndicator,
3491
+ fs as Stepper,
3492
+ un as StreamingText,
3493
+ ks as Tab,
3494
+ As as Table,
3495
+ Is as TableBody,
3496
+ Ds as TableHead,
3497
+ Bs as TableRow,
3498
+ Ls as TableSubheaderRow,
3499
+ ys as Tabs,
3500
+ Ms as Td,
3501
+ ds as Textarea,
3502
+ Ps as Th,
3503
+ Nn as ThinkingDot,
3504
+ on as ToastContainer,
3505
+ $s as Toggle,
3506
+ vn as TokenCounter,
3507
+ ln as ToolCallBubble,
3508
+ ln as ToolCallCard,
3566
3509
  Le as Tooltip,
3567
- F as iconSizes,
3568
- Wt as useAnimatedNumber,
3569
- Gt as useAnimatedPlaceholder,
3570
- Tn as useCoachmark,
3571
- Ot as useInView,
3572
- Rn as useShake,
3573
- xn as useStreamScroll,
3574
- cn as useToast
3510
+ C as iconSizes,
3511
+ Ft as useAnimatedNumber,
3512
+ Ht as useAnimatedPlaceholder,
3513
+ kn as useCoachmark,
3514
+ Wt as useInView,
3515
+ En as useShake,
3516
+ mn as useStreamScroll,
3517
+ an as useToast
3575
3518
  };