@donkit-ai/design-system 1.4.67 → 1.4.68

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