@donkit-ai/design-system 1.4.92 → 1.4.94

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,4 +1,4 @@
1
- import X, { useMemo as vt, useContext as ie, createContext as De, useState as L, useRef as S, useEffect as F, useLayoutEffect as ct, useId as bt, useCallback as se, forwardRef as dt } from "react";
1
+ import X, { useMemo as vt, useContext as ie, createContext as De, useState as D, useRef as A, useEffect as z, useLayoutEffect as ct, useId as bt, useCallback as se, forwardRef as dt } from "react";
2
2
  import { Check as Pe, X as ee, ChevronDown as ye, Minus as _t, Plus as jt, XCircle as Me, AlertTriangle as ze, CheckCircle as Fe, Info as We, ChevronUp as Nt, ChevronsUpDown as wt, ChevronLeft as gt, ChevronRight as yt, Copy as kt, Brain as Et, Loader as Tt, Paperclip as Ge, Square as $t, ArrowUp as Rt, Zap as St, Cpu as Ke, FileText as At, ThumbsUp as Bt, ThumbsDown as It } from "lucide-react";
3
3
  import re from "react-dom";
4
4
  const q = {
@@ -56,20 +56,20 @@ function Dt() {
56
56
  function t(m) {
57
57
  if (m == null) return null;
58
58
  if (typeof m == "function")
59
- return m.$$typeof === P ? null : m.displayName || m.name || null;
59
+ return m.$$typeof === y ? null : m.displayName || m.name || null;
60
60
  if (typeof m == "string") return m;
61
61
  switch (m) {
62
- case y:
62
+ case g:
63
63
  return "Fragment";
64
- case T:
64
+ case R:
65
65
  return "Profiler";
66
66
  case j:
67
67
  return "StrictMode";
68
- case A:
68
+ case S:
69
69
  return "Suspense";
70
70
  case I:
71
71
  return "SuspenseList";
72
- case k:
72
+ case W:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof m == "object")
@@ -78,19 +78,19 @@ function Dt() {
78
78
  ), m.$$typeof) {
79
79
  case N:
80
80
  return "Portal";
81
- case w:
81
+ case b:
82
82
  return m.displayName || "Context";
83
- case g:
83
+ case k:
84
84
  return (m._context.displayName || "Context") + ".Consumer";
85
- case _:
86
- var x = m.render;
87
- return m = m.displayName, m || (m = x.displayName || x.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
88
- case D:
89
- return x = m.displayName || null, x !== null ? x : t(m.type) || "Memo";
90
- case O:
91
- x = m._payload, m = m._init;
85
+ case w:
86
+ var v = m.render;
87
+ return m = m.displayName, m || (m = v.displayName || v.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
88
+ case L:
89
+ return v = m.displayName || null, v !== null ? v : t(m.type) || "Memo";
90
+ case F:
91
+ v = m._payload, m = m._init;
92
92
  try {
93
- return t(m(x));
93
+ return t(m(v));
94
94
  } catch {
95
95
  }
96
96
  }
@@ -102,50 +102,50 @@ function Dt() {
102
102
  function n(m) {
103
103
  try {
104
104
  s(m);
105
- var x = !1;
105
+ var v = !1;
106
106
  } catch {
107
- x = !0;
107
+ v = !0;
108
108
  }
109
- if (x) {
110
- x = console;
111
- var B = x.error, C = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
109
+ if (v) {
110
+ v = console;
111
+ var B = v.error, U = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
112
112
  return B.call(
113
- x,
113
+ v,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
- C
115
+ U
116
116
  ), s(m);
117
117
  }
118
118
  }
119
119
  function r(m) {
120
- if (m === y) return "<>";
121
- if (typeof m == "object" && m !== null && m.$$typeof === O)
120
+ if (m === g) return "<>";
121
+ if (typeof m == "object" && m !== null && m.$$typeof === F)
122
122
  return "<...>";
123
123
  try {
124
- var x = t(m);
125
- return x ? "<" + x + ">" : "<...>";
124
+ var v = t(m);
125
+ return v ? "<" + v + ">" : "<...>";
126
126
  } catch {
127
127
  return "<...>";
128
128
  }
129
129
  }
130
130
  function a() {
131
- var m = H.A;
131
+ var m = O.A;
132
132
  return m === null ? null : m.getOwner();
133
133
  }
134
134
  function o() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(m) {
138
- if (W.call(m, "key")) {
139
- var x = Object.getOwnPropertyDescriptor(m, "key").get;
140
- if (x && x.isReactWarning) return !1;
138
+ if (P.call(m, "key")) {
139
+ var v = Object.getOwnPropertyDescriptor(m, "key").get;
140
+ if (v && v.isReactWarning) return !1;
141
141
  }
142
142
  return m.key !== void 0;
143
143
  }
144
- function l(m, x) {
144
+ function l(m, v) {
145
145
  function B() {
146
146
  $ || ($ = !0, console.error(
147
147
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
148
- x
148
+ v
149
149
  ));
150
150
  }
151
151
  B.isReactWarning = !0, Object.defineProperty(m, "key", {
@@ -155,18 +155,18 @@ function Dt() {
155
155
  }
156
156
  function c() {
157
157
  var m = t(this.type);
158
- return R[m] || (R[m] = !0, console.error(
158
+ return T[m] || (T[m] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), m = this.props.ref, m !== void 0 ? m : null;
161
161
  }
162
- function u(m, x, B, C, te, le) {
162
+ function u(m, v, B, U, te, le) {
163
163
  var G = B.ref;
164
164
  return m = {
165
- $$typeof: v,
165
+ $$typeof: _,
166
166
  type: m,
167
- key: x,
167
+ key: v,
168
168
  props: B,
169
- _owner: C
169
+ _owner: U
170
170
  }, (G !== void 0 ? G : null) !== null ? Object.defineProperty(m, "ref", {
171
171
  enumerable: !1,
172
172
  get: c
@@ -192,42 +192,42 @@ function Dt() {
192
192
  value: le
193
193
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
194
194
  }
195
- function d(m, x, B, C, te, le) {
196
- var G = x.children;
195
+ function d(m, v, B, U, te, le) {
196
+ var G = v.children;
197
197
  if (G !== void 0)
198
- if (C)
199
- if (M(G)) {
200
- for (C = 0; C < G.length; C++)
201
- p(G[C]);
198
+ if (U)
199
+ if (V(G)) {
200
+ for (U = 0; U < G.length; U++)
201
+ p(G[U]);
202
202
  Object.freeze && Object.freeze(G);
203
203
  } else
204
204
  console.error(
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
207
  else p(G);
208
- if (W.call(x, "key")) {
208
+ if (P.call(v, "key")) {
209
209
  G = t(m);
210
- var Z = Object.keys(x).filter(function(je) {
210
+ var Z = Object.keys(v).filter(function(je) {
211
211
  return je !== "key";
212
212
  });
213
- C = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", Y[G + C] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ U = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", Y[G + U] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
217
217
  React keys must be passed directly to JSX without using spread:
218
218
  let props = %s;
219
219
  <%s key={someKey} {...props} />`,
220
- C,
220
+ U,
221
221
  G,
222
222
  Z,
223
223
  G
224
- ), Y[G + C] = !0);
224
+ ), Y[G + U] = !0);
225
225
  }
226
- if (G = null, B !== void 0 && (n(B), G = "" + B), i(x) && (n(x.key), G = "" + x.key), "key" in x) {
226
+ if (G = null, B !== void 0 && (n(B), G = "" + B), i(v) && (n(v.key), G = "" + v.key), "key" in v) {
227
227
  B = {};
228
- for (var fe in x)
229
- fe !== "key" && (B[fe] = x[fe]);
230
- } else B = x;
228
+ for (var fe in v)
229
+ fe !== "key" && (B[fe] = v[fe]);
230
+ } else B = v;
231
231
  return G && l(
232
232
  B,
233
233
  typeof m == "function" ? m.displayName || m.name || "Unknown" : m
@@ -241,12 +241,12 @@ React keys must be passed directly to JSX without using spread:
241
241
  );
242
242
  }
243
243
  function p(m) {
244
- h(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === O && (m._payload.status === "fulfilled" ? h(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
244
+ h(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === F && (m._payload.status === "fulfilled" ? h(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
245
245
  }
246
246
  function h(m) {
247
- return typeof m == "object" && m !== null && m.$$typeof === v;
247
+ return typeof m == "object" && m !== null && m.$$typeof === _;
248
248
  }
249
- var f = X, v = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), w = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), k = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), H = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, M = Array.isArray, b = console.createTask ? console.createTask : function() {
249
+ var f = X, _ = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), b = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), y = Symbol.for("react.client.reference"), O = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, V = Array.isArray, x = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  f = {
@@ -254,29 +254,29 @@ React keys must be passed directly to JSX without using spread:
254
254
  return m();
255
255
  }
256
256
  };
257
- var $, R = {}, V = f.react_stack_bottom_frame.bind(
257
+ var $, T = {}, C = f.react_stack_bottom_frame.bind(
258
258
  f,
259
259
  o
260
- )(), U = b(r(o)), Y = {};
261
- ge.Fragment = y, ge.jsx = function(m, x, B) {
262
- var C = 1e4 > H.recentlyCreatedOwnerStacks++;
260
+ )(), H = x(r(o)), Y = {};
261
+ ge.Fragment = g, ge.jsx = function(m, v, B) {
262
+ var U = 1e4 > O.recentlyCreatedOwnerStacks++;
263
263
  return d(
264
264
  m,
265
- x,
265
+ v,
266
266
  B,
267
267
  !1,
268
- C ? Error("react-stack-top-frame") : V,
269
- C ? b(r(m)) : U
268
+ U ? Error("react-stack-top-frame") : C,
269
+ U ? x(r(m)) : H
270
270
  );
271
- }, ge.jsxs = function(m, x, B) {
272
- var C = 1e4 > H.recentlyCreatedOwnerStacks++;
271
+ }, ge.jsxs = function(m, v, B) {
272
+ var U = 1e4 > O.recentlyCreatedOwnerStacks++;
273
273
  return d(
274
274
  m,
275
- x,
275
+ v,
276
276
  B,
277
277
  !0,
278
- C ? Error("react-stack-top-frame") : V,
279
- C ? b(r(m)) : U
278
+ U ? Error("react-stack-top-frame") : C,
279
+ U ? x(r(m)) : H
280
280
  );
281
281
  };
282
282
  }()), ge;
@@ -394,42 +394,42 @@ function de({
394
394
  href: p,
395
395
  "aria-label": h,
396
396
  "aria-pressed": f,
397
- className: v = "",
397
+ className: _ = "",
398
398
  ...N
399
399
  }) {
400
- const y = a && !t, j = i === "loading", T = i === "success", g = i === "error", w = j || T || g, _ = !!(l || c), A = n === "xs" ? "s" : "m", I = s === "danger" ? "on-accent" : "default", D = Mt[n] ?? 16, O = j ? /* @__PURE__ */ e.jsx(Pt, { size: A, color: I }) : T ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: D, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: D, strokeWidth: 2.5 }) }) : null, k = [
400
+ const g = a && !t, j = i === "loading", R = i === "success", k = i === "error", b = j || R || k, w = !!(l || c), S = n === "xs" ? "s" : "m", I = s === "danger" ? "on-accent" : "default", L = Mt[n] ?? 16, F = j ? /* @__PURE__ */ e.jsx(Pt, { size: S, color: I }) : R ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: L, strokeWidth: 2.5 }) }) : k ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: L, strokeWidth: 2.5 }) }) : null, W = [
401
401
  "ds-button",
402
402
  `ds-button--${s}`,
403
403
  `ds-button--${n}`,
404
404
  r && "ds-button--full",
405
- y && "ds-button--icon-only",
406
- v
407
- ].filter(Boolean).join(" "), P = i !== "idle" ? i : void 0, H = f !== void 0 ? f : _ ? !0 : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
408
- w ? O : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
405
+ g && "ds-button--icon-only",
406
+ _
407
+ ].filter(Boolean).join(" "), y = i !== "idle" ? i : void 0, O = f !== void 0 ? f : w ? !0 : void 0, P = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
408
+ b ? F : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
409
409
  t
410
410
  ] });
411
411
  if (p) {
412
- const M = (b) => {
412
+ const V = (x) => {
413
413
  if (o || j) {
414
- b.preventDefault();
414
+ x.preventDefault();
415
415
  return;
416
416
  }
417
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), u == null || u(b));
417
+ x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), u == null || u(x));
418
418
  };
419
419
  return /* @__PURE__ */ e.jsx(
420
420
  "a",
421
421
  {
422
- className: k,
422
+ className: W,
423
423
  href: o || j ? void 0 : p,
424
- onClick: M,
424
+ onClick: V,
425
425
  "aria-label": h,
426
426
  "aria-disabled": o || j ? "true" : void 0,
427
427
  "aria-busy": j ? "true" : void 0,
428
- "aria-pressed": H,
429
- "data-state": P,
430
- "data-active": _ ? "true" : void 0,
428
+ "aria-pressed": O,
429
+ "data-state": y,
430
+ "data-active": w ? "true" : void 0,
431
431
  ...N,
432
- children: W
432
+ children: P
433
433
  }
434
434
  );
435
435
  }
@@ -437,16 +437,16 @@ function de({
437
437
  "button",
438
438
  {
439
439
  type: d,
440
- className: k,
440
+ className: W,
441
441
  disabled: o,
442
442
  onClick: j ? void 0 : u,
443
443
  "aria-label": h,
444
444
  "aria-busy": j ? "true" : void 0,
445
- "aria-pressed": H,
446
- "data-state": P,
447
- "data-active": _ ? "true" : void 0,
445
+ "aria-pressed": O,
446
+ "data-state": y,
447
+ "data-active": w ? "true" : void 0,
448
448
  ...N,
449
- children: W
449
+ children: P
450
450
  }
451
451
  );
452
452
  }
@@ -464,7 +464,7 @@ function Ts({
464
464
  iconRightLabel: d,
465
465
  ...p
466
466
  }) {
467
- const h = K(), f = u || `input-${X.useId()}`, v = n ? `${f}-hint` : void 0, N = s ? `${f}-error` : void 0, y = N || v;
467
+ const h = K(), f = u || `input-${X.useId()}`, _ = n ? `${f}-hint` : void 0, N = s ? `${f}-error` : void 0, g = N || _;
468
468
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
469
469
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: t }),
470
470
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -476,7 +476,7 @@ function Ts({
476
476
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
477
477
  disabled: c,
478
478
  "aria-invalid": s ? "true" : "false",
479
- "aria-describedby": y,
479
+ "aria-describedby": g,
480
480
  ...p
481
481
  }
482
482
  ),
@@ -492,7 +492,7 @@ function Ts({
492
492
  }
493
493
  )
494
494
  ] }),
495
- n && !s && /* @__PURE__ */ e.jsx("span", { id: v, className: "ds-input-hint", children: n }),
495
+ n && !s && /* @__PURE__ */ e.jsx("span", { id: _, className: "ds-input-hint", children: n }),
496
496
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: N, className: "ds-input-error", role: "alert", children: s }) }) })
497
497
  ] });
498
498
  }
@@ -540,141 +540,141 @@ function Rs({
540
540
  id: u,
541
541
  ...d
542
542
  }) {
543
- const p = K(), h = a ?? p.selectOption, [f, v] = L(!1), [N, y] = L(!1), [j, T] = L({}), [g, w] = L("down"), [_, A] = L(-1), I = S(null), D = S(null), O = S(null), k = S(null), P = u || `select-${X.useId()}`, H = `${P}-label`, W = o ? `${P}-error` : void 0, M = 150, b = (x = !1) => {
544
- N || (y(!0), A(-1), k.current = setTimeout(() => {
543
+ const p = K(), h = a ?? p.selectOption, [f, _] = D(!1), [N, g] = D(!1), [j, R] = D({}), [k, b] = D("down"), [w, S] = D(-1), I = A(null), L = A(null), F = A(null), W = A(null), y = u || `select-${X.useId()}`, O = `${y}-label`, P = o ? `${y}-error` : void 0, V = 150, x = (v = !1) => {
544
+ N || (g(!0), S(-1), W.current = setTimeout(() => {
545
545
  var B;
546
- v(!1), y(!1), x && ((B = O.current) == null || B.focus());
547
- }, M));
548
- }, $ = (x) => {
549
- clearTimeout(k.current), y(!1);
550
- const B = x !== void 0 ? x : Math.max(r.findIndex((C) => C.value === s), 0);
551
- A(B), v(!0);
546
+ _(!1), g(!1), v && ((B = F.current) == null || B.focus());
547
+ }, V));
548
+ }, $ = (v) => {
549
+ clearTimeout(W.current), g(!1);
550
+ const B = v !== void 0 ? v : Math.max(r.findIndex((U) => U.value === s), 0);
551
+ S(B), _(!0);
552
552
  };
553
- F(() => () => clearTimeout(k.current), []);
554
- const R = () => {
553
+ z(() => () => clearTimeout(W.current), []);
554
+ const T = () => {
555
555
  var Z;
556
- const x = (Z = I.current) == null ? void 0 : Z.getBoundingClientRect();
557
- if (!x) return;
558
- const B = window.innerHeight, C = B - x.bottom, te = x.top, G = C < 300 && te > C;
559
- w(G ? "up" : "down"), T(
560
- G ? { bottom: B - x.top + 4, left: x.left, width: x.width } : { top: x.bottom + 4, left: x.left, width: x.width }
556
+ const v = (Z = I.current) == null ? void 0 : Z.getBoundingClientRect();
557
+ if (!v) return;
558
+ const B = window.innerHeight, U = B - v.bottom, te = v.top, G = U < 300 && te > U;
559
+ b(G ? "up" : "down"), R(
560
+ G ? { bottom: B - v.top + 4, left: v.left, width: v.width } : { top: v.bottom + 4, left: v.left, width: v.width }
561
561
  );
562
562
  };
563
- F(() => {
563
+ z(() => {
564
564
  if (f)
565
- return R(), window.addEventListener("scroll", R, !0), window.addEventListener("resize", R), () => {
566
- window.removeEventListener("scroll", R, !0), window.removeEventListener("resize", R);
565
+ return T(), window.addEventListener("scroll", T, !0), window.addEventListener("resize", T), () => {
566
+ window.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T);
567
567
  };
568
- }, [f]), F(() => {
569
- const x = (B) => {
570
- I.current && !I.current.contains(B.target) && D.current && !D.current.contains(B.target) && b();
568
+ }, [f]), z(() => {
569
+ const v = (B) => {
570
+ I.current && !I.current.contains(B.target) && L.current && !L.current.contains(B.target) && x();
571
571
  };
572
- return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
573
- }, [N]), F(() => {
572
+ return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
573
+ }, [N]), z(() => {
574
574
  var B;
575
- if (!f || _ < 0 || !D.current) return;
576
- (B = D.current.querySelectorAll(".ds-select-option")[_]) == null || B.scrollIntoView({ block: "nearest" });
577
- }, [_, f]);
578
- const V = (x) => {
579
- switch (x.key) {
575
+ if (!f || w < 0 || !L.current) return;
576
+ (B = L.current.querySelectorAll(".ds-select-option")[w]) == null || B.scrollIntoView({ block: "nearest" });
577
+ }, [w, f]);
578
+ const C = (v) => {
579
+ switch (v.key) {
580
580
  case "ArrowDown":
581
- x.preventDefault(), f ? A((B) => Math.min(B + 1, r.length - 1)) : $();
581
+ v.preventDefault(), f ? S((B) => Math.min(B + 1, r.length - 1)) : $();
582
582
  break;
583
583
  case "ArrowUp":
584
- x.preventDefault(), f ? A((B) => Math.max(B - 1, 0)) : $(r.length - 1);
584
+ v.preventDefault(), f ? S((B) => Math.max(B - 1, 0)) : $(r.length - 1);
585
585
  break;
586
586
  case "Home":
587
- f && (x.preventDefault(), A(0));
587
+ f && (v.preventDefault(), S(0));
588
588
  break;
589
589
  case "End":
590
- f && (x.preventDefault(), A(r.length - 1));
590
+ f && (v.preventDefault(), S(r.length - 1));
591
591
  break;
592
592
  case "Enter":
593
593
  case " ":
594
- x.preventDefault(), f ? _ >= 0 && (n == null || n(r[_].value), b(!0)) : $();
594
+ v.preventDefault(), f ? w >= 0 && (n == null || n(r[w].value), x(!0)) : $();
595
595
  break;
596
596
  case "Escape":
597
- f && (x.preventDefault(), b(!0));
597
+ f && (v.preventDefault(), x(!0));
598
598
  break;
599
599
  case "Tab":
600
- f && b(!1);
600
+ f && x(!1);
601
601
  break;
602
602
  }
603
- }, U = r.find((x) => x.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = f && /* @__PURE__ */ e.jsx(
603
+ }, H = r.find((v) => v.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = f && /* @__PURE__ */ e.jsx(
604
604
  "div",
605
605
  {
606
- ref: D,
606
+ ref: L,
607
607
  "data-ds-portal": "",
608
608
  role: "listbox",
609
- "aria-labelledby": t ? H : void 0,
609
+ "aria-labelledby": t ? O : void 0,
610
610
  tabIndex: -1,
611
611
  className: [
612
612
  "ds-select-dropdown ds-scrollable",
613
613
  `ds-select-dropdown--${l}`,
614
- `ds-select-dropdown--${g}`,
614
+ `ds-select-dropdown--${k}`,
615
615
  N && "ds-select-dropdown--closing"
616
616
  ].filter(Boolean).join(" "),
617
617
  style: j,
618
- children: r.map((x, B) => /* @__PURE__ */ e.jsx(
618
+ children: r.map((v, B) => /* @__PURE__ */ e.jsx(
619
619
  "button",
620
620
  {
621
- id: `${P}-opt-${B}`,
621
+ id: `${y}-opt-${B}`,
622
622
  type: "button",
623
623
  role: "option",
624
624
  tabIndex: -1,
625
- "aria-selected": s === x.value,
625
+ "aria-selected": s === v.value,
626
626
  className: [
627
627
  "ds-select-option",
628
628
  `ds-select-option--${l}`,
629
- s === x.value && "ds-select-option--selected",
630
- B === _ && "ds-select-option--active"
629
+ s === v.value && "ds-select-option--selected",
630
+ B === w && "ds-select-option--active"
631
631
  ].filter(Boolean).join(" "),
632
632
  onClick: () => {
633
- n == null || n(x.value), b(!0);
633
+ n == null || n(v.value), x(!0);
634
634
  },
635
- children: x.label
635
+ children: v.label
636
636
  },
637
- x.value
637
+ v.value
638
638
  ))
639
639
  }
640
640
  );
641
641
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
642
- t && /* @__PURE__ */ e.jsx("label", { id: H, className: "ds-select-label", children: t }),
642
+ t && /* @__PURE__ */ e.jsx("label", { id: O, className: "ds-select-label", children: t }),
643
643
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: I, children: /* @__PURE__ */ e.jsxs(
644
644
  "button",
645
645
  {
646
- ref: O,
646
+ ref: F,
647
647
  type: "button",
648
- id: P,
648
+ id: y,
649
649
  role: "combobox",
650
650
  "aria-haspopup": "listbox",
651
651
  "aria-expanded": f,
652
- "aria-activedescendant": f && _ >= 0 ? `${P}-opt-${_}` : void 0,
653
- "aria-labelledby": t ? H : void 0,
652
+ "aria-activedescendant": f && w >= 0 ? `${y}-opt-${w}` : void 0,
653
+ "aria-labelledby": t ? O : void 0,
654
654
  "aria-invalid": o ? "true" : "false",
655
- "aria-describedby": W,
655
+ "aria-describedby": P,
656
656
  className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
657
657
  onClick: () => {
658
- c || (f ? b() : $());
658
+ c || (f ? x() : $());
659
659
  },
660
- onKeyDown: V,
660
+ onKeyDown: C,
661
661
  disabled: c,
662
662
  ...d,
663
663
  children: [
664
- /* @__PURE__ */ e.jsx("span", { className: U ? "" : "ds-select-placeholder", children: (U == null ? void 0 : U.label) || h }),
664
+ /* @__PURE__ */ e.jsx("span", { className: H ? "" : "ds-select-placeholder", children: (H == null ? void 0 : H.label) || h }),
665
665
  /* @__PURE__ */ e.jsx(
666
666
  ye,
667
667
  {
668
668
  size: Y,
669
669
  strokeWidth: 1.5,
670
- className: `ds-select-icon ${f && g === "down" ? "ds-select-icon--open" : ""} ${f && g === "up" ? "ds-select-icon--up" : ""}`,
670
+ className: `ds-select-icon ${f && k === "down" ? "ds-select-icon--open" : ""} ${f && k === "up" ? "ds-select-icon--up" : ""}`,
671
671
  "aria-hidden": "true"
672
672
  }
673
673
  )
674
674
  ]
675
675
  }
676
676
  ) }),
677
- o && /* @__PURE__ */ e.jsx("span", { id: W, className: "ds-select-error", role: "alert", children: o }),
677
+ o && /* @__PURE__ */ e.jsx("span", { id: P, className: "ds-select-error", role: "alert", children: o }),
678
678
  typeof document < "u" && re.createPortal(m, document.body)
679
679
  ] });
680
680
  }
@@ -693,38 +693,38 @@ function Ss({
693
693
  increaseLabel: p,
694
694
  ...h
695
695
  }) {
696
- const f = K(), v = () => {
696
+ const f = K(), _ = () => {
697
697
  if (l) return;
698
- const w = Math.min(Number(s) + o, a);
699
- n == null || n(w);
698
+ const b = Math.min(Number(s) + o, a);
699
+ n == null || n(b);
700
700
  }, N = () => {
701
701
  if (l) return;
702
- const w = Math.max(Number(s) - o, r);
703
- n == null || n(w);
704
- }, y = (w) => {
702
+ const b = Math.max(Number(s) - o, r);
703
+ n == null || n(b);
704
+ }, g = (b) => {
705
705
  if (l) return;
706
- const _ = w.target.value;
707
- if (_ === "") {
706
+ const w = b.target.value;
707
+ if (w === "") {
708
708
  n == null || n(r);
709
709
  return;
710
710
  }
711
- const A = Number(_);
712
- if (!isNaN(A)) {
713
- const I = Math.min(Math.max(A, r), a);
711
+ const S = Number(w);
712
+ if (!isNaN(S)) {
713
+ const I = Math.min(Math.max(S, r), a);
714
714
  n == null || n(I);
715
715
  }
716
716
  }, j = [
717
717
  "ds-stepper-wrapper",
718
718
  l && "ds-stepper-wrapper--disabled",
719
719
  u && "ds-stepper-wrapper--error"
720
- ].filter(Boolean).join(" "), T = [
720
+ ].filter(Boolean).join(" "), R = [
721
721
  "ds-stepper",
722
722
  `ds-stepper--${i}`,
723
723
  l && "ds-stepper--disabled"
724
- ].filter(Boolean).join(" "), g = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
724
+ ].filter(Boolean).join(" "), k = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
725
725
  return /* @__PURE__ */ e.jsxs("div", { className: j, children: [
726
726
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
727
- /* @__PURE__ */ e.jsxs("div", { className: T, children: [
727
+ /* @__PURE__ */ e.jsxs("div", { className: R, children: [
728
728
  /* @__PURE__ */ e.jsx(
729
729
  "button",
730
730
  {
@@ -733,7 +733,7 @@ function Ss({
733
733
  onClick: N,
734
734
  disabled: l || s <= r,
735
735
  "aria-label": d ?? f.decrease,
736
- children: /* @__PURE__ */ e.jsx(_t, { size: g, strokeWidth: 1.5 })
736
+ children: /* @__PURE__ */ e.jsx(_t, { size: k, strokeWidth: 1.5 })
737
737
  }
738
738
  ),
739
739
  /* @__PURE__ */ e.jsx(
@@ -742,7 +742,7 @@ function Ss({
742
742
  type: "number",
743
743
  className: "ds-stepper-input",
744
744
  value: s,
745
- onChange: y,
745
+ onChange: g,
746
746
  min: r,
747
747
  max: a,
748
748
  step: o,
@@ -755,10 +755,10 @@ function Ss({
755
755
  {
756
756
  type: "button",
757
757
  className: "ds-stepper-button ds-stepper-button--plus",
758
- onClick: v,
758
+ onClick: _,
759
759
  disabled: l || s >= a,
760
760
  "aria-label": p ?? f.increase,
761
- children: /* @__PURE__ */ e.jsx(jt, { size: g, strokeWidth: 1.5 })
761
+ children: /* @__PURE__ */ e.jsx(jt, { size: k, strokeWidth: 1.5 })
762
762
  }
763
763
  )
764
764
  ] }),
@@ -785,7 +785,7 @@ function As({
785
785
  l
786
786
  ].filter(Boolean).join(" ");
787
787
  if (o) {
788
- const v = (N) => {
788
+ const _ = (N) => {
789
789
  if (i) {
790
790
  N.preventDefault();
791
791
  return;
@@ -797,7 +797,7 @@ function As({
797
797
  {
798
798
  className: p,
799
799
  href: i ? void 0 : o,
800
- onClick: v,
800
+ onClick: _,
801
801
  "aria-disabled": i ? "true" : void 0,
802
802
  ...c,
803
803
  children: t
@@ -909,24 +909,24 @@ function zs({
909
909
  closeLabel: i,
910
910
  ...l
911
911
  }) {
912
- const c = K(), u = S(null), d = S(null), p = X.useId(), [h, f] = L(!1), v = () => {
912
+ const c = K(), u = A(null), d = A(null), p = X.useId(), [h, f] = D(!1), _ = () => {
913
913
  !n || h || (f(!0), setTimeout(() => {
914
914
  f(!1), n();
915
915
  }, Ot));
916
916
  };
917
- F(() => {
918
- const g = (_) => {
919
- _.key === "Escape" && v();
920
- }, w = (_) => {
917
+ z(() => {
918
+ const k = (w) => {
919
+ w.key === "Escape" && _();
920
+ }, b = (w) => {
921
921
  var I;
922
- const A = Ce(_);
923
- A && ((I = d.current) != null && I.contains(A) || Ue(A, u.current) || v());
922
+ const S = Ce(w);
923
+ S && ((I = d.current) != null && I.contains(S) || Ue(S, u.current) || _());
924
924
  };
925
- return document.addEventListener("keydown", g), document.addEventListener("mousedown", w), () => {
926
- document.removeEventListener("keydown", g), document.removeEventListener("mousedown", w);
925
+ return document.addEventListener("keydown", k), document.addEventListener("mousedown", b), () => {
926
+ document.removeEventListener("keydown", k), document.removeEventListener("mousedown", b);
927
927
  };
928
928
  }, [n, h]);
929
- const N = X.Children.toArray(t), y = N.find((g) => (g == null ? void 0 : g.type) === xe), j = N.filter((g) => (g == null ? void 0 : g.type) !== xe), T = /* @__PURE__ */ e.jsx(
929
+ const N = X.Children.toArray(t), g = N.find((k) => (k == null ? void 0 : k.type) === xe), j = N.filter((k) => (k == null ? void 0 : k.type) !== xe), R = /* @__PURE__ */ e.jsx(
930
930
  "div",
931
931
  {
932
932
  className: ["ds-modal-overlay", h && "ds-modal-overlay--closing"].filter(Boolean).join(" "),
@@ -950,7 +950,7 @@ function zs({
950
950
  variant: "ghost",
951
951
  size: "small",
952
952
  icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
953
- onClick: v,
953
+ onClick: _,
954
954
  "aria-label": i ?? c.closeModal
955
955
  }
956
956
  ),
@@ -959,13 +959,13 @@ function zs({
959
959
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
960
960
  ] }),
961
961
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: j }),
962
- y
962
+ g
963
963
  ]
964
964
  }
965
965
  )
966
966
  }
967
967
  );
968
- return typeof document > "u" ? T : re.createPortal(T, document.body);
968
+ return typeof document > "u" ? R : re.createPortal(R, document.body);
969
969
  }
970
970
  function xe({ children: t }) {
971
971
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
@@ -979,24 +979,24 @@ function Fs({
979
979
  closeLabel: a,
980
980
  ...o
981
981
  }) {
982
- const i = K(), l = S(null), c = S(null), u = X.useId(), [d, p] = L(!1), h = () => {
982
+ const i = K(), l = A(null), c = A(null), u = X.useId(), [d, p] = D(!1), h = () => {
983
983
  !n || d || (p(!0), setTimeout(() => {
984
984
  p(!1), n();
985
985
  }, Ct));
986
986
  };
987
- F(() => {
988
- const j = (g) => {
989
- g.key === "Escape" && h();
990
- }, T = (g) => {
991
- var _;
992
- const w = Ce(g);
993
- w && ((_ = c.current) != null && _.contains(w) || Ue(w, l.current) || h());
987
+ z(() => {
988
+ const j = (k) => {
989
+ k.key === "Escape" && h();
990
+ }, R = (k) => {
991
+ var w;
992
+ const b = Ce(k);
993
+ b && ((w = c.current) != null && w.contains(b) || Ue(b, l.current) || h());
994
994
  };
995
- return document.addEventListener("keydown", j), document.addEventListener("mousedown", T), () => {
996
- document.removeEventListener("keydown", j), document.removeEventListener("mousedown", T);
995
+ return document.addEventListener("keydown", j), document.addEventListener("mousedown", R), () => {
996
+ document.removeEventListener("keydown", j), document.removeEventListener("mousedown", R);
997
997
  };
998
998
  }, [n, d]);
999
- const f = X.Children.toArray(t), v = f.find((j) => (j == null ? void 0 : j.type) === xe), N = f.filter((j) => (j == null ? void 0 : j.type) !== xe), y = /* @__PURE__ */ e.jsx(
999
+ const f = X.Children.toArray(t), _ = f.find((j) => (j == null ? void 0 : j.type) === xe), N = f.filter((j) => (j == null ? void 0 : j.type) !== xe), g = /* @__PURE__ */ e.jsx(
1000
1000
  "div",
1001
1001
  {
1002
1002
  className: ["ds-bottom-sheet-overlay", d && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
@@ -1030,13 +1030,13 @@ function Fs({
1030
1030
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
1031
1031
  ] }),
1032
1032
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: N }),
1033
- v
1033
+ _
1034
1034
  ]
1035
1035
  }
1036
1036
  )
1037
1037
  }
1038
1038
  );
1039
- return typeof document > "u" ? y : re.createPortal(y, document.body);
1039
+ return typeof document > "u" ? g : re.createPortal(g, document.body);
1040
1040
  }
1041
1041
  function Ut({
1042
1042
  children: t,
@@ -1048,8 +1048,8 @@ function Ut({
1048
1048
  className: i = "",
1049
1049
  ...l
1050
1050
  }) {
1051
- const c = K(), u = s ?? c.code, [d, p] = L(n), h = r !== void 0, f = h ? r : d, v = () => {
1052
- h ? a == null || a(!r) : p((y) => !y);
1051
+ const c = K(), u = s ?? c.code, [d, p] = D(n), h = r !== void 0, f = h ? r : d, _ = () => {
1052
+ h ? a == null || a(!r) : p((g) => !g);
1053
1053
  }, N = [
1054
1054
  "ds-code-accordion",
1055
1055
  `ds-code-accordion--${o}`,
@@ -1062,7 +1062,7 @@ function Ut({
1062
1062
  {
1063
1063
  type: "button",
1064
1064
  className: "ds-code-accordion__header",
1065
- onClick: v,
1065
+ onClick: _,
1066
1066
  "aria-expanded": f,
1067
1067
  children: [
1068
1068
  /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: u }),
@@ -1233,23 +1233,23 @@ function qs({
1233
1233
  return a ? /* @__PURE__ */ e.jsx("button", { type: "button", role: "listitem", className: c, onClick: a, ...i, children: u }) : /* @__PURE__ */ e.jsx("div", { role: "listitem", className: c, ...i, children: u });
1234
1234
  }
1235
1235
  function Gs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1236
- const o = S(null), i = S(null), [l, c] = L(!1), u = S(!1), d = S(null), p = S(null), h = () => {
1236
+ const o = A(null), i = A(null), [l, c] = D(!1), u = A(!1), d = A(null), p = A(null), h = () => {
1237
1237
  if (!o.current) return;
1238
1238
  const f = o.current.querySelector(`[data-value="${s}"]`);
1239
1239
  if (!f) return;
1240
- const v = o.current.getBoundingClientRect(), N = f.getBoundingClientRect(), y = N.left - v.left, j = N.width;
1241
- i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = y + "px", i.current.style.width = j + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1240
+ const _ = o.current.getBoundingClientRect(), N = f.getBoundingClientRect(), g = N.left - _.left, j = N.width;
1241
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = j + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1242
1242
  if (!i.current || !o.current) return;
1243
- const T = o.current.querySelector(`[data-value="${s}"]`);
1244
- if (!T) return;
1245
- const g = o.current.getBoundingClientRect(), w = T.getBoundingClientRect();
1246
- i.current.style.transition = "none", i.current.style.left = w.left - g.left + "px", i.current.style.width = w.width + "px";
1243
+ const R = o.current.querySelector(`[data-value="${s}"]`);
1244
+ if (!R) return;
1245
+ const k = o.current.getBoundingClientRect(), b = R.getBoundingClientRect();
1246
+ i.current.style.transition = "none", i.current.style.left = b.left - k.left + "px", i.current.style.width = b.width + "px";
1247
1247
  }));
1248
1248
  };
1249
1249
  return p.current = h, ct(() => {
1250
1250
  const f = d.current !== s;
1251
1251
  d.current = s, u.current = l && f, h();
1252
- }), F(() => {
1252
+ }), z(() => {
1253
1253
  if (!o.current) return;
1254
1254
  const f = new ResizeObserver(() => {
1255
1255
  u.current = !1, p.current();
@@ -1303,7 +1303,7 @@ function He({
1303
1303
  padding: o = "m",
1304
1304
  ...i
1305
1305
  }) {
1306
- const [l, c] = L(n), u = r !== void 0, d = u ? r : l, p = () => {
1306
+ const [l, c] = D(n), u = r !== void 0, d = u ? r : l, p = () => {
1307
1307
  u ? a == null || a(!r) : c((f) => !f);
1308
1308
  }, h = [
1309
1309
  "ds-accordion",
@@ -1367,32 +1367,32 @@ function Vt(t, s, n) {
1367
1367
  return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1368
1368
  }
1369
1369
  function Ve({ children: t, content: s, position: n, ...r }) {
1370
- const [a, o] = L(!1), [i, l] = L({ visibility: "hidden" }), [c, u] = L(n || "top"), d = S(null), p = S(null), h = S(!1), f = () => {
1370
+ const [a, o] = D(!1), [i, l] = D({ visibility: "hidden" }), [c, u] = D(n || "top"), d = A(null), p = A(null), h = A(!1), f = () => {
1371
1371
  if (!d.current || !p.current) return;
1372
- const N = d.current.getBoundingClientRect(), y = p.current.getBoundingClientRect(), j = n || Vt(N, y.height, y.width), { top: T, left: g, arrowOffset: w } = Ht(j, N, y);
1372
+ const N = d.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), j = n || Vt(N, g.height, g.width), { top: R, left: k, arrowOffset: b } = Ht(j, N, g);
1373
1373
  u(j), l({
1374
1374
  position: "fixed",
1375
- top: T,
1376
- left: g,
1375
+ top: R,
1376
+ left: k,
1377
1377
  visibility: "visible",
1378
- "--arrow-offset": `${w}px`
1378
+ "--arrow-offset": `${b}px`
1379
1379
  });
1380
1380
  };
1381
- if (F(() => {
1381
+ if (z(() => {
1382
1382
  if (!a) return;
1383
1383
  l({ position: "fixed", visibility: "hidden" });
1384
1384
  const N = requestAnimationFrame(f);
1385
1385
  return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1386
1386
  cancelAnimationFrame(N), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1387
1387
  };
1388
- }, [a, n]), F(() => {
1388
+ }, [a, n]), z(() => {
1389
1389
  if (!a) return;
1390
- const N = (y) => {
1391
- d.current && !d.current.contains(y.target) && o(!1);
1390
+ const N = (g) => {
1391
+ d.current && !d.current.contains(g.target) && o(!1);
1392
1392
  };
1393
1393
  return document.addEventListener("touchstart", N), () => document.removeEventListener("touchstart", N);
1394
1394
  }, [a]), !s) return t;
1395
- const v = a && /* @__PURE__ */ e.jsx(
1395
+ const _ = a && /* @__PURE__ */ e.jsx(
1396
1396
  "div",
1397
1397
  {
1398
1398
  ref: p,
@@ -1420,7 +1420,7 @@ function Ve({ children: t, content: s, position: n, ...r }) {
1420
1420
  ...r,
1421
1421
  children: [
1422
1422
  t,
1423
- typeof document < "u" && re.createPortal(v, document.body)
1423
+ typeof document < "u" && re.createPortal(_, document.body)
1424
1424
  ]
1425
1425
  }
1426
1426
  );
@@ -1443,59 +1443,59 @@ function Ks({
1443
1443
  popoverClassName: u = "",
1444
1444
  ...d
1445
1445
  }) {
1446
- const p = bt(), h = S(null), f = S(null), v = S(null), [N, y] = L(!1), [j, T] = L(null), g = s != null, w = a || t || "", _ = Qe(t || a), A = Qe(o), I = se(() => {
1447
- v.current != null && (window.clearTimeout(v.current), v.current = null);
1448
- }, []), D = se(() => {
1449
- I(), y(!0);
1450
- }, [I]), O = se(() => {
1451
- I(), v.current = window.setTimeout(() => y(!1), Yt);
1452
- }, [I]), k = se(() => {
1453
- const W = h.current, M = f.current;
1454
- if (!W) return;
1455
- const b = W.getBoundingClientRect(), $ = (M == null ? void 0 : M.offsetHeight) ?? 160, R = (M == null ? void 0 : M.offsetWidth) ?? 260;
1456
- let V = b.bottom + Ze;
1457
- V + $ > window.innerHeight - Ee && (V = Math.max(Ee, b.top - $ - Ze));
1458
- const U = Math.max(Ee, Math.min(b.left, window.innerWidth - R - Ee));
1459
- T({ top: V, left: U });
1446
+ const p = bt(), h = A(null), f = A(null), _ = A(null), [N, g] = D(!1), [j, R] = D(null), k = s != null, b = a || t || "", w = Qe(t || a), S = Qe(o), I = se(() => {
1447
+ _.current != null && (window.clearTimeout(_.current), _.current = null);
1448
+ }, []), L = se(() => {
1449
+ I(), g(!0);
1450
+ }, [I]), F = se(() => {
1451
+ I(), _.current = window.setTimeout(() => g(!1), Yt);
1452
+ }, [I]), W = se(() => {
1453
+ const P = h.current, V = f.current;
1454
+ if (!P) return;
1455
+ const x = P.getBoundingClientRect(), $ = (V == null ? void 0 : V.offsetHeight) ?? 160, T = (V == null ? void 0 : V.offsetWidth) ?? 260;
1456
+ let C = x.bottom + Ze;
1457
+ C + $ > window.innerHeight - Ee && (C = Math.max(Ee, x.top - $ - Ze));
1458
+ const H = Math.max(Ee, Math.min(x.left, window.innerWidth - T - Ee));
1459
+ R({ top: C, left: H });
1460
1460
  }, []);
1461
1461
  ct(() => {
1462
- N && k();
1463
- }, [N, k]), F(() => {
1462
+ N && W();
1463
+ }, [N, W]), z(() => {
1464
1464
  if (!N) return;
1465
- const W = () => k(), M = ($) => {
1466
- $.key === "Escape" && y(!1);
1467
- }, b = ($) => {
1468
- var V, U;
1465
+ const P = () => W(), V = ($) => {
1466
+ $.key === "Escape" && g(!1);
1467
+ }, x = ($) => {
1468
+ var C, H;
1469
1469
  if (n === "hover") return;
1470
- const R = $.target;
1471
- (V = f.current) != null && V.contains(R) || (U = h.current) != null && U.contains(R) || y(!1);
1470
+ const T = $.target;
1471
+ (C = f.current) != null && C.contains(T) || (H = h.current) != null && H.contains(T) || g(!1);
1472
1472
  };
1473
- return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("keydown", M), document.addEventListener("mousedown", b), () => {
1474
- window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("keydown", M), document.removeEventListener("mousedown", b);
1473
+ return window.addEventListener("scroll", P, !0), window.addEventListener("resize", P), document.addEventListener("keydown", V), document.addEventListener("mousedown", x), () => {
1474
+ window.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P), document.removeEventListener("keydown", V), document.removeEventListener("mousedown", x);
1475
1475
  };
1476
- }, [N, k, n]), F(() => () => I(), [I]);
1477
- const P = n === "hover" ? { onMouseEnter: D, onMouseLeave: O } : {}, H = N ? re.createPortal(
1476
+ }, [N, W, n]), z(() => () => I(), [I]);
1477
+ const y = n === "hover" ? { onMouseEnter: L, onMouseLeave: F } : {}, O = N ? re.createPortal(
1478
1478
  /* @__PURE__ */ e.jsxs(
1479
1479
  "div",
1480
1480
  {
1481
1481
  ref: f,
1482
1482
  id: p,
1483
1483
  role: "dialog",
1484
- "aria-label": w || _ || "Mention",
1484
+ "aria-label": b || w || "Mention",
1485
1485
  "data-ds-portal": "",
1486
1486
  className: ["ds-mention__popover", u].filter(Boolean).join(" "),
1487
1487
  style: j ? { top: j.top, left: j.left } : { top: -9999, left: -9999, visibility: "hidden" },
1488
- ...P,
1488
+ ...y,
1489
1489
  children: [
1490
- (r || w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1490
+ (r || b || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1491
1491
  r,
1492
- (w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1493
- w ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: w }) : null,
1494
- A ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: A }) : null
1492
+ (b || S) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1493
+ b ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: b }) : null,
1494
+ S ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: S }) : null
1495
1495
  ] })
1496
1496
  ] }),
1497
1497
  i ? /* @__PURE__ */ e.jsx("p", { className: "ds-mention__desc", children: i }) : null,
1498
- l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => y(!1), children: l }) : null
1498
+ l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => g(!1), children: l }) : null
1499
1499
  ]
1500
1500
  }
1501
1501
  ),
@@ -1510,28 +1510,28 @@ function Ks({
1510
1510
  type: "button",
1511
1511
  className: [
1512
1512
  "ds-mention",
1513
- g && "ds-mention--custom",
1513
+ k && "ds-mention--custom",
1514
1514
  c
1515
1515
  ].filter(Boolean).join(" "),
1516
1516
  "aria-expanded": N,
1517
1517
  "aria-haspopup": "dialog",
1518
- "aria-label": g && (_ || w) || void 0,
1518
+ "aria-label": k && (w || b) || void 0,
1519
1519
  "aria-controls": N ? p : void 0,
1520
- onClick: (W) => {
1521
- var M;
1522
- if ((M = d.onClick) == null || M.call(d, W), !W.defaultPrevented) {
1523
- if (W.preventDefault(), W.stopPropagation(), n === "hover") {
1524
- D();
1520
+ onClick: (P) => {
1521
+ var V;
1522
+ if ((V = d.onClick) == null || V.call(d, P), !P.defaultPrevented) {
1523
+ if (P.preventDefault(), P.stopPropagation(), n === "hover") {
1524
+ L();
1525
1525
  return;
1526
1526
  }
1527
- y((b) => !b);
1527
+ g((x) => !x);
1528
1528
  }
1529
1529
  },
1530
- ...P,
1531
- children: g ? s : _
1530
+ ...y,
1531
+ children: k ? s : w
1532
1532
  }
1533
1533
  ),
1534
- typeof document < "u" ? H : null
1534
+ typeof document < "u" ? O : null
1535
1535
  ] });
1536
1536
  }
1537
1537
  function Xs({
@@ -1681,7 +1681,7 @@ function Xt(t) {
1681
1681
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1682
1682
  }
1683
1683
  function Qs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1684
- const l = Kt(t ?? ""), [c, u] = L(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Xt(t) });
1684
+ const l = Kt(t ?? ""), [c, u] = D(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Xt(t) });
1685
1685
  return /* @__PURE__ */ e.jsx(
1686
1686
  "div",
1687
1687
  {
@@ -1921,7 +1921,7 @@ function fn({
1921
1921
  }
1922
1922
  ),
1923
1923
  h.map(
1924
- (f, v) => f === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${v}`) : /* @__PURE__ */ e.jsx(
1924
+ (f, _) => f === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${_}`) : /* @__PURE__ */ e.jsx(
1925
1925
  "button",
1926
1926
  {
1927
1927
  className: `ds-pagination-page${f === t ? " ds-pagination-page--current" : ""}`,
@@ -1968,27 +1968,27 @@ function mn({
1968
1968
  closeLabel: u,
1969
1969
  ...d
1970
1970
  }) {
1971
- const p = K(), h = S(null), f = X.useId(), [v, N] = L(!1), y = () => {
1972
- !n || v || (N(!0), setTimeout(() => {
1971
+ const p = K(), h = A(null), f = X.useId(), [_, N] = D(!1), g = () => {
1972
+ !n || _ || (N(!0), setTimeout(() => {
1973
1973
  N(!1), n();
1974
1974
  }, Zt));
1975
1975
  };
1976
- F(() => {
1977
- const _ = (I) => {
1978
- I.key === "Escape" && y();
1979
- }, A = (I) => {
1980
- var O, k;
1981
- const D = Ce(I);
1982
- D && ((O = c == null ? void 0 : c.current) != null && O.contains(D) || (k = h.current) != null && k.contains(D) || Ue(D, null) || y());
1976
+ z(() => {
1977
+ const w = (I) => {
1978
+ I.key === "Escape" && g();
1979
+ }, S = (I) => {
1980
+ var F, W;
1981
+ const L = Ce(I);
1982
+ L && ((F = c == null ? void 0 : c.current) != null && F.contains(L) || (W = h.current) != null && W.contains(L) || Ue(L, null) || g());
1983
1983
  };
1984
- return document.addEventListener("keydown", _), document.addEventListener("mousedown", A), () => {
1985
- document.removeEventListener("keydown", _), document.removeEventListener("mousedown", A);
1984
+ return document.addEventListener("keydown", w), document.addEventListener("mousedown", S), () => {
1985
+ document.removeEventListener("keydown", w), document.removeEventListener("mousedown", S);
1986
1986
  };
1987
- }, [n, v, c]);
1988
- const j = X.Children.toArray(t), T = j.find((_) => (_ == null ? void 0 : _.type) === et || (_ == null ? void 0 : _.type) === xe), g = j.filter((_) => (_ == null ? void 0 : _.type) !== et && (_ == null ? void 0 : _.type) !== xe), w = /* @__PURE__ */ e.jsx(
1987
+ }, [n, _, c]);
1988
+ const j = X.Children.toArray(t), R = j.find((w) => (w == null ? void 0 : w.type) === et || (w == null ? void 0 : w.type) === xe), k = j.filter((w) => (w == null ? void 0 : w.type) !== et && (w == null ? void 0 : w.type) !== xe), b = /* @__PURE__ */ e.jsx(
1989
1989
  "div",
1990
1990
  {
1991
- className: ["ds-side-page-overlay", v && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1991
+ className: ["ds-side-page-overlay", _ && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1992
1992
  "data-side": a,
1993
1993
  style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1994
1994
  ...d,
@@ -1996,7 +1996,7 @@ function mn({
1996
1996
  "div",
1997
1997
  {
1998
1998
  ref: h,
1999
- className: ["ds-side-page", v && "ds-side-page--closing"].filter(Boolean).join(" "),
1999
+ className: ["ds-side-page", _ && "ds-side-page--closing"].filter(Boolean).join(" "),
2000
2000
  "data-surface": "2",
2001
2001
  "data-side": a,
2002
2002
  "data-size": o,
@@ -2011,7 +2011,7 @@ function mn({
2011
2011
  variant: "ghost",
2012
2012
  size: "small",
2013
2013
  icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
2014
- onClick: y,
2014
+ onClick: g,
2015
2015
  "aria-label": u ?? p.close
2016
2016
  }
2017
2017
  ),
@@ -2019,14 +2019,14 @@ function mn({
2019
2019
  s && /* @__PURE__ */ e.jsx("h3", { id: f, className: "ds-side-page__title", children: s }),
2020
2020
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
2021
2021
  ] }),
2022
- /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: g }),
2023
- T
2022
+ /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: k }),
2023
+ R
2024
2024
  ]
2025
2025
  }
2026
2026
  )
2027
2027
  }
2028
2028
  );
2029
- return typeof document > "u" ? w : re.createPortal(w, document.body);
2029
+ return typeof document > "u" ? b : re.createPortal(b, document.body);
2030
2030
  }
2031
2031
  function et({ children: t }) {
2032
2032
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
@@ -2081,7 +2081,7 @@ function hn({
2081
2081
  className: d = "",
2082
2082
  ...p
2083
2083
  }) {
2084
- const { collapsed: h, side: f } = ie(_e), v = ie(Re), j = {
2084
+ const { collapsed: h, side: f } = ie(_e), _ = ie(Re), j = {
2085
2085
  className: [
2086
2086
  "ds-nav-rail__item",
2087
2087
  d
@@ -2098,10 +2098,10 @@ function hn({
2098
2098
  "data-onboarding": u || void 0
2099
2099
  },
2100
2100
  ...p
2101
- }, T = i != null, g = f === "left" ? "right" : "left", w = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2101
+ }, R = i != null, k = f === "left" ? "right" : "left", b = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2102
2102
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
2103
2103
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
2104
- !h && T && /* @__PURE__ */ e.jsx(
2104
+ !h && R && /* @__PURE__ */ e.jsx(
2105
2105
  "span",
2106
2106
  {
2107
2107
  className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
@@ -2109,11 +2109,11 @@ function hn({
2109
2109
  children: i
2110
2110
  }
2111
2111
  ),
2112
- !h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
2113
- h && T && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
2114
- h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
2115
- ] }), _ = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...j, children: w }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: w });
2116
- return h && !v ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: g, children: _ }) : _;
2112
+ !h && l && (!R || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
2113
+ h && R && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
2114
+ h && l && (!R || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
2115
+ ] }), w = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...j, children: b }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: b });
2116
+ return h && !_ ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: k, children: w }) : w;
2117
2117
  }
2118
2118
  function xn({ children: t, className: s = "", ...n }) {
2119
2119
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
@@ -2128,7 +2128,7 @@ function _n({ className: t = "", ...s }) {
2128
2128
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
2129
2129
  }
2130
2130
  function jn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...a }) {
2131
- const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] = L(n);
2131
+ const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] = D(n);
2132
2132
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
2133
2133
  !o && /* @__PURE__ */ e.jsxs(
2134
2134
  "button",
@@ -2189,11 +2189,11 @@ function wn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
2189
2189
  "data-disabled": r || void 0
2190
2190
  },
2191
2191
  ...l
2192
- }, v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2192
+ }, _ = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2193
2193
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
2194
2194
  !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
2195
- ] }), N = u === "left" ? "right" : "left", y = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...f, children: v }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: v });
2196
- return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: N, children: y }) : y;
2195
+ ] }), N = u === "left" ? "right" : "left", g = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...f, children: _ }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: _ });
2196
+ return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: N, children: g }) : g;
2197
2197
  }
2198
2198
  const tt = 240, st = 6, nt = 8;
2199
2199
  function gn({
@@ -2205,51 +2205,51 @@ function gn({
2205
2205
  defaultOpen: o = !1,
2206
2206
  closeLabel: i
2207
2207
  }) {
2208
- const l = K(), { side: c } = ie(_e), [u, d] = L(o), p = r !== void 0, h = p ? r : u, [f, v] = L(!1), N = S(null), y = S(null), [j, T] = L({}), g = se(() => {
2208
+ const l = K(), { side: c } = ie(_e), [u, d] = D(o), p = r !== void 0, h = p ? r : u, [f, _] = D(!1), N = A(null), g = A(null), [j, R] = D({}), k = se(() => {
2209
2209
  p ? a == null || a(!0) : d(!0);
2210
- }, [p, a]), w = se(() => {
2210
+ }, [p, a]), b = se(() => {
2211
2211
  p ? a == null || a(!1) : d(!1);
2212
- }, [p, a]), _ = se(() => h ? w() : g(), [h, g, w]), A = se(() => {
2213
- var W;
2214
- const D = N.current;
2215
- if (!D) return;
2216
- const O = D.getBoundingClientRect(), k = window.innerHeight, P = ((W = y.current) == null ? void 0 : W.offsetHeight) ?? 300, H = Math.max(nt, Math.min(k - P - nt, O.top));
2217
- T(c === "right" ? {
2212
+ }, [p, a]), w = se(() => h ? b() : k(), [h, k, b]), S = se(() => {
2213
+ var P;
2214
+ const L = N.current;
2215
+ if (!L) return;
2216
+ const F = L.getBoundingClientRect(), W = window.innerHeight, y = ((P = g.current) == null ? void 0 : P.offsetHeight) ?? 300, O = Math.max(nt, Math.min(W - y - nt, F.top));
2217
+ R(c === "right" ? {
2218
2218
  position: "fixed",
2219
- top: H,
2220
- right: window.innerWidth - O.left + st,
2219
+ top: O,
2220
+ right: window.innerWidth - F.left + st,
2221
2221
  width: tt
2222
2222
  } : {
2223
2223
  position: "fixed",
2224
- top: H,
2225
- left: O.right + st,
2224
+ top: O,
2225
+ left: F.right + st,
2226
2226
  width: tt
2227
2227
  });
2228
2228
  }, [c]);
2229
- F(() => {
2229
+ z(() => {
2230
2230
  if (!h) {
2231
- v(!1);
2231
+ _(!1);
2232
2232
  return;
2233
2233
  }
2234
- return A(), requestAnimationFrame(() => v(!0)), window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
2235
- window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
2234
+ return S(), requestAnimationFrame(() => _(!0)), window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
2235
+ window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
2236
2236
  };
2237
- }, [h, A]), F(() => {
2237
+ }, [h, S]), z(() => {
2238
2238
  if (!h) return;
2239
- const D = (k) => {
2240
- var P, H;
2241
- !((P = y.current) != null && P.contains(k.target)) && !((H = N.current) != null && H.contains(k.target)) && w();
2242
- }, O = (k) => {
2243
- k.key === "Escape" && w();
2239
+ const L = (W) => {
2240
+ var y, O;
2241
+ !((y = g.current) != null && y.contains(W.target)) && !((O = N.current) != null && O.contains(W.target)) && b();
2242
+ }, F = (W) => {
2243
+ W.key === "Escape" && b();
2244
2244
  };
2245
- return document.addEventListener("mousedown", D), document.addEventListener("keydown", O), () => {
2246
- document.removeEventListener("mousedown", D), document.removeEventListener("keydown", O);
2245
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", F), () => {
2246
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", F);
2247
2247
  };
2248
- }, [h, w]);
2248
+ }, [h, b]);
2249
2249
  const I = h && /* @__PURE__ */ e.jsxs(
2250
2250
  "div",
2251
2251
  {
2252
- ref: y,
2252
+ ref: g,
2253
2253
  className: [
2254
2254
  "ds-nav-rail-flyout",
2255
2255
  `ds-nav-rail-flyout--${c}`,
@@ -2267,7 +2267,7 @@ function gn({
2267
2267
  {
2268
2268
  type: "button",
2269
2269
  className: "ds-nav-rail-flyout__close",
2270
- onClick: w,
2270
+ onClick: b,
2271
2271
  "aria-label": i ?? l.close,
2272
2272
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
2273
2273
  }
@@ -2278,7 +2278,7 @@ function gn({
2278
2278
  }
2279
2279
  );
2280
2280
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2281
- /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: N, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2281
+ /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: N, onClick: w, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2282
2282
  typeof document < "u" && re.createPortal(I, document.body)
2283
2283
  ] });
2284
2284
  }
@@ -2342,96 +2342,96 @@ function kn({
2342
2342
  style: l,
2343
2343
  ...c
2344
2344
  }) {
2345
- const [u, d] = L(!1), [p, h] = L(!1), f = n !== void 0, v = f ? n : u, N = S(null), y = S(null), j = S(null), T = S(null), [g, w] = L({}), _ = S(null), A = 150, I = () => {
2345
+ const [u, d] = D(!1), [p, h] = D(!1), f = n !== void 0, _ = f ? n : u, N = A(null), g = A(null), j = A(null), R = A(null), [k, b] = D({}), w = A(null), S = 150, I = () => {
2346
2346
  if (f)
2347
2347
  r == null || r(!1);
2348
2348
  else {
2349
2349
  if (p) return;
2350
- h(!0), _.current = setTimeout(() => {
2350
+ h(!0), w.current = setTimeout(() => {
2351
2351
  d(!1), h(!1);
2352
- }, A);
2352
+ }, S);
2353
2353
  }
2354
- }, D = () => {
2355
- const b = !v;
2356
- f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) : I();
2357
- }, O = () => {
2358
- v || (f ? r == null || r(!0) : (clearTimeout(_.current), h(!1), d(!0)));
2354
+ }, L = () => {
2355
+ const x = !_;
2356
+ f ? r == null || r(x) : x ? (clearTimeout(w.current), h(!1), d(!0)) : I();
2357
+ }, F = () => {
2358
+ _ || (f ? r == null || r(!0) : (clearTimeout(w.current), h(!1), d(!0)));
2359
2359
  };
2360
- F(() => () => clearTimeout(_.current), []), F(() => {
2361
- if (!v) return;
2362
- const b = 300, $ = () => {
2360
+ z(() => () => clearTimeout(w.current), []), z(() => {
2361
+ if (!_) return;
2362
+ const x = 300, $ = () => {
2363
2363
  var Y;
2364
- const R = (Y = N.current) == null ? void 0 : Y.getBoundingClientRect();
2365
- if (!R) return;
2366
- const V = window.innerHeight - R.bottom, U = V < b + 8 && R.top > V;
2367
- w(
2368
- a === "right" ? U ? { bottom: window.innerHeight - R.top + 4, top: "auto", right: window.innerWidth - R.right } : { top: R.bottom + 4, bottom: "auto", right: window.innerWidth - R.right } : U ? { bottom: window.innerHeight - R.top + 4, top: "auto", left: R.left } : { top: R.bottom + 4, bottom: "auto", left: R.left }
2364
+ const T = (Y = N.current) == null ? void 0 : Y.getBoundingClientRect();
2365
+ if (!T) return;
2366
+ const C = window.innerHeight - T.bottom, H = C < x + 8 && T.top > C;
2367
+ b(
2368
+ a === "right" ? H ? { bottom: window.innerHeight - T.top + 4, top: "auto", right: window.innerWidth - T.right } : { top: T.bottom + 4, bottom: "auto", right: window.innerWidth - T.right } : H ? { bottom: window.innerHeight - T.top + 4, top: "auto", left: T.left } : { top: T.bottom + 4, bottom: "auto", left: T.left }
2369
2369
  );
2370
2370
  };
2371
2371
  return $(), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
2372
2372
  window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
2373
2373
  };
2374
- }, [v, a]);
2375
- const k = () => {
2374
+ }, [_, a]);
2375
+ const W = () => {
2376
2376
  var $;
2377
- const b = ($ = j.current) == null ? void 0 : $.querySelector(
2377
+ const x = ($ = j.current) == null ? void 0 : $.querySelector(
2378
2378
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
2379
2379
  );
2380
- b == null || b.focus();
2380
+ x == null || x.focus();
2381
2381
  };
2382
- F(() => {
2383
- if (!v) return;
2384
- const b = (R) => {
2385
- var V, U;
2386
- !((V = N.current) != null && V.contains(R.target)) && !((U = y.current) != null && U.contains(R.target)) && I();
2387
- }, $ = (R) => {
2388
- R.key === "Escape" && (I(), k());
2382
+ z(() => {
2383
+ if (!_) return;
2384
+ const x = (T) => {
2385
+ var C, H;
2386
+ !((C = N.current) != null && C.contains(T.target)) && !((H = g.current) != null && H.contains(T.target)) && I();
2387
+ }, $ = (T) => {
2388
+ T.key === "Escape" && (I(), W());
2389
2389
  };
2390
- return document.addEventListener("mousedown", b), document.addEventListener("keydown", $), () => {
2391
- document.removeEventListener("mousedown", b), document.removeEventListener("keydown", $);
2390
+ return document.addEventListener("mousedown", x), document.addEventListener("keydown", $), () => {
2391
+ document.removeEventListener("mousedown", x), document.removeEventListener("keydown", $);
2392
2392
  };
2393
- }, [v]), F(() => {
2394
- if (!v || !T.current || !y.current) return;
2395
- const b = P(), $ = T.current === "last" ? b[b.length - 1] : b[0];
2396
- $ == null || $.focus(), T.current = null;
2397
- }, [v]);
2398
- const P = () => y.current ? [...y.current.querySelectorAll(
2393
+ }, [_]), z(() => {
2394
+ if (!_ || !R.current || !g.current) return;
2395
+ const x = y(), $ = R.current === "last" ? x[x.length - 1] : x[0];
2396
+ $ == null || $.focus(), R.current = null;
2397
+ }, [_]);
2398
+ const y = () => g.current ? [...g.current.querySelectorAll(
2399
2399
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2400
- )] : [], H = (b) => {
2401
- var $, R;
2402
- if (b.key === "ArrowDown")
2403
- b.preventDefault(), v ? ($ = P()[0]) == null || $.focus() : (T.current = "first", O());
2404
- else if (b.key === "ArrowUp")
2405
- if (b.preventDefault(), !v)
2406
- T.current = "last", O();
2400
+ )] : [], O = (x) => {
2401
+ var $, T;
2402
+ if (x.key === "ArrowDown")
2403
+ x.preventDefault(), _ ? ($ = y()[0]) == null || $.focus() : (R.current = "first", F());
2404
+ else if (x.key === "ArrowUp")
2405
+ if (x.preventDefault(), !_)
2406
+ R.current = "last", F();
2407
2407
  else {
2408
- const V = P();
2409
- (R = V[V.length - 1]) == null || R.focus();
2408
+ const C = y();
2409
+ (T = C[C.length - 1]) == null || T.focus();
2410
2410
  }
2411
- }, W = (b) => {
2412
- var V, U, Y, m;
2413
- const $ = P(), R = $.findIndex((x) => x === document.activeElement);
2414
- switch (b.key) {
2411
+ }, P = (x) => {
2412
+ var C, H, Y, m;
2413
+ const $ = y(), T = $.findIndex((v) => v === document.activeElement);
2414
+ switch (x.key) {
2415
2415
  case "ArrowDown":
2416
- b.preventDefault(), (V = $[Math.min(R + 1, $.length - 1)]) == null || V.focus();
2416
+ x.preventDefault(), (C = $[Math.min(T + 1, $.length - 1)]) == null || C.focus();
2417
2417
  break;
2418
2418
  case "ArrowUp":
2419
- b.preventDefault(), R <= 0 ? k() : (U = $[R - 1]) == null || U.focus();
2419
+ x.preventDefault(), T <= 0 ? W() : (H = $[T - 1]) == null || H.focus();
2420
2420
  break;
2421
2421
  case "Home":
2422
- b.preventDefault(), (Y = $[0]) == null || Y.focus();
2422
+ x.preventDefault(), (Y = $[0]) == null || Y.focus();
2423
2423
  break;
2424
2424
  case "End":
2425
- b.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
2425
+ x.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
2426
2426
  break;
2427
2427
  case "Tab":
2428
2428
  I();
2429
2429
  break;
2430
2430
  }
2431
- }, M = v && /* @__PURE__ */ e.jsx(
2431
+ }, V = _ && /* @__PURE__ */ e.jsx(
2432
2432
  "div",
2433
2433
  {
2434
- ref: y,
2434
+ ref: g,
2435
2435
  role: "menu",
2436
2436
  "data-ds-portal": "",
2437
2437
  className: [
@@ -2439,34 +2439,34 @@ function kn({
2439
2439
  `ds-dropdown__menu--${a}`,
2440
2440
  p && "ds-dropdown__menu--closing"
2441
2441
  ].filter(Boolean).join(" "),
2442
- style: g,
2443
- onKeyDown: W,
2444
- children: s.map((b, $) => {
2445
- if (b.separator)
2442
+ style: k,
2443
+ onKeyDown: P,
2444
+ children: s.map((x, $) => {
2445
+ if (x.separator)
2446
2446
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, $);
2447
- if (b.type === "section")
2447
+ if (x.type === "section")
2448
2448
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2449
- b.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: b.label }),
2450
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: b.content })
2449
+ x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
2450
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
2451
2451
  ] }, $);
2452
- const R = !!b.href, V = R ? "a" : "button", U = R ? { href: b.disabled ? void 0 : b.href, "aria-disabled": b.disabled ? "true" : void 0 } : { type: "button", disabled: b.disabled };
2452
+ const T = !!x.href, C = T ? "a" : "button", H = T ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
2453
2453
  return /* @__PURE__ */ e.jsxs(
2454
- V,
2454
+ C,
2455
2455
  {
2456
2456
  role: "menuitem",
2457
2457
  className: [
2458
2458
  "ds-dropdown__item",
2459
- b.danger && "ds-dropdown__item--danger"
2459
+ x.danger && "ds-dropdown__item--danger"
2460
2460
  ].filter(Boolean).join(" "),
2461
- ...U,
2461
+ ...H,
2462
2462
  onClick: () => {
2463
2463
  var Y;
2464
- (Y = b.onClick) == null || Y.call(b), I();
2464
+ (Y = x.onClick) == null || Y.call(x), I();
2465
2465
  },
2466
2466
  children: [
2467
- b.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: b.icon }),
2468
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: b.label }),
2469
- b.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: b.shortcut })
2467
+ x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
2468
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
2469
+ x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
2470
2470
  ]
2471
2471
  },
2472
2472
  $
@@ -2487,12 +2487,12 @@ function kn({
2487
2487
  {
2488
2488
  ref: j,
2489
2489
  className: "ds-dropdown__trigger",
2490
- onClick: D,
2491
- onKeyDown: H,
2490
+ onClick: L,
2491
+ onKeyDown: O,
2492
2492
  children: t
2493
2493
  }
2494
2494
  ),
2495
- typeof document < "u" && re.createPortal(M, document.body)
2495
+ typeof document < "u" && re.createPortal(V, document.body)
2496
2496
  ]
2497
2497
  }
2498
2498
  );
@@ -2536,8 +2536,8 @@ function En({
2536
2536
  }
2537
2537
  const es = (t) => 1 - Math.pow(1 - t, 3), ts = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2538
2538
  function ss(t, { duration: s = 600 } = {}) {
2539
- const [n, r] = L(t), a = S(t), o = S(null);
2540
- return F(() => {
2539
+ const [n, r] = D(t), a = A(t), o = A(null);
2540
+ return z(() => {
2541
2541
  if (ts()) {
2542
2542
  r(t), a.current = t;
2543
2543
  return;
@@ -2564,8 +2564,8 @@ function Tn({
2564
2564
  return `${r}${i}${a}`;
2565
2565
  }
2566
2566
  function ns({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2567
- const r = S(null), [a, o] = L(!1);
2568
- return F(() => {
2567
+ const r = A(null), [a, o] = D(!1);
2568
+ return z(() => {
2569
2569
  const i = r.current;
2570
2570
  if (!i) return;
2571
2571
  const l = new IntersectionObserver(
@@ -2587,8 +2587,8 @@ function $n({
2587
2587
  onLeave: i,
2588
2588
  ...l
2589
2589
  }) {
2590
- const { ref: c, inView: u } = ns({ threshold: r, rootMargin: a, once: n }), d = S(!1);
2591
- return F(() => {
2590
+ const { ref: c, inView: u } = ns({ threshold: r, rootMargin: a, once: n }), d = A(!1);
2591
+ return z(() => {
2592
2592
  u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
2593
2593
  }, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
2594
2594
  }
@@ -2622,8 +2622,8 @@ function Rn() {
2622
2622
  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 };
2623
2623
  }
2624
2624
  function os({ data: t, onDismiss: s }) {
2625
- const n = K(), [r, a] = L(!1), o = S(null);
2626
- F(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
2625
+ const n = K(), [r, a] = D(!1), o = A(null);
2626
+ z(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
2627
2627
  function i() {
2628
2628
  a(!1), setTimeout(() => s(t.id), 250);
2629
2629
  }
@@ -2655,8 +2655,8 @@ function os({ data: t, onDismiss: s }) {
2655
2655
  );
2656
2656
  }
2657
2657
  function Sn({ position: t = "bottom-right" }) {
2658
- const [s, n] = L(() => [...ve]);
2659
- return F(() => (Le.add(n), () => Le.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2658
+ const [s, n] = D(() => [...ve]);
2659
+ return z(() => (Le.add(n), () => Le.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2660
2660
  /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(os, { data: r, onDismiss: as }, r.id)) }),
2661
2661
  document.body
2662
2662
  );
@@ -2717,7 +2717,7 @@ function ls({
2717
2717
  "aria-label": r,
2718
2718
  ...a
2719
2719
  }) {
2720
- const o = K(), [i, l] = L(!1), c = (u) => {
2720
+ const o = K(), [i, l] = D(!1), c = (u) => {
2721
2721
  u.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2722
2722
  l(!0), setTimeout(() => l(!1), n);
2723
2723
  });
@@ -2736,8 +2736,8 @@ function ls({
2736
2736
  );
2737
2737
  }
2738
2738
  function Bn({ content: t, streaming: s = !1, ...n }) {
2739
- const [r, a] = L(s);
2740
- return F(() => {
2739
+ const [r, a] = D(s);
2740
+ return z(() => {
2741
2741
  a(!!s);
2742
2742
  }, [s]), /* @__PURE__ */ e.jsx(
2743
2743
  He,
@@ -2770,7 +2770,7 @@ function In({
2770
2770
  const c = K(), { t: u } = be();
2771
2771
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2772
2772
  /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i ?? c.steps, children: Array.from({ length: t }, (d, p) => {
2773
- const h = p === s, f = n.includes(p) && !h, v = r && (p <= s || n.includes(p)), N = [
2773
+ const h = p === s, f = n.includes(p) && !h, _ = r && (p <= s || n.includes(p)), N = [
2774
2774
  "ds-step-indicator__dot",
2775
2775
  h && "ds-step-indicator__dot--active",
2776
2776
  f && "ds-step-indicator__dot--done"
@@ -2783,7 +2783,7 @@ function In({
2783
2783
  role: "tab",
2784
2784
  "aria-selected": h,
2785
2785
  "aria-label": u("stepN", { n: p + 1 }),
2786
- disabled: !v || p === s,
2786
+ disabled: !_ || p === s,
2787
2787
  onClick: () => r == null ? void 0 : r(p),
2788
2788
  children: f ? /* @__PURE__ */ e.jsx(Pe, { size: 8, strokeWidth: 3 }) : null
2789
2789
  },
@@ -2805,8 +2805,8 @@ function Ln({
2805
2805
  className: a = "",
2806
2806
  ...o
2807
2807
  }) {
2808
- const i = S(t);
2809
- return F(() => {
2808
+ const i = A(t);
2809
+ return z(() => {
2810
2810
  t !== i.current && (r == null || r(t), i.current = t);
2811
2811
  }, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...o, children: [
2812
2812
  t,
@@ -2841,8 +2841,8 @@ function Dn({
2841
2841
  ] });
2842
2842
  }
2843
2843
  function Pn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2844
- const r = S(!1), a = S(0);
2845
- F(() => {
2844
+ const r = A(!1), a = A(0);
2845
+ z(() => {
2846
2846
  const o = s == null ? void 0 : s.current;
2847
2847
  if (!o) return;
2848
2848
  const i = () => {
@@ -2850,7 +2850,7 @@ function Pn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2850
2850
  !l && o.scrollTop < a.current && (r.current = !0), l && (r.current = !1), a.current = o.scrollTop;
2851
2851
  };
2852
2852
  return o.addEventListener("scroll", i, { passive: !0 }), () => o.removeEventListener("scroll", i);
2853
- }, [s]), F(() => {
2853
+ }, [s]), z(() => {
2854
2854
  const o = s == null ? void 0 : s.current;
2855
2855
  o && (n && r.current || (o.scrollTop = o.scrollHeight));
2856
2856
  }, t);
@@ -2864,33 +2864,33 @@ function cs({
2864
2864
  betweenTime: o = 380,
2865
2865
  manualPauseMs: i = 5e3
2866
2866
  }) {
2867
- const [l, c] = L(0), [u, d] = L(""), p = S("typing"), h = S(0), f = S(0), v = S(null), N = S(0);
2868
- F(() => {
2867
+ const [l, c] = D(0), [u, d] = D(""), p = A("typing"), h = A(0), f = A(0), _ = A(null), N = A(0);
2868
+ z(() => {
2869
2869
  f.current = l;
2870
- }, [l]), F(() => {
2871
- if (v.current && (clearTimeout(v.current), v.current = null), !s || t.length === 0) {
2870
+ }, [l]), z(() => {
2871
+ if (_.current && (clearTimeout(_.current), _.current = null), !s || t.length === 0) {
2872
2872
  d(""), h.current = 0, p.current = "typing";
2873
2873
  return;
2874
2874
  }
2875
- const w = () => {
2876
- const _ = Date.now();
2877
- if (N.current > _) {
2878
- v.current = setTimeout(w, N.current - _);
2875
+ const b = () => {
2876
+ const w = Date.now();
2877
+ if (N.current > w) {
2878
+ _.current = setTimeout(b, N.current - w);
2879
2879
  return;
2880
2880
  }
2881
- const A = t[f.current % t.length] ?? "";
2882
- p.current === "typing" ? (h.current += 1, d(A.slice(0, h.current)), h.current >= A.length ? (p.current = "holding", v.current = setTimeout(w, a)) : v.current = setTimeout(w, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(w, r)) : (h.current = Math.max(0, h.current - 1), d(A.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), v.current = setTimeout(w, o)) : v.current = setTimeout(w, r));
2881
+ const S = t[f.current % t.length] ?? "";
2882
+ p.current === "typing" ? (h.current += 1, d(S.slice(0, h.current)), h.current >= S.length ? (p.current = "holding", _.current = setTimeout(b, a)) : _.current = setTimeout(b, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", _.current = setTimeout(b, r)) : (h.current = Math.max(0, h.current - 1), d(S.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), _.current = setTimeout(b, o)) : _.current = setTimeout(b, r));
2883
2883
  };
2884
- return v.current = setTimeout(w, 260), () => {
2885
- v.current && clearTimeout(v.current);
2884
+ return _.current = setTimeout(b, 260), () => {
2885
+ _.current && clearTimeout(_.current);
2886
2886
  };
2887
2887
  }, [s, t, n, r, a, o]);
2888
- const y = (w) => {
2888
+ const g = (b) => {
2889
2889
  if (t.length === 0) return;
2890
- const _ = (w % t.length + t.length) % t.length, A = t[_];
2891
- f.current = _, h.current = A.length, p.current = "holding", N.current = Date.now() + i, c(_), d(A);
2892
- }, j = () => y(f.current + 1), T = () => y(f.current - 1), g = t[l % t.length] ?? "";
2893
- return { displayed: u, currentPrompt: g, index: l, next: j, prev: T };
2890
+ const w = (b % t.length + t.length) % t.length, S = t[w];
2891
+ f.current = w, h.current = S.length, p.current = "holding", N.current = Date.now() + i, c(w), d(S);
2892
+ }, j = () => g(f.current + 1), R = () => g(f.current - 1), k = t[l % t.length] ?? "";
2893
+ return { displayed: u, currentPrompt: k, index: l, next: j, prev: R };
2894
2894
  }
2895
2895
  let ds = 0;
2896
2896
  function Mn({
@@ -2908,70 +2908,70 @@ function Mn({
2908
2908
  onAttachFiles: p,
2909
2909
  onAttachImages: h,
2910
2910
  onRemoveAttachment: f,
2911
- onRemoveImage: v,
2911
+ onRemoveImage: _,
2912
2912
  acceptImage: N,
2913
- acceptFile: y,
2913
+ acceptFile: g,
2914
2914
  maxImages: j,
2915
- maxImageSize: T,
2916
- leftSlot: g,
2917
- rightSlot: w,
2918
- className: _ = "",
2919
- ...A
2915
+ maxImageSize: R,
2916
+ leftSlot: k,
2917
+ rightSlot: b,
2918
+ className: w = "",
2919
+ ...S
2920
2920
  }) {
2921
- const I = K(), { t: D } = be(), O = S(null), k = S(null), P = S(0), [H, W] = L(!1), [M, b] = L([]), $ = l ?? I.promptPlaceholder, R = (E) => {
2922
- const z = ++ds;
2923
- b((J) => [...J, { id: z, msg: E }]), setTimeout(() => b((J) => J.filter((Q) => Q.id !== z)), 6e3);
2924
- }, V = (E) => b((z) => z.filter((J) => J.id !== E)), U = (E) => E.type.startsWith("image/"), Y = () => !0, m = N ?? U, x = y ?? Y, B = (E) => {
2925
- const z = [], J = [], Q = [], ne = [];
2921
+ const I = K(), { t: L } = be(), F = A(null), W = A(null), y = A(0), [O, P] = D(!1), [V, x] = D([]), $ = l ?? I.promptPlaceholder, T = (E) => {
2922
+ const M = ++ds;
2923
+ x((J) => [...J, { id: M, msg: E }]), setTimeout(() => x((J) => J.filter((Q) => Q.id !== M)), 6e3);
2924
+ }, C = (E) => x((M) => M.filter((J) => J.id !== E)), H = (E) => E.type.startsWith("image/"), Y = () => !0, m = N ?? H, v = g ?? Y, B = (E) => {
2925
+ const M = [], J = [], Q = [], ne = [];
2926
2926
  let ae = 0, me = j != null ? j - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2927
2927
  for (const oe of E)
2928
- m(oe) ? T && oe.size > T ? Q.push(oe.name) : me > 0 ? (z.push(oe), me--) : ae++ : x(oe) ? J.push(oe) : ne.push(oe.name);
2929
- return { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae };
2930
- }, C = (E) => {
2931
- const z = T ? D("fileTooLargeMaxHint", { maxMb: T / 1024 / 1024 }) : "";
2932
- R(D("fileTooLarge", { maxHint: z, names: E.join(", ") }));
2928
+ m(oe) ? R && oe.size > R ? Q.push(oe.name) : me > 0 ? (M.push(oe), me--) : ae++ : v(oe) ? J.push(oe) : ne.push(oe.name);
2929
+ return { imageFiles: M, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae };
2930
+ }, U = (E) => {
2931
+ const M = R ? L("fileTooLargeMaxHint", { maxMb: R / 1024 / 1024 }) : "";
2932
+ T(L("fileTooLarge", { maxHint: M, names: E.join(", ") }));
2933
2933
  }, te = (E) => {
2934
- const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(E);
2935
- Q.length && C(Q), ne.length && R(D("filesSkipped", { names: ne.join(", ") })), ae && R(D("maxImages", { n: j })), h && z.length && h(z);
2936
- const me = J.concat(h ? [] : z);
2934
+ const { imageFiles: M, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(E);
2935
+ Q.length && U(Q), ne.length && T(L("filesSkipped", { names: ne.join(", ") })), ae && T(L("maxImages", { n: j })), h && M.length && h(M);
2936
+ const me = J.concat(h ? [] : M);
2937
2937
  p && me.length && p(me);
2938
2938
  };
2939
- F(() => {
2940
- const E = k.current;
2939
+ z(() => {
2940
+ const E = W.current;
2941
2941
  E && (E.style.height = "auto", E.style.height = `${Math.min(E.scrollHeight, 200)}px`);
2942
- }, [t]), F(() => {
2943
- const E = (z) => {
2942
+ }, [t]), z(() => {
2943
+ const E = (M) => {
2944
2944
  var Q, ne, ae;
2945
2945
  if (o || i) return;
2946
- const J = (Q = z.target) == null ? void 0 : Q.tagName;
2947
- J === "INPUT" || J === "TEXTAREA" || J === "SELECT" || (ne = z.target) != null && ne.isContentEditable || z.ctrlKey || z.metaKey || z.altKey || z.key.length !== 1 && z.key !== "Backspace" && z.key !== "Delete" || (ae = k.current) == null || ae.focus();
2946
+ const J = (Q = M.target) == null ? void 0 : Q.tagName;
2947
+ J === "INPUT" || J === "TEXTAREA" || J === "SELECT" || (ne = M.target) != null && ne.isContentEditable || M.ctrlKey || M.metaKey || M.altKey || M.key.length !== 1 && M.key !== "Backspace" && M.key !== "Delete" || (ae = W.current) == null || ae.focus();
2948
2948
  };
2949
2949
  return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
2950
2950
  }, [o, i]);
2951
2951
  const le = (E) => {
2952
- E.preventDefault(), P.current++, E.dataTransfer.types.includes("Files") && W(!0);
2952
+ E.preventDefault(), y.current++, E.dataTransfer.types.includes("Files") && P(!0);
2953
2953
  }, G = (E) => {
2954
- E.preventDefault(), P.current--, P.current === 0 && W(!1);
2954
+ E.preventDefault(), y.current--, y.current === 0 && P(!1);
2955
2955
  }, Z = (E) => E.preventDefault(), fe = (E) => {
2956
- E.preventDefault(), P.current = 0, W(!1);
2957
- const z = Array.from(E.dataTransfer.files);
2958
- z.length && te(z);
2956
+ E.preventDefault(), y.current = 0, P(!1);
2957
+ const M = Array.from(E.dataTransfer.files);
2958
+ M.length && te(M);
2959
2959
  }, je = (E) => {
2960
- const z = Array.from(E.target.files || []);
2961
- O.current && (O.current.value = ""), z.length && te(z);
2960
+ const M = Array.from(E.target.files || []);
2961
+ F.current && (F.current.value = ""), M.length && te(M);
2962
2962
  }, Se = (E) => {
2963
2963
  var oe;
2964
2964
  if (!h) return;
2965
- const z = (oe = E.clipboardData) == null ? void 0 : oe.items;
2966
- if (!z) return;
2965
+ const M = (oe = E.clipboardData) == null ? void 0 : oe.items;
2966
+ if (!M) return;
2967
2967
  const J = [];
2968
- for (const xt of z) {
2968
+ for (const xt of M) {
2969
2969
  const qe = xt.getAsFile();
2970
2970
  qe && J.push(qe);
2971
2971
  }
2972
2972
  if (J.length === 0) return;
2973
2973
  const { imageFiles: Q, tooLarge: ne, skipped: ae, limitExceeded: me } = B(J);
2974
- ne.length && C(ne), ae.length && R(D("filesSkipped", { names: ae.join(", ") })), me && R(D("maxImages", { n: j })), Q.length && (E.preventDefault(), h(Q));
2974
+ ne.length && U(ne), ae.length && T(L("filesSkipped", { names: ae.join(", ") })), me && T(L("maxImages", { n: j })), Q.length && (E.preventDefault(), h(Q));
2975
2975
  }, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke = cs({
2976
2976
  prompts: c ?? [],
2977
2977
  enabled: Ne
@@ -2992,11 +2992,11 @@ function Mn({
2992
2992
  }
2993
2993
  a == null || a(E);
2994
2994
  }, ht = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Ye = p || h;
2995
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...A, children: [
2995
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", w].filter(Boolean).join(" "), ...S, children: [
2996
2996
  Ye && /* @__PURE__ */ e.jsx(
2997
2997
  "input",
2998
2998
  {
2999
- ref: O,
2999
+ ref: F,
3000
3000
  type: "file",
3001
3001
  multiple: !0,
3002
3002
  accept: "*/*",
@@ -3007,17 +3007,17 @@ function Mn({
3007
3007
  /* @__PURE__ */ e.jsxs(
3008
3008
  "div",
3009
3009
  {
3010
- className: ["ds-prompt-input__box", H && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
3010
+ className: ["ds-prompt-input__box", O && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
3011
3011
  onDragEnter: le,
3012
3012
  onDragLeave: G,
3013
3013
  onDragOver: Z,
3014
3014
  onDrop: fe,
3015
3015
  children: [
3016
- H && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: I.dropFilesHere }),
3016
+ O && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: I.dropFilesHere }),
3017
3017
  /* @__PURE__ */ e.jsx(
3018
3018
  "textarea",
3019
3019
  {
3020
- ref: k,
3020
+ ref: W,
3021
3021
  value: t,
3022
3022
  onChange: (E) => s == null ? void 0 : s(E.target.value),
3023
3023
  onKeyDown: pt,
@@ -3032,33 +3032,33 @@ function Mn({
3032
3032
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ke.displayed }),
3033
3033
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
3034
3034
  ] }),
3035
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((E, z) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
3035
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((E, M) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
3036
3036
  /* @__PURE__ */ e.jsx("img", { src: E.preview, alt: "" }),
3037
3037
  /* @__PURE__ */ e.jsx(
3038
3038
  "button",
3039
3039
  {
3040
3040
  className: "ds-prompt-input__image-remove",
3041
- onClick: () => v == null ? void 0 : v(z),
3041
+ onClick: () => _ == null ? void 0 : _(M),
3042
3042
  "aria-label": I.removeImage,
3043
3043
  type: "button",
3044
3044
  children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
3045
3045
  }
3046
3046
  )
3047
- ] }, z)) }),
3048
- M.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: M.map((E) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
3047
+ ] }, M)) }),
3048
+ V.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: V.map((E) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
3049
3049
  /* @__PURE__ */ e.jsx("span", { children: E.msg }),
3050
3050
  /* @__PURE__ */ e.jsx(
3051
3051
  "button",
3052
3052
  {
3053
3053
  type: "button",
3054
3054
  className: "ds-prompt-input__warning-close",
3055
- onClick: () => V(E.id),
3055
+ onClick: () => C(E.id),
3056
3056
  "aria-label": I.dismiss,
3057
3057
  children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
3058
3058
  }
3059
3059
  )
3060
3060
  ] }, E.id)) }),
3061
- u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((E, z) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
3061
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((E, M) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
3062
3062
  E.uploading ? /* @__PURE__ */ e.jsx(Tt, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ge, { size: q[1], strokeWidth: 1.5 }),
3063
3063
  E.filename,
3064
3064
  E.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: I.uploading }) : /* @__PURE__ */ e.jsx(
@@ -3066,12 +3066,12 @@ function Mn({
3066
3066
  {
3067
3067
  type: "button",
3068
3068
  className: "ds-prompt-input__remove-btn",
3069
- onClick: () => f == null ? void 0 : f(z),
3069
+ onClick: () => f == null ? void 0 : f(M),
3070
3070
  "aria-label": I.removeAttachment,
3071
3071
  children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
3072
3072
  }
3073
3073
  )
3074
- ] }) }, z)) }),
3074
+ ] }) }, M)) }),
3075
3075
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
3076
3076
  Ye && /* @__PURE__ */ e.jsx(
3077
3077
  de,
@@ -3082,12 +3082,12 @@ function Mn({
3082
3082
  "aria-label": I.attachFiles,
3083
3083
  onClick: () => {
3084
3084
  var E;
3085
- return (E = O.current) == null ? void 0 : E.click();
3085
+ return (E = F.current) == null ? void 0 : E.click();
3086
3086
  }
3087
3087
  }
3088
3088
  ),
3089
- g,
3090
- w,
3089
+ k,
3090
+ b,
3091
3091
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
3092
3092
  o ? /* @__PURE__ */ e.jsx(
3093
3093
  de,
@@ -3127,58 +3127,58 @@ function zn({
3127
3127
  className: l = "",
3128
3128
  ...c
3129
3129
  }) {
3130
- const [u, d] = L(!1), p = S(null), h = S(null), f = S(null), [v, N] = L({}), y = t.filter((k) => !a || k.name === "auto" ? !0 : (at[k.tier] ?? 1) >= (at[a] ?? 1)), j = y.find((k) => k.name === "auto"), T = y.filter((k) => k.name !== "auto"), g = t.find((k) => k.name === s), _ = new Set(T.map((k) => k.tier).filter(Boolean)).size > 1;
3131
- F(() => {
3130
+ const [u, d] = D(!1), p = A(null), h = A(null), f = A(null), [_, N] = D({}), g = r === "s" ? "s" : "xs", j = t.filter((y) => !a || y.name === "auto" ? !0 : (at[y.tier] ?? 1) >= (at[a] ?? 1)), R = j.find((y) => y.name === "auto"), k = j.filter((y) => y.name !== "auto"), b = t.find((y) => y.name === s), S = new Set(k.map((y) => y.tier).filter(Boolean)).size > 1;
3131
+ z(() => {
3132
3132
  if (!u) return;
3133
- const k = 320, P = () => {
3134
- var R;
3135
- const M = (R = h.current) == null ? void 0 : R.getBoundingClientRect();
3136
- if (!M) return;
3137
- const b = window.innerHeight - M.bottom, $ = b < k + 8 && M.top > b;
3133
+ const y = 320, O = () => {
3134
+ var C;
3135
+ const x = (C = h.current) == null ? void 0 : C.getBoundingClientRect();
3136
+ if (!x) return;
3137
+ const $ = window.innerHeight - x.bottom, T = $ < y + 8 && x.top > $;
3138
3138
  N({
3139
3139
  position: "fixed",
3140
3140
  zIndex: "var(--z-dropdown, 500)",
3141
- left: M.left,
3142
- ...$ ? { bottom: window.innerHeight - M.top + 4, top: "auto" } : { top: M.bottom + 4, bottom: "auto" }
3141
+ left: x.left,
3142
+ ...T ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
3143
3143
  });
3144
3144
  };
3145
- P(), window.addEventListener("scroll", P, !0), window.addEventListener("resize", P);
3146
- const H = (M) => {
3147
- var b, $;
3148
- !((b = p.current) != null && b.contains(M.target)) && !(($ = f.current) != null && $.contains(M.target)) && d(!1);
3149
- }, W = (M) => {
3150
- M.key === "Escape" && d(!1);
3145
+ O(), window.addEventListener("scroll", O, !0), window.addEventListener("resize", O);
3146
+ const P = (x) => {
3147
+ var $, T;
3148
+ !(($ = p.current) != null && $.contains(x.target)) && !((T = f.current) != null && T.contains(x.target)) && d(!1);
3149
+ }, V = (x) => {
3150
+ x.key === "Escape" && d(!1);
3151
3151
  };
3152
- return document.addEventListener("mousedown", H), document.addEventListener("keydown", W), () => {
3153
- window.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P), document.removeEventListener("mousedown", H), document.removeEventListener("keydown", W);
3152
+ return document.addEventListener("mousedown", P), document.addEventListener("keydown", V), () => {
3153
+ window.removeEventListener("scroll", O, !0), window.removeEventListener("resize", O), document.removeEventListener("mousedown", P), document.removeEventListener("keydown", V);
3154
3154
  };
3155
3155
  }, [u]);
3156
- const A = (k) => {
3157
- n == null || n(k), d(!1);
3158
- }, I = (k) => /* @__PURE__ */ e.jsxs(
3156
+ const I = (y) => {
3157
+ n == null || n(y), d(!1);
3158
+ }, L = (y) => /* @__PURE__ */ e.jsxs(
3159
3159
  "button",
3160
3160
  {
3161
3161
  type: "button",
3162
3162
  className: [
3163
3163
  "ds-model-picker__item",
3164
- k.name === s && "ds-model-picker__item--active"
3164
+ y.name === s && "ds-model-picker__item--active"
3165
3165
  ].filter(Boolean).join(" "),
3166
- onClick: () => A(k.name),
3166
+ onClick: () => I(y.name),
3167
3167
  children: [
3168
- k.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon }) : /* @__PURE__ */ e.jsx(Ke, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
3169
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: k.displayName || k.name }),
3170
- _ && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[k.tier] || "default", children: k.tier })
3168
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: y.icon || /* @__PURE__ */ e.jsx(Ke, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3169
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: y.displayName || y.name }),
3170
+ S && y.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[y.tier] || "default", children: y.tier })
3171
3171
  ]
3172
3172
  },
3173
- k.name
3174
- ), D = () => !i || !_ ? T.map(I) : ["fast", "standard", "premium"].flatMap((k) => {
3175
- const P = T.filter((H) => H.tier === k);
3176
- return P.length ? [
3177
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": k, children: k.charAt(0).toUpperCase() + k.slice(1) }, `lbl-${k}`),
3178
- ...P.map(I)
3173
+ y.name
3174
+ ), F = () => !i || !S ? k.map(L) : ["fast", "standard", "premium"].flatMap((y) => {
3175
+ const O = k.filter((P) => P.tier === y);
3176
+ return O.length ? [
3177
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": y, children: y.charAt(0).toUpperCase() + y.slice(1) }, `lbl-${y}`),
3178
+ ...O.map(L)
3179
3179
  ] : [];
3180
- }), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
3181
- o && j && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3180
+ }), W = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: `ds-model-picker__menu ds-model-picker__menu--${g} ds-scrollable`, "data-ds-portal": "", style: _, children: [
3181
+ o && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3182
3182
  /* @__PURE__ */ e.jsxs(
3183
3183
  "button",
3184
3184
  {
@@ -3188,16 +3188,16 @@ function zn({
3188
3188
  "ds-model-picker__item--auto",
3189
3189
  s === "auto" && "ds-model-picker__item--active"
3190
3190
  ].filter(Boolean).join(" "),
3191
- onClick: () => A("auto"),
3191
+ onClick: () => I("auto"),
3192
3192
  children: [
3193
- /* @__PURE__ */ e.jsx(St, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
3193
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: /* @__PURE__ */ e.jsx(St, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3194
3194
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
3195
3195
  ]
3196
3196
  }
3197
3197
  ),
3198
- T.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
3198
+ k.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
3199
3199
  ] }),
3200
- D()
3200
+ F()
3201
3201
  ] });
3202
3202
  return /* @__PURE__ */ e.jsxs(
3203
3203
  "div",
@@ -3211,18 +3211,18 @@ function zn({
3211
3211
  {
3212
3212
  ref: h,
3213
3213
  type: "button",
3214
- className: "ds-model-picker__trigger",
3215
- onClick: () => d((k) => !k),
3214
+ className: `ds-model-picker__trigger ds-model-picker__trigger--${g}`,
3215
+ onClick: () => d((y) => !y),
3216
3216
  "aria-haspopup": "listbox",
3217
3217
  "aria-expanded": u,
3218
3218
  children: [
3219
- g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx(Ke, { size: 12, strokeWidth: 1.5 }),
3220
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (g == null ? void 0 : g.displayName) || (g == null ? void 0 : g.name) || s }),
3221
- _ && (g == null ? void 0 : g.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[g.tier] || "default", children: g.tier })
3219
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__icon", children: (b == null ? void 0 : b.icon) || /* @__PURE__ */ e.jsx(Ke, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3220
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (b == null ? void 0 : b.displayName) || (b == null ? void 0 : b.name) || s }),
3221
+ S && (b == null ? void 0 : b.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[b.tier] || "default", children: b.tier })
3222
3222
  ]
3223
3223
  }
3224
3224
  ),
3225
- typeof document < "u" && re.createPortal(O, document.body)
3225
+ typeof document < "u" && re.createPortal(W, document.body)
3226
3226
  ]
3227
3227
  }
3228
3228
  );
@@ -3244,53 +3244,53 @@ function Fn({
3244
3244
  maxVisible: r = 5,
3245
3245
  onSourceClick: a
3246
3246
  }) {
3247
- const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] = L(!1), d = fs(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((j) => j.snippet), v = (j) => j != null && j.length ? i("pageAbbrev", { pages: j.join(", ") }) : null, N = i("moreSources", { n: d.length - r }), y = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3248
- return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: y, children: [
3247
+ const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] = D(!1), d = fs(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((j) => j.snippet), _ = (j) => j != null && j.length ? i("pageAbbrev", { pages: j.join(", ") }) : null, N = i("moreSources", { n: d.length - r }), g = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3248
+ return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: g, children: [
3249
3249
  h.map((j) => {
3250
- const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
3250
+ const R = j.items.map((w) => w.page).filter(Boolean), k = _(R), b = !!a;
3251
3251
  return /* @__PURE__ */ e.jsxs(
3252
3252
  "div",
3253
3253
  {
3254
- className: `ds-sources-panel__compact-row${w ? " ds-sources-panel__compact-row--clickable" : ""}`,
3255
- onClick: w ? () => a(j.items[0]) : void 0,
3254
+ className: `ds-sources-panel__compact-row${b ? " ds-sources-panel__compact-row--clickable" : ""}`,
3255
+ onClick: b ? () => a(j.items[0]) : void 0,
3256
3256
  children: [
3257
3257
  /* @__PURE__ */ e.jsx(At, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
3258
3258
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
3259
- g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
3259
+ k && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: k })
3260
3260
  ]
3261
3261
  },
3262
3262
  j.filename
3263
3263
  );
3264
3264
  }),
3265
3265
  p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: N })
3266
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: y, children: [
3266
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: g, children: [
3267
3267
  l && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: l }),
3268
3268
  h.map((j) => {
3269
- const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
3269
+ const R = j.items.map((w) => w.page).filter(Boolean), k = _(R), b = !!a;
3270
3270
  return f ? /* @__PURE__ */ e.jsx(
3271
3271
  He,
3272
3272
  {
3273
- title: /* @__PURE__ */ e.jsx(us, { filename: j.filename, pagesLabel: g }),
3273
+ title: /* @__PURE__ */ e.jsx(us, { filename: j.filename, pagesLabel: k }),
3274
3274
  padding: "s",
3275
- children: j.items.map((_, A) => /* @__PURE__ */ e.jsx(
3275
+ children: j.items.map((w, S) => /* @__PURE__ */ e.jsx(
3276
3276
  "div",
3277
3277
  {
3278
- className: `ds-sources-panel__snippet${w ? " ds-sources-panel__snippet--clickable" : ""}`,
3279
- onClick: w ? () => a(_) : void 0,
3280
- children: _.snippet ?? i("pageAbbrev", { pages: _.page })
3278
+ className: `ds-sources-panel__snippet${b ? " ds-sources-panel__snippet--clickable" : ""}`,
3279
+ onClick: b ? () => a(w) : void 0,
3280
+ children: w.snippet ?? i("pageAbbrev", { pages: w.page })
3281
3281
  },
3282
- A
3282
+ S
3283
3283
  ))
3284
3284
  },
3285
3285
  j.filename
3286
3286
  ) : /* @__PURE__ */ e.jsxs(
3287
3287
  "div",
3288
3288
  {
3289
- className: `ds-sources-panel__row${w ? " ds-sources-panel__row--clickable" : ""}`,
3290
- onClick: w ? () => a(j.items[0]) : void 0,
3289
+ className: `ds-sources-panel__row${b ? " ds-sources-panel__row--clickable" : ""}`,
3290
+ onClick: b ? () => a(j.items[0]) : void 0,
3291
3291
  children: [
3292
3292
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
3293
- g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
3293
+ k && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: k })
3294
3294
  ]
3295
3295
  },
3296
3296
  j.filename
@@ -3612,15 +3612,15 @@ function qn({
3612
3612
  statePrimary: h = "idle",
3613
3613
  stateBack: f = "idle"
3614
3614
  }) {
3615
- const v = K(), { t: N } = be(), y = c ?? v.next, j = u ?? v.back, T = d ?? v.skipTour, g = p ?? v.done, w = S(null), _ = S(t), A = S(s), I = S(l);
3616
- _.current = t, A.current = s, I.current = l;
3617
- const [D, O] = L(!1), [k, P] = L({ position: "fixed", visibility: "hidden", width: Be }), [H, W] = L("bottom"), [M, b] = L(null), $ = S(!1), R = t[s], V = s === t.length - 1, U = se(() => {
3618
- const Y = _.current[A.current];
3619
- if (!Y || !w.current) return;
3615
+ const _ = K(), { t: N } = be(), g = c ?? _.next, j = u ?? _.back, R = d ?? _.skipTour, k = p ?? _.done, b = A(null), w = A(t), S = A(s), I = A(l);
3616
+ w.current = t, S.current = s, I.current = l;
3617
+ const [L, F] = D(!1), [W, y] = D({ position: "fixed", visibility: "hidden", width: Be }), [O, P] = D("bottom"), [V, x] = D(null), $ = A(!1), T = t[s], C = s === t.length - 1, H = se(() => {
3618
+ const Y = w.current[S.current];
3619
+ if (!Y || !b.current) return;
3620
3620
  const m = js(Y.target);
3621
3621
  if (!m) return;
3622
- const x = m.getBoundingClientRect(), C = w.current.getBoundingClientRect().height || 160, te = Be, le = I.current ? vs : bs, G = Y.position || Ns(x, C, te, le), { top: Z, left: fe, arrowOffset: je, arrowOffsetY: Se } = ws(G, x, C, te, le);
3623
- W(G), P({
3622
+ const v = m.getBoundingClientRect(), U = b.current.getBoundingClientRect().height || 160, te = Be, le = I.current ? vs : bs, G = Y.position || Ns(v, U, te, le), { top: Z, left: fe, arrowOffset: je, arrowOffsetY: Se } = ws(G, v, U, te, le);
3623
+ P(G), y({
3624
3624
  position: "fixed",
3625
3625
  top: Z,
3626
3626
  left: fe,
@@ -3628,79 +3628,79 @@ function qn({
3628
3628
  visibility: "visible",
3629
3629
  "--arrow-offset": `${je}px`,
3630
3630
  "--arrow-offset-y": `${Se}px`
3631
- }), b({
3632
- top: x.top - Te,
3633
- left: x.left - Te,
3634
- width: x.width + Te * 2,
3635
- height: x.height + Te * 2
3631
+ }), x({
3632
+ top: v.top - Te,
3633
+ left: v.left - Te,
3634
+ width: v.width + Te * 2,
3635
+ height: v.height + Te * 2
3636
3636
  });
3637
3637
  }, []);
3638
- return F(() => {
3639
- window.addEventListener("scroll", U, !0), window.addEventListener("resize", U);
3638
+ return z(() => {
3639
+ window.addEventListener("scroll", H, !0), window.addEventListener("resize", H);
3640
3640
  const Y = requestAnimationFrame(() => {
3641
- U(), O(!0), $.current = !0;
3641
+ H(), F(!0), $.current = !0;
3642
3642
  });
3643
3643
  return () => {
3644
- cancelAnimationFrame(Y), window.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U);
3644
+ cancelAnimationFrame(Y), window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
3645
3645
  };
3646
- }, []), F(() => {
3646
+ }, []), z(() => {
3647
3647
  if (!$.current) return;
3648
- O(!1);
3648
+ F(!1);
3649
3649
  const Y = setTimeout(() => {
3650
- P((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3651
- U(), O(!0);
3650
+ y((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3651
+ H(), F(!0);
3652
3652
  });
3653
3653
  }, _s + 20);
3654
3654
  return () => clearTimeout(Y);
3655
- }, [s]), F(() => {
3656
- D && w.current && w.current.focus({ preventScroll: !0 });
3657
- }, [D]), F(() => {
3655
+ }, [s]), z(() => {
3656
+ L && b.current && b.current.focus({ preventScroll: !0 });
3657
+ }, [L]), z(() => {
3658
3658
  const Y = (m) => {
3659
3659
  m.key === "Escape" && a();
3660
3660
  };
3661
3661
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3662
- }, [a]), F(() => {
3663
- if (!D) return;
3662
+ }, [a]), z(() => {
3663
+ if (!L) return;
3664
3664
  const Y = (m) => {
3665
- if (m.key !== "Tab" || !w.current) return;
3666
- const x = Array.from(
3667
- w.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3665
+ if (m.key !== "Tab" || !b.current) return;
3666
+ const v = Array.from(
3667
+ b.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3668
3668
  );
3669
- if (!x.length) return;
3670
- const B = x[0], C = x[x.length - 1];
3671
- m.shiftKey && document.activeElement === B ? (m.preventDefault(), C.focus()) : !m.shiftKey && document.activeElement === C && (m.preventDefault(), B.focus());
3669
+ if (!v.length) return;
3670
+ const B = v[0], U = v[v.length - 1];
3671
+ m.shiftKey && document.activeElement === B ? (m.preventDefault(), U.focus()) : !m.shiftKey && document.activeElement === U && (m.preventDefault(), B.focus());
3672
3672
  };
3673
3673
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3674
- }, [D]), !R || typeof document > "u" ? null : re.createPortal(
3674
+ }, [L]), !T || typeof document > "u" ? null : re.createPortal(
3675
3675
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3676
- M && /* @__PURE__ */ e.jsx(
3676
+ V && /* @__PURE__ */ e.jsx(
3677
3677
  "div",
3678
3678
  {
3679
3679
  className: [
3680
3680
  "ds-coachmark__spotlight",
3681
3681
  i && "ds-coachmark__spotlight--overlay",
3682
3682
  !l && "ds-coachmark__spotlight--no-ring",
3683
- D && "ds-coachmark__spotlight--visible"
3683
+ L && "ds-coachmark__spotlight--visible"
3684
3684
  ].filter(Boolean).join(" "),
3685
- style: M,
3685
+ style: V,
3686
3686
  "aria-hidden": "true"
3687
3687
  }
3688
3688
  ),
3689
3689
  /* @__PURE__ */ e.jsxs(
3690
3690
  "div",
3691
3691
  {
3692
- ref: w,
3692
+ ref: b,
3693
3693
  "data-ds-portal": "",
3694
3694
  role: "dialog",
3695
3695
  "aria-modal": "false",
3696
3696
  "aria-live": "polite",
3697
- "aria-label": R.title ?? N("stepOf", { current: s + 1, total: t.length }),
3697
+ "aria-label": T.title ?? N("stepOf", { current: s + 1, total: t.length }),
3698
3698
  className: [
3699
3699
  "ds-coachmark__bubble",
3700
- `ds-coachmark__bubble--${H}`,
3701
- D && "ds-coachmark__bubble--visible"
3700
+ `ds-coachmark__bubble--${O}`,
3701
+ L && "ds-coachmark__bubble--visible"
3702
3702
  ].filter(Boolean).join(" "),
3703
- style: k,
3703
+ style: W,
3704
3704
  tabIndex: -1,
3705
3705
  children: [
3706
3706
  /* @__PURE__ */ e.jsx(
@@ -3709,12 +3709,12 @@ function qn({
3709
3709
  type: "button",
3710
3710
  className: "ds-coachmark__close",
3711
3711
  onClick: a,
3712
- "aria-label": T,
3712
+ "aria-label": R,
3713
3713
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3714
3714
  }
3715
3715
  ),
3716
- R.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: R.title }),
3717
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: R.content }),
3716
+ T.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: T.title }),
3717
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: T.content }),
3718
3718
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3719
3719
  t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3720
3720
  s + 1,
@@ -3723,7 +3723,7 @@ function qn({
3723
3723
  ] }),
3724
3724
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3725
3725
  s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: j }),
3726
- /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ? g : y })
3726
+ /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: C ? o : n, children: C ? k : g })
3727
3727
  ] })
3728
3728
  ] })
3729
3729
  ]
@@ -3734,7 +3734,7 @@ function qn({
3734
3734
  );
3735
3735
  }
3736
3736
  function Gn(t, s = {}) {
3737
- const { storageKey: n } = s, [r, a] = L(0), [o, i] = L(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = se(() => {
3737
+ const { storageKey: n } = s, [r, a] = D(0), [o, i] = D(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = se(() => {
3738
3738
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3739
3739
  }, [n]);
3740
3740
  return {
@@ -3750,7 +3750,7 @@ function Gn(t, s = {}) {
3750
3750
  };
3751
3751
  }
3752
3752
  function Kn() {
3753
- const t = S(null), s = se(() => {
3753
+ const t = A(null), s = se(() => {
3754
3754
  const n = t.current;
3755
3755
  if (!n) return;
3756
3756
  n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");