@pagelines/sdk 1.0.736 → 1.0.738

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { s as e, t } from "./sdkClient.js";
3
3
  import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatCardFencePayload as c, parseChatVisualFencePayload as u } from "@pagelines/core";
4
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as te, createVNode as b, defineComponent as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as re, onMounted as ie, onUnmounted as ae, openBlock as T, ref as k, renderList as A, renderSlot as oe, resolveDynamicComponent as j, shallowRef as P, toDisplayString as F, unref as se, vModelText as ce, watch as ue, withCtx as I, withDirectives as de, withKeys as pe, withModifiers as R } from "vue";
4
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as te, createVNode as b, defineComponent as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as re, onMounted as ie, onUnmounted as ae, openBlock as T, ref as k, renderList as A, renderSlot as oe, resolveDynamicComponent as j, shallowRef as se, toDisplayString as P, unref as ce, vModelText as ue, watch as de, withCtx as F, withDirectives as pe, withKeys as he, withModifiers as I } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var he = { class: "spinner max-w-sm" }, z = {
6
+ var R = { class: "spinner max-w-sm" }, z = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
9
  }, _e = /* @__PURE__ */ x({
@@ -19,7 +19,7 @@ var he = { class: "spinner max-w-sm" }, z = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (T(), _("div", he, [(T(), _("svg", z, [v("circle", {
22
+ return (t, n) => (T(), _("div", R, [(T(), _("svg", z, [v("circle", {
23
23
  class: S([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -401,7 +401,7 @@ var AgentChatController = class extends i {
401
401
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
402
402
  hash: "",
403
403
  time: 0
404
- }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", P(Date.now())), e(this, "toolActivityTiming", P({})), e(this, "lastVisibleProgressAtMs", P()), e(this, "liveSegments", P([])), e(this, "liveStreamMessageId", P(void 0)), e(this, "conversationId", void 0), e(this, "textState", k({
404
+ }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", se(Date.now())), e(this, "toolActivityTiming", se({})), e(this, "lastVisibleProgressAtMs", se()), e(this, "liveSegments", se([])), e(this, "liveStreamMessageId", se(void 0)), e(this, "conversationId", void 0), e(this, "textState", k({
405
405
  isActive: !1,
406
406
  isConnected: !1,
407
407
  isThinking: !1,
@@ -577,7 +577,7 @@ Current User:
577
577
  });
578
578
  }
579
579
  setupBoundaryWatcher() {
580
- ue(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
580
+ de(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
581
581
  this.scheduleBoundary(e);
582
582
  });
583
583
  }
@@ -639,12 +639,12 @@ Current User:
639
639
  });
640
640
  }
641
641
  setupModeWatcher() {
642
- ue(this.agentMode, async (e, t) => {
642
+ de(this.agentMode, async (e, t) => {
643
643
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
644
644
  });
645
645
  }
646
646
  setupAvailabilityWatcher() {
647
- ue(() => this.chatEnabled, (e) => {
647
+ de(() => this.chatEnabled, (e) => {
648
648
  if (!(!this.isTextMode || this.isConnecting)) {
649
649
  if (e) {
650
650
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -1048,7 +1048,7 @@ var we = {
1048
1048
  onInput
1049
1049
  }, null, 40, Oe));
1050
1050
  }
1051
- }), G = { class: "relative flex-shrink-0" }, Ae = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1051
+ }), Ae = { class: "relative flex-shrink-0" }, G = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1052
1052
  key: 1,
1053
1053
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1054
1054
  }, Ne = { class: "min-w-0" }, Pe = /* @__PURE__ */ x({
@@ -1063,15 +1063,15 @@ var we = {
1063
1063
  layout: { default: "centered" }
1064
1064
  },
1065
1065
  setup(e) {
1066
- return (t, n) => (T(), _("div", { class: S(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", G, [v("div", { class: S(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1066
+ return (t, n) => (T(), _("div", { class: S(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", Ae, [v("div", { class: S(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1067
1067
  src: e.agent.avatarUrl.value,
1068
1068
  alt: e.agent.displayName.value,
1069
1069
  class: "w-full h-full object-cover",
1070
- onError: n[0] || (n[0] = (...e) => se(handleImageError) && se(handleImageError)(...e))
1071
- }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (T(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1070
+ onError: n[0] || (n[0] = (...e) => ce(handleImageError) && ce(handleImageError)(...e))
1071
+ }, null, 40, G)], 2), v("div", je, [e.isOnline ? (T(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1072
1072
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1073
1073
  style: { "animation-duration": "3s" }
1074
- }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (T(), _("div", Me))])]), v("div", Ne, [v("h1", { class: S(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, F(e.agent.displayName.value), 3), v("p", { class: S(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, F(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1074
+ }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (T(), _("div", Me))])]), v("div", Ne, [v("h1", { class: S(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, P(e.agent.displayName.value), 3), v("p", { class: S(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, P(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1075
1075
  }
1076
1076
  }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ x({
1077
1077
  __name: "AgentAvatar",
@@ -1133,7 +1133,7 @@ var we = {
1133
1133
  class: "sr-only",
1134
1134
  role: "status",
1135
1135
  "aria-live": "polite"
1136
- }, Ve = ["aria-expanded", "disabled"], He = ["aria-expanded"], K = {
1136
+ }, Ve = ["aria-expanded", "disabled"], K = ["aria-expanded"], He = {
1137
1137
  class: "flex w-5 shrink-0 justify-center self-stretch",
1138
1138
  "aria-hidden": "true"
1139
1139
  }, Ue = ["data-journal-row"], We = {
@@ -1149,7 +1149,7 @@ var we = {
1149
1149
  isLight: { type: Boolean }
1150
1150
  },
1151
1151
  setup(e) {
1152
- let t = e, n = P(!1);
1152
+ let t = e, n = se(!1);
1153
1153
  function toggle() {
1154
1154
  n.value = !n.value;
1155
1155
  }
@@ -1220,7 +1220,7 @@ var we = {
1220
1220
  };
1221
1221
  });
1222
1222
  return (t, u) => (T(), _("div", { class: S(["w-full py-0.5", s.value.muted]) }, [
1223
- a.value ? (T(), _("span", Be, F(a.value), 1)) : h("", !0),
1223
+ a.value ? (T(), _("span", Be, P(a.value), 1)) : h("", !0),
1224
1224
  r.value ? (T(), _("button", {
1225
1225
  key: 1,
1226
1226
  type: "button",
@@ -1236,7 +1236,7 @@ var we = {
1236
1236
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1237
1237
  "aria-hidden": "true"
1238
1238
  }, null, -1)),
1239
- v("span", { class: S(["text-[12.5px] font-medium leading-none", s.value.muted]) }, F(e.model.terminal?.label), 3),
1239
+ v("span", { class: S(["text-[12.5px] font-medium leading-none", s.value.muted]) }, P(e.model.terminal?.label), 3),
1240
1240
  i.value ? (T(), _("i", {
1241
1241
  key: 0,
1242
1242
  class: S(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
@@ -1250,13 +1250,13 @@ var we = {
1250
1250
  "aria-expanded": n.value,
1251
1251
  class: S(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1252
1252
  onClick: toggle
1253
- }, [v("span", K, [v("span", {
1253
+ }, [v("span", He, [v("span", {
1254
1254
  "data-journal-spine": "dashed",
1255
1255
  class: S(["w-0 border-l border-dashed", s.value.dashed])
1256
- }, null, 2)]), v("span", { class: S(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [te(F(i.value) + " earlier updates ", 1), v("i", {
1256
+ }, null, 2)]), v("span", { class: S(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [te(P(i.value) + " earlier updates ", 1), v("i", {
1257
1257
  class: S(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1258
1258
  "aria-hidden": "true"
1259
- }, null, 2)], 2)], 10, He)) : h("", !0),
1259
+ }, null, 2)], 2)], 10, K)) : h("", !0),
1260
1260
  (T(!0), _(f, null, A(o.value, (e, t) => (T(), _("div", {
1261
1261
  key: e.id,
1262
1262
  "data-test": "messaging-tool-activity-row",
@@ -1268,15 +1268,15 @@ var we = {
1268
1268
  }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (T(), _("span", {
1269
1269
  key: 0,
1270
1270
  class: S(["w-px flex-1", s.value.spine])
1271
- }, null, 2))]), v("div", { class: S(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: S(["relative block leading-snug", c.value[e.tone].label]) }, [te(F(e.label), 1), c.value[e.tone].statusWord ? (T(), _("span", Ke, ", " + F(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (T(), _("p", {
1271
+ }, null, 2))]), v("div", { class: S(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: S(["relative block leading-snug", c.value[e.tone].label]) }, [te(P(e.label), 1), c.value[e.tone].statusWord ? (T(), _("span", Ke, ", " + P(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (T(), _("p", {
1272
1272
  key: 0,
1273
1273
  class: S(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1274
- }, F(e.note), 3)) : h("", !0)], 2)], 10, Ue))), 128)),
1274
+ }, P(e.note), 3)) : h("", !0)], 2)], 10, Ue))), 128)),
1275
1275
  !r.value && e.model.hint ? (T(), _("p", {
1276
1276
  key: 3,
1277
1277
  "data-test": "messaging-tool-activity-hint",
1278
1278
  class: S(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1279
- }, F(e.model.hint), 3)) : h("", !0)
1279
+ }, P(e.model.hint), 3)) : h("", !0)
1280
1280
  ], 2));
1281
1281
  }
1282
1282
  });
@@ -1562,9 +1562,9 @@ function createDOMPurify() {
1562
1562
  }
1563
1563
  }, oe = function _getDefaultTrustedTypesPolicy() {
1564
1564
  return ie || (re = Yt(u, r), ie = !0), re;
1565
- }, j = t, P = j.implementation, F = j.createNodeIterator, se = j.createDocumentFragment, ce = j.getElementsByTagName, ue = n.importNode, I = Xt();
1566
- DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && P && P.createHTMLDocument !== void 0;
1567
- let de = Nt, pe = Pt, R = Ft, he = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1565
+ }, j = t, se = j.implementation, P = j.createNodeIterator, ce = j.createDocumentFragment, ue = j.getElementsByTagName, de = n.importNode, F = Xt();
1566
+ DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && se && se.createHTMLDocument !== void 0;
1567
+ let pe = Nt, he = Pt, I = Ft, R = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1568
1568
  ...St,
1569
1569
  ...Ct,
1570
1570
  ...wt,
@@ -1607,7 +1607,7 @@ function createDOMPurify() {
1607
1607
  enumerable: !0,
1608
1608
  value: null
1609
1609
  }
1610
- })), Ee = !0, De = !0, Oe = !1, ke = !0, G = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, Ve = "user-content-", He = !0, K = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1610
+ })), Ee = !0, De = !0, Oe = !1, ke = !0, Ae = !1, G = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, Ve = "user-content-", K = !0, He = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1611
1611
  "audio",
1612
1612
  "video",
1613
1613
  "img",
@@ -1656,9 +1656,9 @@ function createDOMPurify() {
1656
1656
  }), Ke = Zt(e, "ADD_DATA_URI_TAGS", qe, {
1657
1657
  transform: Q,
1658
1658
  base: qe
1659
- }), We = Zt(e, "FORBID_CONTENTS", Ge, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, K = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1659
+ }), We = Zt(e, "FORBID_CONTENTS", Ge, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = e.SAFE_FOR_TEMPLATES || !1, G = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, K = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1660
1660
  let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1661
- if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), G && (De = !1), Le && (Ie = !0), Ue && (H = addToSet({}, Ot), U = $e(null), Ue.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ue.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ue.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ue.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), He && (H["#text"] = !0), je && addToSet(H, [
1661
+ if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), Ae && (De = !1), Le && (Ie = !0), Ue && (H = addToSet({}, Ot), U = $e(null), Ue.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ue.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ue.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ue.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), K && (H["#text"] = !0), je && addToSet(H, [
1662
1662
  "html",
1663
1663
  "head",
1664
1664
  "body"
@@ -1754,7 +1754,7 @@ function createDOMPurify() {
1754
1754
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1755
1755
  }
1756
1756
  }, vn = function _neutralizePatchLinkage(e) {
1757
- if (!Ae) return;
1757
+ if (!G) return;
1758
1758
  let t = [e];
1759
1759
  for (; t.length > 0;) {
1760
1760
  let e = t.pop(), n = x ? x(e) : e.nodeType;
@@ -1786,20 +1786,20 @@ function createDOMPurify() {
1786
1786
  n = new c().parseFromString(i, en);
1787
1787
  } catch {}
1788
1788
  if (!n || !n.documentElement) {
1789
- n = P.createDocument(tt, "template", null);
1789
+ n = se.createDocument(tt, "template", null);
1790
1790
  try {
1791
1791
  n.documentElement.innerHTML = nt ? C : i;
1792
1792
  } catch {}
1793
1793
  }
1794
1794
  let a = n.body || n.documentElement;
1795
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? ce.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1795
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? ue.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1796
1796
  }, bn = function _createNodeIterator(e) {
1797
- return F.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1797
+ return P.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1798
1798
  }, xn = function _stripTemplateExpressions(e) {
1799
- return e = pt(e, de, " "), e = pt(e, pe, " "), e = pt(e, R, " "), e;
1799
+ return e = pt(e, pe, " "), e = pt(e, he, " "), e = pt(e, I, " "), e;
1800
1800
  }, Sn = function _scrubTemplateExpressions(e) {
1801
1801
  e.normalize();
1802
- let t = F.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1802
+ let t = P.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1803
1803
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1804
1804
  let r = e.querySelectorAll?.call(e, "template");
1805
1805
  r && rt(r, (e) => {
@@ -1829,43 +1829,43 @@ function createDOMPurify() {
1829
1829
  });
1830
1830
  }
1831
1831
  let En = function _isUnsafeNode(e, t) {
1832
- return !!(Ae && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || Ae && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || Ae && e.nodeType === qt.comment && Z(Wt, e.data));
1832
+ return !!(G && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || G && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || G && e.nodeType === qt.comment && Z(Wt, e.data));
1833
1833
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1834
1834
  if (!Ce[t] && jn(t) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
1835
- if (He && !We[t]) {
1835
+ if (K && !We[t]) {
1836
1836
  let t = v(e), n = _(e);
1837
1837
  if (n && t) {
1838
1838
  let r = n.length;
1839
1839
  for (let i = r - 1; i >= 0; --i) {
1840
- let r = K ? n[i] : p(n[i], !0);
1840
+ let r = He ? n[i] : p(n[i], !0);
1841
1841
  t.insertBefore(r, h(e));
1842
1842
  }
1843
1843
  }
1844
1844
  }
1845
1845
  return pn(e), !0;
1846
1846
  }, On = function _sanitizeElements(e, t) {
1847
- if (_executeHooks(I.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1847
+ if (_executeHooks(F.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1848
1848
  if (Cn(e)) return pn(e), !0;
1849
1849
  let n = Q(ne ? ne(e) : e.nodeName);
1850
- if (_executeHooks(I.uponSanitizeElement, e, {
1850
+ if (_executeHooks(F.uponSanitizeElement, e, {
1851
1851
  tagName: n,
1852
1852
  allowedTags: H
1853
1853
  }), e !== t && v(e) === null) return !0;
1854
1854
  if (En(e, n)) return pn(e), !0;
1855
1855
  if (Ce[n] || !(Te.tagCheck instanceof Function && Te.tagCheck(n)) && !H[n]) {
1856
1856
  let t = Dn(e, n);
1857
- return t === !1 && _executeHooks(I.afterSanitizeElements, e, null), t;
1857
+ return t === !1 && _executeHooks(F.afterSanitizeElements, e, null), t;
1858
1858
  }
1859
1859
  if ((x ? x(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1860
- if (G && e.nodeType === qt.text) {
1860
+ if (Ae && e.nodeType === qt.text) {
1861
1861
  let t = xn(e.textContent);
1862
1862
  e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1863
1863
  }
1864
- return _executeHooks(I.afterSanitizeElements, e, null), !1;
1864
+ return _executeHooks(F.afterSanitizeElements, e, null), !1;
1865
1865
  }, kn = function _isValidAttribute(e, n, r) {
1866
- if (we[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1866
+ if (we[n] || G && n === "patchsrc" || G && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1867
1867
  let i = U[n] || Te.attributeCheck instanceof Function && Te.attributeCheck(n, e);
1868
- if (!(De && Z(he, n)) && !(Ee && Z(z, n))) {
1868
+ if (!(De && Z(R, n)) && !(Ee && Z(z, n))) {
1869
1869
  if (!i) {
1870
1870
  if (!(jn(e) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && Z(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
1871
1871
  } else if (!Ye[n] && !Z(ye, pt(r, ve, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && Ke[e]) && !(Oe && !Z(_e, pt(r, ve, ""))) && r) return !1;
@@ -1895,7 +1895,7 @@ function createDOMPurify() {
1895
1895
  hn(t, e);
1896
1896
  }
1897
1897
  }, Pn = function _sanitizeAttributes(e) {
1898
- _executeHooks(I.beforeSanitizeAttributes, e, null);
1898
+ _executeHooks(F.beforeSanitizeAttributes, e, null);
1899
1899
  let t = e.attributes;
1900
1900
  if (!t || Cn(e)) return;
1901
1901
  let n = {
@@ -1907,7 +1907,7 @@ function createDOMPurify() {
1907
1907
  }, r = t.length, i = Q(e.nodeName);
1908
1908
  for (; r--;) {
1909
1909
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1910
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(I.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1910
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(F.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), G && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1911
1911
  hn(o, e);
1912
1912
  continue;
1913
1913
  }
@@ -1924,21 +1924,21 @@ function createDOMPurify() {
1924
1924
  hn(o, e);
1925
1925
  continue;
1926
1926
  }
1927
- if (G && (p = xn(p)), !kn(i, u, p)) {
1927
+ if (Ae && (p = xn(p)), !kn(i, u, p)) {
1928
1928
  hn(o, e);
1929
1929
  continue;
1930
1930
  }
1931
1931
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1932
1932
  }
1933
1933
  }
1934
- _executeHooks(I.afterSanitizeAttributes, e, null);
1934
+ _executeHooks(F.afterSanitizeAttributes, e, null);
1935
1935
  }, Fn = function _sanitizeShadowDOM(e) {
1936
1936
  let t = null, n = bn(e);
1937
- for (_executeHooks(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(I.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === qt.element) {
1937
+ for (_executeHooks(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(F.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === qt.element) {
1938
1938
  let e = te(t);
1939
1939
  wn(e) && (In(e), Fn(e));
1940
1940
  }
1941
- _executeHooks(I.afterSanitizeShadowDOM, e, null);
1941
+ _executeHooks(F.afterSanitizeShadowDOM, e, null);
1942
1942
  }, In = function _sanitizeAttachedShadowRoots(e) {
1943
1943
  let t = [{
1944
1944
  node: e,
@@ -1981,8 +1981,8 @@ function createDOMPurify() {
1981
1981
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
1982
1982
  if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1983
1983
  if (!DOMPurify.isSupported) return e;
1984
- Me ? (H = Ne, U = Pe) : on(t), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (H = clone(H)), I.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
- let s = K && typeof e != "string" && Tn(e);
1984
+ Me ? (H = Ne, U = Pe) : on(t), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (H = clone(H)), F.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
+ let s = He && typeof e != "string" && Tn(e);
1986
1986
  if (s) {
1987
1987
  vn(e);
1988
1988
  let t = ne ? ne(e) : e.nodeName;
@@ -1998,7 +1998,7 @@ function createDOMPurify() {
1998
1998
  }
1999
1999
  } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2000
2000
  else {
2001
- if (!Ie && !G && !je && e.indexOf("<") === -1) return S && Re ? k(e) : e;
2001
+ if (!Ie && !Ae && !je && e.indexOf("<") === -1) return S && Re ? k(e) : e;
2002
2002
  if (r = yn(e), !r) return Ie ? null : Re ? C : "";
2003
2003
  }
2004
2004
  r && Fe && pn(r.firstChild);
@@ -2012,14 +2012,14 @@ function createDOMPurify() {
2012
2012
  }
2013
2013
  if (s) return rt(DOMPurify.removed, (e) => {
2014
2014
  e.element && _n(e.element);
2015
- }), G && Sn(e), e;
2015
+ }), Ae && Sn(e), e;
2016
2016
  if (Ie) {
2017
- if (G && Sn(r), Le) for (o = se.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2017
+ if (Ae && Sn(r), Le) for (o = ce.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2018
2018
  else o = r;
2019
- return (U.shadowroot || U.shadowrootmode) && (o = ue.call(n, o, !0)), o;
2019
+ return (U.shadowroot || U.shadowrootmode) && (o = de.call(n, o, !0)), o;
2020
2020
  }
2021
2021
  let f = je ? r.outerHTML : r.innerHTML;
2022
- return je && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), G && (f = xn(f)), S && Re ? k(f) : f;
2022
+ return je && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Ae && (f = xn(f)), S && Re ? k(f) : f;
2023
2023
  }, DOMPurify.setConfig = function() {
2024
2024
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2025
2025
  on(e), Me = !0, Ne = H, Pe = U;
@@ -2030,19 +2030,19 @@ function createDOMPurify() {
2030
2030
  let r = Q(e), i = Q(t);
2031
2031
  return kn(r, i, n);
2032
2032
  }, DOMPurify.addHook = function(e, t) {
2033
- typeof t == "function" && X(I, e) && st(I[e], t);
2033
+ typeof t == "function" && X(F, e) && st(F[e], t);
2034
2034
  }, DOMPurify.removeHook = function(e, t) {
2035
- if (X(I, e)) {
2035
+ if (X(F, e)) {
2036
2036
  if (t !== void 0) {
2037
- let n = it(I[e], t);
2038
- return n === -1 ? void 0 : ct(I[e], n, 1)[0];
2037
+ let n = it(F[e], t);
2038
+ return n === -1 ? void 0 : ct(F[e], n, 1)[0];
2039
2039
  }
2040
- return at(I[e]);
2040
+ return at(F[e]);
2041
2041
  }
2042
2042
  }, DOMPurify.removeHooks = function(e) {
2043
- X(I, e) && (I[e] = []);
2043
+ X(F, e) && (F[e] = []);
2044
2044
  }, DOMPurify.removeAllHooks = function() {
2045
- I = Xt();
2045
+ F = Xt();
2046
2046
  }, DOMPurify;
2047
2047
  }
2048
2048
  var Qt = createDOMPurify(), _Class;
@@ -3506,7 +3506,7 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3506
3506
  v("div", hr, [v("div", {
3507
3507
  class: "text-[14px] font-semibold leading-tight",
3508
3508
  style: C({ color: s.value })
3509
- }, F(e.spec.title), 5)]),
3509
+ }, P(e.spec.title), 5)]),
3510
3510
  i.value ? (T(), _("div", {
3511
3511
  key: 0,
3512
3512
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
@@ -3524,7 +3524,7 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3524
3524
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3525
3525
  style: C(actionStyle(e.style)),
3526
3526
  onClick: (t) => r("action", e.reply)
3527
- }, F(e.label), 13, _r))), 128))], 4)) : h("", !0)
3527
+ }, P(e.label), 13, _r))), 128))], 4)) : h("", !0)
3528
3528
  ], 12, mr));
3529
3529
  }
3530
3530
  }), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
@@ -3759,7 +3759,7 @@ var kr = [
3759
3759
  inverted: { type: Boolean }
3760
3760
  },
3761
3761
  setup(e) {
3762
- let t = e, n = k(), r = P(360), i;
3762
+ let t = e, n = k(), r = se(360), i;
3763
3763
  ie(() => {
3764
3764
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3765
3765
  let t = e[0]?.contentRect.width;
@@ -3894,7 +3894,7 @@ var kr = [
3894
3894
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3895
3895
  }).join(" ") : "";
3896
3896
  }
3897
- let ce = p(() => {
3897
+ let ue = p(() => {
3898
3898
  let e = m.value;
3899
3899
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3900
3900
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
@@ -3905,7 +3905,7 @@ var kr = [
3905
3905
  dataKey: e.trendLine.dataKey,
3906
3906
  seriesIndex: s
3907
3907
  };
3908
- }), ue = p(() => {
3908
+ }), de = p(() => {
3909
3909
  let e = m.value;
3910
3910
  if (!e || e.chartType !== "bar") return [];
3911
3911
  let t = j.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
@@ -3942,7 +3942,7 @@ var kr = [
3942
3942
  dataKey: e.dataKey
3943
3943
  };
3944
3944
  }));
3945
- }), I = p(() => {
3945
+ }), F = p(() => {
3946
3946
  let e = m.value;
3947
3947
  if (!e) return [];
3948
3948
  let t = e.data;
@@ -3955,7 +3955,7 @@ var kr = [
3955
3955
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
3956
3956
  angled: i
3957
3957
  })).filter((e) => e.label);
3958
- }), de = p(() => {
3958
+ }), pe = p(() => {
3959
3959
  let e = m.value;
3960
3960
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || x.value) return [];
3961
3961
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -3978,7 +3978,7 @@ var kr = [
3978
3978
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
3979
3979
  seriesIndex: 0
3980
3980
  }));
3981
- }), pe = p(() => {
3981
+ }), he = p(() => {
3982
3982
  let e = m.value;
3983
3983
  if (!e?.data.length) return [];
3984
3984
  let t = e.data[e.data.length - 1];
@@ -3994,7 +3994,7 @@ var kr = [
3994
3994
  seriesIndex: n
3995
3995
  };
3996
3996
  });
3997
- }), R = p(() => {
3997
+ }), I = p(() => {
3998
3998
  let e = m.value;
3999
3999
  if (!e?.data.length || e.chartType !== "line") return [];
4000
4000
  let t = e.data.length - 1, n = e.data[t];
@@ -4007,7 +4007,7 @@ var kr = [
4007
4007
  seriesIndex: i
4008
4008
  };
4009
4009
  }).filter((e) => e !== null);
4010
- }), he = p(() => {
4010
+ }), R = p(() => {
4011
4011
  let e = b.value;
4012
4012
  if (!e) return [];
4013
4013
  let t = e.data.map((t) => ({
@@ -4060,11 +4060,11 @@ var kr = [
4060
4060
  v("header", Ar, [v("h4", {
4061
4061
  class: "text-[13px] font-semibold leading-tight",
4062
4062
  style: C({ color: B.value })
4063
- }, F(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
4063
+ }, P(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
4064
4064
  key: 0,
4065
4065
  class: "mt-0.5 text-[12px] leading-snug",
4066
4066
  style: C({ color: ye.value })
4067
- }, F(o.value.meta.description), 5)) : h("", !0)]),
4067
+ }, P(o.value.meta.description), 5)) : h("", !0)]),
4068
4068
  v("div", {
4069
4069
  ref_key: "bodyEl",
4070
4070
  ref: n
@@ -4072,17 +4072,17 @@ var kr = [
4072
4072
  key: 0,
4073
4073
  role: "img",
4074
4074
  "aria-label": o.value.meta.title
4075
- }, [de.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(de.value, (e) => (T(), _("div", {
4075
+ }, [pe.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
4076
4076
  key: e.key,
4077
4077
  "data-test": "chat-visual-horizontal-bar",
4078
4078
  class: "min-w-0"
4079
4079
  }, [v("div", Nr, [v("span", {
4080
4080
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4081
4081
  style: C({ color: B.value })
4082
- }, F(e.label), 5), v("span", {
4082
+ }, P(e.label), 5), v("span", {
4083
4083
  class: "shrink-0 font-semibold tabular-nums",
4084
4084
  style: C({ color: B.value })
4085
- }, F(e.value), 5)]), v("div", {
4085
+ }, P(e.value), 5)]), v("div", {
4086
4086
  class: "h-2 w-full overflow-hidden rounded-full",
4087
4087
  style: C({ background: Te.value })
4088
4088
  }, [v("div", {
@@ -4116,11 +4116,11 @@ var kr = [
4116
4116
  "text-anchor": "end",
4117
4117
  "font-size": "9.5",
4118
4118
  style: C({ fill: H.value })
4119
- }, F(se(formatChatVisualTick)({
4119
+ }, P(ce(formatChatVisualTick)({
4120
4120
  value: e,
4121
4121
  shared: ae.value
4122
4122
  })), 13, Ir))), 128))]),
4123
- m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(ue.value, (e) => (T(), _("rect", {
4123
+ m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(de.value, (e) => (T(), _("rect", {
4124
4124
  key: e.key,
4125
4125
  "data-test": "chat-visual-bar",
4126
4126
  "data-row-index": e.rowIndex,
@@ -4133,18 +4133,18 @@ var kr = [
4133
4133
  rx: "2.5",
4134
4134
  style: C({ fill: seriesColor(e.seriesIndex) })
4135
4135
  }, null, 12, Lr))), 128)) : (T(), _(f, { key: 1 }, [
4136
- ce.value ? (T(), _("path", {
4136
+ ue.value ? (T(), _("path", {
4137
4137
  key: 0,
4138
4138
  "data-test": "chat-visual-trend-line",
4139
- "data-trend-key": ce.value.dataKey,
4140
- d: ce.value.path,
4139
+ "data-trend-key": ue.value.dataKey,
4140
+ d: ue.value.path,
4141
4141
  fill: "none",
4142
4142
  "stroke-width": "1.4",
4143
4143
  "stroke-linecap": "round",
4144
4144
  "stroke-linejoin": "round",
4145
4145
  "stroke-dasharray": "4 3",
4146
4146
  "vector-effect": "non-scaling-stroke",
4147
- style: C({ stroke: seriesColor(ce.value.seriesIndex) })
4147
+ style: C({ stroke: seriesColor(ue.value.seriesIndex) })
4148
4148
  }, null, 12, Rr)) : h("", !0),
4149
4149
  (T(!0), _(f, null, A(te.value, (e, t) => (T(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (T(), _("path", {
4150
4150
  key: 0,
@@ -4162,7 +4162,7 @@ var kr = [
4162
4162
  r: "2.6",
4163
4163
  style: C({ fill: seriesColor(t) })
4164
4164
  }, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
4165
- (T(!0), _(f, null, A(R.value, (e) => (T(), _("circle", {
4165
+ (T(!0), _(f, null, A(I.value, (e) => (T(), _("circle", {
4166
4166
  key: `marker-${e.key}`,
4167
4167
  cx: e.cx,
4168
4168
  cy: e.cy,
@@ -4170,16 +4170,16 @@ var kr = [
4170
4170
  style: C({ fill: seriesColor(e.seriesIndex) })
4171
4171
  }, null, 12, Vr))), 128))
4172
4172
  ], 64)),
4173
- (T(!0), _(f, null, A(I.value, (e) => (T(), _("text", {
4173
+ (T(!0), _(f, null, A(F.value, (e) => (T(), _("text", {
4174
4174
  key: e.key,
4175
4175
  x: e.x,
4176
4176
  y: e.angled ? j.value.height - j.value.bottom + 12 : j.value.height - 6,
4177
4177
  "text-anchor": e.anchor,
4178
4178
  "font-size": "9.5",
4179
- transform: e.angled ? `rotate(${se(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4179
+ transform: e.angled ? `rotate(${ce(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4180
4180
  style: C({ fill: H.value })
4181
- }, F(e.label), 13, Hr))), 128))
4182
- ], 12, Pr)), pe.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
4181
+ }, P(e.label), 13, Hr))), 128))
4182
+ ], 12, Pr)), he.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(he.value, (e) => (T(), _("div", {
4183
4183
  key: e.key,
4184
4184
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4185
4185
  }, [
@@ -4187,21 +4187,21 @@ var kr = [
4187
4187
  class: "size-2.5 shrink-0 rounded-full",
4188
4188
  style: C({ background: seriesColor(e.seriesIndex) })
4189
4189
  }, null, 4),
4190
- v("span", { style: C({ color: ye.value }) }, F(e.label), 5),
4190
+ v("span", { style: C({ color: ye.value }) }, P(e.label), 5),
4191
4191
  v("span", {
4192
4192
  class: "font-semibold tabular-nums",
4193
4193
  style: C({ color: B.value })
4194
- }, F(e.value), 5)
4195
- ]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(he.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4194
+ }, P(e.value), 5)
4195
+ ]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(R.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4196
4196
  class: "truncate font-medium",
4197
4197
  style: C({ color: B.value })
4198
- }, F(e.name), 5), v("span", Kr, [v("span", {
4198
+ }, P(e.name), 5), v("span", Kr, [v("span", {
4199
4199
  class: "font-semibold",
4200
4200
  style: C({ color: B.value })
4201
- }, F(e.display), 5), v("span", {
4201
+ }, P(e.display), 5), v("span", {
4202
4202
  class: "ml-1.5",
4203
4203
  style: C({ color: ye.value })
4204
- }, F(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4204
+ }, P(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4205
4205
  class: "h-1.5 w-full overflow-hidden rounded-full",
4206
4206
  style: C({ background: Te.value })
4207
4207
  }, [v("div", {
@@ -4255,7 +4255,7 @@ var kr = [
4255
4255
  color: ye.value,
4256
4256
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4257
4257
  })
4258
- }, F(e.label), 5)], 8, Zr))), 128)),
4258
+ }, P(e.label), 5)], 8, Zr))), 128)),
4259
4259
  (T(!0), _(f, null, A(z.value.nodes, (e) => (T(), _("g", {
4260
4260
  key: e.id,
4261
4261
  "data-test": "chat-visual-diagram-node",
@@ -4290,17 +4290,17 @@ var kr = [
4290
4290
  }, [v("div", ni, [v("div", {
4291
4291
  class: "line-clamp-2 text-[13px] font-semibold leading-tight",
4292
4292
  style: C({ color: B.value })
4293
- }, F(e.label), 5), e.detail ? (T(), _("div", {
4293
+ }, P(e.label), 5), e.detail ? (T(), _("div", {
4294
4294
  key: 0,
4295
4295
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4296
4296
  style: C({ color: ye.value })
4297
- }, F(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4297
+ }, P(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4298
4298
  ], 12, Jr))])) : h("", !0)], 512),
4299
4299
  o.value.meta.footer ? (T(), _("footer", {
4300
4300
  key: 0,
4301
4301
  class: "mt-3 text-[11px] leading-snug",
4302
4302
  style: C({ color: H.value })
4303
- }, F(o.value.meta.footer), 5)) : h("", !0)
4303
+ }, P(o.value.meta.footer), 5)) : h("", !0)
4304
4304
  ], 12, kr)) : h("", !0);
4305
4305
  }
4306
4306
  }), ii = ["innerHTML"], ai = /* @__PURE__ */ x({
@@ -4312,8 +4312,8 @@ var kr = [
4312
4312
  },
4313
4313
  emits: ["action"],
4314
4314
  setup(e, { emit: t }) {
4315
- let n = e, r = t, i = P(n.text), a;
4316
- ue([() => n.text, () => n.streaming], ([e, t]) => {
4315
+ let n = e, r = t, i = se(n.text), a;
4316
+ de([() => n.text, () => n.streaming], ([e, t]) => {
4317
4317
  if (!t) {
4318
4318
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4319
4319
  return;
@@ -4554,10 +4554,14 @@ var kr = [
4554
4554
  }, di = { class: "min-w-0 flex-1" }, fi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, pi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, mi = {
4555
4555
  key: 0,
4556
4556
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4557
- }, hi = ["title"], gi = {
4557
+ }, hi = {
4558
+ key: 0,
4559
+ "data-test": "messaging-empty-state",
4560
+ class: "flex flex-col items-center justify-center px-4"
4561
+ }, gi = ["title"], _i = {
4558
4562
  key: 0,
4559
4563
  class: "flex items-center gap-3 py-3 px-2"
4560
- }, _i = ["data-journal-outcome"], vi = [
4564
+ }, vi = ["data-journal-outcome"], yi = [
4561
4565
  "data-message-id",
4562
4566
  "data-message-sender",
4563
4567
  "data-conversation-id",
@@ -4568,7 +4572,7 @@ var kr = [
4568
4572
  "data-issue-action-label",
4569
4573
  "data-issue-action-url",
4570
4574
  "data-streaming"
4571
- ], yi = { class: "max-w-[85%] min-w-0" }, bi = ["href"], xi = [
4575
+ ], bi = { class: "max-w-[85%] min-w-0" }, xi = ["href"], Si = [
4572
4576
  "data-message-id",
4573
4577
  "data-message-sender",
4574
4578
  "data-conversation-id",
@@ -4577,7 +4581,7 @@ var kr = [
4577
4581
  "data-issue-code",
4578
4582
  "data-issue-bucket",
4579
4583
  "data-streaming"
4580
- ], Si = [
4584
+ ], Ci = [
4581
4585
  "data-test",
4582
4586
  "data-message-id",
4583
4587
  "data-message-sender",
@@ -4585,46 +4589,54 @@ var kr = [
4585
4589
  "data-message-sequence",
4586
4590
  "data-system-kind",
4587
4591
  "data-streaming"
4588
- ], Ci = ["src", "alt"], wi = ["src"], Ti = ["href"], Ei = {
4592
+ ], wi = ["src", "alt"], Ti = ["src"], Ei = ["href"], Di = {
4589
4593
  key: 0,
4590
4594
  "data-test": "messaging-message-text-part"
4591
- }, Di = [
4595
+ }, Oi = [
4592
4596
  "src",
4593
4597
  "alt",
4594
4598
  "data-attachment-placement"
4595
- ], Oi = ["src", "data-attachment-placement"], ki = ["href", "data-attachment-placement"], Ai = ["data-journal-outcome"], ji = {
4599
+ ], ki = ["src", "data-attachment-placement"], Ai = ["href", "data-attachment-placement"], ji = ["data-journal-outcome"], Mi = {
4596
4600
  key: 2,
4597
4601
  "data-test": "messaging-tool-activity-tail",
4598
4602
  "aria-label": "Assistant is still working",
4599
4603
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4600
- }, Mi = ["data-journal-outcome"], Ni = ["data-test", "data-working-description"], Pi = {
4604
+ }, Ni = ["data-journal-outcome"], Pi = ["data-test", "data-working-description"], Fi = {
4601
4605
  class: "flex items-center gap-[5px]",
4602
4606
  "aria-hidden": "true"
4603
- }, Fi = { class: "truncate" }, Ii = ["data-issue-code"], Li = ["href"], Ri = ["src", "alt"], zi = { class: "max-w-20 truncate" }, Bi = ["onClick"], Vi = {
4607
+ }, Ii = { class: "truncate" }, Li = ["data-issue-code"], Ri = ["href"], zi = ["src", "alt"], Bi = { class: "max-w-20 truncate" }, Vi = ["onClick"], Hi = {
4604
4608
  key: 0,
4605
4609
  class: "shrink-0 flex items-center justify-center size-14"
4606
- }, Hi = ["data-composer-action"], Ui = ["placeholder", "disabled"], Wi = { class: "font-mono text-sm tabular-nums" }, Gi = { class: "mt-2.5 flex items-center" }, Ki = [
4610
+ }, Ui = ["data-composer-action"], Wi = ["placeholder", "disabled"], Gi = { class: "font-mono text-sm tabular-nums" }, Ki = { class: "mt-2.5 flex items-center" }, qi = [
4607
4611
  "disabled",
4608
4612
  "aria-label",
4609
4613
  "title"
4610
- ], qi = {
4614
+ ], Ji = {
4611
4615
  key: 0,
4612
4616
  class: "i-svg-spinners-ring-resize size-5"
4613
- }, Ji = {
4617
+ }, Yi = {
4614
4618
  key: 1,
4615
4619
  class: "i-tabler-plus size-5"
4616
- }, Yi = { class: "sr-only" }, Xi = { class: "flex items-center gap-2" }, Zi = ["aria-label", "title"], Qi = { class: "sr-only" }, $i = [
4620
+ }, Xi = { class: "sr-only" }, Zi = { class: "flex items-center gap-2" }, Qi = ["aria-label", "title"], $i = { class: "sr-only" }, ea = [
4617
4621
  "data-composer-action",
4618
4622
  "disabled",
4619
4623
  "aria-label",
4620
4624
  "title"
4621
- ], ea = {
4625
+ ], ta = {
4622
4626
  key: 0,
4623
4627
  class: "i-tabler-player-stop-filled size-3.5"
4624
- }, ta = {
4628
+ }, na = {
4625
4629
  key: 1,
4626
4630
  class: "i-tabler-arrow-up size-[17px]"
4627
- }, na = { class: "sr-only" }, ra = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ia = ["disabled", "onClick"], aa = ["aria-expanded"], oa = /* @__PURE__ */ x({
4631
+ }, ra = { class: "sr-only" }, ia = {
4632
+ key: 2,
4633
+ "data-test": "messaging-ai-disclosure",
4634
+ class: "mt-2.5 text-center text-[12px] text-theme-300"
4635
+ }, aa = {
4636
+ key: 3,
4637
+ "data-test": "messaging-suggested-prompts",
4638
+ class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
4639
+ }, oa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, sa = ["disabled", "onClick"], ca = ["aria-expanded"], la = /* @__PURE__ */ x({
4628
4640
  __name: "ElAgentChat",
4629
4641
  props: {
4630
4642
  chatController: {},
@@ -4665,34 +4677,34 @@ var kr = [
4665
4677
  }, n = p(() => {
4666
4678
  let n = { ...t[e.scope] };
4667
4679
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
4668
- }), r = k(!1), i = k(), a = k(), o = k();
4680
+ }), r = k(), i = k(), a = k();
4669
4681
  function containsMarkdownLink(e) {
4670
4682
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4671
4683
  }
4672
4684
  function isSystemExplainerMessage(e) {
4673
- return e.sender === "system" && (!!e.issue || e.id === U.value);
4685
+ return e.sender === "system" && (!!e.issue || e.id === be.value);
4674
4686
  }
4675
4687
  function isGroupEnd(e, t) {
4676
4688
  let n = e[t], r = e[t + 1];
4677
4689
  return !r || r.sender !== n.sender;
4678
4690
  }
4679
- let s = p(() => e.chatController?.textState.value), c = p(() => s.value?.isConnected ?? !1), u = p(() => s.value?.isThinking ?? !1), x = p(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), re = p(() => s.value?.connectionStatus !== "connected" && !s.value?.error), j = k(!1), P = p(() => e.chatController?.liveTurnBlocks?.value ?? []), se = p(() => {
4680
- for (let e = P.value.length - 1; e >= 0; e--) {
4681
- let t = P.value[e];
4691
+ let o = p(() => e.chatController?.textState.value), s = p(() => o.value?.isConnected ?? !1), c = p(() => o.value?.isThinking ?? !1), u = p(() => o.value?.connectionStatus === "disconnected" && !!o.value?.error), x = p(() => o.value?.connectionStatus !== "connected" && !o.value?.error), re = k(!1), j = p(() => e.chatController?.liveTurnBlocks?.value ?? []), se = p(() => {
4692
+ for (let e = j.value.length - 1; e >= 0; e--) {
4693
+ let t = j.value[e];
4682
4694
  if (t?.kind === "text") return t.id;
4683
4695
  }
4684
- }), he = p(() => e.chatController?.liveStreamMessageId?.value), z = p(() => {
4696
+ }), ce = p(() => e.chatController?.liveStreamMessageId?.value), R = p(() => {
4685
4697
  let t = e.chatController?.sharedMessages.value ?? [];
4686
- return P.value.length && he.value ? t.filter((e) => e.id !== he.value) : t;
4687
- }), ve = p(() => {
4688
- if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
4689
- }), B = p(() => e.chatController?.workJournal?.value), ye = p(() => {
4690
- if (!B.value && !P.value.length) return;
4691
- let e = z.value, t = e[e.length - 1];
4698
+ return j.value.length && ce.value ? t.filter((e) => e.id !== ce.value) : t;
4699
+ }), z = p(() => {
4700
+ if (!e.chatController?.workJournal?.value) return o.value?.workingDescription?.trim() || void 0;
4701
+ }), ve = p(() => e.chatController?.workJournal?.value), B = p(() => {
4702
+ if (!ve.value && !j.value.length) return;
4703
+ let e = R.value, t = e[e.length - 1];
4692
4704
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4693
- }), H = p(() => {
4705
+ }), ye = p(() => {
4694
4706
  let t = {};
4695
- for (let n of z.value) {
4707
+ for (let n of R.value) {
4696
4708
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4697
4709
  let r = e.chatController?.workJournalFor?.({
4698
4710
  activities: n.toolActivities,
@@ -4704,7 +4716,7 @@ var kr = [
4704
4716
  return t;
4705
4717
  });
4706
4718
  function messageWorkJournal(e) {
4707
- return H.value[e.id];
4719
+ return ye.value[e.id];
4708
4720
  }
4709
4721
  function inlineOffset(e, t) {
4710
4722
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -4752,47 +4764,56 @@ var kr = [
4752
4764
  text: t.slice(i)
4753
4765
  }), r;
4754
4766
  }
4755
- let be = p(() => s.value?.transientIssue), U = p(() => {
4756
- if (!u.value) return;
4757
- let e = z.value, t = e[e.length - 1];
4767
+ let H = p(() => o.value?.transientIssue), be = p(() => {
4768
+ if (!c.value) return;
4769
+ let e = R.value, t = e[e.length - 1];
4758
4770
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4759
- }), Se = p(() => !u.value || ve.value || B.value || P.value.length ? !1 : U.value === void 0), W = p(() => ve.value ?? (Se.value ? "Thinking…" : void 0)), Ce = p(() => s.value?.sendBlockedReason), we = p(() => Ce.value === "agent_deleted"), Te = p(() => x.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : re.value ? "Connecting..." : Ce.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Ee = p(() => e.chatController?.composerState?.value ?? {
4771
+ }), U = p(() => !c.value || z.value || ve.value || j.value.length ? !1 : be.value === void 0), Se = p(() => z.value ?? (U.value ? "Thinking…" : void 0)), W = p(() => o.value?.sendBlockedReason), Ce = p(() => W.value === "agent_deleted"), we = p(() => u.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : x.value ? "Connecting..." : W.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Te = p(() => e.chatController?.composerState?.value ?? {
4760
4772
  text: "",
4761
4773
  pendingAttachments: [],
4762
4774
  isUploading: !1
4763
- }), De = p({
4764
- get: () => Ee.value.text,
4775
+ }), Ee = p({
4776
+ get: () => Te.value.text,
4765
4777
  set: (t) => e.chatController?.setComposerText?.({ text: t })
4766
- }), Oe = p(() => Ee.value.pendingAttachments), ke = p(() => Ee.value.isUploading), G = p(() => e.chatController?.voiceRecorder), Ae = p(() => G.value?.isBusy.value ?? !1), je = p(() => e.chatController?.canAttachFile?.value ?? !1), Me = p(() => e.chatController?.canRecordAudio?.value ?? !1), Ne = p(() => e.chatController?.composerAction?.value ?? "idle"), Fe = p(() => Ne.value !== "idle"), Ie = p(() => Ne.value === "stop" ? "Stop reply" : "Send message"), Le = p(() => Me.value && !Ae.value && !!G.value?.canUseBrowserRecording), Re = p(() => G.value?.isActive.value ?? !1), Be = p(() => G.value?.elapsedLabel.value ?? "0:00"), Ve = p(() => G.value?.statusText.value ?? "Release to send"), He = p(() => G.value?.state.value.phase === "sending" ? "Sending voice message" : Re.value ? "Release to send voice message" : "Hold to record voice message"), K = p(() => e.variant === "light"), Ue = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), We = p(() => K.value ? "text-theme-300" : "text-white/30");
4778
+ }), De = p(() => Te.value.pendingAttachments), Oe = p(() => Te.value.isUploading), ke = p(() => e.chatController?.voiceRecorder), Ae = p(() => ke.value?.isBusy.value ?? !1), G = p(() => e.chatController?.canAttachFile?.value ?? !1), je = p(() => e.chatController?.canRecordAudio?.value ?? !1), Me = p(() => e.chatController?.composerAction?.value ?? "idle"), Ne = p(() => Me.value !== "idle"), Fe = p(() => Me.value === "stop" ? "Stop reply" : "Send message"), Ie = p(() => je.value && !Ae.value && !!ke.value?.canUseBrowserRecording), Le = p(() => ke.value?.isActive.value ?? !1), Re = p(() => ke.value?.elapsedLabel.value ?? "0:00"), Be = p(() => ke.value?.statusText.value ?? "Release to send"), Ve = p(() => ke.value?.state.value.phase === "sending" ? "Sending voice message" : Le.value ? "Release to send voice message" : "Hold to record voice message"), K = p(() => e.variant === "light"), He = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Ue = p(() => K.value ? "text-theme-300" : "text-white/30");
4767
4779
  ie(async () => {
4768
- e.chatController && !c.value && await e.chatController.startTextConversation();
4780
+ e.chatController && !s.value && await e.chatController.startTextConversation();
4769
4781
  }), ae(() => {
4770
4782
  e.chatController?.voiceRecorder?.teardown();
4771
4783
  });
4772
4784
  async function sendMessage() {
4773
- !e.chatController || Ne.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4785
+ if (!e.chatController || Me.value !== "send") return;
4786
+ i.value && (i.value.style.height = "auto", i.value.focus()), r.value?.pin();
4787
+ let t = e.chatController.sendComposerMessage();
4788
+ window.matchMedia("(hover: none) and (pointer: coarse)").matches && i.value?.blur(), await t;
4774
4789
  }
4775
4790
  async function handleCardAction(t) {
4776
- !e.chatController || we.value || (i.value?.pin(), await e.chatController.sendChatMessage(t));
4791
+ !e.chatController || Ce.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
4777
4792
  }
4778
4793
  async function sendSuggestedPrompt(t) {
4779
- !e.chatController || we.value || (i.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4794
+ !e.chatController || Ce.value || (r.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4780
4795
  }
4781
4796
  async function handleComposerAction() {
4782
- e.chatController && (Ne.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4797
+ if (e.chatController) {
4798
+ if (Me.value === "send") {
4799
+ await sendMessage();
4800
+ return;
4801
+ }
4802
+ await e.chatController.handleComposerAction();
4803
+ }
4783
4804
  }
4784
4805
  async function handleKeydown(e) {
4785
4806
  e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
4786
4807
  }
4787
4808
  function focusComposer(e) {
4788
- Re.value || we.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4809
+ Le.value || Ce.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
4789
4810
  }
4790
4811
  function adjustTextareaHeight() {
4791
- a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
4812
+ i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
4792
4813
  }
4793
- ue(De, () => ne(() => adjustTextareaHeight()));
4814
+ de(Ee, () => ne(() => adjustTextareaHeight()));
4794
4815
  function triggerFileInput() {
4795
- o.value?.click();
4816
+ a.value?.click();
4796
4817
  }
4797
4818
  async function handleFileSelect(t) {
4798
4819
  let n = t.target, r = n.files?.[0];
@@ -4802,10 +4823,10 @@ var kr = [
4802
4823
  e.chatController?.removeAttachment({ index: t });
4803
4824
  }
4804
4825
  function startRecording() {
4805
- G.value?.start();
4826
+ ke.value?.start();
4806
4827
  }
4807
4828
  function finishRecording(e) {
4808
- G.value?.finish(e);
4829
+ ke.value?.finish(e);
4809
4830
  }
4810
4831
  function shouldShowTimeDivider(e, t) {
4811
4832
  if (t === 0) {
@@ -4834,55 +4855,51 @@ var kr = [
4834
4855
  ...o ? {} : { year: "numeric" }
4835
4856
  })}, ${a}`;
4836
4857
  }
4837
- return (t, s) => (T(), _("div", {
4858
+ return (t, o) => (T(), _("div", {
4838
4859
  "data-test": "messaging-root",
4839
- class: S(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? ["min-h-0", r.value ? "max-sm:justify-end max-sm:overflow-hidden sm:[justify-content:safe_center] sm:overflow-y-auto" : "[justify-content:safe_center] overflow-y-auto"] : ""])
4860
+ class: S(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
4840
4861
  }, [
4841
4862
  e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
4842
4863
  agent: e.agent,
4843
- "is-online": c.value
4864
+ "is-online": s.value
4844
4865
  }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (T(), _("div", ui, [v("div", { class: S(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
4845
4866
  b(ze, {
4846
4867
  agent: e.agent,
4847
4868
  "is-light": K.value,
4848
4869
  class: "size-10"
4849
4870
  }, null, 8, ["agent", "is-light"]),
4850
- v("div", di, [v("div", fi, F(e.agent.displayName.value), 1), v("div", pi, F(e.agent.title.value || "Assistant"), 1)]),
4851
- e.headerMeta ? (T(), _("span", mi, F(e.headerMeta), 1)) : h("", !0)
4871
+ v("div", di, [v("div", fi, P(e.agent.displayName.value), 1), v("div", pi, P(e.agent.title.value || "Assistant"), 1)]),
4872
+ e.headerMeta ? (T(), _("span", mi, P(e.headerMeta), 1)) : h("", !0)
4852
4873
  ], 2)])) : h("", !0),
4853
- re.value ? (T(), _("div", {
4874
+ x.value ? (T(), _("div", {
4854
4875
  key: 2,
4855
4876
  class: S(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
4856
4877
  }, [b(_e, { class: "size-4" })], 2)) : e.setupHint ? (T(), _("div", {
4857
4878
  key: 3,
4858
- class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", We.value])
4859
- }, [s[20] || (s[20] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, F(e.setupHint), 1)], 2)) : h("", !0),
4879
+ class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Ue.value])
4880
+ }, [o[18] || (o[18] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, P(e.setupHint), 1)], 2)) : h("", !0),
4860
4881
  b(ci, {
4861
4882
  ref_key: "chatScroller",
4862
- ref: i,
4863
- class: S(z.value.length === 0 ? "flex-none" : "flex-1")
4883
+ ref: r,
4884
+ class: S(R.value.length === 0 ? "flex-none" : "flex-1")
4864
4885
  }, {
4865
- default: I(() => [v("div", { class: S([z.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? z.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4866
- z.value.length === 0 && !re.value ? (T(), _("div", {
4867
- key: 0,
4868
- "data-test": "messaging-empty-state",
4869
- class: S(["flex flex-col items-center justify-center px-4", r.value ? "max-sm:hidden" : ""])
4870
- }, [oe(t.$slots, "empty-heading", {
4886
+ default: F(() => [v("div", { class: S([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4887
+ R.value.length === 0 && !x.value ? (T(), _("div", hi, [oe(t.$slots, "empty-heading", {
4871
4888
  agent: e.agent,
4872
4889
  isLight: K.value
4873
4890
  }, () => [b(ze, {
4874
4891
  agent: e.agent,
4875
4892
  "is-light": K.value,
4876
4893
  class: "mb-4 size-20 @sm/chat:size-24"
4877
- }, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", We.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
4894
+ }, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, P(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", Ue.value]) }, P(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
4878
4895
  class: S(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4879
4896
  title: n.value.tooltip
4880
- }, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, F(n.value.label), 1)], 10, hi)], 64))], 2)) : h("", !0),
4881
- (T(!0), _(f, null, A(z.value, (e, t) => (T(), _(f, { key: e.id }, [
4882
- shouldShowTimeDivider(z.value, t) ? (T(), _("div", gi, [
4883
- v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2),
4884
- v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", We.value]) }, F(shouldShowTimeDivider(z.value, t)), 3),
4885
- v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2)
4897
+ }, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, P(n.value.label), 1)], 10, gi)], 64))])) : h("", !0),
4898
+ (T(!0), _(f, null, A(R.value, (e, t) => (T(), _(f, { key: e.id }, [
4899
+ shouldShowTimeDivider(R.value, t) ? (T(), _("div", _i, [
4900
+ v("div", { class: S(["flex-1 h-px", He.value]) }, null, 2),
4901
+ v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Ue.value]) }, P(shouldShowTimeDivider(R.value, t)), 3),
4902
+ v("div", { class: S(["flex-1 h-px", He.value]) }, null, 2)
4886
4903
  ])) : h("", !0),
4887
4904
  messageWorkJournal(e) ? (T(), _("div", {
4888
4905
  key: 1,
@@ -4892,7 +4909,7 @@ var kr = [
4892
4909
  }, [b(qe, {
4893
4910
  model: messageWorkJournal(e),
4894
4911
  "is-light": K.value
4895
- }, null, 8, ["model", "is-light"])], 8, _i)) : h("", !0),
4912
+ }, null, 8, ["model", "is-light"])], 8, vi)) : h("", !0),
4896
4913
  isSystemExplainerMessage(e) ? (T(), _("div", {
4897
4914
  key: 2,
4898
4915
  "data-test": "messaging-system-msg",
@@ -4905,14 +4922,14 @@ var kr = [
4905
4922
  "data-issue-bucket": e.issue?.bucket,
4906
4923
  "data-issue-action-label": e.issue?.actionLabel,
4907
4924
  "data-issue-action-url": e.issue?.actionUrl,
4908
- "data-streaming": e.id === U.value ? "true" : void 0,
4925
+ "data-streaming": e.id === be.value ? "true" : void 0,
4909
4926
  class: "flex gap-2 items-end justify-start mb-4"
4910
- }, [v("div", yi, [v("div", { class: S(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: S(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", K.value ? "bg-theme-25 border-theme-200 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (T(), m(ai, {
4927
+ }, [v("div", bi, [v("div", { class: S(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: S(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (T(), m(ai, {
4911
4928
  key: 0,
4912
4929
  text: e.text,
4913
4930
  inverted: !K.value,
4914
- streaming: e.id === U.value,
4915
- onClick: s[0] || (s[0] = R(() => {}, ["stop"])),
4931
+ streaming: e.id === be.value,
4932
+ onClick: o[0] || (o[0] = I(() => {}, ["stop"])),
4916
4933
  onAction: handleCardAction
4917
4934
  }, null, 8, [
4918
4935
  "text",
@@ -4927,8 +4944,8 @@ var kr = [
4927
4944
  href: e.issue.actionUrl,
4928
4945
  "data-test": "messaging-system-msg-action",
4929
4946
  class: S(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4930
- onClick: s[1] || (s[1] = R(() => {}, ["stop"]))
4931
- }, [te(F(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, bi)) : h("", !0)], 2)])], 8, vi)) : e.sender === "system" ? (T(), _("div", {
4947
+ onClick: o[1] || (o[1] = I(() => {}, ["stop"]))
4948
+ }, [te(P(e.issue.actionLabel) + " ", 1), o[19] || (o[19] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, xi)) : h("", !0)], 2)])], 8, yi)) : e.sender === "system" ? (T(), _("div", {
4932
4949
  key: 3,
4933
4950
  "data-test": "messaging-system-status-msg",
4934
4951
  "data-message-id": e.id,
@@ -4938,13 +4955,13 @@ var kr = [
4938
4955
  "data-system-kind": e.systemKind,
4939
4956
  "data-issue-code": e.issue?.code,
4940
4957
  "data-issue-bucket": e.issue?.bucket,
4941
- "data-streaming": e.id === U.value ? "true" : void 0,
4958
+ "data-streaming": e.id === be.value ? "true" : void 0,
4942
4959
  class: S(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"])
4943
- }, [s[22] || (s[22] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ai, {
4960
+ }, [o[20] || (o[20] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ai, {
4944
4961
  text: e.text,
4945
4962
  inverted: !K.value,
4946
- onClick: s[2] || (s[2] = R(() => {}, ["stop"]))
4947
- }, null, 8, ["text", "inverted"])], 10, xi)) : (T(), _("div", {
4963
+ onClick: o[2] || (o[2] = I(() => {}, ["stop"]))
4964
+ }, null, 8, ["text", "inverted"])], 10, Si)) : (T(), _("div", {
4948
4965
  key: 4,
4949
4966
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
4950
4967
  "data-message-id": e.id,
@@ -4952,11 +4969,11 @@ var kr = [
4952
4969
  "data-conversation-id": e.conversationId,
4953
4970
  "data-message-sequence": e.sequence,
4954
4971
  "data-system-kind": e.systemKind,
4955
- "data-streaming": e.id === U.value ? "true" : void 0,
4972
+ "data-streaming": e.id === be.value ? "true" : void 0,
4956
4973
  class: S(["flex gap-2 items-end", {
4957
4974
  "justify-end": e.sender === "user",
4958
4975
  "justify-start": e.sender === "agent",
4959
- "mb-6": isGroupEnd(z.value, t)
4976
+ "mb-6": isGroupEnd(R.value, t)
4960
4977
  }])
4961
4978
  }, [v("div", {
4962
4979
  "data-test": "messaging-message-body",
@@ -4971,14 +4988,14 @@ var kr = [
4971
4988
  "data-test": "messaging-attachment",
4972
4989
  "data-attachment-placement": "block",
4973
4990
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4974
- }, null, 8, Ci)) : e.type === "audio" ? (T(), _("audio", {
4991
+ }, null, 8, wi)) : e.type === "audio" ? (T(), _("audio", {
4975
4992
  key: 1,
4976
4993
  src: e.src,
4977
4994
  controls: "",
4978
4995
  "data-test": "messaging-attachment",
4979
4996
  "data-attachment-placement": "block",
4980
4997
  class: "max-w-full"
4981
- }, null, 8, wi)) : (T(), _("a", {
4998
+ }, null, 8, Ti)) : (T(), _("a", {
4982
4999
  key: 2,
4983
5000
  href: e.src,
4984
5001
  target: "_blank",
@@ -4986,15 +5003,15 @@ var kr = [
4986
5003
  "data-test": "messaging-attachment",
4987
5004
  "data-attachment-placement": "block",
4988
5005
  class: S(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4989
- }, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(e.filename), 1)], 10, Ti))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
5006
+ }, [o[21] || (o[21] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(e.filename), 1)], 10, Ei))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
4990
5007
  key: 1,
4991
5008
  "data-test": "messaging-message-content",
4992
- class: S(e.sender === "user" ? K.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : K.value ? "text-theme-800" : "text-white/95")
4993
- }, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Ei, [b(ai, {
5009
+ class: S(e.sender === "user" ? K.value ? "rounded-[14px] px-4 py-2.5 bg-theme-100 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : K.value ? "text-theme-800" : "text-white/95")
5010
+ }, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Di, [b(ai, {
4994
5011
  text: t.text,
4995
5012
  inverted: e.sender === "user" || !K.value,
4996
- streaming: e.id === U.value,
4997
- onClick: s[3] || (s[3] = R(() => {}, ["stop"])),
5013
+ streaming: e.id === be.value,
5014
+ onClick: o[3] || (o[3] = I(() => {}, ["stop"])),
4998
5015
  onAction: handleCardAction
4999
5016
  }, null, 8, [
5000
5017
  "text",
@@ -5007,14 +5024,14 @@ var kr = [
5007
5024
  "data-test": "messaging-attachment",
5008
5025
  "data-attachment-placement": t.placement,
5009
5026
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5010
- }, null, 8, Di)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
5027
+ }, null, 8, Oi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
5011
5028
  key: 2,
5012
5029
  src: t.attachment.src,
5013
5030
  controls: "",
5014
5031
  "data-test": "messaging-attachment",
5015
5032
  "data-attachment-placement": t.placement,
5016
5033
  class: "my-2 max-w-full"
5017
- }, null, 8, Oi)) : t.kind === "attachment" ? (T(), _("a", {
5034
+ }, null, 8, ki)) : t.kind === "attachment" ? (T(), _("a", {
5018
5035
  key: 3,
5019
5036
  href: t.attachment.src,
5020
5037
  target: "_blank",
@@ -5022,8 +5039,8 @@ var kr = [
5022
5039
  "data-test": "messaging-attachment",
5023
5040
  "data-attachment-placement": t.placement,
5024
5041
  class: S(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5025
- }, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(t.attachment.filename), 1)], 10, ki)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Si)),
5026
- e.id === ye.value ? (T(), _(f, { key: 5 }, [P.value.length ? (T(!0), _(f, { key: 0 }, A(P.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
5042
+ }, [o[22] || (o[22] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(t.attachment.filename), 1)], 10, Ai)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Ci)),
5043
+ e.id === B.value ? (T(), _(f, { key: 5 }, [j.value.length ? (T(!0), _(f, { key: 0 }, A(j.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
5027
5044
  key: 0,
5028
5045
  "data-test": "messaging-tool-activity",
5029
5046
  "data-journal-outcome": e.journal.outcome,
@@ -5031,7 +5048,7 @@ var kr = [
5031
5048
  }, [b(qe, {
5032
5049
  model: e.journal,
5033
5050
  "is-light": K.value
5034
- }, null, 8, ["model", "is-light"])], 8, Ai)) : e.kind === "text" && e.content ? (T(), _("div", {
5051
+ }, null, 8, ["model", "is-light"])], 8, ji)) : e.kind === "text" && e.content ? (T(), _("div", {
5035
5052
  key: 1,
5036
5053
  "data-test": "messaging-live-text-block",
5037
5054
  class: S(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
@@ -5039,68 +5056,68 @@ var kr = [
5039
5056
  text: e.content,
5040
5057
  inverted: !K.value,
5041
5058
  streaming: e.id === se.value,
5042
- onClick: s[4] || (s[4] = R(() => {}, ["stop"])),
5059
+ onClick: o[4] || (o[4] = I(() => {}, ["stop"])),
5043
5060
  onAction: handleCardAction
5044
5061
  }, null, 8, [
5045
5062
  "text",
5046
5063
  "inverted",
5047
5064
  "streaming"
5048
- ])], 2)) : (T(), _("div", ji, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : B.value ? (T(), _("div", {
5065
+ ])], 2)) : (T(), _("div", Mi, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : ve.value ? (T(), _("div", {
5049
5066
  key: 1,
5050
5067
  "data-test": "messaging-tool-activity",
5051
- "data-journal-outcome": B.value.outcome,
5068
+ "data-journal-outcome": ve.value.outcome,
5052
5069
  class: "mb-4 w-full"
5053
5070
  }, [b(qe, {
5054
- model: B.value,
5071
+ model: ve.value,
5055
5072
  "is-light": K.value
5056
- }, null, 8, ["model", "is-light"])], 8, Mi)) : h("", !0)], 64)) : h("", !0)
5073
+ }, null, 8, ["model", "is-light"])], 8, Ni)) : h("", !0)], 64)) : h("", !0)
5057
5074
  ], 64))), 128)),
5058
- W.value ? (T(), _("div", {
5075
+ Se.value ? (T(), _("div", {
5059
5076
  key: 1,
5060
- "data-test": ve.value ? "messaging-working-state" : "messaging-thinking-indicator",
5061
- "data-working-description": ve.value,
5077
+ "data-test": z.value ? "messaging-working-state" : "messaging-thinking-indicator",
5078
+ "data-working-description": z.value,
5062
5079
  role: "status",
5063
5080
  "aria-live": "polite",
5064
5081
  class: S(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-none", K.value ? "text-theme-500" : "text-white/50"])
5065
- }, [v("span", Pi, [(T(), _(f, null, A(3, (e) => v("span", {
5082
+ }, [v("span", Fi, [(T(), _(f, null, A(3, (e) => v("span", {
5066
5083
  key: e,
5067
5084
  "data-test": "messaging-thinking-dot",
5068
5085
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5069
5086
  style: C({ animationDelay: `${(e - 1) * .18}s` })
5070
- }, null, 4)), 64))]), v("span", Fi, F(W.value), 1)], 10, Ni)) : h("", !0),
5071
- be.value ? (T(), _("div", {
5087
+ }, null, 4)), 64))]), v("span", Ii, P(Se.value), 1)], 10, Pi)) : h("", !0),
5088
+ H.value ? (T(), _("div", {
5072
5089
  key: 2,
5073
5090
  "data-test": "messaging-transient-issue",
5074
- "data-issue-code": be.value.code,
5091
+ "data-issue-code": H.value.code,
5075
5092
  class: S(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", K.value ? "text-theme-600" : "text-white/60"])
5076
5093
  }, [
5077
- s[25] || (s[25] = v("i", {
5094
+ o[23] || (o[23] = v("i", {
5078
5095
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5079
5096
  "aria-hidden": "true"
5080
5097
  }, null, -1)),
5081
- v("span", null, [te(F(be.value.message), 1), be.value.help ? (T(), _(f, { key: 0 }, [te(F(be.value.help), 1)], 64)) : h("", !0)]),
5082
- be.value.actionUrl && be.value.actionLabel ? (T(), _("a", {
5098
+ v("span", null, [te(P(H.value.message), 1), H.value.help ? (T(), _(f, { key: 0 }, [te(P(H.value.help), 1)], 64)) : h("", !0)]),
5099
+ H.value.actionUrl && H.value.actionLabel ? (T(), _("a", {
5083
5100
  key: 0,
5084
- href: be.value.actionUrl,
5101
+ href: H.value.actionUrl,
5085
5102
  class: "shrink-0 underline underline-offset-2",
5086
- onClick: s[5] || (s[5] = R(() => {}, ["stop"]))
5087
- }, F(be.value.actionLabel), 9, Li)) : h("", !0)
5088
- ], 10, Ii)) : h("", !0)
5103
+ onClick: o[5] || (o[5] = I(() => {}, ["stop"]))
5104
+ }, P(H.value.actionLabel), 9, Ri)) : h("", !0)
5105
+ ], 10, Li)) : h("", !0)
5089
5106
  ], 2)]),
5090
5107
  _: 3
5091
5108
  }, 8, ["class"]),
5092
5109
  v("div", {
5093
5110
  "data-test": "messaging-composer-footer",
5094
5111
  class: S(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5095
- z.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5096
- e.centered && z.value.length > 0 ? "pt-0" : "pt-3",
5112
+ R.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5113
+ e.centered && R.value.length > 0 ? "pt-0" : "pt-3",
5097
5114
  K.value ? e.centered ? "bg-theme-25/50" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
5098
5115
  ]])
5099
5116
  }, [
5100
- Oe.value.length > 0 ? (T(), _("div", {
5117
+ De.value.length > 0 ? (T(), _("div", {
5101
5118
  key: 0,
5102
5119
  class: S(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5103
- }, [(T(!0), _(f, null, A(Oe.value, (e, t) => (T(), _("div", {
5120
+ }, [(T(!0), _(f, null, A(De.value, (e, t) => (T(), _("div", {
5104
5121
  key: t,
5105
5122
  class: "relative shrink-0 group"
5106
5123
  }, [e.type === "image" ? (T(), _("img", {
@@ -5108,17 +5125,17 @@ var kr = [
5108
5125
  src: e.src,
5109
5126
  alt: e.filename,
5110
5127
  class: S(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5111
- }, null, 10, Ri)) : (T(), _("div", {
5128
+ }, null, 10, zi)) : (T(), _("div", {
5112
5129
  key: 1,
5113
5130
  class: S(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5114
- }, [s[26] || (s[26] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", zi, F(e.filename), 1)], 2)), v("button", {
5131
+ }, [o[24] || (o[24] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Bi, P(e.filename), 1)], 2)), v("button", {
5115
5132
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
5116
5133
  onClick: (e) => removeAttachment(t)
5117
- }, [...s[27] || (s[27] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Bi)]))), 128)), ke.value ? (T(), _("div", Vi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5118
- je.value ? (T(), _("input", {
5134
+ }, [...o[25] || (o[25] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Vi)]))), 128)), Oe.value ? (T(), _("div", Hi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5135
+ G.value ? (T(), _("input", {
5119
5136
  key: 1,
5120
5137
  ref_key: "fileInput",
5121
- ref: o,
5138
+ ref: a,
5122
5139
  type: "file",
5123
5140
  accept: "image/*,audio/*,video/*",
5124
5141
  class: "hidden",
@@ -5126,22 +5143,22 @@ var kr = [
5126
5143
  }, null, 544)) : h("", !0),
5127
5144
  v("div", {
5128
5145
  "data-test": "messaging-composer",
5129
- "data-composer-action": Ne.value,
5130
- class: S(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto @lg/chat:pb-5 @lg/chat:pt-5" : "", K.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5146
+ "data-composer-action": Me.value,
5147
+ class: S(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto @lg/chat:pb-5 @lg/chat:pt-5" : "", K.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5131
5148
  onClick: focusComposer
5132
- }, [Re.value ? (T(), _("div", {
5149
+ }, [Le.value ? (T(), _("div", {
5133
5150
  key: 1,
5134
5151
  "data-test": "messaging-recording-state",
5135
5152
  class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5136
5153
  }, [
5137
- s[28] || (s[28] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5138
- v("span", Wi, F(Be.value), 1),
5139
- v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(Ve.value), 3)
5140
- ], 2)) : de((T(), _("textarea", {
5154
+ o[26] || (o[26] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5155
+ v("span", Gi, P(Re.value), 1),
5156
+ v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, P(Be.value), 3)
5157
+ ], 2)) : pe((T(), _("textarea", {
5141
5158
  key: 0,
5142
5159
  ref_key: "textarea",
5143
- ref: a,
5144
- "onUpdate:modelValue": s[6] || (s[6] = (e) => De.value = e),
5160
+ ref: i,
5161
+ "onUpdate:modelValue": o[6] || (o[6] = (e) => Ee.value = e),
5145
5162
  "data-test": "messaging-input",
5146
5163
  rows: "1",
5147
5164
  enterkeyhint: "send",
@@ -5150,92 +5167,82 @@ var kr = [
5150
5167
  autocapitalize: "sentences",
5151
5168
  autocorrect: "on",
5152
5169
  spellcheck: "true",
5153
- placeholder: Te.value,
5154
- disabled: we.value,
5170
+ placeholder: we.value,
5171
+ disabled: Ce.value,
5155
5172
  style: {
5156
5173
  fontSize: "16px",
5157
5174
  resize: "none"
5158
5175
  },
5159
5176
  class: S(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5160
- onKeydown: handleKeydown,
5161
- onFocus: s[7] || (s[7] = (e) => r.value = !0),
5162
- onBlur: s[8] || (s[8] = (e) => r.value = !1)
5163
- }, null, 42, Ui)), [[ce, De.value]]), v("div", Gi, [
5177
+ onKeydown: handleKeydown
5178
+ }, null, 42, Wi)), [[ue, Ee.value]]), v("div", Ki, [
5164
5179
  v("button", {
5165
5180
  class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
5166
- je.value ? "cursor-pointer" : "cursor-default",
5181
+ G.value ? "cursor-pointer" : "cursor-default",
5167
5182
  K.value ? "text-theme-500" : "text-white/50",
5168
- ke.value || Ae.value ? "opacity-50 pointer-events-none" : ""
5183
+ Oe.value || Ae.value ? "opacity-50 pointer-events-none" : ""
5169
5184
  ]]),
5170
- disabled: we.value || ke.value || Ae.value || !je.value,
5171
- "aria-label": je.value ? "Attach file" : "File attachments unavailable",
5172
- title: je.value ? "Attach file" : "File attachments unavailable",
5173
- onClick: s[9] || (s[9] = (e) => je.value && triggerFileInput())
5174
- }, [ke.value ? (T(), _("i", qi)) : (T(), _("i", Ji)), v("span", Yi, F(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Ki),
5175
- s[29] || (s[29] = v("div", { class: "flex-1" }, null, -1)),
5176
- v("div", Xi, [Le.value || Re.value ? (T(), _("button", {
5185
+ disabled: Ce.value || Oe.value || Ae.value || !G.value,
5186
+ "aria-label": G.value ? "Attach file" : "File attachments unavailable",
5187
+ title: G.value ? "Attach file" : "File attachments unavailable",
5188
+ onClick: o[7] || (o[7] = (e) => G.value && triggerFileInput())
5189
+ }, [Oe.value ? (T(), _("i", Ji)) : (T(), _("i", Yi)), v("span", Xi, P(G.value ? "Attach file" : "File attachments unavailable"), 1)], 10, qi),
5190
+ o[27] || (o[27] = v("div", { class: "flex-1" }, null, -1)),
5191
+ v("div", Zi, [Ie.value || Le.value ? (T(), _("button", {
5177
5192
  key: 0,
5178
5193
  "data-test": "messaging-record-audio-btn",
5179
- class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Re.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5180
- "aria-label": He.value,
5181
- title: He.value,
5182
- onPointerdown: s[10] || (s[10] = R((e) => startRecording(), ["prevent"])),
5183
- onPointerup: s[11] || (s[11] = R((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5184
- onPointercancel: s[12] || (s[12] = R((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5194
+ class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Le.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5195
+ "aria-label": Ve.value,
5196
+ title: Ve.value,
5197
+ onPointerdown: o[8] || (o[8] = I((e) => startRecording(), ["prevent"])),
5198
+ onPointerup: o[9] || (o[9] = I((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5199
+ onPointercancel: o[10] || (o[10] = I((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5185
5200
  onKeydown: [
5186
- s[13] || (s[13] = pe(R((e) => startRecording(), ["prevent"]), ["enter"])),
5187
- s[15] || (s[15] = pe(R((e) => startRecording(), ["prevent"]), ["space"])),
5188
- s[17] || (s[17] = pe(R((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5201
+ o[11] || (o[11] = he(I((e) => startRecording(), ["prevent"]), ["enter"])),
5202
+ o[13] || (o[13] = he(I((e) => startRecording(), ["prevent"]), ["space"])),
5203
+ o[15] || (o[15] = he(I((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5189
5204
  ],
5190
- onKeyup: [s[14] || (s[14] = pe(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = pe(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5191
- }, [v("i", { class: S([Re.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", Qi, F(He.value), 1)], 42, Zi)) : h("", !0), Re.value ? h("", !0) : (T(), _("button", {
5205
+ onKeyup: [o[12] || (o[12] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5206
+ }, [v("i", { class: S([Le.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", $i, P(Ve.value), 1)], 42, Qi)) : h("", !0), Le.value ? h("", !0) : (T(), _("button", {
5192
5207
  key: 1,
5193
5208
  "data-test": "messaging-send-btn",
5194
- "data-composer-action": Ne.value,
5195
- class: S(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Fe.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5196
- disabled: !Fe.value,
5197
- "aria-label": Ie.value,
5198
- title: Ie.value,
5199
- onClick: s[18] || (s[18] = (e) => handleComposerAction())
5200
- }, [Ne.value === "stop" ? (T(), _("i", ea)) : (T(), _("i", ta)), v("span", na, F(Ie.value), 1)], 10, $i))])
5201
- ])], 10, Hi),
5202
- K.value && e.centered && e.scope === "private" ? (T(), _("div", {
5203
- key: 2,
5204
- "data-test": "messaging-ai-disclosure",
5205
- class: S(["mt-2.5 text-center text-[12px] text-theme-300", r.value ? "max-sm:hidden" : ""])
5206
- }, F(e.agent.displayName.value) + " is AI and can make mistakes. ", 3)) : h("", !0),
5207
- z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", {
5208
- key: 3,
5209
- "data-test": "messaging-suggested-prompts",
5210
- class: S(["mt-5 w-full sm:mx-auto sm:max-w-[720px]", r.value ? "max-sm:hidden" : ""])
5211
- }, [v("div", ra, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
5209
+ "data-composer-action": Me.value,
5210
+ class: S(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Ne.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5211
+ disabled: !Ne.value,
5212
+ "aria-label": Fe.value,
5213
+ title: Fe.value,
5214
+ onClick: o[16] || (o[16] = (e) => handleComposerAction())
5215
+ }, [Me.value === "stop" ? (T(), _("i", ta)) : (T(), _("i", na)), v("span", ra, P(Fe.value), 1)], 10, ea))])
5216
+ ])], 10, Ui),
5217
+ K.value && e.centered && e.scope === "private" ? (T(), _("div", ia, P(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5218
+ R.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", aa, [v("div", oa, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
5212
5219
  key: e.id,
5213
5220
  type: "button",
5214
- disabled: we.value,
5221
+ disabled: Ce.value,
5215
5222
  "data-test": "messaging-suggested-prompt",
5216
- class: S(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [we.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !j.value && t >= 3 ? "max-sm:hidden" : ""]]),
5223
+ class: S(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Ce.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !re.value && t >= 3 ? "max-sm:hidden" : ""]]),
5217
5224
  onClick: (t) => sendSuggestedPrompt(e)
5218
- }, F(e.label), 11, ia))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
5225
+ }, P(e.label), 11, sa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
5219
5226
  key: 0,
5220
5227
  type: "button",
5221
5228
  "data-test": "messaging-suggested-prompts-more",
5222
- "aria-expanded": j.value,
5229
+ "aria-expanded": re.value,
5223
5230
  class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
5224
- onClick: s[19] || (s[19] = (e) => j.value = !j.value)
5225
- }, [te(F(j.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", j.value ? "rotate-180" : ""]) }, null, 2)], 8, aa)) : h("", !0)])], 2)) : h("", !0)
5231
+ onClick: o[17] || (o[17] = (e) => re.value = !re.value)
5232
+ }, [te(P(re.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", re.value ? "rotate-180" : ""]) }, null, 2)], 8, ca)) : h("", !0)])])) : h("", !0)
5226
5233
  ], 2)
5227
5234
  ], 2));
5228
5235
  }
5229
- }), sa = { class: "agent-wrap" }, ca = {
5236
+ }), ua = { class: "agent-wrap" }, da = {
5230
5237
  key: 0,
5231
5238
  class: "flex items-center justify-center h-full"
5232
- }, la = {
5239
+ }, fa = {
5233
5240
  key: 2,
5234
5241
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5235
5242
  role: "status",
5236
5243
  "aria-live": "polite",
5237
5244
  "data-test": "agent-unavailable"
5238
- }, ua = /* @__PURE__ */ x({
5245
+ }, pa = /* @__PURE__ */ x({
5239
5246
  __name: "AgentWrap",
5240
5247
  props: {
5241
5248
  sdk: {},
@@ -5255,7 +5262,7 @@ var kr = [
5255
5262
  let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5256
5263
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5257
5264
  ...i.apiBase && { apiBase: i.apiBase }
5258
- }), s = P(!i.agent), c = P(i.agent ? new n({ config: i.agent }) : void 0), u = P();
5265
+ }), s = se(!i.agent), c = se(i.agent ? new n({ config: i.agent }) : void 0), u = se();
5259
5266
  async function loadAgent() {
5260
5267
  if (i.agent) {
5261
5268
  r.debug("Agent provided via props, skipping fetch", {
@@ -5331,15 +5338,15 @@ var kr = [
5331
5338
  });
5332
5339
  }
5333
5340
  }
5334
- return ie(loadAgent), (t, n) => (T(), _("div", sa, [s.value ? (T(), _("div", ca, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
5335
- sdk: se(o),
5341
+ return ie(loadAgent), (t, n) => (T(), _("div", ua, [s.value ? (T(), _("div", da, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
5342
+ sdk: ce(o),
5336
5343
  agent: c.value,
5337
5344
  context: e.clientContext ?? e.context,
5338
5345
  firstMessage: e.firstMessage,
5339
5346
  buttonText: e.buttonText,
5340
5347
  buttonIcon: e.buttonIcon,
5341
5348
  loading: s.value
5342
- }, void 0, void 0, 1) : u.value ? (T(), _("div", la, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5349
+ }, void 0, void 0, 1) : u.value ? (T(), _("div", fa, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5343
5350
  type: "button",
5344
5351
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5345
5352
  "data-test": "agent-unavailable-retry",
@@ -5348,6 +5355,6 @@ var kr = [
5348
5355
  }
5349
5356
  });
5350
5357
  //#endregion
5351
- export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, oa as n, De as o, n as p, ai as r, Te as s, ua as t, parseButtonTemplate as u };
5358
+ export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, la as n, De as o, n as p, ai as r, Te as s, pa as t, parseButtonTemplate as u };
5352
5359
 
5353
5360
  //# sourceMappingURL=AgentWrap.js.map