@agentatom/design-system 1.4.85 → 1.4.87

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