@rpcbase/agents-sdk 0.13.0 → 0.14.0

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.
Files changed (52) hide show
  1. package/dist/agents-sdk.css +1 -1
  2. package/dist/api/chat/handler.d.ts.map +1 -1
  3. package/dist/api/chat/runtimeConfig.d.ts +12 -0
  4. package/dist/api/chat/runtimeConfig.d.ts.map +1 -1
  5. package/dist/api/chat/toolApproval.d.ts +2 -1
  6. package/dist/api/chat/toolApproval.d.ts.map +1 -1
  7. package/dist/api/chat/toolApprovalHistory.d.ts +4 -0
  8. package/dist/api/chat/toolApprovalHistory.d.ts.map +1 -0
  9. package/dist/api/chatDb.d.ts +5 -0
  10. package/dist/api/chatDb.d.ts.map +1 -1
  11. package/dist/api/chatStore.d.ts +5 -0
  12. package/dist/api/chatStore.d.ts.map +1 -1
  13. package/dist/{chatDb-CJCdqpjR.js → chatDb-DTjvCb7r.js} +33 -21
  14. package/dist/{chatDb-DLQOzat8.js → chatDb-DwhaaOmO.js} +33 -21
  15. package/dist/client-routes.browser.js +1 -1
  16. package/dist/client-routes.js +1 -1
  17. package/dist/components/message.d.ts.map +1 -1
  18. package/dist/{data-stream-handler-Bc_AaWm-.js → data-stream-handler-CrwpY1gX.js} +849 -803
  19. package/dist/{data-stream-handler-CF9RENIU.js → data-stream-handler-DG3Y--2n.js} +849 -803
  20. package/dist/{handler-C-CFaSnD.js → handler-0bIpqvbt.js} +1 -1
  21. package/dist/{handler-BTWWHJUs.js → handler-B-erVnQ6.js} +1 -1
  22. package/dist/{handler-Dmt7P8bu.js → handler-B4jvOK-L.js} +670 -564
  23. package/dist/{handler-D88wEmsv.js → handler-BLKbyYqI.js} +1 -1
  24. package/dist/{handler-BMF6eWg5.js → handler-BnDd10G3.js} +1 -1
  25. package/dist/{handler-DnkxwQzf.js → handler-Bsto5ImB.js} +1 -1
  26. package/dist/{handler-Cl7-HRxy.js → handler-By4I5hjo.js} +9 -9
  27. package/dist/{handler-C34eWXJg.js → handler-C3GOpsFS.js} +1 -1
  28. package/dist/{handler-DilZY3o3.js → handler-CNnPLVlT.js} +1 -1
  29. package/dist/{handler-DOtL2C2i.js → handler-CsNuMrRb.js} +1 -1
  30. package/dist/{handler-DiyNUz4m.js → handler-DAcB4fHJ.js} +1 -1
  31. package/dist/{handler-D003Oipd.js → handler-DUljRc5z.js} +1 -1
  32. package/dist/{handler-M3DwIezB.js → handler-DgrIym9_.js} +657 -551
  33. package/dist/{handler-CG2GBD33.js → handler-DtSnDhW2.js} +1 -1
  34. package/dist/{handler-DBuF7L41.js → handler-RTP9W4lT.js} +9 -9
  35. package/dist/{handler-CwoR5Bdv.js → handler-hTPifowr.js} +1 -1
  36. package/dist/index.browser.js +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/lib/tool-approval-decisions.d.ts +5 -0
  39. package/dist/lib/tool-approval-decisions.d.ts.map +1 -0
  40. package/dist/lib/types.d.ts +10 -0
  41. package/dist/lib/types.d.ts.map +1 -1
  42. package/dist/models/RBAgentsChatThread.d.ts +1 -0
  43. package/dist/models/RBAgentsChatThread.d.ts.map +1 -1
  44. package/dist/models.browser.js +1 -0
  45. package/dist/models.js +7 -0
  46. package/dist/routes.browser.js +8 -8
  47. package/dist/routes.js +8 -8
  48. package/dist/runtime.d.ts +2 -2
  49. package/dist/runtime.d.ts.map +1 -1
  50. package/dist/runtime.js +1 -1
  51. package/dist/tailwind-source.js +1 -1
  52. package/package.json +1 -1
@@ -54944,7 +54944,7 @@ function NR(e, t = !0) {
54944
54944
  //#endregion
54945
54945
  //#region src/components/artifact-actions.tsx
54946
54946
  function PR({ artifact: e, handleVersionChange: t, currentVersionIndex: n, isCurrentVersion: r, mode: i, metadata: a, setMetadata: o }) {
54947
- let [s, c] = z(!1), l = mW.find((t) => t.kind === e.kind);
54947
+ let [s, c] = z(!1), l = vW.find((t) => t.kind === e.kind);
54948
54948
  if (!l) throw Error("Artifact definition not found!");
54949
54949
  let u = {
54950
54950
  content: e.content,
@@ -55088,8 +55088,26 @@ function zR({ status: e }) {
55088
55088
  };
55089
55089
  }
55090
55090
  //#endregion
55091
- //#region src/components/ui/badge.tsx
55092
- var BR = he("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", {
55091
+ //#region src/lib/tool-approval-decisions.ts
55092
+ var BR = (e) => e.type === "dynamic-tool" || e.type.startsWith("tool-"), VR = (e) => typeof e == "object" && !!e && !Array.isArray(e), HR = (e) => {
55093
+ let t = /* @__PURE__ */ new Map();
55094
+ for (let n of e) {
55095
+ if (n.type !== "data-tool-approval-decision") continue;
55096
+ let e = n.data;
55097
+ VR(e) && typeof e.toolCallId == "string" && typeof e.reason == "string" && e.reason.trim() && t.set(e.toolCallId, e.reason.trim());
55098
+ }
55099
+ return t.size === 0 ? e : e.map((e) => {
55100
+ if (!BR(e)) return e;
55101
+ let n = e, r = n.toolCallId ? t.get(n.toolCallId) : void 0;
55102
+ return !r || !n.approval || n.approval.reason ? e : {
55103
+ ...e,
55104
+ approval: {
55105
+ ...n.approval,
55106
+ reason: r
55107
+ }
55108
+ };
55109
+ });
55110
+ }, UR = he("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", {
55093
55111
  variants: { variant: {
55094
55112
  default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
55095
55113
  secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
@@ -55098,15 +55116,15 @@ var BR = he("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs
55098
55116
  } },
55099
55117
  defaultVariants: { variant: "default" }
55100
55118
  });
55101
- function VR({ className: e, variant: t, ...n }) {
55119
+ function WR({ className: e, variant: t, ...n }) {
55102
55120
  return /* @__PURE__ */ V("div", {
55103
- className: U(BR({ variant: t }), e),
55121
+ className: U(UR({ variant: t }), e),
55104
55122
  ...n
55105
55123
  });
55106
55124
  }
55107
55125
  //#endregion
55108
55126
  //#region ../../node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
55109
- function HR(e) {
55127
+ function GR(e) {
55110
55128
  let { open: t, defaultOpen: n, onOpenChange: r, disabled: i } = e, [a, o] = L_({
55111
55129
  controlled: t,
55112
55130
  default: n,
@@ -55140,28 +55158,28 @@ function HR(e) {
55140
55158
  }
55141
55159
  //#endregion
55142
55160
  //#region ../../node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs
55143
- var UR = /* @__PURE__ */ y.createContext(void 0);
55144
- process.env.NODE_ENV !== "production" && (UR.displayName = "CollapsibleRootContext");
55145
- function WR() {
55146
- let e = y.useContext(UR);
55161
+ var KR = /* @__PURE__ */ y.createContext(void 0);
55162
+ process.env.NODE_ENV !== "production" && (KR.displayName = "CollapsibleRootContext");
55163
+ function qR() {
55164
+ let e = y.useContext(KR);
55147
55165
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(15) : "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.");
55148
55166
  return e;
55149
55167
  }
55150
55168
  //#endregion
55151
55169
  //#region ../../node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs
55152
- var GR = function(e) {
55170
+ var JR = function(e) {
55153
55171
  return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = Jd.startingStyle] = "startingStyle", e[e.endingStyle = Jd.endingStyle] = "endingStyle", e;
55154
- }({}), KR = /* @__PURE__ */ function(e) {
55172
+ }({}), YR = /* @__PURE__ */ function(e) {
55155
55173
  return e.panelOpen = "data-panel-open", e;
55156
- }({}), qR = { [GR.open]: "" }, JR = { [GR.closed]: "" }, YR = { open(e) {
55157
- return e ? { [KR.panelOpen]: "" } : null;
55158
- } }, XR = {
55174
+ }({}), XR = { [JR.open]: "" }, ZR = { [JR.closed]: "" }, QR = { open(e) {
55175
+ return e ? { [YR.panelOpen]: "" } : null;
55176
+ } }, $R = {
55159
55177
  open(e) {
55160
- return e ? qR : JR;
55178
+ return e ? XR : ZR;
55161
55179
  },
55162
55180
  ...Zd
55163
- }, ZR = /* @__PURE__ */ y.forwardRef(function(e, t) {
55164
- let { render: n, className: r, defaultOpen: i = !1, disabled: a = !1, onOpenChange: o, open: s, style: c, ...l } = e, u = J(o), d = HR({
55181
+ }, ez = /* @__PURE__ */ y.forwardRef(function(e, t) {
55182
+ let { render: n, className: r, defaultOpen: i = !1, disabled: a = !1, onOpenChange: o, open: s, style: c, ...l } = e, u = J(o), d = GR({
55165
55183
  open: s,
55166
55184
  defaultOpen: i,
55167
55185
  onOpenChange: u,
@@ -55186,21 +55204,21 @@ var GR = function(e) {
55186
55204
  state: f,
55187
55205
  ref: t,
55188
55206
  props: l,
55189
- stateAttributesMapping: XR
55207
+ stateAttributesMapping: $R
55190
55208
  });
55191
- return /* @__PURE__ */ V(UR.Provider, {
55209
+ return /* @__PURE__ */ V(KR.Provider, {
55192
55210
  value: p,
55193
55211
  children: m
55194
55212
  });
55195
55213
  });
55196
- process.env.NODE_ENV !== "production" && (ZR.displayName = "CollapsibleRoot");
55214
+ process.env.NODE_ENV !== "production" && (ez.displayName = "CollapsibleRoot");
55197
55215
  //#endregion
55198
55216
  //#region ../../node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
55199
- var QR = {
55200
- ...YR,
55217
+ var tz = {
55218
+ ...QR,
55201
55219
  ...Zd
55202
- }, $R = /* @__PURE__ */ y.forwardRef(function(e, t) {
55203
- let { panelId: n, open: r, handleTrigger: i, state: a, disabled: o } = WR(), { className: s, disabled: c = o, render: l, nativeButton: u = !0, style: d, ...f } = e, { getButtonProps: p, buttonRef: m } = Tp({
55220
+ }, nz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55221
+ let { panelId: n, open: r, handleTrigger: i, state: a, disabled: o } = qR(), { className: s, disabled: c = o, render: l, nativeButton: u = !0, style: d, ...f } = e, { getButtonProps: p, buttonRef: m } = Tp({
55204
55222
  disabled: c,
55205
55223
  focusableWhenDisabled: !0,
55206
55224
  native: u
@@ -55217,18 +55235,18 @@ var QR = {
55217
55235
  f,
55218
55236
  p
55219
55237
  ],
55220
- stateAttributesMapping: QR
55238
+ stateAttributesMapping: tz
55221
55239
  });
55222
55240
  });
55223
- process.env.NODE_ENV !== "production" && ($R.displayName = "CollapsibleTrigger");
55241
+ process.env.NODE_ENV !== "production" && (nz.displayName = "CollapsibleTrigger");
55224
55242
  //#endregion
55225
55243
  //#region ../../node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
55226
- var ez = {
55244
+ var rz = {
55227
55245
  height: void 0,
55228
55246
  width: void 0
55229
55247
  };
55230
- function tz(e) {
55231
- let { externalRef: t, hiddenUntilFound: n, id: r, keepMounted: i, mounted: a, onOpenChange: o, open: s, setMounted: c, setOpen: l, transitionStatus: u } = e, d = y.useRef(null), f = y.useRef(null), [p, m] = y.useState(ez), h = y.useRef(ez), g = y.useRef(!1), _ = y.useRef(s), v = y.useRef(!1), [b, x] = y.useState(!1), S = y.useRef(null), C = xo(t, d), w = Do({
55248
+ function iz(e) {
55249
+ let { externalRef: t, hiddenUntilFound: n, id: r, keepMounted: i, mounted: a, onOpenChange: o, open: s, setMounted: c, setOpen: l, transitionStatus: u } = e, d = y.useRef(null), f = y.useRef(null), [p, m] = y.useState(rz), h = y.useRef(rz), g = y.useRef(!1), _ = y.useRef(s), v = y.useRef(!1), [b, x] = y.useState(!1), S = y.useRef(null), C = xo(t, d), w = Do({
55232
55250
  mounted: a,
55233
55251
  open: s
55234
55252
  }), T = Qd(d, !1, !1), E = !s && !a, D = b ? "idle" : u, O = s && (_.current || v.current), k = !s && a && f.current === "css-animation" && p.height === void 0 && p.width === void 0 ? h.current : p, A = n && E && f.current !== "css-animation", j = J((e, t = !0) => {
@@ -55250,37 +55268,37 @@ function tz(e) {
55250
55268
  let e = d.current;
55251
55269
  if (!e) return;
55252
55270
  !s && S.current && M();
55253
- let t = rz(e, O);
55271
+ let t = oz(e, O);
55254
55272
  if (f.current = t, s && u === "idle" && _.current && t === "css-animation") {
55255
- h.current = nz(e);
55273
+ h.current = az(e);
55256
55274
  return;
55257
55275
  }
55258
55276
  if (s && u === "starting") {
55259
55277
  let n = g.current;
55260
55278
  if (g.current = !1, t === "none") {
55261
- j(nz(e)), x(!0);
55279
+ j(az(e)), x(!0);
55262
55280
  return;
55263
55281
  }
55264
55282
  if (t === "css-transition") {
55265
- let t = oz(e);
55266
- return j(nz(e)), n ? (N(az(e, "transition-duration", "0s")), x(!0), t) : t;
55283
+ let t = lz(e);
55284
+ return j(az(e)), n ? (N(cz(e, "transition-duration", "0s")), x(!0), t) : t;
55267
55285
  }
55268
55286
  if (t === "css-animation") {
55269
- if (j(nz(e)), !n) {
55270
- az(e, "animation-name", "none")();
55287
+ if (j(az(e)), !n) {
55288
+ cz(e, "animation-name", "none")();
55271
55289
  return;
55272
55290
  }
55273
- let t = az(e, "animation-name", "none"), r = az(e, "animation-duration", "0s");
55291
+ let t = cz(e, "animation-name", "none"), r = cz(e, "animation-duration", "0s");
55274
55292
  t(), N(r), x(!0);
55275
55293
  return;
55276
55294
  }
55277
55295
  }
55278
55296
  if (!s && a && (u === "idle" || u === "starting")) {
55279
55297
  if (_.current = !1, v.current = !1, t === "none") {
55280
- j(ez, !1), c(!1);
55298
+ j(rz, !1), c(!1);
55281
55299
  return;
55282
55300
  }
55283
- j(nz(e));
55301
+ j(az(e));
55284
55302
  return;
55285
55303
  }
55286
55304
  if (u !== "ending") return;
@@ -55288,12 +55306,12 @@ function tz(e) {
55288
55306
  c(!1);
55289
55307
  return;
55290
55308
  }
55291
- let n = nz(e);
55309
+ let n = az(e);
55292
55310
  if (!((n.height ?? 0) > 0 || (n.width ?? 0) > 0)) {
55293
55311
  c(!1);
55294
55312
  return;
55295
55313
  }
55296
- j(n), t === "css-animation" && az(e, "animation-name", "none")();
55314
+ j(n), t === "css-animation" && cz(e, "animation-name", "none")();
55297
55315
  }, [
55298
55316
  a,
55299
55317
  s,
@@ -55308,13 +55326,13 @@ function tz(e) {
55308
55326
  open: !0,
55309
55327
  ref: d,
55310
55328
  onComplete() {
55311
- s && j(ez, !1);
55329
+ s && j(rz, !1);
55312
55330
  }
55313
55331
  }), y.useEffect(() => {
55314
55332
  if (s || !a || D !== "ending" || !d.current) return;
55315
55333
  let e = new AbortController(), t = -1;
55316
55334
  function n() {
55317
- w.current.open || (c(!1), j(ez, !1));
55335
+ w.current.open || (c(!1), j(rz, !1));
55318
55336
  }
55319
55337
  return t = fa.request(() => {
55320
55338
  e.signal.aborted || T(n, e.signal);
@@ -55345,7 +55363,7 @@ function tz(e) {
55345
55363
  return {
55346
55364
  height: k.height,
55347
55365
  props: {
55348
- ...A ? { [GR.startingStyle]: "" } : void 0,
55366
+ ...A ? { [JR.startingStyle]: "" } : void 0,
55349
55367
  hidden: E,
55350
55368
  id: r
55351
55369
  },
@@ -55356,20 +55374,20 @@ function tz(e) {
55356
55374
  width: k.width
55357
55375
  };
55358
55376
  }
55359
- function nz(e) {
55377
+ function az(e) {
55360
55378
  return {
55361
55379
  height: e.scrollHeight,
55362
55380
  width: e.scrollWidth
55363
55381
  };
55364
55382
  }
55365
- function rz(e, t = !1) {
55366
- let n = _i(e).getComputedStyle(e), r = (n.animationName.split(",").map((e) => e.trim()).some((e) => e !== "" && e !== "none") || t) && iz(n.animationDuration), i = iz(n.transitionDuration);
55383
+ function oz(e, t = !1) {
55384
+ let n = _i(e).getComputedStyle(e), r = (n.animationName.split(",").map((e) => e.trim()).some((e) => e !== "" && e !== "none") || t) && sz(n.animationDuration), i = sz(n.transitionDuration);
55367
55385
  return r && i ? (process.env.NODE_ENV !== "production" && vc("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used."), "css-transition") : i ? "css-transition" : r ? "css-animation" : "none";
55368
55386
  }
55369
- function iz(e) {
55387
+ function sz(e) {
55370
55388
  return e.split(",").map((e) => e.trim()).some((e) => e !== "" && Number.parseFloat(e) > 0);
55371
55389
  }
55372
- function az(e, t, n) {
55390
+ function cz(e, t, n) {
55373
55391
  let r = e.style.getPropertyValue(t), i = e.style.getPropertyPriority(t);
55374
55392
  return e.style.setProperty(t, n), () => {
55375
55393
  if (r === "") {
@@ -55379,7 +55397,7 @@ function az(e, t, n) {
55379
55397
  e.style.setProperty(t, r, i);
55380
55398
  };
55381
55399
  }
55382
- function oz(e) {
55400
+ function lz(e) {
55383
55401
  let t = {
55384
55402
  "justify-content": e.style.justifyContent,
55385
55403
  "align-items": e.style.alignItems,
@@ -55405,20 +55423,20 @@ function oz(e) {
55405
55423
  }
55406
55424
  //#endregion
55407
55425
  //#region ../../node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
55408
- var sz = /* @__PURE__ */ function(e) {
55426
+ var uz = /* @__PURE__ */ function(e) {
55409
55427
  return e.collapsiblePanelHeight = "--collapsible-panel-height", e.collapsiblePanelWidth = "--collapsible-panel-width", e;
55410
- }({}), cz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55428
+ }({}), dz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55411
55429
  let { className: n, hiddenUntilFound: r, keepMounted: i, render: a, id: o, style: s, ...c } = e;
55412
55430
  process.env.NODE_ENV !== "production" && K(() => {
55413
55431
  r && i === !1 && vc("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
55414
55432
  }, [r, i]);
55415
- let { mounted: l, onOpenChange: u, open: d, panelId: f, setMounted: p, setPanelIdState: m, setOpen: h, state: g, transitionStatus: _ } = WR(), v = r ?? !1, y = i ?? !1;
55433
+ let { mounted: l, onOpenChange: u, open: d, panelId: f, setMounted: p, setPanelIdState: m, setOpen: h, state: g, transitionStatus: _ } = qR(), v = r ?? !1, y = i ?? !1;
55416
55434
  K(() => {
55417
55435
  if (o) return m(o), () => {
55418
55436
  m(void 0);
55419
55437
  };
55420
55438
  }, [o, m]);
55421
- let { height: b, props: x, ref: S, shouldPreventOpenAnimation: C, shouldRender: w, transitionStatus: T, width: E } = tz({
55439
+ let { height: b, props: x, ref: S, shouldPreventOpenAnimation: C, shouldRender: w, transitionStatus: T, width: E } = iz({
55422
55440
  externalRef: t,
55423
55441
  hiddenUntilFound: v,
55424
55442
  id: f,
@@ -55441,45 +55459,45 @@ var sz = /* @__PURE__ */ function(e) {
55441
55459
  props: [
55442
55460
  x,
55443
55461
  { style: {
55444
- [sz.collapsiblePanelHeight]: b === void 0 ? "auto" : `${b}px`,
55445
- [sz.collapsiblePanelWidth]: E === void 0 ? "auto" : `${E}px`
55462
+ [uz.collapsiblePanelHeight]: b === void 0 ? "auto" : `${b}px`,
55463
+ [uz.collapsiblePanelWidth]: E === void 0 ? "auto" : `${E}px`
55446
55464
  } },
55447
55465
  c,
55448
55466
  O ? { style: O } : void 0,
55449
55467
  C ? { style: { animationName: "none" } } : void 0
55450
55468
  ],
55451
- stateAttributesMapping: XR
55469
+ stateAttributesMapping: $R
55452
55470
  });
55453
55471
  return w ? k : null;
55454
55472
  });
55455
- process.env.NODE_ENV !== "production" && (cz.displayName = "CollapsiblePanel");
55473
+ process.env.NODE_ENV !== "production" && (dz.displayName = "CollapsiblePanel");
55456
55474
  //#endregion
55457
55475
  //#region src/components/ui/collapsible.tsx
55458
- var lz = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(ZR, {
55476
+ var fz = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(ez, {
55459
55477
  render: lm(e, t),
55460
55478
  ref: r,
55461
55479
  ...n,
55462
55480
  children: t
55463
55481
  }));
55464
- lz.displayName = "Collapsible";
55465
- var uz = y.forwardRef(({ className: e, asChild: t = !1, children: n, ...r }, i) => /* @__PURE__ */ V($R, {
55482
+ fz.displayName = "Collapsible";
55483
+ var pz = y.forwardRef(({ className: e, asChild: t = !1, children: n, ...r }, i) => /* @__PURE__ */ V(nz, {
55466
55484
  className: U("cursor-pointer disabled:cursor-not-allowed", e),
55467
55485
  render: lm(t, n),
55468
55486
  ref: i,
55469
55487
  ...r,
55470
55488
  children: n
55471
55489
  }));
55472
- uz.displayName = "CollapsibleTrigger";
55473
- var dz = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(cz, {
55490
+ pz.displayName = "CollapsibleTrigger";
55491
+ var mz = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(dz, {
55474
55492
  render: lm(e, t),
55475
55493
  ref: r,
55476
55494
  ...n,
55477
55495
  children: t
55478
55496
  }));
55479
- dz.displayName = "CollapsibleContent";
55497
+ mz.displayName = "CollapsibleContent";
55480
55498
  //#endregion
55481
55499
  //#region src/components/ai-elements/code-block.tsx
55482
- var fz = w({ code: "" }), pz = {
55500
+ var hz = w({ code: "" }), gz = {
55483
55501
  name: "line-numbers",
55484
55502
  line(e, t) {
55485
55503
  e.children.unshift({
@@ -55500,8 +55518,8 @@ var fz = w({ code: "" }), pz = {
55500
55518
  });
55501
55519
  }
55502
55520
  };
55503
- async function mz(e, t, n = !1) {
55504
- let r = n ? [pz] : [];
55521
+ async function _z(e, t, n = !1) {
55522
+ let r = n ? [gz] : [];
55505
55523
  return await Promise.all([qe(e, {
55506
55524
  lang: t,
55507
55525
  theme: "one-light",
@@ -55512,11 +55530,11 @@ async function mz(e, t, n = !1) {
55512
55530
  transformers: r
55513
55531
  })]);
55514
55532
  }
55515
- var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, children: i, ...a }) => {
55533
+ var vz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, children: i, ...a }) => {
55516
55534
  let [o, s] = z(""), [c, l] = z("");
55517
55535
  j(() => {
55518
55536
  let r = !1;
55519
- return s(""), l(""), mz(e, t, n).then(([e, t]) => {
55537
+ return s(""), l(""), _z(e, t, n).then(([e, t]) => {
55520
55538
  r || (s(e), l(t));
55521
55539
  }), () => {
55522
55540
  r = !0;
@@ -55527,7 +55545,7 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55527
55545
  n
55528
55546
  ]);
55529
55547
  let u = o.length > 0 && c.length > 0;
55530
- return /* @__PURE__ */ V(fz.Provider, {
55548
+ return /* @__PURE__ */ V(hz.Provider, {
55531
55549
  value: { code: e },
55532
55550
  children: /* @__PURE__ */ V("div", {
55533
55551
  className: U("group relative w-full overflow-hidden rounded-md border bg-background text-foreground", r),
@@ -55550,10 +55568,10 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55550
55568
  })
55551
55569
  })
55552
55570
  });
55553
- }, gz = ({ className: e, ...t }) => /* @__PURE__ */ V(lz, {
55571
+ }, yz = ({ className: e, ...t }) => /* @__PURE__ */ V(fz, {
55554
55572
  className: U("group not-prose w-full rounded-md border", e),
55555
55573
  ...t
55556
- }), _z = {
55574
+ }), bz = {
55557
55575
  "approval-requested": "Awaiting Approval",
55558
55576
  "approval-responded": "Responded",
55559
55577
  "input-available": "Running",
@@ -55561,7 +55579,7 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55561
55579
  "output-available": "Completed",
55562
55580
  "output-denied": "Denied",
55563
55581
  "output-error": "Error"
55564
- }, vz = {
55582
+ }, xz = {
55565
55583
  "approval-requested": /* @__PURE__ */ V(_h, { className: "size-4 text-muted-foreground" }),
55566
55584
  "approval-responded": /* @__PURE__ */ V(mh, { className: "size-4 text-foreground" }),
55567
55585
  "input-available": /* @__PURE__ */ V(_h, { className: "size-4 animate-pulse" }),
@@ -55569,13 +55587,13 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55569
55587
  "output-available": /* @__PURE__ */ V(mh, { className: "size-4 text-foreground" }),
55570
55588
  "output-denied": /* @__PURE__ */ V(hh, { className: "size-4 text-muted-foreground" }),
55571
55589
  "output-error": /* @__PURE__ */ V(hh, { className: "size-4 text-destructive" })
55572
- }, yz = (e, t) => t?.isAutomatic && t.approved === !0 ? "Auto-approved" : e === "approval-responded" && t?.approved === !0 ? "Approved" : _z[e], bz = (e, t) => /* @__PURE__ */ H(VR, {
55590
+ }, Sz = (e, t) => t?.isAutomatic && t.approved === !0 ? "Auto-approved" : e === "approval-responded" && t?.approved === !0 ? "Approved" : bz[e], Cz = (e, t) => /* @__PURE__ */ H(WR, {
55573
55591
  className: "gap-1.5 rounded-full text-xs",
55574
55592
  variant: "secondary",
55575
- children: [vz[e], yz(e, t)]
55576
- }), xz = ({ className: e, title: t, type: n, state: r, toolName: i, approval: a, ...o }) => {
55593
+ children: [xz[e], Sz(e, t)]
55594
+ }), wz = ({ className: e, title: t, type: n, state: r, toolName: i, approval: a, ...o }) => {
55577
55595
  let s = n === "dynamic-tool" ? i : n.split("-").slice(1).join("-");
55578
- return /* @__PURE__ */ H(uz, {
55596
+ return /* @__PURE__ */ H(pz, {
55579
55597
  className: U("flex w-full items-center justify-between gap-4 p-3", e),
55580
55598
  ...o,
55581
55599
  children: [/* @__PURE__ */ H("div", {
@@ -55586,15 +55604,15 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55586
55604
  className: "font-medium text-sm",
55587
55605
  children: t ?? s
55588
55606
  }),
55589
- bz(r, a)
55607
+ Cz(r, a)
55590
55608
  ]
55591
55609
  }), /* @__PURE__ */ V(dh, { className: "size-4 text-muted-foreground group-data-open:rotate-180" })]
55592
55610
  });
55593
- }, Sz = ({ className: e, ...t }) => /* @__PURE__ */ V(dz, {
55611
+ }, Tz = ({ className: e, ...t }) => /* @__PURE__ */ V(mz, {
55594
55612
  className: U("space-y-4 p-4 text-popover-foreground outline-none", e),
55595
55613
  ...t
55596
- }), Cz = 5, wz = ({ className: e, input: t, ...n }) => {
55597
- let [r, i] = z(!1), a = JSON.stringify(t, null, 2) ?? String(t), o = a.split("\n").length > Cz && !r;
55614
+ }), Ez = 5, Dz = ({ className: e, input: t, ...n }) => {
55615
+ let [r, i] = z(!1), a = JSON.stringify(t, null, 2) ?? String(t), o = a.split("\n").length > Ez && !r;
55598
55616
  return /* @__PURE__ */ H("div", {
55599
55617
  className: U("space-y-2 overflow-hidden", e),
55600
55618
  ...n,
@@ -55603,7 +55621,7 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55603
55621
  children: "Parameters"
55604
55622
  }), /* @__PURE__ */ H("div", {
55605
55623
  className: "relative rounded-md bg-muted/50",
55606
- children: [/* @__PURE__ */ V(hz, {
55624
+ children: [/* @__PURE__ */ V(vz, {
55607
55625
  className: U("transition-[max-height] duration-200", o && "max-h-[8.25rem]"),
55608
55626
  code: a,
55609
55627
  language: "json"
@@ -55618,13 +55636,13 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55618
55636
  })] })]
55619
55637
  })]
55620
55638
  });
55621
- }, Tz = ({ className: e, output: t, errorText: n, ...r }) => {
55639
+ }, Oz = ({ className: e, output: t, errorText: n, ...r }) => {
55622
55640
  if (!(t || n)) return null;
55623
55641
  let i = /* @__PURE__ */ V("div", { children: t });
55624
- return typeof t == "object" && !D(t) ? i = /* @__PURE__ */ V(hz, {
55642
+ return typeof t == "object" && !D(t) ? i = /* @__PURE__ */ V(vz, {
55625
55643
  code: JSON.stringify(t, null, 2),
55626
55644
  language: "json"
55627
- }) : typeof t == "string" && (i = /* @__PURE__ */ V(hz, {
55645
+ }) : typeof t == "string" && (i = /* @__PURE__ */ V(vz, {
55628
55646
  code: t,
55629
55647
  language: "json"
55630
55648
  })), /* @__PURE__ */ H("div", {
@@ -55638,7 +55656,7 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55638
55656
  children: [n && /* @__PURE__ */ V("div", { children: n }), i]
55639
55657
  })]
55640
55658
  });
55641
- }, Ez = (e, t) => {
55659
+ }, kz = (e, t) => {
55642
55660
  switch (e) {
55643
55661
  case "create": return t === "present" ? "Creating" : "Created";
55644
55662
  case "update": return t === "present" ? "Updating" : "Updated";
@@ -55646,7 +55664,7 @@ var hz = ({ code: e, language: t, showLineNumbers: n = !1, className: r, childre
55646
55664
  default: return null;
55647
55665
  }
55648
55666
  };
55649
- function Dz({ type: e, result: t, isReadonly: n }) {
55667
+ function Az({ type: e, result: t, isReadonly: n }) {
55650
55668
  let { setArtifact: r } = ES();
55651
55669
  return /* @__PURE__ */ H("button", {
55652
55670
  className: "flex w-fit cursor-pointer flex-row items-center gap-2 rounded-xl border bg-background px-3 py-2",
@@ -55677,12 +55695,12 @@ function Dz({ type: e, result: t, isReadonly: n }) {
55677
55695
  children: e === "create" ? /* @__PURE__ */ V(st, {}) : e === "update" ? /* @__PURE__ */ V(lt, {}) : e === "request-suggestions" ? /* @__PURE__ */ V(mt, {}) : null
55678
55696
  }), /* @__PURE__ */ V("div", {
55679
55697
  className: "text-left",
55680
- children: `${Ez(e, "past")} "${t.title}"`
55698
+ children: `${kz(e, "past")} "${t.title}"`
55681
55699
  })]
55682
55700
  });
55683
55701
  }
55684
- var Oz = O(Dz, () => !0);
55685
- function kz({ type: e, args: t, isReadonly: n }) {
55702
+ var jz = O(Az, () => !0);
55703
+ function Mz({ type: e, args: t, isReadonly: n }) {
55686
55704
  let { setArtifact: r } = ES();
55687
55705
  return /* @__PURE__ */ H("button", {
55688
55706
  className: "flex w-fit cursor-pointer flex-row items-start justify-between gap-3 rounded-xl border px-3 py-2",
@@ -55711,7 +55729,7 @@ function kz({ type: e, args: t, isReadonly: n }) {
55711
55729
  children: e === "create" ? /* @__PURE__ */ V(st, {}) : e === "update" ? /* @__PURE__ */ V(lt, {}) : e === "request-suggestions" ? /* @__PURE__ */ V(mt, {}) : null
55712
55730
  }), /* @__PURE__ */ V("div", {
55713
55731
  className: "text-left",
55714
- children: `${Ez(e, "present")} ${e === "create" && "title" in t && t.title ? `"${t.title}"` : e === "update" && "description" in t ? `"${t.description}"` : e === "request-suggestions" ? "for document" : ""}`
55732
+ children: `${kz(e, "present")} ${e === "create" && "title" in t && t.title ? `"${t.title}"` : e === "update" && "description" in t ? `"${t.description}"` : e === "request-suggestions" ? "for document" : ""}`
55715
55733
  })]
55716
55734
  }), /* @__PURE__ */ V("div", {
55717
55735
  className: "mt-1 animate-spin",
@@ -55719,10 +55737,10 @@ function kz({ type: e, args: t, isReadonly: n }) {
55719
55737
  })]
55720
55738
  });
55721
55739
  }
55722
- O(kz, () => !0);
55740
+ O(Mz, () => !0);
55723
55741
  //#endregion
55724
55742
  //#region src/components/document-preview.tsx
55725
- function Az({ isReadonly: e, result: t, args: n }) {
55743
+ function Nz({ isReadonly: e, result: t, args: n }) {
55726
55744
  let { artifact: r, setArtifact: i } = ES(), { data: a, isLoading: o } = NR(t?.id ?? "", !!t?.id), s = L(() => a?.[0], [a]), c = R(null);
55727
55745
  if (j(() => {
55728
55746
  let e = c.current?.getBoundingClientRect();
@@ -55739,7 +55757,7 @@ function Az({ isReadonly: e, result: t, args: n }) {
55739
55757
  let e = t?.kind ?? n?.kind ?? r.kind, i = t?.title ?? n?.title ?? r.title;
55740
55758
  return /* @__PURE__ */ H("div", {
55741
55759
  className: "w-full max-w-[450px]",
55742
- children: [i ? /* @__PURE__ */ V(Nz, {
55760
+ children: [i ? /* @__PURE__ */ V(Iz, {
55743
55761
  isStreaming: !0,
55744
55762
  kind: e,
55745
55763
  title: i
@@ -55766,21 +55784,21 @@ function Az({ isReadonly: e, result: t, args: n }) {
55766
55784
  return l ? /* @__PURE__ */ H("div", {
55767
55785
  className: "relative w-full max-w-[450px] cursor-pointer",
55768
55786
  children: [
55769
- /* @__PURE__ */ V(Mz, {
55787
+ /* @__PURE__ */ V(Fz, {
55770
55788
  hitboxRef: c,
55771
55789
  result: t,
55772
55790
  setArtifact: i
55773
55791
  }),
55774
- /* @__PURE__ */ V(Nz, {
55792
+ /* @__PURE__ */ V(Iz, {
55775
55793
  isStreaming: r.status === "streaming",
55776
55794
  kind: l.kind,
55777
55795
  title: l.title
55778
55796
  }),
55779
- /* @__PURE__ */ V(Pz, { document: l })
55797
+ /* @__PURE__ */ V(Lz, { document: l })
55780
55798
  ]
55781
- }) : /* @__PURE__ */ V(jz, { artifactKind: r.kind });
55799
+ }) : /* @__PURE__ */ V(Pz, { artifactKind: r.kind });
55782
55800
  }
55783
- var jz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55801
+ var Pz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55784
55802
  className: "w-full max-w-[450px]",
55785
55803
  children: [/* @__PURE__ */ H("div", {
55786
55804
  className: "flex flex-row items-center justify-between gap-2 rounded-t-2xl border border-b-0 border-border/50 px-4 py-3 dark:bg-muted",
@@ -55795,7 +55813,7 @@ var jz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55795
55813
  className: "h-[257px] overflow-hidden rounded-b-2xl border border-t-0 border-border/50 bg-muted p-6",
55796
55814
  children: /* @__PURE__ */ V(cR, {})
55797
55815
  })]
55798
- }), Mz = O(({ hitboxRef: e, result: t, setArtifact: n }) => {
55816
+ }), Fz = O(({ hitboxRef: e, result: t, setArtifact: n }) => {
55799
55817
  let r = k((e) => {
55800
55818
  let r = e.currentTarget.getBoundingClientRect();
55801
55819
  n((e) => ({
@@ -55826,7 +55844,7 @@ var jz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55826
55844
  })
55827
55845
  })
55828
55846
  });
55829
- }, (e, t) => !!ve(e.result, t.result)), Nz = O(({ title: e, kind: t, isStreaming: n }) => /* @__PURE__ */ H("div", {
55847
+ }, (e, t) => !!ve(e.result, t.result)), Iz = O(({ title: e, kind: t, isStreaming: n }) => /* @__PURE__ */ H("div", {
55830
55848
  className: "flex flex-row items-center justify-between gap-2 rounded-t-2xl border border-b-0 border-border/50 px-4 py-3 dark:bg-muted",
55831
55849
  children: [/* @__PURE__ */ H("div", {
55832
55850
  className: "flex flex-row items-center gap-2.5",
@@ -55841,7 +55859,7 @@ var jz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55841
55859
  children: e
55842
55860
  })]
55843
55861
  }), /* @__PURE__ */ V("div", { className: "w-8" })]
55844
- }), (e, t) => !(e.title !== t.title || e.isStreaming !== t.isStreaming)), Pz = ({ document: e }) => {
55862
+ }), (e, t) => !(e.title !== t.title || e.isStreaming !== t.isStreaming)), Lz = ({ document: e }) => {
55845
55863
  let { artifact: t } = ES(), n = U("h-[257px] overflow-hidden rounded-b-2xl border border-t-0 border-border/50 dark:bg-muted", {
55846
55864
  "p-4 sm:px-10 sm:py-10": e.kind === "text",
55847
55865
  "p-0": e.kind === "code"
@@ -55886,16 +55904,16 @@ var jz = ({ artifactKind: e }) => /* @__PURE__ */ H("div", {
55886
55904
  e.kind === "code" && /* @__PURE__ */ V("div", { className: "pointer-events-none absolute inset-y-0 right-0 w-12 bg-gradient-to-l from-muted to-transparent dark:from-muted" })
55887
55905
  ]
55888
55906
  });
55889
- }, Fz = /* @__PURE__ */ y.createContext(void 0);
55890
- process.env.NODE_ENV !== "production" && (Fz.displayName = "AvatarRootContext");
55891
- function Iz() {
55892
- let e = y.useContext(Fz);
55907
+ }, Rz = /* @__PURE__ */ y.createContext(void 0);
55908
+ process.env.NODE_ENV !== "production" && (Rz.displayName = "AvatarRootContext");
55909
+ function zz() {
55910
+ let e = y.useContext(Rz);
55893
55911
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(13) : "Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.");
55894
55912
  return e;
55895
55913
  }
55896
55914
  //#endregion
55897
55915
  //#region ../../node_modules/@base-ui/react/avatar/root/stateAttributesMapping.mjs
55898
- var Lz = { imageLoadingStatus: () => null }, Rz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55916
+ var Bz = { imageLoadingStatus: () => null }, Vz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55899
55917
  let { className: n, render: r, style: i, ...a } = e, [o, s] = y.useState("idle"), c = { imageLoadingStatus: o }, l = y.useMemo(() => ({
55900
55918
  imageLoadingStatus: o,
55901
55919
  setImageLoadingStatus: s
@@ -55903,17 +55921,17 @@ var Lz = { imageLoadingStatus: () => null }, Rz = /* @__PURE__ */ y.forwardRef(f
55903
55921
  state: c,
55904
55922
  ref: t,
55905
55923
  props: a,
55906
- stateAttributesMapping: Lz
55924
+ stateAttributesMapping: Bz
55907
55925
  });
55908
- return /* @__PURE__ */ V(Fz.Provider, {
55926
+ return /* @__PURE__ */ V(Rz.Provider, {
55909
55927
  value: l,
55910
55928
  children: u
55911
55929
  });
55912
55930
  });
55913
- process.env.NODE_ENV !== "production" && (Rz.displayName = "AvatarRoot");
55931
+ process.env.NODE_ENV !== "production" && (Vz.displayName = "AvatarRoot");
55914
55932
  //#endregion
55915
55933
  //#region ../../node_modules/@base-ui/react/avatar/image/useImageLoadingStatus.mjs
55916
- function zz(e, { referrerPolicy: t, crossOrigin: n, sizes: r, srcSet: i }) {
55934
+ function Hz(e, { referrerPolicy: t, crossOrigin: n, sizes: r, srcSet: i }) {
55917
55935
  let [a, o] = y.useState("idle");
55918
55936
  return K(() => {
55919
55937
  if (!e && !i) return o("error"), ma;
@@ -55933,11 +55951,11 @@ function zz(e, { referrerPolicy: t, crossOrigin: n, sizes: r, srcSet: i }) {
55933
55951
  }
55934
55952
  //#endregion
55935
55953
  //#region ../../node_modules/@base-ui/react/avatar/image/AvatarImage.mjs
55936
- var Bz = {
55937
- ...Lz,
55954
+ var Uz = {
55955
+ ...Bz,
55938
55956
  ...Zd
55939
- }, Vz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55940
- let { className: n, render: r, onLoadingStatusChange: i, style: a, ...o } = e, { setImageLoadingStatus: s } = Iz(), c = zz(o.src, o), l = c === "loaded", { mounted: u, transitionStatus: d, setMounted: f } = qd(l), p = y.useRef(null), m = J((e) => {
55957
+ }, Wz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55958
+ let { className: n, render: r, onLoadingStatusChange: i, style: a, ...o } = e, { setImageLoadingStatus: s } = zz(), c = Hz(o.src, o), l = c === "loaded", { mounted: u, transitionStatus: d, setMounted: f } = qd(l), p = y.useRef(null), m = J((e) => {
55941
55959
  i?.(e), s(e);
55942
55960
  });
55943
55961
  K(() => {
@@ -55956,54 +55974,54 @@ var Bz = {
55956
55974
  },
55957
55975
  ref: [t, p],
55958
55976
  props: o,
55959
- stateAttributesMapping: Bz,
55977
+ stateAttributesMapping: Uz,
55960
55978
  enabled: u
55961
55979
  });
55962
55980
  return u ? h : null;
55963
55981
  });
55964
- process.env.NODE_ENV !== "production" && (Vz.displayName = "AvatarImage");
55982
+ process.env.NODE_ENV !== "production" && (Wz.displayName = "AvatarImage");
55965
55983
  //#endregion
55966
55984
  //#region ../../node_modules/@base-ui/react/avatar/fallback/AvatarFallback.mjs
55967
- var Hz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55968
- let { className: n, render: r, delay: i, style: a, ...o } = e, { imageLoadingStatus: s } = Iz(), [c, l] = y.useState(i === void 0), u = ca();
55985
+ var Gz = /* @__PURE__ */ y.forwardRef(function(e, t) {
55986
+ let { className: n, render: r, delay: i, style: a, ...o } = e, { imageLoadingStatus: s } = zz(), [c, l] = y.useState(i === void 0), u = ca();
55969
55987
  return y.useEffect(() => (i === void 0 ? l(!0) : u.start(i, () => l(!0)), u.clear), [u, i]), Lc("span", e, {
55970
55988
  state: { imageLoadingStatus: s },
55971
55989
  ref: t,
55972
55990
  props: o,
55973
- stateAttributesMapping: Lz,
55991
+ stateAttributesMapping: Bz,
55974
55992
  enabled: s !== "loaded" && (i === void 0 || c)
55975
55993
  });
55976
55994
  });
55977
- process.env.NODE_ENV !== "production" && (Hz.displayName = "AvatarFallback");
55995
+ process.env.NODE_ENV !== "production" && (Gz.displayName = "AvatarFallback");
55978
55996
  //#endregion
55979
55997
  //#region src/components/ui/avatar.tsx
55980
- var Uz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Rz, {
55998
+ var Kz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Vz, {
55981
55999
  ref: n,
55982
56000
  className: U("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
55983
56001
  ...t
55984
56002
  }));
55985
- Uz.displayName = "Avatar";
55986
- var Wz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Vz, {
56003
+ Kz.displayName = "Avatar";
56004
+ var qz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Wz, {
55987
56005
  ref: n,
55988
56006
  className: U("aspect-square h-full w-full", e),
55989
56007
  ...t
55990
56008
  }));
55991
- Wz.displayName = "AvatarImage";
55992
- var Gz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Hz, {
56009
+ qz.displayName = "AvatarImage";
56010
+ var Jz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Gz, {
55993
56011
  ref: n,
55994
56012
  className: U("flex h-full w-full items-center justify-center rounded-full bg-muted", e),
55995
56013
  ...t
55996
56014
  }));
55997
- Gz.displayName = "AvatarFallback";
55998
- var Kz = ({ children: e, className: t, ...n }) => /* @__PURE__ */ V("div", {
56015
+ Jz.displayName = "AvatarFallback";
56016
+ var Yz = ({ children: e, className: t, ...n }) => /* @__PURE__ */ V("div", {
55999
56017
  className: U("flex flex-col gap-2 overflow-hidden rounded-lg px-4 py-3 text-foreground text-sm", "group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground", "group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground", "is-user:dark", t),
56000
56018
  ...n,
56001
56019
  children: e
56002
- }), qz = ({ className: e, children: t, ...n }) => /* @__PURE__ */ V("div", {
56020
+ }), Xz = ({ className: e, children: t, ...n }) => /* @__PURE__ */ V("div", {
56003
56021
  className: U("flex items-center gap-1", e),
56004
56022
  ...n,
56005
56023
  children: t
56006
- }), Jz = ({ tooltip: e, children: t, label: n, className: r, variant: i = "ghost", size: a = "sm", ...o }) => {
56024
+ }), Zz = ({ tooltip: e, children: t, label: n, className: r, variant: i = "ghost", size: a = "sm", ...o }) => {
56007
56025
  let s = /* @__PURE__ */ H(Fm, {
56008
56026
  className: U("relative size-9 p-1.5 text-muted-foreground hover:text-foreground", r),
56009
56027
  size: a,
@@ -56022,7 +56040,7 @@ var Kz = ({ children: e, className: t, ...n }) => /* @__PURE__ */ V("div", {
56022
56040
  };
56023
56041
  //#endregion
56024
56042
  //#region src/components/message-actions.tsx
56025
- function Yz({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56043
+ function Qz({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56026
56044
  let [a, o] = GP(), [s, c] = z();
56027
56045
  j(() => {
56028
56046
  c(void 0);
@@ -56036,31 +56054,31 @@ function Yz({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56036
56054
  }
56037
56055
  await o(u), le.success("Copied to clipboard!");
56038
56056
  };
56039
- return t.role === "user" ? /* @__PURE__ */ V(qz, {
56057
+ return t.role === "user" ? /* @__PURE__ */ V(Xz, {
56040
56058
  className: "-mr-0.5 justify-end",
56041
56059
  children: /* @__PURE__ */ H("div", {
56042
56060
  className: "relative",
56043
- children: [i && /* @__PURE__ */ V(Jz, {
56061
+ children: [i && /* @__PURE__ */ V(Zz, {
56044
56062
  className: "-left-10 absolute top-0 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/message:opacity-100",
56045
56063
  "data-testid": "message-edit-button",
56046
56064
  onClick: () => i("edit"),
56047
56065
  tooltip: "Edit",
56048
56066
  children: /* @__PURE__ */ V(lt, {})
56049
- }), /* @__PURE__ */ V(Jz, {
56067
+ }), /* @__PURE__ */ V(Zz, {
56050
56068
  onClick: d,
56051
56069
  tooltip: "Copy",
56052
56070
  children: /* @__PURE__ */ V(xt, {})
56053
56071
  })]
56054
56072
  })
56055
- }) : /* @__PURE__ */ H(qz, {
56073
+ }) : /* @__PURE__ */ H(Xz, {
56056
56074
  className: "-ml-0.5",
56057
56075
  children: [
56058
- /* @__PURE__ */ V(Jz, {
56076
+ /* @__PURE__ */ V(Zz, {
56059
56077
  onClick: d,
56060
56078
  tooltip: "Copy",
56061
56079
  children: /* @__PURE__ */ V(xt, {})
56062
56080
  }),
56063
- /* @__PURE__ */ V(Jz, {
56081
+ /* @__PURE__ */ V(Zz, {
56064
56082
  "data-testid": "message-upvote",
56065
56083
  disabled: l?.isUpvoted,
56066
56084
  onClick: () => {
@@ -56088,7 +56106,7 @@ function Yz({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56088
56106
  tooltip: "Upvote Response",
56089
56107
  children: /* @__PURE__ */ V(St, {})
56090
56108
  }),
56091
- /* @__PURE__ */ V(Jz, {
56109
+ /* @__PURE__ */ V(Zz, {
56092
56110
  "data-testid": "message-downvote",
56093
56111
  disabled: l && !l.isUpvoted,
56094
56112
  onClick: () => {
@@ -56119,15 +56137,15 @@ function Yz({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56119
56137
  ]
56120
56138
  });
56121
56139
  }
56122
- var Xz = O(Yz, (e, t) => !(!ve(e.vote, t.vote) || e.isLoading !== t.isLoading)), Zz = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("textarea", {
56140
+ var $z = O(Qz, (e, t) => !(!ve(e.vote, t.vote) || e.isLoading !== t.isLoading)), eB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("textarea", {
56123
56141
  className: U("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
56124
56142
  ref: n,
56125
56143
  ...t
56126
56144
  }));
56127
- Zz.displayName = "Textarea";
56145
+ eB.displayName = "Textarea";
56128
56146
  //#endregion
56129
56147
  //#region src/components/message-editor.tsx
56130
- function Qz({ message: e, setMode: t, setMessages: n, regenerate: r }) {
56148
+ function tB({ message: e, setMode: t, setMessages: n, regenerate: r }) {
56131
56149
  let [i, a] = z(!1), [o, s] = z(Nm(e)), c = R(null), l = k(() => {
56132
56150
  c.current && (c.current.style.height = "auto", c.current.style.height = `${c.current.scrollHeight + 2}px`);
56133
56151
  }, []);
@@ -56139,7 +56157,7 @@ function Qz({ message: e, setMode: t, setMessages: n, regenerate: r }) {
56139
56157
  };
56140
56158
  return /* @__PURE__ */ H("div", {
56141
56159
  className: "flex w-full flex-col gap-2",
56142
- children: [/* @__PURE__ */ V(Zz, {
56160
+ children: [/* @__PURE__ */ V(eB, {
56143
56161
  className: "w-full resize-none overflow-hidden rounded-xl bg-transparent text-base! outline-hidden",
56144
56162
  "data-testid": "message-editor",
56145
56163
  onChange: u,
@@ -56186,7 +56204,7 @@ function Qz({ message: e, setMode: t, setMessages: n, regenerate: r }) {
56186
56204
  }
56187
56205
  //#endregion
56188
56206
  //#region src/hooks/use-controllable-state.ts
56189
- function $z({ prop: e, defaultProp: t, onChange: n }) {
56207
+ function nB({ prop: e, defaultProp: t, onChange: n }) {
56190
56208
  let [r, i] = y.useState(t), a = e !== void 0, o = a ? e : r;
56191
56209
  return [o, y.useCallback((e) => {
56192
56210
  let t = typeof e == "function" ? e(o) : e;
@@ -56199,33 +56217,33 @@ function $z({ prop: e, defaultProp: t, onChange: n }) {
56199
56217
  }
56200
56218
  //#endregion
56201
56219
  //#region src/components/elements/reasoning.tsx
56202
- var eB = w(null), tB = () => {
56203
- let e = A(eB);
56220
+ var rB = w(null), iB = () => {
56221
+ let e = A(rB);
56204
56222
  if (!e) throw Error("Reasoning components must be used within Reasoning");
56205
56223
  return e;
56206
- }, nB = 1e3, rB = O(({ className: e, isStreaming: t = !1, open: n, defaultOpen: r = !0, onOpenChange: i, duration: a, children: o, ...s }) => {
56207
- let [c, l] = $z({
56224
+ }, aB = 1e3, oB = O(({ className: e, isStreaming: t = !1, open: n, defaultOpen: r = !0, onOpenChange: i, duration: a, children: o, ...s }) => {
56225
+ let [c, l] = nB({
56208
56226
  prop: n,
56209
56227
  defaultProp: r,
56210
56228
  onChange: i
56211
- }), [u, d] = $z({
56229
+ }), [u, d] = nB({
56212
56230
  prop: a,
56213
56231
  defaultProp: void 0
56214
56232
  }), [f, p] = z(null);
56215
56233
  return j(() => {
56216
- t ? f === null && p(Date.now()) : f !== null && (d(Math.ceil((Date.now() - f) / nB)), p(null));
56234
+ t ? f === null && p(Date.now()) : f !== null && (d(Math.ceil((Date.now() - f) / aB)), p(null));
56217
56235
  }, [
56218
56236
  t,
56219
56237
  f,
56220
56238
  d
56221
- ]), /* @__PURE__ */ V(eB.Provider, {
56239
+ ]), /* @__PURE__ */ V(rB.Provider, {
56222
56240
  value: {
56223
56241
  isStreaming: t,
56224
56242
  isOpen: c,
56225
56243
  setIsOpen: l,
56226
56244
  duration: u
56227
56245
  },
56228
- children: /* @__PURE__ */ V(lz, {
56246
+ children: /* @__PURE__ */ V(fz, {
56229
56247
  className: U("not-prose", e),
56230
56248
  onOpenChange: (e) => {
56231
56249
  l(e);
@@ -56235,9 +56253,9 @@ var eB = w(null), tB = () => {
56235
56253
  children: o
56236
56254
  })
56237
56255
  });
56238
- }), iB = O(({ className: e, children: t, ...n }) => {
56239
- let { isStreaming: r, isOpen: i, duration: a } = tB();
56240
- return /* @__PURE__ */ V(uz, {
56256
+ }), sB = O(({ className: e, children: t, ...n }) => {
56257
+ let { isStreaming: r, isOpen: i, duration: a } = iB();
56258
+ return /* @__PURE__ */ V(pz, {
56241
56259
  className: U("flex items-center gap-1 rounded-md px-1.5 py-0.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", e),
56242
56260
  ...n,
56243
56261
  children: t ?? /* @__PURE__ */ H(ce, { children: [
@@ -56250,7 +56268,7 @@ var eB = w(null), tB = () => {
56250
56268
  /* @__PURE__ */ V(dh, { className: U("size-2.5", i ? "rotate-180" : "rotate-0") })
56251
56269
  ] })
56252
56270
  });
56253
- }), aB = O(({ className: e, children: t, ...n }) => /* @__PURE__ */ V(dz, {
56271
+ }), cB = O(({ className: e, children: t, ...n }) => /* @__PURE__ */ V(mz, {
56254
56272
  className: U("mt-1.5 text-sm text-muted-foreground leading-relaxed outline-hidden", e),
56255
56273
  ...n,
56256
56274
  children: /* @__PURE__ */ V("div", {
@@ -56261,11 +56279,11 @@ var eB = w(null), tB = () => {
56261
56279
  })
56262
56280
  })
56263
56281
  }));
56264
- rB.displayName = "Reasoning", iB.displayName = "ReasoningTrigger", aB.displayName = "ReasoningContent";
56282
+ oB.displayName = "Reasoning", sB.displayName = "ReasoningTrigger", cB.displayName = "ReasoningContent";
56265
56283
  //#endregion
56266
56284
  //#region src/components/message-reasoning.tsx
56267
- var oB = 300;
56268
- function sB({ isStreaming: e, reasoning: t }) {
56285
+ var lB = 300;
56286
+ function uB({ isStreaming: e, reasoning: t }) {
56269
56287
  let [n, r] = z(!1), i = t.trim().length > 0, a = R(null), o = R(e);
56270
56288
  j(() => {
56271
56289
  if (a.current !== null && (window.clearTimeout(a.current), a.current = null), e) {
@@ -56275,7 +56293,7 @@ function sB({ isStreaming: e, reasoning: t }) {
56275
56293
  let t = o.current;
56276
56294
  if (o.current = !1, !(!t || !i || !n)) return a.current = window.setTimeout(() => {
56277
56295
  a.current = null, r(!1);
56278
- }, oB), () => {
56296
+ }, lB), () => {
56279
56297
  a.current !== null && (window.clearTimeout(a.current), a.current = null);
56280
56298
  };
56281
56299
  }, [
@@ -56286,17 +56304,17 @@ function sB({ isStreaming: e, reasoning: t }) {
56286
56304
  let s = (e) => {
56287
56305
  e && a.current !== null && (window.clearTimeout(a.current), a.current = null), r(e);
56288
56306
  };
56289
- return /* @__PURE__ */ H(rB, {
56307
+ return /* @__PURE__ */ H(oB, {
56290
56308
  "data-testid": "message-reasoning",
56291
56309
  isStreaming: e,
56292
56310
  onOpenChange: s,
56293
56311
  open: n,
56294
- children: [/* @__PURE__ */ V(iB, {}), /* @__PURE__ */ V(aB, { children: i || e ? t : "Reasoning summary unavailable." })]
56312
+ children: [/* @__PURE__ */ V(sB, {}), /* @__PURE__ */ V(cB, { children: i || e ? t : "Reasoning summary unavailable." })]
56295
56313
  });
56296
56314
  }
56297
56315
  //#endregion
56298
56316
  //#region src/components/preview-attachment.tsx
56299
- var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56317
+ var dB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56300
56318
  let { name: r, url: i, contentType: a } = e;
56301
56319
  return /* @__PURE__ */ H("div", {
56302
56320
  className: "group relative size-16 overflow-hidden rounded-lg border bg-muted",
@@ -56330,7 +56348,7 @@ var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56330
56348
  })
56331
56349
  ]
56332
56350
  });
56333
- }, lB = ({ size: e = 40 }) => /* @__PURE__ */ H("svg", {
56351
+ }, fB = ({ size: e = 40 }) => /* @__PURE__ */ H("svg", {
56334
56352
  fill: "none",
56335
56353
  height: e,
56336
56354
  viewBox: "0 0 24 24",
@@ -56407,7 +56425,7 @@ var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56407
56425
  y2: "4.22"
56408
56426
  })
56409
56427
  ]
56410
- }), uB = ({ size: e = 40 }) => /* @__PURE__ */ V("svg", {
56428
+ }), pB = ({ size: e = 40 }) => /* @__PURE__ */ V("svg", {
56411
56429
  fill: "none",
56412
56430
  height: e,
56413
56431
  viewBox: "0 0 24 24",
@@ -56416,7 +56434,7 @@ var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56416
56434
  d: "M21 12.79A9 9 0 1 1 11.21 3A7 7 0 0 0 21 12.79z",
56417
56435
  fill: "currentColor"
56418
56436
  })
56419
- }), dB = ({ size: e = 24 }) => /* @__PURE__ */ V("svg", {
56437
+ }), mB = ({ size: e = 24 }) => /* @__PURE__ */ V("svg", {
56420
56438
  fill: "none",
56421
56439
  height: e,
56422
56440
  viewBox: "0 0 24 24",
@@ -56427,7 +56445,7 @@ var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56427
56445
  stroke: "currentColor",
56428
56446
  strokeWidth: "2"
56429
56447
  })
56430
- }), fB = {
56448
+ }), hB = {
56431
56449
  latitude: 37.763283,
56432
56450
  longitude: -122.41286,
56433
56451
  generationtime_ms: .027894974,
@@ -56583,10 +56601,10 @@ var cB = ({ attachment: e, isUploading: t = !1, onRemove: n }) => {
56583
56601
  ]
56584
56602
  }
56585
56603
  };
56586
- function pB(e) {
56604
+ function gB(e) {
56587
56605
  return Math.ceil(e);
56588
56606
  }
56589
- function mB({ weatherAtLocation: e = fB }) {
56607
+ function _B({ weatherAtLocation: e = hB }) {
56590
56608
  let t = Math.max(...e.hourly.temperature_2m.slice(0, 24)), n = Math.min(...e.hourly.temperature_2m.slice(0, 24)), r = li(new Date(e.current.time), {
56591
56609
  start: new Date(e.daily.sunrise[0]),
56592
56610
  end: new Date(e.daily.sunset[0])
@@ -56619,10 +56637,10 @@ function mB({ weatherAtLocation: e = fB }) {
56619
56637
  className: "flex items-center gap-3",
56620
56638
  children: [/* @__PURE__ */ V("div", {
56621
56639
  className: "text-primary-foreground/90",
56622
- children: V(r ? lB : uB, { size: 32 })
56640
+ children: V(r ? fB : pB, { size: 32 })
56623
56641
  }), /* @__PURE__ */ H("div", {
56624
56642
  className: "font-light text-3xl text-primary-foreground",
56625
- children: [pB(e.current.temperature_2m), /* @__PURE__ */ V("span", {
56643
+ children: [gB(e.current.temperature_2m), /* @__PURE__ */ V("span", {
56626
56644
  className: "text-lg text-primary-foreground/80",
56627
56645
  children: e.current_units.temperature_2m
56628
56646
  })]
@@ -56633,14 +56651,14 @@ function mB({ weatherAtLocation: e = fB }) {
56633
56651
  className: "font-medium text-primary-foreground/90 text-xs",
56634
56652
  children: [
56635
56653
  "H: ",
56636
- pB(t),
56654
+ gB(t),
56637
56655
  "°"
56638
56656
  ]
56639
56657
  }), /* @__PURE__ */ H("div", {
56640
56658
  className: "text-primary-foreground/70 text-xs",
56641
56659
  children: [
56642
56660
  "L: ",
56643
- pB(n),
56661
+ gB(n),
56644
56662
  "°"
56645
56663
  ]
56646
56664
  })]
@@ -56664,11 +56682,11 @@ function mB({ weatherAtLocation: e = fB }) {
56664
56682
  }),
56665
56683
  /* @__PURE__ */ V("div", {
56666
56684
  className: "text-primary-foreground/60",
56667
- children: /* @__PURE__ */ V(dB, { size: 16 })
56685
+ children: /* @__PURE__ */ V(mB, { size: 16 })
56668
56686
  }),
56669
56687
  /* @__PURE__ */ H("div", {
56670
56688
  className: "font-medium text-primary-foreground text-xs",
56671
- children: [pB(l[t]), "°"]
56689
+ children: [gB(l[t]), "°"]
56672
56690
  })
56673
56691
  ]
56674
56692
  }, e);
@@ -56693,7 +56711,7 @@ function mB({ weatherAtLocation: e = fB }) {
56693
56711
  }
56694
56712
  //#endregion
56695
56713
  //#region src/components/message.tsx
56696
- function hB(e) {
56714
+ function vB(e) {
56697
56715
  if (typeof e != "string") return e;
56698
56716
  try {
56699
56717
  return JSON.parse(e);
@@ -56701,8 +56719,23 @@ function hB(e) {
56701
56719
  return e;
56702
56720
  }
56703
56721
  }
56704
- var gB = (e) => typeof e == "object" && !!e, _B = (e) => !gB(e) || typeof e.error != "string" ? null : e.error.trim() || null;
56705
- function vB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56722
+ var yB = (e) => typeof e == "object" && !!e, bB = (e) => !yB(e) || typeof e.error != "string" ? null : e.error.trim() || null;
56723
+ function xB(e) {
56724
+ if (typeof e != "string") return null;
56725
+ let t = new Date(e);
56726
+ return Number.isNaN(t.getTime()) ? null : {
56727
+ dateTime: t.toISOString(),
56728
+ label: new Intl.DateTimeFormat(void 0, {
56729
+ hour: "2-digit",
56730
+ minute: "2-digit"
56731
+ }).format(t),
56732
+ title: new Intl.DateTimeFormat(void 0, {
56733
+ dateStyle: "medium",
56734
+ timeStyle: "medium"
56735
+ }).format(t)
56736
+ };
56737
+ }
56738
+ function SB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56706
56739
  return /* @__PURE__ */ H("div", {
56707
56740
  className: "flex items-center justify-end gap-2 px-4 py-3",
56708
56741
  children: [/* @__PURE__ */ V(Fm, {
@@ -56730,18 +56763,18 @@ function vB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56730
56763
  })]
56731
56764
  });
56732
56765
  }
56733
- var yB = new Set([
56766
+ var CB = new Set([
56734
56767
  "text",
56735
56768
  "code",
56736
56769
  "image",
56737
56770
  "sheet"
56738
- ]), bB = new Set([
56771
+ ]), wB = new Set([
56739
56772
  "tool-createDocument",
56740
56773
  "tool-updateDocument",
56741
56774
  "tool-editDocument",
56742
56775
  "tool-requestSuggestions"
56743
- ]), xB = (e) => bB.has(e), SB = (e) => !(!gB(e) || !("id" in e || "title" in e || "kind" in e || "content" in e) || "id" in e && typeof e.id != "string" || "title" in e && typeof e.title != "string" || "kind" in e && (typeof e.kind != "string" || !yB.has(e.kind)) || "content" in e && typeof e.content != "string");
56744
- function CB(e, t) {
56776
+ ]), TB = (e) => wB.has(e), EB = (e) => !(!yB(e) || !("id" in e || "title" in e || "kind" in e || "content" in e) || "id" in e && typeof e.id != "string" || "title" in e && typeof e.title != "string" || "kind" in e && (typeof e.kind != "string" || !CB.has(e.kind)) || "content" in e && typeof e.content != "string");
56777
+ function DB(e, t) {
56745
56778
  let n = [];
56746
56779
  for (let r = 0; r < t.length; r++) {
56747
56780
  let i = t[r];
@@ -56768,13 +56801,13 @@ function CB(e, t) {
56768
56801
  }
56769
56802
  return n;
56770
56803
  }
56771
- var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoading: i, renderMessagePart: s, setMessages: c, regenerate: l, isReadonly: u, requiresScrollPadding: d }) => {
56772
- let [f, p] = z("view"), m = n.parts?.some((e) => e.type === "text" && e.text?.trim()), h = n.parts?.some((e) => a(e.type)), g = n.parts.filter((e) => e.type === "file"), _ = CB(n.id, n.parts);
56773
- return ot(), /* @__PURE__ */ V("div", {
56804
+ var OB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoading: i, renderMessagePart: s, setMessages: c, regenerate: l, isReadonly: u, requiresScrollPadding: d }) => {
56805
+ let [f, p] = z("view"), m = n.parts?.some((e) => e.type === "text" && e.text?.trim()), h = n.parts?.some((e) => a(e.type)), g = n.parts.filter((e) => e.type === "file"), _ = DB(n.id, HR(n.parts)), v = xB(n.metadata?.createdAt);
56806
+ return ot(), /* @__PURE__ */ H("div", {
56774
56807
  className: "group/message fade-in w-full animate-in duration-200",
56775
56808
  "data-role": n.role,
56776
56809
  "data-testid": `message-${n.role}`,
56777
- children: /* @__PURE__ */ H("div", {
56810
+ children: [/* @__PURE__ */ H("div", {
56778
56811
  className: U("flex w-full items-start gap-2 md:gap-3", {
56779
56812
  "justify-end": n.role === "user" && f !== "edit",
56780
56813
  "justify-start": n.role === "assistant"
@@ -56792,7 +56825,7 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56792
56825
  g.length > 0 && /* @__PURE__ */ V("div", {
56793
56826
  className: "flex flex-row justify-end gap-2",
56794
56827
  "data-testid": "message-attachments",
56795
- children: g.map((e) => /* @__PURE__ */ V(cB, { attachment: {
56828
+ children: g.map((e) => /* @__PURE__ */ V(dB, { attachment: {
56796
56829
  name: e.filename ?? "file",
56797
56830
  contentType: e.mediaType,
56798
56831
  url: e.url
@@ -56806,12 +56839,12 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56806
56839
  part: t
56807
56840
  });
56808
56841
  if (m !== void 0) return /* @__PURE__ */ V(C, { children: m }, r);
56809
- if (d === "reasoning" && o(t)) return /* @__PURE__ */ V(sB, {
56842
+ if (d === "reasoning" && o(t)) return /* @__PURE__ */ V(uB, {
56810
56843
  isStreaming: t.state === "streaming",
56811
56844
  reasoning: t.text ?? ""
56812
56845
  }, r);
56813
56846
  if (d === "text") {
56814
- if (f === "view") return /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(Kz, {
56847
+ if (f === "view") return /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(Yz, {
56815
56848
  className: U({
56816
56849
  "wrap-break-word w-fit rounded-2xl bg-primary px-3 py-2 text-left text-primary-foreground": n.role === "user",
56817
56850
  "bg-transparent px-0 py-0 text-left": n.role === "assistant"
@@ -56823,7 +56856,7 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56823
56856
  className: "flex w-full flex-row items-start gap-3",
56824
56857
  children: [/* @__PURE__ */ V("div", { className: "size-8" }), /* @__PURE__ */ V("div", {
56825
56858
  className: "min-w-0 flex-1",
56826
- children: /* @__PURE__ */ V(Qz, {
56859
+ children: /* @__PURE__ */ V(tB, {
56827
56860
  message: n,
56828
56861
  regenerate: l,
56829
56862
  setMessages: c,
@@ -56833,78 +56866,78 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56833
56866
  }, r);
56834
56867
  }
56835
56868
  if (d === "tool-getWeather") {
56836
- let { toolCallId: n, state: r } = t, i = t.approval?.id, a = t.approval, o = r === "output-denied" || r === "approval-responded" && t.approval?.approved === !1, s = "w-[min(100%,450px)]", c = _B(t.output);
56869
+ let { toolCallId: n, state: r } = t, i = t.approval?.id, a = t.approval, o = r === "output-denied" || r === "approval-responded" && t.approval?.approved === !1, s = "w-[min(100%,450px)]", c = bB(t.output);
56837
56870
  return r === "output-available" ? c ? /* @__PURE__ */ V("div", {
56838
56871
  className: s,
56839
- children: /* @__PURE__ */ H(gz, {
56872
+ children: /* @__PURE__ */ H(yz, {
56840
56873
  className: "w-full",
56841
56874
  defaultOpen: !0,
56842
- children: [/* @__PURE__ */ V(xz, {
56875
+ children: [/* @__PURE__ */ V(wz, {
56843
56876
  approval: a,
56844
56877
  state: "output-error",
56845
56878
  type: "tool-getWeather"
56846
- }), /* @__PURE__ */ V(Sz, { children: /* @__PURE__ */ V(Tz, {
56879
+ }), /* @__PURE__ */ V(Tz, { children: /* @__PURE__ */ V(Oz, {
56847
56880
  errorText: c,
56848
56881
  output: null
56849
56882
  }) })]
56850
56883
  })
56851
56884
  }, n) : /* @__PURE__ */ V("div", {
56852
56885
  className: s,
56853
- children: /* @__PURE__ */ V(mB, { weatherAtLocation: t.output })
56886
+ children: /* @__PURE__ */ V(_B, { weatherAtLocation: t.output })
56854
56887
  }, n) : r === "output-error" ? /* @__PURE__ */ V("div", {
56855
56888
  className: s,
56856
- children: /* @__PURE__ */ H(gz, {
56889
+ children: /* @__PURE__ */ H(yz, {
56857
56890
  className: "w-full",
56858
56891
  defaultOpen: !0,
56859
- children: [/* @__PURE__ */ V(xz, {
56892
+ children: [/* @__PURE__ */ V(wz, {
56860
56893
  approval: a,
56861
56894
  state: r,
56862
56895
  type: "tool-getWeather"
56863
- }), /* @__PURE__ */ V(Sz, { children: /* @__PURE__ */ V(Tz, {
56896
+ }), /* @__PURE__ */ V(Tz, { children: /* @__PURE__ */ V(Oz, {
56864
56897
  errorText: t.errorText,
56865
56898
  output: null
56866
56899
  }) })]
56867
56900
  })
56868
56901
  }, n) : o ? /* @__PURE__ */ V("div", {
56869
56902
  className: s,
56870
- children: /* @__PURE__ */ H(gz, {
56903
+ children: /* @__PURE__ */ H(yz, {
56871
56904
  className: "w-full",
56872
56905
  defaultOpen: !0,
56873
- children: [/* @__PURE__ */ V(xz, {
56906
+ children: [/* @__PURE__ */ V(wz, {
56874
56907
  approval: a,
56875
56908
  state: "output-denied",
56876
56909
  type: "tool-getWeather"
56877
- }), /* @__PURE__ */ V(Sz, { children: /* @__PURE__ */ V("div", {
56910
+ }), /* @__PURE__ */ V(Tz, { children: /* @__PURE__ */ V("div", {
56878
56911
  className: "px-4 py-3 text-muted-foreground text-sm",
56879
56912
  children: "Weather lookup was denied."
56880
56913
  }) })]
56881
56914
  })
56882
56915
  }, n) : r === "approval-responded" ? /* @__PURE__ */ V("div", {
56883
56916
  className: s,
56884
- children: /* @__PURE__ */ H(gz, {
56917
+ children: /* @__PURE__ */ H(yz, {
56885
56918
  className: "w-full",
56886
56919
  defaultOpen: !0,
56887
- children: [/* @__PURE__ */ V(xz, {
56920
+ children: [/* @__PURE__ */ V(wz, {
56888
56921
  approval: a,
56889
56922
  state: r,
56890
56923
  type: "tool-getWeather"
56891
- }), /* @__PURE__ */ H(Sz, { children: [/* @__PURE__ */ V(wz, { input: t.input }), a?.reason && /* @__PURE__ */ V("div", {
56924
+ }), /* @__PURE__ */ H(Tz, { children: [/* @__PURE__ */ V(Dz, { input: t.input }), a?.reason && /* @__PURE__ */ V("div", {
56892
56925
  className: "text-muted-foreground text-sm",
56893
56926
  children: a.reason
56894
56927
  })] })]
56895
56928
  })
56896
56929
  }, n) : /* @__PURE__ */ V("div", {
56897
56930
  className: s,
56898
- children: /* @__PURE__ */ H(gz, {
56931
+ children: /* @__PURE__ */ H(yz, {
56899
56932
  className: "w-full",
56900
56933
  defaultOpen: !0,
56901
- children: [/* @__PURE__ */ V(xz, {
56934
+ children: [/* @__PURE__ */ V(wz, {
56902
56935
  approval: a,
56903
56936
  state: r,
56904
56937
  type: "tool-getWeather"
56905
- }), /* @__PURE__ */ H(Sz, { children: [
56906
- (r === "input-available" || r === "approval-requested") && /* @__PURE__ */ V(wz, { input: t.input }),
56907
- r === "approval-requested" && i && !a?.isAutomatic && /* @__PURE__ */ V(vB, {
56938
+ }), /* @__PURE__ */ H(Tz, { children: [
56939
+ (r === "input-available" || r === "approval-requested") && /* @__PURE__ */ V(Dz, { input: t.input }),
56940
+ r === "approval-requested" && i && !a?.isAutomatic && /* @__PURE__ */ V(SB, {
56908
56941
  addToolApprovalResponse: e,
56909
56942
  approvalId: i,
56910
56943
  denyReason: "User denied weather lookup"
@@ -56917,22 +56950,22 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56917
56950
  })
56918
56951
  }, n);
56919
56952
  }
56920
- if (xB(d)) {
56953
+ if (TB(d)) {
56921
56954
  let n = t, { approval: i } = n, a = n.state, o = a === "output-denied" || a === "approval-responded" && i?.approved === !1;
56922
56955
  if (a === "approval-requested" || a === "approval-responded" || a === "output-denied") {
56923
56956
  let t = n.toolCallId ?? r;
56924
56957
  return /* @__PURE__ */ V("div", {
56925
56958
  className: "w-[min(100%,450px)]",
56926
- children: /* @__PURE__ */ H(gz, {
56959
+ children: /* @__PURE__ */ H(yz, {
56927
56960
  className: "w-full",
56928
56961
  defaultOpen: !0,
56929
- children: [/* @__PURE__ */ V(xz, {
56962
+ children: [/* @__PURE__ */ V(wz, {
56930
56963
  approval: i,
56931
56964
  state: o ? "output-denied" : a,
56932
56965
  type: d
56933
- }), /* @__PURE__ */ H(Sz, { children: [
56934
- n.input !== void 0 && /* @__PURE__ */ V(wz, { input: hB(n.input) }),
56935
- a === "approval-requested" && i && !i.isAutomatic && /* @__PURE__ */ V(vB, {
56966
+ }), /* @__PURE__ */ H(Tz, { children: [
56967
+ n.input !== void 0 && /* @__PURE__ */ V(Dz, { input: vB(n.input) }),
56968
+ a === "approval-requested" && i && !i.isAutomatic && /* @__PURE__ */ V(SB, {
56936
56969
  addToolApprovalResponse: e,
56937
56970
  approvalId: i.id,
56938
56971
  denyReason: "User denied tool call"
@@ -56951,23 +56984,23 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56951
56984
  }
56952
56985
  }
56953
56986
  if (d === "tool-createDocument") {
56954
- let { toolCallId: e } = t, n = t.output, r = SB(n) ? n : void 0;
56955
- return gB(n) && "error" in n ? /* @__PURE__ */ H("div", {
56987
+ let { toolCallId: e } = t, n = t.output, r = EB(n) ? n : void 0;
56988
+ return yB(n) && "error" in n ? /* @__PURE__ */ H("div", {
56956
56989
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
56957
56990
  children: ["Error creating document: ", String(n.error)]
56958
- }, e) : /* @__PURE__ */ V(Az, {
56991
+ }, e) : /* @__PURE__ */ V(Nz, {
56959
56992
  isReadonly: u,
56960
56993
  result: r
56961
56994
  }, e);
56962
56995
  }
56963
56996
  if (d === "tool-updateDocument") {
56964
- let { toolCallId: e } = t, n = t.output, r = SB(n) ? n : void 0;
56965
- return gB(n) && "error" in n ? /* @__PURE__ */ H("div", {
56997
+ let { toolCallId: e } = t, n = t.output, r = EB(n) ? n : void 0;
56998
+ return yB(n) && "error" in n ? /* @__PURE__ */ H("div", {
56966
56999
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
56967
57000
  children: ["Error updating document: ", String(n.error)]
56968
57001
  }, e) : /* @__PURE__ */ V("div", {
56969
57002
  className: "relative",
56970
- children: /* @__PURE__ */ V(Az, {
57003
+ children: /* @__PURE__ */ V(Nz, {
56971
57004
  args: r ? {
56972
57005
  ...r,
56973
57006
  isUpdate: !0
@@ -56978,13 +57011,13 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56978
57011
  }, e);
56979
57012
  }
56980
57013
  if (d === "tool-editDocument") {
56981
- let { toolCallId: e } = t, n = t.output, r = SB(n) ? n : void 0;
56982
- return gB(n) && "error" in n ? /* @__PURE__ */ H("div", {
57014
+ let { toolCallId: e } = t, n = t.output, r = EB(n) ? n : void 0;
57015
+ return yB(n) && "error" in n ? /* @__PURE__ */ H("div", {
56983
57016
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
56984
57017
  children: ["Error editing document: ", String(n.error)]
56985
57018
  }, e) : /* @__PURE__ */ V("div", {
56986
57019
  className: "relative",
56987
- children: /* @__PURE__ */ V(Az, {
57020
+ children: /* @__PURE__ */ V(Nz, {
56988
57021
  args: r ? {
56989
57022
  ...r,
56990
57023
  isUpdate: !0
@@ -56996,17 +57029,17 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56996
57029
  }
56997
57030
  if (d === "tool-requestSuggestions") {
56998
57031
  let { toolCallId: e, state: n } = t;
56999
- return /* @__PURE__ */ H(gz, {
57032
+ return /* @__PURE__ */ H(yz, {
57000
57033
  defaultOpen: !0,
57001
- children: [/* @__PURE__ */ V(xz, {
57034
+ children: [/* @__PURE__ */ V(wz, {
57002
57035
  state: n,
57003
57036
  type: "tool-requestSuggestions"
57004
- }), /* @__PURE__ */ H(Sz, { children: [n === "input-available" && /* @__PURE__ */ V(wz, { input: t.input }), n === "output-available" && /* @__PURE__ */ V(Tz, {
57037
+ }), /* @__PURE__ */ H(Tz, { children: [n === "input-available" && /* @__PURE__ */ V(Dz, { input: t.input }), n === "output-available" && /* @__PURE__ */ V(Oz, {
57005
57038
  errorText: void 0,
57006
- output: gB(t.output) && "error" in t.output ? /* @__PURE__ */ H("div", {
57039
+ output: yB(t.output) && "error" in t.output ? /* @__PURE__ */ H("div", {
57007
57040
  className: "rounded border p-2 text-destructive",
57008
57041
  children: ["Error: ", String(t.output.error)]
57009
- }) : /* @__PURE__ */ V(Oz, {
57042
+ }) : /* @__PURE__ */ V(jz, {
57010
57043
  isReadonly: u,
57011
57044
  result: t.output,
57012
57045
  type: "request-suggestions"
@@ -57018,23 +57051,23 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57018
57051
  let n = t, i = n.toolCallId ?? r, a = n.state, o = n.approval?.id, s = typeof n.title == "string" ? n.title : void 0, c = typeof n.toolName == "string" ? n.toolName : "tool", l = n.state === "output-denied" || n.state === "approval-responded" && n.approval?.approved === !1;
57019
57052
  return /* @__PURE__ */ V("div", {
57020
57053
  className: "w-[min(100%,450px)]",
57021
- children: /* @__PURE__ */ H(gz, {
57054
+ children: /* @__PURE__ */ H(yz, {
57022
57055
  className: "w-full",
57023
57056
  defaultOpen: !0,
57024
- children: [d === "dynamic-tool" ? /* @__PURE__ */ V(xz, {
57057
+ children: [d === "dynamic-tool" ? /* @__PURE__ */ V(wz, {
57025
57058
  approval: n.approval,
57026
57059
  state: l ? "output-denied" : a,
57027
57060
  title: s,
57028
57061
  toolName: c,
57029
57062
  type: "dynamic-tool"
57030
- }) : /* @__PURE__ */ V(xz, {
57063
+ }) : /* @__PURE__ */ V(wz, {
57031
57064
  approval: n.approval,
57032
57065
  state: l ? "output-denied" : a,
57033
57066
  title: s,
57034
57067
  type: d
57035
- }), /* @__PURE__ */ H(Sz, { children: [
57036
- n.input !== void 0 && (n.state === "input-available" || n.state === "approval-requested" || n.state === "approval-responded" || n.state === "output-available" || n.state === "output-error" || n.state === "output-denied") && /* @__PURE__ */ V(wz, { input: hB(n.input) }),
57037
- n.state === "approval-requested" && o && !n.approval?.isAutomatic && /* @__PURE__ */ V(vB, {
57068
+ }), /* @__PURE__ */ H(Tz, { children: [
57069
+ n.input !== void 0 && (n.state === "input-available" || n.state === "approval-requested" || n.state === "approval-responded" || n.state === "output-available" || n.state === "output-error" || n.state === "output-denied") && /* @__PURE__ */ V(Dz, { input: vB(n.input) }),
57070
+ n.state === "approval-requested" && o && !n.approval?.isAutomatic && /* @__PURE__ */ V(SB, {
57038
57071
  addToolApprovalResponse: e,
57039
57072
  approvalId: o,
57040
57073
  denyReason: "User denied tool call"
@@ -57047,9 +57080,9 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57047
57080
  className: "border-t px-4 py-3 text-muted-foreground text-sm",
57048
57081
  children: "This tool call was denied."
57049
57082
  }),
57050
- !l && (n.output !== void 0 || n.errorText !== void 0) && /* @__PURE__ */ V(Tz, {
57083
+ !l && (n.output !== void 0 || n.errorText !== void 0) && /* @__PURE__ */ V(Oz, {
57051
57084
  errorText: n.errorText,
57052
- output: n.output === void 0 ? null : hB(n.output)
57085
+ output: n.output === void 0 ? null : vB(n.output)
57053
57086
  })
57054
57087
  ] })]
57055
57088
  })
@@ -57057,7 +57090,7 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57057
57090
  }
57058
57091
  return null;
57059
57092
  }),
57060
- !u && /* @__PURE__ */ V(Xz, {
57093
+ !u && /* @__PURE__ */ V($z, {
57061
57094
  chatId: t,
57062
57095
  isLoading: i,
57063
57096
  message: n,
@@ -57066,10 +57099,23 @@ var wB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57066
57099
  }, `action-${n.id}`)
57067
57100
  ]
57068
57101
  })]
57069
- })
57102
+ }), v && f === "view" ? /* @__PURE__ */ V("div", {
57103
+ className: U("mt-1 flex", {
57104
+ "justify-end pr-1": n.role === "user",
57105
+ "justify-start pl-10 md:pl-11": n.role === "assistant"
57106
+ }),
57107
+ children: /* @__PURE__ */ V("time", {
57108
+ "aria-label": v.title,
57109
+ className: "text-[10px] tabular-nums leading-none text-muted-foreground",
57110
+ dateTime: v.dateTime,
57111
+ suppressHydrationWarning: !0,
57112
+ title: v.title,
57113
+ children: v.label
57114
+ })
57115
+ }) : null]
57070
57116
  });
57071
57117
  };
57072
- function TB() {
57118
+ function kB() {
57073
57119
  let { waitingStatus: e } = ot();
57074
57120
  return /* @__PURE__ */ V("div", {
57075
57121
  className: "flex min-w-0 items-center gap-1 p-0 text-muted-foreground text-sm",
@@ -57079,7 +57125,7 @@ function TB() {
57079
57125
  })
57080
57126
  });
57081
57127
  }
57082
- var EB = () => /* @__PURE__ */ V("div", {
57128
+ var AB = () => /* @__PURE__ */ V("div", {
57083
57129
  className: "group/message fade-in w-full animate-in duration-300",
57084
57130
  "data-role": "assistant",
57085
57131
  "data-testid": "message-assistant-loading",
@@ -57093,19 +57139,19 @@ var EB = () => /* @__PURE__ */ V("div", {
57093
57139
  })
57094
57140
  }), /* @__PURE__ */ V("div", {
57095
57141
  className: "min-w-0 flex-1",
57096
- children: /* @__PURE__ */ V(TB, {})
57142
+ children: /* @__PURE__ */ V(kB, {})
57097
57143
  })]
57098
57144
  })
57099
57145
  });
57100
57146
  //#endregion
57101
57147
  //#region src/components/artifact-messages.tsx
57102
- function DB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messages: i, renderMessagePart: a, setMessages: o, regenerate: s, isReadonly: c }) {
57148
+ function jB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messages: i, renderMessagePart: a, setMessages: o, regenerate: s, isReadonly: c }) {
57103
57149
  let { containerRef: l, endRef: u, onViewportEnter: d, onViewportLeave: f, hasSentMessage: p } = zR({ status: n });
57104
57150
  return /* @__PURE__ */ H("div", {
57105
57151
  className: "flex h-full flex-col items-center gap-4 overflow-y-scroll px-4 pt-20",
57106
57152
  ref: l,
57107
57153
  children: [
57108
- i.map((l, u) => /* @__PURE__ */ V(wB, {
57154
+ i.map((l, u) => /* @__PURE__ */ V(OB, {
57109
57155
  addToolApprovalResponse: e,
57110
57156
  chatId: t,
57111
57157
  isLoading: n === "streaming" && u === i.length - 1,
@@ -57119,7 +57165,7 @@ function DB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messag
57119
57165
  }, l.id)),
57120
57166
  /* @__PURE__ */ V(hM, {
57121
57167
  mode: "wait",
57122
- children: n === "submitted" && !i.some((e) => e.parts?.some((e) => "state" in e && e.state === "approval-responded")) && /* @__PURE__ */ V(EB, {}, "thinking")
57168
+ children: n === "submitted" && !i.some((e) => e.parts?.some((e) => "state" in e && e.state === "approval-responded")) && /* @__PURE__ */ V(AB, {}, "thinking")
57123
57169
  }),
57124
57170
  /* @__PURE__ */ V(cP.div, {
57125
57171
  className: "min-h-[24px] min-w-[24px] shrink-0",
@@ -57130,10 +57176,10 @@ function DB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messag
57130
57176
  ]
57131
57177
  });
57132
57178
  }
57133
- function OB(e, t) {
57179
+ function MB(e, t) {
57134
57180
  return e.artifactStatus === "streaming" && t.artifactStatus === "streaming" ? !0 : !(e.status !== t.status || e.status && t.status || e.messages.length !== t.messages.length || !ve(e.votes, t.votes) || e.renderMessagePart !== t.renderMessagePart);
57135
57181
  }
57136
- var kB = O(DB, OB), AB = Ah, jB = Jp, MB = y.forwardRef(({ className: e, ...t }, n) => {
57182
+ var NB = O(jB, MB), PB = Ah, FB = Jp, IB = y.forwardRef(({ className: e, ...t }, n) => {
57137
57183
  let { resolvedTheme: r, theme: i } = Vm();
57138
57184
  return /* @__PURE__ */ V(yp, {
57139
57185
  ref: n,
@@ -57143,24 +57189,24 @@ var kB = O(DB, OB), AB = Ah, jB = Jp, MB = y.forwardRef(({ className: e, ...t },
57143
57189
  ...t
57144
57190
  });
57145
57191
  });
57146
- MB.displayName = "DialogOverlay";
57147
- var NB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(em, {
57192
+ IB.displayName = "DialogOverlay";
57193
+ var LB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(em, {
57148
57194
  ref: r,
57149
57195
  render: lm(e, t),
57150
57196
  ...n,
57151
57197
  children: t
57152
57198
  }));
57153
- NB.displayName = "DialogTrigger";
57154
- var PB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(Op, {
57199
+ LB.displayName = "DialogTrigger";
57200
+ var RB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(Op, {
57155
57201
  ref: r,
57156
57202
  render: lm(e, t),
57157
57203
  ...n,
57158
57204
  children: t
57159
57205
  }));
57160
- PB.displayName = "DialogClose";
57161
- var FB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57206
+ RB.displayName = "DialogClose";
57207
+ var zB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57162
57208
  let { resolvedTheme: i, theme: a } = Vm();
57163
- return /* @__PURE__ */ H(jB, { children: [/* @__PURE__ */ V(MB, {}), /* @__PURE__ */ H(Gp, {
57209
+ return /* @__PURE__ */ H(FB, { children: [/* @__PURE__ */ V(IB, {}), /* @__PURE__ */ H(Gp, {
57164
57210
  ref: r,
57165
57211
  className: U("agents-sdk fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 opacity-0 shadow-lg transition-opacity duration-200 data-open:opacity-100 data-closed:opacity-0 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:rounded-lg", e),
57166
57212
  "data-agents-sdk-resolved-theme": i,
@@ -57175,48 +57221,48 @@ var FB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57175
57221
  })]
57176
57222
  })] });
57177
57223
  });
57178
- FB.displayName = "DialogContent";
57179
- var IB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57224
+ zB.displayName = "DialogContent";
57225
+ var BB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57180
57226
  className: U("flex flex-col space-y-1.5 text-center sm:text-left", e),
57181
57227
  ...t
57182
57228
  });
57183
- IB.displayName = "DialogHeader";
57184
- var LB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57229
+ BB.displayName = "DialogHeader";
57230
+ var VB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57185
57231
  className: U("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
57186
57232
  ...t
57187
57233
  });
57188
- LB.displayName = "DialogFooter";
57189
- var RB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Yp, {
57234
+ VB.displayName = "DialogFooter";
57235
+ var HB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Yp, {
57190
57236
  ref: n,
57191
57237
  className: U("text-lg font-semibold leading-none tracking-tight", e),
57192
57238
  ...t
57193
57239
  }));
57194
- RB.displayName = "DialogTitle";
57195
- var zB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Ap, {
57240
+ HB.displayName = "DialogTitle";
57241
+ var UB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Ap, {
57196
57242
  ref: n,
57197
57243
  className: U("text-sm text-muted-foreground", e),
57198
57244
  ...t
57199
57245
  }));
57200
- zB.displayName = "DialogDescription";
57246
+ UB.displayName = "DialogDescription";
57201
57247
  //#endregion
57202
57248
  //#region src/components/ui/command.tsx
57203
- var BB = y.createContext(null), VB = (e) => e.trim().toLocaleLowerCase(), HB = (e) => {
57249
+ var WB = y.createContext(null), GB = (e) => e.trim().toLocaleLowerCase(), KB = (e) => {
57204
57250
  if (typeof e == "string" || typeof e == "number") return String(e);
57205
- if (Array.isArray(e)) return e.map(HB).join(" ");
57251
+ if (Array.isArray(e)) return e.map(KB).join(" ");
57206
57252
  if (y.isValidElement(e)) {
57207
57253
  let t = e.props;
57208
- return `${typeof t.alt == "string" ? t.alt : ""} ${HB(t.children)}`.trim();
57254
+ return `${typeof t.alt == "string" ? t.alt : ""} ${KB(t.children)}`.trim();
57209
57255
  }
57210
57256
  return "";
57211
- }, UB = (e, t) => {
57212
- let n = VB(e);
57213
- return n ? VB(`${t.value} ${t.searchValue}`).includes(n) : !0;
57214
- }, WB = () => {
57215
- let e = y.useContext(BB);
57257
+ }, qB = (e, t) => {
57258
+ let n = GB(e);
57259
+ return n ? GB(`${t.value} ${t.searchValue}`).includes(n) : !0;
57260
+ }, JB = () => {
57261
+ let e = y.useContext(WB);
57216
57262
  if (!e) throw Error("Command components must be rendered inside <Command>.");
57217
57263
  return e;
57218
- }, GB = y.forwardRef(({ className: e, defaultValue: t, loop: n = !0, onKeyDown: r, onValueChange: i, value: a, ...o }, s) => {
57219
- let [c, l] = y.useState(""), [u, d] = y.useState(() => /* @__PURE__ */ new Map()), [f, p] = y.useState(null), m = y.useRef(!1), h = y.useMemo(() => Array.from(u.values()).filter((e) => UB(c, e)), [u, c]);
57264
+ }, YB = y.forwardRef(({ className: e, defaultValue: t, loop: n = !0, onKeyDown: r, onValueChange: i, value: a, ...o }, s) => {
57265
+ let [c, l] = y.useState(""), [u, d] = y.useState(() => /* @__PURE__ */ new Map()), [f, p] = y.useState(null), m = y.useRef(!1), h = y.useMemo(() => Array.from(u.values()).filter((e) => qB(c, e)), [u, c]);
57220
57266
  y.useEffect(() => {
57221
57267
  if (a) {
57222
57268
  let e = Array.from(u.values()).find((e) => e.value === a);
@@ -57227,7 +57273,7 @@ var BB = y.createContext(null), VB = (e) => e.trim().toLocaleLowerCase(), HB = (
57227
57273
  }
57228
57274
  if (!m.current && t) {
57229
57275
  let e = Array.from(u.values()).find((e) => e.value === t);
57230
- if (e && UB(c, e)) {
57276
+ if (e && qB(c, e)) {
57231
57277
  m.current = !0, e.id !== f && p(e.id);
57232
57278
  return;
57233
57279
  }
@@ -57260,7 +57306,7 @@ var BB = y.createContext(null), VB = (e) => e.trim().toLocaleLowerCase(), HB = (
57260
57306
  });
57261
57307
  }, []), v = y.useCallback((e) => {
57262
57308
  let t = u.get(e);
57263
- !t || t.disabled || !UB(c, t) || (i?.(t.value), t.select());
57309
+ !t || t.disabled || !qB(c, t) || (i?.(t.value), t.select());
57264
57310
  }, [
57265
57311
  u,
57266
57312
  i,
@@ -57305,7 +57351,7 @@ var BB = y.createContext(null), VB = (e) => e.trim().toLocaleLowerCase(), HB = (
57305
57351
  e.key === "Enter" && (e.preventDefault(), x());
57306
57352
  }
57307
57353
  };
57308
- return /* @__PURE__ */ V(BB.Provider, {
57354
+ return /* @__PURE__ */ V(WB.Provider, {
57309
57355
  value: {
57310
57356
  activeId: f,
57311
57357
  registerItem: g,
@@ -57327,9 +57373,9 @@ var BB = y.createContext(null), VB = (e) => e.trim().toLocaleLowerCase(), HB = (
57327
57373
  })
57328
57374
  });
57329
57375
  });
57330
- GB.displayName = "Command";
57331
- var KB = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57332
- let a = WB();
57376
+ YB.displayName = "Command";
57377
+ var XB = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57378
+ let a = JB();
57333
57379
  return /* @__PURE__ */ H("div", {
57334
57380
  className: "flex items-center border-b px-3",
57335
57381
  "data-slot": "command-input-wrapper",
@@ -57345,17 +57391,17 @@ var KB = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57345
57391
  })]
57346
57392
  });
57347
57393
  });
57348
- KB.displayName = "CommandInput";
57349
- var qB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57394
+ XB.displayName = "CommandInput";
57395
+ var ZB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57350
57396
  ref: n,
57351
57397
  className: U("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
57352
57398
  "data-command-list": "",
57353
57399
  role: "listbox",
57354
57400
  ...t
57355
57401
  }));
57356
- qB.displayName = "CommandList";
57357
- var JB = y.forwardRef(({ className: e, ...t }, n) => {
57358
- let r = WB();
57402
+ ZB.displayName = "CommandList";
57403
+ var QB = y.forwardRef(({ className: e, ...t }, n) => {
57404
+ let r = JB();
57359
57405
  return !r.search.trim() || r.visibleCount > 0 ? null : /* @__PURE__ */ V("div", {
57360
57406
  ref: n,
57361
57407
  className: U("py-6 text-center text-sm", e),
@@ -57363,8 +57409,8 @@ var JB = y.forwardRef(({ className: e, ...t }, n) => {
57363
57409
  ...t
57364
57410
  });
57365
57411
  });
57366
- JB.displayName = "CommandEmpty";
57367
- var YB = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /* @__PURE__ */ H("div", {
57412
+ QB.displayName = "CommandEmpty";
57413
+ var $B = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /* @__PURE__ */ H("div", {
57368
57414
  ref: i,
57369
57415
  "aria-label": typeof t == "string" ? t : void 0,
57370
57416
  className: U("overflow-hidden p-1 text-foreground [&_[data-command-group-heading]]:px-2 [&_[data-command-group-heading]]:py-1.5 [&_[data-command-group-heading]]:text-xs [&_[data-command-group-heading]]:font-medium [&_[data-command-group-heading]]:text-muted-foreground", e),
@@ -57376,17 +57422,17 @@ var YB = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /*
57376
57422
  children: t
57377
57423
  }), n]
57378
57424
  }));
57379
- YB.displayName = "CommandGroup";
57380
- var XB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57425
+ $B.displayName = "CommandGroup";
57426
+ var eV = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57381
57427
  ref: n,
57382
57428
  className: U("-mx-1 h-px bg-border", e),
57383
57429
  "data-command-separator": "",
57384
57430
  role: "separator",
57385
57431
  ...t
57386
57432
  }));
57387
- XB.displayName = "CommandSeparator";
57388
- var ZB = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords: r = [], onClick: i, onMouseMove: a, onSelect: o, value: s, ...c }, l) => {
57389
- let { activeId: u, registerItem: d, search: f, selectItem: p, setActiveId: m, unregisterItem: h } = WB(), g = y.useId(), _ = HB(e), v = s ?? _, b = `${_} ${r.join(" ")}`.trim(), x = y.useRef(() => {});
57433
+ eV.displayName = "CommandSeparator";
57434
+ var tV = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords: r = [], onClick: i, onMouseMove: a, onSelect: o, value: s, ...c }, l) => {
57435
+ let { activeId: u, registerItem: d, search: f, selectItem: p, setActiveId: m, unregisterItem: h } = JB(), g = y.useId(), _ = KB(e), v = s ?? _, b = `${_} ${r.join(" ")}`.trim(), x = y.useRef(() => {});
57390
57436
  x.current = () => o?.(v);
57391
57437
  let S = y.useCallback(() => {
57392
57438
  x.current();
@@ -57396,7 +57442,7 @@ var ZB = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords:
57396
57442
  searchValue: b,
57397
57443
  select: S,
57398
57444
  value: v
57399
- }, w = UB(f, C), T = u === g;
57445
+ }, w = qB(f, C), T = u === g;
57400
57446
  return y.useEffect(() => (d(C), () => h(g)), [
57401
57447
  n,
57402
57448
  g,
@@ -57426,109 +57472,109 @@ var ZB = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords:
57426
57472
  children: e
57427
57473
  });
57428
57474
  });
57429
- ZB.displayName = "CommandItem";
57430
- var QB = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57475
+ tV.displayName = "CommandItem";
57476
+ var nV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57431
57477
  className: U("ml-auto text-xs tracking-widest text-muted-foreground", e),
57432
57478
  ...t
57433
57479
  });
57434
- QB.displayName = "CommandShortcut";
57480
+ nV.displayName = "CommandShortcut";
57435
57481
  //#endregion
57436
57482
  //#region src/components/ai-elements/model-selector.tsx
57437
- var $B = (e) => /* @__PURE__ */ V(AB, { ...e }), eV = (e) => /* @__PURE__ */ V(NB, { ...e }), tV = ({ className: e, commandDefaultValue: t, children: n, title: r = "Model Selector", ...i }) => /* @__PURE__ */ H(FB, {
57483
+ var rV = (e) => /* @__PURE__ */ V(PB, { ...e }), iV = (e) => /* @__PURE__ */ V(LB, { ...e }), aV = ({ className: e, commandDefaultValue: t, children: n, title: r = "Model Selector", ...i }) => /* @__PURE__ */ H(zB, {
57438
57484
  className: U("p-0", e),
57439
57485
  ...i,
57440
- children: [/* @__PURE__ */ V(RB, {
57486
+ children: [/* @__PURE__ */ V(HB, {
57441
57487
  className: "sr-only",
57442
57488
  children: r
57443
- }), /* @__PURE__ */ V(GB, {
57489
+ }), /* @__PURE__ */ V(YB, {
57444
57490
  className: "**:data-[slot=command-input-wrapper]:h-auto",
57445
57491
  defaultValue: t,
57446
57492
  children: n
57447
57493
  })]
57448
- }), nV = ({ className: e, ...t }) => /* @__PURE__ */ V(KB, {
57494
+ }), oV = ({ className: e, ...t }) => /* @__PURE__ */ V(XB, {
57449
57495
  className: U("h-auto py-3.5", e),
57450
57496
  ...t
57451
- }), rV = (e) => /* @__PURE__ */ V(qB, { ...e }), iV = (e) => /* @__PURE__ */ V(YB, { ...e }), aV = (e) => /* @__PURE__ */ V(ZB, { ...e }), oV = ({ provider: e, className: t }) => /* @__PURE__ */ V("img", {
57497
+ }), sV = (e) => /* @__PURE__ */ V(ZB, { ...e }), cV = (e) => /* @__PURE__ */ V($B, { ...e }), lV = (e) => /* @__PURE__ */ V(tV, { ...e }), uV = ({ provider: e, className: t }) => /* @__PURE__ */ V("img", {
57452
57498
  alt: `${e} logo`,
57453
57499
  className: U("size-3 dark:invert", t),
57454
57500
  height: 12,
57455
57501
  src: `https://models.dev/logos/${e}.svg`,
57456
57502
  width: 12
57457
- }), sV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57503
+ }), dV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57458
57504
  className: U("flex-1 truncate text-left", e),
57459
57505
  ...t
57460
- }), cV = /* @__PURE__ */ y.createContext(void 0);
57461
- process.env.NODE_ENV !== "production" && (cV.displayName = "ScrollAreaRootContext");
57462
- function lV() {
57463
- let e = y.useContext(cV);
57506
+ }), fV = /* @__PURE__ */ y.createContext(void 0);
57507
+ process.env.NODE_ENV !== "production" && (fV.displayName = "ScrollAreaRootContext");
57508
+ function pV() {
57509
+ let e = y.useContext(fV);
57464
57510
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(53) : "Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.");
57465
57511
  return e;
57466
57512
  }
57467
57513
  //#endregion
57468
57514
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRootCssVars.mjs
57469
- var uV = /* @__PURE__ */ function(e) {
57515
+ var mV = /* @__PURE__ */ function(e) {
57470
57516
  return e.scrollAreaCornerHeight = "--scroll-area-corner-height", e.scrollAreaCornerWidth = "--scroll-area-corner-width", e;
57471
57517
  }({});
57472
57518
  //#endregion
57473
57519
  //#region ../../node_modules/@base-ui/react/scroll-area/utils/getOffset.mjs
57474
- function dV(e, t, n) {
57520
+ function hV(e, t, n) {
57475
57521
  if (!e) return 0;
57476
57522
  let r = getComputedStyle(e), i = n === "x" ? "Inline" : "Block";
57477
57523
  return n === "x" && t === "margin" ? parseFloat(r[`${t}InlineStart`]) * 2 : parseFloat(r[`${t}${i}Start`]) + parseFloat(r[`${t}${i}End`]);
57478
57524
  }
57479
57525
  //#endregion
57480
57526
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.mjs
57481
- var fV = /* @__PURE__ */ function(e) {
57527
+ var gV = /* @__PURE__ */ function(e) {
57482
57528
  return e.orientation = "data-orientation", e.hovering = "data-hovering", e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
57483
- }({}), pV = "base-ui-disable-scrollbar", mV = {
57484
- className: pV,
57529
+ }({}), _V = "base-ui-disable-scrollbar", vV = {
57530
+ className: _V,
57485
57531
  getElement(e) {
57486
57532
  return /* @__PURE__ */ V("style", {
57487
57533
  nonce: e,
57488
- href: pV,
57534
+ href: _V,
57489
57535
  precedence: "base-ui:low",
57490
- children: `.${pV}{scrollbar-width:none}.${pV}::-webkit-scrollbar{display:none}`
57536
+ children: `.${_V}{scrollbar-width:none}.${_V}::-webkit-scrollbar{display:none}`
57491
57537
  });
57492
57538
  }
57493
57539
  };
57494
- process.env.NODE_ENV !== "production" && (mV.getElement.displayName = "styleDisableScrollbar.getElement");
57540
+ process.env.NODE_ENV !== "production" && (vV.getElement.displayName = "styleDisableScrollbar.getElement");
57495
57541
  //#endregion
57496
57542
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRootDataAttributes.mjs
57497
- var hV = /* @__PURE__ */ function(e) {
57543
+ var yV = /* @__PURE__ */ function(e) {
57498
57544
  return e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
57499
- }({}), gV = {
57500
- hasOverflowX: (e) => e ? { [hV.hasOverflowX]: "" } : null,
57501
- hasOverflowY: (e) => e ? { [hV.hasOverflowY]: "" } : null,
57502
- overflowXStart: (e) => e ? { [hV.overflowXStart]: "" } : null,
57503
- overflowXEnd: (e) => e ? { [hV.overflowXEnd]: "" } : null,
57504
- overflowYStart: (e) => e ? { [hV.overflowYStart]: "" } : null,
57505
- overflowYEnd: (e) => e ? { [hV.overflowYEnd]: "" } : null,
57545
+ }({}), bV = {
57546
+ hasOverflowX: (e) => e ? { [yV.hasOverflowX]: "" } : null,
57547
+ hasOverflowY: (e) => e ? { [yV.hasOverflowY]: "" } : null,
57548
+ overflowXStart: (e) => e ? { [yV.overflowXStart]: "" } : null,
57549
+ overflowXEnd: (e) => e ? { [yV.overflowXEnd]: "" } : null,
57550
+ overflowYStart: (e) => e ? { [yV.overflowYStart]: "" } : null,
57551
+ overflowYEnd: (e) => e ? { [yV.overflowYEnd]: "" } : null,
57506
57552
  cornerHidden: () => null
57507
- }, _V = /* @__PURE__ */ y.createContext(void 0);
57508
- process.env.NODE_ENV !== "production" && (_V.displayName = "CSPContext");
57509
- var vV = { disableStyleElements: !1 };
57510
- function yV() {
57511
- return y.useContext(_V) ?? vV;
57553
+ }, xV = /* @__PURE__ */ y.createContext(void 0);
57554
+ process.env.NODE_ENV !== "production" && (xV.displayName = "CSPContext");
57555
+ var SV = { disableStyleElements: !1 };
57556
+ function CV() {
57557
+ return y.useContext(xV) ?? SV;
57512
57558
  }
57513
57559
  //#endregion
57514
57560
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRoot.mjs
57515
- var bV = {
57561
+ var wV = {
57516
57562
  x: 0,
57517
57563
  y: 0
57518
- }, xV = {
57564
+ }, TV = {
57519
57565
  width: 0,
57520
57566
  height: 0
57521
- }, SV = {
57567
+ }, EV = {
57522
57568
  xStart: !1,
57523
57569
  xEnd: !1,
57524
57570
  yStart: !1,
57525
57571
  yEnd: !1
57526
- }, CV = {
57572
+ }, DV = {
57527
57573
  x: !0,
57528
57574
  y: !0,
57529
57575
  corner: !0
57530
- }, wV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57531
- let { render: n, className: r, overflowEdgeThreshold: i, style: a, ...o } = e, { xStart: s, xEnd: c, yStart: l, yEnd: u } = TV(i), d = kp(), f = ca(), p = ca(), { nonce: m, disableStyleElements: h } = yV(), [g, _] = y.useState(!1), [v, b] = y.useState(!1), [x, S] = y.useState(!1), [C, w] = y.useState(!1), [T, E] = y.useState(!1), [D, O] = y.useState(xV), [k, A] = y.useState(xV), [j, M] = y.useState(SV), [N, P] = y.useState(CV), F = y.useRef(null), I = y.useRef(null), L = y.useRef(null), R = y.useRef(null), z = y.useRef(null), ee = y.useRef(null), te = y.useRef(null), ne = y.useRef(!1), re = y.useRef(0), ie = y.useRef(0), B = y.useRef(0), ae = y.useRef(0), oe = y.useRef("vertical"), se = y.useRef(bV), ce = J((e) => {
57576
+ }, OV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57577
+ let { render: n, className: r, overflowEdgeThreshold: i, style: a, ...o } = e, { xStart: s, xEnd: c, yStart: l, yEnd: u } = kV(i), d = kp(), f = ca(), p = ca(), { nonce: m, disableStyleElements: h } = CV(), [g, _] = y.useState(!1), [v, b] = y.useState(!1), [x, S] = y.useState(!1), [C, w] = y.useState(!1), [T, E] = y.useState(!1), [D, O] = y.useState(TV), [k, A] = y.useState(TV), [j, M] = y.useState(EV), [N, P] = y.useState(DV), F = y.useRef(null), I = y.useRef(null), L = y.useRef(null), R = y.useRef(null), z = y.useRef(null), ee = y.useRef(null), te = y.useRef(null), ne = y.useRef(!1), re = y.useRef(0), ie = y.useRef(0), B = y.useRef(0), ae = y.useRef(0), oe = y.useRef("vertical"), se = y.useRef(wV), ce = J((e) => {
57532
57578
  let t = e.x - se.current.x, n = e.y - se.current.y;
57533
57579
  se.current = e, n !== 0 && (S(!0), f.start(500, () => {
57534
57580
  S(!1);
@@ -57536,20 +57582,20 @@ var bV = {
57536
57582
  b(!1);
57537
57583
  }));
57538
57584
  }), V = J((e) => {
57539
- e.button === 0 && (ne.current = !0, re.current = e.clientY, ie.current = e.clientX, oe.current = e.currentTarget.getAttribute(fV.orientation), I.current && (B.current = I.current.scrollTop, ae.current = I.current.scrollLeft), z.current && oe.current === "vertical" && z.current.setPointerCapture(e.pointerId), ee.current && oe.current === "horizontal" && ee.current.setPointerCapture(e.pointerId));
57585
+ e.button === 0 && (ne.current = !0, re.current = e.clientY, ie.current = e.clientX, oe.current = e.currentTarget.getAttribute(gV.orientation), I.current && (B.current = I.current.scrollTop, ae.current = I.current.scrollLeft), z.current && oe.current === "vertical" && z.current.setPointerCapture(e.pointerId), ee.current && oe.current === "horizontal" && ee.current.setPointerCapture(e.pointerId));
57540
57586
  }), le = J((e) => {
57541
57587
  if (!ne.current) return;
57542
57588
  let t = e.clientY - re.current, n = e.clientX - ie.current;
57543
57589
  if (I.current) {
57544
57590
  let r = I.current.scrollHeight, i = I.current.clientHeight, a = I.current.scrollWidth, o = I.current.clientWidth;
57545
57591
  if (z.current && L.current && oe.current === "vertical") {
57546
- let n = dV(L.current, "padding", "y"), a = dV(z.current, "margin", "y"), o = z.current.offsetHeight, s = t / (L.current.offsetHeight - o - n - a);
57592
+ let n = hV(L.current, "padding", "y"), a = hV(z.current, "margin", "y"), o = z.current.offsetHeight, s = t / (L.current.offsetHeight - o - n - a);
57547
57593
  I.current.scrollTop = B.current + s * (r - i), e.preventDefault(), S(!0), f.start(500, () => {
57548
57594
  S(!1);
57549
57595
  });
57550
57596
  }
57551
57597
  if (ee.current && R.current && oe.current === "horizontal") {
57552
- let t = dV(R.current, "padding", "x"), r = dV(ee.current, "margin", "x"), i = ee.current.offsetWidth, s = n / (R.current.offsetWidth - i - t - r);
57598
+ let t = hV(R.current, "padding", "x"), r = hV(ee.current, "margin", "x"), i = ee.current.offsetWidth, s = n / (R.current.offsetWidth - i - t - r);
57553
57599
  I.current.scrollLeft = ae.current + s * (a - o), e.preventDefault(), b(!0), p.start(500, () => {
57554
57600
  b(!1);
57555
57601
  });
@@ -57590,14 +57636,14 @@ var bV = {
57590
57636
  },
57591
57637
  style: {
57592
57638
  position: "relative",
57593
- [uV.scrollAreaCornerHeight]: `${D.height}px`,
57594
- [uV.scrollAreaCornerWidth]: `${D.width}px`
57639
+ [mV.scrollAreaCornerHeight]: `${D.height}px`,
57640
+ [mV.scrollAreaCornerWidth]: `${D.width}px`
57595
57641
  }
57596
57642
  }, me = Lc("div", e, {
57597
57643
  state: fe,
57598
57644
  ref: [t, F],
57599
57645
  props: [pe, o],
57600
- stateAttributesMapping: gV
57646
+ stateAttributesMapping: bV
57601
57647
  }), he = y.useMemo(() => ({
57602
57648
  handlePointerDown: V,
57603
57649
  handlePointerMove: le,
@@ -57659,13 +57705,13 @@ var bV = {
57659
57705
  l,
57660
57706
  u
57661
57707
  ]);
57662
- return /* @__PURE__ */ H(cV.Provider, {
57708
+ return /* @__PURE__ */ H(fV.Provider, {
57663
57709
  value: he,
57664
- children: [!h && mV.getElement(m), me]
57710
+ children: [!h && vV.getElement(m), me]
57665
57711
  });
57666
57712
  });
57667
- process.env.NODE_ENV !== "production" && (wV.displayName = "ScrollAreaRoot");
57668
- function TV(e) {
57713
+ process.env.NODE_ENV !== "production" && (OV.displayName = "ScrollAreaRoot");
57714
+ function kV(e) {
57669
57715
  if (typeof e == "number") {
57670
57716
  let t = Math.max(0, e);
57671
57717
  return {
@@ -57684,40 +57730,40 @@ function TV(e) {
57684
57730
  }
57685
57731
  //#endregion
57686
57732
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewportContext.mjs
57687
- var EV = /* @__PURE__ */ y.createContext(void 0);
57688
- process.env.NODE_ENV !== "production" && (EV.displayName = "ScrollAreaViewportContext");
57689
- function DV() {
57690
- let e = y.useContext(EV);
57733
+ var AV = /* @__PURE__ */ y.createContext(void 0);
57734
+ process.env.NODE_ENV !== "production" && (AV.displayName = "ScrollAreaViewportContext");
57735
+ function jV() {
57736
+ let e = y.useContext(AV);
57691
57737
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(55) : "Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.");
57692
57738
  return e;
57693
57739
  }
57694
57740
  //#endregion
57695
57741
  //#region ../../node_modules/@base-ui/react/internals/clamp.mjs
57696
- function OV(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
57742
+ function MV(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
57697
57743
  return Math.max(t, Math.min(e, n));
57698
57744
  }
57699
57745
  //#endregion
57700
57746
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewportCssVars.mjs
57701
- var kV = /* @__PURE__ */ function(e) {
57747
+ var NV = /* @__PURE__ */ function(e) {
57702
57748
  return e.scrollAreaOverflowXStart = "--scroll-area-overflow-x-start", e.scrollAreaOverflowXEnd = "--scroll-area-overflow-x-end", e.scrollAreaOverflowYStart = "--scroll-area-overflow-y-start", e.scrollAreaOverflowYEnd = "--scroll-area-overflow-y-end", e;
57703
57749
  }({});
57704
- function AV(e, t) {
57750
+ function PV(e, t) {
57705
57751
  return Math.max(0, e - t);
57706
57752
  }
57707
- function jV(e, t) {
57753
+ function FV(e, t) {
57708
57754
  if (t <= 0) return 0;
57709
- let n = OV(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
57755
+ let n = MV(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
57710
57756
  return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
57711
57757
  }
57712
57758
  //#endregion
57713
57759
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewport.mjs
57714
- var MV = !1;
57715
- function NV() {
57716
- MV || Qi || (typeof CSS < "u" && "registerProperty" in CSS && [
57717
- kV.scrollAreaOverflowXStart,
57718
- kV.scrollAreaOverflowXEnd,
57719
- kV.scrollAreaOverflowYStart,
57720
- kV.scrollAreaOverflowYEnd
57760
+ var IV = !1;
57761
+ function LV() {
57762
+ IV || Qi || (typeof CSS < "u" && "registerProperty" in CSS && [
57763
+ NV.scrollAreaOverflowXStart,
57764
+ NV.scrollAreaOverflowXEnd,
57765
+ NV.scrollAreaOverflowYStart,
57766
+ NV.scrollAreaOverflowYEnd
57721
57767
  ].forEach((e) => {
57722
57768
  try {
57723
57769
  CSS.registerProperty({
@@ -57727,10 +57773,10 @@ function NV() {
57727
57773
  initialValue: "0px"
57728
57774
  });
57729
57775
  } catch {}
57730
- }), MV = !0);
57776
+ }), IV = !0);
57731
57777
  }
57732
- var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57733
- let { render: n, className: r, style: i, ...a } = e, { viewportRef: o, scrollbarYRef: s, scrollbarXRef: c, thumbYRef: l, thumbXRef: u, cornerRef: d, cornerSize: f, setCornerSize: p, setThumbSize: m, rootId: h, setHiddenState: g, hiddenState: _, setHasMeasuredScrollbar: v, handleScroll: b, setHovering: x, setOverflowEdges: S, overflowEdges: C, overflowEdgeThreshold: w, scrollingX: T, scrollingY: E } = lV(), D = ug(), O = y.useRef(!0), k = y.useRef([
57778
+ var RV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57779
+ let { render: n, className: r, style: i, ...a } = e, { viewportRef: o, scrollbarYRef: s, scrollbarXRef: c, thumbYRef: l, thumbXRef: u, cornerRef: d, cornerSize: f, setCornerSize: p, setThumbSize: m, rootId: h, setHiddenState: g, hiddenState: _, setHasMeasuredScrollbar: v, handleScroll: b, setHovering: x, setOverflowEdges: S, overflowEdges: C, overflowEdgeThreshold: w, scrollingX: T, scrollingY: E } = pV(), D = ug(), O = y.useRef(!0), k = y.useRef([
57734
57780
  NaN,
57735
57781
  NaN,
57736
57782
  NaN,
@@ -57740,14 +57786,14 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57740
57786
  if (!e) return;
57741
57787
  let h = e.scrollHeight, _ = e.scrollWidth, y = e.clientHeight, b = e.clientWidth, x = e.scrollTop, C = e.scrollLeft, T = k.current, E = Number.isNaN(T[0]);
57742
57788
  if (T[0] = y, T[1] = h, T[2] = b, T[3] = _, E && v(!0), h === 0 || _ === 0) return;
57743
- let O = FV(e), A = O.y, j = O.x, M = b / _, N = y / h, P = Math.max(0, _ - b), F = Math.max(0, h - y), I = 0, L = 0;
57789
+ let O = zV(e), A = O.y, j = O.x, M = b / _, N = y / h, P = Math.max(0, _ - b), F = Math.max(0, h - y), I = 0, L = 0;
57744
57790
  if (!j) {
57745
57791
  let e = 0;
57746
- e = OV(D === "rtl" ? -C : C, 0, P), I = jV(e, P), L = P - I;
57792
+ e = MV(D === "rtl" ? -C : C, 0, P), I = FV(e, P), L = P - I;
57747
57793
  }
57748
- let R = A ? 0 : OV(x, 0, F), z = A ? 0 : jV(R, F), ee = A ? 0 : F - z, te = j ? 0 : b, ne = A ? 0 : y, re = 0, ie = 0;
57794
+ let R = A ? 0 : MV(x, 0, F), z = A ? 0 : FV(R, F), ee = A ? 0 : F - z, te = j ? 0 : b, ne = A ? 0 : y, re = 0, ie = 0;
57749
57795
  !j && !A && (re = t?.offsetWidth || 0, ie = n?.offsetHeight || 0);
57750
- let B = f.width === 0 && f.height === 0, ae = B ? re : 0, oe = B ? ie : 0, se = dV(n, "padding", "x"), ce = dV(t, "padding", "y"), V = dV(i, "margin", "x"), H = dV(r, "margin", "y"), le = te - se - V, ue = ne - ce - H, de = n ? Math.min(n.offsetWidth - ae, le) : le, U = t ? Math.min(t.offsetHeight - oe, ue) : ue, fe = Math.max(16, de * M), pe = Math.max(16, U * N);
57796
+ let B = f.width === 0 && f.height === 0, ae = B ? re : 0, oe = B ? ie : 0, se = hV(n, "padding", "x"), ce = hV(t, "padding", "y"), V = hV(i, "margin", "x"), H = hV(r, "margin", "y"), le = te - se - V, ue = ne - ce - H, de = n ? Math.min(n.offsetWidth - ae, le) : le, U = t ? Math.min(t.offsetHeight - oe, ue) : ue, fe = Math.max(16, de * M), pe = Math.max(16, U * N);
57751
57797
  if (m((e) => e.height === pe && e.width === fe ? e : {
57752
57798
  width: fe,
57753
57799
  height: pe
@@ -57756,14 +57802,14 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57756
57802
  r.style.transform = `translate3d(0,${a}px,0)`;
57757
57803
  }
57758
57804
  if (n && i) {
57759
- let e = n.offsetWidth - fe - se - V, t = _ - b, r = t === 0 ? 0 : C / t, a = D === "rtl" ? OV(r * e, -e, 0) : OV(r * e, 0, e);
57805
+ let e = n.offsetWidth - fe - se - V, t = _ - b, r = t === 0 ? 0 : C / t, a = D === "rtl" ? MV(r * e, -e, 0) : MV(r * e, 0, e);
57760
57806
  i.style.transform = `translate3d(${a}px,0,0)`;
57761
57807
  }
57762
57808
  let me = [
57763
- [kV.scrollAreaOverflowXStart, I],
57764
- [kV.scrollAreaOverflowXEnd, L],
57765
- [kV.scrollAreaOverflowYStart, z],
57766
- [kV.scrollAreaOverflowYEnd, ee]
57809
+ [NV.scrollAreaOverflowXStart, I],
57810
+ [NV.scrollAreaOverflowXEnd, L],
57811
+ [NV.scrollAreaOverflowYStart, z],
57812
+ [NV.scrollAreaOverflowYEnd, ee]
57767
57813
  ];
57768
57814
  for (let [t, n] of me) e.style.setProperty(t, `${n}px`);
57769
57815
  a && (j || A ? p({
@@ -57772,7 +57818,7 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57772
57818
  }) : !j && !A && p({
57773
57819
  width: re,
57774
57820
  height: ie
57775
- })), g((e) => IV(e, O));
57821
+ })), g((e) => BV(e, O));
57776
57822
  let he = {
57777
57823
  xStart: !j && I > w.xStart,
57778
57824
  xEnd: !j && L > w.xEnd,
@@ -57782,7 +57828,7 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57782
57828
  S((e) => e.xStart === he.xStart && e.xEnd === he.xEnd && e.yStart === he.yStart && e.yEnd === he.yEnd ? e : he);
57783
57829
  });
57784
57830
  K(() => {
57785
- o.current && NV();
57831
+ o.current && LV();
57786
57832
  }, [o]), K(() => {
57787
57833
  queueMicrotask(M);
57788
57834
  }, [
@@ -57824,7 +57870,7 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57824
57870
  role: "presentation",
57825
57871
  ...h && { "data-id": `${h}-viewport` },
57826
57872
  tabIndex: _.x && _.y ? -1 : 0,
57827
- className: mV.className,
57873
+ className: vV.className,
57828
57874
  style: { overflow: "scroll" },
57829
57875
  onScroll() {
57830
57876
  o.current && (M(), O.current || b({
@@ -57859,15 +57905,15 @@ var PV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57859
57905
  ref: [t, o],
57860
57906
  state: F,
57861
57907
  props: [P, a],
57862
- stateAttributesMapping: gV
57908
+ stateAttributesMapping: bV
57863
57909
  }), L = y.useMemo(() => ({ computeThumbPosition: M }), [M]);
57864
- return /* @__PURE__ */ V(EV.Provider, {
57910
+ return /* @__PURE__ */ V(AV.Provider, {
57865
57911
  value: L,
57866
57912
  children: I
57867
57913
  });
57868
57914
  });
57869
- process.env.NODE_ENV !== "production" && (PV.displayName = "ScrollAreaViewport");
57870
- function FV(e) {
57915
+ process.env.NODE_ENV !== "production" && (RV.displayName = "ScrollAreaViewport");
57916
+ function zV(e) {
57871
57917
  let t = e.clientHeight >= e.scrollHeight, n = e.clientWidth >= e.scrollWidth;
57872
57918
  return {
57873
57919
  y: t,
@@ -57875,24 +57921,24 @@ function FV(e) {
57875
57921
  corner: t || n
57876
57922
  };
57877
57923
  }
57878
- function IV(e, t) {
57924
+ function BV(e, t) {
57879
57925
  return e.y === t.y && e.x === t.x && e.corner === t.corner ? e : t;
57880
57926
  }
57881
57927
  //#endregion
57882
57928
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarContext.mjs
57883
- var LV = /* @__PURE__ */ y.createContext(void 0);
57884
- process.env.NODE_ENV !== "production" && (LV.displayName = "ScrollAreaScrollbarContext");
57885
- function RV() {
57886
- let e = y.useContext(LV);
57929
+ var VV = /* @__PURE__ */ y.createContext(void 0);
57930
+ process.env.NODE_ENV !== "production" && (VV.displayName = "ScrollAreaScrollbarContext");
57931
+ function HV() {
57932
+ let e = y.useContext(VV);
57887
57933
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(54) : "Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.");
57888
57934
  return e;
57889
57935
  }
57890
57936
  //#endregion
57891
57937
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.mjs
57892
- var zV = /* @__PURE__ */ function(e) {
57938
+ var UV = /* @__PURE__ */ function(e) {
57893
57939
  return e.scrollAreaThumbHeight = "--scroll-area-thumb-height", e.scrollAreaThumbWidth = "--scroll-area-thumb-width", e;
57894
- }({}), BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57895
- let { render: n, className: r, orientation: i = "vertical", keepMounted: a = !1, style: o, ...s } = e, { hovering: c, scrollingX: l, scrollingY: u, hiddenState: d, overflowEdges: f, scrollbarYRef: p, scrollbarXRef: m, viewportRef: h, thumbYRef: g, thumbXRef: _, handlePointerDown: v, handlePointerUp: b, handleScroll: x, rootId: S, thumbSize: C, hasMeasuredScrollbar: w } = lV(), T = {
57940
+ }({}), WV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57941
+ let { render: n, className: r, orientation: i = "vertical", keepMounted: a = !1, style: o, ...s } = e, { hovering: c, scrollingX: l, scrollingY: u, hiddenState: d, overflowEdges: f, scrollbarYRef: p, scrollbarXRef: m, viewportRef: h, thumbYRef: g, thumbXRef: _, handlePointerDown: v, handlePointerUp: b, handleScroll: x, rootId: S, thumbSize: C, hasMeasuredScrollbar: w } = pV(), T = {
57896
57942
  hovering: c,
57897
57943
  scrolling: {
57898
57944
  horizontal: l,
@@ -57938,11 +57984,11 @@ var zV = /* @__PURE__ */ function(e) {
57938
57984
  let t = za(e.nativeEvent), n = i === "vertical" ? g.current : _.current;
57939
57985
  if (!(n && q(n, t)) && h.current) {
57940
57986
  if (g.current && p.current && i === "vertical") {
57941
- let t = dV(g.current, "margin", "y"), n = dV(p.current, "padding", "y"), r = g.current.offsetHeight, i = p.current.getBoundingClientRect(), a = e.clientY - i.top - r / 2 - n + t / 2, o = h.current.scrollHeight, s = h.current.clientHeight, c = a / (p.current.offsetHeight - r - n - t) * (o - s);
57987
+ let t = hV(g.current, "margin", "y"), n = hV(p.current, "padding", "y"), r = g.current.offsetHeight, i = p.current.getBoundingClientRect(), a = e.clientY - i.top - r / 2 - n + t / 2, o = h.current.scrollHeight, s = h.current.clientHeight, c = a / (p.current.offsetHeight - r - n - t) * (o - s);
57942
57988
  h.current.scrollTop = c;
57943
57989
  }
57944
57990
  if (_.current && m.current && i === "horizontal") {
57945
- let t = dV(_.current, "margin", "x"), n = dV(m.current, "padding", "x"), r = _.current.offsetWidth, i = m.current.getBoundingClientRect(), a = e.clientX - i.left - r / 2 - n + t / 2, o = h.current.scrollWidth, s = h.current.clientWidth, c = a / (m.current.offsetWidth - r - n - t), l;
57991
+ let t = hV(_.current, "margin", "x"), n = hV(m.current, "padding", "x"), r = _.current.offsetWidth, i = m.current.getBoundingClientRect(), a = e.clientX - i.left - r / 2 - n + t / 2, o = h.current.scrollWidth, s = h.current.clientWidth, c = a / (m.current.offsetWidth - r - n - t), l;
57946
57992
  E === "rtl" ? (l = (1 - c) * (o - s), h.current.scrollLeft <= 0 && (l = -l)) : l = c * (o - s), h.current.scrollLeft = l;
57947
57993
  }
57948
57994
  x({
@@ -57961,33 +58007,33 @@ var zV = /* @__PURE__ */ function(e) {
57961
58007
  visibility: D ? "hidden" : void 0,
57962
58008
  ...i === "vertical" && {
57963
58009
  top: 0,
57964
- bottom: `var(${uV.scrollAreaCornerHeight})`,
58010
+ bottom: `var(${mV.scrollAreaCornerHeight})`,
57965
58011
  insetInlineEnd: 0,
57966
- [zV.scrollAreaThumbHeight]: `${C.height}px`
58012
+ [UV.scrollAreaThumbHeight]: `${C.height}px`
57967
58013
  },
57968
58014
  ...i === "horizontal" && {
57969
58015
  insetInlineStart: 0,
57970
- insetInlineEnd: `var(${uV.scrollAreaCornerWidth})`,
58016
+ insetInlineEnd: `var(${mV.scrollAreaCornerWidth})`,
57971
58017
  bottom: 0,
57972
- [zV.scrollAreaThumbWidth]: `${C.width}px`
58018
+ [UV.scrollAreaThumbWidth]: `${C.width}px`
57973
58019
  }
57974
58020
  }
57975
58021
  }, j = Lc("div", e, {
57976
58022
  ref: [t, i === "vertical" ? p : m],
57977
58023
  state: T,
57978
58024
  props: [A, s],
57979
- stateAttributesMapping: gV
58025
+ stateAttributesMapping: bV
57980
58026
  }), M = y.useMemo(() => ({ orientation: i }), [i]);
57981
- return k ? /* @__PURE__ */ V(LV.Provider, {
58027
+ return k ? /* @__PURE__ */ V(VV.Provider, {
57982
58028
  value: M,
57983
58029
  children: j
57984
58030
  }) : null;
57985
58031
  });
57986
- process.env.NODE_ENV !== "production" && (BV.displayName = "ScrollAreaScrollbar");
58032
+ process.env.NODE_ENV !== "production" && (WV.displayName = "ScrollAreaScrollbar");
57987
58033
  //#endregion
57988
58034
  //#region ../../node_modules/@base-ui/react/scroll-area/content/ScrollAreaContent.mjs
57989
- var VV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57990
- let { render: n, className: r, style: i, ...a } = e, { computeThumbPosition: o } = DV(), { hasMeasuredScrollbar: s, viewportState: c } = lV(), l = y.useRef(null), u = y.useRef(s);
58035
+ var GV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58036
+ let { render: n, className: r, style: i, ...a } = e, { computeThumbPosition: o } = jV(), { hasMeasuredScrollbar: s, viewportState: c } = pV(), l = y.useRef(null), u = y.useRef(s);
57991
58037
  return K(() => {
57992
58038
  if (typeof ResizeObserver > "u") return;
57993
58039
  let e = !1, t = new ResizeObserver(() => {
@@ -57999,18 +58045,18 @@ var VV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57999
58045
  }, [o]), Lc("div", e, {
58000
58046
  ref: [t, l],
58001
58047
  state: c,
58002
- stateAttributesMapping: gV,
58048
+ stateAttributesMapping: bV,
58003
58049
  props: [{
58004
58050
  role: "presentation",
58005
58051
  style: { minWidth: "fit-content" }
58006
58052
  }, a]
58007
58053
  });
58008
58054
  });
58009
- process.env.NODE_ENV !== "production" && (VV.displayName = "ScrollAreaContent");
58055
+ process.env.NODE_ENV !== "production" && (GV.displayName = "ScrollAreaContent");
58010
58056
  //#endregion
58011
58057
  //#region ../../node_modules/@base-ui/react/scroll-area/thumb/ScrollAreaThumb.mjs
58012
- var HV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58013
- let { render: n, className: r, style: i, ...a } = e, { thumbYRef: o, thumbXRef: s, handlePointerDown: c, handlePointerMove: l, handlePointerUp: u, setScrollingX: d, setScrollingY: f, scrollingX: p, scrollingY: m, hasMeasuredScrollbar: h } = lV(), { orientation: g } = RV(), _ = {
58058
+ var KV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58059
+ let { render: n, className: r, style: i, ...a } = e, { thumbYRef: o, thumbXRef: s, handlePointerDown: c, handlePointerMove: l, handlePointerUp: u, setScrollingX: d, setScrollingY: f, scrollingX: p, scrollingY: m, hasMeasuredScrollbar: h } = pV(), { orientation: g } = HV(), _ = {
58014
58060
  scrolling: g === "horizontal" ? p : m,
58015
58061
  orientation: g
58016
58062
  };
@@ -58027,17 +58073,17 @@ var HV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58027
58073
  onPointerCancel: v,
58028
58074
  style: {
58029
58075
  visibility: h ? void 0 : "hidden",
58030
- ...g === "vertical" && { height: `var(${zV.scrollAreaThumbHeight})` },
58031
- ...g === "horizontal" && { width: `var(${zV.scrollAreaThumbWidth})` }
58076
+ ...g === "vertical" && { height: `var(${UV.scrollAreaThumbHeight})` },
58077
+ ...g === "horizontal" && { width: `var(${UV.scrollAreaThumbWidth})` }
58032
58078
  }
58033
58079
  }, a]
58034
58080
  });
58035
58081
  });
58036
- process.env.NODE_ENV !== "production" && (HV.displayName = "ScrollAreaThumb");
58082
+ process.env.NODE_ENV !== "production" && (KV.displayName = "ScrollAreaThumb");
58037
58083
  //#endregion
58038
58084
  //#region ../../node_modules/@base-ui/react/scroll-area/corner/ScrollAreaCorner.mjs
58039
- var UV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58040
- let { render: n, className: r, style: i, ...a } = e, { cornerRef: o, cornerSize: s, hiddenState: c } = lV(), l = Lc("div", e, {
58085
+ var qV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58086
+ let { render: n, className: r, style: i, ...a } = e, { cornerRef: o, cornerSize: s, hiddenState: c } = pV(), l = Lc("div", e, {
58041
58087
  ref: [t, o],
58042
58088
  props: [{ style: {
58043
58089
  position: "absolute",
@@ -58049,52 +58095,52 @@ var UV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58049
58095
  });
58050
58096
  return c.corner ? null : l;
58051
58097
  });
58052
- process.env.NODE_ENV !== "production" && (UV.displayName = "ScrollAreaCorner");
58098
+ process.env.NODE_ENV !== "production" && (qV.displayName = "ScrollAreaCorner");
58053
58099
  //#endregion
58054
58100
  //#region src/components/ui/scroll-area.tsx
58055
- var WV = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H(wV, {
58101
+ var JV = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H(OV, {
58056
58102
  ref: r,
58057
58103
  className: U("relative overflow-hidden", e),
58058
58104
  ...n,
58059
58105
  children: [
58060
- /* @__PURE__ */ V(PV, {
58106
+ /* @__PURE__ */ V(RV, {
58061
58107
  className: "h-full w-full rounded-[inherit]",
58062
58108
  children: t
58063
58109
  }),
58064
- /* @__PURE__ */ V(GV, {}),
58065
- /* @__PURE__ */ V(UV, {})
58110
+ /* @__PURE__ */ V(YV, {}),
58111
+ /* @__PURE__ */ V(qV, {})
58066
58112
  ]
58067
58113
  }));
58068
- WV.displayName = "ScrollArea";
58069
- var GV = y.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ V(BV, {
58114
+ JV.displayName = "ScrollArea";
58115
+ var YV = y.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ V(WV, {
58070
58116
  ref: r,
58071
58117
  orientation: t,
58072
58118
  className: U("flex touch-none select-none transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", e),
58073
58119
  ...n,
58074
- children: /* @__PURE__ */ V(HV, { className: "relative flex-1 rounded-full bg-border" })
58120
+ children: /* @__PURE__ */ V(KV, { className: "relative flex-1 rounded-full bg-border" })
58075
58121
  }));
58076
- GV.displayName = "ScrollBar";
58122
+ YV.displayName = "ScrollBar";
58077
58123
  //#endregion
58078
58124
  //#region ../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs
58079
- var KV = /* @__PURE__ */ y.createContext(null);
58080
- process.env.NODE_ENV !== "production" && (KV.displayName = "SelectRootContext");
58081
- var qV = /* @__PURE__ */ y.createContext(null);
58082
- process.env.NODE_ENV !== "production" && (qV.displayName = "SelectFloatingContext");
58083
- function JV() {
58084
- let e = y.useContext(KV);
58125
+ var XV = /* @__PURE__ */ y.createContext(null);
58126
+ process.env.NODE_ENV !== "production" && (XV.displayName = "SelectRootContext");
58127
+ var ZV = /* @__PURE__ */ y.createContext(null);
58128
+ process.env.NODE_ENV !== "production" && (ZV.displayName = "SelectFloatingContext");
58129
+ function QV() {
58130
+ let e = y.useContext(XV);
58085
58131
  if (e === null) throw Error(process.env.NODE_ENV === "production" ? fc(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
58086
58132
  return e;
58087
58133
  }
58088
- function YV() {
58089
- let e = y.useContext(qV);
58134
+ function $V() {
58135
+ let e = y.useContext(ZV);
58090
58136
  if (e === null) throw Error(process.env.NODE_ENV === "production" ? fc(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
58091
58137
  return e;
58092
58138
  }
58093
58139
  //#endregion
58094
58140
  //#region ../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
58095
- var XV = /* @__PURE__ */ function(e) {
58141
+ var eH = /* @__PURE__ */ function(e) {
58096
58142
  return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
58097
- }({}), ZV = {
58143
+ }({}), tH = {
58098
58144
  badInput: !1,
58099
58145
  customError: !1,
58100
58146
  patternMismatch: !1,
@@ -58106,22 +58152,22 @@ var XV = /* @__PURE__ */ function(e) {
58106
58152
  typeMismatch: !1,
58107
58153
  valid: null,
58108
58154
  valueMissing: !1
58109
- }, QV = {
58155
+ }, nH = {
58110
58156
  valid: null,
58111
58157
  touched: !1,
58112
58158
  dirty: !1,
58113
58159
  filled: !1,
58114
58160
  focused: !1
58115
- }, $V = {
58161
+ }, rH = {
58116
58162
  disabled: !1,
58117
- ...QV
58118
- }, eH = { valid(e) {
58119
- return e === null ? null : e ? { [XV.valid]: "" } : { [XV.invalid]: "" };
58120
- } }, tH = {
58163
+ ...nH
58164
+ }, iH = { valid(e) {
58165
+ return e === null ? null : e ? { [eH.valid]: "" } : { [eH.invalid]: "" };
58166
+ } }, aH = {
58121
58167
  invalid: void 0,
58122
58168
  name: void 0,
58123
58169
  validityData: {
58124
- state: ZV,
58170
+ state: tH,
58125
58171
  errors: [],
58126
58172
  error: "",
58127
58173
  value: "",
@@ -58129,19 +58175,19 @@ var XV = /* @__PURE__ */ function(e) {
58129
58175
  },
58130
58176
  setValidityData: ma,
58131
58177
  disabled: void 0,
58132
- touched: QV.touched,
58178
+ touched: nH.touched,
58133
58179
  setTouched: ma,
58134
- dirty: QV.dirty,
58180
+ dirty: nH.dirty,
58135
58181
  setDirty: ma,
58136
- filled: QV.filled,
58182
+ filled: nH.filled,
58137
58183
  setFilled: ma,
58138
- focused: QV.focused,
58184
+ focused: nH.focused,
58139
58185
  setFocused: ma,
58140
58186
  validate: () => null,
58141
58187
  validationMode: "onSubmit",
58142
58188
  validationDebounceTime: 0,
58143
58189
  shouldValidateOnChange: () => !1,
58144
- state: $V,
58190
+ state: rH,
58145
58191
  markedDirtyRef: { current: !1 },
58146
58192
  registerFieldControl: ma,
58147
58193
  validation: {
@@ -58151,17 +58197,17 @@ var XV = /* @__PURE__ */ function(e) {
58151
58197
  commit: async () => {},
58152
58198
  change: ma
58153
58199
  }
58154
- }, nH = /* @__PURE__ */ y.createContext(tH);
58155
- process.env.NODE_ENV !== "production" && (nH.displayName = "FieldRootContext");
58156
- function rH(e = !0) {
58157
- let t = y.useContext(nH);
58200
+ }, oH = /* @__PURE__ */ y.createContext(aH);
58201
+ process.env.NODE_ENV !== "production" && (oH.displayName = "FieldRootContext");
58202
+ function sH(e = !0) {
58203
+ let t = y.useContext(oH);
58158
58204
  if (t.setValidityData === ma && !e) throw Error(process.env.NODE_ENV === "production" ? fc(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
58159
58205
  return t;
58160
58206
  }
58161
58207
  //#endregion
58162
58208
  //#region ../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
58163
- function iH(e, t, n, r, i = !0, a) {
58164
- let { registerFieldControl: o } = rH(), s = y.useRef(null);
58209
+ function cH(e, t, n, r, i = !0, a) {
58210
+ let { registerFieldControl: o } = sH(), s = y.useRef(null);
58165
58211
  s.current ||= Symbol(), K(() => {
58166
58212
  let c = s.current;
58167
58213
  return !c || !i ? void 0 : (o(c, {
@@ -58185,7 +58231,7 @@ function iH(e, t, n, r, i = !0, a) {
58185
58231
  }
58186
58232
  //#endregion
58187
58233
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
58188
- var aH = /* @__PURE__ */ y.createContext({
58234
+ var lH = /* @__PURE__ */ y.createContext({
58189
58235
  controlId: void 0,
58190
58236
  registerControlId: ma,
58191
58237
  labelId: void 0,
@@ -58194,14 +58240,14 @@ var aH = /* @__PURE__ */ y.createContext({
58194
58240
  setMessageIds: ma,
58195
58241
  getDescriptionProps: (e) => e
58196
58242
  });
58197
- process.env.NODE_ENV !== "production" && (aH.displayName = "LabelableContext");
58198
- function oH() {
58199
- return y.useContext(aH);
58243
+ process.env.NODE_ENV !== "production" && (lH.displayName = "LabelableContext");
58244
+ function uH() {
58245
+ return y.useContext(lH);
58200
58246
  }
58201
58247
  //#endregion
58202
58248
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
58203
- function sH(e = {}) {
58204
- let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = oH(), o = kp(t), s = n ? i : void 0, c = ra(() => Symbol("labelable-control")), l = y.useRef(!1), u = y.useRef(t != null), d = J(() => {
58249
+ function dH(e = {}) {
58250
+ let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = uH(), o = kp(t), s = n ? i : void 0, c = ra(() => Symbol("labelable-control")), l = y.useRef(!1), u = y.useRef(t != null), d = J(() => {
58205
58251
  !l.current || a === ma || (l.current = !1, a(c.current, void 0));
58206
58252
  });
58207
58253
  return K(() => {
@@ -58234,22 +58280,22 @@ function sH(e = {}) {
58234
58280
  }
58235
58281
  //#endregion
58236
58282
  //#region ../../node_modules/@base-ui/react/internals/itemEquality.mjs
58237
- var cH = (e, t) => Object.is(e, t);
58238
- function lH(e, t, n) {
58283
+ var fH = (e, t) => Object.is(e, t);
58284
+ function pH(e, t, n) {
58239
58285
  return e == null || t == null ? Object.is(e, t) : n(e, t);
58240
58286
  }
58241
- function uH(e, t, n) {
58242
- return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : lH(t, e, n));
58287
+ function mH(e, t, n) {
58288
+ return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : pH(t, e, n));
58243
58289
  }
58244
- function dH(e, t, n) {
58245
- return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : lH(e, t, n));
58290
+ function hH(e, t, n) {
58291
+ return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : pH(e, t, n));
58246
58292
  }
58247
- function fH(e, t, n) {
58248
- return e.filter((e) => !lH(t, e, n));
58293
+ function gH(e, t, n) {
58294
+ return e.filter((e) => !pH(t, e, n));
58249
58295
  }
58250
58296
  //#endregion
58251
58297
  //#region ../../node_modules/@base-ui/react/internals/serializeValue.mjs
58252
- function pH(e) {
58298
+ function _H(e) {
58253
58299
  if (e == null) return "";
58254
58300
  if (typeof e == "string") return e;
58255
58301
  try {
@@ -58260,39 +58306,39 @@ function pH(e) {
58260
58306
  }
58261
58307
  //#endregion
58262
58308
  //#region ../../node_modules/@base-ui/react/internals/resolveValueLabel.mjs
58263
- function mH(e) {
58309
+ function vH(e) {
58264
58310
  return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
58265
58311
  }
58266
- function hH(e) {
58312
+ function yH(e) {
58267
58313
  if (!Array.isArray(e)) return e != null && "null" in e;
58268
58314
  let t = e;
58269
- if (mH(t)) {
58315
+ if (vH(t)) {
58270
58316
  for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
58271
58317
  return !1;
58272
58318
  }
58273
58319
  for (let e of t) if (e && e.value == null && e.label != null) return !0;
58274
58320
  return !1;
58275
58321
  }
58276
- function gH(e, t) {
58322
+ function bH(e, t) {
58277
58323
  if (t && e != null) return t(e) ?? "";
58278
58324
  if (e && typeof e == "object") {
58279
58325
  if ("label" in e && e.label != null) return String(e.label);
58280
58326
  if ("value" in e) return String(e.value);
58281
58327
  }
58282
- return pH(e);
58328
+ return _H(e);
58283
58329
  }
58284
- function _H(e, t) {
58285
- return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? pH(e.value) : pH(e);
58330
+ function xH(e, t) {
58331
+ return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? _H(e.value) : _H(e);
58286
58332
  }
58287
- function vH(e, t, n) {
58333
+ function SH(e, t, n) {
58288
58334
  function r() {
58289
- return gH(e, n);
58335
+ return bH(e, n);
58290
58336
  }
58291
58337
  if (n && e != null) return n(e);
58292
58338
  if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
58293
58339
  if (t && !Array.isArray(t)) return t[e] ?? r();
58294
58340
  if (Array.isArray(t)) {
58295
- let n = t, i = mH(n) ? n.flatMap((e) => e.items) : n;
58341
+ let n = t, i = vH(n) ? n.flatMap((e) => e.items) : n;
58296
58342
  if (typeof e != "object" || !e) {
58297
58343
  let t = i.find((t) => t.value === e);
58298
58344
  return t && t.label != null ? t.label : r();
@@ -58304,8 +58350,8 @@ function vH(e, t, n) {
58304
58350
  }
58305
58351
  return r();
58306
58352
  }
58307
- function yH(e, t, n) {
58308
- return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/* @__PURE__ */ V(y.Fragment, { children: vH(r, t, n) }, i)), e), []);
58353
+ function CH(e, t, n) {
58354
+ return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/* @__PURE__ */ V(y.Fragment, { children: SH(r, t, n) }, i)), e), []);
58309
58355
  }
58310
58356
  //#endregion
58311
58357
  //#region ../../node_modules/@base-ui/react/select/store.mjs
@@ -58321,9 +58367,9 @@ var $ = {
58321
58367
  value: Y((e) => e.value),
58322
58368
  hasSelectedValue: Y((e) => {
58323
58369
  let { value: t, multiple: n, itemToStringValue: r } = e;
58324
- return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : _H(t, r) !== "";
58370
+ return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : xH(t, r) !== "";
58325
58371
  }),
58326
- hasNullItemLabel: Y((e, t) => t ? hH(e.items) : !1),
58372
+ hasNullItemLabel: Y((e, t) => t ? yH(e.items) : !1),
58327
58373
  open: Y((e) => e.open),
58328
58374
  mounted: Y((e) => e.mounted),
58329
58375
  forceMount: Y((e) => e.forceMount),
@@ -58334,7 +58380,7 @@ var $ = {
58334
58380
  isActive: Y((e, t) => e.activeIndex === t),
58335
58381
  isSelected: Y((e, t) => {
58336
58382
  let n = e.isItemEqualToValue, r = e.value;
58337
- return e.multiple ? Array.isArray(r) && r.some((e) => lH(t, e, n)) : lH(t, r, n);
58383
+ return e.multiple ? Array.isArray(r) && r.some((e) => pH(t, e, n)) : pH(t, r, n);
58338
58384
  }),
58339
58385
  isSelectedByFocus: Y((e, t) => e.selectedIndex === t),
58340
58386
  popupProps: Y((e) => e.popupProps),
@@ -58346,26 +58392,26 @@ var $ = {
58346
58392
  scrollUpArrowVisible: Y((e) => e.scrollUpArrowVisible),
58347
58393
  scrollDownArrowVisible: Y((e) => e.scrollDownArrowVisible),
58348
58394
  hasScrollArrows: Y((e) => e.hasScrollArrows)
58349
- }, bH = /* @__PURE__ */ y.createContext({
58395
+ }, wH = /* @__PURE__ */ y.createContext({
58350
58396
  formRef: { current: { fields: /* @__PURE__ */ new Map() } },
58351
58397
  errors: {},
58352
58398
  clearErrors: ma,
58353
58399
  validationMode: "onSubmit",
58354
58400
  submitAttemptedRef: { current: !1 }
58355
58401
  });
58356
- process.env.NODE_ENV !== "production" && (bH.displayName = "FormContext");
58357
- function xH() {
58358
- return y.useContext(bH);
58402
+ process.env.NODE_ENV !== "production" && (wH.displayName = "FormContext");
58403
+ function TH() {
58404
+ return y.useContext(wH);
58359
58405
  }
58360
58406
  //#endregion
58361
58407
  //#region ../../node_modules/@base-ui/react/internals/areArraysEqual.mjs
58362
- function SH(e, t, n = (e, t) => e === t) {
58408
+ function EH(e, t, n = (e, t) => e === t) {
58363
58409
  return e.length === t.length && e.every((e, r) => n(e, t[r]));
58364
58410
  }
58365
58411
  //#endregion
58366
58412
  //#region ../../node_modules/@base-ui/react/select/root/SelectRoot.mjs
58367
- function CH(e) {
58368
- let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, name: c, form: l, autoComplete: u, disabled: d = !1, readOnly: f = !1, required: p = !1, modal: m = !0, actionsRef: h, inputRef: g, onOpenChangeComplete: _, items: v, multiple: b = !1, itemToStringLabel: x, itemToStringValue: S, isItemEqualToValue: C = cH, highlightItemOnHover: w = !0, children: T } = e, { clearErrors: E } = xH(), { setDirty: D, setTouched: O, setFocused: k, validityData: A, setFilled: j, name: M, disabled: N, validation: P, validationMode: F } = rH(), I = sH({ id: t }), L = N || d, R = M ?? c, [z, ee] = L_({
58413
+ function DH(e) {
58414
+ let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, name: c, form: l, autoComplete: u, disabled: d = !1, readOnly: f = !1, required: p = !1, modal: m = !0, actionsRef: h, inputRef: g, onOpenChangeComplete: _, items: v, multiple: b = !1, itemToStringLabel: x, itemToStringValue: S, isItemEqualToValue: C = fH, highlightItemOnHover: w = !0, children: T } = e, { clearErrors: E } = TH(), { setDirty: D, setTouched: O, setFocused: k, validityData: A, setFilled: j, name: M, disabled: N, validation: P, validationMode: F } = sH(), I = dH({ id: t }), L = N || d, R = M ?? c, [z, ee] = L_({
58369
58415
  controlled: n,
58370
58416
  default: b ? r ?? ha : r,
58371
58417
  name: "Select",
@@ -58405,17 +58451,17 @@ function CH(e) {
58405
58451
  scrollUpArrowVisible: !1,
58406
58452
  scrollDownArrowVisible: !1,
58407
58453
  hasScrollArrows: !1
58408
- })).current, ve = X(_e, $.activeIndex), ye = X(_e, $.selectedIndex), be = X(_e, $.triggerElement), xe = X(_e, $.positionerElement), Se = kg(W), Ce = W ?? Se ?? null, we = y.useMemo(() => b ? "" : _H(z, S), [
58454
+ })).current, ve = X(_e, $.activeIndex), ye = X(_e, $.selectedIndex), be = X(_e, $.triggerElement), xe = X(_e, $.positionerElement), Se = kg(W), Ce = W ?? Se ?? null, we = y.useMemo(() => b ? "" : xH(z, S), [
58409
58455
  b,
58410
58456
  z,
58411
58457
  S
58412
- ]), Te = y.useMemo(() => b && Array.isArray(z) ? z.map((e) => _H(e, S)) : _H(z, S), [
58458
+ ]), Te = y.useMemo(() => b && Array.isArray(z) ? z.map((e) => xH(e, S)) : xH(z, S), [
58413
58459
  b,
58414
58460
  z,
58415
58461
  S
58416
58462
  ]);
58417
- iH(Do(_e.state.triggerElement), I, z, J(() => Te), !L, c);
58418
- let Ee = y.useRef(z), De = b ? Array.isArray(z) && z.length > 0 : z != null && _H(z, S) !== "";
58463
+ cH(Do(_e.state.triggerElement), I, z, J(() => Te), !L, c);
58464
+ let Ee = y.useRef(z), De = b ? Array.isArray(z) && z.length > 0 : z != null && xH(z, S) !== "";
58419
58465
  K(() => {
58420
58466
  z !== Ee.current && _e.set("forceMount", !0);
58421
58467
  }, [_e, z]), K(() => {
@@ -58426,11 +58472,11 @@ function CH(e) {
58426
58472
  let n = Array.isArray(z) ? z : [];
58427
58473
  if (n.length === 0) t = null;
58428
58474
  else {
58429
- let r = n[n.length - 1], i = dH(e, r, C);
58475
+ let r = n[n.length - 1], i = hH(e, r, C);
58430
58476
  t = i === -1 ? null : i;
58431
58477
  }
58432
58478
  } else {
58433
- let n = dH(e, z, C);
58479
+ let n = hH(e, z, C);
58434
58480
  t = n === -1 ? null : n;
58435
58481
  }
58436
58482
  t === null && (de.current = null), !te && _e.set("selectedIndex", t);
@@ -58446,7 +58492,7 @@ function CH(e) {
58446
58492
  ]);
58447
58493
  function Oe(e) {
58448
58494
  let t = A.initialValue;
58449
- return Array.isArray(e) && Array.isArray(t) ? !SH(e, t, (e, t) => lH(e, t, C)) : e !== t;
58495
+ return Array.isArray(e) && Array.isArray(t) ? !EH(e, t, (e, t) => pH(e, t, C)) : e !== t;
58450
58496
  }
58451
58497
  Zp(z, () => {
58452
58498
  E(R), D(Oe(z)), P.change(z);
@@ -58472,7 +58518,7 @@ function CH(e) {
58472
58518
  }), Me = J(() => {
58473
58519
  let e = _e.state.listElement || B.current;
58474
58520
  if (!e) return;
58475
- let t = AV(e.scrollHeight, e.clientHeight), n = jV(e.scrollTop, t), r = n > 0, i = n < t;
58521
+ let t = PV(e.scrollHeight, e.clientHeight), n = FV(e.scrollTop, t), r = n > 0, i = n < t;
58476
58522
  _e.state.scrollUpArrowVisible !== r && _e.set("scrollUpArrowVisible", r), _e.state.scrollDownArrowVisible !== i && _e.set("scrollDownArrowVisible", i);
58477
58523
  }), Ne = wf({
58478
58524
  open: te,
@@ -58602,7 +58648,7 @@ function CH(e) {
58602
58648
  _,
58603
58649
  Me
58604
58650
  ]), He = xo(g, P.inputRef), Ue = b && Array.isArray(z) && z.length > 0, We = b ? void 0 : R, Ge = y.useMemo(() => !b || !Array.isArray(z) || !R ? null : z.map((e) => {
58605
- let t = _H(e, S);
58651
+ let t = xH(e, S);
58606
58652
  return /* @__PURE__ */ V("input", {
58607
58653
  type: "hidden",
58608
58654
  form: l,
@@ -58618,9 +58664,9 @@ function CH(e) {
58618
58664
  S,
58619
58665
  L
58620
58666
  ]);
58621
- return /* @__PURE__ */ V(KV.Provider, {
58667
+ return /* @__PURE__ */ V(XV.Provider, {
58622
58668
  value: Ve,
58623
- children: /* @__PURE__ */ H(qV.Provider, {
58669
+ children: /* @__PURE__ */ H(ZV.Provider, {
58624
58670
  value: Ne,
58625
58671
  children: [
58626
58672
  T,
@@ -58634,7 +58680,7 @@ function CH(e) {
58634
58680
  let t = e.currentTarget.value, n = ho($a, e.nativeEvent);
58635
58681
  function r() {
58636
58682
  if (b) return;
58637
- let e = t.toLowerCase(), r = ce.current.findIndex((t) => _H(t, S).toLowerCase() === e || gH(t, x).toLowerCase() === e);
58683
+ let e = t.toLowerCase(), r = ce.current.findIndex((t) => xH(t, S).toLowerCase() === e || bH(t, x).toLowerCase() === e);
58638
58684
  r === -1 && (r = ce.current.findIndex((t, n) => {
58639
58685
  let r = ie.current[n];
58640
58686
  return r != null && r.toLowerCase() === e;
@@ -58666,7 +58712,7 @@ function CH(e) {
58666
58712
  }
58667
58713
  //#endregion
58668
58714
  //#region ../../node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
58669
- function wH(e, t) {
58715
+ function OH(e, t) {
58670
58716
  let n = kp(e);
58671
58717
  return K(() => (t(n), () => {
58672
58718
  t(void 0);
@@ -58674,8 +58720,8 @@ function wH(e, t) {
58674
58720
  }
58675
58721
  //#endregion
58676
58722
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
58677
- function TH(e = {}) {
58678
- let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = oH(), c = wH(t, J((e) => {
58723
+ function kH(e = {}) {
58724
+ let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = uH(), c = OH(t, J((e) => {
58679
58725
  s(e), i?.(e);
58680
58726
  })), l = o ?? n;
58681
58727
  function u(e) {
@@ -58685,7 +58731,7 @@ function TH(e = {}) {
58685
58731
  }
58686
58732
  if (!l) return;
58687
58733
  let t = ta(e.currentTarget).getElementById(l);
58688
- xi(t) && EH(t);
58734
+ xi(t) && AH(t);
58689
58735
  }
58690
58736
  function d(e) {
58691
58737
  za(e.nativeEvent)?.closest("button,input,select,textarea") || (!e.defaultPrevented && e.detail > 1 && e.preventDefault(), !r && u(e));
@@ -58702,24 +58748,24 @@ function TH(e = {}) {
58702
58748
  }
58703
58749
  };
58704
58750
  }
58705
- function EH(e) {
58751
+ function AH(e) {
58706
58752
  e.focus({ focusVisible: !0 });
58707
58753
  }
58708
58754
  //#endregion
58709
58755
  //#region ../../node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs
58710
- function DH(e) {
58756
+ function jH(e) {
58711
58757
  return e == null ? void 0 : `${e}-label`;
58712
58758
  }
58713
- function OH(e, t) {
58759
+ function MH(e, t) {
58714
58760
  return e ?? t;
58715
58761
  }
58716
58762
  //#endregion
58717
58763
  //#region ../../node_modules/@base-ui/react/select/label/SelectLabel.mjs
58718
- var kH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58764
+ var NH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58719
58765
  let { render: n, className: r, style: i, ...a } = e, o = a;
58720
58766
  delete o.id;
58721
- let s = rH(), { store: c } = JV(), l = X(c, $.triggerElement), u = X(c, $.id), d = TH({
58722
- id: DH(u),
58767
+ let s = sH(), { store: c } = QV(), l = X(c, $.triggerElement), u = X(c, $.id), d = kH({
58768
+ id: jH(u),
58723
58769
  fallbackControlId: l?.id ?? u,
58724
58770
  setLabelId(e) {
58725
58771
  c.set("labelId", e);
@@ -58729,20 +58775,20 @@ var kH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58729
58775
  ref: t,
58730
58776
  state: s.state,
58731
58777
  props: [d, a],
58732
- stateAttributesMapping: eH
58778
+ stateAttributesMapping: iH
58733
58779
  });
58734
58780
  });
58735
- process.env.NODE_ENV !== "production" && (kH.displayName = "SelectLabel");
58781
+ process.env.NODE_ENV !== "production" && (NH.displayName = "SelectLabel");
58736
58782
  //#endregion
58737
58783
  //#region ../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
58738
- var AH = 2, jH = 400, MH = {
58784
+ var PH = 2, FH = 400, IH = {
58739
58785
  ...gp,
58740
- ...eH,
58786
+ ...iH,
58741
58787
  popupSide: (e) => e ? { "data-popup-side": e } : null,
58742
58788
  value: () => null
58743
- }, NH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58744
- let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = rH(), { labelId: m } = oH(), { store: h, setOpen: g, selectionRef: _, validation: v, readOnly: b, required: x, alignItemWithTriggerActiveRef: S, disabled: C } = JV(), w = p || C || a, T = X(h, $.open), E = X(h, $.mounted), D = X(h, $.value), O = X(h, $.triggerProps), k = X(h, $.positionerElement), A = X(h, $.listElement), j = X(h, $.popupSide), M = X(h, $.id), N = X(h, $.labelId), P = X(h, $.hasSelectedValue), F = E && k ? j : null, I = i ?? M, L = OH(m, N);
58745
- sH({ id: I });
58789
+ }, LH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58790
+ let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = sH(), { labelId: m } = uH(), { store: h, setOpen: g, selectionRef: _, validation: v, readOnly: b, required: x, alignItemWithTriggerActiveRef: S, disabled: C } = QV(), w = p || C || a, T = X(h, $.open), E = X(h, $.mounted), D = X(h, $.value), O = X(h, $.triggerProps), k = X(h, $.positionerElement), A = X(h, $.listElement), j = X(h, $.popupSide), M = X(h, $.id), N = X(h, $.labelId), P = X(h, $.hasSelectedValue), F = E && k ? j : null, I = i ?? M, L = MH(m, N);
58791
+ dH({ id: I });
58746
58792
  let R = Do(k), z = y.useRef(null), { getButtonProps: ee, buttonRef: te } = Tp({
58747
58793
  disabled: w,
58748
58794
  native: o
@@ -58750,7 +58796,7 @@ var AH = 2, jH = 400, MH = {
58750
58796
  h.set("triggerElement", e);
58751
58797
  }), re = ca(), ie = ca(), B = ca();
58752
58798
  y.useEffect(() => {
58753
- if (T) return B.start(jH, () => {
58799
+ if (T) return B.start(FH, () => {
58754
58800
  _.current.allowUnselectedMouseUp = !0, _.current.allowSelectedMouseUp = !0;
58755
58801
  }), () => {
58756
58802
  B.clear();
@@ -58792,7 +58838,7 @@ var AH = 2, jH = 400, MH = {
58792
58838
  let t = e.target;
58793
58839
  if (q(z.current, t) || q(R.current, t)) return;
58794
58840
  let n = Nv(z.current);
58795
- e.clientX >= n.left - AH && e.clientX <= n.right + AH && e.clientY >= n.top - AH && e.clientY <= n.bottom + AH || g(!1, ho(lo, e));
58841
+ e.clientX >= n.left - PH && e.clientX <= n.right + PH && e.clientY >= n.top - PH && e.clientY <= n.bottom + PH || g(!1, ho(lo, e));
58796
58842
  }
58797
58843
  ie.start(0, () => {
58798
58844
  t.addEventListener("mouseup", n, { once: !0 });
@@ -58817,30 +58863,30 @@ var AH = 2, jH = 400, MH = {
58817
58863
  ne
58818
58864
  ],
58819
58865
  state: se,
58820
- stateAttributesMapping: MH,
58866
+ stateAttributesMapping: IH,
58821
58867
  props: oe
58822
58868
  });
58823
58869
  });
58824
- process.env.NODE_ENV !== "production" && (NH.displayName = "SelectTrigger");
58870
+ process.env.NODE_ENV !== "production" && (LH.displayName = "SelectTrigger");
58825
58871
  //#endregion
58826
58872
  //#region ../../node_modules/@base-ui/react/select/value/SelectValue.mjs
58827
- var PH = { value: () => null }, FH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58828
- let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = JV(), u = X(c, $.value), d = X(c, $.items), f = X(c, $.itemToStringLabel), p = X(c, $.hasSelectedValue), m = !p && a != null && i == null, h = X(c, $.hasNullItemLabel, m), g = {
58873
+ var RH = { value: () => null }, zH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58874
+ let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = QV(), u = X(c, $.value), d = X(c, $.items), f = X(c, $.itemToStringLabel), p = X(c, $.hasSelectedValue), m = !p && a != null && i == null, h = X(c, $.hasNullItemLabel, m), g = {
58829
58875
  value: u,
58830
58876
  placeholder: !p
58831
58877
  }, _ = null;
58832
- return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? yH(u, d, f) : vH(u, d, f)), Lc("span", e, {
58878
+ return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? CH(u, d, f) : SH(u, d, f)), Lc("span", e, {
58833
58879
  state: g,
58834
58880
  ref: [t, l],
58835
58881
  props: [{ children: _ }, s],
58836
- stateAttributesMapping: PH
58882
+ stateAttributesMapping: RH
58837
58883
  });
58838
58884
  });
58839
- process.env.NODE_ENV !== "production" && (FH.displayName = "SelectValue");
58885
+ process.env.NODE_ENV !== "production" && (zH.displayName = "SelectValue");
58840
58886
  //#endregion
58841
58887
  //#region ../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs
58842
- var IH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58843
- let { render: n, className: r, style: i, ...a } = e, { store: o } = JV();
58888
+ var BH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58889
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = QV();
58844
58890
  return Lc("span", e, {
58845
58891
  state: { open: X(o, $.open) },
58846
58892
  ref: t,
@@ -58851,16 +58897,16 @@ var IH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58851
58897
  stateAttributesMapping: hp
58852
58898
  });
58853
58899
  });
58854
- process.env.NODE_ENV !== "production" && (IH.displayName = "SelectIcon");
58900
+ process.env.NODE_ENV !== "production" && (BH.displayName = "SelectIcon");
58855
58901
  //#endregion
58856
58902
  //#region ../../node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs
58857
- var LH = /* @__PURE__ */ y.createContext(void 0);
58858
- process.env.NODE_ENV !== "production" && (LH.displayName = "SelectPortalContext");
58903
+ var VH = /* @__PURE__ */ y.createContext(void 0);
58904
+ process.env.NODE_ENV !== "production" && (VH.displayName = "SelectPortalContext");
58859
58905
  //#endregion
58860
58906
  //#region ../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs
58861
- var RH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58862
- let { store: n } = JV(), r = X(n, $.mounted), i = X(n, $.forceMount);
58863
- return r || i ? /* @__PURE__ */ V(LH.Provider, {
58907
+ var HH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58908
+ let { store: n } = QV(), r = X(n, $.mounted), i = X(n, $.forceMount);
58909
+ return r || i ? /* @__PURE__ */ V(VH.Provider, {
58864
58910
  value: !0,
58865
58911
  children: /* @__PURE__ */ V(tl, {
58866
58912
  ref: t,
@@ -58868,14 +58914,14 @@ var RH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58868
58914
  })
58869
58915
  }) : null;
58870
58916
  });
58871
- process.env.NODE_ENV !== "production" && (RH.displayName = "SelectPortal");
58917
+ process.env.NODE_ENV !== "production" && (HH.displayName = "SelectPortal");
58872
58918
  //#endregion
58873
58919
  //#region ../../node_modules/@base-ui/react/select/backdrop/SelectBackdrop.mjs
58874
- var zH = {
58920
+ var UH = {
58875
58921
  ..._p,
58876
58922
  ...Zd
58877
- }, BH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58878
- let { render: n, className: r, style: i, ...a } = e, { store: o } = JV(), s = X(o, $.open), c = X(o, $.mounted);
58923
+ }, WH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58924
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = QV(), s = X(o, $.open), c = X(o, $.mounted);
58879
58925
  return Lc("div", e, {
58880
58926
  state: {
58881
58927
  open: s,
@@ -58890,31 +58936,31 @@ var zH = {
58890
58936
  WebkitUserSelect: "none"
58891
58937
  }
58892
58938
  }, a],
58893
- stateAttributesMapping: zH
58939
+ stateAttributesMapping: UH
58894
58940
  });
58895
58941
  });
58896
- process.env.NODE_ENV !== "production" && (BH.displayName = "SelectBackdrop");
58942
+ process.env.NODE_ENV !== "production" && (WH.displayName = "SelectBackdrop");
58897
58943
  //#endregion
58898
58944
  //#region ../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
58899
- var VH = /* @__PURE__ */ y.createContext(void 0);
58900
- process.env.NODE_ENV !== "production" && (VH.displayName = "SelectPositionerContext");
58901
- function HH() {
58902
- let e = y.useContext(VH);
58945
+ var GH = /* @__PURE__ */ y.createContext(void 0);
58946
+ process.env.NODE_ENV !== "production" && (GH.displayName = "SelectPositionerContext");
58947
+ function KH() {
58948
+ let e = y.useContext(GH);
58903
58949
  if (!e) throw Error(process.env.NODE_ENV === "production" ? fc(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
58904
58950
  return e;
58905
58951
  }
58906
58952
  //#endregion
58907
58953
  //#region ../../node_modules/@base-ui/react/select/popup/utils.mjs
58908
- function UH(e, t) {
58954
+ function qH(e, t) {
58909
58955
  e && Object.assign(e.style, t);
58910
58956
  }
58911
- var WH = {
58957
+ var JH = {
58912
58958
  position: "relative",
58913
58959
  maxHeight: "100%",
58914
58960
  overflowX: "hidden",
58915
58961
  overflowY: "auto"
58916
- }, GH = { position: "fixed" }, KH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58917
- let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = Jc, style: _, ...v } = e, { store: b, listRef: x, labelsRef: S, alignItemWithTriggerActiveRef: C, selectedItemTextRef: w, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = JV(), k = YV(), A = X(b, $.open), j = X(b, $.mounted), M = X(b, $.modal), N = X(b, $.value), P = X(b, $.openMethod), F = X(b, $.positionerElement), I = X(b, $.triggerElement), L = X(b, $.isItemEqualToValue), R = X(b, $.transitionStatus), z = y.useRef(null), ee = y.useRef(null), [te, ne] = y.useState(h), re = j && te && P !== "touch";
58962
+ }, YH = { position: "fixed" }, XH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58963
+ let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = Jc, style: _, ...v } = e, { store: b, listRef: x, labelsRef: S, alignItemWithTriggerActiveRef: C, selectedItemTextRef: w, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = QV(), k = $V(), A = X(b, $.open), j = X(b, $.mounted), M = X(b, $.modal), N = X(b, $.value), P = X(b, $.openMethod), F = X(b, $.positionerElement), I = X(b, $.triggerElement), L = X(b, $.isItemEqualToValue), R = X(b, $.transitionStatus), z = y.useRef(null), ee = y.useRef(null), [te, ne] = y.useState(h), re = j && te && P !== "touch";
58918
58964
  !j && te !== h && ne(h), K(() => {
58919
58965
  j || ($.scrollUpArrowVisible(b.state) && b.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(b.state) && b.set("scrollDownArrowVisible", !1));
58920
58966
  }, [b, j]), y.useImperativeHandle(C, () => re), gv((re || M) && A, P === "touch", F, I);
@@ -58934,7 +58980,7 @@ var WH = {
58934
58980
  disableAnchorTracking: m ?? re,
58935
58981
  collisionAvoidance: g,
58936
58982
  keepMounted: !0
58937
- }), B = re ? "none" : ie.side, ae = re ? GH : ie.positionerStyles, oe = {
58983
+ }), B = re ? "none" : ie.side, ae = re ? YH : ie.positionerStyles, oe = {
58938
58984
  open: A,
58939
58985
  side: B,
58940
58986
  align: ie.align,
@@ -58957,13 +59003,13 @@ var WH = {
58957
59003
  let t = ce.current;
58958
59004
  if (ce.current = e.size, e.size === t) return;
58959
59005
  let n = ho($a);
58960
- if (t !== 0 && !b.state.multiple && N !== null && dH(T.current, N, L) === -1) {
58961
- let e = E.current, t = e != null && dH(T.current, e, L) !== -1 ? e : null;
59006
+ if (t !== 0 && !b.state.multiple && N !== null && hH(T.current, N, L) === -1) {
59007
+ let e = E.current, t = e != null && hH(T.current, e, L) !== -1 ? e : null;
58962
59008
  O(t, n), t === null && (b.set("selectedIndex", null), w.current = null);
58963
59009
  }
58964
59010
  if (t !== 0 && b.state.multiple && Array.isArray(N)) {
58965
- let e = (e) => dH(T.current, e, L) !== -1, t = N.filter((t) => e(t));
58966
- (t.length !== N.length || t.some((e) => !uH(N, e, L))) && (O(t, n), t.length === 0 && (b.set("selectedIndex", null), w.current = null));
59011
+ let e = (e) => hH(T.current, e, L) !== -1, t = N.filter((t) => e(t));
59012
+ (t.length !== N.length || t.some((e) => !mH(N, e, L))) && (O(t, n), t.length === 0 && (b.set("selectedIndex", null), w.current = null));
58967
59013
  }
58968
59014
  if (A && re) {
58969
59015
  b.update({
@@ -58971,7 +59017,7 @@ var WH = {
58971
59017
  scrollDownArrowVisible: !1
58972
59018
  });
58973
59019
  let e = { height: "" };
58974
- UH(F, e), UH(D.current, e);
59020
+ qH(F, e), qH(D.current, e);
58975
59021
  }
58976
59022
  }), ue = y.useMemo(() => ({
58977
59023
  ...ie,
@@ -58990,7 +59036,7 @@ var WH = {
58990
59036
  elementsRef: x,
58991
59037
  labelsRef: S,
58992
59038
  onMapChange: le,
58993
- children: /* @__PURE__ */ H(VH.Provider, {
59039
+ children: /* @__PURE__ */ H(GH.Provider, {
58994
59040
  value: ue,
58995
59041
  children: [j && M && /* @__PURE__ */ V(qp, {
58996
59042
  inert: Kp(!A),
@@ -58999,14 +59045,14 @@ var WH = {
58999
59045
  })
59000
59046
  });
59001
59047
  });
59002
- process.env.NODE_ENV !== "production" && (KH.displayName = "SelectPositioner");
59048
+ process.env.NODE_ENV !== "production" && (XH.displayName = "SelectPositioner");
59003
59049
  //#endregion
59004
59050
  //#region ../../node_modules/@base-ui/react/select/popup/SelectPopup.mjs
59005
- var qH = {
59051
+ var ZH = {
59006
59052
  ..._p,
59007
59053
  ...Zd
59008
- }, JH = /* @__PURE__ */ y.forwardRef(function(e, t) {
59009
- let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: c, onOpenChangeComplete: l, setOpen: u, valueRef: d, firstItemTextRef: f, selectedItemTextRef: p, multiple: m, handleScrollArrowVisibility: h, scrollHandlerRef: g, listRef: _, highlightItemOnHover: v } = JV(), { side: b, align: x, alignItemWithTriggerActive: S, isPositioned: C, setControlledAlignItemWithTrigger: w } = HH(), T = av(!0) != null, E = YV(), D = ug(), { nonce: O, disableStyleElements: k } = yV(), A = X(s, $.id), j = X(s, $.open), M = X(s, $.openMethod), N = X(s, $.mounted), P = X(s, $.popupProps), F = X(s, $.transitionStatus), I = X(s, $.triggerElement), L = X(s, $.positionerElement), R = X(s, $.listElement), z = y.useRef(!1), ee = y.useRef(!1), te = y.useRef({}), ne = pa(), re = J((e) => {
59054
+ }, QH = /* @__PURE__ */ y.forwardRef(function(e, t) {
59055
+ let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: c, onOpenChangeComplete: l, setOpen: u, valueRef: d, firstItemTextRef: f, selectedItemTextRef: p, multiple: m, handleScrollArrowVisibility: h, scrollHandlerRef: g, listRef: _, highlightItemOnHover: v } = QV(), { side: b, align: x, alignItemWithTriggerActive: S, isPositioned: C, setControlledAlignItemWithTrigger: w } = KH(), T = av(!0) != null, E = $V(), D = ug(), { nonce: O, disableStyleElements: k } = CV(), A = X(s, $.id), j = X(s, $.open), M = X(s, $.openMethod), N = X(s, $.mounted), P = X(s, $.popupProps), F = X(s, $.transitionStatus), I = X(s, $.triggerElement), L = X(s, $.positionerElement), R = X(s, $.listElement), z = y.useRef(!1), ee = y.useRef(!1), te = y.useRef({}), ne = pa(), re = J((e) => {
59010
59056
  if (!L || !c.current || !ee.current) return;
59011
59057
  if (z.current || !S) {
59012
59058
  h();
@@ -59017,10 +59063,10 @@ var qH = {
59017
59063
  h();
59018
59064
  return;
59019
59065
  }
59020
- let r = ZH(L), i = QH(L.getBoundingClientRect().height, "y", r), a = ta(L), o = _i(L), s = o.getComputedStyle(L), l = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = YH(o.getComputedStyle(c.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, m = XH(e), g = 0, _ = null, v = !1, y = !1, b = (e) => {
59066
+ let r = tU(L), i = nU(L.getBoundingClientRect().height, "y", r), a = ta(L), o = _i(L), s = o.getComputedStyle(L), l = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = $H(o.getComputedStyle(c.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, m = eU(e), g = 0, _ = null, v = !1, y = !1, b = (e) => {
59021
59067
  L.style.height = `${e}px`;
59022
59068
  }, x = (t, n) => {
59023
- let r = OV(t, 0, f - i);
59069
+ let r = MV(t, 0, f - i);
59024
59070
  r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (z.current = !0), h();
59025
59071
  }, C = t ? m - p : p, w = Math.min(i + C, f);
59026
59072
  if (g = w, C <= 1) {
@@ -59028,7 +59074,7 @@ var qH = {
59028
59074
  return;
59029
59075
  }
59030
59076
  if (f - w > 1 ? t ? y = !0 : _ = 0 : (v = !0, n && p < m && (_ = p - (C - (i + C - f)))), g = Math.ceil(g), g !== 0 && b(g), y || _ != null) {
59031
- let t = XH(e), n = y ? t : OV(_, 0, t);
59077
+ let t = eU(e), n = y ? t : MV(_, 0, t);
59032
59078
  Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
59033
59079
  }
59034
59080
  (v || g >= f - 1) && (z.current = !0), h();
@@ -59059,7 +59105,7 @@ var qH = {
59059
59105
  marginBottom: L.style.marginBottom
59060
59106
  });
59061
59107
  }, [c, L]), K(() => {
59062
- j || S || (ee.current = !1, z.current = !1, UH(L, te.current));
59108
+ j || S || (ee.current = !1, z.current = !1, qH(L, te.current));
59063
59109
  }, [
59064
59110
  j,
59065
59111
  S,
@@ -59072,34 +59118,34 @@ var qH = {
59072
59118
  ee.current = !0, ne.request(h), e.style.removeProperty("--transform-origin");
59073
59119
  return;
59074
59120
  }
59075
- let t = tU(e);
59121
+ let t = aU(e);
59076
59122
  e.style.removeProperty("--transform-origin");
59077
59123
  try {
59078
59124
  let t = p.current;
59079
59125
  t?.isConnected || (t = !$.hasSelectedValue(s.state) && f.current?.isConnected ? f.current : null);
59080
- let n = d.current, r = _i(L), i = r.getComputedStyle(L), a = r.getComputedStyle(e), o = ta(I), c = ZH(I), l = $H(I.getBoundingClientRect(), c), u = $H(L.getBoundingClientRect(), c), m = l.height, g = R || e, y = g.scrollHeight, b = parseFloat(a.borderBottomWidth), x = parseFloat(i.marginTop) || 10, S = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, T = YH(a), E = o.documentElement.clientHeight - x - S, O = o.documentElement.clientWidth, k = E - l.bottom + m, A, j = D === "rtl" ? l.right - u.width : l.left, M = 0;
59126
+ let n = d.current, r = _i(L), i = r.getComputedStyle(L), a = r.getComputedStyle(e), o = ta(I), c = tU(I), l = rU(I.getBoundingClientRect(), c), u = rU(L.getBoundingClientRect(), c), m = l.height, g = R || e, y = g.scrollHeight, b = parseFloat(a.borderBottomWidth), x = parseFloat(i.marginTop) || 10, S = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, T = $H(a), E = o.documentElement.clientHeight - x - S, O = o.documentElement.clientWidth, k = E - l.bottom + m, A, j = D === "rtl" ? l.right - u.width : l.left, M = 0;
59081
59127
  if (t && n) {
59082
- let e = $H(n.getBoundingClientRect(), c);
59083
- A = $H(t.getBoundingClientRect(), c), j = u.left + (D === "rtl" ? e.right - A.right : e.left - A.left);
59128
+ let e = rU(n.getBoundingClientRect(), c);
59129
+ A = rU(t.getBoundingClientRect(), c), j = u.left + (D === "rtl" ? e.right - A.right : e.left - A.left);
59084
59130
  let r = e.top - l.top + e.height / 2;
59085
59131
  M = A.top - u.top + A.height / 2 - r;
59086
59132
  }
59087
59133
  let N = k + M + S + b, P = Math.min(E, N), F = E - x - S, ne = N - P, re = O - 5;
59088
- L.style.left = `${OV(j, 5, re - u.width)}px`, L.style.height = `${P}px`, L.style.maxHeight = "none", L.style.marginTop = `${x}px`, L.style.marginBottom = `${S}px`, e.style.height = "100%";
59089
- let ie = XH(g), B = ne >= ie - 1;
59134
+ L.style.left = `${MV(j, 5, re - u.width)}px`, L.style.height = `${P}px`, L.style.maxHeight = "none", L.style.marginTop = `${x}px`, L.style.marginBottom = `${S}px`, e.style.height = "100%";
59135
+ let ie = eU(g), B = ne >= ie - 1;
59090
59136
  B && (P = Math.min(E, u.height) - (ne - ie));
59091
59137
  let ae = l.top < 20 || l.bottom > E - 20 || Math.ceil(P) + 1 < Math.min(y, C), oe = (r.visualViewport?.scale ?? 1) !== 1 && Qi;
59092
59138
  if (ae || oe) {
59093
- ee.current = !0, UH(L, te.current), w(!1);
59139
+ ee.current = !0, qH(L, te.current), w(!1);
59094
59140
  return;
59095
59141
  }
59096
59142
  let se = Math.max(C, P);
59097
59143
  if (B) {
59098
59144
  let e = Math.max(0, E - N);
59099
- L.style.top = u.height >= F ? "0" : `${e}px`, L.style.height = `${P}px`, g.scrollTop = XH(g);
59145
+ L.style.top = u.height >= F ? "0" : `${e}px`, L.style.height = `${P}px`, g.scrollTop = eU(g);
59100
59146
  } else L.style.bottom = "0", g.scrollTop = ne;
59101
59147
  if (A) {
59102
- let t = u.top, n = u.height, r = A.top + A.height / 2, i = OV(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
59148
+ let t = u.top, n = u.height, r = A.top + A.height / 2, i = MV(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
59103
59149
  e.style.setProperty("--transform-origin", `50% ${i}%`);
59104
59150
  }
59105
59151
  (se === E || P >= T) && (z.current = !0), h(), v && s.state.selectedIndex === null && s.state.activeIndex === null && _.current[0] != null && s.set("activeIndex", 0), ee.current = !0;
@@ -59152,20 +59198,20 @@ var qH = {
59152
59198
  onScroll(e) {
59153
59199
  R || re(e.currentTarget);
59154
59200
  },
59155
- ...S && { style: R ? { height: "100%" } : WH }
59201
+ ...S && { style: R ? { height: "100%" } : JH }
59156
59202
  }, ae = Lc("div", e, {
59157
59203
  ref: [t, c],
59158
59204
  state: ie,
59159
- stateAttributesMapping: qH,
59205
+ stateAttributesMapping: ZH,
59160
59206
  props: [
59161
59207
  P,
59162
59208
  B,
59163
59209
  xg(F),
59164
- { className: !R && S ? mV.className : void 0 },
59210
+ { className: !R && S ? vV.className : void 0 },
59165
59211
  o
59166
59212
  ]
59167
59213
  });
59168
- return /* @__PURE__ */ H(y.Fragment, { children: [!k && mV.getElement(O), /* @__PURE__ */ V(bl, {
59214
+ return /* @__PURE__ */ H(y.Fragment, { children: [!k && vV.getElement(O), /* @__PURE__ */ V(bl, {
59169
59215
  context: E,
59170
59216
  modal: !1,
59171
59217
  disabled: !N,
@@ -59175,38 +59221,38 @@ var qH = {
59175
59221
  children: ae
59176
59222
  })] });
59177
59223
  });
59178
- process.env.NODE_ENV !== "production" && (JH.displayName = "SelectPopup");
59179
- function YH(e) {
59224
+ process.env.NODE_ENV !== "production" && (QH.displayName = "SelectPopup");
59225
+ function $H(e) {
59180
59226
  let t = e.maxHeight || "";
59181
59227
  return t.endsWith("px") && parseFloat(t) || Infinity;
59182
59228
  }
59183
- function XH(e) {
59184
- return AV(e.scrollHeight, e.clientHeight);
59229
+ function eU(e) {
59230
+ return PV(e.scrollHeight, e.clientHeight);
59185
59231
  }
59186
- function ZH(e) {
59232
+ function tU(e) {
59187
59233
  return mu.getScale(e);
59188
59234
  }
59189
- function QH(e, t, n) {
59235
+ function nU(e, t, n) {
59190
59236
  return e / n[t];
59191
59237
  }
59192
- function $H(e, t) {
59238
+ function rU(e, t) {
59193
59239
  return ds({
59194
- x: QH(e.x, "x", t),
59195
- y: QH(e.y, "y", t),
59196
- width: QH(e.width, "x", t),
59197
- height: QH(e.height, "y", t)
59240
+ x: nU(e.x, "x", t),
59241
+ y: nU(e.y, "y", t),
59242
+ width: nU(e.width, "x", t),
59243
+ height: nU(e.height, "y", t)
59198
59244
  });
59199
59245
  }
59200
- var eU = [
59246
+ var iU = [
59201
59247
  ["transform", "none"],
59202
59248
  ["scale", "1"],
59203
59249
  ["translate", "0 0"]
59204
59250
  ];
59205
- function tU(e) {
59251
+ function aU(e) {
59206
59252
  let { style: t } = e, n = {};
59207
- for (let [e, r] of eU) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
59253
+ for (let [e, r] of iU) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
59208
59254
  return () => {
59209
- for (let [e] of eU) {
59255
+ for (let [e] of iU) {
59210
59256
  let r = n[e];
59211
59257
  r ? t.setProperty(e, r) : t.removeProperty(e);
59212
59258
  }
@@ -59214,16 +59260,16 @@ function tU(e) {
59214
59260
  }
59215
59261
  //#endregion
59216
59262
  //#region ../../node_modules/@base-ui/react/select/list/SelectList.mjs
59217
- var nU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59218
- let { render: n, className: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = JV(), { alignItemWithTriggerActive: c } = HH(), l = X(o, $.hasScrollArrows), u = X(o, $.openMethod), d = X(o, $.multiple), f = {
59263
+ var oU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59264
+ let { render: n, className: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = QV(), { alignItemWithTriggerActive: c } = KH(), l = X(o, $.hasScrollArrows), u = X(o, $.openMethod), d = X(o, $.multiple), f = {
59219
59265
  id: `${X(o, $.id)}-list`,
59220
59266
  role: "listbox",
59221
59267
  "aria-multiselectable": d || void 0,
59222
59268
  onScroll(e) {
59223
59269
  s.current?.(e.currentTarget);
59224
59270
  },
59225
- ...c && { style: WH },
59226
- className: l && u !== "touch" ? mV.className : void 0
59271
+ ...c && { style: JH },
59272
+ className: l && u !== "touch" ? vV.className : void 0
59227
59273
  };
59228
59274
  return Lc("div", e, {
59229
59275
  ref: [t, J((e) => {
@@ -59232,24 +59278,24 @@ var nU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59232
59278
  props: [f, a]
59233
59279
  });
59234
59280
  });
59235
- process.env.NODE_ENV !== "production" && (nU.displayName = "SelectList");
59281
+ process.env.NODE_ENV !== "production" && (oU.displayName = "SelectList");
59236
59282
  //#endregion
59237
59283
  //#region ../../node_modules/@base-ui/react/select/item/SelectItemContext.mjs
59238
- var rU = /* @__PURE__ */ y.createContext(void 0);
59239
- process.env.NODE_ENV !== "production" && (rU.displayName = "SelectItemContext");
59240
- function iU() {
59241
- let e = y.useContext(rU);
59284
+ var sU = /* @__PURE__ */ y.createContext(void 0);
59285
+ process.env.NODE_ENV !== "production" && (sU.displayName = "SelectItemContext");
59286
+ function cU() {
59287
+ let e = y.useContext(sU);
59242
59288
  if (!e) throw Error(process.env.NODE_ENV === "production" ? fc(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
59243
59289
  return e;
59244
59290
  }
59245
59291
  //#endregion
59246
59292
  //#region ../../node_modules/@base-ui/react/select/item/SelectItem.mjs
59247
- var aU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59293
+ var lU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59248
59294
  let { render: n, className: r, style: i, value: a = null, label: o, disabled: s = !1, nativeButton: c = !1, ...l } = e, u = y.useRef(null), d = q_({
59249
59295
  label: o,
59250
59296
  textRef: u,
59251
59297
  indexGuessBehavior: K_.GuessFromOrder
59252
- }), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: _, valuesRef: v, multiple: b, selectedItemTextRef: x, disabled: S, readOnly: C } = JV(), w = X(f, $.isActive, d.index), T = X(f, $.open), E = X(f, $.isSelected, a), D = X(f, $.isSelectedByFocus, d.index), O = X(f, $.isItemEqualToValue), k = d.index, A = k !== -1, j = y.useRef(null);
59298
+ }), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: _, valuesRef: v, multiple: b, selectedItemTextRef: x, disabled: S, readOnly: C } = QV(), w = X(f, $.isActive, d.index), T = X(f, $.open), E = X(f, $.isSelected, a), D = X(f, $.isSelectedByFocus, d.index), O = X(f, $.isItemEqualToValue), k = d.index, A = k !== -1, j = y.useRef(null);
59253
59299
  K(() => {
59254
59300
  if (!A) return;
59255
59301
  let e = v.current;
@@ -59264,7 +59310,7 @@ var aU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59264
59310
  ]), K(() => {
59265
59311
  if (!A) return;
59266
59312
  let e = f.state.value, t = e;
59267
- b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && lH(a, t, O) && (f.set("selectedIndex", k), u.current && (x.current = u.current));
59313
+ b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && pH(a, t, O) && (f.set("selectedIndex", k), u.current && (x.current = u.current));
59268
59314
  }, [
59269
59315
  A,
59270
59316
  k,
@@ -59289,7 +59335,7 @@ var aU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59289
59335
  let t = f.state.value;
59290
59336
  if (b) {
59291
59337
  let n = Array.isArray(t) ? t : [];
59292
- h(E ? fH(n, a, O) : [...n, a], ho(io, e));
59338
+ h(E ? gH(n, a, O) : [...n, a], ho(io, e));
59293
59339
  } else h(a, ho(io, e)), m(!1, ho(io, e));
59294
59340
  }
59295
59341
  function z() {
@@ -59350,24 +59396,24 @@ var aU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59350
59396
  D,
59351
59397
  A
59352
59398
  ]);
59353
- return /* @__PURE__ */ V(rU.Provider, {
59399
+ return /* @__PURE__ */ V(sU.Provider, {
59354
59400
  value: ne,
59355
59401
  children: te
59356
59402
  });
59357
59403
  }));
59358
- process.env.NODE_ENV !== "production" && (aU.displayName = "SelectItem");
59404
+ process.env.NODE_ENV !== "production" && (lU.displayName = "SelectItem");
59359
59405
  //#endregion
59360
59406
  //#region ../../node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs
59361
- var oU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59362
- let n = e.keepMounted ?? !1, { selected: r } = iU();
59363
- return n || r ? /* @__PURE__ */ V(sU, {
59407
+ var uU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59408
+ let n = e.keepMounted ?? !1, { selected: r } = cU();
59409
+ return n || r ? /* @__PURE__ */ V(dU, {
59364
59410
  ...e,
59365
59411
  ref: t
59366
59412
  }) : null;
59367
59413
  });
59368
- process.env.NODE_ENV !== "production" && (oU.displayName = "SelectItemIndicator");
59369
- var sU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59370
- let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = iU(), c = y.useRef(null), { transitionStatus: l, setMounted: u } = qd(s), d = Lc("span", e, {
59414
+ process.env.NODE_ENV !== "production" && (uU.displayName = "SelectItemIndicator");
59415
+ var dU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59416
+ let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = cU(), c = y.useRef(null), { transitionStatus: l, setMounted: u } = qd(s), d = Lc("span", e, {
59371
59417
  ref: [t, c],
59372
59418
  state: {
59373
59419
  selected: s,
@@ -59387,11 +59433,11 @@ var sU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59387
59433
  }
59388
59434
  }), d;
59389
59435
  }));
59390
- process.env.NODE_ENV !== "production" && (sU.displayName = "Inner");
59436
+ process.env.NODE_ENV !== "production" && (dU.displayName = "Inner");
59391
59437
  //#endregion
59392
59438
  //#region ../../node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
59393
- var cU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59394
- let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = iU(), { firstItemTextRef: o, selectedItemTextRef: s } = JV(), { render: c, className: l, style: u, ...d } = e;
59439
+ var fU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59440
+ let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = cU(), { firstItemTextRef: o, selectedItemTextRef: s } = QV(), { render: c, className: l, style: u, ...d } = e;
59395
59441
  return Lc("div", e, {
59396
59442
  ref: [
59397
59443
  y.useCallback((e) => {
@@ -59409,14 +59455,14 @@ var cU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59409
59455
  props: d
59410
59456
  });
59411
59457
  }));
59412
- process.env.NODE_ENV !== "production" && (cU.displayName = "SelectItemText");
59458
+ process.env.NODE_ENV !== "production" && (fU.displayName = "SelectItemText");
59413
59459
  //#endregion
59414
59460
  //#region ../../node_modules/@base-ui/react/select/arrow/SelectArrow.mjs
59415
- var lU = {
59461
+ var pU = {
59416
59462
  ..._p,
59417
59463
  ...Zd
59418
- }, uU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59419
- let { render: n, className: r, style: i, ...a } = e, { store: o } = JV(), { side: s, align: c, arrowRef: l, arrowStyles: u, arrowUncentered: d, alignItemWithTriggerActive: f } = HH(), p = Lc("div", e, {
59464
+ }, mU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59465
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = QV(), { side: s, align: c, arrowRef: l, arrowStyles: u, arrowUncentered: d, alignItemWithTriggerActive: f } = KH(), p = Lc("div", e, {
59420
59466
  state: {
59421
59467
  open: X(o, $.open),
59422
59468
  side: s,
@@ -59428,15 +59474,15 @@ var lU = {
59428
59474
  style: u,
59429
59475
  "aria-hidden": !0
59430
59476
  }, a],
59431
- stateAttributesMapping: lU
59477
+ stateAttributesMapping: pU
59432
59478
  });
59433
59479
  return f ? null : p;
59434
59480
  });
59435
- process.env.NODE_ENV !== "production" && (uU.displayName = "SelectArrow");
59481
+ process.env.NODE_ENV !== "production" && (mU.displayName = "SelectArrow");
59436
59482
  //#endregion
59437
59483
  //#region ../../node_modules/@base-ui/react/select/scroll-arrow/SelectScrollArrow.mjs
59438
- var dU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59439
- let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: d, handleScrollArrowVisibility: f, scrollArrowsMountedCountRef: p } = JV(), { side: m, scrollDownArrowRef: h, scrollUpArrowRef: g } = HH(), _ = X(l, c ? $.scrollUpArrowVisible : $.scrollDownArrowVisible), v = X(l, $.openMethod), y = _ && v !== "touch", b = ca(), x = c ? g : h, { mounted: S, transitionStatus: C, setMounted: w } = qd(y);
59484
+ var hU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59485
+ let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: d, handleScrollArrowVisibility: f, scrollArrowsMountedCountRef: p } = QV(), { side: m, scrollDownArrowRef: h, scrollUpArrowRef: g } = KH(), _ = X(l, c ? $.scrollUpArrowVisible : $.scrollDownArrowVisible), v = X(l, $.openMethod), y = _ && v !== "touch", b = ca(), x = c ? g : h, { mounted: S, transitionStatus: C, setMounted: w } = qd(y);
59440
59486
  K(() => (p.current += 1, l.state.hasScrollArrows || l.set("hasScrollArrows", !0), () => {
59441
59487
  p.current = Math.max(0, p.current - 1), p.current === 0 && l.state.hasScrollArrows && l.set("hasScrollArrows", !1);
59442
59488
  }), [l, p]), $d({
@@ -59465,14 +59511,14 @@ var dU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59465
59511
  let e = l.state.listElement ?? u.current;
59466
59512
  if (!e) return;
59467
59513
  l.set("activeIndex", null), f();
59468
- let n = AV(e.scrollHeight, e.clientHeight), r = jV(e.scrollTop, n), i = r === (c ? 0 : n), a = d.current;
59514
+ let n = PV(e.scrollHeight, e.clientHeight), r = FV(e.scrollTop, n), i = r === (c ? 0 : n), a = d.current;
59469
59515
  if (r !== e.scrollTop && (e.scrollTop = r), a.length === 0 && l.set(c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", !i), i) {
59470
59516
  b.clear();
59471
59517
  return;
59472
59518
  }
59473
59519
  if (a.length > 0) {
59474
59520
  let t = x.current?.offsetHeight || 0;
59475
- e.scrollTop = fU(a, c, r, e.clientHeight, t, n);
59521
+ e.scrollTop = gU(a, c, r, e.clientHeight, t, n);
59476
59522
  }
59477
59523
  b.start(40, t);
59478
59524
  }
@@ -59486,8 +59532,8 @@ var dU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59486
59532
  });
59487
59533
  return S || o ? T : null;
59488
59534
  });
59489
- process.env.NODE_ENV !== "production" && (dU.displayName = "SelectScrollArrow");
59490
- function fU(e, t, n, r, i, a) {
59535
+ process.env.NODE_ENV !== "production" && (hU.displayName = "SelectScrollArrow");
59536
+ function gU(e, t, n, r, i, a) {
59491
59537
  if (t) {
59492
59538
  let t = 0, r = n + i - 1;
59493
59539
  for (let n = 0; n < e.length; n += 1) {
@@ -59498,7 +59544,7 @@ function fU(e, t, n, r, i, a) {
59498
59544
  }
59499
59545
  }
59500
59546
  let o = Math.max(0, t - 1), s = e[o];
59501
- return o < t && s ? jV(s.offsetTop - i, a) : 0;
59547
+ return o < t && s ? FV(s.offsetTop - i, a) : 0;
59502
59548
  }
59503
59549
  let o = e.length - 1, s = n + r - i + 1;
59504
59550
  for (let t = 0; t < e.length; t += 1) {
@@ -59509,40 +59555,40 @@ function fU(e, t, n, r, i, a) {
59509
59555
  }
59510
59556
  }
59511
59557
  let c = Math.min(e.length - 1, o + 1), l = e[c];
59512
- return c > o && l ? jV(l.offsetTop + l.offsetHeight - r + i, a) : a;
59558
+ return c > o && l ? FV(l.offsetTop + l.offsetHeight - r + i, a) : a;
59513
59559
  }
59514
59560
  //#endregion
59515
59561
  //#region ../../node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs
59516
- var pU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59517
- return /* @__PURE__ */ V(dU, {
59562
+ var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59563
+ return /* @__PURE__ */ V(hU, {
59518
59564
  ...e,
59519
59565
  ref: t,
59520
59566
  direction: "down"
59521
59567
  });
59522
59568
  });
59523
- process.env.NODE_ENV !== "production" && (pU.displayName = "SelectScrollDownArrow");
59569
+ process.env.NODE_ENV !== "production" && (_U.displayName = "SelectScrollDownArrow");
59524
59570
  //#endregion
59525
59571
  //#region ../../node_modules/@base-ui/react/select/scroll-up-arrow/SelectScrollUpArrow.mjs
59526
- var mU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59527
- return /* @__PURE__ */ V(dU, {
59572
+ var vU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59573
+ return /* @__PURE__ */ V(hU, {
59528
59574
  ...e,
59529
59575
  ref: t,
59530
59576
  direction: "up"
59531
59577
  });
59532
59578
  });
59533
- process.env.NODE_ENV !== "production" && (mU.displayName = "SelectScrollUpArrow");
59579
+ process.env.NODE_ENV !== "production" && (vU.displayName = "SelectScrollUpArrow");
59534
59580
  //#endregion
59535
59581
  //#region ../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs
59536
- var hU = /* @__PURE__ */ y.createContext(void 0);
59537
- process.env.NODE_ENV !== "production" && (hU.displayName = "SelectGroupContext");
59538
- function gU() {
59539
- let e = y.useContext(hU);
59582
+ var yU = /* @__PURE__ */ y.createContext(void 0);
59583
+ process.env.NODE_ENV !== "production" && (yU.displayName = "SelectGroupContext");
59584
+ function bU() {
59585
+ let e = y.useContext(yU);
59540
59586
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? fc(56) : "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
59541
59587
  return e;
59542
59588
  }
59543
59589
  //#endregion
59544
59590
  //#region ../../node_modules/@base-ui/react/select/group/SelectGroup.mjs
59545
- var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59591
+ var xU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59546
59592
  let { render: n, className: r, style: i, ...a } = e, [o, s] = y.useState(), c = y.useMemo(() => ({
59547
59593
  labelId: o,
59548
59594
  setLabelId: s
@@ -59553,16 +59599,16 @@ var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59553
59599
  "aria-labelledby": o
59554
59600
  }, a]
59555
59601
  });
59556
- return /* @__PURE__ */ V(hU.Provider, {
59602
+ return /* @__PURE__ */ V(yU.Provider, {
59557
59603
  value: c,
59558
59604
  children: l
59559
59605
  });
59560
59606
  });
59561
- process.env.NODE_ENV !== "production" && (_U.displayName = "SelectGroup");
59607
+ process.env.NODE_ENV !== "production" && (xU.displayName = "SelectGroup");
59562
59608
  //#endregion
59563
59609
  //#region ../../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs
59564
- var vU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59565
- let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = gU(), c = kp(a);
59610
+ var SU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59611
+ let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = bU(), c = kp(a);
59566
59612
  return K(() => {
59567
59613
  s(c);
59568
59614
  }, [c, s]), Lc("div", e, {
@@ -59570,12 +59616,12 @@ var vU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59570
59616
  props: [{ id: c }, o]
59571
59617
  });
59572
59618
  });
59573
- process.env.NODE_ENV !== "production" && (vU.displayName = "SelectGroupLabel");
59619
+ process.env.NODE_ENV !== "production" && (SU.displayName = "SelectGroupLabel");
59574
59620
  //#endregion
59575
59621
  //#region src/components/ui/select.tsx
59576
- function yU({ children: e, items: t, onValueChange: n, ...r }) {
59577
- return /* @__PURE__ */ V(CH, {
59578
- items: t ?? DU(e),
59622
+ function CU({ children: e, items: t, onValueChange: n, ...r }) {
59623
+ return /* @__PURE__ */ V(DH, {
59624
+ items: t ?? jU(e),
59579
59625
  onValueChange: (e) => {
59580
59626
  e !== null && n?.(e);
59581
59627
  },
@@ -59583,86 +59629,86 @@ function yU({ children: e, items: t, onValueChange: n, ...r }) {
59583
59629
  children: e
59584
59630
  });
59585
59631
  }
59586
- var bU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(FH, {
59632
+ var wU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(zH, {
59587
59633
  ref: n,
59588
59634
  className: U("flex flex-1 text-left", e),
59589
59635
  ...t
59590
59636
  }));
59591
- bU.displayName = "SelectValue";
59592
- var xU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(NH, {
59637
+ wU.displayName = "SelectValue";
59638
+ var TU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(LH, {
59593
59639
  ref: i,
59594
59640
  render: lm(n, t),
59595
59641
  className: U("flex cursor-pointer h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&>span]:line-clamp-1", e),
59596
59642
  ...r,
59597
- children: [t, /* @__PURE__ */ V(IH, { render: /* @__PURE__ */ V(dh, { className: "h-4 w-4 text-muted-foreground" }) })]
59643
+ children: [t, /* @__PURE__ */ V(BH, { render: /* @__PURE__ */ V(dh, { className: "h-4 w-4 text-muted-foreground" }) })]
59598
59644
  }));
59599
- xU.displayName = "SelectTrigger";
59600
- var SU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(mU, {
59645
+ TU.displayName = "SelectTrigger";
59646
+ var EU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(vU, {
59601
59647
  ref: n,
59602
59648
  className: U("flex cursor-pointer items-center justify-center py-1", e),
59603
59649
  ...t,
59604
59650
  children: /* @__PURE__ */ V(ph, { className: "h-4 w-4" })
59605
59651
  }));
59606
- SU.displayName = "SelectScrollUpButton";
59607
- var CU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(pU, {
59652
+ EU.displayName = "SelectScrollUpButton";
59653
+ var DU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(_U, {
59608
59654
  ref: n,
59609
59655
  className: U("flex cursor-pointer items-center justify-center py-1", e),
59610
59656
  ...t,
59611
59657
  children: /* @__PURE__ */ V(dh, { className: "h-4 w-4" })
59612
59658
  }));
59613
- CU.displayName = "SelectScrollDownButton";
59614
- var wU = y.forwardRef(({ className: e, children: t, position: n = "popper", side: r = "bottom", sideOffset: i = 4, align: a = "center", alignOffset: o = 0, alignItemWithTrigger: s = n === "popper", ...c }, l) => {
59659
+ DU.displayName = "SelectScrollDownButton";
59660
+ var OU = y.forwardRef(({ className: e, children: t, position: n = "popper", side: r = "bottom", sideOffset: i = 4, align: a = "center", alignOffset: o = 0, alignItemWithTrigger: s = n === "popper", ...c }, l) => {
59615
59661
  let { resolvedTheme: u, theme: d } = Vm();
59616
- return /* @__PURE__ */ V(RH, { children: /* @__PURE__ */ V(KH, {
59662
+ return /* @__PURE__ */ V(HH, { children: /* @__PURE__ */ V(XH, {
59617
59663
  align: a,
59618
59664
  alignOffset: o,
59619
59665
  alignItemWithTrigger: s,
59620
59666
  className: "z-50",
59621
59667
  side: r,
59622
59668
  sideOffset: i,
59623
- children: /* @__PURE__ */ H(JH, {
59669
+ children: /* @__PURE__ */ H(QH, {
59624
59670
  ref: l,
59625
59671
  className: U("agents-sdk relative z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--transform-origin)]", n === "popper" && "w-full min-w-[var(--anchor-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
59626
59672
  "data-agents-sdk-resolved-theme": u,
59627
59673
  "data-agents-sdk-theme": d,
59628
59674
  ...c,
59629
59675
  children: [
59630
- /* @__PURE__ */ V(SU, {}),
59631
- /* @__PURE__ */ V(nU, {
59676
+ /* @__PURE__ */ V(EU, {}),
59677
+ /* @__PURE__ */ V(oU, {
59632
59678
  className: "p-1",
59633
59679
  children: t
59634
59680
  }),
59635
- /* @__PURE__ */ V(CU, {})
59681
+ /* @__PURE__ */ V(DU, {})
59636
59682
  ]
59637
59683
  })
59638
59684
  }) });
59639
59685
  });
59640
- wU.displayName = "SelectContent";
59641
- var TU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(vU, {
59686
+ OU.displayName = "SelectContent";
59687
+ var kU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(SU, {
59642
59688
  ref: n,
59643
59689
  className: U("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
59644
59690
  ...t
59645
59691
  }));
59646
- TU.displayName = "SelectLabel";
59647
- var EU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(aU, {
59692
+ kU.displayName = "SelectLabel";
59693
+ var AU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(lU, {
59648
59694
  ref: i,
59649
59695
  render: lm(n, t),
59650
59696
  className: U("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
59651
59697
  ...r,
59652
59698
  children: [/* @__PURE__ */ V("span", {
59653
59699
  className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
59654
- children: /* @__PURE__ */ V(oU, { children: /* @__PURE__ */ V(uh, { className: "h-4 w-4" }) })
59655
- }), /* @__PURE__ */ V(cU, { children: t })]
59700
+ children: /* @__PURE__ */ V(uU, { children: /* @__PURE__ */ V(uh, { className: "h-4 w-4" }) })
59701
+ }), /* @__PURE__ */ V(fU, { children: t })]
59656
59702
  }));
59657
- EU.displayName = "SelectItem";
59658
- function DU(e) {
59703
+ AU.displayName = "SelectItem";
59704
+ function jU(e) {
59659
59705
  let t = [];
59660
- return OU(e, t), t.length > 0 ? t : void 0;
59706
+ return MU(e, t), t.length > 0 ? t : void 0;
59661
59707
  }
59662
- function OU(e, t) {
59708
+ function MU(e, t) {
59663
59709
  y.Children.forEach(e, (e) => {
59664
59710
  if (y.isValidElement(e)) {
59665
- if (e.type === EU) {
59711
+ if (e.type === AU) {
59666
59712
  let n = e.props.value;
59667
59713
  typeof n == "string" && t.push({
59668
59714
  value: n,
@@ -59670,34 +59716,34 @@ function OU(e, t) {
59670
59716
  });
59671
59717
  return;
59672
59718
  }
59673
- OU(e.props.children, t);
59719
+ MU(e.props.children, t);
59674
59720
  }
59675
59721
  });
59676
59722
  }
59677
- var kU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Oh, {
59723
+ var NU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Oh, {
59678
59724
  ref: n,
59679
59725
  className: U("-mx-1 my-1 h-px bg-muted", e),
59680
59726
  ...t
59681
59727
  }));
59682
- kU.displayName = "SelectSeparator";
59728
+ NU.displayName = "SelectSeparator";
59683
59729
  //#endregion
59684
59730
  //#region src/components/elements/prompt-input.tsx
59685
- var AU = 9;
59686
- function jU(e) {
59731
+ var PU = 9;
59732
+ function FU(e) {
59687
59733
  let t = e?.firstElementChild;
59688
59734
  return t instanceof HTMLElement ? t : null;
59689
59735
  }
59690
- function MU(e) {
59736
+ function IU(e) {
59691
59737
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight), r = Number.parseFloat(t.paddingTop), i = Number.parseFloat(t.paddingBottom), a = Number.isFinite(n) ? n : 24, o = Number.isFinite(r) ? r : 0, s = Number.isFinite(i) ? i : 0;
59692
59738
  return {
59693
59739
  minHeight: a + o + s,
59694
- maxHeight: a * AU + o + s
59740
+ maxHeight: a * PU + o + s
59695
59741
  };
59696
59742
  }
59697
- function NU(e, t, n) {
59743
+ function LU(e, t, n) {
59698
59744
  if (!e) return;
59699
59745
  e.style.height = "auto";
59700
- let { minHeight: r, maxHeight: i } = MU(e), a = Math.max(e.scrollHeight, r), o = Math.min(a, i), s = jU(t);
59746
+ let { minHeight: r, maxHeight: i } = IU(e), a = Math.max(e.scrollHeight, r), o = Math.min(a, i), s = FU(t);
59701
59747
  if (e.style.height = `${a}px`, e.style.overflowY = "hidden", n((e) => e === o ? e : o), s) {
59702
59748
  if (a <= i) {
59703
59749
  s.scrollTop = 0;
@@ -59708,30 +59754,30 @@ function NU(e, t, n) {
59708
59754
  });
59709
59755
  }
59710
59756
  }
59711
- function PU(e, t) {
59757
+ function RU(e, t) {
59712
59758
  if (typeof e == "function") {
59713
59759
  e(t);
59714
59760
  return;
59715
59761
  }
59716
59762
  e && (e.current = t);
59717
59763
  }
59718
- var FU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59764
+ var zU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59719
59765
  className: U("w-full overflow-hidden rounded-xl border bg-background shadow-xs", e),
59720
59766
  ...t
59721
- }), IU = ({ onChange: e, className: t, placeholder: n = "What would you like to know?", ref: r, disableAutoResize: i = !1, resizeOnNewLinesOnly: a = !1, ...o }) => {
59767
+ }), BU = ({ onChange: e, className: t, placeholder: n = "What would you like to know?", ref: r, disableAutoResize: i = !1, resizeOnNewLinesOnly: a = !1, ...o }) => {
59722
59768
  let s = R(null), c = R(null), [l, u] = z(), d = !i && !a;
59723
59769
  j(() => {
59724
- d && NU(s.current, c.current, u);
59770
+ d && LU(s.current, c.current, u);
59725
59771
  }, [
59726
59772
  o.value,
59727
59773
  o.defaultValue,
59728
59774
  d
59729
59775
  ]);
59730
- let f = /* @__PURE__ */ V(Zz, {
59776
+ let f = /* @__PURE__ */ V(eB, {
59731
59777
  className: U("w-full resize-none rounded-none border-none p-3 shadow-none outline-hidden ring-0", i || a ? "field-sizing-fixed" : "field-sizing-fixed min-h-[calc(1lh+1.5rem)] overflow-y-hidden", "bg-transparent dark:bg-transparent", "focus-visible:ring-0", t),
59732
59778
  name: "message",
59733
59779
  onChange: (t) => {
59734
- d && NU(t.currentTarget, c.current, u), e?.(t);
59780
+ d && LU(t.currentTarget, c.current, u), e?.(t);
59735
59781
  },
59736
59782
  onKeyDown: (e) => {
59737
59783
  if (e.key === "Enter") {
@@ -59743,23 +59789,23 @@ var FU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59743
59789
  },
59744
59790
  placeholder: n,
59745
59791
  ref: (e) => {
59746
- s.current = e, PU(r, e);
59792
+ s.current = e, RU(r, e);
59747
59793
  },
59748
59794
  ...o
59749
59795
  });
59750
- return d ? /* @__PURE__ */ V(WV, {
59796
+ return d ? /* @__PURE__ */ V(JV, {
59751
59797
  className: "w-full",
59752
59798
  ref: c,
59753
59799
  style: { height: l },
59754
59800
  children: f
59755
59801
  }) : f;
59756
- }, LU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59802
+ }, VU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59757
59803
  className: U("flex items-center justify-between p-1", e),
59758
59804
  ...t
59759
- }), RU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59805
+ }), HU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59760
59806
  className: U("flex items-center gap-1", "[&_button:first-child]:rounded-bl-xl", e),
59761
59807
  ...t
59762
- }), zU = ({ className: e, variant: t = "default", size: n = "icon", status: r, children: i, ...a }) => {
59808
+ }), UU = ({ className: e, variant: t = "default", size: n = "icon", status: r, children: i, ...a }) => {
59763
59809
  let o = /* @__PURE__ */ V(Ch, { className: "size-4" });
59764
59810
  return r === "submitted" ? o = /* @__PURE__ */ V(yh, { className: "size-4 animate-spin" }) : r === "streaming" ? o = /* @__PURE__ */ V(wh, { className: "size-4" }) : r === "error" && (o = /* @__PURE__ */ V(Eh, { className: "size-4" })), /* @__PURE__ */ V(Fm, {
59765
59811
  className: U("gap-1.5 rounded-lg", e),
@@ -59769,7 +59815,7 @@ var FU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59769
59815
  ...a,
59770
59816
  children: i ?? o
59771
59817
  });
59772
- }, BU = ({ suggestion: e, onClick: t, className: n, variant: r = "outline", size: i = "sm", children: a, ...o }) => /* @__PURE__ */ V(Fm, {
59818
+ }, WU = ({ suggestion: e, onClick: t, className: n, variant: r = "outline", size: i = "sm", children: a, ...o }) => /* @__PURE__ */ V(Fm, {
59773
59819
  className: U("cursor-pointer rounded-full px-4", n),
59774
59820
  onClick: () => {
59775
59821
  t?.(e);
@@ -59782,7 +59828,7 @@ var FU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59782
59828
  });
59783
59829
  //#endregion
59784
59830
  //#region src/components/suggested-actions.tsx
59785
- function VU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59831
+ function GU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59786
59832
  let { getChatPath: r } = Ze(), i = n.map((e) => e.trim()).filter(Boolean);
59787
59833
  return i.length === 0 ? null : /* @__PURE__ */ V("div", {
59788
59834
  className: "grid w-full gap-2 sm:grid-cols-2",
@@ -59801,7 +59847,7 @@ function VU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59801
59847
  y: 20
59802
59848
  },
59803
59849
  transition: { delay: .05 * i },
59804
- children: /* @__PURE__ */ V(BU, {
59850
+ children: /* @__PURE__ */ V(WU, {
59805
59851
  className: "h-auto w-full whitespace-normal p-3 text-left",
59806
59852
  onClick: (n) => {
59807
59853
  window.history.pushState({}, "", r(e)), t({
@@ -59818,28 +59864,28 @@ function VU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59818
59864
  }, `${i}-${n}`))
59819
59865
  });
59820
59866
  }
59821
- var HU = O(VU, (e, t) => !(e.chatId !== t.chatId || !ve(e.suggestedActions, t.suggestedActions)));
59867
+ var KU = O(GU, (e, t) => !(e.chatId !== t.chatId || !ve(e.suggestedActions, t.suggestedActions)));
59822
59868
  //#endregion
59823
59869
  //#region src/components/multimodal-input.tsx
59824
- function UU(e, t) {
59870
+ function qU(e, t) {
59825
59871
  document.cookie = `${e}=${encodeURIComponent(t)}; path=/; max-age=31536000`;
59826
59872
  }
59827
- var WU = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_") || "default", GU = 40, KU = 9;
59828
- function qU(e) {
59873
+ var JU = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_") || "default", YU = 40, XU = 9;
59874
+ function ZU(e) {
59829
59875
  let t = e?.firstElementChild;
59830
59876
  return t instanceof HTMLElement ? t : null;
59831
59877
  }
59832
- function JU(e) {
59878
+ function QU(e) {
59833
59879
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight), r = Number.parseFloat(t.paddingTop), i = Number.parseFloat(t.paddingBottom), a = Number.isFinite(n) ? n : 24, o = Number.isFinite(r) ? r : 0, s = Number.isFinite(i) ? i : 0;
59834
59880
  return {
59835
- minHeight: Math.max(a + o + s, GU),
59836
- maxHeight: a * KU + o + s
59881
+ minHeight: Math.max(a + o + s, YU),
59882
+ maxHeight: a * XU + o + s
59837
59883
  };
59838
59884
  }
59839
- function YU(e, t) {
59885
+ function $U(e, t) {
59840
59886
  if (!e) return;
59841
59887
  e.style.height = "auto";
59842
- let { minHeight: n, maxHeight: r } = JU(e), i = e.scrollHeight, a = Math.max(i, n), o = Math.min(a, r), s = qU(t.scrollArea);
59888
+ let { minHeight: n, maxHeight: r } = QU(e), i = e.scrollHeight, a = Math.max(i, n), o = Math.min(a, r), s = ZU(t.scrollArea);
59843
59889
  if (e.style.height = `${a}px`, e.style.overflowY = "hidden", t.setScrollAreaHeight((e) => e === o ? e : o), s) {
59844
59890
  if (a <= r) {
59845
59891
  s.scrollTop = 0;
@@ -59850,17 +59896,17 @@ function YU(e, t) {
59850
59896
  });
59851
59897
  }
59852
59898
  }
59853
- function XU(e, t) {
59899
+ function eW(e, t) {
59854
59900
  if (!e) return;
59855
- let { minHeight: n } = JU(e);
59901
+ let { minHeight: n } = QU(e);
59856
59902
  e.style.height = `${n}px`, e.style.overflowY = "hidden", t.setScrollAreaHeight(n);
59857
- let r = qU(t.scrollArea);
59903
+ let r = ZU(t.scrollArea);
59858
59904
  r && (r.scrollTop = 0);
59859
59905
  }
59860
- function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments: a, setAttachments: o, messages: s, setMessages: c, sendMessage: l, className: u, chatModels: d, defaultChatModel: f, selectedModelId: p, onModelChange: m, openaiReasoningEffort: h = v, onOpenAIReasoningEffortChange: g, suggestedActions: _ }) {
59861
- let y = R(null), b = R(null), [x, S] = z(GU), { width: C } = $P(), { getChatPath: w } = Ze(), T = r === "ready" || r === "error";
59906
+ function tW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments: a, setAttachments: o, messages: s, setMessages: c, sendMessage: l, className: u, chatModels: d, defaultChatModel: f, selectedModelId: p, onModelChange: m, openaiReasoningEffort: h = v, onOpenAIReasoningEffortChange: g, suggestedActions: _ }) {
59907
+ let y = R(null), b = R(null), [x, S] = z(YU), { width: C } = $P(), { getChatPath: w } = Ze(), T = r === "ready" || r === "error";
59862
59908
  j(() => {
59863
- YU(y.current, {
59909
+ $U(y.current, {
59864
59910
  scrollArea: b.current,
59865
59911
  setScrollAreaHeight: S
59866
59912
  });
@@ -59881,7 +59927,7 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
59881
59927
  O(t);
59882
59928
  }, [t, O]);
59883
59929
  let A = (e) => {
59884
- n(e.target.value), YU(e.currentTarget, {
59930
+ n(e.target.value), $U(e.currentTarget, {
59885
59931
  scrollArea: b.current,
59886
59932
  setScrollAreaHeight: S
59887
59933
  });
@@ -59898,7 +59944,7 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
59898
59944
  type: "text",
59899
59945
  text: t
59900
59946
  }]
59901
- }), o([]), O(""), n(""), XU(y.current, {
59947
+ }), o([]), O(""), n(""), eW(y.current, {
59902
59948
  scrollArea: b.current,
59903
59949
  setScrollAreaHeight: S
59904
59950
  }), C && C > 768 && y.current?.focus();
@@ -60006,7 +60052,7 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60006
60052
  }, [ee]), /* @__PURE__ */ H("div", {
60007
60053
  className: U("relative flex w-full flex-col gap-4", u),
60008
60054
  children: [
60009
- s.length === 0 && a.length === 0 && N.length === 0 && _ && _.length > 0 && /* @__PURE__ */ V(HU, {
60055
+ s.length === 0 && a.length === 0 && N.length === 0 && _ && _.length > 0 && /* @__PURE__ */ V(KU, {
60010
60056
  chatId: e,
60011
60057
  sendMessage: l,
60012
60058
  suggestedActions: _
@@ -60019,7 +60065,7 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60019
60065
  tabIndex: -1,
60020
60066
  type: "file"
60021
60067
  }),
60022
- /* @__PURE__ */ H(FU, {
60068
+ /* @__PURE__ */ H(zU, {
60023
60069
  className: "rounded-xl border border-border bg-background p-3 shadow-xs transition-all duration-200 focus-within:border-border hover:border-muted-foreground/50",
60024
60070
  onSubmit: (e) => {
60025
60071
  if (e.preventDefault(), !(!t.trim() && a.length === 0)) {
@@ -60034,12 +60080,12 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60034
60080
  (a.length > 0 || N.length > 0) && /* @__PURE__ */ H("div", {
60035
60081
  className: "flex flex-row items-end gap-2 overflow-x-scroll",
60036
60082
  "data-testid": "attachments-preview",
60037
- children: [a.map((e) => /* @__PURE__ */ V(cB, {
60083
+ children: [a.map((e) => /* @__PURE__ */ V(dB, {
60038
60084
  attachment: e,
60039
60085
  onRemove: () => {
60040
60086
  o((t) => t.filter((t) => t.url !== e.url)), M.current && (M.current.value = "");
60041
60087
  }
60042
- }, e.url)), N.map((e) => /* @__PURE__ */ V(cB, {
60088
+ }, e.url)), N.map((e) => /* @__PURE__ */ V(dB, {
60043
60089
  attachment: {
60044
60090
  url: "",
60045
60091
  name: e,
@@ -60050,11 +60096,11 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60050
60096
  }),
60051
60097
  /* @__PURE__ */ V("div", {
60052
60098
  className: "flex flex-row items-start gap-1 sm:gap-2",
60053
- children: /* @__PURE__ */ V(WV, {
60099
+ children: /* @__PURE__ */ V(JV, {
60054
60100
  className: "grow rounded-md",
60055
60101
  ref: b,
60056
60102
  style: { height: x },
60057
- children: /* @__PURE__ */ V(IU, {
60103
+ children: /* @__PURE__ */ V(BU, {
60058
60104
  className: "min-h-10 w-full resize-none overflow-y-hidden border-0! border-none! bg-transparent p-2 text-base outline-none ring-0 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
60059
60105
  "data-testid": "multimodal-input",
60060
60106
  disableAutoResize: !0,
@@ -60066,17 +60112,17 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60066
60112
  })
60067
60113
  })
60068
60114
  }),
60069
- /* @__PURE__ */ H(LU, {
60115
+ /* @__PURE__ */ H(VU, {
60070
60116
  className: "border-top-0! border-t-0! p-0 shadow-none dark:border-0 dark:border-transparent!",
60071
- children: [/* @__PURE__ */ H(RU, {
60117
+ children: [/* @__PURE__ */ H(HU, {
60072
60118
  className: "gap-0 sm:gap-0.5",
60073
60119
  children: [
60074
- /* @__PURE__ */ V(eW, {
60120
+ /* @__PURE__ */ V(iW, {
60075
60121
  fileInputRef: M,
60076
60122
  selectedModelId: p,
60077
60123
  status: r
60078
60124
  }),
60079
- /* @__PURE__ */ V(nW, {
60125
+ /* @__PURE__ */ V(oW, {
60080
60126
  focusTargetRef: y,
60081
60127
  chatModels: d,
60082
60128
  defaultChatModel: f,
@@ -60084,7 +60130,7 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60084
60130
  onModelChange: m,
60085
60131
  selectedModelId: p
60086
60132
  }),
60087
- /* @__PURE__ */ V(aW, {
60133
+ /* @__PURE__ */ V(lW, {
60088
60134
  disabled: r !== "ready",
60089
60135
  idScope: e,
60090
60136
  onChange: g,
@@ -60092,10 +60138,10 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60092
60138
  value: h
60093
60139
  })
60094
60140
  ]
60095
- }), r === "submitted" || r === "streaming" ? /* @__PURE__ */ V(sW, {
60141
+ }), r === "submitted" || r === "streaming" ? /* @__PURE__ */ V(dW, {
60096
60142
  setMessages: c,
60097
60143
  stop: i
60098
- }) : /* @__PURE__ */ V(zU, {
60144
+ }) : /* @__PURE__ */ V(UU, {
60099
60145
  className: "size-8 rounded-full bg-primary text-primary-foreground transition-colors duration-200 hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground",
60100
60146
  "data-testid": "send-button",
60101
60147
  disabled: !t.trim() || N.length > 0,
@@ -60108,8 +60154,8 @@ function ZU({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60108
60154
  ]
60109
60155
  });
60110
60156
  }
60111
- var QU = O(ZU, (e, t) => !(e.input !== t.input || e.status !== t.status || !ve(e.attachments, t.attachments) || e.selectedModelId !== t.selectedModelId || e.openaiReasoningEffort !== t.openaiReasoningEffort || !ve(e.suggestedActions, t.suggestedActions) || !ve(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel));
60112
- function $U({ fileInputRef: e, status: t, selectedModelId: n }) {
60157
+ var nW = O(tW, (e, t) => !(e.input !== t.input || e.status !== t.status || !ve(e.attachments, t.attachments) || e.selectedModelId !== t.selectedModelId || e.openaiReasoningEffort !== t.openaiReasoningEffort || !ve(e.suggestedActions, t.suggestedActions) || !ve(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel));
60158
+ function rW({ fileInputRef: e, status: t, selectedModelId: n }) {
60113
60159
  let r = n.includes("reasoning") || n.includes("think");
60114
60160
  return /* @__PURE__ */ V(Fm, {
60115
60161
  className: "aspect-square h-8 rounded-lg p-1 transition-colors hover:bg-accent",
@@ -60128,44 +60174,44 @@ function $U({ fileInputRef: e, status: t, selectedModelId: n }) {
60128
60174
  })
60129
60175
  });
60130
60176
  }
60131
- var eW = O($U);
60132
- function tW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r, selectedModelId: i, onModelChange: a }) {
60133
- let [o, s] = z(!1), c = R(!1), l = WU(r), d = t && t.length > 0 ? t : f, p = u(d), m = d.find((e) => e.id === i) ?? d.find((e) => e.id === n) ?? d[0] ?? f[0], [h] = m.id.split("/"), g = {
60177
+ var iW = O(rW);
60178
+ function aW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r, selectedModelId: i, onModelChange: a }) {
60179
+ let [o, s] = z(!1), c = R(!1), l = JU(r), d = t && t.length > 0 ? t : f, p = u(d), m = d.find((e) => e.id === i) ?? d.find((e) => e.id === n) ?? d[0] ?? f[0], [h] = m.id.split("/"), g = {
60134
60180
  anthropic: "Anthropic",
60135
60181
  openai: "OpenAI",
60136
60182
  google: "Google",
60137
60183
  xai: "xAI",
60138
60184
  reasoning: "Reasoning"
60139
60185
  };
60140
- return /* @__PURE__ */ H($B, {
60186
+ return /* @__PURE__ */ H(rV, {
60141
60187
  onOpenChange: s,
60142
60188
  open: o,
60143
- children: [/* @__PURE__ */ V(eV, {
60189
+ children: [/* @__PURE__ */ V(iV, {
60144
60190
  asChild: !0,
60145
60191
  children: /* @__PURE__ */ H(Fm, {
60146
60192
  className: "agents-chat-model-selector-trigger h-8 w-auto max-w-[18rem] justify-start gap-2 px-2",
60147
60193
  id: `agents-sdk-model-selector-${l}`,
60148
60194
  variant: "ghost",
60149
- children: [h && /* @__PURE__ */ V(oV, { provider: h }), /* @__PURE__ */ V(sV, {
60195
+ children: [h && /* @__PURE__ */ V(uV, { provider: h }), /* @__PURE__ */ V(dV, {
60150
60196
  className: "min-w-0 max-w-[14rem] flex-initial",
60151
60197
  children: m.name
60152
60198
  })]
60153
60199
  })
60154
- }), /* @__PURE__ */ H(tV, {
60200
+ }), /* @__PURE__ */ H(aV, {
60155
60201
  commandDefaultValue: m.id,
60156
60202
  finalFocus: () => c.current ? (c.current = !1, e.current) : !0,
60157
- children: [/* @__PURE__ */ V(nV, { placeholder: "Search models..." }), /* @__PURE__ */ V(rV, { children: Object.entries(p).map(([e, t]) => /* @__PURE__ */ V(iV, {
60203
+ children: [/* @__PURE__ */ V(oV, { placeholder: "Search models..." }), /* @__PURE__ */ V(sV, { children: Object.entries(p).map(([e, t]) => /* @__PURE__ */ V(cV, {
60158
60204
  heading: g[e] ?? e,
60159
60205
  children: t.map((e) => {
60160
60206
  let t = e.id.split("/")[0];
60161
- return /* @__PURE__ */ H(aV, {
60207
+ return /* @__PURE__ */ H(lV, {
60162
60208
  onSelect: () => {
60163
- c.current = !0, a?.(e.id), UU("chat-model", e.id), s(!1);
60209
+ c.current = !0, a?.(e.id), qU("chat-model", e.id), s(!1);
60164
60210
  },
60165
60211
  value: e.id,
60166
60212
  children: [
60167
- /* @__PURE__ */ V(oV, { provider: t }),
60168
- /* @__PURE__ */ V(sV, { children: e.name }),
60213
+ /* @__PURE__ */ V(uV, { provider: t }),
60214
+ /* @__PURE__ */ V(dV, { children: e.name }),
60169
60215
  e.id === m.id && /* @__PURE__ */ V(uh, { className: "ml-auto size-4" })
60170
60216
  ]
60171
60217
  }, e.id);
@@ -60174,40 +60220,40 @@ function tW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r,
60174
60220
  })]
60175
60221
  });
60176
60222
  }
60177
- var nW = O(tW), rW = (e, t) => t.includes(e), iW = (e) => e.charAt(0).toUpperCase() + e.slice(1);
60178
- function aW({ idScope: e, selectedModelId: t, value: n, onChange: r, disabled: i }) {
60179
- let a = m(t), o = h(t), s = _(t), c = s && rW(s, o) ? s : o[0], l = rW(n, o) ? n : c ?? "default";
60223
+ var oW = O(aW), sW = (e, t) => t.includes(e), cW = (e) => e.charAt(0).toUpperCase() + e.slice(1);
60224
+ function lW({ idScope: e, selectedModelId: t, value: n, onChange: r, disabled: i }) {
60225
+ let a = m(t), o = h(t), s = _(t), c = s && sW(s, o) ? s : o[0], l = sW(n, o) ? n : c ?? "default";
60180
60226
  return j(() => {
60181
- !a || !r || rW(n, o) || r(c ?? "default");
60227
+ !a || !r || sW(n, o) || r(c ?? "default");
60182
60228
  }, [
60183
60229
  o,
60184
60230
  c,
60185
60231
  r,
60186
60232
  a,
60187
60233
  n
60188
- ]), !a || !r || l === "default" ? null : /* @__PURE__ */ H(yU, {
60234
+ ]), !a || !r || l === "default" ? null : /* @__PURE__ */ H(CU, {
60189
60235
  disabled: i,
60190
60236
  onValueChange: (e) => {
60191
- UU(g, e), r(e);
60237
+ qU(g, e), r(e);
60192
60238
  },
60193
60239
  value: l,
60194
- children: [/* @__PURE__ */ V(xU, {
60240
+ children: [/* @__PURE__ */ V(TU, {
60195
60241
  className: "h-8 w-[112px] gap-1 border-0 bg-transparent px-2 text-sm hover:bg-accent focus:ring-0 focus:ring-offset-0",
60196
- id: `agents-sdk-reasoning-effort-${WU(e)}`,
60242
+ id: `agents-sdk-reasoning-effort-${JU(e)}`,
60197
60243
  children: /* @__PURE__ */ H("div", {
60198
60244
  className: "flex min-w-0 items-center gap-1.5",
60199
60245
  children: [/* @__PURE__ */ V(lh, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ V("span", {
60200
60246
  className: "min-w-0 truncate",
60201
- children: /* @__PURE__ */ V(bU, {})
60247
+ children: /* @__PURE__ */ V(wU, {})
60202
60248
  })]
60203
60249
  })
60204
- }), /* @__PURE__ */ V(wU, { children: o.map((e) => /* @__PURE__ */ V(EU, {
60250
+ }), /* @__PURE__ */ V(OU, { children: o.map((e) => /* @__PURE__ */ V(AU, {
60205
60251
  value: e,
60206
- children: /* @__PURE__ */ V("span", { children: iW(e) })
60252
+ children: /* @__PURE__ */ V("span", { children: cW(e) })
60207
60253
  }, e)) })]
60208
60254
  });
60209
60255
  }
60210
- function oW({ stop: e, setMessages: t }) {
60256
+ function uW({ stop: e, setMessages: t }) {
60211
60257
  return /* @__PURE__ */ V(Fm, {
60212
60258
  className: "size-8 rounded-full bg-primary p-1 text-primary-foreground transition-colors duration-200 hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground",
60213
60259
  "data-testid": "stop-button",
@@ -60217,7 +60263,7 @@ function oW({ stop: e, setMessages: t }) {
60217
60263
  children: /* @__PURE__ */ V(G, { size: 14 })
60218
60264
  });
60219
60265
  }
60220
- var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedTool: r, isToolbarVisible: i, setIsToolbarVisible: a, isAnimating: o, sendMessage: s, onClick: c }) => {
60266
+ var dW = O(uW), fW = ({ description: e, icon: t, selectedTool: n, setSelectedTool: r, isToolbarVisible: i, setIsToolbarVisible: a, isAnimating: o, sendMessage: s, onClick: c }) => {
60221
60267
  let [l, u] = z(!1);
60222
60268
  j(() => {
60223
60269
  n !== e && u(!1);
@@ -60275,14 +60321,14 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60275
60321
  children: e
60276
60322
  })]
60277
60323
  });
60278
- }, lW = [...[
60324
+ }, pW = [...[
60279
60325
  ,
60280
60326
  ,
60281
60327
  ,
60282
60328
  ,
60283
60329
  ,
60284
60330
  ,
60285
- ]].map((e) => Je(5)), uW = ({ setSelectedTool: e, sendMessage: t, isAnimating: n }) => {
60331
+ ]].map((e) => Je(5)), mW = ({ setSelectedTool: e, sendMessage: t, isAnimating: n }) => {
60286
60332
  let r = [
60287
60333
  "Elementary",
60288
60334
  "Middle School",
@@ -60298,7 +60344,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60298
60344
  return () => e();
60299
60345
  }, [a]), /* @__PURE__ */ H("div", {
60300
60346
  className: "relative flex flex-col items-center justify-end",
60301
- children: [lW.map((e) => /* @__PURE__ */ V(cP.div, {
60347
+ children: [pW.map((e) => /* @__PURE__ */ V(cP.div, {
60302
60348
  animate: { opacity: 1 },
60303
60349
  className: "flex size-[40px] flex-row items-center justify-center",
60304
60350
  exit: { opacity: 0 },
@@ -60350,7 +60396,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60350
60396
  })]
60351
60397
  }) })]
60352
60398
  });
60353
- }, dW = ({ isToolbarVisible: e, selectedTool: t, setSelectedTool: n, sendMessage: r, isAnimating: i, setIsToolbarVisible: a, tools: o }) => {
60399
+ }, hW = ({ isToolbarVisible: e, selectedTool: t, setSelectedTool: n, sendMessage: r, isAnimating: i, setIsToolbarVisible: a, tools: o }) => {
60354
60400
  let [s, ...c] = o;
60355
60401
  return /* @__PURE__ */ H(cP.div, {
60356
60402
  animate: {
@@ -60366,7 +60412,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60366
60412
  opacity: 0,
60367
60413
  scale: .95
60368
60414
  },
60369
- children: [/* @__PURE__ */ V(hM, { children: e && c.map((e) => /* @__PURE__ */ V(cW, {
60415
+ children: [/* @__PURE__ */ V(hM, { children: e && c.map((e) => /* @__PURE__ */ V(fW, {
60370
60416
  description: e.description,
60371
60417
  icon: e.icon,
60372
60418
  isAnimating: i,
@@ -60374,7 +60420,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60374
60420
  selectedTool: t,
60375
60421
  sendMessage: r,
60376
60422
  setSelectedTool: n
60377
- }, e.description)) }), /* @__PURE__ */ V(cW, {
60423
+ }, e.description)) }), /* @__PURE__ */ V(fW, {
60378
60424
  description: s.description,
60379
60425
  icon: s.icon,
60380
60426
  isAnimating: i,
@@ -60386,7 +60432,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60386
60432
  setSelectedTool: n
60387
60433
  })]
60388
60434
  });
60389
- }, fW = O(({ isToolbarVisible: e, setIsToolbarVisible: t, sendMessage: n, status: r, stop: i, setMessages: a, artifactKind: o }) => {
60435
+ }, gW = O(({ isToolbarVisible: e, setIsToolbarVisible: t, sendMessage: n, status: r, stop: i, setMessages: a, artifactKind: o }) => {
60390
60436
  let s = R(null), c = R(null), [l, u] = z(null), [d, f] = z(!1);
60391
60437
  ZP(s, () => {
60392
60438
  t(!1), u(null);
@@ -60403,7 +60449,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60403
60449
  }, []), j(() => {
60404
60450
  r === "streaming" && t(!1);
60405
60451
  }, [r, t]);
60406
- let h = mW.find((e) => e.kind === o);
60452
+ let h = vW.find((e) => e.kind === o);
60407
60453
  if (!h) throw Error("Artifact definition not found!");
60408
60454
  let g = h.toolbar;
60409
60455
  return g.length === 0 ? null : /* @__PURE__ */ V(Wg, {
@@ -60465,11 +60511,11 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60465
60511
  i(), a((e) => e);
60466
60512
  },
60467
60513
  children: /* @__PURE__ */ V(G, {})
60468
- }, "stop-icon") : l === "adjust-reading-level" ? /* @__PURE__ */ V(uW, {
60514
+ }, "stop-icon") : l === "adjust-reading-level" ? /* @__PURE__ */ V(mW, {
60469
60515
  isAnimating: d,
60470
60516
  sendMessage: n,
60471
60517
  setSelectedTool: u
60472
- }, "reading-level-selector") : /* @__PURE__ */ V(dW, {
60518
+ }, "reading-level-selector") : /* @__PURE__ */ V(hW, {
60473
60519
  isAnimating: d,
60474
60520
  isToolbarVisible: e,
60475
60521
  selectedTool: l,
@@ -60480,7 +60526,7 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60480
60526
  }, "tools")
60481
60527
  })
60482
60528
  });
60483
- }, (e, t) => !(e.status !== t.status || e.isToolbarVisible !== t.isToolbarVisible || e.artifactKind !== t.artifactKind)), pW = ({ handleVersionChange: e, documents: t, currentVersionIndex: n }) => {
60529
+ }, (e, t) => !(e.status !== t.status || e.isToolbarVisible !== t.isToolbarVisible || e.artifactKind !== t.artifactKind)), _W = ({ handleVersionChange: e, documents: t, currentVersionIndex: n }) => {
60484
60530
  let { artifact: r } = ES(), { width: i } = $P(), a = i < 768, [o, s] = z(!1);
60485
60531
  if (t) return /* @__PURE__ */ H(cP.div, {
60486
60532
  animate: { y: 0 },
@@ -60520,13 +60566,13 @@ var sW = O(oW), cW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60520
60566
  })]
60521
60567
  })]
60522
60568
  });
60523
- }, mW = [
60569
+ }, vW = [
60524
60570
  ER,
60525
60571
  lF,
60526
60572
  dF,
60527
60573
  jL
60528
60574
  ];
60529
- function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, status: i, stop: a, attachments: o, setAttachments: s, chatModels: c, defaultChatModel: l, sendMessage: u, messages: d, setMessages: f, regenerate: p, renderMessagePart: m, votes: h, isReadonly: g, selectedModelId: _, suggestedActions: v }) {
60575
+ function yW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, status: i, stop: a, attachments: o, setAttachments: s, chatModels: c, defaultChatModel: l, sendMessage: u, messages: d, setMessages: f, regenerate: p, renderMessagePart: m, votes: h, isReadonly: g, selectedModelId: _, suggestedActions: v }) {
60530
60576
  let { artifact: y, setArtifact: b, metadata: x, setMetadata: S } = ES(), { data: C, isLoading: w } = NR(y.documentId, y.documentId !== "init" && y.status !== "streaming"), [T, E] = z([]), D = L(() => T.length > 0 ? MR(C, T) : C, [C, T]), [O, A] = z("edit"), [M, N] = z(null), [P, F] = z(-1);
60531
60577
  j(() => {
60532
60578
  E([]);
@@ -60584,7 +60630,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60584
60630
  }
60585
60631
  let ie = (e) => {
60586
60632
  D && (e === "latest" && (F(D.length - 1), A("edit")), e === "toggle" && A((e) => e === "edit" ? "diff" : "edit"), e === "prev" ? P > 0 && F((e) => e - 1) : e === "next" && P < D.length - 1 && F((e) => e + 1));
60587
- }, [B, ae] = z(!1), oe = D && D.length > 0 ? P === D.length - 1 : !0, se = Yg(), ce = mW.find((e) => e.kind === y.kind);
60633
+ }, [B, ae] = z(!1), oe = D && D.length > 0 ? P === D.length - 1 : !0, se = Yg(), ce = vW.find((e) => e.kind === y.kind);
60588
60634
  if (!ce) throw Error("Artifact definition not found!");
60589
60635
  return j(() => {
60590
60636
  y.documentId !== "init" && ce.initialize && ce.initialize({
@@ -60635,7 +60681,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60635
60681
  initial: { opacity: 0 }
60636
60682
  }) }), /* @__PURE__ */ H("div", {
60637
60683
  className: "flex h-full flex-col items-center justify-between",
60638
- children: [/* @__PURE__ */ V(kB, {
60684
+ children: [/* @__PURE__ */ V(NB, {
60639
60685
  addToolApprovalResponse: e,
60640
60686
  artifactStatus: y.status,
60641
60687
  chatId: t,
@@ -60648,7 +60694,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60648
60694
  votes: h
60649
60695
  }), /* @__PURE__ */ V("div", {
60650
60696
  className: "relative flex w-full flex-row items-end gap-2 px-4 pb-4",
60651
- children: /* @__PURE__ */ V(QU, {
60697
+ children: /* @__PURE__ */ V(nW, {
60652
60698
  attachments: o,
60653
60699
  chatModels: c,
60654
60700
  defaultChatModel: l,
@@ -60747,7 +60793,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60747
60793
  status: y.status,
60748
60794
  suggestions: [],
60749
60795
  title: y.title
60750
- }), /* @__PURE__ */ V(hM, { children: oe && /* @__PURE__ */ V(fW, {
60796
+ }), /* @__PURE__ */ V(hM, { children: oe && /* @__PURE__ */ V(gW, {
60751
60797
  artifactKind: y.kind,
60752
60798
  isToolbarVisible: B,
60753
60799
  sendMessage: u,
@@ -60757,7 +60803,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60757
60803
  stop: a
60758
60804
  }) })]
60759
60805
  }),
60760
- /* @__PURE__ */ V(hM, { children: !oe && /* @__PURE__ */ V(pW, {
60806
+ /* @__PURE__ */ V(hM, { children: !oe && /* @__PURE__ */ V(_W, {
60761
60807
  currentVersionIndex: P,
60762
60808
  documents: D,
60763
60809
  handleVersionChange: ie
@@ -60766,7 +60812,7 @@ function hW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60766
60812
  })]
60767
60813
  }) });
60768
60814
  }
60769
- var gW = O(hW, (e, t) => !(e.status !== t.status || !ve(e.votes, t.votes) || e.input !== t.input || !ve(e.messages, t.messages.length) || e.renderMessagePart !== t.renderMessagePart || !ve(e.suggestedActions, t.suggestedActions) || !ve(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel)), _W = ({ title1: e, title2: t }) => {
60815
+ var bW = O(yW, (e, t) => !(e.status !== t.status || !ve(e.votes, t.votes) || e.input !== t.input || !ve(e.messages, t.messages.length) || e.renderMessagePart !== t.renderMessagePart || !ve(e.suggestedActions, t.suggestedActions) || !ve(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel)), xW = ({ title1: e, title2: t }) => {
60770
60816
  let n = e?.trim(), r = t?.trim();
60771
60817
  return !n && !r ? null : /* @__PURE__ */ H("div", {
60772
60818
  className: "mx-auto mt-4 flex size-full max-w-3xl flex-col justify-center px-4 md:mt-16 md:px-8",
@@ -60804,9 +60850,9 @@ var gW = O(hW, (e, t) => !(e.status !== t.status || !ve(e.votes, t.votes) || e.i
60804
60850
  children: r
60805
60851
  })]
60806
60852
  }, "overview");
60807
- }, vW = (e) => e.trim().toLowerCase().replace(/\.+$/, "") === "an error occurred";
60808
- function yW({ disabled: e, error: t, onRetry: n }) {
60809
- let r = t.message.trim(), i = r !== "" && !vW(r);
60853
+ }, SW = (e) => e.trim().toLowerCase().replace(/\.+$/, "") === "an error occurred";
60854
+ function CW({ disabled: e, error: t, onRetry: n }) {
60855
+ let r = t.message.trim(), i = r !== "" && !SW(r);
60810
60856
  return /* @__PURE__ */ V("div", {
60811
60857
  className: "group/message fade-in w-full animate-in duration-200",
60812
60858
  "data-testid": "message-error",
@@ -60840,7 +60886,7 @@ function yW({ disabled: e, error: t, onRetry: n }) {
60840
60886
  })
60841
60887
  });
60842
60888
  }
60843
- function bW({ addToolApprovalResponse: e, chatId: t, conversationError: n, status: r, votes: i, messages: a, renderMessagePart: o, setMessages: c, regenerate: u, onRetryConversationError: d, isReadonly: f, selectedModelId: p, title1: m, title2: h }) {
60889
+ function wW({ addToolApprovalResponse: e, chatId: t, conversationError: n, status: r, votes: i, messages: a, renderMessagePart: o, setMessages: c, regenerate: u, onRetryConversationError: d, isReadonly: f, selectedModelId: p, title1: m, title2: h }) {
60844
60890
  let g = a.at(-1), _ = g ? l(g) : !1, v = r === "submitted" || r === "streaming" && g?.role === "assistant" && !_, { containerRef: y, endRef: b, isAtBottom: x, scrollToBottom: S, hasSentMessage: C } = zR({ status: r });
60845
60891
  return ot(), /* @__PURE__ */ H("div", {
60846
60892
  className: "relative flex-1",
@@ -60850,11 +60896,11 @@ function bW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60850
60896
  children: /* @__PURE__ */ H("div", {
60851
60897
  className: "mx-auto flex min-w-0 max-w-4xl flex-col gap-4 px-2 pt-[60px] pb-4 md:gap-6 md:px-4",
60852
60898
  children: [
60853
- a.length === 0 && /* @__PURE__ */ V(_W, {
60899
+ a.length === 0 && /* @__PURE__ */ V(xW, {
60854
60900
  title1: m,
60855
60901
  title2: h
60856
60902
  }),
60857
- a.map((n, l) => s(n) ? null : /* @__PURE__ */ V(wB, {
60903
+ a.map((n, l) => s(n) ? null : /* @__PURE__ */ V(OB, {
60858
60904
  addToolApprovalResponse: e,
60859
60905
  chatId: t,
60860
60906
  isLoading: r === "streaming" && a.length - 1 === l,
@@ -60866,8 +60912,8 @@ function bW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60866
60912
  setMessages: c,
60867
60913
  vote: i ? i.find((e) => e.messageId === n.id) : void 0
60868
60914
  }, n.id)),
60869
- v && /* @__PURE__ */ V(EB, {}),
60870
- n && /* @__PURE__ */ V(yW, {
60915
+ v && /* @__PURE__ */ V(AB, {}),
60916
+ n && /* @__PURE__ */ V(CW, {
60871
60917
  disabled: r !== "ready" && r !== "error",
60872
60918
  error: n,
60873
60919
  onRetry: d
@@ -60887,10 +60933,10 @@ function bW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60887
60933
  })]
60888
60934
  });
60889
60935
  }
60890
- var xW = bW, SW = (e) => e?.parts?.some((e) => {
60936
+ var TW = wW, EW = (e) => e?.parts?.some((e) => {
60891
60937
  let t = e.state;
60892
60938
  return t === "approval-responded" || t === "output-denied";
60893
- }) ?? !1, CW = (e) => `agents-sdk:chat:${e}:stream`, wW = (e) => !!(e && typeof e == "object" && !Array.isArray(e)), TW = (e) => _(e) ?? "default", EW = (e) => {
60939
+ }) ?? !1, DW = (e) => `agents-sdk:chat:${e}:stream`, OW = (e) => !!(e && typeof e == "object" && !Array.isArray(e)), kW = (e) => _(e) ?? "default", AW = (e) => {
60894
60940
  if (typeof document > "u") return null;
60895
60941
  let t = document.cookie.split(";");
60896
60942
  for (let n of t) {
@@ -60905,10 +60951,10 @@ var xW = bW, SW = (e) => e?.parts?.some((e) => {
60905
60951
  }
60906
60952
  }
60907
60953
  return null;
60908
- }, DW = (e) => EW("chat-reasoning-effort") ?? e, OW = (e, t) => {
60954
+ }, jW = (e) => AW("chat-reasoning-effort") ?? e, MW = (e, t) => {
60909
60955
  let n = h(e);
60910
- return t && n.some((e) => e === t) ? t : TW(e);
60911
- }, kW = (e, t) => OW(e, DW(t)), AW = (e) => e instanceof pm || e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.", jW = (e) => {
60956
+ return t && n.some((e) => e === t) ? t : kW(e);
60957
+ }, NW = (e, t) => MW(e, jW(t)), PW = (e) => e instanceof pm || e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.", FW = (e) => {
60912
60958
  for (let t = e.length - 1; t >= 0; --t) {
60913
60959
  let n = e[t];
60914
60960
  if (!s(n)) {
@@ -60917,23 +60963,23 @@ var xW = bW, SW = (e) => e?.parts?.some((e) => {
60917
60963
  }
60918
60964
  }
60919
60965
  return null;
60920
- }, MW = (e) => {
60966
+ }, IW = (e) => {
60921
60967
  for (let t = e.length - 1; t >= 0; --t) {
60922
60968
  let n = e[t];
60923
60969
  if (n.role === "assistant" && l(n)) return n;
60924
60970
  }
60925
60971
  return null;
60926
- }, NW = (e) => {
60972
+ }, LW = (e) => {
60927
60973
  let t = e.length;
60928
60974
  for (; t > 0 && s(e[t - 1]);) --t;
60929
60975
  return t === e.length ? e : e.slice(0, t);
60930
- }, PW = (e) => {
60976
+ }, RW = (e) => {
60931
60977
  if (e?.role !== "assistant") return null;
60932
60978
  for (let t of e.parts) {
60933
- if (!wW(t)) continue;
60979
+ if (!OW(t)) continue;
60934
60980
  let e = t;
60935
60981
  if (e.state !== "approval-responded") continue;
60936
- let n = wW(e.approval) ? e.approval : null;
60982
+ let n = OW(e.approval) ? e.approval : null;
60937
60983
  if (!(n?.approved !== !0 || typeof n.id != "string")) return {
60938
60984
  id: n.id,
60939
60985
  reason: typeof n.reason == "string" ? n.reason : void 0
@@ -60941,15 +60987,15 @@ var xW = bW, SW = (e) => e?.parts?.some((e) => {
60941
60987
  }
60942
60988
  return null;
60943
60989
  };
60944
- function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReasoningEffort: r, isReadonly: i, autoResume: a, chatModels: o, defaultChatModel: s, renderMessagePart: c, suggestedActions: l, title1: u, title2: h }) {
60990
+ function zW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReasoningEffort: r, isReadonly: i, autoResume: a, chatModels: o, defaultChatModel: s, renderMessagePart: c, suggestedActions: l, title1: u, title2: h }) {
60945
60991
  let { setDataStream: g, setWaitingStatus: _ } = ot(), { getChatPath: v } = Ze(), y = o && o.length > 0 ? o : f, b = p({
60946
60992
  defaultChatModel: s,
60947
60993
  models: y
60948
- }), x = d(y).has(n) ? n : b, S = kW(x, r), [C, w] = z(""), [T, E] = z(x), D = R(T), [O, k] = z(S), A = R(O), [M, N] = z(null);
60994
+ }), x = d(y).has(n) ? n : b, S = NW(x, r), [C, w] = z(""), [T, E] = z(x), D = R(T), [O, k] = z(S), A = R(O), [M, N] = z(null);
60949
60995
  j(() => {
60950
60996
  D.current = T;
60951
60997
  }, [T]), j(() => {
60952
- E(x), k(kW(x, r)), N(null), _(void 0);
60998
+ E(x), k(NW(x, r)), N(null), _(void 0);
60953
60999
  }, [
60954
61000
  e,
60955
61001
  x,
@@ -60968,7 +61014,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
60968
61014
  api: "/api/rb/agents/chat",
60969
61015
  fetch: Om,
60970
61016
  prepareSendMessagesRequest(e) {
60971
- let t = D.current, n = A.current, r = e.messages.at(-1), i = e.messages.at(-2), a = Cm(e.headers, xm()), o = r?.role !== "user" || r?.role === "user" && SW(i);
61017
+ let t = D.current, n = A.current, r = e.messages.at(-1), i = e.messages.at(-2), a = Cm(e.headers, xm()), o = r?.role !== "user" || r?.role === "user" && EW(i);
60972
61018
  return {
60973
61019
  ...a ? { headers: a } : {},
60974
61020
  body: {
@@ -60996,7 +61042,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
60996
61042
  g((t) => t ? [...t, e] : []);
60997
61043
  },
60998
61044
  onError: (e) => {
60999
- let t = AW(e);
61045
+ let t = PW(e);
61000
61046
  N({ message: t }), le.error(t);
61001
61047
  }
61002
61048
  });
@@ -61004,7 +61050,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61004
61050
  (L === "submitted" || L === "ready" || L === "error") && _(void 0);
61005
61051
  }, [L, _]);
61006
61052
  let B = (...e) => (N(null), re(), I(...e)), ae = (...e) => (N(null), re(), te(...e)), oe = () => {
61007
- let e = jW(P);
61053
+ let e = FW(P);
61008
61054
  if (e) {
61009
61055
  B({
61010
61056
  messageId: e.id,
@@ -61014,11 +61060,11 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61014
61060
  });
61015
61061
  return;
61016
61062
  }
61017
- let t = MW(P);
61063
+ let t = IW(P);
61018
61064
  if (t) {
61019
- let e = PW(t);
61065
+ let e = RW(t);
61020
61066
  if (e) {
61021
- N(null), re(), F(NW), ie({
61067
+ N(null), re(), F(LW), ie({
61022
61068
  id: e.id,
61023
61069
  approved: !0,
61024
61070
  reason: e.reason
@@ -61030,17 +61076,17 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61030
61076
  }
61031
61077
  ae();
61032
61078
  }, ce = R(null), de = R("");
61033
- j(() => ue(CW(e), (t) => {
61034
- if (!wW(t) || t.chatId !== e) return;
61079
+ j(() => ue(DW(e), (t) => {
61080
+ if (!OW(t) || t.chatId !== e) return;
61035
61081
  let n = t.message;
61036
- if (wW(n)) {
61082
+ if (OW(n)) {
61037
61083
  let e = typeof n.id == "string" ? n.id : null, t = typeof n.role == "string" ? n.role : null, r = Array.isArray(n.parts) ? n.parts : null;
61038
61084
  if (e && t && r) {
61039
61085
  let i = {
61040
61086
  id: e,
61041
61087
  role: t,
61042
61088
  parts: r,
61043
- metadata: wW(n.metadata) ? n.metadata : { createdAt: (/* @__PURE__ */ new Date()).toISOString() }
61089
+ metadata: OW(n.metadata) ? n.metadata : { createdAt: (/* @__PURE__ */ new Date()).toISOString() }
61044
61090
  };
61045
61091
  F((t) => {
61046
61092
  let n = t.findIndex((t) => t.id === e);
@@ -61053,7 +61099,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61053
61099
  return;
61054
61100
  }
61055
61101
  let r = t.part;
61056
- if (!wW(r)) return;
61102
+ if (!OW(r)) return;
61057
61103
  if (r.type === "start" && typeof r.messageId == "string") {
61058
61104
  ce.current = r.messageId, de.current = "";
61059
61105
  return;
@@ -61112,7 +61158,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61112
61158
  className: "relative flex h-full min-h-0 min-w-0 overflow-hidden bg-background",
61113
61159
  children: [/* @__PURE__ */ H("div", {
61114
61160
  className: "overscroll-behavior-contain flex h-full min-h-0 min-w-0 flex-1 touch-pan-y flex-col bg-background",
61115
- children: [/* @__PURE__ */ V(xW, {
61161
+ children: [/* @__PURE__ */ V(TW, {
61116
61162
  addToolApprovalResponse: ie,
61117
61163
  chatId: e,
61118
61164
  conversationError: M,
@@ -61130,7 +61176,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61130
61176
  votes: he
61131
61177
  }), /* @__PURE__ */ V("div", {
61132
61178
  className: "sticky bottom-0 z-1 mx-auto flex w-full max-w-4xl gap-2 border-t-0 bg-background px-2 pb-3 md:px-4 md:pb-4",
61133
- children: !i && /* @__PURE__ */ V(QU, {
61179
+ children: !i && /* @__PURE__ */ V(nW, {
61134
61180
  attachments: W,
61135
61181
  chatModels: y,
61136
61182
  defaultChatModel: b,
@@ -61138,7 +61184,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61138
61184
  input: C,
61139
61185
  messages: P,
61140
61186
  onModelChange: (e) => {
61141
- E(e), k(kW(e, r));
61187
+ E(e), k(NW(e, r));
61142
61188
  },
61143
61189
  onOpenAIReasoningEffortChange: k,
61144
61190
  openaiReasoningEffort: O,
@@ -61152,7 +61198,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61152
61198
  suggestedActions: l
61153
61199
  })
61154
61200
  })]
61155
- }), /* @__PURE__ */ V(gW, {
61201
+ }), /* @__PURE__ */ V(bW, {
61156
61202
  addToolApprovalResponse: ie,
61157
61203
  attachments: W,
61158
61204
  chatModels: y,
@@ -61177,7 +61223,7 @@ function FW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61177
61223
  }
61178
61224
  //#endregion
61179
61225
  //#region src/components/data-stream-handler.tsx
61180
- function IW() {
61226
+ function BW() {
61181
61227
  let { dataStream: e, setDataStream: t } = ot(), { artifact: n, setArtifact: r, setMetadata: i } = ES();
61182
61228
  return j(() => {
61183
61229
  if (!e?.length) return;
@@ -61185,7 +61231,7 @@ function IW() {
61185
61231
  t([]);
61186
61232
  for (let e of a) {
61187
61233
  if (e.type === "data-chat-title") continue;
61188
- let t = mW.find((e) => e.kind === n.kind);
61234
+ let t = vW.find((e) => e.kind === n.kind);
61189
61235
  t?.onStreamPart && t.onStreamPart({
61190
61236
  streamPart: e,
61191
61237
  setArtifact: r,
@@ -61233,4 +61279,4 @@ function IW() {
61233
61279
  ]), null;
61234
61280
  }
61235
61281
  //#endregion
61236
- export { gy as a, Sm as c, Xe as d, $e as f, Ze as h, Cy as i, bm as l, et as m, FW as n, Mm as o, Qe as p, by as r, xm as s, IW as t, at as u };
61282
+ export { gy as a, Sm as c, Xe as d, $e as f, Ze as h, Cy as i, bm as l, et as m, zW as n, Mm as o, Qe as p, by as r, xm as s, BW as t, at as u };