@donkit-ai/design-system 1.3.11 → 1.3.13

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 L, { useState as k, useRef as E, useEffect as D, useLayoutEffect as ke, useId as Ee } from "react";
2
- import { Check as re, X as ee, ChevronDown as ne, Minus as $e, Plus as ge, XCircle as de, AlertTriangle as ue, CheckCircle as fe, Info as me, ChevronUp as Re, ChevronsUpDown as Te, ChevronLeft as Ie, ChevronRight as je, Copy as Se, Brain as Ae } from "lucide-react";
3
- import ae from "react-dom";
4
- const S = {
1
+ import q, { useState as S, useRef as $, useEffect as B, useLayoutEffect as Me, useId as ze } from "react";
2
+ import { Check as he, X as ne, ChevronDown as xe, Minus as We, Plus as Fe, XCircle as Ne, AlertTriangle as we, CheckCircle as ye, Info as ge, ChevronUp as Ce, ChevronsUpDown as Ue, ChevronLeft as Ve, ChevronRight as Be, Copy as Ye, Brain as qe, Loader as He, Paperclip as Ee, Square as Ke, ArrowUp as Ge, Zap as Xe, Cpu as $e } from "lucide-react";
3
+ import me from "react-dom";
4
+ const D = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var ce = { exports: {} }, te = {};
11
+ var _e = { exports: {} }, de = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -18,10 +18,10 @@ var ce = { exports: {} }, te = {};
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
- var pe;
22
- function De() {
23
- if (pe) return te;
24
- pe = 1;
21
+ var Te;
22
+ function Je() {
23
+ if (Te) return de;
24
+ Te = 1;
25
25
  var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
26
26
  function r(o, a, n) {
27
27
  var i = null;
@@ -38,9 +38,9 @@ function De() {
38
38
  props: n
39
39
  };
40
40
  }
41
- return te.Fragment = t, te.jsx = r, te.jsxs = r, te;
41
+ return de.Fragment = t, de.jsx = r, de.jsxs = r, de;
42
42
  }
43
- var se = {};
43
+ var ue = {};
44
44
  /**
45
45
  * @license React
46
46
  * react-jsx-runtime.development.js
@@ -50,47 +50,47 @@ var se = {};
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 he;
54
- function Pe() {
55
- return he || (he = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var Re;
54
+ function Ze() {
55
+ return Re || (Re = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function s(c) {
57
57
  if (c == null) return null;
58
58
  if (typeof c == "function")
59
- return c.$$typeof === G ? null : c.displayName || c.name || null;
59
+ return c.$$typeof === H ? null : c.displayName || c.name || null;
60
60
  if (typeof c == "string") return c;
61
61
  switch (c) {
62
- case $:
62
+ case R:
63
63
  return "Fragment";
64
- case B:
64
+ case g:
65
65
  return "Profiler";
66
- case N:
66
+ case E:
67
67
  return "StrictMode";
68
- case O:
68
+ case I:
69
69
  return "Suspense";
70
- case q:
70
+ case v:
71
71
  return "SuspenseList";
72
- case V:
72
+ case Y:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof c == "object")
76
76
  switch (typeof c.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
78
  ), c.$$typeof) {
79
- case w:
79
+ case _:
80
80
  return "Portal";
81
- case g:
81
+ case k:
82
82
  return c.displayName || "Context";
83
- case T:
83
+ case A:
84
84
  return (c._context.displayName || "Context") + ".Consumer";
85
- case F:
86
- var x = c.render;
87
- return c = c.displayName, c || (c = x.displayName || x.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
88
85
  case M:
89
- return x = c.displayName || null, x !== null ? x : s(c.type) || "Memo";
90
- case W:
91
- x = c._payload, c = c._init;
86
+ var N = c.render;
87
+ return c = c.displayName, c || (c = N.displayName || N.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
88
+ case L:
89
+ return N = c.displayName || null, N !== null ? N : s(c.type) || "Memo";
90
+ case z:
91
+ N = c._payload, c = c._init;
92
92
  try {
93
- return s(c(x));
93
+ return s(c(N));
94
94
  } catch {
95
95
  }
96
96
  }
@@ -102,74 +102,74 @@ function Pe() {
102
102
  function r(c) {
103
103
  try {
104
104
  t(c);
105
- var x = !1;
105
+ var N = !1;
106
106
  } catch {
107
- x = !0;
107
+ N = !0;
108
108
  }
109
- if (x) {
110
- x = console;
111
- var y = x.error, I = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
112
- return y.call(
113
- x,
109
+ if (N) {
110
+ N = console;
111
+ var P = N.error, W = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
112
+ return P.call(
113
+ N,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
- I
115
+ W
116
116
  ), t(c);
117
117
  }
118
118
  }
119
119
  function o(c) {
120
- if (c === $) return "<>";
121
- if (typeof c == "object" && c !== null && c.$$typeof === W)
120
+ if (c === R) return "<>";
121
+ if (typeof c == "object" && c !== null && c.$$typeof === z)
122
122
  return "<...>";
123
123
  try {
124
- var x = s(c);
125
- return x ? "<" + x + ">" : "<...>";
124
+ var N = s(c);
125
+ return N ? "<" + N + ">" : "<...>";
126
126
  } catch {
127
127
  return "<...>";
128
128
  }
129
129
  }
130
130
  function a() {
131
- var c = H.A;
131
+ var c = X.A;
132
132
  return c === null ? null : c.getOwner();
133
133
  }
134
134
  function n() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(c) {
138
- if (C.call(c, "key")) {
139
- var x = Object.getOwnPropertyDescriptor(c, "key").get;
140
- if (x && x.isReactWarning) return !1;
138
+ if (U.call(c, "key")) {
139
+ var N = Object.getOwnPropertyDescriptor(c, "key").get;
140
+ if (N && N.isReactWarning) return !1;
141
141
  }
142
142
  return c.key !== void 0;
143
143
  }
144
- function l(c, x) {
145
- function y() {
146
- R || (R = !0, console.error(
144
+ function l(c, N) {
145
+ function P() {
146
+ O || (O = !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
- x
148
+ N
149
149
  ));
150
150
  }
151
- y.isReactWarning = !0, Object.defineProperty(c, "key", {
152
- get: y,
151
+ P.isReactWarning = !0, Object.defineProperty(c, "key", {
152
+ get: P,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function m() {
156
+ function p() {
157
157
  var c = s(this.type);
158
- return P[c] || (P[c] = !0, console.error(
158
+ return C[c] || (C[c] = !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
  )), c = this.props.ref, c !== void 0 ? c : null;
161
161
  }
162
- function u(c, x, y, I, K, X) {
163
- var A = y.ref;
162
+ function u(c, N, P, W, ee, ae) {
163
+ var F = P.ref;
164
164
  return c = {
165
- $$typeof: _,
165
+ $$typeof: b,
166
166
  type: c,
167
- key: x,
168
- props: y,
169
- _owner: I
170
- }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(c, "ref", {
167
+ key: N,
168
+ props: P,
169
+ _owner: W
170
+ }, (F !== void 0 ? F : null) !== null ? Object.defineProperty(c, "ref", {
171
171
  enumerable: !1,
172
- get: m
172
+ get: p
173
173
  }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -184,69 +184,69 @@ function Pe() {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: K
187
+ value: ee
188
188
  }), Object.defineProperty(c, "_debugTask", {
189
189
  configurable: !1,
190
190
  enumerable: !1,
191
191
  writable: !0,
192
- value: X
192
+ value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function p(c, x, y, I, K, X) {
196
- var A = x.children;
197
- if (A !== void 0)
198
- if (I)
199
- if (h(A)) {
200
- for (I = 0; I < A.length; I++)
201
- f(A[I]);
202
- Object.freeze && Object.freeze(A);
195
+ function m(c, N, P, W, ee, ae) {
196
+ var F = N.children;
197
+ if (F !== void 0)
198
+ if (W)
199
+ if (x(F)) {
200
+ for (W = 0; W < F.length; W++)
201
+ f(F[W]);
202
+ Object.freeze && Object.freeze(F);
203
203
  } else
204
204
  console.error(
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
- else f(A);
208
- if (C.call(x, "key")) {
209
- A = s(c);
210
- var J = Object.keys(x).filter(function(ye) {
211
- return ye !== "key";
207
+ else f(F);
208
+ if (U.call(N, "key")) {
209
+ F = s(c);
210
+ var Q = Object.keys(N).filter(function(be) {
211
+ return be !== "key";
212
212
  });
213
- I = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", j[A + I] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ W = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", w[F + W] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
217
217
  React keys must be passed directly to JSX without using spread:
218
218
  let props = %s;
219
219
  <%s key={someKey} {...props} />`,
220
- I,
221
- A,
222
- J,
223
- A
224
- ), j[A + I] = !0);
220
+ W,
221
+ F,
222
+ Q,
223
+ F
224
+ ), w[F + W] = !0);
225
225
  }
226
- if (A = null, y !== void 0 && (r(y), A = "" + y), i(x) && (r(x.key), A = "" + x.key), "key" in x) {
227
- y = {};
228
- for (var oe in x)
229
- oe !== "key" && (y[oe] = x[oe]);
230
- } else y = x;
231
- return A && l(
232
- y,
226
+ if (F = null, P !== void 0 && (r(P), F = "" + P), i(N) && (r(N.key), F = "" + N.key), "key" in N) {
227
+ P = {};
228
+ for (var oe in N)
229
+ oe !== "key" && (P[oe] = N[oe]);
230
+ } else P = N;
231
+ return F && l(
232
+ P,
233
233
  typeof c == "function" ? c.displayName || c.name || "Unknown" : c
234
234
  ), u(
235
235
  c,
236
- A,
237
- y,
236
+ F,
237
+ P,
238
238
  a(),
239
- K,
240
- X
239
+ ee,
240
+ ae
241
241
  );
242
242
  }
243
243
  function f(c) {
244
- b(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === W && (c._payload.status === "fulfilled" ? b(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
244
+ h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === z && (c._payload.status === "fulfilled" ? h(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
245
245
  }
246
- function b(c) {
247
- return typeof c == "object" && c !== null && c.$$typeof === _;
246
+ function h(c) {
247
+ return typeof c == "object" && c !== null && c.$$typeof === b;
248
248
  }
249
- var d = L, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), g = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), H = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, h = Array.isArray, v = console.createTask ? console.createTask : function() {
249
+ var d = q, b = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), k = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), X = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, y = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  d = {
@@ -254,36 +254,36 @@ React keys must be passed directly to JSX without using spread:
254
254
  return c();
255
255
  }
256
256
  };
257
- var R, P = {}, z = d.react_stack_bottom_frame.bind(
257
+ var O, C = {}, K = d.react_stack_bottom_frame.bind(
258
258
  d,
259
259
  n
260
- )(), U = v(o(n)), j = {};
261
- se.Fragment = $, se.jsx = function(c, x, y) {
262
- var I = 1e4 > H.recentlyCreatedOwnerStacks++;
263
- return p(
260
+ )(), Z = y(o(n)), w = {};
261
+ ue.Fragment = R, ue.jsx = function(c, N, P) {
262
+ var W = 1e4 > X.recentlyCreatedOwnerStacks++;
263
+ return m(
264
264
  c,
265
- x,
266
- y,
265
+ N,
266
+ P,
267
267
  !1,
268
- I ? Error("react-stack-top-frame") : z,
269
- I ? v(o(c)) : U
268
+ W ? Error("react-stack-top-frame") : K,
269
+ W ? y(o(c)) : Z
270
270
  );
271
- }, se.jsxs = function(c, x, y) {
272
- var I = 1e4 > H.recentlyCreatedOwnerStacks++;
273
- return p(
271
+ }, ue.jsxs = function(c, N, P) {
272
+ var W = 1e4 > X.recentlyCreatedOwnerStacks++;
273
+ return m(
274
274
  c,
275
- x,
276
- y,
275
+ N,
276
+ P,
277
277
  !0,
278
- I ? Error("react-stack-top-frame") : z,
279
- I ? v(o(c)) : U
278
+ W ? Error("react-stack-top-frame") : K,
279
+ W ? y(o(c)) : Z
280
280
  );
281
281
  };
282
- }()), se;
282
+ }()), ue;
283
283
  }
284
- process.env.NODE_ENV === "production" ? ce.exports = De() : ce.exports = Pe();
285
- var e = ce.exports;
286
- function Be({ size: s = "m", color: t = "default", className: r = "", ...o }) {
284
+ process.env.NODE_ENV === "production" ? _e.exports = Je() : _e.exports = Ze();
285
+ var e = _e.exports;
286
+ function Qe({ size: s = "m", color: t = "default", className: r = "", ...o }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
@@ -294,8 +294,8 @@ function Be({ size: s = "m", color: t = "default", className: r = "", ...o }) {
294
294
  }
295
295
  );
296
296
  }
297
- const Oe = { xs: 12, s: 14, m: 16, l: 20 };
298
- function _e({
297
+ const et = { xs: 12, s: 14, m: 16, l: 20 };
298
+ function fe({
299
299
  children: s,
300
300
  variant: t = "primary",
301
301
  size: r = "m",
@@ -304,60 +304,60 @@ function _e({
304
304
  disabled: n = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
- type: m = "button",
307
+ type: p = "button",
308
308
  href: u,
309
- "aria-label": p,
309
+ "aria-label": m,
310
310
  ...f
311
311
  }) {
312
- const b = a && !s, d = i === "loading", _ = i === "success", w = i === "error", $ = d || _ || w, N = r === "xs" ? "s" : "m", B = Oe[r] ?? 16, T = d ? /* @__PURE__ */ e.jsx(Be, { size: N }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: B, strokeWidth: 2.5 }) }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: B, strokeWidth: 2.5 }) }) : null, g = [
312
+ const h = a && !s, d = i === "loading", b = i === "success", _ = i === "error", R = d || b || _, E = r === "xs" ? "s" : "m", g = et[r] ?? 16, A = d ? /* @__PURE__ */ e.jsx(Qe, { size: E }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(he, { size: g, strokeWidth: 2.5 }) }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: g, strokeWidth: 2.5 }) }) : null, k = [
313
313
  "ds-button",
314
314
  `ds-button--${t}`,
315
315
  `ds-button--${r}`,
316
316
  o && "ds-button--full",
317
- b && "ds-button--icon-only"
318
- ].filter(Boolean).join(" "), F = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
319
- $ ? T : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
317
+ h && "ds-button--icon-only"
318
+ ].filter(Boolean).join(" "), M = i !== "idle" ? i : void 0, I = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
319
+ R ? A : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
320
320
  s
321
321
  ] });
322
322
  if (u) {
323
- const q = (M) => {
323
+ const v = (L) => {
324
324
  if (n || d) {
325
- M.preventDefault();
325
+ L.preventDefault();
326
326
  return;
327
327
  }
328
- M.metaKey || M.ctrlKey || M.button === 1 || (M.preventDefault(), l == null || l(M));
328
+ L.metaKey || L.ctrlKey || L.button === 1 || (L.preventDefault(), l == null || l(L));
329
329
  };
330
330
  return /* @__PURE__ */ e.jsx(
331
331
  "a",
332
332
  {
333
- className: g,
333
+ className: k,
334
334
  href: n || d ? void 0 : u,
335
- onClick: q,
336
- "aria-label": p,
335
+ onClick: v,
336
+ "aria-label": m,
337
337
  "aria-disabled": n || d ? "true" : void 0,
338
338
  "aria-busy": d ? "true" : void 0,
339
- "data-state": F,
339
+ "data-state": M,
340
340
  ...f,
341
- children: O
341
+ children: I
342
342
  }
343
343
  );
344
344
  }
345
345
  return /* @__PURE__ */ e.jsx(
346
346
  "button",
347
347
  {
348
- type: m,
349
- className: g,
348
+ type: p,
349
+ className: k,
350
350
  disabled: n,
351
351
  onClick: d ? void 0 : l,
352
- "aria-label": p,
352
+ "aria-label": m,
353
353
  "aria-busy": d ? "true" : void 0,
354
- "data-state": F,
354
+ "data-state": M,
355
355
  ...f,
356
- children: O
356
+ children: I
357
357
  }
358
358
  );
359
359
  }
360
- function lt({
360
+ function Rt({
361
361
  label: s,
362
362
  error: t,
363
363
  hint: r,
@@ -366,12 +366,12 @@ function lt({
366
366
  iconRight: n,
367
367
  onIconRightClick: i,
368
368
  size: l = "m",
369
- disabled: m,
369
+ disabled: p,
370
370
  id: u,
371
- ...p
371
+ ...m
372
372
  }) {
373
- const f = u || `input-${L.useId()}`, b = r ? `${f}-hint` : void 0, d = t ? `${f}-error` : void 0, _ = d || b;
374
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
373
+ const f = u || `input-${q.useId()}`, h = r ? `${f}-hint` : void 0, d = t ? `${f}-error` : void 0, b = d || h;
374
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
375
375
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: s }),
376
376
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
377
377
  a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
@@ -380,10 +380,10 @@ function lt({
380
380
  {
381
381
  id: f,
382
382
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
383
- disabled: m,
383
+ disabled: p,
384
384
  "aria-invalid": t ? "true" : "false",
385
- "aria-describedby": _,
386
- ...p
385
+ "aria-describedby": b,
386
+ ...m
387
387
  }
388
388
  ),
389
389
  n && /* @__PURE__ */ e.jsx(
@@ -398,11 +398,11 @@ function lt({
398
398
  }
399
399
  )
400
400
  ] }),
401
- r && !t && /* @__PURE__ */ e.jsx("span", { id: b, className: "ds-input-hint", children: r }),
401
+ r && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: r }),
402
402
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: d, className: "ds-input-error", role: "alert", children: t }) }) })
403
403
  ] });
404
404
  }
405
- function dt({
405
+ function St({
406
406
  label: s,
407
407
  error: t,
408
408
  hint: r,
@@ -411,29 +411,29 @@ function dt({
411
411
  disabled: n,
412
412
  id: i,
413
413
  resize: l = !0,
414
- rows: m = 3,
414
+ rows: p = 3,
415
415
  ...u
416
416
  }) {
417
- const p = i || `textarea-${L.useId()}`, f = r ? `${p}-hint` : void 0, b = t ? `${p}-error` : void 0, d = b || f;
417
+ const m = i || `textarea-${q.useId()}`, f = r ? `${m}-hint` : void 0, h = t ? `${m}-error` : void 0, d = h || f;
418
418
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
- s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: p, children: s }),
419
+ s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: s }),
420
420
  /* @__PURE__ */ e.jsx(
421
421
  "textarea",
422
422
  {
423
- id: p,
423
+ id: m,
424
424
  className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
425
425
  disabled: n,
426
426
  "aria-invalid": t ? "true" : "false",
427
427
  "aria-describedby": d,
428
- rows: m,
428
+ rows: p,
429
429
  ...u
430
430
  }
431
431
  ),
432
432
  r && !t && /* @__PURE__ */ e.jsx("span", { id: f, className: "ds-textarea-hint", children: r }),
433
- t && /* @__PURE__ */ e.jsx("span", { id: b, className: "ds-textarea-error", role: "alert", children: t })
433
+ t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
434
434
  ] });
435
435
  }
436
- function ut({
436
+ function At({
437
437
  label: s,
438
438
  value: t,
439
439
  onChange: r,
@@ -442,148 +442,148 @@ function ut({
442
442
  error: n,
443
443
  fullWidth: i = !0,
444
444
  size: l = "m",
445
- disabled: m = !1,
445
+ disabled: p = !1,
446
446
  id: u,
447
- ...p
447
+ ...m
448
448
  }) {
449
- const [f, b] = k(!1), [d, _] = k(!1), [w, $] = k({}), [N, B] = k("down"), [T, g] = k(-1), F = E(null), O = E(null), q = E(null), M = E(null), W = u || `select-${L.useId()}`, V = `${W}-label`, G = n ? `${W}-error` : void 0, H = 150, C = (j = !1) => {
450
- d || (_(!0), g(-1), M.current = setTimeout(() => {
449
+ const [f, h] = S(!1), [d, b] = S(!1), [_, R] = S({}), [E, g] = S("down"), [A, k] = S(-1), M = $(null), I = $(null), v = $(null), L = $(null), z = u || `select-${q.useId()}`, Y = `${z}-label`, H = n ? `${z}-error` : void 0, X = 150, U = (w = !1) => {
450
+ d || (b(!0), k(-1), L.current = setTimeout(() => {
451
451
  var c;
452
- b(!1), _(!1), j && ((c = q.current) == null || c.focus());
453
- }, H));
454
- }, h = (j) => {
455
- clearTimeout(M.current), _(!1);
456
- const c = j !== void 0 ? j : Math.max(o.findIndex((x) => x.value === t), 0);
457
- g(c), b(!0);
452
+ h(!1), b(!1), w && ((c = v.current) == null || c.focus());
453
+ }, X));
454
+ }, x = (w) => {
455
+ clearTimeout(L.current), b(!1);
456
+ const c = w !== void 0 ? w : Math.max(o.findIndex((N) => N.value === t), 0);
457
+ k(c), h(!0);
458
458
  };
459
- D(() => () => clearTimeout(M.current), []);
460
- const v = () => {
461
- var X;
462
- const j = (X = F.current) == null ? void 0 : X.getBoundingClientRect();
463
- if (!j) return;
464
- const c = window.innerHeight, x = c - j.bottom, y = j.top, K = x < 300 && y > x;
465
- B(K ? "up" : "down"), $(
466
- K ? { bottom: c - j.top + 4, left: j.left, width: j.width } : { top: j.bottom + 4, left: j.left, width: j.width }
459
+ B(() => () => clearTimeout(L.current), []);
460
+ const y = () => {
461
+ var ae;
462
+ const w = (ae = M.current) == null ? void 0 : ae.getBoundingClientRect();
463
+ if (!w) return;
464
+ const c = window.innerHeight, N = c - w.bottom, P = w.top, ee = N < 300 && P > N;
465
+ g(ee ? "up" : "down"), R(
466
+ ee ? { bottom: c - w.top + 4, left: w.left, width: w.width } : { top: w.bottom + 4, left: w.left, width: w.width }
467
467
  );
468
468
  };
469
- D(() => {
469
+ B(() => {
470
470
  if (f)
471
- return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
472
- window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
471
+ return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
472
+ window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
473
473
  };
474
- }, [f]), D(() => {
475
- const j = (c) => {
476
- F.current && !F.current.contains(c.target) && O.current && !O.current.contains(c.target) && C();
474
+ }, [f]), B(() => {
475
+ const w = (c) => {
476
+ M.current && !M.current.contains(c.target) && I.current && !I.current.contains(c.target) && U();
477
477
  };
478
- return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
479
- }, [d]), D(() => {
478
+ return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
479
+ }, [d]), B(() => {
480
480
  var c;
481
- if (!f || T < 0 || !O.current) return;
482
- (c = O.current.querySelectorAll(".ds-select-option")[T]) == null || c.scrollIntoView({ block: "nearest" });
483
- }, [T, f]);
484
- const R = (j) => {
485
- switch (j.key) {
481
+ if (!f || A < 0 || !I.current) return;
482
+ (c = I.current.querySelectorAll(".ds-select-option")[A]) == null || c.scrollIntoView({ block: "nearest" });
483
+ }, [A, f]);
484
+ const O = (w) => {
485
+ switch (w.key) {
486
486
  case "ArrowDown":
487
- j.preventDefault(), f ? g((c) => Math.min(c + 1, o.length - 1)) : h();
487
+ w.preventDefault(), f ? k((c) => Math.min(c + 1, o.length - 1)) : x();
488
488
  break;
489
489
  case "ArrowUp":
490
- j.preventDefault(), f ? g((c) => Math.max(c - 1, 0)) : h(o.length - 1);
490
+ w.preventDefault(), f ? k((c) => Math.max(c - 1, 0)) : x(o.length - 1);
491
491
  break;
492
492
  case "Home":
493
- f && (j.preventDefault(), g(0));
493
+ f && (w.preventDefault(), k(0));
494
494
  break;
495
495
  case "End":
496
- f && (j.preventDefault(), g(o.length - 1));
496
+ f && (w.preventDefault(), k(o.length - 1));
497
497
  break;
498
498
  case "Enter":
499
499
  case " ":
500
- j.preventDefault(), f ? T >= 0 && (r == null || r(o[T].value), C(!0)) : h();
500
+ w.preventDefault(), f ? A >= 0 && (r == null || r(o[A].value), U(!0)) : x();
501
501
  break;
502
502
  case "Escape":
503
- f && (j.preventDefault(), C(!0));
503
+ f && (w.preventDefault(), U(!0));
504
504
  break;
505
505
  case "Tab":
506
- f && C(!1);
506
+ f && U(!1);
507
507
  break;
508
508
  }
509
- }, P = o.find((j) => j.value === t), z = l === "xs" ? S[1] : l === "small" ? S[2] : S[3], U = f && /* @__PURE__ */ e.jsx(
509
+ }, C = o.find((w) => w.value === t), K = l === "xs" ? D[1] : l === "small" ? D[2] : D[3], Z = f && /* @__PURE__ */ e.jsx(
510
510
  "div",
511
511
  {
512
- ref: O,
512
+ ref: I,
513
513
  role: "listbox",
514
- "aria-labelledby": s ? V : void 0,
514
+ "aria-labelledby": s ? Y : void 0,
515
515
  tabIndex: -1,
516
516
  className: [
517
517
  "ds-select-dropdown",
518
518
  `ds-select-dropdown--${l}`,
519
- `ds-select-dropdown--${N}`,
519
+ `ds-select-dropdown--${E}`,
520
520
  d && "ds-select-dropdown--closing"
521
521
  ].filter(Boolean).join(" "),
522
- style: w,
523
- children: o.map((j, c) => /* @__PURE__ */ e.jsx(
522
+ style: _,
523
+ children: o.map((w, c) => /* @__PURE__ */ e.jsx(
524
524
  "button",
525
525
  {
526
- id: `${W}-opt-${c}`,
526
+ id: `${z}-opt-${c}`,
527
527
  type: "button",
528
528
  role: "option",
529
529
  tabIndex: -1,
530
- "aria-selected": t === j.value,
530
+ "aria-selected": t === w.value,
531
531
  className: [
532
532
  "ds-select-option",
533
533
  `ds-select-option--${l}`,
534
- t === j.value && "ds-select-option--selected",
535
- c === T && "ds-select-option--active"
534
+ t === w.value && "ds-select-option--selected",
535
+ c === A && "ds-select-option--active"
536
536
  ].filter(Boolean).join(" "),
537
537
  onClick: () => {
538
- r == null || r(j.value), C(!0);
538
+ r == null || r(w.value), U(!0);
539
539
  },
540
- children: j.label
540
+ children: w.label
541
541
  },
542
- j.value
542
+ w.value
543
543
  ))
544
544
  }
545
545
  );
546
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
547
- s && /* @__PURE__ */ e.jsx("label", { id: V, className: "ds-select-label", children: s }),
548
- /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: F, children: /* @__PURE__ */ e.jsxs(
546
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
547
+ s && /* @__PURE__ */ e.jsx("label", { id: Y, className: "ds-select-label", children: s }),
548
+ /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
549
549
  "button",
550
550
  {
551
- ref: q,
551
+ ref: v,
552
552
  type: "button",
553
- id: W,
553
+ id: z,
554
554
  role: "combobox",
555
555
  "aria-haspopup": "listbox",
556
556
  "aria-expanded": f,
557
- "aria-activedescendant": f && T >= 0 ? `${W}-opt-${T}` : void 0,
558
- "aria-labelledby": s ? V : void 0,
557
+ "aria-activedescendant": f && A >= 0 ? `${z}-opt-${A}` : void 0,
558
+ "aria-labelledby": s ? Y : void 0,
559
559
  "aria-invalid": n ? "true" : "false",
560
- "aria-describedby": G,
560
+ "aria-describedby": H,
561
561
  className: `ds-select-trigger ds-select-trigger--${l} ${n ? "ds-select-trigger--error" : ""}`,
562
562
  onClick: () => {
563
- m || (f ? C() : h());
563
+ p || (f ? U() : x());
564
564
  },
565
- onKeyDown: R,
566
- disabled: m,
567
- ...p,
565
+ onKeyDown: O,
566
+ disabled: p,
567
+ ...m,
568
568
  children: [
569
- /* @__PURE__ */ e.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || a }),
569
+ /* @__PURE__ */ e.jsx("span", { className: C ? "" : "ds-select-placeholder", children: (C == null ? void 0 : C.label) || a }),
570
570
  /* @__PURE__ */ e.jsx(
571
- ne,
571
+ xe,
572
572
  {
573
- size: z,
573
+ size: K,
574
574
  strokeWidth: 1.5,
575
- className: `ds-select-icon ${f && N === "down" ? "ds-select-icon--open" : ""} ${f && N === "up" ? "ds-select-icon--up" : ""}`,
575
+ className: `ds-select-icon ${f && E === "down" ? "ds-select-icon--open" : ""} ${f && E === "up" ? "ds-select-icon--up" : ""}`,
576
576
  "aria-hidden": "true"
577
577
  }
578
578
  )
579
579
  ]
580
580
  }
581
581
  ) }),
582
- n && /* @__PURE__ */ e.jsx("span", { id: G, className: "ds-select-error", role: "alert", children: n }),
583
- typeof document < "u" && ae.createPortal(U, document.body)
582
+ n && /* @__PURE__ */ e.jsx("span", { id: H, className: "ds-select-error", role: "alert", children: n }),
583
+ typeof document < "u" && me.createPortal(Z, document.body)
584
584
  ] });
585
585
  }
586
- function ft({
586
+ function It({
587
587
  label: s,
588
588
  value: t = 0,
589
589
  onChange: r,
@@ -592,51 +592,51 @@ function ft({
592
592
  step: n = 1,
593
593
  size: i = "m",
594
594
  disabled: l = !1,
595
- hint: m,
595
+ hint: p,
596
596
  error: u,
597
- ...p
597
+ ...m
598
598
  }) {
599
599
  const f = () => {
600
600
  if (l) return;
601
- const N = Math.min(Number(t) + n, a);
602
- r == null || r(N);
603
- }, b = () => {
601
+ const E = Math.min(Number(t) + n, a);
602
+ r == null || r(E);
603
+ }, h = () => {
604
604
  if (l) return;
605
- const N = Math.max(Number(t) - n, o);
606
- r == null || r(N);
607
- }, d = (N) => {
605
+ const E = Math.max(Number(t) - n, o);
606
+ r == null || r(E);
607
+ }, d = (E) => {
608
608
  if (l) return;
609
- const B = N.target.value;
610
- if (B === "") {
609
+ const g = E.target.value;
610
+ if (g === "") {
611
611
  r == null || r(o);
612
612
  return;
613
613
  }
614
- const T = Number(B);
615
- if (!isNaN(T)) {
616
- const g = Math.min(Math.max(T, o), a);
617
- r == null || r(g);
614
+ const A = Number(g);
615
+ if (!isNaN(A)) {
616
+ const k = Math.min(Math.max(A, o), a);
617
+ r == null || r(k);
618
618
  }
619
- }, _ = [
619
+ }, b = [
620
620
  "ds-stepper-wrapper",
621
621
  l && "ds-stepper-wrapper--disabled",
622
622
  u && "ds-stepper-wrapper--error"
623
- ].filter(Boolean).join(" "), w = [
623
+ ].filter(Boolean).join(" "), _ = [
624
624
  "ds-stepper",
625
625
  `ds-stepper--${i}`,
626
626
  l && "ds-stepper--disabled"
627
- ].filter(Boolean).join(" "), $ = i === "xs" ? S[1] : i === "small" ? S[2] : S[3];
628
- return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
627
+ ].filter(Boolean).join(" "), R = i === "xs" ? D[1] : i === "small" ? D[2] : D[3];
628
+ return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
629
629
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
630
- /* @__PURE__ */ e.jsxs("div", { className: w, children: [
630
+ /* @__PURE__ */ e.jsxs("div", { className: _, children: [
631
631
  /* @__PURE__ */ e.jsx(
632
632
  "button",
633
633
  {
634
634
  type: "button",
635
635
  className: "ds-stepper-button ds-stepper-button--minus",
636
- onClick: b,
636
+ onClick: h,
637
637
  disabled: l || t <= o,
638
638
  "aria-label": "Decrease",
639
- children: /* @__PURE__ */ e.jsx($e, { size: $, strokeWidth: 1.5 })
639
+ children: /* @__PURE__ */ e.jsx(We, { size: R, strokeWidth: 1.5 })
640
640
  }
641
641
  ),
642
642
  /* @__PURE__ */ e.jsx(
@@ -650,7 +650,7 @@ function ft({
650
650
  max: a,
651
651
  step: n,
652
652
  disabled: l,
653
- ...p
653
+ ...m
654
654
  }
655
655
  ),
656
656
  /* @__PURE__ */ e.jsx(
@@ -661,15 +661,15 @@ function ft({
661
661
  onClick: f,
662
662
  disabled: l || t >= a,
663
663
  "aria-label": "Increase",
664
- children: /* @__PURE__ */ e.jsx(ge, { size: $, strokeWidth: 1.5 })
664
+ children: /* @__PURE__ */ e.jsx(Fe, { size: R, strokeWidth: 1.5 })
665
665
  }
666
666
  )
667
667
  ] }),
668
- m && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: m }),
668
+ p && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: p }),
669
669
  u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
670
670
  ] });
671
671
  }
672
- function Le({
672
+ function tt({
673
673
  children: s,
674
674
  padding: t = "m",
675
675
  variant: r = "info",
@@ -680,23 +680,23 @@ function Le({
680
680
  disabled: i = !1,
681
681
  ...l
682
682
  }) {
683
- const u = (o ? "interactive" : r) === "interactive" || a || n, p = [
683
+ const u = (o ? "interactive" : r) === "interactive" || a || n, m = [
684
684
  "ds-card",
685
685
  `ds-card--${t}`,
686
686
  u && "ds-card--interactive"
687
687
  ].filter(Boolean).join(" ");
688
688
  if (n) {
689
- const d = (_) => {
689
+ const d = (b) => {
690
690
  if (i) {
691
- _.preventDefault();
691
+ b.preventDefault();
692
692
  return;
693
693
  }
694
- _.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), a == null || a(_));
694
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
695
695
  };
696
696
  return /* @__PURE__ */ e.jsx(
697
697
  "a",
698
698
  {
699
- className: p,
699
+ className: m,
700
700
  href: i ? void 0 : n,
701
701
  onClick: d,
702
702
  "aria-disabled": i ? "true" : void 0,
@@ -705,7 +705,7 @@ function Le({
705
705
  }
706
706
  );
707
707
  }
708
- const f = u && a ? "button" : "div", b = u && a ? {
708
+ const f = u && a ? "button" : "div", h = u && a ? {
709
709
  type: "button",
710
710
  onClick: a,
711
711
  disabled: i
@@ -713,36 +713,36 @@ function Le({
713
713
  return /* @__PURE__ */ e.jsx(
714
714
  f,
715
715
  {
716
- className: p,
716
+ className: m,
717
717
  role: u && !a ? "article" : void 0,
718
- ...b,
718
+ ...h,
719
719
  ...l,
720
720
  children: s
721
721
  }
722
722
  );
723
723
  }
724
- function mt({ children: s, ...t }) {
724
+ function Dt({ children: s, ...t }) {
725
725
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
726
726
  }
727
- function pt({ children: s, ...t }) {
727
+ function Bt({ children: s, ...t }) {
728
728
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
729
729
  }
730
- function ht({ children: s, ...t }) {
730
+ function Pt({ children: s, ...t }) {
731
731
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
732
732
  }
733
- function bt({ children: s, ...t }) {
733
+ function Lt({ children: s, ...t }) {
734
734
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
735
735
  }
736
- function xt({ children: s, secondary: t = !1, ...r }) {
736
+ function Ot({ children: s, secondary: t = !1, ...r }) {
737
737
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
738
738
  }
739
- function Me({ children: s, secondary: t = !1, ...r }) {
739
+ function st({ children: s, secondary: t = !1, ...r }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...r, children: s });
741
741
  }
742
- function we({ children: s, secondary: t = !1, ...r }) {
742
+ function Pe({ children: s, secondary: t = !1, ...r }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
744
744
  }
745
- function ie({
745
+ function pe({
746
746
  children: s,
747
747
  variant: t = "default",
748
748
  size: r = "m",
@@ -756,13 +756,13 @@ function ie({
756
756
  ].filter(Boolean).join(" "), i = o || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
757
757
  return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...a, children: s });
758
758
  }
759
- const We = {
760
- info: me,
761
- success: fe,
762
- warning: ue,
763
- error: de
759
+ const rt = {
760
+ info: ge,
761
+ success: ye,
762
+ warning: we,
763
+ error: Ne
764
764
  };
765
- function vt({
765
+ function Mt({
766
766
  children: s,
767
767
  variant: t = "info",
768
768
  title: r,
@@ -770,9 +770,9 @@ function vt({
770
770
  role: a,
771
771
  ...n
772
772
  }) {
773
- const i = We[t], l = a || (t === "error" ? "alert" : "status");
773
+ const i = rt[t], l = a || (t === "error" ? "alert" : "status");
774
774
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${r ? "" : "ds-alert--no-title"}`, role: l, ...n, children: [
775
- i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
775
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
776
776
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
777
777
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
778
778
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
@@ -784,35 +784,35 @@ function vt({
784
784
  className: "ds-alert__close",
785
785
  onClick: o,
786
786
  "aria-label": "Close alert",
787
- children: /* @__PURE__ */ e.jsx(ee, { size: S[3], strokeWidth: 1.5 })
787
+ children: /* @__PURE__ */ e.jsx(ne, { size: D[3], strokeWidth: 1.5 })
788
788
  }
789
789
  )
790
790
  ] });
791
791
  }
792
- const ze = 200;
793
- function jt({
792
+ const nt = 200;
793
+ function zt({
794
794
  children: s,
795
795
  title: t,
796
796
  onClose: r,
797
797
  size: o = "m",
798
798
  ...a
799
799
  }) {
800
- const n = E(null), i = L.useId(), [l, m] = k(!1), u = () => {
801
- !r || l || (m(!0), setTimeout(() => {
802
- m(!1), r();
803
- }, ze));
800
+ const n = $(null), i = q.useId(), [l, p] = S(!1), u = () => {
801
+ !r || l || (p(!0), setTimeout(() => {
802
+ p(!1), r();
803
+ }, nt));
804
804
  };
805
- D(() => {
806
- const d = (w) => {
807
- w.key === "Escape" && u();
808
- }, _ = (w) => {
809
- n.current && !n.current.contains(w.target) && u();
805
+ B(() => {
806
+ const d = (_) => {
807
+ _.key === "Escape" && u();
808
+ }, b = (_) => {
809
+ n.current && !n.current.contains(_.target) && u();
810
810
  };
811
- return document.addEventListener("keydown", d), document.addEventListener("mousedown", _), () => {
812
- document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
811
+ return document.addEventListener("keydown", d), document.addEventListener("mousedown", b), () => {
812
+ document.removeEventListener("keydown", d), document.removeEventListener("mousedown", b);
813
813
  };
814
814
  }, [r, l]);
815
- const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) === be), b = p.filter((d) => (d == null ? void 0 : d.type) !== be);
815
+ const m = q.Children.toArray(s), f = m.find((d) => (d == null ? void 0 : d.type) === Se), h = m.filter((d) => (d == null ? void 0 : d.type) !== Se);
816
816
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", l && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...a, children: /* @__PURE__ */ e.jsxs(
817
817
  "div",
818
818
  {
@@ -825,26 +825,26 @@ function jt({
825
825
  (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
826
826
  t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-modal__title", children: t }),
827
827
  r && /* @__PURE__ */ e.jsx(
828
- _e,
828
+ fe,
829
829
  {
830
830
  variant: "ghost",
831
831
  size: "small",
832
- icon: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 }),
832
+ icon: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 }),
833
833
  onClick: u,
834
834
  "aria-label": "Close modal"
835
835
  }
836
836
  )
837
837
  ] }),
838
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: b }),
838
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: h }),
839
839
  f
840
840
  ]
841
841
  }
842
842
  ) });
843
843
  }
844
- function be({ children: s }) {
844
+ function Se({ children: s }) {
845
845
  return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
846
846
  }
847
- function Fe({
847
+ function at({
848
848
  children: s,
849
849
  title: t = "Code",
850
850
  defaultExpanded: r = !1,
@@ -854,8 +854,8 @@ function Fe({
854
854
  className: i = "",
855
855
  ...l
856
856
  }) {
857
- const [m, u] = k(r), p = o !== void 0, f = p ? o : m, b = () => {
858
- p ? a == null || a(!o) : u((_) => !_);
857
+ const [p, u] = S(r), m = o !== void 0, f = m ? o : p, h = () => {
858
+ m ? a == null || a(!o) : u((b) => !b);
859
859
  }, d = [
860
860
  "ds-code-accordion",
861
861
  `ds-code-accordion--${n}`,
@@ -868,14 +868,14 @@ function Fe({
868
868
  {
869
869
  type: "button",
870
870
  className: "ds-code-accordion__header",
871
- onClick: b,
871
+ onClick: h,
872
872
  "aria-expanded": f,
873
873
  children: [
874
874
  /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: t }),
875
875
  /* @__PURE__ */ e.jsx(
876
- ne,
876
+ xe,
877
877
  {
878
- size: S[2],
878
+ size: D[2],
879
879
  strokeWidth: 1.5,
880
880
  className: `ds-code-accordion__icon ${f ? "ds-code-accordion__icon--expanded" : ""}`
881
881
  }
@@ -886,10 +886,10 @@ function Fe({
886
886
  /* @__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", children: /* @__PURE__ */ e.jsx("code", { children: s }) }) }) })
887
887
  ] });
888
888
  }
889
- function _t({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
890
- return t ? r ? /* @__PURE__ */ e.jsx(Fe, { title: o, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
889
+ function Wt({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
890
+ return t ? r ? /* @__PURE__ */ e.jsx(at, { title: o, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
891
891
  }
892
- function wt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
892
+ function Ft({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
893
893
  const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
894
894
  return /* @__PURE__ */ e.jsx(
895
895
  "a",
@@ -904,11 +904,11 @@ function wt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
904
904
  }
905
905
  );
906
906
  }
907
- function Nt({ children: s, size: t = "m", variant: r = "ghost", ...o }) {
908
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: L.Children.map(s, (a) => L.isValidElement(a) ? L.cloneElement(a, { size: t, variant: r }) : a) });
907
+ function Ct({ children: s, size: t = "m", variant: r = "ghost", ...o }) {
908
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: q.Children.map(s, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: t, variant: r }) : a) });
909
909
  }
910
- function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant: a = "ghost", disabled: n = !1, icon: i, href: l, ...m }) {
911
- const u = i && !s, p = [
910
+ function Ut({ children: s, selected: t = !1, onClick: r, size: o = "m", variant: a = "ghost", disabled: n = !1, icon: i, href: l, ...p }) {
911
+ const u = i && !s, m = [
912
912
  "ds-tab",
913
913
  `ds-tab--${o}`,
914
914
  `ds-tab--${a}`,
@@ -919,7 +919,7 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
919
919
  s
920
920
  ] });
921
921
  if (l) {
922
- const b = (d) => {
922
+ const h = (d) => {
923
923
  if (n) {
924
924
  d.preventDefault();
925
925
  return;
@@ -932,10 +932,10 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
932
932
  role: "tab",
933
933
  "aria-current": t ? "page" : void 0,
934
934
  "aria-disabled": n ? "true" : void 0,
935
- className: p,
935
+ className: m,
936
936
  href: n ? void 0 : l,
937
- onClick: b,
938
- ...m,
937
+ onClick: h,
938
+ ...p,
939
939
  children: f
940
940
  }
941
941
  );
@@ -945,32 +945,32 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
945
945
  {
946
946
  role: "tab",
947
947
  "aria-selected": t,
948
- className: p,
948
+ className: m,
949
949
  onClick: r,
950
950
  disabled: n,
951
- ...m,
951
+ ...p,
952
952
  children: f
953
953
  }
954
954
  );
955
955
  }
956
- function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
957
- const n = E(null), i = E(null), [l, m] = k(!1), u = E(!1), p = E(null), f = E(null), b = () => {
956
+ function Vt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
957
+ const n = $(null), i = $(null), [l, p] = S(!1), u = $(!1), m = $(null), f = $(null), h = () => {
958
958
  if (!n.current) return;
959
959
  const d = n.current.querySelector(`[data-value="${t}"]`);
960
960
  if (!d) return;
961
- const _ = n.current.getBoundingClientRect(), w = d.getBoundingClientRect(), $ = w.left - _.left, N = w.width;
962
- i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = $ + "px", i.current.style.width = N + "px", u.current = !1) : (m(!0), requestAnimationFrame(() => {
961
+ const b = n.current.getBoundingClientRect(), _ = d.getBoundingClientRect(), R = _.left - b.left, E = _.width;
962
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = R + "px", i.current.style.width = E + "px", u.current = !1) : (p(!0), requestAnimationFrame(() => {
963
963
  if (!i.current || !n.current) return;
964
- const B = n.current.querySelector(`[data-value="${t}"]`);
965
- if (!B) return;
966
- const T = n.current.getBoundingClientRect(), g = B.getBoundingClientRect();
967
- i.current.style.transition = "none", i.current.style.left = g.left - T.left + "px", i.current.style.width = g.width + "px";
964
+ const g = n.current.querySelector(`[data-value="${t}"]`);
965
+ if (!g) return;
966
+ const A = n.current.getBoundingClientRect(), k = g.getBoundingClientRect();
967
+ i.current.style.transition = "none", i.current.style.left = k.left - A.left + "px", i.current.style.width = k.width + "px";
968
968
  }));
969
969
  };
970
- return f.current = b, ke(() => {
971
- const d = p.current !== t;
972
- p.current = t, u.current = l && d, b();
973
- }), D(() => {
970
+ return f.current = h, Me(() => {
971
+ const d = m.current !== t;
972
+ m.current = t, u.current = l && d, h();
973
+ }), B(() => {
974
974
  if (!n.current) return;
975
975
  const d = new ResizeObserver(() => {
976
976
  u.current = !1, f.current();
@@ -1015,7 +1015,7 @@ function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
1015
1015
  }
1016
1016
  );
1017
1017
  }
1018
- function Ce({
1018
+ function ot({
1019
1019
  children: s,
1020
1020
  title: t,
1021
1021
  defaultExpanded: r = !1,
@@ -1024,29 +1024,29 @@ function Ce({
1024
1024
  padding: n = "m",
1025
1025
  ...i
1026
1026
  }) {
1027
- const [l, m] = k(r), u = o !== void 0, p = u ? o : l, f = () => {
1028
- u ? a == null || a(!o) : m((d) => !d);
1029
- }, b = [
1027
+ const [l, p] = S(r), u = o !== void 0, m = u ? o : l, f = () => {
1028
+ u ? a == null || a(!o) : p((d) => !d);
1029
+ }, h = [
1030
1030
  "ds-accordion",
1031
1031
  `ds-accordion--${n}`,
1032
- p && "ds-accordion--expanded"
1032
+ m && "ds-accordion--expanded"
1033
1033
  ].filter(Boolean).join(" ");
1034
- return /* @__PURE__ */ e.jsxs("div", { className: b, ...i, children: [
1034
+ return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
1035
1035
  /* @__PURE__ */ e.jsxs(
1036
1036
  "button",
1037
1037
  {
1038
1038
  type: "button",
1039
1039
  className: "ds-accordion__header",
1040
1040
  onClick: f,
1041
- "aria-expanded": p,
1041
+ "aria-expanded": m,
1042
1042
  children: [
1043
1043
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: t }),
1044
1044
  /* @__PURE__ */ e.jsx(
1045
- ne,
1045
+ xe,
1046
1046
  {
1047
- size: S[2],
1047
+ size: D[2],
1048
1048
  strokeWidth: 1.5,
1049
- className: `ds-accordion__icon ${p ? "ds-accordion__icon--expanded" : ""}`
1049
+ className: `ds-accordion__icon ${m ? "ds-accordion__icon--expanded" : ""}`
1050
1050
  }
1051
1051
  )
1052
1052
  ]
@@ -1055,69 +1055,69 @@ function Ce({
1055
1055
  /* @__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: s }) }) })
1056
1056
  ] });
1057
1057
  }
1058
- const Y = 8, Z = 8;
1059
- function Ve(s, t, r) {
1058
+ const re = 8, le = 8;
1059
+ function it(s, t, r) {
1060
1060
  const o = window.innerWidth;
1061
1061
  let a, n;
1062
1062
  switch (s) {
1063
1063
  case "top":
1064
- a = t.top - r.height - Y, n = t.left + t.width / 2 - r.width / 2;
1064
+ a = t.top - r.height - re, n = t.left + t.width / 2 - r.width / 2;
1065
1065
  break;
1066
1066
  case "bottom":
1067
- a = t.bottom + Y, n = t.left + t.width / 2 - r.width / 2;
1067
+ a = t.bottom + re, n = t.left + t.width / 2 - r.width / 2;
1068
1068
  break;
1069
1069
  case "left":
1070
- a = t.top + t.height / 2 - r.height / 2, n = t.left - r.width - Y;
1070
+ a = t.top + t.height / 2 - r.height / 2, n = t.left - r.width - re;
1071
1071
  break;
1072
1072
  case "right":
1073
- a = t.top + t.height / 2 - r.height / 2, n = t.right + Y;
1073
+ a = t.top + t.height / 2 - r.height / 2, n = t.right + re;
1074
1074
  break;
1075
1075
  default:
1076
- a = t.bottom + Y, n = t.left;
1076
+ a = t.bottom + re, n = t.left;
1077
1077
  }
1078
- const i = Math.max(Z, Math.min(o - r.width - Z, n)), l = n - i;
1078
+ const i = Math.max(le, Math.min(o - r.width - le, n)), l = n - i;
1079
1079
  return { top: a, left: i, arrowOffset: l };
1080
1080
  }
1081
- function Ue(s, t, r) {
1081
+ function lt(s, t, r) {
1082
1082
  const o = window.innerWidth, a = window.innerHeight;
1083
- if (s.top >= t + Y + Z) return "top";
1084
- if (a - s.bottom >= t + Y + Z) return "bottom";
1085
- if (o - s.right >= r + Y + Z) return "right";
1086
- if (s.left >= r + Y + Z) return "left";
1083
+ if (s.top >= t + re + le) return "top";
1084
+ if (a - s.bottom >= t + re + le) return "bottom";
1085
+ if (o - s.right >= r + re + le) return "right";
1086
+ if (s.left >= r + re + le) return "left";
1087
1087
  const n = Math.max(s.top, a - s.bottom, s.left, o - s.right);
1088
1088
  return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === o - s.right ? "right" : "left";
1089
1089
  }
1090
- function Et({ children: s, content: t, position: r, ...o }) {
1091
- const [a, n] = k(!1), [i, l] = k({ visibility: "hidden" }), [m, u] = k(r || "top"), p = E(null), f = E(null), b = E(!1), d = () => {
1092
- if (!p.current || !f.current) return;
1093
- const w = p.current.getBoundingClientRect(), $ = f.current.getBoundingClientRect(), N = r || Ue(w, $.height, $.width), { top: B, left: T, arrowOffset: g } = Ve(N, w, $);
1094
- u(N), l({
1090
+ function Yt({ children: s, content: t, position: r, ...o }) {
1091
+ const [a, n] = S(!1), [i, l] = S({ visibility: "hidden" }), [p, u] = S(r || "top"), m = $(null), f = $(null), h = $(!1), d = () => {
1092
+ if (!m.current || !f.current) return;
1093
+ const _ = m.current.getBoundingClientRect(), R = f.current.getBoundingClientRect(), E = r || lt(_, R.height, R.width), { top: g, left: A, arrowOffset: k } = it(E, _, R);
1094
+ u(E), l({
1095
1095
  position: "fixed",
1096
- top: B,
1097
- left: T,
1096
+ top: g,
1097
+ left: A,
1098
1098
  visibility: "visible",
1099
- "--arrow-offset": `${g}px`
1099
+ "--arrow-offset": `${k}px`
1100
1100
  });
1101
1101
  };
1102
- if (D(() => {
1102
+ if (B(() => {
1103
1103
  if (!a) return;
1104
1104
  l({ position: "fixed", visibility: "hidden" });
1105
- const w = requestAnimationFrame(d);
1105
+ const _ = requestAnimationFrame(d);
1106
1106
  return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
1107
- cancelAnimationFrame(w), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1107
+ cancelAnimationFrame(_), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1108
1108
  };
1109
- }, [a, r]), D(() => {
1109
+ }, [a, r]), B(() => {
1110
1110
  if (!a) return;
1111
- const w = ($) => {
1112
- p.current && !p.current.contains($.target) && n(!1);
1111
+ const _ = (R) => {
1112
+ m.current && !m.current.contains(R.target) && n(!1);
1113
1113
  };
1114
- return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
1114
+ return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
1115
1115
  }, [a]), !t) return s;
1116
- const _ = a && /* @__PURE__ */ e.jsx(
1116
+ const b = a && /* @__PURE__ */ e.jsx(
1117
1117
  "div",
1118
1118
  {
1119
1119
  ref: f,
1120
- className: `ds-tooltip ds-tooltip--${m}`,
1120
+ className: `ds-tooltip ds-tooltip--${p}`,
1121
1121
  role: "tooltip",
1122
1122
  style: i,
1123
1123
  children: t
@@ -1126,26 +1126,26 @@ function Et({ children: s, content: t, position: r, ...o }) {
1126
1126
  return /* @__PURE__ */ e.jsxs(
1127
1127
  "div",
1128
1128
  {
1129
- ref: p,
1129
+ ref: m,
1130
1130
  className: "ds-tooltip-wrapper",
1131
1131
  onMouseEnter: () => {
1132
- b.current || n(!0);
1132
+ h.current || n(!0);
1133
1133
  },
1134
1134
  onMouseLeave: () => {
1135
- b.current || n(!1);
1135
+ h.current || n(!1);
1136
1136
  },
1137
1137
  onTouchStart: () => {
1138
- b.current = !0, n((w) => !w);
1138
+ h.current = !0, n((_) => !_);
1139
1139
  },
1140
1140
  ...o,
1141
1141
  children: [
1142
1142
  s,
1143
- typeof document < "u" && ae.createPortal(_, document.body)
1143
+ typeof document < "u" && me.createPortal(b, document.body)
1144
1144
  ]
1145
1145
  }
1146
1146
  );
1147
1147
  }
1148
- function $t({
1148
+ function qt({
1149
1149
  checked: s = !1,
1150
1150
  onChange: t,
1151
1151
  size: r = "m",
@@ -1154,12 +1154,12 @@ function $t({
1154
1154
  id: n,
1155
1155
  ...i
1156
1156
  }) {
1157
- const l = n || `toggle-${L.useId()}`, m = [
1157
+ const l = n || `toggle-${q.useId()}`, p = [
1158
1158
  "ds-toggle",
1159
1159
  `ds-toggle--${r}`,
1160
1160
  o && "ds-toggle--disabled"
1161
1161
  ].filter(Boolean).join(" ");
1162
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1162
+ return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: l, children: [
1163
1163
  /* @__PURE__ */ e.jsx(
1164
1164
  "input",
1165
1165
  {
@@ -1176,7 +1176,7 @@ function $t({
1176
1176
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1177
1177
  ] });
1178
1178
  }
1179
- function gt({
1179
+ function Ht({
1180
1180
  checked: s = !1,
1181
1181
  onChange: t,
1182
1182
  size: r = "m",
@@ -1185,12 +1185,12 @@ function gt({
1185
1185
  id: n,
1186
1186
  ...i
1187
1187
  }) {
1188
- const l = n || `checkbox-${L.useId()}`, m = [
1188
+ const l = n || `checkbox-${q.useId()}`, p = [
1189
1189
  "ds-checkbox",
1190
1190
  `ds-checkbox--${r}`,
1191
1191
  o && "ds-checkbox--disabled"
1192
1192
  ].filter(Boolean).join(" "), u = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
1193
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1193
+ return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: l, children: [
1194
1194
  /* @__PURE__ */ e.jsx(
1195
1195
  "input",
1196
1196
  {
@@ -1198,13 +1198,13 @@ function gt({
1198
1198
  id: l,
1199
1199
  className: "ds-checkbox__input",
1200
1200
  checked: s,
1201
- onChange: (p) => t == null ? void 0 : t(p.target.checked),
1201
+ onChange: (m) => t == null ? void 0 : t(m.target.checked),
1202
1202
  disabled: o,
1203
1203
  ...i
1204
1204
  }
1205
1205
  ),
1206
1206
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ e.jsx(
1207
- re,
1207
+ he,
1208
1208
  {
1209
1209
  size: u,
1210
1210
  strokeWidth: 2.5,
@@ -1214,7 +1214,7 @@ function gt({
1214
1214
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1215
1215
  ] });
1216
1216
  }
1217
- function Rt({
1217
+ function Kt({
1218
1218
  checked: s = !1,
1219
1219
  onChange: t,
1220
1220
  size: r = "m",
@@ -1223,14 +1223,14 @@ function Rt({
1223
1223
  name: n,
1224
1224
  value: i,
1225
1225
  id: l,
1226
- ...m
1226
+ ...p
1227
1227
  }) {
1228
- const u = l || `radio-${L.useId()}`, p = [
1228
+ const u = l || `radio-${q.useId()}`, m = [
1229
1229
  "ds-radio",
1230
1230
  `ds-radio--${r}`,
1231
1231
  o && "ds-radio--disabled"
1232
1232
  ].filter(Boolean).join(" ");
1233
- return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: u, children: [
1233
+ return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: u, children: [
1234
1234
  /* @__PURE__ */ e.jsx(
1235
1235
  "input",
1236
1236
  {
@@ -1242,14 +1242,14 @@ function Rt({
1242
1242
  disabled: o,
1243
1243
  name: n,
1244
1244
  value: i,
1245
- ...m
1245
+ ...p
1246
1246
  }
1247
1247
  ),
1248
1248
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1249
1249
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1250
1250
  ] });
1251
1251
  }
1252
- function Ye({ width: s, height: t, shape: r = "rect", aspectRatio: o, className: a = "", style: n = {}, ...i }) {
1252
+ function ct({ width: s, height: t, shape: r = "rect", aspectRatio: o, className: a = "", style: n = {}, ...i }) {
1253
1253
  return /* @__PURE__ */ e.jsx(
1254
1254
  "span",
1255
1255
  {
@@ -1260,7 +1260,7 @@ function Ye({ width: s, height: t, shape: r = "rect", aspectRatio: o, className:
1260
1260
  }
1261
1261
  );
1262
1262
  }
1263
- function qe({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "", style: a = {}, ...n }) {
1263
+ function dt({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "", style: a = {}, ...n }) {
1264
1264
  return /* @__PURE__ */ e.jsx(
1265
1265
  "span",
1266
1266
  {
@@ -1279,20 +1279,20 @@ function qe({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "",
1279
1279
  }
1280
1280
  );
1281
1281
  }
1282
- Ye.Text = qe;
1283
- function He(s) {
1282
+ ct.Text = dt;
1283
+ function ut(s) {
1284
1284
  let t = 2166136261;
1285
1285
  for (let r = 0; r < s.length; r++)
1286
1286
  t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
1287
1287
  return t % 360;
1288
1288
  }
1289
- function Ke(s) {
1289
+ function ft(s) {
1290
1290
  if (!s) return "";
1291
1291
  const t = s.trim().split(/\s+/);
1292
1292
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1293
1293
  }
1294
- function Tt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style: n = {}, ...i }) {
1295
- const l = He(s ?? ""), [m, u] = k(!1), p = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Ke(s) });
1294
+ function Gt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style: n = {}, ...i }) {
1295
+ const l = ut(s ?? ""), [p, u] = S(!1), m = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: ft(s) });
1296
1296
  return /* @__PURE__ */ e.jsx(
1297
1297
  "div",
1298
1298
  {
@@ -1300,11 +1300,11 @@ function Tt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style:
1300
1300
  style: { width: o, height: o, "--ds-avatar-h": l, ...n },
1301
1301
  "aria-hidden": "true",
1302
1302
  ...i,
1303
- children: r && !m ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => u(!0) }) : p
1303
+ children: r && !p ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => u(!0) }) : m
1304
1304
  }
1305
1305
  );
1306
1306
  }
1307
- function It({
1307
+ function Xt({
1308
1308
  children: s,
1309
1309
  size: t = "compact",
1310
1310
  stickyTop: r,
@@ -1334,13 +1334,13 @@ function It({
1334
1334
  }
1335
1335
  );
1336
1336
  }
1337
- function St({ children: s, ...t }) {
1337
+ function Jt({ children: s, ...t }) {
1338
1338
  return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
1339
1339
  }
1340
- function At({ children: s, ...t }) {
1340
+ function Zt({ children: s, ...t }) {
1341
1341
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1342
1342
  }
1343
- function Dt({ children: s, interactive: t, selected: r, subheader: o, className: a = "", onClick: n, ...i }) {
1343
+ function Qt({ children: s, interactive: t, selected: r, subheader: o, className: a = "", onClick: n, ...i }) {
1344
1344
  return /* @__PURE__ */ e.jsx(
1345
1345
  "tr",
1346
1346
  {
@@ -1357,17 +1357,17 @@ function Dt({ children: s, interactive: t, selected: r, subheader: o, className:
1357
1357
  }
1358
1358
  );
1359
1359
  }
1360
- function Pt({ children: s, colSpan: t = 999, ...r }) {
1360
+ function es({ children: s, colSpan: t = 999, ...r }) {
1361
1361
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1362
1362
  }
1363
- function Bt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, className: n = "", style: i = {}, ...l }) {
1364
- const m = !!o || r !== void 0, u = r === "asc" ? Re : r === "desc" ? ne : Te;
1363
+ function ts({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, className: n = "", style: i = {}, ...l }) {
1364
+ const p = !!o || r !== void 0, u = r === "asc" ? Ce : r === "desc" ? xe : Ue;
1365
1365
  return /* @__PURE__ */ e.jsx(
1366
1366
  "th",
1367
1367
  {
1368
1368
  className: [
1369
1369
  "ds-th",
1370
- m ? "ds-th--sortable" : "",
1370
+ p ? "ds-th--sortable" : "",
1371
1371
  r ? "ds-th--sorted" : "",
1372
1372
  t !== "left" ? `ds-table-cell--${t}` : "",
1373
1373
  n
@@ -1375,14 +1375,14 @@ function Bt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, c
1375
1375
  onClick: o,
1376
1376
  style: { width: a, ...i },
1377
1377
  ...l,
1378
- children: m ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1378
+ children: p ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1379
1379
  s,
1380
1380
  /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(u, { size: 11, strokeWidth: 2.5 }) })
1381
1381
  ] }) : s
1382
1382
  }
1383
1383
  );
1384
1384
  }
1385
- function Ot({ children: s, align: t = "left", secondary: r, muted: o, truncate: a, nowrap: n, className: i = "", ...l }) {
1385
+ function ss({ children: s, align: t = "left", secondary: r, muted: o, truncate: a, nowrap: n, className: i = "", ...l }) {
1386
1386
  return /* @__PURE__ */ e.jsx(
1387
1387
  "td",
1388
1388
  {
@@ -1400,7 +1400,7 @@ function Ot({ children: s, align: t = "left", secondary: r, muted: o, truncate:
1400
1400
  }
1401
1401
  );
1402
1402
  }
1403
- function Lt({
1403
+ function rs({
1404
1404
  icon: s,
1405
1405
  title: t,
1406
1406
  description: r,
@@ -1423,7 +1423,7 @@ function Lt({
1423
1423
  }
1424
1424
  );
1425
1425
  }
1426
- function Mt({
1426
+ function ns({
1427
1427
  label: s,
1428
1428
  hint: t,
1429
1429
  error: r,
@@ -1432,10 +1432,10 @@ function Mt({
1432
1432
  htmlFor: n,
1433
1433
  children: i,
1434
1434
  className: l = "",
1435
- style: m,
1435
+ style: p,
1436
1436
  ...u
1437
1437
  }) {
1438
- const p = L.useId(), f = n ?? p, b = `${f}-hint`, d = `${f}-error`;
1438
+ const m = q.useId(), f = n ?? m, h = `${f}-hint`, d = `${f}-error`;
1439
1439
  return /* @__PURE__ */ e.jsxs(
1440
1440
  "div",
1441
1441
  {
@@ -1443,19 +1443,19 @@ function Mt({
1443
1443
  "data-state": r ? "error" : void 0,
1444
1444
  "data-required": o ? "" : void 0,
1445
1445
  "data-disabled": a ? "" : void 0,
1446
- style: m,
1446
+ style: p,
1447
1447
  ...u,
1448
1448
  children: [
1449
1449
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: f, children: s }),
1450
1450
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1451
- t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: b, children: t }),
1451
+ t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1452
1452
  r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: d, role: "alert", children: r })
1453
1453
  ]
1454
1454
  }
1455
1455
  );
1456
1456
  }
1457
- function Wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, className: n = "", style: i, ...l }) {
1458
- const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1457
+ function as({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, className: n = "", style: i, ...l }) {
1458
+ const p = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1459
1459
  return /* @__PURE__ */ e.jsxs(
1460
1460
  "div",
1461
1461
  {
@@ -1470,12 +1470,12 @@ function Wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, class
1470
1470
  children: [
1471
1471
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: s }),
1472
1472
  t != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: t }),
1473
- r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: r })
1473
+ r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${p}`, children: r })
1474
1474
  ]
1475
1475
  }
1476
1476
  );
1477
1477
  }
1478
- function zt({
1478
+ function os({
1479
1479
  children: s,
1480
1480
  separator: t = "/",
1481
1481
  "aria-label": r = "Breadcrumb",
@@ -1483,7 +1483,7 @@ function zt({
1483
1483
  style: a,
1484
1484
  ...n
1485
1485
  }) {
1486
- const i = L.Children.toArray(s).filter(Boolean);
1486
+ const i = q.Children.toArray(s).filter(Boolean);
1487
1487
  return /* @__PURE__ */ e.jsx(
1488
1488
  "nav",
1489
1489
  {
@@ -1491,14 +1491,14 @@ function zt({
1491
1491
  "aria-label": r,
1492
1492
  style: a,
1493
1493
  ...n,
1494
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1494
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, p) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1495
1495
  l,
1496
- m < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1497
- ] }, m)) })
1496
+ p < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1497
+ ] }, p)) })
1498
1498
  }
1499
1499
  );
1500
1500
  }
1501
- function Ft({
1501
+ function is({
1502
1502
  page: s,
1503
1503
  total: t,
1504
1504
  onChange: r,
@@ -1508,7 +1508,7 @@ function Ft({
1508
1508
  style: i,
1509
1509
  ...l
1510
1510
  }) {
1511
- const m = Ge(s, t, o);
1511
+ const p = mt(s, t, o);
1512
1512
  return /* @__PURE__ */ e.jsxs(
1513
1513
  "nav",
1514
1514
  {
@@ -1524,11 +1524,11 @@ function Ft({
1524
1524
  onClick: () => r == null ? void 0 : r(s - 1),
1525
1525
  disabled: s <= 1,
1526
1526
  "aria-label": "Previous page",
1527
- children: /* @__PURE__ */ e.jsx(Ie, { size: 16 })
1527
+ children: /* @__PURE__ */ e.jsx(Ve, { size: 16 })
1528
1528
  }
1529
1529
  ),
1530
- m.map(
1531
- (u, p) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${p}`) : /* @__PURE__ */ e.jsx(
1530
+ p.map(
1531
+ (u, m) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
1532
1532
  "button",
1533
1533
  {
1534
1534
  className: `ds-pagination-page${u === s ? " ds-pagination-page--current" : ""}`,
@@ -1547,44 +1547,44 @@ function Ft({
1547
1547
  onClick: () => r == null ? void 0 : r(s + 1),
1548
1548
  disabled: s >= t,
1549
1549
  "aria-label": "Next page",
1550
- children: /* @__PURE__ */ e.jsx(je, { size: 16 })
1550
+ children: /* @__PURE__ */ e.jsx(Be, { size: 16 })
1551
1551
  }
1552
1552
  )
1553
1553
  ]
1554
1554
  }
1555
1555
  );
1556
1556
  }
1557
- function Ge(s, t, r) {
1557
+ function mt(s, t, r) {
1558
1558
  if (t <= 7) return Array.from({ length: t }, (i, l) => l + 1);
1559
1559
  const o = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
1560
1560
  o > 2 && n.push("…");
1561
1561
  for (let i = o; i <= a; i++) n.push(i);
1562
1562
  return a < t - 1 && n.push("…"), n.push(t), n;
1563
1563
  }
1564
- const Xe = 200;
1565
- function Ct({
1564
+ const pt = 200;
1565
+ function ls({
1566
1566
  children: s,
1567
1567
  title: t,
1568
1568
  onClose: r,
1569
1569
  side: o = "right",
1570
1570
  ...a
1571
1571
  }) {
1572
- const n = E(null), i = L.useId(), [l, m] = k(!1), u = () => {
1573
- !r || l || (m(!0), setTimeout(() => {
1574
- m(!1), r();
1575
- }, Xe));
1572
+ const n = $(null), i = q.useId(), [l, p] = S(!1), u = () => {
1573
+ !r || l || (p(!0), setTimeout(() => {
1574
+ p(!1), r();
1575
+ }, pt));
1576
1576
  };
1577
- D(() => {
1578
- const d = (w) => {
1579
- w.key === "Escape" && u();
1580
- }, _ = (w) => {
1581
- n.current && !n.current.contains(w.target) && u();
1577
+ B(() => {
1578
+ const d = (_) => {
1579
+ _.key === "Escape" && u();
1580
+ }, b = (_) => {
1581
+ n.current && !n.current.contains(_.target) && u();
1582
1582
  };
1583
- return document.addEventListener("keydown", d), document.addEventListener("mousedown", _), () => {
1584
- document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
1583
+ return document.addEventListener("keydown", d), document.addEventListener("mousedown", b), () => {
1584
+ document.removeEventListener("keydown", d), document.removeEventListener("mousedown", b);
1585
1585
  };
1586
1586
  }, [r, l]);
1587
- const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) === xe), b = p.filter((d) => (d == null ? void 0 : d.type) !== xe);
1587
+ const m = q.Children.toArray(s), f = m.find((d) => (d == null ? void 0 : d.type) === Ae), h = m.filter((d) => (d == null ? void 0 : d.type) !== Ae);
1588
1588
  return /* @__PURE__ */ e.jsx(
1589
1589
  "div",
1590
1590
  {
@@ -1602,9 +1602,9 @@ function Ct({
1602
1602
  children: [
1603
1603
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1604
1604
  t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: t }),
1605
- r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 }) })
1605
+ r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 }) })
1606
1606
  ] }),
1607
- /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: b }),
1607
+ /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: h }),
1608
1608
  f
1609
1609
  ]
1610
1610
  }
@@ -1612,16 +1612,16 @@ function Ct({
1612
1612
  }
1613
1613
  );
1614
1614
  }
1615
- function xe({ children: s }) {
1615
+ function Ae({ children: s }) {
1616
1616
  return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: s });
1617
1617
  }
1618
- const Je = {
1619
- info: me,
1620
- success: fe,
1621
- warning: ue,
1622
- error: de
1618
+ const ht = {
1619
+ info: ge,
1620
+ success: ye,
1621
+ warning: we,
1622
+ error: Ne
1623
1623
  };
1624
- function Vt({
1624
+ function cs({
1625
1625
  children: s,
1626
1626
  variant: t = "info",
1627
1627
  action: r,
@@ -1630,15 +1630,15 @@ function Vt({
1630
1630
  role: n,
1631
1631
  ...i
1632
1632
  }) {
1633
- const l = Je[t], m = n || (t === "error" ? "alert" : "status");
1633
+ const l = ht[t], p = n || (t === "error" ? "alert" : "status");
1634
1634
  return /* @__PURE__ */ e.jsxs(
1635
1635
  "div",
1636
1636
  {
1637
1637
  className: `ds-banner ds-banner--${t}`,
1638
- role: m,
1638
+ role: p,
1639
1639
  ...i,
1640
1640
  children: [
1641
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: S[2], strokeWidth: 1.5 }) }),
1641
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: D[2], strokeWidth: 1.5 }) }),
1642
1642
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
1643
1643
  r && /* @__PURE__ */ e.jsx(
1644
1644
  "button",
@@ -1656,14 +1656,14 @@ function Vt({
1656
1656
  className: "ds-banner-dismiss",
1657
1657
  onClick: a,
1658
1658
  "aria-label": "Dismiss",
1659
- children: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 })
1659
+ children: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 })
1660
1660
  }
1661
1661
  )
1662
1662
  ]
1663
1663
  }
1664
1664
  );
1665
1665
  }
1666
- function Ut({
1666
+ function ds({
1667
1667
  trigger: s,
1668
1668
  items: t = [],
1669
1669
  open: r,
@@ -1673,131 +1673,131 @@ function Ut({
1673
1673
  style: i,
1674
1674
  ...l
1675
1675
  }) {
1676
- const [m, u] = k(!1), [p, f] = k(!1), b = r !== void 0, d = b ? r : m, _ = E(null), w = E(null), $ = E(null), N = E(null), [B, T] = k({}), g = E(null), F = 150, O = () => {
1677
- if (b)
1676
+ const [p, u] = S(!1), [m, f] = S(!1), h = r !== void 0, d = h ? r : p, b = $(null), _ = $(null), R = $(null), E = $(null), [g, A] = S({}), k = $(null), M = 150, I = () => {
1677
+ if (h)
1678
1678
  o == null || o(!1);
1679
1679
  else {
1680
- if (p) return;
1681
- f(!0), g.current = setTimeout(() => {
1680
+ if (m) return;
1681
+ f(!0), k.current = setTimeout(() => {
1682
1682
  u(!1), f(!1);
1683
- }, F);
1683
+ }, M);
1684
1684
  }
1685
- }, q = () => {
1686
- const h = !d;
1687
- b ? o == null || o(h) : h ? (clearTimeout(g.current), f(!1), u(!0)) : O();
1688
- }, M = () => {
1689
- d || (b ? o == null || o(!0) : (clearTimeout(g.current), f(!1), u(!0)));
1685
+ }, v = () => {
1686
+ const x = !d;
1687
+ h ? o == null || o(x) : x ? (clearTimeout(k.current), f(!1), u(!0)) : I();
1688
+ }, L = () => {
1689
+ d || (h ? o == null || o(!0) : (clearTimeout(k.current), f(!1), u(!0)));
1690
1690
  };
1691
- D(() => () => clearTimeout(g.current), []), D(() => {
1691
+ B(() => () => clearTimeout(k.current), []), B(() => {
1692
1692
  if (!d) return;
1693
- const h = () => {
1694
- var R;
1695
- const v = (R = _.current) == null ? void 0 : R.getBoundingClientRect();
1696
- v && T(
1697
- a === "right" ? { top: v.bottom + 4, right: window.innerWidth - v.right } : { top: v.bottom + 4, left: v.left }
1693
+ const x = () => {
1694
+ var O;
1695
+ const y = (O = b.current) == null ? void 0 : O.getBoundingClientRect();
1696
+ y && A(
1697
+ a === "right" ? { top: y.bottom + 4, right: window.innerWidth - y.right } : { top: y.bottom + 4, left: y.left }
1698
1698
  );
1699
1699
  };
1700
- return h(), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
1701
- window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
1700
+ return x(), window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
1701
+ window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
1702
1702
  };
1703
1703
  }, [d, a]);
1704
- const W = () => {
1705
- var v;
1706
- const h = (v = $.current) == null ? void 0 : v.querySelector(
1704
+ const z = () => {
1705
+ var y;
1706
+ const x = (y = R.current) == null ? void 0 : y.querySelector(
1707
1707
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1708
1708
  );
1709
- h == null || h.focus();
1709
+ x == null || x.focus();
1710
1710
  };
1711
- D(() => {
1711
+ B(() => {
1712
1712
  if (!d) return;
1713
- const h = (R) => {
1714
- var P, z;
1715
- !((P = _.current) != null && P.contains(R.target)) && !((z = w.current) != null && z.contains(R.target)) && O();
1716
- }, v = (R) => {
1717
- R.key === "Escape" && (O(), W());
1713
+ const x = (O) => {
1714
+ var C, K;
1715
+ !((C = b.current) != null && C.contains(O.target)) && !((K = _.current) != null && K.contains(O.target)) && I();
1716
+ }, y = (O) => {
1717
+ O.key === "Escape" && (I(), z());
1718
1718
  };
1719
- return document.addEventListener("mousedown", h), document.addEventListener("keydown", v), () => {
1720
- document.removeEventListener("mousedown", h), document.removeEventListener("keydown", v);
1719
+ return document.addEventListener("mousedown", x), document.addEventListener("keydown", y), () => {
1720
+ document.removeEventListener("mousedown", x), document.removeEventListener("keydown", y);
1721
1721
  };
1722
- }, [d]), D(() => {
1723
- if (!d || !N.current || !w.current) return;
1724
- const h = V(), v = N.current === "last" ? h[h.length - 1] : h[0];
1725
- v == null || v.focus(), N.current = null;
1722
+ }, [d]), B(() => {
1723
+ if (!d || !E.current || !_.current) return;
1724
+ const x = Y(), y = E.current === "last" ? x[x.length - 1] : x[0];
1725
+ y == null || y.focus(), E.current = null;
1726
1726
  }, [d]);
1727
- const V = () => w.current ? [...w.current.querySelectorAll(
1727
+ const Y = () => _.current ? [..._.current.querySelectorAll(
1728
1728
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1729
- )] : [], G = (h) => {
1730
- var v, R;
1731
- if (h.key === "ArrowDown")
1732
- h.preventDefault(), d ? (v = V()[0]) == null || v.focus() : (N.current = "first", M());
1733
- else if (h.key === "ArrowUp")
1734
- if (h.preventDefault(), !d)
1735
- N.current = "last", M();
1729
+ )] : [], H = (x) => {
1730
+ var y, O;
1731
+ if (x.key === "ArrowDown")
1732
+ x.preventDefault(), d ? (y = Y()[0]) == null || y.focus() : (E.current = "first", L());
1733
+ else if (x.key === "ArrowUp")
1734
+ if (x.preventDefault(), !d)
1735
+ E.current = "last", L();
1736
1736
  else {
1737
- const P = V();
1738
- (R = P[P.length - 1]) == null || R.focus();
1737
+ const C = Y();
1738
+ (O = C[C.length - 1]) == null || O.focus();
1739
1739
  }
1740
- }, H = (h) => {
1741
- var P, z, U, j;
1742
- const v = V(), R = v.findIndex((c) => c === document.activeElement);
1743
- switch (h.key) {
1740
+ }, X = (x) => {
1741
+ var C, K, Z, w;
1742
+ const y = Y(), O = y.findIndex((c) => c === document.activeElement);
1743
+ switch (x.key) {
1744
1744
  case "ArrowDown":
1745
- h.preventDefault(), (P = v[Math.min(R + 1, v.length - 1)]) == null || P.focus();
1745
+ x.preventDefault(), (C = y[Math.min(O + 1, y.length - 1)]) == null || C.focus();
1746
1746
  break;
1747
1747
  case "ArrowUp":
1748
- h.preventDefault(), R <= 0 ? W() : (z = v[R - 1]) == null || z.focus();
1748
+ x.preventDefault(), O <= 0 ? z() : (K = y[O - 1]) == null || K.focus();
1749
1749
  break;
1750
1750
  case "Home":
1751
- h.preventDefault(), (U = v[0]) == null || U.focus();
1751
+ x.preventDefault(), (Z = y[0]) == null || Z.focus();
1752
1752
  break;
1753
1753
  case "End":
1754
- h.preventDefault(), (j = v[v.length - 1]) == null || j.focus();
1754
+ x.preventDefault(), (w = y[y.length - 1]) == null || w.focus();
1755
1755
  break;
1756
1756
  case "Tab":
1757
- O();
1757
+ I();
1758
1758
  break;
1759
1759
  }
1760
- }, C = d && /* @__PURE__ */ e.jsx(
1760
+ }, U = d && /* @__PURE__ */ e.jsx(
1761
1761
  "div",
1762
1762
  {
1763
- ref: w,
1763
+ ref: _,
1764
1764
  role: "menu",
1765
1765
  className: [
1766
1766
  "ds-dropdown__menu",
1767
1767
  `ds-dropdown__menu--${a}`,
1768
- p && "ds-dropdown__menu--closing"
1768
+ m && "ds-dropdown__menu--closing"
1769
1769
  ].filter(Boolean).join(" "),
1770
- style: B,
1771
- onKeyDown: H,
1772
- children: t.map((h, v) => {
1773
- if (h.separator)
1774
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, v);
1775
- if (h.type === "section")
1770
+ style: g,
1771
+ onKeyDown: X,
1772
+ children: t.map((x, y) => {
1773
+ if (x.separator)
1774
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
1775
+ if (x.type === "section")
1776
1776
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
1777
- h.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: h.label }),
1778
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: h.content })
1779
- ] }, v);
1780
- const R = !!h.href, P = R ? "a" : "button", z = R ? { href: h.disabled ? void 0 : h.href, "aria-disabled": h.disabled ? "true" : void 0 } : { type: "button", disabled: h.disabled };
1777
+ x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
1778
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
1779
+ ] }, y);
1780
+ const O = !!x.href, C = O ? "a" : "button", K = O ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1781
1781
  return /* @__PURE__ */ e.jsxs(
1782
- P,
1782
+ C,
1783
1783
  {
1784
1784
  role: "menuitem",
1785
1785
  className: [
1786
1786
  "ds-dropdown__item",
1787
- h.danger && "ds-dropdown__item--danger"
1787
+ x.danger && "ds-dropdown__item--danger"
1788
1788
  ].filter(Boolean).join(" "),
1789
- ...z,
1789
+ ...K,
1790
1790
  onClick: () => {
1791
- var U;
1792
- (U = h.onClick) == null || U.call(h), O();
1791
+ var Z;
1792
+ (Z = x.onClick) == null || Z.call(x), I();
1793
1793
  },
1794
1794
  children: [
1795
- h.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: h.icon }),
1796
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: h.label }),
1797
- h.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: h.shortcut })
1795
+ x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
1796
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
1797
+ x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
1798
1798
  ]
1799
1799
  },
1800
- v
1800
+ y
1801
1801
  );
1802
1802
  })
1803
1803
  }
@@ -1805,7 +1805,7 @@ function Ut({
1805
1805
  return /* @__PURE__ */ e.jsxs(
1806
1806
  "div",
1807
1807
  {
1808
- ref: _,
1808
+ ref: b,
1809
1809
  className: ["ds-dropdown", n].filter(Boolean).join(" "),
1810
1810
  style: i,
1811
1811
  ...l,
@@ -1813,19 +1813,19 @@ function Ut({
1813
1813
  /* @__PURE__ */ e.jsx(
1814
1814
  "div",
1815
1815
  {
1816
- ref: $,
1816
+ ref: R,
1817
1817
  className: "ds-dropdown__trigger",
1818
- onClick: q,
1819
- onKeyDown: G,
1818
+ onClick: v,
1819
+ onKeyDown: H,
1820
1820
  children: s
1821
1821
  }
1822
1822
  ),
1823
- typeof document < "u" && ae.createPortal(C, document.body)
1823
+ typeof document < "u" && me.createPortal(U, document.body)
1824
1824
  ]
1825
1825
  }
1826
1826
  );
1827
1827
  }
1828
- function Yt({
1828
+ function us({
1829
1829
  value: s = 0,
1830
1830
  size: t = "m",
1831
1831
  variant: r = "default",
@@ -1833,7 +1833,7 @@ function Yt({
1833
1833
  min: a = 2,
1834
1834
  animate: n = !0
1835
1835
  }) {
1836
- const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), m = r === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : r;
1836
+ const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), p = r === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : r;
1837
1837
  return /* @__PURE__ */ e.jsxs(
1838
1838
  "div",
1839
1839
  {
@@ -1850,7 +1850,7 @@ function Yt({
1850
1850
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
1851
1851
  "div",
1852
1852
  {
1853
- className: `ds-progress__fill ds-progress__fill--${m}`,
1853
+ className: `ds-progress__fill ds-progress__fill--${p}`,
1854
1854
  style: { width: `${l}%` }
1855
1855
  }
1856
1856
  ) }),
@@ -1862,50 +1862,50 @@ function Yt({
1862
1862
  }
1863
1863
  );
1864
1864
  }
1865
- const Ze = (s) => 1 - Math.pow(1 - s, 3), Qe = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1866
- function et(s, { duration: t = 600 } = {}) {
1867
- const [r, o] = k(s), a = E(s), n = E(null);
1868
- return D(() => {
1869
- if (Qe()) {
1865
+ const xt = (s) => 1 - Math.pow(1 - s, 3), bt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1866
+ function jt(s, { duration: t = 600 } = {}) {
1867
+ const [r, o] = S(s), a = $(s), n = $(null);
1868
+ return B(() => {
1869
+ if (bt()) {
1870
1870
  o(s), a.current = s;
1871
1871
  return;
1872
1872
  }
1873
1873
  const i = a.current, l = s - i;
1874
1874
  if (l === 0) return;
1875
- let m = null;
1876
- const u = (p) => {
1877
- m || (m = p);
1878
- const f = Math.min((p - m) / t, 1);
1879
- o(i + l * Ze(f)), f < 1 ? n.current = requestAnimationFrame(u) : a.current = s;
1875
+ let p = null;
1876
+ const u = (m) => {
1877
+ p || (p = m);
1878
+ const f = Math.min((m - p) / t, 1);
1879
+ o(i + l * xt(f)), f < 1 ? n.current = requestAnimationFrame(u) : a.current = s;
1880
1880
  };
1881
1881
  return n.current = requestAnimationFrame(u), () => cancelAnimationFrame(n.current);
1882
1882
  }, [s, t]), r;
1883
1883
  }
1884
- function qt({
1884
+ function fs({
1885
1885
  value: s,
1886
1886
  duration: t = 600,
1887
1887
  decimals: r = 0,
1888
1888
  prefix: o = "",
1889
1889
  suffix: a = ""
1890
1890
  }) {
1891
- const i = et(s, { duration: t }).toFixed(r);
1891
+ const i = jt(s, { duration: t }).toFixed(r);
1892
1892
  return `${o}${i}${a}`;
1893
1893
  }
1894
- function tt({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1895
- const o = E(null), [a, n] = k(!1);
1896
- return D(() => {
1894
+ function _t({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1895
+ const o = $(null), [a, n] = S(!1);
1896
+ return B(() => {
1897
1897
  const i = o.current;
1898
1898
  if (!i) return;
1899
1899
  const l = new IntersectionObserver(
1900
- ([m]) => {
1901
- m.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1900
+ ([p]) => {
1901
+ p.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1902
1902
  },
1903
1903
  { threshold: s, rootMargin: t }
1904
1904
  );
1905
1905
  return l.observe(i), () => l.disconnect();
1906
1906
  }, [s, t, r]), { ref: o, inView: a };
1907
1907
  }
1908
- function Ht({
1908
+ function ms({
1909
1909
  children: s,
1910
1910
  as: t = "div",
1911
1911
  once: r = !1,
@@ -1915,31 +1915,31 @@ function Ht({
1915
1915
  onLeave: i,
1916
1916
  ...l
1917
1917
  }) {
1918
- const { ref: m, inView: u } = tt({ threshold: o, rootMargin: a, once: r }), p = E(!1);
1919
- return D(() => {
1920
- u && !p.current && (n == null || n()), !u && p.current && (i == null || i()), p.current = u;
1921
- }, [u]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(u) : s });
1922
- }
1923
- const ve = {
1924
- default: me,
1925
- success: fe,
1926
- warning: ue,
1927
- error: de
1918
+ const { ref: p, inView: u } = _t({ threshold: o, rootMargin: a, once: r }), m = $(!1);
1919
+ return B(() => {
1920
+ u && !m.current && (n == null || n()), !u && m.current && (i == null || i()), m.current = u;
1921
+ }, [u]), /* @__PURE__ */ e.jsx(t, { ref: p, ...l, children: typeof s == "function" ? s(u) : s });
1922
+ }
1923
+ const Ie = {
1924
+ default: ge,
1925
+ success: ye,
1926
+ warning: we,
1927
+ error: Ne
1928
1928
  };
1929
- let Q = [];
1930
- const le = /* @__PURE__ */ new Set();
1931
- function Ne() {
1932
- le.forEach((s) => s([...Q]));
1929
+ let ce = [];
1930
+ const ve = /* @__PURE__ */ new Set();
1931
+ function Le() {
1932
+ ve.forEach((s) => s([...ce]));
1933
1933
  }
1934
- function st(s) {
1935
- Q = [...Q, s], Ne();
1934
+ function vt(s) {
1935
+ ce = [...ce, s], Le();
1936
1936
  }
1937
- function rt(s) {
1938
- Q = Q.filter((t) => t.id !== s), Ne();
1937
+ function Nt(s) {
1938
+ ce = ce.filter((t) => t.id !== s), Le();
1939
1939
  }
1940
- function Kt() {
1940
+ function ps() {
1941
1941
  const s = (t, r = {}) => {
1942
- st({
1942
+ vt({
1943
1943
  id: `${Date.now()}-${Math.random()}`,
1944
1944
  message: t,
1945
1945
  type: "default",
@@ -1949,13 +1949,13 @@ function Kt() {
1949
1949
  };
1950
1950
  return s.success = (t, r) => s(t, { ...r, type: "success" }), s.error = (t, r) => s(t, { ...r, type: "error" }), s.warning = (t, r) => s(t, { ...r, type: "warning" }), { toast: s };
1951
1951
  }
1952
- function nt({ data: s, onDismiss: t }) {
1953
- const [r, o] = k(!1), a = E(null);
1954
- D(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
1952
+ function wt({ data: s, onDismiss: t }) {
1953
+ const [r, o] = S(!1), a = $(null);
1954
+ B(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
1955
1955
  function n() {
1956
1956
  o(!1), setTimeout(() => t(s.id), 250);
1957
1957
  }
1958
- const i = ve[s.type] ?? ve.default;
1958
+ const i = Ie[s.type] ?? Ie.default;
1959
1959
  return /* @__PURE__ */ e.jsxs(
1960
1960
  "div",
1961
1961
  {
@@ -1967,7 +1967,7 @@ function nt({ data: s, onDismiss: t }) {
1967
1967
  role: s.type === "error" ? "alert" : "status",
1968
1968
  "aria-live": "polite",
1969
1969
  children: [
1970
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
1970
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
1971
1971
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: s.message }),
1972
1972
  /* @__PURE__ */ e.jsx(
1973
1973
  "button",
@@ -1975,26 +1975,26 @@ function nt({ data: s, onDismiss: t }) {
1975
1975
  className: "ds-toast__close",
1976
1976
  onClick: n,
1977
1977
  "aria-label": "Закрыть",
1978
- children: /* @__PURE__ */ e.jsx(ee, { size: S[3], strokeWidth: 1.5 })
1978
+ children: /* @__PURE__ */ e.jsx(ne, { size: D[3], strokeWidth: 1.5 })
1979
1979
  }
1980
1980
  )
1981
1981
  ]
1982
1982
  }
1983
1983
  );
1984
1984
  }
1985
- function Gt({ position: s = "bottom-right" }) {
1986
- const [t, r] = k(() => [...Q]);
1987
- return D(() => (le.add(r), () => le.delete(r)), []), !t.length || typeof document > "u" ? null : ae.createPortal(
1988
- /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(nt, { data: o, onDismiss: rt }, o.id)) }),
1985
+ function hs({ position: s = "bottom-right" }) {
1986
+ const [t, r] = S(() => [...ce]);
1987
+ return B(() => (ve.add(r), () => ve.delete(r)), []), !t.length || typeof document > "u" ? null : me.createPortal(
1988
+ /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(wt, { data: o, onDismiss: Nt }, o.id)) }),
1989
1989
  document.body
1990
1990
  );
1991
1991
  }
1992
- const at = {
1993
- running: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "info", children: "Running..." }),
1994
- success: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "success", children: "Done" }),
1995
- error: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "error", children: "Error" })
1992
+ const yt = {
1993
+ running: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "info", children: "Running..." }),
1994
+ success: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "success", children: "Done" }),
1995
+ error: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "error", children: "Error" })
1996
1996
  };
1997
- function Xt({
1997
+ function xs({
1998
1998
  label: s,
1999
1999
  status: t = "idle",
2000
2000
  icon: r,
@@ -2003,87 +2003,87 @@ function Xt({
2003
2003
  expanded: n,
2004
2004
  onToggle: i,
2005
2005
  padding: l = "s",
2006
- children: m,
2006
+ children: p,
2007
2007
  ...u
2008
2008
  }) {
2009
- const f = `tc-body-${Ee().replace(/:/g, "")}`, [b, d] = k(a), _ = n !== void 0, w = _ ? n : b, $ = () => {
2010
- _ ? i == null || i(!n) : d((N) => !N);
2009
+ const f = `tc-body-${ze().replace(/:/g, "")}`, [h, d] = S(a), b = n !== void 0, _ = b ? n : h, R = () => {
2010
+ b ? i == null || i(!n) : d((E) => !E);
2011
2011
  };
2012
- return /* @__PURE__ */ e.jsxs(Le, { padding: l, ...u, children: [
2012
+ return /* @__PURE__ */ e.jsxs(tt, { padding: l, ...u, children: [
2013
2013
  /* @__PURE__ */ e.jsxs(
2014
2014
  "button",
2015
2015
  {
2016
2016
  type: "button",
2017
2017
  className: "ds-tool-card__header",
2018
- onClick: $,
2019
- "aria-expanded": w,
2018
+ onClick: R,
2019
+ "aria-expanded": _,
2020
2020
  "aria-controls": f,
2021
2021
  children: [
2022
2022
  /* @__PURE__ */ e.jsx(
2023
- je,
2023
+ Be,
2024
2024
  {
2025
- size: S[1],
2025
+ size: D[1],
2026
2026
  strokeWidth: 1.5,
2027
- className: `ds-tool-card__chevron${w ? " ds-tool-card__chevron--expanded" : ""}`
2027
+ className: `ds-tool-card__chevron${_ ? " ds-tool-card__chevron--expanded" : ""}`
2028
2028
  }
2029
2029
  ),
2030
2030
  r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
2031
2031
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2032
- at[t],
2032
+ yt[t],
2033
2033
  o
2034
2034
  ]
2035
2035
  }
2036
2036
  ),
2037
- w && /* @__PURE__ */ e.jsx("div", { id: f, className: "ds-tool-card__body", children: m })
2037
+ _ && /* @__PURE__ */ e.jsx("div", { id: f, className: "ds-tool-card__body", children: p })
2038
2038
  ] });
2039
2039
  }
2040
- function Jt({
2040
+ function bs({
2041
2041
  text: s,
2042
2042
  size: t = "xs",
2043
2043
  timeout: r = 2e3,
2044
2044
  "aria-label": o = "Copy to clipboard",
2045
2045
  ...a
2046
2046
  }) {
2047
- const [n, i] = k(!1), l = () => {
2047
+ const [n, i] = S(!1), l = () => {
2048
2048
  navigator.clipboard.writeText(s).then(() => {
2049
2049
  i(!0), setTimeout(() => i(!1), r);
2050
2050
  });
2051
2051
  };
2052
2052
  return /* @__PURE__ */ e.jsx(
2053
- _e,
2053
+ fe,
2054
2054
  {
2055
2055
  variant: "ghost",
2056
2056
  size: t,
2057
- icon: n ? /* @__PURE__ */ e.jsx(re, { size: S[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Se, { size: S[1], strokeWidth: 1.5 }),
2057
+ icon: n ? /* @__PURE__ */ e.jsx(he, { size: D[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Ye, { size: D[1], strokeWidth: 1.5 }),
2058
2058
  "aria-label": o,
2059
2059
  onClick: l,
2060
2060
  ...a
2061
2061
  }
2062
2062
  );
2063
2063
  }
2064
- function Zt({ content: s, streaming: t = !1, ...r }) {
2065
- const [o, a] = k(t);
2066
- return D(() => {
2064
+ function js({ content: s, streaming: t = !1, ...r }) {
2065
+ const [o, a] = S(t);
2066
+ return B(() => {
2067
2067
  a(!!t);
2068
2068
  }, [t]), /* @__PURE__ */ e.jsx(
2069
- Ce,
2069
+ ot,
2070
2070
  {
2071
2071
  expanded: o,
2072
2072
  onToggle: a,
2073
2073
  padding: "s",
2074
2074
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2075
- /* @__PURE__ */ e.jsx(Ae, { size: S[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2076
- /* @__PURE__ */ e.jsx(Me, { secondary: !0, children: "Thinking" })
2075
+ /* @__PURE__ */ e.jsx(qe, { size: D[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2076
+ /* @__PURE__ */ e.jsx(st, { secondary: !0, children: "Thinking" })
2077
2077
  ] }),
2078
2078
  ...r,
2079
- children: /* @__PURE__ */ e.jsxs(we, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2079
+ children: /* @__PURE__ */ e.jsxs(Pe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2080
2080
  s,
2081
- t && /* @__PURE__ */ e.jsx("span", { className: "ds-reasoning__cursor" })
2081
+ t && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2082
2082
  ] })
2083
2083
  }
2084
2084
  );
2085
2085
  }
2086
- function Qt({
2086
+ function _s({
2087
2087
  count: s,
2088
2088
  current: t = 0,
2089
2089
  done: r = [],
@@ -2094,10 +2094,10 @@ function Qt({
2094
2094
  ...l
2095
2095
  }) {
2096
2096
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...l, children: [
2097
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (m, u) => {
2098
- const p = u === t, f = r.includes(u) && !p, b = o && (u <= t || r.includes(u)), d = [
2097
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (p, u) => {
2098
+ const m = u === t, f = r.includes(u) && !m, h = o && (u <= t || r.includes(u)), d = [
2099
2099
  "ds-step-indicator__dot",
2100
- p && "ds-step-indicator__dot--active",
2100
+ m && "ds-step-indicator__dot--active",
2101
2101
  f && "ds-step-indicator__dot--done"
2102
2102
  ].filter(Boolean).join(" ");
2103
2103
  return /* @__PURE__ */ e.jsx(
@@ -2106,80 +2106,506 @@ function Qt({
2106
2106
  type: "button",
2107
2107
  className: d,
2108
2108
  role: "tab",
2109
- "aria-selected": p,
2109
+ "aria-selected": m,
2110
2110
  "aria-label": `Step ${u + 1}`,
2111
- disabled: !b || u === t,
2111
+ disabled: !h || u === t,
2112
2112
  onClick: () => o == null ? void 0 : o(u),
2113
- children: f ? /* @__PURE__ */ e.jsx(re, { size: 8, strokeWidth: 3 }) : null
2113
+ children: f ? /* @__PURE__ */ e.jsx(he, { size: 8, strokeWidth: 3 }) : null
2114
2114
  },
2115
2115
  u
2116
2116
  );
2117
2117
  }) }),
2118
- a && /* @__PURE__ */ e.jsxs(we, { secondary: !0, className: "ds-step-indicator__counter", children: [
2118
+ a && /* @__PURE__ */ e.jsxs(Pe, { secondary: !0, className: "ds-step-indicator__counter", children: [
2119
2119
  t + 1,
2120
2120
  " / ",
2121
2121
  s
2122
2122
  ] })
2123
2123
  ] });
2124
2124
  }
2125
+ function vs({
2126
+ content: s,
2127
+ isStreaming: t = !1,
2128
+ cursor: r = "line",
2129
+ onChunk: o,
2130
+ className: a = "",
2131
+ ...n
2132
+ }) {
2133
+ const i = $(s);
2134
+ return B(() => {
2135
+ s !== i.current && (o == null || o(s), i.current = s);
2136
+ }, [s, o]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...n, children: [
2137
+ s,
2138
+ t && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
2139
+ ] });
2140
+ }
2141
+ function Ns({
2142
+ role: s = "assistant",
2143
+ header: t,
2144
+ footer: r,
2145
+ attachments: o,
2146
+ isStreaming: a = !1,
2147
+ children: n,
2148
+ className: i = "",
2149
+ ...l
2150
+ }) {
2151
+ const p = [
2152
+ "ds-chat-message",
2153
+ `ds-chat-message--${s}`,
2154
+ a && "ds-chat-message--streaming",
2155
+ i
2156
+ ].filter(Boolean).join(" ");
2157
+ return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: p, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: n }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: p, ...l, children: [
2158
+ o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2159
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: n }),
2160
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2161
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, ...l, children: [
2162
+ t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2163
+ o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2164
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: n }),
2165
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2166
+ ] });
2167
+ }
2168
+ function ws(s, { containerRef: t, smartPause: r = !0 } = {}) {
2169
+ const o = $(!1), a = $(0);
2170
+ B(() => {
2171
+ const n = t == null ? void 0 : t.current;
2172
+ if (!n) return;
2173
+ const i = () => {
2174
+ const l = n.scrollHeight - n.scrollTop - n.clientHeight < 64;
2175
+ !l && n.scrollTop < a.current && (o.current = !0), l && (o.current = !1), a.current = n.scrollTop;
2176
+ };
2177
+ return n.addEventListener("scroll", i, { passive: !0 }), () => n.removeEventListener("scroll", i);
2178
+ }, [t]), B(() => {
2179
+ const n = t == null ? void 0 : t.current;
2180
+ n && (r && o.current || (n.scrollTop = n.scrollHeight));
2181
+ }, s);
2182
+ }
2183
+ function gt({
2184
+ prompts: s,
2185
+ enabled: t,
2186
+ typingSpeed: r = 38,
2187
+ erasingSpeed: o = 18,
2188
+ holdTime: a = 2200,
2189
+ betweenTime: n = 380,
2190
+ manualPauseMs: i = 5e3
2191
+ }) {
2192
+ const [l, p] = S(0), [u, m] = S(""), f = $("typing"), h = $(0), d = $(0), b = $(null), _ = $(0);
2193
+ B(() => {
2194
+ d.current = l;
2195
+ }, [l]), B(() => {
2196
+ if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2197
+ m(""), h.current = 0, f.current = "typing";
2198
+ return;
2199
+ }
2200
+ const k = () => {
2201
+ const M = Date.now();
2202
+ if (_.current > M) {
2203
+ b.current = setTimeout(k, _.current - M);
2204
+ return;
2205
+ }
2206
+ const I = s[d.current % s.length] ?? "";
2207
+ f.current === "typing" ? (h.current += 1, m(I.slice(0, h.current)), h.current >= I.length ? (f.current = "holding", b.current = setTimeout(k, a)) : b.current = setTimeout(k, r + Math.random() * 28)) : f.current === "holding" ? (f.current = "erasing", b.current = setTimeout(k, o)) : (h.current = Math.max(0, h.current - 1), m(I.slice(0, h.current)), h.current <= 0 ? (f.current = "typing", d.current = (d.current + 1) % s.length, p(d.current), b.current = setTimeout(k, n)) : b.current = setTimeout(k, o));
2208
+ };
2209
+ return b.current = setTimeout(k, 260), () => {
2210
+ b.current && clearTimeout(b.current);
2211
+ };
2212
+ }, [t, s, r, o, a, n]);
2213
+ const R = (k) => {
2214
+ if (s.length === 0) return;
2215
+ const M = (k % s.length + s.length) % s.length, I = s[M];
2216
+ d.current = M, h.current = I.length, f.current = "holding", _.current = Date.now() + i, p(M), m(I);
2217
+ }, E = () => R(d.current + 1), g = () => R(d.current - 1), A = s[l % s.length] ?? "";
2218
+ return { displayed: u, currentPrompt: A, index: l, next: E, prev: g };
2219
+ }
2220
+ let kt = 0;
2221
+ function ys({
2222
+ value: s = "",
2223
+ onChange: t,
2224
+ onSubmit: r,
2225
+ onStop: o,
2226
+ onKeyDown: a,
2227
+ loading: n = !1,
2228
+ disabled: i = !1,
2229
+ placeholder: l = "Let's get things done...",
2230
+ animatedPlaceholders: p,
2231
+ attachments: u,
2232
+ images: m,
2233
+ onAttachFiles: f,
2234
+ onAttachImages: h,
2235
+ onRemoveAttachment: d,
2236
+ onRemoveImage: b,
2237
+ acceptImage: _,
2238
+ acceptFile: R,
2239
+ maxImages: E,
2240
+ maxImageSize: g,
2241
+ leftSlot: A,
2242
+ rightSlot: k,
2243
+ className: M = "",
2244
+ ...I
2245
+ }) {
2246
+ const v = $(null), L = $(null), z = $(0), [Y, H] = S(!1), [X, U] = S([]), x = (j) => {
2247
+ const T = ++kt;
2248
+ U((V) => [...V, { id: T, msg: j }]), setTimeout(() => U((V) => V.filter((G) => G.id !== T)), 6e3);
2249
+ }, y = (j) => U((T) => T.filter((V) => V.id !== j)), O = (j) => j.type.startsWith("image/"), C = () => !0, K = _ ?? O, Z = R ?? C, w = (j) => {
2250
+ const T = [], V = [], G = [], J = [];
2251
+ let te = 0, ie = E != null ? E - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2252
+ for (const se of j)
2253
+ K(se) ? g && se.size > g ? G.push(se.name) : ie > 0 ? (T.push(se), ie--) : te++ : Z(se) ? V.push(se) : J.push(se.name);
2254
+ return { imageFiles: T, docFiles: V, tooLarge: G, skipped: J, limitExceeded: te };
2255
+ }, c = (j) => {
2256
+ const { imageFiles: T, docFiles: V, tooLarge: G, skipped: J, limitExceeded: te } = w(j);
2257
+ G.length && x(`File${G.length > 1 ? "s" : ""} too large${g ? ` (max ${g / 1024 / 1024}MB)` : ""}: ${G.join(", ")}`), J.length && x(`Skipped unsupported file${J.length > 1 ? "s" : ""}: ${J.join(", ")}`), te && x(`Max ${E} images per message`), h && T.length && h(T);
2258
+ const ie = V.concat(h ? [] : T);
2259
+ f && ie.length && f(ie);
2260
+ };
2261
+ B(() => {
2262
+ const j = L.current;
2263
+ j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2264
+ }, [s]), B(() => {
2265
+ const j = (T) => {
2266
+ var G, J, te;
2267
+ if (n || i) return;
2268
+ const V = (G = T.target) == null ? void 0 : G.tagName;
2269
+ V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (J = T.target) != null && J.isContentEditable || T.ctrlKey || T.metaKey || T.altKey || T.key.length !== 1 && T.key !== "Backspace" && T.key !== "Delete" || (te = L.current) == null || te.focus();
2270
+ };
2271
+ return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2272
+ }, [n, i]);
2273
+ const N = (j) => {
2274
+ j.preventDefault(), z.current++, j.dataTransfer.types.includes("Files") && H(!0);
2275
+ }, P = (j) => {
2276
+ j.preventDefault(), z.current--, z.current === 0 && H(!1);
2277
+ }, W = (j) => j.preventDefault(), ee = (j) => {
2278
+ j.preventDefault(), z.current = 0, H(!1);
2279
+ const T = Array.from(j.dataTransfer.files);
2280
+ T.length && c(T);
2281
+ }, ae = (j) => {
2282
+ const T = Array.from(j.target.files || []);
2283
+ v.current && (v.current.value = ""), T.length && c(T);
2284
+ }, F = (j) => {
2285
+ var ie;
2286
+ if (!h) return;
2287
+ const T = (ie = j.clipboardData) == null ? void 0 : ie.items;
2288
+ if (!T) return;
2289
+ const V = [];
2290
+ for (const se of T) {
2291
+ const je = se.getAsFile();
2292
+ je && K(je) && V.push(je);
2293
+ }
2294
+ if (V.length === 0) return;
2295
+ const { imageFiles: G, tooLarge: J, limitExceeded: te } = w(V);
2296
+ J.length && x(`File${J.length > 1 ? "s" : ""} too large: ${J.join(", ")}`), te && x(`Max ${E} images per message`), G.length && (j.preventDefault(), h(G));
2297
+ }, Q = !n && !i && !!(p != null && p.length) && s.length === 0, oe = gt({
2298
+ prompts: p ?? [],
2299
+ enabled: Q
2300
+ }), be = (j) => {
2301
+ if (Q) {
2302
+ if (j.key === "ArrowDown" || j.key === "ArrowRight") {
2303
+ j.preventDefault(), oe.next();
2304
+ return;
2305
+ }
2306
+ if (j.key === "ArrowUp" || j.key === "ArrowLeft") {
2307
+ j.preventDefault(), oe.prev();
2308
+ return;
2309
+ }
2310
+ if (j.key === "Tab" && !j.shiftKey) {
2311
+ j.preventDefault(), t == null || t(oe.currentPrompt);
2312
+ return;
2313
+ }
2314
+ }
2315
+ a == null || a(j);
2316
+ }, Oe = (s.trim() || (m == null ? void 0 : m.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, ke = f || h;
2317
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...I, children: [
2318
+ ke && /* @__PURE__ */ e.jsx(
2319
+ "input",
2320
+ {
2321
+ ref: v,
2322
+ type: "file",
2323
+ multiple: !0,
2324
+ accept: "*/*",
2325
+ className: "ds-prompt-input__file-input",
2326
+ onChange: ae
2327
+ }
2328
+ ),
2329
+ /* @__PURE__ */ e.jsxs(
2330
+ "div",
2331
+ {
2332
+ className: ["ds-prompt-input__box", Y && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2333
+ onDragEnter: N,
2334
+ onDragLeave: P,
2335
+ onDragOver: W,
2336
+ onDrop: ee,
2337
+ children: [
2338
+ Y && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2339
+ /* @__PURE__ */ e.jsx(
2340
+ "textarea",
2341
+ {
2342
+ ref: L,
2343
+ value: s,
2344
+ onChange: (j) => t == null ? void 0 : t(j.target.value),
2345
+ onKeyDown: be,
2346
+ onPaste: F,
2347
+ placeholder: Q ? "" : l,
2348
+ disabled: n || i,
2349
+ rows: 1,
2350
+ className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2351
+ }
2352
+ ),
2353
+ Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2354
+ /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2355
+ /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2356
+ ] }),
2357
+ m && m.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: m.map((j, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2358
+ /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2359
+ /* @__PURE__ */ e.jsx(
2360
+ "button",
2361
+ {
2362
+ className: "ds-prompt-input__image-remove",
2363
+ onClick: () => b == null ? void 0 : b(T),
2364
+ "aria-label": "Remove image",
2365
+ type: "button",
2366
+ children: /* @__PURE__ */ e.jsx(ne, { size: 12, strokeWidth: 2 })
2367
+ }
2368
+ )
2369
+ ] }, T)) }),
2370
+ X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((j) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2371
+ /* @__PURE__ */ e.jsx("span", { children: j.msg }),
2372
+ /* @__PURE__ */ e.jsx(
2373
+ "button",
2374
+ {
2375
+ type: "button",
2376
+ className: "ds-prompt-input__warning-close",
2377
+ onClick: () => y(j.id),
2378
+ "aria-label": "Dismiss",
2379
+ children: /* @__PURE__ */ e.jsx(ne, { size: D[1], strokeWidth: 1.5 })
2380
+ }
2381
+ )
2382
+ ] }, j.id)) }),
2383
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((j, T) => /* @__PURE__ */ e.jsx(pe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2384
+ j.uploading ? /* @__PURE__ */ e.jsx(He, { size: D[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ee, { size: D[1], strokeWidth: 1.5 }),
2385
+ j.filename,
2386
+ j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2387
+ "button",
2388
+ {
2389
+ type: "button",
2390
+ className: "ds-prompt-input__remove-btn",
2391
+ onClick: () => d == null ? void 0 : d(T),
2392
+ children: /* @__PURE__ */ e.jsx(ne, { size: D[1], strokeWidth: 1.5 })
2393
+ }
2394
+ )
2395
+ ] }) }, T)) }),
2396
+ /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2397
+ ke && /* @__PURE__ */ e.jsx(
2398
+ fe,
2399
+ {
2400
+ variant: "ghost",
2401
+ size: "xs",
2402
+ icon: /* @__PURE__ */ e.jsx(Ee, { size: D[2], strokeWidth: 1.5 }),
2403
+ "aria-label": "Attach files",
2404
+ onClick: () => {
2405
+ var j;
2406
+ return (j = v.current) == null ? void 0 : j.click();
2407
+ }
2408
+ }
2409
+ ),
2410
+ A,
2411
+ k,
2412
+ /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2413
+ n ? /* @__PURE__ */ e.jsx(
2414
+ fe,
2415
+ {
2416
+ variant: "primary",
2417
+ size: "xs",
2418
+ icon: /* @__PURE__ */ e.jsx(Ke, { size: D[2], strokeWidth: 1.5 }),
2419
+ onClick: o,
2420
+ "aria-label": "Stop"
2421
+ }
2422
+ ) : /* @__PURE__ */ e.jsx(
2423
+ fe,
2424
+ {
2425
+ variant: "primary",
2426
+ size: "xs",
2427
+ icon: /* @__PURE__ */ e.jsx(Ge, { size: D[2], strokeWidth: 1.5 }),
2428
+ onClick: r,
2429
+ disabled: !Oe,
2430
+ "aria-label": "Send"
2431
+ }
2432
+ )
2433
+ ] })
2434
+ ]
2435
+ }
2436
+ )
2437
+ ] });
2438
+ }
2439
+ const De = { fast: 0, standard: 1, premium: 2 };
2440
+ function gs({
2441
+ models: s = [],
2442
+ value: t,
2443
+ onChange: r,
2444
+ size: o = "xs",
2445
+ minTier: a,
2446
+ showAutoOption: n = !1,
2447
+ groupByTier: i = !0,
2448
+ className: l = "",
2449
+ ...p
2450
+ }) {
2451
+ const [u, m] = S(!1), f = $(null), h = $(null), [d, b] = S({}), _ = s.filter((v) => !a || v.name === "auto" ? !0 : (De[v.tier] ?? 1) >= (De[a] ?? 1)), R = _.find((v) => v.name === "auto"), E = _.filter((v) => v.name !== "auto"), g = s.find((v) => v.name === t);
2452
+ B(() => {
2453
+ var Y;
2454
+ if (!u) return;
2455
+ const v = (Y = f.current) == null ? void 0 : Y.getBoundingClientRect();
2456
+ v && b({
2457
+ position: "fixed",
2458
+ zIndex: "var(--z-dropdown, 500)",
2459
+ top: v.bottom + 4,
2460
+ right: window.innerWidth - v.right
2461
+ });
2462
+ const L = (H) => {
2463
+ var X, U;
2464
+ !((X = f.current) != null && X.contains(H.target)) && !((U = h.current) != null && U.contains(H.target)) && m(!1);
2465
+ }, z = (H) => {
2466
+ H.key === "Escape" && m(!1);
2467
+ };
2468
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", z), () => {
2469
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", z);
2470
+ };
2471
+ }, [u]);
2472
+ const A = (v) => {
2473
+ r == null || r(v), m(!1);
2474
+ }, k = (v) => /* @__PURE__ */ e.jsxs(
2475
+ "button",
2476
+ {
2477
+ type: "button",
2478
+ className: [
2479
+ "ds-model-picker__item",
2480
+ v.name === t && "ds-model-picker__item--active"
2481
+ ].filter(Boolean).join(" "),
2482
+ onClick: () => A(v.name),
2483
+ children: [
2484
+ v.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: v.icon }) : /* @__PURE__ */ e.jsx($e, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2485
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: v.displayName || v.name }),
2486
+ v.tier && /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__tier-badge", "data-tier": v.tier, children: v.tier })
2487
+ ]
2488
+ },
2489
+ v.name
2490
+ ), M = () => i ? ["fast", "standard", "premium"].flatMap((v) => {
2491
+ const L = E.filter((z) => z.tier === v);
2492
+ return L.length ? [
2493
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": v, children: v.charAt(0).toUpperCase() + v.slice(1) }, `lbl-${v}`),
2494
+ ...L.map(k)
2495
+ ] : [];
2496
+ }) : E.map(k), I = u && /* @__PURE__ */ e.jsxs("div", { ref: h, className: "ds-model-picker__menu", style: d, children: [
2497
+ n && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2498
+ /* @__PURE__ */ e.jsxs(
2499
+ "button",
2500
+ {
2501
+ type: "button",
2502
+ className: [
2503
+ "ds-model-picker__item",
2504
+ "ds-model-picker__item--auto",
2505
+ t === "auto" && "ds-model-picker__item--active"
2506
+ ].filter(Boolean).join(" "),
2507
+ onClick: () => A("auto"),
2508
+ children: [
2509
+ /* @__PURE__ */ e.jsx(Xe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2510
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2511
+ ]
2512
+ }
2513
+ ),
2514
+ E.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2515
+ ] }),
2516
+ M()
2517
+ ] });
2518
+ return /* @__PURE__ */ e.jsxs(
2519
+ "div",
2520
+ {
2521
+ ref: f,
2522
+ className: ["ds-model-picker", l].filter(Boolean).join(" "),
2523
+ ...p,
2524
+ children: [
2525
+ /* @__PURE__ */ e.jsxs(
2526
+ "button",
2527
+ {
2528
+ type: "button",
2529
+ className: "ds-model-picker__trigger",
2530
+ onClick: () => m((v) => !v),
2531
+ "aria-haspopup": "listbox",
2532
+ "aria-expanded": u,
2533
+ children: [
2534
+ g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx($e, { size: 12, strokeWidth: 1.5 }),
2535
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (g == null ? void 0 : g.displayName) || (g == null ? void 0 : g.name) || t }),
2536
+ (g == null ? void 0 : g.tier) && /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__tier-badge", "data-tier": g.tier, children: g.tier })
2537
+ ]
2538
+ }
2539
+ ),
2540
+ typeof document < "u" && me.createPortal(I, document.body)
2541
+ ]
2542
+ }
2543
+ );
2544
+ }
2125
2545
  export {
2126
- Ce as Accordion,
2127
- vt as Alert,
2128
- qt as AnimatedNumber,
2129
- Tt as Avatar,
2130
- ie as Badge,
2131
- Vt as Banner,
2132
- zt as Breadcrumb,
2133
- _e as Button,
2134
- Le as Card,
2135
- gt as Checkbox,
2136
- _t as Code,
2137
- Fe as CodeAccordion,
2138
- Jt as CopyButton,
2139
- Ct as Drawer,
2140
- xe as DrawerFooter,
2141
- Ut as Dropdown,
2142
- Lt as EmptyState,
2143
- Mt as FormField,
2144
- mt as H1,
2145
- pt as H2,
2146
- ht as H3,
2147
- bt as H4,
2148
- Ht as InView,
2149
- lt as Input,
2150
- wt as Link,
2151
- jt as Modal,
2152
- be as ModalFooter,
2153
- xt as P1,
2154
- Me as P2,
2155
- we as P3,
2156
- Ft as Pagination,
2157
- Yt as ProgressBar,
2158
- Rt as Radio,
2159
- Zt as ReasoningBlock,
2160
- kt as SegmentedControl,
2161
- ut as Select,
2162
- Ye as Skeleton,
2163
- Be as Spinner,
2164
- Wt as Stat,
2165
- Qt as StepIndicator,
2166
- ft as Stepper,
2167
- yt as Tab,
2168
- It as Table,
2169
- At as TableBody,
2170
- St as TableHead,
2171
- Dt as TableRow,
2172
- Pt as TableSubheaderRow,
2173
- Nt as Tabs,
2174
- Ot as Td,
2175
- dt as Textarea,
2176
- Bt as Th,
2177
- Gt as ToastContainer,
2178
- $t as Toggle,
2179
- Xt as ToolCallCard,
2180
- Et as Tooltip,
2181
- S as iconSizes,
2182
- et as useAnimatedNumber,
2183
- tt as useInView,
2184
- Kt as useToast
2546
+ ot as Accordion,
2547
+ Mt as Alert,
2548
+ fs as AnimatedNumber,
2549
+ Gt as Avatar,
2550
+ pe as Badge,
2551
+ cs as Banner,
2552
+ os as Breadcrumb,
2553
+ fe as Button,
2554
+ tt as Card,
2555
+ Ns as ChatMessage,
2556
+ Ht as Checkbox,
2557
+ Wt as Code,
2558
+ at as CodeAccordion,
2559
+ bs as CopyButton,
2560
+ ls as Drawer,
2561
+ Ae as DrawerFooter,
2562
+ ds as Dropdown,
2563
+ rs as EmptyState,
2564
+ ns as FormField,
2565
+ Dt as H1,
2566
+ Bt as H2,
2567
+ Pt as H3,
2568
+ Lt as H4,
2569
+ ms as InView,
2570
+ Rt as Input,
2571
+ Ft as Link,
2572
+ zt as Modal,
2573
+ Se as ModalFooter,
2574
+ gs as ModelPicker,
2575
+ Ot as P1,
2576
+ st as P2,
2577
+ Pe as P3,
2578
+ is as Pagination,
2579
+ us as ProgressBar,
2580
+ ys as PromptInput,
2581
+ Kt as Radio,
2582
+ js as ReasoningBlock,
2583
+ Vt as SegmentedControl,
2584
+ At as Select,
2585
+ ct as Skeleton,
2586
+ Qe as Spinner,
2587
+ as as Stat,
2588
+ _s as StepIndicator,
2589
+ It as Stepper,
2590
+ vs as StreamingText,
2591
+ Ut as Tab,
2592
+ Xt as Table,
2593
+ Zt as TableBody,
2594
+ Jt as TableHead,
2595
+ Qt as TableRow,
2596
+ es as TableSubheaderRow,
2597
+ Ct as Tabs,
2598
+ ss as Td,
2599
+ St as Textarea,
2600
+ ts as Th,
2601
+ hs as ToastContainer,
2602
+ qt as Toggle,
2603
+ xs as ToolCallCard,
2604
+ Yt as Tooltip,
2605
+ D as iconSizes,
2606
+ jt as useAnimatedNumber,
2607
+ gt as useAnimatedPlaceholder,
2608
+ _t as useInView,
2609
+ ws as useStreamScroll,
2610
+ ps as useToast
2185
2611
  };