@donkit-ai/design-system 1.4.54 → 1.4.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import Y, { useState as A, useRef as T, useEffect as D, useLayoutEffect as Qe, useContext as $e, createContext as et, useCallback as He } from "react";
1
+ import Y, { useState as A, useRef as R, useEffect as D, useLayoutEffect as Qe, useContext as $e, createContext as et, useCallback as He } from "react";
2
2
  import { Check as Te, X as ee, ChevronDown as _e, Minus as tt, Plus as st, XCircle as Re, AlertTriangle as Se, CheckCircle as Ae, Info as Be, ChevronUp as nt, ChevronsUpDown as rt, ChevronLeft as at, ChevronRight as ot, Copy as it, Brain as lt, Loader as ct, Paperclip as Pe, Square as dt, ArrowUp as ut, Zap as ft, Cpu as Me, FileText as mt, ThumbsUp as pt, ThumbsDown as ht } from "lucide-react";
3
3
  import he from "react-dom";
4
- const P = {
4
+ const M = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
@@ -63,11 +63,11 @@ function vt() {
63
63
  return "Fragment";
64
64
  case k:
65
65
  return "Profiler";
66
- case w:
66
+ case y:
67
67
  return "StrictMode";
68
68
  case L:
69
69
  return "Suspense";
70
- case W:
70
+ case H:
71
71
  return "SuspenseList";
72
72
  case b:
73
73
  return "Activity";
@@ -76,18 +76,18 @@ function vt() {
76
76
  switch (typeof f.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
78
  ), f.$$typeof) {
79
- case v:
79
+ case x:
80
80
  return "Portal";
81
- case E:
81
+ case T:
82
82
  return f.displayName || "Context";
83
83
  case j:
84
84
  return (f._context.displayName || "Context") + ".Consumer";
85
- case M:
85
+ case z:
86
86
  var $ = f.render;
87
87
  return f = f.displayName, f || (f = $.displayName || $.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
88
- case H:
88
+ case U:
89
89
  return $ = f.displayName || null, $ !== null ? $ : t(f.type) || "Memo";
90
- case z:
90
+ case W:
91
91
  $ = f._payload, f = f._init;
92
92
  try {
93
93
  return t(f($));
@@ -118,7 +118,7 @@ function vt() {
118
118
  }
119
119
  function a(f) {
120
120
  if (f === g) return "<>";
121
- if (typeof f == "object" && f !== null && f.$$typeof === z)
121
+ if (typeof f == "object" && f !== null && f.$$typeof === W)
122
122
  return "<...>";
123
123
  try {
124
124
  var $ = t(f);
@@ -135,7 +135,7 @@ function vt() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(f) {
138
- if (U.call(f, "key")) {
138
+ if (P.call(f, "key")) {
139
139
  var $ = Object.getOwnPropertyDescriptor(f, "key").get;
140
140
  if ($ && $.isReactWarning) return !1;
141
141
  }
@@ -162,7 +162,7 @@ function vt() {
162
162
  function d(f, $, F, V, ne, oe) {
163
163
  var q = F.ref;
164
164
  return f = {
165
- $$typeof: x,
165
+ $$typeof: v,
166
166
  type: f,
167
167
  key: $,
168
168
  props: F,
@@ -205,12 +205,12 @@ function vt() {
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
207
  else p(q);
208
- if (U.call($, "key")) {
208
+ if (P.call($, "key")) {
209
209
  q = t(f);
210
210
  var Q = Object.keys($).filter(function(Ne) {
211
211
  return Ne !== "key";
212
212
  });
213
- V = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", R[q + V] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ V = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", E[q + V] || (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} />
@@ -221,7 +221,7 @@ React keys must be passed directly to JSX without using spread:
221
221
  q,
222
222
  Q,
223
223
  q
224
- ), R[q + V] = !0);
224
+ ), E[q + V] = !0);
225
225
  }
226
226
  if (q = null, F !== void 0 && (n(F), q = "" + F), i($) && (n($.key), q = "" + $.key), "key" in $) {
227
227
  F = {};
@@ -241,12 +241,12 @@ React keys must be passed directly to JSX without using spread:
241
241
  );
242
242
  }
243
243
  function p(f) {
244
- h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
244
+ h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === W && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
245
245
  }
246
246
  function h(f) {
247
- return typeof f == "object" && f !== null && f.$$typeof === x;
247
+ return typeof f == "object" && f !== null && f.$$typeof === v;
248
248
  }
249
- var c = Y, x = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), E = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), b = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), O = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, _ = Array.isArray, y = console.createTask ? console.createTask : function() {
249
+ var c = Y, v = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), T = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), b = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), O = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, _ = Array.isArray, w = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  c = {
@@ -257,7 +257,7 @@ React keys must be passed directly to JSX without using spread:
257
257
  var S, C = {}, K = c.react_stack_bottom_frame.bind(
258
258
  c,
259
259
  r
260
- )(), X = y(a(r)), R = {};
260
+ )(), X = w(a(r)), E = {};
261
261
  ve.Fragment = g, ve.jsx = function(f, $, F) {
262
262
  var V = 1e4 > O.recentlyCreatedOwnerStacks++;
263
263
  return m(
@@ -266,7 +266,7 @@ React keys must be passed directly to JSX without using spread:
266
266
  F,
267
267
  !1,
268
268
  V ? Error("react-stack-top-frame") : K,
269
- V ? y(a(f)) : X
269
+ V ? w(a(f)) : X
270
270
  );
271
271
  }, ve.jsxs = function(f, $, F) {
272
272
  var V = 1e4 > O.recentlyCreatedOwnerStacks++;
@@ -276,7 +276,7 @@ React keys must be passed directly to JSX without using spread:
276
276
  F,
277
277
  !0,
278
278
  V ? Error("react-stack-top-frame") : K,
279
- V ? y(a(f)) : X
279
+ V ? w(a(f)) : X
280
280
  );
281
281
  };
282
282
  }()), ve;
@@ -310,20 +310,20 @@ function ae({
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const c = o && !t, x = i === "loading", v = i === "success", g = i === "error", w = x || v || g, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", E = bt[n] ?? 16, M = x ? /* @__PURE__ */ e.jsx(_t, { size: k, color: j }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Te, { size: E, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: E, strokeWidth: 2.5 }) }) : null, L = [
313
+ const c = o && !t, v = i === "loading", x = i === "success", g = i === "error", y = v || x || g, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", T = bt[n] ?? 16, z = v ? /* @__PURE__ */ e.jsx(_t, { size: k, color: j }) : x ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Te, { size: T, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: T, strokeWidth: 2.5 }) }) : null, L = [
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
317
317
  a && "ds-button--full",
318
318
  c && "ds-button--icon-only",
319
319
  p
320
- ].filter(Boolean).join(" "), W = i !== "idle" ? i : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- w ? M : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
320
+ ].filter(Boolean).join(" "), H = i !== "idle" ? i : void 0, U = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
+ y ? z : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
322
322
  t
323
323
  ] });
324
324
  if (d) {
325
- const z = (b) => {
326
- if (r || x) {
325
+ const W = (b) => {
326
+ if (r || v) {
327
327
  b.preventDefault();
328
328
  return;
329
329
  }
@@ -333,14 +333,14 @@ function ae({
333
333
  "a",
334
334
  {
335
335
  className: L,
336
- href: r || x ? void 0 : d,
337
- onClick: z,
336
+ href: r || v ? void 0 : d,
337
+ onClick: W,
338
338
  "aria-label": m,
339
- "aria-disabled": r || x ? "true" : void 0,
340
- "aria-busy": x ? "true" : void 0,
341
- "data-state": W,
339
+ "aria-disabled": r || v ? "true" : void 0,
340
+ "aria-busy": v ? "true" : void 0,
341
+ "data-state": H,
342
342
  ...h,
343
- children: H
343
+ children: U
344
344
  }
345
345
  );
346
346
  }
@@ -350,12 +350,12 @@ function ae({
350
350
  type: u,
351
351
  className: L,
352
352
  disabled: r,
353
- onClick: x ? void 0 : l,
353
+ onClick: v ? void 0 : l,
354
354
  "aria-label": m,
355
- "aria-busy": x ? "true" : void 0,
356
- "data-state": W,
355
+ "aria-busy": v ? "true" : void 0,
356
+ "data-state": H,
357
357
  ...h,
358
- children: H
358
+ children: U
359
359
  }
360
360
  );
361
361
  }
@@ -372,7 +372,7 @@ function as({
372
372
  id: d,
373
373
  ...m
374
374
  }) {
375
- const p = d || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, c = s ? `${p}-error` : void 0, x = c || h;
375
+ const p = d || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, c = s ? `${p}-error` : void 0, v = c || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${u ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -384,7 +384,7 @@ function as({
384
384
  className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
385
  disabled: u,
386
386
  "aria-invalid": s ? "true" : "false",
387
- "aria-describedby": x,
387
+ "aria-describedby": v,
388
388
  ...m
389
389
  }
390
390
  ),
@@ -448,67 +448,67 @@ function is({
448
448
  id: d,
449
449
  ...m
450
450
  }) {
451
- const [p, h] = A(!1), [c, x] = A(!1), [v, g] = A({}), [w, k] = A("down"), [j, E] = A(-1), M = T(null), L = T(null), W = T(null), H = T(null), z = d || `select-${Y.useId()}`, b = `${z}-label`, I = r ? `${z}-error` : void 0, O = 150, U = (R = !1) => {
452
- c || (x(!0), E(-1), H.current = setTimeout(() => {
451
+ const [p, h] = A(!1), [c, v] = A(!1), [x, g] = A({}), [y, k] = A("down"), [j, T] = A(-1), z = R(null), L = R(null), H = R(null), U = R(null), W = d || `select-${Y.useId()}`, b = `${W}-label`, I = r ? `${W}-error` : void 0, O = 150, P = (E = !1) => {
452
+ c || (v(!0), T(-1), U.current = setTimeout(() => {
453
453
  var f;
454
- h(!1), x(!1), R && ((f = W.current) == null || f.focus());
454
+ h(!1), v(!1), E && ((f = H.current) == null || f.focus());
455
455
  }, O));
456
- }, _ = (R) => {
457
- clearTimeout(H.current), x(!1);
458
- const f = R !== void 0 ? R : Math.max(a.findIndex(($) => $.value === s), 0);
459
- E(f), h(!0);
456
+ }, _ = (E) => {
457
+ clearTimeout(U.current), v(!1);
458
+ const f = E !== void 0 ? E : Math.max(a.findIndex(($) => $.value === s), 0);
459
+ T(f), h(!0);
460
460
  };
461
- D(() => () => clearTimeout(H.current), []);
462
- const y = () => {
461
+ D(() => () => clearTimeout(U.current), []);
462
+ const w = () => {
463
463
  var oe;
464
- const R = (oe = M.current) == null ? void 0 : oe.getBoundingClientRect();
465
- if (!R) return;
466
- const f = window.innerHeight, $ = f - R.bottom, F = R.top, ne = $ < 300 && F > $;
464
+ const E = (oe = z.current) == null ? void 0 : oe.getBoundingClientRect();
465
+ if (!E) return;
466
+ const f = window.innerHeight, $ = f - E.bottom, F = E.top, ne = $ < 300 && F > $;
467
467
  k(ne ? "up" : "down"), g(
468
- ne ? { bottom: f - R.top + 4, left: R.left, width: R.width } : { top: R.bottom + 4, left: R.left, width: R.width }
468
+ ne ? { bottom: f - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
469
469
  );
470
470
  };
471
471
  D(() => {
472
472
  if (p)
473
- return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
474
- window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
473
+ return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
474
+ window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
475
475
  };
476
476
  }, [p]), D(() => {
477
- const R = (f) => {
478
- M.current && !M.current.contains(f.target) && L.current && !L.current.contains(f.target) && U();
477
+ const E = (f) => {
478
+ z.current && !z.current.contains(f.target) && L.current && !L.current.contains(f.target) && P();
479
479
  };
480
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
480
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
481
481
  }, [c]), D(() => {
482
482
  var f;
483
483
  if (!p || j < 0 || !L.current) return;
484
484
  (f = L.current.querySelectorAll(".ds-select-option")[j]) == null || f.scrollIntoView({ block: "nearest" });
485
485
  }, [j, p]);
486
- const S = (R) => {
487
- switch (R.key) {
486
+ const S = (E) => {
487
+ switch (E.key) {
488
488
  case "ArrowDown":
489
- R.preventDefault(), p ? E((f) => Math.min(f + 1, a.length - 1)) : _();
489
+ E.preventDefault(), p ? T((f) => Math.min(f + 1, a.length - 1)) : _();
490
490
  break;
491
491
  case "ArrowUp":
492
- R.preventDefault(), p ? E((f) => Math.max(f - 1, 0)) : _(a.length - 1);
492
+ E.preventDefault(), p ? T((f) => Math.max(f - 1, 0)) : _(a.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && (R.preventDefault(), E(0));
495
+ p && (E.preventDefault(), T(0));
496
496
  break;
497
497
  case "End":
498
- p && (R.preventDefault(), E(a.length - 1));
498
+ p && (E.preventDefault(), T(a.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- R.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), U(!0)) : _();
502
+ E.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), P(!0)) : _();
503
503
  break;
504
504
  case "Escape":
505
- p && (R.preventDefault(), U(!0));
505
+ p && (E.preventDefault(), P(!0));
506
506
  break;
507
507
  case "Tab":
508
- p && U(!1);
508
+ p && P(!1);
509
509
  break;
510
510
  }
511
- }, C = a.find((R) => R.value === s), K = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], X = p && /* @__PURE__ */ e.jsx(
511
+ }, C = a.find((E) => E.value === s), K = l === "xs" ? M[1] : l === "small" ? M[2] : M[3], X = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
514
  ref: L,
@@ -519,51 +519,51 @@ function is({
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
- `ds-select-dropdown--${w}`,
522
+ `ds-select-dropdown--${y}`,
523
523
  c && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
- style: v,
526
- children: a.map((R, f) => /* @__PURE__ */ e.jsx(
525
+ style: x,
526
+ children: a.map((E, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
- id: `${z}-opt-${f}`,
529
+ id: `${W}-opt-${f}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": s === R.value,
533
+ "aria-selected": s === E.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- s === R.value && "ds-select-option--selected",
537
+ s === E.value && "ds-select-option--selected",
538
538
  f === j && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- n == null || n(R.value), U(!0);
541
+ n == null || n(E.value), P(!0);
542
542
  },
543
- children: R.label
543
+ children: E.label
544
544
  },
545
- R.value
545
+ E.value
546
546
  ))
547
547
  }
548
548
  );
549
549
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${u ? "ds-select-wrapper--disabled" : ""}`, children: [
550
550
  t && /* @__PURE__ */ e.jsx("label", { id: b, className: "ds-select-label", children: t }),
551
- /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
551
+ /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: z, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
- ref: W,
554
+ ref: H,
555
555
  type: "button",
556
- id: z,
556
+ id: W,
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && j >= 0 ? `${z}-opt-${j}` : void 0,
560
+ "aria-activedescendant": p && j >= 0 ? `${W}-opt-${j}` : void 0,
561
561
  "aria-labelledby": t ? b : void 0,
562
562
  "aria-invalid": r ? "true" : "false",
563
563
  "aria-describedby": I,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- u || (p ? U() : _());
566
+ u || (p ? P() : _());
567
567
  },
568
568
  onKeyDown: S,
569
569
  disabled: u,
@@ -575,7 +575,7 @@ function is({
575
575
  {
576
576
  size: K,
577
577
  strokeWidth: 1.5,
578
- className: `ds-select-icon ${p && w === "down" ? "ds-select-icon--open" : ""} ${p && w === "up" ? "ds-select-icon--up" : ""}`,
578
+ className: `ds-select-icon ${p && y === "down" ? "ds-select-icon--open" : ""} ${p && y === "up" ? "ds-select-icon--up" : ""}`,
579
579
  "aria-hidden": "true"
580
580
  }
581
581
  )
@@ -601,36 +601,36 @@ function ls({
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const w = Math.min(Number(s) + r, o);
605
- n == null || n(w);
604
+ const y = Math.min(Number(s) + r, o);
605
+ n == null || n(y);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const w = Math.max(Number(s) - r, a);
609
- n == null || n(w);
610
- }, c = (w) => {
608
+ const y = Math.max(Number(s) - r, a);
609
+ n == null || n(y);
610
+ }, c = (y) => {
611
611
  if (l) return;
612
- const k = w.target.value;
612
+ const k = y.target.value;
613
613
  if (k === "") {
614
614
  n == null || n(a);
615
615
  return;
616
616
  }
617
617
  const j = Number(k);
618
618
  if (!isNaN(j)) {
619
- const E = Math.min(Math.max(j, a), o);
620
- n == null || n(E);
619
+ const T = Math.min(Math.max(j, a), o);
620
+ n == null || n(T);
621
621
  }
622
- }, x = [
622
+ }, v = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
625
  d && "ds-stepper-wrapper--error"
626
- ].filter(Boolean).join(" "), v = [
626
+ ].filter(Boolean).join(" "), x = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), g = i === "xs" ? P[1] : i === "small" ? P[2] : P[3];
631
- return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
630
+ ].filter(Boolean).join(" "), g = i === "xs" ? M[1] : i === "small" ? M[2] : M[3];
631
+ return /* @__PURE__ */ e.jsxs("div", { className: v, children: [
632
632
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
633
- /* @__PURE__ */ e.jsxs("div", { className: v, children: [
633
+ /* @__PURE__ */ e.jsxs("div", { className: x, children: [
634
634
  /* @__PURE__ */ e.jsx(
635
635
  "button",
636
636
  {
@@ -689,12 +689,12 @@ function cs({
689
689
  d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
691
  if (r) {
692
- const c = (x) => {
692
+ const c = (v) => {
693
693
  if (i) {
694
- x.preventDefault();
694
+ v.preventDefault();
695
695
  return;
696
696
  }
697
- x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), o == null || o(x));
697
+ v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), o == null || o(v));
698
698
  };
699
699
  return /* @__PURE__ */ e.jsx(
700
700
  "a",
@@ -775,7 +775,7 @@ function hs({
775
775
  }) {
776
776
  const i = Nt[s], l = o || (s === "error" ? "alert" : "status");
777
777
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${s} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
778
- i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: P[3], strokeWidth: 1.5 }) }),
778
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: M[3], strokeWidth: 1.5 }) }),
779
779
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
780
780
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: n }),
781
781
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: t })
@@ -787,7 +787,7 @@ function hs({
787
787
  className: "ds-alert__close",
788
788
  onClick: a,
789
789
  "aria-label": "Close alert",
790
- children: /* @__PURE__ */ e.jsx(ee, { size: P[3], strokeWidth: 1.5 })
790
+ children: /* @__PURE__ */ e.jsx(ee, { size: M[3], strokeWidth: 1.5 })
791
791
  }
792
792
  )
793
793
  ] });
@@ -802,24 +802,24 @@ function xs({
802
802
  subHeader: r,
803
803
  ...i
804
804
  }) {
805
- const l = T(null), u = Y.useId(), [d, m] = A(!1), p = () => {
805
+ const l = R(null), u = Y.useId(), [d, m] = A(!1), p = () => {
806
806
  !n || d || (m(!0), setTimeout(() => {
807
807
  m(!1), n();
808
808
  }, gt));
809
809
  };
810
810
  D(() => {
811
- const v = (w) => {
812
- w.key === "Escape" && p();
813
- }, g = (w) => {
814
- var j, E, M;
815
- const k = ((E = (j = w.composedPath) == null ? void 0 : j.call(w)) == null ? void 0 : E[0]) ?? w.target;
816
- l.current && !l.current.contains(k) && !((M = k.closest) != null && M.call(k, "[data-ds-portal]")) && p();
811
+ const x = (y) => {
812
+ y.key === "Escape" && p();
813
+ }, g = (y) => {
814
+ var j, T, z;
815
+ const k = ((T = (j = y.composedPath) == null ? void 0 : j.call(y)) == null ? void 0 : T[0]) ?? y.target;
816
+ l.current && !l.current.contains(k) && !((z = k.closest) != null && z.call(k, "[data-ds-portal]")) && p();
817
817
  };
818
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", g), () => {
819
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", g);
818
+ return document.addEventListener("keydown", x), document.addEventListener("mousedown", g), () => {
819
+ document.removeEventListener("keydown", x), document.removeEventListener("mousedown", g);
820
820
  };
821
821
  }, [n, d]);
822
- const h = Y.Children.toArray(t), c = h.find((v) => (v == null ? void 0 : v.type) === me), x = h.filter((v) => (v == null ? void 0 : v.type) !== me);
822
+ const h = Y.Children.toArray(t), c = h.find((x) => (x == null ? void 0 : x.type) === me), v = h.filter((x) => (x == null ? void 0 : x.type) !== me);
823
823
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
824
824
  "div",
825
825
  {
@@ -835,7 +835,7 @@ function xs({
835
835
  className: "ds-modal__close",
836
836
  variant: "ghost",
837
837
  size: "small",
838
- icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
838
+ icon: /* @__PURE__ */ e.jsx(ee, { size: M[2], strokeWidth: 1.5 }),
839
839
  onClick: p,
840
840
  "aria-label": "Close modal"
841
841
  }
@@ -844,7 +844,7 @@ function xs({
844
844
  s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-modal__title", children: s }),
845
845
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
846
846
  ] }),
847
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
847
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: v }),
848
848
  c
849
849
  ]
850
850
  }
@@ -861,21 +861,21 @@ function vs({
861
861
  subHeader: a,
862
862
  ...o
863
863
  }) {
864
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
864
+ const r = R(null), i = Y.useId(), [l, u] = A(!1), d = () => {
865
865
  !n || l || (u(!0), setTimeout(() => {
866
866
  u(!1), n();
867
867
  }, wt));
868
868
  };
869
869
  D(() => {
870
- const c = (v) => {
871
- v.key === "Escape" && d();
872
- }, x = (v) => {
873
- var w, k, j;
874
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
870
+ const c = (x) => {
871
+ x.key === "Escape" && d();
872
+ }, v = (x) => {
873
+ var y, k, j;
874
+ const g = ((k = (y = x.composedPath) == null ? void 0 : y.call(x)) == null ? void 0 : k[0]) ?? x.target;
875
875
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
876
876
  };
877
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
878
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
877
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
878
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
879
879
  };
880
880
  }, [n, l]);
881
881
  const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== me);
@@ -900,7 +900,7 @@ function vs({
900
900
  className: "ds-bottom-sheet__close",
901
901
  variant: "ghost",
902
902
  size: "small",
903
- icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
903
+ icon: /* @__PURE__ */ e.jsx(ee, { size: M[2], strokeWidth: 1.5 }),
904
904
  onClick: d,
905
905
  "aria-label": "Close"
906
906
  }
@@ -928,7 +928,7 @@ function yt({
928
928
  ...l
929
929
  }) {
930
930
  const [u, d] = A(n), m = a !== void 0, p = m ? a : u, h = () => {
931
- m ? o == null || o(!a) : d((x) => !x);
931
+ m ? o == null || o(!a) : d((v) => !v);
932
932
  }, c = [
933
933
  "ds-code-accordion",
934
934
  `ds-code-accordion--${r}`,
@@ -948,7 +948,7 @@ function yt({
948
948
  /* @__PURE__ */ e.jsx(
949
949
  _e,
950
950
  {
951
- size: P[2],
951
+ size: M[2],
952
952
  strokeWidth: 1.5,
953
953
  className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
954
954
  }
@@ -1027,17 +1027,17 @@ function Ns({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
1027
1027
  );
1028
1028
  }
1029
1029
  function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1 }) {
1030
- const r = T(null), i = T(null), [l, u] = A(!1), d = T(!1), m = T(null), p = T(null), h = () => {
1030
+ const r = R(null), i = R(null), [l, u] = A(!1), d = R(!1), m = R(null), p = R(null), h = () => {
1031
1031
  if (!r.current) return;
1032
1032
  const c = r.current.querySelector(`[data-value="${s}"]`);
1033
1033
  if (!c) return;
1034
- const x = r.current.getBoundingClientRect(), v = c.getBoundingClientRect(), g = v.left - x.left, w = v.width;
1035
- i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = w + "px", d.current = !1) : (u(!0), requestAnimationFrame(() => {
1034
+ const v = r.current.getBoundingClientRect(), x = c.getBoundingClientRect(), g = x.left - v.left, y = x.width;
1035
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = y + "px", d.current = !1) : (u(!0), requestAnimationFrame(() => {
1036
1036
  if (!i.current || !r.current) return;
1037
1037
  const k = r.current.querySelector(`[data-value="${s}"]`);
1038
1038
  if (!k) return;
1039
- const j = r.current.getBoundingClientRect(), E = k.getBoundingClientRect();
1040
- i.current.style.transition = "none", i.current.style.left = E.left - j.left + "px", i.current.style.width = E.width + "px";
1039
+ const j = r.current.getBoundingClientRect(), T = k.getBoundingClientRect();
1040
+ i.current.style.transition = "none", i.current.style.left = T.left - j.left + "px", i.current.style.width = T.width + "px";
1041
1041
  }));
1042
1042
  };
1043
1043
  return p.current = h, Qe(() => {
@@ -1117,7 +1117,7 @@ function De({
1117
1117
  /* @__PURE__ */ e.jsx(
1118
1118
  _e,
1119
1119
  {
1120
- size: P[2],
1120
+ size: M[2],
1121
1121
  strokeWidth: 1.5,
1122
1122
  className: `ds-accordion__icon ${m ? "ds-accordion__icon--expanded" : ""}`
1123
1123
  }
@@ -1161,32 +1161,32 @@ function Et(t, s, n) {
1161
1161
  return r === t.top ? "top" : r === o - t.bottom ? "bottom" : r === a - t.right ? "right" : "left";
1162
1162
  }
1163
1163
  function Ge({ children: t, content: s, position: n, ...a }) {
1164
- const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, d] = A(n || "top"), m = T(null), p = T(null), h = T(!1), c = () => {
1164
+ const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, d] = A(n || "top"), m = R(null), p = R(null), h = R(!1), c = () => {
1165
1165
  if (!m.current || !p.current) return;
1166
- const v = m.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), w = n || Et(v, g.height, g.width), { top: k, left: j, arrowOffset: E } = kt(w, v, g);
1167
- d(w), l({
1166
+ const x = m.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), y = n || Et(x, g.height, g.width), { top: k, left: j, arrowOffset: T } = kt(y, x, g);
1167
+ d(y), l({
1168
1168
  position: "fixed",
1169
1169
  top: k,
1170
1170
  left: j,
1171
1171
  visibility: "visible",
1172
- "--arrow-offset": `${E}px`
1172
+ "--arrow-offset": `${T}px`
1173
1173
  });
1174
1174
  };
1175
1175
  if (D(() => {
1176
1176
  if (!o) return;
1177
1177
  l({ position: "fixed", visibility: "hidden" });
1178
- const v = requestAnimationFrame(c);
1178
+ const x = requestAnimationFrame(c);
1179
1179
  return window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1180
- cancelAnimationFrame(v), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1180
+ cancelAnimationFrame(x), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1181
1181
  };
1182
1182
  }, [o, n]), D(() => {
1183
1183
  if (!o) return;
1184
- const v = (g) => {
1184
+ const x = (g) => {
1185
1185
  m.current && !m.current.contains(g.target) && r(!1);
1186
1186
  };
1187
- return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
1187
+ return document.addEventListener("touchstart", x), () => document.removeEventListener("touchstart", x);
1188
1188
  }, [o]), !s) return t;
1189
- const x = o && /* @__PURE__ */ e.jsx(
1189
+ const v = o && /* @__PURE__ */ e.jsx(
1190
1190
  "div",
1191
1191
  {
1192
1192
  ref: p,
@@ -1209,12 +1209,12 @@ function Ge({ children: t, content: s, position: n, ...a }) {
1209
1209
  h.current || r(!1);
1210
1210
  },
1211
1211
  onTouchStart: () => {
1212
- h.current = !0, r((v) => !v);
1212
+ h.current = !0, r((x) => !x);
1213
1213
  },
1214
1214
  ...a,
1215
1215
  children: [
1216
1216
  t,
1217
- typeof document < "u" && he.createPortal(x, document.body)
1217
+ typeof document < "u" && he.createPortal(v, document.body)
1218
1218
  ]
1219
1219
  }
1220
1220
  );
@@ -1645,21 +1645,21 @@ function Cs({
1645
1645
  side: a = "right",
1646
1646
  ...o
1647
1647
  }) {
1648
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1648
+ const r = R(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1649
1649
  !n || l || (u(!0), setTimeout(() => {
1650
1650
  u(!1), n();
1651
1651
  }, Bt));
1652
1652
  };
1653
1653
  D(() => {
1654
- const c = (v) => {
1655
- v.key === "Escape" && d();
1656
- }, x = (v) => {
1657
- var w, k, j;
1658
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
1654
+ const c = (x) => {
1655
+ x.key === "Escape" && d();
1656
+ }, v = (x) => {
1657
+ var y, k, j;
1658
+ const g = ((k = (y = x.composedPath) == null ? void 0 : y.call(x)) == null ? void 0 : k[0]) ?? x.target;
1659
1659
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
1660
1660
  };
1661
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
1662
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
1661
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
1662
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
1663
1663
  };
1664
1664
  }, [n, l]);
1665
1665
  const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Oe), h = m.filter((c) => (c == null ? void 0 : c.type) !== Oe);
@@ -1680,7 +1680,7 @@ function Cs({
1680
1680
  children: [
1681
1681
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1682
1682
  s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: s }),
1683
- n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }) })
1683
+ n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: M[2], strokeWidth: 1.5 }) })
1684
1684
  ] }),
1685
1685
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
1686
1686
  p
@@ -1701,21 +1701,21 @@ function Os({
1701
1701
  subHeader: a,
1702
1702
  ...o
1703
1703
  }) {
1704
- const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1704
+ const r = R(null), i = Y.useId(), [l, u] = A(!1), d = () => {
1705
1705
  !n || l || (u(!0), setTimeout(() => {
1706
1706
  u(!1), n();
1707
1707
  }, Dt));
1708
1708
  };
1709
1709
  D(() => {
1710
- const c = (v) => {
1711
- v.key === "Escape" && d();
1712
- }, x = (v) => {
1713
- var w, k, j;
1714
- const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
1710
+ const c = (x) => {
1711
+ x.key === "Escape" && d();
1712
+ }, v = (x) => {
1713
+ var y, k, j;
1714
+ const g = ((k = (y = x.composedPath) == null ? void 0 : y.call(x)) == null ? void 0 : k[0]) ?? x.target;
1715
1715
  r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
1716
1716
  };
1717
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
1718
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
1717
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", v), () => {
1718
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", v);
1719
1719
  };
1720
1720
  }, [n, l]);
1721
1721
  const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Fe || (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== Fe && (c == null ? void 0 : c.type) !== me);
@@ -1739,7 +1739,7 @@ function Os({
1739
1739
  className: "ds-side-page__close",
1740
1740
  variant: "ghost",
1741
1741
  size: "small",
1742
- icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
1742
+ icon: /* @__PURE__ */ e.jsx(ee, { size: M[2], strokeWidth: 1.5 }),
1743
1743
  onClick: d,
1744
1744
  "aria-label": "Close"
1745
1745
  }
@@ -1806,14 +1806,14 @@ function Ws({
1806
1806
  "data-onboarding": d || void 0
1807
1807
  },
1808
1808
  ...p
1809
- }, w = i != null, k = c === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1809
+ }, y = i != null, k = c === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1810
1810
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1811
1811
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1812
1812
  !h && l && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1813
- !h && w && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1813
+ !h && y && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1814
1814
  h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1815
- ] }), E = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...g, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: j });
1816
- return h ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: k, children: E }) : E;
1815
+ ] }), T = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...g, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: j });
1816
+ return h ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: k, children: T }) : T;
1817
1817
  }
1818
1818
  function Us({ children: t, className: s = "", ...n }) {
1819
1819
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
@@ -1865,8 +1865,8 @@ function Ks({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o,
1865
1865
  }, c = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1866
1866
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1867
1867
  !u && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1868
- ] }), x = d === "left" ? "right" : "left", v = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: c }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: c });
1869
- return u ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: x, children: v }) : v;
1868
+ ] }), v = d === "left" ? "right" : "left", x = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: c }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: c });
1869
+ return u ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: v, children: x }) : x;
1870
1870
  }
1871
1871
  const It = {
1872
1872
  info: Be,
@@ -1891,7 +1891,7 @@ function Gs({
1891
1891
  role: u,
1892
1892
  ...i,
1893
1893
  children: [
1894
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: P[2], strokeWidth: 1.5 }) }),
1894
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: M[2], strokeWidth: 1.5 }) }),
1895
1895
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
1896
1896
  n && /* @__PURE__ */ e.jsx(
1897
1897
  "button",
@@ -1909,7 +1909,7 @@ function Gs({
1909
1909
  className: "ds-banner-dismiss",
1910
1910
  onClick: o,
1911
1911
  "aria-label": "Dismiss",
1912
- children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 })
1912
+ children: /* @__PURE__ */ e.jsx(ee, { size: M[2], strokeWidth: 1.5 })
1913
1913
  }
1914
1914
  )
1915
1915
  ]
@@ -1926,39 +1926,39 @@ function Xs({
1926
1926
  style: i,
1927
1927
  ...l
1928
1928
  }) {
1929
- const [u, d] = A(!1), [m, p] = A(!1), h = n !== void 0, c = h ? n : u, x = T(null), v = T(null), g = T(null), w = T(null), [k, j] = A({}), E = T(null), M = 150, L = () => {
1929
+ const [u, d] = A(!1), [m, p] = A(!1), h = n !== void 0, c = h ? n : u, v = R(null), x = R(null), g = R(null), y = R(null), [k, j] = A({}), T = R(null), z = 150, L = () => {
1930
1930
  if (h)
1931
1931
  a == null || a(!1);
1932
1932
  else {
1933
1933
  if (m) return;
1934
- p(!0), E.current = setTimeout(() => {
1934
+ p(!0), T.current = setTimeout(() => {
1935
1935
  d(!1), p(!1);
1936
- }, M);
1936
+ }, z);
1937
1937
  }
1938
- }, W = () => {
1939
- const _ = !c;
1940
- h ? a == null || a(_) : _ ? (clearTimeout(E.current), p(!1), d(!0)) : L();
1941
1938
  }, H = () => {
1942
- c || (h ? a == null || a(!0) : (clearTimeout(E.current), p(!1), d(!0)));
1939
+ const _ = !c;
1940
+ h ? a == null || a(_) : _ ? (clearTimeout(T.current), p(!1), d(!0)) : L();
1941
+ }, U = () => {
1942
+ c || (h ? a == null || a(!0) : (clearTimeout(T.current), p(!1), d(!0)));
1943
1943
  };
1944
- D(() => () => clearTimeout(E.current), []), D(() => {
1944
+ D(() => () => clearTimeout(T.current), []), D(() => {
1945
1945
  if (!c) return;
1946
- const _ = 300, y = () => {
1946
+ const _ = 300, w = () => {
1947
1947
  var X;
1948
- const S = (X = x.current) == null ? void 0 : X.getBoundingClientRect();
1948
+ const S = (X = v.current) == null ? void 0 : X.getBoundingClientRect();
1949
1949
  if (!S) return;
1950
1950
  const C = window.innerHeight - S.bottom, K = C < _ + 8 && S.top > C;
1951
1951
  j(
1952
1952
  o === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
1953
1953
  );
1954
1954
  };
1955
- return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1956
- window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1955
+ return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
1956
+ window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
1957
1957
  };
1958
1958
  }, [c, o]);
1959
- const z = () => {
1960
- var y;
1961
- const _ = (y = g.current) == null ? void 0 : y.querySelector(
1959
+ const W = () => {
1960
+ var w;
1961
+ const _ = (w = g.current) == null ? void 0 : w.querySelector(
1962
1962
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1963
1963
  );
1964
1964
  _ == null || _.focus();
@@ -1967,55 +1967,55 @@ function Xs({
1967
1967
  if (!c) return;
1968
1968
  const _ = (S) => {
1969
1969
  var C, K;
1970
- !((C = x.current) != null && C.contains(S.target)) && !((K = v.current) != null && K.contains(S.target)) && L();
1971
- }, y = (S) => {
1972
- S.key === "Escape" && (L(), z());
1970
+ !((C = v.current) != null && C.contains(S.target)) && !((K = x.current) != null && K.contains(S.target)) && L();
1971
+ }, w = (S) => {
1972
+ S.key === "Escape" && (L(), W());
1973
1973
  };
1974
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", y), () => {
1975
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", y);
1974
+ return document.addEventListener("mousedown", _), document.addEventListener("keydown", w), () => {
1975
+ document.removeEventListener("mousedown", _), document.removeEventListener("keydown", w);
1976
1976
  };
1977
1977
  }, [c]), D(() => {
1978
- if (!c || !w.current || !v.current) return;
1979
- const _ = b(), y = w.current === "last" ? _[_.length - 1] : _[0];
1980
- y == null || y.focus(), w.current = null;
1978
+ if (!c || !y.current || !x.current) return;
1979
+ const _ = b(), w = y.current === "last" ? _[_.length - 1] : _[0];
1980
+ w == null || w.focus(), y.current = null;
1981
1981
  }, [c]);
1982
- const b = () => v.current ? [...v.current.querySelectorAll(
1982
+ const b = () => x.current ? [...x.current.querySelectorAll(
1983
1983
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1984
1984
  )] : [], I = (_) => {
1985
- var y, S;
1985
+ var w, S;
1986
1986
  if (_.key === "ArrowDown")
1987
- _.preventDefault(), c ? (y = b()[0]) == null || y.focus() : (w.current = "first", H());
1987
+ _.preventDefault(), c ? (w = b()[0]) == null || w.focus() : (y.current = "first", U());
1988
1988
  else if (_.key === "ArrowUp")
1989
1989
  if (_.preventDefault(), !c)
1990
- w.current = "last", H();
1990
+ y.current = "last", U();
1991
1991
  else {
1992
1992
  const C = b();
1993
1993
  (S = C[C.length - 1]) == null || S.focus();
1994
1994
  }
1995
1995
  }, O = (_) => {
1996
- var C, K, X, R;
1997
- const y = b(), S = y.findIndex((f) => f === document.activeElement);
1996
+ var C, K, X, E;
1997
+ const w = b(), S = w.findIndex((f) => f === document.activeElement);
1998
1998
  switch (_.key) {
1999
1999
  case "ArrowDown":
2000
- _.preventDefault(), (C = y[Math.min(S + 1, y.length - 1)]) == null || C.focus();
2000
+ _.preventDefault(), (C = w[Math.min(S + 1, w.length - 1)]) == null || C.focus();
2001
2001
  break;
2002
2002
  case "ArrowUp":
2003
- _.preventDefault(), S <= 0 ? z() : (K = y[S - 1]) == null || K.focus();
2003
+ _.preventDefault(), S <= 0 ? W() : (K = w[S - 1]) == null || K.focus();
2004
2004
  break;
2005
2005
  case "Home":
2006
- _.preventDefault(), (X = y[0]) == null || X.focus();
2006
+ _.preventDefault(), (X = w[0]) == null || X.focus();
2007
2007
  break;
2008
2008
  case "End":
2009
- _.preventDefault(), (R = y[y.length - 1]) == null || R.focus();
2009
+ _.preventDefault(), (E = w[w.length - 1]) == null || E.focus();
2010
2010
  break;
2011
2011
  case "Tab":
2012
2012
  L();
2013
2013
  break;
2014
2014
  }
2015
- }, U = c && /* @__PURE__ */ e.jsx(
2015
+ }, P = c && /* @__PURE__ */ e.jsx(
2016
2016
  "div",
2017
2017
  {
2018
- ref: v,
2018
+ ref: x,
2019
2019
  role: "menu",
2020
2020
  "data-ds-portal": "",
2021
2021
  className: [
@@ -2025,14 +2025,14 @@ function Xs({
2025
2025
  ].filter(Boolean).join(" "),
2026
2026
  style: k,
2027
2027
  onKeyDown: O,
2028
- children: s.map((_, y) => {
2028
+ children: s.map((_, w) => {
2029
2029
  if (_.separator)
2030
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
2030
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, w);
2031
2031
  if (_.type === "section")
2032
2032
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2033
2033
  _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
2034
2034
  /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
2035
- ] }, y);
2035
+ ] }, w);
2036
2036
  const S = !!_.href, C = S ? "a" : "button", K = S ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
2037
2037
  return /* @__PURE__ */ e.jsxs(
2038
2038
  C,
@@ -2053,7 +2053,7 @@ function Xs({
2053
2053
  _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
2054
2054
  ]
2055
2055
  },
2056
- y
2056
+ w
2057
2057
  );
2058
2058
  })
2059
2059
  }
@@ -2061,7 +2061,7 @@ function Xs({
2061
2061
  return /* @__PURE__ */ e.jsxs(
2062
2062
  "div",
2063
2063
  {
2064
- ref: x,
2064
+ ref: v,
2065
2065
  className: ["ds-dropdown", r].filter(Boolean).join(" "),
2066
2066
  style: i,
2067
2067
  ...l,
@@ -2071,12 +2071,12 @@ function Xs({
2071
2071
  {
2072
2072
  ref: g,
2073
2073
  className: "ds-dropdown__trigger",
2074
- onClick: W,
2074
+ onClick: H,
2075
2075
  onKeyDown: I,
2076
2076
  children: t
2077
2077
  }
2078
2078
  ),
2079
- typeof document < "u" && he.createPortal(U, document.body)
2079
+ typeof document < "u" && he.createPortal(P, document.body)
2080
2080
  ]
2081
2081
  }
2082
2082
  );
@@ -2120,7 +2120,7 @@ function Js({
2120
2120
  }
2121
2121
  const Lt = (t) => 1 - Math.pow(1 - t, 3), Pt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2122
2122
  function Mt(t, { duration: s = 600 } = {}) {
2123
- const [n, a] = A(t), o = T(t), r = T(null);
2123
+ const [n, a] = A(t), o = R(t), r = R(null);
2124
2124
  return D(() => {
2125
2125
  if (Pt()) {
2126
2126
  a(t), o.current = t;
@@ -2148,7 +2148,7 @@ function Zs({
2148
2148
  return `${a}${i}${o}`;
2149
2149
  }
2150
2150
  function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2151
- const a = T(null), [o, r] = A(!1);
2151
+ const a = R(null), [o, r] = A(!1);
2152
2152
  return D(() => {
2153
2153
  const i = a.current;
2154
2154
  if (!i) return;
@@ -2171,7 +2171,7 @@ function Qs({
2171
2171
  onLeave: i,
2172
2172
  ...l
2173
2173
  }) {
2174
- const { ref: u, inView: d } = zt({ threshold: a, rootMargin: o, once: n }), m = T(!1);
2174
+ const { ref: u, inView: d } = zt({ threshold: a, rootMargin: o, once: n }), m = R(!1);
2175
2175
  return D(() => {
2176
2176
  d && !m.current && (r == null || r()), !d && m.current && (i == null || i()), m.current = d;
2177
2177
  }, [d]), /* @__PURE__ */ e.jsx(s, { ref: u, ...l, children: typeof t == "function" ? t(d) : t });
@@ -2206,7 +2206,7 @@ function en() {
2206
2206
  return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
2207
2207
  }
2208
2208
  function Ft({ data: t, onDismiss: s }) {
2209
- const [n, a] = A(!1), o = T(null);
2209
+ const [n, a] = A(!1), o = R(null);
2210
2210
  D(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
2211
2211
  function r() {
2212
2212
  a(!1), setTimeout(() => s(t.id), 250);
@@ -2223,7 +2223,7 @@ function Ft({ data: t, onDismiss: s }) {
2223
2223
  role: t.type === "error" ? "alert" : "status",
2224
2224
  "aria-live": "polite",
2225
2225
  children: [
2226
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: P[3], strokeWidth: 1.5 }) }),
2226
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: M[3], strokeWidth: 1.5 }) }),
2227
2227
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: t.message }),
2228
2228
  /* @__PURE__ */ e.jsx(
2229
2229
  "button",
@@ -2231,7 +2231,7 @@ function Ft({ data: t, onDismiss: s }) {
2231
2231
  className: "ds-toast__close",
2232
2232
  onClick: r,
2233
2233
  "aria-label": "Закрыть",
2234
- children: /* @__PURE__ */ e.jsx(ee, { size: P[3], strokeWidth: 1.5 })
2234
+ children: /* @__PURE__ */ e.jsx(ee, { size: M[3], strokeWidth: 1.5 })
2235
2235
  }
2236
2236
  )
2237
2237
  ]
@@ -2312,7 +2312,7 @@ function Ut({
2312
2312
  variant: "ghost",
2313
2313
  size: s,
2314
2314
  state: r ? "success" : "idle",
2315
- icon: /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5 }),
2315
+ icon: /* @__PURE__ */ e.jsx(it, { size: M[1], strokeWidth: 1.5 }),
2316
2316
  "aria-label": a,
2317
2317
  onClick: l,
2318
2318
  ...o
@@ -2330,7 +2330,7 @@ function nn({ content: t, streaming: s = !1, ...n }) {
2330
2330
  onToggle: o,
2331
2331
  padding: "s",
2332
2332
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2333
- /* @__PURE__ */ e.jsx(lt, { size: P[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2333
+ /* @__PURE__ */ e.jsx(lt, { size: M[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2334
2334
  /* @__PURE__ */ e.jsx(jt, { secondary: !0, children: "Thinking" })
2335
2335
  ] }),
2336
2336
  ...n,
@@ -2388,7 +2388,7 @@ function an({
2388
2388
  className: o = "",
2389
2389
  ...r
2390
2390
  }) {
2391
- const i = T(t);
2391
+ const i = R(t);
2392
2392
  return D(() => {
2393
2393
  t !== i.current && (a == null || a(t), i.current = t);
2394
2394
  }, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...r, children: [
@@ -2424,7 +2424,7 @@ function on({
2424
2424
  ] });
2425
2425
  }
2426
2426
  function ln(t, { containerRef: s, smartPause: n = !0 } = {}) {
2427
- const a = T(!1), o = T(0);
2427
+ const a = R(!1), o = R(0);
2428
2428
  D(() => {
2429
2429
  const r = s == null ? void 0 : s.current;
2430
2430
  if (!r) return;
@@ -2447,33 +2447,33 @@ function Vt({
2447
2447
  betweenTime: r = 380,
2448
2448
  manualPauseMs: i = 5e3
2449
2449
  }) {
2450
- const [l, u] = A(0), [d, m] = A(""), p = T("typing"), h = T(0), c = T(0), x = T(null), v = T(0);
2450
+ const [l, u] = A(0), [d, m] = A(""), p = R("typing"), h = R(0), c = R(0), v = R(null), x = R(0);
2451
2451
  D(() => {
2452
2452
  c.current = l;
2453
2453
  }, [l]), D(() => {
2454
- if (x.current && (clearTimeout(x.current), x.current = null), !s || t.length === 0) {
2454
+ if (v.current && (clearTimeout(v.current), v.current = null), !s || t.length === 0) {
2455
2455
  m(""), h.current = 0, p.current = "typing";
2456
2456
  return;
2457
2457
  }
2458
- const E = () => {
2459
- const M = Date.now();
2460
- if (v.current > M) {
2461
- x.current = setTimeout(E, v.current - M);
2458
+ const T = () => {
2459
+ const z = Date.now();
2460
+ if (x.current > z) {
2461
+ v.current = setTimeout(T, x.current - z);
2462
2462
  return;
2463
2463
  }
2464
2464
  const L = t[c.current % t.length] ?? "";
2465
- p.current === "typing" ? (h.current += 1, m(L.slice(0, h.current)), h.current >= L.length ? (p.current = "holding", x.current = setTimeout(E, o)) : x.current = setTimeout(E, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(E, a)) : (h.current = Math.max(0, h.current - 1), m(L.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % t.length, u(c.current), x.current = setTimeout(E, r)) : x.current = setTimeout(E, a));
2465
+ p.current === "typing" ? (h.current += 1, m(L.slice(0, h.current)), h.current >= L.length ? (p.current = "holding", v.current = setTimeout(T, o)) : v.current = setTimeout(T, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(T, a)) : (h.current = Math.max(0, h.current - 1), m(L.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % t.length, u(c.current), v.current = setTimeout(T, r)) : v.current = setTimeout(T, a));
2466
2466
  };
2467
- return x.current = setTimeout(E, 260), () => {
2468
- x.current && clearTimeout(x.current);
2467
+ return v.current = setTimeout(T, 260), () => {
2468
+ v.current && clearTimeout(v.current);
2469
2469
  };
2470
2470
  }, [s, t, n, a, o, r]);
2471
- const g = (E) => {
2471
+ const g = (T) => {
2472
2472
  if (t.length === 0) return;
2473
- const M = (E % t.length + t.length) % t.length, L = t[M];
2474
- c.current = M, h.current = L.length, p.current = "holding", v.current = Date.now() + i, u(M), m(L);
2475
- }, w = () => g(c.current + 1), k = () => g(c.current - 1), j = t[l % t.length] ?? "";
2476
- return { displayed: d, currentPrompt: j, index: l, next: w, prev: k };
2473
+ const z = (T % t.length + t.length) % t.length, L = t[z];
2474
+ c.current = z, h.current = L.length, p.current = "holding", x.current = Date.now() + i, u(z), m(L);
2475
+ }, y = () => g(c.current + 1), k = () => g(c.current - 1), j = t[l % t.length] ?? "";
2476
+ return { displayed: d, currentPrompt: j, index: l, next: y, prev: k };
2477
2477
  }
2478
2478
  let Yt = 0;
2479
2479
  function cn({
@@ -2491,54 +2491,54 @@ function cn({
2491
2491
  onAttachFiles: p,
2492
2492
  onAttachImages: h,
2493
2493
  onRemoveAttachment: c,
2494
- onRemoveImage: x,
2495
- acceptImage: v,
2494
+ onRemoveImage: v,
2495
+ acceptImage: x,
2496
2496
  acceptFile: g,
2497
- maxImages: w,
2497
+ maxImages: y,
2498
2498
  maxImageSize: k,
2499
2499
  leftSlot: j,
2500
- rightSlot: E,
2501
- className: M = "",
2500
+ rightSlot: T,
2501
+ className: z = "",
2502
2502
  ...L
2503
2503
  }) {
2504
- const W = T(null), H = T(null), z = T(0), [b, I] = A(!1), [O, U] = A([]), _ = (N) => {
2504
+ const H = R(null), U = R(null), W = R(0), [b, I] = A(!1), [O, P] = A([]), _ = (N) => {
2505
2505
  const B = ++Yt;
2506
- U((G) => [...G, { id: B, msg: N }]), setTimeout(() => U((G) => G.filter((J) => J.id !== B)), 6e3);
2507
- }, y = (N) => U((B) => B.filter((G) => G.id !== N)), S = (N) => N.type.startsWith("image/"), C = () => !0, K = v ?? S, X = g ?? C, R = (N) => {
2506
+ P((G) => [...G, { id: B, msg: N }]), setTimeout(() => P((G) => G.filter((J) => J.id !== B)), 6e3);
2507
+ }, w = (N) => P((B) => B.filter((G) => G.id !== N)), S = (N) => N.type.startsWith("image/"), C = () => !0, K = x ?? S, X = g ?? C, E = (N) => {
2508
2508
  const B = [], G = [], J = [], Z = [];
2509
- let te = 0, de = w != null ? w - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2509
+ let te = 0, de = y != null ? y - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2510
2510
  for (const se of N)
2511
2511
  K(se) ? k && se.size > k ? J.push(se.name) : de > 0 ? (B.push(se), de--) : te++ : X(se) ? G.push(se) : Z.push(se.name);
2512
2512
  return { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te };
2513
2513
  }, f = (N) => {
2514
- const { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te } = R(N);
2515
- J.length && _(`File${J.length > 1 ? "s" : ""} too large${k ? ` (max ${k / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && _(`Max ${w} images per message`), h && B.length && h(B);
2514
+ const { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te } = E(N);
2515
+ J.length && _(`File${J.length > 1 ? "s" : ""} too large${k ? ` (max ${k / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && _(`Max ${y} images per message`), h && B.length && h(B);
2516
2516
  const de = G.concat(h ? [] : B);
2517
2517
  p && de.length && p(de);
2518
2518
  };
2519
2519
  D(() => {
2520
- const N = H.current;
2520
+ const N = U.current;
2521
2521
  N && (N.style.height = "auto", N.style.height = `${Math.min(N.scrollHeight, 200)}px`);
2522
2522
  }, [t]), D(() => {
2523
2523
  const N = (B) => {
2524
2524
  var J, Z, te;
2525
2525
  if (r || i) return;
2526
2526
  const G = (J = B.target) == null ? void 0 : J.tagName;
2527
- G === "INPUT" || G === "TEXTAREA" || G === "SELECT" || (Z = B.target) != null && Z.isContentEditable || B.ctrlKey || B.metaKey || B.altKey || B.key.length !== 1 && B.key !== "Backspace" && B.key !== "Delete" || (te = H.current) == null || te.focus();
2527
+ G === "INPUT" || G === "TEXTAREA" || G === "SELECT" || (Z = B.target) != null && Z.isContentEditable || B.ctrlKey || B.metaKey || B.altKey || B.key.length !== 1 && B.key !== "Backspace" && B.key !== "Delete" || (te = U.current) == null || te.focus();
2528
2528
  };
2529
2529
  return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2530
2530
  }, [r, i]);
2531
2531
  const $ = (N) => {
2532
- N.preventDefault(), z.current++, N.dataTransfer.types.includes("Files") && I(!0);
2532
+ N.preventDefault(), W.current++, N.dataTransfer.types.includes("Files") && I(!0);
2533
2533
  }, F = (N) => {
2534
- N.preventDefault(), z.current--, z.current === 0 && I(!1);
2534
+ N.preventDefault(), W.current--, W.current === 0 && I(!1);
2535
2535
  }, V = (N) => N.preventDefault(), ne = (N) => {
2536
- N.preventDefault(), z.current = 0, I(!1);
2536
+ N.preventDefault(), W.current = 0, I(!1);
2537
2537
  const B = Array.from(N.dataTransfer.files);
2538
2538
  B.length && f(B);
2539
2539
  }, oe = (N) => {
2540
2540
  const B = Array.from(N.target.files || []);
2541
- W.current && (W.current.value = ""), B.length && f(B);
2541
+ H.current && (H.current.value = ""), B.length && f(B);
2542
2542
  }, q = (N) => {
2543
2543
  var se;
2544
2544
  if (!h) return;
@@ -2550,8 +2550,8 @@ function cn({
2550
2550
  Le && G.push(Le);
2551
2551
  }
2552
2552
  if (G.length === 0) return;
2553
- const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: de } = R(G);
2554
- Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && _(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), de && _(`Max ${w} images per message`), J.length && (N.preventDefault(), h(J));
2553
+ const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: de } = E(G);
2554
+ Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && _(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), de && _(`Max ${y} images per message`), J.length && (N.preventDefault(), h(J));
2555
2555
  }, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie = Vt({
2556
2556
  prompts: u ?? [],
2557
2557
  enabled: Q
@@ -2572,11 +2572,11 @@ function cn({
2572
2572
  }
2573
2573
  o == null || o(N);
2574
2574
  }, Je = (t.trim() || (m == null ? void 0 : m.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Ie = p || h;
2575
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...L, children: [
2575
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", z].filter(Boolean).join(" "), ...L, children: [
2576
2576
  Ie && /* @__PURE__ */ e.jsx(
2577
2577
  "input",
2578
2578
  {
2579
- ref: W,
2579
+ ref: H,
2580
2580
  type: "file",
2581
2581
  multiple: !0,
2582
2582
  accept: "*/*",
@@ -2597,7 +2597,7 @@ function cn({
2597
2597
  /* @__PURE__ */ e.jsx(
2598
2598
  "textarea",
2599
2599
  {
2600
- ref: H,
2600
+ ref: U,
2601
2601
  value: t,
2602
2602
  onChange: (N) => s == null ? void 0 : s(N.target.value),
2603
2603
  onKeyDown: Ne,
@@ -2618,7 +2618,7 @@ function cn({
2618
2618
  "button",
2619
2619
  {
2620
2620
  className: "ds-prompt-input__image-remove",
2621
- onClick: () => x == null ? void 0 : x(B),
2621
+ onClick: () => v == null ? void 0 : v(B),
2622
2622
  "aria-label": "Remove image",
2623
2623
  type: "button",
2624
2624
  children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
@@ -2632,14 +2632,14 @@ function cn({
2632
2632
  {
2633
2633
  type: "button",
2634
2634
  className: "ds-prompt-input__warning-close",
2635
- onClick: () => y(N.id),
2635
+ onClick: () => w(N.id),
2636
2636
  "aria-label": "Dismiss",
2637
- children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
2637
+ children: /* @__PURE__ */ e.jsx(ee, { size: M[1], strokeWidth: 1.5 })
2638
2638
  }
2639
2639
  )
2640
2640
  ] }, N.id)) }),
2641
2641
  d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((N, B) => /* @__PURE__ */ e.jsx(ue, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2642
- N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Pe, { size: P[1], strokeWidth: 1.5 }),
2642
+ N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: M[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Pe, { size: M[1], strokeWidth: 1.5 }),
2643
2643
  N.filename,
2644
2644
  N.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2645
2645
  "button",
@@ -2647,7 +2647,7 @@ function cn({
2647
2647
  type: "button",
2648
2648
  className: "ds-prompt-input__remove-btn",
2649
2649
  onClick: () => c == null ? void 0 : c(B),
2650
- children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
2650
+ children: /* @__PURE__ */ e.jsx(ee, { size: M[1], strokeWidth: 1.5 })
2651
2651
  }
2652
2652
  )
2653
2653
  ] }) }, B)) }),
@@ -2657,23 +2657,23 @@ function cn({
2657
2657
  {
2658
2658
  variant: "ghost",
2659
2659
  size: "xs",
2660
- icon: /* @__PURE__ */ e.jsx(Pe, { size: P[2], strokeWidth: 1.5 }),
2660
+ icon: /* @__PURE__ */ e.jsx(Pe, { size: M[2], strokeWidth: 1.5 }),
2661
2661
  "aria-label": "Attach files",
2662
2662
  onClick: () => {
2663
2663
  var N;
2664
- return (N = W.current) == null ? void 0 : N.click();
2664
+ return (N = H.current) == null ? void 0 : N.click();
2665
2665
  }
2666
2666
  }
2667
2667
  ),
2668
2668
  j,
2669
- E,
2669
+ T,
2670
2670
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2671
2671
  r ? /* @__PURE__ */ e.jsx(
2672
2672
  ae,
2673
2673
  {
2674
2674
  variant: "primary",
2675
2675
  size: "xs",
2676
- icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
2676
+ icon: /* @__PURE__ */ e.jsx(dt, { size: M[2], strokeWidth: 1.5 }),
2677
2677
  onClick: a,
2678
2678
  "aria-label": "Stop"
2679
2679
  }
@@ -2682,7 +2682,7 @@ function cn({
2682
2682
  {
2683
2683
  variant: "primary",
2684
2684
  size: "xs",
2685
- icon: /* @__PURE__ */ e.jsx(ut, { size: P[2], strokeWidth: 1.5 }),
2685
+ icon: /* @__PURE__ */ e.jsx(ut, { size: M[2], strokeWidth: 1.5 }),
2686
2686
  onClick: n,
2687
2687
  disabled: !Je,
2688
2688
  "aria-label": "Send"
@@ -2706,15 +2706,15 @@ function dn({
2706
2706
  className: l = "",
2707
2707
  ...u
2708
2708
  }) {
2709
- const [d, m] = A(!1), p = T(null), h = T(null), c = T(null), [x, v] = A({}), g = t.filter((b) => !o || b.name === "auto" ? !0 : (Ue[b.tier] ?? 1) >= (Ue[o] ?? 1)), w = g.find((b) => b.name === "auto"), k = g.filter((b) => b.name !== "auto"), j = t.find((b) => b.name === s), M = new Set(k.map((b) => b.tier).filter(Boolean)).size > 1;
2709
+ const [d, m] = A(!1), p = R(null), h = R(null), c = R(null), [v, x] = A({}), g = t.filter((b) => !o || b.name === "auto" ? !0 : (Ue[b.tier] ?? 1) >= (Ue[o] ?? 1)), y = g.find((b) => b.name === "auto"), k = g.filter((b) => b.name !== "auto"), j = t.find((b) => b.name === s), z = new Set(k.map((b) => b.tier).filter(Boolean)).size > 1;
2710
2710
  D(() => {
2711
2711
  if (!d) return;
2712
2712
  const b = 320, I = () => {
2713
2713
  var C;
2714
2714
  const _ = (C = h.current) == null ? void 0 : C.getBoundingClientRect();
2715
2715
  if (!_) return;
2716
- const y = window.innerHeight - _.bottom, S = y < b + 8 && _.top > y;
2717
- v({
2716
+ const w = window.innerHeight - _.bottom, S = w < b + 8 && _.top > w;
2717
+ x({
2718
2718
  position: "fixed",
2719
2719
  zIndex: "var(--z-dropdown, 500)",
2720
2720
  left: _.left,
@@ -2723,18 +2723,18 @@ function dn({
2723
2723
  };
2724
2724
  I(), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I);
2725
2725
  const O = (_) => {
2726
- var y, S;
2727
- !((y = p.current) != null && y.contains(_.target)) && !((S = c.current) != null && S.contains(_.target)) && m(!1);
2728
- }, U = (_) => {
2726
+ var w, S;
2727
+ !((w = p.current) != null && w.contains(_.target)) && !((S = c.current) != null && S.contains(_.target)) && m(!1);
2728
+ }, P = (_) => {
2729
2729
  _.key === "Escape" && m(!1);
2730
2730
  };
2731
- return document.addEventListener("mousedown", O), document.addEventListener("keydown", U), () => {
2732
- window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I), document.removeEventListener("mousedown", O), document.removeEventListener("keydown", U);
2731
+ return document.addEventListener("mousedown", O), document.addEventListener("keydown", P), () => {
2732
+ window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I), document.removeEventListener("mousedown", O), document.removeEventListener("keydown", P);
2733
2733
  };
2734
2734
  }, [d]);
2735
2735
  const L = (b) => {
2736
2736
  n == null || n(b), m(!1);
2737
- }, W = (b) => /* @__PURE__ */ e.jsxs(
2737
+ }, H = (b) => /* @__PURE__ */ e.jsxs(
2738
2738
  "button",
2739
2739
  {
2740
2740
  type: "button",
@@ -2746,18 +2746,18 @@ function dn({
2746
2746
  children: [
2747
2747
  b.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: b.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2748
2748
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: b.displayName || b.name }),
2749
- M && b.tier && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[b.tier] || "default", children: b.tier })
2749
+ z && b.tier && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[b.tier] || "default", children: b.tier })
2750
2750
  ]
2751
2751
  },
2752
2752
  b.name
2753
- ), H = () => !i || !M ? k.map(W) : ["fast", "standard", "premium"].flatMap((b) => {
2753
+ ), U = () => !i || !z ? k.map(H) : ["fast", "standard", "premium"].flatMap((b) => {
2754
2754
  const I = k.filter((O) => O.tier === b);
2755
2755
  return I.length ? [
2756
2756
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": b, children: b.charAt(0).toUpperCase() + b.slice(1) }, `lbl-${b}`),
2757
- ...I.map(W)
2757
+ ...I.map(H)
2758
2758
  ] : [];
2759
- }), z = d && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2760
- r && w && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2759
+ }), W = d && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
2760
+ r && y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2761
2761
  /* @__PURE__ */ e.jsxs(
2762
2762
  "button",
2763
2763
  {
@@ -2776,7 +2776,7 @@ function dn({
2776
2776
  ),
2777
2777
  k.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2778
2778
  ] }),
2779
- H()
2779
+ U()
2780
2780
  ] });
2781
2781
  return /* @__PURE__ */ e.jsxs(
2782
2782
  "div",
@@ -2797,11 +2797,11 @@ function dn({
2797
2797
  children: [
2798
2798
  j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5 }),
2799
2799
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (j == null ? void 0 : j.displayName) || (j == null ? void 0 : j.name) || s }),
2800
- M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[j.tier] || "default", children: j.tier })
2800
+ z && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[j.tier] || "default", children: j.tier })
2801
2801
  ]
2802
2802
  }
2803
2803
  ),
2804
- typeof document < "u" && he.createPortal(z, document.body)
2804
+ typeof document < "u" && he.createPortal(W, document.body)
2805
2805
  ]
2806
2806
  }
2807
2807
  );
@@ -2829,14 +2829,14 @@ function un({
2829
2829
  const [r, i] = A(!1), l = Ht(t), u = l.length > a, d = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2830
2830
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2831
2831
  d.map((h) => {
2832
- const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2832
+ const c = h.items.map((x) => x.page).filter(Boolean), v = !!o;
2833
2833
  return /* @__PURE__ */ e.jsxs(
2834
2834
  "div",
2835
2835
  {
2836
- className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2837
- onClick: x ? () => o(h.items[0]) : void 0,
2836
+ className: `ds-sources-panel__compact-row${v ? " ds-sources-panel__compact-row--clickable" : ""}`,
2837
+ onClick: v ? () => o(h.items[0]) : void 0,
2838
2838
  children: [
2839
- /* @__PURE__ */ e.jsx(mt, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2839
+ /* @__PURE__ */ e.jsx(mt, { size: M[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2840
2840
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2841
2841
  c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
2842
2842
  ]
@@ -2852,18 +2852,18 @@ function un({
2852
2852
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2853
2853
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2854
2854
  d.map((h) => {
2855
- const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2855
+ const c = h.items.map((x) => x.page).filter(Boolean), v = !!o;
2856
2856
  return m ? /* @__PURE__ */ e.jsx(
2857
2857
  De,
2858
2858
  {
2859
2859
  title: /* @__PURE__ */ e.jsx(qt, { filename: h.filename, pages: c }),
2860
2860
  padding: "s",
2861
- children: h.items.map((v, g) => /* @__PURE__ */ e.jsx(
2861
+ children: h.items.map((x, g) => /* @__PURE__ */ e.jsx(
2862
2862
  "div",
2863
2863
  {
2864
- className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2865
- onClick: x ? () => o(v) : void 0,
2866
- children: v.snippet ?? `p. ${v.page}`
2864
+ className: `ds-sources-panel__snippet${v ? " ds-sources-panel__snippet--clickable" : ""}`,
2865
+ onClick: v ? () => o(x) : void 0,
2866
+ children: x.snippet ?? `p. ${x.page}`
2867
2867
  },
2868
2868
  g
2869
2869
  ))
@@ -2872,8 +2872,8 @@ function un({
2872
2872
  ) : /* @__PURE__ */ e.jsxs(
2873
2873
  "div",
2874
2874
  {
2875
- className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
2876
- onClick: x ? () => o(h.items[0]) : void 0,
2875
+ className: `ds-sources-panel__row${v ? " ds-sources-panel__row--clickable" : ""}`,
2876
+ onClick: v ? () => o(h.items[0]) : void 0,
2877
2877
  children: [
2878
2878
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2879
2879
  c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
@@ -3028,7 +3028,7 @@ function Xt({
3028
3028
  children: /* @__PURE__ */ e.jsx(
3029
3029
  pt,
3030
3030
  {
3031
- size: P[1],
3031
+ size: M[1],
3032
3032
  strokeWidth: 1.5,
3033
3033
  fill: t === "liked" ? "currentColor" : "none"
3034
3034
  }
@@ -3049,7 +3049,7 @@ function Xt({
3049
3049
  children: /* @__PURE__ */ e.jsx(
3050
3050
  ht,
3051
3051
  {
3052
- size: P[1],
3052
+ size: M[1],
3053
3053
  strokeWidth: 1.5,
3054
3054
  fill: t === "disliked" ? "currentColor" : "none"
3055
3055
  }
@@ -3193,98 +3193,100 @@ function bn({
3193
3193
  onSkip: o,
3194
3194
  onFinish: r,
3195
3195
  overlay: i = !0,
3196
- labelNext: l = "Next",
3197
- labelBack: u = "Back",
3198
- labelSkip: d = "Skip tour",
3199
- labelFinish: m = "Done"
3196
+ ring: l = !0,
3197
+ labelNext: u = "Next",
3198
+ labelBack: d = "Back",
3199
+ labelSkip: m = "Skip tour",
3200
+ labelFinish: p = "Done"
3200
3201
  }) {
3201
- const p = T(null), h = T(t), c = T(s);
3202
- h.current = t, c.current = s;
3203
- const [x, v] = A(!1), [g, w] = A({ position: "fixed", visibility: "hidden", width: we }), [k, j] = A("bottom"), [E, M] = A(null), L = T(!1), W = t[s], H = s === t.length - 1, z = He(() => {
3204
- const b = h.current[c.current];
3205
- if (!b || !p.current) return;
3206
- const I = Qt(b.target);
3207
- if (!I) return;
3208
- const O = I.getBoundingClientRect(), _ = p.current.getBoundingClientRect().height || 160, y = we, S = b.position || es(O, _, y), { top: C, left: K, arrowOffset: X } = ts(S, O, _, y);
3209
- j(S), w({
3202
+ const h = R(null), c = R(t), v = R(s);
3203
+ c.current = t, v.current = s;
3204
+ const [x, g] = A(!1), [y, k] = A({ position: "fixed", visibility: "hidden", width: we }), [j, T] = A("bottom"), [z, L] = A(null), H = R(!1), U = t[s], W = s === t.length - 1, b = He(() => {
3205
+ const I = c.current[v.current];
3206
+ if (!I || !h.current) return;
3207
+ const O = Qt(I.target);
3208
+ if (!O) return;
3209
+ const P = O.getBoundingClientRect(), w = h.current.getBoundingClientRect().height || 160, S = we, C = I.position || es(P, w, S), { top: K, left: X, arrowOffset: E } = ts(C, P, w, S);
3210
+ T(C), k({
3210
3211
  position: "fixed",
3211
- top: C,
3212
- left: K,
3212
+ top: K,
3213
+ left: X,
3213
3214
  width: we,
3214
3215
  visibility: "visible",
3215
- "--arrow-offset": `${X}px`
3216
- }), M({
3217
- top: O.top - be,
3218
- left: O.left - be,
3219
- width: O.width + be * 2,
3220
- height: O.height + be * 2
3216
+ "--arrow-offset": `${E}px`
3217
+ }), L({
3218
+ top: P.top - be,
3219
+ left: P.left - be,
3220
+ width: P.width + be * 2,
3221
+ height: P.height + be * 2
3221
3222
  });
3222
3223
  }, []);
3223
3224
  return D(() => {
3224
- window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
3225
- const b = requestAnimationFrame(() => {
3226
- z(), v(!0), L.current = !0;
3225
+ window.addEventListener("scroll", b, !0), window.addEventListener("resize", b);
3226
+ const I = requestAnimationFrame(() => {
3227
+ b(), g(!0), H.current = !0;
3227
3228
  });
3228
3229
  return () => {
3229
- cancelAnimationFrame(b), window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z);
3230
+ cancelAnimationFrame(I), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
3230
3231
  };
3231
3232
  }, []), D(() => {
3232
- if (!L.current) return;
3233
- v(!1);
3234
- const b = setTimeout(() => {
3235
- w((I) => ({ ...I, visibility: "hidden" })), requestAnimationFrame(() => {
3236
- z(), v(!0);
3233
+ if (!H.current) return;
3234
+ g(!1);
3235
+ const I = setTimeout(() => {
3236
+ k((O) => ({ ...O, visibility: "hidden" })), requestAnimationFrame(() => {
3237
+ b(), g(!0);
3237
3238
  });
3238
3239
  }, Zt + 20);
3239
- return () => clearTimeout(b);
3240
+ return () => clearTimeout(I);
3240
3241
  }, [s]), D(() => {
3241
- x && p.current && p.current.focus({ preventScroll: !0 });
3242
+ x && h.current && h.current.focus({ preventScroll: !0 });
3242
3243
  }, [x]), D(() => {
3243
- const b = (I) => {
3244
- I.key === "Escape" && o();
3244
+ const I = (O) => {
3245
+ O.key === "Escape" && o();
3245
3246
  };
3246
- return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
3247
+ return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
3247
3248
  }, [o]), D(() => {
3248
3249
  if (!x) return;
3249
- const b = (I) => {
3250
- if (I.key !== "Tab" || !p.current) return;
3251
- const O = Array.from(
3252
- p.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3250
+ const I = (O) => {
3251
+ if (O.key !== "Tab" || !h.current) return;
3252
+ const P = Array.from(
3253
+ h.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3253
3254
  );
3254
- if (!O.length) return;
3255
- const U = O[0], _ = O[O.length - 1];
3256
- I.shiftKey && document.activeElement === U ? (I.preventDefault(), _.focus()) : !I.shiftKey && document.activeElement === _ && (I.preventDefault(), U.focus());
3255
+ if (!P.length) return;
3256
+ const _ = P[0], w = P[P.length - 1];
3257
+ O.shiftKey && document.activeElement === _ ? (O.preventDefault(), w.focus()) : !O.shiftKey && document.activeElement === w && (O.preventDefault(), _.focus());
3257
3258
  };
3258
- return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
3259
- }, [x]), !W || typeof document > "u" ? null : he.createPortal(
3259
+ return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
3260
+ }, [x]), !U || typeof document > "u" ? null : he.createPortal(
3260
3261
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3261
- E && /* @__PURE__ */ e.jsx(
3262
+ z && /* @__PURE__ */ e.jsx(
3262
3263
  "div",
3263
3264
  {
3264
3265
  className: [
3265
3266
  "ds-coachmark__spotlight",
3266
3267
  i && "ds-coachmark__spotlight--overlay",
3268
+ !l && "ds-coachmark__spotlight--no-ring",
3267
3269
  x && "ds-coachmark__spotlight--visible"
3268
3270
  ].filter(Boolean).join(" "),
3269
- style: E,
3271
+ style: z,
3270
3272
  "aria-hidden": "true"
3271
3273
  }
3272
3274
  ),
3273
3275
  /* @__PURE__ */ e.jsxs(
3274
3276
  "div",
3275
3277
  {
3276
- ref: p,
3278
+ ref: h,
3277
3279
  "data-ds-portal": "",
3278
3280
  role: "dialog",
3279
3281
  "aria-modal": "false",
3280
3282
  "aria-live": "polite",
3281
- "aria-label": W.title ?? `Step ${s + 1} of ${t.length}`,
3283
+ "aria-label": U.title ?? `Step ${s + 1} of ${t.length}`,
3282
3284
  className: [
3283
3285
  "ds-coachmark__bubble",
3284
- `ds-coachmark__bubble--${k}`,
3286
+ `ds-coachmark__bubble--${j}`,
3285
3287
  x && "ds-coachmark__bubble--visible"
3286
3288
  ].filter(Boolean).join(" "),
3287
- style: g,
3289
+ style: y,
3288
3290
  tabIndex: -1,
3289
3291
  children: [
3290
3292
  /* @__PURE__ */ e.jsx(
@@ -3293,21 +3295,21 @@ function bn({
3293
3295
  type: "button",
3294
3296
  className: "ds-coachmark__close",
3295
3297
  onClick: o,
3296
- "aria-label": d,
3298
+ "aria-label": m,
3297
3299
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3298
3300
  }
3299
3301
  ),
3300
- W.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: W.title }),
3301
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: W.content }),
3302
+ U.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: U.title }),
3303
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: U.content }),
3302
3304
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3303
- /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3305
+ t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3304
3306
  s + 1,
3305
3307
  " / ",
3306
3308
  t.length
3307
3309
  ] }),
3308
3310
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3309
- s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", onClick: a, children: u }),
3310
- /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", onClick: H ? r : n, children: H ? m : l })
3311
+ s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", onClick: a, children: d }),
3312
+ /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", onClick: W ? r : n, children: W ? p : u })
3311
3313
  ] })
3312
3314
  ] })
3313
3315
  ]
@@ -3415,7 +3417,7 @@ export {
3415
3417
  sn as ToolCallBubble,
3416
3418
  sn as ToolCallCard,
3417
3419
  Ge as Tooltip,
3418
- P as iconSizes,
3420
+ M as iconSizes,
3419
3421
  Mt as useAnimatedNumber,
3420
3422
  Vt as useAnimatedPlaceholder,
3421
3423
  jn as useCoachmark,