@pagelines/sdk 1.0.928 → 1.0.930

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/BotWrap.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { t as e } from "./rolldown-runtime.js";
2
2
  import { c as t, t as n } from "./sdkClient.js";
3
3
  import { CUSTOMER_COMPUTER_STATE_LABEL as r, SettingsObject as o, chatTransportError as s, createLogger as c, customerComputerState as u, getDefaultAvatarUrl as d, isAssistantSilenceControl as p, parseChatCardFencePayload as m, parseChatVisualFencePayload as g } from "@pagelines/core";
4
- import { Fragment as y, Teleport as b, Transition as x, computed as S, createBlock as T, createCommentVNode as E, createElementBlock as O, createElementVNode as k, createTextVNode as j, createVNode as M, defineComponent as N, guardReactiveProps as P, nextTick as ee, normalizeClass as F, normalizeProps as I, normalizeStyle as L, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as R, ref as H, renderList as W, renderSlot as se, resolveDynamicComponent as ce, shallowRef as G, toDisplayString as K, unref as ue, useTemplateRef as de, vModelText as fe, watch as q, withCtx as pe, withDirectives as me, withKeys as he, withModifiers as ge } from "vue";
4
+ import { Fragment as y, Teleport as b, Transition as x, computed as S, createBlock as T, createCommentVNode as E, createElementBlock as O, createElementVNode as k, createSlots as ee, createTextVNode as te, createVNode as j, defineComponent as M, guardReactiveProps as ne, mergeModels as N, nextTick as P, normalizeClass as F, normalizeProps as re, normalizeStyle as I, onBeforeUnmount as se, onMounted as ce, onUnmounted as ue, openBlock as L, ref as R, renderList as H, renderSlot as de, resolveDynamicComponent as fe, shallowRef as W, toDisplayString as G, unref as pe, useModel as K, useTemplateRef as me, vModelText as he, watch as ge, withCtx as ve, withDirectives as be, withKeys as Ce, withModifiers as we } from "vue";
5
5
  // \0plugin-vue:export-helper
6
- var ve = /* @__PURE__ */ e((e, t) => {
6
+ var Te = /* @__PURE__ */ e((e, t) => {
7
7
  let n = e.__vccOpts || e;
8
8
  for (let [e, r] of t) n[e] = r;
9
9
  return n;
10
- }, "default"), be = {}, Ce = { class: "spinner max-w-sm" };
10
+ }, "default"), Ee = {}, q = { class: "spinner max-w-sm" };
11
11
  function _sfc_render(e, t) {
12
- return R(), O("div", Ce, [...t[0] || (t[0] = [k("svg", {
12
+ return L(), O("div", q, [...t[0] || (t[0] = [k("svg", {
13
13
  class: "ring-circular h-full w-full origin-center",
14
14
  viewBox: "25 25 50 50"
15
15
  }, [k("circle", {
@@ -23,7 +23,7 @@ function _sfc_render(e, t) {
23
23
  "stroke-miterlimit": "30"
24
24
  })], -1)])]);
25
25
  }
26
- var we = /*#__PURE__*/ ve(be, [["render", _sfc_render]]);
26
+ var De = /*#__PURE__*/ Te(Ee, [["render", _sfc_render]]);
27
27
  // bot/VoiceRecorderController.ts
28
28
  function formatVoiceRecordingDuration(e) {
29
29
  let t = Math.max(0, Math.floor(e.ms / 1e3));
@@ -39,9 +39,9 @@ function recorderMimeType() {
39
39
  "audio/webm"
40
40
  ].find((e) => MediaRecorder.isTypeSupported?.(e)) || "";
41
41
  }
42
- var Te = 400, VoiceRecorderController = class extends o {
42
+ var J = 400, VoiceRecorderController = class extends o {
43
43
  constructor(e) {
44
- super("VoiceRecorderController", e), t(this, "state", H({
44
+ super("VoiceRecorderController", e), t(this, "state", R({
45
45
  phase: "idle",
46
46
  elapsedMs: 0
47
47
  })), t(this, "isActive", S(() => this.state.value.phase !== "idle")), t(this, "isBusy", S(() => this.state.value.phase !== "idle")), t(this, "elapsedLabel", S(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), t(this, "statusText", S(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), t(this, "recorder", void 0), t(this, "stream", void 0), t(this, "chunks", []), t(this, "timer", void 0), t(this, "startedAt", 0), t(this, "cancelOnStop", !1), t(this, "stopAfterStart", !1), t(this, "startToken", 0);
@@ -73,7 +73,7 @@ var Te = 400, VoiceRecorderController = class extends o {
73
73
  this.stream = t, this.recorder = r, this.chunks = [], r.addEventListener("dataavailable", (e) => {
74
74
  e.data.size > 0 && this.chunks.push(e.data);
75
75
  }), r.addEventListener("stop", async () => {
76
- let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = this.now() - this.startedAt, o = !this.cancelOnStop && e.size > 0 && t >= Te;
76
+ let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = this.now() - this.startedAt, o = !this.cancelOnStop && e.size > 0 && t >= J;
77
77
  this.stopCapture(), o && (this.state.value = {
78
78
  phase: "sending",
79
79
  elapsedMs: this.state.value.elapsedMs
@@ -141,7 +141,7 @@ var Te = 400, VoiceRecorderController = class extends o {
141
141
  function durableJournalOutcome(e) {
142
142
  return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
143
143
  }
144
- var J = {
144
+ var Oe = {
145
145
  finishing: "Finishing up",
146
146
  slowHint: "Taking longer than usual.",
147
147
  completed: "Work complete",
@@ -149,7 +149,7 @@ var J = {
149
149
  stopped: "Stopped",
150
150
  notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
151
151
  leaveHint: "Taking longer than usual. You can leave this chat while I work."
152
- }, Ee = 1e4, Y = 15e3, De = 6e4, Oe = 3;
152
+ }, ke = 1e4, Ae = 15e3, je = 6e4, Me = 3;
153
153
  function toMs(e) {
154
154
  if (!e) return;
155
155
  let t = Date.parse(e);
@@ -165,7 +165,7 @@ function milestoneRows(e, t) {
165
165
  let n = e.filter((e) => e.status === "completed" || e.status === "failed" && !!e.note).filter((e) => !t.has(e.activityId)).slice().sort(byEvent), r = [];
166
166
  for (let e of n) {
167
167
  let t = e.status === "completed" ? "done" : "failed", n = r[r.length - 1];
168
- t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= Y ? (n.count += 1, n.lastMs = eventMs(e)) : r.push({
168
+ t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= Ae ? (n.count += 1, n.lastMs = eventMs(e)) : r.push({
169
169
  id: e.activityId,
170
170
  tone: t,
171
171
  label: e.label,
@@ -182,12 +182,12 @@ function milestoneRows(e, t) {
182
182
  }));
183
183
  }
184
184
  function splitRows(e) {
185
- return e.length <= Oe ? {
185
+ return e.length <= Me ? {
186
186
  visibleRows: e,
187
187
  hiddenRows: []
188
188
  } : {
189
- visibleRows: e.slice(e.length - Oe),
190
- hiddenRows: e.slice(0, e.length - Oe)
189
+ visibleRows: e.slice(e.length - Me),
190
+ hiddenRows: e.slice(0, e.length - Me)
191
191
  };
192
192
  }
193
193
  function buildWorkJournalModel(e) {
@@ -199,7 +199,7 @@ function buildWorkJournalModel(e) {
199
199
  terminal: {
200
200
  id: "work-complete",
201
201
  tone: "completed",
202
- label: J.completed
202
+ label: Oe.completed
203
203
  }
204
204
  };
205
205
  if (n === "failed") {
@@ -213,7 +213,7 @@ function buildWorkJournalModel(e) {
213
213
  terminal: {
214
214
  id: "work-failed",
215
215
  tone: "failed",
216
- label: J.failed,
216
+ label: Oe.failed,
217
217
  ...c && e?.note ? { note: e.note } : {}
218
218
  }
219
219
  };
@@ -227,18 +227,18 @@ function buildWorkJournalModel(e) {
227
227
  terminal: {
228
228
  id: "work-stopped",
229
229
  tone: "stopped",
230
- label: J.stopped
230
+ label: Oe.stopped
231
231
  }
232
232
  };
233
233
  }
234
234
  let { visibleRows: u, hiddenRows: d } = splitRows(milestoneRows(t, /* @__PURE__ */ new Set())), p = t.filter((e) => e.status === "started").sort(byEvent).pop(), m = t.reduce((e, t) => Math.max(e, eventMs(t)), s ?? -Infinity), g = Number.isFinite(m) ? m : r, y = t.reduce((e, t) => {
235
235
  let n = toMs(t.startedAt) ?? toMs(t.endedAt);
236
236
  return n === void 0 ? e : Math.min(e, n);
237
- }, Infinity), b = g + Ee, x = (Number.isFinite(y) ? y : g) + De, S = r >= b, T = p || S ? {
237
+ }, Infinity), b = g + ke, x = (Number.isFinite(y) ? y : g) + je, S = r >= b, T = p || S ? {
238
238
  id: p?.activityId ?? "work-active",
239
239
  tone: "active",
240
- label: p?.label ?? J.finishing
241
- } : void 0, E = S && r >= x ? o ? J.notifyHint : J.leaveHint : void 0, O = [b, x].filter((e) => e > r).sort((e, t) => e - t)[0];
240
+ label: p?.label ?? Oe.finishing
241
+ } : void 0, E = S && r >= x ? o ? Oe.notifyHint : Oe.leaveHint : void 0, O = [b, x].filter((e) => e > r).sort((e, t) => e - t)[0];
242
242
  return {
243
243
  outcome: n,
244
244
  visibleRows: u,
@@ -331,12 +331,12 @@ var BotChatController = class extends o {
331
331
  super("BotChatController", e), t(this, "isTextMode", !1), t(this, "lastMessage", {
332
332
  hash: "",
333
333
  time: 0
334
- }), t(this, "isConnecting", !1), t(this, "turnEpoch", 0), t(this, "nextStreamToken", 0), t(this, "runningStreamToken", void 0), t(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), t(this, "queuedMessageIdSet", H(/* @__PURE__ */ new Set())), t(this, "queuedMessageIds", S(() => this.queuedMessageIdSet.value)), t(this, "boundaryTimer", void 0), t(this, "nowMs", G(Date.now())), t(this, "toolActivityTiming", G({})), t(this, "lastVisibleProgressAtMs", G()), t(this, "liveSegments", G([])), t(this, "liveStreamMessageId", G(void 0)), t(this, "conversationId", void 0), t(this, "textState", H({
334
+ }), t(this, "isConnecting", !1), t(this, "turnEpoch", 0), t(this, "nextStreamToken", 0), t(this, "runningStreamToken", void 0), t(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), t(this, "queuedMessageIdSet", R(/* @__PURE__ */ new Set())), t(this, "queuedMessageIds", S(() => this.queuedMessageIdSet.value)), t(this, "boundaryTimer", void 0), t(this, "nowMs", W(Date.now())), t(this, "toolActivityTiming", W({})), t(this, "lastVisibleProgressAtMs", W()), t(this, "liveSegments", W([])), t(this, "liveStreamMessageId", W(void 0)), t(this, "conversationId", void 0), t(this, "textState", R({
335
335
  isActive: !1,
336
336
  isConnected: !1,
337
337
  isThinking: !1,
338
338
  connectionStatus: "disconnected"
339
- })), t(this, "botMode", H("self")), t(this, "sharedMessages", H([])), t(this, "composerState", H({
339
+ })), t(this, "botMode", R("self")), t(this, "sharedMessages", R([])), t(this, "composerState", R({
340
340
  text: "",
341
341
  pendingAttachments: [],
342
342
  isUploading: !1
@@ -510,7 +510,7 @@ var BotChatController = class extends o {
510
510
  });
511
511
  }
512
512
  setupBoundaryWatcher() {
513
- q(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
513
+ ge(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
514
514
  this.scheduleBoundary(e);
515
515
  });
516
516
  }
@@ -572,12 +572,12 @@ var BotChatController = class extends o {
572
572
  });
573
573
  }
574
574
  setupModeWatcher() {
575
- q(this.botMode, async (e, t) => {
575
+ ge(this.botMode, async (e, t) => {
576
576
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
577
577
  });
578
578
  }
579
579
  setupAvailabilityWatcher() {
580
- q(() => [this.chatEnabled, this._bot.state.value.lifecycle], ([e]) => {
580
+ ge(() => [this.chatEnabled, this._bot.state.value.lifecycle], ([e]) => {
581
581
  this.isTextMode && !this.isConnecting && (e ? this.textState.value.isConnected || this.updateState(this.textState, {
582
582
  isConnected: !0,
583
583
  connectionStatus: "connected",
@@ -896,10 +896,10 @@ function parseButtonTemplate(e) {
896
896
  return t.replace(/{name}/g, n.name || "Assistant").replace(/{title}/g, n.title || "").replace(/{handle}/g, n.handle || "");
897
897
  }
898
898
  // bot/ui/ElBotButton.vue?vue&type=script&setup=true&lang.ts
899
- var ke = {
899
+ var Ne = {
900
900
  key: 0,
901
901
  class: "absolute inset-0 flex items-center justify-center"
902
- }, Ae = /* @__PURE__ */ N({
902
+ }, Fe = /* @__PURE__ */ M({
903
903
  __name: "ElBotButton",
904
904
  props: {
905
905
  theme: { default: "primary" },
@@ -927,25 +927,25 @@ var ke = {
927
927
  md: "size-4",
928
928
  lg: "size-5"
929
929
  })[e.size]);
930
- return (o, s) => (R(), O("button", { class: F(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (R(), O("div", ke, [...s[0] || (s[0] = [k("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : E("", !0), k("span", { class: F(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
931
- e.icon ? (R(), O("i", {
930
+ return (o, s) => (L(), O("button", { class: F(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (L(), O("div", Ne, [...s[0] || (s[0] = [k("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : E("", !0), k("span", { class: F(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
931
+ e.icon ? (L(), O("i", {
932
932
  key: 0,
933
933
  class: F([e.icon, r.value])
934
934
  }, null, 2)) : E("", !0),
935
- se(o.$slots, "default"),
936
- e.iconAfter ? (R(), O("i", {
935
+ de(o.$slots, "default"),
936
+ e.iconAfter ? (L(), O("i", {
937
937
  key: 1,
938
938
  class: F([e.iconAfter, r.value])
939
939
  }, null, 2)) : E("", !0)
940
940
  ], 2)], 2));
941
941
  }
942
- }), je = ["value"], Me = /* @__PURE__ */ N({
942
+ }), Ie = ["value"], Le = /* @__PURE__ */ M({
943
943
  __name: "BotInputEmail",
944
944
  props: { modelValue: { default: "" } },
945
945
  emits: ["update:modelValue"],
946
946
  setup(e, { emit: t }) {
947
947
  let n = t;
948
- return (t, r) => (R(), O("input", {
948
+ return (t, r) => (L(), O("input", {
949
949
  name: "username",
950
950
  type: "email",
951
951
  inputmode: "email",
@@ -958,9 +958,9 @@ var ke = {
958
958
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
959
959
  style: { "font-size": "16px" },
960
960
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
961
- }, null, 40, je));
961
+ }, null, 40, Ie));
962
962
  }
963
- }), Ne = ["placeholder", "value"], Fe = /* @__PURE__ */ N({
963
+ }), Re = ["placeholder", "value"], ze = /* @__PURE__ */ M({
964
964
  __name: "BotInputOneTimeCode",
965
965
  props: {
966
966
  modelValue: {},
@@ -969,15 +969,15 @@ var ke = {
969
969
  },
970
970
  emits: ["update:modelValue", "autoSubmit"],
971
971
  setup(e, { emit: t }) {
972
- let n = e, r = t, o = H(null), s = S(() => "0".repeat(n.length));
973
- ne(() => {
972
+ let n = e, r = t, o = R(null), s = S(() => "0".repeat(n.length));
973
+ ce(() => {
974
974
  n.focusFirst && !("ontouchstart" in window) && o.value?.focus();
975
975
  });
976
976
  function onInput(e) {
977
977
  let t = e.target.value.replace(/\D/g, "").slice(0, n.length);
978
978
  r("update:modelValue", t), t.length === n.length && r("autoSubmit", t);
979
979
  }
980
- return (t, n) => (R(), O("input", {
980
+ return (t, n) => (L(), O("input", {
981
981
  ref_key: "input",
982
982
  ref: o,
983
983
  name: "one-time-code",
@@ -993,12 +993,12 @@ var ke = {
993
993
  class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
994
994
  style: { "font-size": "16px" },
995
995
  onInput
996
- }, null, 40, Ne));
996
+ }, null, 40, Re));
997
997
  }
998
- }), Ie = { class: "relative flex-shrink-0" }, Le = ["src", "alt"], Re = { class: "absolute top-1 right-1" }, ze = {
998
+ }), Be = { class: "relative flex-shrink-0" }, Ve = ["src", "alt"], He = { class: "absolute top-1 right-1" }, Ue = {
999
999
  key: 1,
1000
1000
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1001
- }, Be = { class: "min-w-0" }, Ve = /* @__PURE__ */ N({
1001
+ }, We = { class: "min-w-0" }, Ge = /* @__PURE__ */ M({
1002
1002
  __name: "ElModeHeader",
1003
1003
  props: {
1004
1004
  bot: {},
@@ -1010,15 +1010,15 @@ var ke = {
1010
1010
  layout: { default: "centered" }
1011
1011
  },
1012
1012
  setup(e) {
1013
- return (t, n) => (R(), O("div", { class: F(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [k("div", Ie, [k("div", { class: F(["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"]) }, [k("img", {
1013
+ return (t, n) => (L(), O("div", { class: F(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [k("div", Be, [k("div", { class: F(["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"]) }, [k("img", {
1014
1014
  src: e.bot.avatarUrl.value,
1015
1015
  alt: e.bot.displayName.value,
1016
1016
  class: "w-full h-full object-cover",
1017
- onError: n[0] || (n[0] = (...e) => ue(handleImageError) && ue(handleImageError)(...e))
1018
- }, null, 40, Le)], 2), k("div", Re, [e.isOnline ? (R(), O(y, { key: 0 }, [n[1] || (n[1] = k("div", {
1017
+ onError: n[0] || (n[0] = (...e) => pe(handleImageError) && pe(handleImageError)(...e))
1018
+ }, null, 40, Ve)], 2), k("div", He, [e.isOnline ? (L(), O(y, { key: 0 }, [n[1] || (n[1] = k("div", {
1019
1019
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1020
1020
  style: { "animation-duration": "3s" }
1021
- }, null, -1)), n[2] || (n[2] = k("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (R(), O("div", ze))])]), k("div", Be, [k("h1", { class: F(["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" : ""]]) }, K(e.bot.displayName.value), 3), k("p", { class: F(["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"]]) }, K(e.layout === "horizontal" ? e.bot.title.value || "Assistant" : e.bot.title.value), 3)])], 2));
1021
+ }, null, -1)), n[2] || (n[2] = k("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (L(), O("div", Ue))])]), k("div", We, [k("h1", { class: F(["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" : ""]]) }, G(e.bot.displayName.value), 3), k("p", { class: F(["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"]]) }, G(e.layout === "horizontal" ? e.bot.title.value || "Assistant" : e.bot.title.value), 3)])], 2));
1022
1022
  }
1023
1023
  });
1024
1024
  // bot/voice/voice-end-copy.ts
@@ -1032,7 +1032,7 @@ function voiceEndNotice(e, t) {
1032
1032
  }
1033
1033
  }
1034
1034
  // bot/ui/BotAvatar.vue?vue&type=script&setup=true&lang.ts
1035
- var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We = ["src", "alt"], Ge = ["aria-label"], Ke = /* @__PURE__ */ N({
1035
+ var Ke = { class: "relative shrink-0 rounded-full" }, qe = ["src", "alt"], Je = ["src", "alt"], Ye = ["aria-label"], Xe = /* @__PURE__ */ M({
1036
1036
  __name: "BotAvatar",
1037
1037
  props: {
1038
1038
  bot: {},
@@ -1064,26 +1064,26 @@ var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We =
1064
1064
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1065
1065
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1066
1066
  }, o = S(() => e.isLight ? "ring-white" : "ring-theme-900");
1067
- return (t, s) => (R(), O("div", He, [
1067
+ return (t, s) => (L(), O("div", Ke, [
1068
1068
  k("img", {
1069
1069
  src: e.bot.avatarUrl.value,
1070
1070
  alt: e.bot.displayName.value,
1071
1071
  class: F(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1072
- }, null, 10, Ue),
1073
- e.showOwnerMark && e.bot.ownerMarkUrl.value ? (R(), O("img", {
1072
+ }, null, 10, qe),
1073
+ e.showOwnerMark && e.bot.ownerMarkUrl.value ? (L(), O("img", {
1074
1074
  key: 0,
1075
1075
  src: e.bot.ownerMarkUrl.value,
1076
1076
  alt: e.bot.owner.value?.fullName ? `Owned by ${e.bot.owner.value.fullName}` : "Owner",
1077
1077
  class: F(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", o.value])
1078
- }, null, 10, We)) : E("", !0),
1079
- n.value ? (R(), O("span", {
1078
+ }, null, 10, Je)) : E("", !0),
1079
+ n.value ? (L(), O("span", {
1080
1080
  key: 1,
1081
1081
  role: "status",
1082
1082
  "aria-label": e.bot.state.value.tooltip,
1083
1083
  class: F(["absolute z-10 rounded-full ring-2", [n.value, o.value]]),
1084
1084
  style: r
1085
- }, null, 10, Ge)) : E("", !0),
1086
- n.value && e.bot.state.value.lifecycle === "running" ? (R(), O("span", {
1085
+ }, null, 10, Ye)) : E("", !0),
1086
+ n.value && e.bot.state.value.lifecycle === "running" ? (L(), O("span", {
1087
1087
  key: 2,
1088
1088
  "aria-hidden": "true",
1089
1089
  class: F(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
@@ -1091,28 +1091,28 @@ var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We =
1091
1091
  }, null, 2)) : E("", !0)
1092
1092
  ]));
1093
1093
  }
1094
- }), qe = {
1094
+ }), Ze = {
1095
1095
  key: 0,
1096
1096
  class: "sr-only",
1097
1097
  role: "status",
1098
1098
  "aria-live": "polite"
1099
- }, Je = ["aria-expanded", "disabled"], Ye = ["aria-expanded"], Xe = {
1099
+ }, Qe = ["aria-expanded", "disabled"], $e = ["aria-expanded"], et = {
1100
1100
  class: "flex w-5 shrink-0 justify-center self-stretch",
1101
1101
  "aria-hidden": "true"
1102
- }, Ze = ["data-journal-row"], Qe = {
1102
+ }, tt = ["data-journal-row"], nt = {
1103
1103
  class: "flex w-5 shrink-0 flex-col items-center self-stretch",
1104
1104
  "aria-hidden": "true"
1105
- }, $e = { class: "flex h-[17px] shrink-0 items-center" }, et = {
1105
+ }, rt = { class: "flex h-[17px] shrink-0 items-center" }, it = {
1106
1106
  key: 0,
1107
1107
  class: "sr-only"
1108
- }, tt = /* @__PURE__ */ N({
1108
+ }, at = /* @__PURE__ */ M({
1109
1109
  __name: "BotToolActivityGroup",
1110
1110
  props: {
1111
1111
  model: {},
1112
1112
  isLight: { type: Boolean }
1113
1113
  },
1114
1114
  setup(e) {
1115
- let t = e, n = G(!1);
1115
+ let t = e, n = W(!1);
1116
1116
  function toggle() {
1117
1117
  n.value = !n.value;
1118
1118
  }
@@ -1184,9 +1184,9 @@ var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We =
1184
1184
  }
1185
1185
  };
1186
1186
  });
1187
- return (t, p) => (R(), O("div", { class: F(["w-full py-0.5", u.value.muted]) }, [
1188
- s.value ? (R(), O("span", qe, K(s.value), 1)) : E("", !0),
1189
- r.value ? (R(), O("button", {
1187
+ return (t, p) => (L(), O("div", { class: F(["w-full py-0.5", u.value.muted]) }, [
1188
+ s.value ? (L(), O("span", Ze, G(s.value), 1)) : E("", !0),
1189
+ r.value ? (L(), O("button", {
1190
1190
  key: 1,
1191
1191
  type: "button",
1192
1192
  "data-test": "messaging-tool-activity-summary",
@@ -1201,13 +1201,13 @@ var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We =
1201
1201
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1202
1202
  "aria-hidden": "true"
1203
1203
  }, null, -1)),
1204
- k("span", { class: F(["text-[12px] font-medium leading-none", u.value.muted]) }, K(e.model.terminal?.label), 3),
1205
- o.value ? (R(), O("i", {
1204
+ k("span", { class: F(["text-[12px] font-medium leading-none", u.value.muted]) }, G(e.model.terminal?.label), 3),
1205
+ o.value ? (L(), O("i", {
1206
1206
  key: 0,
1207
1207
  class: F(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", u.value.muted]]),
1208
1208
  "aria-hidden": "true"
1209
1209
  }, null, 2)) : E("", !0)
1210
- ], 10, Je)) : o.value ? (R(), O("button", {
1210
+ ], 10, Qe)) : o.value ? (L(), O("button", {
1211
1211
  key: 2,
1212
1212
  type: "button",
1213
1213
  "data-test": "messaging-tool-activity-summary",
@@ -1215,33 +1215,33 @@ var He = { class: "relative shrink-0 rounded-full" }, Ue = ["src", "alt"], We =
1215
1215
  "aria-expanded": n.value,
1216
1216
  class: F(["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", u.value.ring]),
1217
1217
  onClick: toggle
1218
- }, [k("span", Xe, [k("span", {
1218
+ }, [k("span", et, [k("span", {
1219
1219
  "data-journal-spine": "dashed",
1220
1220
  class: F(["w-0 border-l border-dashed", u.value.dashed])
1221
- }, null, 2)]), k("span", { class: F(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", u.value.muted]) }, [j(K(o.value) + " earlier updates ", 1), k("i", {
1221
+ }, null, 2)]), k("span", { class: F(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", u.value.muted]) }, [te(G(o.value) + " earlier updates ", 1), k("i", {
1222
1222
  class: F(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1223
1223
  "aria-hidden": "true"
1224
- }, null, 2)], 2)], 10, Ye)) : E("", !0),
1225
- (R(!0), O(y, null, W(c.value, (e, t) => (R(), O("div", {
1224
+ }, null, 2)], 2)], 10, $e)) : E("", !0),
1225
+ (L(!0), O(y, null, H(c.value, (e, t) => (L(), O("div", {
1226
1226
  key: e.id,
1227
1227
  "data-test": "messaging-tool-activity-row",
1228
1228
  "data-journal-row": e.tone,
1229
1229
  class: F([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1230
- }, [k("div", Qe, [k("span", $e, [(R(), T(ce(d.value[e.tone].station.tag), {
1230
+ }, [k("div", nt, [k("span", rt, [(L(), T(fe(d.value[e.tone].station.tag), {
1231
1231
  "data-journal-station": e.tone,
1232
1232
  class: F(d.value[e.tone].station.class)
1233
- }, null, 8, ["data-journal-station", "class"]))]), t === c.value.length - 1 ? E("", !0) : (R(), O("span", {
1233
+ }, null, 8, ["data-journal-station", "class"]))]), t === c.value.length - 1 ? E("", !0) : (L(), O("span", {
1234
1234
  key: 0,
1235
1235
  class: F(["w-px flex-1", u.value.spine])
1236
- }, null, 2))]), k("div", { class: F(["min-w-0 flex-1", t === c.value.length - 1 ? "" : "pb-2"]) }, [k("span", { class: F(["relative block leading-snug", d.value[e.tone].label]) }, [j(K(e.label), 1), d.value[e.tone].statusWord ? (R(), O("span", et, ", " + K(d.value[e.tone].statusWord), 1)) : E("", !0)], 2), e.note ? (R(), O("p", {
1236
+ }, null, 2))]), k("div", { class: F(["min-w-0 flex-1", t === c.value.length - 1 ? "" : "pb-2"]) }, [k("span", { class: F(["relative block leading-snug", d.value[e.tone].label]) }, [te(G(e.label), 1), d.value[e.tone].statusWord ? (L(), O("span", it, ", " + G(d.value[e.tone].statusWord), 1)) : E("", !0)], 2), e.note ? (L(), O("p", {
1237
1237
  key: 0,
1238
1238
  class: F(["pt-0.5 text-[12px] leading-snug", u.value.muted])
1239
- }, K(e.note), 3)) : E("", !0)], 2)], 10, Ze))), 128)),
1240
- !r.value && e.model.hint ? (R(), O("p", {
1239
+ }, G(e.note), 3)) : E("", !0)], 2)], 10, tt))), 128)),
1240
+ !r.value && e.model.hint ? (L(), O("p", {
1241
1241
  key: 3,
1242
1242
  "data-test": "messaging-tool-activity-hint",
1243
1243
  class: F(["pl-[30px] pt-2.5 text-[12px] leading-snug", u.value.muted])
1244
- }, K(e.model.hint), 3)) : E("", !0)
1244
+ }, G(e.model.hint), 3)) : E("", !0)
1245
1245
  ], 2));
1246
1246
  }
1247
1247
  });
@@ -1338,88 +1338,88 @@ AsyncGenerator.prototype[typeof Symbol == "function" && Symbol.asyncIterator ||
1338
1338
  }, AsyncGenerator.prototype.return = function(e) {
1339
1339
  return this._invoke("return", e);
1340
1340
  };
1341
- var nt = Object.entries, rt = Object.setPrototypeOf, it = Object.isFrozen, at = Object.getPrototypeOf, ot = Object.getOwnPropertyDescriptor, st = Object.freeze, ct = Object.seal, lt = Object.create, ut = typeof Reflect < "u" && Reflect, dt = ut.apply, ft = ut.construct;
1342
- st || (st = function freeze(e) {
1341
+ var ot = Object.entries, st = Object.setPrototypeOf, ct = Object.isFrozen, lt = Object.getPrototypeOf, ut = Object.getOwnPropertyDescriptor, Y = Object.freeze, dt = Object.seal, ft = Object.create, Z = typeof Reflect < "u" && Reflect, pt = Z.apply, mt = Z.construct;
1342
+ Y || (Y = function freeze(e) {
1343
1343
  return e;
1344
- }), ct || (ct = function seal(e) {
1344
+ }), dt || (dt = function seal(e) {
1345
1345
  return e;
1346
- }), dt || (dt = function apply(e, t) {
1346
+ }), pt || (pt = function apply(e, t) {
1347
1347
  var n = [...arguments].slice(2);
1348
1348
  return e.apply(t, n);
1349
- }), ft || (ft = function construct(e) {
1349
+ }), mt || (mt = function construct(e) {
1350
1350
  return new e(...[...arguments].slice(1));
1351
1351
  });
1352
- var pt = unapply(Array.prototype.forEach);
1352
+ var ht = unapply(Array.prototype.forEach);
1353
1353
  Array.prototype.indexOf;
1354
- var Z = unapply(Array.prototype.lastIndexOf), mt = unapply(Array.prototype.pop), ht = unapply(Array.prototype.push), gt = unapply(Array.prototype.slice), _t = unapply(Array.prototype.splice), vt = Array.isArray, yt = unconstruct(Set), bt = unapply(Set.prototype.add), xt = unapply(Set.prototype.has), St = unapply(String.prototype.toLowerCase), Ct = unapply(String.prototype.toString), wt = unapply(String.prototype.match), Tt = unapply(String.prototype.replace), Et = unapply(String.prototype.indexOf), Dt = unapply(String.prototype.trim), Ot = unapply(Number.prototype.toString), kt = unapply(Boolean.prototype.toString), jt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), Mt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Nt = unapply(Object.prototype.hasOwnProperty), Pt = unapply(Object.prototype.toString), Ft = unapply(RegExp.prototype.test), It = unconstruct(TypeError);
1354
+ var gt = unapply(Array.prototype.lastIndexOf), _t = unapply(Array.prototype.pop), vt = unapply(Array.prototype.push), yt = unapply(Array.prototype.slice), bt = unapply(Array.prototype.splice), xt = Array.isArray, St = unconstruct(Set), Ct = unapply(Set.prototype.add), wt = unapply(Set.prototype.has), Tt = unapply(String.prototype.toLowerCase), Et = unapply(String.prototype.toString), Dt = unapply(String.prototype.match), Ot = unapply(String.prototype.replace), kt = unapply(String.prototype.indexOf), jt = unapply(String.prototype.trim), Mt = unapply(Number.prototype.toString), Nt = unapply(Boolean.prototype.toString), Pt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), Ft = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), It = unapply(Object.prototype.hasOwnProperty), Rt = unapply(Object.prototype.toString), zt = unapply(RegExp.prototype.test), Bt = unconstruct(TypeError);
1355
1355
  function unapply(e) {
1356
1356
  return function(t) {
1357
1357
  t instanceof RegExp && (t.lastIndex = 0);
1358
1358
  var n = [...arguments].slice(1);
1359
- return dt(e, t, n);
1359
+ return pt(e, t, n);
1360
1360
  };
1361
1361
  }
1362
1362
  function unconstruct(e) {
1363
1363
  return function() {
1364
- return ft(e, [...arguments]);
1364
+ return mt(e, [...arguments]);
1365
1365
  };
1366
1366
  }
1367
1367
  function addToSet(e, t) {
1368
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : St;
1369
- if (rt && rt(e, null), !vt(t)) return e;
1368
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Tt;
1369
+ if (st && st(e, null), !xt(t)) return e;
1370
1370
  let r = t.length;
1371
1371
  for (; r--;) {
1372
1372
  let o = t[r];
1373
1373
  if (typeof o == "string") {
1374
1374
  let e = n(o);
1375
- e !== o && (it(t) || (t[r] = e), o = e);
1375
+ e !== o && (ct(t) || (t[r] = e), o = e);
1376
1376
  }
1377
1377
  e[o] = !0;
1378
1378
  }
1379
1379
  return e;
1380
1380
  }
1381
1381
  function cleanArray(e) {
1382
- for (let t = 0; t < e.length; t++) Nt(e, t) || (e[t] = null);
1382
+ for (let t = 0; t < e.length; t++) It(e, t) || (e[t] = null);
1383
1383
  return e;
1384
1384
  }
1385
1385
  function clone(e) {
1386
- let t = lt(null);
1387
- for (let r of nt(e)) {
1386
+ let t = ft(null);
1387
+ for (let r of ot(e)) {
1388
1388
  var n = _slicedToArray(r, 2);
1389
1389
  let o = n[0], s = n[1];
1390
- Nt(e, o) && (t[o] = vt(s) ? cleanArray(s) : s && typeof s == "object" && s.constructor === Object ? clone(s) : s);
1390
+ It(e, o) && (t[o] = xt(s) ? cleanArray(s) : s && typeof s == "object" && s.constructor === Object ? clone(s) : s);
1391
1391
  }
1392
1392
  return t;
1393
1393
  }
1394
1394
  function stringifyValue(e) {
1395
1395
  switch (typeof e) {
1396
1396
  case "string": return e;
1397
- case "number": return Ot(e);
1398
- case "boolean": return kt(e);
1399
- case "bigint": return jt ? jt(e) : "0";
1400
- case "symbol": return Mt ? Mt(e) : "Symbol()";
1401
- case "undefined": return Pt(e);
1397
+ case "number": return Mt(e);
1398
+ case "boolean": return Nt(e);
1399
+ case "bigint": return Pt ? Pt(e) : "0";
1400
+ case "symbol": return Ft ? Ft(e) : "Symbol()";
1401
+ case "undefined": return Rt(e);
1402
1402
  case "function":
1403
1403
  case "object": {
1404
- if (e === null) return Pt(e);
1404
+ if (e === null) return Rt(e);
1405
1405
  let t = e, n = lookupGetter(t, "toString");
1406
1406
  if (typeof n == "function") {
1407
1407
  let e = n(t);
1408
- return typeof e == "string" ? e : Pt(e);
1408
+ return typeof e == "string" ? e : Rt(e);
1409
1409
  }
1410
- return Pt(e);
1410
+ return Rt(e);
1411
1411
  }
1412
- default: return Pt(e);
1412
+ default: return Rt(e);
1413
1413
  }
1414
1414
  }
1415
1415
  function lookupGetter(e, t) {
1416
1416
  for (; e !== null;) {
1417
- let n = ot(e, t);
1417
+ let n = ut(e, t);
1418
1418
  if (n) {
1419
1419
  if (n.get) return unapply(n.get);
1420
1420
  if (typeof n.value == "function") return unapply(n.value);
1421
1421
  }
1422
- e = at(e);
1422
+ e = lt(e);
1423
1423
  }
1424
1424
  function fallbackValue() {
1425
1425
  return null;
@@ -1428,20 +1428,20 @@ function lookupGetter(e, t) {
1428
1428
  }
1429
1429
  function lookupAccessor(e, t) {
1430
1430
  for (; e !== null;) {
1431
- let n = ot(e, t);
1431
+ let n = ut(e, t);
1432
1432
  if (n) return n.get ? unapply(n.get) : null;
1433
- e = at(e);
1433
+ e = lt(e);
1434
1434
  }
1435
1435
  return null;
1436
1436
  }
1437
1437
  function isRegex(e) {
1438
1438
  try {
1439
- return Ft(e, ""), !0;
1439
+ return zt(e, ""), !0;
1440
1440
  } catch {
1441
1441
  return !1;
1442
1442
  }
1443
1443
  }
1444
- var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), zt = st(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Bt = st([
1444
+ var Vt = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ht = Y(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ut = Y([
1445
1445
  "feBlend",
1446
1446
  "feColorMatrix",
1447
1447
  "feComponentTransfer",
@@ -1467,7 +1467,7 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1467
1467
  "feSpotLight",
1468
1468
  "feTile",
1469
1469
  "feTurbulence"
1470
- ]), Vt = st([
1470
+ ]), Wt = Y([
1471
1471
  "animate",
1472
1472
  "color-profile",
1473
1473
  "cursor",
@@ -1490,7 +1490,7 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1490
1490
  "solidcolor",
1491
1491
  "unknown",
1492
1492
  "use"
1493
- ]), Ht = st(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ut = st([
1493
+ ]), Gt = Y(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Kt = Y([
1494
1494
  "maction",
1495
1495
  "maligngroup",
1496
1496
  "malignmark",
@@ -1506,13 +1506,13 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1506
1506
  "annotation-xml",
1507
1507
  "mprescripts",
1508
1508
  "none"
1509
- ]), Wt = st(["#text"]), Gt = st(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Kt = st(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), qt = st(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Jt = st([
1509
+ ]), qt = Y(["#text"]), Jt = Y(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Yt = Y(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Xt = Y(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Zt = Y([
1510
1510
  "xlink:href",
1511
1511
  "xml:id",
1512
1512
  "xlink:title",
1513
1513
  "xml:space",
1514
1514
  "xmlns:xlink"
1515
- ]), Yt = ct(/{{[\w\W]*|^[\w\W]*}}/g), Xt = ct(/<%[\w\W]*|^[\w\W]*%>/g), Zt = ct(/\${[\w\W]*/g), Qt = ct(/^data-[\-\w.\u00B7-\uFFFF]+$/), $t = ct(/^aria-[\-\w]+$/), en = ct(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), tn = ct(/^(?:\w+script|data):/i), nn = ct(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), rn = ct(/^html$/i), an = ct(/^[a-z][.\w]*(-[.\w]+)+$/i), on = ct(/<[/\w!]/g), sn = ct(/<[/\w]/g), cn = ct(/<\/no(script|embed|frames)/i), ln = ct(/\/>/i), un = {
1515
+ ]), Qt = dt(/{{[\w\W]*|^[\w\W]*}}/g), $t = dt(/<%[\w\W]*|^[\w\W]*%>/g), en = dt(/\${[\w\W]*/g), tn = dt(/^data-[\-\w.\u00B7-\uFFFF]+$/), nn = dt(/^aria-[\-\w]+$/), rn = dt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), an = dt(/^(?:\w+script|data):/i), on = dt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), sn = dt(/^html$/i), cn = dt(/^[a-z][.\w]*(-[.\w]+)+$/i), ln = dt(/<[/\w!]/g), un = dt(/<[/\w]/g), dn = dt(/<\/no(script|embed|frames)/i), fn = dt(/\/>/i), pn = {
1516
1516
  element: 1,
1517
1517
  attribute: 2,
1518
1518
  text: 3,
@@ -1525,7 +1525,7 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1525
1525
  documentType: 10,
1526
1526
  documentFragment: 11,
1527
1527
  notation: 12
1528
- }, dn = st(addToSet({}, [
1528
+ }, mn = Y(addToSet({}, [
1529
1529
  "style",
1530
1530
  "script",
1531
1531
  "xmp",
@@ -1534,9 +1534,9 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1534
1534
  "noframes",
1535
1535
  "plaintext",
1536
1536
  "noscript"
1537
- ])), fn = function getGlobal() {
1537
+ ])), hn = function getGlobal() {
1538
1538
  return typeof window > "u" ? null : window;
1539
- }, pn = function _createTrustedTypesPolicy(e, t) {
1539
+ }, gn = function _createTrustedTypesPolicy(e, t) {
1540
1540
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
1541
1541
  let n = null, r = "data-tt-policy-suffix";
1542
1542
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -1553,7 +1553,7 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1553
1553
  } catch {
1554
1554
  return console.warn("TrustedTypes policy " + o + " could not be created."), null;
1555
1555
  }
1556
- }, mn = function _createHooksMap() {
1556
+ }, _n = function _createHooksMap() {
1557
1557
  return {
1558
1558
  afterSanitizeAttributes: [],
1559
1559
  afterSanitizeElements: [],
@@ -1565,62 +1565,62 @@ var Rt = st(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
1565
1565
  uponSanitizeElement: [],
1566
1566
  uponSanitizeShadowNode: []
1567
1567
  };
1568
- }, hn = function _resolveSetOption(e, t, n, r) {
1569
- return Nt(e, t) && vt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1570
- }, gn = function _resolveObjectOption(e, t, n) {
1571
- let r = Nt(e, t) ? e[t] : void 0;
1568
+ }, vn = function _resolveSetOption(e, t, n, r) {
1569
+ return It(e, t) && xt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1570
+ }, yn = function _resolveObjectOption(e, t, n) {
1571
+ let r = It(e, t) ? e[t] : void 0;
1572
1572
  return r && typeof r == "object" ? clone(r) : n();
1573
1573
  };
1574
1574
  function createDOMPurify() {
1575
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fn(), DOMPurify = (e) => createDOMPurify(e);
1576
- if (DOMPurify.version = "3.4.17", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== un.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1575
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : hn(), DOMPurify = (e) => createDOMPurify(e);
1576
+ if (DOMPurify.version = "3.4.17", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== pn.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1577
1577
  let t = e.document, n = t, r = n.currentScript;
1578
1578
  e.DocumentFragment;
1579
1579
  let o = e.HTMLTemplateElement, s = e.Node, c = e.Element, u = e.NodeFilter;
1580
1580
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
1581
- let d = e.DOMParser, p = e.trustedTypes, m = c.prototype, g = lookupGetter(m, "cloneNode"), y = lookupGetter(m, "remove"), b = lookupGetter(m, "removeAttributeNode"), x = lookupGetter(m, "nextSibling"), S = lookupGetter(m, "childNodes"), T = lookupGetter(m, "parentNode"), E = lookupGetter(m, "shadowRoot"), O = lookupGetter(m, "attributes"), k = s && s.prototype ? lookupGetter(s.prototype, "nodeType") : null, j = s && s.prototype ? lookupGetter(s.prototype, "nodeName") : null, M = s && s.prototype ? lookupGetter(s.prototype, "ownerDocument") : null, N = function _readNodeType(e) {
1581
+ let d = e.DOMParser, p = e.trustedTypes, m = c.prototype, g = lookupGetter(m, "cloneNode"), y = lookupGetter(m, "remove"), b = lookupGetter(m, "removeAttributeNode"), x = lookupGetter(m, "nextSibling"), S = lookupGetter(m, "childNodes"), T = lookupGetter(m, "parentNode"), E = lookupGetter(m, "shadowRoot"), O = lookupGetter(m, "attributes"), k = s && s.prototype ? lookupGetter(s.prototype, "nodeType") : null, ee = s && s.prototype ? lookupGetter(s.prototype, "nodeName") : null, te = s && s.prototype ? lookupGetter(s.prototype, "ownerDocument") : null, j = function _readNodeType(e) {
1582
1582
  return k ? k(e) : e.nodeType;
1583
- }, P = function _readNodeName(e) {
1584
- return j ? j(e) : e.nodeName;
1585
- }, ee = lookupAccessor(m, "namespaceURI"), F = function _readNamespaceURI(e) {
1586
- return ee ? ee(e) : e.namespaceURI;
1583
+ }, M = function _readNodeName(e) {
1584
+ return ee ? ee(e) : e.nodeName;
1585
+ }, ne = lookupAccessor(m, "namespaceURI"), N = function _readNamespaceURI(e) {
1586
+ return ne ? ne(e) : e.namespaceURI;
1587
1587
  };
1588
1588
  if (typeof o == "function") {
1589
1589
  let e = t.createElement("template");
1590
1590
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1591
1591
  }
1592
- let I, L = "", te, ne = !1, re = 0, R = function _assertNotInTrustedTypesPolicy() {
1593
- if (re > 0) throw It("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1594
- }, H = function _createTrustedHTML(e) {
1595
- R(), re++;
1592
+ let P, F = "", re, I = !1, se = 0, ce = function _assertNotInTrustedTypesPolicy() {
1593
+ if (se > 0) throw Bt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1594
+ }, ue = function _createTrustedHTML(e) {
1595
+ ce(), se++;
1596
1596
  try {
1597
- return I.createHTML(e);
1597
+ return P.createHTML(e);
1598
1598
  } finally {
1599
- re--;
1599
+ se--;
1600
1600
  }
1601
- }, W = function _createTrustedScriptURL(e) {
1602
- R(), re++;
1601
+ }, L = function _createTrustedScriptURL(e) {
1602
+ ce(), se++;
1603
1603
  try {
1604
- return I.createScriptURL(e);
1604
+ return P.createScriptURL(e);
1605
1605
  } finally {
1606
- re--;
1607
- }
1608
- }, se = function _getDefaultTrustedTypesPolicy() {
1609
- return ne || (te = pn(p, r), ne = !0), te;
1610
- }, ce = t, G = ce.implementation, K = ce.createNodeIterator, ue = ce.createDocumentFragment, de = ce.getElementsByTagName, fe = n.importNode, q = mn();
1611
- DOMPurify.isSupported = typeof nt == "function" && typeof T == "function" && G && G.createHTMLDocument !== void 0;
1612
- let pe = Yt, me = Xt, he = Zt, ge = Qt, ve = $t, be = tn, Ce = nn, we = an, Te = en, J = null, Ee = addToSet({}, [
1613
- ...Rt,
1614
- ...zt,
1615
- ...Bt,
1606
+ se--;
1607
+ }
1608
+ }, R = function _getDefaultTrustedTypesPolicy() {
1609
+ return I || (re = gn(p, r), I = !0), re;
1610
+ }, H = t, de = H.implementation, fe = H.createNodeIterator, W = H.createDocumentFragment, G = H.getElementsByTagName, pe = n.importNode, K = _n();
1611
+ DOMPurify.isSupported = typeof ot == "function" && typeof T == "function" && de && de.createHTMLDocument !== void 0;
1612
+ let me = Qt, he = $t, ge = en, ve = tn, be = nn, Ce = an, we = on, Te = cn, Ee = rn, q = null, De = addToSet({}, [
1613
+ ...Vt,
1616
1614
  ...Ht,
1617
- ...Wt
1618
- ]), Y = null, De = addToSet({}, [
1615
+ ...Ut,
1619
1616
  ...Gt,
1620
- ...Kt,
1621
- ...qt,
1622
- ...Jt
1623
- ]), Oe = Object.seal(lt(null, {
1617
+ ...qt
1618
+ ]), J = null, Oe = addToSet({}, [
1619
+ ...Jt,
1620
+ ...Yt,
1621
+ ...Xt,
1622
+ ...Zt
1623
+ ]), ke = Object.seal(ft(null, {
1624
1624
  tagNameCheck: {
1625
1625
  writable: !0,
1626
1626
  configurable: !1,
@@ -1639,7 +1639,7 @@ function createDOMPurify() {
1639
1639
  enumerable: !0,
1640
1640
  value: !1
1641
1641
  }
1642
- })), ke = null, Ae = null, je = Object.seal(lt(null, {
1642
+ })), Ae = null, je = null, Me = Object.seal(ft(null, {
1643
1643
  tagCheck: {
1644
1644
  writable: !0,
1645
1645
  configurable: !1,
@@ -1652,14 +1652,14 @@ function createDOMPurify() {
1652
1652
  enumerable: !0,
1653
1653
  value: null
1654
1654
  }
1655
- })), Me = !0, Ne = !0, Fe = !1, Ie = !0, Le = !1, Re = !0, ze = !1, Be = !1, Ve = null, He = null, Ue = !1, We = !1, Ge = !1, Ke = !1, qe = !0, Je = !1, Ye = "user-content-", Xe = !0, Ze = !1, Qe = null, $e = {}, et = null, tt = 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(".")), rt = null, it = addToSet({}, [
1655
+ })), Ne = !0, Fe = !0, Ie = !1, Le = !0, Re = !1, ze = !0, Be = !1, Ve = !1, He = null, Ue = null, We = !1, Ge = !1, Ke = !1, qe = !1, Je = !0, Ye = !1, Xe = "user-content-", Ze = !0, Qe = !1, $e = null, et = {}, tt = null, nt = 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(".")), rt = null, it = addToSet({}, [
1656
1656
  "audio",
1657
1657
  "video",
1658
1658
  "img",
1659
1659
  "source",
1660
1660
  "image",
1661
1661
  "track"
1662
- ]), at = null, ot = addToSet({}, [
1662
+ ]), at = null, st = addToSet({}, [
1663
1663
  "alt",
1664
1664
  "class",
1665
1665
  "for",
@@ -1674,17 +1674,17 @@ function createDOMPurify() {
1674
1674
  "value",
1675
1675
  "style",
1676
1676
  "xmlns"
1677
- ]), ut = "http://www.w3.org/1998/Math/MathML", dt = "http://www.w3.org/2000/svg", ft = "http://www.w3.org/1999/xhtml", Ot = ft, kt = !1, jt = null, Mt = addToSet({}, [
1678
- ut,
1679
- dt,
1680
- ft
1681
- ], Ct), Pt = st([
1677
+ ]), ct = "http://www.w3.org/1998/Math/MathML", lt = "http://www.w3.org/2000/svg", ut = "http://www.w3.org/1999/xhtml", Z = ut, pt = !1, mt = null, Mt = addToSet({}, [
1678
+ ct,
1679
+ lt,
1680
+ ut
1681
+ ], Et), Nt = Y([
1682
1682
  "mi",
1683
1683
  "mo",
1684
1684
  "mn",
1685
1685
  "ms",
1686
1686
  "mtext"
1687
- ]), _n = addToSet({}, Pt), vn = st(["annotation-xml"]), yn = addToSet({}, vn), bn = addToSet({}, [
1687
+ ]), Pt = addToSet({}, Nt), Ft = Y(["annotation-xml"]), Rt = addToSet({}, Ft), bn = addToSet({}, [
1688
1688
  "title",
1689
1689
  "style",
1690
1690
  "font",
@@ -1695,49 +1695,49 @@ function createDOMPurify() {
1695
1695
  }, En = function _parseConfig() {
1696
1696
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1697
1697
  if (Cn && Cn === e) return;
1698
- e && typeof e == "object" || (e = {}), e = clone(e), xn = Sn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = xn === "application/xhtml+xml" ? Ct : St, J = hn(e, "ALLOWED_TAGS", Ee, { transform: Q }), Y = hn(e, "ALLOWED_ATTR", De, { transform: Q }), jt = hn(e, "ALLOWED_NAMESPACES", Mt, { transform: Ct }), at = hn(e, "ADD_URI_SAFE_ATTR", ot, {
1698
+ e && typeof e == "object" || (e = {}), e = clone(e), xn = Sn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = xn === "application/xhtml+xml" ? Et : Tt, q = vn(e, "ALLOWED_TAGS", De, { transform: Q }), J = vn(e, "ALLOWED_ATTR", Oe, { transform: Q }), mt = vn(e, "ALLOWED_NAMESPACES", Mt, { transform: Et }), at = vn(e, "ADD_URI_SAFE_ATTR", st, {
1699
1699
  transform: Q,
1700
- base: ot
1701
- }), rt = hn(e, "ADD_DATA_URI_TAGS", it, {
1700
+ base: st
1701
+ }), rt = vn(e, "ADD_DATA_URI_TAGS", it, {
1702
1702
  transform: Q,
1703
1703
  base: it
1704
- }), et = hn(e, "FORBID_CONTENTS", tt, { transform: Q }), ke = hn(e, "FORBID_TAGS", clone({}), { transform: Q }), Ae = hn(e, "FORBID_ATTR", clone({}), { transform: Q }), $e = Nt(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Me = e.ALLOW_ARIA_ATTR !== !1, Ne = e.ALLOW_DATA_ATTR !== !1, Fe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ie = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Le = e.SAFE_FOR_TEMPLATES || !1, Re = e.SAFE_FOR_XML !== !1, ze = e.WHOLE_DOCUMENT || !1, We = e.RETURN_DOM || !1, Ge = e.RETURN_DOM_FRAGMENT || !1, Ke = e.RETURN_TRUSTED_TYPE || !1, Ue = e.FORCE_BODY || !1, qe = e.SANITIZE_DOM !== !1, Je = e.SANITIZE_NAMED_PROPS || !1, Xe = e.KEEP_CONTENT !== !1, Ze = e.IN_PLACE || !1, Te = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : en, Ot = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ft, _n = gn(e, "MATHML_TEXT_INTEGRATION_POINTS", () => addToSet({}, Pt)), yn = gn(e, "HTML_INTEGRATION_POINTS", () => addToSet({}, vn));
1705
- let t = gn(e, "CUSTOM_ELEMENT_HANDLING", () => lt(null));
1706
- if (Oe = lt(null), Nt(t, "tagNameCheck") && Tn(t.tagNameCheck) && (Oe.tagNameCheck = t.tagNameCheck), Nt(t, "attributeNameCheck") && Tn(t.attributeNameCheck) && (Oe.attributeNameCheck = t.attributeNameCheck), Nt(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (Oe.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), ct(Oe), Le && (Ne = !1), Ge && (We = !0), $e && (J = addToSet({}, Wt), Y = lt(null), $e.html === !0 && (addToSet(J, Rt), addToSet(Y, Gt)), $e.svg === !0 && (addToSet(J, zt), addToSet(Y, Kt), addToSet(Y, Jt)), $e.svgFilters === !0 && (addToSet(J, Bt), addToSet(Y, Kt), addToSet(Y, Jt)), $e.mathMl === !0 && (addToSet(J, Ht), addToSet(Y, qt), addToSet(Y, Jt))), je.tagCheck = null, je.attributeCheck = null, Nt(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? je.tagCheck = e.ADD_TAGS : vt(e.ADD_TAGS) && (J === Ee && (J = clone(J)), addToSet(J, e.ADD_TAGS, Q))), Nt(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? je.attributeCheck = e.ADD_ATTR : vt(e.ADD_ATTR) && (Y === De && (Y = clone(Y)), addToSet(Y, e.ADD_ATTR, Q))), Nt(e, "ADD_FORBID_CONTENTS") && vt(e.ADD_FORBID_CONTENTS) && (et === tt && (et = clone(et)), addToSet(et, e.ADD_FORBID_CONTENTS, Q)), Xe && (J["#text"] = !0), ze && addToSet(J, [
1704
+ }), tt = vn(e, "FORBID_CONTENTS", nt, { transform: Q }), Ae = vn(e, "FORBID_TAGS", clone({}), { transform: Q }), je = vn(e, "FORBID_ATTR", clone({}), { transform: Q }), et = It(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ne = e.ALLOW_ARIA_ATTR !== !1, Fe = e.ALLOW_DATA_ATTR !== !1, Ie = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Le = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Re = e.SAFE_FOR_TEMPLATES || !1, ze = e.SAFE_FOR_XML !== !1, Be = e.WHOLE_DOCUMENT || !1, Ge = e.RETURN_DOM || !1, Ke = e.RETURN_DOM_FRAGMENT || !1, qe = e.RETURN_TRUSTED_TYPE || !1, We = e.FORCE_BODY || !1, Je = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, Ze = e.KEEP_CONTENT !== !1, Qe = e.IN_PLACE || !1, Ee = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : rn, Z = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ut, Pt = yn(e, "MATHML_TEXT_INTEGRATION_POINTS", () => addToSet({}, Nt)), Rt = yn(e, "HTML_INTEGRATION_POINTS", () => addToSet({}, Ft));
1705
+ let t = yn(e, "CUSTOM_ELEMENT_HANDLING", () => ft(null));
1706
+ if (ke = ft(null), It(t, "tagNameCheck") && Tn(t.tagNameCheck) && (ke.tagNameCheck = t.tagNameCheck), It(t, "attributeNameCheck") && Tn(t.attributeNameCheck) && (ke.attributeNameCheck = t.attributeNameCheck), It(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ke.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), dt(ke), Re && (Fe = !1), Ke && (Ge = !0), et && (q = addToSet({}, qt), J = ft(null), et.html === !0 && (addToSet(q, Vt), addToSet(J, Jt)), et.svg === !0 && (addToSet(q, Ht), addToSet(J, Yt), addToSet(J, Zt)), et.svgFilters === !0 && (addToSet(q, Ut), addToSet(J, Yt), addToSet(J, Zt)), et.mathMl === !0 && (addToSet(q, Gt), addToSet(J, Xt), addToSet(J, Zt))), Me.tagCheck = null, Me.attributeCheck = null, It(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Me.tagCheck = e.ADD_TAGS : xt(e.ADD_TAGS) && (q === De && (q = clone(q)), addToSet(q, e.ADD_TAGS, Q))), It(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Me.attributeCheck = e.ADD_ATTR : xt(e.ADD_ATTR) && (J === Oe && (J = clone(J)), addToSet(J, e.ADD_ATTR, Q))), It(e, "ADD_FORBID_CONTENTS") && xt(e.ADD_FORBID_CONTENTS) && (tt === nt && (tt = clone(tt)), addToSet(tt, e.ADD_FORBID_CONTENTS, Q)), Ze && (q["#text"] = !0), Be && addToSet(q, [
1707
1707
  "html",
1708
1708
  "head",
1709
1709
  "body"
1710
- ]), J.table && (addToSet(J, ["tbody"]), delete ke.tbody), e.TRUSTED_TYPES_POLICY) {
1711
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw It("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1712
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw It("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1713
- let t = I;
1714
- I = e.TRUSTED_TYPES_POLICY;
1710
+ ]), q.table && (addToSet(q, ["tbody"]), delete Ae.tbody), e.TRUSTED_TYPES_POLICY) {
1711
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Bt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1712
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Bt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1713
+ let t = P;
1714
+ P = e.TRUSTED_TYPES_POLICY;
1715
1715
  try {
1716
- L = H("");
1716
+ F = ue("");
1717
1717
  } catch (e) {
1718
- throw I = t, e;
1718
+ throw P = t, e;
1719
1719
  }
1720
- } else e.TRUSTED_TYPES_POLICY === null ? (I = void 0, L = "") : (I === void 0 && (I = se()), I && typeof L == "string" && (L = H("")));
1721
- st && st(e), Cn = e;
1720
+ } else e.TRUSTED_TYPES_POLICY === null ? (P = void 0, F = "") : (P === void 0 && (P = R()), P && typeof F == "string" && (F = ue("")));
1721
+ Y && Y(e), Cn = e;
1722
1722
  }, Dn = addToSet({}, [
1723
- ...zt,
1724
- ...Bt,
1725
- ...Vt
1726
- ]), On = addToSet({}, [...Ht, ...Ut]), kn = function _checkSvgNamespace(e, t, n) {
1727
- return t.namespaceURI === ft ? e === "svg" : t.namespaceURI === ut ? e === "svg" && (n === "annotation-xml" || _n[n]) : !!Dn[e];
1723
+ ...Ht,
1724
+ ...Ut,
1725
+ ...Wt
1726
+ ]), On = addToSet({}, [...Gt, ...Kt]), kn = function _checkSvgNamespace(e, t, n) {
1727
+ return t.namespaceURI === ut ? e === "svg" : t.namespaceURI === ct ? e === "svg" && (n === "annotation-xml" || Pt[n]) : !!Dn[e];
1728
1728
  }, An = function _checkMathMlNamespace(e, t, n) {
1729
- return t.namespaceURI === ft ? e === "math" : t.namespaceURI === dt ? e === "math" && yn[n] : !!On[e];
1729
+ return t.namespaceURI === ut ? e === "math" : t.namespaceURI === lt ? e === "math" && Rt[n] : !!On[e];
1730
1730
  }, jn = function _checkHtmlNamespace(e, t, n) {
1731
- return t.namespaceURI === dt && !yn[n] || t.namespaceURI === ut && !_n[n] ? !1 : !On[e] && (bn[e] || !Dn[e]);
1731
+ return t.namespaceURI === lt && !Rt[n] || t.namespaceURI === ct && !Pt[n] ? !1 : !On[e] && (bn[e] || !Dn[e]);
1732
1732
  }, Mn = function _checkValidNamespace(e) {
1733
- let t = F(e), n = St(P(e)), r = T(e), o, s;
1734
- return r && N(r) === un.element ? (o = { namespaceURI: F(r) }, s = St(P(r))) : (o = { namespaceURI: Ot }, s = "template"), jt[t] ? t === dt ? kn(n, o, s) : t === ut ? An(n, o, s) : t === ft ? jn(n, o, s) : !!(xn === "application/xhtml+xml" && jt[t]) : !1;
1733
+ let t = N(e), n = Tt(M(e)), r = T(e), o, s;
1734
+ return r && j(r) === pn.element ? (o = { namespaceURI: N(r) }, s = Tt(M(r))) : (o = { namespaceURI: Z }, s = "template"), mt[t] ? t === lt ? kn(n, o, s) : t === ct ? An(n, o, s) : t === ut ? jn(n, o, s) : !!(xn === "application/xhtml+xml" && mt[t]) : !1;
1735
1735
  }, Nn = function _forceRemove(e) {
1736
- ht(DOMPurify.removed, { element: e });
1736
+ vt(DOMPurify.removed, { element: e });
1737
1737
  try {
1738
1738
  T(e).removeChild(e);
1739
1739
  } catch {
1740
- if (y(e), !T(e)) throw It("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1740
+ if (y(e), !T(e)) throw Bt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1741
1741
  }
1742
1742
  }, Pn = function _stripAttributeNode(e, t, n) {
1743
1743
  try {
@@ -1750,12 +1750,12 @@ function createDOMPurify() {
1750
1750
  }, Fn = function _neutralizeRoot(e) {
1751
1751
  zn(e);
1752
1752
  let t = S(e);
1753
- t && pt(gt(t), (e) => {
1753
+ t && ht(yt(t), (e) => {
1754
1754
  try {
1755
1755
  y(e);
1756
1756
  } catch {}
1757
1757
  });
1758
- let n = N(e) === un.element ? O(e) : null;
1758
+ let n = j(e) === pn.element ? O(e) : null;
1759
1759
  if (n) for (let t = n.length - 1; t >= 0; --t) {
1760
1760
  let r = n[t], o = r && r.name;
1761
1761
  typeof o == "string" && Pn(e, r, o);
@@ -1766,7 +1766,7 @@ function createDOMPurify() {
1766
1766
  } catch {
1767
1767
  n = null;
1768
1768
  }
1769
- ht(DOMPurify.removed, {
1769
+ vt(DOMPurify.removed, {
1770
1770
  attribute: n || null,
1771
1771
  from: t
1772
1772
  });
@@ -1778,7 +1778,7 @@ function createDOMPurify() {
1778
1778
  } catch {}
1779
1779
  }
1780
1780
  if (e === "is") {
1781
- if (We || Ge) try {
1781
+ if (Ge || Ke) try {
1782
1782
  Nn(t);
1783
1783
  } catch {}
1784
1784
  else try {
@@ -1789,14 +1789,14 @@ function createDOMPurify() {
1789
1789
  let t = O(e);
1790
1790
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1791
1791
  let r = t[n], o = r && r.name;
1792
- typeof o != "string" || Y[Q(o)] || Pn(e, r, o);
1792
+ typeof o != "string" || J[Q(o)] || Pn(e, r, o);
1793
1793
  }
1794
1794
  }, Rn = function _walkTree(e, t) {
1795
1795
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
1796
1796
  for (; r.length > 0;) {
1797
1797
  let e = r.pop();
1798
1798
  if (t(e) === !1) continue;
1799
- if (n && N(e) === un.element) {
1799
+ if (n && j(e) === pn.element) {
1800
1800
  let t = E(e);
1801
1801
  er(t) && r.push(t);
1802
1802
  }
@@ -1805,7 +1805,7 @@ function createDOMPurify() {
1805
1805
  }
1806
1806
  }, zn = function _neutralizeSubtree(e) {
1807
1807
  Rn(e, (e) => {
1808
- N(e) === un.element && Ln(e);
1808
+ j(e) === pn.element && Ln(e);
1809
1809
  });
1810
1810
  }, Bn = function _collectLiveNodes(e) {
1811
1811
  let t = [];
@@ -1813,49 +1813,49 @@ function createDOMPurify() {
1813
1813
  t.push(e);
1814
1814
  }, !0), t;
1815
1815
  }, Vn = function _neutralizeEscapedElements(e, t) {
1816
- let n = yt();
1817
- pt(Bn(e), (e) => {
1818
- N(e) === un.element && bt(n, e);
1819
- }), pt(t, (e) => {
1820
- N(e) === un.element && !xt(n, e) && Ln(e);
1816
+ let n = St();
1817
+ ht(Bn(e), (e) => {
1818
+ j(e) === pn.element && Ct(n, e);
1819
+ }), ht(t, (e) => {
1820
+ j(e) === pn.element && !wt(n, e) && Ln(e);
1821
1821
  });
1822
1822
  }, Hn = function _neutralizeDiscarded(e, t) {
1823
1823
  let n = !1;
1824
- return pt(DOMPurify.removed, (t) => {
1824
+ return ht(DOMPurify.removed, (t) => {
1825
1825
  t.element && (n = n || t.element === e, zn(t.element));
1826
1826
  }), Vn(e, t), n;
1827
1827
  }, Un = function _sanitizeUnvisitedNodes(e, t) {
1828
- let n = Qe, r = null, getOriginal = () => (r || (r = yt(), pt(t, (e) => {
1829
- bt(r, e);
1828
+ let n = $e, r = null, getOriginal = () => (r || (r = St(), ht(t, (e) => {
1829
+ Ct(r, e);
1830
1830
  })), r);
1831
1831
  for (let t = 0;; t++) {
1832
1832
  let r = Bn(e), o = [e], s = !1;
1833
- if (pt(r, (e) => {
1834
- N(e) === un.documentFragment ? ht(o, e) : !s && !xt(n, e) && (s = xt(getOriginal(), e));
1833
+ if (ht(r, (e) => {
1834
+ j(e) === pn.documentFragment ? vt(o, e) : !s && !wt(n, e) && (s = wt(getOriginal(), e));
1835
1835
  }), !s) return;
1836
- if (t >= 8) throw It("the tree kept changing during in-place sanitization; refusing to return it");
1837
- pt(o, (t, n) => {
1836
+ if (t >= 8) throw Bt("the tree kept changing during in-place sanitization; refusing to return it");
1837
+ ht(o, (t, n) => {
1838
1838
  Wn(t, n > 0, e, getOriginal());
1839
1839
  });
1840
1840
  }
1841
1841
  }, Wn = function _sanitizeUnvisitedIn(e, t, n, r) {
1842
1842
  let o = Yn(e), s;
1843
- for (; s = o.nextNode();) xt(r, s) && !xt(Qe, s) && (t && _executeHooks(q.uponSanitizeShadowNode, s, null), sr(s, n), mr(s, n), er(s.content) && hr(s.content));
1843
+ for (; s = o.nextNode();) wt(r, s) && !wt($e, s) && (t && _executeHooks(K.uponSanitizeShadowNode, s, null), sr(s, n), mr(s, n), er(s.content) && hr(s.content));
1844
1844
  }, Gn = function _markVisited(e) {
1845
- Qe && bt(Qe, e);
1845
+ $e && Ct($e, e);
1846
1846
  }, Kn = function _isPatchLinkageAttribute(e, t) {
1847
- return Re ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
1847
+ return ze ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
1848
1848
  }, qn = function _neutralizePatchLinkage(e) {
1849
- Re && Rn(e, (e) => {
1850
- let t = N(e);
1851
- if (t === un.processingInstruction || t === un.comment && Ft(sn, e.data)) {
1849
+ ze && Rn(e, (e) => {
1850
+ let t = j(e);
1851
+ if (t === pn.processingInstruction || t === pn.comment && zt(un, e.data)) {
1852
1852
  try {
1853
1853
  y(e);
1854
1854
  } catch {}
1855
1855
  return !1;
1856
1856
  }
1857
- if (t === un.element) {
1858
- let t = e, n = Q(P(e));
1857
+ if (t === pn.element) {
1858
+ let t = e, n = Q(M(e));
1859
1859
  try {
1860
1860
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Kn("for", n) && t.removeAttribute("for");
1861
1861
  } catch {}
@@ -1864,46 +1864,46 @@ function createDOMPurify() {
1864
1864
  });
1865
1865
  }, Jn = function _initDocument(e) {
1866
1866
  let n = null, r = null;
1867
- if (Ue) e = "<remove></remove>" + e;
1867
+ if (We) e = "<remove></remove>" + e;
1868
1868
  else {
1869
- let t = wt(e, /^[\r\n\t ]+/);
1869
+ let t = Dt(e, /^[\r\n\t ]+/);
1870
1870
  r = t && t[0];
1871
1871
  }
1872
- xn === "application/xhtml+xml" && Ot === ft && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1873
- let o = I ? H(e) : e;
1874
- if (Ot === ft) try {
1872
+ xn === "application/xhtml+xml" && Z === ut && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1873
+ let o = P ? ue(e) : e;
1874
+ if (Z === ut) try {
1875
1875
  n = new d().parseFromString(o, xn);
1876
1876
  } catch {}
1877
1877
  if (!n || !n.documentElement) {
1878
- n = G.createDocument(Ot, "template", null);
1878
+ n = de.createDocument(Z, "template", null);
1879
1879
  try {
1880
- n.documentElement.innerHTML = kt ? L : o;
1880
+ n.documentElement.innerHTML = pt ? F : o;
1881
1881
  } catch {}
1882
1882
  }
1883
1883
  let s = n.body || n.documentElement;
1884
- return e && r && s.insertBefore(t.createTextNode(r), s.childNodes[0] || null), Ot === ft ? de.call(n, ze ? "html" : "body")[0] : ze ? n.documentElement : s;
1884
+ return e && r && s.insertBefore(t.createTextNode(r), s.childNodes[0] || null), Z === ut ? G.call(n, Be ? "html" : "body")[0] : Be ? n.documentElement : s;
1885
1885
  }, Yn = function _createNodeIterator(e) {
1886
- let t = M ? M(e) : e.ownerDocument;
1887
- return K.call(t || e, e, u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION, null);
1886
+ let t = te ? te(e) : e.ownerDocument;
1887
+ return fe.call(t || e, e, u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION, null);
1888
1888
  }, Xn = function _stripTemplateExpressions(e) {
1889
- return e = Tt(e, pe, " "), e = Tt(e, me, " "), e = Tt(e, he, " "), e;
1889
+ return e = Ot(e, me, " "), e = Ot(e, he, " "), e = Ot(e, ge, " "), e;
1890
1890
  }, Zn = function _scrubTemplateExpressions(e) {
1891
1891
  Qn(e);
1892
1892
  let t = e.querySelectorAll?.call(e, "template");
1893
- t && pt(t, (e) => {
1893
+ t && ht(t, (e) => {
1894
1894
  er(e.content) && Zn(e.content);
1895
1895
  });
1896
1896
  }, Qn = function _scrubOwnCharacterData(e) {
1897
1897
  e.normalize();
1898
- let t = M ? M(e) : e.ownerDocument, n = K.call(t || e, e, u.SHOW_TEXT | u.SHOW_COMMENT | u.SHOW_CDATA_SECTION | u.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
1898
+ let t = te ? te(e) : e.ownerDocument, n = fe.call(t || e, e, u.SHOW_TEXT | u.SHOW_COMMENT | u.SHOW_CDATA_SECTION | u.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
1899
1899
  for (; r;) r.data = Xn(r.data), r = n.nextNode();
1900
1900
  }, $n = function _isClobbered(e) {
1901
- let t = j ? j(e) : null;
1901
+ let t = ee ? ee(e) : null;
1902
1902
  return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== O(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== k(e) || e.childNodes !== S(e);
1903
1903
  }, er = function _isDocumentFragment(e) {
1904
1904
  if (!k || typeof e != "object" || !e) return !1;
1905
1905
  try {
1906
- return k(e) === un.documentFragment;
1906
+ return k(e) === pn.documentFragment;
1907
1907
  } catch {
1908
1908
  return !1;
1909
1909
  }
@@ -1916,17 +1916,17 @@ function createDOMPurify() {
1916
1916
  }
1917
1917
  };
1918
1918
  function _executeHooks(e, t, n) {
1919
- e.length !== 0 && pt(e, (e) => {
1919
+ e.length !== 0 && ht(e, (e) => {
1920
1920
  e.call(DOMPurify, t, n, Cn);
1921
1921
  });
1922
1922
  }
1923
1923
  let nr = function _isUnsafeNode(e, t) {
1924
- return !!(Re && e.hasChildNodes() && !tr(e.firstElementChild) && Ft(on, e.textContent) && Ft(on, e.innerHTML) || Re && dn[t] && N(e) === un.element && F(e) === ft && (tr(e.firstElementChild) || typeof e.textContent == "string" && Ft(on, e.textContent)) || e.nodeType === un.processingInstruction || Re && e.nodeType === un.comment && Ft(sn, e.data));
1924
+ return !!(ze && e.hasChildNodes() && !tr(e.firstElementChild) && zt(ln, e.textContent) && zt(ln, e.innerHTML) || ze && mn[t] && j(e) === pn.element && N(e) === ut && (tr(e.firstElementChild) || typeof e.textContent == "string" && zt(ln, e.textContent)) || e.nodeType === pn.processingInstruction || ze && e.nodeType === pn.comment && zt(un, e.data));
1925
1925
  }, rr = function _matchesNameCheck(e, t) {
1926
- return e instanceof RegExp ? Ft(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
1926
+ return e instanceof RegExp ? zt(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
1927
1927
  }, ir = function _sanitizeDisallowedNode(e, t, n) {
1928
- if (!ke[t] && ur(t) && rr(Oe.tagNameCheck, t)) return !1;
1929
- if (Xe && !et[t] && !et[St(t)]) {
1928
+ if (!Ae[t] && ur(t) && rr(ke.tagNameCheck, t)) return !1;
1929
+ if (Ze && !tt[t] && !tt[Tt(t)]) {
1930
1930
  let t = T(e), r = S(e);
1931
1931
  if (r && t) {
1932
1932
  let o = r.length;
@@ -1940,30 +1940,30 @@ function createDOMPurify() {
1940
1940
  }, ar = function _forkSharedAllowlist(e, t, n, r) {
1941
1941
  return e.length === 0 ? t : t === n || t === r ? clone(t) : t;
1942
1942
  }, or = function _handleHookDetachedNode(e, t) {
1943
- return e === t || T(e) !== null ? !1 : (Ze && zn(e), !0);
1943
+ return e === t || T(e) !== null ? !1 : (Qe && zn(e), !0);
1944
1944
  }, sr = function _sanitizeElements(e, t) {
1945
- if (Gn(e), _executeHooks(q.beforeSanitizeElements, e, null), or(e, t)) return !0;
1945
+ if (Gn(e), _executeHooks(K.beforeSanitizeElements, e, null), or(e, t)) return !0;
1946
1946
  if ($n(e)) return Nn(e), !0;
1947
- let n = Q(P(e));
1948
- if (J = ar(q.uponSanitizeElement, J, Ee, Ve), _executeHooks(q.uponSanitizeElement, e, {
1947
+ let n = Q(M(e));
1948
+ if (q = ar(K.uponSanitizeElement, q, De, He), _executeHooks(K.uponSanitizeElement, e, {
1949
1949
  tagName: n,
1950
- allowedTags: J
1950
+ allowedTags: q
1951
1951
  }), or(e, t)) return !0;
1952
1952
  if (nr(e, n)) return Nn(e), !0;
1953
- if (ke[n] || !(je.tagCheck instanceof Function && je.tagCheck(n)) && !J[n]) {
1953
+ if (Ae[n] || !(Me.tagCheck instanceof Function && Me.tagCheck(n)) && !q[n]) {
1954
1954
  let r = ir(e, n, t);
1955
- return r === !1 && (_executeHooks(q.afterSanitizeElements, e, null), or(e, t)) ? !0 : r;
1955
+ return r === !1 && (_executeHooks(K.afterSanitizeElements, e, null), or(e, t)) ? !0 : r;
1956
1956
  }
1957
- if (N(e) === un.element && !Mn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Ft(cn, e.innerHTML)) return Nn(e), !0;
1958
- if (Le && e.nodeType === un.text) {
1957
+ if (j(e) === pn.element && !Mn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && zt(dn, e.innerHTML)) return Nn(e), !0;
1958
+ if (Re && e.nodeType === pn.text) {
1959
1959
  let t = Xn(e.textContent);
1960
- e.textContent !== t && (ht(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1960
+ e.textContent !== t && (vt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1961
1961
  }
1962
- return _executeHooks(q.afterSanitizeElements, e, null), or(e, t);
1962
+ return _executeHooks(K.afterSanitizeElements, e, null), or(e, t);
1963
1963
  }, cr = function _isValidAttribute(e, n, r) {
1964
- if (Ae[n] || Kn(n, e) || qe && (n === "id" || n === "name") && (r in t || r in wn)) return !1;
1965
- let o = Y[n] || je.attributeCheck instanceof Function && je.attributeCheck(n, e);
1966
- return Ne && Ft(ge, n) || Me && Ft(ve, n) ? !0 : o ? at[n] || Ft(Te, Tt(r, Ce, "")) || (n === "src" || n === "xlink:href" || n === "href") && e !== "script" && Et(r, "data:") === 0 && rt[e] || Fe && !Ft(be, Tt(r, Ce, "")) ? !0 : !r : ur(e) && rr(Oe.tagNameCheck, e) && rr(Oe.attributeNameCheck, n, e) || n === "is" && Oe.allowCustomizedBuiltInElements && rr(Oe.tagNameCheck, r);
1964
+ if (je[n] || Kn(n, e) || Je && (n === "id" || n === "name") && (r in t || r in wn)) return !1;
1965
+ let o = J[n] || Me.attributeCheck instanceof Function && Me.attributeCheck(n, e);
1966
+ return Fe && zt(ve, n) || Ne && zt(be, n) ? !0 : o ? at[n] || zt(Ee, Ot(r, we, "")) || (n === "src" || n === "xlink:href" || n === "href") && e !== "script" && kt(r, "data:") === 0 && rt[e] || Ie && !zt(Ce, Ot(r, we, "")) ? !0 : !r : ur(e) && rr(ke.tagNameCheck, e) && rr(ke.attributeNameCheck, n, e) || n === "is" && ke.allowCustomizedBuiltInElements && rr(ke.tagNameCheck, r);
1967
1967
  }, lr = addToSet({}, [
1968
1968
  "annotation-xml",
1969
1969
  "color-profile",
@@ -1974,11 +1974,11 @@ function createDOMPurify() {
1974
1974
  "font-face-uri",
1975
1975
  "missing-glyph"
1976
1976
  ]), ur = function _isBasicCustomElement(e) {
1977
- return !lr[St(e)] && Ft(we, e);
1977
+ return !lr[Tt(e)] && zt(Te, e);
1978
1978
  }, dr = function _applyTrustedTypesToAttribute(e, t, n, r) {
1979
- if (I && typeof p == "object" && typeof p.getAttributeType == "function" && !n) switch (p.getAttributeType(e, t)) {
1980
- case "TrustedHTML": return H(r);
1981
- case "TrustedScriptURL": return W(r);
1979
+ if (P && typeof p == "object" && typeof p.getAttributeType == "function" && !n) switch (p.getAttributeType(e, t)) {
1980
+ case "TrustedHTML": return ue(r);
1981
+ case "TrustedScriptURL": return L(r);
1982
1982
  }
1983
1983
  return r;
1984
1984
  }, fr = function _setAttributeValue(e, t, n, r) {
@@ -1988,31 +1988,31 @@ function createDOMPurify() {
1988
1988
  return In(t, e), !1;
1989
1989
  }
1990
1990
  }, pr = function _isUnsafeAttributeValue(e, t) {
1991
- return Re && Ft(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : St(e) === "attributename" && wt(t, "href") !== null;
1991
+ return ze && zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : Tt(e) === "attributename" && Dt(t, "href") !== null;
1992
1992
  }, mr = function _sanitizeAttributes(e, t) {
1993
- if (_executeHooks(q.beforeSanitizeAttributes, e, null), or(e, t)) return;
1993
+ if (_executeHooks(K.beforeSanitizeAttributes, e, null), or(e, t)) return;
1994
1994
  let n = e.attributes;
1995
1995
  if (!n || $n(e)) return;
1996
- Y = ar(q.uponSanitizeAttribute, Y, De, He);
1996
+ J = ar(K.uponSanitizeAttribute, J, Oe, Ue);
1997
1997
  let r = {
1998
1998
  attrName: "",
1999
1999
  attrValue: "",
2000
2000
  keepAttr: !0,
2001
- allowedAttributes: Y,
2001
+ allowedAttributes: J,
2002
2002
  forceKeepAttr: void 0
2003
2003
  }, o = n.length, s = Q(e.nodeName);
2004
2004
  for (; o--;) {
2005
- let t = n[o], c = t.name, u = t.namespaceURI, d = t.value, p = Q(c), m = d, g = c === "value" ? m : Dt(m), y = !1;
2006
- r.attrName = p, r.attrValue = g, r.keepAttr = !0, r.forceKeepAttr = void 0, _executeHooks(q.uponSanitizeAttribute, e, r), g = r.attrValue, Je && (p === "id" || p === "name") && Et(g, Ye) !== 0 && (In(c, e, t), g = Ye + g, y = !0), pr(c, g) ? In(c, e, t) : r.forceKeepAttr || (r.keepAttr ? !Ie && Ft(ln, g) ? In(c, e, t) : (Le && (g = Xn(g)), cr(s, p, g) ? (g = dr(s, p, u, g), g !== m && fr(e, c, u, g) && y && mt(DOMPurify.removed)) : In(c, e, t)) : In(c, e, t));
2005
+ let t = n[o], c = t.name, u = t.namespaceURI, d = t.value, p = Q(c), m = d, g = c === "value" ? m : jt(m), y = !1;
2006
+ r.attrName = p, r.attrValue = g, r.keepAttr = !0, r.forceKeepAttr = void 0, _executeHooks(K.uponSanitizeAttribute, e, r), g = r.attrValue, Ye && (p === "id" || p === "name") && kt(g, Xe) !== 0 && (In(c, e, t), g = Xe + g, y = !0), pr(c, g) ? In(c, e, t) : r.forceKeepAttr || (r.keepAttr ? !Le && zt(fn, g) ? In(c, e, t) : (Re && (g = Xn(g)), cr(s, p, g) ? (g = dr(s, p, u, g), g !== m && fr(e, c, u, g) && y && _t(DOMPurify.removed)) : In(c, e, t)) : In(c, e, t));
2007
2007
  }
2008
- _executeHooks(q.afterSanitizeAttributes, e, null), or(e, t);
2008
+ _executeHooks(K.afterSanitizeAttributes, e, null), or(e, t);
2009
2009
  }, hr = function _sanitizeShadowDOM(e) {
2010
2010
  let t = null, n = Yn(e);
2011
- for (_executeHooks(q.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(q.uponSanitizeShadowNode, t, null), sr(t, e), mr(t, e), er(t.content) && hr(t.content), N(t) === un.element) {
2011
+ for (_executeHooks(K.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(K.uponSanitizeShadowNode, t, null), sr(t, e), mr(t, e), er(t.content) && hr(t.content), j(t) === pn.element) {
2012
2012
  let e = E(t);
2013
2013
  er(e) && (gr(e), hr(e));
2014
2014
  }
2015
- Le && Qn(e), _executeHooks(q.afterSanitizeShadowDOM, e, null);
2015
+ Re && Qn(e), _executeHooks(K.afterSanitizeShadowDOM, e, null);
2016
2016
  }, gr = function _sanitizeAttachedShadowRoots(e) {
2017
2017
  let t = [{
2018
2018
  node: e,
@@ -2024,13 +2024,13 @@ function createDOMPurify() {
2024
2024
  hr(e.shadow);
2025
2025
  continue;
2026
2026
  }
2027
- let n = e.node, r = N(n) === un.element, o = S(n);
2027
+ let n = e.node, r = j(n) === pn.element, o = S(n);
2028
2028
  if (o) for (let e = o.length - 1; e >= 0; --e) t.push({
2029
2029
  node: o[e],
2030
2030
  shadow: null
2031
2031
  });
2032
2032
  if (r) {
2033
- let e = j ? j(n) : null;
2033
+ let e = ee ? ee(n) : null;
2034
2034
  if (typeof e == "string" && Q(e) === "template") {
2035
2035
  let e = n.content;
2036
2036
  er(e) && t.push({
@@ -2053,25 +2053,25 @@ function createDOMPurify() {
2053
2053
  };
2054
2054
  return DOMPurify.sanitize = function(e) {
2055
2055
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, o = null, s = null, c = null;
2056
- if (kt = !e, kt && (e = "<!-->"), typeof e != "string" && !tr(e) && (e = stringifyValue(e), typeof e != "string")) throw It("dirty is not a string, aborting");
2056
+ if (pt = !e, pt && (e = "<!-->"), typeof e != "string" && !tr(e) && (e = stringifyValue(e), typeof e != "string")) throw Bt("dirty is not a string, aborting");
2057
2057
  if (!DOMPurify.isSupported) return e;
2058
- Be ? (J = Ve, Y = He) : En(t), (q.uponSanitizeElement.length > 0 || q.uponSanitizeAttribute.length > 0) && (J = clone(J)), q.uponSanitizeAttribute.length > 0 && (Y = clone(Y)), DOMPurify.removed = [];
2059
- let u = Ze && typeof e != "string" && tr(e), d = [], p = Qe;
2058
+ Ve ? (q = He, J = Ue) : En(t), (K.uponSanitizeElement.length > 0 || K.uponSanitizeAttribute.length > 0) && (q = clone(q)), K.uponSanitizeAttribute.length > 0 && (J = clone(J)), DOMPurify.removed = [];
2059
+ let u = Qe && typeof e != "string" && tr(e), d = [], p = $e;
2060
2060
  if (u) {
2061
2061
  qn(e);
2062
- let t = P(e);
2062
+ let t = M(e);
2063
2063
  if (typeof t == "string") {
2064
2064
  let n = Q(t);
2065
- if (!J[n] || ke[n]) throw Fn(e), It("root node is forbidden and cannot be sanitized in-place");
2065
+ if (!q[n] || Ae[n]) throw Fn(e), Bt("root node is forbidden and cannot be sanitized in-place");
2066
2066
  }
2067
- if ($n(e)) throw Fn(e), It("root node is clobbered and cannot be sanitized in-place");
2068
- d = Bn(e), Qe = yt();
2069
- } else if (tr(e)) r = Jn("<!---->"), o = r.ownerDocument.importNode(e, !0), o.nodeType === un.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? r = o : r.appendChild(o), gr(r);
2067
+ if ($n(e)) throw Fn(e), Bt("root node is clobbered and cannot be sanitized in-place");
2068
+ d = Bn(e), $e = St();
2069
+ } else if (tr(e)) r = Jn("<!---->"), o = r.ownerDocument.importNode(e, !0), o.nodeType === pn.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? r = o : r.appendChild(o), gr(r);
2070
2070
  else {
2071
- if (!We && !Le && !ze && e.indexOf("<") === -1) return I && Ke ? H(e) : e;
2072
- if (r = Jn(e), !r) return We ? null : Ke ? L : "";
2071
+ if (!Ge && !Re && !Be && e.indexOf("<") === -1) return P && qe ? ue(e) : e;
2072
+ if (r = Jn(e), !r) return Ge ? null : qe ? F : "";
2073
2073
  }
2074
- r && Ue && Nn(r.firstChild);
2074
+ r && We && Nn(r.firstChild);
2075
2075
  let m = u ? e : r;
2076
2076
  try {
2077
2077
  u && gr(e);
@@ -2081,45 +2081,45 @@ function createDOMPurify() {
2081
2081
  } catch (t) {
2082
2082
  throw u && (Fn(e), Hn(e, d)), t;
2083
2083
  } finally {
2084
- Qe = p;
2084
+ $e = p;
2085
2085
  }
2086
2086
  if (u) {
2087
- if (Hn(e, d)) throw It("a node selected for removal could not be safely returned; refusing to sanitize in place");
2088
- return Le && Zn(e), e;
2087
+ if (Hn(e, d)) throw Bt("a node selected for removal could not be safely returned; refusing to sanitize in place");
2088
+ return Re && Zn(e), e;
2089
2089
  }
2090
- if (We) {
2091
- if (Le && Zn(r), Ge) for (c = ue.call(r.ownerDocument); r.firstChild;) c.appendChild(r.firstChild);
2090
+ if (Ge) {
2091
+ if (Re && Zn(r), Ke) for (c = W.call(r.ownerDocument); r.firstChild;) c.appendChild(r.firstChild);
2092
2092
  else c = r;
2093
- return (Y.shadowroot || Y.shadowrootmode) && (c = fe.call(n, c, !0)), c;
2093
+ return (J.shadowroot || J.shadowrootmode) && (c = pe.call(n, c, !0)), c;
2094
2094
  }
2095
- let g = ze ? r.outerHTML : r.innerHTML;
2096
- return ze && J["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Ft(rn, r.ownerDocument.doctype.name) && (g = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + g), Le && (g = Xn(g)), I && Ke ? H(g) : g;
2095
+ let g = Be ? r.outerHTML : r.innerHTML;
2096
+ return Be && q["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && zt(sn, r.ownerDocument.doctype.name) && (g = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + g), Re && (g = Xn(g)), P && qe ? ue(g) : g;
2097
2097
  }, DOMPurify.setConfig = function() {
2098
2098
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2099
- En(e), Be = !0, Ve = J, He = Y;
2099
+ En(e), Ve = !0, He = q, Ue = J;
2100
2100
  }, DOMPurify.clearConfig = function() {
2101
- Cn = null, Be = !1, Ve = null, He = null, I = te, L = "";
2101
+ Cn = null, Ve = !1, He = null, Ue = null, P = re, F = "";
2102
2102
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2103
2103
  Cn || En({});
2104
2104
  let r = Q(e), o = Q(t);
2105
- return typeof n == "string" && (pr(t, n) || !Ie && Ft(ln, n)) ? !1 : cr(r, o, n);
2105
+ return typeof n == "string" && (pr(t, n) || !Le && zt(fn, n)) ? !1 : cr(r, o, n);
2106
2106
  }, DOMPurify.addHook = function(e, t) {
2107
- typeof t == "function" && Nt(q, e) && ht(q[e], t);
2107
+ typeof t == "function" && It(K, e) && vt(K[e], t);
2108
2108
  }, DOMPurify.removeHook = function(e, t) {
2109
- if (Nt(q, e)) {
2109
+ if (It(K, e)) {
2110
2110
  if (t !== void 0) {
2111
- let n = Z(q[e], t);
2112
- return n === -1 ? void 0 : _t(q[e], n, 1)[0];
2111
+ let n = gt(K[e], t);
2112
+ return n === -1 ? void 0 : bt(K[e], n, 1)[0];
2113
2113
  }
2114
- return mt(q[e]);
2114
+ return _t(K[e]);
2115
2115
  }
2116
2116
  }, DOMPurify.removeHooks = function(e) {
2117
- Nt(q, e) && (q[e] = []);
2117
+ It(K, e) && (K[e] = []);
2118
2118
  }, DOMPurify.removeAllHooks = function() {
2119
- q = mn();
2119
+ K = _n();
2120
2120
  }, DOMPurify;
2121
2121
  }
2122
- var _n = createDOMPurify();
2122
+ var bn = createDOMPurify();
2123
2123
  // \0@oxc-project+runtime@0.155.0/helpers/esm/checkPrivateRedeclaration.js
2124
2124
  function _checkPrivateRedeclaration(e, t) {
2125
2125
  if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
@@ -2134,7 +2134,7 @@ function _assertClassBrand(e, t, n) {
2134
2134
  throw TypeError("Private element is not present on this object");
2135
2135
  }
2136
2136
  // ../../node_modules/.pnpm/marked@18.1.1/node_modules/marked/lib/marked.esm.js
2137
- var vn, _Class;
2137
+ var xn, _Class;
2138
2138
  function B() {
2139
2139
  return {
2140
2140
  async: !1,
@@ -2149,11 +2149,11 @@ function B() {
2149
2149
  walkTokens: null
2150
2150
  };
2151
2151
  }
2152
- var yn = B();
2152
+ var Sn = B();
2153
2153
  function V(e) {
2154
- yn = e;
2154
+ Sn = e;
2155
2155
  }
2156
- var bn = { exec: () => null };
2156
+ var Q = { exec: () => null };
2157
2157
  function D(e) {
2158
2158
  let t = [];
2159
2159
  return (n) => {
@@ -2165,19 +2165,19 @@ function h(e, t = "") {
2165
2165
  let n = typeof e == "string" ? e : e.source, r = {
2166
2166
  replace: (e, t) => {
2167
2167
  let o = typeof t == "string" ? t : t.source;
2168
- return o = o.replace(Sn.caret, "$1"), n = n.replace(e, o), r;
2168
+ return o = o.replace(wn.caret, "$1"), n = n.replace(e, o), r;
2169
2169
  },
2170
2170
  getRegex: () => new RegExp(n, t)
2171
2171
  };
2172
2172
  return r;
2173
2173
  }
2174
- var xn = ((e = "") => {
2174
+ var Cn = ((e = "") => {
2175
2175
  try {
2176
2176
  return !!RegExp("(?<=1)(?<!1)" + e);
2177
2177
  } catch {
2178
2178
  return !1;
2179
2179
  }
2180
- })(), Sn = {
2180
+ })(), wn = {
2181
2181
  codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm,
2182
2182
  outputLinkReplace: /\\([\[\]])/g,
2183
2183
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2236,103 +2236,103 @@ var xn = ((e = "") => {
2236
2236
  hrRegex: D((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
2237
2237
  fencesBeginRegex: D((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
2238
2238
  headingBeginRegex: D((e) => RegExp(`^ {0,${e}}#`)),
2239
- htmlBeginRegex: D((e) => RegExp(`^ {0,${e}}(?:</?(?:${In})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
2239
+ htmlBeginRegex: D((e) => RegExp(`^ {0,${e}}(?:</?(?:${zn})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
2240
2240
  blockquoteBeginRegex: D((e) => RegExp(`^ {0,${e}}>`))
2241
- }, Q = /^(?:[ \t]*(?:\n|$))+/, Cn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Tn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, En = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Dn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, On = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, kn = h(On).replace(/bull/g, Dn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), An = h(On).replace(/bull/g, Dn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), jn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Mn = /^[^\n]+/, Nn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pn = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Nn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Fn = h(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Dn).getRegex(), In = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ln = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Rn = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Ln).replace("tag", In).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), xe = (e) => h(jn).replace("hr", Tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", In).getRegex(), zn = xe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Bn = xe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Vn = {
2242
- blockquote: h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Bn).getRegex(),
2243
- code: Cn,
2244
- def: Pn,
2245
- fences: wn,
2246
- heading: En,
2247
- hr: Tn,
2248
- html: Rn,
2249
- lheading: kn,
2250
- list: Fn,
2251
- newline: Q,
2252
- paragraph: zn,
2253
- table: bn,
2254
- text: Mn
2255
- }, Hn = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", In).getRegex(), Un = {
2256
- ...Vn,
2257
- lheading: An,
2258
- table: Hn,
2259
- paragraph: h(jn).replace("hr", Tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Hn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", In).getRegex()
2260
- }, Wn = {
2261
- ...Vn,
2262
- html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ln).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
2241
+ }, Tn = /^(?:[ \t]*(?:\n|$))+/, En = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Dn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, On = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, kn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, An = / {0,3}(?:[*+-]|\d{1,9}[.)])/, jn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Mn = h(jn).replace(/bull/g, An).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Nn = h(jn).replace(/bull/g, An).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Pn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Fn = /^[^\n]+/, In = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ln = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", In).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rn = h(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, An).getRegex(), zn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Bn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Vn = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Bn).replace("tag", zn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), xe = (e) => h(Pn).replace("hr", On).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", zn).getRegex(), Hn = xe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Un = xe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Wn = {
2242
+ blockquote: h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Un).getRegex(),
2243
+ code: En,
2244
+ def: Ln,
2245
+ fences: Dn,
2246
+ heading: kn,
2247
+ hr: On,
2248
+ html: Vn,
2249
+ lheading: Mn,
2250
+ list: Rn,
2251
+ newline: Tn,
2252
+ paragraph: Hn,
2253
+ table: Q,
2254
+ text: Fn
2255
+ }, Gn = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", On).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", zn).getRegex(), Kn = {
2256
+ ...Wn,
2257
+ lheading: Nn,
2258
+ table: Gn,
2259
+ paragraph: h(Pn).replace("hr", On).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", zn).getRegex()
2260
+ }, qn = {
2261
+ ...Wn,
2262
+ html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Bn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
2263
2263
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2264
2264
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2265
- fences: bn,
2265
+ fences: Q,
2266
2266
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2267
- paragraph: h(jn).replace("hr", Tn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", kn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2268
- }, Gn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, qn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Jn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yn = /[\p{P}\p{S}]/u, Xn = /[\s\p{P}\p{S}]/u, Zn = /[^\s\p{P}\p{S}]/u, Qn = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Xn).getRegex(), $n = /[\p{Pi}\p{Ps}"']/u, er = /(?!~)[\p{P}\p{S}]/u, tr = /(?!~)[\s\p{P}\p{S}]/u, nr = /(?:[^\s\p{P}\p{S}]|~)/u, rr = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", xn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ir = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ar = h(ir, "u").replace(/punct/g, Yn).getRegex(), or = h(ir, "u").replace(/punct/g, er).getRegex(), sr = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, $n).replace(/punct/g, Yn).getRegex(), cr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", lr = h(cr, "gu").replace(/notPunctSpace/g, Zn).replace(/punctSpace/g, Xn).replace(/punct/g, Yn).getRegex(), ur = h(cr, "gu").replace(/notPunctSpace/g, nr).replace(/punctSpace/g, tr).replace(/punct/g, er).getRegex(), dr = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zn).replace(/punctSpace/g, Xn).replace(/punct/g, Yn).getRegex(), fr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Zn).replace(/punctSpace/g, Xn).replace(/punct/g, Yn).getRegex(), pr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zn).replace(/punctSpace/g, Xn).replace(/punct/g, Yn).getRegex(), mr = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Yn).getRegex(), hr = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zn).replace(/punctSpace/g, Xn).replace(/punct/g, Yn).getRegex(), gr = h(/\\(punct)/, "gu").replace(/punct/g, Yn).getRegex(), _r = h(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, Yn).getRegex(), vr = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), yr = h(Ln).replace("(?:-->|$)", "-->").getRegex(), br = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", yr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, Sr = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", xr).getRegex(), Cr = h(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", Sr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), wr = h(/^!?\[(label)\]\[(ref)\]/).replace("label", Sr).replace("ref", Nn).getRegex(), Tr = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Nn).getRegex(), Er = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Dr = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", xr).getRegex(), Or = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", Dr).replace("ref", Er).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Er).getRegex()).getRegex(), kr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ar = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), jr = {
2269
- _backpedal: bn,
2270
- anyPunctuation: gr,
2271
- anyPunctuationOutsideCode: _r,
2272
- autolink: vr,
2273
- blockSkip: rr,
2274
- br: qn,
2275
- code: Kn,
2276
- del: bn,
2277
- delLDelim: bn,
2278
- delRDelim: bn,
2279
- emStrongLDelim: ar,
2280
- emStrongRDelimAst: lr,
2281
- emStrongRDelimUnd: fr,
2282
- escape: Gn,
2283
- link: Cr,
2284
- nolink: Tr,
2285
- punctuation: Qn,
2286
- reflink: wr,
2287
- reflinkSearch: Or,
2288
- tag: br,
2289
- text: Jn,
2290
- url: bn
2291
- }, Mr = {
2292
- ...jr,
2293
- emStrongLDelim: sr,
2294
- emStrongRDelimAst: dr,
2295
- emStrongRDelimUnd: pr,
2296
- link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", Sr).getRegex(),
2297
- reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Sr).getRegex()
2298
- }, Nr = {
2299
- ...jr,
2300
- emStrongRDelimAst: ur,
2301
- emStrongLDelim: or,
2302
- delLDelim: mr,
2303
- delRDelim: hr,
2304
- url: h(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Ar).replace("protocol", kr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
2305
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2306
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2307
- text: h(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", kr).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
2308
- }, Pr = {
2309
- ...Nr,
2310
- br: h(qn).replace("{2,}", "*").getRegex(),
2311
- text: h(Nr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2267
+ paragraph: h(Pn).replace("hr", On).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Mn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2268
+ }, Jn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Yn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Xn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Zn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Qn = /[\p{P}\p{S}]/u, $n = /[\s\p{P}\p{S}]/u, er = /[^\s\p{P}\p{S}]/u, tr = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, $n).getRegex(), nr = /[\p{Pi}\p{Ps}"']/u, rr = /(?!~)[\p{P}\p{S}]/u, ir = /(?!~)[\s\p{P}\p{S}]/u, ar = /(?:[^\s\p{P}\p{S}]|~)/u, or = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Cn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), sr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, cr = h(sr, "u").replace(/punct/g, Qn).getRegex(), lr = h(sr, "u").replace(/punct/g, rr).getRegex(), ur = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, nr).replace(/punct/g, Qn).getRegex(), dr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", fr = h(dr, "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, $n).replace(/punct/g, Qn).getRegex(), pr = h(dr, "gu").replace(/notPunctSpace/g, ar).replace(/punctSpace/g, ir).replace(/punct/g, rr).getRegex(), mr = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, $n).replace(/punct/g, Qn).getRegex(), hr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, $n).replace(/punct/g, Qn).getRegex(), gr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, $n).replace(/punct/g, Qn).getRegex(), _r = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Qn).getRegex(), vr = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, $n).replace(/punct/g, Qn).getRegex(), yr = h(/\\(punct)/, "gu").replace(/punct/g, Qn).getRegex(), br = h(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, Qn).getRegex(), xr = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Sr = h(Bn).replace("(?:-->|$)", "-->").getRegex(), Cr = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Sr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), wr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, Tr = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", wr).getRegex(), Er = h(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", Tr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Dr = h(/^!?\[(label)\]\[(ref)\]/).replace("label", Tr).replace("ref", In).getRegex(), Or = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", In).getRegex(), kr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Ar = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", wr).getRegex(), jr = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", Ar).replace("ref", kr).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", kr).getRegex()).getRegex(), Mr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Nr = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), Pr = {
2269
+ _backpedal: Q,
2270
+ anyPunctuation: yr,
2271
+ anyPunctuationOutsideCode: br,
2272
+ autolink: xr,
2273
+ blockSkip: or,
2274
+ br: Xn,
2275
+ code: Yn,
2276
+ del: Q,
2277
+ delLDelim: Q,
2278
+ delRDelim: Q,
2279
+ emStrongLDelim: cr,
2280
+ emStrongRDelimAst: fr,
2281
+ emStrongRDelimUnd: hr,
2282
+ escape: Jn,
2283
+ link: Er,
2284
+ nolink: Or,
2285
+ punctuation: tr,
2286
+ reflink: Dr,
2287
+ reflinkSearch: jr,
2288
+ tag: Cr,
2289
+ text: Zn,
2290
+ url: Q
2312
2291
  }, Fr = {
2313
- normal: Vn,
2314
- gfm: Un,
2315
- pedantic: Wn
2292
+ ...Pr,
2293
+ emStrongLDelim: ur,
2294
+ emStrongRDelimAst: mr,
2295
+ emStrongRDelimUnd: gr,
2296
+ link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", Tr).getRegex(),
2297
+ reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Tr).getRegex()
2316
2298
  }, Ir = {
2317
- normal: jr,
2318
- gfm: Nr,
2319
- breaks: Pr,
2320
- pedantic: Mr
2299
+ ...Pr,
2300
+ emStrongRDelimAst: pr,
2301
+ emStrongLDelim: lr,
2302
+ delLDelim: _r,
2303
+ delRDelim: vr,
2304
+ url: h(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Nr).replace("protocol", Mr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
2305
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2306
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2307
+ text: h(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", Mr).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
2321
2308
  }, Lr = {
2309
+ ...Ir,
2310
+ br: h(Xn).replace("{2,}", "*").getRegex(),
2311
+ text: h(Ir.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2312
+ }, Rr = {
2313
+ normal: Wn,
2314
+ gfm: Kn,
2315
+ pedantic: qn
2316
+ }, zr = {
2317
+ normal: Pr,
2318
+ gfm: Ir,
2319
+ breaks: Lr,
2320
+ pedantic: Fr
2321
+ }, Br = {
2322
2322
  "&": "&amp;",
2323
2323
  "<": "&lt;",
2324
2324
  ">": "&gt;",
2325
2325
  "\"": "&quot;",
2326
2326
  "'": "&#39;"
2327
- }, Pe = (e) => Lr[e];
2327
+ }, Pe = (e) => Br[e];
2328
2328
  function w(e, t) {
2329
2329
  if (t) {
2330
- if (Sn.escapeTest.test(e)) return e.replace(Sn.escapeReplace, Pe);
2331
- } else if (Sn.escapeTestNoEncode.test(e)) return e.replace(Sn.escapeReplaceNoEncode, Pe);
2330
+ if (wn.escapeTest.test(e)) return e.replace(wn.escapeReplace, Pe);
2331
+ } else if (wn.escapeTestNoEncode.test(e)) return e.replace(wn.escapeReplaceNoEncode, Pe);
2332
2332
  return e;
2333
2333
  }
2334
2334
  function ye(e) {
2335
- return Sn.numericCharacterReference.test(e) ? e.replace(Sn.numericCharacterReferenceOrAmpersand, (e, t, n) => {
2335
+ return wn.numericCharacterReference.test(e) ? e.replace(wn.numericCharacterReferenceOrAmpersand, (e, t, n) => {
2336
2336
  if (t === void 0 && n === void 0) return "&amp;";
2337
2337
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
2338
2338
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : r === 38 ? "&amp;" : String.fromCodePoint(r);
@@ -2340,23 +2340,23 @@ function ye(e) {
2340
2340
  }
2341
2341
  function ie(e) {
2342
2342
  try {
2343
- e = encodeURI(e).replace(Sn.percentDecode, "%");
2343
+ e = encodeURI(e).replace(wn.percentDecode, "%");
2344
2344
  } catch {
2345
2345
  return null;
2346
2346
  }
2347
2347
  return e;
2348
2348
  }
2349
2349
  function oe(e, t) {
2350
- let n = e.replace(Sn.findPipe, (e, t, n) => {
2350
+ let n = e.replace(wn.findPipe, (e, t, n) => {
2351
2351
  let r = !1, o = t;
2352
2352
  for (; --o >= 0 && n[o] === "\\";) r = !r;
2353
2353
  return r ? "|" : " |";
2354
- }).split(Sn.splitPipe), r = 0;
2354
+ }).split(wn.splitPipe), r = 0;
2355
2355
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
2356
2356
  if (n.length > t) n.splice(t);
2357
2357
  else for (; n.length < t;) n.push("");
2358
2358
  }
2359
- for (; r < n.length; r++) n[r] = n[r].trim().replace(Sn.slashPipe, "|");
2359
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(wn.slashPipe, "|");
2360
2360
  return n;
2361
2361
  }
2362
2362
  function A(e, t, n) {
@@ -2373,7 +2373,7 @@ function A(e, t, n) {
2373
2373
  }
2374
2374
  function ae(e) {
2375
2375
  let t = e.split("\n"), n = t.length - 1;
2376
- for (; n >= 0 && Sn.blankLine.test(t[n]);) n--;
2376
+ for (; n >= 0 && wn.blankLine.test(t[n]);) n--;
2377
2377
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2378
2378
  }
2379
2379
  function v(e) {
@@ -2451,7 +2451,7 @@ function _e(e, t, n, r) {
2451
2451
  }
2452
2452
  var _ = class {
2453
2453
  constructor(e) {
2454
- t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || yn;
2454
+ t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || Sn;
2455
2455
  }
2456
2456
  space(e) {
2457
2457
  let t = this.rules.block.newline.exec(e);
@@ -2917,9 +2917,9 @@ ${g.join("\n")}`), r = r.substring(0, r.length - t.text.length) + u.text;
2917
2917
  };
2918
2918
  }
2919
2919
  }
2920
- }, Rr = (vn = /* @__PURE__ */ new WeakSet(), class a {
2920
+ }, Vr = (xn = /* @__PURE__ */ new WeakSet(), class a {
2921
2921
  constructor(e) {
2922
- _classPrivateMethodInitSpec(this, vn), t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || yn, this.options.tokenizer = this.options.tokenizer || new _(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2922
+ _classPrivateMethodInitSpec(this, xn), t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Sn, this.options.tokenizer = this.options.tokenizer || new _(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2923
2923
  inLink: !1,
2924
2924
  inRawBlock: !1,
2925
2925
  linkEmitted: !1,
@@ -2927,16 +2927,16 @@ ${g.join("\n")}`), r = r.substring(0, r.length - t.text.length) + u.text;
2927
2927
  top: !0
2928
2928
  };
2929
2929
  let n = {
2930
- other: Sn,
2931
- block: Fr.normal,
2932
- inline: Ir.normal
2930
+ other: wn,
2931
+ block: Rr.normal,
2932
+ inline: zr.normal
2933
2933
  };
2934
- this.options.pedantic ? (n.block = Fr.pedantic, n.inline = Ir.pedantic) : this.options.gfm && (n.block = Fr.gfm, n.inline = this.options.breaks ? Ir.breaks : Ir.gfm), this.tokenizer.rules = n;
2934
+ this.options.pedantic ? (n.block = Rr.pedantic, n.inline = zr.pedantic) : this.options.gfm && (n.block = Rr.gfm, n.inline = this.options.breaks ? zr.breaks : zr.gfm), this.tokenizer.rules = n;
2935
2935
  }
2936
2936
  static get rules() {
2937
2937
  return {
2938
- block: Fr,
2939
- inline: Ir
2938
+ block: Rr,
2939
+ inline: zr
2940
2940
  };
2941
2941
  }
2942
2942
  static lex(e, t) {
@@ -2946,7 +2946,7 @@ ${g.join("\n")}`), r = r.substring(0, r.length - t.text.length) + u.text;
2946
2946
  return new a(t).inlineTokens(e);
2947
2947
  }
2948
2948
  lex(e) {
2949
- e = e.replace(Sn.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2949
+ e = e.replace(wn.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2950
2950
  for (let e = 0; e < this.inlineQueue.length; e++) {
2951
2951
  let t = this.inlineQueue[e];
2952
2952
  this.inlineTokens(t.src, t.tokens);
@@ -2954,7 +2954,7 @@ ${g.join("\n")}`), r = r.substring(0, r.length - t.text.length) + u.text;
2954
2954
  return this.inlineQueue = [], this.tokens;
2955
2955
  }
2956
2956
  blockTokens(e, t = [], n = !1) {
2957
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Sn.tabCharGlobal, " ").replace(Sn.spaceLine, ""));
2957
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(wn.tabCharGlobal, " ").replace(wn.spaceLine, ""));
2958
2958
  let r = 1 / 0;
2959
2959
  for (; e;) {
2960
2960
  if (e.length < r) r = e.length;
@@ -3035,7 +3035,7 @@ ${g.join("\n")}`), r = r.substring(0, r.length - t.text.length) + u.text;
3035
3035
  let n = this.state.linkParenPossible;
3036
3036
  this.state.linkParenPossible = n && e.includes(")");
3037
3037
  try {
3038
- return _assertClassBrand(vn, this, _e2).call(this, e, t);
3038
+ return _assertClassBrand(xn, this, _e2).call(this, e, t);
3039
3039
  } finally {
3040
3040
  this.state.linkParenPossible = n;
3041
3041
  }
@@ -3108,13 +3108,13 @@ function _e2(e, t) {
3108
3108
  }
3109
3109
  var $ = class {
3110
3110
  constructor(e) {
3111
- t(this, "options", void 0), t(this, "parser", void 0), this.options = e || yn;
3111
+ t(this, "options", void 0), t(this, "parser", void 0), this.options = e || Sn;
3112
3112
  }
3113
3113
  space(e) {
3114
3114
  return "";
3115
3115
  }
3116
3116
  code({ text: e, lang: t, escaped: n }) {
3117
- let r = (t || "").match(Sn.notSpaceStart)?.[0], o = e ? e.replace(Sn.endingNewline, "") + "\n" : "";
3117
+ let r = (t || "").match(wn.notSpaceStart)?.[0], o = e ? e.replace(wn.endingNewline, "") + "\n" : "";
3118
3118
  return r ? "<pre><code class=\"language-" + w(r) + "\">" + (n ? o : w(o, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? o : w(o, !0)) + "</code></pre>\n";
3119
3119
  }
3120
3120
  blockquote({ tokens: e }) {
@@ -3242,9 +3242,9 @@ ${e}</tr>
3242
3242
  checkbox({ raw: e }) {
3243
3243
  return e;
3244
3244
  }
3245
- }, zr = class a {
3245
+ }, Hr = class a {
3246
3246
  constructor(e) {
3247
- t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || yn, this.options.renderer = this.options.renderer || new $(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z();
3247
+ t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || Sn, this.options.renderer = this.options.renderer || new $(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z();
3248
3248
  }
3249
3249
  static parse(e, t) {
3250
3250
  return new a(t).parse(e);
@@ -3392,9 +3392,9 @@ ${e}</tr>
3392
3392
  }
3393
3393
  return n;
3394
3394
  }
3395
- }, Br = (_Class = class {
3395
+ }, Ur = (_Class = class {
3396
3396
  constructor(e) {
3397
- t(this, "options", void 0), t(this, "block", void 0), this.options = e || yn;
3397
+ t(this, "options", void 0), t(this, "block", void 0), this.options = e || Sn;
3398
3398
  }
3399
3399
  preprocess(e) {
3400
3400
  return e;
@@ -3409,10 +3409,10 @@ ${e}</tr>
3409
3409
  return e;
3410
3410
  }
3411
3411
  provideLexer(e = this.block) {
3412
- return e ? Rr.lex : Rr.lexInline;
3412
+ return e ? Vr.lex : Vr.lexInline;
3413
3413
  }
3414
3414
  provideParser(e = this.block) {
3415
- return e ? zr.parse : zr.parseInline;
3415
+ return e ? Hr.parse : Hr.parseInline;
3416
3416
  }
3417
3417
  }, t(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
3418
3418
  "preprocess",
@@ -3430,7 +3430,7 @@ function C(e, t) {
3430
3430
  }
3431
3431
  var U = class {
3432
3432
  constructor(...e) {
3433
- t(this, "defaults", B()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser", zr), t(this, "Renderer", $), t(this, "TextRenderer", z), t(this, "Lexer", Rr), t(this, "Tokenizer", _), t(this, "Hooks", Br), this.use(...e);
3433
+ t(this, "defaults", B()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser", Hr), t(this, "Renderer", $), t(this, "TextRenderer", z), t(this, "Lexer", Vr), t(this, "Tokenizer", _), t(this, "Hooks", Ur), this.use(...e);
3434
3434
  }
3435
3435
  walkTokens(e, t) {
3436
3436
  let n = [];
@@ -3509,13 +3509,13 @@ var U = class {
3509
3509
  n.tokenizer = t;
3510
3510
  }
3511
3511
  if (e.hooks) {
3512
- let t = this.defaults.hooks || new Br();
3512
+ let t = this.defaults.hooks || new Ur();
3513
3513
  for (let n in e.hooks) {
3514
3514
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
3515
3515
  if (["options", "block"].includes(n)) continue;
3516
3516
  let r = n, o = e.hooks[r], s = t[r];
3517
- t[r] = Br.passThroughHooks.has(n) ? (e) => {
3518
- if (this.defaults.async && Br.passThroughHooksRespectAsync.has(n)) return (async () => {
3517
+ t[r] = Ur.passThroughHooks.has(n) ? (e) => {
3518
+ if (this.defaults.async && Ur.passThroughHooksRespectAsync.has(n)) return (async () => {
3519
3519
  let n = await o.call(t, e);
3520
3520
  return s.call(t, n);
3521
3521
  })();
@@ -3552,10 +3552,10 @@ var U = class {
3552
3552
  }, this;
3553
3553
  }
3554
3554
  lexer(e, t) {
3555
- return Rr.lex(e, t ?? this.defaults);
3555
+ return Vr.lex(e, t ?? this.defaults);
3556
3556
  }
3557
3557
  parser(e, t) {
3558
- return zr.parse(e, t ?? this.defaults);
3558
+ return Hr.parse(e, t ?? this.defaults);
3559
3559
  }
3560
3560
  parseMarkdown(e) {
3561
3561
  return (t, n) => {
@@ -3567,16 +3567,16 @@ var U = class {
3567
3567
  if (typeof t > "u" || t === null) return s(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
3568
3568
  if (typeof t != "string") return s(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
3569
3569
  if (o.hooks && (o.hooks.options = o, o.hooks.block = e), o.async) return (async () => {
3570
- let n = o.hooks ? await o.hooks.preprocess(t) : t, r = await (o.hooks ? await o.hooks.provideLexer(e) : e ? Rr.lex : Rr.lexInline)(n, o), s = o.hooks ? await o.hooks.processAllTokens(r) : r;
3570
+ let n = o.hooks ? await o.hooks.preprocess(t) : t, r = await (o.hooks ? await o.hooks.provideLexer(e) : e ? Vr.lex : Vr.lexInline)(n, o), s = o.hooks ? await o.hooks.processAllTokens(r) : r;
3571
3571
  o.walkTokens && await Promise.all(this.walkTokens(s, o.walkTokens));
3572
- let c = await (o.hooks ? await o.hooks.provideParser(e) : e ? zr.parse : zr.parseInline)(s, o);
3572
+ let c = await (o.hooks ? await o.hooks.provideParser(e) : e ? Hr.parse : Hr.parseInline)(s, o);
3573
3573
  return o.hooks ? await o.hooks.postprocess(c) : c;
3574
3574
  })().catch(s);
3575
3575
  try {
3576
3576
  o.hooks && (t = o.hooks.preprocess(t));
3577
- let n = (o.hooks ? o.hooks.provideLexer(e) : e ? Rr.lex : Rr.lexInline)(t, o);
3577
+ let n = (o.hooks ? o.hooks.provideLexer(e) : e ? Vr.lex : Vr.lexInline)(t, o);
3578
3578
  o.hooks && (n = o.hooks.processAllTokens(n)), o.walkTokens && this.walkTokens(n, o.walkTokens);
3579
- let r = (o.hooks ? o.hooks.provideParser(e) : e ? zr.parse : zr.parseInline)(n, o);
3579
+ let r = (o.hooks ? o.hooks.provideParser(e) : e ? Hr.parse : Hr.parseInline)(n, o);
3580
3580
  return o.hooks && (r = o.hooks.postprocess(r)), r;
3581
3581
  } catch (e) {
3582
3582
  return s(e);
@@ -3593,21 +3593,21 @@ var U = class {
3593
3593
  throw n;
3594
3594
  };
3595
3595
  }
3596
- }, Vr = new U();
3596
+ }, Wr = new U();
3597
3597
  function f(e, t) {
3598
- return Vr.parse(e, t);
3598
+ return Wr.parse(e, t);
3599
3599
  }
3600
3600
  f.options = f.setOptions = function(e) {
3601
- return Vr.setOptions(e), f.defaults = Vr.defaults, V(f.defaults), f;
3602
- }, f.getDefaults = B, f.defaults = yn;
3601
+ return Wr.setOptions(e), f.defaults = Wr.defaults, V(f.defaults), f;
3602
+ }, f.getDefaults = B, f.defaults = Sn;
3603
3603
  function At(...e) {
3604
- return Vr.use(...e), f.defaults = Vr.defaults, V(f.defaults), f;
3604
+ return Wr.use(...e), f.defaults = Wr.defaults, V(f.defaults), f;
3605
3605
  }
3606
3606
  f.use = At, f.walkTokens = function(e, t) {
3607
- return Vr.walkTokens(e, t);
3608
- }, f.parseInline = Vr.parseInline, f.Parser = zr, f.parser = zr.parse, f.Renderer = $, f.TextRenderer = z, f.Lexer = Rr, f.lexer = Rr.lex, f.Tokenizer = _, f.Hooks = Br, f.parse = f, f.options, f.setOptions, f.walkTokens, f.parseInline, zr.parse, Rr.lex;
3607
+ return Wr.walkTokens(e, t);
3608
+ }, f.parseInline = Wr.parseInline, f.Parser = Hr, f.parser = Hr.parse, f.Renderer = $, f.TextRenderer = z, f.Lexer = Vr, f.lexer = Vr.lex, f.Tokenizer = _, f.Hooks = Ur, f.parse = f, f.options, f.setOptions, f.walkTokens, f.parseInline, Hr.parse, Vr.lex;
3609
3609
  // bot/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
3610
- var Hr = ["aria-label"], Ur = { class: "px-4 pb-2 pt-4" }, Wr = ["innerHTML"], Gr = ["onClick"], Kr = /* @__PURE__ */ N({
3610
+ var Gr = ["aria-label"], Kr = { class: "px-4 pb-2 pt-4" }, qr = ["innerHTML"], Jr = ["onClick"], Yr = /* @__PURE__ */ M({
3611
3611
  __name: "ChatCardBlock",
3612
3612
  props: {
3613
3613
  spec: {},
@@ -3618,7 +3618,7 @@ var Hr = ["aria-label"], Ur = { class: "px-4 pb-2 pt-4" }, Wr = ["innerHTML"], G
3618
3618
  let n = e, r = t, o = S(() => {
3619
3619
  if (!n.spec.body) return "";
3620
3620
  let e = f.parse(n.spec.body, { async: !1 });
3621
- return _n.sanitize(e, { ADD_ATTR: ["target"] });
3621
+ return bn.sanitize(e, { ADD_ATTR: ["target"] });
3622
3622
  }), s = S(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), c = S(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), u = S(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), d = S(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), p = S(() => n.inverted ? `inset 0 0 0 1px ${s.value}` : `inset 0 0 0 1px ${s.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), m = S(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3623
3623
  function actionStyle(e) {
3624
3624
  return e === "primary" || e === "destructive" ? {
@@ -3629,45 +3629,45 @@ var Hr = ["aria-label"], Ur = { class: "px-4 pb-2 pt-4" }, Wr = ["innerHTML"], G
3629
3629
  color: u.value
3630
3630
  };
3631
3631
  }
3632
- return (t, n) => (R(), O("div", {
3632
+ return (t, n) => (L(), O("div", {
3633
3633
  "data-test": "chat-card",
3634
3634
  class: "my-6 w-full self-start overflow-hidden rounded-2xl",
3635
- style: L({
3635
+ style: I({
3636
3636
  background: m.value,
3637
3637
  boxShadow: p.value
3638
3638
  }),
3639
3639
  "aria-label": e.spec.title
3640
3640
  }, [
3641
- k("div", Ur, [k("div", {
3641
+ k("div", Kr, [k("div", {
3642
3642
  class: "text-[14px] font-semibold leading-tight",
3643
- style: L({ color: u.value })
3644
- }, K(e.spec.title), 5)]),
3645
- o.value ? (R(), O("div", {
3643
+ style: I({ color: u.value })
3644
+ }, G(e.spec.title), 5)]),
3645
+ o.value ? (L(), O("div", {
3646
3646
  key: 0,
3647
3647
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
3648
- style: L({ color: d.value }),
3648
+ style: I({ color: d.value }),
3649
3649
  innerHTML: o.value
3650
- }, null, 12, Wr)) : E("", !0),
3651
- e.spec.actions?.length ? (R(), O("div", {
3650
+ }, null, 12, qr)) : E("", !0),
3651
+ e.spec.actions?.length ? (L(), O("div", {
3652
3652
  key: 1,
3653
3653
  class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
3654
- style: L({ borderTop: `1px solid ${c.value}` })
3655
- }, [(R(!0), O(y, null, W(e.spec.actions, (e) => (R(), O("button", {
3654
+ style: I({ borderTop: `1px solid ${c.value}` })
3655
+ }, [(L(!0), O(y, null, H(e.spec.actions, (e) => (L(), O("button", {
3656
3656
  key: e.label,
3657
3657
  type: "button",
3658
3658
  "data-test": "chat-card-action",
3659
3659
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3660
- style: L(actionStyle(e.style)),
3660
+ style: I(actionStyle(e.style)),
3661
3661
  onClick: (t) => r("action", e.reply)
3662
- }, K(e.label), 13, Gr))), 128))], 4)) : E("", !0)
3663
- ], 12, Hr));
3662
+ }, G(e.label), 13, Jr))), 128))], 4)) : E("", !0)
3663
+ ], 12, Gr));
3664
3664
  }
3665
- }), qr = 112, Jr = 52, Yr = 14, Xr = 54, Zr = 34, Qr = 260;
3665
+ }), Xr = 112, Zr = 52, Qr = 14, $r = 54, ei = 34, ti = 260;
3666
3666
  function nodeWidthFor(e) {
3667
3667
  let { orientation: t, maxRows: n, maxWidth: r } = e;
3668
- if (t === "horizontal" || !r) return qr;
3669
- let o = r - 28 - (n - 1) * Xr;
3670
- return Math.min(Qr, Math.max(qr, Math.floor(o / n)));
3668
+ if (t === "horizontal" || !r) return Xr;
3669
+ let o = r - 28 - (n - 1) * $r;
3670
+ return Math.min(ti, Math.max(Xr, Math.floor(o / n)));
3671
3671
  }
3672
3672
  function orientationFor(e) {
3673
3673
  return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
@@ -3704,11 +3704,11 @@ function buildLayout(e, t, n) {
3704
3704
  orientation: t,
3705
3705
  maxRows: c,
3706
3706
  ...n === void 0 ? {} : { maxWidth: n }
3707
- }), p = t === "horizontal" ? 28 + u * d + (u - 1) * Xr : 28 + c * d + (c - 1) * Xr, m = t === "horizontal" ? 28 + c * Jr + (c - 1) * Zr : 28 + u * Jr + (u - 1) * Zr, g = [];
3707
+ }), p = t === "horizontal" ? 28 + u * d + (u - 1) * $r : 28 + c * d + (c - 1) * $r, m = t === "horizontal" ? 28 + c * Zr + (c - 1) * ei : 28 + u * Zr + (u - 1) * ei, g = [];
3708
3708
  for (let [e, [, n]] of s.entries()) {
3709
- let r = (c - n.length) * (t === "horizontal" ? 86 : d + Xr) / 2;
3709
+ let r = (c - n.length) * (t === "horizontal" ? 86 : d + $r) / 2;
3710
3710
  for (let [o, s] of n.entries()) {
3711
- let n = t === "horizontal" ? Yr + e * (d + Xr) : Yr + r + o * (d + Xr), c = t === "horizontal" ? Yr + r + o * 86 : Yr + e * 86;
3711
+ let n = t === "horizontal" ? Qr + e * (d + $r) : Qr + r + o * (d + $r), c = t === "horizontal" ? Qr + r + o * 86 : Qr + e * 86;
3712
3712
  g.push({
3713
3713
  id: s.id,
3714
3714
  label: s.label,
@@ -3717,7 +3717,7 @@ function buildLayout(e, t, n) {
3717
3717
  x: n,
3718
3718
  y: c,
3719
3719
  width: d,
3720
- height: Jr
3720
+ height: Zr
3721
3721
  });
3722
3722
  }
3723
3723
  }
@@ -3793,14 +3793,14 @@ function formatChatVisualTick(e) {
3793
3793
  let { prefix: r, suffix: o } = affixes(n);
3794
3794
  return `${r}${formatChatVisualValue({ value: t })}${o}`;
3795
3795
  }
3796
- var $r = 5.4, ei = 10, ti = 15, ni = 16;
3796
+ var ni = 5.4, ri = 10, ii = 15, ai = 16;
3797
3797
  function planChatVisualXLabels(e) {
3798
3798
  let { labels: t, plotWidth: n } = e;
3799
3799
  if (!t.length || n <= 0) return {
3800
3800
  mode: "horizontal",
3801
3801
  entries: []
3802
3802
  };
3803
- let r = t.map((e) => e.length > ni ? `${e.slice(0, 15).trimEnd()}\u2026` : e), o = t.length - 1;
3803
+ let r = t.map((e) => e.length > ai ? `${e.slice(0, 15).trimEnd()}\u2026` : e), o = t.length - 1;
3804
3804
  if (o === 0) return {
3805
3805
  mode: "horizontal",
3806
3806
  entries: [{
@@ -3808,14 +3808,14 @@ function planChatVisualXLabels(e) {
3808
3808
  text: r[0]
3809
3809
  }]
3810
3810
  };
3811
- if ((Math.max(...r.map((e) => e.length * $r)) + ei) * t.length <= n) return {
3811
+ if ((Math.max(...r.map((e) => e.length * ni)) + ri) * t.length <= n) return {
3812
3812
  mode: "horizontal",
3813
3813
  entries: r.map((e, t) => ({
3814
3814
  index: t,
3815
3815
  text: e
3816
3816
  }))
3817
3817
  };
3818
- let s = Math.max(2, Math.floor(n / ti));
3818
+ let s = Math.max(2, Math.floor(n / ii));
3819
3819
  if (t.length <= s) return {
3820
3820
  mode: "angled",
3821
3821
  entries: r.map((e, t) => ({
@@ -3834,22 +3834,22 @@ function planChatVisualXLabels(e) {
3834
3834
  };
3835
3835
  }
3836
3836
  // bot/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
3837
- var ri = [
3837
+ var oi = [
3838
3838
  "data-visual-type",
3839
3839
  "data-chart-type",
3840
3840
  "data-stacking",
3841
3841
  "data-diagram-type",
3842
3842
  "aria-label"
3843
- ], ii = { class: "mb-2.5" }, ai = ["aria-label"], oi = {
3843
+ ], si = { class: "mb-2.5" }, ci = ["aria-label"], li = {
3844
3844
  key: 0,
3845
3845
  "data-test": "chat-visual-horizontal-bars",
3846
3846
  class: "grid gap-3"
3847
- }, si = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, ci = ["viewBox"], li = [
3847
+ }, ui = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, di = ["viewBox"], fi = [
3848
3848
  "x1",
3849
3849
  "x2",
3850
3850
  "y1",
3851
3851
  "y2"
3852
- ], ui = ["x", "y"], di = [
3852
+ ], pi = ["x", "y"], mi = [
3853
3853
  "data-row-index",
3854
3854
  "data-series-index",
3855
3855
  "data-data-key",
@@ -3857,48 +3857,48 @@ var ri = [
3857
3857
  "y",
3858
3858
  "width",
3859
3859
  "height"
3860
- ], fi = ["data-trend-key", "d"], pi = ["d"], mi = ["cx", "cy"], hi = ["cx", "cy"], gi = [
3860
+ ], hi = ["data-trend-key", "d"], gi = ["d"], _i = ["cx", "cy"], vi = ["cx", "cy"], yi = [
3861
3861
  "x",
3862
3862
  "y",
3863
3863
  "text-anchor",
3864
3864
  "transform"
3865
- ], _i = {
3865
+ ], bi = {
3866
3866
  key: 2,
3867
3867
  class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
3868
- }, vi = {
3868
+ }, xi = {
3869
3869
  key: 1,
3870
3870
  class: "grid gap-3"
3871
- }, yi = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, bi = { class: "shrink-0 tabular-nums" }, xi = {
3871
+ }, Si = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Ci = { class: "shrink-0 tabular-nums" }, wi = {
3872
3872
  key: 2,
3873
3873
  class: "overflow-x-auto"
3874
- }, Si = ["viewBox", "aria-label"], Ci = [
3874
+ }, Ti = ["viewBox", "aria-label"], Ei = [
3875
3875
  "data-from",
3876
3876
  "data-to",
3877
3877
  "x1",
3878
3878
  "y1",
3879
3879
  "x2",
3880
3880
  "y2"
3881
- ], wi = ["cx", "cy"], Ti = ["x", "y"], Ei = [
3881
+ ], Di = ["cx", "cy"], Oi = ["x", "y"], ki = [
3882
3882
  "data-node-id",
3883
3883
  "data-node-kind",
3884
3884
  "transform"
3885
- ], Di = ["points"], Oi = ["width", "height"], ki = ["width", "height"], Ai = {
3885
+ ], Ai = ["points"], ji = ["width", "height"], Mi = ["width", "height"], Ni = {
3886
3886
  xmlns: "http://www.w3.org/1999/xhtml",
3887
3887
  class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
3888
- }, ji = /* @__PURE__ */ N({
3888
+ }, Pi = /* @__PURE__ */ M({
3889
3889
  __name: "ChatVisualBlock",
3890
3890
  props: {
3891
3891
  result: {},
3892
3892
  inverted: { type: Boolean }
3893
3893
  },
3894
3894
  setup(e) {
3895
- let t = e, n = H(), r = G(360), o;
3896
- ne(() => {
3895
+ let t = e, n = R(), r = W(360), o;
3896
+ ce(() => {
3897
3897
  typeof ResizeObserver < "u" && n.value && (o = new ResizeObserver((e) => {
3898
3898
  let t = e[0]?.contentRect.width;
3899
3899
  t && (r.value = Math.round(t));
3900
3900
  }), o.observe(n.value));
3901
- }), te(() => o?.disconnect());
3901
+ }), se(() => o?.disconnect());
3902
3902
  let s = S(() => Math.min(720, Math.max(280, r.value))), c = S(() => t.result.ok ? t.result.spec : null), u = S(() => c.value?.visualType === "chart" ? c.value : null), d = S(() => c.value?.visualType === "diagram" ? c.value : null);
3903
3903
  function isCartesianChart(e) {
3904
3904
  return e?.chartType === "bar" || e?.chartType === "line" || e?.chartType === "scatter";
@@ -3968,7 +3968,7 @@ var ri = [
3968
3968
  let n = e > 0 ? e : 1, r = Math.floor(Math.log10(n)), o = n / 10 ** r, s;
3969
3969
  return s = t ? o < 1.5 ? 1 : o < 3 ? 2 : o < 7 ? 5 : 10 : o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10, s * 10 ** r;
3970
3970
  }
3971
- let j = S(() => {
3971
+ let ee = S(() => {
3972
3972
  let e = T.value, t = e.length ? Math.max(0, ...e) : 1, n = e.length ? Math.min(0, ...e) : 0;
3973
3973
  if (n === t) return {
3974
3974
  min: 0,
@@ -3982,7 +3982,7 @@ var ri = [
3982
3982
  max: s,
3983
3983
  ticks: c
3984
3984
  };
3985
- }), M = S(() => resolveSharedSeriesFormat({ series: g.value })), N = S(() => {
3985
+ }), te = S(() => resolveSharedSeriesFormat({ series: g.value })), j = S(() => {
3986
3986
  let e = m.value;
3987
3987
  if (!e) return {
3988
3988
  mode: "horizontal",
@@ -3993,8 +3993,8 @@ var ri = [
3993
3993
  labels: e.data.map((e) => String(e?.[t] ?? "")),
3994
3994
  plotWidth: Math.max(200, s.value - 42)
3995
3995
  });
3996
- }), P = S(() => {
3997
- let e = M.value?.valueFormat, t = !!(M.value && (e === "currency" || e === "percent" || M.value.valuePrefix || M.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = N.value.mode === "angled";
3996
+ }), M = S(() => {
3997
+ let e = te.value?.valueFormat, t = !!(te.value && (e === "currency" || e === "percent" || te.value.valuePrefix || te.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = j.value.mode === "angled";
3998
3998
  return {
3999
3999
  width: s.value,
4000
4000
  height: 168 + (r ? 36 : 0),
@@ -4005,7 +4005,7 @@ var ri = [
4005
4005
  };
4006
4006
  });
4007
4007
  function labelCenterX(e, t) {
4008
- let n = m.value, r = P.value;
4008
+ let n = m.value, r = M.value;
4009
4009
  if (n?.chartType === "bar") {
4010
4010
  let n = r.width - r.left - r.right;
4011
4011
  return r.left + (e + .5) * (n / Math.max(t, 1));
@@ -4013,11 +4013,11 @@ var ri = [
4013
4013
  return xForIndex(e, t);
4014
4014
  }
4015
4015
  function xForIndex(e, t) {
4016
- let n = P.value, r = n.width - n.left - n.right;
4016
+ let n = M.value, r = n.width - n.left - n.right;
4017
4017
  return t <= 1 ? n.left + r / 2 : n.left + r * e / (t - 1);
4018
4018
  }
4019
4019
  function yForValue(e) {
4020
- let { min: t, max: n } = j.value, r = P.value, o = r.height - r.top - r.bottom;
4020
+ let { min: t, max: n } = ee.value, r = M.value, o = r.height - r.top - r.bottom;
4021
4021
  return r.top + (n - e) / (n - t || 1) * o;
4022
4022
  }
4023
4023
  function pathForSeries(e) {
@@ -4027,7 +4027,7 @@ var ri = [
4027
4027
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(o).toFixed(1)}`;
4028
4028
  }).join(" ") : "";
4029
4029
  }
4030
- let ee = S(() => {
4030
+ let ne = S(() => {
4031
4031
  let e = m.value;
4032
4032
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
4033
4033
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
@@ -4038,10 +4038,10 @@ var ri = [
4038
4038
  dataKey: e.trendLine.dataKey,
4039
4039
  seriesIndex: u
4040
4040
  };
4041
- }), F = S(() => {
4041
+ }), N = S(() => {
4042
4042
  let e = m.value;
4043
4043
  if (!e || e.chartType !== "bar") return [];
4044
- let t = P.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
4044
+ let t = M.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
4045
4045
  if (x.value) {
4046
4046
  let r = Math.max(4, Math.min(24, n * .42));
4047
4047
  return e.data.flatMap((o, s) => {
@@ -4075,12 +4075,12 @@ var ri = [
4075
4075
  dataKey: e.dataKey
4076
4076
  };
4077
4077
  }));
4078
- }), I = S(() => {
4078
+ }), P = S(() => {
4079
4079
  let e = m.value;
4080
4080
  if (!e) return [];
4081
4081
  let t = e.data;
4082
4082
  if (!t.length) return [];
4083
- let n = t.length - 1, r = N.value, o = r.mode === "angled";
4083
+ let n = t.length - 1, r = j.value, o = r.mode === "angled";
4084
4084
  return r.entries.map(({ index: e, text: r }) => ({
4085
4085
  key: `${e}`,
4086
4086
  label: r,
@@ -4088,7 +4088,7 @@ var ri = [
4088
4088
  anchor: o ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
4089
4089
  angled: o
4090
4090
  })).filter((e) => e.label);
4091
- }), re = S(() => {
4091
+ }), F = S(() => {
4092
4092
  let e = m.value;
4093
4093
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || x.value) return [];
4094
4094
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -4111,7 +4111,7 @@ var ri = [
4111
4111
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
4112
4112
  seriesIndex: 0
4113
4113
  }));
4114
- }), se = S(() => {
4114
+ }), re = S(() => {
4115
4115
  let e = m.value;
4116
4116
  if (!e?.data.length) return [];
4117
4117
  let t = e.data[e.data.length - 1];
@@ -4127,7 +4127,7 @@ var ri = [
4127
4127
  seriesIndex: n
4128
4128
  };
4129
4129
  });
4130
- }), ce = S(() => {
4130
+ }), ue = S(() => {
4131
4131
  let e = m.value;
4132
4132
  if (!e?.data.length || e.chartType !== "line") return [];
4133
4133
  let t = e.data.length - 1, n = e.data[t];
@@ -4156,27 +4156,27 @@ var ri = [
4156
4156
  series: r
4157
4157
  })
4158
4158
  }));
4159
- }), fe = S(() => d.value ? layoutChatDiagram(d.value, { maxWidth: r.value }) : null), q = [
4159
+ }), fe = S(() => d.value ? layoutChatDiagram(d.value, { maxWidth: r.value }) : null), K = [
4160
4160
  "var(--color-theme-900)",
4161
4161
  "var(--color-primary-500)",
4162
4162
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
4163
- ], pe = [
4163
+ ], me = [
4164
4164
  "rgba(255, 255, 255, 0.92)",
4165
4165
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
4166
4166
  "rgba(255, 255, 255, 0.55)"
4167
4167
  ];
4168
4168
  function seriesColor(e) {
4169
- let n = t.inverted ? pe : q;
4169
+ let n = t.inverted ? me : K;
4170
4170
  return n[e % n.length];
4171
4171
  }
4172
4172
  function diagramNodeFill(e) {
4173
4173
  return t.inverted ? e === "decision" ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.06)" : e === "decision" ? "color-mix(in oklch, var(--color-primary-500) 6%, var(--color-theme-0))" : e === "output" ? "color-mix(in oklch, var(--color-theme-900) 5%, var(--color-theme-0))" : "var(--color-theme-0)";
4174
4174
  }
4175
4175
  function diagramNodeStroke(e) {
4176
- return t.inverted ? "rgba(255, 255, 255, 0.22)" : Ce.value;
4176
+ return t.inverted ? "rgba(255, 255, 255, 0.22)" : we.value;
4177
4177
  }
4178
- let me = S(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), he = S(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), ge = S(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = S(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), be = S(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Ce = S(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), we = S(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Te = S(() => t.inverted ? "transparent" : "var(--color-theme-0)"), J = S(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ee = S(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4179
- return (e, r) => c.value ? (R(), O("section", {
4178
+ let he = S(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ge = S(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), ve = S(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = S(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), Ce = S(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), we = S(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), Te = S(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Ee = S(() => t.inverted ? "transparent" : "var(--color-theme-0)"), q = S(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), De = S(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4179
+ return (e, r) => c.value ? (L(), O("section", {
4180
4180
  key: 0,
4181
4181
  "data-test": "chat-visual",
4182
4182
  "data-visual-type": c.value.visualType,
@@ -4184,76 +4184,76 @@ var ri = [
4184
4184
  "data-stacking": x.value ? "stacked" : void 0,
4185
4185
  "data-diagram-type": d.value?.diagramType,
4186
4186
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
4187
- style: L({
4188
- background: Te.value,
4189
- boxShadow: `inset 0 0 0 1px ${we.value}`
4187
+ style: I({
4188
+ background: Ee.value,
4189
+ boxShadow: `inset 0 0 0 1px ${Te.value}`
4190
4190
  }),
4191
4191
  "aria-label": c.value.meta.title
4192
4192
  }, [
4193
- k("header", ii, [k("h4", {
4193
+ k("header", si, [k("h4", {
4194
4194
  class: "text-[13px] font-semibold leading-tight",
4195
- style: L({ color: me.value })
4196
- }, K(c.value.meta.title), 5), c.value.meta.description ? (R(), O("p", {
4195
+ style: I({ color: he.value })
4196
+ }, G(c.value.meta.title), 5), c.value.meta.description ? (L(), O("p", {
4197
4197
  key: 0,
4198
4198
  class: "mt-0.5 text-[12px] leading-snug",
4199
- style: L({ color: he.value })
4200
- }, K(c.value.meta.description), 5)) : E("", !0)]),
4199
+ style: I({ color: ge.value })
4200
+ }, G(c.value.meta.description), 5)) : E("", !0)]),
4201
4201
  k("div", {
4202
4202
  ref_key: "bodyEl",
4203
4203
  ref: n
4204
- }, [m.value ? (R(), O("div", {
4204
+ }, [m.value ? (L(), O("div", {
4205
4205
  key: 0,
4206
4206
  role: "img",
4207
4207
  "aria-label": c.value.meta.title
4208
- }, [re.value.length ? (R(), O("div", oi, [(R(!0), O(y, null, W(re.value, (e) => (R(), O("div", {
4208
+ }, [F.value.length ? (L(), O("div", li, [(L(!0), O(y, null, H(F.value, (e) => (L(), O("div", {
4209
4209
  key: e.key,
4210
4210
  "data-test": "chat-visual-horizontal-bar",
4211
4211
  class: "min-w-0"
4212
- }, [k("div", si, [k("span", {
4212
+ }, [k("div", ui, [k("span", {
4213
4213
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4214
- style: L({ color: me.value })
4215
- }, K(e.label), 5), k("span", {
4214
+ style: I({ color: he.value })
4215
+ }, G(e.label), 5), k("span", {
4216
4216
  class: "shrink-0 font-semibold tabular-nums",
4217
- style: L({ color: me.value })
4218
- }, K(e.value), 5)]), k("div", {
4217
+ style: I({ color: he.value })
4218
+ }, G(e.value), 5)]), k("div", {
4219
4219
  class: "h-2 w-full overflow-hidden rounded-full",
4220
- style: L({ background: Ee.value })
4220
+ style: I({ background: De.value })
4221
4221
  }, [k("div", {
4222
4222
  class: "h-full rounded-full",
4223
- style: L({
4223
+ style: I({
4224
4224
  width: `${e.width}%`,
4225
4225
  background: seriesColor(e.seriesIndex)
4226
4226
  })
4227
- }, null, 4)], 4)]))), 128))])) : (R(), O("svg", {
4227
+ }, null, 4)], 4)]))), 128))])) : (L(), O("svg", {
4228
4228
  key: 1,
4229
4229
  class: "block h-auto w-full overflow-visible",
4230
- viewBox: `0 0 ${P.value.width} ${P.value.height}`,
4231
- style: L({ aspectRatio: `${P.value.width} / ${P.value.height}` }),
4230
+ viewBox: `0 0 ${M.value.width} ${M.value.height}`,
4231
+ style: I({ aspectRatio: `${M.value.width} / ${M.value.height}` }),
4232
4232
  preserveAspectRatio: "xMidYMid meet",
4233
4233
  "aria-hidden": "true"
4234
4234
  }, [
4235
- (R(!0), O(y, null, W(j.value.ticks, (e) => (R(), O("line", {
4235
+ (L(!0), O(y, null, H(ee.value.ticks, (e) => (L(), O("line", {
4236
4236
  key: `grid-${e}`,
4237
- x1: P.value.left,
4238
- x2: P.value.width - P.value.right,
4237
+ x1: M.value.left,
4238
+ x2: M.value.width - M.value.right,
4239
4239
  y1: yForValue(e),
4240
4240
  y2: yForValue(e),
4241
4241
  "stroke-width": "1",
4242
4242
  "vector-effect": "non-scaling-stroke",
4243
- style: L({ stroke: e === 0 ? be.value : ve.value })
4244
- }, null, 12, li))), 128)),
4245
- k("g", null, [(R(!0), O(y, null, W(j.value.ticks, (e) => (R(), O("text", {
4243
+ style: I({ stroke: e === 0 ? Ce.value : be.value })
4244
+ }, null, 12, fi))), 128)),
4245
+ k("g", null, [(L(!0), O(y, null, H(ee.value.ticks, (e) => (L(), O("text", {
4246
4246
  key: `y-${e}`,
4247
- x: P.value.left - 7,
4247
+ x: M.value.left - 7,
4248
4248
  y: yForValue(e) + 3,
4249
4249
  "text-anchor": "end",
4250
4250
  "font-size": "9.5",
4251
- style: L({ fill: ge.value })
4252
- }, K(ue(formatChatVisualTick)({
4251
+ style: I({ fill: ve.value })
4252
+ }, G(pe(formatChatVisualTick)({
4253
4253
  value: e,
4254
- shared: M.value
4255
- })), 13, ui))), 128))]),
4256
- m.value.chartType === "bar" ? (R(!0), O(y, { key: 0 }, W(F.value, (e) => (R(), O("rect", {
4254
+ shared: te.value
4255
+ })), 13, pi))), 128))]),
4256
+ m.value.chartType === "bar" ? (L(!0), O(y, { key: 0 }, H(N.value, (e) => (L(), O("rect", {
4257
4257
  key: e.key,
4258
4258
  "data-test": "chat-visual-bar",
4259
4259
  "data-row-index": e.rowIndex,
@@ -4264,22 +4264,22 @@ var ri = [
4264
4264
  width: e.width,
4265
4265
  height: e.height,
4266
4266
  rx: "2.5",
4267
- style: L({ fill: seriesColor(e.seriesIndex) })
4268
- }, null, 12, di))), 128)) : (R(), O(y, { key: 1 }, [
4269
- ee.value ? (R(), O("path", {
4267
+ style: I({ fill: seriesColor(e.seriesIndex) })
4268
+ }, null, 12, mi))), 128)) : (L(), O(y, { key: 1 }, [
4269
+ ne.value ? (L(), O("path", {
4270
4270
  key: 0,
4271
4271
  "data-test": "chat-visual-trend-line",
4272
- "data-trend-key": ee.value.dataKey,
4273
- d: ee.value.path,
4272
+ "data-trend-key": ne.value.dataKey,
4273
+ d: ne.value.path,
4274
4274
  fill: "none",
4275
4275
  "stroke-width": "1.4",
4276
4276
  "stroke-linecap": "round",
4277
4277
  "stroke-linejoin": "round",
4278
4278
  "stroke-dasharray": "4 3",
4279
4279
  "vector-effect": "non-scaling-stroke",
4280
- style: L({ stroke: seriesColor(ee.value.seriesIndex) })
4281
- }, null, 12, fi)) : E("", !0),
4282
- (R(!0), O(y, null, W(g.value, (e, t) => (R(), O("g", { key: e.dataKey }, [m.value.chartType === "line" ? (R(), O("path", {
4280
+ style: I({ stroke: seriesColor(ne.value.seriesIndex) })
4281
+ }, null, 12, hi)) : E("", !0),
4282
+ (L(!0), O(y, null, H(g.value, (e, t) => (L(), O("g", { key: e.dataKey }, [m.value.chartType === "line" ? (L(), O("path", {
4283
4283
  key: 0,
4284
4284
  d: pathForSeries(e.dataKey),
4285
4285
  fill: "none",
@@ -4287,74 +4287,74 @@ var ri = [
4287
4287
  "stroke-linecap": "round",
4288
4288
  "stroke-linejoin": "round",
4289
4289
  "vector-effect": "non-scaling-stroke",
4290
- style: L({ stroke: seriesColor(t) })
4291
- }, null, 12, pi)) : E("", !0), (R(!0), O(y, null, W(p.value, (n, r) => (R(), O(y, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (R(), O("circle", {
4290
+ style: I({ stroke: seriesColor(t) })
4291
+ }, null, 12, gi)) : E("", !0), (L(!0), O(y, null, H(p.value, (n, r) => (L(), O(y, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (L(), O("circle", {
4292
4292
  key: 0,
4293
4293
  cx: xForIndex(r, p.value.length),
4294
4294
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4295
4295
  r: "2.6",
4296
- style: L({ fill: seriesColor(t) })
4297
- }, null, 12, mi)) : E("", !0)], 64))), 128))]))), 128)),
4298
- (R(!0), O(y, null, W(ce.value, (e) => (R(), O("circle", {
4296
+ style: I({ fill: seriesColor(t) })
4297
+ }, null, 12, _i)) : E("", !0)], 64))), 128))]))), 128)),
4298
+ (L(!0), O(y, null, H(ue.value, (e) => (L(), O("circle", {
4299
4299
  key: `marker-${e.key}`,
4300
4300
  cx: e.cx,
4301
4301
  cy: e.cy,
4302
4302
  r: "3",
4303
- style: L({ fill: seriesColor(e.seriesIndex) })
4304
- }, null, 12, hi))), 128))
4303
+ style: I({ fill: seriesColor(e.seriesIndex) })
4304
+ }, null, 12, vi))), 128))
4305
4305
  ], 64)),
4306
- (R(!0), O(y, null, W(I.value, (e) => (R(), O("text", {
4306
+ (L(!0), O(y, null, H(P.value, (e) => (L(), O("text", {
4307
4307
  key: e.key,
4308
4308
  x: e.x,
4309
- y: e.angled ? P.value.height - P.value.bottom + 12 : P.value.height - 6,
4309
+ y: e.angled ? M.value.height - M.value.bottom + 12 : M.value.height - 6,
4310
4310
  "text-anchor": e.anchor,
4311
4311
  "font-size": "9.5",
4312
- transform: e.angled ? `rotate(${ue(-40)} ${e.x} ${P.value.height - P.value.bottom + 12})` : void 0,
4313
- style: L({ fill: ge.value })
4314
- }, K(e.label), 13, gi))), 128))
4315
- ], 12, ci)), se.value.length > 1 || m.value.chartType !== "bar" ? (R(), O("div", _i, [(R(!0), O(y, null, W(se.value, (e) => (R(), O("div", {
4312
+ transform: e.angled ? `rotate(${pe(-40)} ${e.x} ${M.value.height - M.value.bottom + 12})` : void 0,
4313
+ style: I({ fill: ve.value })
4314
+ }, G(e.label), 13, yi))), 128))
4315
+ ], 12, di)), re.value.length > 1 || m.value.chartType !== "bar" ? (L(), O("div", bi, [(L(!0), O(y, null, H(re.value, (e) => (L(), O("div", {
4316
4316
  key: e.key,
4317
4317
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4318
4318
  }, [
4319
4319
  k("span", {
4320
4320
  class: "size-2.5 shrink-0 rounded-full",
4321
- style: L({ background: seriesColor(e.seriesIndex) })
4321
+ style: I({ background: seriesColor(e.seriesIndex) })
4322
4322
  }, null, 4),
4323
- k("span", { style: L({ color: he.value }) }, K(e.label), 5),
4323
+ k("span", { style: I({ color: ge.value }) }, G(e.label), 5),
4324
4324
  k("span", {
4325
4325
  class: "font-semibold tabular-nums",
4326
- style: L({ color: me.value })
4327
- }, K(e.value), 5)
4328
- ]))), 128))])) : E("", !0)], 8, ai)) : b.value ? (R(), O("div", vi, [(R(!0), O(y, null, W(de.value, (e, t) => (R(), O("div", { key: e.key }, [k("div", yi, [k("span", {
4326
+ style: I({ color: he.value })
4327
+ }, G(e.value), 5)
4328
+ ]))), 128))])) : E("", !0)], 8, ci)) : b.value ? (L(), O("div", xi, [(L(!0), O(y, null, H(de.value, (e, t) => (L(), O("div", { key: e.key }, [k("div", Si, [k("span", {
4329
4329
  class: "truncate font-medium",
4330
- style: L({ color: me.value })
4331
- }, K(e.name), 5), k("span", bi, [k("span", {
4330
+ style: I({ color: he.value })
4331
+ }, G(e.name), 5), k("span", Ci, [k("span", {
4332
4332
  class: "font-semibold",
4333
- style: L({ color: me.value })
4334
- }, K(e.display), 5), k("span", {
4333
+ style: I({ color: he.value })
4334
+ }, G(e.display), 5), k("span", {
4335
4335
  class: "ml-1.5",
4336
- style: L({ color: he.value })
4337
- }, K(Math.round(e.percent * 100)) + "%", 5)])]), k("div", {
4336
+ style: I({ color: ge.value })
4337
+ }, G(Math.round(e.percent * 100)) + "%", 5)])]), k("div", {
4338
4338
  class: "h-1.5 w-full overflow-hidden rounded-full",
4339
- style: L({ background: Ee.value })
4339
+ style: I({ background: De.value })
4340
4340
  }, [k("div", {
4341
4341
  class: "h-full rounded-full",
4342
- style: L({
4342
+ style: I({
4343
4343
  width: `${Math.max(2, e.percent * 100)}%`,
4344
4344
  background: seriesColor(t)
4345
4345
  })
4346
- }, null, 4)], 4)]))), 128))])) : d.value && fe.value ? (R(), O("div", xi, [(R(), O("svg", {
4346
+ }, null, 4)], 4)]))), 128))])) : d.value && fe.value ? (L(), O("div", wi, [(L(), O("svg", {
4347
4347
  "data-test": "chat-visual-diagram-svg",
4348
4348
  class: "block h-auto overflow-visible",
4349
4349
  viewBox: `0 0 ${fe.value.width} ${fe.value.height}`,
4350
- style: L({
4350
+ style: I({
4351
4351
  width: `${fe.value.width}px`,
4352
4352
  aspectRatio: `${fe.value.width} / ${fe.value.height}`
4353
4353
  }),
4354
4354
  role: "img",
4355
4355
  "aria-label": c.value.meta.title
4356
4356
  }, [
4357
- (R(!0), O(y, null, W(fe.value.edges, (e) => (R(), O("line", {
4357
+ (L(!0), O(y, null, H(fe.value.edges, (e) => (L(), O("line", {
4358
4358
  key: e.key,
4359
4359
  "data-test": "chat-visual-diagram-edge",
4360
4360
  "data-from": e.from,
@@ -4366,16 +4366,16 @@ var ri = [
4366
4366
  "stroke-width": "1.4",
4367
4367
  "stroke-linecap": "round",
4368
4368
  "vector-effect": "non-scaling-stroke",
4369
- style: L({ stroke: J.value })
4370
- }, null, 12, Ci))), 128)),
4371
- (R(!0), O(y, null, W(fe.value.edges, (e) => (R(), O("circle", {
4369
+ style: I({ stroke: q.value })
4370
+ }, null, 12, Ei))), 128)),
4371
+ (L(!0), O(y, null, H(fe.value.edges, (e) => (L(), O("circle", {
4372
4372
  key: `${e.key}-dot`,
4373
4373
  cx: e.x2,
4374
4374
  cy: e.y2,
4375
4375
  r: "2.4",
4376
- style: L({ fill: J.value })
4377
- }, null, 12, wi))), 128)),
4378
- (R(!0), O(y, null, W(fe.value.edges.filter((e) => e.label), (e) => (R(), O("foreignObject", {
4376
+ style: I({ fill: q.value })
4377
+ }, null, 12, Di))), 128)),
4378
+ (L(!0), O(y, null, H(fe.value.edges.filter((e) => e.label), (e) => (L(), O("foreignObject", {
4379
4379
  key: `${e.key}-label`,
4380
4380
  x: e.labelX - 55,
4381
4381
  y: e.labelY - 12,
@@ -4384,59 +4384,59 @@ var ri = [
4384
4384
  }, [k("div", {
4385
4385
  xmlns: "http://www.w3.org/1999/xhtml",
4386
4386
  class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
4387
- style: L({
4388
- color: he.value,
4387
+ style: I({
4388
+ color: ge.value,
4389
4389
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4390
4390
  })
4391
- }, K(e.label), 5)], 8, Ti))), 128)),
4392
- (R(!0), O(y, null, W(fe.value.nodes, (e) => (R(), O("g", {
4391
+ }, G(e.label), 5)], 8, Oi))), 128)),
4392
+ (L(!0), O(y, null, H(fe.value.nodes, (e) => (L(), O("g", {
4393
4393
  key: e.id,
4394
4394
  "data-test": "chat-visual-diagram-node",
4395
4395
  "data-node-id": e.id,
4396
4396
  "data-node-kind": e.kind,
4397
4397
  transform: `translate(${e.x} ${e.y})`
4398
- }, [e.kind === "decision" ? (R(), O("polygon", {
4398
+ }, [e.kind === "decision" ? (L(), O("polygon", {
4399
4399
  key: 0,
4400
4400
  points: `${e.width / 2},0 ${e.width},${e.height / 2} ${e.width / 2},${e.height} 0,${e.height / 2}`,
4401
4401
  "stroke-width": "1",
4402
4402
  "vector-effect": "non-scaling-stroke",
4403
- style: L({
4403
+ style: I({
4404
4404
  fill: diagramNodeFill(e.kind),
4405
4405
  stroke: diagramNodeStroke(e.kind)
4406
4406
  })
4407
- }, null, 12, Di)) : (R(), O("rect", {
4407
+ }, null, 12, Ai)) : (L(), O("rect", {
4408
4408
  key: 1,
4409
4409
  width: e.width,
4410
4410
  height: e.height,
4411
4411
  rx: "9",
4412
4412
  "stroke-width": "1",
4413
4413
  "vector-effect": "non-scaling-stroke",
4414
- style: L({
4414
+ style: I({
4415
4415
  fill: diagramNodeFill(e.kind),
4416
4416
  stroke: diagramNodeStroke(e.kind)
4417
4417
  })
4418
- }, null, 12, Oi)), (R(), O("foreignObject", {
4418
+ }, null, 12, ji)), (L(), O("foreignObject", {
4419
4419
  x: "8",
4420
4420
  y: "5",
4421
4421
  width: e.width - 16,
4422
4422
  height: e.height - 10
4423
- }, [k("div", Ai, [k("div", {
4423
+ }, [k("div", Ni, [k("div", {
4424
4424
  class: "line-clamp-2 text-[13px] font-medium leading-snug",
4425
- style: L({ color: me.value })
4426
- }, K(e.label), 5), e.detail ? (R(), O("div", {
4425
+ style: I({ color: he.value })
4426
+ }, G(e.label), 5), e.detail ? (L(), O("div", {
4427
4427
  key: 0,
4428
4428
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4429
- style: L({ color: he.value })
4430
- }, K(e.detail), 5)) : E("", !0)])], 8, ki))], 8, Ei))), 128))
4431
- ], 12, Si))])) : E("", !0)], 512),
4432
- c.value.meta.footer ? (R(), O("footer", {
4429
+ style: I({ color: ge.value })
4430
+ }, G(e.detail), 5)) : E("", !0)])], 8, Mi))], 8, ki))), 128))
4431
+ ], 12, Ti))])) : E("", !0)], 512),
4432
+ c.value.meta.footer ? (L(), O("footer", {
4433
4433
  key: 0,
4434
4434
  class: "mt-3 text-[11px] leading-snug",
4435
- style: L({ color: ge.value })
4436
- }, K(c.value.meta.footer), 5)) : E("", !0)
4437
- ], 12, ri)) : E("", !0);
4435
+ style: I({ color: ve.value })
4436
+ }, G(c.value.meta.footer), 5)) : E("", !0)
4437
+ ], 12, oi)) : E("", !0);
4438
4438
  }
4439
- }), Mi = ["innerHTML"], Ni = /* @__PURE__ */ N({
4439
+ }), Fi = ["innerHTML"], Ii = /* @__PURE__ */ M({
4440
4440
  __name: "ChatRichText",
4441
4441
  props: {
4442
4442
  text: {},
@@ -4445,12 +4445,12 @@ var ri = [
4445
4445
  },
4446
4446
  emits: ["action"],
4447
4447
  setup(e, { emit: t }) {
4448
- let n = e, r = t, o = G(n.text), s;
4449
- q([() => n.text, () => n.streaming], ([e, t]) => {
4448
+ let n = e, r = t, o = W(n.text), s;
4449
+ ge([() => n.text, () => n.streaming], ([e, t]) => {
4450
4450
  t ? s === void 0 && (s = requestAnimationFrame(() => {
4451
4451
  s = void 0, o.value = n.text;
4452
4452
  })) : (s !== void 0 && (cancelAnimationFrame(s), s = void 0), o.value = e);
4453
- }), te(() => {
4453
+ }), se(() => {
4454
4454
  s !== void 0 && cancelAnimationFrame(s);
4455
4455
  });
4456
4456
  let c = new f.Renderer();
@@ -4472,7 +4472,7 @@ var ri = [
4472
4472
  function renderMarkdown(e) {
4473
4473
  if (!e) return "";
4474
4474
  let t = f.parse(e, { async: !1 });
4475
- return _n.sanitize(t, {
4475
+ return bn.sanitize(t, {
4476
4476
  ADD_ATTR: ["target"],
4477
4477
  ADD_DATA_URI_TAGS: ["img"]
4478
4478
  });
@@ -4603,28 +4603,28 @@ var ri = [
4603
4603
  streaming: !!n.streaming
4604
4604
  }) : [];
4605
4605
  });
4606
- return (t, n) => (R(), O("div", {
4606
+ return (t, n) => (L(), O("div", {
4607
4607
  class: "chat-msg-rich break-words text-[14px] leading-[1.55] @sm/chat:text-[15px] @sm/chat:leading-[1.5] @lg/chat:text-[15.5px] @lg/chat:leading-[1.55]",
4608
4608
  onErrorCapture: onRichTextAssetError
4609
- }, [(R(!0), O(y, null, W(d.value, (t) => (R(), O(y, { key: t.key }, [t.kind === "markdown" ? (R(), O("div", {
4609
+ }, [(L(!0), O(y, null, H(d.value, (t) => (L(), O(y, { key: t.key }, [t.kind === "markdown" ? (L(), O("div", {
4610
4610
  key: 0,
4611
4611
  class: F(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4612
4612
  innerHTML: t.html
4613
- }, null, 10, Mi)) : t.kind === "visual" ? (R(), T(ji, {
4613
+ }, null, 10, Fi)) : t.kind === "visual" ? (L(), T(Pi, {
4614
4614
  key: 1,
4615
4615
  result: t.result,
4616
4616
  inverted: e.inverted
4617
- }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (R(), T(Kr, {
4617
+ }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (L(), T(Yr, {
4618
4618
  key: 2,
4619
4619
  spec: t.spec,
4620
4620
  inverted: e.inverted,
4621
4621
  onAction: n[0] || (n[0] = (e) => r("action", e))
4622
- }, null, 8, ["spec", "inverted"])) : (R(), O("div", {
4622
+ }, null, 8, ["spec", "inverted"])) : (L(), O("div", {
4623
4623
  key: 3,
4624
4624
  "data-test": "chat-visual-pending",
4625
4625
  role: "status",
4626
4626
  class: "my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",
4627
- style: L({
4627
+ style: I({
4628
4628
  background: e.inverted ? "transparent" : "var(--color-theme-0)",
4629
4629
  boxShadow: `inset 0 0 0 1px ${e.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,
4630
4630
  color: e.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"
@@ -4632,22 +4632,140 @@ var ri = [
4632
4632
  }, [...n[1] || (n[1] = [k("span", {
4633
4633
  class: "size-2 shrink-0 animate-pulse rounded-full",
4634
4634
  style: { background: "currentcolor" }
4635
- }, null, -1), j(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4635
+ }, null, -1), te(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4636
4636
  }
4637
- }), Pi = 80, Fi = 600, Ii = /* @__PURE__ */ N({
4637
+ }), Li = ["data-composer-action"], Ri = [
4638
+ "placeholder",
4639
+ "disabled",
4640
+ "maxlength"
4641
+ ], zi = { class: "mt-2.5 flex items-center" }, Bi = { class: "flex items-center gap-2" }, Vi = [
4642
+ "data-composer-action",
4643
+ "disabled",
4644
+ "aria-label",
4645
+ "title"
4646
+ ], Hi = {
4647
+ key: 0,
4648
+ class: "i-tabler-player-stop-filled size-3.5"
4649
+ }, Ui = {
4650
+ key: 1,
4651
+ class: "i-tabler-arrow-up size-[17px]"
4652
+ }, Wi = { class: "sr-only" }, Gi = /* @__PURE__ */ M({
4653
+ __name: "ChatComposer",
4654
+ props: /*@__PURE__*/ N({
4655
+ placeholder: { default: "" },
4656
+ disabled: {
4657
+ type: Boolean,
4658
+ default: !1
4659
+ },
4660
+ maxlength: {},
4661
+ inverted: {
4662
+ type: Boolean,
4663
+ default: !1
4664
+ },
4665
+ showSend: {
4666
+ type: Boolean,
4667
+ default: !0
4668
+ },
4669
+ sendEnabled: { type: Boolean },
4670
+ sendLabel: { default: "Send" },
4671
+ action: { default: "send" }
4672
+ }, {
4673
+ modelValue: { required: !0 },
4674
+ modelModifiers: {}
4675
+ }),
4676
+ emits: /*@__PURE__*/ N(["submit", "action"], ["update:modelValue"]),
4677
+ setup(e, { expose: t, emit: n }) {
4678
+ let r = n, o = K(e, "modelValue"), s = R();
4679
+ function onKeydown(e) {
4680
+ e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), r("submit"));
4681
+ }
4682
+ function focusField(t) {
4683
+ e.disabled || t.target instanceof Element && t.target.closest("button, a, textarea") || s.value?.focus();
4684
+ }
4685
+ ge(o, () => P(() => {
4686
+ s.value && (s.value.style.height = "auto", s.value.style.height = `${Math.min(s.value.scrollHeight, 150)}px`);
4687
+ }));
4688
+ function settleAfterSend() {
4689
+ let e = s.value;
4690
+ e && (e.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? (e.blur(), requestAnimationFrame(() => {
4691
+ let e = document.activeElement;
4692
+ e && (e.tagName === "TEXTAREA" || e.tagName === "INPUT") && e.blur();
4693
+ })) : e.focus());
4694
+ }
4695
+ return t({
4696
+ focus: () => s.value?.focus(),
4697
+ settleAfterSend
4698
+ }), (t, n) => (L(), O("div", {
4699
+ "data-test": "messaging-composer",
4700
+ "data-composer-action": e.action,
4701
+ class: F(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-4 transition-colors duration-200", e.inverted ? "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" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_rgba(15,23,42,0.07)] ring-1 ring-theme-950/20 hover:ring-theme-950/30 focus-within:ring-theme-950/30"]),
4702
+ onClick: focusField
4703
+ }, [de(t.$slots, "input", {}, () => [be(k("textarea", {
4704
+ ref_key: "textarea",
4705
+ ref: s,
4706
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => o.value = e),
4707
+ "data-test": "messaging-input",
4708
+ rows: "1",
4709
+ enterkeyhint: "send",
4710
+ inputmode: "text",
4711
+ autocomplete: "off",
4712
+ autocapitalize: "sentences",
4713
+ autocorrect: "on",
4714
+ spellcheck: "true",
4715
+ placeholder: e.placeholder,
4716
+ disabled: e.disabled,
4717
+ maxlength: e.maxlength,
4718
+ style: {
4719
+ fontSize: "16px",
4720
+ resize: "none"
4721
+ },
4722
+ class: F(["block w-full bg-transparent leading-[1.5] focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", e.inverted ? "text-white placeholder-white/50" : "text-theme-900 placeholder-theme-400"]),
4723
+ onKeydown
4724
+ }, null, 42, Ri), [[he, o.value]])]), k("div", zi, [
4725
+ de(t.$slots, "leading"),
4726
+ n[2] || (n[2] = k("div", { class: "flex-1" }, null, -1)),
4727
+ k("div", Bi, [de(t.$slots, "actions"), e.showSend ? (L(), O("button", {
4728
+ key: 0,
4729
+ "data-test": "messaging-send-btn",
4730
+ "data-composer-action": e.action,
4731
+ class: F(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", e.sendEnabled ? e.inverted ? "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : e.inverted ? "bg-white/10 text-white/30" : "bg-theme-100 text-theme-400"]),
4732
+ disabled: !e.sendEnabled,
4733
+ "aria-label": e.sendLabel,
4734
+ title: e.sendLabel,
4735
+ onClick: n[1] || (n[1] = (e) => r("action"))
4736
+ }, [e.action === "stop" ? (L(), O("i", Hi)) : (L(), O("i", Ui)), k("span", Wi, G(e.sendLabel), 1)], 10, Vi)) : E("", !0)])
4737
+ ])], 10, Li));
4738
+ }
4739
+ }), Ki = { class: "flex items-center gap-3 py-3 px-2" }, qi = /* @__PURE__ */ M({
4740
+ __name: "ChatDivider",
4741
+ props: {
4742
+ label: {},
4743
+ inverted: {
4744
+ type: Boolean,
4745
+ default: !1
4746
+ }
4747
+ },
4748
+ setup(e) {
4749
+ return (t, n) => (L(), O("div", Ki, [
4750
+ k("div", { class: F(["flex-1 h-px", e.inverted ? "bg-white/15" : "bg-theme-200/70"]) }, null, 2),
4751
+ k("span", { class: F(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", e.inverted ? "text-white/30" : "text-theme-300"]) }, G(e.label), 3),
4752
+ k("div", { class: F(["flex-1 h-px", e.inverted ? "bg-white/15" : "bg-theme-200/70"]) }, null, 2)
4753
+ ]));
4754
+ }
4755
+ }), Ji = 80, Yi = 600, Xi = /* @__PURE__ */ M({
4638
4756
  __name: "ChatScroller",
4639
4757
  setup(e, { expose: t }) {
4640
- let n = H(), r = H(), o = H(!0), s, c, u = 0;
4758
+ let n = R(), r = R(), o = R(!0), s, c, u = 0;
4641
4759
  function scrollToBottom() {
4642
4760
  let e = n.value;
4643
4761
  e && (e.scrollTop = e.scrollHeight);
4644
4762
  }
4645
4763
  function onScroll() {
4646
4764
  let e = n.value;
4647
- e && (o.value = e.scrollHeight - e.scrollTop - e.clientHeight <= Pi);
4765
+ e && (o.value = e.scrollHeight - e.scrollTop - e.clientHeight <= Ji);
4648
4766
  }
4649
4767
  function markUserGesture() {
4650
- u = Date.now() + Fi;
4768
+ u = Date.now() + Yi;
4651
4769
  }
4652
4770
  function followPinned() {
4653
4771
  o.value && Date.now() > u && scrollToBottom();
@@ -4657,16 +4775,16 @@ var ri = [
4657
4775
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4658
4776
  });
4659
4777
  }
4660
- return t({ pin }), ne(() => {
4778
+ return t({ pin }), ce(() => {
4661
4779
  requestAnimationFrame(() => {
4662
4780
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4663
4781
  }), r.value && (s = new ResizeObserver(followPinned), s.observe(r.value), n.value && s.observe(n.value), c = new MutationObserver(followPinned), c.observe(r.value, {
4664
4782
  childList: !0,
4665
4783
  subtree: !0
4666
4784
  }));
4667
- }), te(() => {
4785
+ }), se(() => {
4668
4786
  s?.disconnect(), c?.disconnect();
4669
- }), (e, t) => (R(), O("div", {
4787
+ }), (e, t) => (L(), O("div", {
4670
4788
  ref_key: "viewport",
4671
4789
  ref: n,
4672
4790
  class: F(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", o.value ? "[overflow-anchor:none]" : ""]),
@@ -4677,25 +4795,51 @@ var ri = [
4677
4795
  ref_key: "content",
4678
4796
  ref: r,
4679
4797
  class: "flex-1 flex flex-col"
4680
- }, [se(e.$slots, "default")], 512)], 34));
4798
+ }, [de(e.$slots, "default")], 512)], 34));
4681
4799
  }
4682
- }), Li = ["aria-label"], Ri = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, zi = /* @__PURE__ */ N({
4800
+ }), Zi = ["data-chat-turn"], Qi = /* @__PURE__ */ M({
4801
+ __name: "ChatTurn",
4802
+ props: {
4803
+ own: { type: Boolean },
4804
+ inverted: {
4805
+ type: Boolean,
4806
+ default: !1
4807
+ }
4808
+ },
4809
+ setup(e) {
4810
+ return (t, n) => (L(), O("div", {
4811
+ class: F(["group/msg flex items-end gap-2", e.own ? "justify-end" : "justify-start"]),
4812
+ "data-chat-turn": e.own ? "own" : "other"
4813
+ }, [k("div", {
4814
+ "data-test": "messaging-message-body",
4815
+ class: F(e.own ? "min-w-0 ml-3 @sm/chat:ml-[2em]" : "w-full min-w-0 pr-3 @sm/chat:pr-[2em]")
4816
+ }, [
4817
+ de(t.$slots, "before"),
4818
+ t.$slots.default ? (L(), O("div", {
4819
+ key: 0,
4820
+ "data-test": "messaging-message-content",
4821
+ class: F(e.own ? e.inverted ? "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : e.inverted ? "text-white/95" : "text-theme-900")
4822
+ }, [de(t.$slots, "default")], 2)) : E("", !0),
4823
+ de(t.$slots, "after")
4824
+ ], 2)], 10, Zi));
4825
+ }
4826
+ }), $i = ["aria-label"], ea = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, ta = /* @__PURE__ */ M({
4683
4827
  name: "FClose",
4684
4828
  __name: "FClose",
4685
4829
  props: { ariaLabel: {} },
4686
4830
  emits: ["click"],
4687
4831
  setup(e) {
4688
- let t = H(!1);
4689
- return ne(() => {
4832
+ let t = R(!1);
4833
+ return ce(() => {
4690
4834
  setTimeout(() => {
4691
4835
  t.value = !0;
4692
4836
  }, 100);
4693
- }), (n, r) => (R(), O("button", {
4837
+ }), (n, r) => (L(), O("button", {
4694
4838
  type: "button",
4695
4839
  "aria-label": e.ariaLabel || "Close",
4696
4840
  class: "close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",
4697
4841
  onClick: r[0] || (r[0] = (e) => n.$emit("click", e))
4698
- }, [r[1] || (r[1] = k("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)), k("span", Ri, [k("span", {
4842
+ }, [r[1] || (r[1] = k("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)), k("span", ea, [k("span", {
4699
4843
  class: F(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
4700
4844
  style: {
4701
4845
  "background-color": "currentColor",
@@ -4707,15 +4851,15 @@ var ri = [
4707
4851
  "background-color": "currentColor",
4708
4852
  "transition-delay": "0.45s"
4709
4853
  }
4710
- }, null, 2)])], 8, Li));
4854
+ }, null, 2)])], 8, $i));
4711
4855
  }
4712
- }), Bi = { class: "flex min-h-full items-center justify-center text-center p-4" }, Vi = {
4856
+ }), na = { class: "flex min-h-full items-center justify-center text-center p-4" }, ra = {
4713
4857
  key: 0,
4714
4858
  class: "text-base p-4 font-semibold"
4715
- }, Hi = {
4859
+ }, ia = {
4716
4860
  key: 1,
4717
4861
  class: "flex items-center gap-2 px-2"
4718
- }, Ui = /* @__PURE__ */ N({
4862
+ }, aa = /* @__PURE__ */ M({
4719
4863
  inheritAttrs: !1,
4720
4864
  name: "FModal",
4721
4865
  __name: "FModal",
@@ -4748,7 +4892,7 @@ var ri = [
4748
4892
  "escape"
4749
4893
  ],
4750
4894
  setup(e, { emit: t }) {
4751
- let n = t, r = H(!1);
4895
+ let n = t, r = R(!1);
4752
4896
  function close(e) {
4753
4897
  let { reason: t } = e;
4754
4898
  n("update:vis", !1), n("close", !0), t === "escape" && n("escape", !0);
@@ -4765,17 +4909,17 @@ var ri = [
4765
4909
  ...t,
4766
4910
  ...n
4767
4911
  ];
4768
- }), s = H(!1), c = [];
4912
+ }), s = R(!1), c = [];
4769
4913
  function onKeydown(t) {
4770
4914
  t.key === "Escape" && e.vis && close({ reason: "escape" });
4771
4915
  }
4772
- ne(async () => {
4916
+ ce(async () => {
4773
4917
  r.value = !0;
4774
- let t = q(() => e.vis, (e) => {
4918
+ let t = ge(() => e.vis, (e) => {
4775
4919
  e ? setTimeout(() => s.value = !0, 300) : s.value = !1;
4776
4920
  }, { immediate: !0 });
4777
4921
  c.push(t), typeof document < "u" && (document.addEventListener("keydown", onKeydown), c.push(() => document.removeEventListener("keydown", onKeydown)));
4778
- }), re(() => {
4922
+ }), ue(() => {
4779
4923
  c.forEach((e) => e());
4780
4924
  });
4781
4925
  let u = S(() => e.transitionMode === "slideUp" ? {
@@ -4793,7 +4937,7 @@ var ri = [
4793
4937
  leaveFromClass: "opacity-100 translate-y-0 scale-100",
4794
4938
  leaveToClass: "opacity-0 scale-75"
4795
4939
  });
4796
- return (t, n) => r.value ? (R(), T(b, {
4940
+ return (t, n) => r.value ? (L(), T(b, {
4797
4941
  key: 0,
4798
4942
  to: e.teleportTo,
4799
4943
  disabled: e.disableTeleport
@@ -4802,7 +4946,7 @@ var ri = [
4802
4946
  "aria-labelledby": "modal-title",
4803
4947
  role: "dialog",
4804
4948
  "aria-modal": "true"
4805
- }, [M(x, {
4949
+ }, [j(x, {
4806
4950
  "enter-active-class": "ease-out duration-300",
4807
4951
  "enter-from-class": "opacity-0",
4808
4952
  "enter-to-class": "opacity-100",
@@ -4810,7 +4954,7 @@ var ri = [
4810
4954
  "leave-from-class": "opacity-100",
4811
4955
  "leave-to-class": "opacity-0"
4812
4956
  }, {
4813
- default: pe(() => [e.vis ? (R(), O("div", {
4957
+ default: ve(() => [e.vis ? (L(), O("div", {
4814
4958
  key: 0,
4815
4959
  class: "fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity",
4816
4960
  onClick: n[0] || (n[0] = (e) => close({ reason: "escape" }))
@@ -4819,36 +4963,36 @@ var ri = [
4819
4963
  }), k("div", {
4820
4964
  class: "fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar",
4821
4965
  onClick: n[3] || (n[3] = (e) => close({ reason: "escape" }))
4822
- }, [k("div", Bi, [M(x, I(P(u.value)), {
4823
- default: pe(() => [e.vis ? (R(), O("div", {
4966
+ }, [k("div", na, [j(x, re(ne(u.value)), {
4967
+ default: ve(() => [e.vis ? (L(), O("div", {
4824
4968
  key: 0,
4825
4969
  class: F([o.value, "w-full"]),
4826
- onClick: n[2] || (n[2] = ge(() => {}, ["stop"]))
4827
- }, [e.hasClose || e.title || t.$slots.actions ? (R(), O("div", {
4970
+ onClick: n[2] || (n[2] = we(() => {}, ["stop"]))
4971
+ }, [e.hasClose || e.title || t.$slots.actions ? (L(), O("div", {
4828
4972
  key: 0,
4829
4973
  class: F(!e.title && (e.hasClose || t.$slots.actions) ? "absolute top-0 right-0 z-10" : "flex justify-between items-center")
4830
- }, [e.title ? (R(), O("h2", Vi, K(e.title), 1)) : E("", !0), e.hasClose || t.$slots.actions ? (R(), O("div", Hi, [se(t.$slots, "actions"), e.hasClose ? (R(), T(zi, {
4974
+ }, [e.title ? (L(), O("h2", ra, G(e.title), 1)) : E("", !0), e.hasClose || t.$slots.actions ? (L(), O("div", ia, [de(t.$slots, "actions"), e.hasClose ? (L(), T(ta, {
4831
4975
  key: 0,
4832
4976
  class: "relative",
4833
4977
  "data-test-id": "close-modal",
4834
- onClick: n[1] || (n[1] = ge((e) => close({ reason: "escape" }), ["stop"]))
4835
- })) : E("", !0)])) : E("", !0)], 2)) : E("", !0), se(t.$slots, "default")], 2)) : E("", !0)]),
4978
+ onClick: n[1] || (n[1] = we((e) => close({ reason: "escape" }), ["stop"]))
4979
+ })) : E("", !0)])) : E("", !0)], 2)) : E("", !0), de(t.$slots, "default")], 2)) : E("", !0)]),
4836
4980
  _: 3
4837
4981
  }, 16)])])], 2)], 8, ["to", "disabled"])) : E("", !0);
4838
4982
  }
4839
- }), Wi = {
4983
+ }), oa = {
4840
4984
  "data-test": "share-reply-dialog",
4841
4985
  class: "flex flex-col"
4842
- }, Gi = { class: "flex h-[60px] shrink-0 items-center justify-between border-b border-theme-950/[0.06] px-5" }, Ki = { class: "flex flex-col gap-4 p-5" }, qi = { class: "relative max-h-[300px] overflow-hidden rounded-2xl bg-theme-25 p-4 ring-1 ring-theme-950/[0.06]" }, Ji = { class: "flex flex-col gap-3 text-[13px] leading-relaxed text-theme-800" }, Yi = {
4986
+ }, sa = { class: "flex h-[60px] shrink-0 items-center justify-between border-b border-theme-950/[0.06] px-5" }, ca = { class: "flex flex-col gap-4 p-5" }, la = { class: "relative max-h-[300px] overflow-hidden rounded-2xl bg-theme-25 p-4 ring-1 ring-theme-950/[0.06]" }, ua = { class: "flex flex-col gap-3 text-[13px] leading-relaxed text-theme-800" }, da = {
4843
4987
  key: 0,
4844
4988
  class: "max-w-[85%] self-end whitespace-pre-wrap rounded-[14px] bg-theme-50 px-3 py-2"
4845
- }, Xi = {
4989
+ }, fa = {
4846
4990
  key: 0,
4847
4991
  class: "flex h-11 items-center gap-2 rounded-xl bg-theme-50 px-3"
4848
- }, Zi = ["value"], Qi = {
4992
+ }, pa = ["value"], ma = {
4849
4993
  key: 1,
4850
4994
  class: "text-[13px] text-red-600"
4851
- }, $i = { class: "flex items-center gap-3" }, ea = ["disabled"], ta = ["disabled"], na = /* @__PURE__ */ N({
4995
+ }, ha = { class: "flex items-center gap-3" }, ga = ["disabled"], _a = ["disabled"], va = /* @__PURE__ */ M({
4852
4996
  __name: "ShareReplyDialog",
4853
4997
  props: {
4854
4998
  message: {},
@@ -4857,8 +5001,8 @@ var ri = [
4857
5001
  },
4858
5002
  emits: ["close"],
4859
5003
  setup(e, { emit: t }) {
4860
- let n = t, r = H(), o = H(!1), s = H(!1), c = H(!1), u = H(), d;
4861
- q(() => e.message?.id, async (t) => {
5004
+ let n = t, r = R(), o = R(!1), s = R(!1), c = R(!1), u = R(), d;
5005
+ ge(() => e.message?.id, async (t) => {
4862
5006
  if (r.value = void 0, u.value = void 0, c.value = !1, t) {
4863
5007
  o.value = !0;
4864
5008
  try {
@@ -4902,12 +5046,12 @@ var ri = [
4902
5046
  }
4903
5047
  }
4904
5048
  }
4905
- return (t, d) => (R(), T(Ui, {
5049
+ return (t, d) => (L(), T(aa, {
4906
5050
  vis: !!e.message,
4907
5051
  "modal-class": "w-full max-w-[480px] p-0",
4908
5052
  onClose: d[2] || (d[2] = (e) => n("close"))
4909
5053
  }, {
4910
- default: pe(() => [k("div", Wi, [k("div", Gi, [d[4] || (d[4] = k("span", { class: "text-[15px] font-semibold text-theme-900" }, "Share reply", -1)), k("button", {
5054
+ default: ve(() => [k("div", oa, [k("div", sa, [d[4] || (d[4] = k("span", { class: "text-[15px] font-semibold text-theme-900" }, "Share reply", -1)), k("button", {
4911
5055
  type: "button",
4912
5056
  "aria-label": "Close",
4913
5057
  class: "grid size-9 cursor-pointer place-items-center rounded-full text-theme-500 transition-colors hover:bg-theme-950/5 hover:text-theme-900",
@@ -4915,13 +5059,13 @@ var ri = [
4915
5059
  }, [...d[3] || (d[3] = [k("i", {
4916
5060
  class: "i-tabler-x size-[17px]",
4917
5061
  "aria-hidden": "true"
4918
- }, null, -1)])])]), k("div", Ki, [
4919
- k("div", qi, [k("div", Ji, [e.prompt ? (R(), O("div", Yi, K(e.prompt), 1)) : E("", !0), e.message ? (R(), T(Ni, {
5062
+ }, null, -1)])])]), k("div", ca, [
5063
+ k("div", la, [k("div", ua, [e.prompt ? (L(), O("div", da, G(e.prompt), 1)) : E("", !0), e.message ? (L(), T(Ii, {
4920
5064
  key: 1,
4921
5065
  text: e.message.text
4922
5066
  }, null, 8, ["text"])) : E("", !0)]), d[5] || (d[5] = k("div", { class: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-theme-25 to-transparent" }, null, -1))]),
4923
5067
  d[8] || (d[8] = k("p", { class: "text-[13px] leading-relaxed text-theme-500" }, " Anyone with the link can see this message and reply. Messages after it stay private. ", -1)),
4924
- r.value ? (R(), O("div", Xi, [d[6] || (d[6] = k("i", {
5068
+ r.value ? (L(), O("div", fa, [d[6] || (d[6] = k("i", {
4925
5069
  class: "i-tabler-link size-[15px] shrink-0 text-theme-400",
4926
5070
  "aria-hidden": "true"
4927
5071
  }, null, -1)), k("input", {
@@ -4931,9 +5075,9 @@ var ri = [
4931
5075
  "aria-label": "Share link",
4932
5076
  class: "min-w-0 flex-1 truncate bg-transparent text-[14px] text-theme-800 outline-none",
4933
5077
  onFocus: d[1] || (d[1] = (e) => e.target.select())
4934
- }, null, 40, Zi)])) : E("", !0),
4935
- u.value ? (R(), O("p", Qi, K(u.value), 1)) : E("", !0),
4936
- k("div", $i, [r.value ? (R(), O("button", {
5078
+ }, null, 40, pa)])) : E("", !0),
5079
+ u.value ? (L(), O("p", ma, G(u.value), 1)) : E("", !0),
5080
+ k("div", ha, [r.value ? (L(), O("button", {
4937
5081
  key: 0,
4938
5082
  type: "button",
4939
5083
  "data-test": "share-reply-delete",
@@ -4943,18 +5087,18 @@ var ri = [
4943
5087
  }, [...d[7] || (d[7] = [k("i", {
4944
5088
  class: "i-tabler-trash size-[15px]",
4945
5089
  "aria-hidden": "true"
4946
- }, null, -1), j(" Delete link ", -1)])], 8, ea)) : E("", !0), k("button", {
5090
+ }, null, -1), te(" Delete link ", -1)])], 8, ga)) : E("", !0), k("button", {
4947
5091
  type: "button",
4948
5092
  "data-test": "share-reply-copy",
4949
5093
  disabled: o.value || s.value,
4950
5094
  class: "ml-auto h-11 cursor-pointer rounded-full bg-theme-900 px-5 text-[15px] font-semibold text-theme-0 transition-transform active:scale-[0.98] disabled:opacity-50",
4951
5095
  onClick: copyLink
4952
- }, K(c.value ? "Copied" : "Copy link"), 9, ta)])
5096
+ }, G(c.value ? "Copied" : "Copy link"), 9, _a)])
4953
5097
  ])])]),
4954
5098
  _: 1
4955
5099
  }, 8, ["vis"]));
4956
5100
  }
4957
- }), ra = {
5101
+ }), ya = {
4958
5102
  VOICE_MIC_UNAVAILABLE: "I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",
4959
5103
  VOICE_BOT_UNAVAILABLE: "Your assistant didn't pick up. Give it a moment and start the call again.",
4960
5104
  VOICE_CONNECT_TIMEOUT: "The call took too long to connect. Try again in a moment.",
@@ -4963,20 +5107,20 @@ var ri = [
4963
5107
  VOICE_UNAVAILABLE: "Voice isn't available right now. You can keep going by typing.",
4964
5108
  VOICE_MINT_INVALID: "That call couldn't be started. Refresh the page and try again.",
4965
5109
  VOICE_PROVIDER_ERROR: "The call ended unexpectedly. Try again, or keep going by typing."
4966
- }, ia = "The call ended unexpectedly. Try again, or keep going by typing.";
5110
+ }, ba = "The call ended unexpectedly. Try again, or keep going by typing.";
4967
5111
  function voiceErrorMessage(e) {
4968
- return e && ra[e] || ia;
5112
+ return e && ya[e] || ba;
4969
5113
  }
4970
5114
  // bot/ui/VoiceHistogramController.ts
4971
- var aa = [
5115
+ var xa = [
4972
5116
  0,
4973
5117
  2,
4974
5118
  4,
4975
5119
  6,
4976
5120
  8
4977
- ], oa = 5, sa = 33, ca = .7, la = .1, ua = 60, da = 320, fa = .55, pa = .1, ma = .32, ha = .9, ga = aa.map(() => 0), _a = aa.map(() => oa), VoiceHistogramController = class {
5121
+ ], Sa = 5, Ca = 33, wa = .7, Ta = .1, Ea = 60, Da = 320, Oa = .55, ka = .1, Aa = .32, ja = .9, Ma = xa.map(() => 0), Na = xa.map(() => Sa), VoiceHistogramController = class {
4978
5122
  constructor(e = typeof window > "u" ? void 0 : window) {
4979
- t(this, "browser", void 0), t(this, "heights", G(_a)), t(this, "targetBars", ga), t(this, "displayBars", ga), t(this, "level", {
5123
+ t(this, "browser", void 0), t(this, "heights", W(Na)), t(this, "targetBars", Ma), t(this, "displayBars", Ma), t(this, "level", {
4980
5124
  source: "mic",
4981
5125
  level: 0
4982
5126
  }), t(this, "isMuted", !1), t(this, "usesIdleWave", !1), t(this, "frameId", 0), t(this, "lastFrameAt", 0), t(this, "easeFrame", (e) => {
@@ -4985,12 +5129,12 @@ var aa = [
4985
5129
  this.frameId = 0;
4986
5130
  let n = Math.min(64, Math.max(0, e - this.lastFrameAt));
4987
5131
  this.lastFrameAt = e;
4988
- let r = this.usesIdleWave ? aa.map((t, n) => {
4989
- let r = e / 1e3 * fa * 2 * Math.PI - n * ha;
4990
- return pa + ma * (Math.sin(r) + 1) / 2;
5132
+ let r = this.usesIdleWave ? xa.map((t, n) => {
5133
+ let r = e / 1e3 * Oa * 2 * Math.PI - n * ja;
5134
+ return ka + Aa * (Math.sin(r) + 1) / 2;
4991
5135
  }) : this.targetBars;
4992
5136
  this.displayBars = this.displayBars.map((e, t) => {
4993
- let o = r[t] ?? 0, s = o > e ? ua : da;
5137
+ let o = r[t] ?? 0, s = o > e ? Ea : Da;
4994
5138
  return e + (o - e) * (1 - Math.exp(-n / s));
4995
5139
  }), this.publish();
4996
5140
  let o = this.displayBars.every((e, t) => Math.abs((r[t] ?? 0) - e) <= 5e-4);
@@ -5010,16 +5154,16 @@ var aa = [
5010
5154
  this.frameId && this.browser?.cancelAnimationFrame(this.frameId), this.frameId = 0;
5011
5155
  }
5012
5156
  updateTargets() {
5013
- let gate = (e) => Math.max(0, e - la) / .9, e = this.isMuted && this.level.source === "mic";
5014
- this.targetBars = aa.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
5157
+ let gate = (e) => Math.max(0, e - Ta) / .9, e = this.isMuted && this.level.source === "mic";
5158
+ this.targetBars = xa.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
5015
5159
  }
5016
5160
  start() {
5017
- !this.browser || this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches ? (this.displayBars = this.usesIdleWave ? ga : this.targetBars, this.publish()) : this.frameId || (this.lastFrameAt = this.browser.performance.now(), this.frameId = this.browser.requestAnimationFrame(this.easeFrame));
5161
+ !this.browser || this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches ? (this.displayBars = this.usesIdleWave ? Ma : this.targetBars, this.publish()) : this.frameId || (this.lastFrameAt = this.browser.performance.now(), this.frameId = this.browser.requestAnimationFrame(this.easeFrame));
5018
5162
  }
5019
5163
  publish() {
5020
- this.heights.value = this.displayBars.map((e) => Math.round((oa + Math.min(1, Math.max(0, e)) ** ca * sa) * 10) / 10);
5164
+ this.heights.value = this.displayBars.map((e) => Math.round((Sa + Math.min(1, Math.max(0, e)) ** wa * Ca) * 10) / 10);
5021
5165
  }
5022
- }, va = {
5166
+ }, Pa = {
5023
5167
  connecting: {
5024
5168
  label: "Connecting",
5025
5169
  tone: "bg-amber-500",
@@ -5057,7 +5201,7 @@ function deriveActivity(e) {
5057
5201
  return e.hadError ? "error" : e.sessionState === "live" ? e.speaking.bot ? "speaking" : e.speaking.user ? "listening" : e.work.active ? "working" : e.providerThinking ? "thinking" : "listening" : "connecting";
5058
5202
  }
5059
5203
  function deriveVoiceModePresentation(e) {
5060
- let t = deriveActivity(e), n = va[t], r = t === "working" ? e.work.description || "Working on it" : n.label, o = t === "working" ? r : n.visibleText ?? "", s = e.takingLonger && (t === "thinking" || t === "working"), c = s ? `${o} ${J.slowHint}` : o;
5204
+ let t = deriveActivity(e), n = Pa[t], r = t === "working" ? e.work.description || "Working on it" : n.label, o = t === "working" ? r : n.visibleText ?? "", s = e.takingLonger && (t === "thinking" || t === "working"), c = s ? `${o} ${Oe.slowHint}` : o;
5061
5205
  return {
5062
5206
  activity: t,
5063
5207
  label: s ? c : r,
@@ -5068,32 +5212,32 @@ function deriveVoiceModePresentation(e) {
5068
5212
  };
5069
5213
  }
5070
5214
  // bot/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
5071
- var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5215
+ var Fa = ["data-voice-state", "data-voice-activity"], Ia = ["src"], La = {
5072
5216
  key: 1,
5073
5217
  "data-test": "voice-background-fallback",
5074
5218
  "aria-hidden": "true",
5075
5219
  class: "pointer-events-none absolute inset-0 bg-[#0A1522]"
5076
- }, Sa = {
5220
+ }, Ra = {
5077
5221
  "data-test": "voice-stage",
5078
5222
  class: "relative z-10 flex flex-1 flex-col items-center px-8"
5079
- }, Ca = { "data-voice-assistant-avatar": "" }, wa = {
5223
+ }, za = { "data-voice-assistant-avatar": "" }, Ba = {
5080
5224
  "data-test": "voice-lower-stage",
5081
5225
  class: "flex flex-1 flex-col items-center pt-10"
5082
- }, Ta = {
5226
+ }, Va = {
5083
5227
  "data-test": "voice-histogram",
5084
5228
  "aria-hidden": "true",
5085
5229
  class: "flex h-[38px] items-center gap-[5px]"
5086
- }, Ea = {
5230
+ }, Ha = {
5087
5231
  "data-test": "voice-presence-status",
5088
5232
  role: "status",
5089
5233
  "aria-live": "polite",
5090
5234
  class: "sr-only"
5091
- }, Da = ["data-taking-longer"], Oa = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, ka = [
5235
+ }, Ua = ["data-taking-longer"], Wa = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Ga = [
5092
5236
  "disabled",
5093
5237
  "aria-label",
5094
5238
  "aria-pressed",
5095
5239
  "title"
5096
- ], Aa = /* @__PURE__ */ N({
5240
+ ], Ka = /* @__PURE__ */ M({
5097
5241
  __name: "VoiceMode",
5098
5242
  props: {
5099
5243
  bot: {},
@@ -5103,10 +5247,10 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5103
5247
  },
5104
5248
  emits: ["end"],
5105
5249
  setup(e, { expose: t, emit: n }) {
5106
- let r = n, o = G(!1), s = G(), c = G(!1), u = G({
5250
+ let r = n, o = W(!1), s = W(), c = W(!1), u = W({
5107
5251
  user: !1,
5108
5252
  bot: !1
5109
- }), d = G({ active: !1 }), p = G(!1), m = G(!1), g = G(), b = S(() => g.value?.state.value ?? "idle"), x = S(() => g.value?.isMuted.value ?? !1), T = new VoiceHistogramController(), E = T.heights, j = de("endButton"), N = de("muteButton"), P = !1, ee, I, te, H = S(() => deriveVoiceModePresentation({
5253
+ }), d = W({ active: !1 }), p = W(!1), m = W(!1), g = W(), b = S(() => g.value?.state.value ?? "idle"), x = S(() => g.value?.isMuted.value ?? !1), T = new VoiceHistogramController(), E = T.heights, ee = me("endButton"), te = me("muteButton"), M = !1, ne, N, P, re = S(() => deriveVoiceModePresentation({
5110
5254
  sessionState: b.value,
5111
5255
  hadError: o.value,
5112
5256
  providerThinking: c.value,
@@ -5115,37 +5259,37 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5115
5259
  isMuted: x.value,
5116
5260
  takingLonger: p.value
5117
5261
  })), se = S(() => {
5118
- if (H.value.activity === "thinking") return "thinking";
5119
- if (H.value.activity === "working") return `working:${d.value.description ?? ""}`;
5262
+ if (re.value.activity === "thinking") return "thinking";
5263
+ if (re.value.activity === "working") return `working:${d.value.description ?? ""}`;
5120
5264
  });
5121
- q(() => H.value.usesIdleWave, (e) => T.setIdleWave(e), { immediate: !0 }), q(x, (e) => T.setMuted(e), { immediate: !0 }), q(se, (e) => {
5122
- te && clearTimeout(te), p.value = !1, e && (te = setTimeout(() => {
5123
- te = void 0, p.value = !0;
5124
- }, Ee), te.unref?.());
5265
+ ge(() => re.value.usesIdleWave, (e) => T.setIdleWave(e), { immediate: !0 }), ge(x, (e) => T.setMuted(e), { immediate: !0 }), ge(se, (e) => {
5266
+ P && clearTimeout(P), p.value = !1, e && (P = setTimeout(() => {
5267
+ P = void 0, p.value = !0;
5268
+ }, ke), P.unref?.());
5125
5269
  }, { immediate: !0 });
5126
5270
  async function end() {
5127
- P = !0, await g.value?.end();
5271
+ M = !0, await g.value?.end();
5128
5272
  }
5129
5273
  t({ end });
5130
5274
  function emitEnd() {
5131
- P || (P = !0, r("end", ee));
5275
+ M || (M = !0, r("end", ne));
5132
5276
  }
5133
5277
  function trapFocus(e) {
5134
- e.shiftKey && document.activeElement === j.value ? (e.preventDefault(), N.value?.focus()) : !e.shiftKey && document.activeElement === N.value && (e.preventDefault(), j.value?.focus());
5278
+ e.shiftKey && document.activeElement === ee.value ? (e.preventDefault(), te.value?.focus()) : !e.shiftKey && document.activeElement === te.value && (e.preventDefault(), ee.value?.focus());
5135
5279
  }
5136
5280
  async function toggleMute() {
5137
5281
  let e = g.value;
5138
5282
  e && !m.value && (m.value = !0, await e.toggleMuted(), m.value = !1);
5139
5283
  }
5140
- return ne(async () => {
5141
- j.value?.focus({ preventScroll: !0 });
5284
+ return ce(async () => {
5285
+ ee.value?.focus({ preventScroll: !0 });
5142
5286
  let t = e.chatController?.createVoiceClient({
5143
5287
  onLevel: (e) => T.updateLevel(e),
5144
5288
  onEnded: (e) => {
5145
- ee = e;
5289
+ ne = e;
5146
5290
  },
5147
5291
  onStateChange: (e) => {
5148
- e === "ended" && (o.value ? I = setTimeout(emitEnd, 1600) : emitEnd());
5292
+ e === "ended" && (o.value ? N = setTimeout(emitEnd, 1600) : emitEnd());
5149
5293
  },
5150
5294
  onThinkingChange: (e) => {
5151
5295
  c.value = e;
@@ -5167,16 +5311,16 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5167
5311
  }
5168
5312
  });
5169
5313
  t ? (g.value = t, await t.start()) : emitEnd();
5170
- }), re(() => {
5171
- P = !0, I && clearTimeout(I), te && clearTimeout(te), T.stop(), g.value?.end();
5172
- }), (t, n) => (R(), O("div", {
5314
+ }), ue(() => {
5315
+ M = !0, N && clearTimeout(N), P && clearTimeout(P), T.stop(), g.value?.end();
5316
+ }), (t, n) => (L(), O("div", {
5173
5317
  "data-test": "voice-mode",
5174
5318
  "data-voice-state": b.value,
5175
- "data-voice-activity": H.value.activity,
5319
+ "data-voice-activity": re.value.activity,
5176
5320
  class: "relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",
5177
- onKeydown: he(trapFocus, ["tab"])
5321
+ onKeydown: Ce(trapFocus, ["tab"])
5178
5322
  }, [
5179
- e.backdropSrc ? (R(), O("img", {
5323
+ e.backdropSrc ? (L(), O("img", {
5180
5324
  key: 0,
5181
5325
  "data-test": "voice-background-image",
5182
5326
  src: e.backdropSrc,
@@ -5184,44 +5328,44 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5184
5328
  "aria-hidden": "true",
5185
5329
  draggable: "false",
5186
5330
  class: "pointer-events-none absolute inset-0 size-full object-cover"
5187
- }, null, 8, ba)) : (R(), O("div", xa)),
5331
+ }, null, 8, Ia)) : (L(), O("div", La)),
5188
5332
  n[2] || (n[2] = k("div", {
5189
5333
  "data-test": "voice-background-overlay",
5190
5334
  "aria-hidden": "true",
5191
5335
  class: "pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/82 via-[#050F19]/90 to-[#050F19]/99"
5192
5336
  }, null, -1)),
5193
- k("div", Sa, [
5337
+ k("div", Ra, [
5194
5338
  n[0] || (n[0] = k("div", {
5195
5339
  "data-test": "voice-stage-spacer",
5196
5340
  "aria-hidden": "true",
5197
5341
  class: "flex-1"
5198
5342
  }, null, -1)),
5199
- k("div", Ca, [M(Ke, {
5343
+ k("div", za, [j(Xe, {
5200
5344
  bot: e.bot,
5201
5345
  "show-status": !1,
5202
5346
  "show-owner-mark": !1,
5203
5347
  "is-light": !1,
5204
5348
  class: "size-32"
5205
5349
  }, null, 8, ["bot"])]),
5206
- k("div", wa, [
5207
- k("div", Ta, [(R(!0), O(y, null, W(ue(E), (e, t) => (R(), O("span", {
5350
+ k("div", Ba, [
5351
+ k("div", Va, [(L(!0), O(y, null, H(pe(E), (e, t) => (L(), O("span", {
5208
5352
  key: t,
5209
5353
  "data-test": "voice-histogram-bar",
5210
- class: F(["w-[5px] rounded-full transition-colors duration-150", H.value.tone]),
5211
- style: L({ height: `${e}px` })
5354
+ class: F(["w-[5px] rounded-full transition-colors duration-150", re.value.tone]),
5355
+ style: I({ height: `${e}px` })
5212
5356
  }, null, 6))), 128))]),
5213
- k("div", Ea, K(s.value ?? H.value.label), 1),
5357
+ k("div", Ha, G(s.value ?? re.value.label), 1),
5214
5358
  k("p", {
5215
5359
  "data-test": "voice-visible-status",
5216
- "data-taking-longer": H.value.takingLonger || void 0,
5360
+ "data-taking-longer": re.value.takingLonger || void 0,
5217
5361
  "aria-hidden": "true",
5218
5362
  class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
5219
- }, K(s.value ?? H.value.visibleStatus), 9, Da)
5363
+ }, G(s.value ?? re.value.visibleStatus), 9, Ua)
5220
5364
  ])
5221
5365
  ]),
5222
- k("div", Oa, [k("button", {
5366
+ k("div", Wa, [k("button", {
5223
5367
  ref_key: "endButton",
5224
- ref: j,
5368
+ ref: ee,
5225
5369
  type: "button",
5226
5370
  "data-test": "voice-end-btn",
5227
5371
  class: "flex size-16 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25",
@@ -5233,7 +5377,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5233
5377
  "aria-hidden": "true"
5234
5378
  }, null, -1)])], 512), k("button", {
5235
5379
  ref_key: "muteButton",
5236
- ref: N,
5380
+ ref: te,
5237
5381
  type: "button",
5238
5382
  "data-test": "voice-mute-btn",
5239
5383
  class: F(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [x.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", b.value === "live" && !m.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
@@ -5245,28 +5389,24 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5245
5389
  }, [k("i", {
5246
5390
  class: F([x.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
5247
5391
  "aria-hidden": "true"
5248
- }, null, 2)], 10, ka)])
5249
- ], 40, ya));
5392
+ }, null, 2)], 10, Ga)])
5393
+ ], 40, Fa));
5250
5394
  }
5251
- }), ja = {
5395
+ }), qa = {
5252
5396
  key: 0,
5253
5397
  class: "pb-4"
5254
- }, Ma = {
5398
+ }, Ja = {
5255
5399
  key: 1,
5256
5400
  "data-test": "messaging-sdk-header",
5257
5401
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
5258
- }, Na = { class: "min-w-0 flex-1" }, Pa = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Fa = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Ia = {
5402
+ }, Ya = { class: "min-w-0 flex-1" }, Xa = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Za = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Qa = {
5259
5403
  key: 0,
5260
5404
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
5261
- }, La = ["aria-label"], Ra = {
5405
+ }, $a = ["aria-label"], eo = {
5262
5406
  key: 0,
5263
5407
  "data-test": "messaging-empty-state",
5264
5408
  class: "flex flex-col items-center justify-center px-4"
5265
- }, za = ["title"], Ba = {
5266
- key: 0,
5267
- "data-test": "messaging-time-divider",
5268
- class: "flex items-center gap-3 py-3 px-2"
5269
- }, Va = ["data-journal-outcome"], Ha = [
5409
+ }, to = ["title"], no = ["data-journal-outcome"], ro = [
5270
5410
  "data-message-id",
5271
5411
  "data-message-sender",
5272
5412
  "data-conversation-id",
@@ -5277,7 +5417,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5277
5417
  "data-issue-action-label",
5278
5418
  "data-issue-action-url",
5279
5419
  "data-streaming"
5280
- ], Ua = { class: "flex items-center gap-3" }, Wa = ["href"], Ga = [
5420
+ ], io = { class: "flex items-center gap-3" }, ao = ["href"], oo = [
5281
5421
  "data-test",
5282
5422
  "data-message-id",
5283
5423
  "data-message-sender",
@@ -5285,7 +5425,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5285
5425
  "data-message-sequence",
5286
5426
  "data-system-kind",
5287
5427
  "data-routine-run-id"
5288
- ], Ka = [
5428
+ ], so = [
5289
5429
  "data-message-id",
5290
5430
  "data-message-sender",
5291
5431
  "data-conversation-id",
@@ -5294,73 +5434,52 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5294
5434
  "data-issue-code",
5295
5435
  "data-issue-bucket",
5296
5436
  "data-streaming"
5297
- ], qa = [
5298
- "data-test",
5299
- "data-message-id",
5300
- "data-message-sender",
5301
- "data-conversation-id",
5302
- "data-message-sequence",
5303
- "data-system-kind",
5304
- "data-streaming",
5305
- "data-queued",
5306
- "aria-label"
5307
- ], Ja = ["data-routine-run-id"], Ya = ["src", "alt"], Xa = ["src"], Za = ["href"], Qa = {
5437
+ ], co = ["data-routine-run-id"], lo = ["src", "alt"], uo = ["src"], fo = ["href"], po = {
5308
5438
  key: 0,
5309
5439
  "data-test": "messaging-message-text-part"
5310
- }, $a = [
5440
+ }, mo = [
5311
5441
  "src",
5312
5442
  "alt",
5313
5443
  "data-attachment-placement"
5314
- ], eo = ["src", "data-attachment-placement"], to = ["href", "data-attachment-placement"], no = ["data-actions-reveal"], ro = [
5444
+ ], ho = ["src", "data-attachment-placement"], go = ["href", "data-attachment-placement"], _o = ["data-actions-reveal"], vo = [
5315
5445
  "data-copied",
5316
5446
  "title",
5317
5447
  "aria-label",
5318
5448
  "onClick"
5319
- ], io = ["onClick"], ao = ["onClick"], oo = ["data-journal-outcome"], so = ["data-journal-outcome"], co = ["data-test", "data-working-description"], lo = {
5449
+ ], yo = ["onClick"], bo = ["onClick"], xo = ["data-journal-outcome"], So = ["data-journal-outcome"], Co = ["data-test", "data-working-description"], wo = {
5320
5450
  key: 0,
5321
5451
  class: "truncate"
5322
- }, uo = {
5452
+ }, To = {
5323
5453
  key: 1,
5324
5454
  class: "sr-only"
5325
- }, fo = ["data-issue-code"], po = { class: "min-w-0 flex-1" }, mo = {
5455
+ }, Eo = ["data-issue-code"], Do = { class: "min-w-0 flex-1" }, Oo = {
5326
5456
  "data-test": "messaging-transient-issue-title",
5327
5457
  class: "font-medium"
5328
- }, ho = { "data-test": "messaging-transient-issue-help" }, go = ["href"], _o = ["inert", "aria-hidden"], vo = ["data-seat-state"], yo = ["src", "alt"], bo = { class: "max-w-20 truncate" }, xo = ["onClick"], So = {
5458
+ }, ko = { "data-test": "messaging-transient-issue-help" }, Ao = ["href"], jo = ["inert", "aria-hidden"], Mo = ["data-seat-state"], No = ["src", "alt"], Po = { class: "max-w-20 truncate" }, Fo = ["onClick"], Io = {
5329
5459
  key: 0,
5330
5460
  class: "shrink-0 flex items-center justify-center size-14"
5331
- }, Co = ["data-composer-action"], wo = ["placeholder", "disabled"], To = { class: "font-mono text-sm tabular-nums" }, Eo = { class: "mt-2.5 flex items-center" }, Do = [
5461
+ }, Lo = { class: "font-mono text-sm tabular-nums" }, Ro = [
5332
5462
  "disabled",
5333
5463
  "aria-label",
5334
5464
  "title"
5335
- ], Oo = {
5465
+ ], zo = {
5336
5466
  key: 0,
5337
5467
  class: "i-svg-spinners-ring-resize size-5"
5338
- }, ko = {
5468
+ }, Bo = {
5339
5469
  key: 1,
5340
5470
  class: "i-tabler-plus size-5"
5341
- }, Ao = { class: "sr-only" }, jo = { class: "flex items-center gap-2" }, Mo = ["aria-label", "title"], No = { class: "sr-only" }, Po = [
5471
+ }, Vo = { class: "sr-only" }, Ho = ["aria-label", "title"], Uo = { class: "sr-only" }, Wo = [
5342
5472
  "disabled",
5343
5473
  "aria-label",
5344
5474
  "title"
5345
- ], Fo = {
5475
+ ], Go = {
5346
5476
  class: "flex h-4 items-center gap-[2px]",
5347
5477
  "aria-hidden": "true"
5348
- }, Io = [
5349
- "data-composer-action",
5350
- "disabled",
5351
- "aria-label",
5352
- "title"
5353
- ], Lo = {
5354
- key: 0,
5355
- class: "i-tabler-player-stop-filled size-3.5"
5356
- }, Ro = {
5357
- key: 1,
5358
- class: "i-tabler-arrow-up size-[17px]"
5359
- }, zo = { class: "sr-only" }, Bo = {
5478
+ }, Ko = {
5360
5479
  key: 2,
5361
5480
  "data-test": "messaging-ai-notice",
5362
5481
  class: "mx-auto max-w-[640px] @5xl/chat:max-w-[720px] pt-3 text-center text-[11.5px] leading-none text-theme-300"
5363
- }, Vo = /*#__PURE__*/ ve(/* @__PURE__ */ N({
5482
+ }, qo = /*#__PURE__*/ Te(/* @__PURE__ */ M({
5364
5483
  __name: "ElBotChat",
5365
5484
  props: {
5366
5485
  chatController: {},
@@ -5400,34 +5519,34 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5400
5519
  }, n = S(() => {
5401
5520
  let n = { ...t[e.scope] };
5402
5521
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
5403
- }), o = H(), s = H(), c = H();
5522
+ }), o = R(), s = R(), c = R();
5404
5523
  function containsMarkdownLink(e) {
5405
5524
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
5406
5525
  }
5407
5526
  function isSystemExplainerMessage(e) {
5408
- return e.sender === "system" && (!!e.issue || e.id === be.value);
5527
+ return e.sender === "system" && (!!e.issue || e.id === me.value);
5409
5528
  }
5410
5529
  function isGroupEnd(e, t) {
5411
5530
  let n = e[t], r = e[t + 1];
5412
5531
  return !r || r.sender !== n.sender;
5413
5532
  }
5414
- let d = S(() => e.chatController?.textState.value), p = S(() => d.value?.isConnected ?? !1), m = S(() => d.value?.isThinking ?? !1), g = S(() => d.value?.connectionStatus !== "connected" && !d.value?.error), b = S(() => e.chatController?.liveTurnBlocks?.value ?? []), N = S(() => {
5533
+ let d = S(() => e.chatController?.textState.value), p = S(() => d.value?.isConnected ?? !1), m = S(() => d.value?.isThinking ?? !1), g = S(() => d.value?.connectionStatus !== "connected" && !d.value?.error), b = S(() => e.chatController?.liveTurnBlocks?.value ?? []), M = S(() => {
5415
5534
  for (let e = b.value.length - 1; e >= 0; e--) {
5416
5535
  let t = b.value[e];
5417
5536
  if (t?.kind === "text") return t.id;
5418
5537
  }
5419
- }), P = S(() => e.chatController?.liveStreamMessageId?.value), I = S(() => {
5538
+ }), ne = S(() => e.chatController?.liveStreamMessageId?.value), N = S(() => {
5420
5539
  let t = e.chatController?.sharedMessages.value ?? [];
5421
- return b.value.length && P.value ? t.filter((e) => e.id !== P.value) : t;
5422
- }), te = S(() => {
5540
+ return b.value.length && ne.value ? t.filter((e) => e.id !== ne.value) : t;
5541
+ }), re = S(() => {
5423
5542
  if (!e.chatController?.workJournal?.value) return d.value?.workingDescription?.trim() || void 0;
5424
- }), ce = S(() => e.chatController?.workJournal?.value), ue = S(() => {
5425
- if (!ce.value && !b.value.length) return;
5426
- let e = I.value, t = e[e.length - 1];
5543
+ }), se = S(() => e.chatController?.workJournal?.value), fe = S(() => {
5544
+ if (!se.value && !b.value.length) return;
5545
+ let e = N.value, t = e[e.length - 1];
5427
5546
  if (t) return t.sender === "bot" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
5428
- }), de = S(() => {
5547
+ }), pe = S(() => {
5429
5548
  let t = {};
5430
- for (let n of I.value) {
5549
+ for (let n of N.value) {
5431
5550
  if (n.sender === "user" || !n.toolActivities?.length) continue;
5432
5551
  let r = e.chatController?.workJournalFor?.({
5433
5552
  activities: n.toolActivities,
@@ -5439,7 +5558,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5439
5558
  return t;
5440
5559
  });
5441
5560
  function messageWorkJournal(e) {
5442
- return de.value[e.id];
5561
+ return pe.value[e.id];
5443
5562
  }
5444
5563
  function inlineOffset(e, t) {
5445
5564
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -5487,14 +5606,14 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5487
5606
  text: t.slice(o)
5488
5607
  }), r;
5489
5608
  }
5490
- let ve = S(() => d.value?.transientIssue), be = S(() => {
5609
+ let K = S(() => d.value?.transientIssue), me = S(() => {
5491
5610
  if (!m.value) return;
5492
- let e = I.value, t = e[e.length - 1];
5611
+ let e = N.value, t = e[e.length - 1];
5493
5612
  return t?.sender === "bot" || t?.sender === "system" ? t.id : void 0;
5494
- }), Ce = S(() => !m.value || te.value || ce.value || b.value.length ? !1 : be.value === void 0), Te = S(() => !!te.value || Ce.value), J = S(() => d.value?.sendBlockedReason), Ee = S(() => J.value === "bot_deleted"), Y = S(() => g.value ? "Connecting..." : J.value === "bot_deleted" ? "This assistant was deleted" : "Send a message"), De = S(() => u(e.bot.state.value)), Oe = S(() => {
5495
- if (at.value || !De.value || De.value === "awake") return;
5613
+ }), he = S(() => !m.value || re.value || se.value || b.value.length ? !1 : me.value === void 0), be = S(() => !!re.value || he.value), Te = S(() => d.value?.sendBlockedReason), Ee = S(() => Te.value === "bot_deleted"), q = S(() => g.value ? "Connecting..." : Te.value === "bot_deleted" ? "This assistant was deleted" : "Send a message"), J = S(() => u(e.bot.state.value)), Oe = S(() => {
5614
+ if (it.value || !J.value || J.value === "awake") return;
5496
5615
  let t = e.bot.displayName.value || e.bot.name.value || "Your assistant";
5497
- return De.value === "changing" ? `${t} will be right back…` : De.value === "stuck" ? `${t} needs attention.` : `${t} is ${r[De.value].toLowerCase()}.`;
5616
+ return J.value === "changing" ? `${t} will be right back…` : J.value === "stuck" ? `${t} needs attention.` : `${t} is ${r[J.value].toLowerCase()}.`;
5498
5617
  }), ke = S(() => e.chatController?.composerState?.value ?? {
5499
5618
  text: "",
5500
5619
  pendingAttachments: [],
@@ -5502,35 +5621,35 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5502
5621
  }), Ae = S({
5503
5622
  get: () => ke.value.text,
5504
5623
  set: (t) => e.chatController?.setComposerText?.({ text: t })
5505
- }), je = S(() => ke.value.pendingAttachments), Me = S(() => ke.value.isUploading), Ne = S(() => e.chatController?.voiceRecorder), Fe = S(() => Ne.value?.isBusy.value ?? !1), Ie = S(() => e.chatController?.canAttachFile?.value ?? !1), Le = S(() => e.chatController?.canRecordAudio?.value ?? !1), Re = S(() => e.chatController?.composerAction?.value ?? "idle"), ze = S(() => Re.value !== "idle"), Be = S(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), He = S(() => e.chatController?.queuedMessageIds?.value);
5624
+ }), je = S(() => ke.value.pendingAttachments), Me = S(() => ke.value.isUploading), Ne = S(() => e.chatController?.voiceRecorder), Fe = S(() => Ne.value?.isBusy.value ?? !1), Ie = S(() => e.chatController?.canAttachFile?.value ?? !1), Le = S(() => e.chatController?.canRecordAudio?.value ?? !1), Re = S(() => e.chatController?.composerAction?.value ?? "idle"), ze = S(() => Re.value !== "idle"), Be = S(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Ve = S(() => e.chatController?.queuedMessageIds?.value);
5506
5625
  function isQueuedMessage(e) {
5507
- return He.value?.has(e) ?? !1;
5626
+ return Ve.value?.has(e) ?? !1;
5508
5627
  }
5509
- let Ue = H(), We;
5628
+ let He = R(), Ue;
5510
5629
  function canCopyMessage(e) {
5511
- return e.sender === "bot" && e.id !== be.value && !!e.text?.trim();
5630
+ return e.sender === "bot" && e.id !== me.value && !!e.text?.trim();
5512
5631
  }
5513
- let Ge = S(() => [...I.value].reverse().find(canCopyMessage)?.id);
5632
+ let We = S(() => [...N.value].reverse().find(canCopyMessage)?.id);
5514
5633
  async function copyMessage(t) {
5515
5634
  try {
5516
- await navigator.clipboard.writeText(t.text), Ue.value = t.id, clearTimeout(We), We = setTimeout(() => {
5517
- Ue.value = void 0;
5635
+ await navigator.clipboard.writeText(t.text), He.value = t.id, clearTimeout(Ue), Ue = setTimeout(() => {
5636
+ He.value = void 0;
5518
5637
  }, 1500);
5519
5638
  } catch (t) {
5520
5639
  console.warn("ElBotChat: copy to clipboard rejected", t), e.chatController?.notify?.("Could not copy that message.");
5521
5640
  }
5522
5641
  }
5523
- re(() => clearTimeout(We));
5524
- let qe = S(() => e.chatController?.canReportMessages ?? !1), Je = S(() => e.chatController?.messageShare), Ye = H(), Xe = S(() => {
5525
- let e = Ye.value;
5642
+ ue(() => clearTimeout(Ue));
5643
+ let Ke = S(() => e.chatController?.canReportMessages ?? !1), qe = S(() => e.chatController?.messageShare), Je = R(), Ye = S(() => {
5644
+ let e = Je.value;
5526
5645
  if (!e) return;
5527
- let t = I.value, n = t.findIndex((t) => t.id === e.id);
5646
+ let t = N.value, n = t.findIndex((t) => t.id === e.id);
5528
5647
  return t.slice(0, Math.max(n, 0)).reverse().find((e) => e.sender === "user")?.text;
5529
- }), Ze = S(() => Re.value === "stop" ? "Stop reply" : Be.value ? "Send — answered after current work" : "Send message"), Qe = S(() => Le.value && !Fe.value && !!Ne.value?.canUseBrowserRecording), $e = S(() => Ne.value?.isActive.value ?? !1), et = S(() => Ne.value?.state.value.phase === "sending"), nt = S(() => Ne.value?.elapsedLabel.value ?? "0:00"), rt = S(() => {
5648
+ }), Ze = S(() => Re.value === "stop" ? "Stop reply" : Be.value ? "Send — answered after current work" : "Send message"), Qe = S(() => Le.value && !Fe.value && !!Ne.value?.canUseBrowserRecording), $e = S(() => Ne.value?.isActive.value ?? !1), et = S(() => Ne.value?.state.value.phase === "sending"), tt = S(() => Ne.value?.elapsedLabel.value ?? "0:00"), nt = S(() => {
5530
5649
  let e = Ne.value?.state.value.phase;
5531
- return e === "preparing" || e === "sending" ? Ne.value?.statusText.value ?? "Starting microphone" : gt.value ? "Release to send" : "Click mic to send";
5532
- }), it = S(() => Ne.value?.state.value.phase === "sending" ? "Sending voice message" : $e.value ? gt.value ? "Release to send voice message" : "Stop and send voice message" : "Record voice message"), at = H(!1), ot = H(), st = H(), ct = H(), lt = 0, ut = S(() => e.chatController?.canStartVoice?.value ?? !1);
5533
- q([() => e.bot.avatar.value?.src, ut], ([e, t]) => {
5650
+ return e === "preparing" || e === "sending" ? Ne.value?.statusText.value ?? "Starting microphone" : ht.value ? "Release to send" : "Click mic to send";
5651
+ }), rt = S(() => Ne.value?.state.value.phase === "sending" ? "Sending voice message" : $e.value ? ht.value ? "Release to send voice message" : "Stop and send voice message" : "Record voice message"), it = R(!1), ot = R(), st = R(), ct = R(), lt = 0, ut = S(() => e.chatController?.canStartVoice?.value ?? !1);
5652
+ ge([() => e.bot.avatar.value?.src, ut], ([e, t]) => {
5534
5653
  let n = ++lt;
5535
5654
  if (ct.value = void 0, !t || !e || typeof Image > "u") return;
5536
5655
  let r = new Image();
@@ -5538,26 +5657,23 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5538
5657
  n === lt && (ct.value = e);
5539
5658
  }, r.src = e;
5540
5659
  }, { immediate: !0 });
5541
- let dt = S(() => ut.value && !at.value && !$e.value && Re.value === "idle"), ft = S(() => !p.value), pt = S(() => ft.value ? `Voice available when ${e.bot.displayName.value || e.bot.name.value || "the assistant"} is awake` : "Start voice conversation");
5660
+ let Y = S(() => ut.value && !it.value && !$e.value && Re.value === "idle"), dt = S(() => !p.value), ft = S(() => dt.value ? `Voice available when ${e.bot.displayName.value || e.bot.name.value || "the assistant"} is awake` : "Start voice conversation");
5542
5661
  function startVoiceConversation() {
5543
- dt.value && !ft.value && (st.value = ct.value, at.value = !0);
5662
+ Y.value && !dt.value && (st.value = ct.value, it.value = !0);
5544
5663
  }
5545
5664
  async function endVoiceConversation(t) {
5546
- if (!at.value) return;
5665
+ if (!it.value) return;
5547
5666
  let n = ot.value;
5548
- at.value = !1, st.value = void 0, await ee(), await n?.end(), window.matchMedia("(pointer: coarse)").matches || s.value?.focus(), await e.chatController?.refreshMessages(), t && e.chatController?.notify(voiceEndNotice(t, e.bot.displayName.value || e.bot.name.value || "Your assistant"), { systemKind: "voice_ended" });
5667
+ it.value = !1, st.value = void 0, await P(), await n?.end(), window.matchMedia("(pointer: coarse)").matches || s.value?.focus(), await e.chatController?.refreshMessages(), t && e.chatController?.notify(voiceEndNotice(t, e.bot.displayName.value || e.bot.name.value || "Your assistant"), { systemKind: "voice_ended" });
5549
5668
  }
5550
- let Z = S(() => e.variant === "light"), mt = S(() => Z.value ? "bg-theme-200/70" : "bg-white/15"), ht = S(() => Z.value ? "text-theme-300" : "text-white/30");
5551
- ne(async () => {
5669
+ let Z = S(() => e.variant === "light"), pt = S(() => Z.value ? "bg-theme-200/70" : "bg-white/15"), mt = S(() => Z.value ? "text-theme-300" : "text-white/30");
5670
+ ce(async () => {
5552
5671
  e.chatController && !p.value && await e.chatController.startTextConversation();
5553
- }), re(() => {
5672
+ }), ue(() => {
5554
5673
  e.chatController?.voiceRecorder?.teardown();
5555
5674
  });
5556
5675
  async function sendMessage() {
5557
- e.chatController && Re.value === "send" && (s.value && (s.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? (s.value.blur(), requestAnimationFrame(() => {
5558
- let e = document.activeElement;
5559
- e && (e.tagName === "TEXTAREA" || e.tagName === "INPUT") && e.blur();
5560
- })) : s.value.focus()), o.value?.pin(), await e.chatController.sendComposerMessage());
5676
+ e.chatController && Re.value === "send" && (s.value?.settleAfterSend(), o.value?.pin(), await e.chatController.sendComposerMessage());
5561
5677
  }
5562
5678
  async function handleCardAction(t) {
5563
5679
  e.chatController && !Ee.value && (o.value?.pin(), await e.chatController.sendChatMessage(t));
@@ -5565,16 +5681,6 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5565
5681
  async function handleComposerAction() {
5566
5682
  e.chatController && (Re.value === "send" ? await sendMessage() : await e.chatController.handleComposerAction());
5567
5683
  }
5568
- async function handleKeydown(e) {
5569
- e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
5570
- }
5571
- function focusComposer(e) {
5572
- $e.value || Ee.value || e.target instanceof Element && e.target.closest("button, a, textarea") || s.value?.focus();
5573
- }
5574
- function adjustTextareaHeight() {
5575
- s.value && (s.value.style.height = "auto", s.value.style.height = `${Math.min(s.value.scrollHeight, 150)}px`);
5576
- }
5577
- q(Ae, () => ee(() => adjustTextareaHeight()));
5578
5684
  function triggerFileInput() {
5579
5685
  c.value?.click();
5580
5686
  }
@@ -5591,21 +5697,21 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5591
5697
  function finishRecording(e) {
5592
5698
  Ne.value?.finish(e);
5593
5699
  }
5594
- let gt = G(!1), _t = !1;
5700
+ let ht = W(!1), gt = !1;
5595
5701
  function onRecordPointerDown(e) {
5596
- e.pointerType === "touch" && (_t = !0, gt.value = !0, e.currentTarget.setPointerCapture?.(e.pointerId), startRecording());
5702
+ e.pointerType === "touch" && (gt = !0, ht.value = !0, e.currentTarget.setPointerCapture?.(e.pointerId), startRecording());
5597
5703
  }
5598
5704
  function onRecordPointerUp(e) {
5599
- e.pointerType === "touch" && gt.value && (gt.value = !1, finishRecording({ cancelled: !1 }));
5705
+ e.pointerType === "touch" && ht.value && (ht.value = !1, finishRecording({ cancelled: !1 }));
5600
5706
  }
5601
5707
  function onRecordPointerCancel(e) {
5602
- e.pointerType === "touch" && gt.value && (gt.value = !1, _t = !1, finishRecording({ cancelled: !0 }));
5708
+ e.pointerType === "touch" && ht.value && (ht.value = !1, gt = !1, finishRecording({ cancelled: !0 }));
5603
5709
  }
5604
5710
  function toggleRecording() {
5605
5711
  $e.value ? finishRecording({ cancelled: !1 }) : startRecording();
5606
5712
  }
5607
5713
  function onRecordClick() {
5608
- _t ? _t = !1 : toggleRecording();
5714
+ gt ? gt = !1 : toggleRecording();
5609
5715
  }
5610
5716
  function shouldShowTimeDivider(e, t) {
5611
5717
  if (t === 0) {
@@ -5634,32 +5740,32 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5634
5740
  ...c ? {} : { year: "numeric" }
5635
5741
  })}, ${s}`;
5636
5742
  }
5637
- return (t, r) => (R(), O("div", {
5743
+ return (t, r) => (L(), O("div", {
5638
5744
  "data-test": "messaging-root",
5639
- class: F(["@container/chat relative flex h-full flex-col", I.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5745
+ class: F(["@container/chat relative flex h-full flex-col", N.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5640
5746
  }, [
5641
- e.showHeader && !Z.value ? (R(), O("div", ja, [M(Ve, {
5747
+ e.showHeader && !Z.value ? (L(), O("div", qa, [j(Ge, {
5642
5748
  bot: e.bot,
5643
5749
  "is-online": p.value
5644
- }, null, 8, ["bot", "is-online"])])) : e.showHeader ? (R(), O("div", Ma, [k("div", { class: F(["flex items-center gap-3", e.centered ? "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto" : ""]) }, [
5645
- M(Ke, {
5750
+ }, null, 8, ["bot", "is-online"])])) : e.showHeader ? (L(), O("div", Ja, [k("div", { class: F(["flex items-center gap-3", e.centered ? "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto" : ""]) }, [
5751
+ j(Xe, {
5646
5752
  bot: e.bot,
5647
5753
  "is-light": Z.value,
5648
5754
  class: "size-10"
5649
5755
  }, null, 8, ["bot", "is-light"]),
5650
- k("div", Na, [k("div", Pa, K(e.bot.displayName.value), 1), k("div", Fa, K(e.bot.title.value || "Assistant"), 1)]),
5651
- e.headerMeta ? (R(), O("span", Ia, K(e.headerMeta), 1)) : E("", !0)
5756
+ k("div", Ya, [k("div", Xa, G(e.bot.displayName.value), 1), k("div", Za, G(e.bot.title.value || "Assistant"), 1)]),
5757
+ e.headerMeta ? (L(), O("span", Qa, G(e.headerMeta), 1)) : E("", !0)
5652
5758
  ], 2)])) : E("", !0),
5653
- M(x, { name: "voice-call" }, {
5654
- default: pe(() => [at.value ? (R(), O("div", {
5759
+ j(x, { name: "voice-call" }, {
5760
+ default: ve(() => [it.value ? (L(), O("div", {
5655
5761
  key: 0,
5656
5762
  "data-test": "voice-call-overlay",
5657
5763
  role: "dialog",
5658
5764
  "aria-modal": "true",
5659
5765
  "aria-label": `Voice conversation with ${e.bot.displayName.value}`,
5660
5766
  class: "fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",
5661
- onKeydown: r[0] || (r[0] = he((e) => endVoiceConversation(), ["esc"]))
5662
- }, [M(Aa, {
5767
+ onKeydown: r[0] || (r[0] = Ce((e) => endVoiceConversation(), ["esc"]))
5768
+ }, [j(Ka, {
5663
5769
  ref_key: "voiceMode",
5664
5770
  ref: ot,
5665
5771
  bot: e.bot,
@@ -5672,52 +5778,53 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5672
5778
  "bot",
5673
5779
  "chat-controller",
5674
5780
  "backdrop-src"
5675
- ])], 40, La)) : E("", !0)]),
5781
+ ])], 40, $a)) : E("", !0)]),
5676
5782
  _: 1
5677
5783
  }),
5678
- g.value ? (R(), O("div", {
5784
+ g.value ? (L(), O("div", {
5679
5785
  key: 2,
5680
5786
  class: F(["py-16 flex flex-col items-center justify-center gap-2 text-sm", Z.value ? "text-theme-400" : "text-theme-600"])
5681
- }, [M(we, { class: "size-4" })], 2)) : e.setupHint ? (R(), O("div", {
5787
+ }, [j(De, { class: "size-4" })], 2)) : e.setupHint ? (L(), O("div", {
5682
5788
  key: 3,
5683
- class: F(["flex items-center justify-center gap-1.5 py-2 text-[11px]", ht.value])
5684
- }, [r[15] || (r[15] = k("i", { class: "i-tabler-tool size-3" }, null, -1)), k("span", null, K(e.setupHint), 1)], 2)) : E("", !0),
5685
- M(Ii, {
5789
+ class: F(["flex items-center justify-center gap-1.5 py-2 text-[11px]", mt.value])
5790
+ }, [r[16] || (r[16] = k("i", { class: "i-tabler-tool size-3" }, null, -1)), k("span", null, G(e.setupHint), 1)], 2)) : E("", !0),
5791
+ j(Xi, {
5686
5792
  ref_key: "chatScroller",
5687
5793
  ref: o,
5688
5794
  "data-test": "messaging-scroller",
5689
- inert: at.value,
5690
- "aria-hidden": at.value ? "true" : void 0,
5691
- class: F([I.value.length === 0 ? "flex-none" : "flex-1", e.centered && !e.showHeader && I.value.length > 0 ? "mt-16" : ""])
5795
+ inert: it.value,
5796
+ "aria-hidden": it.value ? "true" : void 0,
5797
+ class: F([N.value.length === 0 ? "flex-none" : "flex-1", e.centered && !e.showHeader && N.value.length > 0 ? "mt-16" : ""])
5692
5798
  }, {
5693
- default: pe(() => [k("div", { class: F([I.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-4 pb-5 px-3 @lg/chat:px-8 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-8 space-y-2", e.centered ? I.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto w-full" : ""]) }, [
5694
- I.value.length === 0 && !g.value ? (R(), O("div", Ra, [se(t.$slots, "empty-heading", {
5799
+ default: ve(() => [k("div", { class: F([N.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-4 pb-5 px-3 @lg/chat:px-8 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-8 space-y-2", e.centered ? N.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto w-full" : ""]) }, [
5800
+ N.value.length === 0 && !g.value ? (L(), O("div", eo, [de(t.$slots, "empty-heading", {
5695
5801
  bot: e.bot,
5696
5802
  isLight: Z.value
5697
- }, () => [M(Ke, {
5803
+ }, () => [j(Xe, {
5698
5804
  bot: e.bot,
5699
5805
  "is-light": Z.value,
5700
5806
  class: "mb-4 size-20 @sm/chat:size-24"
5701
- }, null, 8, ["bot", "is-light"]), k("div", { class: F(["text-base @sm/chat:text-lg font-semibold", Z.value ? "text-theme-900" : "text-white"]) }, K(e.bot.displayName.value), 3)], !0), e.emptyStateMessage === "" ? E("", !0) : (R(), O(y, { key: 0 }, [k("p", { class: F(["mt-1 text-center text-xs @sm/chat:text-sm", ht.value]) }, K(e.emptyStateMessage || "Type your message to get started."), 3), k("div", {
5807
+ }, null, 8, ["bot", "is-light"]), k("div", { class: F(["text-base @sm/chat:text-lg font-semibold", Z.value ? "text-theme-900" : "text-white"]) }, G(e.bot.displayName.value), 3)], !0), e.emptyStateMessage === "" ? E("", !0) : (L(), O(y, { key: 0 }, [k("p", { class: F(["mt-1 text-center text-xs @sm/chat:text-sm", mt.value]) }, G(e.emptyStateMessage || "Type your message to get started."), 3), k("div", {
5702
5808
  class: F(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", Z.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5703
5809
  title: n.value.tooltip
5704
- }, [k("i", { class: F([n.value.icon, "size-3"]) }, null, 2), k("span", null, K(n.value.label), 1)], 10, za)], 64))])) : E("", !0),
5705
- (R(!0), O(y, null, W(I.value, (t, n) => (R(), O(y, { key: t.id }, [
5706
- shouldShowTimeDivider(I.value, n) ? (R(), O("div", Ba, [
5707
- k("div", { class: F(["flex-1 h-px", mt.value]) }, null, 2),
5708
- k("span", { class: F(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", ht.value]) }, K(shouldShowTimeDivider(I.value, n)), 3),
5709
- k("div", { class: F(["flex-1 h-px", mt.value]) }, null, 2)
5710
- ])) : E("", !0),
5711
- messageWorkJournal(t) ? (R(), O("div", {
5810
+ }, [k("i", { class: F([n.value.icon, "size-3"]) }, null, 2), k("span", null, G(n.value.label), 1)], 10, to)], 64))])) : E("", !0),
5811
+ (L(!0), O(y, null, H(N.value, (t, n) => (L(), O(y, { key: t.id }, [
5812
+ shouldShowTimeDivider(N.value, n) ? (L(), T(qi, {
5813
+ key: 0,
5814
+ "data-test": "messaging-time-divider",
5815
+ label: shouldShowTimeDivider(N.value, n) || "",
5816
+ inverted: !Z.value
5817
+ }, null, 8, ["label", "inverted"])) : E("", !0),
5818
+ messageWorkJournal(t) ? (L(), O("div", {
5712
5819
  key: 1,
5713
5820
  "data-test": "messaging-message-tool-activity",
5714
5821
  "data-journal-outcome": messageWorkJournal(t)?.outcome,
5715
5822
  class: "mb-4 w-full"
5716
- }, [M(tt, {
5823
+ }, [j(at, {
5717
5824
  model: messageWorkJournal(t),
5718
5825
  "is-light": Z.value
5719
- }, null, 8, ["model", "is-light"])], 8, Va)) : E("", !0),
5720
- isSystemExplainerMessage(t) ? (R(), O("section", {
5826
+ }, null, 8, ["model", "is-light"])], 8, no)) : E("", !0),
5827
+ isSystemExplainerMessage(t) ? (L(), O("section", {
5721
5828
  key: 2,
5722
5829
  "data-test": "messaging-system-msg",
5723
5830
  "data-message-id": t.id,
@@ -5729,42 +5836,42 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5729
5836
  "data-issue-bucket": t.issue?.bucket,
5730
5837
  "data-issue-action-label": t.issue?.actionLabel,
5731
5838
  "data-issue-action-url": t.issue?.actionUrl,
5732
- "data-streaming": t.id === be.value ? "true" : void 0,
5839
+ "data-streaming": t.id === me.value ? "true" : void 0,
5733
5840
  class: "mb-6 w-full"
5734
- }, [k("div", { class: F(["mb-1.5 text-center text-[10.5px] font-medium", ht.value]) }, "System message", 2), k("div", Ua, [
5841
+ }, [k("div", { class: F(["mb-1.5 text-center text-[10.5px] font-medium", mt.value]) }, "System message", 2), k("div", io, [
5735
5842
  k("span", {
5736
5843
  "data-test": "messaging-system-divider-line",
5737
5844
  "aria-hidden": "true",
5738
- class: F(["hidden h-px flex-1 opacity-60 @md/chat:block", mt.value])
5845
+ class: F(["hidden h-px flex-1 opacity-60 @md/chat:block", pt.value])
5739
5846
  }, null, 2),
5740
- k("div", { class: F(["w-[46ch] min-w-0 max-w-full rounded-2xl px-5 py-3.5 text-center text-[13px] ring-1 [&_.chat-msg-rich]:max-w-none [&_.chat-msg-rich]:text-[13px] [&_.chat-msg-rich]:italic [&_.chat-msg-rich]:leading-[1.6]", Z.value ? "text-theme-700 ring-theme-200/50" : "text-white/85 ring-white/10"]) }, [t.text ? (R(), T(Ni, {
5847
+ k("div", { class: F(["w-[46ch] min-w-0 max-w-full rounded-2xl px-5 py-3.5 text-center text-[13px] ring-1 [&_.chat-msg-rich]:max-w-none [&_.chat-msg-rich]:text-[13px] [&_.chat-msg-rich]:italic [&_.chat-msg-rich]:leading-[1.6]", Z.value ? "text-theme-700 ring-theme-200/50" : "text-white/85 ring-white/10"]) }, [t.text ? (L(), T(Ii, {
5741
5848
  key: 0,
5742
5849
  text: t.text,
5743
5850
  inverted: !Z.value,
5744
- streaming: t.id === be.value,
5745
- onClick: r[1] || (r[1] = ge(() => {}, ["stop"])),
5851
+ streaming: t.id === me.value,
5852
+ onClick: r[1] || (r[1] = we(() => {}, ["stop"])),
5746
5853
  onAction: handleCardAction
5747
5854
  }, null, 8, [
5748
5855
  "text",
5749
5856
  "inverted",
5750
5857
  "streaming"
5751
- ])) : t.issue?.help ? (R(), T(Ni, {
5858
+ ])) : t.issue?.help ? (L(), T(Ii, {
5752
5859
  key: 1,
5753
5860
  text: t.issue.help,
5754
5861
  inverted: !Z.value
5755
- }, null, 8, ["text", "inverted"])) : E("", !0), t.issue?.actionUrl && !containsMarkdownLink(t.text) ? (R(), O("a", {
5862
+ }, null, 8, ["text", "inverted"])) : E("", !0), t.issue?.actionUrl && !containsMarkdownLink(t.text) ? (L(), O("a", {
5756
5863
  key: 2,
5757
5864
  href: t.issue.actionUrl,
5758
5865
  "data-test": "messaging-system-msg-action",
5759
5866
  class: F(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", Z.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5760
- onClick: r[2] || (r[2] = ge(() => {}, ["stop"]))
5761
- }, [j(K(t.issue.actionLabel) + " ", 1), r[16] || (r[16] = k("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Wa)) : E("", !0)], 2),
5867
+ onClick: r[2] || (r[2] = we(() => {}, ["stop"]))
5868
+ }, [te(G(t.issue.actionLabel) + " ", 1), r[17] || (r[17] = k("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, ao)) : E("", !0)], 2),
5762
5869
  k("span", {
5763
5870
  "data-test": "messaging-system-divider-line",
5764
5871
  "aria-hidden": "true",
5765
- class: F(["hidden h-px flex-1 opacity-60 @md/chat:block", mt.value])
5872
+ class: F(["hidden h-px flex-1 opacity-60 @md/chat:block", pt.value])
5766
5873
  }, null, 2)
5767
- ])], 8, Ha)) : t.sender === "system" && (t.systemKind === "routine_completed" || t.systemKind === "voice_ended") ? (R(), O("div", {
5874
+ ])], 8, ro)) : t.sender === "system" && (t.systemKind === "routine_completed" || t.systemKind === "voice_ended") ? (L(), O("div", {
5768
5875
  key: 3,
5769
5876
  "data-test": t.systemKind === "routine_completed" ? "messaging-routine-receipt" : "messaging-voice-receipt",
5770
5877
  "data-message-id": t.id,
@@ -5777,7 +5884,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5777
5884
  }, [k("i", {
5778
5885
  class: F(["size-3.5 shrink-0", t.systemKind === "voice_ended" ? "i-tabler-phone-off" : "i-tabler-clock"]),
5779
5886
  "aria-hidden": "true"
5780
- }, null, 2), k("span", null, K(t.text), 1)], 10, Ga)) : t.sender === "system" ? (R(), O("div", {
5887
+ }, null, 2), k("span", null, G(t.text), 1)], 10, oo)) : t.sender === "system" ? (L(), O("div", {
5781
5888
  key: 4,
5782
5889
  "data-test": "messaging-system-status-msg",
5783
5890
  "data-message-id": t.id,
@@ -5787,63 +5894,59 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5787
5894
  "data-system-kind": t.systemKind,
5788
5895
  "data-issue-code": t.issue?.code,
5789
5896
  "data-issue-bucket": t.issue?.bucket,
5790
- "data-streaming": t.id === be.value ? "true" : void 0,
5897
+ "data-streaming": t.id === me.value ? "true" : void 0,
5791
5898
  class: F(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", Z.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5792
- }, [r[17] || (r[17] = k("i", {
5899
+ }, [r[18] || (r[18] = k("i", {
5793
5900
  class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
5794
5901
  "aria-hidden": "true"
5795
- }, null, -1)), M(Ni, {
5902
+ }, null, -1)), j(Ii, {
5796
5903
  text: t.text,
5797
5904
  inverted: !Z.value,
5798
- onClick: r[3] || (r[3] = ge(() => {}, ["stop"]))
5799
- }, null, 8, ["text", "inverted"])], 10, Ka)) : (R(), O("div", {
5905
+ onClick: r[3] || (r[3] = we(() => {}, ["stop"]))
5906
+ }, null, 8, ["text", "inverted"])], 10, so)) : (L(), T(Qi, {
5800
5907
  key: 5,
5908
+ own: t.sender === "user",
5909
+ inverted: !Z.value,
5801
5910
  "data-test": t.sender === "bot" ? "messaging-assistant-msg" : t.sender === "user" ? "messaging-user-msg" : void 0,
5802
5911
  "data-message-id": t.id,
5803
5912
  "data-message-sender": t.sender,
5804
5913
  "data-conversation-id": t.conversationId,
5805
5914
  "data-message-sequence": t.sequence,
5806
5915
  "data-system-kind": t.systemKind,
5807
- "data-streaming": t.id === be.value ? "true" : void 0,
5916
+ "data-streaming": t.id === me.value ? "true" : void 0,
5808
5917
  "data-queued": isQueuedMessage(t.id) ? "true" : void 0,
5809
5918
  "aria-label": isQueuedMessage(t.id) ? "Sent — will be answered after the current work finishes" : void 0,
5810
- class: F(["group/msg flex gap-2 items-end", {
5811
- "justify-end": t.sender === "user",
5812
- "justify-start": t.sender === "bot",
5813
- "mb-6": isGroupEnd(I.value, n),
5919
+ class: F({
5920
+ "mb-6": isGroupEnd(N.value, n),
5814
5921
  "opacity-70": isQueuedMessage(t.id)
5815
- }])
5816
- }, [k("div", {
5817
- "data-test": "messaging-message-body",
5818
- class: F(t.sender === "user" ? "min-w-0 ml-3 @sm/chat:ml-[2em]" : "w-full min-w-0 pr-3 @sm/chat:pr-[2em]")
5819
- }, [
5820
- t.sender === "bot" && t.routine ? (R(), O("div", {
5922
+ })
5923
+ }, ee({
5924
+ before: ve(() => [t.sender === "bot" && t.routine ? (L(), O("div", {
5821
5925
  key: 0,
5822
5926
  "data-test": "messaging-routine-label",
5823
5927
  "data-routine-run-id": t.routine.run.routineRunId,
5824
5928
  class: F(["mb-2 flex items-start gap-2 text-[12px] leading-relaxed", Z.value ? "text-theme-400" : "text-white/50"])
5825
- }, [r[18] || (r[18] = k("i", {
5929
+ }, [r[19] || (r[19] = k("i", {
5826
5930
  class: "i-tabler-clock size-3.5 mt-0.5 shrink-0",
5827
5931
  "aria-hidden": "true"
5828
- }, null, -1)), k("span", null, "Ran " + K(t.routine.run.name || t.routine.run.sourceLabel || "a routine"), 1)], 10, Ja)) : E("", !0),
5829
- blockAttachmentsForMessage(t).length ? (R(), O("div", {
5932
+ }, null, -1)), k("span", null, "Ran " + G(t.routine.run.name || t.routine.run.sourceLabel || "a routine"), 1)], 10, co)) : E("", !0), blockAttachmentsForMessage(t).length ? (L(), O("div", {
5830
5933
  key: 1,
5831
5934
  class: F(["mb-1 space-y-1", t.sender === "user" ? "flex flex-col items-end" : ""])
5832
- }, [(R(!0), O(y, null, W(blockAttachmentsForMessage(t), ({ attachment: e, index: t }) => (R(), O(y, { key: attachmentKey(e, t) }, [e.type === "image" ? (R(), O("img", {
5935
+ }, [(L(!0), O(y, null, H(blockAttachmentsForMessage(t), ({ attachment: e, index: t }) => (L(), O(y, { key: attachmentKey(e, t) }, [e.type === "image" ? (L(), O("img", {
5833
5936
  key: 0,
5834
5937
  src: e.src,
5835
5938
  alt: e.filename,
5836
5939
  "data-test": "messaging-attachment",
5837
5940
  "data-attachment-placement": "block",
5838
5941
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5839
- }, null, 8, Ya)) : e.type === "audio" ? (R(), O("audio", {
5942
+ }, null, 8, lo)) : e.type === "audio" ? (L(), O("audio", {
5840
5943
  key: 1,
5841
5944
  src: e.src,
5842
5945
  controls: "",
5843
5946
  "data-test": "messaging-attachment",
5844
5947
  "data-attachment-placement": "block",
5845
5948
  class: "max-w-full"
5846
- }, null, 8, Xa)) : (R(), O("a", {
5949
+ }, null, 8, uo)) : (L(), O("a", {
5847
5950
  key: 2,
5848
5951
  href: e.src,
5849
5952
  target: "_blank",
@@ -5851,36 +5954,78 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5851
5954
  "data-test": "messaging-attachment",
5852
5955
  "data-attachment-placement": "block",
5853
5956
  class: F(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5854
- }, [r[19] || (r[19] = k("i", { class: "i-tabler-file size-3.5" }, null, -1)), j(" " + K(e.filename), 1)], 10, Za))], 64))), 128))], 2)) : E("", !0),
5855
- messageRenderParts(t).length ? (R(), O("div", {
5856
- key: 2,
5857
- "data-test": "messaging-message-content",
5858
- class: F(t.sender === "user" ? Z.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : Z.value ? "text-theme-900" : "text-white/95")
5859
- }, [(R(!0), O(y, null, W(messageRenderParts(t), (e) => (R(), O(y, { key: e.key }, [e.kind === "text" && e.text ? (R(), O("div", Qa, [M(Ni, {
5957
+ }, [r[20] || (r[20] = k("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + G(e.filename), 1)], 10, fo))], 64))), 128))], 2)) : E("", !0)]),
5958
+ after: ve(() => [canCopyMessage(t) ? (L(), O("div", {
5959
+ key: 0,
5960
+ "data-test": "messaging-message-actions",
5961
+ "data-actions-reveal": t.id === We.value ? "always" : "hover",
5962
+ class: F(["-ml-1 flex items-center gap-1 pt-1 transition-opacity", [Z.value ? "text-theme-300" : "text-white/35", t.id === We.value ? "" : "opacity-0 group-hover/msg:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100"]])
5963
+ }, [
5964
+ k("button", {
5965
+ type: "button",
5966
+ "data-test": "messaging-message-copy",
5967
+ "data-copied": He.value === t.id || void 0,
5968
+ title: He.value === t.id ? "Copied" : "Copy",
5969
+ "aria-label": He.value === t.id ? "Copied" : "Copy",
5970
+ class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5971
+ onClick: we((e) => copyMessage(t), ["stop"])
5972
+ }, [k("i", {
5973
+ class: F(["size-3.5", He.value === t.id ? "i-tabler-check" : "i-tabler-copy"]),
5974
+ "aria-hidden": "true"
5975
+ }, null, 2)], 10, vo),
5976
+ qe.value ? (L(), O("button", {
5977
+ key: 0,
5978
+ type: "button",
5979
+ "data-test": "messaging-message-share",
5980
+ title: "Share",
5981
+ "aria-label": "Share",
5982
+ class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5983
+ onClick: we((e) => Je.value = t, ["stop"])
5984
+ }, [...r[22] || (r[22] = [k("i", {
5985
+ class: "i-tabler-share-2 size-3.5",
5986
+ "aria-hidden": "true"
5987
+ }, null, -1)])], 10, yo)) : E("", !0),
5988
+ Ke.value ? (L(), O("button", {
5989
+ key: 1,
5990
+ type: "button",
5991
+ "data-test": "messaging-message-report",
5992
+ title: "Report",
5993
+ "aria-label": "Report",
5994
+ class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5995
+ onClick: we((n) => e.chatController?.reportMessage(t.id), ["stop"])
5996
+ }, [...r[23] || (r[23] = [k("i", {
5997
+ class: "i-tabler-flag size-3.5",
5998
+ "aria-hidden": "true"
5999
+ }, null, -1)])], 10, bo)) : E("", !0)
6000
+ ], 10, _o)) : E("", !0)]),
6001
+ _: 2
6002
+ }, [messageRenderParts(t).length ? {
6003
+ name: "default",
6004
+ fn: ve(() => [(L(!0), O(y, null, H(messageRenderParts(t), (e) => (L(), O(y, { key: e.key }, [e.kind === "text" && e.text ? (L(), O("div", po, [j(Ii, {
5860
6005
  text: e.text,
5861
- inverted: t.sender === "user" || !Z.value,
5862
- streaming: t.id === be.value,
5863
- onClick: r[4] || (r[4] = ge(() => {}, ["stop"])),
6006
+ inverted: !Z.value,
6007
+ streaming: t.id === me.value,
6008
+ onClick: r[4] || (r[4] = we(() => {}, ["stop"])),
5864
6009
  onAction: handleCardAction
5865
6010
  }, null, 8, [
5866
6011
  "text",
5867
6012
  "inverted",
5868
6013
  "streaming"
5869
- ])])) : e.kind === "attachment" && e.attachment.type === "image" ? (R(), O("img", {
6014
+ ])])) : e.kind === "attachment" && e.attachment.type === "image" ? (L(), O("img", {
5870
6015
  key: 1,
5871
6016
  src: e.attachment.src,
5872
6017
  alt: e.attachment.filename,
5873
6018
  "data-test": "messaging-attachment",
5874
6019
  "data-attachment-placement": e.placement,
5875
6020
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5876
- }, null, 8, $a)) : e.kind === "attachment" && e.attachment.type === "audio" ? (R(), O("audio", {
6021
+ }, null, 8, mo)) : e.kind === "attachment" && e.attachment.type === "audio" ? (L(), O("audio", {
5877
6022
  key: 2,
5878
6023
  src: e.attachment.src,
5879
6024
  controls: "",
5880
6025
  "data-test": "messaging-attachment",
5881
6026
  "data-attachment-placement": e.placement,
5882
6027
  class: "my-2 max-w-full"
5883
- }, null, 8, eo)) : e.kind === "attachment" ? (R(), O("a", {
6028
+ }, null, 8, ho)) : e.kind === "attachment" ? (L(), O("a", {
5884
6029
  key: 3,
5885
6030
  href: e.attachment.src,
5886
6031
  target: "_blank",
@@ -5888,103 +6033,74 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5888
6033
  "data-test": "messaging-attachment",
5889
6034
  "data-attachment-placement": e.placement,
5890
6035
  class: F(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5891
- }, [r[20] || (r[20] = k("i", { class: "i-tabler-file size-3.5" }, null, -1)), j(" " + K(e.attachment.filename), 1)], 10, to)) : E("", !0)], 64))), 128))], 2)) : E("", !0),
5892
- canCopyMessage(t) ? (R(), O("div", {
5893
- key: 3,
5894
- "data-test": "messaging-message-actions",
5895
- "data-actions-reveal": t.id === Ge.value ? "always" : "hover",
5896
- class: F(["-ml-1 flex items-center gap-1 pt-1 transition-opacity", [Z.value ? "text-theme-300" : "text-white/35", t.id === Ge.value ? "" : "opacity-0 group-hover/msg:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100"]])
5897
- }, [
5898
- k("button", {
5899
- type: "button",
5900
- "data-test": "messaging-message-copy",
5901
- "data-copied": Ue.value === t.id || void 0,
5902
- title: Ue.value === t.id ? "Copied" : "Copy",
5903
- "aria-label": Ue.value === t.id ? "Copied" : "Copy",
5904
- class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5905
- onClick: ge((e) => copyMessage(t), ["stop"])
5906
- }, [k("i", {
5907
- class: F(["size-3.5", Ue.value === t.id ? "i-tabler-check" : "i-tabler-copy"]),
5908
- "aria-hidden": "true"
5909
- }, null, 2)], 10, ro),
5910
- Je.value ? (R(), O("button", {
5911
- key: 0,
5912
- type: "button",
5913
- "data-test": "messaging-message-share",
5914
- title: "Share",
5915
- "aria-label": "Share",
5916
- class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5917
- onClick: ge((e) => Ye.value = t, ["stop"])
5918
- }, [...r[21] || (r[21] = [k("i", {
5919
- class: "i-tabler-share-2 size-3.5",
5920
- "aria-hidden": "true"
5921
- }, null, -1)])], 10, io)) : E("", !0),
5922
- qe.value ? (R(), O("button", {
5923
- key: 1,
5924
- type: "button",
5925
- "data-test": "messaging-message-report",
5926
- title: "Report",
5927
- "aria-label": "Report",
5928
- class: F(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5929
- onClick: ge((n) => e.chatController?.reportMessage(t.id), ["stop"])
5930
- }, [...r[22] || (r[22] = [k("i", {
5931
- class: "i-tabler-flag size-3.5",
5932
- "aria-hidden": "true"
5933
- }, null, -1)])], 10, ao)) : E("", !0)
5934
- ], 10, no)) : E("", !0)
5935
- ], 2)], 10, qa)),
5936
- t.id === ue.value ? (R(), O(y, { key: 6 }, [b.value.length ? (R(!0), O(y, { key: 0 }, W(b.value, (e) => (R(), O(y, { key: e.id }, [e.kind === "work" ? (R(), O("div", {
6036
+ }, [r[21] || (r[21] = k("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + G(e.attachment.filename), 1)], 10, go)) : E("", !0)], 64))), 128))]),
6037
+ key: "0"
6038
+ } : void 0]), 1032, [
6039
+ "own",
6040
+ "inverted",
6041
+ "data-test",
6042
+ "data-message-id",
6043
+ "data-message-sender",
6044
+ "data-conversation-id",
6045
+ "data-message-sequence",
6046
+ "data-system-kind",
6047
+ "data-streaming",
6048
+ "data-queued",
6049
+ "aria-label",
6050
+ "class"
6051
+ ])),
6052
+ t.id === fe.value ? (L(), O(y, { key: 6 }, [b.value.length ? (L(!0), O(y, { key: 0 }, H(b.value, (e) => (L(), O(y, { key: e.id }, [e.kind === "work" ? (L(), O("div", {
5937
6053
  key: 0,
5938
6054
  "data-test": "messaging-tool-activity",
5939
6055
  "data-journal-outcome": e.journal.outcome,
5940
6056
  class: "chat-live-enter mb-4 w-full"
5941
- }, [M(tt, {
6057
+ }, [j(at, {
5942
6058
  model: e.journal,
5943
6059
  "is-light": Z.value
5944
- }, null, 8, ["model", "is-light"])], 8, oo)) : e.kind === "text" && e.content ? (R(), O("div", {
6060
+ }, null, 8, ["model", "is-light"])], 8, xo)) : e.kind === "text" && e.content ? (L(), O("div", {
5945
6061
  key: 1,
5946
6062
  "data-test": "messaging-live-text-block",
5947
6063
  class: F(["mb-4", Z.value ? "text-theme-900" : "text-white/95"])
5948
- }, [M(Ni, {
6064
+ }, [j(Ii, {
5949
6065
  text: e.content,
5950
6066
  inverted: !Z.value,
5951
- streaming: e.id === N.value,
5952
- onClick: r[5] || (r[5] = ge(() => {}, ["stop"])),
6067
+ streaming: e.id === M.value,
6068
+ onClick: r[5] || (r[5] = we(() => {}, ["stop"])),
5953
6069
  onAction: handleCardAction
5954
6070
  }, null, 8, [
5955
6071
  "text",
5956
6072
  "inverted",
5957
6073
  "streaming"
5958
- ])], 2)) : (R(), O("div", {
6074
+ ])], 2)) : (L(), O("div", {
5959
6075
  key: 2,
5960
6076
  "data-test": "messaging-tool-activity-tail",
5961
6077
  "aria-label": "Assistant is still working",
5962
6078
  class: F(["chat-live-enter mb-4 grid h-[17px] w-5 place-items-center", Z.value ? "text-theme-500" : "text-white/70"])
5963
- }, [...r[23] || (r[23] = [k("span", {
6079
+ }, [...r[24] || (r[24] = [k("span", {
5964
6080
  class: "chat-dots chat-dots--mini",
5965
6081
  "aria-hidden": "true"
5966
6082
  }, [
5967
6083
  k("span"),
5968
6084
  k("span"),
5969
6085
  k("span")
5970
- ], -1)])], 2))], 64))), 128)) : ce.value ? (R(), O("div", {
6086
+ ], -1)])], 2))], 64))), 128)) : se.value ? (L(), O("div", {
5971
6087
  key: 1,
5972
6088
  "data-test": "messaging-tool-activity",
5973
- "data-journal-outcome": ce.value.outcome,
6089
+ "data-journal-outcome": se.value.outcome,
5974
6090
  class: "chat-live-enter mb-4 w-full"
5975
- }, [M(tt, {
5976
- model: ce.value,
6091
+ }, [j(at, {
6092
+ model: se.value,
5977
6093
  "is-light": Z.value
5978
- }, null, 8, ["model", "is-light"])], 8, so)) : E("", !0)], 64)) : E("", !0)
6094
+ }, null, 8, ["model", "is-light"])], 8, So)) : E("", !0)], 64)) : E("", !0)
5979
6095
  ], 64))), 128)),
5980
- Te.value ? (R(), O("div", {
6096
+ be.value ? (L(), O("div", {
5981
6097
  key: 1,
5982
- "data-test": te.value ? "messaging-working-state" : "messaging-thinking-indicator",
5983
- "data-working-description": te.value,
6098
+ "data-test": re.value ? "messaging-working-state" : "messaging-thinking-indicator",
6099
+ "data-working-description": re.value,
5984
6100
  role: "status",
5985
6101
  "aria-live": "polite",
5986
6102
  class: F(["chat-live-enter relative mb-4 flex h-[17px] items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", Z.value ? "text-theme-500" : "text-white/50"])
5987
- }, [r[24] || (r[24] = k("span", {
6103
+ }, [r[25] || (r[25] = k("span", {
5988
6104
  "data-test": "messaging-thinking-dots",
5989
6105
  class: "chat-dots shrink-0",
5990
6106
  "aria-hidden": "true"
@@ -5992,26 +6108,26 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
5992
6108
  k("span"),
5993
6109
  k("span"),
5994
6110
  k("span")
5995
- ], -1)), te.value ? (R(), O("span", lo, K(te.value), 1)) : (R(), O("span", uo, "Thinking"))], 10, co)) : E("", !0),
5996
- ve.value ? (R(), O("div", {
6111
+ ], -1)), re.value ? (L(), O("span", wo, G(re.value), 1)) : (L(), O("span", To, "Thinking"))], 10, Co)) : E("", !0),
6112
+ K.value ? (L(), O("div", {
5997
6113
  key: 2,
5998
6114
  "data-test": "messaging-transient-issue",
5999
- "data-issue-code": ve.value.code,
6115
+ "data-issue-code": K.value.code,
6000
6116
  role: "alert",
6001
6117
  class: F(["chat-live-enter mb-4 flex items-start gap-2 px-2 text-[13px] leading-snug", Z.value ? "text-theme-600" : "text-white/60"])
6002
6118
  }, [
6003
- r[26] || (r[26] = k("i", {
6119
+ r[27] || (r[27] = k("i", {
6004
6120
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
6005
6121
  "aria-hidden": "true"
6006
6122
  }, null, -1)),
6007
- k("span", po, [k("span", mo, [j(K(ve.value.message), 1), ve.value.help ? (R(), O(y, { key: 0 }, [j(":")], 64)) : E("", !0)]), ve.value.help ? (R(), O(y, { key: 0 }, [r[25] || (r[25] = j(K(" "), -1)), k("span", ho, K(ve.value.help), 1)], 64)) : E("", !0)]),
6008
- ve.value.actionUrl && ve.value.actionLabel ? (R(), O("a", {
6123
+ k("span", Do, [k("span", Oo, [te(G(K.value.message), 1), K.value.help ? (L(), O(y, { key: 0 }, [te(":")], 64)) : E("", !0)]), K.value.help ? (L(), O(y, { key: 0 }, [r[26] || (r[26] = te(G(" "), -1)), k("span", ko, G(K.value.help), 1)], 64)) : E("", !0)]),
6124
+ K.value.actionUrl && K.value.actionLabel ? (L(), O("a", {
6009
6125
  key: 0,
6010
- href: ve.value.actionUrl,
6126
+ href: K.value.actionUrl,
6011
6127
  class: "shrink-0 underline underline-offset-2",
6012
- onClick: r[6] || (r[6] = ge(() => {}, ["stop"]))
6013
- }, K(ve.value.actionLabel), 9, go)) : E("", !0)
6014
- ], 10, fo)) : E("", !0)
6128
+ onClick: r[6] || (r[6] = we(() => {}, ["stop"]))
6129
+ }, G(K.value.actionLabel), 9, Ao)) : E("", !0)
6130
+ ], 10, Eo)) : E("", !0)
6015
6131
  ], 2)]),
6016
6132
  _: 3
6017
6133
  }, 8, [
@@ -6021,40 +6137,40 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6021
6137
  ]),
6022
6138
  k("div", {
6023
6139
  "data-test": "messaging-composer-footer",
6024
- inert: at.value,
6025
- "aria-hidden": at.value ? "true" : void 0,
6140
+ inert: it.value,
6141
+ "aria-hidden": it.value ? "true" : void 0,
6026
6142
  class: F(["left-0 right-0 z-30 px-3 @lg/chat:px-8 pb-[max(env(safe-area-inset-bottom),1rem)]", [
6027
- I.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
6028
- e.centered && I.value.length > 0 ? "pt-0 sm:pb-9" : "pt-3",
6143
+ N.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
6144
+ e.centered && N.value.length > 0 ? "pt-0 sm:pb-9" : "pt-3",
6029
6145
  Z.value ? e.centered ? "bg-transparent" : "bg-theme-0" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
6030
6146
  ]])
6031
- }, [se(t.$slots, "composer", {}, () => [Oe.value ? (R(), O("div", {
6147
+ }, [de(t.$slots, "composer", {}, () => [Oe.value ? (L(), O("div", {
6032
6148
  key: 0,
6033
6149
  "data-test": "messaging-seat",
6034
- "data-seat-state": De.value,
6150
+ "data-seat-state": J.value,
6035
6151
  role: "status",
6036
6152
  "aria-live": "polite",
6037
6153
  class: F(["py-3 text-center text-[14px]", Z.value ? "text-theme-500" : "text-white/70"])
6038
- }, K(Oe.value), 11, vo)) : (R(), O(y, { key: 1 }, [
6039
- je.value.length > 0 ? (R(), O("div", {
6154
+ }, G(Oe.value), 11, Mo)) : (L(), O(y, { key: 1 }, [
6155
+ je.value.length > 0 ? (L(), O("div", {
6040
6156
  key: 0,
6041
6157
  class: F(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto" : ""])
6042
- }, [(R(!0), O(y, null, W(je.value, (e, t) => (R(), O("div", {
6158
+ }, [(L(!0), O(y, null, H(je.value, (e, t) => (L(), O("div", {
6043
6159
  key: t,
6044
6160
  class: "relative shrink-0 group"
6045
- }, [e.type === "image" ? (R(), O("img", {
6161
+ }, [e.type === "image" ? (L(), O("img", {
6046
6162
  key: 0,
6047
6163
  src: e.src,
6048
6164
  alt: e.filename,
6049
6165
  class: F(["size-14 rounded-xl object-cover border", Z.value ? "border-black/10" : "border-white/20"])
6050
- }, null, 10, yo)) : (R(), O("div", {
6166
+ }, null, 10, No)) : (L(), O("div", {
6051
6167
  key: 1,
6052
6168
  class: F(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", Z.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
6053
- }, [r[27] || (r[27] = k("i", { class: "i-tabler-file size-4" }, null, -1)), k("span", bo, K(e.filename), 1)], 2)), k("button", {
6169
+ }, [r[28] || (r[28] = k("i", { class: "i-tabler-file size-4" }, null, -1)), k("span", Po, G(e.filename), 1)], 2)), k("button", {
6054
6170
  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 duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] cursor-pointer",
6055
6171
  onClick: (e) => removeAttachment(t)
6056
- }, [...r[28] || (r[28] = [k("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, xo)]))), 128)), Me.value ? (R(), O("div", So, [M(we, { class: "size-5" })])) : E("", !0)], 2)) : E("", !0),
6057
- Ie.value ? (R(), O("input", {
6172
+ }, [...r[29] || (r[29] = [k("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Fo)]))), 128)), Me.value ? (L(), O("div", Io, [j(De, { class: "size-5" })])) : E("", !0)], 2)) : E("", !0),
6173
+ Ie.value ? (L(), O("input", {
6058
6174
  key: 1,
6059
6175
  ref_key: "fileInput",
6060
6176
  ref: c,
@@ -6063,42 +6179,23 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6063
6179
  class: "hidden",
6064
6180
  onChange: handleFileSelect
6065
6181
  }, null, 544)) : E("", !0),
6066
- k("div", {
6067
- "data-test": "messaging-composer",
6068
- "data-composer-action": Re.value,
6069
- class: F(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-4 transition-colors duration-200", [e.centered ? "mx-auto max-w-[640px] @5xl/chat:max-w-[740px] @5xl/chat:px-5 @5xl/chat:pt-3.5 @5xl/chat:pb-3" : "", Z.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_rgba(15,23,42,0.07)] ring-1 ring-theme-950/20 hover:ring-theme-950/30 focus-within:ring-theme-950/30" : "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"]]),
6070
- onClick: focusComposer
6071
- }, [$e.value ? (R(), O("div", {
6072
- key: 1,
6073
- "data-test": "messaging-recording-state",
6074
- class: F(["flex min-w-0 items-center gap-2 py-1", Z.value ? "text-theme-700" : "text-white/80"])
6075
- }, [
6076
- r[29] || (r[29] = k("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
6077
- k("span", To, K(nt.value), 1),
6078
- k("span", { class: F(["min-w-0 truncate text-sm", Z.value ? "text-theme-400" : "text-white/45"]) }, K(rt.value), 3)
6079
- ], 2)) : me((R(), O("textarea", {
6080
- key: 0,
6081
- ref_key: "textarea",
6182
+ j(Gi, {
6183
+ ref_key: "composer",
6082
6184
  ref: s,
6083
- "onUpdate:modelValue": r[7] || (r[7] = (e) => Ae.value = e),
6084
- "data-test": "messaging-input",
6085
- rows: "1",
6086
- enterkeyhint: "send",
6087
- inputmode: "text",
6088
- autocomplete: "off",
6089
- autocapitalize: "sentences",
6090
- autocorrect: "on",
6091
- spellcheck: "true",
6092
- placeholder: Y.value,
6185
+ modelValue: Ae.value,
6186
+ "onUpdate:modelValue": r[12] || (r[12] = (e) => Ae.value = e),
6187
+ placeholder: q.value,
6093
6188
  disabled: Ee.value,
6094
- style: {
6095
- fontSize: "16px",
6096
- resize: "none"
6097
- },
6098
- class: F(["block w-full bg-transparent leading-[1.5] focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", Z.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
6099
- onKeydown: handleKeydown
6100
- }, null, 42, wo)), [[fe, Ae.value]]), k("div", Eo, [
6101
- k("button", {
6189
+ inverted: !Z.value,
6190
+ action: Re.value,
6191
+ "send-enabled": ze.value,
6192
+ "send-label": Ze.value,
6193
+ "show-send": !Y.value && !$e.value,
6194
+ class: F(e.centered ? "mx-auto max-w-[640px] @5xl/chat:max-w-[740px] @5xl/chat:px-5 @5xl/chat:pt-3.5 @5xl/chat:pb-3" : ""),
6195
+ onSubmit: r[13] || (r[13] = (e) => sendMessage()),
6196
+ onAction: r[14] || (r[14] = (e) => handleComposerAction())
6197
+ }, ee({
6198
+ leading: ve(() => [k("button", {
6102
6199
  class: F(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
6103
6200
  Ie.value ? "cursor-pointer" : "cursor-default",
6104
6201
  Z.value ? "text-theme-500" : "text-white/50",
@@ -6107,42 +6204,41 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6107
6204
  disabled: Ee.value || Me.value || Fe.value || !Ie.value,
6108
6205
  "aria-label": Ie.value ? "Attach file" : "File attachments unavailable",
6109
6206
  title: Ie.value ? "Attach file" : "File attachments unavailable",
6110
- onClick: r[8] || (r[8] = (e) => Ie.value && triggerFileInput())
6111
- }, [Me.value ? (R(), O("i", Oo)) : (R(), O("i", ko)), k("span", Ao, K(Ie.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Do),
6112
- r[33] || (r[33] = k("div", { class: "flex-1" }, null, -1)),
6113
- k("div", jo, [
6114
- $e.value && !et.value && !at.value ? (R(), O("button", {
6207
+ onClick: r[7] || (r[7] = (e) => Ie.value && triggerFileInput())
6208
+ }, [Me.value ? (L(), O("i", zo)) : (L(), O("i", Bo)), k("span", Vo, G(Ie.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Ro)]),
6209
+ actions: ve(() => [
6210
+ $e.value && !et.value && !it.value ? (L(), O("button", {
6115
6211
  key: 0,
6116
6212
  "data-test": "messaging-record-discard-btn",
6117
6213
  class: F(["flex size-8 cursor-pointer items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", Z.value ? "text-theme-400" : "text-white/40"]),
6118
6214
  "aria-label": "Discard recording",
6119
6215
  title: "Discard recording",
6120
- onClick: r[9] || (r[9] = (e) => finishRecording({ cancelled: !0 }))
6121
- }, [...r[30] || (r[30] = [k("i", {
6216
+ onClick: r[8] || (r[8] = (e) => finishRecording({ cancelled: !0 }))
6217
+ }, [...r[31] || (r[31] = [k("i", {
6122
6218
  class: "i-tabler-x size-[18px]",
6123
6219
  "aria-hidden": "true"
6124
6220
  }, null, -1)])], 2)) : E("", !0),
6125
- (Qe.value || $e.value) && !et.value && !at.value ? (R(), O("button", {
6221
+ (Qe.value || $e.value) && !et.value && !it.value ? (L(), O("button", {
6126
6222
  key: 1,
6127
6223
  "data-test": "messaging-record-audio-btn",
6128
6224
  class: F(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] hover:opacity-70 pointer-coarse:size-11", $e.value ? Z.value ? "text-theme-900 scale-110" : "text-white scale-110" : Z.value ? "text-theme-500" : "text-white/60"]),
6129
- "aria-label": it.value,
6130
- title: it.value,
6131
- onPointerdown: ge(onRecordPointerDown, ["prevent"]),
6132
- onPointerup: ge(onRecordPointerUp, ["prevent"]),
6133
- onPointercancel: ge(onRecordPointerCancel, ["prevent"]),
6225
+ "aria-label": rt.value,
6226
+ title: rt.value,
6227
+ onPointerdown: we(onRecordPointerDown, ["prevent"]),
6228
+ onPointerup: we(onRecordPointerUp, ["prevent"]),
6229
+ onPointercancel: we(onRecordPointerCancel, ["prevent"]),
6134
6230
  onClick: onRecordClick,
6135
- onKeydown: r[10] || (r[10] = he(ge((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
6136
- }, [k("i", { class: F([$e.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), k("span", No, K(it.value), 1)], 42, Mo)) : E("", !0),
6137
- dt.value ? (R(), O("button", {
6231
+ onKeydown: r[9] || (r[9] = Ce(we((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
6232
+ }, [k("i", { class: F([$e.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), k("span", Uo, G(rt.value), 1)], 42, Ho)) : E("", !0),
6233
+ Y.value ? (L(), O("button", {
6138
6234
  key: 2,
6139
6235
  "data-test": "messaging-voice-start-btn",
6140
- class: F(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [Z.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", ft.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
6141
- disabled: ft.value,
6142
- "aria-label": pt.value,
6143
- title: pt.value,
6144
- onClick: r[11] || (r[11] = (e) => startVoiceConversation())
6145
- }, [k("span", Fo, [(R(), O(y, null, W([
6236
+ class: F(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [Z.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", dt.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
6237
+ disabled: dt.value,
6238
+ "aria-label": ft.value,
6239
+ title: ft.value,
6240
+ onClick: r[10] || (r[10] = (e) => startVoiceConversation())
6241
+ }, [k("span", Go, [(L(), O(y, null, H([
6146
6242
  7,
6147
6243
  13,
6148
6244
  16,
@@ -6151,36 +6247,51 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6151
6247
  ], (e) => k("span", {
6152
6248
  key: e,
6153
6249
  class: "w-[2px] rounded-full bg-current",
6154
- style: L({ height: `${e}px` })
6155
- }, null, 4)), 64))]), r[31] || (r[31] = k("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Po)) : $e.value ? E("", !0) : (R(), O(y, { key: 3 }, [Be.value ? (R(), O("button", {
6156
- key: 0,
6250
+ style: I({ height: `${e}px` })
6251
+ }, null, 4)), 64))]), r[32] || (r[32] = k("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Wo)) : E("", !0),
6252
+ Be.value && !Y.value && !$e.value ? (L(), O("button", {
6253
+ key: 3,
6157
6254
  "data-test": "messaging-secondary-stop-btn",
6158
6255
  class: F(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Z.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
6159
6256
  "aria-label": "Stop work",
6160
6257
  title: "Stop work",
6161
- onClick: r[12] || (r[12] = (t) => e.chatController?.stopChatTurn())
6162
- }, [...r[32] || (r[32] = [k("i", {
6258
+ onClick: r[11] || (r[11] = (t) => e.chatController?.stopChatTurn())
6259
+ }, [...r[33] || (r[33] = [k("i", {
6163
6260
  class: "i-tabler-player-stop-filled size-3.5",
6164
6261
  "aria-hidden": "true"
6165
- }, null, -1), k("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : E("", !0), k("button", {
6166
- "data-test": "messaging-send-btn",
6167
- "data-composer-action": Re.value,
6168
- class: F(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", ze.value ? Z.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" : Z.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
6169
- disabled: !ze.value,
6170
- "aria-label": Ze.value,
6171
- title: Ze.value,
6172
- onClick: r[13] || (r[13] = (e) => handleComposerAction())
6173
- }, [Re.value === "stop" ? (R(), O("i", Lo)) : (R(), O("i", Ro)), k("span", zo, K(Ze.value), 1)], 10, Io)], 64))
6174
- ])
6175
- ])], 10, Co),
6176
- e.centered && I.value.length > 0 ? (R(), O("p", Bo, K(e.bot.displayName.value) + " is AI and can make mistakes. ", 1)) : E("", !0)
6177
- ], 64))], !0)], 10, _o),
6178
- Je.value ? (R(), T(na, {
6262
+ }, null, -1), k("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : E("", !0)
6263
+ ]),
6264
+ _: 2
6265
+ }, [$e.value ? {
6266
+ name: "input",
6267
+ fn: ve(() => [k("div", {
6268
+ "data-test": "messaging-recording-state",
6269
+ class: F(["flex min-w-0 items-center gap-2 py-1", Z.value ? "text-theme-700" : "text-white/80"])
6270
+ }, [
6271
+ r[30] || (r[30] = k("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
6272
+ k("span", Lo, G(tt.value), 1),
6273
+ k("span", { class: F(["min-w-0 truncate text-sm", Z.value ? "text-theme-400" : "text-white/45"]) }, G(nt.value), 3)
6274
+ ], 2)]),
6275
+ key: "0"
6276
+ } : void 0]), 1032, [
6277
+ "modelValue",
6278
+ "placeholder",
6279
+ "disabled",
6280
+ "inverted",
6281
+ "action",
6282
+ "send-enabled",
6283
+ "send-label",
6284
+ "show-send",
6285
+ "class"
6286
+ ]),
6287
+ e.centered && N.value.length > 0 ? (L(), O("p", Ko, G(e.bot.displayName.value) + " is AI and can make mistakes. ", 1)) : E("", !0)
6288
+ ], 64))], !0)], 10, jo),
6289
+ qe.value ? (L(), T(va, {
6179
6290
  key: 4,
6180
- message: Ye.value,
6181
- prompt: Xe.value,
6182
- share: Je.value,
6183
- onClose: r[14] || (r[14] = (e) => Ye.value = void 0)
6291
+ message: Je.value,
6292
+ prompt: Ye.value,
6293
+ share: qe.value,
6294
+ onClose: r[15] || (r[15] = (e) => Je.value = void 0)
6184
6295
  }, null, 8, [
6185
6296
  "message",
6186
6297
  "prompt",
@@ -6188,16 +6299,16 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6188
6299
  ])) : E("", !0)
6189
6300
  ], 2));
6190
6301
  }
6191
- }), [["__scopeId", "data-v-4c8d65fc"]]), Ho = { class: "bot-wrap" }, Uo = {
6302
+ }), [["__scopeId", "data-v-f60c6cac"]]), Jo = { class: "bot-wrap" }, Yo = {
6192
6303
  key: 0,
6193
6304
  class: "flex items-center justify-center h-full"
6194
- }, Wo = {
6305
+ }, Xo = {
6195
6306
  key: 2,
6196
6307
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
6197
6308
  role: "status",
6198
6309
  "aria-live": "polite",
6199
6310
  "data-test": "bot-unavailable"
6200
- }, Go = /* @__PURE__ */ N({
6311
+ }, Zo = /* @__PURE__ */ M({
6201
6312
  __name: "BotWrap",
6202
6313
  props: {
6203
6314
  sdk: {},
@@ -6217,7 +6328,7 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6217
6328
  let t = c("BotWrap"), r = e, o = r.sdk || n.getInstance({
6218
6329
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
6219
6330
  ...r.apiBase && { apiBase: r.apiBase }
6220
- }), s = G(!r.bot), u = G(r.bot), d = G();
6331
+ }), s = W(!r.bot), u = W(r.bot), d = W();
6221
6332
  async function loadBot() {
6222
6333
  if (r.bot) t.debug("Bot provided via props, skipping fetch", {
6223
6334
  botId: r.bot.botId.value,
@@ -6287,15 +6398,15 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6287
6398
  });
6288
6399
  }
6289
6400
  }
6290
- return ne(loadBot), (t, n) => (R(), O("div", Ho, [s.value ? (R(), O("div", Uo, [k("div", { class: F(["size-6 animate-spin rounded-full border-b-2", r.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : u.value ? se(t.$slots, "default", {
6291
- sdk: ue(o),
6401
+ return ce(loadBot), (t, n) => (L(), O("div", Jo, [s.value ? (L(), O("div", Yo, [k("div", { class: F(["size-6 animate-spin rounded-full border-b-2", r.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : u.value ? de(t.$slots, "default", {
6402
+ sdk: pe(o),
6292
6403
  bot: u.value,
6293
6404
  context: e.clientContext ?? e.context,
6294
6405
  firstMessage: e.firstMessage,
6295
6406
  buttonText: e.buttonText,
6296
6407
  buttonIcon: e.buttonIcon,
6297
6408
  loading: s.value
6298
- }, void 0, void 0, 1) : d.value ? (R(), O("div", Wo, [n[0] || (n[0] = k("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), k("button", {
6409
+ }, void 0, void 0, 1) : d.value ? (L(), O("div", Xo, [n[0] || (n[0] = k("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), k("button", {
6299
6410
  type: "button",
6300
6411
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
6301
6412
  "data-test": "bot-unavailable-retry",
@@ -6303,6 +6414,6 @@ var ya = ["data-voice-state", "data-voice-activity"], ba = ["src"], xa = {
6303
6414
  }, " Try again ")])) : E("", !0)]));
6304
6415
  }
6305
6416
  });
6306
- export { Ni as a, Me as c, handleImageError as d, parseButtonTemplate as f, ve as h, Ui as i, Ae as l, we as m, Vo as n, Ve as o, BotChatController as p, Aa as r, Fe as s, Go as t, getBotAvatarUrl as u };
6417
+ export { BotChatController as _, Qi as a, Gi as c, ze as d, Le as f, parseButtonTemplate as g, handleImageError as h, aa as i, Ii as l, getBotAvatarUrl as m, qo as n, Xi as o, Fe as p, Ka as r, qi as s, Zo as t, Ge as u, De as v, Te as y };
6307
6418
 
6308
6419
  //# sourceMappingURL=BotWrap.js.map