teodor-new-chat-ui 4.0.15 → 4.0.17

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.esm.js CHANGED
@@ -2370,22 +2370,22 @@ st.getAdapter = qc.getAdapter;
2370
2370
  st.HttpStatusCode = vi;
2371
2371
  st.default = st;
2372
2372
  const {
2373
- Axios: bT,
2374
- AxiosError: yT,
2375
- CanceledError: ST,
2376
- isCancel: CT,
2377
- CancelToken: TT,
2378
- VERSION: RT,
2379
- all: ET,
2380
- Cancel: kT,
2381
- isAxiosError: IT,
2382
- spread: NT,
2383
- toFormData: AT,
2384
- AxiosHeaders: _T,
2385
- HttpStatusCode: jT,
2386
- formToJSON: PT,
2387
- getAdapter: OT,
2388
- mergeConfig: MT
2373
+ Axios: yT,
2374
+ AxiosError: ST,
2375
+ CanceledError: CT,
2376
+ isCancel: TT,
2377
+ CancelToken: RT,
2378
+ VERSION: ET,
2379
+ all: kT,
2380
+ Cancel: IT,
2381
+ isAxiosError: NT,
2382
+ spread: AT,
2383
+ toFormData: _T,
2384
+ AxiosHeaders: jT,
2385
+ HttpStatusCode: PT,
2386
+ formToJSON: OT,
2387
+ getAdapter: MT,
2388
+ mergeConfig: DT
2389
2389
  } = st, ul = typeof window < "u" ? window.__API_BASE_URL__ : void 0, dl = ul ? ul.replace(/\/+$/, "") : void 0;
2390
2390
  let jo = null;
2391
2391
  const wi = /* @__PURE__ */ new Set();
@@ -2935,7 +2935,7 @@ function Zg(e = []) {
2935
2935
  function pl(e, t) {
2936
2936
  var n, r;
2937
2937
  if (t.type === "message_start" && t.role === "assistant") {
2938
- const o = t.id, s = rx(t.model);
2938
+ const o = t.id, s = ox(t.model);
2939
2939
  if (e.messages.some((c) => c.id === o))
2940
2940
  return { ...e, assemblingId: o };
2941
2941
  const a = {
@@ -3011,7 +3011,7 @@ function pl(e, t) {
3011
3011
  };
3012
3012
  }
3013
3013
  if (t.type === "checkpoint") {
3014
- const o = t.checkpointNs ?? e.lastCheckpointNs ?? null, s = nx(e.messages, t.checkpointId, o);
3014
+ const o = t.checkpointNs ?? e.lastCheckpointNs ?? null, s = rx(e.messages, t.checkpointId, o);
3015
3015
  return { ...e, lastCheckpointId: t.checkpointId, lastCheckpointNs: o, messages: s };
3016
3016
  }
3017
3017
  if (t.type === "branch") {
@@ -3082,13 +3082,38 @@ function tx(e, t) {
3082
3082
  const n = e.slice();
3083
3083
  for (const r of t)
3084
3084
  if (r.type === "text") {
3085
- const o = n[n.length - 1];
3086
- (o == null ? void 0 : o.type) === "text" ? o.text += r.text : n.push({ type: "text", text: r.text });
3085
+ const o = n[n.length - 1], s = r.text ?? "";
3086
+ if (!s) continue;
3087
+ if ((o == null ? void 0 : o.type) === "text") {
3088
+ const i = o, a = nx(i.text ?? "", s);
3089
+ if (!a) continue;
3090
+ i.text = (i.text ?? "") + a;
3091
+ } else
3092
+ n.push({ type: "text", text: s });
3087
3093
  } else
3088
3094
  n.push(r);
3089
3095
  return n;
3090
3096
  }
3091
- function nx(e, t, n) {
3097
+ function nx(e, t) {
3098
+ if (!t) return "";
3099
+ if (!e) return t;
3100
+ if (t === e) return "";
3101
+ const n = t.indexOf(e);
3102
+ if (n === 0)
3103
+ return t.slice(e.length);
3104
+ if (n > 0) {
3105
+ const o = t.slice(n + e.length);
3106
+ if (o) return o;
3107
+ }
3108
+ if (e.endsWith(t) || e.includes(t))
3109
+ return "";
3110
+ const r = Math.min(e.length, t.length);
3111
+ for (let o = r; o > 0; o--)
3112
+ if (e.slice(-o) === t.slice(0, o))
3113
+ return t.slice(o);
3114
+ return t;
3115
+ }
3116
+ function rx(e, t, n) {
3092
3117
  for (let r = e.length - 1; r >= 0; r--)
3093
3118
  if (e[r].role === "assistant") {
3094
3119
  const s = { ...e[r], checkpointId: t, checkpointNs: n ?? void 0 };
@@ -3096,24 +3121,24 @@ function nx(e, t, n) {
3096
3121
  }
3097
3122
  return e;
3098
3123
  }
3099
- function rx(e) {
3124
+ function ox(e) {
3100
3125
  if (!e) return null;
3101
3126
  const t = e.split("/");
3102
3127
  return t[t.length - 1] || null;
3103
3128
  }
3104
- const ox = { MODE: "library" };
3105
- function sx() {
3129
+ const sx = { MODE: "library" };
3130
+ function ix() {
3106
3131
  var i;
3107
3132
  const e = typeof globalThis < "u" ? globalThis.process : void 0, t = typeof ((i = e == null ? void 0 : e.env) == null ? void 0 : i.NODE_ENV) == "string" ? e.env.NODE_ENV : void 0;
3108
3133
  if (t)
3109
3134
  return t === "production";
3110
- const n = typeof import.meta < "u" ? ox : void 0, r = typeof (n == null ? void 0 : n.MODE) == "string" ? n.MODE : void 0, o = typeof (n == null ? void 0 : n.NODE_ENV) == "string" ? n.NODE_ENV : void 0;
3135
+ const n = typeof import.meta < "u" ? sx : void 0, r = typeof (n == null ? void 0 : n.MODE) == "string" ? n.MODE : void 0, o = typeof (n == null ? void 0 : n.NODE_ENV) == "string" ? n.NODE_ENV : void 0;
3111
3136
  return (r ?? o) === "production";
3112
3137
  }
3113
- function ix() {
3114
- return !sx();
3138
+ function ax() {
3139
+ return !ix();
3115
3140
  }
3116
- function ax({
3141
+ function lx({
3117
3142
  onThreadInfo: e,
3118
3143
  onMessageEvent: t,
3119
3144
  onUnhandledEvent: n,
@@ -3126,7 +3151,7 @@ function ax({
3126
3151
  const u = o.current;
3127
3152
  if (u !== null) {
3128
3153
  if (c <= u) {
3129
- ix() && console.debug(
3154
+ ax() && console.debug(
3130
3155
  "[StreamEventCoordinator] drop out-of-order seq",
3131
3156
  { prev: u, seq: c, type: a.type }
3132
3157
  );
@@ -3152,7 +3177,7 @@ function ax({
3152
3177
  }, []);
3153
3178
  return { handleEvent: s, reset: i };
3154
3179
  }
3155
- function lx(e = {}) {
3180
+ function cx(e = {}) {
3156
3181
  const t = vt(() => {
3157
3182
  const A = (e.baseUrl ?? "/api/chat").replace(/\/+$/, "");
3158
3183
  return A.endsWith("/chat") ? A : `${A}/chat`;
@@ -3257,7 +3282,7 @@ function lx(e = {}) {
3257
3282
  `)) >= 0; ) {
3258
3283
  const oe = Ee.slice(0, it);
3259
3284
  Ee = Ee.slice(it + 2);
3260
- const se = ux(oe);
3285
+ const se = dx(oe);
3261
3286
  if (!se) continue;
3262
3287
  let he;
3263
3288
  try {
@@ -3266,7 +3291,7 @@ function lx(e = {}) {
3266
3291
  console.debug("[use-chat] malformed SSE:", se.slice(0, 200));
3267
3292
  continue;
3268
3293
  }
3269
- const pe = cx(he) ? he.data : he;
3294
+ const pe = ux(he) ? he.data : he;
3270
3295
  le = Date.now();
3271
3296
  const Te = pe.seq;
3272
3297
  if (Te !== void 0) {
@@ -3328,10 +3353,10 @@ function lx(e = {}) {
3328
3353
  setToken: S
3329
3354
  };
3330
3355
  }
3331
- function cx(e) {
3356
+ function ux(e) {
3332
3357
  return !!e && typeof e == "object" && e.protocolVersion === "v1" && "data" in e;
3333
3358
  }
3334
- function ux(e) {
3359
+ function dx(e) {
3335
3360
  const t = e.split(/\r?\n/), n = [];
3336
3361
  for (const r of t)
3337
3362
  if (r && !r.startsWith(":") && r.startsWith("data:")) {
@@ -3342,7 +3367,7 @@ function ux(e) {
3342
3367
  `);
3343
3368
  }
3344
3369
  const nu = ir(null);
3345
- function dx({
3370
+ function fx({
3346
3371
  children: e,
3347
3372
  enableFileAgentRouting: t = !1,
3348
3373
  fileAgentId: n = "invoice_reader",
@@ -3357,7 +3382,7 @@ function dx({
3357
3382
  }, [a]);
3358
3383
  const P = Xe(null), W = Xe(!1), z = je(() => {
3359
3384
  W.current = !0;
3360
- }, []), { isStreaming: q, error: D, stream: I, stop: M, setToken: H } = lx({
3385
+ }, []), { isStreaming: q, error: D, stream: I, stop: M, setToken: H } = cx({
3361
3386
  baseUrl: i,
3362
3387
  token: null
3363
3388
  });
@@ -3408,7 +3433,7 @@ function dx({
3408
3433
  );
3409
3434
  },
3410
3435
  []
3411
- ), { handleEvent: ve, reset: Ee } = ax({
3436
+ ), { handleEvent: ve, reset: Ee } = lx({
3412
3437
  onThreadInfo: Q,
3413
3438
  onMessageEvent: g,
3414
3439
  onUnhandledEvent: (V) => {
@@ -3570,8 +3595,8 @@ function dx({
3570
3595
  };
3571
3596
  return /* @__PURE__ */ l.jsx(nu.Provider, { value: Ye, children: e });
3572
3597
  }
3573
- function fx(e) {
3574
- return /* @__PURE__ */ l.jsx(dx, { ...e });
3598
+ function hx(e) {
3599
+ return /* @__PURE__ */ l.jsx(fx, { ...e });
3575
3600
  }
3576
3601
  function ru() {
3577
3602
  const e = ar(nu);
@@ -3615,7 +3640,7 @@ function Vs({
3615
3640
  onThreadLoaded: f,
3616
3641
  onThreadCleared: h,
3617
3642
  children: /* @__PURE__ */ l.jsx(
3618
- fx,
3643
+ hx,
3619
3644
  {
3620
3645
  enableFileAgentRouting: s,
3621
3646
  fileAgentId: i,
@@ -3629,7 +3654,7 @@ function Vs({
3629
3654
  function Z(...e) {
3630
3655
  return nm(tm(e));
3631
3656
  }
3632
- const hx = Xo(
3657
+ const px = Xo(
3633
3658
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3634
3659
  {
3635
3660
  variants: {
@@ -3659,7 +3684,7 @@ const hx = Xo(
3659
3684
  return /* @__PURE__ */ l.jsx(
3660
3685
  i,
3661
3686
  {
3662
- className: Z(hx({ variant: t, size: n, className: e })),
3687
+ className: Z(px({ variant: t, size: n, className: e })),
3663
3688
  ref: s,
3664
3689
  ...o
3665
3690
  }
@@ -3681,7 +3706,7 @@ const ou = p.forwardRef(
3681
3706
  )
3682
3707
  );
3683
3708
  ou.displayName = "Textarea";
3684
- function px({
3709
+ function mx({
3685
3710
  initialValue: e = "",
3686
3711
  editingMessageId: t = null,
3687
3712
  placeholder: n = "Type your message...",
@@ -3774,11 +3799,11 @@ function px({
3774
3799
  ) })
3775
3800
  ] }) });
3776
3801
  }
3777
- const mx = B.memo(px), os = 0, bn = 1, ur = 2, su = 4;
3802
+ const gx = B.memo(mx), os = 0, bn = 1, ur = 2, su = 4;
3778
3803
  function ml(e) {
3779
3804
  return () => e;
3780
3805
  }
3781
- function gx(e) {
3806
+ function xx(e) {
3782
3807
  e();
3783
3808
  }
3784
3809
  function iu(e, t) {
@@ -3787,15 +3812,15 @@ function iu(e, t) {
3787
3812
  function gl(e, t) {
3788
3813
  return () => e(t);
3789
3814
  }
3790
- function xx(e, t) {
3815
+ function vx(e, t) {
3791
3816
  return (n) => e(t, n);
3792
3817
  }
3793
3818
  function Yi(e) {
3794
3819
  return e !== void 0;
3795
3820
  }
3796
- function vx(...e) {
3821
+ function wx(...e) {
3797
3822
  return () => {
3798
- e.map(gx);
3823
+ e.map(xx);
3799
3824
  };
3800
3825
  }
3801
3826
  function dr() {
@@ -3803,7 +3828,7 @@ function dr() {
3803
3828
  function ss(e, t) {
3804
3829
  return t(e), e;
3805
3830
  }
3806
- function wx(e, t) {
3831
+ function bx(e, t) {
3807
3832
  return t(e);
3808
3833
  }
3809
3834
  function Ze(...e) {
@@ -3822,7 +3847,7 @@ function ot(e) {
3822
3847
  return e(su);
3823
3848
  }
3824
3849
  function de(e, t) {
3825
- return Ue(e, xx(t, os));
3850
+ return Ue(e, vx(t, os));
3826
3851
  }
3827
3852
  function Ht(e, t) {
3828
3853
  const n = e(bn, (r) => {
@@ -3861,7 +3886,7 @@ function Xt(e) {
3861
3886
  };
3862
3887
  }
3863
3888
  function F(e, ...t) {
3864
- const n = bx(...t);
3889
+ const n = yx(...t);
3865
3890
  return (r, o) => {
3866
3891
  switch (r) {
3867
3892
  case ur:
@@ -3907,10 +3932,10 @@ function _e(...e) {
3907
3932
  n === o ? a() : r = a;
3908
3933
  };
3909
3934
  }
3910
- function bx(...e) {
3911
- return (t) => e.reduceRight(wx, t);
3935
+ function yx(...e) {
3936
+ return (t) => e.reduceRight(bx, t);
3912
3937
  }
3913
- function yx(e) {
3938
+ function Sx(e) {
3914
3939
  let t, n;
3915
3940
  const r = () => t == null ? void 0 : t();
3916
3941
  return function(o, s) {
@@ -3971,12 +3996,12 @@ function Be(e, t = [], { singleton: n } = { singleton: !0 }) {
3971
3996
  return {
3972
3997
  constructor: e,
3973
3998
  dependencies: t,
3974
- id: Sx(),
3999
+ id: Cx(),
3975
4000
  singleton: n
3976
4001
  };
3977
4002
  }
3978
- const Sx = () => Symbol();
3979
- function Cx(e) {
4003
+ const Cx = () => Symbol();
4004
+ function Tx(e) {
3980
4005
  const t = /* @__PURE__ */ new Map(), n = ({ constructor: r, dependencies: o, id: s, singleton: i }) => {
3981
4006
  if (i && t.has(s))
3982
4007
  return t.get(s);
@@ -4014,17 +4039,17 @@ function bi(...e) {
4014
4039
  case ur:
4015
4040
  return;
4016
4041
  case bn:
4017
- return vx(...e.map((r) => Ue(r, n)));
4042
+ return wx(...e.map((r) => Ue(r, n)));
4018
4043
  }
4019
4044
  };
4020
4045
  }
4021
4046
  var Tt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(Tt || {});
4022
- const Tx = {
4047
+ const Rx = {
4023
4048
  0: "debug",
4024
4049
  3: "error",
4025
4050
  1: "log",
4026
4051
  2: "warn"
4027
- }, Rx = () => typeof globalThis > "u" ? window : globalThis, yn = Be(
4052
+ }, Ex = () => typeof globalThis > "u" ? window : globalThis, yn = Be(
4028
4053
  () => {
4029
4054
  const e = G(
4030
4055
  3
@@ -4033,8 +4058,8 @@ const Tx = {
4033
4058
  return {
4034
4059
  log: G((t, n, r = 1) => {
4035
4060
  var o;
4036
- const s = (o = Rx().VIRTUOSO_LOG_LEVEL) != null ? o : ot(e);
4037
- r >= s && console[Tx[r]](
4061
+ const s = (o = Ex().VIRTUOSO_LOG_LEVEL) != null ? o : ot(e);
4062
+ r >= s && console[Rx[r]](
4038
4063
  "%creact-virtuoso: %c%s %o",
4039
4064
  "color: #0253b3; font-weight: bold",
4040
4065
  "color: initial",
@@ -4066,10 +4091,10 @@ function Ji(e, t, n) {
4066
4091
  i && t ? (s == null || s.observe(i), r.current = i) : (r.current && (s == null || s.unobserve(r.current)), r.current = null);
4067
4092
  }, { callbackRef: o, ref: r };
4068
4093
  }
4069
- function Ex(e, t, n, r, o, s, i, a, c) {
4094
+ function kx(e, t, n, r, o, s, i, a, c) {
4070
4095
  const u = B.useCallback(
4071
4096
  (d) => {
4072
- const f = kx(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
4097
+ const f = Ix(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
4073
4098
  let h = d.parentElement;
4074
4099
  for (; !h.dataset.virtuosoScroller; )
4075
4100
  h = h.parentElement;
@@ -4089,7 +4114,7 @@ function Ex(e, t, n, r, o, s, i, a, c) {
4089
4114
  );
4090
4115
  return Ji(u, n, c);
4091
4116
  }
4092
- function kx(e, t, n, r) {
4117
+ function Ix(e, t, n, r) {
4093
4118
  const o = e.length;
4094
4119
  if (o === 0)
4095
4120
  return null;
@@ -4232,7 +4257,7 @@ function is(e, t, n) {
4232
4257
  if (qe(e))
4233
4258
  return [];
4234
4259
  const r = Ut(e, t)[0];
4235
- return Ix(Si(e, r, n));
4260
+ return Nx(Si(e, r, n));
4236
4261
  }
4237
4262
  function yi(e, t) {
4238
4263
  if (qe(e)) return jr;
@@ -4324,7 +4349,7 @@ function Ci(e) {
4324
4349
  const { lvl: t, r: n } = e;
4325
4350
  return !qe(n) && !qe(n.r) && n.lvl === t && n.r.lvl === t ? ut(n, { l: ut(e, { r: n.l }), lvl: t + 1 }) : e;
4326
4351
  }
4327
- function Ix(e) {
4352
+ function Nx(e) {
4328
4353
  return cu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
4329
4354
  }
4330
4355
  function pu(e, t) {
@@ -4359,7 +4384,7 @@ function Po(e, t, n, r = 0) {
4359
4384
  }
4360
4385
  throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
4361
4386
  }
4362
- function Nx(e, t, n, r) {
4387
+ function Ax(e, t, n, r) {
4363
4388
  const o = Po(e, t, r), s = Po(e, n, r, o);
4364
4389
  return e.slice(o, s + 1);
4365
4390
  }
@@ -4372,7 +4397,7 @@ function as(e) {
4372
4397
  function Qi({ index: e }, t) {
4373
4398
  return t === e ? 0 : t < e ? -1 : 1;
4374
4399
  }
4375
- function Ax() {
4400
+ function _x() {
4376
4401
  return {
4377
4402
  groupIndices: [],
4378
4403
  groupOffsetTree: Zn(),
@@ -4383,7 +4408,7 @@ function Ax() {
4383
4408
  sizeTree: Zn()
4384
4409
  };
4385
4410
  }
4386
- function _x(e, t) {
4411
+ function jx(e, t) {
4387
4412
  let n = qe(e) ? 0 : 1 / 0;
4388
4413
  for (const r of t) {
4389
4414
  const { endIndex: o, size: s, startIndex: i } = r;
@@ -4392,7 +4417,7 @@ function _x(e, t) {
4392
4417
  continue;
4393
4418
  }
4394
4419
  const a = is(e, i - 1, o + 1);
4395
- if (a.some($x(r)))
4420
+ if (a.some(Fx(r)))
4396
4421
  continue;
4397
4422
  let c = !1, u = !1;
4398
4423
  for (const { end: d, start: f, value: h } of a)
@@ -4401,10 +4426,10 @@ function _x(e, t) {
4401
4426
  }
4402
4427
  return [e, n];
4403
4428
  }
4404
- function jx(e) {
4429
+ function Px(e) {
4405
4430
  return typeof e.groupIndex < "u";
4406
4431
  }
4407
- function Px({ offset: e }, t) {
4432
+ function Ox({ offset: e }, t) {
4408
4433
  return t === e ? 0 : t < e ? -1 : 1;
4409
4434
  }
4410
4435
  function Mr(e, t, n) {
@@ -4422,7 +4447,7 @@ function gu(e, t) {
4422
4447
  return e + n;
4423
4448
  }
4424
4449
  function xu(e, t, n) {
4425
- if (jx(e))
4450
+ if (Px(e))
4426
4451
  return t.groupIndices[e.groupIndex] + 1;
4427
4452
  {
4428
4453
  const r = e.index === "LAST" ? n : e.index;
@@ -4430,10 +4455,10 @@ function xu(e, t, n) {
4430
4455
  return o = Math.max(0, o, Math.min(n, o)), o;
4431
4456
  }
4432
4457
  }
4433
- function Ox(e, t, n, r = 0) {
4434
- return r > 0 && (t = Math.max(t, mu(e, r, Qi).offset)), cu(Nx(e, t, n, Px), Lx);
4458
+ function Mx(e, t, n, r = 0) {
4459
+ return r > 0 && (t = Math.max(t, mu(e, r, Qi).offset)), cu(Ax(e, t, n, Ox), $x);
4435
4460
  }
4436
- function Mx(e, [t, n, r, o]) {
4461
+ function Dx(e, [t, n, r, o]) {
4437
4462
  t.length > 0 && r("received item sizes", t, Tt.DEBUG);
4438
4463
  const s = e.sizeTree;
4439
4464
  let i = s, a = 0;
@@ -4441,7 +4466,7 @@ function Mx(e, [t, n, r, o]) {
4441
4466
  const h = t[0].size, m = t[1].size;
4442
4467
  i = n.reduce((w, v) => It(It(w, v, h), v + 1, m), i);
4443
4468
  } else
4444
- [i, a] = _x(i, t);
4469
+ [i, a] = jx(i, t);
4445
4470
  if (i === s)
4446
4471
  return e;
4447
4472
  const { lastIndex: c, lastOffset: u, lastSize: d, offsetTree: f } = Ti(e.offsetTree, a, i, o);
@@ -4455,7 +4480,7 @@ function Mx(e, [t, n, r, o]) {
4455
4480
  sizeTree: i
4456
4481
  };
4457
4482
  }
4458
- function Dx(e) {
4483
+ function Lx(e) {
4459
4484
  return Nn(e).map(({ k: t, v: n }, r, o) => {
4460
4485
  const s = o[r + 1];
4461
4486
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
@@ -4490,20 +4515,20 @@ function Ti(e, t, n, r) {
4490
4515
  offsetTree: o
4491
4516
  };
4492
4517
  }
4493
- function Lx(e) {
4518
+ function $x(e) {
4494
4519
  return { index: e.index, value: e };
4495
4520
  }
4496
- function $x(e) {
4521
+ function Fx(e) {
4497
4522
  const { endIndex: t, size: n, startIndex: r } = e;
4498
4523
  return (o) => o.start === r && (o.end === t || o.end === 1 / 0) && o.value === n;
4499
4524
  }
4500
- const Fx = {
4525
+ const zx = {
4501
4526
  offsetHeight: "height",
4502
4527
  offsetWidth: "width"
4503
4528
  }, rn = Be(
4504
4529
  ([{ log: e }, { recalcInProgress: t }]) => {
4505
- const n = Le(), r = Le(), o = gt(r, 0), s = Le(), i = Le(), a = G(0), c = G([]), u = G(void 0), d = G(void 0), f = G((S, C) => mn(S, Fx[C])), h = G(void 0), m = G(0), w = Ax(), v = gt(
4506
- F(n, _e(c, e, m), Zt(Mx, w), Je()),
4530
+ const n = Le(), r = Le(), o = gt(r, 0), s = Le(), i = Le(), a = G(0), c = G([]), u = G(void 0), d = G(void 0), f = G((S, C) => mn(S, zx[C])), h = G(void 0), m = G(0), w = _x(), v = gt(
4531
+ F(n, _e(c, e, m), Zt(Dx, w), Je()),
4507
4532
  w
4508
4533
  ), g = gt(
4509
4534
  F(
@@ -4736,7 +4761,7 @@ const Fx = {
4736
4761
  Ze(yn, Zi),
4737
4762
  { singleton: !0 }
4738
4763
  );
4739
- function zx(e) {
4764
+ function Bx(e) {
4740
4765
  return e.reduce(
4741
4766
  (t, n) => (t.groupIndices.push(t.totalCount), t.totalCount += n + 1, t),
4742
4767
  {
@@ -4747,7 +4772,7 @@ function zx(e) {
4747
4772
  }
4748
4773
  const vu = Be(
4749
4774
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
4750
- const s = Le(), i = Le(), a = Nt(F(s, ne(zx)));
4775
+ const s = Le(), i = Le(), a = Nt(F(s, ne(Bx)));
4751
4776
  return de(
4752
4777
  F(
4753
4778
  a,
@@ -4787,10 +4812,10 @@ const vu = Be(
4787
4812
  },
4788
4813
  Ze(yn),
4789
4814
  { singleton: !0 }
4790
- ), Bx = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4815
+ ), Hx = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4791
4816
  function wu(e) {
4792
4817
  const t = typeof e == "number" ? { index: e } : e;
4793
- return t.align || (t.align = "start"), (!t.behavior || !Bx) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4818
+ return t.align || (t.align = "start"), (!t.behavior || !Hx) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4794
4819
  }
4795
4820
  const Kr = Be(
4796
4821
  ([
@@ -4838,7 +4863,7 @@ const Kr = Be(
4838
4863
  X(Q);
4839
4864
  });
4840
4865
  } else
4841
- g = Ht(F(t, Hx(150)), X);
4866
+ g = Ht(F(t, Ux(150)), X);
4842
4867
  return x = setTimeout(() => {
4843
4868
  y();
4844
4869
  }, 1200), Ae(c, !0), _("scrolling from index to", { behavior: q, index: M, top: H }, Tt.DEBUG), { behavior: q, top: H };
@@ -4855,7 +4880,7 @@ const Kr = Be(
4855
4880
  Ze(rn, wt, yn),
4856
4881
  { singleton: !0 }
4857
4882
  );
4858
- function Hx(e) {
4883
+ function Ux(e) {
4859
4884
  return (t) => {
4860
4885
  const n = setTimeout(() => {
4861
4886
  t(!1);
@@ -4921,7 +4946,7 @@ const qr = Be(
4921
4946
  function bu(e, t) {
4922
4947
  return Math.abs(e - t) < 1.01;
4923
4948
  }
4924
- const Dr = "up", Er = "down", Ux = "none", Wx = {
4949
+ const Dr = "up", Er = "down", Wx = "none", Vx = {
4925
4950
  atBottom: !1,
4926
4951
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
4927
4952
  state: {
@@ -4930,8 +4955,8 @@ const Dr = "up", Er = "down", Ux = "none", Wx = {
4930
4955
  scrollTop: 0,
4931
4956
  viewportHeight: 0
4932
4957
  }
4933
- }, Vx = 0, Gr = Be(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4934
- const i = G(!1), a = G(!0), c = Le(), u = Le(), d = G(4), f = G(Vx), h = gt(
4958
+ }, Kx = 0, Gr = Be(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4959
+ const i = G(!1), a = G(!0), c = Le(), u = Le(), d = G(4), f = G(Kx), h = gt(
4935
4960
  F(
4936
4961
  bi(F(be(o), On(1), Xt(!0)), F(be(o), On(1), Xt(!1), xl(100))),
4937
4962
  Je()
@@ -4973,7 +4998,7 @@ const Dr = "up", Er = "down", Ux = "none", Wx = {
4973
4998
  notAtBottomBecause: _,
4974
4999
  state: A
4975
5000
  };
4976
- }, Wx),
5001
+ }, Vx),
4977
5002
  Je((b, y) => b && b.atBottom === y.atBottom)
4978
5003
  )
4979
5004
  ), v = gt(
@@ -5030,7 +5055,7 @@ const Dr = "up", Er = "down", Ux = "none", Wx = {
5030
5055
  ne((b) => b.direction)
5031
5056
  ),
5032
5057
  g
5033
- ), de(F(r, cn(50), Xt(Ux)), g);
5058
+ ), de(F(r, cn(50), Xt(Wx)), g);
5034
5059
  const x = G(0);
5035
5060
  return de(
5036
5061
  F(
@@ -5124,7 +5149,7 @@ const na = Be(
5124
5149
  Ze(wt),
5125
5150
  { singleton: !0 }
5126
5151
  );
5127
- function Kx(e, t, n) {
5152
+ function qx(e, t, n) {
5128
5153
  if (as(t)) {
5129
5154
  const r = gu(e, t);
5130
5155
  return [
@@ -5261,7 +5286,7 @@ const Bn = Be(
5261
5286
  return I === 0 ? { ...qs, totalCount: k } : yu(I, A, N, $, P, W || []);
5262
5287
  if (qe(D))
5263
5288
  return I > 0 ? null : yo(
5264
- Kx(ta(A, k), z, W),
5289
+ qx(ta(A, k), z, W),
5265
5290
  [],
5266
5291
  k,
5267
5292
  P,
@@ -5280,7 +5305,7 @@ const Bn = Be(
5280
5305
  }
5281
5306
  if (!_)
5282
5307
  return yo([], M, k, P, z, $);
5283
- const H = L.length > 0 ? L[L.length - 1] + 1 : 0, X = Ox(q, C, E, H);
5308
+ const H = L.length > 0 ? L[L.length - 1] + 1 : 0, X = Mx(q, C, E, H);
5284
5309
  if (X.length === 0)
5285
5310
  return null;
5286
5311
  const Q = k - 1, ce = ss([], (ve) => {
@@ -5396,7 +5421,7 @@ const Bn = Be(
5396
5421
  },
5397
5422
  Ze(wt, Bn),
5398
5423
  { singleton: !0 }
5399
- ), qx = Be(
5424
+ ), Gx = Be(
5400
5425
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
5401
5426
  const n = G(!1), r = gt(
5402
5427
  F(
@@ -5414,7 +5439,7 @@ const Bn = Be(
5414
5439
  { singleton: !0 }
5415
5440
  ), Cu = Be(() => ({
5416
5441
  context: G(null)
5417
- })), Gx = ({
5442
+ })), Yx = ({
5418
5443
  itemBottom: e,
5419
5444
  itemTop: t,
5420
5445
  locationParams: { align: n, behavior: r, ...o },
@@ -5433,7 +5458,7 @@ const Bn = Be(
5433
5458
  _e(t, c, n, s, o, r, a),
5434
5459
  _e(e),
5435
5460
  ne(([[f, h, m, w, v, g, x, b], y]) => {
5436
- const { align: R, behavior: S, calculateViewLocation: C = Gx, done: E, ...k } = f, N = xu(f, h, w - 1), A = Mr(N, h.offsetTree, y) + v + g, _ = A + Ut(h.sizeTree, N)[1], L = b + g, $ = b + m - x, P = C({
5461
+ const { align: R, behavior: S, calculateViewLocation: C = Yx, done: E, ...k } = f, N = xu(f, h, w - 1), A = Mr(N, h.offsetTree, y) + v + g, _ = A + Ut(h.sizeTree, N)[1], L = b + g, $ = b + m - x, P = C({
5437
5462
  itemBottom: _,
5438
5463
  itemTop: A,
5439
5464
  locationParams: { align: R, behavior: S, ...k },
@@ -5464,7 +5489,7 @@ const Bn = Be(
5464
5489
  function Rl(e) {
5465
5490
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
5466
5491
  }
5467
- const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5492
+ const Xx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Jx = Be(
5468
5493
  ([
5469
5494
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
5470
5495
  { atBottomState: o, isAtBottom: s },
@@ -5491,7 +5516,7 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5491
5516
  _e(be(w), s, a, f),
5492
5517
  ne(([[S, C], E, k, N, A]) => {
5493
5518
  let _ = C && N, L = "auto";
5494
- return _ && (L = Yx(E, k || A), _ = _ && !!L), { followOutputBehavior: L, shouldFollow: _, totalCount: S };
5519
+ return _ && (L = Xx(E, k || A), _ = _ && !!L), { followOutputBehavior: L, shouldFollow: _, totalCount: S };
5495
5520
  }),
5496
5521
  ye(({ shouldFollow: S }) => S)
5497
5522
  ),
@@ -5569,7 +5594,7 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5569
5594
  Cu,
5570
5595
  Tu
5571
5596
  )
5572
- ), Jx = Be(
5597
+ ), Zx = Be(
5573
5598
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5574
5599
  F(
5575
5600
  a,
@@ -5582,7 +5607,7 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5582
5607
  ), {}),
5583
5608
  Ze(rn, qr, Bn, Sn),
5584
5609
  { singleton: !0 }
5585
- ), Zx = Be(
5610
+ ), Qx = Be(
5586
5611
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5587
5612
  const r = G(0);
5588
5613
  return Ue(
@@ -5673,7 +5698,7 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5673
5698
  windowScrollTo: o,
5674
5699
  windowViewportRect: r
5675
5700
  };
5676
- }, Ze(wt)), Qx = Be(
5701
+ }, Ze(wt)), ev = Be(
5677
5702
  ([
5678
5703
  { sizeRanges: e, sizes: t },
5679
5704
  { headerHeight: n, scrollTop: r },
@@ -5688,10 +5713,10 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5688
5713
  _e(t, r, i, f, h, n)
5689
5714
  ),
5690
5715
  ([m, w, v, g, x, b, y]) => {
5691
- const R = Dx(w.sizeTree);
5716
+ const R = Lx(w.sizeTree);
5692
5717
  g && x !== null && b !== null && (v = x.scrollTop - b.offsetTop), v -= y, m({ ranges: R, scrollTop: v });
5693
5718
  }
5694
- ), de(F(d, ye(Yi), ne(ev)), o), de(
5719
+ ), de(F(d, ye(Yi), ne(tv)), o), de(
5695
5720
  F(
5696
5721
  s,
5697
5722
  _e(d),
@@ -5707,10 +5732,10 @@ const Yx = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Xx = Be(
5707
5732
  },
5708
5733
  Ze(rn, wt, qr, Sn, ra)
5709
5734
  );
5710
- function ev(e) {
5735
+ function tv(e) {
5711
5736
  return { align: "start", index: 0, offset: e.scrollTop };
5712
5737
  }
5713
- const tv = Be(([{ topItemsIndexes: e }]) => {
5738
+ const nv = Be(([{ topItemsIndexes: e }]) => {
5714
5739
  const t = G(0);
5715
5740
  return de(
5716
5741
  F(
@@ -5725,7 +5750,7 @@ function Eu(e) {
5725
5750
  let t = !1, n;
5726
5751
  return () => (t || (t = !0, n = e()), n);
5727
5752
  }
5728
- const nv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), rv = Be(
5753
+ const rv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), ov = Be(
5729
5754
  ([
5730
5755
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
5731
5756
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -5756,7 +5781,7 @@ const nv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5756
5781
  x > 0 ? (Ae(t, { behavior: "auto", top: -x }), Ae(e, 0)) : (Ae(e, 0), Ae(t, { behavior: "auto", top: -x }));
5757
5782
  }
5758
5783
  return Ue(F(v, _e(e, s)), ([x, b, y]) => {
5759
- y && nv() ? Ae(e, b - x) : g(-x);
5784
+ y && rv() ? Ae(e, b - x) : g(-x);
5760
5785
  }), Ue(
5761
5786
  F(
5762
5787
  lt(gt(s, !1), e, w),
@@ -5804,7 +5829,7 @@ const nv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5804
5829
  ), { deviation: e };
5805
5830
  },
5806
5831
  Ze(wt, Gr, Bn, rn, yn, Zi)
5807
- ), ov = Be(
5832
+ ), sv = Be(
5808
5833
  ([
5809
5834
  e,
5810
5835
  t,
@@ -5832,12 +5857,12 @@ const nv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5832
5857
  }),
5833
5858
  Ze(
5834
5859
  na,
5835
- Jx,
5860
+ Zx,
5836
5861
  Sn,
5837
5862
  Ru,
5838
5863
  Su,
5839
- Zx,
5840
- qx,
5864
+ Qx,
5865
+ Gx,
5841
5866
  ra,
5842
5867
  Tu,
5843
5868
  yn,
@@ -5910,17 +5935,17 @@ const nv = Eu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5910
5935
  rn,
5911
5936
  qr,
5912
5937
  wt,
5913
- Qx,
5914
- Xx,
5938
+ ev,
5939
+ Jx,
5915
5940
  Bn,
5916
5941
  Kr,
5917
- rv,
5918
- tv,
5942
+ ov,
5943
+ nv,
5919
5944
  vu,
5920
- ov
5945
+ sv
5921
5946
  )
5922
5947
  );
5923
- function sv(e, t) {
5948
+ function iv(e, t) {
5924
5949
  const n = {}, r = {};
5925
5950
  let o = 0;
5926
5951
  const s = e.length;
@@ -5953,10 +5978,10 @@ function Iu(e, t, n) {
5953
5978
  }, x), {});
5954
5979
  }
5955
5980
  function d(g) {
5956
- return i.reduce((x, b) => (x[b] = yx(g[t.events[b]]), x), {});
5981
+ return i.reduce((x, b) => (x[b] = Sx(g[t.events[b]]), x), {});
5957
5982
  }
5958
5983
  const f = B.forwardRef((g, x) => {
5959
- const { children: b, ...y } = g, [R] = B.useState(() => ss(Cx(e), (E) => {
5984
+ const { children: b, ...y } = g, [R] = B.useState(() => ss(Tx(e), (E) => {
5960
5985
  c(E, y);
5961
5986
  })), [S] = B.useState(gl(d, R));
5962
5987
  io(() => {
@@ -5969,7 +5994,7 @@ function Iu(e, t, n) {
5969
5994
  c(R, y);
5970
5995
  }), B.useImperativeHandle(x, ml(u(R)));
5971
5996
  const C = n;
5972
- return /* @__PURE__ */ l.jsx(a.Provider, { value: R, children: n ? /* @__PURE__ */ l.jsx(C, { ...sv([...r, ...o, ...i], y), children: b }) : b });
5997
+ return /* @__PURE__ */ l.jsx(a.Provider, { value: R, children: n ? /* @__PURE__ */ l.jsx(C, { ...iv([...r, ...o, ...i], y), children: b }) : b });
5973
5998
  }), h = (g) => {
5974
5999
  const x = B.useContext(a);
5975
6000
  return B.useCallback(
@@ -6011,7 +6036,7 @@ const Nu = B.createContext(void 0), Au = B.createContext(void 0), _u = typeof do
6011
6036
  function Gs(e) {
6012
6037
  return "self" in e;
6013
6038
  }
6014
- function iv(e) {
6039
+ function av(e) {
6015
6040
  return "body" in e;
6016
6041
  }
6017
6042
  function ju(e, t, n, r = dr, o, s) {
@@ -6019,7 +6044,7 @@ function ju(e, t, n, r = dr, o, s) {
6019
6044
  (h) => {
6020
6045
  let m, w, v;
6021
6046
  const g = h.target;
6022
- if (iv(g) || Gs(g)) {
6047
+ if (av(g) || Gs(g)) {
6023
6048
  const b = Gs(g) ? g : g.defaultView;
6024
6049
  v = s ? b.scrollX : b.scrollY, m = s ? b.document.documentElement.scrollWidth : b.document.documentElement.scrollHeight, w = s ? b.innerWidth : b.innerHeight;
6025
6050
  } else
@@ -6074,7 +6099,7 @@ const Ys = "-webkit-sticky", El = "sticky", oa = Eu(() => {
6074
6099
  function sa(e) {
6075
6100
  return e;
6076
6101
  }
6077
- const av = /* @__PURE__ */ Be(() => {
6102
+ const lv = /* @__PURE__ */ Be(() => {
6078
6103
  const e = G((a) => `Item ${a}`), t = G((a) => `Group ${a}`), n = G({}), r = G(sa), o = G("div"), s = G(dr), i = (a, c = null) => gt(
6079
6104
  F(
6080
6105
  n,
@@ -6100,11 +6125,11 @@ const av = /* @__PURE__ */ Be(() => {
6100
6125
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
6101
6126
  TopItemListComponent: i("TopItemList")
6102
6127
  };
6103
- }), lv = /* @__PURE__ */ Be(
6128
+ }), cv = /* @__PURE__ */ Be(
6104
6129
  ([e, t]) => ({ ...e, ...t }),
6105
- Ze(ku, av)
6106
- ), cv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), uv = { overflowAnchor: "none", position: oa(), zIndex: 1 }, Pu = { overflowAnchor: "none" }, dv = { ...Pu, display: "inline-block", height: "100%" }, kl = /* @__PURE__ */ B.memo(function({ showTopList: e = !1 }) {
6107
- const t = Re("listState"), n = Dt("sizeRanges"), r = Re("useWindowScroll"), o = Re("customScrollParent"), s = Dt("windowScrollContainerState"), i = Dt("scrollContainerState"), a = o || r ? s : i, c = Re("itemContent"), u = Re("context"), d = Re("groupContent"), f = Re("trackItemSizes"), h = Re("itemSize"), m = Re("log"), w = Dt("gap"), v = Re("horizontalDirection"), { callbackRef: g } = Ex(
6130
+ Ze(ku, lv)
6131
+ ), uv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), dv = { overflowAnchor: "none", position: oa(), zIndex: 1 }, Pu = { overflowAnchor: "none" }, fv = { ...Pu, display: "inline-block", height: "100%" }, kl = /* @__PURE__ */ B.memo(function({ showTopList: e = !1 }) {
6132
+ const t = Re("listState"), n = Dt("sizeRanges"), r = Re("useWindowScroll"), o = Re("customScrollParent"), s = Dt("windowScrollContainerState"), i = Dt("scrollContainerState"), a = o || r ? s : i, c = Re("itemContent"), u = Re("context"), d = Re("groupContent"), f = Re("trackItemSizes"), h = Re("itemSize"), m = Re("log"), w = Dt("gap"), v = Re("horizontalDirection"), { callbackRef: g } = kx(
6108
6133
  n,
6109
6134
  h,
6110
6135
  f,
@@ -6118,7 +6143,7 @@ const av = /* @__PURE__ */ Be(() => {
6118
6143
  ia("deviation", (P) => {
6119
6144
  x !== P && b(P);
6120
6145
  });
6121
- const y = Re("EmptyPlaceholder"), R = Re("ScrollSeekPlaceholder") || cv, S = Re("ListComponent"), C = Re("ItemComponent"), E = Re("GroupComponent"), k = Re("computeItemKey"), N = Re("isSeeking"), A = Re("groupIndices").length > 0, _ = Re("alignToBottom"), L = Re("initialItemFinalLocationReached"), $ = e ? {} : {
6146
+ const y = Re("EmptyPlaceholder"), R = Re("ScrollSeekPlaceholder") || uv, S = Re("ListComponent"), C = Re("ItemComponent"), E = Re("GroupComponent"), k = Re("computeItemKey"), N = Re("isSeeking"), A = Re("groupIndices").length > 0, _ = Re("alignToBottom"), L = Re("initialItemFinalLocationReached"), $ = e ? {} : {
6122
6147
  boxSizing: "border-box",
6123
6148
  ...v ? {
6124
6149
  display: "inline-block",
@@ -6161,33 +6186,33 @@ const av = /* @__PURE__ */ Be(() => {
6161
6186
  "data-item-index": P.index,
6162
6187
  "data-known-size": P.size,
6163
6188
  key: z,
6164
- style: uv
6189
+ style: dv
6165
6190
  },
6166
6191
  d(P.index, u)
6167
6192
  ) : /* @__PURE__ */ go(
6168
6193
  C,
6169
6194
  {
6170
6195
  ...mt(C, u),
6171
- ...mv(C, P.data),
6196
+ ...gv(C, P.data),
6172
6197
  "data-index": W,
6173
6198
  "data-item-group-index": P.groupIndex,
6174
6199
  "data-item-index": P.index,
6175
6200
  "data-known-size": P.size,
6176
6201
  key: z,
6177
- style: v ? dv : Pu
6202
+ style: v ? fv : Pu
6178
6203
  },
6179
6204
  A ? c(P.index, P.groupIndex, P.data, u) : c(P.index, P.data, u)
6180
6205
  );
6181
6206
  })
6182
6207
  }
6183
6208
  );
6184
- }), fv = {
6209
+ }), hv = {
6185
6210
  height: "100%",
6186
6211
  outline: "none",
6187
6212
  overflowY: "auto",
6188
6213
  position: "relative",
6189
6214
  WebkitOverflowScrolling: "touch"
6190
- }, hv = {
6215
+ }, pv = {
6191
6216
  outline: "none",
6192
6217
  overflowX: "auto",
6193
6218
  position: "relative"
@@ -6197,7 +6222,7 @@ const av = /* @__PURE__ */ Be(() => {
6197
6222
  top: 0,
6198
6223
  width: "100%",
6199
6224
  ...e ? { display: "flex", flexDirection: "column" } : {}
6200
- }), pv = {
6225
+ }), mv = {
6201
6226
  position: oa(),
6202
6227
  top: 0,
6203
6228
  width: "100%",
@@ -6207,10 +6232,10 @@ function mt(e, t) {
6207
6232
  if (typeof e != "string")
6208
6233
  return { context: t };
6209
6234
  }
6210
- function mv(e, t) {
6235
+ function gv(e, t) {
6211
6236
  return { item: typeof e == "string" ? void 0 : t };
6212
6237
  }
6213
- const gv = /* @__PURE__ */ B.memo(function() {
6238
+ const xv = /* @__PURE__ */ B.memo(function() {
6214
6239
  const e = Re("HeaderComponent"), t = Dt("headerHeight"), n = Re("HeaderFooterTag"), r = zn(
6215
6240
  B.useMemo(
6216
6241
  () => (s) => {
@@ -6222,7 +6247,7 @@ const gv = /* @__PURE__ */ B.memo(function() {
6222
6247
  Re("skipAnimationFrameInResizeObserver")
6223
6248
  ), o = Re("context");
6224
6249
  return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...mt(e, o) }) }) : null;
6225
- }), xv = /* @__PURE__ */ B.memo(function() {
6250
+ }), vv = /* @__PURE__ */ B.memo(function() {
6226
6251
  const e = Re("FooterComponent"), t = Dt("footerHeight"), n = Re("HeaderFooterTag"), r = zn(
6227
6252
  B.useMemo(
6228
6253
  () => (s) => {
@@ -6251,7 +6276,7 @@ function Ou({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
6251
6276
  "data-testid": "virtuoso-scroller",
6252
6277
  "data-virtuoso-scroller": !0,
6253
6278
  ref: m,
6254
- style: { ...f ? hv : fv, ...o },
6279
+ style: { ...f ? pv : hv, ...o },
6255
6280
  tabIndex: 0,
6256
6281
  ...i,
6257
6282
  ...mt(c, s),
@@ -6287,7 +6312,7 @@ function Mu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
6287
6312
  );
6288
6313
  });
6289
6314
  }
6290
- const vv = ({ children: e }) => {
6315
+ const wv = ({ children: e }) => {
6291
6316
  const t = B.useContext(Nu), n = Dt("viewportHeight"), r = Dt("fixedItemHeight"), o = Re("alignToBottom"), s = Re("horizontalDirection"), i = B.useMemo(
6292
6317
  () => iu(n, (c) => mn(c, s ? "width" : "height")),
6293
6318
  [n, s]
@@ -6295,7 +6320,7 @@ const vv = ({ children: e }) => {
6295
6320
  return B.useEffect(() => {
6296
6321
  t && (n(t.viewportHeight), r(t.itemHeight));
6297
6322
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style: ls(o), children: e });
6298
- }, wv = ({ children: e }) => {
6323
+ }, bv = ({ children: e }) => {
6299
6324
  const t = B.useContext(Nu), n = Dt("windowViewportRect"), r = Dt("fixedItemHeight"), o = Re("customScrollParent"), s = lu(
6300
6325
  n,
6301
6326
  o,
@@ -6304,26 +6329,26 @@ const vv = ({ children: e }) => {
6304
6329
  return B.useEffect(() => {
6305
6330
  t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
6306
6331
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: ls(i), children: e });
6307
- }, bv = ({ children: e }) => {
6308
- const t = Re("TopItemListComponent") || "div", n = Re("headerHeight"), r = { ...pv, marginTop: `${n}px` }, o = Re("context");
6332
+ }, yv = ({ children: e }) => {
6333
+ const t = Re("TopItemListComponent") || "div", n = Re("headerHeight"), r = { ...mv, marginTop: `${n}px` }, o = Re("context");
6309
6334
  return /* @__PURE__ */ l.jsx(t, { style: r, ...mt(t, o), children: e });
6310
- }, yv = /* @__PURE__ */ B.memo(function(e) {
6335
+ }, Sv = /* @__PURE__ */ B.memo(function(e) {
6311
6336
  const t = Re("useWindowScroll"), n = Re("topItemsIndexes").length > 0, r = Re("customScrollParent"), o = Re("context");
6312
- return /* @__PURE__ */ l.jsxs(r || t ? Tv : Cv, { ...e, context: o, children: [
6313
- n && /* @__PURE__ */ l.jsx(bv, { children: /* @__PURE__ */ l.jsx(kl, { showTopList: !0 }) }),
6314
- /* @__PURE__ */ l.jsxs(r || t ? wv : vv, { children: [
6315
- /* @__PURE__ */ l.jsx(gv, {}),
6337
+ return /* @__PURE__ */ l.jsxs(r || t ? Rv : Tv, { ...e, context: o, children: [
6338
+ n && /* @__PURE__ */ l.jsx(yv, { children: /* @__PURE__ */ l.jsx(kl, { showTopList: !0 }) }),
6339
+ /* @__PURE__ */ l.jsxs(r || t ? bv : wv, { children: [
6340
+ /* @__PURE__ */ l.jsx(xv, {}),
6316
6341
  /* @__PURE__ */ l.jsx(kl, {}),
6317
- /* @__PURE__ */ l.jsx(xv, {})
6342
+ /* @__PURE__ */ l.jsx(vv, {})
6318
6343
  ] })
6319
6344
  ] });
6320
6345
  }), {
6321
- Component: Sv,
6346
+ Component: Cv,
6322
6347
  useEmitter: ia,
6323
6348
  useEmitterValue: Re,
6324
6349
  usePublisher: Dt
6325
6350
  } = /* @__PURE__ */ Iu(
6326
- lv,
6351
+ cv,
6327
6352
  {
6328
6353
  required: {},
6329
6354
  optional: {
@@ -6380,8 +6405,8 @@ const vv = ({ children: e }) => {
6380
6405
  groupIndices: "groupIndices"
6381
6406
  }
6382
6407
  },
6383
- yv
6384
- ), Cv = /* @__PURE__ */ Ou({ useEmitter: ia, useEmitterValue: Re, usePublisher: Dt }), Tv = /* @__PURE__ */ Mu({ useEmitter: ia, useEmitterValue: Re, usePublisher: Dt }), Rv = Sv, Ev = /* @__PURE__ */ Be(() => {
6408
+ Sv
6409
+ ), Tv = /* @__PURE__ */ Ou({ useEmitter: ia, useEmitterValue: Re, usePublisher: Dt }), Rv = /* @__PURE__ */ Mu({ useEmitter: ia, useEmitterValue: Re, usePublisher: Dt }), Ev = Cv, kv = /* @__PURE__ */ Be(() => {
6385
6410
  const e = G((u) => /* @__PURE__ */ l.jsxs("td", { children: [
6386
6411
  "Item $",
6387
6412
  u
@@ -6417,7 +6442,7 @@ const vv = ({ children: e }) => {
6417
6442
  GroupComponent: c("Group", "tr")
6418
6443
  };
6419
6444
  });
6420
- Ze(ku, Ev);
6445
+ Ze(ku, kv);
6421
6446
  oa();
6422
6447
  const Il = {
6423
6448
  bottom: 0,
@@ -6427,7 +6452,7 @@ const Il = {
6427
6452
  offsetBottom: 0,
6428
6453
  offsetTop: 0,
6429
6454
  top: 0
6430
- }, kv = {
6455
+ }, Iv = {
6431
6456
  bottom: 0,
6432
6457
  itemHeight: 0,
6433
6458
  items: [{ index: 0 }],
@@ -6439,19 +6464,19 @@ const Il = {
6439
6464
  function _l(e, t, n) {
6440
6465
  return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
6441
6466
  }
6442
- function Iv(e) {
6467
+ function Nv(e) {
6443
6468
  return {
6444
- ...kv,
6469
+ ...Iv,
6445
6470
  items: e
6446
6471
  };
6447
6472
  }
6448
6473
  function ao(e, t) {
6449
6474
  return e && e.width === t.width && e.height === t.height;
6450
6475
  }
6451
- function Nv(e, t) {
6476
+ function Av(e, t) {
6452
6477
  return e && e.column === t.column && e.row === t.row;
6453
6478
  }
6454
- const Av = /* @__PURE__ */ Be(
6479
+ const _v = /* @__PURE__ */ Be(
6455
6480
  ([
6456
6481
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
6457
6482
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: c, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: f },
@@ -6528,7 +6553,7 @@ const Av = /* @__PURE__ */ Be(
6528
6553
  lt(
6529
6554
  be(C),
6530
6555
  r,
6531
- be(W, Nv),
6556
+ be(W, Av),
6532
6557
  be(A, ao),
6533
6558
  be(N, ao),
6534
6559
  be(P),
@@ -6556,7 +6581,7 @@ const Av = /* @__PURE__ */ Be(
6556
6581
  return Il;
6557
6582
  if (it === 0) {
6558
6583
  const jt = ta(we, O), Vn = jt + Math.max(V - 1, 0);
6559
- return Iv(_l(jt, Vn, Ye));
6584
+ return Nv(_l(jt, Vn, Ye));
6560
6585
  }
6561
6586
  const se = Du(oe, it, Pe);
6562
6587
  let he, pe;
@@ -6712,7 +6737,7 @@ function Ri(e, t, n, r) {
6712
6737
  const o = Du(e.width, n.width, t.column), s = Do(r / o), i = s * n.height + kr(0, s - 1) * t.row;
6713
6738
  return i > 0 ? i + t.row : i;
6714
6739
  }
6715
- const _v = /* @__PURE__ */ Be(() => {
6740
+ const jv = /* @__PURE__ */ Be(() => {
6716
6741
  const e = G((f) => `Item ${f}`), t = G({}), n = G(null), r = G("virtuoso-grid-item"), o = G("virtuoso-grid-list"), s = G(sa), i = G("div"), a = G(dr), c = (f, h = null) => gt(
6717
6742
  F(
6718
6743
  t,
@@ -6739,10 +6764,10 @@ const _v = /* @__PURE__ */ Be(() => {
6739
6764
  scrollerRef: a,
6740
6765
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
6741
6766
  };
6742
- }), jv = /* @__PURE__ */ Be(
6767
+ }), Pv = /* @__PURE__ */ Be(
6743
6768
  ([e, t]) => ({ ...e, ...t }),
6744
- Ze(Av, _v)
6745
- ), Pv = /* @__PURE__ */ B.memo(function() {
6769
+ Ze(_v, jv)
6770
+ ), Ov = /* @__PURE__ */ B.memo(function() {
6746
6771
  const e = et("gridState"), t = et("listClassName"), n = et("itemClassName"), r = et("itemContent"), o = et("computeItemKey"), s = et("isSeeking"), i = Lt("scrollHeight"), a = et("ItemComponent"), c = et("ListComponent"), u = et("ScrollSeekPlaceholder"), d = et("context"), f = Lt("itemDimensions"), h = Lt("gap"), m = et("log"), w = et("stateRestoreInProgress"), v = Lt("reportReadyState"), g = zn(
6747
6772
  B.useMemo(
6748
6773
  () => (x) => {
@@ -6797,7 +6822,7 @@ const _v = /* @__PURE__ */ Be(() => {
6797
6822
  })
6798
6823
  }
6799
6824
  );
6800
- }), Ov = B.memo(function() {
6825
+ }), Mv = B.memo(function() {
6801
6826
  const e = et("HeaderComponent"), t = Lt("headerHeight"), n = et("headerFooterTag"), r = zn(
6802
6827
  B.useMemo(
6803
6828
  () => (s) => {
@@ -6809,7 +6834,7 @@ const _v = /* @__PURE__ */ Be(() => {
6809
6834
  !1
6810
6835
  ), o = et("context");
6811
6836
  return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...mt(e, o) }) }) : null;
6812
- }), Mv = B.memo(function() {
6837
+ }), Dv = B.memo(function() {
6813
6838
  const e = et("FooterComponent"), t = Lt("footerHeight"), n = et("headerFooterTag"), r = zn(
6814
6839
  B.useMemo(
6815
6840
  () => (s) => {
@@ -6821,7 +6846,7 @@ const _v = /* @__PURE__ */ Be(() => {
6821
6846
  !1
6822
6847
  ), o = et("context");
6823
6848
  return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...mt(e, o) }) }) : null;
6824
- }), Dv = ({ children: e }) => {
6849
+ }), Lv = ({ children: e }) => {
6825
6850
  const t = B.useContext(Au), n = Lt("itemDimensions"), r = Lt("viewportDimensions"), o = zn(
6826
6851
  B.useMemo(
6827
6852
  () => (s) => {
@@ -6835,24 +6860,24 @@ const _v = /* @__PURE__ */ Be(() => {
6835
6860
  return B.useEffect(() => {
6836
6861
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6837
6862
  }, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: ls(!1), children: e });
6838
- }, Lv = ({ children: e }) => {
6863
+ }, $v = ({ children: e }) => {
6839
6864
  const t = B.useContext(Au), n = Lt("windowViewportRect"), r = Lt("itemDimensions"), o = et("customScrollParent"), s = lu(n, o, !1);
6840
6865
  return B.useEffect(() => {
6841
6866
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6842
6867
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: ls(!1), children: e });
6843
- }, $v = /* @__PURE__ */ B.memo(function({ ...e }) {
6844
- const t = et("useWindowScroll"), n = et("customScrollParent"), r = n || t ? zv : Fv, o = n || t ? Lv : Dv, s = et("context");
6868
+ }, Fv = /* @__PURE__ */ B.memo(function({ ...e }) {
6869
+ const t = et("useWindowScroll"), n = et("customScrollParent"), r = n || t ? Bv : zv, o = n || t ? $v : Lv, s = et("context");
6845
6870
  return /* @__PURE__ */ l.jsx(r, { ...e, ...mt(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6871
+ /* @__PURE__ */ l.jsx(Mv, {}),
6846
6872
  /* @__PURE__ */ l.jsx(Ov, {}),
6847
- /* @__PURE__ */ l.jsx(Pv, {}),
6848
- /* @__PURE__ */ l.jsx(Mv, {})
6873
+ /* @__PURE__ */ l.jsx(Dv, {})
6849
6874
  ] }) });
6850
6875
  }), {
6851
6876
  useEmitter: Lu,
6852
6877
  useEmitterValue: et,
6853
6878
  usePublisher: Lt
6854
6879
  } = /* @__PURE__ */ Iu(
6855
- jv,
6880
+ Pv,
6856
6881
  {
6857
6882
  optional: {
6858
6883
  context: "context",
@@ -6891,12 +6916,12 @@ const _v = /* @__PURE__ */ Be(() => {
6891
6916
  readyStateChanged: "readyStateChanged"
6892
6917
  }
6893
6918
  },
6894
- $v
6895
- ), Fv = /* @__PURE__ */ Ou({ useEmitter: Lu, useEmitterValue: et, usePublisher: Lt }), zv = /* @__PURE__ */ Mu({ useEmitter: Lu, useEmitterValue: et, usePublisher: Lt });
6919
+ Fv
6920
+ ), zv = /* @__PURE__ */ Ou({ useEmitter: Lu, useEmitterValue: et, usePublisher: Lt }), Bv = /* @__PURE__ */ Mu({ useEmitter: Lu, useEmitterValue: et, usePublisher: Lt });
6896
6921
  function Pl(e, t, n) {
6897
6922
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Tt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6898
6923
  }
6899
- const Bv = Xo(
6924
+ const Hv = Xo(
6900
6925
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
6901
6926
  {
6902
6927
  variants: {
@@ -6913,7 +6938,7 @@ const Bv = Xo(
6913
6938
  }
6914
6939
  );
6915
6940
  function Ei({ className: e, variant: t, ...n }) {
6916
- return /* @__PURE__ */ l.jsx("div", { className: Z(Bv({ variant: t }), e), ...n });
6941
+ return /* @__PURE__ */ l.jsx("div", { className: Z(Hv({ variant: t }), e), ...n });
6917
6942
  }
6918
6943
  function ae(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6919
6944
  return function(o) {
@@ -6921,7 +6946,7 @@ function ae(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6921
6946
  return t == null ? void 0 : t(o);
6922
6947
  };
6923
6948
  }
6924
- function Hv(e, t) {
6949
+ function Uv(e, t) {
6925
6950
  const n = p.createContext(t), r = (s) => {
6926
6951
  const { children: i, ...a } = s, c = p.useMemo(() => a, Object.values(a));
6927
6952
  return /* @__PURE__ */ l.jsx(n.Provider, { value: c, children: i });
@@ -6965,9 +6990,9 @@ function on(e, t = []) {
6965
6990
  );
6966
6991
  };
6967
6992
  };
6968
- return o.scopeName = e, [r, Uv(o, ...t)];
6993
+ return o.scopeName = e, [r, Wv(o, ...t)];
6969
6994
  }
6970
- function Uv(...e) {
6995
+ function Wv(...e) {
6971
6996
  const t = e[0];
6972
6997
  if (e.length === 1) return t;
6973
6998
  const n = () => {
@@ -6986,7 +7011,7 @@ function Uv(...e) {
6986
7011
  return n.scopeName = t.scopeName, n;
6987
7012
  }
6988
7013
  var dt = globalThis != null && globalThis.document ? p.useLayoutEffect : () => {
6989
- }, Wv = p[" useInsertionEffect ".trim().toString()] || dt;
7014
+ }, Vv = p[" useInsertionEffect ".trim().toString()] || dt;
6990
7015
  function Mn({
6991
7016
  prop: e,
6992
7017
  defaultProp: t,
@@ -6994,7 +7019,7 @@ function Mn({
6994
7019
  },
6995
7020
  caller: r
6996
7021
  }) {
6997
- const [o, s, i] = Vv({
7022
+ const [o, s, i] = Kv({
6998
7023
  defaultProp: t,
6999
7024
  onChange: n
7000
7025
  }), a = e !== void 0, c = a ? e : o;
@@ -7011,7 +7036,7 @@ function Mn({
7011
7036
  (d) => {
7012
7037
  var f;
7013
7038
  if (a) {
7014
- const h = Kv(d) ? d(e) : d;
7039
+ const h = qv(d) ? d(e) : d;
7015
7040
  h !== e && ((f = i.current) == null || f.call(i, h));
7016
7041
  } else
7017
7042
  s(d);
@@ -7020,19 +7045,19 @@ function Mn({
7020
7045
  );
7021
7046
  return [c, u];
7022
7047
  }
7023
- function Vv({
7048
+ function Kv({
7024
7049
  defaultProp: e,
7025
7050
  onChange: t
7026
7051
  }) {
7027
7052
  const [n, r] = p.useState(e), o = p.useRef(n), s = p.useRef(t);
7028
- return Wv(() => {
7053
+ return Vv(() => {
7029
7054
  s.current = t;
7030
7055
  }, [t]), p.useEffect(() => {
7031
7056
  var i;
7032
7057
  o.current !== n && ((i = s.current) == null || i.call(s, n), o.current = n);
7033
7058
  }, [n, o]), [n, r, s];
7034
7059
  }
7035
- function Kv(e) {
7060
+ function qv(e) {
7036
7061
  return typeof e == "function";
7037
7062
  }
7038
7063
  function Ol(e, t) {
@@ -7059,7 +7084,7 @@ function aa(...e) {
7059
7084
  function Me(...e) {
7060
7085
  return p.useCallback(aa(...e), e);
7061
7086
  }
7062
- var qv = [
7087
+ var Gv = [
7063
7088
  "a",
7064
7089
  "button",
7065
7090
  "div",
@@ -7077,7 +7102,7 @@ var qv = [
7077
7102
  "span",
7078
7103
  "svg",
7079
7104
  "ul"
7080
- ], Ce = qv.reduce((e, t) => {
7105
+ ], Ce = Gv.reduce((e, t) => {
7081
7106
  const n = nr(`Primitive.${t}`), r = p.forwardRef((o, s) => {
7082
7107
  const { asChild: i, ...a } = o, c = i ? n : t;
7083
7108
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(c, { ...a, ref: s });
@@ -7087,16 +7112,16 @@ var qv = [
7087
7112
  function $u(e, t) {
7088
7113
  e && Jo.flushSync(() => e.dispatchEvent(t));
7089
7114
  }
7090
- function Gv(e, t) {
7115
+ function Yv(e, t) {
7091
7116
  return p.useReducer((n, r) => t[n][r] ?? n, e);
7092
7117
  }
7093
7118
  var _t = (e) => {
7094
- const { present: t, children: n } = e, r = Yv(t), o = typeof n == "function" ? n({ present: r.isPresent }) : p.Children.only(n), s = Me(r.ref, Xv(o));
7119
+ const { present: t, children: n } = e, r = Xv(t), o = typeof n == "function" ? n({ present: r.isPresent }) : p.Children.only(n), s = Me(r.ref, Jv(o));
7095
7120
  return typeof n == "function" || r.isPresent ? p.cloneElement(o, { ref: s }) : null;
7096
7121
  };
7097
7122
  _t.displayName = "Presence";
7098
- function Yv(e) {
7099
- const [t, n] = p.useState(), r = p.useRef(null), o = p.useRef(e), s = p.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Gv(i, {
7123
+ function Xv(e) {
7124
+ const [t, n] = p.useState(), r = p.useRef(null), o = p.useRef(e), s = p.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Yv(i, {
7100
7125
  mounted: {
7101
7126
  UNMOUNT: "unmounted",
7102
7127
  ANIMATION_OUT: "unmountSuspended"
@@ -7147,20 +7172,20 @@ function Yv(e) {
7147
7172
  function lo(e) {
7148
7173
  return (e == null ? void 0 : e.animationName) || "none";
7149
7174
  }
7150
- function Xv(e) {
7175
+ function Jv(e) {
7151
7176
  var r, o;
7152
7177
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
7153
7178
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
7154
7179
  }
7155
- var Jv = p[" useId ".trim().toString()] || (() => {
7156
- }), Zv = 0;
7180
+ var Zv = p[" useId ".trim().toString()] || (() => {
7181
+ }), Qv = 0;
7157
7182
  function en(e) {
7158
- const [t, n] = p.useState(Jv());
7183
+ const [t, n] = p.useState(Zv());
7159
7184
  return dt(() => {
7160
- n((r) => r ?? String(Zv++));
7185
+ n((r) => r ?? String(Qv++));
7161
7186
  }, [e]), e || (t ? `radix-${t}` : "");
7162
7187
  }
7163
- var cs = "Collapsible", [Qv, DT] = on(cs), [ew, la] = Qv(cs), Fu = p.forwardRef(
7188
+ var cs = "Collapsible", [ew, LT] = on(cs), [tw, la] = ew(cs), Fu = p.forwardRef(
7164
7189
  (e, t) => {
7165
7190
  const {
7166
7191
  __scopeCollapsible: n,
@@ -7176,7 +7201,7 @@ var cs = "Collapsible", [Qv, DT] = on(cs), [ew, la] = Qv(cs), Fu = p.forwardRef(
7176
7201
  caller: cs
7177
7202
  });
7178
7203
  return /* @__PURE__ */ l.jsx(
7179
- ew,
7204
+ tw,
7180
7205
  {
7181
7206
  scope: n,
7182
7207
  disabled: s,
@@ -7217,14 +7242,14 @@ var zu = "CollapsibleTrigger", Bu = p.forwardRef(
7217
7242
  }
7218
7243
  );
7219
7244
  Bu.displayName = zu;
7220
- var ca = "CollapsibleContent", tw = p.forwardRef(
7245
+ var ca = "CollapsibleContent", nw = p.forwardRef(
7221
7246
  (e, t) => {
7222
7247
  const { forceMount: n, ...r } = e, o = la(ca, e.__scopeCollapsible);
7223
- return /* @__PURE__ */ l.jsx(_t, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(nw, { ...r, ref: t, present: s }) });
7248
+ return /* @__PURE__ */ l.jsx(_t, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(rw, { ...r, ref: t, present: s }) });
7224
7249
  }
7225
7250
  );
7226
- tw.displayName = ca;
7227
- var nw = p.forwardRef((e, t) => {
7251
+ nw.displayName = ca;
7252
+ var rw = p.forwardRef((e, t) => {
7228
7253
  const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = la(ca, n), [a, c] = p.useState(r), u = p.useRef(null), d = Me(t, u), f = p.useRef(0), h = f.current, m = p.useRef(0), w = m.current, v = i.open || a, g = p.useRef(v), x = p.useRef(void 0);
7229
7254
  return p.useEffect(() => {
7230
7255
  const b = requestAnimationFrame(() => g.current = !1);
@@ -7260,8 +7285,8 @@ var nw = p.forwardRef((e, t) => {
7260
7285
  function ua(e) {
7261
7286
  return e ? "open" : "closed";
7262
7287
  }
7263
- var rw = Fu;
7264
- const Ml = rw, Dl = Bu, Ir = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
7288
+ var ow = Fu;
7289
+ const Ml = ow, Dl = Bu, Ir = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
7265
7290
  "div",
7266
7291
  {
7267
7292
  ref: n,
@@ -7339,50 +7364,50 @@ function Wu() {
7339
7364
  };
7340
7365
  }
7341
7366
  let Hn = Wu();
7342
- function ow(e) {
7367
+ function sw(e) {
7343
7368
  Hn = e;
7344
7369
  }
7345
- const Vu = /[&<>"']/, sw = new RegExp(Vu.source, "g"), Ku = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, iw = new RegExp(Ku.source, "g"), aw = {
7370
+ const Vu = /[&<>"']/, iw = new RegExp(Vu.source, "g"), Ku = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, aw = new RegExp(Ku.source, "g"), lw = {
7346
7371
  "&": "&amp;",
7347
7372
  "<": "&lt;",
7348
7373
  ">": "&gt;",
7349
7374
  '"': "&quot;",
7350
7375
  "'": "&#39;"
7351
- }, Ll = (e) => aw[e];
7376
+ }, Ll = (e) => lw[e];
7352
7377
  function ht(e, t) {
7353
7378
  if (t) {
7354
7379
  if (Vu.test(e))
7355
- return e.replace(sw, Ll);
7380
+ return e.replace(iw, Ll);
7356
7381
  } else if (Ku.test(e))
7357
- return e.replace(iw, Ll);
7382
+ return e.replace(aw, Ll);
7358
7383
  return e;
7359
7384
  }
7360
- const lw = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
7385
+ const cw = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
7361
7386
  function qu(e) {
7362
- return e.replace(lw, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
7387
+ return e.replace(cw, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
7363
7388
  }
7364
- const cw = /(^|[^\[])\^/g;
7389
+ const uw = /(^|[^\[])\^/g;
7365
7390
  function Ge(e, t) {
7366
7391
  e = typeof e == "string" ? e : e.source, t = t || "";
7367
7392
  const n = {
7368
- replace: (r, o) => (o = o.source || o, o = o.replace(cw, "$1"), e = e.replace(r, o), n),
7393
+ replace: (r, o) => (o = o.source || o, o = o.replace(uw, "$1"), e = e.replace(r, o), n),
7369
7394
  getRegex: () => new RegExp(e, t)
7370
7395
  };
7371
7396
  return n;
7372
7397
  }
7373
- const uw = /[^\w:]/g, dw = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
7398
+ const dw = /[^\w:]/g, fw = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
7374
7399
  function $l(e, t, n) {
7375
7400
  if (e) {
7376
7401
  let r;
7377
7402
  try {
7378
- r = decodeURIComponent(qu(n)).replace(uw, "").toLowerCase();
7403
+ r = decodeURIComponent(qu(n)).replace(dw, "").toLowerCase();
7379
7404
  } catch {
7380
7405
  return null;
7381
7406
  }
7382
7407
  if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0)
7383
7408
  return null;
7384
7409
  }
7385
- t && !dw.test(n) && (n = mw(t, n));
7410
+ t && !fw.test(n) && (n = gw(t, n));
7386
7411
  try {
7387
7412
  n = encodeURI(n).replace(/%25/g, "%");
7388
7413
  } catch {
@@ -7390,11 +7415,11 @@ function $l(e, t, n) {
7390
7415
  }
7391
7416
  return n;
7392
7417
  }
7393
- const co = {}, fw = /^[^:]+:\/*[^/]*$/, hw = /^([^:]+:)[\s\S]*$/, pw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
7394
- function mw(e, t) {
7395
- co[" " + e] || (fw.test(e) ? co[" " + e] = e + "/" : co[" " + e] = Co(e, "/", !0)), e = co[" " + e];
7418
+ const co = {}, hw = /^[^:]+:\/*[^/]*$/, pw = /^([^:]+:)[\s\S]*$/, mw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
7419
+ function gw(e, t) {
7420
+ co[" " + e] || (hw.test(e) ? co[" " + e] = e + "/" : co[" " + e] = Co(e, "/", !0)), e = co[" " + e];
7396
7421
  const n = e.indexOf(":") === -1;
7397
- return t.substring(0, 2) === "//" ? n ? t : e.replace(hw, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(pw, "$1") + t : e + t;
7422
+ return t.substring(0, 2) === "//" ? n ? t : e.replace(pw, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(mw, "$1") + t : e + t;
7398
7423
  }
7399
7424
  const Lo = { exec: function() {
7400
7425
  } };
@@ -7429,7 +7454,7 @@ function Co(e, t, n) {
7429
7454
  }
7430
7455
  return e.slice(0, r - o);
7431
7456
  }
7432
- function gw(e, t) {
7457
+ function xw(e, t) {
7433
7458
  if (e.indexOf(t[1]) === -1)
7434
7459
  return -1;
7435
7460
  const n = e.length;
@@ -7443,7 +7468,7 @@ function gw(e, t) {
7443
7468
  return o;
7444
7469
  return -1;
7445
7470
  }
7446
- function xw(e) {
7471
+ function vw(e) {
7447
7472
  e && e.sanitize && !e.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options");
7448
7473
  }
7449
7474
  function zl(e, t) {
@@ -7476,7 +7501,7 @@ function Bl(e, t, n, r) {
7476
7501
  text: ht(i)
7477
7502
  };
7478
7503
  }
7479
- function vw(e, t) {
7504
+ function ww(e, t) {
7480
7505
  const n = e.match(/^(\s+)(?:```)/);
7481
7506
  if (n === null)
7482
7507
  return t;
@@ -7519,7 +7544,7 @@ class da {
7519
7544
  fences(t) {
7520
7545
  const n = this.rules.block.fences.exec(t);
7521
7546
  if (n) {
7522
- const r = n[0], o = vw(r, n[3] || "");
7547
+ const r = n[0], o = ww(r, n[3] || "");
7523
7548
  return {
7524
7549
  type: "code",
7525
7550
  raw: r,
@@ -7744,7 +7769,7 @@ class da {
7744
7769
  if ((r.length - i.length) % 2 === 0)
7745
7770
  return;
7746
7771
  } else {
7747
- const i = gw(n[2], "()");
7772
+ const i = xw(n[2], "()");
7748
7773
  if (i > -1) {
7749
7774
  const c = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + i;
7750
7775
  n[2] = n[2].substring(0, i), n[0] = n[0].substring(0, c).trim(), n[3] = "";
@@ -8032,7 +8057,7 @@ re.breaks = {
8032
8057
  br: Ge(re.br).replace("{2,}", "*").getRegex(),
8033
8058
  text: Ge(re.gfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
8034
8059
  };
8035
- function ww(e) {
8060
+ function bw(e) {
8036
8061
  return e.replace(/---/g, "—").replace(/--/g, "–").replace(/(^|[-\u2014/(\[{"\s])'/g, "$1‘").replace(/'/g, "’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1“").replace(/"/g, "”").replace(/\.{3}/g, "…");
8037
8062
  }
8038
8063
  function Hl(e) {
@@ -8246,7 +8271,7 @@ class gn {
8246
8271
  h = m.call({ lexer: this }, f), typeof h == "number" && h >= 0 && (d = Math.min(d, h));
8247
8272
  }), d < 1 / 0 && d >= 0 && (s = t.substring(0, d + 1));
8248
8273
  }
8249
- if (r = this.tokenizer.inlineText(s, ww)) {
8274
+ if (r = this.tokenizer.inlineText(s, bw)) {
8250
8275
  t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), c = !0, o = n[n.length - 1], o && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r);
8251
8276
  continue;
8252
8277
  }
@@ -8670,7 +8695,7 @@ Ba($o, "passThroughHooks", /* @__PURE__ */ new Set([
8670
8695
  "preprocess",
8671
8696
  "postprocess"
8672
8697
  ]));
8673
- function bw(e, t, n) {
8698
+ function yw(e, t, n) {
8674
8699
  return (r) => {
8675
8700
  if (r.message += `
8676
8701
  Please report this to https://github.com/markedjs/marked.`, e) {
@@ -8697,12 +8722,12 @@ function Xu(e, t) {
8697
8722
  typeof r == "function" && (o = r, r = null);
8698
8723
  const s = { ...r };
8699
8724
  r = { ...me.defaults, ...s };
8700
- const i = bw(r.silent, r.async, o);
8725
+ const i = yw(r.silent, r.async, o);
8701
8726
  if (typeof n > "u" || n === null)
8702
8727
  return i(new Error("marked(): input parameter is undefined or null"));
8703
8728
  if (typeof n != "string")
8704
8729
  return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
8705
- if (xw(r), r.hooks && (r.hooks.options = r), o) {
8730
+ if (vw(r), r.hooks && (r.hooks.options = r), o) {
8706
8731
  const a = r.highlight;
8707
8732
  let c;
8708
8733
  try {
@@ -8750,7 +8775,7 @@ function me(e, t, n) {
8750
8775
  return Xu(gn.lex, xn.parse)(e, t, n);
8751
8776
  }
8752
8777
  me.options = me.setOptions = function(e) {
8753
- return me.defaults = { ...me.defaults, ...e }, ow(me.defaults), me;
8778
+ return me.defaults = { ...me.defaults, ...e }, sw(me.defaults), me;
8754
8779
  };
8755
8780
  me.getDefaults = Wu;
8756
8781
  me.defaults = Hn;
@@ -8903,7 +8928,7 @@ async function Ju(e, t) {
8903
8928
  async function Wl(e, t) {
8904
8929
  return await (await Ju(`/chat/files/${e}/view`, t)).text();
8905
8930
  }
8906
- async function yw(e, t) {
8931
+ async function Sw(e, t) {
8907
8932
  const n = await Ju(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
8908
8933
  let o = `file_${e}`;
8909
8934
  try {
@@ -8914,13 +8939,13 @@ async function yw(e, t) {
8914
8939
  const s = document.createElement("a");
8915
8940
  s.href = r, s.download = o, document.body.appendChild(s), s.click(), s.remove(), setTimeout(() => URL.revokeObjectURL(r), 6e4);
8916
8941
  }
8917
- async function Sw(e, t = 50, n = 0) {
8942
+ async function Cw(e, t = 50, n = 0) {
8918
8943
  const r = { limit: t, offset: n };
8919
8944
  return e && (r.thread_id = e), await Mt("/chat/files", { params: r });
8920
8945
  }
8921
- const Cw = 1, Tw = 1e6;
8946
+ const Tw = 1, Rw = 1e6;
8922
8947
  let Js = 0;
8923
- function Rw() {
8948
+ function Ew() {
8924
8949
  return Js = (Js + 1) % Number.MAX_SAFE_INTEGER, Js.toString();
8925
8950
  }
8926
8951
  const Zs = /* @__PURE__ */ new Map(), Vl = (e) => {
@@ -8931,14 +8956,14 @@ const Zs = /* @__PURE__ */ new Map(), Vl = (e) => {
8931
8956
  type: "REMOVE_TOAST",
8932
8957
  toastId: e
8933
8958
  });
8934
- }, Tw);
8959
+ }, Rw);
8935
8960
  Zs.set(e, t);
8936
- }, Ew = (e, t) => {
8961
+ }, kw = (e, t) => {
8937
8962
  switch (t.type) {
8938
8963
  case "ADD_TOAST":
8939
8964
  return {
8940
8965
  ...e,
8941
- toasts: [t.toast, ...e.toasts].slice(0, Cw)
8966
+ toasts: [t.toast, ...e.toasts].slice(0, Tw)
8942
8967
  };
8943
8968
  case "UPDATE_TOAST":
8944
8969
  return {
@@ -8973,12 +8998,12 @@ const Zs = /* @__PURE__ */ new Map(), Vl = (e) => {
8973
8998
  }, To = [];
8974
8999
  let Ro = { toasts: [] };
8975
9000
  function _r(e) {
8976
- Ro = Ew(Ro, e), To.forEach((t) => {
9001
+ Ro = kw(Ro, e), To.forEach((t) => {
8977
9002
  t(Ro);
8978
9003
  });
8979
9004
  }
8980
- function kw({ ...e }) {
8981
- const t = Rw(), n = (o) => _r({
9005
+ function Iw({ ...e }) {
9006
+ const t = Ew(), n = (o) => _r({
8982
9007
  type: "UPDATE_TOAST",
8983
9008
  toast: { ...o, id: t }
8984
9009
  }), r = () => _r({ type: "DISMISS_TOAST", toastId: t });
@@ -9005,7 +9030,7 @@ function ha() {
9005
9030
  n > -1 && To.splice(n, 1);
9006
9031
  }), [e]), {
9007
9032
  ...e,
9008
- toast: kw,
9033
+ toast: Iw,
9009
9034
  dismiss: (n) => _r({ type: "DISMISS_TOAST", toastId: n })
9010
9035
  };
9011
9036
  }
@@ -9018,7 +9043,7 @@ function ft(e) {
9018
9043
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
9019
9044
  }, []);
9020
9045
  }
9021
- function Iw(e, t = globalThis == null ? void 0 : globalThis.document) {
9046
+ function Nw(e, t = globalThis == null ? void 0 : globalThis.document) {
9022
9047
  const n = ft(e);
9023
9048
  p.useEffect(() => {
9024
9049
  const r = (o) => {
@@ -9027,7 +9052,7 @@ function Iw(e, t = globalThis == null ? void 0 : globalThis.document) {
9027
9052
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
9028
9053
  }, [n, t]);
9029
9054
  }
9030
- var Nw = "DismissableLayer", ki = "dismissableLayer.update", Aw = "dismissableLayer.pointerDownOutside", _w = "dismissableLayer.focusOutside", Kl, Zu = p.createContext({
9055
+ var Aw = "DismissableLayer", ki = "dismissableLayer.update", _w = "dismissableLayer.pointerDownOutside", jw = "dismissableLayer.focusOutside", Kl, Zu = p.createContext({
9031
9056
  layers: /* @__PURE__ */ new Set(),
9032
9057
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
9033
9058
  branches: /* @__PURE__ */ new Set()
@@ -9041,14 +9066,14 @@ var Nw = "DismissableLayer", ki = "dismissableLayer.update", Aw = "dismissableLa
9041
9066
  onInteractOutside: i,
9042
9067
  onDismiss: a,
9043
9068
  ...c
9044
- } = e, u = p.useContext(Zu), [d, f] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = p.useState({}), w = Me(t, (E) => f(E)), v = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(g), b = d ? v.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, R = b >= x, S = Ow((E) => {
9069
+ } = e, u = p.useContext(Zu), [d, f] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = p.useState({}), w = Me(t, (E) => f(E)), v = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(g), b = d ? v.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, R = b >= x, S = Mw((E) => {
9045
9070
  const k = E.target, N = [...u.branches].some((A) => A.contains(k));
9046
9071
  !R || N || (o == null || o(E), i == null || i(E), E.defaultPrevented || a == null || a());
9047
- }, h), C = Mw((E) => {
9072
+ }, h), C = Dw((E) => {
9048
9073
  const k = E.target;
9049
9074
  [...u.branches].some((A) => A.contains(k)) || (s == null || s(E), i == null || i(E), E.defaultPrevented || a == null || a());
9050
9075
  }, h);
9051
- return Iw((E) => {
9076
+ return Nw((E) => {
9052
9077
  b === u.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
9053
9078
  }, h), p.useEffect(() => {
9054
9079
  if (d)
@@ -9079,8 +9104,8 @@ var Nw = "DismissableLayer", ki = "dismissableLayer.update", Aw = "dismissableLa
9079
9104
  );
9080
9105
  }
9081
9106
  );
9082
- us.displayName = Nw;
9083
- var jw = "DismissableLayerBranch", Pw = p.forwardRef((e, t) => {
9107
+ us.displayName = Aw;
9108
+ var Pw = "DismissableLayerBranch", Ow = p.forwardRef((e, t) => {
9084
9109
  const n = p.useContext(Zu), r = p.useRef(null), o = Me(t, r);
9085
9110
  return p.useEffect(() => {
9086
9111
  const s = r.current;
@@ -9090,8 +9115,8 @@ var jw = "DismissableLayerBranch", Pw = p.forwardRef((e, t) => {
9090
9115
  };
9091
9116
  }, [n.branches]), /* @__PURE__ */ l.jsx(Ce.div, { ...e, ref: o });
9092
9117
  });
9093
- Pw.displayName = jw;
9094
- function Ow(e, t = globalThis == null ? void 0 : globalThis.document) {
9118
+ Ow.displayName = Pw;
9119
+ function Mw(e, t = globalThis == null ? void 0 : globalThis.document) {
9095
9120
  const n = ft(e), r = p.useRef(!1), o = p.useRef(() => {
9096
9121
  });
9097
9122
  return p.useEffect(() => {
@@ -9099,7 +9124,7 @@ function Ow(e, t = globalThis == null ? void 0 : globalThis.document) {
9099
9124
  if (a.target && !r.current) {
9100
9125
  let c = function() {
9101
9126
  Qu(
9102
- Aw,
9127
+ _w,
9103
9128
  n,
9104
9129
  u,
9105
9130
  { discrete: !0 }
@@ -9121,11 +9146,11 @@ function Ow(e, t = globalThis == null ? void 0 : globalThis.document) {
9121
9146
  onPointerDownCapture: () => r.current = !0
9122
9147
  };
9123
9148
  }
9124
- function Mw(e, t = globalThis == null ? void 0 : globalThis.document) {
9149
+ function Dw(e, t = globalThis == null ? void 0 : globalThis.document) {
9125
9150
  const n = ft(e), r = p.useRef(!1);
9126
9151
  return p.useEffect(() => {
9127
9152
  const o = (s) => {
9128
- s.target && !r.current && Qu(_w, n, { originalEvent: s }, {
9153
+ s.target && !r.current && Qu(jw, n, { originalEvent: s }, {
9129
9154
  discrete: !1
9130
9155
  });
9131
9156
  };
@@ -9143,7 +9168,7 @@ function Qu(e, t, n, { discrete: r }) {
9143
9168
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
9144
9169
  t && o.addEventListener(e, t, { once: !0 }), r ? $u(o, s) : o.dispatchEvent(s);
9145
9170
  }
9146
- var Qs = "focusScope.autoFocusOnMount", ei = "focusScope.autoFocusOnUnmount", Gl = { bubbles: !1, cancelable: !0 }, Dw = "FocusScope", ds = p.forwardRef((e, t) => {
9171
+ var Qs = "focusScope.autoFocusOnMount", ei = "focusScope.autoFocusOnUnmount", Gl = { bubbles: !1, cancelable: !0 }, Lw = "FocusScope", ds = p.forwardRef((e, t) => {
9147
9172
  const {
9148
9173
  loop: n = !1,
9149
9174
  trapped: r = !1,
@@ -9186,7 +9211,7 @@ var Qs = "focusScope.autoFocusOnMount", ei = "focusScope.autoFocusOnUnmount", Gl
9186
9211
  const v = document.activeElement;
9187
9212
  if (!a.contains(v)) {
9188
9213
  const x = new CustomEvent(Qs, Gl);
9189
- a.addEventListener(Qs, u), a.dispatchEvent(x), x.defaultPrevented || (Lw(Hw(ed(a)), { select: !0 }), document.activeElement === v && hn(a));
9214
+ a.addEventListener(Qs, u), a.dispatchEvent(x), x.defaultPrevented || ($w(Uw(ed(a)), { select: !0 }), document.activeElement === v && hn(a));
9190
9215
  }
9191
9216
  return () => {
9192
9217
  a.removeEventListener(Qs, u), setTimeout(() => {
@@ -9201,7 +9226,7 @@ var Qs = "focusScope.autoFocusOnMount", ei = "focusScope.autoFocusOnUnmount", Gl
9201
9226
  if (!n && !r || m.paused) return;
9202
9227
  const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, x = document.activeElement;
9203
9228
  if (g && x) {
9204
- const b = v.currentTarget, [y, R] = $w(b);
9229
+ const b = v.currentTarget, [y, R] = Fw(b);
9205
9230
  y && R ? !v.shiftKey && x === R ? (v.preventDefault(), n && hn(y, { select: !0 })) : v.shiftKey && x === y && (v.preventDefault(), n && hn(R, { select: !0 })) : x === b && v.preventDefault();
9206
9231
  }
9207
9232
  },
@@ -9209,13 +9234,13 @@ var Qs = "focusScope.autoFocusOnMount", ei = "focusScope.autoFocusOnUnmount", Gl
9209
9234
  );
9210
9235
  return /* @__PURE__ */ l.jsx(Ce.div, { tabIndex: -1, ...i, ref: h, onKeyDown: w });
9211
9236
  });
9212
- ds.displayName = Dw;
9213
- function Lw(e, { select: t = !1 } = {}) {
9237
+ ds.displayName = Lw;
9238
+ function $w(e, { select: t = !1 } = {}) {
9214
9239
  const n = document.activeElement;
9215
9240
  for (const r of e)
9216
9241
  if (hn(r, { select: t }), document.activeElement !== n) return;
9217
9242
  }
9218
- function $w(e) {
9243
+ function Fw(e) {
9219
9244
  const t = ed(e), n = Yl(t, e), r = Yl(t.reverse(), e);
9220
9245
  return [n, r];
9221
9246
  }
@@ -9231,9 +9256,9 @@ function ed(e) {
9231
9256
  }
9232
9257
  function Yl(e, t) {
9233
9258
  for (const n of e)
9234
- if (!Fw(n, { upTo: t })) return n;
9259
+ if (!zw(n, { upTo: t })) return n;
9235
9260
  }
9236
- function Fw(e, { upTo: t }) {
9261
+ function zw(e, { upTo: t }) {
9237
9262
  if (getComputedStyle(e).visibility === "hidden") return !0;
9238
9263
  for (; e; ) {
9239
9264
  if (t !== void 0 && e === t) return !1;
@@ -9242,17 +9267,17 @@ function Fw(e, { upTo: t }) {
9242
9267
  }
9243
9268
  return !1;
9244
9269
  }
9245
- function zw(e) {
9270
+ function Bw(e) {
9246
9271
  return e instanceof HTMLInputElement && "select" in e;
9247
9272
  }
9248
9273
  function hn(e, { select: t = !1 } = {}) {
9249
9274
  if (e && e.focus) {
9250
9275
  const n = document.activeElement;
9251
- e.focus({ preventScroll: !0 }), e !== n && zw(e) && t && e.select();
9276
+ e.focus({ preventScroll: !0 }), e !== n && Bw(e) && t && e.select();
9252
9277
  }
9253
9278
  }
9254
- var Xl = Bw();
9255
- function Bw() {
9279
+ var Xl = Hw();
9280
+ function Hw() {
9256
9281
  let e = [];
9257
9282
  return {
9258
9283
  add(t) {
@@ -9269,17 +9294,17 @@ function Jl(e, t) {
9269
9294
  const n = [...e], r = n.indexOf(t);
9270
9295
  return r !== -1 && n.splice(r, 1), n;
9271
9296
  }
9272
- function Hw(e) {
9297
+ function Uw(e) {
9273
9298
  return e.filter((t) => t.tagName !== "A");
9274
9299
  }
9275
- var Uw = "Portal", fs = p.forwardRef((e, t) => {
9300
+ var Ww = "Portal", fs = p.forwardRef((e, t) => {
9276
9301
  var a;
9277
9302
  const { container: n, ...r } = e, [o, s] = p.useState(!1);
9278
9303
  dt(() => s(!0), []);
9279
9304
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
9280
9305
  return i ? Ec.createPortal(/* @__PURE__ */ l.jsx(Ce.div, { ...r, ref: t }), i) : null;
9281
9306
  });
9282
- fs.displayName = Uw;
9307
+ fs.displayName = Ww;
9283
9308
  var ti = 0;
9284
9309
  function pa() {
9285
9310
  p.useEffect(() => {
@@ -9310,16 +9335,16 @@ function td(e, t) {
9310
9335
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
9311
9336
  return n;
9312
9337
  }
9313
- function Ww(e, t, n) {
9338
+ function Vw(e, t, n) {
9314
9339
  if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++)
9315
9340
  (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
9316
9341
  return e.concat(s || Array.prototype.slice.call(t));
9317
9342
  }
9318
- var Eo = "right-scroll-bar-position", ko = "width-before-scroll-bar", Vw = "with-scroll-bars-hidden", Kw = "--removed-body-scroll-bar-size";
9343
+ var Eo = "right-scroll-bar-position", ko = "width-before-scroll-bar", Kw = "with-scroll-bars-hidden", qw = "--removed-body-scroll-bar-size";
9319
9344
  function ni(e, t) {
9320
9345
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
9321
9346
  }
9322
- function qw(e, t) {
9347
+ function Gw(e, t) {
9323
9348
  var n = fe(function() {
9324
9349
  return {
9325
9350
  // value
@@ -9340,14 +9365,14 @@ function qw(e, t) {
9340
9365
  })[0];
9341
9366
  return n.callback = t, n.facade;
9342
9367
  }
9343
- var Gw = typeof window < "u" ? p.useLayoutEffect : p.useEffect, Ql = /* @__PURE__ */ new WeakMap();
9344
- function Yw(e, t) {
9345
- var n = qw(null, function(r) {
9368
+ var Yw = typeof window < "u" ? p.useLayoutEffect : p.useEffect, Ql = /* @__PURE__ */ new WeakMap();
9369
+ function Xw(e, t) {
9370
+ var n = Gw(null, function(r) {
9346
9371
  return e.forEach(function(o) {
9347
9372
  return ni(o, r);
9348
9373
  });
9349
9374
  });
9350
- return Gw(function() {
9375
+ return Yw(function() {
9351
9376
  var r = Ql.get(n);
9352
9377
  if (r) {
9353
9378
  var o = new Set(r), s = new Set(e), i = n.current;
@@ -9360,11 +9385,11 @@ function Yw(e, t) {
9360
9385
  Ql.set(n, e);
9361
9386
  }, [e]), n;
9362
9387
  }
9363
- function Xw(e) {
9388
+ function Jw(e) {
9364
9389
  return e;
9365
9390
  }
9366
- function Jw(e, t) {
9367
- t === void 0 && (t = Xw);
9391
+ function Zw(e, t) {
9392
+ t === void 0 && (t = Jw);
9368
9393
  var n = [], r = !1, o = {
9369
9394
  read: function() {
9370
9395
  if (r)
@@ -9418,9 +9443,9 @@ function Jw(e, t) {
9418
9443
  };
9419
9444
  return o;
9420
9445
  }
9421
- function Zw(e) {
9446
+ function Qw(e) {
9422
9447
  e === void 0 && (e = {});
9423
- var t = Jw(null);
9448
+ var t = Zw(null);
9424
9449
  return t.options = Jt({ async: !0, ssr: !1 }, e), t;
9425
9450
  }
9426
9451
  var nd = function(e) {
@@ -9433,16 +9458,16 @@ var nd = function(e) {
9433
9458
  return p.createElement(r, Jt({}, n));
9434
9459
  };
9435
9460
  nd.isSideCarExport = !0;
9436
- function Qw(e, t) {
9461
+ function eb(e, t) {
9437
9462
  return e.useMedium(t), nd;
9438
9463
  }
9439
- var rd = Zw(), ri = function() {
9464
+ var rd = Qw(), ri = function() {
9440
9465
  }, hs = p.forwardRef(function(e, t) {
9441
9466
  var n = p.useRef(null), r = p.useState({
9442
9467
  onScrollCapture: ri,
9443
9468
  onWheelCapture: ri,
9444
9469
  onTouchMoveCapture: ri
9445
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, m = e.noRelative, w = e.noIsolation, v = e.inert, g = e.allowPinchZoom, x = e.as, b = x === void 0 ? "div" : x, y = e.gapMode, R = td(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = Yw([n, t]), E = Jt(Jt({}, R), o);
9470
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, m = e.noRelative, w = e.noIsolation, v = e.inert, g = e.allowPinchZoom, x = e.as, b = x === void 0 ? "div" : x, y = e.gapMode, R = td(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = Xw([n, t]), E = Jt(Jt({}, R), o);
9446
9471
  return p.createElement(
9447
9472
  p.Fragment,
9448
9473
  null,
@@ -9459,37 +9484,37 @@ hs.classNames = {
9459
9484
  fullWidth: ko,
9460
9485
  zeroRight: Eo
9461
9486
  };
9462
- var eb = function() {
9487
+ var tb = function() {
9463
9488
  if (typeof __webpack_nonce__ < "u")
9464
9489
  return __webpack_nonce__;
9465
9490
  };
9466
- function tb() {
9491
+ function nb() {
9467
9492
  if (!document)
9468
9493
  return null;
9469
9494
  var e = document.createElement("style");
9470
9495
  e.type = "text/css";
9471
- var t = eb();
9496
+ var t = tb();
9472
9497
  return t && e.setAttribute("nonce", t), e;
9473
9498
  }
9474
- function nb(e, t) {
9499
+ function rb(e, t) {
9475
9500
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
9476
9501
  }
9477
- function rb(e) {
9502
+ function ob(e) {
9478
9503
  var t = document.head || document.getElementsByTagName("head")[0];
9479
9504
  t.appendChild(e);
9480
9505
  }
9481
- var ob = function() {
9506
+ var sb = function() {
9482
9507
  var e = 0, t = null;
9483
9508
  return {
9484
9509
  add: function(n) {
9485
- e == 0 && (t = tb()) && (nb(t, n), rb(t)), e++;
9510
+ e == 0 && (t = nb()) && (rb(t, n), ob(t)), e++;
9486
9511
  },
9487
9512
  remove: function() {
9488
9513
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
9489
9514
  }
9490
9515
  };
9491
- }, sb = function() {
9492
- var e = ob();
9516
+ }, ib = function() {
9517
+ var e = sb();
9493
9518
  return function(t, n) {
9494
9519
  p.useEffect(function() {
9495
9520
  return e.add(t), function() {
@@ -9498,35 +9523,35 @@ var ob = function() {
9498
9523
  }, [t && n]);
9499
9524
  };
9500
9525
  }, od = function() {
9501
- var e = sb(), t = function(n) {
9526
+ var e = ib(), t = function(n) {
9502
9527
  var r = n.styles, o = n.dynamic;
9503
9528
  return e(r, o), null;
9504
9529
  };
9505
9530
  return t;
9506
- }, ib = {
9531
+ }, ab = {
9507
9532
  left: 0,
9508
9533
  top: 0,
9509
9534
  right: 0,
9510
9535
  gap: 0
9511
9536
  }, oi = function(e) {
9512
9537
  return parseInt(e || "", 10) || 0;
9513
- }, ab = function(e) {
9538
+ }, lb = function(e) {
9514
9539
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
9515
9540
  return [oi(n), oi(r), oi(o)];
9516
- }, lb = function(e) {
9541
+ }, cb = function(e) {
9517
9542
  if (e === void 0 && (e = "margin"), typeof window > "u")
9518
- return ib;
9519
- var t = ab(e), n = document.documentElement.clientWidth, r = window.innerWidth;
9543
+ return ab;
9544
+ var t = lb(e), n = document.documentElement.clientWidth, r = window.innerWidth;
9520
9545
  return {
9521
9546
  left: t[0],
9522
9547
  top: t[1],
9523
9548
  right: t[2],
9524
9549
  gap: Math.max(0, r - n + t[2] - t[0])
9525
9550
  };
9526
- }, cb = od(), Qn = "data-scroll-locked", ub = function(e, t, n, r) {
9551
+ }, ub = od(), Qn = "data-scroll-locked", db = function(e, t, n, r) {
9527
9552
  var o = e.left, s = e.top, i = e.right, a = e.gap;
9528
9553
  return n === void 0 && (n = "margin"), `
9529
- .`.concat(Vw, ` {
9554
+ .`.concat(Kw, ` {
9530
9555
  overflow: hidden `).concat(r, `;
9531
9556
  padding-right: `).concat(a, "px ").concat(r, `;
9532
9557
  }
@@ -9564,26 +9589,26 @@ var ob = function() {
9564
9589
  }
9565
9590
 
9566
9591
  body[`).concat(Qn, `] {
9567
- `).concat(Kw, ": ").concat(a, `px;
9592
+ `).concat(qw, ": ").concat(a, `px;
9568
9593
  }
9569
9594
  `);
9570
9595
  }, ec = function() {
9571
9596
  var e = parseInt(document.body.getAttribute(Qn) || "0", 10);
9572
9597
  return isFinite(e) ? e : 0;
9573
- }, db = function() {
9598
+ }, fb = function() {
9574
9599
  p.useEffect(function() {
9575
9600
  return document.body.setAttribute(Qn, (ec() + 1).toString()), function() {
9576
9601
  var e = ec() - 1;
9577
9602
  e <= 0 ? document.body.removeAttribute(Qn) : document.body.setAttribute(Qn, e.toString());
9578
9603
  };
9579
9604
  }, []);
9580
- }, fb = function(e) {
9605
+ }, hb = function(e) {
9581
9606
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
9582
- db();
9607
+ fb();
9583
9608
  var s = p.useMemo(function() {
9584
- return lb(o);
9609
+ return cb(o);
9585
9610
  }, [o]);
9586
- return p.createElement(cb, { styles: ub(s, !t, o, n ? "" : "!important") });
9611
+ return p.createElement(ub, { styles: db(s, !t, o, n ? "" : "!important") });
9587
9612
  }, Ii = !1;
9588
9613
  if (typeof window < "u")
9589
9614
  try {
@@ -9596,7 +9621,7 @@ if (typeof window < "u")
9596
9621
  } catch {
9597
9622
  Ii = !1;
9598
9623
  }
9599
- var qn = Ii ? { passive: !1 } : !1, hb = function(e) {
9624
+ var qn = Ii ? { passive: !1 } : !1, pb = function(e) {
9600
9625
  return e.tagName === "TEXTAREA";
9601
9626
  }, sd = function(e, t) {
9602
9627
  if (!(e instanceof Element))
@@ -9605,11 +9630,11 @@ var qn = Ii ? { passive: !1 } : !1, hb = function(e) {
9605
9630
  return (
9606
9631
  // not-not-scrollable
9607
9632
  n[t] !== "hidden" && // contains scroll inside self
9608
- !(n.overflowY === n.overflowX && !hb(e) && n[t] === "visible")
9633
+ !(n.overflowY === n.overflowX && !pb(e) && n[t] === "visible")
9609
9634
  );
9610
- }, pb = function(e) {
9611
- return sd(e, "overflowY");
9612
9635
  }, mb = function(e) {
9636
+ return sd(e, "overflowY");
9637
+ }, gb = function(e) {
9613
9638
  return sd(e, "overflowX");
9614
9639
  }, tc = function(e, t) {
9615
9640
  var n = t.ownerDocument, r = t;
@@ -9624,14 +9649,14 @@ var qn = Ii ? { passive: !1 } : !1, hb = function(e) {
9624
9649
  r = r.parentNode;
9625
9650
  } while (r && r !== n.body);
9626
9651
  return !1;
9627
- }, gb = function(e) {
9652
+ }, xb = function(e) {
9628
9653
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
9629
9654
  return [
9630
9655
  t,
9631
9656
  n,
9632
9657
  r
9633
9658
  ];
9634
- }, xb = function(e) {
9659
+ }, vb = function(e) {
9635
9660
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
9636
9661
  return [
9637
9662
  t,
@@ -9639,13 +9664,13 @@ var qn = Ii ? { passive: !1 } : !1, hb = function(e) {
9639
9664
  r
9640
9665
  ];
9641
9666
  }, id = function(e, t) {
9642
- return e === "v" ? pb(t) : mb(t);
9667
+ return e === "v" ? mb(t) : gb(t);
9643
9668
  }, ad = function(e, t) {
9644
- return e === "v" ? gb(t) : xb(t);
9645
- }, vb = function(e, t) {
9669
+ return e === "v" ? xb(t) : vb(t);
9670
+ }, wb = function(e, t) {
9646
9671
  return e === "h" && t === "rtl" ? -1 : 1;
9647
- }, wb = function(e, t, n, r, o) {
9648
- var s = vb(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, c = t.contains(a), u = !1, d = i > 0, f = 0, h = 0;
9672
+ }, bb = function(e, t, n, r, o) {
9673
+ var s = wb(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, c = t.contains(a), u = !1, d = i > 0, f = 0, h = 0;
9649
9674
  do {
9650
9675
  if (!a)
9651
9676
  break;
@@ -9665,22 +9690,22 @@ var qn = Ii ? { passive: !1 } : !1, hb = function(e) {
9665
9690
  return [e.deltaX, e.deltaY];
9666
9691
  }, rc = function(e) {
9667
9692
  return e && "current" in e ? e.current : e;
9668
- }, bb = function(e, t) {
9693
+ }, yb = function(e, t) {
9669
9694
  return e[0] === t[0] && e[1] === t[1];
9670
- }, yb = function(e) {
9695
+ }, Sb = function(e) {
9671
9696
  return `
9672
9697
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
9673
9698
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
9674
9699
  `);
9675
- }, Sb = 0, Gn = [];
9676
- function Cb(e) {
9677
- var t = p.useRef([]), n = p.useRef([0, 0]), r = p.useRef(), o = p.useState(Sb++)[0], s = p.useState(od)[0], i = p.useRef(e);
9700
+ }, Cb = 0, Gn = [];
9701
+ function Tb(e) {
9702
+ var t = p.useRef([]), n = p.useRef([0, 0]), r = p.useRef(), o = p.useState(Cb++)[0], s = p.useState(od)[0], i = p.useRef(e);
9678
9703
  p.useEffect(function() {
9679
9704
  i.current = e;
9680
9705
  }, [e]), p.useEffect(function() {
9681
9706
  if (e.inert) {
9682
9707
  document.body.classList.add("block-interactivity-".concat(o));
9683
- var v = Ww([e.lockRef.current], (e.shards || []).map(rc), !0).filter(Boolean);
9708
+ var v = Vw([e.lockRef.current], (e.shards || []).map(rc), !0).filter(Boolean);
9684
9709
  return v.forEach(function(g) {
9685
9710
  return g.classList.add("allow-interactivity-".concat(o));
9686
9711
  }), function() {
@@ -9704,12 +9729,12 @@ function Cb(e) {
9704
9729
  if (!r.current && "changedTouches" in v && (y || R) && (r.current = S), !S)
9705
9730
  return !0;
9706
9731
  var N = r.current || S;
9707
- return wb(N, g, v, N === "h" ? y : R);
9732
+ return bb(N, g, v, N === "h" ? y : R);
9708
9733
  }, []), c = p.useCallback(function(v) {
9709
9734
  var g = v;
9710
9735
  if (!(!Gn.length || Gn[Gn.length - 1] !== s)) {
9711
9736
  var x = "deltaY" in g ? nc(g) : fo(g), b = t.current.filter(function(S) {
9712
- return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && bb(S.delta, x);
9737
+ return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && yb(S.delta, x);
9713
9738
  })[0];
9714
9739
  if (b && b.should) {
9715
9740
  g.cancelable && g.preventDefault();
@@ -9723,7 +9748,7 @@ function Cb(e) {
9723
9748
  }
9724
9749
  }
9725
9750
  }, []), u = p.useCallback(function(v, g, x, b) {
9726
- var y = { name: v, delta: g, target: x, should: b, shadowParent: Tb(x) };
9751
+ var y = { name: v, delta: g, target: x, should: b, shadowParent: Rb(x) };
9727
9752
  t.current.push(y), setTimeout(function() {
9728
9753
  t.current = t.current.filter(function(R) {
9729
9754
  return R !== y;
@@ -9751,28 +9776,28 @@ function Cb(e) {
9751
9776
  return p.createElement(
9752
9777
  p.Fragment,
9753
9778
  null,
9754
- w ? p.createElement(s, { styles: yb(o) }) : null,
9755
- m ? p.createElement(fb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
9779
+ w ? p.createElement(s, { styles: Sb(o) }) : null,
9780
+ m ? p.createElement(hb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
9756
9781
  );
9757
9782
  }
9758
- function Tb(e) {
9783
+ function Rb(e) {
9759
9784
  for (var t = null; e !== null; )
9760
9785
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
9761
9786
  return t;
9762
9787
  }
9763
- const Rb = Qw(rd, Cb);
9788
+ const Eb = eb(rd, Tb);
9764
9789
  var ps = p.forwardRef(function(e, t) {
9765
- return p.createElement(hs, Jt({}, e, { ref: t, sideCar: Rb }));
9790
+ return p.createElement(hs, Jt({}, e, { ref: t, sideCar: Eb }));
9766
9791
  });
9767
9792
  ps.classNames = hs.classNames;
9768
- var Eb = function(e) {
9793
+ var kb = function(e) {
9769
9794
  if (typeof document > "u")
9770
9795
  return null;
9771
9796
  var t = Array.isArray(e) ? e[0] : e;
9772
9797
  return t.ownerDocument.body;
9773
9798
  }, Yn = /* @__PURE__ */ new WeakMap(), ho = /* @__PURE__ */ new WeakMap(), po = {}, si = 0, ld = function(e) {
9774
9799
  return e && (e.host || ld(e.parentNode));
9775
- }, kb = function(e, t) {
9800
+ }, Ib = function(e, t) {
9776
9801
  return t.map(function(n) {
9777
9802
  if (e.contains(n))
9778
9803
  return n;
@@ -9781,8 +9806,8 @@ var Eb = function(e) {
9781
9806
  }).filter(function(n) {
9782
9807
  return !!n;
9783
9808
  });
9784
- }, Ib = function(e, t, n, r) {
9785
- var o = kb(t, Array.isArray(e) ? e : [e]);
9809
+ }, Nb = function(e, t, n, r) {
9810
+ var o = Ib(t, Array.isArray(e) ? e : [e]);
9786
9811
  po[n] || (po[n] = /* @__PURE__ */ new WeakMap());
9787
9812
  var s = po[n], i = [], a = /* @__PURE__ */ new Set(), c = new Set(o), u = function(f) {
9788
9813
  !f || a.has(f) || (a.add(f), u(f.parentNode));
@@ -9809,11 +9834,11 @@ var Eb = function(e) {
9809
9834
  };
9810
9835
  }, ma = function(e, t, n) {
9811
9836
  n === void 0 && (n = "data-aria-hidden");
9812
- var r = Array.from(Array.isArray(e) ? e : [e]), o = Eb(e);
9813
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Ib(r, o, n, "aria-hidden")) : function() {
9837
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = kb(e);
9838
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Nb(r, o, n, "aria-hidden")) : function() {
9814
9839
  return null;
9815
9840
  };
9816
- }, ms = "Dialog", [cd, LT] = on(ms), [Nb, qt] = cd(ms), ud = (e) => {
9841
+ }, ms = "Dialog", [cd, $T] = on(ms), [Ab, qt] = cd(ms), ud = (e) => {
9817
9842
  const {
9818
9843
  __scopeDialog: t,
9819
9844
  children: n,
@@ -9828,7 +9853,7 @@ var Eb = function(e) {
9828
9853
  caller: ms
9829
9854
  });
9830
9855
  return /* @__PURE__ */ l.jsx(
9831
- Nb,
9856
+ Ab,
9832
9857
  {
9833
9858
  scope: t,
9834
9859
  triggerRef: a,
@@ -9864,27 +9889,27 @@ var dd = "DialogTrigger", fd = p.forwardRef(
9864
9889
  }
9865
9890
  );
9866
9891
  fd.displayName = dd;
9867
- var ga = "DialogPortal", [Ab, hd] = cd(ga, {
9892
+ var ga = "DialogPortal", [_b, hd] = cd(ga, {
9868
9893
  forceMount: void 0
9869
9894
  }), pd = (e) => {
9870
9895
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = qt(ga, t);
9871
- return /* @__PURE__ */ l.jsx(Ab, { scope: t, forceMount: n, children: p.Children.map(r, (i) => /* @__PURE__ */ l.jsx(_t, { present: n || s.open, children: /* @__PURE__ */ l.jsx(fs, { asChild: !0, container: o, children: i }) })) });
9896
+ return /* @__PURE__ */ l.jsx(_b, { scope: t, forceMount: n, children: p.Children.map(r, (i) => /* @__PURE__ */ l.jsx(_t, { present: n || s.open, children: /* @__PURE__ */ l.jsx(fs, { asChild: !0, container: o, children: i }) })) });
9872
9897
  };
9873
9898
  pd.displayName = ga;
9874
9899
  var Fo = "DialogOverlay", md = p.forwardRef(
9875
9900
  (e, t) => {
9876
9901
  const n = hd(Fo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = qt(Fo, e.__scopeDialog);
9877
- return s.modal ? /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: /* @__PURE__ */ l.jsx(jb, { ...o, ref: t }) }) : null;
9902
+ return s.modal ? /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Pb, { ...o, ref: t }) }) : null;
9878
9903
  }
9879
9904
  );
9880
9905
  md.displayName = Fo;
9881
- var _b = nr("DialogOverlay.RemoveScroll"), jb = p.forwardRef(
9906
+ var jb = nr("DialogOverlay.RemoveScroll"), Pb = p.forwardRef(
9882
9907
  (e, t) => {
9883
9908
  const { __scopeDialog: n, ...r } = e, o = qt(Fo, n);
9884
9909
  return (
9885
9910
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
9886
9911
  // ie. when `Overlay` and `Content` are siblings
9887
- /* @__PURE__ */ l.jsx(ps, { as: _b, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ l.jsx(
9912
+ /* @__PURE__ */ l.jsx(ps, { as: jb, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ l.jsx(
9888
9913
  Ce.div,
9889
9914
  {
9890
9915
  "data-state": va(o.open),
@@ -9898,11 +9923,11 @@ var _b = nr("DialogOverlay.RemoveScroll"), jb = p.forwardRef(
9898
9923
  ), Dn = "DialogContent", gd = p.forwardRef(
9899
9924
  (e, t) => {
9900
9925
  const n = hd(Dn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = qt(Dn, e.__scopeDialog);
9901
- return /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(Pb, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(Ob, { ...o, ref: t }) });
9926
+ return /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(Ob, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(Mb, { ...o, ref: t }) });
9902
9927
  }
9903
9928
  );
9904
9929
  gd.displayName = Dn;
9905
- var Pb = p.forwardRef(
9930
+ var Ob = p.forwardRef(
9906
9931
  (e, t) => {
9907
9932
  const n = qt(Dn, e.__scopeDialog), r = p.useRef(null), o = Me(t, n.contentRef, r);
9908
9933
  return p.useEffect(() => {
@@ -9930,7 +9955,7 @@ var Pb = p.forwardRef(
9930
9955
  }
9931
9956
  );
9932
9957
  }
9933
- ), Ob = p.forwardRef(
9958
+ ), Mb = p.forwardRef(
9934
9959
  (e, t) => {
9935
9960
  const n = qt(Dn, e.__scopeDialog), r = p.useRef(!1), o = p.useRef(!1);
9936
9961
  return /* @__PURE__ */ l.jsx(
@@ -9981,8 +10006,8 @@ var Pb = p.forwardRef(
9981
10006
  }
9982
10007
  ),
9983
10008
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
9984
- /* @__PURE__ */ l.jsx(Mb, { titleId: a.titleId }),
9985
- /* @__PURE__ */ l.jsx(Lb, { contentRef: c, descriptionId: a.descriptionId })
10009
+ /* @__PURE__ */ l.jsx(Db, { titleId: a.titleId }),
10010
+ /* @__PURE__ */ l.jsx($b, { contentRef: c, descriptionId: a.descriptionId })
9986
10011
  ] })
9987
10012
  ] });
9988
10013
  }
@@ -10018,11 +10043,11 @@ Sd.displayName = yd;
10018
10043
  function va(e) {
10019
10044
  return e ? "open" : "closed";
10020
10045
  }
10021
- var Cd = "DialogTitleWarning", [$T, Td] = Hv(Cd, {
10046
+ var Cd = "DialogTitleWarning", [FT, Td] = Uv(Cd, {
10022
10047
  contentName: Dn,
10023
10048
  titleName: xa,
10024
10049
  docsSlug: "dialog"
10025
- }), Mb = ({ titleId: e }) => {
10050
+ }), Db = ({ titleId: e }) => {
10026
10051
  const t = Td(Cd), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
10027
10052
 
10028
10053
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -10031,15 +10056,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
10031
10056
  return p.useEffect(() => {
10032
10057
  e && (document.getElementById(e) || console.error(n));
10033
10058
  }, [n, e]), null;
10034
- }, Db = "DialogDescriptionWarning", Lb = ({ contentRef: e, descriptionId: t }) => {
10035
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Td(Db).contentName}}.`;
10059
+ }, Lb = "DialogDescriptionWarning", $b = ({ contentRef: e, descriptionId: t }) => {
10060
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Td(Lb).contentName}}.`;
10036
10061
  return p.useEffect(() => {
10037
10062
  var s;
10038
10063
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
10039
10064
  t && o && (document.getElementById(t) || console.warn(r));
10040
10065
  }, [r, e, t]), null;
10041
- }, Rd = ud, $b = fd, Ed = pd, gs = md, xs = gd, _n = vd, vs = bd, kd = Sd;
10042
- const Fb = Rd, zb = Ed, Id = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10066
+ }, Rd = ud, Fb = fd, Ed = pd, gs = md, xs = gd, _n = vd, vs = bd, kd = Sd;
10067
+ const zb = Rd, Bb = Ed, Id = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10043
10068
  gs,
10044
10069
  {
10045
10070
  ref: n,
@@ -10067,7 +10092,7 @@ const Nd = p.forwardRef(({ className: e, children: t, ...n }, r) => {
10067
10092
  }
10068
10093
  return i(t), s;
10069
10094
  }, [t]);
10070
- return /* @__PURE__ */ l.jsxs(zb, { children: [
10095
+ return /* @__PURE__ */ l.jsxs(Bb, { children: [
10071
10096
  /* @__PURE__ */ l.jsx(Id, {}),
10072
10097
  /* @__PURE__ */ l.jsxs(
10073
10098
  xs,
@@ -10117,7 +10142,7 @@ const _d = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10117
10142
  }
10118
10143
  ));
10119
10144
  _d.displayName = _n.displayName;
10120
- const Bb = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10145
+ const Hb = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10121
10146
  vs,
10122
10147
  {
10123
10148
  ref: n,
@@ -10125,8 +10150,8 @@ const Bb = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
10125
10150
  ...t
10126
10151
  }
10127
10152
  ));
10128
- Bb.displayName = vs.displayName;
10129
- function Hb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10153
+ Hb.displayName = vs.displayName;
10154
+ function Ub({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10130
10155
  const [s, i] = fe(!1), [a, c] = fe(null), [u, d] = fe(null), { toast: f } = ha(), h = B.useCallback(async () => {
10131
10156
  if (n) {
10132
10157
  i(!0), d(null), c(null);
@@ -10146,7 +10171,7 @@ function Hb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10146
10171
  const m = async () => {
10147
10172
  if (n)
10148
10173
  try {
10149
- await yw(n), f({ title: "Download started", description: `Downloading ${r}` });
10174
+ await Sw(n), f({ title: "Download started", description: `Downloading ${r}` });
10150
10175
  } catch (x) {
10151
10176
  console.error("Failed to download file:", x), f({ title: "Download failed", description: String(x), variant: "destructive" });
10152
10177
  }
@@ -10190,7 +10215,7 @@ function Hb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10190
10215
  ] }),
10191
10216
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
10192
10217
  ] }) : /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ l.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), g = () => o.startsWith("image/") ? /* @__PURE__ */ l.jsx(Dp, { className: "h-5 w-5" }) : /* @__PURE__ */ l.jsx(Ha, { className: "h-5 w-5" });
10193
- return /* @__PURE__ */ l.jsx(Fb, { open: e, onOpenChange: t, children: /* @__PURE__ */ l.jsxs(Nd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
10218
+ return /* @__PURE__ */ l.jsx(zb, { open: e, onOpenChange: t, children: /* @__PURE__ */ l.jsxs(Nd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
10194
10219
  /* @__PURE__ */ l.jsx(Ad, { children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
10195
10220
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
10196
10221
  g(),
@@ -10321,17 +10346,17 @@ function Pd(e) {
10321
10346
  return Object.values(n).some((i) => i.length > 0) ? n : null;
10322
10347
  }
10323
10348
  const Io = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words", En = 1e5;
10324
- function Ub(e) {
10349
+ function Wb(e) {
10325
10350
  return e.filter((t) => t.type === "text").map((t) => t.text).join("");
10326
10351
  }
10327
- function Wb(e) {
10352
+ function Vb(e) {
10328
10353
  const t = e.find((r) => r.type === "tool_call"), n = e.find((r) => r.type === "tool_end");
10329
10354
  return {
10330
10355
  name: t == null ? void 0 : t.name,
10331
10356
  toolCallId: (n == null ? void 0 : n.toolCallId) ?? (t == null ? void 0 : t.id)
10332
10357
  };
10333
10358
  }
10334
- function Vb(e) {
10359
+ function Kb(e) {
10335
10360
  const t = e.filter((r) => r.type === "tool_call");
10336
10361
  return e.filter((r) => r.type === "tool_end").map((r) => {
10337
10362
  var o;
@@ -10342,7 +10367,7 @@ function Vb(e) {
10342
10367
  };
10343
10368
  });
10344
10369
  }
10345
- function Kb(e) {
10370
+ function qb(e) {
10346
10371
  const t = (r, o = En) => {
10347
10372
  try {
10348
10373
  const s = Lr(r), i = typeof s == "string" ? s : JSON.stringify(s ?? "");
@@ -10359,13 +10384,13 @@ function Kb(e) {
10359
10384
  }
10360
10385
  return t(e);
10361
10386
  }
10362
- function qb(e) {
10387
+ function Gb(e) {
10363
10388
  const t = e.find((r) => r.type === "tool_end");
10364
10389
  if (!t) return null;
10365
10390
  const n = t.output;
10366
10391
  return typeof n == "string" ? n : null;
10367
10392
  }
10368
- function Gb(e) {
10393
+ function Yb(e) {
10369
10394
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
10370
10395
  }
10371
10396
  function sc(e) {
@@ -10387,7 +10412,7 @@ function sc(e) {
10387
10412
  }).join("|") : "";
10388
10413
  return `${e.id}:${t}:${n}`;
10389
10414
  }
10390
- function Yb({ className: e }) {
10415
+ function Xb({ className: e }) {
10391
10416
  const [t, n] = fe(0);
10392
10417
  return tt(() => {
10393
10418
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
@@ -10404,7 +10429,7 @@ function Yb({ className: e }) {
10404
10429
  }
10405
10430
  );
10406
10431
  }
10407
- const Xb = B.memo(function({
10432
+ const Jb = B.memo(function({
10408
10433
  message: t,
10409
10434
  messageIndex: n,
10410
10435
  isStreamingMessage: r = !1,
@@ -10436,7 +10461,7 @@ const Xb = B.memo(function({
10436
10461
  default:
10437
10462
  return "text-[hsl(var(--chat-bubble-ai-text))]";
10438
10463
  }
10439
- }, [D]), X = vt(() => Ub(t.content), [t.content]), Q = vt(() => Wb(t.content), [t.content]), ce = vt(
10464
+ }, [D]), X = vt(() => Wb(t.content), [t.content]), Q = vt(() => Vb(t.content), [t.content]), ce = vt(
10440
10465
  () => t.content.filter((oe) => oe.type === "image_url"),
10441
10466
  [t.content]
10442
10467
  ), ve = vt(
@@ -10445,8 +10470,8 @@ const Xb = B.memo(function({
10445
10470
  ), Ee = vt(
10446
10471
  () => t.content.filter((oe) => oe.type === "interrupt"),
10447
10472
  [t.content]
10448
- ), K = vt(() => Kb(t.content), [t.content]);
10449
- vt(() => qb(t.content), [t.content]);
10473
+ ), K = vt(() => qb(t.content), [t.content]);
10474
+ vt(() => Gb(t.content), [t.content]);
10450
10475
  const O = vt(() => K.length <= En ? K : `${K.slice(0, En)}
10451
10476
  … [truncated ${K.length - En} chars]`, [K]), Y = B.useCallback(async (oe = "all") => {
10452
10477
  const he = oe === "visible" && I ? O : I ? K : X;
@@ -10494,7 +10519,7 @@ const Xb = B.memo(function({
10494
10519
  oe.preventDefault(), L((Ve) => ({ ...Ve, [he]: !0 }));
10495
10520
  const Ne = `${se.name}_${se.size}_${Date.now()}`, We = A({ title: "Fetching file...", description: "", open: !0 });
10496
10521
  try {
10497
- const Ve = await Sw(k ?? void 0);
10522
+ const Ve = await Cw(k ?? void 0);
10498
10523
  if (!Ve || !Array.isArray(Ve))
10499
10524
  throw new Error("Invalid file list response");
10500
10525
  const ct = Ve.find((jt) => !jt || typeof jt != "object" || !((jt.filename ?? "") === (se.name ?? "")) ? !1 : typeof se.size == "number" && typeof jt.size == "number" ? jt.size === se.size : !0);
@@ -10595,7 +10620,7 @@ const Xb = B.memo(function({
10595
10620
  }, [N]), Pe = B.useCallback(({ part: oe, i: se }) => {
10596
10621
  if (oe.type === "text") {
10597
10622
  const he = oe.text ?? "", pe = he.trim(), Te = oc(pe);
10598
- return Te && D !== "tool" ? /* @__PURE__ */ l.jsx(Jb, { data: Te }, se) : D === "user" && f && pe.length > h ? /* @__PURE__ */ l.jsxs(Ml, { open: C, onOpenChange: E, children: [
10623
+ return Te && D !== "tool" ? /* @__PURE__ */ l.jsx(Zb, { data: Te }, se) : D === "user" && f && pe.length > h ? /* @__PURE__ */ l.jsxs(Ml, { open: C, onOpenChange: E, children: [
10599
10624
  /* @__PURE__ */ l.jsx("div", { className: Z("text-sm text-[hsl(var(--chat-bubble-user-text))]", q && "text-xs"), children: C ? /* @__PURE__ */ l.jsx(Ul, { content: pe, allowHtml: !1 }) : /* @__PURE__ */ l.jsxs("pre", { className: Z("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", q && "text-xs"), children: [
10600
10625
  pe.substring(0, h),
10601
10626
  "..."
@@ -10652,7 +10677,7 @@ const Xb = B.memo(function({
10652
10677
  );
10653
10678
  }
10654
10679
  return oe.type === "interrupt" ? /* @__PURE__ */ l.jsx(
10655
- Qb,
10680
+ ey,
10656
10681
  {
10657
10682
  interruptPart: oe,
10658
10683
  onApprove: J,
@@ -10679,14 +10704,14 @@ const Xb = B.memo(function({
10679
10704
  if (t.model === "reflection") {
10680
10705
  const se = X.trim(), he = oc(se);
10681
10706
  if (he && typeof he == "object")
10682
- return /* @__PURE__ */ l.jsx(ey, { data: he });
10707
+ return /* @__PURE__ */ l.jsx(ty, { data: he });
10683
10708
  }
10684
10709
  if (I && Q.name === "get_issues") {
10685
10710
  const se = t.content.find((Te) => Te.type === "tool_end"), he = (se == null ? void 0 : se.output) ?? K, pe = Pd(he);
10686
- if (pe) return /* @__PURE__ */ l.jsx(ty, { issues: pe });
10711
+ if (pe) return /* @__PURE__ */ l.jsx(ny, { issues: pe });
10687
10712
  }
10688
10713
  if (I) {
10689
- const se = Vb(t.content);
10714
+ const se = Kb(t.content);
10690
10715
  if (se.length > 0)
10691
10716
  return /* @__PURE__ */ l.jsx("div", { className: "space-y-2", children: se.map((he, pe) => {
10692
10717
  const Te = typeof he.output == "string" ? he.output : Ni(he.output), Ne = Te.length > En ? `${Te.slice(0, En)}
@@ -10709,7 +10734,7 @@ const Xb = B.memo(function({
10709
10734
  const se = /* @__PURE__ */ l.jsx("div", { className: "space-y-2", children: t.content.map((he, pe) => /* @__PURE__ */ l.jsx(Pe, { part: he, i: pe }, pe)) });
10710
10735
  return r ? /* @__PURE__ */ l.jsxs("div", { "aria-busy": "true", role: "status", children: [
10711
10736
  se,
10712
- /* @__PURE__ */ l.jsx(Yb, { className: H })
10737
+ /* @__PURE__ */ l.jsx(Xb, { className: H })
10713
10738
  ] }) : se;
10714
10739
  }
10715
10740
  }, [
@@ -10725,7 +10750,7 @@ const Xb = B.memo(function({
10725
10750
  u,
10726
10751
  Ie,
10727
10752
  H
10728
- ]), it = vt(() => Gb(t), [t]);
10753
+ ]), it = vt(() => Yb(t), [t]);
10729
10754
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
10730
10755
  /* @__PURE__ */ l.jsx("div", { className: Z(Ye(), m.container), children: /* @__PURE__ */ l.jsxs("div", { className: Z(V(), m.content), children: [
10731
10756
  (i || a || I) && /* @__PURE__ */ l.jsxs(
@@ -10907,7 +10932,7 @@ const Xb = B.memo(function({
10907
10932
  )
10908
10933
  ] }) }),
10909
10934
  W && /* @__PURE__ */ l.jsx(
10910
- Hb,
10935
+ Ub,
10911
10936
  {
10912
10937
  isOpen: $,
10913
10938
  onClose: () => {
@@ -10935,7 +10960,7 @@ const Xb = B.memo(function({
10935
10960
  ].every((w) => e[w] === t[w]), s = ((i = e.customStyles) == null ? void 0 : i.container) === ((a = t.customStyles) == null ? void 0 : a.container) && ((c = e.customStyles) == null ? void 0 : c.content) === ((u = t.customStyles) == null ? void 0 : u.content) && ((d = e.customStyles) == null ? void 0 : d.actions) === ((f = t.customStyles) == null ? void 0 : f.actions) && ((h = e.customStyles) == null ? void 0 : h.header) === ((m = t.customStyles) == null ? void 0 : m.header);
10936
10961
  return o && s;
10937
10962
  });
10938
- function Jb({ data: e }) {
10963
+ function Zb({ data: e }) {
10939
10964
  if (Array.isArray(e))
10940
10965
  return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ l.jsx("div", { className: Io, children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ l.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Ni(e) });
10941
10966
  if (e && typeof e == "object") {
@@ -10962,12 +10987,12 @@ function Jb({ data: e }) {
10962
10987
  s,
10963
10988
  ":"
10964
10989
  ] }),
10965
- /* @__PURE__ */ l.jsx("dd", { className: "inline", children: Zb(i) })
10990
+ /* @__PURE__ */ l.jsx("dd", { className: "inline", children: Qb(i) })
10966
10991
  ] }, s)) }) });
10967
10992
  }
10968
10993
  return /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Ni(e) });
10969
10994
  }
10970
- function Zb(e) {
10995
+ function Qb(e) {
10971
10996
  if (e == null) return String(e);
10972
10997
  const t = typeof e;
10973
10998
  if (t === "string" || t === "number" || t === "boolean") return String(e);
@@ -10979,7 +11004,7 @@ function Zb(e) {
10979
11004
  return String(e);
10980
11005
  }
10981
11006
  }
10982
- function Qb({
11007
+ function ey({
10983
11008
  interruptPart: e,
10984
11009
  onApprove: t,
10985
11010
  onReject: n
@@ -11013,7 +11038,7 @@ function Qb({
11013
11038
  ] }) })
11014
11039
  ] });
11015
11040
  }
11016
- function ey({ data: e }) {
11041
+ function ty({ data: e }) {
11017
11042
  return /* @__PURE__ */ l.jsx("dl", { className: "grid grid-cols-1 gap-y-2", children: Object.entries(e).map(([t, n]) => /* @__PURE__ */ l.jsxs("div", { className: "flex", children: [
11018
11043
  /* @__PURE__ */ l.jsxs("dt", { className: "font-semibold mr-2", children: [
11019
11044
  t,
@@ -11025,7 +11050,7 @@ function ey({ data: e }) {
11025
11050
  ] }, o)) : String(n) })
11026
11051
  ] }, t)) });
11027
11052
  }
11028
- function ty({ issues: e }) {
11053
+ function ny({ issues: e }) {
11029
11054
  const t = [
11030
11055
  { key: "desirability", title: "Desirability" },
11031
11056
  { key: "feasibility", title: "Feasibility" },
@@ -11084,7 +11109,7 @@ const ic = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Od = B.forwa
11084
11109
  };
11085
11110
  }, [a]), A = vt(() => !w || v ? !1 : C ? "auto" : !1, [C, w, v]);
11086
11111
  return e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: f, style: h, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: m || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ l.jsx("div", { className: f, style: h, children: /* @__PURE__ */ l.jsx(
11087
- Rv,
11112
+ Ev,
11088
11113
  {
11089
11114
  ref: (_) => {
11090
11115
  y.current = _;
@@ -11117,7 +11142,7 @@ const ic = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Od = B.forwa
11117
11142
  containIntrinsicSize: "auto 120px"
11118
11143
  },
11119
11144
  children: /* @__PURE__ */ l.jsx(
11120
- Xb,
11145
+ Jb,
11121
11146
  {
11122
11147
  message: L,
11123
11148
  messageIndex: _,
@@ -11143,7 +11168,7 @@ const ic = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Od = B.forwa
11143
11168
  });
11144
11169
  Od.displayName = "MessageList";
11145
11170
  const No = 1e4;
11146
- function ny(e) {
11171
+ function ry(e) {
11147
11172
  if (typeof e != "string")
11148
11173
  return String(e);
11149
11174
  const t = [
@@ -11170,16 +11195,16 @@ function ny(e) {
11170
11195
  `).replace(/<li>(.*?)<\/li>/gi, `- $1
11171
11196
  `).trim() : n.replace(/</g, "&lt;").replace(/>/g, "&gt;").trim();
11172
11197
  }
11173
- function ry(e, t = No) {
11198
+ function oy(e, t = No) {
11174
11199
  if (!e || typeof e != "string")
11175
11200
  throw new Error("Invalid content: must be a non-empty string");
11176
11201
  if (e.length > t)
11177
11202
  throw new Error(`Message exceeds maximum length of ${t} characters`);
11178
11203
  return e;
11179
11204
  }
11180
- function oy(e) {
11205
+ function sy(e) {
11181
11206
  let t;
11182
- return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), ry(t), ny(t);
11207
+ return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), oy(t), ry(t);
11183
11208
  }
11184
11209
  function wa(e) {
11185
11210
  const t = e + "CollectionProvider", [n, r] = on(t), [o, s] = n(
@@ -11221,20 +11246,20 @@ function wa(e) {
11221
11246
  r
11222
11247
  ];
11223
11248
  }
11224
- var sy = p.createContext(void 0);
11249
+ var iy = p.createContext(void 0);
11225
11250
  function ws(e) {
11226
- const t = p.useContext(sy);
11251
+ const t = p.useContext(iy);
11227
11252
  return e || t || "ltr";
11228
11253
  }
11229
- const iy = ["top", "right", "bottom", "left"], vn = Math.min, kt = Math.max, zo = Math.round, mo = Math.floor, tn = (e) => ({
11254
+ const ay = ["top", "right", "bottom", "left"], vn = Math.min, kt = Math.max, zo = Math.round, mo = Math.floor, tn = (e) => ({
11230
11255
  x: e,
11231
11256
  y: e
11232
- }), ay = {
11257
+ }), ly = {
11233
11258
  left: "right",
11234
11259
  right: "left",
11235
11260
  bottom: "top",
11236
11261
  top: "bottom"
11237
- }, ly = {
11262
+ }, cy = {
11238
11263
  start: "end",
11239
11264
  end: "start"
11240
11265
  };
@@ -11256,48 +11281,48 @@ function ba(e) {
11256
11281
  function ya(e) {
11257
11282
  return e === "y" ? "height" : "width";
11258
11283
  }
11259
- const cy = /* @__PURE__ */ new Set(["top", "bottom"]);
11284
+ const uy = /* @__PURE__ */ new Set(["top", "bottom"]);
11260
11285
  function Qt(e) {
11261
- return cy.has(dn(e)) ? "y" : "x";
11286
+ return uy.has(dn(e)) ? "y" : "x";
11262
11287
  }
11263
11288
  function Sa(e) {
11264
11289
  return ba(Qt(e));
11265
11290
  }
11266
- function uy(e, t, n) {
11291
+ function dy(e, t, n) {
11267
11292
  n === void 0 && (n = !1);
11268
11293
  const r = fr(e), o = Sa(e), s = ya(o);
11269
11294
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
11270
11295
  return t.reference[s] > t.floating[s] && (i = Bo(i)), [i, Bo(i)];
11271
11296
  }
11272
- function dy(e) {
11297
+ function fy(e) {
11273
11298
  const t = Bo(e);
11274
11299
  return [_i(e), t, _i(t)];
11275
11300
  }
11276
11301
  function _i(e) {
11277
- return e.replace(/start|end/g, (t) => ly[t]);
11302
+ return e.replace(/start|end/g, (t) => cy[t]);
11278
11303
  }
11279
- const ac = ["left", "right"], lc = ["right", "left"], fy = ["top", "bottom"], hy = ["bottom", "top"];
11280
- function py(e, t, n) {
11304
+ const ac = ["left", "right"], lc = ["right", "left"], hy = ["top", "bottom"], py = ["bottom", "top"];
11305
+ function my(e, t, n) {
11281
11306
  switch (e) {
11282
11307
  case "top":
11283
11308
  case "bottom":
11284
11309
  return n ? t ? lc : ac : t ? ac : lc;
11285
11310
  case "left":
11286
11311
  case "right":
11287
- return t ? fy : hy;
11312
+ return t ? hy : py;
11288
11313
  default:
11289
11314
  return [];
11290
11315
  }
11291
11316
  }
11292
- function my(e, t, n, r) {
11317
+ function gy(e, t, n, r) {
11293
11318
  const o = fr(e);
11294
- let s = py(dn(e), n === "start", r);
11319
+ let s = my(dn(e), n === "start", r);
11295
11320
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(_i)))), s;
11296
11321
  }
11297
11322
  function Bo(e) {
11298
- return e.replace(/left|right|bottom|top/g, (t) => ay[t]);
11323
+ return e.replace(/left|right|bottom|top/g, (t) => ly[t]);
11299
11324
  }
11300
- function gy(e) {
11325
+ function xy(e) {
11301
11326
  return {
11302
11327
  top: 0,
11303
11328
  right: 0,
@@ -11307,7 +11332,7 @@ function gy(e) {
11307
11332
  };
11308
11333
  }
11309
11334
  function Md(e) {
11310
- return typeof e != "number" ? gy(e) : {
11335
+ return typeof e != "number" ? xy(e) : {
11311
11336
  top: e,
11312
11337
  right: e,
11313
11338
  bottom: e,
@@ -11380,7 +11405,7 @@ function cc(e, t, n) {
11380
11405
  }
11381
11406
  return m;
11382
11407
  }
11383
- const xy = async (e, t, n) => {
11408
+ const vy = async (e, t, n) => {
11384
11409
  const {
11385
11410
  placement: r = "bottom",
11386
11411
  strategy: o = "absolute",
@@ -11486,7 +11511,7 @@ async function $r(e, t) {
11486
11511
  right: (S.right - x.right + w.right) / R.x
11487
11512
  };
11488
11513
  }
11489
- const vy = (e) => ({
11514
+ const wy = (e) => ({
11490
11515
  name: "arrow",
11491
11516
  options: e,
11492
11517
  async fn(t) {
@@ -11523,7 +11548,7 @@ const vy = (e) => ({
11523
11548
  reset: z
11524
11549
  };
11525
11550
  }
11526
- }), wy = function(e) {
11551
+ }), by = function(e) {
11527
11552
  return e === void 0 && (e = {}), {
11528
11553
  name: "flip",
11529
11554
  options: e,
@@ -11547,12 +11572,12 @@ const vy = (e) => ({
11547
11572
  } = un(e, t);
11548
11573
  if ((n = s.arrow) != null && n.alignmentOffset)
11549
11574
  return {};
11550
- const x = dn(o), b = Qt(a), y = dn(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [Bo(a)] : dy(a)), C = w !== "none";
11551
- !h && C && S.push(...my(a, v, w, R));
11575
+ const x = dn(o), b = Qt(a), y = dn(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [Bo(a)] : fy(a)), C = w !== "none";
11576
+ !h && C && S.push(...gy(a, v, w, R));
11552
11577
  const E = [a, ...S], k = await $r(t, g), N = [];
11553
11578
  let A = ((r = s.flip) == null ? void 0 : r.overflows) || [];
11554
11579
  if (d && N.push(k[x]), f) {
11555
- const P = uy(o, i, R);
11580
+ const P = dy(o, i, R);
11556
11581
  N.push(k[P[0]], k[P[1]]);
11557
11582
  }
11558
11583
  if (A = [...A, {
@@ -11614,9 +11639,9 @@ function uc(e, t) {
11614
11639
  };
11615
11640
  }
11616
11641
  function dc(e) {
11617
- return iy.some((t) => e[t] >= 0);
11642
+ return ay.some((t) => e[t] >= 0);
11618
11643
  }
11619
- const by = function(e) {
11644
+ const yy = function(e) {
11620
11645
  return e === void 0 && (e = {}), {
11621
11646
  name: "hide",
11622
11647
  options: e,
@@ -11658,7 +11683,7 @@ const by = function(e) {
11658
11683
  }
11659
11684
  };
11660
11685
  }, Dd = /* @__PURE__ */ new Set(["left", "top"]);
11661
- async function yy(e, t) {
11686
+ async function Sy(e, t) {
11662
11687
  const {
11663
11688
  placement: n,
11664
11689
  platform: r,
@@ -11685,7 +11710,7 @@ async function yy(e, t) {
11685
11710
  y: m * d
11686
11711
  };
11687
11712
  }
11688
- const Sy = function(e) {
11713
+ const Cy = function(e) {
11689
11714
  return e === void 0 && (e = 0), {
11690
11715
  name: "offset",
11691
11716
  options: e,
@@ -11696,7 +11721,7 @@ const Sy = function(e) {
11696
11721
  y: s,
11697
11722
  placement: i,
11698
11723
  middlewareData: a
11699
- } = t, c = await yy(t, e);
11724
+ } = t, c = await Sy(t, e);
11700
11725
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
11701
11726
  x: o + c.x,
11702
11727
  y: s + c.y,
@@ -11707,7 +11732,7 @@ const Sy = function(e) {
11707
11732
  };
11708
11733
  }
11709
11734
  };
11710
- }, Cy = function(e) {
11735
+ }, Ty = function(e) {
11711
11736
  return e === void 0 && (e = {}), {
11712
11737
  name: "shift",
11713
11738
  options: e,
@@ -11763,7 +11788,7 @@ const Sy = function(e) {
11763
11788
  };
11764
11789
  }
11765
11790
  };
11766
- }, Ty = function(e) {
11791
+ }, Ry = function(e) {
11767
11792
  return e === void 0 && (e = {}), {
11768
11793
  options: e,
11769
11794
  fn(t) {
@@ -11805,7 +11830,7 @@ const Sy = function(e) {
11805
11830
  };
11806
11831
  }
11807
11832
  };
11808
- }, Ry = function(e) {
11833
+ }, Ey = function(e) {
11809
11834
  return e === void 0 && (e = {}), {
11810
11835
  name: "size",
11811
11836
  options: e,
@@ -11872,7 +11897,7 @@ function nn(e) {
11872
11897
  function fc(e) {
11873
11898
  return !bs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof At(e).ShadowRoot;
11874
11899
  }
11875
- const Ey = /* @__PURE__ */ new Set(["inline", "contents"]);
11900
+ const ky = /* @__PURE__ */ new Set(["inline", "contents"]);
11876
11901
  function Yr(e) {
11877
11902
  const {
11878
11903
  overflow: t,
@@ -11880,15 +11905,15 @@ function Yr(e) {
11880
11905
  overflowY: r,
11881
11906
  display: o
11882
11907
  } = Vt(e);
11883
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Ey.has(o);
11908
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ky.has(o);
11884
11909
  }
11885
- const ky = /* @__PURE__ */ new Set(["table", "td", "th"]);
11886
- function Iy(e) {
11887
- return ky.has(hr(e));
11910
+ const Iy = /* @__PURE__ */ new Set(["table", "td", "th"]);
11911
+ function Ny(e) {
11912
+ return Iy.has(hr(e));
11888
11913
  }
11889
- const Ny = [":popover-open", ":modal"];
11914
+ const Ay = [":popover-open", ":modal"];
11890
11915
  function ys(e) {
11891
- return Ny.some((t) => {
11916
+ return Ay.some((t) => {
11892
11917
  try {
11893
11918
  return e.matches(t);
11894
11919
  } catch {
@@ -11896,12 +11921,12 @@ function ys(e) {
11896
11921
  }
11897
11922
  });
11898
11923
  }
11899
- const Ay = ["transform", "translate", "scale", "rotate", "perspective"], _y = ["transform", "translate", "scale", "rotate", "perspective", "filter"], jy = ["paint", "layout", "strict", "content"];
11924
+ const _y = ["transform", "translate", "scale", "rotate", "perspective"], jy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Py = ["paint", "layout", "strict", "content"];
11900
11925
  function Ca(e) {
11901
11926
  const t = Ta(), n = Wt(e) ? Vt(e) : e;
11902
- return Ay.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || _y.some((r) => (n.willChange || "").includes(r)) || jy.some((r) => (n.contain || "").includes(r));
11927
+ return _y.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || jy.some((r) => (n.willChange || "").includes(r)) || Py.some((r) => (n.contain || "").includes(r));
11903
11928
  }
11904
- function Py(e) {
11929
+ function Oy(e) {
11905
11930
  let t = wn(e);
11906
11931
  for (; nn(t) && !or(t); ) {
11907
11932
  if (Ca(t))
@@ -11915,9 +11940,9 @@ function Py(e) {
11915
11940
  function Ta() {
11916
11941
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
11917
11942
  }
11918
- const Oy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
11943
+ const My = /* @__PURE__ */ new Set(["html", "body", "#document"]);
11919
11944
  function or(e) {
11920
- return Oy.has(hr(e));
11945
+ return My.has(hr(e));
11921
11946
  }
11922
11947
  function Vt(e) {
11923
11948
  return At(e).getComputedStyle(e);
@@ -11988,15 +12013,15 @@ function er(e) {
11988
12013
  y: a
11989
12014
  };
11990
12015
  }
11991
- const My = /* @__PURE__ */ tn(0);
12016
+ const Dy = /* @__PURE__ */ tn(0);
11992
12017
  function zd(e) {
11993
12018
  const t = At(e);
11994
- return !Ta() || !t.visualViewport ? My : {
12019
+ return !Ta() || !t.visualViewport ? Dy : {
11995
12020
  x: t.visualViewport.offsetLeft,
11996
12021
  y: t.visualViewport.offsetTop
11997
12022
  };
11998
12023
  }
11999
- function Dy(e, t, n) {
12024
+ function Ly(e, t, n) {
12000
12025
  return t === void 0 && (t = !1), !n || t && n !== At(e) ? !1 : t;
12001
12026
  }
12002
12027
  function Ln(e, t, n, r) {
@@ -12004,7 +12029,7 @@ function Ln(e, t, n, r) {
12004
12029
  const o = e.getBoundingClientRect(), s = Ra(e);
12005
12030
  let i = tn(1);
12006
12031
  t && (r ? Wt(r) && (i = er(r)) : i = er(e));
12007
- const a = Dy(s, n, r) ? zd(s) : tn(0);
12032
+ const a = Ly(s, n, r) ? zd(s) : tn(0);
12008
12033
  let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
12009
12034
  if (s) {
12010
12035
  const h = At(s), m = r && Wt(r) ? At(r) : r;
@@ -12036,7 +12061,7 @@ function Bd(e, t, n) {
12036
12061
  y: s
12037
12062
  };
12038
12063
  }
12039
- function Ly(e) {
12064
+ function $y(e) {
12040
12065
  let {
12041
12066
  elements: t,
12042
12067
  rect: n,
@@ -12063,10 +12088,10 @@ function Ly(e) {
12063
12088
  y: n.y * u.y - c.scrollTop * u.y + d.y + h.y
12064
12089
  };
12065
12090
  }
12066
- function $y(e) {
12091
+ function Fy(e) {
12067
12092
  return Array.from(e.getClientRects());
12068
12093
  }
12069
- function Fy(e) {
12094
+ function zy(e) {
12070
12095
  const t = sn(e), n = Ss(e), r = e.ownerDocument.body, o = kt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = kt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
12071
12096
  let i = -n.scrollLeft + Ea(e);
12072
12097
  const a = -n.scrollTop;
@@ -12077,7 +12102,7 @@ function Fy(e) {
12077
12102
  y: a
12078
12103
  };
12079
12104
  }
12080
- function zy(e, t) {
12105
+ function By(e, t) {
12081
12106
  const n = At(e), r = sn(e), o = n.visualViewport;
12082
12107
  let s = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
12083
12108
  if (o) {
@@ -12092,8 +12117,8 @@ function zy(e, t) {
12092
12117
  y: c
12093
12118
  };
12094
12119
  }
12095
- const By = /* @__PURE__ */ new Set(["absolute", "fixed"]);
12096
- function Hy(e, t) {
12120
+ const Hy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
12121
+ function Uy(e, t) {
12097
12122
  const n = Ln(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = nn(e) ? er(e) : tn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
12098
12123
  return {
12099
12124
  width: i,
@@ -12105,11 +12130,11 @@ function Hy(e, t) {
12105
12130
  function hc(e, t, n) {
12106
12131
  let r;
12107
12132
  if (t === "viewport")
12108
- r = zy(e, n);
12133
+ r = By(e, n);
12109
12134
  else if (t === "document")
12110
- r = Fy(sn(e));
12135
+ r = zy(sn(e));
12111
12136
  else if (Wt(t))
12112
- r = Hy(t, n);
12137
+ r = Uy(t, n);
12113
12138
  else {
12114
12139
  const o = zd(e);
12115
12140
  r = {
@@ -12125,7 +12150,7 @@ function Hd(e, t) {
12125
12150
  const n = wn(e);
12126
12151
  return n === t || !Wt(n) || or(n) ? !1 : Vt(n).position === "fixed" || Hd(n, t);
12127
12152
  }
12128
- function Uy(e, t) {
12153
+ function Wy(e, t) {
12129
12154
  const n = t.get(e);
12130
12155
  if (n)
12131
12156
  return n;
@@ -12134,18 +12159,18 @@ function Uy(e, t) {
12134
12159
  let i = s ? wn(e) : e;
12135
12160
  for (; Wt(i) && !or(i); ) {
12136
12161
  const a = Vt(i), c = Ca(i);
12137
- !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && By.has(o.position) || Yr(i) && !c && Hd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = wn(i);
12162
+ !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && Hy.has(o.position) || Yr(i) && !c && Hd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = wn(i);
12138
12163
  }
12139
12164
  return t.set(e, r), r;
12140
12165
  }
12141
- function Wy(e) {
12166
+ function Vy(e) {
12142
12167
  let {
12143
12168
  element: t,
12144
12169
  boundary: n,
12145
12170
  rootBoundary: r,
12146
12171
  strategy: o
12147
12172
  } = e;
12148
- const i = [...n === "clippingAncestors" ? ys(t) ? [] : Uy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
12173
+ const i = [...n === "clippingAncestors" ? ys(t) ? [] : Wy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
12149
12174
  const f = hc(t, d, o);
12150
12175
  return u.top = kt(f.top, u.top), u.right = vn(f.right, u.right), u.bottom = vn(f.bottom, u.bottom), u.left = kt(f.left, u.left), u;
12151
12176
  }, hc(t, a, o));
@@ -12156,7 +12181,7 @@ function Wy(e) {
12156
12181
  y: c.top
12157
12182
  };
12158
12183
  }
12159
- function Vy(e) {
12184
+ function Ky(e) {
12160
12185
  const {
12161
12186
  width: t,
12162
12187
  height: n
@@ -12166,7 +12191,7 @@ function Vy(e) {
12166
12191
  height: n
12167
12192
  };
12168
12193
  }
12169
- function Ky(e, t, n) {
12194
+ function qy(e, t, n) {
12170
12195
  const r = nn(t), o = sn(t), s = n === "fixed", i = Ln(e, !0, s, t);
12171
12196
  let a = {
12172
12197
  scrollLeft: 0,
@@ -12215,14 +12240,14 @@ function Ud(e, t) {
12215
12240
  return n;
12216
12241
  }
12217
12242
  let r = pc(e, t);
12218
- for (; r && Iy(r) && ii(r); )
12243
+ for (; r && Ny(r) && ii(r); )
12219
12244
  r = pc(r, t);
12220
- return r && or(r) && ii(r) && !Ca(r) ? n : r || Py(e) || n;
12245
+ return r && or(r) && ii(r) && !Ca(r) ? n : r || Oy(e) || n;
12221
12246
  }
12222
- const qy = async function(e) {
12247
+ const Gy = async function(e) {
12223
12248
  const t = this.getOffsetParent || Ud, n = this.getDimensions, r = await n(e.floating);
12224
12249
  return {
12225
- reference: Ky(e.reference, await t(e.floating), e.strategy),
12250
+ reference: qy(e.reference, await t(e.floating), e.strategy),
12226
12251
  floating: {
12227
12252
  x: 0,
12228
12253
  y: 0,
@@ -12231,25 +12256,25 @@ const qy = async function(e) {
12231
12256
  }
12232
12257
  };
12233
12258
  };
12234
- function Gy(e) {
12259
+ function Yy(e) {
12235
12260
  return Vt(e).direction === "rtl";
12236
12261
  }
12237
- const Yy = {
12238
- convertOffsetParentRelativeRectToViewportRelativeRect: Ly,
12262
+ const Xy = {
12263
+ convertOffsetParentRelativeRectToViewportRelativeRect: $y,
12239
12264
  getDocumentElement: sn,
12240
- getClippingRect: Wy,
12265
+ getClippingRect: Vy,
12241
12266
  getOffsetParent: Ud,
12242
- getElementRects: qy,
12243
- getClientRects: $y,
12244
- getDimensions: Vy,
12267
+ getElementRects: Gy,
12268
+ getClientRects: Fy,
12269
+ getDimensions: Ky,
12245
12270
  getScale: er,
12246
12271
  isElement: Wt,
12247
- isRTL: Gy
12272
+ isRTL: Yy
12248
12273
  };
12249
12274
  function Wd(e, t) {
12250
12275
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
12251
12276
  }
12252
- function Xy(e, t) {
12277
+ function Jy(e, t) {
12253
12278
  let n = null, r;
12254
12279
  const o = sn(e);
12255
12280
  function s() {
@@ -12295,7 +12320,7 @@ function Xy(e, t) {
12295
12320
  }
12296
12321
  return i(!0), s;
12297
12322
  }
12298
- function Jy(e, t, n, r) {
12323
+ function Zy(e, t, n, r) {
12299
12324
  r === void 0 && (r = {});
12300
12325
  const {
12301
12326
  ancestorScroll: o = !0,
@@ -12309,7 +12334,7 @@ function Jy(e, t, n, r) {
12309
12334
  passive: !0
12310
12335
  }), s && x.addEventListener("resize", n);
12311
12336
  });
12312
- const f = u && a ? Xy(u, n) : null;
12337
+ const f = u && a ? Jy(u, n) : null;
12313
12338
  let h = -1, m = null;
12314
12339
  i && (m = new ResizeObserver((x) => {
12315
12340
  let [b] = x;
@@ -12331,21 +12356,21 @@ function Jy(e, t, n, r) {
12331
12356
  }), f == null || f(), (x = m) == null || x.disconnect(), m = null, c && cancelAnimationFrame(w);
12332
12357
  };
12333
12358
  }
12334
- const Zy = Sy, Qy = Cy, e0 = wy, t0 = Ry, n0 = by, mc = vy, r0 = Ty, o0 = (e, t, n) => {
12359
+ const Qy = Cy, e0 = Ty, t0 = by, n0 = Ey, r0 = yy, mc = wy, o0 = Ry, s0 = (e, t, n) => {
12335
12360
  const r = /* @__PURE__ */ new Map(), o = {
12336
- platform: Yy,
12361
+ platform: Xy,
12337
12362
  ...n
12338
12363
  }, s = {
12339
12364
  ...o.platform,
12340
12365
  _c: r
12341
12366
  };
12342
- return xy(e, t, {
12367
+ return vy(e, t, {
12343
12368
  ...o,
12344
12369
  platform: s
12345
12370
  });
12346
12371
  };
12347
- var s0 = typeof document < "u", i0 = function() {
12348
- }, Ao = s0 ? _p : i0;
12372
+ var i0 = typeof document < "u", a0 = function() {
12373
+ }, Ao = i0 ? _p : a0;
12349
12374
  function Uo(e, t) {
12350
12375
  if (e === t)
12351
12376
  return !0;
@@ -12389,7 +12414,7 @@ function ai(e) {
12389
12414
  t.current = e;
12390
12415
  }), t;
12391
12416
  }
12392
- function a0(e) {
12417
+ function l0(e) {
12393
12418
  e === void 0 && (e = {});
12394
12419
  const {
12395
12420
  placement: t = "bottom",
@@ -12424,7 +12449,7 @@ function a0(e) {
12424
12449
  strategy: n,
12425
12450
  middleware: h
12426
12451
  };
12427
- _.current && (D.platform = _.current), o0(C.current, E.current, D).then((I) => {
12452
+ _.current && (D.platform = _.current), s0(C.current, E.current, D).then((I) => {
12428
12453
  const M = {
12429
12454
  ...I,
12430
12455
  // The floating element's position may be recomputed while it's closed
@@ -12491,7 +12516,7 @@ function a0(e) {
12491
12516
  floatingStyles: q
12492
12517
  }), [d, $, W, z, q]);
12493
12518
  }
12494
- const l0 = (e) => {
12519
+ const c0 = (e) => {
12495
12520
  function t(n) {
12496
12521
  return {}.hasOwnProperty.call(n, "current");
12497
12522
  }
@@ -12512,17 +12537,14 @@ const l0 = (e) => {
12512
12537
  }).fn(n) : {};
12513
12538
  }
12514
12539
  };
12515
- }, c0 = (e, t) => ({
12516
- ...Zy(e),
12517
- options: [e, t]
12518
- }), u0 = (e, t) => ({
12540
+ }, u0 = (e, t) => ({
12519
12541
  ...Qy(e),
12520
12542
  options: [e, t]
12521
12543
  }), d0 = (e, t) => ({
12522
- ...r0(e),
12544
+ ...e0(e),
12523
12545
  options: [e, t]
12524
12546
  }), f0 = (e, t) => ({
12525
- ...e0(e),
12547
+ ...o0(e),
12526
12548
  options: [e, t]
12527
12549
  }), h0 = (e, t) => ({
12528
12550
  ...t0(e),
@@ -12531,10 +12553,13 @@ const l0 = (e) => {
12531
12553
  ...n0(e),
12532
12554
  options: [e, t]
12533
12555
  }), m0 = (e, t) => ({
12534
- ...l0(e),
12556
+ ...r0(e),
12557
+ options: [e, t]
12558
+ }), g0 = (e, t) => ({
12559
+ ...c0(e),
12535
12560
  options: [e, t]
12536
12561
  });
12537
- var g0 = "Arrow", Kd = p.forwardRef((e, t) => {
12562
+ var x0 = "Arrow", Kd = p.forwardRef((e, t) => {
12538
12563
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
12539
12564
  return /* @__PURE__ */ l.jsx(
12540
12565
  Ce.svg,
@@ -12549,8 +12574,8 @@ var g0 = "Arrow", Kd = p.forwardRef((e, t) => {
12549
12574
  }
12550
12575
  );
12551
12576
  });
12552
- Kd.displayName = g0;
12553
- var x0 = Kd;
12577
+ Kd.displayName = x0;
12578
+ var v0 = Kd;
12554
12579
  function qd(e) {
12555
12580
  const [t, n] = p.useState(void 0);
12556
12581
  return dt(() => {
@@ -12573,9 +12598,9 @@ function qd(e) {
12573
12598
  n(void 0);
12574
12599
  }, [e]), t;
12575
12600
  }
12576
- var ka = "Popper", [Gd, Cs] = on(ka), [v0, Yd] = Gd(ka), Xd = (e) => {
12601
+ var ka = "Popper", [Gd, Cs] = on(ka), [w0, Yd] = Gd(ka), Xd = (e) => {
12577
12602
  const { __scopePopper: t, children: n } = e, [r, o] = p.useState(null);
12578
- return /* @__PURE__ */ l.jsx(v0, { scope: t, anchor: r, onAnchorChange: o, children: n });
12603
+ return /* @__PURE__ */ l.jsx(w0, { scope: t, anchor: r, onAnchorChange: o, children: n });
12579
12604
  };
12580
12605
  Xd.displayName = ka;
12581
12606
  var Jd = "PopperAnchor", Zd = p.forwardRef(
@@ -12588,7 +12613,7 @@ var Jd = "PopperAnchor", Zd = p.forwardRef(
12588
12613
  }
12589
12614
  );
12590
12615
  Zd.displayName = Jd;
12591
- var Ia = "PopperContent", [w0, b0] = Gd(Ia), Qd = p.forwardRef(
12616
+ var Ia = "PopperContent", [b0, y0] = Gd(Ia), Qd = p.forwardRef(
12592
12617
  (e, t) => {
12593
12618
  var K, O, Y, ee, ue, le;
12594
12619
  const {
@@ -12608,38 +12633,38 @@ var Ia = "PopperContent", [w0, b0] = Gd(Ia), Qd = p.forwardRef(
12608
12633
  ...v
12609
12634
  } = e, g = Yd(Ia, n), [x, b] = p.useState(null), y = Me(t, (Fe) => b(Fe)), [R, S] = p.useState(null), C = qd(R), E = (C == null ? void 0 : C.width) ?? 0, k = (C == null ? void 0 : C.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), A = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, _ = Array.isArray(u) ? u : [u], L = _.length > 0, $ = {
12610
12635
  padding: A,
12611
- boundary: _.filter(S0),
12636
+ boundary: _.filter(C0),
12612
12637
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
12613
12638
  altBoundary: L
12614
- }, { refs: P, floatingStyles: W, placement: z, isPositioned: q, middlewareData: D } = a0({
12639
+ }, { refs: P, floatingStyles: W, placement: z, isPositioned: q, middlewareData: D } = l0({
12615
12640
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
12616
12641
  strategy: "fixed",
12617
12642
  placement: N,
12618
- whileElementsMounted: (...Fe) => Jy(...Fe, {
12643
+ whileElementsMounted: (...Fe) => Zy(...Fe, {
12619
12644
  animationFrame: m === "always"
12620
12645
  }),
12621
12646
  elements: {
12622
12647
  reference: g.anchor
12623
12648
  },
12624
12649
  middleware: [
12625
- c0({ mainAxis: o + k, alignmentAxis: i }),
12626
- c && u0({
12650
+ u0({ mainAxis: o + k, alignmentAxis: i }),
12651
+ c && d0({
12627
12652
  mainAxis: !0,
12628
12653
  crossAxis: !1,
12629
- limiter: f === "partial" ? d0() : void 0,
12654
+ limiter: f === "partial" ? f0() : void 0,
12630
12655
  ...$
12631
12656
  }),
12632
- c && f0({ ...$ }),
12633
- h0({
12657
+ c && h0({ ...$ }),
12658
+ p0({
12634
12659
  ...$,
12635
12660
  apply: ({ elements: Fe, rects: Ye, availableWidth: V, availableHeight: J }) => {
12636
12661
  const { width: we, height: Pe } = Ye.reference, Ie = Fe.floating.style;
12637
12662
  Ie.setProperty("--radix-popper-available-width", `${V}px`), Ie.setProperty("--radix-popper-available-height", `${J}px`), Ie.setProperty("--radix-popper-anchor-width", `${we}px`), Ie.setProperty("--radix-popper-anchor-height", `${Pe}px`);
12638
12663
  }
12639
12664
  }),
12640
- R && m0({ element: R, padding: a }),
12641
- C0({ arrowWidth: E, arrowHeight: k }),
12642
- h && p0({ strategy: "referenceHidden", ...$ })
12665
+ R && g0({ element: R, padding: a }),
12666
+ T0({ arrowWidth: E, arrowHeight: k }),
12667
+ h && m0({ strategy: "referenceHidden", ...$ })
12643
12668
  ]
12644
12669
  }), [I, M] = nf(z), H = ft(w);
12645
12670
  dt(() => {
@@ -12673,7 +12698,7 @@ var Ia = "PopperContent", [w0, b0] = Gd(Ia), Qd = p.forwardRef(
12673
12698
  },
12674
12699
  dir: e.dir,
12675
12700
  children: /* @__PURE__ */ l.jsx(
12676
- w0,
12701
+ b0,
12677
12702
  {
12678
12703
  scope: n,
12679
12704
  placedSide: I,
@@ -12703,13 +12728,13 @@ var Ia = "PopperContent", [w0, b0] = Gd(Ia), Qd = p.forwardRef(
12703
12728
  }
12704
12729
  );
12705
12730
  Qd.displayName = Ia;
12706
- var ef = "PopperArrow", y0 = {
12731
+ var ef = "PopperArrow", S0 = {
12707
12732
  top: "bottom",
12708
12733
  right: "left",
12709
12734
  bottom: "top",
12710
12735
  left: "right"
12711
12736
  }, tf = p.forwardRef(function(t, n) {
12712
- const { __scopePopper: r, ...o } = t, s = b0(ef, r), i = y0[s.placedSide];
12737
+ const { __scopePopper: r, ...o } = t, s = y0(ef, r), i = S0[s.placedSide];
12713
12738
  return (
12714
12739
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
12715
12740
  // doesn't report size as we'd expect on SVG elements.
@@ -12738,7 +12763,7 @@ var ef = "PopperArrow", y0 = {
12738
12763
  visibility: s.shouldHideArrow ? "hidden" : void 0
12739
12764
  },
12740
12765
  children: /* @__PURE__ */ l.jsx(
12741
- x0,
12766
+ v0,
12742
12767
  {
12743
12768
  ...o,
12744
12769
  ref: n,
@@ -12754,10 +12779,10 @@ var ef = "PopperArrow", y0 = {
12754
12779
  );
12755
12780
  });
12756
12781
  tf.displayName = ef;
12757
- function S0(e) {
12782
+ function C0(e) {
12758
12783
  return e !== null;
12759
12784
  }
12760
- var C0 = (e) => ({
12785
+ var T0 = (e) => ({
12761
12786
  name: "transformOrigin",
12762
12787
  options: e,
12763
12788
  fn(t) {
@@ -12771,14 +12796,14 @@ function nf(e) {
12771
12796
  const [t, n = "center"] = e.split("-");
12772
12797
  return [t, n];
12773
12798
  }
12774
- var rf = Xd, of = Zd, sf = Qd, af = tf, li = "rovingFocusGroup.onEntryFocus", T0 = { bubbles: !1, cancelable: !0 }, Xr = "RovingFocusGroup", [Pi, lf, R0] = wa(Xr), [E0, cf] = on(
12799
+ var rf = Xd, of = Zd, sf = Qd, af = tf, li = "rovingFocusGroup.onEntryFocus", R0 = { bubbles: !1, cancelable: !0 }, Xr = "RovingFocusGroup", [Pi, lf, E0] = wa(Xr), [k0, cf] = on(
12775
12800
  Xr,
12776
- [R0]
12777
- ), [k0, I0] = E0(Xr), uf = p.forwardRef(
12778
- (e, t) => /* @__PURE__ */ l.jsx(Pi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(Pi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(N0, { ...e, ref: t }) }) })
12801
+ [E0]
12802
+ ), [I0, N0] = k0(Xr), uf = p.forwardRef(
12803
+ (e, t) => /* @__PURE__ */ l.jsx(Pi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(Pi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(A0, { ...e, ref: t }) }) })
12779
12804
  );
12780
12805
  uf.displayName = Xr;
12781
- var N0 = p.forwardRef((e, t) => {
12806
+ var A0 = p.forwardRef((e, t) => {
12782
12807
  const {
12783
12808
  __scopeRovingFocusGroup: n,
12784
12809
  orientation: r,
@@ -12801,7 +12826,7 @@ var N0 = p.forwardRef((e, t) => {
12801
12826
  if (k)
12802
12827
  return k.addEventListener(li, y), () => k.removeEventListener(li, y);
12803
12828
  }, [y]), /* @__PURE__ */ l.jsx(
12804
- k0,
12829
+ I0,
12805
12830
  {
12806
12831
  scope: n,
12807
12832
  orientation: r,
@@ -12835,7 +12860,7 @@ var N0 = p.forwardRef((e, t) => {
12835
12860
  onFocus: ae(e.onFocus, (k) => {
12836
12861
  const N = !S.current;
12837
12862
  if (k.target === k.currentTarget && N && !x) {
12838
- const A = new CustomEvent(li, T0);
12863
+ const A = new CustomEvent(li, R0);
12839
12864
  if (k.currentTarget.dispatchEvent(A), !A.defaultPrevented) {
12840
12865
  const _ = R().filter((z) => z.focusable), L = _.find((z) => z.active), $ = _.find((z) => z.id === v), W = [L, $, ..._].filter(
12841
12866
  Boolean
@@ -12859,7 +12884,7 @@ var N0 = p.forwardRef((e, t) => {
12859
12884
  tabStopId: s,
12860
12885
  children: i,
12861
12886
  ...a
12862
- } = e, c = en(), u = s || c, d = I0(df, n), f = d.currentTabStopId === u, h = lf(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: v } = d;
12887
+ } = e, c = en(), u = s || c, d = N0(df, n), f = d.currentTabStopId === u, h = lf(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: v } = d;
12863
12888
  return p.useEffect(() => {
12864
12889
  if (r)
12865
12890
  return m(), () => w();
@@ -12887,7 +12912,7 @@ var N0 = p.forwardRef((e, t) => {
12887
12912
  return;
12888
12913
  }
12889
12914
  if (g.target !== g.currentTarget) return;
12890
- const x = j0(g, d.orientation, d.dir);
12915
+ const x = P0(g, d.orientation, d.dir);
12891
12916
  if (x !== void 0) {
12892
12917
  if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
12893
12918
  g.preventDefault();
@@ -12896,7 +12921,7 @@ var N0 = p.forwardRef((e, t) => {
12896
12921
  else if (x === "prev" || x === "next") {
12897
12922
  x === "prev" && y.reverse();
12898
12923
  const R = y.indexOf(g.currentTarget);
12899
- y = d.loop ? P0(y, R + 1) : y.slice(R + 1);
12924
+ y = d.loop ? O0(y, R + 1) : y.slice(R + 1);
12900
12925
  }
12901
12926
  setTimeout(() => hf(y));
12902
12927
  }
@@ -12909,7 +12934,7 @@ var N0 = p.forwardRef((e, t) => {
12909
12934
  }
12910
12935
  );
12911
12936
  ff.displayName = df;
12912
- var A0 = {
12937
+ var _0 = {
12913
12938
  ArrowLeft: "prev",
12914
12939
  ArrowUp: "prev",
12915
12940
  ArrowRight: "next",
@@ -12919,33 +12944,33 @@ var A0 = {
12919
12944
  PageDown: "last",
12920
12945
  End: "last"
12921
12946
  };
12922
- function _0(e, t) {
12947
+ function j0(e, t) {
12923
12948
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
12924
12949
  }
12925
- function j0(e, t, n) {
12926
- const r = _0(e.key, n);
12950
+ function P0(e, t, n) {
12951
+ const r = j0(e.key, n);
12927
12952
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
12928
- return A0[r];
12953
+ return _0[r];
12929
12954
  }
12930
12955
  function hf(e, t = !1) {
12931
12956
  const n = document.activeElement;
12932
12957
  for (const r of e)
12933
12958
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
12934
12959
  }
12935
- function P0(e, t) {
12960
+ function O0(e, t) {
12936
12961
  return e.map((n, r) => e[(t + r) % e.length]);
12937
12962
  }
12938
- var O0 = uf, M0 = ff, Oi = ["Enter", " "], D0 = ["ArrowDown", "PageUp", "Home"], pf = ["ArrowUp", "PageDown", "End"], L0 = [...D0, ...pf], $0 = {
12963
+ var M0 = uf, D0 = ff, Oi = ["Enter", " "], L0 = ["ArrowDown", "PageUp", "Home"], pf = ["ArrowUp", "PageDown", "End"], $0 = [...L0, ...pf], F0 = {
12939
12964
  ltr: [...Oi, "ArrowRight"],
12940
12965
  rtl: [...Oi, "ArrowLeft"]
12941
- }, F0 = {
12966
+ }, z0 = {
12942
12967
  ltr: ["ArrowLeft"],
12943
12968
  rtl: ["ArrowRight"]
12944
- }, Jr = "Menu", [zr, z0, B0] = wa(Jr), [Un, mf] = on(Jr, [
12945
- B0,
12969
+ }, Jr = "Menu", [zr, B0, H0] = wa(Jr), [Un, mf] = on(Jr, [
12970
+ H0,
12946
12971
  Cs,
12947
12972
  cf
12948
- ]), Ts = Cs(), gf = cf(), [H0, Wn] = Un(Jr), [U0, Zr] = Un(Jr), xf = (e) => {
12973
+ ]), Ts = Cs(), gf = cf(), [U0, Wn] = Un(Jr), [W0, Zr] = Un(Jr), xf = (e) => {
12949
12974
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ts(t), [c, u] = p.useState(null), d = p.useRef(!1), f = ft(s), h = ws(o);
12950
12975
  return p.useEffect(() => {
12951
12976
  const m = () => {
@@ -12955,7 +12980,7 @@ var O0 = uf, M0 = ff, Oi = ["Enter", " "], D0 = ["ArrowDown", "PageUp", "Home"],
12955
12980
  document.removeEventListener("keydown", m, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
12956
12981
  };
12957
12982
  }, []), /* @__PURE__ */ l.jsx(rf, { ...a, children: /* @__PURE__ */ l.jsx(
12958
- H0,
12983
+ U0,
12959
12984
  {
12960
12985
  scope: t,
12961
12986
  open: n,
@@ -12963,7 +12988,7 @@ var O0 = uf, M0 = ff, Oi = ["Enter", " "], D0 = ["ArrowDown", "PageUp", "Home"],
12963
12988
  content: c,
12964
12989
  onContentChange: u,
12965
12990
  children: /* @__PURE__ */ l.jsx(
12966
- U0,
12991
+ W0,
12967
12992
  {
12968
12993
  scope: t,
12969
12994
  onClose: p.useCallback(() => f(!1), [f]),
@@ -12977,26 +13002,26 @@ var O0 = uf, M0 = ff, Oi = ["Enter", " "], D0 = ["ArrowDown", "PageUp", "Home"],
12977
13002
  ) });
12978
13003
  };
12979
13004
  xf.displayName = Jr;
12980
- var W0 = "MenuAnchor", Na = p.forwardRef(
13005
+ var V0 = "MenuAnchor", Na = p.forwardRef(
12981
13006
  (e, t) => {
12982
13007
  const { __scopeMenu: n, ...r } = e, o = Ts(n);
12983
13008
  return /* @__PURE__ */ l.jsx(of, { ...o, ...r, ref: t });
12984
13009
  }
12985
13010
  );
12986
- Na.displayName = W0;
12987
- var Aa = "MenuPortal", [V0, vf] = Un(Aa, {
13011
+ Na.displayName = V0;
13012
+ var Aa = "MenuPortal", [K0, vf] = Un(Aa, {
12988
13013
  forceMount: void 0
12989
13014
  }), wf = (e) => {
12990
13015
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Wn(Aa, t);
12991
- return /* @__PURE__ */ l.jsx(V0, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(_t, { present: n || s.open, children: /* @__PURE__ */ l.jsx(fs, { asChild: !0, container: o, children: r }) }) });
13016
+ return /* @__PURE__ */ l.jsx(K0, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(_t, { present: n || s.open, children: /* @__PURE__ */ l.jsx(fs, { asChild: !0, container: o, children: r }) }) });
12992
13017
  };
12993
13018
  wf.displayName = Aa;
12994
- var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13019
+ var $t = "MenuContent", [q0, _a] = Un($t), bf = p.forwardRef(
12995
13020
  (e, t) => {
12996
13021
  const n = vf($t, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Wn($t, e.__scopeMenu), i = Zr($t, e.__scopeMenu);
12997
- return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: /* @__PURE__ */ l.jsx(zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(q0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(G0, { ...o, ref: t }) }) }) });
13022
+ return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(_t, { present: r || s.open, children: /* @__PURE__ */ l.jsx(zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(G0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(Y0, { ...o, ref: t }) }) }) });
12998
13023
  }
12999
- ), q0 = p.forwardRef(
13024
+ ), G0 = p.forwardRef(
13000
13025
  (e, t) => {
13001
13026
  const n = Wn($t, e.__scopeMenu), r = p.useRef(null), o = Me(t, r);
13002
13027
  return p.useEffect(() => {
@@ -13019,7 +13044,7 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13019
13044
  }
13020
13045
  );
13021
13046
  }
13022
- ), G0 = p.forwardRef((e, t) => {
13047
+ ), Y0 = p.forwardRef((e, t) => {
13023
13048
  const n = Wn($t, e.__scopeMenu);
13024
13049
  return /* @__PURE__ */ l.jsx(
13025
13050
  ja,
@@ -13032,7 +13057,7 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13032
13057
  onDismiss: () => n.onOpenChange(!1)
13033
13058
  }
13034
13059
  );
13035
- }), Y0 = nr("MenuContent.ScrollLock"), ja = p.forwardRef(
13060
+ }), X0 = nr("MenuContent.ScrollLock"), ja = p.forwardRef(
13036
13061
  (e, t) => {
13037
13062
  const {
13038
13063
  __scopeMenu: n,
@@ -13049,9 +13074,9 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13049
13074
  onDismiss: m,
13050
13075
  disableOutsideScroll: w,
13051
13076
  ...v
13052
- } = e, g = Wn($t, n), x = Zr($t, n), b = Ts(n), y = gf(n), R = z0(n), [S, C] = p.useState(null), E = p.useRef(null), k = Me(t, E, g.onContentChange), N = p.useRef(0), A = p.useRef(""), _ = p.useRef(0), L = p.useRef(null), $ = p.useRef("right"), P = p.useRef(0), W = w ? ps : p.Fragment, z = w ? { as: Y0, allowPinchZoom: !0 } : void 0, q = (I) => {
13077
+ } = e, g = Wn($t, n), x = Zr($t, n), b = Ts(n), y = gf(n), R = B0(n), [S, C] = p.useState(null), E = p.useRef(null), k = Me(t, E, g.onContentChange), N = p.useRef(0), A = p.useRef(""), _ = p.useRef(0), L = p.useRef(null), $ = p.useRef("right"), P = p.useRef(0), W = w ? ps : p.Fragment, z = w ? { as: X0, allowPinchZoom: !0 } : void 0, q = (I) => {
13053
13078
  var K, O;
13054
- const M = A.current + I, H = R().filter((Y) => !Y.disabled), X = document.activeElement, Q = (K = H.find((Y) => Y.ref.current === X)) == null ? void 0 : K.textValue, ce = H.map((Y) => Y.textValue), ve = aS(ce, M, Q), Ee = (O = H.find((Y) => Y.textValue === ve)) == null ? void 0 : O.ref.current;
13079
+ const M = A.current + I, H = R().filter((Y) => !Y.disabled), X = document.activeElement, Q = (K = H.find((Y) => Y.ref.current === X)) == null ? void 0 : K.textValue, ce = H.map((Y) => Y.textValue), ve = lS(ce, M, Q), Ee = (O = H.find((Y) => Y.textValue === ve)) == null ? void 0 : O.ref.current;
13055
13080
  (function Y(ee) {
13056
13081
  A.current = ee, window.clearTimeout(N.current), ee !== "" && (N.current = window.setTimeout(() => Y(""), 1e3));
13057
13082
  })(M), Ee && setTimeout(() => Ee.focus());
@@ -13059,10 +13084,10 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13059
13084
  p.useEffect(() => () => window.clearTimeout(N.current), []), pa();
13060
13085
  const D = p.useCallback((I) => {
13061
13086
  var H, X;
13062
- return $.current === ((H = L.current) == null ? void 0 : H.side) && cS(I, (X = L.current) == null ? void 0 : X.area);
13087
+ return $.current === ((H = L.current) == null ? void 0 : H.side) && uS(I, (X = L.current) == null ? void 0 : X.area);
13063
13088
  }, []);
13064
13089
  return /* @__PURE__ */ l.jsx(
13065
- K0,
13090
+ q0,
13066
13091
  {
13067
13092
  scope: n,
13068
13093
  searchRef: A,
@@ -13110,7 +13135,7 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13110
13135
  onInteractOutside: h,
13111
13136
  onDismiss: m,
13112
13137
  children: /* @__PURE__ */ l.jsx(
13113
- O0,
13138
+ M0,
13114
13139
  {
13115
13140
  asChild: !0,
13116
13141
  ...y,
@@ -13139,10 +13164,10 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13139
13164
  const H = I.target.closest("[data-radix-menu-content]") === I.currentTarget, X = I.ctrlKey || I.altKey || I.metaKey, Q = I.key.length === 1;
13140
13165
  H && (I.key === "Tab" && I.preventDefault(), !X && Q && q(I.key));
13141
13166
  const ce = E.current;
13142
- if (I.target !== ce || !L0.includes(I.key)) return;
13167
+ if (I.target !== ce || !$0.includes(I.key)) return;
13143
13168
  I.preventDefault();
13144
13169
  const Ee = R().filter((K) => !K.disabled).map((K) => K.ref.current);
13145
- pf.includes(I.key) && Ee.reverse(), sS(Ee);
13170
+ pf.includes(I.key) && Ee.reverse(), iS(Ee);
13146
13171
  }),
13147
13172
  onBlur: ae(e.onBlur, (I) => {
13148
13173
  I.currentTarget.contains(I.target) || (window.clearTimeout(N.current), A.current = "");
@@ -13170,20 +13195,20 @@ var $t = "MenuContent", [K0, _a] = Un($t), bf = p.forwardRef(
13170
13195
  }
13171
13196
  );
13172
13197
  bf.displayName = $t;
13173
- var X0 = "MenuGroup", Pa = p.forwardRef(
13198
+ var J0 = "MenuGroup", Pa = p.forwardRef(
13174
13199
  (e, t) => {
13175
13200
  const { __scopeMenu: n, ...r } = e;
13176
13201
  return /* @__PURE__ */ l.jsx(Ce.div, { role: "group", ...r, ref: t });
13177
13202
  }
13178
13203
  );
13179
- Pa.displayName = X0;
13180
- var J0 = "MenuLabel", yf = p.forwardRef(
13204
+ Pa.displayName = J0;
13205
+ var Z0 = "MenuLabel", yf = p.forwardRef(
13181
13206
  (e, t) => {
13182
13207
  const { __scopeMenu: n, ...r } = e;
13183
13208
  return /* @__PURE__ */ l.jsx(Ce.div, { ...r, ref: t });
13184
13209
  }
13185
13210
  );
13186
- yf.displayName = J0;
13211
+ yf.displayName = Z0;
13187
13212
  var Wo = "MenuItem", xc = "menu.itemSelect", Rs = p.forwardRef(
13188
13213
  (e, t) => {
13189
13214
  const { disabled: n = !1, onSelect: r, ...o } = e, s = p.useRef(null), i = Zr(Wo, e.__scopeMenu), a = _a(Wo, e.__scopeMenu), c = Me(t, s), u = p.useRef(!1), d = () => {
@@ -13229,7 +13254,7 @@ var Sf = p.forwardRef(
13229
13254
  scope: n,
13230
13255
  disabled: r,
13231
13256
  textValue: o ?? h,
13232
- children: /* @__PURE__ */ l.jsx(M0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ l.jsx(
13257
+ children: /* @__PURE__ */ l.jsx(D0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ l.jsx(
13233
13258
  Ce.div,
13234
13259
  {
13235
13260
  role: "menuitem",
@@ -13255,7 +13280,7 @@ var Sf = p.forwardRef(
13255
13280
  }
13256
13281
  );
13257
13282
  }
13258
- ), Z0 = "MenuCheckboxItem", Cf = p.forwardRef(
13283
+ ), Q0 = "MenuCheckboxItem", Cf = p.forwardRef(
13259
13284
  (e, t) => {
13260
13285
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
13261
13286
  return /* @__PURE__ */ l.jsx(If, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ l.jsx(
@@ -13275,21 +13300,21 @@ var Sf = p.forwardRef(
13275
13300
  ) });
13276
13301
  }
13277
13302
  );
13278
- Cf.displayName = Z0;
13279
- var Tf = "MenuRadioGroup", [Q0, eS] = Un(
13303
+ Cf.displayName = Q0;
13304
+ var Tf = "MenuRadioGroup", [eS, tS] = Un(
13280
13305
  Tf,
13281
13306
  { value: void 0, onValueChange: () => {
13282
13307
  } }
13283
13308
  ), Rf = p.forwardRef(
13284
13309
  (e, t) => {
13285
13310
  const { value: n, onValueChange: r, ...o } = e, s = ft(r);
13286
- return /* @__PURE__ */ l.jsx(Q0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(Pa, { ...o, ref: t }) });
13311
+ return /* @__PURE__ */ l.jsx(eS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(Pa, { ...o, ref: t }) });
13287
13312
  }
13288
13313
  );
13289
13314
  Rf.displayName = Tf;
13290
13315
  var Ef = "MenuRadioItem", kf = p.forwardRef(
13291
13316
  (e, t) => {
13292
- const { value: n, ...r } = e, o = eS(Ef, e.__scopeMenu), s = n === o.value;
13317
+ const { value: n, ...r } = e, o = tS(Ef, e.__scopeMenu), s = n === o.value;
13293
13318
  return /* @__PURE__ */ l.jsx(If, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ l.jsx(
13294
13319
  Rs,
13295
13320
  {
@@ -13311,12 +13336,12 @@ var Ef = "MenuRadioItem", kf = p.forwardRef(
13311
13336
  }
13312
13337
  );
13313
13338
  kf.displayName = Ef;
13314
- var Oa = "MenuItemIndicator", [If, tS] = Un(
13339
+ var Oa = "MenuItemIndicator", [If, nS] = Un(
13315
13340
  Oa,
13316
13341
  { checked: !1 }
13317
13342
  ), Nf = p.forwardRef(
13318
13343
  (e, t) => {
13319
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = tS(Oa, n);
13344
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = nS(Oa, n);
13320
13345
  return /* @__PURE__ */ l.jsx(
13321
13346
  _t,
13322
13347
  {
@@ -13334,7 +13359,7 @@ var Oa = "MenuItemIndicator", [If, tS] = Un(
13334
13359
  }
13335
13360
  );
13336
13361
  Nf.displayName = Oa;
13337
- var nS = "MenuSeparator", Af = p.forwardRef(
13362
+ var rS = "MenuSeparator", Af = p.forwardRef(
13338
13363
  (e, t) => {
13339
13364
  const { __scopeMenu: n, ...r } = e;
13340
13365
  return /* @__PURE__ */ l.jsx(
@@ -13348,15 +13373,15 @@ var nS = "MenuSeparator", Af = p.forwardRef(
13348
13373
  );
13349
13374
  }
13350
13375
  );
13351
- Af.displayName = nS;
13352
- var rS = "MenuArrow", _f = p.forwardRef(
13376
+ Af.displayName = rS;
13377
+ var oS = "MenuArrow", _f = p.forwardRef(
13353
13378
  (e, t) => {
13354
13379
  const { __scopeMenu: n, ...r } = e, o = Ts(n);
13355
13380
  return /* @__PURE__ */ l.jsx(af, { ...o, ...r, ref: t });
13356
13381
  }
13357
13382
  );
13358
- _f.displayName = rS;
13359
- var oS = "MenuSub", [FT, jf] = Un(oS), Tr = "MenuSubTrigger", Pf = p.forwardRef(
13383
+ _f.displayName = oS;
13384
+ var sS = "MenuSub", [zT, jf] = Un(sS), Tr = "MenuSubTrigger", Pf = p.forwardRef(
13360
13385
  (e, t) => {
13361
13386
  const n = Wn(Tr, e.__scopeMenu), r = Zr(Tr, e.__scopeMenu), o = jf(Tr, e.__scopeMenu), s = _a(Tr, e.__scopeMenu), i = p.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, u = { __scopeMenu: e.__scopeMenu }, d = p.useCallback(() => {
13362
13387
  i.current && window.clearTimeout(i.current), i.current = null;
@@ -13420,7 +13445,7 @@ var oS = "MenuSub", [FT, jf] = Un(oS), Tr = "MenuSubTrigger", Pf = p.forwardRef(
13420
13445
  onKeyDown: ae(e.onKeyDown, (f) => {
13421
13446
  var m;
13422
13447
  const h = s.searchRef.current !== "";
13423
- e.disabled || h && f.key === " " || $0[r.dir].includes(f.key) && (n.onOpenChange(!0), (m = n.content) == null || m.focus(), f.preventDefault());
13448
+ e.disabled || h && f.key === " " || F0[r.dir].includes(f.key) && (n.onOpenChange(!0), (m = n.content) == null || m.focus(), f.preventDefault());
13424
13449
  })
13425
13450
  }
13426
13451
  ) });
@@ -13455,7 +13480,7 @@ var Of = "MenuSubContent", Mf = p.forwardRef(
13455
13480
  }),
13456
13481
  onKeyDown: ae(e.onKeyDown, (d) => {
13457
13482
  var m;
13458
- const f = d.currentTarget.contains(d.target), h = F0[i.dir].includes(d.key);
13483
+ const f = d.currentTarget.contains(d.target), h = z0[i.dir].includes(d.key);
13459
13484
  f && h && (s.onOpenChange(!1), (m = a.trigger) == null || m.focus(), d.preventDefault());
13460
13485
  })
13461
13486
  }
@@ -13472,24 +13497,24 @@ function Vo(e) {
13472
13497
  function Ma(e) {
13473
13498
  return Vo(e) ? "indeterminate" : e ? "checked" : "unchecked";
13474
13499
  }
13475
- function sS(e) {
13500
+ function iS(e) {
13476
13501
  const t = document.activeElement;
13477
13502
  for (const n of e)
13478
13503
  if (n === t || (n.focus(), document.activeElement !== t)) return;
13479
13504
  }
13480
- function iS(e, t) {
13505
+ function aS(e, t) {
13481
13506
  return e.map((n, r) => e[(t + r) % e.length]);
13482
13507
  }
13483
- function aS(e, t, n) {
13508
+ function lS(e, t, n) {
13484
13509
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
13485
- let i = iS(e, Math.max(s, 0));
13510
+ let i = aS(e, Math.max(s, 0));
13486
13511
  o.length === 1 && (i = i.filter((u) => u !== n));
13487
13512
  const c = i.find(
13488
13513
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
13489
13514
  );
13490
13515
  return c !== n ? c : void 0;
13491
13516
  }
13492
- function lS(e, t) {
13517
+ function cS(e, t) {
13493
13518
  const { x: n, y: r } = e;
13494
13519
  let o = !1;
13495
13520
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -13498,18 +13523,18 @@ function lS(e, t) {
13498
13523
  }
13499
13524
  return o;
13500
13525
  }
13501
- function cS(e, t) {
13526
+ function uS(e, t) {
13502
13527
  if (!t) return !1;
13503
13528
  const n = { x: e.clientX, y: e.clientY };
13504
- return lS(n, t);
13529
+ return cS(n, t);
13505
13530
  }
13506
13531
  function Br(e) {
13507
13532
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
13508
13533
  }
13509
- var uS = xf, dS = Na, fS = wf, hS = bf, pS = Pa, mS = yf, gS = Rs, xS = Cf, vS = Rf, wS = kf, bS = Nf, yS = Af, SS = _f, CS = Pf, TS = Mf, Es = "DropdownMenu", [RS, zT] = on(
13534
+ var dS = xf, fS = Na, hS = wf, pS = bf, mS = Pa, gS = yf, xS = Rs, vS = Cf, wS = Rf, bS = kf, yS = Nf, SS = Af, CS = _f, TS = Pf, RS = Mf, Es = "DropdownMenu", [ES, BT] = on(
13510
13535
  Es,
13511
13536
  [mf]
13512
- ), bt = mf(), [ES, Lf] = RS(Es), $f = (e) => {
13537
+ ), bt = mf(), [kS, Lf] = ES(Es), $f = (e) => {
13513
13538
  const {
13514
13539
  __scopeDropdownMenu: t,
13515
13540
  children: n,
@@ -13525,7 +13550,7 @@ var uS = xf, dS = Na, fS = wf, hS = bf, pS = Pa, mS = yf, gS = Rs, xS = Cf, vS =
13525
13550
  caller: Es
13526
13551
  });
13527
13552
  return /* @__PURE__ */ l.jsx(
13528
- ES,
13553
+ kS,
13529
13554
  {
13530
13555
  scope: t,
13531
13556
  triggerId: en(),
@@ -13535,7 +13560,7 @@ var uS = xf, dS = Na, fS = wf, hS = bf, pS = Pa, mS = yf, gS = Rs, xS = Cf, vS =
13535
13560
  onOpenChange: f,
13536
13561
  onOpenToggle: p.useCallback(() => f((h) => !h), [f]),
13537
13562
  modal: a,
13538
- children: /* @__PURE__ */ l.jsx(uS, { ...c, open: d, onOpenChange: f, dir: r, modal: a, children: n })
13563
+ children: /* @__PURE__ */ l.jsx(dS, { ...c, open: d, onOpenChange: f, dir: r, modal: a, children: n })
13539
13564
  }
13540
13565
  );
13541
13566
  };
@@ -13543,7 +13568,7 @@ $f.displayName = Es;
13543
13568
  var Ff = "DropdownMenuTrigger", zf = p.forwardRef(
13544
13569
  (e, t) => {
13545
13570
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Lf(Ff, n), i = bt(n);
13546
- return /* @__PURE__ */ l.jsx(dS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
13571
+ return /* @__PURE__ */ l.jsx(fS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
13547
13572
  Ce.button,
13548
13573
  {
13549
13574
  type: "button",
@@ -13567,16 +13592,16 @@ var Ff = "DropdownMenuTrigger", zf = p.forwardRef(
13567
13592
  }
13568
13593
  );
13569
13594
  zf.displayName = Ff;
13570
- var kS = "DropdownMenuPortal", Bf = (e) => {
13595
+ var IS = "DropdownMenuPortal", Bf = (e) => {
13571
13596
  const { __scopeDropdownMenu: t, ...n } = e, r = bt(t);
13572
- return /* @__PURE__ */ l.jsx(fS, { ...r, ...n });
13597
+ return /* @__PURE__ */ l.jsx(hS, { ...r, ...n });
13573
13598
  };
13574
- Bf.displayName = kS;
13599
+ Bf.displayName = IS;
13575
13600
  var Hf = "DropdownMenuContent", Uf = p.forwardRef(
13576
13601
  (e, t) => {
13577
13602
  const { __scopeDropdownMenu: n, ...r } = e, o = Lf(Hf, n), s = bt(n), i = p.useRef(!1);
13578
13603
  return /* @__PURE__ */ l.jsx(
13579
- hS,
13604
+ pS,
13580
13605
  {
13581
13606
  id: o.contentId,
13582
13607
  "aria-labelledby": o.triggerId,
@@ -13604,68 +13629,68 @@ var Hf = "DropdownMenuContent", Uf = p.forwardRef(
13604
13629
  }
13605
13630
  );
13606
13631
  Uf.displayName = Hf;
13607
- var IS = "DropdownMenuGroup", NS = p.forwardRef(
13632
+ var NS = "DropdownMenuGroup", AS = p.forwardRef(
13608
13633
  (e, t) => {
13609
13634
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13610
- return /* @__PURE__ */ l.jsx(pS, { ...o, ...r, ref: t });
13635
+ return /* @__PURE__ */ l.jsx(mS, { ...o, ...r, ref: t });
13611
13636
  }
13612
13637
  );
13613
- NS.displayName = IS;
13614
- var AS = "DropdownMenuLabel", Wf = p.forwardRef(
13638
+ AS.displayName = NS;
13639
+ var _S = "DropdownMenuLabel", Wf = p.forwardRef(
13615
13640
  (e, t) => {
13616
13641
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13617
- return /* @__PURE__ */ l.jsx(mS, { ...o, ...r, ref: t });
13642
+ return /* @__PURE__ */ l.jsx(gS, { ...o, ...r, ref: t });
13618
13643
  }
13619
13644
  );
13620
- Wf.displayName = AS;
13621
- var _S = "DropdownMenuItem", Vf = p.forwardRef(
13645
+ Wf.displayName = _S;
13646
+ var jS = "DropdownMenuItem", Vf = p.forwardRef(
13622
13647
  (e, t) => {
13623
13648
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13624
- return /* @__PURE__ */ l.jsx(gS, { ...o, ...r, ref: t });
13649
+ return /* @__PURE__ */ l.jsx(xS, { ...o, ...r, ref: t });
13625
13650
  }
13626
13651
  );
13627
- Vf.displayName = _S;
13628
- var jS = "DropdownMenuCheckboxItem", Kf = p.forwardRef((e, t) => {
13629
- const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13630
- return /* @__PURE__ */ l.jsx(xS, { ...o, ...r, ref: t });
13631
- });
13632
- Kf.displayName = jS;
13633
- var PS = "DropdownMenuRadioGroup", OS = p.forwardRef((e, t) => {
13652
+ Vf.displayName = jS;
13653
+ var PS = "DropdownMenuCheckboxItem", Kf = p.forwardRef((e, t) => {
13634
13654
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13635
13655
  return /* @__PURE__ */ l.jsx(vS, { ...o, ...r, ref: t });
13636
13656
  });
13637
- OS.displayName = PS;
13638
- var MS = "DropdownMenuRadioItem", qf = p.forwardRef((e, t) => {
13657
+ Kf.displayName = PS;
13658
+ var OS = "DropdownMenuRadioGroup", MS = p.forwardRef((e, t) => {
13639
13659
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13640
13660
  return /* @__PURE__ */ l.jsx(wS, { ...o, ...r, ref: t });
13641
13661
  });
13642
- qf.displayName = MS;
13643
- var DS = "DropdownMenuItemIndicator", Gf = p.forwardRef((e, t) => {
13662
+ MS.displayName = OS;
13663
+ var DS = "DropdownMenuRadioItem", qf = p.forwardRef((e, t) => {
13644
13664
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13645
13665
  return /* @__PURE__ */ l.jsx(bS, { ...o, ...r, ref: t });
13646
13666
  });
13647
- Gf.displayName = DS;
13648
- var LS = "DropdownMenuSeparator", Yf = p.forwardRef((e, t) => {
13667
+ qf.displayName = DS;
13668
+ var LS = "DropdownMenuItemIndicator", Gf = p.forwardRef((e, t) => {
13649
13669
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13650
13670
  return /* @__PURE__ */ l.jsx(yS, { ...o, ...r, ref: t });
13651
13671
  });
13652
- Yf.displayName = LS;
13653
- var $S = "DropdownMenuArrow", FS = p.forwardRef(
13672
+ Gf.displayName = LS;
13673
+ var $S = "DropdownMenuSeparator", Yf = p.forwardRef((e, t) => {
13674
+ const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13675
+ return /* @__PURE__ */ l.jsx(SS, { ...o, ...r, ref: t });
13676
+ });
13677
+ Yf.displayName = $S;
13678
+ var FS = "DropdownMenuArrow", zS = p.forwardRef(
13654
13679
  (e, t) => {
13655
13680
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13656
- return /* @__PURE__ */ l.jsx(SS, { ...o, ...r, ref: t });
13681
+ return /* @__PURE__ */ l.jsx(CS, { ...o, ...r, ref: t });
13657
13682
  }
13658
13683
  );
13659
- FS.displayName = $S;
13660
- var zS = "DropdownMenuSubTrigger", Xf = p.forwardRef((e, t) => {
13684
+ zS.displayName = FS;
13685
+ var BS = "DropdownMenuSubTrigger", Xf = p.forwardRef((e, t) => {
13661
13686
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13662
- return /* @__PURE__ */ l.jsx(CS, { ...o, ...r, ref: t });
13687
+ return /* @__PURE__ */ l.jsx(TS, { ...o, ...r, ref: t });
13663
13688
  });
13664
- Xf.displayName = zS;
13665
- var BS = "DropdownMenuSubContent", Jf = p.forwardRef((e, t) => {
13689
+ Xf.displayName = BS;
13690
+ var HS = "DropdownMenuSubContent", Jf = p.forwardRef((e, t) => {
13666
13691
  const { __scopeDropdownMenu: n, ...r } = e, o = bt(n);
13667
13692
  return /* @__PURE__ */ l.jsx(
13668
- TS,
13693
+ RS,
13669
13694
  {
13670
13695
  ...o,
13671
13696
  ...r,
@@ -13681,9 +13706,9 @@ var BS = "DropdownMenuSubContent", Jf = p.forwardRef((e, t) => {
13681
13706
  }
13682
13707
  );
13683
13708
  });
13684
- Jf.displayName = BS;
13685
- var HS = $f, US = zf, WS = Bf, Zf = Uf, Qf = Wf, eh = Vf, th = Kf, nh = qf, rh = Gf, oh = Yf, sh = Xf, ih = Jf;
13686
- const VS = HS, KS = US, qS = p.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
13709
+ Jf.displayName = HS;
13710
+ var US = $f, WS = zf, VS = Bf, Zf = Uf, Qf = Wf, eh = Vf, th = Kf, nh = qf, rh = Gf, oh = Yf, sh = Xf, ih = Jf;
13711
+ const KS = US, qS = WS, GS = p.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
13687
13712
  sh,
13688
13713
  {
13689
13714
  ref: o,
@@ -13699,8 +13724,8 @@ const VS = HS, KS = US, qS = p.forwardRef(({ className: e, inset: t, children: n
13699
13724
  ]
13700
13725
  }
13701
13726
  ));
13702
- qS.displayName = sh.displayName;
13703
- const GS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13727
+ GS.displayName = sh.displayName;
13728
+ const YS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13704
13729
  ih,
13705
13730
  {
13706
13731
  ref: n,
@@ -13711,8 +13736,8 @@ const GS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13711
13736
  ...t
13712
13737
  }
13713
13738
  ));
13714
- GS.displayName = ih.displayName;
13715
- const ah = p.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ l.jsx(WS, { children: /* @__PURE__ */ l.jsx(
13739
+ YS.displayName = ih.displayName;
13740
+ const ah = p.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ l.jsx(VS, { children: /* @__PURE__ */ l.jsx(
13716
13741
  Zf,
13717
13742
  {
13718
13743
  ref: r,
@@ -13738,7 +13763,7 @@ const Mi = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
13738
13763
  }
13739
13764
  ));
13740
13765
  Mi.displayName = eh.displayName;
13741
- const YS = p.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
13766
+ const XS = p.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
13742
13767
  th,
13743
13768
  {
13744
13769
  ref: o,
@@ -13754,8 +13779,8 @@ const YS = p.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
13754
13779
  ]
13755
13780
  }
13756
13781
  ));
13757
- YS.displayName = th.displayName;
13758
- const XS = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
13782
+ XS.displayName = th.displayName;
13783
+ const JS = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
13759
13784
  nh,
13760
13785
  {
13761
13786
  ref: r,
@@ -13770,8 +13795,8 @@ const XS = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
13770
13795
  ]
13771
13796
  }
13772
13797
  ));
13773
- XS.displayName = nh.displayName;
13774
- const JS = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ l.jsx(
13798
+ JS.displayName = nh.displayName;
13799
+ const ZS = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ l.jsx(
13775
13800
  Qf,
13776
13801
  {
13777
13802
  ref: r,
@@ -13783,8 +13808,8 @@ const JS = p.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
13783
13808
  ...n
13784
13809
  }
13785
13810
  ));
13786
- JS.displayName = Qf.displayName;
13787
- const ZS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13811
+ ZS.displayName = Qf.displayName;
13812
+ const QS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13788
13813
  oh,
13789
13814
  {
13790
13815
  ref: n,
@@ -13792,7 +13817,7 @@ const ZS = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13792
13817
  ...t
13793
13818
  }
13794
13819
  ));
13795
- ZS.displayName = oh.displayName;
13820
+ QS.displayName = oh.displayName;
13796
13821
  function ci({
13797
13822
  className: e = "",
13798
13823
  placeholder: t = "Type your message...",
@@ -13901,7 +13926,7 @@ function ci({
13901
13926
  if (ie.length > No)
13902
13927
  return `Message too long (${ie.length}/${No} characters)`;
13903
13928
  try {
13904
- return oy(ie), null;
13929
+ return sy(ie), null;
13905
13930
  } catch (xe) {
13906
13931
  return (xe == null ? void 0 : xe.message) || "Invalid message";
13907
13932
  }
@@ -14138,8 +14163,8 @@ function ci({
14138
14163
  ] }),
14139
14164
  I && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: I }),
14140
14165
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
14141
- (a || c) && /* @__PURE__ */ l.jsxs(VS, { children: [
14142
- /* @__PURE__ */ l.jsx(KS, { asChild: !0, children: /* @__PURE__ */ l.jsx(
14166
+ (a || c) && /* @__PURE__ */ l.jsxs(KS, { children: [
14167
+ /* @__PURE__ */ l.jsx(qS, { asChild: !0, children: /* @__PURE__ */ l.jsx(
14143
14168
  ze,
14144
14169
  {
14145
14170
  type: "button",
@@ -14176,7 +14201,7 @@ function ci({
14176
14201
  ] })
14177
14202
  ] }),
14178
14203
  /* @__PURE__ */ l.jsx("div", { className: "flex-1", children: /* @__PURE__ */ l.jsx(
14179
- mx,
14204
+ gx,
14180
14205
  {
14181
14206
  initialValue: q,
14182
14207
  editingMessageId: W,
@@ -14213,10 +14238,10 @@ Ko.displayName = "Input";
14213
14238
  function Di(e, [t, n]) {
14214
14239
  return Math.min(n, Math.max(t, e));
14215
14240
  }
14216
- function QS(e, t) {
14241
+ function eC(e, t) {
14217
14242
  return p.useReducer((n, r) => t[n][r] ?? n, e);
14218
14243
  }
14219
- var Da = "ScrollArea", [lh, BT] = on(Da), [eC, zt] = lh(Da), ch = p.forwardRef(
14244
+ var Da = "ScrollArea", [lh, HT] = on(Da), [tC, zt] = lh(Da), ch = p.forwardRef(
14220
14245
  (e, t) => {
14221
14246
  const {
14222
14247
  __scopeScrollArea: n,
@@ -14226,7 +14251,7 @@ var Da = "ScrollArea", [lh, BT] = on(Da), [eC, zt] = lh(Da), ch = p.forwardRef(
14226
14251
  ...i
14227
14252
  } = e, [a, c] = p.useState(null), [u, d] = p.useState(null), [f, h] = p.useState(null), [m, w] = p.useState(null), [v, g] = p.useState(null), [x, b] = p.useState(0), [y, R] = p.useState(0), [S, C] = p.useState(!1), [E, k] = p.useState(!1), N = Me(t, (_) => c(_)), A = ws(o);
14228
14253
  return /* @__PURE__ */ l.jsx(
14229
- eC,
14254
+ tC,
14230
14255
  {
14231
14256
  scope: n,
14232
14257
  type: r,
@@ -14314,11 +14339,11 @@ var an = "ScrollAreaScrollbar", La = p.forwardRef(
14314
14339
  const { forceMount: n, ...r } = e, o = zt(an, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
14315
14340
  return p.useEffect(() => (a ? s(!0) : i(!0), () => {
14316
14341
  a ? s(!1) : i(!1);
14317
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(tC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(nC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(fh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx($a, { ...r, ref: t }) : null;
14342
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(nC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(rC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(fh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx($a, { ...r, ref: t }) : null;
14318
14343
  }
14319
14344
  );
14320
14345
  La.displayName = an;
14321
- var tC = p.forwardRef((e, t) => {
14346
+ var nC = p.forwardRef((e, t) => {
14322
14347
  const { forceMount: n, ...r } = e, o = zt(an, e.__scopeScrollArea), [s, i] = p.useState(!1);
14323
14348
  return p.useEffect(() => {
14324
14349
  const a = o.scrollArea;
@@ -14341,8 +14366,8 @@ var tC = p.forwardRef((e, t) => {
14341
14366
  ref: t
14342
14367
  }
14343
14368
  ) });
14344
- }), nC = p.forwardRef((e, t) => {
14345
- const { forceMount: n, ...r } = e, o = zt(an, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Is(() => c("SCROLL_END"), 100), [a, c] = QS("hidden", {
14369
+ }), rC = p.forwardRef((e, t) => {
14370
+ const { forceMount: n, ...r } = e, o = zt(an, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Is(() => c("SCROLL_END"), 100), [a, c] = eC("hidden", {
14346
14371
  hidden: {
14347
14372
  SCROLL: "scrolling"
14348
14373
  },
@@ -14415,10 +14440,10 @@ var tC = p.forwardRef((e, t) => {
14415
14440
  onThumbPointerDown: (h) => i.current = h
14416
14441
  };
14417
14442
  function f(h, m) {
14418
- return lC(h, i.current, a, m);
14443
+ return cC(h, i.current, a, m);
14419
14444
  }
14420
14445
  return n === "horizontal" ? /* @__PURE__ */ l.jsx(
14421
- rC,
14446
+ oC,
14422
14447
  {
14423
14448
  ...d,
14424
14449
  ref: t,
@@ -14436,7 +14461,7 @@ var tC = p.forwardRef((e, t) => {
14436
14461
  }
14437
14462
  }
14438
14463
  ) : n === "vertical" ? /* @__PURE__ */ l.jsx(
14439
- oC,
14464
+ sC,
14440
14465
  {
14441
14466
  ...d,
14442
14467
  ref: t,
@@ -14454,7 +14479,7 @@ var tC = p.forwardRef((e, t) => {
14454
14479
  }
14455
14480
  }
14456
14481
  ) : null;
14457
- }), rC = p.forwardRef((e, t) => {
14482
+ }), oC = p.forwardRef((e, t) => {
14458
14483
  const { sizes: n, onSizesChange: r, ...o } = e, s = zt(an, e.__scopeScrollArea), [i, a] = p.useState(), c = p.useRef(null), u = Me(t, c, s.onScrollbarXChange);
14459
14484
  return p.useEffect(() => {
14460
14485
  c.current && a(getComputedStyle(c.current));
@@ -14493,7 +14518,7 @@ var tC = p.forwardRef((e, t) => {
14493
14518
  }
14494
14519
  }
14495
14520
  );
14496
- }), oC = p.forwardRef((e, t) => {
14521
+ }), sC = p.forwardRef((e, t) => {
14497
14522
  const { sizes: n, onSizesChange: r, ...o } = e, s = zt(an, e.__scopeScrollArea), [i, a] = p.useState(), c = p.useRef(null), u = Me(t, c, s.onScrollbarYChange);
14498
14523
  return p.useEffect(() => {
14499
14524
  c.current && a(getComputedStyle(c.current));
@@ -14533,7 +14558,7 @@ var tC = p.forwardRef((e, t) => {
14533
14558
  }
14534
14559
  }
14535
14560
  );
14536
- }), [sC, hh] = lh(an), ph = p.forwardRef((e, t) => {
14561
+ }), [iC, hh] = lh(an), ph = p.forwardRef((e, t) => {
14537
14562
  const {
14538
14563
  __scopeScrollArea: n,
14539
14564
  sizes: r,
@@ -14560,7 +14585,7 @@ var tC = p.forwardRef((e, t) => {
14560
14585
  };
14561
14586
  return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
14562
14587
  }, [y, w, R, S]), p.useEffect(C, [r, C]), sr(w, E), sr(m.content, E), /* @__PURE__ */ l.jsx(
14563
- sC,
14588
+ iC,
14564
14589
  {
14565
14590
  scope: n,
14566
14591
  scrollbar: w,
@@ -14590,9 +14615,9 @@ var tC = p.forwardRef((e, t) => {
14590
14615
  }), qo = "ScrollAreaThumb", mh = p.forwardRef(
14591
14616
  (e, t) => {
14592
14617
  const { forceMount: n, ...r } = e, o = hh(qo, e.__scopeScrollArea);
14593
- return /* @__PURE__ */ l.jsx(_t, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(iC, { ref: t, ...r }) });
14618
+ return /* @__PURE__ */ l.jsx(_t, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(aC, { ref: t, ...r }) });
14594
14619
  }
14595
- ), iC = p.forwardRef(
14620
+ ), aC = p.forwardRef(
14596
14621
  (e, t) => {
14597
14622
  const { __scopeScrollArea: n, style: r, ...o } = e, s = zt(qo, n), i = hh(qo, n), { onThumbPositionChange: a } = i, c = Me(
14598
14623
  t,
@@ -14605,7 +14630,7 @@ var tC = p.forwardRef((e, t) => {
14605
14630
  if (f) {
14606
14631
  const h = () => {
14607
14632
  if (d(), !u.current) {
14608
- const m = cC(f, a);
14633
+ const m = uC(f, a);
14609
14634
  u.current = m, a();
14610
14635
  }
14611
14636
  };
@@ -14635,11 +14660,11 @@ mh.displayName = qo;
14635
14660
  var Fa = "ScrollAreaCorner", gh = p.forwardRef(
14636
14661
  (e, t) => {
14637
14662
  const n = zt(Fa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
14638
- return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(aC, { ...e, ref: t }) : null;
14663
+ return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(lC, { ...e, ref: t }) : null;
14639
14664
  }
14640
14665
  );
14641
14666
  gh.displayName = Fa;
14642
- var aC = p.forwardRef((e, t) => {
14667
+ var lC = p.forwardRef((e, t) => {
14643
14668
  const { __scopeScrollArea: n, ...r } = e, o = zt(Fa, n), [s, i] = p.useState(0), [a, c] = p.useState(0), u = !!(s && a);
14644
14669
  return sr(o.scrollbarX, () => {
14645
14670
  var f;
@@ -14677,7 +14702,7 @@ function ks(e) {
14677
14702
  const t = xh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
14678
14703
  return Math.max(r, 18);
14679
14704
  }
14680
- function lC(e, t, n, r = "ltr") {
14705
+ function cC(e, t, n, r = "ltr") {
14681
14706
  const o = ks(n), s = o / 2, i = t || s, a = o - i, c = n.scrollbar.paddingStart + i, u = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
14682
14707
  return vh([c, u], f)(e);
14683
14708
  }
@@ -14695,7 +14720,7 @@ function vh(e, t) {
14695
14720
  function wh(e, t) {
14696
14721
  return e > 0 && e < t;
14697
14722
  }
14698
- var cC = (e, t = () => {
14723
+ var uC = (e, t = () => {
14699
14724
  }) => {
14700
14725
  let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
14701
14726
  return function o() {
@@ -14723,7 +14748,7 @@ function sr(e, t) {
14723
14748
  }
14724
14749
  }, [e, n]);
14725
14750
  }
14726
- var bh = ch, uC = dh, dC = gh;
14751
+ var bh = ch, dC = dh, fC = gh;
14727
14752
  const yh = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
14728
14753
  bh,
14729
14754
  {
@@ -14731,9 +14756,9 @@ const yh = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
14731
14756
  className: Z("relative overflow-hidden", e),
14732
14757
  ...n,
14733
14758
  children: [
14734
- /* @__PURE__ */ l.jsx(uC, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
14759
+ /* @__PURE__ */ l.jsx(dC, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
14735
14760
  /* @__PURE__ */ l.jsx(Sh, {}),
14736
- /* @__PURE__ */ l.jsx(dC, {})
14761
+ /* @__PURE__ */ l.jsx(fC, {})
14737
14762
  ]
14738
14763
  }
14739
14764
  ));
@@ -14894,7 +14919,7 @@ function tr(e) {
14894
14919
  if (!(typeof globalThis > "u"))
14895
14920
  return globalThis[e];
14896
14921
  }
14897
- function fC(e) {
14922
+ function hC(e) {
14898
14923
  if (typeof e != "string") return;
14899
14924
  const t = e.trim();
14900
14925
  if (t)
@@ -14907,7 +14932,7 @@ function Ch() {
14907
14932
  tr("__CHAT_API_URL__")
14908
14933
  ];
14909
14934
  for (const t of e) {
14910
- const n = fC(t);
14935
+ const n = hC(t);
14911
14936
  if (n) return n;
14912
14937
  }
14913
14938
  }
@@ -14921,12 +14946,12 @@ function Th() {
14921
14946
  if (typeof t == "string" && t.trim())
14922
14947
  return t.trim();
14923
14948
  }
14924
- function hC() {
14949
+ function pC() {
14925
14950
  const e = {}, t = Ch(), n = Th();
14926
14951
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
14927
14952
  }
14928
- function pC() {
14929
- const e = hC(), t = Pn.getAuthToken(), n = Ch();
14953
+ function mC() {
14954
+ const e = pC(), t = Pn.getAuthToken(), n = Ch();
14930
14955
  return {
14931
14956
  apiBaseUrl: e.baseUrl || Pn.baseUrl || n || "http://localhost:8000",
14932
14957
  apiKey: t || e.apiKey || Th() || "",
@@ -14944,7 +14969,7 @@ function pC() {
14944
14969
  };
14945
14970
  }
14946
14971
  const Rh = "chat-settings";
14947
- function mC() {
14972
+ function gC() {
14948
14973
  try {
14949
14974
  const e = localStorage.getItem(Rh);
14950
14975
  return e ? JSON.parse(e) : {};
@@ -14952,15 +14977,15 @@ function mC() {
14952
14977
  return console.error("Failed to parse stored settings:", e), {};
14953
14978
  }
14954
14979
  }
14955
- function gC(e) {
14980
+ function xC(e) {
14956
14981
  try {
14957
14982
  localStorage.setItem(Rh, JSON.stringify(e)), e.apiKey && Pn.setAuthToken(e.apiKey);
14958
14983
  } catch (t) {
14959
14984
  console.error("Failed to save settings:", t);
14960
14985
  }
14961
14986
  }
14962
- function HT() {
14963
- const e = pC(), t = mC(), n = Pn.getAuthToken();
14987
+ function UT() {
14988
+ const e = mC(), t = gC(), n = Pn.getAuthToken();
14964
14989
  return {
14965
14990
  ...e,
14966
14991
  ...t,
@@ -14970,10 +14995,10 @@ function HT() {
14970
14995
  apiBaseUrl: Pn.baseUrl || t.apiBaseUrl || e.apiBaseUrl
14971
14996
  };
14972
14997
  }
14973
- function UT(e) {
14974
- e.apiKey && Pn.setAuthToken(e.apiKey), gC(e);
14998
+ function WT(e) {
14999
+ e.apiKey && Pn.setAuthToken(e.apiKey), xC(e);
14975
15000
  }
14976
- var xC = "Label", Eh = p.forwardRef((e, t) => /* @__PURE__ */ l.jsx(
15001
+ var vC = "Label", Eh = p.forwardRef((e, t) => /* @__PURE__ */ l.jsx(
14977
15002
  Ce.label,
14978
15003
  {
14979
15004
  ...e,
@@ -14984,15 +15009,15 @@ var xC = "Label", Eh = p.forwardRef((e, t) => /* @__PURE__ */ l.jsx(
14984
15009
  }
14985
15010
  }
14986
15011
  ));
14987
- Eh.displayName = xC;
15012
+ Eh.displayName = vC;
14988
15013
  var kh = Eh;
14989
- const vC = Xo(
15014
+ const wC = Xo(
14990
15015
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
14991
15016
  ), Ot = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
14992
15017
  kh,
14993
15018
  {
14994
15019
  ref: n,
14995
- className: Z(vC(), e),
15020
+ className: Z(wC(), e),
14996
15021
  ...t
14997
15022
  }
14998
15023
  ));
@@ -15001,7 +15026,7 @@ function Ih(e) {
15001
15026
  const t = p.useRef({ value: e, previous: e });
15002
15027
  return p.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
15003
15028
  }
15004
- var Ns = "Switch", [wC, WT] = on(Ns), [bC, yC] = wC(Ns), Nh = p.forwardRef(
15029
+ var Ns = "Switch", [bC, VT] = on(Ns), [yC, SC] = bC(Ns), Nh = p.forwardRef(
15005
15030
  (e, t) => {
15006
15031
  const {
15007
15032
  __scopeSwitch: n,
@@ -15020,7 +15045,7 @@ var Ns = "Switch", [wC, WT] = on(Ns), [bC, yC] = wC(Ns), Nh = p.forwardRef(
15020
15045
  onChange: u,
15021
15046
  caller: Ns
15022
15047
  });
15023
- return /* @__PURE__ */ l.jsxs(bC, { scope: n, checked: x, disabled: a, children: [
15048
+ return /* @__PURE__ */ l.jsxs(yC, { scope: n, checked: x, disabled: a, children: [
15024
15049
  /* @__PURE__ */ l.jsx(
15025
15050
  Ce.button,
15026
15051
  {
@@ -15059,7 +15084,7 @@ var Ns = "Switch", [wC, WT] = on(Ns), [bC, yC] = wC(Ns), Nh = p.forwardRef(
15059
15084
  Nh.displayName = Ns;
15060
15085
  var Ah = "SwitchThumb", _h = p.forwardRef(
15061
15086
  (e, t) => {
15062
- const { __scopeSwitch: n, ...r } = e, o = yC(Ah, n);
15087
+ const { __scopeSwitch: n, ...r } = e, o = SC(Ah, n);
15063
15088
  return /* @__PURE__ */ l.jsx(
15064
15089
  Ce.span,
15065
15090
  {
@@ -15072,7 +15097,7 @@ var Ah = "SwitchThumb", _h = p.forwardRef(
15072
15097
  }
15073
15098
  );
15074
15099
  _h.displayName = Ah;
15075
- var SC = "SwitchBubbleInput", jh = p.forwardRef(
15100
+ var CC = "SwitchBubbleInput", jh = p.forwardRef(
15076
15101
  ({
15077
15102
  __scopeSwitch: e,
15078
15103
  control: t,
@@ -15113,11 +15138,11 @@ var SC = "SwitchBubbleInput", jh = p.forwardRef(
15113
15138
  );
15114
15139
  }
15115
15140
  );
15116
- jh.displayName = SC;
15141
+ jh.displayName = CC;
15117
15142
  function Ph(e) {
15118
15143
  return e ? "checked" : "unchecked";
15119
15144
  }
15120
- var Oh = Nh, CC = _h;
15145
+ var Oh = Nh, TC = _h;
15121
15146
  const pn = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
15122
15147
  Oh,
15123
15148
  {
@@ -15128,7 +15153,7 @@ const pn = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
15128
15153
  ...t,
15129
15154
  ref: n,
15130
15155
  children: /* @__PURE__ */ l.jsx(
15131
- CC,
15156
+ TC,
15132
15157
  {
15133
15158
  className: Z(
15134
15159
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
@@ -15150,7 +15175,7 @@ var Mh = Object.freeze({
15150
15175
  clip: "rect(0, 0, 0, 0)",
15151
15176
  whiteSpace: "nowrap",
15152
15177
  wordWrap: "normal"
15153
- }), TC = "VisuallyHidden", RC = p.forwardRef(
15178
+ }), RC = "VisuallyHidden", EC = p.forwardRef(
15154
15179
  (e, t) => /* @__PURE__ */ l.jsx(
15155
15180
  Ce.span,
15156
15181
  {
@@ -15160,11 +15185,11 @@ var Mh = Object.freeze({
15160
15185
  }
15161
15186
  )
15162
15187
  );
15163
- RC.displayName = TC;
15164
- var EC = [" ", "Enter", "ArrowUp", "ArrowDown"], kC = [" ", "Enter"], $n = "Select", [As, _s, IC] = wa($n), [pr, VT] = on($n, [
15165
- IC,
15188
+ EC.displayName = RC;
15189
+ var kC = [" ", "Enter", "ArrowUp", "ArrowDown"], IC = [" ", "Enter"], $n = "Select", [As, _s, NC] = wa($n), [pr, KT] = on($n, [
15190
+ NC,
15166
15191
  Cs
15167
- ]), js = Cs(), [NC, Cn] = pr($n), [AC, _C] = pr($n), Dh = (e) => {
15192
+ ]), js = Cs(), [AC, Cn] = pr($n), [_C, jC] = pr($n), Dh = (e) => {
15168
15193
  const {
15169
15194
  __scopeSelect: t,
15170
15195
  children: n,
@@ -15192,7 +15217,7 @@ var EC = [" ", "Enter", "ArrowUp", "ArrowDown"], kC = [" ", "Enter"], $n = "Sele
15192
15217
  caller: $n
15193
15218
  }), _ = p.useRef(null), L = g ? w || !!g.closest("form") : !0, [$, P] = p.useState(/* @__PURE__ */ new Set()), W = Array.from($).map((z) => z.props.value).join(";");
15194
15219
  return /* @__PURE__ */ l.jsx(rf, { ...v, children: /* @__PURE__ */ l.jsxs(
15195
- NC,
15220
+ AC,
15196
15221
  {
15197
15222
  required: m,
15198
15223
  scope: t,
@@ -15212,7 +15237,7 @@ var EC = [" ", "Enter", "ArrowUp", "ArrowDown"], kC = [" ", "Enter"], $n = "Sele
15212
15237
  disabled: h,
15213
15238
  children: [
15214
15239
  /* @__PURE__ */ l.jsx(As.Provider, { scope: t, children: /* @__PURE__ */ l.jsx(
15215
- AC,
15240
+ _C,
15216
15241
  {
15217
15242
  scope: e.__scopeSelect,
15218
15243
  onNativeOptionAdd: p.useCallback((z) => {
@@ -15288,7 +15313,7 @@ var Lh = "SelectTrigger", $h = p.forwardRef(
15288
15313
  }),
15289
15314
  onKeyDown: ae(o.onKeyDown, (v) => {
15290
15315
  const g = f.current !== "";
15291
- !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(g && v.key === " ") && EC.includes(v.key) && (w(), v.preventDefault());
15316
+ !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(g && v.key === " ") && kC.includes(v.key) && (w(), v.preventDefault());
15292
15317
  })
15293
15318
  }
15294
15319
  ) });
@@ -15312,15 +15337,15 @@ var Fh = "SelectValue", zh = p.forwardRef(
15312
15337
  }
15313
15338
  );
15314
15339
  zh.displayName = Fh;
15315
- var jC = "SelectIcon", Bh = p.forwardRef(
15340
+ var PC = "SelectIcon", Bh = p.forwardRef(
15316
15341
  (e, t) => {
15317
15342
  const { __scopeSelect: n, children: r, ...o } = e;
15318
15343
  return /* @__PURE__ */ l.jsx(Ce.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
15319
15344
  }
15320
15345
  );
15321
- Bh.displayName = jC;
15322
- var PC = "SelectPortal", Hh = (e) => /* @__PURE__ */ l.jsx(fs, { asChild: !0, ...e });
15323
- Hh.displayName = PC;
15346
+ Bh.displayName = PC;
15347
+ var OC = "SelectPortal", Hh = (e) => /* @__PURE__ */ l.jsx(fs, { asChild: !0, ...e });
15348
+ Hh.displayName = OC;
15324
15349
  var Fn = "SelectContent", Uh = p.forwardRef(
15325
15350
  (e, t) => {
15326
15351
  const n = Cn(Fn, e.__scopeSelect), [r, o] = p.useState();
@@ -15337,7 +15362,7 @@ var Fn = "SelectContent", Uh = p.forwardRef(
15337
15362
  }
15338
15363
  );
15339
15364
  Uh.displayName = Fn;
15340
- var Bt = 10, [Wh, Tn] = pr(Fn), OC = "SelectContentImpl", MC = nr("SelectContent.RemoveScroll"), Vh = p.forwardRef(
15365
+ var Bt = 10, [Wh, Tn] = pr(Fn), MC = "SelectContentImpl", DC = nr("SelectContent.RemoveScroll"), Vh = p.forwardRef(
15341
15366
  (e, t) => {
15342
15367
  const {
15343
15368
  __scopeSelect: n,
@@ -15445,7 +15470,7 @@ var Bt = 10, [Wh, Tn] = pr(Fn), OC = "SelectContentImpl", MC = nr("SelectContent
15445
15470
  position: r,
15446
15471
  isPositioned: $,
15447
15472
  searchRef: M,
15448
- children: /* @__PURE__ */ l.jsx(ps, { as: MC, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
15473
+ children: /* @__PURE__ */ l.jsx(ps, { as: DC, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
15449
15474
  ds,
15450
15475
  {
15451
15476
  asChild: !0,
@@ -15507,8 +15532,8 @@ var Bt = 10, [Wh, Tn] = pr(Fn), OC = "SelectContentImpl", MC = nr("SelectContent
15507
15532
  );
15508
15533
  }
15509
15534
  );
15510
- Vh.displayName = OC;
15511
- var DC = "SelectItemAlignedPosition", Kh = p.forwardRef((e, t) => {
15535
+ Vh.displayName = MC;
15536
+ var LC = "SelectItemAlignedPosition", Kh = p.forwardRef((e, t) => {
15512
15537
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Cn(Fn, n), i = Tn(Fn, n), [a, c] = p.useState(null), [u, d] = p.useState(null), f = Me(t, (E) => d(E)), h = _s(n), m = p.useRef(!1), w = p.useRef(!0), { viewport: v, selectedItem: g, selectedItemText: x, focusSelectedItem: b } = i, y = p.useCallback(() => {
15513
15538
  if (s.trigger && s.valueNode && a && u && v && g && x) {
15514
15539
  const E = s.trigger.getBoundingClientRect(), k = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), A = x.getBoundingClientRect();
@@ -15576,7 +15601,7 @@ var DC = "SelectItemAlignedPosition", Kh = p.forwardRef((e, t) => {
15576
15601
  [y, b]
15577
15602
  );
15578
15603
  return /* @__PURE__ */ l.jsx(
15579
- $C,
15604
+ FC,
15580
15605
  {
15581
15606
  scope: n,
15582
15607
  contentWrapper: a,
@@ -15612,8 +15637,8 @@ var DC = "SelectItemAlignedPosition", Kh = p.forwardRef((e, t) => {
15612
15637
  }
15613
15638
  );
15614
15639
  });
15615
- Kh.displayName = DC;
15616
- var LC = "SelectPopperPosition", Li = p.forwardRef((e, t) => {
15640
+ Kh.displayName = LC;
15641
+ var $C = "SelectPopperPosition", Li = p.forwardRef((e, t) => {
15617
15642
  const {
15618
15643
  __scopeSelect: n,
15619
15644
  align: r = "start",
@@ -15641,8 +15666,8 @@ var LC = "SelectPopperPosition", Li = p.forwardRef((e, t) => {
15641
15666
  }
15642
15667
  );
15643
15668
  });
15644
- Li.displayName = LC;
15645
- var [$C, za] = pr(Fn, {}), $i = "SelectViewport", qh = p.forwardRef(
15669
+ Li.displayName = $C;
15670
+ var [FC, za] = pr(Fn, {}), $i = "SelectViewport", qh = p.forwardRef(
15646
15671
  (e, t) => {
15647
15672
  const { __scopeSelect: n, nonce: r, ...o } = e, s = Tn($i, n), i = za($i, n), a = Me(t, s.onViewportChange), c = p.useRef(0);
15648
15673
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
@@ -15695,21 +15720,21 @@ var [$C, za] = pr(Fn, {}), $i = "SelectViewport", qh = p.forwardRef(
15695
15720
  }
15696
15721
  );
15697
15722
  qh.displayName = $i;
15698
- var Gh = "SelectGroup", [FC, zC] = pr(Gh), BC = p.forwardRef(
15723
+ var Gh = "SelectGroup", [zC, BC] = pr(Gh), HC = p.forwardRef(
15699
15724
  (e, t) => {
15700
15725
  const { __scopeSelect: n, ...r } = e, o = en();
15701
- return /* @__PURE__ */ l.jsx(FC, { scope: n, id: o, children: /* @__PURE__ */ l.jsx(Ce.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
15726
+ return /* @__PURE__ */ l.jsx(zC, { scope: n, id: o, children: /* @__PURE__ */ l.jsx(Ce.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
15702
15727
  }
15703
15728
  );
15704
- BC.displayName = Gh;
15729
+ HC.displayName = Gh;
15705
15730
  var Yh = "SelectLabel", Xh = p.forwardRef(
15706
15731
  (e, t) => {
15707
- const { __scopeSelect: n, ...r } = e, o = zC(Yh, n);
15732
+ const { __scopeSelect: n, ...r } = e, o = BC(Yh, n);
15708
15733
  return /* @__PURE__ */ l.jsx(Ce.div, { id: o.id, ...r, ref: t });
15709
15734
  }
15710
15735
  );
15711
15736
  Xh.displayName = Yh;
15712
- var Yo = "SelectItem", [HC, Jh] = pr(Yo), Zh = p.forwardRef(
15737
+ var Yo = "SelectItem", [UC, Jh] = pr(Yo), Zh = p.forwardRef(
15713
15738
  (e, t) => {
15714
15739
  const {
15715
15740
  __scopeSelect: n,
@@ -15731,7 +15756,7 @@ var Yo = "SelectItem", [HC, Jh] = pr(Yo), Zh = p.forwardRef(
15731
15756
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
15732
15757
  );
15733
15758
  return /* @__PURE__ */ l.jsx(
15734
- HC,
15759
+ UC,
15735
15760
  {
15736
15761
  scope: n,
15737
15762
  value: r,
@@ -15782,7 +15807,7 @@ var Yo = "SelectItem", [HC, Jh] = pr(Yo), Zh = p.forwardRef(
15782
15807
  }),
15783
15808
  onKeyDown: ae(i.onKeyDown, (b) => {
15784
15809
  var R;
15785
- ((R = c.searchRef) == null ? void 0 : R.current) !== "" && b.key === " " || (kC.includes(b.key) && x(), b.key === " " && b.preventDefault());
15810
+ ((R = c.searchRef) == null ? void 0 : R.current) !== "" && b.key === " " || (IC.includes(b.key) && x(), b.key === " " && b.preventDefault());
15786
15811
  })
15787
15812
  }
15788
15813
  )
@@ -15795,7 +15820,7 @@ var Yo = "SelectItem", [HC, Jh] = pr(Yo), Zh = p.forwardRef(
15795
15820
  Zh.displayName = Yo;
15796
15821
  var Rr = "SelectItemText", Qh = p.forwardRef(
15797
15822
  (e, t) => {
15798
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = Cn(Rr, n), a = Tn(Rr, n), c = Jh(Rr, n), u = _C(Rr, n), [d, f] = p.useState(null), h = Me(
15823
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = Cn(Rr, n), a = Tn(Rr, n), c = Jh(Rr, n), u = jC(Rr, n), [d, f] = p.useState(null), h = Me(
15799
15824
  t,
15800
15825
  (x) => f(x),
15801
15826
  c.onItemTextChange,
@@ -15896,21 +15921,21 @@ var op = p.forwardRef((e, t) => {
15896
15921
  })
15897
15922
  }
15898
15923
  );
15899
- }), UC = "SelectSeparator", sp = p.forwardRef(
15924
+ }), WC = "SelectSeparator", sp = p.forwardRef(
15900
15925
  (e, t) => {
15901
15926
  const { __scopeSelect: n, ...r } = e;
15902
15927
  return /* @__PURE__ */ l.jsx(Ce.div, { "aria-hidden": !0, ...r, ref: t });
15903
15928
  }
15904
15929
  );
15905
- sp.displayName = UC;
15906
- var Bi = "SelectArrow", WC = p.forwardRef(
15930
+ sp.displayName = WC;
15931
+ var Bi = "SelectArrow", VC = p.forwardRef(
15907
15932
  (e, t) => {
15908
15933
  const { __scopeSelect: n, ...r } = e, o = js(n), s = Cn(Bi, n), i = Tn(Bi, n);
15909
15934
  return s.open && i.position === "popper" ? /* @__PURE__ */ l.jsx(af, { ...o, ...r, ref: t }) : null;
15910
15935
  }
15911
15936
  );
15912
- WC.displayName = Bi;
15913
- var VC = "SelectBubbleInput", ip = p.forwardRef(
15937
+ VC.displayName = Bi;
15938
+ var KC = "SelectBubbleInput", ip = p.forwardRef(
15914
15939
  ({ __scopeSelect: e, value: t, ...n }, r) => {
15915
15940
  const o = p.useRef(null), s = Me(r, o), i = Ih(t);
15916
15941
  return p.useEffect(() => {
@@ -15935,7 +15960,7 @@ var VC = "SelectBubbleInput", ip = p.forwardRef(
15935
15960
  );
15936
15961
  }
15937
15962
  );
15938
- ip.displayName = VC;
15963
+ ip.displayName = KC;
15939
15964
  function ap(e) {
15940
15965
  return e === "" || e === void 0;
15941
15966
  }
@@ -15955,18 +15980,18 @@ function lp(e) {
15955
15980
  }
15956
15981
  function cp(e, t, n) {
15957
15982
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
15958
- let i = KC(e, Math.max(s, 0));
15983
+ let i = qC(e, Math.max(s, 0));
15959
15984
  o.length === 1 && (i = i.filter((u) => u !== n));
15960
15985
  const c = i.find(
15961
15986
  (u) => u.textValue.toLowerCase().startsWith(o.toLowerCase())
15962
15987
  );
15963
15988
  return c !== n ? c : void 0;
15964
15989
  }
15965
- function KC(e, t) {
15990
+ function qC(e, t) {
15966
15991
  return e.map((n, r) => e[(t + r) % e.length]);
15967
15992
  }
15968
- var qC = Dh, up = $h, GC = zh, YC = Bh, XC = Hh, dp = Uh, JC = qh, fp = Xh, hp = Zh, ZC = Qh, QC = tp, pp = np, mp = rp, gp = sp;
15969
- const bc = qC, yc = GC, Hi = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
15993
+ var GC = Dh, up = $h, YC = zh, XC = Bh, JC = Hh, dp = Uh, ZC = qh, fp = Xh, hp = Zh, QC = Qh, eT = tp, pp = np, mp = rp, gp = sp;
15994
+ const bc = GC, yc = YC, Hi = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
15970
15995
  up,
15971
15996
  {
15972
15997
  ref: r,
@@ -15977,7 +16002,7 @@ const bc = qC, yc = GC, Hi = p.forwardRef(({ className: e, children: t, ...n },
15977
16002
  ...n,
15978
16003
  children: [
15979
16004
  t,
15980
- /* @__PURE__ */ l.jsx(YC, { asChild: !0, children: /* @__PURE__ */ l.jsx(Xn, { className: "h-4 w-4 opacity-50" }) })
16005
+ /* @__PURE__ */ l.jsx(XC, { asChild: !0, children: /* @__PURE__ */ l.jsx(Xn, { className: "h-4 w-4 opacity-50" }) })
15981
16006
  ]
15982
16007
  }
15983
16008
  ));
@@ -16008,7 +16033,7 @@ const vp = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16008
16033
  }
16009
16034
  ));
16010
16035
  vp.displayName = mp.displayName;
16011
- const Ui = p.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ l.jsx(XC, { children: /* @__PURE__ */ l.jsxs(
16036
+ const Ui = p.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ l.jsx(JC, { children: /* @__PURE__ */ l.jsxs(
16012
16037
  dp,
16013
16038
  {
16014
16039
  ref: o,
@@ -16022,7 +16047,7 @@ const Ui = p.forwardRef(({ className: e, children: t, position: n = "popper", ..
16022
16047
  children: [
16023
16048
  /* @__PURE__ */ l.jsx(xp, {}),
16024
16049
  /* @__PURE__ */ l.jsx(
16025
- JC,
16050
+ ZC,
16026
16051
  {
16027
16052
  className: Z(
16028
16053
  "p-1",
@@ -16036,7 +16061,7 @@ const Ui = p.forwardRef(({ className: e, children: t, position: n = "popper", ..
16036
16061
  }
16037
16062
  ) }));
16038
16063
  Ui.displayName = dp.displayName;
16039
- const eT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16064
+ const tT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16040
16065
  fp,
16041
16066
  {
16042
16067
  ref: n,
@@ -16044,7 +16069,7 @@ const eT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16044
16069
  ...t
16045
16070
  }
16046
16071
  ));
16047
- eT.displayName = fp.displayName;
16072
+ tT.displayName = fp.displayName;
16048
16073
  const kn = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
16049
16074
  hp,
16050
16075
  {
@@ -16055,13 +16080,13 @@ const kn = p.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
16055
16080
  ),
16056
16081
  ...n,
16057
16082
  children: [
16058
- /* @__PURE__ */ l.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ l.jsx(QC, { children: /* @__PURE__ */ l.jsx(Wi, { className: "h-4 w-4" }) }) }),
16059
- /* @__PURE__ */ l.jsx(ZC, { children: t })
16083
+ /* @__PURE__ */ l.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ l.jsx(eT, { children: /* @__PURE__ */ l.jsx(Wi, { className: "h-4 w-4" }) }) }),
16084
+ /* @__PURE__ */ l.jsx(QC, { children: t })
16060
16085
  ]
16061
16086
  }
16062
16087
  ));
16063
16088
  kn.displayName = hp.displayName;
16064
- const tT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16089
+ const nT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16065
16090
  gp,
16066
16091
  {
16067
16092
  ref: n,
@@ -16069,9 +16094,9 @@ const tT = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16069
16094
  ...t
16070
16095
  }
16071
16096
  ));
16072
- tT.displayName = gp.displayName;
16073
- var nT = "Separator", Sc = "horizontal", rT = ["horizontal", "vertical"], wp = p.forwardRef((e, t) => {
16074
- const { decorative: n, orientation: r = Sc, ...o } = e, s = oT(r) ? r : Sc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
16097
+ nT.displayName = gp.displayName;
16098
+ var rT = "Separator", Sc = "horizontal", oT = ["horizontal", "vertical"], wp = p.forwardRef((e, t) => {
16099
+ const { decorative: n, orientation: r = Sc, ...o } = e, s = sT(r) ? r : Sc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
16075
16100
  return /* @__PURE__ */ l.jsx(
16076
16101
  Ce.div,
16077
16102
  {
@@ -16082,9 +16107,9 @@ var nT = "Separator", Sc = "horizontal", rT = ["horizontal", "vertical"], wp = p
16082
16107
  }
16083
16108
  );
16084
16109
  });
16085
- wp.displayName = nT;
16086
- function oT(e) {
16087
- return rT.includes(e);
16110
+ wp.displayName = rT;
16111
+ function sT(e) {
16112
+ return oT.includes(e);
16088
16113
  }
16089
16114
  var bp = wp;
16090
16115
  const yp = p.forwardRef(
@@ -16104,7 +16129,7 @@ const yp = p.forwardRef(
16104
16129
  )
16105
16130
  );
16106
16131
  yp.displayName = bp.displayName;
16107
- const sT = Rd, iT = $b, aT = Ed, Sp = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16132
+ const iT = Rd, aT = Fb, lT = Ed, Sp = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16108
16133
  gs,
16109
16134
  {
16110
16135
  className: Z(
@@ -16116,7 +16141,7 @@ const sT = Rd, iT = $b, aT = Ed, Sp = p.forwardRef(({ className: e, ...t }, n) =
16116
16141
  }
16117
16142
  ));
16118
16143
  Sp.displayName = gs.displayName;
16119
- const lT = Xo(
16144
+ const cT = Xo(
16120
16145
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
16121
16146
  {
16122
16147
  variants: {
@@ -16131,13 +16156,13 @@ const lT = Xo(
16131
16156
  side: "right"
16132
16157
  }
16133
16158
  }
16134
- ), Cp = p.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(aT, { children: [
16159
+ ), Cp = p.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(lT, { children: [
16135
16160
  /* @__PURE__ */ l.jsx(Sp, {}),
16136
16161
  /* @__PURE__ */ l.jsxs(
16137
16162
  xs,
16138
16163
  {
16139
16164
  ref: o,
16140
- className: Z(lT({ side: e }), t),
16165
+ className: Z(cT({ side: e }), t),
16141
16166
  ...r,
16142
16167
  children: [
16143
16168
  n,
@@ -16182,7 +16207,7 @@ const Ep = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
16182
16207
  }
16183
16208
  ));
16184
16209
  Ep.displayName = vs.displayName;
16185
- const cT = {
16210
+ const uT = {
16186
16211
  api: {
16187
16212
  baseUrl: "http://localhost:8000/api",
16188
16213
  authToken: "",
@@ -16201,7 +16226,7 @@ const cT = {
16201
16226
  showTypingIndicator: !0
16202
16227
  }
16203
16228
  };
16204
- function KT({ settings: e, onSettingsChange: t, className: n = "" }) {
16229
+ function qT({ settings: e, onSettingsChange: t, className: n = "" }) {
16205
16230
  const [r, o] = fe(!1), [s, i] = fe(!1), [a, c] = fe(e), [u, d] = fe(!1), { toast: f } = ha();
16206
16231
  tt(() => {
16207
16232
  const g = JSON.stringify(a) !== JSON.stringify(e);
@@ -16215,7 +16240,7 @@ function KT({ settings: e, onSettingsChange: t, className: n = "" }) {
16215
16240
  description: "Your chat configuration has been updated successfully."
16216
16241
  });
16217
16242
  }, m = () => {
16218
- c(cT), d(!0), f({
16243
+ c(uT), d(!0), f({
16219
16244
  title: "Settings reset",
16220
16245
  description: "Configuration has been reset to defaults."
16221
16246
  });
@@ -16236,8 +16261,8 @@ function KT({ settings: e, onSettingsChange: t, className: n = "" }) {
16236
16261
  });
16237
16262
  }
16238
16263
  };
16239
- return /* @__PURE__ */ l.jsxs(sT, { open: r, onOpenChange: o, children: [
16240
- /* @__PURE__ */ l.jsx(iT, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ze, { variant: "outline", size: "sm", className: n, children: [
16264
+ return /* @__PURE__ */ l.jsxs(iT, { open: r, onOpenChange: o, children: [
16265
+ /* @__PURE__ */ l.jsx(aT, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ze, { variant: "outline", size: "sm", className: n, children: [
16241
16266
  /* @__PURE__ */ l.jsx(qp, { className: "h-4 w-4 mr-2" }),
16242
16267
  "Settings",
16243
16268
  u && /* @__PURE__ */ l.jsx(Ei, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
@@ -16486,7 +16511,7 @@ function KT({ settings: e, onSettingsChange: t, className: n = "" }) {
16486
16511
  ] })
16487
16512
  ] });
16488
16513
  }
16489
- function qT({
16514
+ function GT({
16490
16515
  layout: e = "sidebar",
16491
16516
  layoutSize: t = "desktop",
16492
16517
  showThreads: n = !0,
@@ -16564,26 +16589,26 @@ export {
16564
16589
  Lg as ChatApi,
16565
16590
  ci as ChatInterface,
16566
16591
  Vs as ChatProviders,
16567
- KT as ChatSettings,
16592
+ qT as ChatSettings,
16568
16593
  Ul as MarkdownContent,
16569
- Xb as MessageComponent,
16594
+ Jb as MessageComponent,
16570
16595
  Od as MessageList,
16571
16596
  wc as ThreadManager,
16572
- UT as applySettings,
16597
+ WT as applySettings,
16573
16598
  Pn as chatApiClient,
16574
- qT as default,
16599
+ GT as default,
16575
16600
  Dg as del,
16576
16601
  Mt as get,
16577
16602
  Pg as getChatToken,
16578
- HT as getCurrentSettings,
16579
- hC as getDefaultApiConfig,
16580
- pC as getDefaultChatSettings,
16603
+ UT as getCurrentSettings,
16604
+ pC as getDefaultApiConfig,
16605
+ mC as getDefaultChatSettings,
16581
16606
  Og as onChatTokenChanged,
16582
16607
  hl as post,
16583
16608
  Mg as put,
16584
16609
  fl as setChatToken,
16585
16610
  Gi as useApi,
16586
- lx as useChatStream,
16611
+ cx as useChatStream,
16587
16612
  ru as useMessages,
16588
16613
  Zg as useMessagesReducer,
16589
16614
  Hg as useStream,