@donkit-ai/design-system 1.4.54 → 1.4.56

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,6 +1,6 @@
1
- import Y, { useState as A, useRef as T, useEffect as D, useLayoutEffect as Qe, useContext as $e, createContext as et, useCallback as He } from "react";
2
- import { Check as Te, X as ee, ChevronDown as _e, Minus as tt, Plus as st, XCircle as Re, AlertTriangle as Se, CheckCircle as Ae, Info as Be, ChevronUp as nt, ChevronsUpDown as rt, ChevronLeft as at, ChevronRight as ot, Copy as it, Brain as lt, Loader as ct, Paperclip as Pe, Square as dt, ArrowUp as ut, Zap as ft, Cpu as Me, FileText as mt, ThumbsUp as pt, ThumbsDown as ht } from "lucide-react";
3
- import he from "react-dom";
1
+ import V, { useState as A, useRef as R, useEffect as B, useLayoutEffect as Ze, useContext as Ee, createContext as Qe, useCallback as qe } from "react";
2
+ import { Check as $e, X as ee, ChevronDown as ve, Minus as et, Plus as tt, XCircle as Te, AlertTriangle as Re, CheckCircle as Se, Info as Ae, ChevronUp as st, ChevronsUpDown as nt, ChevronLeft as rt, ChevronRight as at, Copy as ot, Brain as it, Loader as lt, Paperclip as Le, Square as ct, ArrowUp as dt, Zap as ut, Cpu as Pe, FileText as ft, ThumbsUp as mt, ThumbsDown as pt } from "lucide-react";
3
+ import pe from "react-dom";
4
4
  const P = {
5
5
  1: 16,
6
6
  2: 20,
@@ -8,7 +8,7 @@ const P = {
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var ye = { exports: {} }, xe = {};
11
+ var ge = { exports: {} }, he = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -18,10 +18,10 @@ var ye = { exports: {} }, xe = {};
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 ze;
22
- function xt() {
23
- if (ze) return xe;
24
- ze = 1;
21
+ var Me;
22
+ function ht() {
23
+ if (Me) return he;
24
+ Me = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
26
  function n(a, o, r) {
27
27
  var i = null;
@@ -38,9 +38,9 @@ function xt() {
38
38
  props: r
39
39
  };
40
40
  }
41
- return xe.Fragment = s, xe.jsx = n, xe.jsxs = n, xe;
41
+ return he.Fragment = s, he.jsx = n, he.jsxs = n, he;
42
42
  }
43
- var ve = {};
43
+ var xe = {};
44
44
  /**
45
45
  * @license React
46
46
  * react-jsx-runtime.development.js
@@ -50,44 +50,44 @@ var ve = {};
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 Ce;
54
- function vt() {
55
- return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var ze;
54
+ function xt() {
55
+ return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function t(f) {
57
57
  if (f == null) return null;
58
58
  if (typeof f == "function")
59
- return f.$$typeof === I ? null : f.displayName || f.name || null;
59
+ return f.$$typeof === O ? null : f.displayName || f.name || null;
60
60
  if (typeof f == "string") return f;
61
61
  switch (f) {
62
62
  case g:
63
63
  return "Fragment";
64
64
  case k:
65
65
  return "Profiler";
66
- case w:
66
+ case y:
67
67
  return "StrictMode";
68
- case L:
68
+ case D:
69
69
  return "Suspense";
70
- case W:
70
+ case H:
71
71
  return "SuspenseList";
72
- case b:
72
+ case w:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof f == "object")
76
76
  switch (typeof f.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
  ), f.$$typeof) {
79
- case v:
79
+ case _:
80
80
  return "Portal";
81
- case E:
81
+ case S:
82
82
  return f.displayName || "Context";
83
83
  case j:
84
84
  return (f._context.displayName || "Context") + ".Consumer";
85
85
  case M:
86
86
  var $ = f.render;
87
87
  return f = f.displayName, f || (f = $.displayName || $.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
88
- case H:
88
+ case q:
89
89
  return $ = f.displayName || null, $ !== null ? $ : t(f.type) || "Memo";
90
- case z:
90
+ case W:
91
91
  $ = f._payload, f = f._init;
92
92
  try {
93
93
  return t(f($));
@@ -108,17 +108,17 @@ function vt() {
108
108
  }
109
109
  if ($) {
110
110
  $ = console;
111
- var F = $.error, V = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
- return F.call(
111
+ var z = $.error, F = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
+ return z.call(
113
113
  $,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
- V
115
+ F
116
116
  ), s(f);
117
117
  }
118
118
  }
119
119
  function a(f) {
120
120
  if (f === g) return "<>";
121
- if (typeof f == "object" && f !== null && f.$$typeof === z)
121
+ if (typeof f == "object" && f !== null && f.$$typeof === W)
122
122
  return "<...>";
123
123
  try {
124
124
  var $ = t(f);
@@ -128,46 +128,46 @@ function vt() {
128
128
  }
129
129
  }
130
130
  function o() {
131
- var f = O.A;
131
+ var f = K.A;
132
132
  return f === null ? null : f.getOwner();
133
133
  }
134
134
  function r() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(f) {
138
- if (U.call(f, "key")) {
138
+ if (C.call(f, "key")) {
139
139
  var $ = Object.getOwnPropertyDescriptor(f, "key").get;
140
140
  if ($ && $.isReactWarning) return !1;
141
141
  }
142
142
  return f.key !== void 0;
143
143
  }
144
144
  function l(f, $) {
145
- function F() {
146
- S || (S = !0, console.error(
145
+ function z() {
146
+ E || (E = !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
  $
149
149
  ));
150
150
  }
151
- F.isReactWarning = !0, Object.defineProperty(f, "key", {
152
- get: F,
151
+ z.isReactWarning = !0, Object.defineProperty(f, "key", {
152
+ get: z,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
156
  function u() {
157
157
  var f = t(this.type);
158
- return C[f] || (C[f] = !0, console.error(
158
+ return L[f] || (L[f] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), f = this.props.ref, f !== void 0 ? f : null;
161
161
  }
162
- function d(f, $, F, V, ne, oe) {
163
- var q = F.ref;
162
+ function d(f, $, z, F, ne, oe) {
163
+ var Y = z.ref;
164
164
  return f = {
165
- $$typeof: x,
165
+ $$typeof: v,
166
166
  type: f,
167
167
  key: $,
168
- props: F,
169
- _owner: V
170
- }, (q !== void 0 ? q : null) !== null ? Object.defineProperty(f, "ref", {
168
+ props: z,
169
+ _owner: F
170
+ }, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(f, "ref", {
171
171
  enumerable: !1,
172
172
  get: u
173
173
  }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
@@ -192,61 +192,61 @@ function vt() {
192
192
  value: oe
193
193
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
194
194
  }
195
- function m(f, $, F, V, ne, oe) {
196
- var q = $.children;
197
- if (q !== void 0)
198
- if (V)
199
- if (_(q)) {
200
- for (V = 0; V < q.length; V++)
201
- p(q[V]);
202
- Object.freeze && Object.freeze(q);
195
+ function m(f, $, z, F, ne, oe) {
196
+ var Y = $.children;
197
+ if (Y !== void 0)
198
+ if (F)
199
+ if (x(Y)) {
200
+ for (F = 0; F < Y.length; F++)
201
+ p(Y[F]);
202
+ Object.freeze && Object.freeze(Y);
203
203
  } else
204
204
  console.error(
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
- else p(q);
208
- if (U.call($, "key")) {
209
- q = t(f);
210
- var Q = Object.keys($).filter(function(Ne) {
211
- return Ne !== "key";
207
+ else p(Y);
208
+ if (C.call($, "key")) {
209
+ Y = t(f);
210
+ var Q = Object.keys($).filter(function(je) {
211
+ return je !== "key";
212
212
  });
213
- V = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", R[q + V] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ F = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", T[Y + F] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
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
- V,
221
- q,
220
+ F,
221
+ Y,
222
222
  Q,
223
- q
224
- ), R[q + V] = !0);
223
+ Y
224
+ ), T[Y + F] = !0);
225
225
  }
226
- if (q = null, F !== void 0 && (n(F), q = "" + F), i($) && (n($.key), q = "" + $.key), "key" in $) {
227
- F = {};
226
+ if (Y = null, z !== void 0 && (n(z), Y = "" + z), i($) && (n($.key), Y = "" + $.key), "key" in $) {
227
+ z = {};
228
228
  for (var ie in $)
229
- ie !== "key" && (F[ie] = $[ie]);
230
- } else F = $;
231
- return q && l(
232
- F,
229
+ ie !== "key" && (z[ie] = $[ie]);
230
+ } else z = $;
231
+ return Y && l(
232
+ z,
233
233
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
234
234
  ), d(
235
235
  f,
236
- q,
237
- F,
236
+ Y,
237
+ z,
238
238
  o(),
239
239
  ne,
240
240
  oe
241
241
  );
242
242
  }
243
243
  function p(f) {
244
- h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
244
+ h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === W && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
245
245
  }
246
246
  function h(f) {
247
- return typeof f == "object" && f !== null && f.$$typeof === x;
247
+ return typeof f == "object" && f !== null && f.$$typeof === v;
248
248
  }
249
- var c = Y, x = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), E = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), b = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), O = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, _ = Array.isArray, y = console.createTask ? console.createTask : function() {
249
+ var c = V, v = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), S = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), K = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, x = Array.isArray, b = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  c = {
@@ -254,36 +254,36 @@ React keys must be passed directly to JSX without using spread:
254
254
  return f();
255
255
  }
256
256
  };
257
- var S, C = {}, K = c.react_stack_bottom_frame.bind(
257
+ var E, L = {}, U = c.react_stack_bottom_frame.bind(
258
258
  c,
259
259
  r
260
- )(), X = y(a(r)), R = {};
261
- ve.Fragment = g, ve.jsx = function(f, $, F) {
262
- var V = 1e4 > O.recentlyCreatedOwnerStacks++;
260
+ )(), G = b(a(r)), T = {};
261
+ xe.Fragment = g, xe.jsx = function(f, $, z) {
262
+ var F = 1e4 > K.recentlyCreatedOwnerStacks++;
263
263
  return m(
264
264
  f,
265
265
  $,
266
- F,
266
+ z,
267
267
  !1,
268
- V ? Error("react-stack-top-frame") : K,
269
- V ? y(a(f)) : X
268
+ F ? Error("react-stack-top-frame") : U,
269
+ F ? b(a(f)) : G
270
270
  );
271
- }, ve.jsxs = function(f, $, F) {
272
- var V = 1e4 > O.recentlyCreatedOwnerStacks++;
271
+ }, xe.jsxs = function(f, $, z) {
272
+ var F = 1e4 > K.recentlyCreatedOwnerStacks++;
273
273
  return m(
274
274
  f,
275
275
  $,
276
- F,
276
+ z,
277
277
  !0,
278
- V ? Error("react-stack-top-frame") : K,
279
- V ? y(a(f)) : X
278
+ F ? Error("react-stack-top-frame") : U,
279
+ F ? b(a(f)) : G
280
280
  );
281
281
  };
282
- }()), ve;
282
+ }()), xe;
283
283
  }
284
- process.env.NODE_ENV === "production" ? ye.exports = xt() : ye.exports = vt();
285
- var e = ye.exports;
286
- function _t({ size: t = "m", color: s = "default", className: n = "", ...a }) {
284
+ process.env.NODE_ENV === "production" ? ge.exports = ht() : ge.exports = xt();
285
+ var e = ge.exports;
286
+ function vt({ size: t = "m", color: s = "default", className: n = "", ...a }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
@@ -294,7 +294,7 @@ function _t({ size: t = "m", color: s = "default", className: n = "", ...a }) {
294
294
  }
295
295
  );
296
296
  }
297
- const bt = { xs: 12, s: 14, m: 16, l: 20 };
297
+ const _t = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function ae({
299
299
  children: t,
300
300
  variant: s = "primary",
@@ -310,37 +310,37 @@ function ae({
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const c = o && !t, x = i === "loading", v = i === "success", g = i === "error", w = x || v || g, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", E = bt[n] ?? 16, M = x ? /* @__PURE__ */ e.jsx(_t, { size: k, color: j }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Te, { size: E, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: E, strokeWidth: 2.5 }) }) : null, L = [
313
+ const c = o && !t, v = i === "loading", _ = i === "success", g = i === "error", y = v || _ || g, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", S = _t[n] ?? 16, M = v ? /* @__PURE__ */ e.jsx(vt, { size: k, color: j }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx($e, { size: S, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: S, strokeWidth: 2.5 }) }) : null, D = [
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
317
317
  a && "ds-button--full",
318
318
  c && "ds-button--icon-only",
319
319
  p
320
- ].filter(Boolean).join(" "), W = i !== "idle" ? i : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- w ? M : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
320
+ ].filter(Boolean).join(" "), H = i !== "idle" ? i : void 0, q = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
+ y ? M : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
322
322
  t
323
323
  ] });
324
324
  if (d) {
325
- const z = (b) => {
326
- if (r || x) {
327
- b.preventDefault();
325
+ const W = (w) => {
326
+ if (r || v) {
327
+ w.preventDefault();
328
328
  return;
329
329
  }
330
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), l == null || l(b));
330
+ w.metaKey || w.ctrlKey || w.button === 1 || (w.preventDefault(), l == null || l(w));
331
331
  };
332
332
  return /* @__PURE__ */ e.jsx(
333
333
  "a",
334
334
  {
335
- className: L,
336
- href: r || x ? void 0 : d,
337
- onClick: z,
335
+ className: D,
336
+ href: r || v ? void 0 : d,
337
+ onClick: W,
338
338
  "aria-label": m,
339
- "aria-disabled": r || x ? "true" : void 0,
340
- "aria-busy": x ? "true" : void 0,
341
- "data-state": W,
339
+ "aria-disabled": r || v ? "true" : void 0,
340
+ "aria-busy": v ? "true" : void 0,
341
+ "data-state": H,
342
342
  ...h,
343
- children: H
343
+ children: q
344
344
  }
345
345
  );
346
346
  }
@@ -348,18 +348,18 @@ function ae({
348
348
  "button",
349
349
  {
350
350
  type: u,
351
- className: L,
351
+ className: D,
352
352
  disabled: r,
353
- onClick: x ? void 0 : l,
353
+ onClick: v ? void 0 : l,
354
354
  "aria-label": m,
355
- "aria-busy": x ? "true" : void 0,
356
- "data-state": W,
355
+ "aria-busy": v ? "true" : void 0,
356
+ "data-state": H,
357
357
  ...h,
358
- children: H
358
+ children: q
359
359
  }
360
360
  );
361
361
  }
362
- function as({
362
+ function os({
363
363
  label: t,
364
364
  error: s,
365
365
  hint: n,
@@ -372,7 +372,7 @@ function as({
372
372
  id: d,
373
373
  ...m
374
374
  }) {
375
- const p = d || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, c = s ? `${p}-error` : void 0, x = c || h;
375
+ const p = d || `input-${V.useId()}`, h = n ? `${p}-hint` : void 0, c = s ? `${p}-error` : void 0, v = c || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${u ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -384,7 +384,7 @@ function as({
384
384
  className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
385
  disabled: u,
386
386
  "aria-invalid": s ? "true" : "false",
387
- "aria-describedby": x,
387
+ "aria-describedby": v,
388
388
  ...m
389
389
  }
390
390
  ),
@@ -404,7 +404,7 @@ function as({
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: c, className: "ds-input-error", role: "alert", children: s }) }) })
405
405
  ] });
406
406
  }
407
- function os({
407
+ function is({
408
408
  label: t,
409
409
  error: s,
410
410
  hint: n,
@@ -416,7 +416,7 @@ function os({
416
416
  rows: u = 3,
417
417
  ...d
418
418
  }) {
419
- const m = i || `textarea-${Y.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0, c = h || p;
419
+ const m = i || `textarea-${V.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0, c = h || p;
420
420
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: t }),
422
422
  /* @__PURE__ */ e.jsx(
@@ -435,7 +435,7 @@ function os({
435
435
  s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
436
436
  ] });
437
437
  }
438
- function is({
438
+ function ls({
439
439
  label: t,
440
440
  value: s,
441
441
  onChange: n,
@@ -448,145 +448,145 @@ function is({
448
448
  id: d,
449
449
  ...m
450
450
  }) {
451
- const [p, h] = A(!1), [c, x] = A(!1), [v, g] = A({}), [w, k] = A("down"), [j, E] = A(-1), M = T(null), L = T(null), W = T(null), H = T(null), z = d || `select-${Y.useId()}`, b = `${z}-label`, I = r ? `${z}-error` : void 0, O = 150, U = (R = !1) => {
452
- c || (x(!0), E(-1), H.current = setTimeout(() => {
451
+ const [p, h] = A(!1), [c, v] = A(!1), [_, g] = A({}), [y, k] = A("down"), [j, S] = A(-1), M = R(null), D = R(null), H = R(null), q = R(null), W = d || `select-${V.useId()}`, w = `${W}-label`, O = r ? `${W}-error` : void 0, K = 150, C = (T = !1) => {
452
+ c || (v(!0), S(-1), q.current = setTimeout(() => {
453
453
  var f;
454
- h(!1), x(!1), R && ((f = W.current) == null || f.focus());
455
- }, O));
456
- }, _ = (R) => {
457
- clearTimeout(H.current), x(!1);
458
- const f = R !== void 0 ? R : Math.max(a.findIndex(($) => $.value === s), 0);
459
- E(f), h(!0);
454
+ h(!1), v(!1), T && ((f = H.current) == null || f.focus());
455
+ }, K));
456
+ }, x = (T) => {
457
+ clearTimeout(q.current), v(!1);
458
+ const f = T !== void 0 ? T : Math.max(a.findIndex(($) => $.value === s), 0);
459
+ S(f), h(!0);
460
460
  };
461
- D(() => () => clearTimeout(H.current), []);
462
- const y = () => {
461
+ B(() => () => clearTimeout(q.current), []);
462
+ const b = () => {
463
463
  var oe;
464
- const R = (oe = M.current) == null ? void 0 : oe.getBoundingClientRect();
465
- if (!R) return;
466
- const f = window.innerHeight, $ = f - R.bottom, F = R.top, ne = $ < 300 && F > $;
464
+ const T = (oe = M.current) == null ? void 0 : oe.getBoundingClientRect();
465
+ if (!T) return;
466
+ const f = window.innerHeight, $ = f - T.bottom, z = T.top, ne = $ < 300 && z > $;
467
467
  k(ne ? "up" : "down"), g(
468
- ne ? { bottom: f - R.top + 4, left: R.left, width: R.width } : { top: R.bottom + 4, left: R.left, width: R.width }
468
+ ne ? { bottom: f - T.top + 4, left: T.left, width: T.width } : { top: T.bottom + 4, left: T.left, width: T.width }
469
469
  );
470
470
  };
471
- D(() => {
471
+ B(() => {
472
472
  if (p)
473
- return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
474
- window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
473
+ return b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
474
+ window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
475
475
  };
476
- }, [p]), D(() => {
477
- const R = (f) => {
478
- M.current && !M.current.contains(f.target) && L.current && !L.current.contains(f.target) && U();
476
+ }, [p]), B(() => {
477
+ const T = (f) => {
478
+ M.current && !M.current.contains(f.target) && D.current && !D.current.contains(f.target) && C();
479
479
  };
480
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
481
- }, [c]), D(() => {
480
+ return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
481
+ }, [c]), B(() => {
482
482
  var f;
483
- if (!p || j < 0 || !L.current) return;
484
- (f = L.current.querySelectorAll(".ds-select-option")[j]) == null || f.scrollIntoView({ block: "nearest" });
483
+ if (!p || j < 0 || !D.current) return;
484
+ (f = D.current.querySelectorAll(".ds-select-option")[j]) == null || f.scrollIntoView({ block: "nearest" });
485
485
  }, [j, p]);
486
- const S = (R) => {
487
- switch (R.key) {
486
+ const E = (T) => {
487
+ switch (T.key) {
488
488
  case "ArrowDown":
489
- R.preventDefault(), p ? E((f) => Math.min(f + 1, a.length - 1)) : _();
489
+ T.preventDefault(), p ? S((f) => Math.min(f + 1, a.length - 1)) : x();
490
490
  break;
491
491
  case "ArrowUp":
492
- R.preventDefault(), p ? E((f) => Math.max(f - 1, 0)) : _(a.length - 1);
492
+ T.preventDefault(), p ? S((f) => Math.max(f - 1, 0)) : x(a.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && (R.preventDefault(), E(0));
495
+ p && (T.preventDefault(), S(0));
496
496
  break;
497
497
  case "End":
498
- p && (R.preventDefault(), E(a.length - 1));
498
+ p && (T.preventDefault(), S(a.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- R.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), U(!0)) : _();
502
+ T.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), C(!0)) : x();
503
503
  break;
504
504
  case "Escape":
505
- p && (R.preventDefault(), U(!0));
505
+ p && (T.preventDefault(), C(!0));
506
506
  break;
507
507
  case "Tab":
508
- p && U(!1);
508
+ p && C(!1);
509
509
  break;
510
510
  }
511
- }, C = a.find((R) => R.value === s), K = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], X = p && /* @__PURE__ */ e.jsx(
511
+ }, L = a.find((T) => T.value === s), U = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
- ref: L,
514
+ ref: D,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
- "aria-labelledby": t ? b : void 0,
517
+ "aria-labelledby": t ? w : void 0,
518
518
  tabIndex: -1,
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
- `ds-select-dropdown--${w}`,
522
+ `ds-select-dropdown--${y}`,
523
523
  c && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
- style: v,
526
- children: a.map((R, f) => /* @__PURE__ */ e.jsx(
525
+ style: _,
526
+ children: a.map((T, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
- id: `${z}-opt-${f}`,
529
+ id: `${W}-opt-${f}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": s === R.value,
533
+ "aria-selected": s === T.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- s === R.value && "ds-select-option--selected",
537
+ s === T.value && "ds-select-option--selected",
538
538
  f === j && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- n == null || n(R.value), U(!0);
541
+ n == null || n(T.value), C(!0);
542
542
  },
543
- children: R.label
543
+ children: T.label
544
544
  },
545
- R.value
545
+ T.value
546
546
  ))
547
547
  }
548
548
  );
549
549
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${u ? "ds-select-wrapper--disabled" : ""}`, children: [
550
- t && /* @__PURE__ */ e.jsx("label", { id: b, className: "ds-select-label", children: t }),
550
+ t && /* @__PURE__ */ e.jsx("label", { id: w, className: "ds-select-label", children: t }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
- ref: W,
554
+ ref: H,
555
555
  type: "button",
556
- id: z,
556
+ id: W,
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && j >= 0 ? `${z}-opt-${j}` : void 0,
561
- "aria-labelledby": t ? b : void 0,
560
+ "aria-activedescendant": p && j >= 0 ? `${W}-opt-${j}` : void 0,
561
+ "aria-labelledby": t ? w : void 0,
562
562
  "aria-invalid": r ? "true" : "false",
563
- "aria-describedby": I,
563
+ "aria-describedby": O,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- u || (p ? U() : _());
566
+ u || (p ? C() : x());
567
567
  },
568
- onKeyDown: S,
568
+ onKeyDown: E,
569
569
  disabled: u,
570
570
  ...m,
571
571
  children: [
572
- /* @__PURE__ */ e.jsx("span", { className: C ? "" : "ds-select-placeholder", children: (C == null ? void 0 : C.label) || o }),
572
+ /* @__PURE__ */ e.jsx("span", { className: L ? "" : "ds-select-placeholder", children: (L == null ? void 0 : L.label) || o }),
573
573
  /* @__PURE__ */ e.jsx(
574
- _e,
574
+ ve,
575
575
  {
576
- size: K,
576
+ size: U,
577
577
  strokeWidth: 1.5,
578
- className: `ds-select-icon ${p && w === "down" ? "ds-select-icon--open" : ""} ${p && w === "up" ? "ds-select-icon--up" : ""}`,
578
+ className: `ds-select-icon ${p && y === "down" ? "ds-select-icon--open" : ""} ${p && y === "up" ? "ds-select-icon--up" : ""}`,
579
579
  "aria-hidden": "true"
580
580
  }
581
581
  )
582
582
  ]
583
583
  }
584
584
  ) }),
585
- r && /* @__PURE__ */ e.jsx("span", { id: I, className: "ds-select-error", role: "alert", children: r }),
586
- typeof document < "u" && he.createPortal(X, document.body)
585
+ r && /* @__PURE__ */ e.jsx("span", { id: O, className: "ds-select-error", role: "alert", children: r }),
586
+ typeof document < "u" && pe.createPortal(G, document.body)
587
587
  ] });
588
588
  }
589
- function ls({
589
+ function cs({
590
590
  label: t,
591
591
  value: s = 0,
592
592
  onChange: n,
@@ -601,36 +601,36 @@ function ls({
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const w = Math.min(Number(s) + r, o);
605
- n == null || n(w);
604
+ const y = Math.min(Number(s) + r, o);
605
+ n == null || n(y);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const w = Math.max(Number(s) - r, a);
609
- n == null || n(w);
610
- }, c = (w) => {
608
+ const y = Math.max(Number(s) - r, a);
609
+ n == null || n(y);
610
+ }, c = (y) => {
611
611
  if (l) return;
612
- const k = w.target.value;
612
+ const k = y.target.value;
613
613
  if (k === "") {
614
614
  n == null || n(a);
615
615
  return;
616
616
  }
617
617
  const j = Number(k);
618
618
  if (!isNaN(j)) {
619
- const E = Math.min(Math.max(j, a), o);
620
- n == null || n(E);
619
+ const S = Math.min(Math.max(j, a), o);
620
+ n == null || n(S);
621
621
  }
622
- }, x = [
622
+ }, v = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
625
  d && "ds-stepper-wrapper--error"
626
- ].filter(Boolean).join(" "), v = [
626
+ ].filter(Boolean).join(" "), _ = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
630
  ].filter(Boolean).join(" "), g = i === "xs" ? P[1] : i === "small" ? P[2] : P[3];
631
- return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
631
+ return /* @__PURE__ */ e.jsxs("div", { className: v, children: [
632
632
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
633
- /* @__PURE__ */ e.jsxs("div", { className: v, children: [
633
+ /* @__PURE__ */ e.jsxs("div", { className: _, children: [
634
634
  /* @__PURE__ */ e.jsx(
635
635
  "button",
636
636
  {
@@ -639,7 +639,7 @@ function ls({
639
639
  onClick: h,
640
640
  disabled: l || s <= a,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(tt, { size: g, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(et, { size: g, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -664,7 +664,7 @@ function ls({
664
664
  onClick: p,
665
665
  disabled: l || s >= o,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(st, { size: g, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(tt, { size: g, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
@@ -672,7 +672,7 @@ function ls({
672
672
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
673
673
  ] });
674
674
  }
675
- function cs({
675
+ function ds({
676
676
  children: t,
677
677
  padding: s = "m",
678
678
  variant: n = "info",
@@ -689,12 +689,12 @@ function cs({
689
689
  d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
691
  if (r) {
692
- const c = (x) => {
692
+ const c = (v) => {
693
693
  if (i) {
694
- x.preventDefault();
694
+ v.preventDefault();
695
695
  return;
696
696
  }
697
- x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), o == null || o(x));
697
+ v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), o == null || o(v));
698
698
  };
699
699
  return /* @__PURE__ */ e.jsx(
700
700
  "a",
@@ -724,28 +724,28 @@ function cs({
724
724
  }
725
725
  );
726
726
  }
727
- function ds({ children: t, ...s }) {
727
+ function us({ children: t, ...s }) {
728
728
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
729
729
  }
730
- function us({ children: t, ...s }) {
730
+ function fs({ children: t, ...s }) {
731
731
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
732
732
  }
733
- function fs({ children: t, ...s }) {
733
+ function ms({ children: t, ...s }) {
734
734
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
735
735
  }
736
- function ms({ children: t, ...s }) {
736
+ function ps({ children: t, ...s }) {
737
737
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
738
738
  }
739
- function ps({ children: t, secondary: s = !1, ...n }) {
739
+ function hs({ children: t, secondary: s = !1, ...n }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
741
741
  }
742
- function jt({ children: t, secondary: s = !1, ...n }) {
742
+ function bt({ children: t, secondary: s = !1, ...n }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
744
744
  }
745
- function Ke({ children: t, secondary: s = !1, ...n }) {
745
+ function He({ children: t, secondary: s = !1, ...n }) {
746
746
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
747
747
  }
748
- function ue({
748
+ function de({
749
749
  children: t,
750
750
  variant: s = "default",
751
751
  size: n = "m",
@@ -759,13 +759,13 @@ function ue({
759
759
  ].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
760
760
  return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...o, children: t });
761
761
  }
762
- const Nt = {
763
- info: Be,
764
- success: Ae,
765
- warning: Se,
766
- error: Re
762
+ const jt = {
763
+ info: Ae,
764
+ success: Se,
765
+ warning: Re,
766
+ error: Te
767
767
  };
768
- function hs({
768
+ function xs({
769
769
  children: t,
770
770
  variant: s = "info",
771
771
  title: n,
@@ -773,7 +773,7 @@ function hs({
773
773
  role: o,
774
774
  ...r
775
775
  }) {
776
- const i = Nt[s], l = o || (s === "error" ? "alert" : "status");
776
+ const i = jt[s], l = o || (s === "error" ? "alert" : "status");
777
777
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${s} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
778
778
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: P[3], strokeWidth: 1.5 }) }),
779
779
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
@@ -792,8 +792,8 @@ function hs({
792
792
  )
793
793
  ] });
794
794
  }
795
- const gt = 200;
796
- function xs({
795
+ const Nt = 200;
796
+ function vs({
797
797
  children: t,
798
798
  title: s,
799
799
  onClose: n,
@@ -802,24 +802,24 @@ function xs({
802
802
  subHeader: r,
803
803
  ...i
804
804
  }) {
805
- const l = T(null), u = Y.useId(), [d, m] = A(!1), p = () => {
805
+ const l = R(null), u = V.useId(), [d, m] = A(!1), p = () => {
806
806
  !n || d || (m(!0), setTimeout(() => {
807
807
  m(!1), n();
808
- }, gt));
808
+ }, Nt));
809
809
  };
810
- D(() => {
811
- const v = (w) => {
812
- w.key === "Escape" && p();
813
- }, g = (w) => {
814
- var j, E, M;
815
- const k = ((E = (j = w.composedPath) == null ? void 0 : j.call(w)) == null ? void 0 : E[0]) ?? w.target;
810
+ B(() => {
811
+ const _ = (y) => {
812
+ y.key === "Escape" && p();
813
+ }, g = (y) => {
814
+ var j, S, M;
815
+ const k = ((S = (j = y.composedPath) == null ? void 0 : j.call(y)) == null ? void 0 : S[0]) ?? y.target;
816
816
  l.current && !l.current.contains(k) && !((M = k.closest) != null && M.call(k, "[data-ds-portal]")) && p();
817
817
  };
818
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", g), () => {
819
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", g);
818
+ return document.addEventListener("keydown", _), document.addEventListener("mousedown", g), () => {
819
+ document.removeEventListener("keydown", _), document.removeEventListener("mousedown", g);
820
820
  };
821
821
  }, [n, d]);
822
- const h = Y.Children.toArray(t), c = h.find((v) => (v == null ? void 0 : v.type) === me), x = h.filter((v) => (v == null ? void 0 : v.type) !== me);
822
+ const h = V.Children.toArray(t), c = h.find((_) => (_ == null ? void 0 : _.type) === fe), v = h.filter((_) => (_ == null ? void 0 : _.type) !== fe);
823
823
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
824
824
  "div",
825
825
  {
@@ -844,41 +844,41 @@ function xs({
844
844
  s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-modal__title", children: s }),
845
845
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
846
846
  ] }),
847
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
847
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: v }),
848
848
  c
849
849
  ]
850
850
  }
851
851
  ) });
852
852
  }
853
- function me({ children: t }) {
854
- return !t || Y.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
853
+ function fe({ children: t }) {
854
+ return !t || V.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
855
855
  }
856
856
  const wt = 320;
857
- function vs({
857
+ function _s({
858
858
  children: t,
859
859
  title: s,
860
860
  onClose: n,
861
861
  subHeader: a,
862
862
  ...o
863
863
  }) {
864
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
864
+ const r = R(null), i = V.useId(), [l, u] = A(!1), d = () => {
865
865
  !n || l || (u(!0), setTimeout(() => {
866
866
  u(!1), n();
867
867
  }, wt));
868
868
  };
869
- D(() => {
870
- const c = (v) => {
871
- v.key === "Escape" && d();
872
- }, x = (v) => {
873
- var w, k, j;
874
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
869
+ B(() => {
870
+ const c = (_) => {
871
+ _.key === "Escape" && d();
872
+ }, v = (_) => {
873
+ var y, k, j;
874
+ const g = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
875
875
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
876
876
  };
877
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
878
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
877
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
878
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
879
879
  };
880
880
  }, [n, l]);
881
- const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== me);
881
+ const m = V.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === fe), h = m.filter((c) => (c == null ? void 0 : c.type) !== fe);
882
882
  return /* @__PURE__ */ e.jsx(
883
883
  "div",
884
884
  {
@@ -917,7 +917,7 @@ function vs({
917
917
  }
918
918
  );
919
919
  }
920
- function yt({
920
+ function gt({
921
921
  children: t,
922
922
  title: s = "Code",
923
923
  defaultExpanded: n = !1,
@@ -928,7 +928,7 @@ function yt({
928
928
  ...l
929
929
  }) {
930
930
  const [u, d] = A(n), m = a !== void 0, p = m ? a : u, h = () => {
931
- m ? o == null || o(!a) : d((x) => !x);
931
+ m ? o == null || o(!a) : d((v) => !v);
932
932
  }, c = [
933
933
  "ds-code-accordion",
934
934
  `ds-code-accordion--${r}`,
@@ -946,7 +946,7 @@ function yt({
946
946
  children: [
947
947
  /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: s }),
948
948
  /* @__PURE__ */ e.jsx(
949
- _e,
949
+ ve,
950
950
  {
951
951
  size: P[2],
952
952
  strokeWidth: 1.5,
@@ -959,10 +959,10 @@ function yt({
959
959
  /* @__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 }) }) }) })
960
960
  ] });
961
961
  }
962
- function _s({ children: t, block: s = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
963
- return s ? n ? /* @__PURE__ */ e.jsx(yt, { title: a, defaultExpanded: o, ...r, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: t });
962
+ function bs({ children: t, block: s = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
963
+ return s ? n ? /* @__PURE__ */ e.jsx(gt, { title: a, defaultExpanded: o, ...r, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: t });
964
964
  }
965
- function bs({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
965
+ function js({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
966
966
  const l = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
967
967
  return /* @__PURE__ */ e.jsx(
968
968
  "a",
@@ -977,10 +977,10 @@ function bs({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
977
977
  }
978
978
  );
979
979
  }
980
- function js({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
981
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: Y.Children.map(t, (o) => Y.isValidElement(o) ? Y.cloneElement(o, { size: s, variant: n }) : o) });
980
+ function Ns({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
981
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: V.Children.map(t, (o) => V.isValidElement(o) ? V.cloneElement(o, { size: s, variant: n }) : o) });
982
982
  }
983
- function Ns({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...u }) {
983
+ function ws({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...u }) {
984
984
  const d = i && !t, m = [
985
985
  "ds-tab",
986
986
  `ds-tab--${a}`,
@@ -1027,23 +1027,23 @@ function Ns({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
1027
1027
  );
1028
1028
  }
1029
1029
  function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1 }) {
1030
- const r = T(null), i = T(null), [l, u] = A(!1), d = T(!1), m = T(null), p = T(null), h = () => {
1030
+ const r = R(null), i = R(null), [l, u] = A(!1), d = R(!1), m = R(null), p = R(null), h = () => {
1031
1031
  if (!r.current) return;
1032
1032
  const c = r.current.querySelector(`[data-value="${s}"]`);
1033
1033
  if (!c) return;
1034
- const x = r.current.getBoundingClientRect(), v = c.getBoundingClientRect(), g = v.left - x.left, w = v.width;
1035
- i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = w + "px", d.current = !1) : (u(!0), requestAnimationFrame(() => {
1034
+ const v = r.current.getBoundingClientRect(), _ = c.getBoundingClientRect(), g = _.left - v.left, y = _.width;
1035
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = y + "px", d.current = !1) : (u(!0), requestAnimationFrame(() => {
1036
1036
  if (!i.current || !r.current) return;
1037
1037
  const k = r.current.querySelector(`[data-value="${s}"]`);
1038
1038
  if (!k) return;
1039
- const j = r.current.getBoundingClientRect(), E = k.getBoundingClientRect();
1040
- i.current.style.transition = "none", i.current.style.left = E.left - j.left + "px", i.current.style.width = E.width + "px";
1039
+ const j = r.current.getBoundingClientRect(), S = k.getBoundingClientRect();
1040
+ i.current.style.transition = "none", i.current.style.left = S.left - j.left + "px", i.current.style.width = S.width + "px";
1041
1041
  }));
1042
1042
  };
1043
- return p.current = h, Qe(() => {
1043
+ return p.current = h, Ze(() => {
1044
1044
  const c = m.current !== s;
1045
1045
  m.current = s, d.current = l && c, h();
1046
- }), D(() => {
1046
+ }), B(() => {
1047
1047
  if (!r.current) return;
1048
1048
  const c = new ResizeObserver(() => {
1049
1049
  d.current = !1, p.current();
@@ -1088,7 +1088,7 @@ function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1
1088
1088
  }
1089
1089
  );
1090
1090
  }
1091
- function De({
1091
+ function Ie({
1092
1092
  children: t,
1093
1093
  title: s,
1094
1094
  defaultExpanded: n = !1,
@@ -1115,7 +1115,7 @@ function De({
1115
1115
  children: [
1116
1116
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
1117
1117
  /* @__PURE__ */ e.jsx(
1118
- _e,
1118
+ ve,
1119
1119
  {
1120
1120
  size: P[2],
1121
1121
  strokeWidth: 1.5,
@@ -1128,8 +1128,8 @@ function De({
1128
1128
  /* @__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 }) }) })
1129
1129
  ] });
1130
1130
  }
1131
- const re = 8, fe = 8;
1132
- function kt(t, s, n) {
1131
+ const re = 8, ue = 8;
1132
+ function yt(t, s, n) {
1133
1133
  const a = window.innerWidth;
1134
1134
  let o, r;
1135
1135
  switch (t) {
@@ -1148,45 +1148,45 @@ function kt(t, s, n) {
1148
1148
  default:
1149
1149
  o = s.bottom + re, r = s.left;
1150
1150
  }
1151
- const i = Math.max(fe, Math.min(a - n.width - fe, r)), l = r - i;
1151
+ const i = Math.max(ue, Math.min(a - n.width - ue, r)), l = r - i;
1152
1152
  return { top: o, left: i, arrowOffset: l };
1153
1153
  }
1154
- function Et(t, s, n) {
1154
+ function kt(t, s, n) {
1155
1155
  const a = window.innerWidth, o = window.innerHeight;
1156
- if (t.top >= s + re + fe) return "top";
1157
- if (o - t.bottom >= s + re + fe) return "bottom";
1158
- if (a - t.right >= n + re + fe) return "right";
1159
- if (t.left >= n + re + fe) return "left";
1156
+ if (t.top >= s + re + ue) return "top";
1157
+ if (o - t.bottom >= s + re + ue) return "bottom";
1158
+ if (a - t.right >= n + re + ue) return "right";
1159
+ if (t.left >= n + re + ue) return "left";
1160
1160
  const r = Math.max(t.top, o - t.bottom, t.left, a - t.right);
1161
1161
  return r === t.top ? "top" : r === o - t.bottom ? "bottom" : r === a - t.right ? "right" : "left";
1162
1162
  }
1163
- function Ge({ children: t, content: s, position: n, ...a }) {
1164
- const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, d] = A(n || "top"), m = T(null), p = T(null), h = T(!1), c = () => {
1163
+ function Ke({ children: t, content: s, position: n, ...a }) {
1164
+ const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, d] = A(n || "top"), m = R(null), p = R(null), h = R(!1), c = () => {
1165
1165
  if (!m.current || !p.current) return;
1166
- const v = m.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), w = n || Et(v, g.height, g.width), { top: k, left: j, arrowOffset: E } = kt(w, v, g);
1167
- d(w), l({
1166
+ const _ = m.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), y = n || kt(_, g.height, g.width), { top: k, left: j, arrowOffset: S } = yt(y, _, g);
1167
+ d(y), l({
1168
1168
  position: "fixed",
1169
1169
  top: k,
1170
1170
  left: j,
1171
1171
  visibility: "visible",
1172
- "--arrow-offset": `${E}px`
1172
+ "--arrow-offset": `${S}px`
1173
1173
  });
1174
1174
  };
1175
- if (D(() => {
1175
+ if (B(() => {
1176
1176
  if (!o) return;
1177
1177
  l({ position: "fixed", visibility: "hidden" });
1178
- const v = requestAnimationFrame(c);
1178
+ const _ = requestAnimationFrame(c);
1179
1179
  return window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1180
- cancelAnimationFrame(v), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1180
+ cancelAnimationFrame(_), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1181
1181
  };
1182
- }, [o, n]), D(() => {
1182
+ }, [o, n]), B(() => {
1183
1183
  if (!o) return;
1184
- const v = (g) => {
1184
+ const _ = (g) => {
1185
1185
  m.current && !m.current.contains(g.target) && r(!1);
1186
1186
  };
1187
- return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
1187
+ return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
1188
1188
  }, [o]), !s) return t;
1189
- const x = o && /* @__PURE__ */ e.jsx(
1189
+ const v = o && /* @__PURE__ */ e.jsx(
1190
1190
  "div",
1191
1191
  {
1192
1192
  ref: p,
@@ -1209,17 +1209,17 @@ function Ge({ children: t, content: s, position: n, ...a }) {
1209
1209
  h.current || r(!1);
1210
1210
  },
1211
1211
  onTouchStart: () => {
1212
- h.current = !0, r((v) => !v);
1212
+ h.current = !0, r((_) => !_);
1213
1213
  },
1214
1214
  ...a,
1215
1215
  children: [
1216
1216
  t,
1217
- typeof document < "u" && he.createPortal(x, document.body)
1217
+ typeof document < "u" && pe.createPortal(v, document.body)
1218
1218
  ]
1219
1219
  }
1220
1220
  );
1221
1221
  }
1222
- function ws({
1222
+ function ys({
1223
1223
  checked: t = !1,
1224
1224
  onChange: s,
1225
1225
  size: n = "m",
@@ -1228,7 +1228,7 @@ function ws({
1228
1228
  id: r,
1229
1229
  ...i
1230
1230
  }) {
1231
- const l = r || `toggle-${Y.useId()}`, u = [
1231
+ const l = r || `toggle-${V.useId()}`, u = [
1232
1232
  "ds-toggle",
1233
1233
  `ds-toggle--${n}`,
1234
1234
  a && "ds-toggle--disabled"
@@ -1250,7 +1250,7 @@ function ws({
1250
1250
  o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
1251
1251
  ] });
1252
1252
  }
1253
- function ys({
1253
+ function ks({
1254
1254
  checked: t = !1,
1255
1255
  onChange: s,
1256
1256
  size: n = "m",
@@ -1259,7 +1259,7 @@ function ys({
1259
1259
  id: r,
1260
1260
  ...i
1261
1261
  }) {
1262
- const l = r || `checkbox-${Y.useId()}`, u = [
1262
+ const l = r || `checkbox-${V.useId()}`, u = [
1263
1263
  "ds-checkbox",
1264
1264
  `ds-checkbox--${n}`,
1265
1265
  a && "ds-checkbox--disabled"
@@ -1278,7 +1278,7 @@ function ys({
1278
1278
  }
1279
1279
  ),
1280
1280
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1281
- Te,
1281
+ $e,
1282
1282
  {
1283
1283
  size: d,
1284
1284
  strokeWidth: 2.5,
@@ -1288,7 +1288,7 @@ function ys({
1288
1288
  o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
1289
1289
  ] });
1290
1290
  }
1291
- function ks({
1291
+ function Es({
1292
1292
  checked: t = !1,
1293
1293
  onChange: s,
1294
1294
  size: n = "m",
@@ -1299,7 +1299,7 @@ function ks({
1299
1299
  id: l,
1300
1300
  ...u
1301
1301
  }) {
1302
- const d = l || `radio-${Y.useId()}`, m = [
1302
+ const d = l || `radio-${V.useId()}`, m = [
1303
1303
  "ds-radio",
1304
1304
  `ds-radio--${n}`,
1305
1305
  a && "ds-radio--disabled"
@@ -1323,7 +1323,7 @@ function ks({
1323
1323
  o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
1324
1324
  ] });
1325
1325
  }
1326
- function $t({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
1326
+ function Et({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
1327
1327
  return /* @__PURE__ */ e.jsx(
1328
1328
  "span",
1329
1329
  {
@@ -1334,7 +1334,7 @@ function $t({ width: t, height: s, shape: n = "rect", aspectRatio: a, className:
1334
1334
  }
1335
1335
  );
1336
1336
  }
1337
- function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
1337
+ function $t({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
1338
1338
  return /* @__PURE__ */ e.jsx(
1339
1339
  "span",
1340
1340
  {
@@ -1353,20 +1353,20 @@ function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "",
1353
1353
  }
1354
1354
  );
1355
1355
  }
1356
- $t.Text = Tt;
1357
- function Rt(t) {
1356
+ Et.Text = $t;
1357
+ function Tt(t) {
1358
1358
  let s = 2166136261;
1359
1359
  for (let n = 0; n < t.length; n++)
1360
1360
  s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
1361
1361
  return s % 360;
1362
1362
  }
1363
- function St(t) {
1363
+ function Rt(t) {
1364
1364
  if (!t) return "";
1365
1365
  const s = t.trim().split(/\s+/);
1366
1366
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1367
1367
  }
1368
- function Es({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
1369
- const l = Rt(t ?? ""), [u, d] = A(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: St(t) });
1368
+ function $s({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
1369
+ const l = Tt(t ?? ""), [u, d] = A(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Rt(t) });
1370
1370
  return /* @__PURE__ */ e.jsx(
1371
1371
  "div",
1372
1372
  {
@@ -1378,7 +1378,7 @@ function Es({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style:
1378
1378
  }
1379
1379
  );
1380
1380
  }
1381
- function $s({
1381
+ function Ts({
1382
1382
  children: t,
1383
1383
  size: s = "compact",
1384
1384
  stickyTop: n,
@@ -1408,13 +1408,13 @@ function $s({
1408
1408
  }
1409
1409
  );
1410
1410
  }
1411
- function Ts({ children: t, ...s }) {
1411
+ function Rs({ children: t, ...s }) {
1412
1412
  return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
1413
1413
  }
1414
- function Rs({ children: t, ...s }) {
1414
+ function Ss({ children: t, ...s }) {
1415
1415
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1416
1416
  }
1417
- function Ss({ children: t, interactive: s, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...u }) {
1417
+ function As({ children: t, interactive: s, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...u }) {
1418
1418
  return /* @__PURE__ */ e.jsx(
1419
1419
  "tr",
1420
1420
  {
@@ -1433,11 +1433,11 @@ function Ss({ children: t, interactive: s, selected: n, subheader: a, exiting: o
1433
1433
  }
1434
1434
  );
1435
1435
  }
1436
- function As({ children: t, colSpan: s = 999, ...n }) {
1436
+ function Is({ children: t, colSpan: s = 999, ...n }) {
1437
1437
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1438
1438
  }
1439
1439
  function Bs({ children: t, align: s = "left", sortDir: n, onSort: a, width: o, className: r = "", style: i = {}, ...l }) {
1440
- const u = !!a || n !== void 0, d = n === "asc" ? nt : n === "desc" ? _e : rt;
1440
+ const u = !!a || n !== void 0, d = n === "asc" ? st : n === "desc" ? ve : nt;
1441
1441
  return /* @__PURE__ */ e.jsx(
1442
1442
  "th",
1443
1443
  {
@@ -1476,7 +1476,7 @@ function Ds({ children: t, align: s = "left", secondary: n, muted: a, truncate:
1476
1476
  }
1477
1477
  );
1478
1478
  }
1479
- function Is({
1479
+ function Ls({
1480
1480
  icon: t,
1481
1481
  title: s,
1482
1482
  description: n,
@@ -1499,7 +1499,7 @@ function Is({
1499
1499
  }
1500
1500
  );
1501
1501
  }
1502
- function Ls({
1502
+ function Ps({
1503
1503
  label: t,
1504
1504
  hint: s,
1505
1505
  error: n,
@@ -1511,7 +1511,7 @@ function Ls({
1511
1511
  style: u,
1512
1512
  ...d
1513
1513
  }) {
1514
- const m = Y.useId(), p = r ?? m, h = `${p}-hint`, c = `${p}-error`;
1514
+ const m = V.useId(), p = r ?? m, h = `${p}-hint`, c = `${p}-error`;
1515
1515
  return /* @__PURE__ */ e.jsxs(
1516
1516
  "div",
1517
1517
  {
@@ -1530,7 +1530,7 @@ function Ls({
1530
1530
  }
1531
1531
  );
1532
1532
  }
1533
- function Ps({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
1533
+ function Ms({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
1534
1534
  const u = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1535
1535
  return /* @__PURE__ */ e.jsxs(
1536
1536
  "div",
@@ -1551,7 +1551,7 @@ function Ps({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, class
1551
1551
  }
1552
1552
  );
1553
1553
  }
1554
- function Ms({
1554
+ function zs({
1555
1555
  children: t,
1556
1556
  separator: s = "/",
1557
1557
  "aria-label": n = "Breadcrumb",
@@ -1559,7 +1559,7 @@ function Ms({
1559
1559
  style: o,
1560
1560
  ...r
1561
1561
  }) {
1562
- const i = Y.Children.toArray(t).filter(Boolean);
1562
+ const i = V.Children.toArray(t).filter(Boolean);
1563
1563
  return /* @__PURE__ */ e.jsx(
1564
1564
  "nav",
1565
1565
  {
@@ -1574,7 +1574,7 @@ function Ms({
1574
1574
  }
1575
1575
  );
1576
1576
  }
1577
- function zs({
1577
+ function Os({
1578
1578
  page: t,
1579
1579
  total: s,
1580
1580
  onChange: n,
@@ -1584,7 +1584,7 @@ function zs({
1584
1584
  style: i,
1585
1585
  ...l
1586
1586
  }) {
1587
- const u = At(t, s, a);
1587
+ const u = St(t, s, a);
1588
1588
  return /* @__PURE__ */ e.jsxs(
1589
1589
  "nav",
1590
1590
  {
@@ -1600,7 +1600,7 @@ function zs({
1600
1600
  onClick: () => n == null ? void 0 : n(t - 1),
1601
1601
  disabled: t <= 1,
1602
1602
  "aria-label": "Previous page",
1603
- children: /* @__PURE__ */ e.jsx(at, { size: 16 })
1603
+ children: /* @__PURE__ */ e.jsx(rt, { size: 16 })
1604
1604
  }
1605
1605
  ),
1606
1606
  u.map(
@@ -1623,21 +1623,21 @@ function zs({
1623
1623
  onClick: () => n == null ? void 0 : n(t + 1),
1624
1624
  disabled: t >= s,
1625
1625
  "aria-label": "Next page",
1626
- children: /* @__PURE__ */ e.jsx(ot, { size: 16 })
1626
+ children: /* @__PURE__ */ e.jsx(at, { size: 16 })
1627
1627
  }
1628
1628
  )
1629
1629
  ]
1630
1630
  }
1631
1631
  );
1632
1632
  }
1633
- function At(t, s, n) {
1633
+ function St(t, s, n) {
1634
1634
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1635
1635
  const a = Math.max(2, t - n), o = Math.min(s - 1, t + n), r = [1];
1636
1636
  a > 2 && r.push("…");
1637
1637
  for (let i = a; i <= o; i++) r.push(i);
1638
1638
  return o < s - 1 && r.push("…"), r.push(s), r;
1639
1639
  }
1640
- const Bt = 200;
1640
+ const At = 200;
1641
1641
  function Cs({
1642
1642
  children: t,
1643
1643
  title: s,
@@ -1645,24 +1645,24 @@ function Cs({
1645
1645
  side: a = "right",
1646
1646
  ...o
1647
1647
  }) {
1648
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1648
+ const r = R(null), i = V.useId(), [l, u] = A(!1), d = () => {
1649
1649
  !n || l || (u(!0), setTimeout(() => {
1650
1650
  u(!1), n();
1651
- }, Bt));
1651
+ }, At));
1652
1652
  };
1653
- D(() => {
1654
- const c = (v) => {
1655
- v.key === "Escape" && d();
1656
- }, x = (v) => {
1657
- var w, k, j;
1658
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
1653
+ B(() => {
1654
+ const c = (_) => {
1655
+ _.key === "Escape" && d();
1656
+ }, v = (_) => {
1657
+ var y, k, j;
1658
+ const g = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
1659
1659
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
1660
1660
  };
1661
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
1662
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
1661
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
1662
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
1663
1663
  };
1664
1664
  }, [n, l]);
1665
- const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Oe), h = m.filter((c) => (c == null ? void 0 : c.type) !== Oe);
1665
+ const m = V.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Oe), h = m.filter((c) => (c == null ? void 0 : c.type) !== Oe);
1666
1666
  return /* @__PURE__ */ e.jsx(
1667
1667
  "div",
1668
1668
  {
@@ -1693,32 +1693,32 @@ function Cs({
1693
1693
  function Oe({ children: t }) {
1694
1694
  return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
1695
1695
  }
1696
- const Dt = 320;
1697
- function Os({
1696
+ const It = 320;
1697
+ function Fs({
1698
1698
  children: t,
1699
1699
  title: s,
1700
1700
  onClose: n,
1701
1701
  subHeader: a,
1702
1702
  ...o
1703
1703
  }) {
1704
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1704
+ const r = R(null), i = V.useId(), [l, u] = A(!1), d = () => {
1705
1705
  !n || l || (u(!0), setTimeout(() => {
1706
1706
  u(!1), n();
1707
- }, Dt));
1707
+ }, It));
1708
1708
  };
1709
- D(() => {
1710
- const c = (v) => {
1711
- v.key === "Escape" && d();
1712
- }, x = (v) => {
1713
- var w, k, j;
1714
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
1709
+ B(() => {
1710
+ const c = (_) => {
1711
+ _.key === "Escape" && d();
1712
+ }, v = (_) => {
1713
+ var y, k, j;
1714
+ const g = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
1715
1715
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
1716
1716
  };
1717
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
1718
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
1717
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
1718
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
1719
1719
  };
1720
1720
  }, [n, l]);
1721
- const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Fe || (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== Fe && (c == null ? void 0 : c.type) !== me);
1721
+ const m = V.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Ce || (c == null ? void 0 : c.type) === fe), h = m.filter((c) => (c == null ? void 0 : c.type) !== Ce && (c == null ? void 0 : c.type) !== fe);
1722
1722
  return /* @__PURE__ */ e.jsx(
1723
1723
  "div",
1724
1724
  {
@@ -1756,11 +1756,11 @@ function Os({
1756
1756
  }
1757
1757
  );
1758
1758
  }
1759
- function Fe({ children: t }) {
1760
- return !t || Y.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1759
+ function Ce({ children: t }) {
1760
+ return !t || V.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1761
1761
  }
1762
- const je = et({ collapsed: !1, side: "left" });
1763
- function Fs({
1762
+ const be = Qe({ collapsed: !1, side: "left" });
1763
+ function Ws({
1764
1764
  children: t,
1765
1765
  collapsed: s = !1,
1766
1766
  side: n = "left",
@@ -1773,9 +1773,9 @@ function Fs({
1773
1773
  `ds-nav-rail--${n}`,
1774
1774
  a
1775
1775
  ].filter(Boolean).join(" ");
1776
- return /* @__PURE__ */ e.jsx(je.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: t }) });
1776
+ return /* @__PURE__ */ e.jsx(be.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: t }) });
1777
1777
  }
1778
- function Ws({
1778
+ function Us({
1779
1779
  icon: t,
1780
1780
  label: s,
1781
1781
  selected: n = !1,
@@ -1789,7 +1789,7 @@ function Ws({
1789
1789
  className: m = "",
1790
1790
  ...p
1791
1791
  }) {
1792
- const { collapsed: h, side: c } = $e(je), g = {
1792
+ const { collapsed: h, side: c } = Ee(be), g = {
1793
1793
  className: [
1794
1794
  "ds-nav-rail__item",
1795
1795
  m
@@ -1806,29 +1806,29 @@ function Ws({
1806
1806
  "data-onboarding": d || void 0
1807
1807
  },
1808
1808
  ...p
1809
- }, w = i != null, k = c === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1809
+ }, y = i != null, k = c === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1810
1810
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1811
1811
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1812
- !h && l && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1813
- !h && w && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1812
+ !h && l && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1813
+ !h && y && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1814
1814
  h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1815
- ] }), E = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...g, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: j });
1816
- return h ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: k, children: E }) : E;
1815
+ ] }), S = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...g, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: j });
1816
+ return h ? /* @__PURE__ */ e.jsx(Ke, { content: s, position: k, children: S }) : S;
1817
1817
  }
1818
- function Us({ children: t, className: s = "", ...n }) {
1818
+ function Vs({ children: t, className: s = "", ...n }) {
1819
1819
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
1820
1820
  }
1821
- function Vs({ children: t, className: s = "", ...n }) {
1821
+ function Ys({ children: t, className: s = "", ...n }) {
1822
1822
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
1823
1823
  }
1824
- function Ys({ children: t, className: s = "", ...n }) {
1824
+ function qs({ children: t, className: s = "", ...n }) {
1825
1825
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
1826
1826
  }
1827
- function qs({ className: t = "", ...s }) {
1827
+ function Hs({ className: t = "", ...s }) {
1828
1828
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
1829
1829
  }
1830
- function Hs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: a = "", ...o }) {
1831
- const { collapsed: r } = $e(je), [i, l] = A(n);
1830
+ function Ks({ children: t, label: s = "Recents", defaultOpen: n = !0, className: a = "", ...o }) {
1831
+ const { collapsed: r } = Ee(be), [i, l] = A(n);
1832
1832
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", a].filter(Boolean).join(" "), ...o, children: [
1833
1833
  !r && /* @__PURE__ */ e.jsxs(
1834
1834
  "button",
@@ -1839,15 +1839,15 @@ function Hs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1839
1839
  "aria-expanded": i,
1840
1840
  children: [
1841
1841
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: s }),
1842
- /* @__PURE__ */ e.jsx(_e, { size: 12, strokeWidth: 2, className: "ds-nav-rail__recents-chevron", "aria-hidden": "true" })
1842
+ /* @__PURE__ */ e.jsx(ve, { size: 12, strokeWidth: 2, className: "ds-nav-rail__recents-chevron", "aria-hidden": "true" })
1843
1843
  ]
1844
1844
  }
1845
1845
  ),
1846
1846
  (i || r) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
1847
1847
  ] });
1848
1848
  }
1849
- function Ks({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o, onClick: r, className: i = "", ...l }) {
1850
- const { collapsed: u, side: d } = $e(je), h = {
1849
+ function Gs({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o, onClick: r, className: i = "", ...l }) {
1850
+ const { collapsed: u, side: d } = Ee(be), h = {
1851
1851
  className: [
1852
1852
  "ds-nav-rail__item",
1853
1853
  "ds-nav-rail__agent",
@@ -1865,16 +1865,16 @@ function Ks({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o,
1865
1865
  }, c = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1866
1866
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1867
1867
  !u && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1868
- ] }), x = d === "left" ? "right" : "left", v = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: c }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: c });
1869
- return u ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: x, children: v }) : v;
1870
- }
1871
- const It = {
1872
- info: Be,
1873
- success: Ae,
1874
- warning: Se,
1875
- error: Re
1868
+ ] }), v = d === "left" ? "right" : "left", _ = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: c }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: c });
1869
+ return u ? /* @__PURE__ */ e.jsx(Ke, { content: s, position: v, children: _ }) : _;
1870
+ }
1871
+ const Bt = {
1872
+ info: Ae,
1873
+ success: Se,
1874
+ warning: Re,
1875
+ error: Te
1876
1876
  };
1877
- function Gs({
1877
+ function Xs({
1878
1878
  children: t,
1879
1879
  variant: s = "info",
1880
1880
  action: n,
@@ -1883,7 +1883,7 @@ function Gs({
1883
1883
  role: r,
1884
1884
  ...i
1885
1885
  }) {
1886
- const l = It[s], u = r || (s === "error" ? "alert" : "status");
1886
+ const l = Bt[s], u = r || (s === "error" ? "alert" : "status");
1887
1887
  return /* @__PURE__ */ e.jsxs(
1888
1888
  "div",
1889
1889
  {
@@ -1916,7 +1916,7 @@ function Gs({
1916
1916
  }
1917
1917
  );
1918
1918
  }
1919
- function Xs({
1919
+ function Js({
1920
1920
  trigger: t,
1921
1921
  items: s = [],
1922
1922
  open: n,
@@ -1926,96 +1926,96 @@ function Xs({
1926
1926
  style: i,
1927
1927
  ...l
1928
1928
  }) {
1929
- const [u, d] = A(!1), [m, p] = A(!1), h = n !== void 0, c = h ? n : u, x = T(null), v = T(null), g = T(null), w = T(null), [k, j] = A({}), E = T(null), M = 150, L = () => {
1929
+ const [u, d] = A(!1), [m, p] = A(!1), h = n !== void 0, c = h ? n : u, v = R(null), _ = R(null), g = R(null), y = R(null), [k, j] = A({}), S = R(null), M = 150, D = () => {
1930
1930
  if (h)
1931
1931
  a == null || a(!1);
1932
1932
  else {
1933
1933
  if (m) return;
1934
- p(!0), E.current = setTimeout(() => {
1934
+ p(!0), S.current = setTimeout(() => {
1935
1935
  d(!1), p(!1);
1936
1936
  }, M);
1937
1937
  }
1938
- }, W = () => {
1939
- const _ = !c;
1940
- h ? a == null || a(_) : _ ? (clearTimeout(E.current), p(!1), d(!0)) : L();
1941
1938
  }, H = () => {
1942
- c || (h ? a == null || a(!0) : (clearTimeout(E.current), p(!1), d(!0)));
1939
+ const x = !c;
1940
+ h ? a == null || a(x) : x ? (clearTimeout(S.current), p(!1), d(!0)) : D();
1941
+ }, q = () => {
1942
+ c || (h ? a == null || a(!0) : (clearTimeout(S.current), p(!1), d(!0)));
1943
1943
  };
1944
- D(() => () => clearTimeout(E.current), []), D(() => {
1944
+ B(() => () => clearTimeout(S.current), []), B(() => {
1945
1945
  if (!c) return;
1946
- const _ = 300, y = () => {
1947
- var X;
1948
- const S = (X = x.current) == null ? void 0 : X.getBoundingClientRect();
1949
- if (!S) return;
1950
- const C = window.innerHeight - S.bottom, K = C < _ + 8 && S.top > C;
1946
+ const x = 300, b = () => {
1947
+ var G;
1948
+ const E = (G = v.current) == null ? void 0 : G.getBoundingClientRect();
1949
+ if (!E) return;
1950
+ const L = window.innerHeight - E.bottom, U = L < x + 8 && E.top > L;
1951
1951
  j(
1952
- o === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
1952
+ o === "right" ? U ? { bottom: window.innerHeight - E.top + 4, top: "auto", right: window.innerWidth - E.right } : { top: E.bottom + 4, bottom: "auto", right: window.innerWidth - E.right } : U ? { bottom: window.innerHeight - E.top + 4, top: "auto", left: E.left } : { top: E.bottom + 4, bottom: "auto", left: E.left }
1953
1953
  );
1954
1954
  };
1955
- return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1956
- window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1955
+ return b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
1956
+ window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
1957
1957
  };
1958
1958
  }, [c, o]);
1959
- const z = () => {
1960
- var y;
1961
- const _ = (y = g.current) == null ? void 0 : y.querySelector(
1959
+ const W = () => {
1960
+ var b;
1961
+ const x = (b = g.current) == null ? void 0 : b.querySelector(
1962
1962
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1963
1963
  );
1964
- _ == null || _.focus();
1964
+ x == null || x.focus();
1965
1965
  };
1966
- D(() => {
1966
+ B(() => {
1967
1967
  if (!c) return;
1968
- const _ = (S) => {
1969
- var C, K;
1970
- !((C = x.current) != null && C.contains(S.target)) && !((K = v.current) != null && K.contains(S.target)) && L();
1971
- }, y = (S) => {
1972
- S.key === "Escape" && (L(), z());
1968
+ const x = (E) => {
1969
+ var L, U;
1970
+ !((L = v.current) != null && L.contains(E.target)) && !((U = _.current) != null && U.contains(E.target)) && D();
1971
+ }, b = (E) => {
1972
+ E.key === "Escape" && (D(), W());
1973
1973
  };
1974
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", y), () => {
1975
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", y);
1974
+ return document.addEventListener("mousedown", x), document.addEventListener("keydown", b), () => {
1975
+ document.removeEventListener("mousedown", x), document.removeEventListener("keydown", b);
1976
1976
  };
1977
- }, [c]), D(() => {
1978
- if (!c || !w.current || !v.current) return;
1979
- const _ = b(), y = w.current === "last" ? _[_.length - 1] : _[0];
1980
- y == null || y.focus(), w.current = null;
1977
+ }, [c]), B(() => {
1978
+ if (!c || !y.current || !_.current) return;
1979
+ const x = w(), b = y.current === "last" ? x[x.length - 1] : x[0];
1980
+ b == null || b.focus(), y.current = null;
1981
1981
  }, [c]);
1982
- const b = () => v.current ? [...v.current.querySelectorAll(
1982
+ const w = () => _.current ? [..._.current.querySelectorAll(
1983
1983
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1984
- )] : [], I = (_) => {
1985
- var y, S;
1986
- if (_.key === "ArrowDown")
1987
- _.preventDefault(), c ? (y = b()[0]) == null || y.focus() : (w.current = "first", H());
1988
- else if (_.key === "ArrowUp")
1989
- if (_.preventDefault(), !c)
1990
- w.current = "last", H();
1984
+ )] : [], O = (x) => {
1985
+ var b, E;
1986
+ if (x.key === "ArrowDown")
1987
+ x.preventDefault(), c ? (b = w()[0]) == null || b.focus() : (y.current = "first", q());
1988
+ else if (x.key === "ArrowUp")
1989
+ if (x.preventDefault(), !c)
1990
+ y.current = "last", q();
1991
1991
  else {
1992
- const C = b();
1993
- (S = C[C.length - 1]) == null || S.focus();
1992
+ const L = w();
1993
+ (E = L[L.length - 1]) == null || E.focus();
1994
1994
  }
1995
- }, O = (_) => {
1996
- var C, K, X, R;
1997
- const y = b(), S = y.findIndex((f) => f === document.activeElement);
1998
- switch (_.key) {
1995
+ }, K = (x) => {
1996
+ var L, U, G, T;
1997
+ const b = w(), E = b.findIndex((f) => f === document.activeElement);
1998
+ switch (x.key) {
1999
1999
  case "ArrowDown":
2000
- _.preventDefault(), (C = y[Math.min(S + 1, y.length - 1)]) == null || C.focus();
2000
+ x.preventDefault(), (L = b[Math.min(E + 1, b.length - 1)]) == null || L.focus();
2001
2001
  break;
2002
2002
  case "ArrowUp":
2003
- _.preventDefault(), S <= 0 ? z() : (K = y[S - 1]) == null || K.focus();
2003
+ x.preventDefault(), E <= 0 ? W() : (U = b[E - 1]) == null || U.focus();
2004
2004
  break;
2005
2005
  case "Home":
2006
- _.preventDefault(), (X = y[0]) == null || X.focus();
2006
+ x.preventDefault(), (G = b[0]) == null || G.focus();
2007
2007
  break;
2008
2008
  case "End":
2009
- _.preventDefault(), (R = y[y.length - 1]) == null || R.focus();
2009
+ x.preventDefault(), (T = b[b.length - 1]) == null || T.focus();
2010
2010
  break;
2011
2011
  case "Tab":
2012
- L();
2012
+ D();
2013
2013
  break;
2014
2014
  }
2015
- }, U = c && /* @__PURE__ */ e.jsx(
2015
+ }, C = c && /* @__PURE__ */ e.jsx(
2016
2016
  "div",
2017
2017
  {
2018
- ref: v,
2018
+ ref: _,
2019
2019
  role: "menu",
2020
2020
  "data-ds-portal": "",
2021
2021
  className: [
@@ -2024,36 +2024,36 @@ function Xs({
2024
2024
  m && "ds-dropdown__menu--closing"
2025
2025
  ].filter(Boolean).join(" "),
2026
2026
  style: k,
2027
- onKeyDown: O,
2028
- children: s.map((_, y) => {
2029
- if (_.separator)
2030
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
2031
- if (_.type === "section")
2027
+ onKeyDown: K,
2028
+ children: s.map((x, b) => {
2029
+ if (x.separator)
2030
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, b);
2031
+ if (x.type === "section")
2032
2032
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2033
- _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
2034
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
2035
- ] }, y);
2036
- const S = !!_.href, C = S ? "a" : "button", K = S ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
2033
+ x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
2034
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
2035
+ ] }, b);
2036
+ const E = !!x.href, L = E ? "a" : "button", U = E ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
2037
2037
  return /* @__PURE__ */ e.jsxs(
2038
- C,
2038
+ L,
2039
2039
  {
2040
2040
  role: "menuitem",
2041
2041
  className: [
2042
2042
  "ds-dropdown__item",
2043
- _.danger && "ds-dropdown__item--danger"
2043
+ x.danger && "ds-dropdown__item--danger"
2044
2044
  ].filter(Boolean).join(" "),
2045
- ...K,
2045
+ ...U,
2046
2046
  onClick: () => {
2047
- var X;
2048
- (X = _.onClick) == null || X.call(_), L();
2047
+ var G;
2048
+ (G = x.onClick) == null || G.call(x), D();
2049
2049
  },
2050
2050
  children: [
2051
- _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
2052
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
2053
- _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
2051
+ x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
2052
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
2053
+ x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
2054
2054
  ]
2055
2055
  },
2056
- y
2056
+ b
2057
2057
  );
2058
2058
  })
2059
2059
  }
@@ -2061,7 +2061,7 @@ function Xs({
2061
2061
  return /* @__PURE__ */ e.jsxs(
2062
2062
  "div",
2063
2063
  {
2064
- ref: x,
2064
+ ref: v,
2065
2065
  className: ["ds-dropdown", r].filter(Boolean).join(" "),
2066
2066
  style: i,
2067
2067
  ...l,
@@ -2071,17 +2071,17 @@ function Xs({
2071
2071
  {
2072
2072
  ref: g,
2073
2073
  className: "ds-dropdown__trigger",
2074
- onClick: W,
2075
- onKeyDown: I,
2074
+ onClick: H,
2075
+ onKeyDown: O,
2076
2076
  children: t
2077
2077
  }
2078
2078
  ),
2079
- typeof document < "u" && he.createPortal(U, document.body)
2079
+ typeof document < "u" && pe.createPortal(C, document.body)
2080
2080
  ]
2081
2081
  }
2082
2082
  );
2083
2083
  }
2084
- function Js({
2084
+ function Zs({
2085
2085
  value: t = 0,
2086
2086
  size: s = "m",
2087
2087
  variant: n = "default",
@@ -2118,11 +2118,11 @@ function Js({
2118
2118
  }
2119
2119
  );
2120
2120
  }
2121
- const Lt = (t) => 1 - Math.pow(1 - t, 3), Pt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2122
- function Mt(t, { duration: s = 600 } = {}) {
2123
- const [n, a] = A(t), o = T(t), r = T(null);
2124
- return D(() => {
2125
- if (Pt()) {
2121
+ const Dt = (t) => 1 - Math.pow(1 - t, 3), Lt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2122
+ function Pt(t, { duration: s = 600 } = {}) {
2123
+ const [n, a] = A(t), o = R(t), r = R(null);
2124
+ return B(() => {
2125
+ if (Lt()) {
2126
2126
  a(t), o.current = t;
2127
2127
  return;
2128
2128
  }
@@ -2132,24 +2132,24 @@ function Mt(t, { duration: s = 600 } = {}) {
2132
2132
  const d = (m) => {
2133
2133
  u || (u = m);
2134
2134
  const p = Math.min((m - u) / s, 1);
2135
- a(i + l * Lt(p)), p < 1 ? r.current = requestAnimationFrame(d) : o.current = t;
2135
+ a(i + l * Dt(p)), p < 1 ? r.current = requestAnimationFrame(d) : o.current = t;
2136
2136
  };
2137
2137
  return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
2138
2138
  }, [t, s]), n;
2139
2139
  }
2140
- function Zs({
2140
+ function Qs({
2141
2141
  value: t,
2142
2142
  duration: s = 600,
2143
2143
  decimals: n = 0,
2144
2144
  prefix: a = "",
2145
2145
  suffix: o = ""
2146
2146
  }) {
2147
- const i = Mt(t, { duration: s }).toFixed(n);
2147
+ const i = Pt(t, { duration: s }).toFixed(n);
2148
2148
  return `${a}${i}${o}`;
2149
2149
  }
2150
- function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2151
- const a = T(null), [o, r] = A(!1);
2152
- return D(() => {
2150
+ function Mt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2151
+ const a = R(null), [o, r] = A(!1);
2152
+ return B(() => {
2153
2153
  const i = a.current;
2154
2154
  if (!i) return;
2155
2155
  const l = new IntersectionObserver(
@@ -2161,7 +2161,7 @@ function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2161
2161
  return l.observe(i), () => l.disconnect();
2162
2162
  }, [t, s, n]), { ref: a, inView: o };
2163
2163
  }
2164
- function Qs({
2164
+ function en({
2165
2165
  children: t,
2166
2166
  as: s = "div",
2167
2167
  once: n = !1,
@@ -2171,31 +2171,31 @@ function Qs({
2171
2171
  onLeave: i,
2172
2172
  ...l
2173
2173
  }) {
2174
- const { ref: u, inView: d } = zt({ threshold: a, rootMargin: o, once: n }), m = T(!1);
2175
- return D(() => {
2174
+ const { ref: u, inView: d } = Mt({ threshold: a, rootMargin: o, once: n }), m = R(!1);
2175
+ return B(() => {
2176
2176
  d && !m.current && (r == null || r()), !d && m.current && (i == null || i()), m.current = d;
2177
2177
  }, [d]), /* @__PURE__ */ e.jsx(s, { ref: u, ...l, children: typeof t == "function" ? t(d) : t });
2178
2178
  }
2179
- const We = {
2180
- default: Be,
2181
- success: Ae,
2182
- warning: Se,
2183
- error: Re
2179
+ const Fe = {
2180
+ default: Ae,
2181
+ success: Se,
2182
+ warning: Re,
2183
+ error: Te
2184
2184
  };
2185
- let pe = [];
2186
- const ke = /* @__PURE__ */ new Set();
2187
- function Xe() {
2188
- ke.forEach((t) => t([...pe]));
2185
+ let me = [];
2186
+ const ye = /* @__PURE__ */ new Set();
2187
+ function Ge() {
2188
+ ye.forEach((t) => t([...me]));
2189
2189
  }
2190
- function Ct(t) {
2191
- pe = [...pe, t], Xe();
2190
+ function zt(t) {
2191
+ me = [...me, t], Ge();
2192
2192
  }
2193
2193
  function Ot(t) {
2194
- pe = pe.filter((s) => s.id !== t), Xe();
2194
+ me = me.filter((s) => s.id !== t), Ge();
2195
2195
  }
2196
- function en() {
2196
+ function tn() {
2197
2197
  const t = (s, n = {}) => {
2198
- Ct({
2198
+ zt({
2199
2199
  id: `${Date.now()}-${Math.random()}`,
2200
2200
  message: s,
2201
2201
  type: "default",
@@ -2205,13 +2205,13 @@ function en() {
2205
2205
  };
2206
2206
  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 };
2207
2207
  }
2208
- function Ft({ data: t, onDismiss: s }) {
2209
- const [n, a] = A(!1), o = T(null);
2210
- D(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
2208
+ function Ct({ data: t, onDismiss: s }) {
2209
+ const [n, a] = A(!1), o = R(null);
2210
+ B(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
2211
2211
  function r() {
2212
2212
  a(!1), setTimeout(() => s(t.id), 250);
2213
2213
  }
2214
- const i = We[t.type] ?? We.default;
2214
+ const i = Fe[t.type] ?? Fe.default;
2215
2215
  return /* @__PURE__ */ e.jsxs(
2216
2216
  "div",
2217
2217
  {
@@ -2238,19 +2238,19 @@ function Ft({ data: t, onDismiss: s }) {
2238
2238
  }
2239
2239
  );
2240
2240
  }
2241
- function tn({ position: t = "bottom-right" }) {
2242
- const [s, n] = A(() => [...pe]);
2243
- return D(() => (ke.add(n), () => ke.delete(n)), []), !s.length || typeof document > "u" ? null : he.createPortal(
2244
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(Ft, { data: a, onDismiss: Ot }, a.id)) }),
2241
+ function sn({ position: t = "bottom-right" }) {
2242
+ const [s, n] = A(() => [...me]);
2243
+ return B(() => (ye.add(n), () => ye.delete(n)), []), !s.length || typeof document > "u" ? null : pe.createPortal(
2244
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(Ct, { data: a, onDismiss: Ot }, a.id)) }),
2245
2245
  document.body
2246
2246
  );
2247
2247
  }
2248
- const Wt = {
2249
- running: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "info", children: "Running..." }),
2250
- success: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "success", children: "Done" }),
2251
- error: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "error", children: "Error" })
2248
+ const Ft = {
2249
+ running: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "info", children: "Running..." }),
2250
+ success: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "success", children: "Done" }),
2251
+ error: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "error", children: "Error" })
2252
2252
  };
2253
- function sn({
2253
+ function nn({
2254
2254
  label: t,
2255
2255
  status: s = "idle",
2256
2256
  icon: n,
@@ -2265,7 +2265,7 @@ function sn({
2265
2265
  const m = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2266
2266
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2267
2267
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2268
- Wt[s],
2268
+ Ft[s],
2269
2269
  a
2270
2270
  ] });
2271
2271
  return l ? /* @__PURE__ */ e.jsx(
@@ -2274,7 +2274,7 @@ function sn({
2274
2274
  className: ["ds-tool-card", m && "ds-tool-card--running", u].filter(Boolean).join(" "),
2275
2275
  ...d,
2276
2276
  children: /* @__PURE__ */ e.jsx(
2277
- De,
2277
+ Ie,
2278
2278
  {
2279
2279
  title: p,
2280
2280
  padding: "s",
@@ -2294,7 +2294,7 @@ function sn({
2294
2294
  }
2295
2295
  );
2296
2296
  }
2297
- function Ut({
2297
+ function Wt({
2298
2298
  text: t,
2299
2299
  size: s = "xs",
2300
2300
  timeout: n = 800,
@@ -2312,36 +2312,36 @@ function Ut({
2312
2312
  variant: "ghost",
2313
2313
  size: s,
2314
2314
  state: r ? "success" : "idle",
2315
- icon: /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5 }),
2315
+ icon: /* @__PURE__ */ e.jsx(ot, { size: P[1], strokeWidth: 1.5 }),
2316
2316
  "aria-label": a,
2317
2317
  onClick: l,
2318
2318
  ...o
2319
2319
  }
2320
2320
  );
2321
2321
  }
2322
- function nn({ content: t, streaming: s = !1, ...n }) {
2322
+ function rn({ content: t, streaming: s = !1, ...n }) {
2323
2323
  const [a, o] = A(s);
2324
- return D(() => {
2324
+ return B(() => {
2325
2325
  o(!!s);
2326
2326
  }, [s]), /* @__PURE__ */ e.jsx(
2327
- De,
2327
+ Ie,
2328
2328
  {
2329
2329
  expanded: a,
2330
2330
  onToggle: o,
2331
2331
  padding: "s",
2332
2332
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2333
- /* @__PURE__ */ e.jsx(lt, { size: P[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2334
- /* @__PURE__ */ e.jsx(jt, { secondary: !0, children: "Thinking" })
2333
+ /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2334
+ /* @__PURE__ */ e.jsx(bt, { secondary: !0, children: "Thinking" })
2335
2335
  ] }),
2336
2336
  ...n,
2337
- children: /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2337
+ children: /* @__PURE__ */ e.jsxs(He, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2338
2338
  t,
2339
2339
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2340
2340
  ] })
2341
2341
  }
2342
2342
  );
2343
2343
  }
2344
- function rn({
2344
+ function an({
2345
2345
  count: t,
2346
2346
  current: s = 0,
2347
2347
  done: n = [],
@@ -2368,19 +2368,19 @@ function rn({
2368
2368
  "aria-label": `Step ${d + 1}`,
2369
2369
  disabled: !h || d === s,
2370
2370
  onClick: () => a == null ? void 0 : a(d),
2371
- children: p ? /* @__PURE__ */ e.jsx(Te, { size: 8, strokeWidth: 3 }) : null
2371
+ children: p ? /* @__PURE__ */ e.jsx($e, { size: 8, strokeWidth: 3 }) : null
2372
2372
  },
2373
2373
  d
2374
2374
  );
2375
2375
  }) }),
2376
- o && /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, className: "ds-step-indicator__counter", children: [
2376
+ o && /* @__PURE__ */ e.jsxs(He, { secondary: !0, className: "ds-step-indicator__counter", children: [
2377
2377
  s + 1,
2378
2378
  " / ",
2379
2379
  t
2380
2380
  ] })
2381
2381
  ] });
2382
2382
  }
2383
- function an({
2383
+ function on({
2384
2384
  content: t,
2385
2385
  isStreaming: s = !1,
2386
2386
  cursor: n = "line",
@@ -2388,15 +2388,15 @@ function an({
2388
2388
  className: o = "",
2389
2389
  ...r
2390
2390
  }) {
2391
- const i = T(t);
2392
- return D(() => {
2391
+ const i = R(t);
2392
+ return B(() => {
2393
2393
  t !== i.current && (a == null || a(t), i.current = t);
2394
2394
  }, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...r, children: [
2395
2395
  t,
2396
2396
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2397
2397
  ] });
2398
2398
  }
2399
- function on({
2399
+ function ln({
2400
2400
  role: t = "assistant",
2401
2401
  header: s,
2402
2402
  footer: n,
@@ -2423,9 +2423,9 @@ function on({
2423
2423
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2424
2424
  ] });
2425
2425
  }
2426
- function ln(t, { containerRef: s, smartPause: n = !0 } = {}) {
2427
- const a = T(!1), o = T(0);
2428
- D(() => {
2426
+ function cn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2427
+ const a = R(!1), o = R(0);
2428
+ B(() => {
2429
2429
  const r = s == null ? void 0 : s.current;
2430
2430
  if (!r) return;
2431
2431
  const i = () => {
@@ -2433,12 +2433,12 @@ function ln(t, { containerRef: s, smartPause: n = !0 } = {}) {
2433
2433
  !l && r.scrollTop < o.current && (a.current = !0), l && (a.current = !1), o.current = r.scrollTop;
2434
2434
  };
2435
2435
  return r.addEventListener("scroll", i, { passive: !0 }), () => r.removeEventListener("scroll", i);
2436
- }, [s]), D(() => {
2436
+ }, [s]), B(() => {
2437
2437
  const r = s == null ? void 0 : s.current;
2438
2438
  r && (n && a.current || (r.scrollTop = r.scrollHeight));
2439
2439
  }, t);
2440
2440
  }
2441
- function Vt({
2441
+ function Ut({
2442
2442
  prompts: t,
2443
2443
  enabled: s,
2444
2444
  typingSpeed: n = 38,
@@ -2447,36 +2447,36 @@ function Vt({
2447
2447
  betweenTime: r = 380,
2448
2448
  manualPauseMs: i = 5e3
2449
2449
  }) {
2450
- const [l, u] = A(0), [d, m] = A(""), p = T("typing"), h = T(0), c = T(0), x = T(null), v = T(0);
2451
- D(() => {
2450
+ const [l, u] = A(0), [d, m] = A(""), p = R("typing"), h = R(0), c = R(0), v = R(null), _ = R(0);
2451
+ B(() => {
2452
2452
  c.current = l;
2453
- }, [l]), D(() => {
2454
- if (x.current && (clearTimeout(x.current), x.current = null), !s || t.length === 0) {
2453
+ }, [l]), B(() => {
2454
+ if (v.current && (clearTimeout(v.current), v.current = null), !s || t.length === 0) {
2455
2455
  m(""), h.current = 0, p.current = "typing";
2456
2456
  return;
2457
2457
  }
2458
- const E = () => {
2458
+ const S = () => {
2459
2459
  const M = Date.now();
2460
- if (v.current > M) {
2461
- x.current = setTimeout(E, v.current - M);
2460
+ if (_.current > M) {
2461
+ v.current = setTimeout(S, _.current - M);
2462
2462
  return;
2463
2463
  }
2464
- const L = t[c.current % t.length] ?? "";
2465
- p.current === "typing" ? (h.current += 1, m(L.slice(0, h.current)), h.current >= L.length ? (p.current = "holding", x.current = setTimeout(E, o)) : x.current = setTimeout(E, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(E, a)) : (h.current = Math.max(0, h.current - 1), m(L.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % t.length, u(c.current), x.current = setTimeout(E, r)) : x.current = setTimeout(E, a));
2464
+ const D = t[c.current % t.length] ?? "";
2465
+ p.current === "typing" ? (h.current += 1, m(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", v.current = setTimeout(S, o)) : v.current = setTimeout(S, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(S, a)) : (h.current = Math.max(0, h.current - 1), m(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % t.length, u(c.current), v.current = setTimeout(S, r)) : v.current = setTimeout(S, a));
2466
2466
  };
2467
- return x.current = setTimeout(E, 260), () => {
2468
- x.current && clearTimeout(x.current);
2467
+ return v.current = setTimeout(S, 260), () => {
2468
+ v.current && clearTimeout(v.current);
2469
2469
  };
2470
2470
  }, [s, t, n, a, o, r]);
2471
- const g = (E) => {
2471
+ const g = (S) => {
2472
2472
  if (t.length === 0) return;
2473
- const M = (E % t.length + t.length) % t.length, L = t[M];
2474
- c.current = M, h.current = L.length, p.current = "holding", v.current = Date.now() + i, u(M), m(L);
2475
- }, w = () => g(c.current + 1), k = () => g(c.current - 1), j = t[l % t.length] ?? "";
2476
- return { displayed: d, currentPrompt: j, index: l, next: w, prev: k };
2473
+ const M = (S % t.length + t.length) % t.length, D = t[M];
2474
+ c.current = M, h.current = D.length, p.current = "holding", _.current = Date.now() + i, u(M), m(D);
2475
+ }, y = () => g(c.current + 1), k = () => g(c.current - 1), j = t[l % t.length] ?? "";
2476
+ return { displayed: d, currentPrompt: j, index: l, next: y, prev: k };
2477
2477
  }
2478
- let Yt = 0;
2479
- function cn({
2478
+ let Vt = 0;
2479
+ function dn({
2480
2480
  value: t = "",
2481
2481
  onChange: s,
2482
2482
  onSubmit: n,
@@ -2491,71 +2491,71 @@ function cn({
2491
2491
  onAttachFiles: p,
2492
2492
  onAttachImages: h,
2493
2493
  onRemoveAttachment: c,
2494
- onRemoveImage: x,
2495
- acceptImage: v,
2494
+ onRemoveImage: v,
2495
+ acceptImage: _,
2496
2496
  acceptFile: g,
2497
- maxImages: w,
2497
+ maxImages: y,
2498
2498
  maxImageSize: k,
2499
2499
  leftSlot: j,
2500
- rightSlot: E,
2500
+ rightSlot: S,
2501
2501
  className: M = "",
2502
- ...L
2502
+ ...D
2503
2503
  }) {
2504
- const W = T(null), H = T(null), z = T(0), [b, I] = A(!1), [O, U] = A([]), _ = (N) => {
2505
- const B = ++Yt;
2506
- U((G) => [...G, { id: B, msg: N }]), setTimeout(() => U((G) => G.filter((J) => J.id !== B)), 6e3);
2507
- }, y = (N) => U((B) => B.filter((G) => G.id !== N)), S = (N) => N.type.startsWith("image/"), C = () => !0, K = v ?? S, X = g ?? C, R = (N) => {
2508
- const B = [], G = [], J = [], Z = [];
2509
- let te = 0, de = w != null ? w - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2504
+ const H = R(null), q = R(null), W = R(0), [w, O] = A(!1), [K, C] = A([]), x = (N) => {
2505
+ const I = ++Vt;
2506
+ C((X) => [...X, { id: I, msg: N }]), setTimeout(() => C((X) => X.filter((J) => J.id !== I)), 6e3);
2507
+ }, b = (N) => C((I) => I.filter((X) => X.id !== N)), E = (N) => N.type.startsWith("image/"), L = () => !0, U = _ ?? E, G = g ?? L, T = (N) => {
2508
+ const I = [], X = [], J = [], Z = [];
2509
+ let te = 0, ce = y != null ? y - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2510
2510
  for (const se of N)
2511
- K(se) ? k && se.size > k ? J.push(se.name) : de > 0 ? (B.push(se), de--) : te++ : X(se) ? G.push(se) : Z.push(se.name);
2512
- return { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te };
2511
+ U(se) ? k && se.size > k ? J.push(se.name) : ce > 0 ? (I.push(se), ce--) : te++ : G(se) ? X.push(se) : Z.push(se.name);
2512
+ return { imageFiles: I, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te };
2513
2513
  }, f = (N) => {
2514
- const { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te } = R(N);
2515
- J.length && _(`File${J.length > 1 ? "s" : ""} too large${k ? ` (max ${k / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && _(`Max ${w} images per message`), h && B.length && h(B);
2516
- const de = G.concat(h ? [] : B);
2517
- p && de.length && p(de);
2514
+ const { imageFiles: I, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te } = T(N);
2515
+ J.length && x(`File${J.length > 1 ? "s" : ""} too large${k ? ` (max ${k / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && x(`Max ${y} images per message`), h && I.length && h(I);
2516
+ const ce = X.concat(h ? [] : I);
2517
+ p && ce.length && p(ce);
2518
2518
  };
2519
- D(() => {
2520
- const N = H.current;
2519
+ B(() => {
2520
+ const N = q.current;
2521
2521
  N && (N.style.height = "auto", N.style.height = `${Math.min(N.scrollHeight, 200)}px`);
2522
- }, [t]), D(() => {
2523
- const N = (B) => {
2522
+ }, [t]), B(() => {
2523
+ const N = (I) => {
2524
2524
  var J, Z, te;
2525
2525
  if (r || i) return;
2526
- const G = (J = B.target) == null ? void 0 : J.tagName;
2527
- G === "INPUT" || G === "TEXTAREA" || G === "SELECT" || (Z = B.target) != null && Z.isContentEditable || B.ctrlKey || B.metaKey || B.altKey || B.key.length !== 1 && B.key !== "Backspace" && B.key !== "Delete" || (te = H.current) == null || te.focus();
2526
+ const X = (J = I.target) == null ? void 0 : J.tagName;
2527
+ X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = I.target) != null && Z.isContentEditable || I.ctrlKey || I.metaKey || I.altKey || I.key.length !== 1 && I.key !== "Backspace" && I.key !== "Delete" || (te = q.current) == null || te.focus();
2528
2528
  };
2529
2529
  return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2530
2530
  }, [r, i]);
2531
2531
  const $ = (N) => {
2532
- N.preventDefault(), z.current++, N.dataTransfer.types.includes("Files") && I(!0);
2533
- }, F = (N) => {
2534
- N.preventDefault(), z.current--, z.current === 0 && I(!1);
2535
- }, V = (N) => N.preventDefault(), ne = (N) => {
2536
- N.preventDefault(), z.current = 0, I(!1);
2537
- const B = Array.from(N.dataTransfer.files);
2538
- B.length && f(B);
2532
+ N.preventDefault(), W.current++, N.dataTransfer.types.includes("Files") && O(!0);
2533
+ }, z = (N) => {
2534
+ N.preventDefault(), W.current--, W.current === 0 && O(!1);
2535
+ }, F = (N) => N.preventDefault(), ne = (N) => {
2536
+ N.preventDefault(), W.current = 0, O(!1);
2537
+ const I = Array.from(N.dataTransfer.files);
2538
+ I.length && f(I);
2539
2539
  }, oe = (N) => {
2540
- const B = Array.from(N.target.files || []);
2541
- W.current && (W.current.value = ""), B.length && f(B);
2542
- }, q = (N) => {
2540
+ const I = Array.from(N.target.files || []);
2541
+ H.current && (H.current.value = ""), I.length && f(I);
2542
+ }, Y = (N) => {
2543
2543
  var se;
2544
2544
  if (!h) return;
2545
- const B = (se = N.clipboardData) == null ? void 0 : se.items;
2546
- if (!B) return;
2547
- const G = [];
2548
- for (const Ze of B) {
2549
- const Le = Ze.getAsFile();
2550
- Le && G.push(Le);
2545
+ const I = (se = N.clipboardData) == null ? void 0 : se.items;
2546
+ if (!I) return;
2547
+ const X = [];
2548
+ for (const Je of I) {
2549
+ const De = Je.getAsFile();
2550
+ De && X.push(De);
2551
2551
  }
2552
- if (G.length === 0) return;
2553
- const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: de } = R(G);
2554
- Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && _(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), de && _(`Max ${w} images per message`), J.length && (N.preventDefault(), h(J));
2555
- }, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie = Vt({
2552
+ if (X.length === 0) return;
2553
+ const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ce } = T(X);
2554
+ Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && x(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ce && x(`Max ${y} images per message`), J.length && (N.preventDefault(), h(J));
2555
+ }, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie = Ut({
2556
2556
  prompts: u ?? [],
2557
2557
  enabled: Q
2558
- }), Ne = (N) => {
2558
+ }), je = (N) => {
2559
2559
  if (Q) {
2560
2560
  if (N.key === "ArrowDown" || N.key === "ArrowRight") {
2561
2561
  N.preventDefault(), ie.next();
@@ -2571,12 +2571,12 @@ function cn({
2571
2571
  }
2572
2572
  }
2573
2573
  o == null || o(N);
2574
- }, Je = (t.trim() || (m == null ? void 0 : m.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Ie = p || h;
2575
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...L, children: [
2576
- Ie && /* @__PURE__ */ e.jsx(
2574
+ }, Xe = (t.trim() || (m == null ? void 0 : m.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Be = p || h;
2575
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...D, children: [
2576
+ Be && /* @__PURE__ */ e.jsx(
2577
2577
  "input",
2578
2578
  {
2579
- ref: W,
2579
+ ref: H,
2580
2580
  type: "file",
2581
2581
  multiple: !0,
2582
2582
  accept: "*/*",
@@ -2587,21 +2587,21 @@ function cn({
2587
2587
  /* @__PURE__ */ e.jsxs(
2588
2588
  "div",
2589
2589
  {
2590
- className: ["ds-prompt-input__box", b && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2590
+ className: ["ds-prompt-input__box", w && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2591
2591
  onDragEnter: $,
2592
- onDragLeave: F,
2593
- onDragOver: V,
2592
+ onDragLeave: z,
2593
+ onDragOver: F,
2594
2594
  onDrop: ne,
2595
2595
  children: [
2596
- b && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2596
+ w && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2597
2597
  /* @__PURE__ */ e.jsx(
2598
2598
  "textarea",
2599
2599
  {
2600
- ref: H,
2600
+ ref: q,
2601
2601
  value: t,
2602
2602
  onChange: (N) => s == null ? void 0 : s(N.target.value),
2603
- onKeyDown: Ne,
2604
- onPaste: q,
2603
+ onKeyDown: je,
2604
+ onPaste: Y,
2605
2605
  placeholder: Q ? "" : l,
2606
2606
  disabled: r || i,
2607
2607
  rows: 1,
@@ -2612,68 +2612,68 @@ function cn({
2612
2612
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2613
2613
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2614
2614
  ] }),
2615
- m && m.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: m.map((N, B) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2615
+ m && m.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: m.map((N, I) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2616
2616
  /* @__PURE__ */ e.jsx("img", { src: N.preview, alt: "" }),
2617
2617
  /* @__PURE__ */ e.jsx(
2618
2618
  "button",
2619
2619
  {
2620
2620
  className: "ds-prompt-input__image-remove",
2621
- onClick: () => x == null ? void 0 : x(B),
2621
+ onClick: () => v == null ? void 0 : v(I),
2622
2622
  "aria-label": "Remove image",
2623
2623
  type: "button",
2624
2624
  children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
2625
2625
  }
2626
2626
  )
2627
- ] }, B)) }),
2628
- O.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: O.map((N) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2627
+ ] }, I)) }),
2628
+ K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((N) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2629
2629
  /* @__PURE__ */ e.jsx("span", { children: N.msg }),
2630
2630
  /* @__PURE__ */ e.jsx(
2631
2631
  "button",
2632
2632
  {
2633
2633
  type: "button",
2634
2634
  className: "ds-prompt-input__warning-close",
2635
- onClick: () => y(N.id),
2635
+ onClick: () => b(N.id),
2636
2636
  "aria-label": "Dismiss",
2637
2637
  children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
2638
2638
  }
2639
2639
  )
2640
2640
  ] }, N.id)) }),
2641
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((N, B) => /* @__PURE__ */ e.jsx(ue, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2642
- N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Pe, { size: P[1], strokeWidth: 1.5 }),
2641
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((N, I) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2642
+ N.uploading ? /* @__PURE__ */ e.jsx(lt, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Le, { size: P[1], strokeWidth: 1.5 }),
2643
2643
  N.filename,
2644
2644
  N.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2645
2645
  "button",
2646
2646
  {
2647
2647
  type: "button",
2648
2648
  className: "ds-prompt-input__remove-btn",
2649
- onClick: () => c == null ? void 0 : c(B),
2649
+ onClick: () => c == null ? void 0 : c(I),
2650
2650
  children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
2651
2651
  }
2652
2652
  )
2653
- ] }) }, B)) }),
2653
+ ] }) }, I)) }),
2654
2654
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2655
- Ie && /* @__PURE__ */ e.jsx(
2655
+ Be && /* @__PURE__ */ e.jsx(
2656
2656
  ae,
2657
2657
  {
2658
2658
  variant: "ghost",
2659
2659
  size: "xs",
2660
- icon: /* @__PURE__ */ e.jsx(Pe, { size: P[2], strokeWidth: 1.5 }),
2660
+ icon: /* @__PURE__ */ e.jsx(Le, { size: P[2], strokeWidth: 1.5 }),
2661
2661
  "aria-label": "Attach files",
2662
2662
  onClick: () => {
2663
2663
  var N;
2664
- return (N = W.current) == null ? void 0 : N.click();
2664
+ return (N = H.current) == null ? void 0 : N.click();
2665
2665
  }
2666
2666
  }
2667
2667
  ),
2668
2668
  j,
2669
- E,
2669
+ S,
2670
2670
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2671
2671
  r ? /* @__PURE__ */ e.jsx(
2672
2672
  ae,
2673
2673
  {
2674
2674
  variant: "primary",
2675
2675
  size: "xs",
2676
- icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
2676
+ icon: /* @__PURE__ */ e.jsx(ct, { size: P[2], strokeWidth: 1.5 }),
2677
2677
  onClick: a,
2678
2678
  "aria-label": "Stop"
2679
2679
  }
@@ -2682,9 +2682,9 @@ function cn({
2682
2682
  {
2683
2683
  variant: "primary",
2684
2684
  size: "xs",
2685
- icon: /* @__PURE__ */ e.jsx(ut, { size: P[2], strokeWidth: 1.5 }),
2685
+ icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
2686
2686
  onClick: n,
2687
- disabled: !Je,
2687
+ disabled: !Xe,
2688
2688
  "aria-label": "Send"
2689
2689
  }
2690
2690
  )
@@ -2694,8 +2694,8 @@ function cn({
2694
2694
  )
2695
2695
  ] });
2696
2696
  }
2697
- const Ue = { fast: 0, standard: 1, premium: 2 }, Ve = { fast: "data-5", standard: "data-3", premium: "data-6" };
2698
- function dn({
2697
+ const We = { fast: 0, standard: 1, premium: 2 }, Ue = { fast: "data-5", standard: "data-3", premium: "data-6" };
2698
+ function un({
2699
2699
  models: t = [],
2700
2700
  value: s,
2701
2701
  onChange: n,
@@ -2706,58 +2706,58 @@ function dn({
2706
2706
  className: l = "",
2707
2707
  ...u
2708
2708
  }) {
2709
- const [d, m] = A(!1), p = T(null), h = T(null), c = T(null), [x, v] = A({}), g = t.filter((b) => !o || b.name === "auto" ? !0 : (Ue[b.tier] ?? 1) >= (Ue[o] ?? 1)), w = g.find((b) => b.name === "auto"), k = g.filter((b) => b.name !== "auto"), j = t.find((b) => b.name === s), M = new Set(k.map((b) => b.tier).filter(Boolean)).size > 1;
2710
- D(() => {
2709
+ const [d, m] = A(!1), p = R(null), h = R(null), c = R(null), [v, _] = A({}), g = t.filter((w) => !o || w.name === "auto" ? !0 : (We[w.tier] ?? 1) >= (We[o] ?? 1)), y = g.find((w) => w.name === "auto"), k = g.filter((w) => w.name !== "auto"), j = t.find((w) => w.name === s), M = new Set(k.map((w) => w.tier).filter(Boolean)).size > 1;
2710
+ B(() => {
2711
2711
  if (!d) return;
2712
- const b = 320, I = () => {
2713
- var C;
2714
- const _ = (C = h.current) == null ? void 0 : C.getBoundingClientRect();
2715
- if (!_) return;
2716
- const y = window.innerHeight - _.bottom, S = y < b + 8 && _.top > y;
2717
- v({
2712
+ const w = 320, O = () => {
2713
+ var L;
2714
+ const x = (L = h.current) == null ? void 0 : L.getBoundingClientRect();
2715
+ if (!x) return;
2716
+ const b = window.innerHeight - x.bottom, E = b < w + 8 && x.top > b;
2717
+ _({
2718
2718
  position: "fixed",
2719
2719
  zIndex: "var(--z-dropdown, 500)",
2720
- left: _.left,
2721
- ...S ? { bottom: window.innerHeight - _.top + 4, top: "auto" } : { top: _.bottom + 4, bottom: "auto" }
2720
+ left: x.left,
2721
+ ...E ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
2722
2722
  });
2723
2723
  };
2724
- I(), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I);
2725
- const O = (_) => {
2726
- var y, S;
2727
- !((y = p.current) != null && y.contains(_.target)) && !((S = c.current) != null && S.contains(_.target)) && m(!1);
2728
- }, U = (_) => {
2729
- _.key === "Escape" && m(!1);
2724
+ O(), window.addEventListener("scroll", O, !0), window.addEventListener("resize", O);
2725
+ const K = (x) => {
2726
+ var b, E;
2727
+ !((b = p.current) != null && b.contains(x.target)) && !((E = c.current) != null && E.contains(x.target)) && m(!1);
2728
+ }, C = (x) => {
2729
+ x.key === "Escape" && m(!1);
2730
2730
  };
2731
- return document.addEventListener("mousedown", O), document.addEventListener("keydown", U), () => {
2732
- window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I), document.removeEventListener("mousedown", O), document.removeEventListener("keydown", U);
2731
+ return document.addEventListener("mousedown", K), document.addEventListener("keydown", C), () => {
2732
+ window.removeEventListener("scroll", O, !0), window.removeEventListener("resize", O), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", C);
2733
2733
  };
2734
2734
  }, [d]);
2735
- const L = (b) => {
2736
- n == null || n(b), m(!1);
2737
- }, W = (b) => /* @__PURE__ */ e.jsxs(
2735
+ const D = (w) => {
2736
+ n == null || n(w), m(!1);
2737
+ }, H = (w) => /* @__PURE__ */ e.jsxs(
2738
2738
  "button",
2739
2739
  {
2740
2740
  type: "button",
2741
2741
  className: [
2742
2742
  "ds-model-picker__item",
2743
- b.name === s && "ds-model-picker__item--active"
2743
+ w.name === s && "ds-model-picker__item--active"
2744
2744
  ].filter(Boolean).join(" "),
2745
- onClick: () => L(b.name),
2745
+ onClick: () => D(w.name),
2746
2746
  children: [
2747
- b.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: b.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2748
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: b.displayName || b.name }),
2749
- M && b.tier && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[b.tier] || "default", children: b.tier })
2747
+ w.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: w.icon }) : /* @__PURE__ */ e.jsx(Pe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2748
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: w.displayName || w.name }),
2749
+ M && w.tier && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Ue[w.tier] || "default", children: w.tier })
2750
2750
  ]
2751
2751
  },
2752
- b.name
2753
- ), H = () => !i || !M ? k.map(W) : ["fast", "standard", "premium"].flatMap((b) => {
2754
- const I = k.filter((O) => O.tier === b);
2755
- return I.length ? [
2756
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": b, children: b.charAt(0).toUpperCase() + b.slice(1) }, `lbl-${b}`),
2757
- ...I.map(W)
2752
+ w.name
2753
+ ), q = () => !i || !M ? k.map(H) : ["fast", "standard", "premium"].flatMap((w) => {
2754
+ const O = k.filter((K) => K.tier === w);
2755
+ return O.length ? [
2756
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": w, children: w.charAt(0).toUpperCase() + w.slice(1) }, `lbl-${w}`),
2757
+ ...O.map(H)
2758
2758
  ] : [];
2759
- }), z = d && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2760
- r && w && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2759
+ }), W = d && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
2760
+ r && y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2761
2761
  /* @__PURE__ */ e.jsxs(
2762
2762
  "button",
2763
2763
  {
@@ -2767,16 +2767,16 @@ function dn({
2767
2767
  "ds-model-picker__item--auto",
2768
2768
  s === "auto" && "ds-model-picker__item--active"
2769
2769
  ].filter(Boolean).join(" "),
2770
- onClick: () => L("auto"),
2770
+ onClick: () => D("auto"),
2771
2771
  children: [
2772
- /* @__PURE__ */ e.jsx(ft, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2772
+ /* @__PURE__ */ e.jsx(ut, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2773
2773
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2774
2774
  ]
2775
2775
  }
2776
2776
  ),
2777
2777
  k.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2778
2778
  ] }),
2779
- H()
2779
+ q()
2780
2780
  ] });
2781
2781
  return /* @__PURE__ */ e.jsxs(
2782
2782
  "div",
@@ -2791,54 +2791,54 @@ function dn({
2791
2791
  ref: h,
2792
2792
  type: "button",
2793
2793
  className: "ds-model-picker__trigger",
2794
- onClick: () => m((b) => !b),
2794
+ onClick: () => m((w) => !w),
2795
2795
  "aria-haspopup": "listbox",
2796
2796
  "aria-expanded": d,
2797
2797
  children: [
2798
- j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5 }),
2798
+ j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(Pe, { size: 12, strokeWidth: 1.5 }),
2799
2799
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (j == null ? void 0 : j.displayName) || (j == null ? void 0 : j.name) || s }),
2800
- M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[j.tier] || "default", children: j.tier })
2800
+ M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Ue[j.tier] || "default", children: j.tier })
2801
2801
  ]
2802
2802
  }
2803
2803
  ),
2804
- typeof document < "u" && he.createPortal(z, document.body)
2804
+ typeof document < "u" && pe.createPortal(W, document.body)
2805
2805
  ]
2806
2806
  }
2807
2807
  );
2808
2808
  }
2809
- const qt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2809
+ const Yt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2810
2810
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
2811
- s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(s) })
2811
+ s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ke(s) })
2812
2812
  ] });
2813
- function Ee(t) {
2813
+ function ke(t) {
2814
2814
  return t != null && t.length ? "p. " + t.join(", ") : null;
2815
2815
  }
2816
- function Ht(t) {
2816
+ function qt(t) {
2817
2817
  const s = /* @__PURE__ */ new Map();
2818
2818
  for (const n of t)
2819
2819
  s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
2820
2820
  return [...s.values()];
2821
2821
  }
2822
- function un({
2822
+ function fn({
2823
2823
  sources: t = [],
2824
2824
  layout: s = "list",
2825
2825
  title: n = "Sources",
2826
2826
  maxVisible: a = 5,
2827
2827
  onSourceClick: o
2828
2828
  }) {
2829
- const [r, i] = A(!1), l = Ht(t), u = l.length > a, d = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2829
+ const [r, i] = A(!1), l = qt(t), u = l.length > a, d = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2830
2830
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2831
2831
  d.map((h) => {
2832
- const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2832
+ const c = h.items.map((_) => _.page).filter(Boolean), v = !!o;
2833
2833
  return /* @__PURE__ */ e.jsxs(
2834
2834
  "div",
2835
2835
  {
2836
- className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2837
- onClick: x ? () => o(h.items[0]) : void 0,
2836
+ className: `ds-sources-panel__compact-row${v ? " ds-sources-panel__compact-row--clickable" : ""}`,
2837
+ onClick: v ? () => o(h.items[0]) : void 0,
2838
2838
  children: [
2839
- /* @__PURE__ */ e.jsx(mt, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2839
+ /* @__PURE__ */ e.jsx(ft, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2840
2840
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2841
- c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
2841
+ c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ke(c) })
2842
2842
  ]
2843
2843
  },
2844
2844
  h.filename
@@ -2852,18 +2852,18 @@ function un({
2852
2852
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2853
2853
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2854
2854
  d.map((h) => {
2855
- const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2855
+ const c = h.items.map((_) => _.page).filter(Boolean), v = !!o;
2856
2856
  return m ? /* @__PURE__ */ e.jsx(
2857
- De,
2857
+ Ie,
2858
2858
  {
2859
- title: /* @__PURE__ */ e.jsx(qt, { filename: h.filename, pages: c }),
2859
+ title: /* @__PURE__ */ e.jsx(Yt, { filename: h.filename, pages: c }),
2860
2860
  padding: "s",
2861
- children: h.items.map((v, g) => /* @__PURE__ */ e.jsx(
2861
+ children: h.items.map((_, g) => /* @__PURE__ */ e.jsx(
2862
2862
  "div",
2863
2863
  {
2864
- className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2865
- onClick: x ? () => o(v) : void 0,
2866
- children: v.snippet ?? `p. ${v.page}`
2864
+ className: `ds-sources-panel__snippet${v ? " ds-sources-panel__snippet--clickable" : ""}`,
2865
+ onClick: v ? () => o(_) : void 0,
2866
+ children: _.snippet ?? `p. ${_.page}`
2867
2867
  },
2868
2868
  g
2869
2869
  ))
@@ -2872,11 +2872,11 @@ function un({
2872
2872
  ) : /* @__PURE__ */ e.jsxs(
2873
2873
  "div",
2874
2874
  {
2875
- className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
2876
- onClick: x ? () => o(h.items[0]) : void 0,
2875
+ className: `ds-sources-panel__row${v ? " ds-sources-panel__row--clickable" : ""}`,
2876
+ onClick: v ? () => o(h.items[0]) : void 0,
2877
2877
  children: [
2878
2878
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2879
- c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
2879
+ c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ke(c) })
2880
2880
  ]
2881
2881
  },
2882
2882
  h.filename
@@ -2889,10 +2889,10 @@ function un({
2889
2889
  ] })
2890
2890
  ] });
2891
2891
  }
2892
- function Ye(t) {
2892
+ function Ve(t) {
2893
2893
  return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
2894
2894
  }
2895
- function fn({
2895
+ function mn({
2896
2896
  used: t,
2897
2897
  limit: s,
2898
2898
  size: n = "s",
@@ -2919,9 +2919,9 @@ function fn({
2919
2919
  ) }),
2920
2920
  (a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
2921
2921
  a && /* @__PURE__ */ e.jsxs("span", { children: [
2922
- Ye(t),
2922
+ Ve(t),
2923
2923
  " / ",
2924
- Ye(s),
2924
+ Ve(s),
2925
2925
  " tokens"
2926
2926
  ] }),
2927
2927
  o && /* @__PURE__ */ e.jsxs("span", { children: [
@@ -2933,24 +2933,24 @@ function fn({
2933
2933
  }
2934
2934
  );
2935
2935
  }
2936
- const qe = 5;
2937
- function Kt(t) {
2936
+ const Ye = 5;
2937
+ function Ht(t) {
2938
2938
  return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
2939
2939
  }
2940
- function mn({
2940
+ function pn({
2941
2941
  value: t = 0,
2942
2942
  size: s = "xs",
2943
2943
  showLabel: n = "none",
2944
2944
  layout: a = "inline"
2945
2945
  }) {
2946
- const o = Math.max(0, Math.min(1, t)), r = Math.round(o * qe), i = Kt(o);
2946
+ const o = Math.max(0, Math.min(1, t)), r = Math.round(o * Ye), i = Ht(o);
2947
2947
  return /* @__PURE__ */ e.jsxs("div", { className: [
2948
2948
  "ds-confidence-bar",
2949
2949
  `ds-confidence-bar--${s}`,
2950
2950
  `ds-confidence-bar--${i}`,
2951
2951
  a === "block" && "ds-confidence-bar--block"
2952
2952
  ].filter(Boolean).join(" "), children: [
2953
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: qe }, (l, u) => /* @__PURE__ */ e.jsx(
2953
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Ye }, (l, u) => /* @__PURE__ */ e.jsx(
2954
2954
  "div",
2955
2955
  {
2956
2956
  className: `ds-confidence-bar__seg${u < r ? " ds-confidence-bar__seg--filled" : ""}`
@@ -2960,15 +2960,15 @@ function mn({
2960
2960
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
2961
2961
  ] });
2962
2962
  }
2963
- const Gt = { add: "+", remove: "-", context: " " };
2964
- function ge({ line: t, lineNumbers: s }) {
2963
+ const Kt = { add: "+", remove: "-", context: " " };
2964
+ function Ne({ line: t, lineNumbers: s }) {
2965
2965
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
2966
2966
  s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
2967
- /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Gt[t.type] }),
2967
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Kt[t.type] }),
2968
2968
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
2969
2969
  ] });
2970
2970
  }
2971
- function pn({
2971
+ function hn({
2972
2972
  lines: t = [],
2973
2973
  layout: s = "inline",
2974
2974
  wordWrap: n = !1,
@@ -2986,17 +2986,17 @@ function pn({
2986
2986
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2987
2987
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2988
2988
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
2989
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) }),
2990
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) })
2989
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((m, p) => /* @__PURE__ */ e.jsx(Ne, { line: m, lineNumbers: a }, p)) }),
2990
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((m, p) => /* @__PURE__ */ e.jsx(Ne, { line: m, lineNumbers: a }, p)) })
2991
2991
  ] })
2992
2992
  ] });
2993
2993
  }
2994
2994
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2995
2995
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2996
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((u, d) => /* @__PURE__ */ e.jsx(ge, { line: u, lineNumbers: a }, d)) })
2996
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((u, d) => /* @__PURE__ */ e.jsx(Ne, { line: u, lineNumbers: a }, d)) })
2997
2997
  ] });
2998
2998
  }
2999
- function Xt({
2999
+ function Gt({
3000
3000
  value: t = "idle",
3001
3001
  onLike: s,
3002
3002
  onDislike: n,
@@ -3026,7 +3026,7 @@ function Xt({
3026
3026
  "aria-label": "Like",
3027
3027
  "aria-pressed": t === "liked",
3028
3028
  children: /* @__PURE__ */ e.jsx(
3029
- pt,
3029
+ mt,
3030
3030
  {
3031
3031
  size: P[1],
3032
3032
  strokeWidth: 1.5,
@@ -3047,7 +3047,7 @@ function Xt({
3047
3047
  "aria-label": "Dislike",
3048
3048
  "aria-pressed": t === "disliked",
3049
3049
  children: /* @__PURE__ */ e.jsx(
3050
- ht,
3050
+ pt,
3051
3051
  {
3052
3052
  size: P[1],
3053
3053
  strokeWidth: 1.5,
@@ -3060,7 +3060,7 @@ function Xt({
3060
3060
  }
3061
3061
  );
3062
3062
  }
3063
- function Jt(t) {
3063
+ function Xt(t) {
3064
3064
  const s = t instanceof Date ? t : new Date(t);
3065
3065
  if (isNaN(s)) return null;
3066
3066
  const n = /* @__PURE__ */ new Date(), a = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(o - 864e5);
@@ -3069,7 +3069,7 @@ function Jt(t) {
3069
3069
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3070
3070
  return `${i} ${l} ${a}`;
3071
3071
  }
3072
- function hn({
3072
+ function xn({
3073
3073
  role: t = "assistant",
3074
3074
  text: s,
3075
3075
  timestamp: n,
@@ -3079,7 +3079,7 @@ function hn({
3079
3079
  className: i = "",
3080
3080
  ...l
3081
3081
  }) {
3082
- const u = t === "assistant" && (o || r), d = !!s, m = n ? Jt(n) : null;
3082
+ const u = t === "assistant" && (o || r), d = !!s, m = n ? Xt(n) : null;
3083
3083
  return !u && !d && !m ? null : /* @__PURE__ */ e.jsxs(
3084
3084
  "div",
3085
3085
  {
@@ -3087,20 +3087,20 @@ function hn({
3087
3087
  ...l,
3088
3088
  children: [
3089
3089
  t === "user" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m }),
3090
- u && /* @__PURE__ */ e.jsx(Xt, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
3091
- d && /* @__PURE__ */ e.jsx(Ut, { className: "ds-message-action", text: s }),
3090
+ u && /* @__PURE__ */ e.jsx(Gt, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
3091
+ d && /* @__PURE__ */ e.jsx(Wt, { className: "ds-message-action", text: s }),
3092
3092
  t === "assistant" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m })
3093
3093
  ]
3094
3094
  }
3095
3095
  );
3096
3096
  }
3097
- function xn({ label: t, className: s = "", ...n }) {
3097
+ function vn({ label: t, className: s = "", ...n }) {
3098
3098
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
3099
3099
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
3100
3100
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3101
3101
  ] });
3102
3102
  }
3103
- function vn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3103
+ function _n({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3104
3104
  const r = t === "dark", i = s ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", u = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3105
3105
  return /* @__PURE__ */ e.jsx(
3106
3106
  "div",
@@ -3141,7 +3141,7 @@ function vn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3141
3141
  }
3142
3142
  );
3143
3143
  }
3144
- function _n({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
3144
+ function bn({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
3145
3145
  const r = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3146
3146
  return /* @__PURE__ */ e.jsx(
3147
3147
  "div",
@@ -3153,39 +3153,39 @@ function _n({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
3153
3153
  }
3154
3154
  );
3155
3155
  }
3156
- const we = 280, le = 22, ce = 8, be = 6, Zt = 200;
3157
- function Qt(t) {
3156
+ const we = 280, Jt = 22, Zt = 14, le = 8, _e = 6, Qt = 200;
3157
+ function es(t) {
3158
3158
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3159
3159
  }
3160
- function es(t, s, n) {
3161
- const a = window.innerWidth, o = window.innerHeight;
3162
- if (o - t.bottom >= s + le + ce) return "bottom";
3163
- if (t.top >= s + le + ce) return "top";
3164
- if (a - t.right >= n + le + ce) return "right";
3165
- if (t.left >= n + le + ce) return "left";
3166
- const r = Math.max(t.top, o - t.bottom, a - t.right, t.left);
3167
- return r === o - t.bottom ? "bottom" : r === t.top ? "top" : r === a - t.right ? "right" : "left";
3168
- }
3169
3160
  function ts(t, s, n, a) {
3170
3161
  const o = window.innerWidth, r = window.innerHeight;
3171
- let i, l;
3162
+ if (r - t.bottom >= s + a + le) return "bottom";
3163
+ if (t.top >= s + a + le) return "top";
3164
+ if (o - t.right >= n + a + le) return "right";
3165
+ if (t.left >= n + a + le) return "left";
3166
+ const i = Math.max(t.top, r - t.bottom, o - t.right, t.left);
3167
+ return i === r - t.bottom ? "bottom" : i === t.top ? "top" : i === o - t.right ? "right" : "left";
3168
+ }
3169
+ function ss(t, s, n, a, o) {
3170
+ const r = window.innerWidth, i = window.innerHeight;
3171
+ let l, u;
3172
3172
  switch (t) {
3173
3173
  case "top":
3174
- i = s.top - n - le, l = s.left + s.width / 2 - a / 2;
3174
+ l = s.top - n - o, u = s.left + s.width / 2 - a / 2;
3175
3175
  break;
3176
3176
  case "bottom":
3177
- i = s.bottom + le, l = s.left + s.width / 2 - a / 2;
3177
+ l = s.bottom + o, u = s.left + s.width / 2 - a / 2;
3178
3178
  break;
3179
3179
  case "left":
3180
- i = s.top + s.height / 2 - n / 2, l = s.left - a - le;
3180
+ l = s.top + s.height / 2 - n / 2, u = s.left - a - o;
3181
3181
  break;
3182
3182
  default:
3183
- i = s.top + s.height / 2 - n / 2, l = s.right + le;
3183
+ l = s.top + s.height / 2 - n / 2, u = s.right + o;
3184
3184
  }
3185
- const u = Math.max(ce, Math.min(o - a - ce, l));
3186
- return { top: Math.max(ce, Math.min(r - n - ce, i)), left: u, arrowOffset: l - u };
3185
+ const d = Math.max(le, Math.min(r - a - le, u));
3186
+ return { top: Math.max(le, Math.min(i - n - le, l)), left: d, arrowOffset: u - d };
3187
3187
  }
3188
- function bn({
3188
+ function jn({
3189
3189
  steps: t,
3190
3190
  currentStep: s,
3191
3191
  onNext: n,
@@ -3193,98 +3193,102 @@ function bn({
3193
3193
  onSkip: o,
3194
3194
  onFinish: r,
3195
3195
  overlay: i = !0,
3196
- labelNext: l = "Next",
3197
- labelBack: u = "Back",
3198
- labelSkip: d = "Skip tour",
3199
- labelFinish: m = "Done"
3196
+ ring: l = !0,
3197
+ labelNext: u = "Next",
3198
+ labelBack: d = "Back",
3199
+ labelSkip: m = "Skip tour",
3200
+ labelFinish: p = "Done",
3201
+ statePrimary: h = "idle",
3202
+ stateBack: c = "idle"
3200
3203
  }) {
3201
- const p = T(null), h = T(t), c = T(s);
3202
- h.current = t, c.current = s;
3203
- const [x, v] = A(!1), [g, w] = A({ position: "fixed", visibility: "hidden", width: we }), [k, j] = A("bottom"), [E, M] = A(null), L = T(!1), W = t[s], H = s === t.length - 1, z = He(() => {
3204
- const b = h.current[c.current];
3205
- if (!b || !p.current) return;
3206
- const I = Qt(b.target);
3207
- if (!I) return;
3208
- const O = I.getBoundingClientRect(), _ = p.current.getBoundingClientRect().height || 160, y = we, S = b.position || es(O, _, y), { top: C, left: K, arrowOffset: X } = ts(S, O, _, y);
3209
- j(S), w({
3204
+ const v = R(null), _ = R(t), g = R(s), y = R(l);
3205
+ _.current = t, g.current = s, y.current = l;
3206
+ const [k, j] = A(!1), [S, M] = A({ position: "fixed", visibility: "hidden", width: we }), [D, H] = A("bottom"), [q, W] = A(null), w = R(!1), O = t[s], K = s === t.length - 1, C = qe(() => {
3207
+ const x = _.current[g.current];
3208
+ if (!x || !v.current) return;
3209
+ const b = es(x.target);
3210
+ if (!b) return;
3211
+ const E = b.getBoundingClientRect(), U = v.current.getBoundingClientRect().height || 160, G = we, T = y.current ? Jt : Zt, f = x.position || ts(E, U, G, T), { top: $, left: z, arrowOffset: F } = ss(f, E, U, G, T);
3212
+ H(f), M({
3210
3213
  position: "fixed",
3211
- top: C,
3212
- left: K,
3214
+ top: $,
3215
+ left: z,
3213
3216
  width: we,
3214
3217
  visibility: "visible",
3215
- "--arrow-offset": `${X}px`
3216
- }), M({
3217
- top: O.top - be,
3218
- left: O.left - be,
3219
- width: O.width + be * 2,
3220
- height: O.height + be * 2
3218
+ "--arrow-offset": `${F}px`
3219
+ }), W({
3220
+ top: E.top - _e,
3221
+ left: E.left - _e,
3222
+ width: E.width + _e * 2,
3223
+ height: E.height + _e * 2
3221
3224
  });
3222
3225
  }, []);
3223
- return D(() => {
3224
- window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
3225
- const b = requestAnimationFrame(() => {
3226
- z(), v(!0), L.current = !0;
3226
+ return B(() => {
3227
+ window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
3228
+ const x = requestAnimationFrame(() => {
3229
+ C(), j(!0), w.current = !0;
3227
3230
  });
3228
3231
  return () => {
3229
- cancelAnimationFrame(b), window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z);
3232
+ cancelAnimationFrame(x), window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
3230
3233
  };
3231
- }, []), D(() => {
3232
- if (!L.current) return;
3233
- v(!1);
3234
- const b = setTimeout(() => {
3235
- w((I) => ({ ...I, visibility: "hidden" })), requestAnimationFrame(() => {
3236
- z(), v(!0);
3234
+ }, []), B(() => {
3235
+ if (!w.current) return;
3236
+ j(!1);
3237
+ const x = setTimeout(() => {
3238
+ M((b) => ({ ...b, visibility: "hidden" })), requestAnimationFrame(() => {
3239
+ C(), j(!0);
3237
3240
  });
3238
- }, Zt + 20);
3239
- return () => clearTimeout(b);
3240
- }, [s]), D(() => {
3241
- x && p.current && p.current.focus({ preventScroll: !0 });
3242
- }, [x]), D(() => {
3243
- const b = (I) => {
3244
- I.key === "Escape" && o();
3241
+ }, Qt + 20);
3242
+ return () => clearTimeout(x);
3243
+ }, [s]), B(() => {
3244
+ k && v.current && v.current.focus({ preventScroll: !0 });
3245
+ }, [k]), B(() => {
3246
+ const x = (b) => {
3247
+ b.key === "Escape" && o();
3245
3248
  };
3246
- return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
3247
- }, [o]), D(() => {
3248
- if (!x) return;
3249
- const b = (I) => {
3250
- if (I.key !== "Tab" || !p.current) return;
3251
- const O = Array.from(
3252
- p.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3249
+ return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
3250
+ }, [o]), B(() => {
3251
+ if (!k) return;
3252
+ const x = (b) => {
3253
+ if (b.key !== "Tab" || !v.current) return;
3254
+ const E = Array.from(
3255
+ v.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3253
3256
  );
3254
- if (!O.length) return;
3255
- const U = O[0], _ = O[O.length - 1];
3256
- I.shiftKey && document.activeElement === U ? (I.preventDefault(), _.focus()) : !I.shiftKey && document.activeElement === _ && (I.preventDefault(), U.focus());
3257
+ if (!E.length) return;
3258
+ const L = E[0], U = E[E.length - 1];
3259
+ b.shiftKey && document.activeElement === L ? (b.preventDefault(), U.focus()) : !b.shiftKey && document.activeElement === U && (b.preventDefault(), L.focus());
3257
3260
  };
3258
- return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
3259
- }, [x]), !W || typeof document > "u" ? null : he.createPortal(
3261
+ return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
3262
+ }, [k]), !O || typeof document > "u" ? null : pe.createPortal(
3260
3263
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3261
- E && /* @__PURE__ */ e.jsx(
3264
+ q && /* @__PURE__ */ e.jsx(
3262
3265
  "div",
3263
3266
  {
3264
3267
  className: [
3265
3268
  "ds-coachmark__spotlight",
3266
3269
  i && "ds-coachmark__spotlight--overlay",
3267
- x && "ds-coachmark__spotlight--visible"
3270
+ !l && "ds-coachmark__spotlight--no-ring",
3271
+ k && "ds-coachmark__spotlight--visible"
3268
3272
  ].filter(Boolean).join(" "),
3269
- style: E,
3273
+ style: q,
3270
3274
  "aria-hidden": "true"
3271
3275
  }
3272
3276
  ),
3273
3277
  /* @__PURE__ */ e.jsxs(
3274
3278
  "div",
3275
3279
  {
3276
- ref: p,
3280
+ ref: v,
3277
3281
  "data-ds-portal": "",
3278
3282
  role: "dialog",
3279
3283
  "aria-modal": "false",
3280
3284
  "aria-live": "polite",
3281
- "aria-label": W.title ?? `Step ${s + 1} of ${t.length}`,
3285
+ "aria-label": O.title ?? `Step ${s + 1} of ${t.length}`,
3282
3286
  className: [
3283
3287
  "ds-coachmark__bubble",
3284
- `ds-coachmark__bubble--${k}`,
3285
- x && "ds-coachmark__bubble--visible"
3288
+ `ds-coachmark__bubble--${D}`,
3289
+ k && "ds-coachmark__bubble--visible"
3286
3290
  ].filter(Boolean).join(" "),
3287
- style: g,
3291
+ style: S,
3288
3292
  tabIndex: -1,
3289
3293
  children: [
3290
3294
  /* @__PURE__ */ e.jsx(
@@ -3293,21 +3297,21 @@ function bn({
3293
3297
  type: "button",
3294
3298
  className: "ds-coachmark__close",
3295
3299
  onClick: o,
3296
- "aria-label": d,
3300
+ "aria-label": m,
3297
3301
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3298
3302
  }
3299
3303
  ),
3300
- W.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: W.title }),
3301
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: W.content }),
3304
+ O.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: O.title }),
3305
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: O.content }),
3302
3306
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3303
- /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3307
+ t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3304
3308
  s + 1,
3305
3309
  " / ",
3306
3310
  t.length
3307
3311
  ] }),
3308
3312
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3309
- s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", onClick: a, children: u }),
3310
- /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", onClick: H ? r : n, children: H ? m : l })
3313
+ s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: c, onClick: a, children: d }),
3314
+ /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? r : n, children: K ? p : u })
3311
3315
  ] })
3312
3316
  ] })
3313
3317
  ]
@@ -3317,8 +3321,8 @@ function bn({
3317
3321
  document.body
3318
3322
  );
3319
3323
  }
3320
- function jn(t, s = {}) {
3321
- const { storageKey: n } = s, [a, o] = A(0), [r, i] = A(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", u = He(() => {
3324
+ function Nn(t, s = {}) {
3325
+ const { storageKey: n } = s, [a, o] = A(0), [r, i] = A(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", u = qe(() => {
3322
3326
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3323
3327
  }, [n]);
3324
3328
  return {
@@ -3334,92 +3338,92 @@ function jn(t, s = {}) {
3334
3338
  };
3335
3339
  }
3336
3340
  export {
3337
- De as Accordion,
3338
- hs as Alert,
3339
- Zs as AnimatedNumber,
3340
- Es as Avatar,
3341
- ue as Badge,
3342
- Gs as Banner,
3343
- vs as BottomSheet,
3344
- Ms as Breadcrumb,
3341
+ Ie as Accordion,
3342
+ xs as Alert,
3343
+ Qs as AnimatedNumber,
3344
+ $s as Avatar,
3345
+ de as Badge,
3346
+ Xs as Banner,
3347
+ _s as BottomSheet,
3348
+ zs as Breadcrumb,
3345
3349
  ae as Button,
3346
- cs as Card,
3347
- on as ChatMessage,
3348
- ys as Checkbox,
3349
- bn as Coachmark,
3350
- _s as Code,
3351
- yt as CodeAccordion,
3352
- mn as ConfidenceBar,
3353
- Ut as CopyButton,
3354
- pn as DiffView,
3350
+ ds as Card,
3351
+ ln as ChatMessage,
3352
+ ks as Checkbox,
3353
+ jn as Coachmark,
3354
+ bs as Code,
3355
+ gt as CodeAccordion,
3356
+ pn as ConfidenceBar,
3357
+ Wt as CopyButton,
3358
+ hn as DiffView,
3355
3359
  Cs as Drawer,
3356
3360
  Oe as DrawerFooter,
3357
- Xs as Dropdown,
3358
- Is as EmptyState,
3359
- vn as EngineerGrid,
3360
- Ls as FormField,
3361
- ds as H1,
3362
- us as H2,
3363
- fs as H3,
3364
- ms as H4,
3365
- Qs as InView,
3366
- as as Input,
3367
- bs as Link,
3368
- Xt as MessageFeedback,
3369
- hn as MessageFooter,
3370
- xs as Modal,
3371
- me as ModalFooter,
3372
- dn as ModelPicker,
3373
- Fs as NavRail,
3374
- Ks as NavRailAgent,
3375
- Us as NavRailBody,
3376
- qs as NavRailDivider,
3377
- Ys as NavRailFooter,
3378
- Vs as NavRailHeader,
3379
- Ws as NavRailItem,
3380
- Hs as NavRailRecents,
3381
- ps as P1,
3382
- jt as P2,
3383
- Ke as P3,
3384
- zs as Pagination,
3385
- Js as ProgressBar,
3386
- cn as PromptInput,
3387
- ks as Radio,
3388
- nn as ReasoningBlock,
3389
- _n as Scrollable,
3361
+ Js as Dropdown,
3362
+ Ls as EmptyState,
3363
+ _n as EngineerGrid,
3364
+ Ps as FormField,
3365
+ us as H1,
3366
+ fs as H2,
3367
+ ms as H3,
3368
+ ps as H4,
3369
+ en as InView,
3370
+ os as Input,
3371
+ js as Link,
3372
+ Gt as MessageFeedback,
3373
+ xn as MessageFooter,
3374
+ vs as Modal,
3375
+ fe as ModalFooter,
3376
+ un as ModelPicker,
3377
+ Ws as NavRail,
3378
+ Gs as NavRailAgent,
3379
+ Vs as NavRailBody,
3380
+ Hs as NavRailDivider,
3381
+ qs as NavRailFooter,
3382
+ Ys as NavRailHeader,
3383
+ Us as NavRailItem,
3384
+ Ks as NavRailRecents,
3385
+ hs as P1,
3386
+ bt as P2,
3387
+ He as P3,
3388
+ Os as Pagination,
3389
+ Zs as ProgressBar,
3390
+ dn as PromptInput,
3391
+ Es as Radio,
3392
+ rn as ReasoningBlock,
3393
+ bn as Scrollable,
3390
3394
  gs as SegmentedControl,
3391
- is as Select,
3392
- Os as SidePage,
3393
- Fe as SidePageFooter,
3394
- $t as Skeleton,
3395
- un as SourcesPanel,
3396
- _t as Spinner,
3397
- Ps as Stat,
3398
- rn as StepIndicator,
3399
- ls as Stepper,
3400
- an as StreamingText,
3401
- Ns as Tab,
3402
- $s as Table,
3403
- Rs as TableBody,
3404
- Ts as TableHead,
3405
- Ss as TableRow,
3406
- As as TableSubheaderRow,
3407
- js as Tabs,
3395
+ ls as Select,
3396
+ Fs as SidePage,
3397
+ Ce as SidePageFooter,
3398
+ Et as Skeleton,
3399
+ fn as SourcesPanel,
3400
+ vt as Spinner,
3401
+ Ms as Stat,
3402
+ an as StepIndicator,
3403
+ cs as Stepper,
3404
+ on as StreamingText,
3405
+ ws as Tab,
3406
+ Ts as Table,
3407
+ Ss as TableBody,
3408
+ Rs as TableHead,
3409
+ As as TableRow,
3410
+ Is as TableSubheaderRow,
3411
+ Ns as Tabs,
3408
3412
  Ds as Td,
3409
- os as Textarea,
3413
+ is as Textarea,
3410
3414
  Bs as Th,
3411
- xn as ThinkingDot,
3412
- tn as ToastContainer,
3413
- ws as Toggle,
3414
- fn as TokenCounter,
3415
- sn as ToolCallBubble,
3416
- sn as ToolCallCard,
3417
- Ge as Tooltip,
3415
+ vn as ThinkingDot,
3416
+ sn as ToastContainer,
3417
+ ys as Toggle,
3418
+ mn as TokenCounter,
3419
+ nn as ToolCallBubble,
3420
+ nn as ToolCallCard,
3421
+ Ke as Tooltip,
3418
3422
  P as iconSizes,
3419
- Mt as useAnimatedNumber,
3420
- Vt as useAnimatedPlaceholder,
3421
- jn as useCoachmark,
3422
- zt as useInView,
3423
- ln as useStreamScroll,
3424
- en as useToast
3423
+ Pt as useAnimatedNumber,
3424
+ Ut as useAnimatedPlaceholder,
3425
+ Nn as useCoachmark,
3426
+ Mt as useInView,
3427
+ cn as useStreamScroll,
3428
+ tn as useToast
3425
3429
  };