@pagelines/sdk 1.0.805 → 1.0.807

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { s as e, t } from "./sdkClient.js";
3
- import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatCardFencePayload as c, parseChatVisualFencePayload as u } from "@pagelines/core";
4
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as b, createVNode as x, defineComponent as S, nextTick as C, normalizeClass as T, normalizeStyle as k, onBeforeUnmount as A, onMounted as te, onUnmounted as ne, openBlock as j, ref as M, renderList as P, renderSlot as re, resolveDynamicComponent as F, shallowRef as ie, toDisplayString as I, unref as ae, vModelText as oe, watch as se, withCtx as R, withDirectives as ce, withKeys as ue, withModifiers as de } from "vue";
3
+ import { Agent as n, CHAT_ISSUE_COPY as r, CUSTOMER_AGENT_STATE_LABEL as i, SettingsObject as a, createLogger as o, customerAgentState as s, getDefaultAvatarUrl as c, isAssistantSilenceControl as u, parseChatCardFencePayload as f, parseChatVisualFencePayload as p } from "@pagelines/core";
4
+ import { Fragment as m, computed as h, createBlock as _, createCommentVNode as v, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as T, nextTick as te, normalizeClass as k, normalizeStyle as A, onBeforeUnmount as ne, onMounted as re, onUnmounted as j, openBlock as M, ref as P, renderList as F, renderSlot as I, resolveDynamicComponent as ie, shallowRef as ae, toDisplayString as R, unref as oe, vModelText as B, watch as se, withCtx as ce, withDirectives as ue, withKeys as de, withModifiers as H } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var B = { class: "spinner max-w-sm" }, H = {
6
+ var U = { class: "spinner max-w-sm" }, pe = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
- }, pe = /* @__PURE__ */ S({
9
+ }, he = /* @__PURE__ */ T({
10
10
  __name: "FSpinner",
11
11
  props: {
12
12
  width: {
@@ -19,8 +19,8 @@ var B = { class: "spinner max-w-sm" }, H = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (j(), _("div", B, [(j(), _("svg", H, [v("circle", {
23
- class: T([e.colorMode, "ring-path"]),
22
+ return (t, n) => (M(), b("div", U, [(M(), b("svg", pe, [x("circle", {
23
+ class: k([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
26
26
  r: "20",
@@ -30,7 +30,7 @@ var B = { class: "spinner max-w-sm" }, H = {
30
30
  "stroke-miterlimit": "30"
31
31
  }, null, 2)]))]));
32
32
  }
33
- }), he = [
33
+ }), _e = [
34
34
  {
35
35
  mode: "self",
36
36
  label: "Overview",
@@ -68,12 +68,12 @@ function recorderMimeType() {
68
68
  "audio/webm"
69
69
  ].find((e) => MediaRecorder.isTypeSupported?.(e)) || "";
70
70
  }
71
- var VoiceRecorderController = class extends i {
71
+ var VoiceRecorderController = class extends a {
72
72
  constructor(t) {
73
- super("VoiceRecorderController", t), e(this, "state", M({
73
+ super("VoiceRecorderController", t), e(this, "state", P({
74
74
  phase: "idle",
75
75
  elapsedMs: 0
76
- })), e(this, "isActive", p(() => this.state.value.phase !== "idle")), e(this, "isBusy", p(() => this.state.value.phase !== "idle")), e(this, "elapsedLabel", p(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), e(this, "statusText", p(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), e(this, "recorder", void 0), e(this, "stream", void 0), e(this, "chunks", []), e(this, "timer", void 0), e(this, "startedAt", 0), e(this, "cancelOnStop", !1), e(this, "stopAfterStart", !1), e(this, "startToken", 0);
76
+ })), e(this, "isActive", h(() => this.state.value.phase !== "idle")), e(this, "isBusy", h(() => this.state.value.phase !== "idle")), e(this, "elapsedLabel", h(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), e(this, "statusText", h(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), e(this, "recorder", void 0), e(this, "stream", void 0), e(this, "chunks", []), e(this, "timer", void 0), e(this, "startedAt", 0), e(this, "cancelOnStop", !1), e(this, "stopAfterStart", !1), e(this, "startToken", 0);
77
77
  }
78
78
  get canUseBrowserRecording() {
79
79
  return !!this.settings.getUserMedia || typeof navigator < "u" && !!navigator.mediaDevices?.getUserMedia && typeof MediaRecorder < "u";
@@ -185,7 +185,7 @@ var VoiceRecorderController = class extends i {
185
185
  function durableJournalOutcome(e) {
186
186
  return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
187
187
  }
188
- var _e = {
188
+ var W = {
189
189
  waiting: "Waiting for results",
190
190
  finishing: "Finishing up",
191
191
  completed: "Work complete",
@@ -193,7 +193,7 @@ var _e = {
193
193
  stopped: "Stopped",
194
194
  notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
195
195
  leaveHint: "Taking longer than usual. You can leave this chat while I work."
196
- }, ve = 15e3, U = 6e4, ye = 3;
196
+ }, ve = 15e3, G = 6e4, ye = 3;
197
197
  function toMs(e) {
198
198
  if (!e) return;
199
199
  let t = Date.parse(e);
@@ -247,7 +247,7 @@ function buildWorkJournalModel(e) {
247
247
  terminal: {
248
248
  id: "work-complete",
249
249
  tone: "completed",
250
- label: _e.completed
250
+ label: W.completed
251
251
  }
252
252
  };
253
253
  if (n === "failed") {
@@ -261,7 +261,7 @@ function buildWorkJournalModel(e) {
261
261
  terminal: {
262
262
  id: "work-failed",
263
263
  tone: "failed",
264
- label: _e.failed,
264
+ label: W.failed,
265
265
  ...o && e?.note ? { note: e.note } : {}
266
266
  }
267
267
  };
@@ -275,18 +275,18 @@ function buildWorkJournalModel(e) {
275
275
  terminal: {
276
276
  id: "work-stopped",
277
277
  tone: "stopped",
278
- label: _e.stopped
278
+ label: W.stopped
279
279
  }
280
280
  };
281
281
  }
282
282
  let { visibleRows: s, hiddenRows: c } = splitRows(milestoneRows(t, /* @__PURE__ */ new Set())), u = t.filter((e) => e.status === "started").sort(byEvent).pop(), f = t.reduce((e, t) => Math.max(e, eventMs(t)), a ?? -Infinity), p = Number.isFinite(f) ? f : r, m = t.reduce((e, t) => {
283
283
  let n = toMs(t.startedAt) ?? toMs(t.endedAt);
284
284
  return n === void 0 ? e : Math.min(e, n);
285
- }, Infinity), h = p + ve, _ = (Number.isFinite(m) ? m : p) + U, v = r >= h, b = u || v ? {
285
+ }, Infinity), h = p + ve, _ = (Number.isFinite(m) ? m : p) + G, v = r >= h, b = u || v ? {
286
286
  id: u?.activityId ?? "work-active",
287
287
  tone: "active",
288
- label: v ? u ? _e.waiting : _e.finishing : u.label
289
- } : void 0, x = v && r >= _ ? i ? _e.notifyHint : _e.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
288
+ label: v ? u ? W.waiting : W.finishing : u.label
289
+ } : void 0, x = v && r >= _ ? i ? W.notifyHint : W.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
290
290
  return {
291
291
  outcome: n,
292
292
  visibleRows: s,
@@ -352,17 +352,17 @@ function buildLiveTurnBlocks(e) {
352
352
  }
353
353
  //#endregion
354
354
  //#region agent/AgentController.ts
355
- var W = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), be = /* @__PURE__ */ new Set([
356
- ...W,
355
+ var K = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), be = /* @__PURE__ */ new Set([
356
+ ...K,
357
357
  "EMPTY_STREAM",
358
358
  "RATE_LIMIT"
359
- ]), G = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Se = {
359
+ ]), Se = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), q = {
360
360
  CREDIT_LIMIT: "billing_budget_reached",
361
361
  OVERAGE_CAP: "billing_runaway_cap"
362
362
  };
363
363
  function presentChatStreamError(e) {
364
364
  if (!(e.bucket !== void 0 || be.has(e.code))) return { surface: "hard" };
365
- let t = e.bucket ?? (W.has(e.code) ? "account" : "error"), n = {
365
+ let t = e.bucket ?? (K.has(e.code) ? "account" : "error"), n = {
366
366
  ...e.actionLabel ? { actionLabel: e.actionLabel } : {},
367
367
  ...e.actionUrl ? { actionUrl: e.actionUrl } : {},
368
368
  ...e.help ? { help: e.help } : {}
@@ -375,7 +375,7 @@ function presentChatStreamError(e) {
375
375
  ...n
376
376
  },
377
377
  sendBlockedReason: "account"
378
- } : G.has(e.code) ? {
378
+ } : Se.has(e.code) ? {
379
379
  surface: "transcript",
380
380
  issue: {
381
381
  code: e.code,
@@ -393,10 +393,10 @@ function presentChatStreamError(e) {
393
393
  };
394
394
  }
395
395
  function transcriptMessageForChatStreamError(e) {
396
- let t = Se[e.code];
396
+ let t = q[e.code];
397
397
  return t ? r[t].oneLine : e.error;
398
398
  }
399
- var AgentChatController = class extends i {
399
+ var AgentChatController = class extends a {
400
400
  isQueuedMessage(e) {
401
401
  return this.queuedMessageIdSet.value.has(e);
402
402
  }
@@ -424,16 +424,16 @@ var AgentChatController = class extends i {
424
424
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
425
425
  hash: "",
426
426
  time: 0
427
- }), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "pendingStartupSend", void 0), e(this, "queuedMessageIdSet", M(/* @__PURE__ */ new Set())), e(this, "queuedMessageIds", p(() => this.queuedMessageIdSet.value)), e(this, "boundaryTimer", void 0), e(this, "nowMs", ie(Date.now())), e(this, "toolActivityTiming", ie({})), e(this, "lastVisibleProgressAtMs", ie()), e(this, "liveSegments", ie([])), e(this, "liveStreamMessageId", ie(void 0)), e(this, "conversationId", void 0), e(this, "textState", M({
427
+ }), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "pendingStartupSend", void 0), e(this, "queuedMessageIdSet", P(/* @__PURE__ */ new Set())), e(this, "queuedMessageIds", h(() => this.queuedMessageIdSet.value)), e(this, "boundaryTimer", void 0), e(this, "nowMs", ae(Date.now())), e(this, "toolActivityTiming", ae({})), e(this, "lastVisibleProgressAtMs", ae()), e(this, "liveSegments", ae([])), e(this, "liveStreamMessageId", ae(void 0)), e(this, "conversationId", void 0), e(this, "textState", P({
428
428
  isActive: !1,
429
429
  isConnected: !1,
430
430
  isThinking: !1,
431
431
  connectionStatus: "disconnected"
432
- })), e(this, "agentMode", M("self")), e(this, "sharedMessages", M([])), e(this, "composerState", M({
432
+ })), e(this, "agentMode", P("self")), e(this, "sharedMessages", P([])), e(this, "composerState", P({
433
433
  text: "",
434
434
  pendingAttachments: [],
435
435
  isUploading: !1
436
- })), e(this, "workJournal", p(() => {
436
+ })), e(this, "workJournal", h(() => {
437
437
  let e = this.textState.value.isThinking ? "running" : this.textState.value.turnOutcome;
438
438
  if (!e) return;
439
439
  let t = this.textState.value.toolActivities;
@@ -444,7 +444,7 @@ var AgentChatController = class extends i {
444
444
  canNotifyOnCompletion: !1,
445
445
  lastVisibleProgressAtMs: this.lastVisibleProgressAtMs.value
446
446
  });
447
- })), e(this, "liveTurnBlocks", p(() => {
447
+ })), e(this, "liveTurnBlocks", h(() => {
448
448
  if (!this.textState.value.isThinking) return [];
449
449
  let e = this.textState.value.toolActivities ?? [], t = this.liveSegments.value;
450
450
  return !t.length && !e.length ? [] : buildLiveTurnBlocks({
@@ -454,14 +454,14 @@ var AgentChatController = class extends i {
454
454
  canNotifyOnCompletion: !1,
455
455
  lastVisibleProgressAtMs: this.lastVisibleProgressAtMs.value
456
456
  });
457
- })), e(this, "canUseComposer", p(() => this.textState.value.sendBlockedReason !== "agent_deleted" && !this.composerState.value.isUploading)), e(this, "canAttachFile", p(() => !!this.settings.uploadFileFn)), e(this, "canRecordAudio", p(() => this.canAttachFile.value && this.canUseComposer.value && !this.composerState.value.text.trim() && this.composerState.value.pendingAttachments.length === 0)), e(this, "voiceRecorder", new VoiceRecorderController({
457
+ })), e(this, "canUseComposer", h(() => this.textState.value.sendBlockedReason !== "agent_deleted" && !this.composerState.value.isUploading)), e(this, "canAttachFile", h(() => !!this.settings.uploadFileFn)), e(this, "canRecordAudio", h(() => this.canAttachFile.value && this.canUseComposer.value && !this.composerState.value.text.trim() && this.composerState.value.pendingAttachments.length === 0)), e(this, "voiceRecorder", new VoiceRecorderController({
458
458
  getCanRecord: () => this.canRecordAudio.value,
459
459
  getUploadFn: () => {
460
460
  let e = this.settings.uploadFileFn;
461
461
  return e ? (t) => e({ file: t }) : void 0;
462
462
  },
463
463
  getChatController: () => this
464
- })), e(this, "canSend", p(() => (this.composerState.value.text.trim().length > 0 || this.composerState.value.pendingAttachments.length > 0) && this.canUseComposer.value && !this.voiceRecorder.isBusy.value)), e(this, "canStop", p(() => this.textState.value.isThinking && !this.composerState.value.isUploading && !this.voiceRecorder.isBusy.value)), e(this, "composerAction", p(() => this.canSend.value ? "send" : this.canStop.value ? "stop" : "idle")), e(this, "composerShowsSecondaryStop", p(() => this.canStop.value && this.composerAction.value === "send")), e(this, "canStartVoice", p(() => {
464
+ })), e(this, "canSend", h(() => (this.composerState.value.text.trim().length > 0 || this.composerState.value.pendingAttachments.length > 0) && this.canUseComposer.value && !this.voiceRecorder.isBusy.value)), e(this, "canStop", h(() => this.textState.value.isThinking && !this.composerState.value.isUploading && !this.voiceRecorder.isBusy.value)), e(this, "composerAction", h(() => this.canSend.value ? "send" : this.canStop.value ? "stop" : "idle")), e(this, "composerShowsSecondaryStop", h(() => this.canStop.value && this.composerAction.value === "send")), e(this, "canStartVoice", h(() => {
465
465
  let e = this.settings.sdk;
466
466
  return this.textState.value.sendBlockedReason !== "agent_deleted" && !!e?.activeUser.value && !!this._agent.agentId.value && !!this._agent.orgId.value && !!this.settings.createVoiceClientFn && voiceBrowserSupported();
467
467
  })), e(this, "_agent", void 0), e(this, "localMessageSeq", 0), this._agent = t.agent instanceof n ? t.agent : new n({ config: t.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher(), this.setupBoundaryWatcher();
@@ -790,16 +790,16 @@ Current User:
790
790
  }
791
791
  let i = this.textState.value.isThinking, a = this.sharedMessages.value.length;
792
792
  this.addMessage(e, "user", t);
793
- let o = this.sharedMessages.value.length > a ? this.sharedMessages.value[this.sharedMessages.value.length - 1]?.id : void 0, c = this.turnEpoch, u = ++this.nextStreamToken;
794
- i && o ? this.queuedMessageIdSet.value = new Set(this.queuedMessageIdSet.value).add(o) : (this.runningStreamToken = u, this.resetWorkJournalTiming(), this.updateState(this.textState, {
793
+ let o = this.sharedMessages.value.length > a ? this.sharedMessages.value[this.sharedMessages.value.length - 1]?.id : void 0, s = this.turnEpoch, c = ++this.nextStreamToken;
794
+ i && o ? this.queuedMessageIdSet.value = new Set(this.queuedMessageIdSet.value).add(o) : (this.runningStreamToken = c, this.resetWorkJournalTiming(), this.updateState(this.textState, {
795
795
  isThinking: !0,
796
796
  workingDescription: void 0,
797
797
  toolActivities: [],
798
798
  transientIssue: void 0,
799
799
  turnOutcome: void 0
800
800
  }));
801
- let f = `stream-${Date.now()}-${u}`, p = !1, m = !1, isCurrentTurn = () => c === this.turnEpoch && !this.suppressedStreamTokens.has(u), claimLiveTurn = () => {
802
- this.runningStreamToken !== u && (this.runningStreamToken = u, this.consumeQueuedThrough(o), this.resetWorkJournalTiming(), this.updateState(this.textState, {
801
+ let f = `stream-${Date.now()}-${c}`, p = !1, m = !1, isCurrentTurn = () => s === this.turnEpoch && !this.suppressedStreamTokens.has(c), claimLiveTurn = () => {
802
+ this.runningStreamToken !== c && (this.runningStreamToken = c, this.consumeQueuedThrough(o), this.resetWorkJournalTiming(), this.updateState(this.textState, {
803
803
  isThinking: !0,
804
804
  workingDescription: void 0,
805
805
  toolActivities: [],
@@ -826,7 +826,7 @@ Current User:
826
826
  a?.id === f && (a.text += e, this.sharedMessages.value = [...i]);
827
827
  }, onMessage = (e) => {
828
828
  if (!isCurrentTurn()) return;
829
- if (claimLiveTurn(), m = !0, e.sender === "agent" && s(e.text)) {
829
+ if (claimLiveTurn(), m = !0, e.sender === "agent" && u(e.text)) {
830
830
  this.liveSegments.value = [], this.liveStreamMessageId.value = void 0, this.sharedMessages.value = this.sharedMessages.value.filter((e) => e.id !== f);
831
831
  return;
832
832
  }
@@ -852,7 +852,7 @@ Current User:
852
852
  let e = i[i.length - 1];
853
853
  this.sharedMessages.value = e?.id === f ? [...i.slice(0, -1), r] : [...i, r];
854
854
  }
855
- r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && G.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
855
+ r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && Se.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
856
856
  }, onDone = (e) => {
857
857
  if (!isCurrentTurn()) return;
858
858
  if (!p && !m) {
@@ -861,14 +861,14 @@ Current User:
861
861
  }
862
862
  this.finishToolActivities("completed");
863
863
  let t = this.sharedMessages.value, n = t[t.length - 1];
864
- n?.id === f && n.sender === "agent" && s(n.text) && (this.sharedMessages.value = t.slice(0, -1)), e && (this.conversationId = e), this.updateState(this.textState, {
864
+ n?.id === f && n.sender === "agent" && u(n.text) && (this.sharedMessages.value = t.slice(0, -1)), e && (this.conversationId = e), this.updateState(this.textState, {
865
865
  isThinking: !1,
866
866
  workingDescription: void 0,
867
867
  transientIssue: void 0
868
868
  }), this.settings.onTurnCompleted?.(e);
869
869
  }, onError = (n) => {
870
870
  if (!isCurrentTurn()) return;
871
- if (this.runningStreamToken !== u) {
871
+ if (this.runningStreamToken !== c) {
872
872
  this.consumeQueuedThrough(o), this.sharedMessages.value = this.sharedMessages.value.filter((e) => e.id !== o), this.composerState.value.text || (this.composerState.value = {
873
873
  ...this.composerState.value,
874
874
  text: e,
@@ -977,7 +977,7 @@ Current User:
977
977
  }
978
978
  loadMessages(e) {
979
979
  this.conversationId = e.conversationId;
980
- let t = this.sharedMessages.value, n = e.messages.filter((e) => e.sender !== "agent" || !s(e.text));
980
+ let t = this.sharedMessages.value, n = e.messages.filter((e) => e.sender !== "agent" || !u(e.text));
981
981
  this.sharedMessages.value = [...n, ...t], e.activeToolActivities?.length && (e.activeToolActivities.forEach((e) => this.rememberToolActivity(e)), this.updateState(this.textState, {
982
982
  isThinking: !0,
983
983
  workingDescription: void 0,
@@ -1003,11 +1003,11 @@ function getImageSrc(e) {
1003
1003
  return e ? typeof e == "string" ? e : e.src || "" : "";
1004
1004
  }
1005
1005
  function getAgentAvatarUrl(e) {
1006
- return getImageSrc(e.cover) || getImageSrc(e.avatar) || o(e.name);
1006
+ return getImageSrc(e.cover) || getImageSrc(e.avatar) || c(e.name);
1007
1007
  }
1008
1008
  function handleImageError(e) {
1009
1009
  let t = e.target;
1010
- t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = o());
1010
+ t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = c());
1011
1011
  }
1012
1012
  function parseButtonTemplate(e) {
1013
1013
  let { template: t, agent: n } = e;
@@ -1018,7 +1018,7 @@ function parseButtonTemplate(e) {
1018
1018
  var Ce = {
1019
1019
  key: 0,
1020
1020
  class: "absolute inset-0 flex items-center justify-center"
1021
- }, we = /* @__PURE__ */ S({
1021
+ }, we = /* @__PURE__ */ T({
1022
1022
  __name: "ElAgentButton",
1023
1023
  props: {
1024
1024
  theme: { default: "primary" },
@@ -1031,40 +1031,40 @@ var Ce = {
1031
1031
  iconAfter: {}
1032
1032
  },
1033
1033
  setup(e) {
1034
- let t = p(() => ({
1034
+ let t = h(() => ({
1035
1035
  primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
1036
1036
  green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
1037
1037
  red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
1038
1038
  default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20",
1039
1039
  dark: "bg-theme-900 border-transparent hover:bg-theme-800"
1040
- })[e.theme]), n = p(() => ({
1040
+ })[e.theme]), n = h(() => ({
1041
1041
  sm: "px-4 py-2 text-sm",
1042
1042
  md: "px-6 py-3 text-base",
1043
1043
  lg: "px-8 py-4 text-base"
1044
- })[e.size]), r = p(() => ({
1044
+ })[e.size]), r = h(() => ({
1045
1045
  sm: "size-4",
1046
1046
  md: "size-4",
1047
1047
  lg: "size-5"
1048
1048
  })[e.size]);
1049
- return (i, a) => (j(), _("button", { class: T(["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 ? (j(), _("div", Ce, [...a[0] || (a[0] = [v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : h("", !0), v("span", { class: T(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1050
- e.icon ? (j(), _("i", {
1049
+ return (i, a) => (M(), b("button", { class: k(["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 ? (M(), b("div", Ce, [...a[0] || (a[0] = [x("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : v("", !0), x("span", { class: k(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1050
+ e.icon ? (M(), b("i", {
1051
1051
  key: 0,
1052
- class: T([e.icon, r.value])
1053
- }, null, 2)) : h("", !0),
1054
- re(i.$slots, "default"),
1055
- e.iconAfter ? (j(), _("i", {
1052
+ class: k([e.icon, r.value])
1053
+ }, null, 2)) : v("", !0),
1054
+ I(i.$slots, "default"),
1055
+ e.iconAfter ? (M(), b("i", {
1056
1056
  key: 1,
1057
- class: T([e.iconAfter, r.value])
1058
- }, null, 2)) : h("", !0)
1057
+ class: k([e.iconAfter, r.value])
1058
+ }, null, 2)) : v("", !0)
1059
1059
  ], 2)], 2));
1060
1060
  }
1061
- }), Te = ["value"], Ee = /* @__PURE__ */ S({
1061
+ }), Te = ["value"], Ee = /* @__PURE__ */ T({
1062
1062
  __name: "AgentInputEmail",
1063
1063
  props: { modelValue: { default: "" } },
1064
1064
  emits: ["update:modelValue"],
1065
1065
  setup(e, { emit: t }) {
1066
1066
  let n = t;
1067
- return (t, r) => (j(), _("input", {
1067
+ return (t, r) => (M(), b("input", {
1068
1068
  name: "username",
1069
1069
  type: "email",
1070
1070
  inputmode: "email",
@@ -1079,7 +1079,7 @@ var Ce = {
1079
1079
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
1080
1080
  }, null, 40, Te));
1081
1081
  }
1082
- }), De = ["placeholder", "value"], Oe = /* @__PURE__ */ S({
1082
+ }), De = ["placeholder", "value"], Oe = /* @__PURE__ */ T({
1083
1083
  __name: "AgentInputOneTimeCode",
1084
1084
  props: {
1085
1085
  modelValue: {},
@@ -1088,15 +1088,15 @@ var Ce = {
1088
1088
  },
1089
1089
  emits: ["update:modelValue", "autoSubmit"],
1090
1090
  setup(e, { emit: t }) {
1091
- let n = e, r = t, i = M(null), a = p(() => "0".repeat(n.length));
1092
- te(() => {
1091
+ let n = e, r = t, i = P(null), a = h(() => "0".repeat(n.length));
1092
+ re(() => {
1093
1093
  n.focusFirst && !("ontouchstart" in window) && i.value?.focus();
1094
1094
  });
1095
1095
  function onInput(e) {
1096
1096
  let t = e.target.value.replace(/\D/g, "").slice(0, n.length);
1097
1097
  r("update:modelValue", t), t.length === n.length && r("autoSubmit", t);
1098
1098
  }
1099
- return (t, n) => (j(), _("input", {
1099
+ return (t, n) => (M(), b("input", {
1100
1100
  ref_key: "input",
1101
1101
  ref: i,
1102
1102
  name: "one-time-code",
@@ -1117,7 +1117,7 @@ var Ce = {
1117
1117
  }), ke = { class: "relative flex-shrink-0" }, Ae = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1118
1118
  key: 1,
1119
1119
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1120
- }, Ne = { class: "min-w-0" }, Pe = /* @__PURE__ */ S({
1120
+ }, Ne = { class: "min-w-0" }, Pe = /* @__PURE__ */ T({
1121
1121
  __name: "ElModeHeader",
1122
1122
  props: {
1123
1123
  agent: {},
@@ -1129,17 +1129,17 @@ var Ce = {
1129
1129
  layout: { default: "centered" }
1130
1130
  },
1131
1131
  setup(e) {
1132
- return (t, n) => (j(), _("div", { class: T(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", ke, [v("div", { class: T(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1132
+ return (t, n) => (M(), b("div", { class: k(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [x("div", ke, [x("div", { class: k(["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"]) }, [x("img", {
1133
1133
  src: e.agent.avatarUrl.value,
1134
1134
  alt: e.agent.displayName.value,
1135
1135
  class: "w-full h-full object-cover",
1136
- onError: n[0] || (n[0] = (...e) => ae(handleImageError) && ae(handleImageError)(...e))
1137
- }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (j(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1136
+ onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1137
+ }, null, 40, Ae)], 2), x("div", je, [e.isOnline ? (M(), b(m, { key: 0 }, [n[1] || (n[1] = x("div", {
1138
1138
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1139
1139
  style: { "animation-duration": "3s" }
1140
- }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (j(), _("div", Me))])]), v("div", Ne, [v("h1", { class: T(["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" : ""]]) }, I(e.agent.displayName.value), 3), v("p", { class: T(["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"]]) }, I(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1140
+ }, null, -1)), n[2] || (n[2] = x("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (M(), b("div", Me))])]), x("div", Ne, [x("h1", { class: k(["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" : ""]]) }, R(e.agent.displayName.value), 3), x("p", { class: k(["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"]]) }, R(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1141
1141
  }
1142
- }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ S({
1142
+ }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ T({
1143
1143
  __name: "AgentAvatar",
1144
1144
  props: {
1145
1145
  agent: {},
@@ -1162,7 +1162,7 @@ var Ce = {
1162
1162
  amber: "bg-amber-500",
1163
1163
  red: "bg-red-500",
1164
1164
  grey: "bg-theme-300"
1165
- }, n = p(() => {
1165
+ }, n = h(() => {
1166
1166
  let n = e.agent.state.value;
1167
1167
  return e.showStatus && n.lifecycle !== "unknown" ? t[n.color] : null;
1168
1168
  }), r = {
@@ -1170,32 +1170,32 @@ var Ce = {
1170
1170
  height: "clamp(7px, 14%, 14px)",
1171
1171
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1172
1172
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1173
- }, i = p(() => e.isLight ? "ring-white" : "ring-theme-900");
1174
- return (t, a) => (j(), _("div", Fe, [
1175
- v("img", {
1173
+ }, i = h(() => e.isLight ? "ring-white" : "ring-theme-900");
1174
+ return (t, a) => (M(), b("div", Fe, [
1175
+ x("img", {
1176
1176
  src: e.agent.avatarUrl.value,
1177
1177
  alt: e.agent.displayName.value,
1178
- class: T(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1178
+ class: k(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1179
1179
  }, null, 10, Ie),
1180
- e.showOwnerMark && e.agent.ownerMarkUrl.value ? (j(), _("img", {
1180
+ e.showOwnerMark && e.agent.ownerMarkUrl.value ? (M(), b("img", {
1181
1181
  key: 0,
1182
1182
  src: e.agent.ownerMarkUrl.value,
1183
1183
  alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
1184
- class: T(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1185
- }, null, 10, Le)) : h("", !0),
1186
- n.value ? (j(), _("span", {
1184
+ class: k(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1185
+ }, null, 10, Le)) : v("", !0),
1186
+ n.value ? (M(), b("span", {
1187
1187
  key: 1,
1188
1188
  role: "status",
1189
1189
  "aria-label": e.agent.state.value.tooltip,
1190
- class: T(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1190
+ class: k(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1191
1191
  style: r
1192
- }, null, 10, Re)) : h("", !0),
1193
- n.value && e.agent.state.value.lifecycle === "running" ? (j(), _("span", {
1192
+ }, null, 10, Re)) : v("", !0),
1193
+ n.value && e.agent.state.value.lifecycle === "running" ? (M(), b("span", {
1194
1194
  key: 2,
1195
1195
  "aria-hidden": "true",
1196
- class: T(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
1196
+ class: k(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
1197
1197
  style: r
1198
- }, null, 2)) : h("", !0)
1198
+ }, null, 2)) : v("", !0)
1199
1199
  ]));
1200
1200
  }
1201
1201
  }), Be = {
@@ -1212,25 +1212,25 @@ var Ce = {
1212
1212
  }, Ke = { class: "flex h-[17px] shrink-0 items-center" }, qe = {
1213
1213
  key: 0,
1214
1214
  class: "sr-only"
1215
- }, Je = /* @__PURE__ */ S({
1215
+ }, Je = /* @__PURE__ */ T({
1216
1216
  __name: "AgentToolActivityGroup",
1217
1217
  props: {
1218
1218
  model: {},
1219
1219
  isLight: { type: Boolean }
1220
1220
  },
1221
1221
  setup(e) {
1222
- let t = e, n = ie(!1);
1222
+ let t = e, n = ae(!1);
1223
1223
  function toggle() {
1224
1224
  n.value = !n.value;
1225
1225
  }
1226
- let r = p(() => t.model.outcome === "completed"), i = p(() => t.model.hiddenRows.length), a = p(() => t.model.hint ?? (t.model.terminal?.tone === "active" ? t.model.terminal.label : void 0)), o = p(() => {
1226
+ let r = h(() => t.model.outcome === "completed"), i = h(() => t.model.hiddenRows.length), a = h(() => t.model.hint ?? (t.model.terminal?.tone === "active" ? t.model.terminal.label : void 0)), o = h(() => {
1227
1227
  let e = t.model;
1228
1228
  return r.value ? n.value ? e.hiddenRows : [] : [
1229
1229
  ...n.value ? e.hiddenRows : [],
1230
1230
  ...e.visibleRows,
1231
1231
  ...e.terminal ? [e.terminal] : []
1232
1232
  ];
1233
- }), s = p(() => t.isLight ? {
1233
+ }), s = h(() => t.isLight ? {
1234
1234
  spine: "bg-theme-200",
1235
1235
  dashed: "border-theme-300",
1236
1236
  doneMark: "text-theme-400",
@@ -1246,7 +1246,7 @@ var Ce = {
1246
1246
  stoppedSquare: "bg-white/55",
1247
1247
  muted: "text-white/55",
1248
1248
  ring: "focus-visible:ring-white"
1249
- }), c = p(() => {
1249
+ }), c = h(() => {
1250
1250
  let e = t.isLight;
1251
1251
  return {
1252
1252
  done: {
@@ -1289,64 +1289,64 @@ var Ce = {
1289
1289
  }
1290
1290
  };
1291
1291
  });
1292
- return (t, u) => (j(), _("div", { class: T(["w-full py-0.5", s.value.muted]) }, [
1293
- a.value ? (j(), _("span", Be, I(a.value), 1)) : h("", !0),
1294
- r.value ? (j(), _("button", {
1292
+ return (t, u) => (M(), b("div", { class: k(["w-full py-0.5", s.value.muted]) }, [
1293
+ a.value ? (M(), b("span", Be, R(a.value), 1)) : v("", !0),
1294
+ r.value ? (M(), b("button", {
1295
1295
  key: 1,
1296
1296
  type: "button",
1297
1297
  "data-test": "messaging-tool-activity-summary",
1298
1298
  "data-journal-disclosure": "",
1299
1299
  "aria-expanded": n.value,
1300
1300
  disabled: i.value === 0,
1301
- class: T(["flex min-h-11 items-center gap-x-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default", s.value.ring]),
1301
+ class: k(["flex min-h-11 items-center gap-x-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default", s.value.ring]),
1302
1302
  onClick: toggle
1303
1303
  }, [
1304
- u[0] || (u[0] = v("i", {
1304
+ u[0] || (u[0] = x("i", {
1305
1305
  "data-journal-station": "completed",
1306
1306
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1307
1307
  "aria-hidden": "true"
1308
1308
  }, null, -1)),
1309
- v("span", { class: T(["text-[12.5px] font-medium leading-none", s.value.muted]) }, I(e.model.terminal?.label), 3),
1310
- i.value ? (j(), _("i", {
1309
+ x("span", { class: k(["text-[12.5px] font-medium leading-none", s.value.muted]) }, R(e.model.terminal?.label), 3),
1310
+ i.value ? (M(), b("i", {
1311
1311
  key: 0,
1312
- class: T(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1312
+ class: k(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1313
1313
  "aria-hidden": "true"
1314
- }, null, 2)) : h("", !0)
1315
- ], 10, Ve)) : i.value ? (j(), _("button", {
1314
+ }, null, 2)) : v("", !0)
1315
+ ], 10, Ve)) : i.value ? (M(), b("button", {
1316
1316
  key: 2,
1317
1317
  type: "button",
1318
1318
  "data-test": "messaging-tool-activity-summary",
1319
1319
  "data-journal-disclosure": "",
1320
1320
  "aria-expanded": n.value,
1321
- class: T(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1321
+ class: k(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1322
1322
  onClick: toggle
1323
- }, [v("span", Ue, [v("span", {
1323
+ }, [x("span", Ue, [x("span", {
1324
1324
  "data-journal-spine": "dashed",
1325
- class: T(["w-0 border-l border-dashed", s.value.dashed])
1326
- }, null, 2)]), v("span", { class: T(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [b(I(i.value) + " earlier updates ", 1), v("i", {
1327
- class: T(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1325
+ class: k(["w-0 border-l border-dashed", s.value.dashed])
1326
+ }, null, 2)]), x("span", { class: k(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [S(R(i.value) + " earlier updates ", 1), x("i", {
1327
+ class: k(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1328
1328
  "aria-hidden": "true"
1329
- }, null, 2)], 2)], 10, He)) : h("", !0),
1330
- (j(!0), _(f, null, P(o.value, (e, t) => (j(), _("div", {
1329
+ }, null, 2)], 2)], 10, He)) : v("", !0),
1330
+ (M(!0), b(m, null, F(o.value, (e, t) => (M(), b("div", {
1331
1331
  key: e.id,
1332
1332
  "data-test": "messaging-tool-activity-row",
1333
1333
  "data-journal-row": e.tone,
1334
- class: T([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1335
- }, [v("div", Ge, [v("span", Ke, [(j(), m(F(c.value[e.tone].station.tag), {
1334
+ class: k([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1335
+ }, [x("div", Ge, [x("span", Ke, [(M(), _(ie(c.value[e.tone].station.tag), {
1336
1336
  "data-journal-station": e.tone,
1337
- class: T(c.value[e.tone].station.class)
1338
- }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (j(), _("span", {
1337
+ class: k(c.value[e.tone].station.class)
1338
+ }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? v("", !0) : (M(), b("span", {
1339
1339
  key: 0,
1340
- class: T(["w-px flex-1", s.value.spine])
1341
- }, null, 2))]), v("div", { class: T(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: T(["relative block leading-snug", c.value[e.tone].label]) }, [b(I(e.label), 1), c.value[e.tone].statusWord ? (j(), _("span", qe, ", " + I(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (j(), _("p", {
1340
+ class: k(["w-px flex-1", s.value.spine])
1341
+ }, null, 2))]), x("div", { class: k(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [x("span", { class: k(["relative block leading-snug", c.value[e.tone].label]) }, [S(R(e.label), 1), c.value[e.tone].statusWord ? (M(), b("span", qe, ", " + R(c.value[e.tone].statusWord), 1)) : v("", !0)], 2), e.note ? (M(), b("p", {
1342
1342
  key: 0,
1343
- class: T(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1344
- }, I(e.note), 3)) : h("", !0)], 2)], 10, We))), 128)),
1345
- !r.value && e.model.hint ? (j(), _("p", {
1343
+ class: k(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1344
+ }, R(e.note), 3)) : v("", !0)], 2)], 10, We))), 128)),
1345
+ !r.value && e.model.hint ? (M(), b("p", {
1346
1346
  key: 3,
1347
1347
  "data-test": "messaging-tool-activity-hint",
1348
- class: T(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1349
- }, I(e.model.hint), 3)) : h("", !0)
1348
+ class: k(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1349
+ }, R(e.model.hint), 3)) : v("", !0)
1350
1350
  ], 2));
1351
1351
  }
1352
1352
  });
@@ -1391,33 +1391,33 @@ function _unsupportedIterableToArray(e, t) {
1391
1391
  return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
1392
1392
  }
1393
1393
  }
1394
- var Ye = Object.entries, Xe = Object.setPrototypeOf, Ze = Object.isFrozen, K = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, q = Object.freeze, J = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1395
- q || (q = function freeze(e) {
1394
+ var Ye = Object.entries, Xe = Object.setPrototypeOf, Ze = Object.isFrozen, J = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, X = Object.freeze, $e = Object.seal, et = Object.create, tt = typeof Reflect < "u" && Reflect, nt = tt.apply, rt = tt.construct;
1395
+ X || (X = function freeze(e) {
1396
1396
  return e;
1397
- }), J || (J = function seal(e) {
1397
+ }), $e || ($e = function seal(e) {
1398
1398
  return e;
1399
- }), tt || (tt = function apply(e, t) {
1399
+ }), nt || (nt = function apply(e, t) {
1400
1400
  var n = [...arguments].slice(2);
1401
1401
  return e.apply(t, n);
1402
- }), nt || (nt = function construct(e) {
1402
+ }), rt || (rt = function construct(e) {
1403
1403
  return new e(...[...arguments].slice(1));
1404
1404
  });
1405
- var rt = unapply(Array.prototype.forEach), it = unapply(Array.prototype.lastIndexOf), at = unapply(Array.prototype.pop), st = unapply(Array.prototype.push), ct = unapply(Array.prototype.splice), lt = Array.isArray, ut = unapply(String.prototype.toLowerCase), dt = unapply(String.prototype.toString), ft = unapply(String.prototype.match), pt = unapply(String.prototype.replace), mt = unapply(String.prototype.indexOf), ht = unapply(String.prototype.trim), gt = unapply(Number.prototype.toString), _t = unapply(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), bt = unapply(Object.prototype.toString), Z = unapply(RegExp.prototype.test), xt = unconstruct(TypeError);
1405
+ var it = unapply(Array.prototype.forEach), at = unapply(Array.prototype.lastIndexOf), st = unapply(Array.prototype.pop), ct = unapply(Array.prototype.push), lt = unapply(Array.prototype.splice), ut = Array.isArray, dt = unapply(String.prototype.toLowerCase), ft = unapply(String.prototype.toString), pt = unapply(String.prototype.match), mt = unapply(String.prototype.replace), ht = unapply(String.prototype.indexOf), gt = unapply(String.prototype.trim), _t = unapply(Number.prototype.toString), vt = unapply(Boolean.prototype.toString), yt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), bt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Z = unapply(Object.prototype.hasOwnProperty), xt = unapply(Object.prototype.toString), St = unapply(RegExp.prototype.test), Ct = unconstruct(TypeError);
1406
1406
  function unapply(e) {
1407
1407
  return function(t) {
1408
1408
  t instanceof RegExp && (t.lastIndex = 0);
1409
1409
  var n = [...arguments].slice(1);
1410
- return tt(e, t, n);
1410
+ return nt(e, t, n);
1411
1411
  };
1412
1412
  }
1413
1413
  function unconstruct(e) {
1414
1414
  return function() {
1415
- return nt(e, [...arguments]);
1415
+ return rt(e, [...arguments]);
1416
1416
  };
1417
1417
  }
1418
1418
  function addToSet(e, t) {
1419
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ut;
1420
- if (Xe && Xe(e, null), !lt(t)) return e;
1419
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : dt;
1420
+ if (Xe && Xe(e, null), !ut(t)) return e;
1421
1421
  let r = t.length;
1422
1422
  for (; r--;) {
1423
1423
  let i = t[r];
@@ -1430,37 +1430,37 @@ function addToSet(e, t) {
1430
1430
  return e;
1431
1431
  }
1432
1432
  function cleanArray(e) {
1433
- for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1433
+ for (let t = 0; t < e.length; t++) Z(e, t) || (e[t] = null);
1434
1434
  return e;
1435
1435
  }
1436
1436
  function clone(e) {
1437
- let t = $e(null);
1437
+ let t = et(null);
1438
1438
  for (let r of Ye(e)) {
1439
1439
  var n = _slicedToArray(r, 2);
1440
1440
  let i = n[0], a = n[1];
1441
- X(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1441
+ Z(e, i) && (ut(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1442
1442
  }
1443
1443
  return t;
1444
1444
  }
1445
1445
  function stringifyValue(e) {
1446
1446
  switch (typeof e) {
1447
1447
  case "string": return e;
1448
- case "number": return gt(e);
1449
- case "boolean": return _t(e);
1450
- case "bigint": return vt ? vt(e) : "0";
1451
- case "symbol": return yt ? yt(e) : "Symbol()";
1452
- case "undefined": return bt(e);
1448
+ case "number": return _t(e);
1449
+ case "boolean": return vt(e);
1450
+ case "bigint": return yt ? yt(e) : "0";
1451
+ case "symbol": return bt ? bt(e) : "Symbol()";
1452
+ case "undefined": return xt(e);
1453
1453
  case "function":
1454
1454
  case "object": {
1455
- if (e === null) return bt(e);
1455
+ if (e === null) return xt(e);
1456
1456
  let t = e, n = lookupGetter(t, "toString");
1457
1457
  if (typeof n == "function") {
1458
1458
  let e = n(t);
1459
- return typeof e == "string" ? e : bt(e);
1459
+ return typeof e == "string" ? e : xt(e);
1460
1460
  }
1461
- return bt(e);
1461
+ return xt(e);
1462
1462
  }
1463
- default: return bt(e);
1463
+ default: return xt(e);
1464
1464
  }
1465
1465
  }
1466
1466
  function lookupGetter(e, t) {
@@ -1470,7 +1470,7 @@ function lookupGetter(e, t) {
1470
1470
  if (n.get) return unapply(n.get);
1471
1471
  if (typeof n.value == "function") return unapply(n.value);
1472
1472
  }
1473
- e = K(e);
1473
+ e = J(e);
1474
1474
  }
1475
1475
  function fallbackValue() {
1476
1476
  return null;
@@ -1479,12 +1479,12 @@ function lookupGetter(e, t) {
1479
1479
  }
1480
1480
  function isRegex(e) {
1481
1481
  try {
1482
- return Z(e, ""), !0;
1482
+ return St(e, ""), !0;
1483
1483
  } catch {
1484
1484
  return !1;
1485
1485
  }
1486
1486
  }
1487
- var St = q(/* @__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(".")), Ct = q(/* @__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(".")), wt = q([
1487
+ var wt = X(/* @__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(".")), Tt = X(/* @__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(".")), Et = X([
1488
1488
  "feBlend",
1489
1489
  "feColorMatrix",
1490
1490
  "feComponentTransfer",
@@ -1510,7 +1510,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1510
1510
  "feSpotLight",
1511
1511
  "feTile",
1512
1512
  "feTurbulence"
1513
- ]), Tt = q([
1513
+ ]), Dt = X([
1514
1514
  "animate",
1515
1515
  "color-profile",
1516
1516
  "cursor",
@@ -1533,7 +1533,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1533
1533
  "solidcolor",
1534
1534
  "unknown",
1535
1535
  "use"
1536
- ]), Et = q(/* @__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(".")), Dt = q([
1536
+ ]), Ot = X(/* @__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 = X([
1537
1537
  "maction",
1538
1538
  "maligngroup",
1539
1539
  "malignmark",
@@ -1549,13 +1549,13 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1549
1549
  "annotation-xml",
1550
1550
  "mprescripts",
1551
1551
  "none"
1552
- ]), Ot = q(["#text"]), kt = q(/* @__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(".")), At = q(/* @__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.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.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(".")), jt = q(/* @__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(".")), Mt = q([
1552
+ ]), At = X(["#text"]), jt = X(/* @__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(".")), Mt = X(/* @__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.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.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(".")), Nt = X(/* @__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(".")), Pt = X([
1553
1553
  "xlink:href",
1554
1554
  "xml:id",
1555
1555
  "xlink:title",
1556
1556
  "xml:space",
1557
1557
  "xmlns:xlink"
1558
- ]), Nt = J(/{{[\w\W]*|^[\w\W]*}}/g), Pt = J(/<%[\w\W]*|^[\w\W]*%>/g), Ft = J(/\${[\w\W]*/g), It = J(/^data-[\-\w.\u00B7-\uFFFF]+$/), Lt = J(/^aria-[\-\w]+$/), Rt = J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zt = J(/^(?:\w+script|data):/i), Bt = J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vt = J(/^html$/i), Ht = J(/^[a-z][.\w]*(-[.\w]+)+$/i), Ut = J(/<[/\w!]/g), Wt = J(/<[/\w]/g), Gt = J(/<\/no(script|embed|frames)/i), Kt = J(/\/>/i), qt = {
1558
+ ]), Ft = $e(/{{[\w\W]*|^[\w\W]*}}/g), It = $e(/<%[\w\W]*|^[\w\W]*%>/g), Lt = $e(/\${[\w\W]*/g), Rt = $e(/^data-[\-\w.\u00B7-\uFFFF]+$/), zt = $e(/^aria-[\-\w]+$/), Bt = $e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Vt = $e(/^(?:\w+script|data):/i), Ht = $e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ut = $e(/^html$/i), Wt = $e(/^[a-z][.\w]*(-[.\w]+)+$/i), Gt = $e(/<[/\w!]/g), Kt = $e(/<[/\w]/g), qt = $e(/<\/no(script|embed|frames)/i), Jt = $e(/\/>/i), Yt = {
1559
1559
  element: 1,
1560
1560
  attribute: 2,
1561
1561
  text: 3,
@@ -1568,9 +1568,9 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1568
1568
  documentType: 10,
1569
1569
  documentFragment: 11,
1570
1570
  notation: 12
1571
- }, Jt = function getGlobal() {
1571
+ }, Xt = function getGlobal() {
1572
1572
  return typeof window > "u" ? null : window;
1573
- }, Yt = function _createTrustedTypesPolicy(e, t) {
1573
+ }, Zt = function _createTrustedTypesPolicy(e, t) {
1574
1574
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
1575
1575
  let n = null, r = "data-tt-policy-suffix";
1576
1576
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -1587,7 +1587,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1587
1587
  } catch {
1588
1588
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
1589
1589
  }
1590
- }, Xt = function _createHooksMap() {
1590
+ }, Qt = function _createHooksMap() {
1591
1591
  return {
1592
1592
  afterSanitizeAttributes: [],
1593
1593
  afterSanitizeElements: [],
@@ -1599,12 +1599,12 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1599
1599
  uponSanitizeElement: [],
1600
1600
  uponSanitizeShadowNode: []
1601
1601
  };
1602
- }, Zt = function _resolveSetOption(e, t, n, r) {
1603
- return X(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1602
+ }, $t = function _resolveSetOption(e, t, n, r) {
1603
+ return Z(e, t) && ut(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1604
1604
  };
1605
1605
  function createDOMPurify() {
1606
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jt(), DOMPurify = (e) => createDOMPurify(e);
1607
- if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== qt.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1606
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Xt(), DOMPurify = (e) => createDOMPurify(e);
1607
+ if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== Yt.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1608
1608
  let t = e.document, n = t, r = n.currentScript;
1609
1609
  e.DocumentFragment;
1610
1610
  let i = e.HTMLTemplateElement, a = e.Node, o = e.Element, s = e.NodeFilter;
@@ -1614,38 +1614,38 @@ function createDOMPurify() {
1614
1614
  let e = t.createElement("template");
1615
1615
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1616
1616
  }
1617
- let T, k = "", A, te = !1, ne = 0, j = function _assertNotInTrustedTypesPolicy() {
1618
- if (ne > 0) throw xt("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.");
1619
- }, M = function _createTrustedHTML(e) {
1620
- j(), ne++;
1617
+ let T, te = "", k, A = !1, ne = 0, re = function _assertNotInTrustedTypesPolicy() {
1618
+ if (ne > 0) throw Ct("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.");
1619
+ }, j = function _createTrustedHTML(e) {
1620
+ re(), ne++;
1621
1621
  try {
1622
1622
  return T.createHTML(e);
1623
1623
  } finally {
1624
1624
  ne--;
1625
1625
  }
1626
- }, P = function _createTrustedScriptURL(e) {
1627
- j(), ne++;
1626
+ }, M = function _createTrustedScriptURL(e) {
1627
+ re(), ne++;
1628
1628
  try {
1629
1629
  return T.createScriptURL(e);
1630
1630
  } finally {
1631
1631
  ne--;
1632
1632
  }
1633
- }, re = function _getDefaultTrustedTypesPolicy() {
1634
- return te || (A = Yt(u, r), te = !0), A;
1635
- }, F = t, ie = F.implementation, I = F.createNodeIterator, ae = F.createDocumentFragment, oe = F.getElementsByTagName, se = n.importNode, R = Xt();
1636
- DOMPurify.isSupported = typeof Ye == "function" && typeof v == "function" && ie && ie.createHTMLDocument !== void 0;
1637
- let ce = Nt, ue = Pt, de = Ft, B = It, H = Lt, pe = zt, he = Bt, _e = Ht, ve = Rt, U = null, ye = addToSet({}, [
1638
- ...St,
1639
- ...Ct,
1633
+ }, P = function _getDefaultTrustedTypesPolicy() {
1634
+ return A || (k = Zt(u, r), A = !0), k;
1635
+ }, F = t, I = F.implementation, ie = F.createNodeIterator, ae = F.createDocumentFragment, R = F.getElementsByTagName, oe = n.importNode, B = Qt();
1636
+ DOMPurify.isSupported = typeof Ye == "function" && typeof v == "function" && I && I.createHTMLDocument !== void 0;
1637
+ let se = Ft, ce = It, ue = Lt, de = Rt, H = zt, U = Vt, pe = Ht, he = Wt, _e = Bt, W = null, ve = addToSet({}, [
1640
1638
  ...wt,
1639
+ ...Tt,
1641
1640
  ...Et,
1642
- ...Ot
1643
- ]), W = null, be = addToSet({}, [
1644
- ...kt,
1645
- ...At,
1641
+ ...Ot,
1642
+ ...At
1643
+ ]), G = null, ye = addToSet({}, [
1646
1644
  ...jt,
1647
- ...Mt
1648
- ]), G = Object.seal($e(null, {
1645
+ ...Mt,
1646
+ ...Nt,
1647
+ ...Pt
1648
+ ]), K = Object.seal(et(null, {
1649
1649
  tagNameCheck: {
1650
1650
  writable: !0,
1651
1651
  configurable: !1,
@@ -1664,7 +1664,7 @@ function createDOMPurify() {
1664
1664
  enumerable: !0,
1665
1665
  value: !1
1666
1666
  }
1667
- })), Se = null, Ce = null, we = Object.seal($e(null, {
1667
+ })), be = null, Se = null, q = Object.seal(et(null, {
1668
1668
  tagCheck: {
1669
1669
  writable: !0,
1670
1670
  configurable: !1,
@@ -1677,14 +1677,14 @@ function createDOMPurify() {
1677
1677
  enumerable: !0,
1678
1678
  value: null
1679
1679
  }
1680
- })), Te = !0, Ee = !0, De = !1, Oe = !0, ke = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, Ve = "user-content-", He = !0, Ue = !1, We = {}, Ge = null, Ke = 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(".")), qe = null, Je = addToSet({}, [
1680
+ })), Ce = !0, we = !0, Te = !1, Ee = !0, De = !1, Oe = !0, ke = !1, Ae = !1, je = null, Me = null, Ne = !1, Pe = !1, Fe = !1, Ie = !1, Le = !0, Re = !1, ze = "user-content-", Be = !0, Ve = !1, He = {}, Ue = null, We = 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(".")), Ge = null, Ke = addToSet({}, [
1681
1681
  "audio",
1682
1682
  "video",
1683
1683
  "img",
1684
1684
  "source",
1685
1685
  "image",
1686
1686
  "track"
1687
- ]), Xe = null, Ze = addToSet({}, [
1687
+ ]), qe = null, Je = addToSet({}, [
1688
1688
  "alt",
1689
1689
  "class",
1690
1690
  "for",
@@ -1699,17 +1699,17 @@ function createDOMPurify() {
1699
1699
  "value",
1700
1700
  "style",
1701
1701
  "xmlns"
1702
- ]), K = "http://www.w3.org/1998/Math/MathML", Qe = "http://www.w3.org/2000/svg", et = "http://www.w3.org/1999/xhtml", tt = et, nt = !1, gt = null, _t = addToSet({}, [
1703
- K,
1704
- Qe,
1705
- et
1706
- ], dt), vt = q([
1702
+ ]), Xe = "http://www.w3.org/1998/Math/MathML", Ze = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml", Qe = J, tt = !1, nt = null, rt = addToSet({}, [
1703
+ Xe,
1704
+ Ze,
1705
+ J
1706
+ ], ft), _t = X([
1707
1707
  "mi",
1708
1708
  "mo",
1709
1709
  "mn",
1710
1710
  "ms",
1711
1711
  "mtext"
1712
- ]), yt = addToSet({}, vt), bt = q(["annotation-xml"]), Qt = addToSet({}, bt), $t = addToSet({}, [
1712
+ ]), vt = addToSet({}, _t), yt = X(["annotation-xml"]), bt = addToSet({}, yt), xt = addToSet({}, [
1713
1713
  "title",
1714
1714
  "style",
1715
1715
  "font",
@@ -1720,63 +1720,63 @@ function createDOMPurify() {
1720
1720
  }, on = function _parseConfig() {
1721
1721
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1722
1722
  if (nn && nn === e) return;
1723
- (!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, U = Zt(e, "ALLOWED_TAGS", ye, { transform: Q }), W = Zt(e, "ALLOWED_ATTR", be, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", Ze, {
1724
- transform: Q,
1725
- base: Ze
1726
- }), qe = Zt(e, "ADD_DATA_URI_TAGS", Je, {
1723
+ (!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? ft : dt, W = $t(e, "ALLOWED_TAGS", ve, { transform: Q }), G = $t(e, "ALLOWED_ATTR", ye, { transform: Q }), nt = $t(e, "ALLOWED_NAMESPACES", rt, { transform: ft }), qe = $t(e, "ADD_URI_SAFE_ATTR", Je, {
1727
1724
  transform: Q,
1728
1725
  base: Je
1729
- }), Ge = Zt(e, "FORBID_CONTENTS", Ke, { transform: Q }), Se = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), Ce = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), We = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Te = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, De = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ke = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, ve = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1730
- let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1731
- if (G = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (G.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (G.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(G), ke && (Ee = !1), Le && (Ie = !0), We && (U = addToSet({}, Ot), W = $e(null), We.html === !0 && (addToSet(U, St), addToSet(W, kt)), We.svg === !0 && (addToSet(U, Ct), addToSet(W, At), addToSet(W, Mt)), We.svgFilters === !0 && (addToSet(U, wt), addToSet(W, At), addToSet(W, Mt)), We.mathMl === !0 && (addToSet(U, Et), addToSet(W, jt), addToSet(W, Mt))), we.tagCheck = null, we.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? we.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (U === ye && (U = clone(U)), addToSet(U, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? we.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (W === be && (W = clone(W)), addToSet(W, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Xe, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), He && (U["#text"] = !0), je && addToSet(U, [
1726
+ }), Ge = $t(e, "ADD_DATA_URI_TAGS", Ke, {
1727
+ transform: Q,
1728
+ base: Ke
1729
+ }), Ue = $t(e, "FORBID_CONTENTS", We, { transform: Q }), be = $t(e, "FORBID_TAGS", clone({}), { transform: Q }), Se = $t(e, "FORBID_ATTR", clone({}), { transform: Q }), He = Z(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ce = e.ALLOW_ARIA_ATTR !== !1, we = e.ALLOW_DATA_ATTR !== !1, Te = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, ke = e.WHOLE_DOCUMENT || !1, Pe = e.RETURN_DOM || !1, Fe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, Le = e.SANITIZE_DOM !== !1, Re = e.SANITIZE_NAMED_PROPS || !1, Be = e.KEEP_CONTENT !== !1, Ve = e.IN_PLACE || !1, _e = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Bt, Qe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, vt = Z(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, _t), bt = Z(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, yt);
1730
+ let t = Z(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : et(null);
1731
+ if (K = et(null), Z(t, "tagNameCheck") && an(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), Z(t, "attributeNameCheck") && an(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), Z(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), $e(K), De && (we = !1), Fe && (Pe = !0), He && (W = addToSet({}, At), G = et(null), He.html === !0 && (addToSet(W, wt), addToSet(G, jt)), He.svg === !0 && (addToSet(W, Tt), addToSet(G, Mt), addToSet(G, Pt)), He.svgFilters === !0 && (addToSet(W, Et), addToSet(G, Mt), addToSet(G, Pt)), He.mathMl === !0 && (addToSet(W, Ot), addToSet(G, Nt), addToSet(G, Pt))), q.tagCheck = null, q.attributeCheck = null, Z(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? q.tagCheck = e.ADD_TAGS : ut(e.ADD_TAGS) && (W === ve && (W = clone(W)), addToSet(W, e.ADD_TAGS, Q))), Z(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? q.attributeCheck = e.ADD_ATTR : ut(e.ADD_ATTR) && (G === ye && (G = clone(G)), addToSet(G, e.ADD_ATTR, Q))), Z(e, "ADD_URI_SAFE_ATTR") && ut(e.ADD_URI_SAFE_ATTR) && addToSet(qe, e.ADD_URI_SAFE_ATTR, Q), Z(e, "FORBID_CONTENTS") && ut(e.FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.FORBID_CONTENTS, Q)), Z(e, "ADD_FORBID_CONTENTS") && ut(e.ADD_FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.ADD_FORBID_CONTENTS, Q)), Be && (W["#text"] = !0), ke && addToSet(W, [
1732
1732
  "html",
1733
1733
  "head",
1734
1734
  "body"
1735
- ]), U.table && (addToSet(U, ["tbody"]), delete Se.tbody), e.TRUSTED_TYPES_POLICY) {
1736
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1737
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1735
+ ]), W.table && (addToSet(W, ["tbody"]), delete be.tbody), e.TRUSTED_TYPES_POLICY) {
1736
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Ct("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1737
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Ct("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1738
1738
  let t = T;
1739
1739
  T = e.TRUSTED_TYPES_POLICY;
1740
1740
  try {
1741
- k = M("");
1741
+ te = j("");
1742
1742
  } catch (e) {
1743
1743
  throw T = t, e;
1744
1744
  }
1745
- } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, k = "") : (T === void 0 && (T = re()), T && typeof k == "string" && (k = M("")));
1746
- q && q(e), nn = e;
1745
+ } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = P()), T && typeof te == "string" && (te = j("")));
1746
+ X && X(e), nn = e;
1747
1747
  }, sn = addToSet({}, [
1748
- ...Ct,
1749
- ...wt,
1750
- ...Tt
1751
- ]), cn = addToSet({}, [...Et, ...Dt]), ln = function _checkSvgNamespace(e, t, n) {
1752
- return t.namespaceURI === et ? e === "svg" : t.namespaceURI === K ? e === "svg" && (n === "annotation-xml" || yt[n]) : !!sn[e];
1748
+ ...Tt,
1749
+ ...Et,
1750
+ ...Dt
1751
+ ]), cn = addToSet({}, [...Ot, ...kt]), ln = function _checkSvgNamespace(e, t, n) {
1752
+ return t.namespaceURI === J ? e === "svg" : t.namespaceURI === Xe ? e === "svg" && (n === "annotation-xml" || vt[n]) : !!sn[e];
1753
1753
  }, un = function _checkMathMlNamespace(e, t, n) {
1754
- return t.namespaceURI === et ? e === "math" : t.namespaceURI === Qe ? e === "math" && Qt[n] : !!cn[e];
1754
+ return t.namespaceURI === J ? e === "math" : t.namespaceURI === Ze ? e === "math" && bt[n] : !!cn[e];
1755
1755
  }, dn = function _checkHtmlNamespace(e, t, n) {
1756
- return t.namespaceURI === Qe && !Qt[n] || t.namespaceURI === K && !yt[n] ? !1 : !cn[e] && ($t[e] || !sn[e]);
1756
+ return t.namespaceURI === Ze && !bt[n] || t.namespaceURI === Xe && !vt[n] ? !1 : !cn[e] && (xt[e] || !sn[e]);
1757
1757
  }, fn = function _checkValidNamespace(e) {
1758
1758
  let t = v(e);
1759
1759
  (!t || !t.tagName) && (t = {
1760
- namespaceURI: tt,
1760
+ namespaceURI: Qe,
1761
1761
  tagName: "template"
1762
1762
  });
1763
- let n = ut(e.tagName), r = ut(t.tagName);
1764
- return gt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI === K ? un(n, t, r) : e.namespaceURI === et ? dn(n, t, r) : !!(en === "application/xhtml+xml" && gt[e.namespaceURI]) : !1;
1763
+ let n = dt(e.tagName), r = dt(t.tagName);
1764
+ return nt[e.namespaceURI] ? e.namespaceURI === Ze ? ln(n, t, r) : e.namespaceURI === Xe ? un(n, t, r) : e.namespaceURI === J ? dn(n, t, r) : !!(en === "application/xhtml+xml" && nt[e.namespaceURI]) : !1;
1765
1765
  }, pn = function _forceRemove(e) {
1766
- st(DOMPurify.removed, { element: e });
1766
+ ct(DOMPurify.removed, { element: e });
1767
1767
  try {
1768
1768
  v(e).removeChild(e);
1769
1769
  } catch {
1770
- if (m(e), !v(e)) throw xt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1770
+ if (m(e), !v(e)) throw Ct("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1771
1771
  }
1772
1772
  }, mn = function _neutralizeRoot(e) {
1773
1773
  _n(e);
1774
1774
  let t = _(e);
1775
1775
  if (t) {
1776
1776
  let e = [];
1777
- rt(t, (t) => {
1778
- st(e, t);
1779
- }), rt(e, (e) => {
1777
+ it(t, (t) => {
1778
+ ct(e, t);
1779
+ }), it(e, (e) => {
1780
1780
  try {
1781
1781
  m(e);
1782
1782
  } catch {}
@@ -1791,17 +1791,17 @@ function createDOMPurify() {
1791
1791
  }
1792
1792
  }, hn = function _removeAttribute(e, t) {
1793
1793
  try {
1794
- st(DOMPurify.removed, {
1794
+ ct(DOMPurify.removed, {
1795
1795
  attribute: t.getAttributeNode(e),
1796
1796
  from: t
1797
1797
  });
1798
1798
  } catch {
1799
- st(DOMPurify.removed, {
1799
+ ct(DOMPurify.removed, {
1800
1800
  attribute: null,
1801
1801
  from: t
1802
1802
  });
1803
1803
  }
1804
- if (t.removeAttribute(e), e === "is") if (Ie || Le) try {
1804
+ if (t.removeAttribute(e), e === "is") if (Pe || Fe) try {
1805
1805
  pn(t);
1806
1806
  } catch {}
1807
1807
  else try {
@@ -1811,7 +1811,7 @@ function createDOMPurify() {
1811
1811
  let t = x(e);
1812
1812
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1813
1813
  let r = t[n], i = r && r.name;
1814
- if (!(typeof i != "string" || W[Q(i)])) try {
1814
+ if (!(typeof i != "string" || G[Q(i)])) try {
1815
1815
  e.removeAttribute(i);
1816
1816
  } catch {}
1817
1817
  }
@@ -1819,22 +1819,22 @@ function createDOMPurify() {
1819
1819
  let t = [e];
1820
1820
  for (; t.length > 0;) {
1821
1821
  let e = t.pop();
1822
- (S ? S(e) : e.nodeType) === qt.element && gn(e);
1822
+ (S ? S(e) : e.nodeType) === Yt.element && gn(e);
1823
1823
  let n = _(e);
1824
1824
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1825
1825
  }
1826
1826
  }, vn = function _neutralizePatchLinkage(e) {
1827
- if (!Ae) return;
1827
+ if (!Oe) return;
1828
1828
  let t = [e];
1829
1829
  for (; t.length > 0;) {
1830
1830
  let e = t.pop(), n = S ? S(e) : e.nodeType;
1831
- if (n === qt.processingInstruction || n === qt.comment && Z(Wt, e.data)) {
1831
+ if (n === Yt.processingInstruction || n === Yt.comment && St(Kt, e.data)) {
1832
1832
  try {
1833
1833
  m(e);
1834
1834
  } catch {}
1835
1835
  continue;
1836
1836
  }
1837
- if (n === qt.element) {
1837
+ if (n === Yt.element) {
1838
1838
  let t = e, n = Q(C ? C(e) : e.nodeName);
1839
1839
  try {
1840
1840
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
@@ -1845,34 +1845,34 @@ function createDOMPurify() {
1845
1845
  }
1846
1846
  }, yn = function _initDocument(e) {
1847
1847
  let n = null, r = null;
1848
- if (Fe) e = "<remove></remove>" + e;
1848
+ if (Ne) e = "<remove></remove>" + e;
1849
1849
  else {
1850
- let t = ft(e, /^[\r\n\t ]+/);
1850
+ let t = pt(e, /^[\r\n\t ]+/);
1851
1851
  r = t && t[0];
1852
1852
  }
1853
- en === "application/xhtml+xml" && tt === et && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1854
- let i = T ? M(e) : e;
1855
- if (tt === et) try {
1853
+ en === "application/xhtml+xml" && Qe === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1854
+ let i = T ? j(e) : e;
1855
+ if (Qe === J) try {
1856
1856
  n = new c().parseFromString(i, en);
1857
1857
  } catch {}
1858
1858
  if (!n || !n.documentElement) {
1859
- n = ie.createDocument(tt, "template", null);
1859
+ n = I.createDocument(Qe, "template", null);
1860
1860
  try {
1861
- n.documentElement.innerHTML = nt ? k : i;
1861
+ n.documentElement.innerHTML = tt ? te : i;
1862
1862
  } catch {}
1863
1863
  }
1864
1864
  let a = n.body || n.documentElement;
1865
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? oe.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1865
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), Qe === J ? R.call(n, ke ? "html" : "body")[0] : ke ? n.documentElement : a;
1866
1866
  }, bn = function _createNodeIterator(e) {
1867
- return I.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1867
+ return ie.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1868
1868
  }, xn = function _stripTemplateExpressions(e) {
1869
- return e = pt(e, ce, " "), e = pt(e, ue, " "), e = pt(e, de, " "), e;
1869
+ return e = mt(e, se, " "), e = mt(e, ce, " "), e = mt(e, ue, " "), e;
1870
1870
  }, Sn = function _scrubTemplateExpressions(e) {
1871
1871
  e.normalize();
1872
- let t = I.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1872
+ let t = ie.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1873
1873
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1874
1874
  let r = e.querySelectorAll?.call(e, "template");
1875
- r && rt(r, (e) => {
1875
+ r && it(r, (e) => {
1876
1876
  wn(e.content) && Sn(e.content);
1877
1877
  });
1878
1878
  }, Cn = function _isClobbered(e) {
@@ -1881,7 +1881,7 @@ function createDOMPurify() {
1881
1881
  }, wn = function _isDocumentFragment(e) {
1882
1882
  if (!S || typeof e != "object" || !e) return !1;
1883
1883
  try {
1884
- return S(e) === qt.documentFragment;
1884
+ return S(e) === Yt.documentFragment;
1885
1885
  } catch {
1886
1886
  return !1;
1887
1887
  }
@@ -1894,51 +1894,51 @@ function createDOMPurify() {
1894
1894
  }
1895
1895
  };
1896
1896
  function _executeHooks(e, t, n) {
1897
- e.length !== 0 && rt(e, (e) => {
1897
+ e.length !== 0 && it(e, (e) => {
1898
1898
  e.call(DOMPurify, t, n, nn);
1899
1899
  });
1900
1900
  }
1901
1901
  let En = function _isUnsafeNode(e, t) {
1902
- return !!(Ae && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || Ae && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || Ae && e.nodeType === qt.comment && Z(Wt, e.data));
1902
+ return !!(Oe && e.hasChildNodes() && !Tn(e.firstElementChild) && St(Gt, e.textContent) && St(Gt, e.innerHTML) || Oe && e.namespaceURI === J && t === "style" && Tn(e.firstElementChild) || e.nodeType === Yt.processingInstruction || Oe && e.nodeType === Yt.comment && St(Kt, e.data));
1903
1903
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1904
- if (!Se[t] && jn(t) && (G.tagNameCheck instanceof RegExp && Z(G.tagNameCheck, t) || G.tagNameCheck instanceof Function && G.tagNameCheck(t))) return !1;
1905
- if (He && !Ge[t]) {
1904
+ if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp && St(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1905
+ if (Be && !Ue[t]) {
1906
1906
  let t = v(e), n = _(e);
1907
1907
  if (n && t) {
1908
1908
  let r = n.length;
1909
1909
  for (let i = r - 1; i >= 0; --i) {
1910
- let r = Ue ? n[i] : p(n[i], !0);
1910
+ let r = Ve ? n[i] : p(n[i], !0);
1911
1911
  t.insertBefore(r, h(e));
1912
1912
  }
1913
1913
  }
1914
1914
  }
1915
1915
  return pn(e), !0;
1916
1916
  }, On = function _sanitizeElements(e, t) {
1917
- if (_executeHooks(R.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1917
+ if (_executeHooks(B.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1918
1918
  if (Cn(e)) return pn(e), !0;
1919
1919
  let n = Q(C ? C(e) : e.nodeName);
1920
- if (_executeHooks(R.uponSanitizeElement, e, {
1920
+ if (_executeHooks(B.uponSanitizeElement, e, {
1921
1921
  tagName: n,
1922
- allowedTags: U
1922
+ allowedTags: W
1923
1923
  }), e !== t && v(e) === null) return !0;
1924
1924
  if (En(e, n)) return pn(e), !0;
1925
- if (Se[n] || !(we.tagCheck instanceof Function && we.tagCheck(n)) && !U[n]) {
1925
+ if (be[n] || !(q.tagCheck instanceof Function && q.tagCheck(n)) && !W[n]) {
1926
1926
  let t = Dn(e, n);
1927
- return t === !1 && _executeHooks(R.afterSanitizeElements, e, null), t;
1927
+ return t === !1 && _executeHooks(B.afterSanitizeElements, e, null), t;
1928
1928
  }
1929
- if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1930
- if (ke && e.nodeType === qt.text) {
1929
+ if ((S ? S(e) : e.nodeType) === Yt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && St(qt, e.innerHTML)) return pn(e), !0;
1930
+ if (De && e.nodeType === Yt.text) {
1931
1931
  let t = xn(e.textContent);
1932
- e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1932
+ e.textContent !== t && (ct(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1933
1933
  }
1934
- return _executeHooks(R.afterSanitizeElements, e, null), !1;
1934
+ return _executeHooks(B.afterSanitizeElements, e, null), !1;
1935
1935
  }, kn = function _isValidAttribute(e, n, r) {
1936
- if (Ce[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1937
- let i = W[n] || we.attributeCheck instanceof Function && we.attributeCheck(n, e);
1938
- if (!(Ee && Z(B, n)) && !(Te && Z(H, n))) {
1936
+ if (Se[n] || Oe && n === "patchsrc" || Oe && n === "for" && e !== "label" && e !== "output" || Le && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1937
+ let i = G[n] || q.attributeCheck instanceof Function && q.attributeCheck(n, e);
1938
+ if (!(we && St(de, n)) && !(Ce && St(H, n))) {
1939
1939
  if (!i) {
1940
- if (!(jn(e) && (G.tagNameCheck instanceof RegExp && Z(G.tagNameCheck, e) || G.tagNameCheck instanceof Function && G.tagNameCheck(e)) && (G.attributeNameCheck instanceof RegExp && Z(G.attributeNameCheck, n) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(n, e)) || n === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && Z(G.tagNameCheck, r) || G.tagNameCheck instanceof Function && G.tagNameCheck(r)))) return !1;
1941
- } else if (!Xe[n] && !Z(ve, pt(r, he, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(De && !Z(pe, pt(r, he, ""))) && r) return !1;
1940
+ if (!(jn(e) && (K.tagNameCheck instanceof RegExp && St(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && St(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && St(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1941
+ } else if (!qe[n] && !St(_e, mt(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && ht(r, "data:") === 0 && Ge[e]) && !(Te && !St(U, mt(r, pe, ""))) && r) return !1;
1942
1942
  }
1943
1943
  return !0;
1944
1944
  }, An = addToSet({}, [
@@ -1951,37 +1951,37 @@ function createDOMPurify() {
1951
1951
  "font-face-uri",
1952
1952
  "missing-glyph"
1953
1953
  ]), jn = function _isBasicCustomElement(e) {
1954
- return !An[ut(e)] && Z(_e, e);
1954
+ return !An[dt(e)] && St(he, e);
1955
1955
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1956
1956
  if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1957
- case "TrustedHTML": return M(r);
1958
- case "TrustedScriptURL": return P(r);
1957
+ case "TrustedHTML": return j(r);
1958
+ case "TrustedScriptURL": return M(r);
1959
1959
  }
1960
1960
  return r;
1961
1961
  }, Nn = function _setAttributeValue(e, t, n, r) {
1962
1962
  try {
1963
- n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : at(DOMPurify.removed);
1963
+ n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : st(DOMPurify.removed);
1964
1964
  } catch {
1965
1965
  hn(t, e);
1966
1966
  }
1967
1967
  }, Pn = function _sanitizeAttributes(e) {
1968
- _executeHooks(R.beforeSanitizeAttributes, e, null);
1968
+ _executeHooks(B.beforeSanitizeAttributes, e, null);
1969
1969
  let t = e.attributes;
1970
1970
  if (!t || Cn(e)) return;
1971
1971
  let n = {
1972
1972
  attrName: "",
1973
1973
  attrValue: "",
1974
1974
  keepAttr: !0,
1975
- allowedAttributes: W,
1975
+ allowedAttributes: G,
1976
1976
  forceKeepAttr: void 0
1977
1977
  }, r = t.length, i = Q(e.nodeName);
1978
1978
  for (; r--;) {
1979
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1980
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1979
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : gt(f);
1980
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(B.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") && ht(p, ze) !== 0 && (hn(o, e), p = ze + p), Oe && St(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1981
1981
  hn(o, e);
1982
1982
  continue;
1983
1983
  }
1984
- if (u === "attributename" && ft(p, "href")) {
1984
+ if (u === "attributename" && pt(p, "href")) {
1985
1985
  hn(o, e);
1986
1986
  continue;
1987
1987
  }
@@ -1990,25 +1990,25 @@ function createDOMPurify() {
1990
1990
  hn(o, e);
1991
1991
  continue;
1992
1992
  }
1993
- if (!Oe && Z(Kt, p)) {
1993
+ if (!Ee && St(Jt, p)) {
1994
1994
  hn(o, e);
1995
1995
  continue;
1996
1996
  }
1997
- if (ke && (p = xn(p)), !kn(i, u, p)) {
1997
+ if (De && (p = xn(p)), !kn(i, u, p)) {
1998
1998
  hn(o, e);
1999
1999
  continue;
2000
2000
  }
2001
2001
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
2002
2002
  }
2003
2003
  }
2004
- _executeHooks(R.afterSanitizeAttributes, e, null);
2004
+ _executeHooks(B.afterSanitizeAttributes, e, null);
2005
2005
  }, Fn = function _sanitizeShadowDOM(e) {
2006
2006
  let t = null, n = bn(e);
2007
- for (_executeHooks(R.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(R.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === qt.element) {
2007
+ for (_executeHooks(B.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(B.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === Yt.element) {
2008
2008
  let e = b(t);
2009
2009
  wn(e) && (In(e), Fn(e));
2010
2010
  }
2011
- _executeHooks(R.afterSanitizeShadowDOM, e, null);
2011
+ _executeHooks(B.afterSanitizeShadowDOM, e, null);
2012
2012
  }, In = function _sanitizeAttachedShadowRoots(e) {
2013
2013
  let t = [{
2014
2014
  node: e,
@@ -2020,7 +2020,7 @@ function createDOMPurify() {
2020
2020
  Fn(e.shadow);
2021
2021
  continue;
2022
2022
  }
2023
- let n = e.node, r = (S ? S(n) : n.nodeType) === qt.element, i = _(n);
2023
+ let n = e.node, r = (S ? S(n) : n.nodeType) === Yt.element, i = _(n);
2024
2024
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
2025
2025
  node: i[e],
2026
2026
  shadow: null
@@ -2049,73 +2049,73 @@ function createDOMPurify() {
2049
2049
  };
2050
2050
  return DOMPurify.sanitize = function(e) {
2051
2051
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
2052
- if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
2052
+ if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Ct("dirty is not a string, aborting");
2053
2053
  if (!DOMPurify.isSupported) return e;
2054
- Me ? (U = Ne, W = Pe) : on(t), (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && (U = clone(U)), R.uponSanitizeAttribute.length > 0 && (W = clone(W)), DOMPurify.removed = [];
2055
- let s = Ue && typeof e != "string" && Tn(e);
2054
+ Ae ? (W = je, G = Me) : on(t), (B.uponSanitizeElement.length > 0 || B.uponSanitizeAttribute.length > 0) && (W = clone(W)), B.uponSanitizeAttribute.length > 0 && (G = clone(G)), DOMPurify.removed = [];
2055
+ let s = Ve && typeof e != "string" && Tn(e);
2056
2056
  if (s) {
2057
2057
  vn(e);
2058
2058
  let t = C ? C(e) : e.nodeName;
2059
2059
  if (typeof t == "string") {
2060
2060
  let n = Q(t);
2061
- if (!U[n] || Se[n]) throw mn(e), xt("root node is forbidden and cannot be sanitized in-place");
2061
+ if (!W[n] || be[n]) throw mn(e), Ct("root node is forbidden and cannot be sanitized in-place");
2062
2062
  }
2063
- if (Cn(e)) throw mn(e), xt("root node is clobbered and cannot be sanitized in-place");
2063
+ if (Cn(e)) throw mn(e), Ct("root node is clobbered and cannot be sanitized in-place");
2064
2064
  try {
2065
2065
  In(e);
2066
2066
  } catch (t) {
2067
2067
  throw mn(e), t;
2068
2068
  }
2069
- } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2069
+ } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === Yt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2070
2070
  else {
2071
- if (!Ie && !ke && !je && e.indexOf("<") === -1) return T && Re ? M(e) : e;
2072
- if (r = yn(e), !r) return Ie ? null : Re ? k : "";
2071
+ if (!Pe && !De && !ke && e.indexOf("<") === -1) return T && Ie ? j(e) : e;
2072
+ if (r = yn(e), !r) return Pe ? null : Ie ? te : "";
2073
2073
  }
2074
- r && Fe && pn(r.firstChild);
2074
+ r && Ne && pn(r.firstChild);
2075
2075
  let c = s ? e : r, u = bn(c);
2076
2076
  try {
2077
2077
  for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
2078
2078
  } catch (t) {
2079
- throw s && (mn(e), rt(DOMPurify.removed, (e) => {
2079
+ throw s && (mn(e), it(DOMPurify.removed, (e) => {
2080
2080
  e.element && _n(e.element);
2081
2081
  })), t;
2082
2082
  }
2083
- if (s) return rt(DOMPurify.removed, (e) => {
2083
+ if (s) return it(DOMPurify.removed, (e) => {
2084
2084
  e.element && _n(e.element);
2085
- }), ke && Sn(e), e;
2086
- if (Ie) {
2087
- if (ke && Sn(r), Le) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2085
+ }), De && Sn(e), e;
2086
+ if (Pe) {
2087
+ if (De && Sn(r), Fe) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2088
2088
  else o = r;
2089
- return (W.shadowroot || W.shadowrootmode) && (o = se.call(n, o, !0)), o;
2089
+ return (G.shadowroot || G.shadowrootmode) && (o = oe.call(n, o, !0)), o;
2090
2090
  }
2091
- let f = je ? r.outerHTML : r.innerHTML;
2092
- return je && U["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), ke && (f = xn(f)), T && Re ? M(f) : f;
2091
+ let f = ke ? r.outerHTML : r.innerHTML;
2092
+ return ke && W["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && St(Ut, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), De && (f = xn(f)), T && Ie ? j(f) : f;
2093
2093
  }, DOMPurify.setConfig = function() {
2094
2094
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2095
- on(e), Me = !0, Ne = U, Pe = W;
2095
+ on(e), Ae = !0, je = W, Me = G;
2096
2096
  }, DOMPurify.clearConfig = function() {
2097
- nn = null, Me = !1, Ne = null, Pe = null, T = A, k = "";
2097
+ nn = null, Ae = !1, je = null, Me = null, T = k, te = "";
2098
2098
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2099
2099
  nn || on({});
2100
2100
  let r = Q(e), i = Q(t);
2101
2101
  return kn(r, i, n);
2102
2102
  }, DOMPurify.addHook = function(e, t) {
2103
- typeof t == "function" && X(R, e) && st(R[e], t);
2103
+ typeof t == "function" && Z(B, e) && ct(B[e], t);
2104
2104
  }, DOMPurify.removeHook = function(e, t) {
2105
- if (X(R, e)) {
2105
+ if (Z(B, e)) {
2106
2106
  if (t !== void 0) {
2107
- let n = it(R[e], t);
2108
- return n === -1 ? void 0 : ct(R[e], n, 1)[0];
2107
+ let n = at(B[e], t);
2108
+ return n === -1 ? void 0 : lt(B[e], n, 1)[0];
2109
2109
  }
2110
- return at(R[e]);
2110
+ return st(B[e]);
2111
2111
  }
2112
2112
  }, DOMPurify.removeHooks = function(e) {
2113
- X(R, e) && (R[e] = []);
2113
+ Z(B, e) && (B[e] = []);
2114
2114
  }, DOMPurify.removeAllHooks = function() {
2115
- R = Xt();
2115
+ B = Qt();
2116
2116
  }, DOMPurify;
2117
2117
  }
2118
- var Qt = createDOMPurify(), _Class;
2118
+ var en = createDOMPurify(), _Class;
2119
2119
  function z() {
2120
2120
  return {
2121
2121
  async: !1,
@@ -2130,11 +2130,11 @@ function z() {
2130
2130
  walkTokens: null
2131
2131
  };
2132
2132
  }
2133
- var $t = z();
2133
+ var tn = z();
2134
2134
  function N(e) {
2135
- $t = e;
2135
+ tn = e;
2136
2136
  }
2137
- var en = { exec: () => null };
2137
+ var Q = { exec: () => null };
2138
2138
  function E(e) {
2139
2139
  let t = [];
2140
2140
  return (n) => {
@@ -2146,19 +2146,19 @@ function d(e, t = "") {
2146
2146
  let n = typeof e == "string" ? e : e.source, r = {
2147
2147
  replace: (e, t) => {
2148
2148
  let i = typeof t == "string" ? t : t.source;
2149
- return i = i.replace(Q.caret, "$1"), n = n.replace(e, i), r;
2149
+ return i = i.replace(rn.caret, "$1"), n = n.replace(e, i), r;
2150
2150
  },
2151
2151
  getRegex: () => new RegExp(n, t)
2152
2152
  };
2153
2153
  return r;
2154
2154
  }
2155
- var tn = ((e = "") => {
2155
+ var nn = ((e = "") => {
2156
2156
  try {
2157
2157
  return !!RegExp("(?<=1)(?<!1)" + e);
2158
2158
  } catch {
2159
2159
  return !1;
2160
2160
  }
2161
- })(), Q = {
2161
+ })(), rn = {
2162
2162
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
2163
2163
  outputLinkReplace: /\\([\[\]])/g,
2164
2164
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2215,112 +2215,112 @@ var tn = ((e = "") => {
2215
2215
  headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
2216
2216
  htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
2217
2217
  blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
2218
- }, nn = /^(?:[ \t]*(?:\n|$))+/, rn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, an = /^ {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+|$)/, sn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, cn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ln = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, un = d(ln).replace(/bull/g, cn).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(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), dn = d(ln).replace(/bull/g, cn).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(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), fn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, pn = /^[^\n]+/, mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, hn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, cn).getRegex(), _n = "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", vn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, yn = d("^ {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-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", vn).replace("tag", _n).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(fn).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", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), bn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), xn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Sn = {
2219
- blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xn).getRegex(),
2220
- code: rn,
2221
- def: hn,
2222
- fences: an,
2223
- heading: sn,
2224
- hr: on,
2225
- html: yn,
2226
- lheading: un,
2227
- list: gn,
2228
- newline: nn,
2229
- paragraph: bn,
2230
- table: en,
2231
- text: pn
2232
- }, Cn = d("^ *([^\\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", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), wn = {
2233
- ...Sn,
2234
- lheading: dn,
2235
- table: Cn,
2236
- paragraph: d(fn).replace("hr", on).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Cn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex()
2237
- }, Tn = {
2238
- ...Sn,
2239
- html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", vn).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(),
2218
+ }, an = /^(?:[ \t]*(?:\n|$))+/, on = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, sn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, cn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ln = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, dn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, fn = d(dn).replace(/bull/g, un).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(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), pn = d(dn).replace(/bull/g, un).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(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), mn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, hn = /^[^\n]+/, gn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, _n = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", gn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), vn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), yn = "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]*?(?:-->|$))/, xn = d("^ {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-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", bn).replace("tag", yn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(mn).replace("hr", cn).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", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yn).getRegex(), Sn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Cn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), wn = {
2219
+ blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Cn).getRegex(),
2220
+ code: on,
2221
+ def: _n,
2222
+ fences: sn,
2223
+ heading: ln,
2224
+ hr: cn,
2225
+ html: xn,
2226
+ lheading: fn,
2227
+ list: vn,
2228
+ newline: an,
2229
+ paragraph: Sn,
2230
+ table: Q,
2231
+ text: hn
2232
+ }, Tn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", cn).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", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yn).getRegex(), En = {
2233
+ ...wn,
2234
+ lheading: pn,
2235
+ table: Tn,
2236
+ paragraph: d(mn).replace("hr", cn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Tn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yn).getRegex()
2237
+ }, Dn = {
2238
+ ...wn,
2239
+ html: d("^ *(?: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(),
2240
2240
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2241
2241
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2242
- fences: en,
2242
+ fences: Q,
2243
2243
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2244
- paragraph: d(fn).replace("hr", on).replace("heading", " *#{1,6} *[^\n]").replace("lheading", un).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2245
- }, En = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, On = /^( {2,}|\\)\n(?!\s*$)/, kn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, An = /[\p{P}\p{S}]/u, jn = /[\s\p{P}\p{S}]/u, Mn = /[^\s\p{P}\p{S}]/u, Nn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, jn).getRegex(), Pn = /(?!~)[\p{P}\p{S}]/u, Fn = /(?!~)[\s\p{P}\p{S}]/u, In = /(?:[^\s\p{P}\p{S}]|~)/u, Ln = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Rn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, zn = d(Rn, "u").replace(/punct/g, An).getRegex(), Bn = d(Rn, "u").replace(/punct/g, Pn).getRegex(), Vn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hn = d(Vn, "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), Un = d(Vn, "gu").replace(/notPunctSpace/g, In).replace(/punctSpace/g, Fn).replace(/punct/g, Pn).getRegex(), Wn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), Gn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, An).getRegex(), Kn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), qn = d(/\\(punct)/, "gu").replace(/punct/g, An).getRegex(), Jn = d(/^<(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(), Yn = d(vn).replace("(?:-->|$)", "-->").getRegex(), Xn = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Yn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Zn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Qn = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Zn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), $n = d(/^!?\[(label)\]\[(ref)\]/).replace("label", Zn).replace("ref", mn).getRegex(), er = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), tr = d("reflink|nolink(?!\\()", "g").replace("reflink", $n).replace("nolink", er).getRegex(), nr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, rr = {
2246
- _backpedal: en,
2247
- anyPunctuation: qn,
2248
- autolink: Jn,
2249
- blockSkip: Ln,
2250
- br: On,
2251
- code: Dn,
2252
- del: en,
2253
- delLDelim: en,
2254
- delRDelim: en,
2255
- emStrongLDelim: zn,
2256
- emStrongRDelimAst: Hn,
2257
- emStrongRDelimUnd: Wn,
2258
- escape: En,
2259
- link: Qn,
2260
- nolink: er,
2261
- punctuation: Nn,
2262
- reflink: $n,
2263
- reflinkSearch: tr,
2264
- tag: Xn,
2265
- text: kn,
2266
- url: en
2267
- }, ir = {
2268
- ...rr,
2269
- link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Zn).getRegex(),
2270
- reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Zn).getRegex()
2271
- }, ar = {
2272
- ...rr,
2273
- emStrongRDelimAst: Un,
2274
- emStrongLDelim: Bn,
2275
- delLDelim: Gn,
2276
- delRDelim: Kn,
2277
- url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", nr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2278
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2279
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2280
- text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", nr).getRegex()
2244
+ paragraph: d(mn).replace("hr", cn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", fn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2245
+ }, On = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, An = /^( {2,}|\\)\n(?!\s*$)/, jn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Mn = /[\p{P}\p{S}]/u, Nn = /[\s\p{P}\p{S}]/u, Pn = /[^\s\p{P}\p{S}]/u, Fn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Nn).getRegex(), In = /(?!~)[\p{P}\p{S}]/u, Ln = /(?!~)[\s\p{P}\p{S}]/u, Rn = /(?:[^\s\p{P}\p{S}]|~)/u, zn = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", nn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Bn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Vn = d(Bn, "u").replace(/punct/g, Mn).getRegex(), Hn = d(Bn, "u").replace(/punct/g, In).getRegex(), Un = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Wn = d(Un, "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Nn).replace(/punct/g, Mn).getRegex(), Gn = d(Un, "gu").replace(/notPunctSpace/g, Rn).replace(/punctSpace/g, Ln).replace(/punct/g, In).getRegex(), Kn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Nn).replace(/punct/g, Mn).getRegex(), qn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Mn).getRegex(), Jn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Nn).replace(/punct/g, Mn).getRegex(), Yn = d(/\\(punct)/, "gu").replace(/punct/g, Mn).getRegex(), Xn = d(/^<(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(), Zn = d(bn).replace("(?:-->|$)", "-->").getRegex(), Qn = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Zn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $n = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, er = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", $n).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), tr = d(/^!?\[(label)\]\[(ref)\]/).replace("label", $n).replace("ref", gn).getRegex(), nr = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", gn).getRegex(), rr = d("reflink|nolink(?!\\()", "g").replace("reflink", tr).replace("nolink", nr).getRegex(), ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ar = {
2246
+ _backpedal: Q,
2247
+ anyPunctuation: Yn,
2248
+ autolink: Xn,
2249
+ blockSkip: zn,
2250
+ br: An,
2251
+ code: kn,
2252
+ del: Q,
2253
+ delLDelim: Q,
2254
+ delRDelim: Q,
2255
+ emStrongLDelim: Vn,
2256
+ emStrongRDelimAst: Wn,
2257
+ emStrongRDelimUnd: Kn,
2258
+ escape: On,
2259
+ link: er,
2260
+ nolink: nr,
2261
+ punctuation: Fn,
2262
+ reflink: tr,
2263
+ reflinkSearch: rr,
2264
+ tag: Qn,
2265
+ text: jn,
2266
+ url: Q
2281
2267
  }, or = {
2282
2268
  ...ar,
2283
- br: d(On).replace("{2,}", "*").getRegex(),
2284
- text: d(ar.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2269
+ link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", $n).getRegex(),
2270
+ reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $n).getRegex()
2285
2271
  }, sr = {
2286
- normal: Sn,
2287
- gfm: wn,
2288
- pedantic: Tn
2272
+ ...ar,
2273
+ emStrongRDelimAst: Gn,
2274
+ emStrongLDelim: Hn,
2275
+ delLDelim: qn,
2276
+ delRDelim: Jn,
2277
+ url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2278
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2279
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2280
+ text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ir).getRegex()
2289
2281
  }, cr = {
2290
- normal: rr,
2291
- gfm: ar,
2292
- breaks: or,
2293
- pedantic: ir
2282
+ ...sr,
2283
+ br: d(An).replace("{2,}", "*").getRegex(),
2284
+ text: d(sr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2294
2285
  }, lr = {
2286
+ normal: wn,
2287
+ gfm: En,
2288
+ pedantic: Dn
2289
+ }, ur = {
2290
+ normal: ar,
2291
+ gfm: sr,
2292
+ breaks: cr,
2293
+ pedantic: or
2294
+ }, dr = {
2295
2295
  "&": "&amp;",
2296
2296
  "<": "&lt;",
2297
2297
  ">": "&gt;",
2298
2298
  "\"": "&quot;",
2299
2299
  "'": "&#39;"
2300
- }, ge = (e) => lr[e];
2300
+ }, ge = (e) => dr[e];
2301
2301
  function O(e, t) {
2302
2302
  if (t) {
2303
- if (Q.escapeTest.test(e)) return e.replace(Q.escapeReplace, ge);
2304
- } else if (Q.escapeTestNoEncode.test(e)) return e.replace(Q.escapeReplaceNoEncode, ge);
2303
+ if (rn.escapeTest.test(e)) return e.replace(rn.escapeReplace, ge);
2304
+ } else if (rn.escapeTestNoEncode.test(e)) return e.replace(rn.escapeReplaceNoEncode, ge);
2305
2305
  return e;
2306
2306
  }
2307
2307
  function V(e) {
2308
2308
  try {
2309
- e = encodeURI(e).replace(Q.percentDecode, "%");
2309
+ e = encodeURI(e).replace(rn.percentDecode, "%");
2310
2310
  } catch {
2311
2311
  return null;
2312
2312
  }
2313
2313
  return e;
2314
2314
  }
2315
2315
  function Y(e, t) {
2316
- let n = e.replace(Q.findPipe, (e, t, n) => {
2316
+ let n = e.replace(rn.findPipe, (e, t, n) => {
2317
2317
  let r = !1, i = t;
2318
2318
  for (; --i >= 0 && n[i] === "\\";) r = !r;
2319
2319
  return r ? "|" : " |";
2320
- }).split(Q.splitPipe), r = 0;
2320
+ }).split(rn.splitPipe), r = 0;
2321
2321
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
2322
2322
  else for (; n.length < t;) n.push("");
2323
- for (; r < n.length; r++) n[r] = n[r].trim().replace(Q.slashPipe, "|");
2323
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(rn.slashPipe, "|");
2324
2324
  return n;
2325
2325
  }
2326
2326
  function $(e, t, n) {
@@ -2337,7 +2337,7 @@ function $(e, t, n) {
2337
2337
  }
2338
2338
  function ee(e) {
2339
2339
  let t = e.split("\n"), n = t.length - 1;
2340
- for (; n >= 0 && Q.blankLine.test(t[n]);) n--;
2340
+ for (; n >= 0 && rn.blankLine.test(t[n]);) n--;
2341
2341
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2342
2342
  }
2343
2343
  function fe(e, t) {
@@ -2382,7 +2382,7 @@ function ot(e, t, n) {
2382
2382
  }
2383
2383
  var w = class {
2384
2384
  constructor(t) {
2385
- e(this, "options", void 0), e(this, "rules", void 0), e(this, "lexer", void 0), this.options = t || $t;
2385
+ e(this, "options", void 0), e(this, "rules", void 0), e(this, "lexer", void 0), this.options = t || tn;
2386
2386
  }
2387
2387
  space(e) {
2388
2388
  let t = this.rules.block.newline.exec(e);
@@ -2832,24 +2832,24 @@ ${c}` : c;
2832
2832
  };
2833
2833
  }
2834
2834
  }
2835
- }, ur = class l {
2835
+ }, fr = class l {
2836
2836
  constructor(t) {
2837
- e(this, "tokens", void 0), e(this, "options", void 0), e(this, "state", void 0), e(this, "inlineQueue", void 0), e(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = t || $t, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2837
+ e(this, "tokens", void 0), e(this, "options", void 0), e(this, "state", void 0), e(this, "inlineQueue", void 0), e(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = t || tn, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2838
2838
  inLink: !1,
2839
2839
  inRawBlock: !1,
2840
2840
  top: !0
2841
2841
  };
2842
2842
  let n = {
2843
- other: Q,
2844
- block: sr.normal,
2845
- inline: cr.normal
2843
+ other: rn,
2844
+ block: lr.normal,
2845
+ inline: ur.normal
2846
2846
  };
2847
- this.options.pedantic ? (n.block = sr.pedantic, n.inline = cr.pedantic) : this.options.gfm && (n.block = sr.gfm, this.options.breaks ? n.inline = cr.breaks : n.inline = cr.gfm), this.tokenizer.rules = n;
2847
+ this.options.pedantic ? (n.block = lr.pedantic, n.inline = ur.pedantic) : this.options.gfm && (n.block = lr.gfm, this.options.breaks ? n.inline = ur.breaks : n.inline = ur.gfm), this.tokenizer.rules = n;
2848
2848
  }
2849
2849
  static get rules() {
2850
2850
  return {
2851
- block: sr,
2852
- inline: cr
2851
+ block: lr,
2852
+ inline: ur
2853
2853
  };
2854
2854
  }
2855
2855
  static lex(e, t) {
@@ -2859,7 +2859,7 @@ ${c}` : c;
2859
2859
  return new l(t).inlineTokens(e);
2860
2860
  }
2861
2861
  lex(e) {
2862
- e = e.replace(Q.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2862
+ e = e.replace(rn.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2863
2863
  for (let e = 0; e < this.inlineQueue.length; e++) {
2864
2864
  let t = this.inlineQueue[e];
2865
2865
  this.inlineTokens(t.src, t.tokens);
@@ -2867,7 +2867,7 @@ ${c}` : c;
2867
2867
  return this.inlineQueue = [], this.tokens;
2868
2868
  }
2869
2869
  blockTokens(e, t = [], n = !1) {
2870
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Q.tabCharGlobal, " ").replace(Q.spaceLine, ""));
2870
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(rn.tabCharGlobal, " ").replace(rn.spaceLine, ""));
2871
2871
  let r = Infinity;
2872
2872
  for (; e;) {
2873
2873
  if (e.length < r) r = e.length;
@@ -3051,13 +3051,13 @@ ${c}` : c;
3051
3051
  }
3052
3052
  }, y = class {
3053
3053
  constructor(t) {
3054
- e(this, "options", void 0), e(this, "parser", void 0), this.options = t || $t;
3054
+ e(this, "options", void 0), e(this, "parser", void 0), this.options = t || tn;
3055
3055
  }
3056
3056
  space(e) {
3057
3057
  return "";
3058
3058
  }
3059
3059
  code({ text: e, lang: t, escaped: n }) {
3060
- let r = (t || "").match(Q.notSpaceStart)?.[0], i = e.replace(Q.endingNewline, "") + "\n";
3060
+ let r = (t || "").match(rn.notSpaceStart)?.[0], i = e.replace(rn.endingNewline, "") + "\n";
3061
3061
  return r ? "<pre><code class=\"language-" + O(r) + "\">" + (n ? i : O(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : O(i, !0)) + "</code></pre>\n";
3062
3062
  }
3063
3063
  blockquote({ tokens: e }) {
@@ -3185,9 +3185,9 @@ ${e}</tr>
3185
3185
  checkbox({ raw: e }) {
3186
3186
  return e;
3187
3187
  }
3188
- }, dr = class l {
3188
+ }, pr = class l {
3189
3189
  constructor(t) {
3190
- e(this, "options", void 0), e(this, "renderer", void 0), e(this, "textRenderer", void 0), this.options = t || $t, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
3190
+ e(this, "options", void 0), e(this, "renderer", void 0), e(this, "textRenderer", void 0), this.options = t || tn, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
3191
3191
  }
3192
3192
  static parse(e, t) {
3193
3193
  return new l(t).parse(e);
@@ -3333,9 +3333,9 @@ ${e}</tr>
3333
3333
  }
3334
3334
  return n;
3335
3335
  }
3336
- }, fr = (_Class = class {
3336
+ }, mr = (_Class = class {
3337
3337
  constructor(t) {
3338
- e(this, "options", void 0), e(this, "block", void 0), this.options = t || $t;
3338
+ e(this, "options", void 0), e(this, "block", void 0), this.options = t || tn;
3339
3339
  }
3340
3340
  preprocess(e) {
3341
3341
  return e;
@@ -3350,10 +3350,10 @@ ${e}</tr>
3350
3350
  return e;
3351
3351
  }
3352
3352
  provideLexer(e = this.block) {
3353
- return e ? ur.lex : ur.lexInline;
3353
+ return e ? fr.lex : fr.lexInline;
3354
3354
  }
3355
3355
  provideParser(e = this.block) {
3356
- return e ? dr.parse : dr.parseInline;
3356
+ return e ? pr.parse : pr.parseInline;
3357
3357
  }
3358
3358
  }, e(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
3359
3359
  "preprocess",
@@ -3366,7 +3366,7 @@ ${e}</tr>
3366
3366
  "processAllTokens"
3367
3367
  ])), _Class), D = class {
3368
3368
  constructor(...t) {
3369
- e(this, "defaults", z()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", dr), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", ur), e(this, "Tokenizer", w), e(this, "Hooks", fr), this.use(...t);
3369
+ e(this, "defaults", z()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", pr), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", fr), e(this, "Tokenizer", w), e(this, "Hooks", mr), this.use(...t);
3370
3370
  }
3371
3371
  walkTokens(e, t) {
3372
3372
  let n = [];
@@ -3445,13 +3445,13 @@ ${e}</tr>
3445
3445
  n.tokenizer = t;
3446
3446
  }
3447
3447
  if (e.hooks) {
3448
- let t = this.defaults.hooks || new fr();
3448
+ let t = this.defaults.hooks || new mr();
3449
3449
  for (let n in e.hooks) {
3450
3450
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
3451
3451
  if (["options", "block"].includes(n)) continue;
3452
3452
  let r = n, i = e.hooks[r], a = t[r];
3453
- fr.passThroughHooks.has(n) ? t[r] = (e) => {
3454
- if (this.defaults.async && fr.passThroughHooksRespectAsync.has(n)) return (async () => {
3453
+ mr.passThroughHooks.has(n) ? t[r] = (e) => {
3454
+ if (this.defaults.async && mr.passThroughHooksRespectAsync.has(n)) return (async () => {
3455
3455
  let n = await i.call(t, e);
3456
3456
  return a.call(t, n);
3457
3457
  })();
@@ -3488,10 +3488,10 @@ ${e}</tr>
3488
3488
  }, this;
3489
3489
  }
3490
3490
  lexer(e, t) {
3491
- return ur.lex(e, t ?? this.defaults);
3491
+ return fr.lex(e, t ?? this.defaults);
3492
3492
  }
3493
3493
  parser(e, t) {
3494
- return dr.parse(e, t ?? this.defaults);
3494
+ return pr.parse(e, t ?? this.defaults);
3495
3495
  }
3496
3496
  parseMarkdown(e) {
3497
3497
  return (t, n) => {
@@ -3503,16 +3503,16 @@ ${e}</tr>
3503
3503
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
3504
3504
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
3505
3505
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
3506
- let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? ur.lex : ur.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3506
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? fr.lex : fr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3507
3507
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
3508
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(a, i);
3508
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? pr.parse : pr.parseInline)(a, i);
3509
3509
  return i.hooks ? await i.hooks.postprocess(o) : o;
3510
3510
  })().catch(a);
3511
3511
  try {
3512
3512
  i.hooks && (t = i.hooks.preprocess(t));
3513
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? ur.lex : ur.lexInline)(t, i);
3513
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? fr.lex : fr.lexInline)(t, i);
3514
3514
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
3515
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(n, i);
3515
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? pr.parse : pr.parseInline)(n, i);
3516
3516
  return i.hooks && (r = i.hooks.postprocess(r)), r;
3517
3517
  } catch (e) {
3518
3518
  return a(e);
@@ -3529,20 +3529,20 @@ ${e}</tr>
3529
3529
  throw n;
3530
3530
  };
3531
3531
  }
3532
- }, pr = new D();
3532
+ }, hr = new D();
3533
3533
  function g(e, t) {
3534
- return pr.parse(e, t);
3534
+ return hr.parse(e, t);
3535
3535
  }
3536
3536
  g.options = g.setOptions = function(e) {
3537
- return pr.setOptions(e), g.defaults = pr.defaults, N(g.defaults), g;
3538
- }, g.getDefaults = z, g.defaults = $t, g.use = function(...e) {
3539
- return pr.use(...e), g.defaults = pr.defaults, N(g.defaults), g;
3537
+ return hr.setOptions(e), g.defaults = hr.defaults, N(g.defaults), g;
3538
+ }, g.getDefaults = z, g.defaults = tn, g.use = function(...e) {
3539
+ return hr.use(...e), g.defaults = hr.defaults, N(g.defaults), g;
3540
3540
  }, g.walkTokens = function(e, t) {
3541
- return pr.walkTokens(e, t);
3542
- }, g.parseInline = pr.parseInline, g.Parser = dr, g.parser = dr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = ur, g.lexer = ur.lex, g.Tokenizer = w, g.Hooks = fr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, dr.parse, ur.lex;
3541
+ return hr.walkTokens(e, t);
3542
+ }, g.parseInline = hr.parseInline, g.Parser = pr, g.parser = pr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = fr, g.lexer = fr.lex, g.Tokenizer = w, g.Hooks = mr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, pr.parse, fr.lex;
3543
3543
  //#endregion
3544
3544
  //#region agent/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
3545
- var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _r = ["onClick"], vr = /* @__PURE__ */ S({
3545
+ var gr = ["aria-label"], _r = { class: "px-4 pb-2 pt-4" }, vr = ["innerHTML"], yr = ["onClick"], br = /* @__PURE__ */ T({
3546
3546
  __name: "ChatCardBlock",
3547
3547
  props: {
3548
3548
  spec: {},
@@ -3550,11 +3550,11 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3550
3550
  },
3551
3551
  emits: ["action"],
3552
3552
  setup(e, { emit: t }) {
3553
- let n = e, r = t, i = p(() => {
3553
+ let n = e, r = t, i = h(() => {
3554
3554
  if (!n.spec.body) return "";
3555
3555
  let e = g.parse(n.spec.body, { async: !1 });
3556
- return Qt.sanitize(e, { ADD_ATTR: ["target"] });
3557
- }), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = p(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = p(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = p(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = p(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), m = p(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3556
+ return en.sanitize(e, { ADD_ATTR: ["target"] });
3557
+ }), a = h(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = h(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = h(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = h(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = h(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), f = h(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3558
3558
  function actionStyle(e) {
3559
3559
  return e === "primary" || e === "destructive" ? {
3560
3560
  background: n.inverted ? "rgba(255, 255, 255, 0.92)" : "var(--color-theme-900)",
@@ -3564,45 +3564,45 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3564
3564
  color: s.value
3565
3565
  };
3566
3566
  }
3567
- return (t, n) => (j(), _("div", {
3567
+ return (t, n) => (M(), b("div", {
3568
3568
  "data-test": "chat-card",
3569
3569
  class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",
3570
- style: k({
3571
- background: m.value,
3570
+ style: A({
3571
+ background: f.value,
3572
3572
  boxShadow: u.value
3573
3573
  }),
3574
3574
  "aria-label": e.spec.title
3575
3575
  }, [
3576
- v("div", hr, [v("div", {
3576
+ x("div", _r, [x("div", {
3577
3577
  class: "text-[14px] font-semibold leading-tight",
3578
- style: k({ color: s.value })
3579
- }, I(e.spec.title), 5)]),
3580
- i.value ? (j(), _("div", {
3578
+ style: A({ color: s.value })
3579
+ }, R(e.spec.title), 5)]),
3580
+ i.value ? (M(), b("div", {
3581
3581
  key: 0,
3582
3582
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
3583
- style: k({ color: c.value }),
3583
+ style: A({ color: c.value }),
3584
3584
  innerHTML: i.value
3585
- }, null, 12, gr)) : h("", !0),
3586
- e.spec.actions?.length ? (j(), _("div", {
3585
+ }, null, 12, vr)) : v("", !0),
3586
+ e.spec.actions?.length ? (M(), b("div", {
3587
3587
  key: 1,
3588
3588
  class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
3589
- style: k({ borderTop: `1px solid ${o.value}` })
3590
- }, [(j(!0), _(f, null, P(e.spec.actions, (e) => (j(), _("button", {
3589
+ style: A({ borderTop: `1px solid ${o.value}` })
3590
+ }, [(M(!0), b(m, null, F(e.spec.actions, (e) => (M(), b("button", {
3591
3591
  key: e.label,
3592
3592
  type: "button",
3593
3593
  "data-test": "chat-card-action",
3594
3594
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3595
- style: k(actionStyle(e.style)),
3595
+ style: A(actionStyle(e.style)),
3596
3596
  onClick: (t) => r("action", e.reply)
3597
- }, I(e.label), 13, _r))), 128))], 4)) : h("", !0)
3598
- ], 12, mr));
3597
+ }, R(e.label), 13, yr))), 128))], 4)) : v("", !0)
3598
+ ], 12, gr));
3599
3599
  }
3600
- }), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
3600
+ }), xr = 112, Sr = 52, Cr = 14, wr = 54, Tr = 34, Er = 260;
3601
3601
  function nodeWidthFor(e) {
3602
3602
  let { orientation: t, maxRows: n, maxWidth: r } = e;
3603
- if (t === "horizontal" || !r) return yr;
3604
- let i = r - xr * 2 - (n - 1) * Sr;
3605
- return Math.min(wr, Math.max(yr, Math.floor(i / n)));
3603
+ if (t === "horizontal" || !r) return xr;
3604
+ let i = r - Cr * 2 - (n - 1) * wr;
3605
+ return Math.min(Er, Math.max(xr, Math.floor(i / n)));
3606
3606
  }
3607
3607
  function orientationFor(e) {
3608
3608
  return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
@@ -3639,11 +3639,11 @@ function buildLayout(e, t, n) {
3639
3639
  orientation: t,
3640
3640
  maxRows: o,
3641
3641
  ...n === void 0 ? {} : { maxWidth: n }
3642
- }), u = t === "horizontal" ? xr * 2 + s * c + (s - 1) * Sr : xr * 2 + o * c + (o - 1) * Sr, f = t === "horizontal" ? xr * 2 + o * br + (o - 1) * Cr : xr * 2 + s * br + (s - 1) * Cr, p = [];
3642
+ }), u = t === "horizontal" ? Cr * 2 + s * c + (s - 1) * wr : Cr * 2 + o * c + (o - 1) * wr, f = t === "horizontal" ? Cr * 2 + o * Sr + (o - 1) * Tr : Cr * 2 + s * Sr + (s - 1) * Tr, p = [];
3643
3643
  for (let [e, [, n]] of a.entries()) {
3644
- let r = (o - n.length) * (t === "horizontal" ? 86 : c + Sr) / 2;
3644
+ let r = (o - n.length) * (t === "horizontal" ? 86 : c + wr) / 2;
3645
3645
  for (let [i, a] of n.entries()) {
3646
- let n = t === "horizontal" ? xr + e * (c + Sr) : xr + r + i * (c + Sr), o = t === "horizontal" ? xr + r + i * 86 : xr + e * 86;
3646
+ let n = t === "horizontal" ? Cr + e * (c + wr) : Cr + r + i * (c + wr), o = t === "horizontal" ? Cr + r + i * 86 : Cr + e * 86;
3647
3647
  p.push({
3648
3648
  id: a.id,
3649
3649
  label: a.label,
@@ -3652,7 +3652,7 @@ function buildLayout(e, t, n) {
3652
3652
  x: n,
3653
3653
  y: o,
3654
3654
  width: c,
3655
- height: br
3655
+ height: Sr
3656
3656
  });
3657
3657
  }
3658
3658
  }
@@ -3729,14 +3729,14 @@ function formatChatVisualTick(e) {
3729
3729
  let { prefix: r, suffix: i } = affixes(n);
3730
3730
  return `${r}${formatChatVisualValue({ value: t })}${i}`;
3731
3731
  }
3732
- var Tr = 5.4, Er = 10, Dr = 15, Or = 16;
3732
+ var Dr = 5.4, Or = 10, kr = 15, Ar = 16;
3733
3733
  function planChatVisualXLabels(e) {
3734
3734
  let { labels: t, plotWidth: n } = e;
3735
3735
  if (!t.length || n <= 0) return {
3736
3736
  mode: "horizontal",
3737
3737
  entries: []
3738
3738
  };
3739
- let r = t.map((e) => e.length > Or ? `${e.slice(0, Or - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3739
+ let r = t.map((e) => e.length > Ar ? `${e.slice(0, Ar - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3740
3740
  if (i === 0) return {
3741
3741
  mode: "horizontal",
3742
3742
  entries: [{
@@ -3744,14 +3744,14 @@ function planChatVisualXLabels(e) {
3744
3744
  text: r[0]
3745
3745
  }]
3746
3746
  };
3747
- if ((Math.max(...r.map((e) => e.length * Tr)) + Er) * t.length <= n) return {
3747
+ if ((Math.max(...r.map((e) => e.length * Dr)) + Or) * t.length <= n) return {
3748
3748
  mode: "horizontal",
3749
3749
  entries: r.map((e, t) => ({
3750
3750
  index: t,
3751
3751
  text: e
3752
3752
  }))
3753
3753
  };
3754
- let a = Math.max(2, Math.floor(n / Dr));
3754
+ let a = Math.max(2, Math.floor(n / kr));
3755
3755
  if (t.length <= a) return {
3756
3756
  mode: "angled",
3757
3757
  entries: r.map((e, t) => ({
@@ -3771,22 +3771,22 @@ function planChatVisualXLabels(e) {
3771
3771
  }
3772
3772
  //#endregion
3773
3773
  //#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
3774
- var kr = [
3774
+ var jr = [
3775
3775
  "data-visual-type",
3776
3776
  "data-chart-type",
3777
3777
  "data-stacking",
3778
3778
  "data-diagram-type",
3779
3779
  "aria-label"
3780
- ], Ar = { class: "mb-2.5" }, jr = ["aria-label"], Mr = {
3780
+ ], Mr = { class: "mb-2.5" }, Nr = ["aria-label"], Pr = {
3781
3781
  key: 0,
3782
3782
  "data-test": "chat-visual-horizontal-bars",
3783
3783
  class: "grid gap-3"
3784
- }, Nr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Pr = ["viewBox"], Fr = [
3784
+ }, Fr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Ir = ["viewBox"], Lr = [
3785
3785
  "x1",
3786
3786
  "x2",
3787
3787
  "y1",
3788
3788
  "y2"
3789
- ], Ir = ["x", "y"], Lr = [
3789
+ ], Rr = ["x", "y"], zr = [
3790
3790
  "data-row-index",
3791
3791
  "data-series-index",
3792
3792
  "data-data-key",
@@ -3794,56 +3794,56 @@ var kr = [
3794
3794
  "y",
3795
3795
  "width",
3796
3796
  "height"
3797
- ], Rr = ["data-trend-key", "d"], zr = ["d"], Br = ["cx", "cy"], Vr = ["cx", "cy"], Hr = [
3797
+ ], Br = ["data-trend-key", "d"], Vr = ["d"], Hr = ["cx", "cy"], Ur = ["cx", "cy"], Wr = [
3798
3798
  "x",
3799
3799
  "y",
3800
3800
  "text-anchor",
3801
3801
  "transform"
3802
- ], Ur = {
3802
+ ], Gr = {
3803
3803
  key: 2,
3804
3804
  class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
3805
- }, Wr = {
3805
+ }, Kr = {
3806
3806
  key: 1,
3807
3807
  class: "grid gap-3"
3808
- }, Gr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Kr = { class: "shrink-0 tabular-nums" }, qr = {
3808
+ }, qr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Jr = { class: "shrink-0 tabular-nums" }, Yr = {
3809
3809
  key: 2,
3810
3810
  class: "overflow-x-auto"
3811
- }, Jr = ["viewBox", "aria-label"], Yr = [
3811
+ }, Xr = ["viewBox", "aria-label"], Zr = [
3812
3812
  "data-from",
3813
3813
  "data-to",
3814
3814
  "x1",
3815
3815
  "y1",
3816
3816
  "x2",
3817
3817
  "y2"
3818
- ], Xr = ["cx", "cy"], Zr = ["x", "y"], Qr = [
3818
+ ], Qr = ["cx", "cy"], $r = ["x", "y"], ei = [
3819
3819
  "data-node-id",
3820
3820
  "data-node-kind",
3821
3821
  "transform"
3822
- ], $r = ["points"], ei = ["width", "height"], ti = ["width", "height"], ni = {
3822
+ ], ti = ["points"], ni = ["width", "height"], ri = ["width", "height"], ii = {
3823
3823
  xmlns: "http://www.w3.org/1999/xhtml",
3824
3824
  class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
3825
- }, ri = /* @__PURE__ */ S({
3825
+ }, ai = /* @__PURE__ */ T({
3826
3826
  __name: "ChatVisualBlock",
3827
3827
  props: {
3828
3828
  result: {},
3829
3829
  inverted: { type: Boolean }
3830
3830
  },
3831
3831
  setup(e) {
3832
- let t = e, n = M(), r = ie(360), i;
3833
- te(() => {
3832
+ let t = e, n = P(), r = ae(360), i;
3833
+ re(() => {
3834
3834
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3835
3835
  let t = e[0]?.contentRect.width;
3836
3836
  t && (r.value = Math.round(t));
3837
3837
  }), i.observe(n.value));
3838
- }), A(() => i?.disconnect());
3839
- let a = p(() => Math.min(720, Math.max(280, r.value))), o = p(() => t.result.ok ? t.result.spec : null), s = p(() => o.value?.visualType === "chart" ? o.value : null), c = p(() => o.value?.visualType === "diagram" ? o.value : null);
3838
+ }), ne(() => i?.disconnect());
3839
+ let a = h(() => Math.min(720, Math.max(280, r.value))), o = h(() => t.result.ok ? t.result.spec : null), s = h(() => o.value?.visualType === "chart" ? o.value : null), c = h(() => o.value?.visualType === "diagram" ? o.value : null);
3840
3840
  function isCartesianChart(e) {
3841
3841
  return e?.chartType === "bar" || e?.chartType === "line" || e?.chartType === "scatter";
3842
3842
  }
3843
3843
  function isPieChart(e) {
3844
3844
  return e?.chartType === "pie";
3845
3845
  }
3846
- let u = p(() => s.value?.data ?? []), m = p(() => isCartesianChart(s.value) ? s.value : null), b = p(() => m.value?.series ?? []), x = p(() => isPieChart(s.value) ? s.value : null), S = p(() => m.value?.chartType === "bar" && m.value.stacking === "stacked");
3846
+ let u = h(() => s.value?.data ?? []), f = h(() => isCartesianChart(s.value) ? s.value : null), p = h(() => f.value?.series ?? []), _ = h(() => isPieChart(s.value) ? s.value : null), S = h(() => f.value?.chartType === "bar" && f.value.stacking === "stacked");
3847
3847
  function numericValue(e) {
3848
3848
  return typeof e == "number" && Number.isFinite(e) ? e : null;
3849
3849
  }
@@ -3875,8 +3875,8 @@ var kr = [
3875
3875
  intercept: (r - s * n) / t
3876
3876
  };
3877
3877
  }
3878
- let C = p(() => {
3879
- let e = [], t = m.value;
3878
+ let C = h(() => {
3879
+ let e = [], t = f.value;
3880
3880
  if (!t) return e;
3881
3881
  if (t.chartType === "bar" && t.stacking === "stacked") for (let n of t.data) {
3882
3882
  let r = 0, i = 0;
@@ -3905,7 +3905,7 @@ var kr = [
3905
3905
  let n = e > 0 ? e : 1, r = Math.floor(Math.log10(n)), i = n / 10 ** r, a;
3906
3906
  return a = t ? i < 1.5 ? 1 : i < 3 ? 2 : i < 7 ? 5 : 10 : i <= 1 ? 1 : i <= 2 ? 2 : i <= 5 ? 5 : 10, a * 10 ** r;
3907
3907
  }
3908
- let T = p(() => {
3908
+ let T = h(() => {
3909
3909
  let e = C.value, t = e.length ? Math.max(0, ...e) : 1, n = e.length ? Math.min(0, ...e) : 0;
3910
3910
  if (n === t) return {
3911
3911
  min: 0,
@@ -3919,8 +3919,8 @@ var kr = [
3919
3919
  max: a,
3920
3920
  ticks: o
3921
3921
  };
3922
- }), ne = p(() => resolveSharedSeriesFormat({ series: b.value })), re = p(() => {
3923
- let e = m.value;
3922
+ }), te = h(() => resolveSharedSeriesFormat({ series: p.value })), k = h(() => {
3923
+ let e = f.value;
3924
3924
  if (!e) return {
3925
3925
  mode: "horizontal",
3926
3926
  entries: []
@@ -3930,8 +3930,8 @@ var kr = [
3930
3930
  labels: e.data.map((e) => String(e?.[t] ?? "")),
3931
3931
  plotWidth: Math.max(200, a.value - 42)
3932
3932
  });
3933
- }), F = p(() => {
3934
- let e = ne.value?.valueFormat, t = !!(ne.value && (e === "currency" || e === "percent" || ne.value.valuePrefix || ne.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = re.value.mode === "angled";
3933
+ }), j = h(() => {
3934
+ 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 = k.value.mode === "angled";
3935
3935
  return {
3936
3936
  width: a.value,
3937
3937
  height: 168 + (r ? 36 : 0),
@@ -3942,7 +3942,7 @@ var kr = [
3942
3942
  };
3943
3943
  });
3944
3944
  function labelCenterX(e, t) {
3945
- let n = m.value, r = F.value;
3945
+ let n = f.value, r = j.value;
3946
3946
  if (n?.chartType === "bar") {
3947
3947
  let n = r.width - r.left - r.right;
3948
3948
  return r.left + (e + .5) * (n / Math.max(t, 1));
@@ -3950,22 +3950,22 @@ var kr = [
3950
3950
  return xForIndex(e, t);
3951
3951
  }
3952
3952
  function xForIndex(e, t) {
3953
- let n = F.value, r = n.width - n.left - n.right;
3953
+ let n = j.value, r = n.width - n.left - n.right;
3954
3954
  return t <= 1 ? n.left + r / 2 : n.left + r * e / (t - 1);
3955
3955
  }
3956
3956
  function yForValue(e) {
3957
- let { min: t, max: n } = T.value, r = F.value, i = r.height - r.top - r.bottom;
3957
+ let { min: t, max: n } = T.value, r = j.value, i = r.height - r.top - r.bottom;
3958
3958
  return r.top + (n - e) / (n - t || 1) * i;
3959
3959
  }
3960
3960
  function pathForSeries(e) {
3961
- let t = m.value;
3961
+ let t = f.value;
3962
3962
  return t ? t.data.map((n, r) => {
3963
3963
  let i = numericValue(n[e]) ?? 0;
3964
3964
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3965
3965
  }).join(" ") : "";
3966
3966
  }
3967
- let oe = p(() => {
3968
- let e = m.value;
3967
+ let I = h(() => {
3968
+ let e = f.value;
3969
3969
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3970
3970
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
3971
3971
  if (!n || !t.length) return null;
@@ -3975,10 +3975,10 @@ var kr = [
3975
3975
  dataKey: e.trendLine.dataKey,
3976
3976
  seriesIndex: s
3977
3977
  };
3978
- }), se = p(() => {
3979
- let e = m.value;
3978
+ }), ie = h(() => {
3979
+ let e = f.value;
3980
3980
  if (!e || e.chartType !== "bar") return [];
3981
- let t = F.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3981
+ let t = j.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3982
3982
  if (S.value) {
3983
3983
  let r = Math.max(4, Math.min(24, n * .42));
3984
3984
  return e.data.flatMap((i, a) => {
@@ -4012,12 +4012,12 @@ var kr = [
4012
4012
  dataKey: e.dataKey
4013
4013
  };
4014
4014
  }));
4015
- }), R = p(() => {
4016
- let e = m.value;
4015
+ }), B = h(() => {
4016
+ let e = f.value;
4017
4017
  if (!e) return [];
4018
4018
  let t = e.data;
4019
4019
  if (!t.length) return [];
4020
- let n = t.length - 1, r = re.value, i = r.mode === "angled";
4020
+ let n = t.length - 1, r = k.value, i = r.mode === "angled";
4021
4021
  return r.entries.map(({ index: e, text: r }) => ({
4022
4022
  key: `${e}`,
4023
4023
  label: r,
@@ -4025,8 +4025,8 @@ var kr = [
4025
4025
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
4026
4026
  angled: i
4027
4027
  })).filter((e) => e.label);
4028
- }), ce = p(() => {
4029
- let e = m.value;
4028
+ }), se = h(() => {
4029
+ let e = f.value;
4030
4030
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || S.value) return [];
4031
4031
  let t = e.series[0], n = e.data.map((n, r) => {
4032
4032
  let i = categoryLabel(n, e.xKey), a = numericValue(n[t.dataKey]);
@@ -4048,8 +4048,8 @@ var kr = [
4048
4048
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
4049
4049
  seriesIndex: 0
4050
4050
  }));
4051
- }), ue = p(() => {
4052
- let e = m.value;
4051
+ }), ce = h(() => {
4052
+ let e = f.value;
4053
4053
  if (!e?.data.length) return [];
4054
4054
  let t = e.data[e.data.length - 1];
4055
4055
  return e.series.map((e, n) => {
@@ -4064,8 +4064,8 @@ var kr = [
4064
4064
  seriesIndex: n
4065
4065
  };
4066
4066
  });
4067
- }), de = p(() => {
4068
- let e = m.value;
4067
+ }), ue = h(() => {
4068
+ let e = f.value;
4069
4069
  if (!e?.data.length || e.chartType !== "line") return [];
4070
4070
  let t = e.data.length - 1, n = e.data[t];
4071
4071
  return e.series.map((r, i) => {
@@ -4077,8 +4077,8 @@ var kr = [
4077
4077
  seriesIndex: i
4078
4078
  };
4079
4079
  }).filter((e) => e !== null);
4080
- }), B = p(() => {
4081
- let e = x.value;
4080
+ }), de = h(() => {
4081
+ let e = _.value;
4082
4082
  if (!e) return [];
4083
4083
  let t = e.data.map((t) => ({
4084
4084
  name: String(t[e.nameKey] ?? ""),
@@ -4093,27 +4093,27 @@ var kr = [
4093
4093
  series: r
4094
4094
  })
4095
4095
  }));
4096
- }), H = p(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), pe = [
4096
+ }), H = h(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), U = [
4097
4097
  "var(--color-theme-900)",
4098
4098
  "var(--color-primary-500)",
4099
4099
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
4100
- ], he = [
4100
+ ], pe = [
4101
4101
  "rgba(255, 255, 255, 0.92)",
4102
4102
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
4103
4103
  "rgba(255, 255, 255, 0.55)"
4104
4104
  ];
4105
4105
  function seriesColor(e) {
4106
- let n = t.inverted ? he : pe;
4106
+ let n = t.inverted ? pe : U;
4107
4107
  return n[e % n.length];
4108
4108
  }
4109
4109
  function diagramNodeFill(e) {
4110
4110
  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)";
4111
4111
  }
4112
4112
  function diagramNodeStroke(e) {
4113
- return t.inverted ? "rgba(255, 255, 255, 0.22)" : be.value;
4113
+ return t.inverted ? "rgba(255, 255, 255, 0.22)" : ye.value;
4114
4114
  }
4115
- let _e = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ve = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), G = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Se = p(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Ce = p(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = p(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4116
- return (e, r) => o.value ? (j(), _("section", {
4115
+ let he = h(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = h(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = h(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = h(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = h(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = h(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = h(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = h(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = h(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), q = h(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4116
+ return (e, r) => o.value ? (M(), b("section", {
4117
4117
  key: 0,
4118
4118
  "data-test": "chat-visual",
4119
4119
  "data-visual-type": o.value.visualType,
@@ -4121,76 +4121,76 @@ var kr = [
4121
4121
  "data-stacking": S.value ? "stacked" : void 0,
4122
4122
  "data-diagram-type": c.value?.diagramType,
4123
4123
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
4124
- style: k({
4125
- background: Se.value,
4126
- boxShadow: `inset 0 0 0 1px ${G.value}`
4124
+ style: A({
4125
+ background: be.value,
4126
+ boxShadow: `inset 0 0 0 1px ${K.value}`
4127
4127
  }),
4128
4128
  "aria-label": o.value.meta.title
4129
4129
  }, [
4130
- v("header", Ar, [v("h4", {
4130
+ x("header", Mr, [x("h4", {
4131
4131
  class: "text-[13px] font-semibold leading-tight",
4132
- style: k({ color: _e.value })
4133
- }, I(o.value.meta.title), 5), o.value.meta.description ? (j(), _("p", {
4132
+ style: A({ color: he.value })
4133
+ }, R(o.value.meta.title), 5), o.value.meta.description ? (M(), b("p", {
4134
4134
  key: 0,
4135
4135
  class: "mt-0.5 text-[12px] leading-snug",
4136
- style: k({ color: ve.value })
4137
- }, I(o.value.meta.description), 5)) : h("", !0)]),
4138
- v("div", {
4136
+ style: A({ color: _e.value })
4137
+ }, R(o.value.meta.description), 5)) : v("", !0)]),
4138
+ x("div", {
4139
4139
  ref_key: "bodyEl",
4140
4140
  ref: n
4141
- }, [m.value ? (j(), _("div", {
4141
+ }, [f.value ? (M(), b("div", {
4142
4142
  key: 0,
4143
4143
  role: "img",
4144
4144
  "aria-label": o.value.meta.title
4145
- }, [ce.value.length ? (j(), _("div", Mr, [(j(!0), _(f, null, P(ce.value, (e) => (j(), _("div", {
4145
+ }, [se.value.length ? (M(), b("div", Pr, [(M(!0), b(m, null, F(se.value, (e) => (M(), b("div", {
4146
4146
  key: e.key,
4147
4147
  "data-test": "chat-visual-horizontal-bar",
4148
4148
  class: "min-w-0"
4149
- }, [v("div", Nr, [v("span", {
4149
+ }, [x("div", Fr, [x("span", {
4150
4150
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4151
- style: k({ color: _e.value })
4152
- }, I(e.label), 5), v("span", {
4151
+ style: A({ color: he.value })
4152
+ }, R(e.label), 5), x("span", {
4153
4153
  class: "shrink-0 font-semibold tabular-nums",
4154
- style: k({ color: _e.value })
4155
- }, I(e.value), 5)]), v("div", {
4154
+ style: A({ color: he.value })
4155
+ }, R(e.value), 5)]), x("div", {
4156
4156
  class: "h-2 w-full overflow-hidden rounded-full",
4157
- style: k({ background: we.value })
4158
- }, [v("div", {
4157
+ style: A({ background: q.value })
4158
+ }, [x("div", {
4159
4159
  class: "h-full rounded-full",
4160
- style: k({
4160
+ style: A({
4161
4161
  width: `${e.width}%`,
4162
4162
  background: seriesColor(e.seriesIndex)
4163
4163
  })
4164
- }, null, 4)], 4)]))), 128))])) : (j(), _("svg", {
4164
+ }, null, 4)], 4)]))), 128))])) : (M(), b("svg", {
4165
4165
  key: 1,
4166
4166
  class: "block h-auto w-full overflow-visible",
4167
- viewBox: `0 0 ${F.value.width} ${F.value.height}`,
4168
- style: k({ aspectRatio: `${F.value.width} / ${F.value.height}` }),
4167
+ viewBox: `0 0 ${j.value.width} ${j.value.height}`,
4168
+ style: A({ aspectRatio: `${j.value.width} / ${j.value.height}` }),
4169
4169
  preserveAspectRatio: "xMidYMid meet",
4170
4170
  "aria-hidden": "true"
4171
4171
  }, [
4172
- (j(!0), _(f, null, P(T.value.ticks, (e) => (j(), _("line", {
4172
+ (M(!0), b(m, null, F(T.value.ticks, (e) => (M(), b("line", {
4173
4173
  key: `grid-${e}`,
4174
- x1: F.value.left,
4175
- x2: F.value.width - F.value.right,
4174
+ x1: j.value.left,
4175
+ x2: j.value.width - j.value.right,
4176
4176
  y1: yForValue(e),
4177
4177
  y2: yForValue(e),
4178
4178
  "stroke-width": "1",
4179
4179
  "vector-effect": "non-scaling-stroke",
4180
- style: k({ stroke: e === 0 ? W.value : ye.value })
4181
- }, null, 12, Fr))), 128)),
4182
- v("g", null, [(j(!0), _(f, null, P(T.value.ticks, (e) => (j(), _("text", {
4180
+ style: A({ stroke: e === 0 ? G.value : ve.value })
4181
+ }, null, 12, Lr))), 128)),
4182
+ x("g", null, [(M(!0), b(m, null, F(T.value.ticks, (e) => (M(), b("text", {
4183
4183
  key: `y-${e}`,
4184
- x: F.value.left - 7,
4184
+ x: j.value.left - 7,
4185
4185
  y: yForValue(e) + 3,
4186
4186
  "text-anchor": "end",
4187
4187
  "font-size": "9.5",
4188
- style: k({ fill: U.value })
4189
- }, I(ae(formatChatVisualTick)({
4188
+ style: A({ fill: W.value })
4189
+ }, R(oe(formatChatVisualTick)({
4190
4190
  value: e,
4191
- shared: ne.value
4192
- })), 13, Ir))), 128))]),
4193
- m.value.chartType === "bar" ? (j(!0), _(f, { key: 0 }, P(se.value, (e) => (j(), _("rect", {
4191
+ shared: te.value
4192
+ })), 13, Rr))), 128))]),
4193
+ f.value.chartType === "bar" ? (M(!0), b(m, { key: 0 }, F(ie.value, (e) => (M(), b("rect", {
4194
4194
  key: e.key,
4195
4195
  "data-test": "chat-visual-bar",
4196
4196
  "data-row-index": e.rowIndex,
@@ -4201,22 +4201,22 @@ var kr = [
4201
4201
  width: e.width,
4202
4202
  height: e.height,
4203
4203
  rx: "2.5",
4204
- style: k({ fill: seriesColor(e.seriesIndex) })
4205
- }, null, 12, Lr))), 128)) : (j(), _(f, { key: 1 }, [
4206
- oe.value ? (j(), _("path", {
4204
+ style: A({ fill: seriesColor(e.seriesIndex) })
4205
+ }, null, 12, zr))), 128)) : (M(), b(m, { key: 1 }, [
4206
+ I.value ? (M(), b("path", {
4207
4207
  key: 0,
4208
4208
  "data-test": "chat-visual-trend-line",
4209
- "data-trend-key": oe.value.dataKey,
4210
- d: oe.value.path,
4209
+ "data-trend-key": I.value.dataKey,
4210
+ d: I.value.path,
4211
4211
  fill: "none",
4212
4212
  "stroke-width": "1.4",
4213
4213
  "stroke-linecap": "round",
4214
4214
  "stroke-linejoin": "round",
4215
4215
  "stroke-dasharray": "4 3",
4216
4216
  "vector-effect": "non-scaling-stroke",
4217
- style: k({ stroke: seriesColor(oe.value.seriesIndex) })
4218
- }, null, 12, Rr)) : h("", !0),
4219
- (j(!0), _(f, null, P(b.value, (e, t) => (j(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (j(), _("path", {
4217
+ style: A({ stroke: seriesColor(I.value.seriesIndex) })
4218
+ }, null, 12, Br)) : v("", !0),
4219
+ (M(!0), b(m, null, F(p.value, (e, t) => (M(), b("g", { key: e.dataKey }, [f.value.chartType === "line" ? (M(), b("path", {
4220
4220
  key: 0,
4221
4221
  d: pathForSeries(e.dataKey),
4222
4222
  fill: "none",
@@ -4224,74 +4224,74 @@ var kr = [
4224
4224
  "stroke-linecap": "round",
4225
4225
  "stroke-linejoin": "round",
4226
4226
  "vector-effect": "non-scaling-stroke",
4227
- style: k({ stroke: seriesColor(t) })
4228
- }, null, 12, zr)) : h("", !0), (j(!0), _(f, null, P(u.value, (n, r) => (j(), _(f, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (j(), _("circle", {
4227
+ style: A({ stroke: seriesColor(t) })
4228
+ }, null, 12, Vr)) : v("", !0), (M(!0), b(m, null, F(u.value, (n, r) => (M(), b(m, { key: `${e.dataKey}-${r}` }, [f.value.chartType === "scatter" ? (M(), b("circle", {
4229
4229
  key: 0,
4230
4230
  cx: xForIndex(r, u.value.length),
4231
4231
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4232
4232
  r: "2.6",
4233
- style: k({ fill: seriesColor(t) })
4234
- }, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
4235
- (j(!0), _(f, null, P(de.value, (e) => (j(), _("circle", {
4233
+ style: A({ fill: seriesColor(t) })
4234
+ }, null, 12, Hr)) : v("", !0)], 64))), 128))]))), 128)),
4235
+ (M(!0), b(m, null, F(ue.value, (e) => (M(), b("circle", {
4236
4236
  key: `marker-${e.key}`,
4237
4237
  cx: e.cx,
4238
4238
  cy: e.cy,
4239
4239
  r: "3",
4240
- style: k({ fill: seriesColor(e.seriesIndex) })
4241
- }, null, 12, Vr))), 128))
4240
+ style: A({ fill: seriesColor(e.seriesIndex) })
4241
+ }, null, 12, Ur))), 128))
4242
4242
  ], 64)),
4243
- (j(!0), _(f, null, P(R.value, (e) => (j(), _("text", {
4243
+ (M(!0), b(m, null, F(B.value, (e) => (M(), b("text", {
4244
4244
  key: e.key,
4245
4245
  x: e.x,
4246
- y: e.angled ? F.value.height - F.value.bottom + 12 : F.value.height - 6,
4246
+ y: e.angled ? j.value.height - j.value.bottom + 12 : j.value.height - 6,
4247
4247
  "text-anchor": e.anchor,
4248
4248
  "font-size": "9.5",
4249
- transform: e.angled ? `rotate(${ae(-40)} ${e.x} ${F.value.height - F.value.bottom + 12})` : void 0,
4250
- style: k({ fill: U.value })
4251
- }, I(e.label), 13, Hr))), 128))
4252
- ], 12, Pr)), ue.value.length > 1 || m.value.chartType !== "bar" ? (j(), _("div", Ur, [(j(!0), _(f, null, P(ue.value, (e) => (j(), _("div", {
4249
+ transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4250
+ style: A({ fill: W.value })
4251
+ }, R(e.label), 13, Wr))), 128))
4252
+ ], 12, Ir)), ce.value.length > 1 || f.value.chartType !== "bar" ? (M(), b("div", Gr, [(M(!0), b(m, null, F(ce.value, (e) => (M(), b("div", {
4253
4253
  key: e.key,
4254
4254
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4255
4255
  }, [
4256
- v("span", {
4256
+ x("span", {
4257
4257
  class: "size-2.5 shrink-0 rounded-full",
4258
- style: k({ background: seriesColor(e.seriesIndex) })
4258
+ style: A({ background: seriesColor(e.seriesIndex) })
4259
4259
  }, null, 4),
4260
- v("span", { style: k({ color: ve.value }) }, I(e.label), 5),
4261
- v("span", {
4260
+ x("span", { style: A({ color: _e.value }) }, R(e.label), 5),
4261
+ x("span", {
4262
4262
  class: "font-semibold tabular-nums",
4263
- style: k({ color: _e.value })
4264
- }, I(e.value), 5)
4265
- ]))), 128))])) : h("", !0)], 8, jr)) : x.value ? (j(), _("div", Wr, [(j(!0), _(f, null, P(B.value, (e, t) => (j(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4263
+ style: A({ color: he.value })
4264
+ }, R(e.value), 5)
4265
+ ]))), 128))])) : v("", !0)], 8, Nr)) : _.value ? (M(), b("div", Kr, [(M(!0), b(m, null, F(de.value, (e, t) => (M(), b("div", { key: e.key }, [x("div", qr, [x("span", {
4266
4266
  class: "truncate font-medium",
4267
- style: k({ color: _e.value })
4268
- }, I(e.name), 5), v("span", Kr, [v("span", {
4267
+ style: A({ color: he.value })
4268
+ }, R(e.name), 5), x("span", Jr, [x("span", {
4269
4269
  class: "font-semibold",
4270
- style: k({ color: _e.value })
4271
- }, I(e.display), 5), v("span", {
4270
+ style: A({ color: he.value })
4271
+ }, R(e.display), 5), x("span", {
4272
4272
  class: "ml-1.5",
4273
- style: k({ color: ve.value })
4274
- }, I(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4273
+ style: A({ color: _e.value })
4274
+ }, R(Math.round(e.percent * 100)) + "%", 5)])]), x("div", {
4275
4275
  class: "h-1.5 w-full overflow-hidden rounded-full",
4276
- style: k({ background: we.value })
4277
- }, [v("div", {
4276
+ style: A({ background: q.value })
4277
+ }, [x("div", {
4278
4278
  class: "h-full rounded-full",
4279
- style: k({
4279
+ style: A({
4280
4280
  width: `${Math.max(2, e.percent * 100)}%`,
4281
4281
  background: seriesColor(t)
4282
4282
  })
4283
- }, null, 4)], 4)]))), 128))])) : c.value && H.value ? (j(), _("div", qr, [(j(), _("svg", {
4283
+ }, null, 4)], 4)]))), 128))])) : c.value && H.value ? (M(), b("div", Yr, [(M(), b("svg", {
4284
4284
  "data-test": "chat-visual-diagram-svg",
4285
4285
  class: "block h-auto overflow-visible",
4286
4286
  viewBox: `0 0 ${H.value.width} ${H.value.height}`,
4287
- style: k({
4287
+ style: A({
4288
4288
  width: `${H.value.width}px`,
4289
4289
  aspectRatio: `${H.value.width} / ${H.value.height}`
4290
4290
  }),
4291
4291
  role: "img",
4292
4292
  "aria-label": o.value.meta.title
4293
4293
  }, [
4294
- (j(!0), _(f, null, P(H.value.edges, (e) => (j(), _("line", {
4294
+ (M(!0), b(m, null, F(H.value.edges, (e) => (M(), b("line", {
4295
4295
  key: e.key,
4296
4296
  "data-test": "chat-visual-diagram-edge",
4297
4297
  "data-from": e.from,
@@ -4303,77 +4303,77 @@ var kr = [
4303
4303
  "stroke-width": "1.4",
4304
4304
  "stroke-linecap": "round",
4305
4305
  "vector-effect": "non-scaling-stroke",
4306
- style: k({ stroke: Ce.value })
4307
- }, null, 12, Yr))), 128)),
4308
- (j(!0), _(f, null, P(H.value.edges, (e) => (j(), _("circle", {
4306
+ style: A({ stroke: Se.value })
4307
+ }, null, 12, Zr))), 128)),
4308
+ (M(!0), b(m, null, F(H.value.edges, (e) => (M(), b("circle", {
4309
4309
  key: `${e.key}-dot`,
4310
4310
  cx: e.x2,
4311
4311
  cy: e.y2,
4312
4312
  r: "2.4",
4313
- style: k({ fill: Ce.value })
4314
- }, null, 12, Xr))), 128)),
4315
- (j(!0), _(f, null, P(H.value.edges.filter((e) => e.label), (e) => (j(), _("foreignObject", {
4313
+ style: A({ fill: Se.value })
4314
+ }, null, 12, Qr))), 128)),
4315
+ (M(!0), b(m, null, F(H.value.edges.filter((e) => e.label), (e) => (M(), b("foreignObject", {
4316
4316
  key: `${e.key}-label`,
4317
4317
  x: e.labelX - 55,
4318
4318
  y: e.labelY - 12,
4319
4319
  width: "110",
4320
4320
  height: "24"
4321
- }, [v("div", {
4321
+ }, [x("div", {
4322
4322
  xmlns: "http://www.w3.org/1999/xhtml",
4323
4323
  class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
4324
- style: k({
4325
- color: ve.value,
4324
+ style: A({
4325
+ color: _e.value,
4326
4326
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4327
4327
  })
4328
- }, I(e.label), 5)], 8, Zr))), 128)),
4329
- (j(!0), _(f, null, P(H.value.nodes, (e) => (j(), _("g", {
4328
+ }, R(e.label), 5)], 8, $r))), 128)),
4329
+ (M(!0), b(m, null, F(H.value.nodes, (e) => (M(), b("g", {
4330
4330
  key: e.id,
4331
4331
  "data-test": "chat-visual-diagram-node",
4332
4332
  "data-node-id": e.id,
4333
4333
  "data-node-kind": e.kind,
4334
4334
  transform: `translate(${e.x} ${e.y})`
4335
- }, [e.kind === "decision" ? (j(), _("polygon", {
4335
+ }, [e.kind === "decision" ? (M(), b("polygon", {
4336
4336
  key: 0,
4337
4337
  points: `${e.width / 2},0 ${e.width},${e.height / 2} ${e.width / 2},${e.height} 0,${e.height / 2}`,
4338
4338
  "stroke-width": "1",
4339
4339
  "vector-effect": "non-scaling-stroke",
4340
- style: k({
4340
+ style: A({
4341
4341
  fill: diagramNodeFill(e.kind),
4342
4342
  stroke: diagramNodeStroke(e.kind)
4343
4343
  })
4344
- }, null, 12, $r)) : (j(), _("rect", {
4344
+ }, null, 12, ti)) : (M(), b("rect", {
4345
4345
  key: 1,
4346
4346
  width: e.width,
4347
4347
  height: e.height,
4348
4348
  rx: "9",
4349
4349
  "stroke-width": "1",
4350
4350
  "vector-effect": "non-scaling-stroke",
4351
- style: k({
4351
+ style: A({
4352
4352
  fill: diagramNodeFill(e.kind),
4353
4353
  stroke: diagramNodeStroke(e.kind)
4354
4354
  })
4355
- }, null, 12, ei)), (j(), _("foreignObject", {
4355
+ }, null, 12, ni)), (M(), b("foreignObject", {
4356
4356
  x: "8",
4357
4357
  y: "5",
4358
4358
  width: e.width - 16,
4359
4359
  height: e.height - 10
4360
- }, [v("div", ni, [v("div", {
4360
+ }, [x("div", ii, [x("div", {
4361
4361
  class: "line-clamp-2 text-[13px] font-medium leading-snug",
4362
- style: k({ color: _e.value })
4363
- }, I(e.label), 5), e.detail ? (j(), _("div", {
4362
+ style: A({ color: he.value })
4363
+ }, R(e.label), 5), e.detail ? (M(), b("div", {
4364
4364
  key: 0,
4365
4365
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4366
- style: k({ color: ve.value })
4367
- }, I(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4368
- ], 12, Jr))])) : h("", !0)], 512),
4369
- o.value.meta.footer ? (j(), _("footer", {
4366
+ style: A({ color: _e.value })
4367
+ }, R(e.detail), 5)) : v("", !0)])], 8, ri))], 8, ei))), 128))
4368
+ ], 12, Xr))])) : v("", !0)], 512),
4369
+ o.value.meta.footer ? (M(), b("footer", {
4370
4370
  key: 0,
4371
4371
  class: "mt-3 text-[11px] leading-snug",
4372
- style: k({ color: U.value })
4373
- }, I(o.value.meta.footer), 5)) : h("", !0)
4374
- ], 12, kr)) : h("", !0);
4372
+ style: A({ color: W.value })
4373
+ }, R(o.value.meta.footer), 5)) : v("", !0)
4374
+ ], 12, jr)) : v("", !0);
4375
4375
  }
4376
- }), ii = ["innerHTML"], ai = /* @__PURE__ */ S({
4376
+ }), oi = ["innerHTML"], si = /* @__PURE__ */ T({
4377
4377
  __name: "ChatRichText",
4378
4378
  props: {
4379
4379
  text: {},
@@ -4382,7 +4382,7 @@ var kr = [
4382
4382
  },
4383
4383
  emits: ["action"],
4384
4384
  setup(e, { emit: t }) {
4385
- let n = e, r = t, i = ie(n.text), a;
4385
+ let n = e, r = t, i = ae(n.text), a;
4386
4386
  se([() => n.text, () => n.streaming], ([e, t]) => {
4387
4387
  if (!t) {
4388
4388
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
@@ -4391,7 +4391,7 @@ var kr = [
4391
4391
  a === void 0 && (a = requestAnimationFrame(() => {
4392
4392
  a = void 0, i.value = n.text;
4393
4393
  }));
4394
- }), A(() => {
4394
+ }), ne(() => {
4395
4395
  a !== void 0 && cancelAnimationFrame(a);
4396
4396
  });
4397
4397
  let o = new g.Renderer();
@@ -4413,7 +4413,7 @@ var kr = [
4413
4413
  function renderMarkdown(e) {
4414
4414
  if (!e) return "";
4415
4415
  let t = g.parse(e, { async: !1 });
4416
- return Qt.sanitize(t, {
4416
+ return en.sanitize(t, {
4417
4417
  ADD_ATTR: ["target"],
4418
4418
  ADD_DATA_URI_TAGS: ["img"]
4419
4419
  });
@@ -4469,17 +4469,17 @@ var kr = [
4469
4469
  }
4470
4470
  let s = /```(?:pl-visual|pl-platform-visual|pl-card)[ \t]*(?:\r?\n|$)/;
4471
4471
  function richTextSegments(e) {
4472
- let { text: t, streaming: n } = e, r = [], i = /```(pl-visual|pl-platform-visual|pl-card)[ \t]*\r?\n([\s\S]*?)```/g, a = 0, o = 0, f = i.exec(t);
4473
- for (; f !== null;) {
4474
- let e = renderMarkdown(t.slice(a, f.index));
4472
+ let { text: t, streaming: n } = e, r = [], i = /```(pl-visual|pl-platform-visual|pl-card)[ \t]*\r?\n([\s\S]*?)```/g, a = 0, o = 0, c = i.exec(t);
4473
+ for (; c !== null;) {
4474
+ let e = renderMarkdown(t.slice(a, c.index));
4475
4475
  e && r.push({
4476
4476
  kind: "markdown",
4477
4477
  key: `md-${o}`,
4478
4478
  html: e
4479
4479
  });
4480
- let n = f[1], s = f[2].trim();
4480
+ let n = c[1], s = c[2].trim();
4481
4481
  if (n === "pl-card") {
4482
- let e = c(s);
4482
+ let e = f(s);
4483
4483
  e.ok ? r.push({
4484
4484
  kind: "card",
4485
4485
  key: `card-${o}`,
@@ -4494,7 +4494,7 @@ var kr = [
4494
4494
  html: renderMarkdown(`\`\`\`\n${s}\n\`\`\``)
4495
4495
  }));
4496
4496
  } else {
4497
- let e = u(s);
4497
+ let e = p(s);
4498
4498
  if (e.ok) r.push({
4499
4499
  kind: "visual",
4500
4500
  key: `visual-${o}`,
@@ -4516,11 +4516,11 @@ var kr = [
4516
4516
  });
4517
4517
  }
4518
4518
  }
4519
- a = f.index + f[0].length, o += 1, f = i.exec(t);
4519
+ a = c.index + c[0].length, o += 1, c = i.exec(t);
4520
4520
  }
4521
- let p = t.slice(a), m = n ? s.exec(p) : null;
4521
+ let u = t.slice(a), m = n ? s.exec(u) : null;
4522
4522
  if (m) {
4523
- let e = renderMarkdown(p.slice(0, m.index));
4523
+ let e = renderMarkdown(u.slice(0, m.index));
4524
4524
  return e && r.push({
4525
4525
  kind: "markdown",
4526
4526
  key: `md-${o}`,
@@ -4530,65 +4530,65 @@ var kr = [
4530
4530
  key: `pending-${o}`
4531
4531
  }), r;
4532
4532
  }
4533
- let h = renderMarkdown(p);
4533
+ let h = renderMarkdown(u);
4534
4534
  return h && r.push({
4535
4535
  kind: "markdown",
4536
4536
  key: `md-${o}`,
4537
4537
  html: h
4538
4538
  }), r;
4539
4539
  }
4540
- let h = p(() => {
4540
+ let c = h(() => {
4541
4541
  let e = i.value;
4542
4542
  return e ? richTextSegments({
4543
4543
  text: e,
4544
4544
  streaming: !!n.streaming
4545
4545
  }) : [];
4546
4546
  });
4547
- return (t, n) => (j(), _("div", {
4547
+ return (t, n) => (M(), b("div", {
4548
4548
  class: "chat-msg-rich break-words text-[14px] leading-[1.55] @sm/chat:max-w-[55ch] @sm/chat:text-[15px] @sm/chat:leading-[1.5]",
4549
4549
  onErrorCapture: onRichTextAssetError
4550
- }, [(j(!0), _(f, null, P(h.value, (t) => (j(), _(f, { key: t.key }, [t.kind === "markdown" ? (j(), _("div", {
4550
+ }, [(M(!0), b(m, null, F(c.value, (t) => (M(), b(m, { key: t.key }, [t.kind === "markdown" ? (M(), b("div", {
4551
4551
  key: 0,
4552
- class: T(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4552
+ class: k(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4553
4553
  innerHTML: t.html
4554
- }, null, 10, ii)) : t.kind === "visual" ? (j(), m(ri, {
4554
+ }, null, 10, oi)) : t.kind === "visual" ? (M(), _(ai, {
4555
4555
  key: 1,
4556
4556
  result: t.result,
4557
4557
  inverted: e.inverted
4558
- }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (j(), m(vr, {
4558
+ }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (M(), _(br, {
4559
4559
  key: 2,
4560
4560
  spec: t.spec,
4561
4561
  inverted: e.inverted,
4562
4562
  onAction: n[0] || (n[0] = (e) => r("action", e))
4563
- }, null, 8, ["spec", "inverted"])) : (j(), _("div", {
4563
+ }, null, 8, ["spec", "inverted"])) : (M(), b("div", {
4564
4564
  key: 3,
4565
4565
  "data-test": "chat-visual-pending",
4566
4566
  role: "status",
4567
4567
  class: "my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",
4568
- style: k({
4568
+ style: A({
4569
4569
  background: e.inverted ? "transparent" : "var(--color-theme-0)",
4570
4570
  boxShadow: `inset 0 0 0 1px ${e.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,
4571
4571
  color: e.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"
4572
4572
  })
4573
- }, [...n[1] || (n[1] = [v("span", {
4573
+ }, [...n[1] || (n[1] = [x("span", {
4574
4574
  class: "size-2 shrink-0 animate-pulse rounded-full",
4575
4575
  style: { background: "currentcolor" }
4576
- }, null, -1), b(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4576
+ }, null, -1), S(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4577
4577
  }
4578
- }), oi = 80, si = 600, ci = /* @__PURE__ */ S({
4578
+ }), ci = 80, li = 600, ui = /* @__PURE__ */ T({
4579
4579
  __name: "ChatScroller",
4580
4580
  setup(e, { expose: t }) {
4581
- let n = M(), r = M(), i = M(!0), a, o, s = 0;
4581
+ let n = P(), r = P(), i = P(!0), a, o, s = 0;
4582
4582
  function scrollToBottom() {
4583
4583
  let e = n.value;
4584
4584
  e && (e.scrollTop = e.scrollHeight);
4585
4585
  }
4586
4586
  function onScroll() {
4587
4587
  let e = n.value;
4588
- e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= oi);
4588
+ e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= ci);
4589
4589
  }
4590
4590
  function markUserGesture() {
4591
- s = Date.now() + si;
4591
+ s = Date.now() + li;
4592
4592
  }
4593
4593
  function followPinned() {
4594
4594
  i.value && Date.now() > s && scrollToBottom();
@@ -4598,29 +4598,29 @@ var kr = [
4598
4598
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4599
4599
  });
4600
4600
  }
4601
- return t({ pin }), te(() => {
4601
+ return t({ pin }), re(() => {
4602
4602
  requestAnimationFrame(() => {
4603
4603
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4604
4604
  }), r.value && (a = new ResizeObserver(followPinned), a.observe(r.value), n.value && a.observe(n.value), o = new MutationObserver(followPinned), o.observe(r.value, {
4605
4605
  childList: !0,
4606
4606
  subtree: !0
4607
4607
  }));
4608
- }), A(() => {
4608
+ }), ne(() => {
4609
4609
  a?.disconnect(), o?.disconnect();
4610
- }), (e, t) => (j(), _("div", {
4610
+ }), (e, t) => (M(), b("div", {
4611
4611
  ref_key: "viewport",
4612
4612
  ref: n,
4613
- class: T(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4613
+ class: k(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4614
4614
  onScrollPassive: onScroll,
4615
4615
  onWheelPassive: markUserGesture,
4616
4616
  onTouchstartPassive: markUserGesture
4617
- }, [v("div", {
4617
+ }, [x("div", {
4618
4618
  ref_key: "content",
4619
4619
  ref: r,
4620
4620
  class: "flex-1 flex flex-col"
4621
- }, [re(e.$slots, "default")], 512)], 34));
4621
+ }, [I(e.$slots, "default")], 512)], 34));
4622
4622
  }
4623
- }), li = {
4623
+ }), di = {
4624
4624
  VOICE_MIC_UNAVAILABLE: "I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",
4625
4625
  VOICE_AGENT_UNAVAILABLE: "Your assistant didn't pick up. Give it a moment and start the call again.",
4626
4626
  VOICE_CONNECT_TIMEOUT: "The call took too long to connect. Try again in a moment.",
@@ -4628,22 +4628,22 @@ var kr = [
4628
4628
  VOICE_UNAVAILABLE: "Voice isn't available right now. You can keep going by typing.",
4629
4629
  VOICE_MINT_INVALID: "That call couldn't be started. Refresh the page and try again.",
4630
4630
  VOICE_PROVIDER_ERROR: "The call ended unexpectedly. Try again, or keep going by typing."
4631
- }, ui = "The call ended unexpectedly. Try again, or keep going by typing.";
4631
+ }, fi = "The call ended unexpectedly. Try again, or keep going by typing.";
4632
4632
  function voiceErrorMessage(e) {
4633
- return e && li[e] || ui;
4633
+ return e && di[e] || fi;
4634
4634
  }
4635
4635
  //#endregion
4636
4636
  //#region agent/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
4637
- var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1 flex-col items-center justify-center pb-8" }, pi = { "data-voice-assistant-avatar": "" }, mi = {
4637
+ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1 flex-col items-center justify-center pb-8" }, hi = { "data-voice-assistant-avatar": "" }, gi = {
4638
4638
  "data-test": "voice-histogram",
4639
4639
  "aria-hidden": "true",
4640
4640
  class: "mt-10 flex h-4 items-center gap-[3px]"
4641
- }, hi = {
4641
+ }, _i = {
4642
4642
  "data-test": "voice-presence-status",
4643
4643
  role: "status",
4644
4644
  "aria-live": "polite",
4645
4645
  class: "sr-only"
4646
- }, gi = .1, _i = 60, vi = 320, yi = /* @__PURE__ */ S({
4646
+ }, vi = .1, yi = 60, bi = 320, xi = /* @__PURE__ */ T({
4647
4647
  __name: "VoiceMode",
4648
4648
  props: {
4649
4649
  agent: {},
@@ -4655,13 +4655,13 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4655
4655
  },
4656
4656
  emits: ["end"],
4657
4657
  setup(e, { expose: t, emit: n }) {
4658
- let r = n, i = M(0), a = M("mic"), o = M("idle"), s = M(!1), c = ie(), u = !1, m, h = p(() => s.value ? "error" : o.value === "live" ? a.value === "playback" && i.value > .01 ? "speaking" : "listening" : "connecting"), b = [
4658
+ let r = n, i = P(0), a = P("mic"), o = P("idle"), s = P(!1), c = ae(), u = !1, f, p = h(() => s.value ? "error" : o.value === "live" ? a.value === "playback" && i.value > .01 ? "speaking" : "listening" : "connecting"), _ = [
4659
4659
  0,
4660
4660
  2,
4661
4661
  4,
4662
4662
  6,
4663
4663
  8
4664
- ], S = b.map(() => 0), C = M(S), A = M(S), re = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, F = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), ae = 0, oe = 0;
4664
+ ], v = _.map(() => 0), S = P(v), T = P(v), te = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, ne = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), I = 0, ie = 0;
4665
4665
  async function end() {
4666
4666
  u = !0, await c.value?.end();
4667
4667
  }
@@ -4673,39 +4673,39 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4673
4673
  sendUserMessage
4674
4674
  });
4675
4675
  function easeFrame(e) {
4676
- ae = 0;
4677
- let t = Math.min(64, Math.max(0, e - oe));
4678
- oe = e;
4676
+ I = 0;
4677
+ let t = Math.min(64, Math.max(0, e - ie));
4678
+ ie = e;
4679
4679
  let ease = (e, n) => {
4680
- let r = n > e ? _i : vi;
4680
+ let r = n > e ? yi : bi;
4681
4681
  return e + (n - e) * (1 - Math.exp(-t / r));
4682
4682
  };
4683
- A.value = A.value.map((e, t) => ease(e, C.value[t] ?? 0)), !A.value.every((e, t) => Math.abs((C.value[t] ?? 0) - e) <= 5e-4) || C.value.some((e) => e > 0) ? ae = F(easeFrame) : A.value = S;
4683
+ T.value = T.value.map((e, t) => ease(e, S.value[t] ?? 0)), !T.value.every((e, t) => Math.abs((S.value[t] ?? 0) - e) <= 5e-4) || S.value.some((e) => e > 0) ? I = ne(easeFrame) : T.value = v;
4684
4684
  }
4685
4685
  function followLevel(e) {
4686
- let gate = (e) => Math.max(0, e - gi) / (1 - gi);
4687
- if (C.value = b.map((t) => gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), re?.matches) {
4688
- A.value = C.value;
4686
+ let gate = (e) => Math.max(0, e - vi) / (1 - vi);
4687
+ if (S.value = _.map((t) => gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), te?.matches) {
4688
+ T.value = S.value;
4689
4689
  return;
4690
4690
  }
4691
- ae || (oe = performance.now(), ae = F(easeFrame));
4691
+ I || (ie = performance.now(), I = ne(easeFrame));
4692
4692
  }
4693
- let se = p(() => A.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), R = p(() => h.value === "error" ? "bg-red-500" : h.value === "connecting" ? "bg-amber-500" : h.value === "speaking" ? "bg-primary-500" : "bg-green-500"), ce = {
4693
+ let oe = h(() => T.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), B = h(() => p.value === "error" ? "bg-red-500" : p.value === "connecting" ? "bg-amber-500" : p.value === "speaking" ? "bg-primary-500" : "bg-green-500"), se = {
4694
4694
  connecting: "Connecting",
4695
4695
  listening: "Listening",
4696
4696
  speaking: "Speaking",
4697
4697
  error: "Connection problem"
4698
- }, ue = p(() => ce[h.value]);
4698
+ }, ce = h(() => se[p.value]);
4699
4699
  function emitEnd() {
4700
4700
  u || (u = !0, r("end"));
4701
4701
  }
4702
- return te(async () => {
4702
+ return re(async () => {
4703
4703
  let t = e.chatController?.createVoiceClient({
4704
4704
  onLevel: (e) => {
4705
4705
  a.value = e.source, i.value = e.level, followLevel(e.bands);
4706
4706
  },
4707
4707
  onStateChange: (e) => {
4708
- o.value = e, e === "ended" && (s.value ? m = setTimeout(emitEnd, 1600) : emitEnd());
4708
+ o.value = e, e === "ended" && (s.value ? f = setTimeout(emitEnd, 1600) : emitEnd());
4709
4709
  },
4710
4710
  onError: (t) => {
4711
4711
  s.value = !0, e.chatController?.notify?.(voiceErrorMessage(t.code)), e.chatController?.logger?.warn("voice.session.failed", {
@@ -4722,51 +4722,51 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4722
4722
  return;
4723
4723
  }
4724
4724
  c.value = t, await t.start();
4725
- }), ne(() => {
4726
- u = !0, m && clearTimeout(m), ae && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(ae), ae = 0, c.value?.end();
4727
- }), (t, n) => (j(), _("div", {
4725
+ }), j(() => {
4726
+ u = !0, f && clearTimeout(f), I && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(I), I = 0, c.value?.end();
4727
+ }), (t, n) => (M(), b("div", {
4728
4728
  "data-test": "voice-mode",
4729
4729
  "data-voice-state": o.value,
4730
- "data-voice-activity": h.value,
4730
+ "data-voice-activity": p.value,
4731
4731
  class: "relative flex min-h-0 flex-1 flex-col px-4 pt-8 pb-5"
4732
- }, [v("div", fi, [
4733
- v("div", pi, [x(ze, {
4732
+ }, [x("div", mi, [
4733
+ x("div", hi, [C(ze, {
4734
4734
  agent: e.agent,
4735
4735
  "show-status": !1,
4736
4736
  "show-owner-mark": !1,
4737
4737
  "is-light": e.isLight,
4738
4738
  class: "size-28"
4739
4739
  }, null, 8, ["agent", "is-light"])]),
4740
- v("div", mi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4740
+ x("div", gi, [(M(!0), b(m, null, F(oe.value, (e, t) => (M(), b("span", {
4741
4741
  key: t,
4742
4742
  "data-test": "voice-histogram-bar",
4743
- class: T(["w-[2.5px] rounded-full transition-colors duration-150", [R.value, h.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
4744
- style: k({
4743
+ class: k(["w-[2.5px] rounded-full transition-colors duration-150", [B.value, p.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
4744
+ style: A({
4745
4745
  height: `${e}px`,
4746
- ...h.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4746
+ ...p.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4747
4747
  })
4748
4748
  }, null, 6))), 128))]),
4749
- v("div", hi, I(ue.value), 1)
4750
- ])], 8, di));
4749
+ x("div", _i, R(ce.value), 1)
4750
+ ])], 8, pi));
4751
4751
  }
4752
- }), bi = {
4752
+ }), Si = {
4753
4753
  key: 0,
4754
4754
  class: "pb-4"
4755
- }, xi = {
4755
+ }, Ci = {
4756
4756
  key: 1,
4757
4757
  "data-test": "messaging-sdk-header",
4758
4758
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4759
- }, Si = { class: "min-w-0 flex-1" }, Ci = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, wi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Ti = {
4759
+ }, wi = { class: "min-w-0 flex-1" }, Ti = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Ei = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Di = {
4760
4760
  key: 0,
4761
4761
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4762
- }, Ei = {
4762
+ }, Oi = {
4763
4763
  key: 0,
4764
4764
  "data-test": "messaging-empty-state",
4765
4765
  class: "flex flex-col items-center justify-center px-4"
4766
- }, Di = ["title"], Oi = {
4766
+ }, ki = ["title"], Ai = {
4767
4767
  key: 0,
4768
4768
  class: "flex items-center gap-3 py-3 px-2"
4769
- }, ki = ["data-journal-outcome"], Ai = [
4769
+ }, ji = ["data-journal-outcome"], Mi = [
4770
4770
  "data-message-id",
4771
4771
  "data-message-sender",
4772
4772
  "data-conversation-id",
@@ -4777,7 +4777,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4777
4777
  "data-issue-action-label",
4778
4778
  "data-issue-action-url",
4779
4779
  "data-streaming"
4780
- ], ji = { class: "max-w-[85%] min-w-0" }, Mi = ["href"], Ni = [
4780
+ ], Ni = { class: "max-w-[85%] min-w-0" }, Pi = ["href"], Fi = [
4781
4781
  "data-message-id",
4782
4782
  "data-message-sender",
4783
4783
  "data-conversation-id",
@@ -4786,7 +4786,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4786
4786
  "data-issue-code",
4787
4787
  "data-issue-bucket",
4788
4788
  "data-streaming"
4789
- ], Pi = [
4789
+ ], Ii = [
4790
4790
  "data-test",
4791
4791
  "data-message-id",
4792
4792
  "data-message-sender",
@@ -4796,61 +4796,61 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4796
4796
  "data-streaming",
4797
4797
  "data-queued",
4798
4798
  "aria-label"
4799
- ], Fi = ["src", "alt"], Ii = ["src"], Li = ["href"], Ri = {
4799
+ ], Li = ["src", "alt"], Ri = ["src"], zi = ["href"], Bi = {
4800
4800
  key: 0,
4801
4801
  "data-test": "messaging-message-text-part"
4802
- }, zi = [
4802
+ }, Vi = [
4803
4803
  "src",
4804
4804
  "alt",
4805
4805
  "data-attachment-placement"
4806
- ], Bi = ["src", "data-attachment-placement"], Vi = ["href", "data-attachment-placement"], Hi = ["data-journal-outcome"], Ui = {
4806
+ ], Hi = ["src", "data-attachment-placement"], Ui = ["href", "data-attachment-placement"], Wi = ["data-journal-outcome"], Gi = {
4807
4807
  key: 2,
4808
4808
  "data-test": "messaging-tool-activity-tail",
4809
4809
  "aria-label": "Assistant is still working",
4810
4810
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4811
- }, Wi = ["data-journal-outcome"], Gi = ["data-test", "data-working-description"], Ki = {
4811
+ }, Ki = ["data-journal-outcome"], qi = ["data-test", "data-working-description"], Ji = {
4812
4812
  class: "flex items-center gap-[5px]",
4813
4813
  "aria-hidden": "true"
4814
- }, qi = { class: "truncate" }, Ji = ["data-issue-code"], Yi = ["href"], Xi = ["src", "alt"], Zi = { class: "max-w-20 truncate" }, Qi = ["onClick"], $i = {
4814
+ }, Yi = { class: "truncate" }, Xi = ["data-issue-code"], Zi = ["href"], Qi = ["src", "alt"], $i = { class: "max-w-20 truncate" }, ea = ["onClick"], ta = {
4815
4815
  key: 0,
4816
4816
  class: "shrink-0 flex items-center justify-center size-14"
4817
- }, ea = ["data-composer-action"], ta = ["placeholder", "disabled"], na = { class: "font-mono text-sm tabular-nums" }, ra = { class: "mt-2.5 flex items-center" }, ia = [
4817
+ }, na = ["data-composer-action"], ra = ["placeholder", "disabled"], ia = { class: "font-mono text-sm tabular-nums" }, aa = { class: "mt-2.5 flex items-center" }, oa = [
4818
4818
  "disabled",
4819
4819
  "aria-label",
4820
4820
  "title"
4821
- ], aa = {
4821
+ ], sa = {
4822
4822
  key: 0,
4823
4823
  class: "i-svg-spinners-ring-resize size-5"
4824
- }, oa = {
4824
+ }, ca = {
4825
4825
  key: 1,
4826
4826
  class: "i-tabler-plus size-5"
4827
- }, sa = { class: "sr-only" }, ca = { class: "flex items-center gap-2" }, la = ["aria-label", "title"], ua = { class: "sr-only" }, da = [
4827
+ }, la = { class: "sr-only" }, ua = { class: "flex items-center gap-2" }, da = ["aria-label", "title"], fa = { class: "sr-only" }, pa = [
4828
4828
  "disabled",
4829
4829
  "aria-label",
4830
4830
  "title"
4831
- ], fa = {
4831
+ ], ma = {
4832
4832
  class: "flex h-4 items-center gap-[2px]",
4833
4833
  "aria-hidden": "true"
4834
- }, pa = [
4834
+ }, ha = [
4835
4835
  "data-composer-action",
4836
4836
  "disabled",
4837
4837
  "aria-label",
4838
4838
  "title"
4839
- ], ma = {
4839
+ ], ga = {
4840
4840
  key: 0,
4841
4841
  class: "i-tabler-player-stop-filled size-3.5"
4842
- }, ha = {
4842
+ }, _a = {
4843
4843
  key: 1,
4844
4844
  class: "i-tabler-arrow-up size-[17px]"
4845
- }, ga = { class: "sr-only" }, _a = {
4845
+ }, va = { class: "sr-only" }, ya = {
4846
4846
  key: 3,
4847
4847
  "data-test": "messaging-ai-notice",
4848
4848
  class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
4849
- }, va = {
4849
+ }, ba = {
4850
4850
  key: 4,
4851
4851
  "data-test": "messaging-suggested-prompts",
4852
4852
  class: "mt-3 w-full sm:mx-auto sm:mt-5 sm:max-w-[720px]"
4853
- }, ya = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ba = ["disabled", "onClick"], xa = ["aria-expanded"], Sa = /* @__PURE__ */ S({
4853
+ }, xa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, Sa = ["disabled", "onClick"], Ca = ["aria-expanded"], wa = /* @__PURE__ */ T({
4854
4854
  __name: "ElAgentChat",
4855
4855
  props: {
4856
4856
  chatController: {},
@@ -4888,10 +4888,10 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4888
4888
  label: "Public",
4889
4889
  tooltip: "Anyone with the link can see this"
4890
4890
  }
4891
- }, n = p(() => {
4891
+ }, n = h(() => {
4892
4892
  let n = { ...t[e.scope] };
4893
4893
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
4894
- }), r = M(), i = M(), a = M();
4894
+ }), r = P(), a = P(), o = P();
4895
4895
  function containsMarkdownLink(e) {
4896
4896
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4897
4897
  }
@@ -4902,23 +4902,23 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4902
4902
  let n = e[t], r = e[t + 1];
4903
4903
  return !r || r.sender !== n.sender;
4904
4904
  }
4905
- let o = p(() => e.chatController?.textState.value), s = p(() => o.value?.isConnected ?? !1), c = p(() => o.value?.isThinking ?? !1), u = p(() => o.value?.connectionStatus === "disconnected" && !!o.value?.error), S = p(() => o.value?.connectionStatus !== "connected" && !o.value?.error), A = M(!1), F = p(() => e.chatController?.liveTurnBlocks?.value ?? []), ie = p(() => {
4906
- for (let e = F.value.length - 1; e >= 0; e--) {
4907
- let t = F.value[e];
4905
+ let c = h(() => e.chatController?.textState.value), u = h(() => c.value?.isConnected ?? !1), f = h(() => c.value?.isThinking ?? !1), p = h(() => c.value?.connectionStatus === "disconnected" && !!c.value?.error), T = h(() => c.value?.connectionStatus !== "connected" && !c.value?.error), ne = P(!1), ie = h(() => e.chatController?.liveTurnBlocks?.value ?? []), ae = h(() => {
4906
+ for (let e = ie.value.length - 1; e >= 0; e--) {
4907
+ let t = ie.value[e];
4908
4908
  if (t?.kind === "text") return t.id;
4909
4909
  }
4910
- }), ae = p(() => e.chatController?.liveStreamMessageId?.value), B = p(() => {
4910
+ }), oe = h(() => e.chatController?.liveStreamMessageId?.value), U = h(() => {
4911
4911
  let t = e.chatController?.sharedMessages.value ?? [];
4912
- return F.value.length && ae.value ? t.filter((e) => e.id !== ae.value) : t;
4913
- }), H = p(() => {
4914
- if (!e.chatController?.workJournal?.value) return o.value?.workingDescription?.trim() || void 0;
4915
- }), he = p(() => e.chatController?.workJournal?.value), _e = p(() => {
4916
- if (!he.value && !F.value.length) return;
4917
- let e = B.value, t = e[e.length - 1];
4912
+ return ie.value.length && oe.value ? t.filter((e) => e.id !== oe.value) : t;
4913
+ }), pe = h(() => {
4914
+ if (!e.chatController?.workJournal?.value) return c.value?.workingDescription?.trim() || void 0;
4915
+ }), _e = h(() => e.chatController?.workJournal?.value), W = h(() => {
4916
+ if (!_e.value && !ie.value.length) return;
4917
+ let e = U.value, t = e[e.length - 1];
4918
4918
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4919
- }), ve = p(() => {
4919
+ }), ve = h(() => {
4920
4920
  let t = {};
4921
- for (let n of B.value) {
4921
+ for (let n of U.value) {
4922
4922
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4923
4923
  let r = e.chatController?.workJournalFor?.({
4924
4924
  activities: n.toolActivities,
@@ -4978,31 +4978,39 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4978
4978
  text: t.slice(i)
4979
4979
  }), r;
4980
4980
  }
4981
- let U = p(() => o.value?.transientIssue), ye = p(() => {
4982
- if (!c.value) return;
4983
- let e = B.value, t = e[e.length - 1];
4981
+ let G = h(() => c.value?.transientIssue), ye = h(() => {
4982
+ if (!f.value) return;
4983
+ let e = U.value, t = e[e.length - 1];
4984
4984
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4985
- }), W = p(() => !c.value || H.value || he.value || F.value.length ? !1 : ye.value === void 0), be = p(() => H.value ?? (W.value ? "Thinking…" : void 0)), G = p(() => o.value?.sendBlockedReason), Se = p(() => G.value === "agent_deleted"), Ce = p(() => e.agent.state.value.lifecycle === "starting" ? `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"} · sends when ready` : u.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : S.value ? "Connecting..." : G.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
4985
+ }), K = h(() => !f.value || pe.value || _e.value || ie.value.length ? !1 : ye.value === void 0), be = h(() => pe.value ?? (K.value ? "Thinking…" : void 0)), Se = h(() => c.value?.sendBlockedReason), q = h(() => Se.value === "agent_deleted"), Ce = h(() => {
4986
+ let t = e.agent.displayName.value || e.agent.name.value || "assistant";
4987
+ if (e.agent.state.value.lifecycle === "starting") return `Message ${t} · sends when ready`;
4988
+ if (p.value) {
4989
+ let n = s(e.agent.state.value);
4990
+ return n === "asleep" || n === "stuck" ? `${t} is ${i[n].toLowerCase()}` : `Message ${t}`;
4991
+ }
4992
+ return T.value ? "Connecting..." : Se.value === "agent_deleted" ? "This assistant was deleted" : `Message ${t}`;
4993
+ }), we = h(() => e.chatController?.composerState?.value ?? {
4986
4994
  text: "",
4987
4995
  pendingAttachments: [],
4988
4996
  isUploading: !1
4989
- }), Te = p({
4997
+ }), Te = h({
4990
4998
  get: () => we.value.text,
4991
4999
  set: (t) => e.chatController?.setComposerText?.({ text: t })
4992
- }), Ee = p(() => we.value.pendingAttachments), De = p(() => we.value.isUploading), Oe = p(() => e.chatController?.voiceRecorder), ke = p(() => Oe.value?.isBusy.value ?? !1), Ae = p(() => e.chatController?.canAttachFile?.value ?? !1), je = p(() => e.chatController?.canRecordAudio?.value ?? !1), Me = p(() => e.chatController?.composerAction?.value ?? "idle"), Ne = p(() => Me.value !== "idle"), Fe = p(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Ie = p(() => e.chatController?.queuedMessageIds?.value);
5000
+ }), Ee = h(() => we.value.pendingAttachments), De = h(() => we.value.isUploading), Oe = h(() => e.chatController?.voiceRecorder), ke = h(() => Oe.value?.isBusy.value ?? !1), Ae = h(() => e.chatController?.canAttachFile?.value ?? !1), je = h(() => e.chatController?.canRecordAudio?.value ?? !1), Me = h(() => e.chatController?.composerAction?.value ?? "idle"), Ne = h(() => Me.value !== "idle"), Fe = h(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Ie = h(() => e.chatController?.queuedMessageIds?.value);
4993
5001
  function isQueuedMessage(e) {
4994
5002
  return Ie.value?.has(e) ?? !1;
4995
5003
  }
4996
- let Le = p(() => Me.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), Re = p(() => je.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Be = p(() => Oe.value?.isActive.value ?? !1), Ve = p(() => Oe.value?.elapsedLabel.value ?? "0:00"), He = p(() => Oe.value?.statusText.value ?? "Release to send"), Ue = p(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), We = M(!1), Ge = M(), Ke = p(() => e.chatController?.canStartVoice?.value ?? !1), qe = p(() => Ke.value && !We.value && !Be.value && Me.value === "idle"), Ye = p(() => !s.value), Xe = p(() => Ye.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5004
+ let Le = h(() => Me.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), Re = h(() => je.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Be = h(() => Oe.value?.isActive.value ?? !1), Ve = h(() => Oe.value?.elapsedLabel.value ?? "0:00"), He = h(() => Oe.value?.statusText.value ?? "Release to send"), Ue = h(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), We = P(!1), Ge = P(), Ke = h(() => e.chatController?.canStartVoice?.value ?? !1), qe = h(() => Ke.value && !We.value && !Be.value && Me.value === "idle"), Ye = h(() => !u.value), Xe = h(() => Ye.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
4997
5005
  function startVoiceConversation() {
4998
5006
  !qe.value || Ye.value || (We.value = !0);
4999
5007
  }
5000
- let Ze = p(() => We.value && we.value.text.trim().length > 0);
5008
+ let Ze = h(() => We.value && we.value.text.trim().length > 0);
5001
5009
  async function sendVoiceUserMessage() {
5002
5010
  let t = we.value.text.trim();
5003
5011
  if (t) {
5004
5012
  if (Ge.value?.sendUserMessage(t)) {
5005
- e.chatController?.setComposerText?.({ text: "" }), i.value?.focus();
5013
+ e.chatController?.setComposerText?.({ text: "" }), a.value?.focus();
5006
5014
  return;
5007
5015
  }
5008
5016
  await sendMessage();
@@ -5011,25 +5019,25 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5011
5019
  async function endVoiceConversation() {
5012
5020
  if (!We.value) return;
5013
5021
  let t = Ge.value?.end();
5014
- We.value = !1, await C(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5022
+ We.value = !1, await te(), await t, a.value?.focus(), await e.chatController?.refreshMessages();
5015
5023
  }
5016
- let K = p(() => e.variant === "light"), Qe = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), q = p(() => K.value ? "text-theme-300" : "text-white/30");
5017
- te(async () => {
5018
- e.chatController && !s.value && await e.chatController.startTextConversation();
5019
- }), ne(() => {
5024
+ let J = h(() => e.variant === "light"), Qe = h(() => J.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), X = h(() => J.value ? "text-theme-300" : "text-white/30");
5025
+ re(async () => {
5026
+ e.chatController && !u.value && await e.chatController.startTextConversation();
5027
+ }), j(() => {
5020
5028
  e.chatController?.voiceRecorder?.teardown();
5021
5029
  });
5022
5030
  async function sendMessage() {
5023
5031
  if (!e.chatController || Me.value !== "send") return;
5024
- i.value && (i.value.style.height = "auto", i.value.focus()), r.value?.pin();
5032
+ a.value && (a.value.style.height = "auto", a.value.focus()), r.value?.pin();
5025
5033
  let t = e.chatController.sendComposerMessage();
5026
- window.matchMedia("(pointer: coarse)").matches && i.value?.blur(), await t;
5034
+ window.matchMedia("(pointer: coarse)").matches && a.value?.blur(), await t;
5027
5035
  }
5028
5036
  async function handleCardAction(t) {
5029
- !e.chatController || Se.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5037
+ !e.chatController || q.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5030
5038
  }
5031
5039
  async function sendSuggestedPrompt(t) {
5032
- !e.chatController || Se.value || (r.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
5040
+ !e.chatController || q.value || (r.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
5033
5041
  }
5034
5042
  async function handleComposerAction() {
5035
5043
  if (e.chatController) {
@@ -5044,14 +5052,14 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5044
5052
  e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await (Ze.value ? sendVoiceUserMessage() : sendMessage()));
5045
5053
  }
5046
5054
  function focusComposer(e) {
5047
- Be.value || Se.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
5055
+ Be.value || q.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
5048
5056
  }
5049
5057
  function adjustTextareaHeight() {
5050
- i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
5058
+ a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
5051
5059
  }
5052
- se(Te, () => C(() => adjustTextareaHeight()));
5060
+ se(Te, () => te(() => adjustTextareaHeight()));
5053
5061
  function triggerFileInput() {
5054
- a.value?.click();
5062
+ o.value?.click();
5055
5063
  }
5056
5064
  async function handleFileSelect(t) {
5057
5065
  let n = t.target, r = n.files?.[0];
@@ -5093,73 +5101,73 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5093
5101
  ...o ? {} : { year: "numeric" }
5094
5102
  })}, ${a}`;
5095
5103
  }
5096
- return (t, o) => (j(), _("div", {
5104
+ return (t, i) => (M(), b("div", {
5097
5105
  "data-test": "messaging-root",
5098
- class: T(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5106
+ class: k(["@container/chat relative flex h-full flex-col", U.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5099
5107
  }, [
5100
- e.showHeader && !K.value ? (j(), _("div", bi, [x(Pe, {
5108
+ e.showHeader && !J.value ? (M(), b("div", Si, [C(Pe, {
5101
5109
  agent: e.agent,
5102
- "is-online": s.value
5103
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (j(), _("div", xi, [v("div", { class: T(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5104
- x(ze, {
5110
+ "is-online": u.value
5111
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (M(), b("div", Ci, [x("div", { class: k(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5112
+ C(ze, {
5105
5113
  agent: e.agent,
5106
- "is-light": K.value,
5114
+ "is-light": J.value,
5107
5115
  class: "size-10"
5108
5116
  }, null, 8, ["agent", "is-light"]),
5109
- v("div", Si, [v("div", Ci, I(e.agent.displayName.value), 1), v("div", wi, I(e.agent.title.value || "Assistant"), 1)]),
5110
- e.headerMeta ? (j(), _("span", Ti, I(e.headerMeta), 1)) : h("", !0)
5111
- ], 2)])) : h("", !0),
5112
- We.value ? (j(), m(yi, {
5117
+ x("div", wi, [x("div", Ti, R(e.agent.displayName.value), 1), x("div", Ei, R(e.agent.title.value || "Assistant"), 1)]),
5118
+ e.headerMeta ? (M(), b("span", Di, R(e.headerMeta), 1)) : v("", !0)
5119
+ ], 2)])) : v("", !0),
5120
+ We.value ? (M(), _(xi, {
5113
5121
  key: 2,
5114
5122
  ref_key: "voiceMode",
5115
5123
  ref: Ge,
5116
5124
  agent: e.agent,
5117
5125
  "chat-controller": e.chatController,
5118
- "is-light": K.value,
5126
+ "is-light": J.value,
5119
5127
  onEnd: endVoiceConversation
5120
5128
  }, null, 8, [
5121
5129
  "agent",
5122
5130
  "chat-controller",
5123
5131
  "is-light"
5124
- ])) : (j(), _(f, { key: 3 }, [S.value ? (j(), _("div", {
5132
+ ])) : (M(), b(m, { key: 3 }, [T.value ? (M(), b("div", {
5125
5133
  key: 0,
5126
- class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
5127
- }, [x(pe, { class: "size-4" })], 2)) : e.setupHint ? (j(), _("div", {
5134
+ class: k(["py-16 flex flex-col items-center justify-center gap-2 text-sm", J.value ? "text-theme-400" : "text-theme-600"])
5135
+ }, [C(he, { class: "size-4" })], 2)) : e.setupHint ? (M(), b("div", {
5128
5136
  key: 1,
5129
- class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", q.value])
5130
- }, [o[22] || (o[22] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, I(e.setupHint), 1)], 2)) : h("", !0), x(ci, {
5137
+ class: k(["flex items-center justify-center gap-1.5 py-2 text-[11px]", X.value])
5138
+ }, [i[22] || (i[22] = x("i", { class: "i-tabler-tool size-3" }, null, -1)), x("span", null, R(e.setupHint), 1)], 2)) : v("", !0), C(ui, {
5131
5139
  ref_key: "chatScroller",
5132
5140
  ref: r,
5133
- class: T(B.value.length === 0 ? "flex-none" : "flex-1")
5141
+ class: k(U.value.length === 0 ? "flex-none" : "flex-1")
5134
5142
  }, {
5135
- default: R(() => [v("div", { class: T([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5136
- B.value.length === 0 && !S.value ? (j(), _("div", Ei, [re(t.$slots, "empty-heading", {
5143
+ default: ce(() => [x("div", { class: k([U.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? U.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5144
+ U.value.length === 0 && !T.value ? (M(), b("div", Oi, [I(t.$slots, "empty-heading", {
5137
5145
  agent: e.agent,
5138
- isLight: K.value
5139
- }, () => [x(ze, {
5146
+ isLight: J.value
5147
+ }, () => [C(ze, {
5140
5148
  agent: e.agent,
5141
- "is-light": K.value,
5149
+ "is-light": J.value,
5142
5150
  class: "mb-4 size-20 @sm/chat:size-24"
5143
- }, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, I(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (j(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm", q.value]) }, I(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
5144
- class: T(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5151
+ }, null, 8, ["agent", "is-light"]), x("div", { class: k(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, R(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? v("", !0) : (M(), b(m, { key: 0 }, [x("p", { class: k(["mt-1 text-center text-xs @sm/chat:text-sm", X.value]) }, R(e.emptyStateMessage || "Type your message to get started."), 3), x("div", {
5152
+ class: k(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", J.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5145
5153
  title: n.value.tooltip
5146
- }, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, I(n.value.label), 1)], 10, Di)], 64))])) : h("", !0),
5147
- (j(!0), _(f, null, P(B.value, (e, t) => (j(), _(f, { key: e.id }, [
5148
- shouldShowTimeDivider(B.value, t) ? (j(), _("div", Oi, [
5149
- v("div", { class: T(["flex-1 h-px", Qe.value]) }, null, 2),
5150
- v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", q.value]) }, I(shouldShowTimeDivider(B.value, t)), 3),
5151
- v("div", { class: T(["flex-1 h-px", Qe.value]) }, null, 2)
5152
- ])) : h("", !0),
5153
- messageWorkJournal(e) ? (j(), _("div", {
5154
+ }, [x("i", { class: k([n.value.icon, "size-3"]) }, null, 2), x("span", null, R(n.value.label), 1)], 10, ki)], 64))])) : v("", !0),
5155
+ (M(!0), b(m, null, F(U.value, (e, t) => (M(), b(m, { key: e.id }, [
5156
+ shouldShowTimeDivider(U.value, t) ? (M(), b("div", Ai, [
5157
+ x("div", { class: k(["flex-1 h-px", Qe.value]) }, null, 2),
5158
+ x("span", { class: k(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", X.value]) }, R(shouldShowTimeDivider(U.value, t)), 3),
5159
+ x("div", { class: k(["flex-1 h-px", Qe.value]) }, null, 2)
5160
+ ])) : v("", !0),
5161
+ messageWorkJournal(e) ? (M(), b("div", {
5154
5162
  key: 1,
5155
5163
  "data-test": "messaging-message-tool-activity",
5156
5164
  "data-journal-outcome": messageWorkJournal(e)?.outcome,
5157
5165
  class: "mb-4 w-full"
5158
- }, [x(Je, {
5166
+ }, [C(Je, {
5159
5167
  model: messageWorkJournal(e),
5160
- "is-light": K.value
5161
- }, null, 8, ["model", "is-light"])], 8, ki)) : h("", !0),
5162
- isSystemExplainerMessage(e) ? (j(), _("div", {
5168
+ "is-light": J.value
5169
+ }, null, 8, ["model", "is-light"])], 8, ji)) : v("", !0),
5170
+ isSystemExplainerMessage(e) ? (M(), b("div", {
5163
5171
  key: 2,
5164
5172
  "data-test": "messaging-system-msg",
5165
5173
  "data-message-id": e.id,
@@ -5173,28 +5181,28 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5173
5181
  "data-issue-action-url": e.issue?.actionUrl,
5174
5182
  "data-streaming": e.id === ye.value ? "true" : void 0,
5175
5183
  class: "flex gap-2 items-end justify-start mb-4"
5176
- }, [v("div", ji, [v("div", { class: T(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: T(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (j(), m(ai, {
5184
+ }, [x("div", Ni, [x("div", { class: k(["mb-1 pl-1 text-[11px] font-medium", J.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), x("div", { class: k(["pl-1", J.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (M(), _(si, {
5177
5185
  key: 0,
5178
5186
  text: e.text,
5179
- inverted: !K.value,
5187
+ inverted: !J.value,
5180
5188
  streaming: e.id === ye.value,
5181
- onClick: o[0] || (o[0] = de(() => {}, ["stop"])),
5189
+ onClick: i[0] || (i[0] = H(() => {}, ["stop"])),
5182
5190
  onAction: handleCardAction
5183
5191
  }, null, 8, [
5184
5192
  "text",
5185
5193
  "inverted",
5186
5194
  "streaming"
5187
- ])) : e.issue?.help ? (j(), m(ai, {
5195
+ ])) : e.issue?.help ? (M(), _(si, {
5188
5196
  key: 1,
5189
5197
  text: e.issue.help,
5190
- inverted: !K.value
5191
- }, null, 8, ["text", "inverted"])) : h("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (j(), _("a", {
5198
+ inverted: !J.value
5199
+ }, null, 8, ["text", "inverted"])) : v("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (M(), b("a", {
5192
5200
  key: 2,
5193
5201
  href: e.issue.actionUrl,
5194
5202
  "data-test": "messaging-system-msg-action",
5195
- class: T(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5196
- onClick: o[1] || (o[1] = de(() => {}, ["stop"]))
5197
- }, [b(I(e.issue.actionLabel) + " ", 1), o[23] || (o[23] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Mi)) : h("", !0)], 2)])], 8, Ai)) : e.sender === "system" ? (j(), _("div", {
5203
+ class: k(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", J.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5204
+ onClick: i[1] || (i[1] = H(() => {}, ["stop"]))
5205
+ }, [S(R(e.issue.actionLabel) + " ", 1), i[23] || (i[23] = x("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Pi)) : v("", !0)], 2)])], 8, Mi)) : e.sender === "system" ? (M(), b("div", {
5198
5206
  key: 3,
5199
5207
  "data-test": "messaging-system-status-msg",
5200
5208
  "data-message-id": e.id,
@@ -5205,15 +5213,15 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5205
5213
  "data-issue-code": e.issue?.code,
5206
5214
  "data-issue-bucket": e.issue?.bucket,
5207
5215
  "data-streaming": e.id === ye.value ? "true" : void 0,
5208
- class: T(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", K.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5209
- }, [o[24] || (o[24] = v("i", {
5216
+ class: k(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", J.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5217
+ }, [i[24] || (i[24] = x("i", {
5210
5218
  class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
5211
5219
  "aria-hidden": "true"
5212
- }, null, -1)), x(ai, {
5220
+ }, null, -1)), C(si, {
5213
5221
  text: e.text,
5214
- inverted: !K.value,
5215
- onClick: o[2] || (o[2] = de(() => {}, ["stop"]))
5216
- }, null, 8, ["text", "inverted"])], 10, Ni)) : (j(), _("div", {
5222
+ inverted: !J.value,
5223
+ onClick: i[2] || (i[2] = H(() => {}, ["stop"]))
5224
+ }, null, 8, ["text", "inverted"])], 10, Fi)) : (M(), b("div", {
5217
5225
  key: 4,
5218
5226
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5219
5227
  "data-message-id": e.id,
@@ -5224,201 +5232,201 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5224
5232
  "data-streaming": e.id === ye.value ? "true" : void 0,
5225
5233
  "data-queued": isQueuedMessage(e.id) ? "true" : void 0,
5226
5234
  "aria-label": isQueuedMessage(e.id) ? "Sent — will be answered after the current work finishes" : void 0,
5227
- class: T(["flex gap-2 items-end", {
5235
+ class: k(["flex gap-2 items-end", {
5228
5236
  "justify-end": e.sender === "user",
5229
5237
  "justify-start": e.sender === "agent",
5230
- "mb-6": isGroupEnd(B.value, t),
5238
+ "mb-6": isGroupEnd(U.value, t),
5231
5239
  "opacity-70": isQueuedMessage(e.id)
5232
5240
  }])
5233
- }, [v("div", {
5241
+ }, [x("div", {
5234
5242
  "data-test": "messaging-message-body",
5235
- class: T(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0")
5236
- }, [blockAttachmentsForMessage(e).length ? (j(), _("div", {
5243
+ class: k(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0")
5244
+ }, [blockAttachmentsForMessage(e).length ? (M(), b("div", {
5237
5245
  key: 0,
5238
- class: T(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
5239
- }, [(j(!0), _(f, null, P(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (j(), _(f, { key: attachmentKey(e, t) }, [e.type === "image" ? (j(), _("img", {
5246
+ class: k(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
5247
+ }, [(M(!0), b(m, null, F(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (M(), b(m, { key: attachmentKey(e, t) }, [e.type === "image" ? (M(), b("img", {
5240
5248
  key: 0,
5241
5249
  src: e.src,
5242
5250
  alt: e.filename,
5243
5251
  "data-test": "messaging-attachment",
5244
5252
  "data-attachment-placement": "block",
5245
5253
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5246
- }, null, 8, Fi)) : e.type === "audio" ? (j(), _("audio", {
5254
+ }, null, 8, Li)) : e.type === "audio" ? (M(), b("audio", {
5247
5255
  key: 1,
5248
5256
  src: e.src,
5249
5257
  controls: "",
5250
5258
  "data-test": "messaging-attachment",
5251
5259
  "data-attachment-placement": "block",
5252
5260
  class: "max-w-full"
5253
- }, null, 8, Ii)) : (j(), _("a", {
5261
+ }, null, 8, Ri)) : (M(), b("a", {
5254
5262
  key: 2,
5255
5263
  href: e.src,
5256
5264
  target: "_blank",
5257
5265
  rel: "noopener",
5258
5266
  "data-test": "messaging-attachment",
5259
5267
  "data-attachment-placement": "block",
5260
- class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5261
- }, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(e.filename), 1)], 10, Li))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (j(), _("div", {
5268
+ class: k(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5269
+ }, [i[25] || (i[25] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), S(" " + R(e.filename), 1)], 10, zi))], 64))), 128))], 2)) : v("", !0), messageRenderParts(e).length ? (M(), b("div", {
5262
5270
  key: 1,
5263
5271
  "data-test": "messaging-message-content",
5264
- class: T(e.sender === "user" ? K.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" : K.value ? "text-theme-800" : "text-white/95")
5265
- }, [(j(!0), _(f, null, P(messageRenderParts(e), (t) => (j(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (j(), _("div", Ri, [x(ai, {
5272
+ class: k(e.sender === "user" ? J.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" : J.value ? "text-theme-800" : "text-white/95")
5273
+ }, [(M(!0), b(m, null, F(messageRenderParts(e), (t) => (M(), b(m, { key: t.key }, [t.kind === "text" && t.text ? (M(), b("div", Bi, [C(si, {
5266
5274
  text: t.text,
5267
- inverted: e.sender === "user" || !K.value,
5275
+ inverted: e.sender === "user" || !J.value,
5268
5276
  streaming: e.id === ye.value,
5269
- onClick: o[3] || (o[3] = de(() => {}, ["stop"])),
5277
+ onClick: i[3] || (i[3] = H(() => {}, ["stop"])),
5270
5278
  onAction: handleCardAction
5271
5279
  }, null, 8, [
5272
5280
  "text",
5273
5281
  "inverted",
5274
5282
  "streaming"
5275
- ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (j(), _("img", {
5283
+ ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (M(), b("img", {
5276
5284
  key: 1,
5277
5285
  src: t.attachment.src,
5278
5286
  alt: t.attachment.filename,
5279
5287
  "data-test": "messaging-attachment",
5280
5288
  "data-attachment-placement": t.placement,
5281
5289
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5282
- }, null, 8, zi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (j(), _("audio", {
5290
+ }, null, 8, Vi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (M(), b("audio", {
5283
5291
  key: 2,
5284
5292
  src: t.attachment.src,
5285
5293
  controls: "",
5286
5294
  "data-test": "messaging-attachment",
5287
5295
  "data-attachment-placement": t.placement,
5288
5296
  class: "my-2 max-w-full"
5289
- }, null, 8, Bi)) : t.kind === "attachment" ? (j(), _("a", {
5297
+ }, null, 8, Hi)) : t.kind === "attachment" ? (M(), b("a", {
5290
5298
  key: 3,
5291
5299
  href: t.attachment.src,
5292
5300
  target: "_blank",
5293
5301
  rel: "noopener",
5294
5302
  "data-test": "messaging-attachment",
5295
5303
  "data-attachment-placement": t.placement,
5296
- class: T(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5297
- }, [o[26] || (o[26] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(t.attachment.filename), 1)], 10, Vi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Pi)),
5298
- e.id === _e.value ? (j(), _(f, { key: 5 }, [F.value.length ? (j(!0), _(f, { key: 0 }, P(F.value, (e) => (j(), _(f, { key: e.id }, [e.kind === "work" ? (j(), _("div", {
5304
+ class: k(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5305
+ }, [i[26] || (i[26] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), S(" " + R(t.attachment.filename), 1)], 10, Ui)) : v("", !0)], 64))), 128))], 2)) : v("", !0)], 2)], 10, Ii)),
5306
+ e.id === W.value ? (M(), b(m, { key: 5 }, [ie.value.length ? (M(!0), b(m, { key: 0 }, F(ie.value, (e) => (M(), b(m, { key: e.id }, [e.kind === "work" ? (M(), b("div", {
5299
5307
  key: 0,
5300
5308
  "data-test": "messaging-tool-activity",
5301
5309
  "data-journal-outcome": e.journal.outcome,
5302
5310
  class: "mb-4 w-full"
5303
- }, [x(Je, {
5311
+ }, [C(Je, {
5304
5312
  model: e.journal,
5305
- "is-light": K.value
5306
- }, null, 8, ["model", "is-light"])], 8, Hi)) : e.kind === "text" && e.content ? (j(), _("div", {
5313
+ "is-light": J.value
5314
+ }, null, 8, ["model", "is-light"])], 8, Wi)) : e.kind === "text" && e.content ? (M(), b("div", {
5307
5315
  key: 1,
5308
5316
  "data-test": "messaging-live-text-block",
5309
- class: T(["mb-4", K.value ? "text-theme-800" : "text-white/95"])
5310
- }, [x(ai, {
5317
+ class: k(["mb-4", J.value ? "text-theme-800" : "text-white/95"])
5318
+ }, [C(si, {
5311
5319
  text: e.content,
5312
- inverted: !K.value,
5313
- streaming: e.id === ie.value,
5314
- onClick: o[4] || (o[4] = de(() => {}, ["stop"])),
5320
+ inverted: !J.value,
5321
+ streaming: e.id === ae.value,
5322
+ onClick: i[4] || (i[4] = H(() => {}, ["stop"])),
5315
5323
  onAction: handleCardAction
5316
5324
  }, null, 8, [
5317
5325
  "text",
5318
5326
  "inverted",
5319
5327
  "streaming"
5320
- ])], 2)) : (j(), _("div", Ui, [x(pe, { class: T(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : he.value ? (j(), _("div", {
5328
+ ])], 2)) : (M(), b("div", Gi, [C(he, { class: k(["size-3.5", J.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : _e.value ? (M(), b("div", {
5321
5329
  key: 1,
5322
5330
  "data-test": "messaging-tool-activity",
5323
- "data-journal-outcome": he.value.outcome,
5331
+ "data-journal-outcome": _e.value.outcome,
5324
5332
  class: "mb-4 w-full"
5325
- }, [x(Je, {
5326
- model: he.value,
5327
- "is-light": K.value
5328
- }, null, 8, ["model", "is-light"])], 8, Wi)) : h("", !0)], 64)) : h("", !0)
5333
+ }, [C(Je, {
5334
+ model: _e.value,
5335
+ "is-light": J.value
5336
+ }, null, 8, ["model", "is-light"])], 8, Ki)) : v("", !0)], 64)) : v("", !0)
5329
5337
  ], 64))), 128)),
5330
- be.value ? (j(), _("div", {
5338
+ be.value ? (M(), b("div", {
5331
5339
  key: 1,
5332
- "data-test": H.value ? "messaging-working-state" : "messaging-thinking-indicator",
5333
- "data-working-description": H.value,
5340
+ "data-test": pe.value ? "messaging-working-state" : "messaging-thinking-indicator",
5341
+ "data-working-description": pe.value,
5334
5342
  role: "status",
5335
5343
  "aria-live": "polite",
5336
- class: T(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", K.value ? "text-theme-500" : "text-white/50"])
5337
- }, [v("span", Ki, [(j(), _(f, null, P(3, (e) => v("span", {
5344
+ class: k(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", J.value ? "text-theme-500" : "text-white/50"])
5345
+ }, [x("span", Ji, [(M(), b(m, null, F(3, (e) => x("span", {
5338
5346
  key: e,
5339
5347
  "data-test": "messaging-thinking-dot",
5340
5348
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5341
- style: k({ animationDelay: `${(e - 1) * .18}s` })
5342
- }, null, 4)), 64))]), v("span", qi, I(be.value), 1)], 10, Gi)) : h("", !0),
5343
- U.value ? (j(), _("div", {
5349
+ style: A({ animationDelay: `${(e - 1) * .18}s` })
5350
+ }, null, 4)), 64))]), x("span", Yi, R(be.value), 1)], 10, qi)) : v("", !0),
5351
+ G.value ? (M(), b("div", {
5344
5352
  key: 2,
5345
5353
  "data-test": "messaging-transient-issue",
5346
- "data-issue-code": U.value.code,
5347
- class: T(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", K.value ? "text-theme-600" : "text-white/60"])
5354
+ "data-issue-code": G.value.code,
5355
+ class: k(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", J.value ? "text-theme-600" : "text-white/60"])
5348
5356
  }, [
5349
- o[27] || (o[27] = v("i", {
5357
+ i[27] || (i[27] = x("i", {
5350
5358
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5351
5359
  "aria-hidden": "true"
5352
5360
  }, null, -1)),
5353
- v("span", null, [b(I(U.value.message), 1), U.value.help ? (j(), _(f, { key: 0 }, [b(I(U.value.help), 1)], 64)) : h("", !0)]),
5354
- U.value.actionUrl && U.value.actionLabel ? (j(), _("a", {
5361
+ x("span", null, [S(R(G.value.message), 1), G.value.help ? (M(), b(m, { key: 0 }, [S(R(G.value.help), 1)], 64)) : v("", !0)]),
5362
+ G.value.actionUrl && G.value.actionLabel ? (M(), b("a", {
5355
5363
  key: 0,
5356
- href: U.value.actionUrl,
5364
+ href: G.value.actionUrl,
5357
5365
  class: "shrink-0 underline underline-offset-2",
5358
- onClick: o[5] || (o[5] = de(() => {}, ["stop"]))
5359
- }, I(U.value.actionLabel), 9, Yi)) : h("", !0)
5360
- ], 10, Ji)) : h("", !0)
5366
+ onClick: i[5] || (i[5] = H(() => {}, ["stop"]))
5367
+ }, R(G.value.actionLabel), 9, Zi)) : v("", !0)
5368
+ ], 10, Xi)) : v("", !0)
5361
5369
  ], 2)]),
5362
5370
  _: 3
5363
5371
  }, 8, ["class"])], 64)),
5364
- v("div", {
5372
+ x("div", {
5365
5373
  "data-test": "messaging-composer-footer",
5366
- class: T(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5367
- B.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5368
- e.centered && B.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5369
- K.value ? e.centered ? "bg-theme-0" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
5374
+ class: k(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5375
+ U.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5376
+ e.centered && U.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5377
+ J.value ? e.centered ? "bg-theme-0" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
5370
5378
  ]])
5371
5379
  }, [
5372
- t.$slots["above-composer"] ? (j(), _("div", {
5380
+ t.$slots["above-composer"] ? (M(), b("div", {
5373
5381
  key: 0,
5374
5382
  "data-test": "messaging-above-composer",
5375
- class: T(["pb-2.5", e.centered ? "max-w-[720px] mx-auto" : ""])
5376
- }, [re(t.$slots, "above-composer")], 2)) : h("", !0),
5377
- Ee.value.length > 0 ? (j(), _("div", {
5383
+ class: k(["pb-2.5", e.centered ? "max-w-[720px] mx-auto" : ""])
5384
+ }, [I(t.$slots, "above-composer")], 2)) : v("", !0),
5385
+ Ee.value.length > 0 ? (M(), b("div", {
5378
5386
  key: 1,
5379
- class: T(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5380
- }, [(j(!0), _(f, null, P(Ee.value, (e, t) => (j(), _("div", {
5387
+ class: k(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5388
+ }, [(M(!0), b(m, null, F(Ee.value, (e, t) => (M(), b("div", {
5381
5389
  key: t,
5382
5390
  class: "relative shrink-0 group"
5383
- }, [e.type === "image" ? (j(), _("img", {
5391
+ }, [e.type === "image" ? (M(), b("img", {
5384
5392
  key: 0,
5385
5393
  src: e.src,
5386
5394
  alt: e.filename,
5387
- class: T(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5388
- }, null, 10, Xi)) : (j(), _("div", {
5395
+ class: k(["size-14 rounded-xl object-cover border", J.value ? "border-black/10" : "border-white/20"])
5396
+ }, null, 10, Qi)) : (M(), b("div", {
5389
5397
  key: 1,
5390
- class: T(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5391
- }, [o[28] || (o[28] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Zi, I(e.filename), 1)], 2)), v("button", {
5398
+ class: k(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", J.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5399
+ }, [i[28] || (i[28] = x("i", { class: "i-tabler-file size-4" }, null, -1)), x("span", $i, R(e.filename), 1)], 2)), x("button", {
5392
5400
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
5393
5401
  onClick: (e) => removeAttachment(t)
5394
- }, [...o[29] || (o[29] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Qi)]))), 128)), De.value ? (j(), _("div", $i, [x(pe, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5395
- Ae.value ? (j(), _("input", {
5402
+ }, [...i[29] || (i[29] = [x("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, ea)]))), 128)), De.value ? (M(), b("div", ta, [C(he, { class: "size-5" })])) : v("", !0)], 2)) : v("", !0),
5403
+ Ae.value ? (M(), b("input", {
5396
5404
  key: 2,
5397
5405
  ref_key: "fileInput",
5398
- ref: a,
5406
+ ref: o,
5399
5407
  type: "file",
5400
5408
  accept: "image/*,audio/*,video/*",
5401
5409
  class: "hidden",
5402
5410
  onChange: handleFileSelect
5403
- }, null, 544)) : h("", !0),
5404
- v("div", {
5411
+ }, null, 544)) : v("", !0),
5412
+ x("div", {
5405
5413
  "data-test": "messaging-composer",
5406
5414
  "data-composer-action": Me.value,
5407
- class: T(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? B.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", K.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5415
+ class: k(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? U.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", J.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5408
5416
  onClick: focusComposer
5409
- }, [Be.value ? (j(), _("div", {
5417
+ }, [Be.value ? (M(), b("div", {
5410
5418
  key: 1,
5411
5419
  "data-test": "messaging-recording-state",
5412
- class: T(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5420
+ class: k(["flex min-w-0 items-center gap-2 py-1", J.value ? "text-theme-700" : "text-white/80"])
5413
5421
  }, [
5414
- o[30] || (o[30] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5415
- v("span", na, I(Ve.value), 1),
5416
- v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, I(He.value), 3)
5417
- ], 2)) : ce((j(), _("textarea", {
5422
+ i[30] || (i[30] = x("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5423
+ x("span", ia, R(Ve.value), 1),
5424
+ x("span", { class: k(["min-w-0 truncate text-sm", J.value ? "text-theme-400" : "text-white/45"]) }, R(He.value), 3)
5425
+ ], 2)) : ue((M(), b("textarea", {
5418
5426
  key: 0,
5419
5427
  ref_key: "textarea",
5420
- ref: i,
5421
- "onUpdate:modelValue": o[6] || (o[6] = (e) => Te.value = e),
5428
+ ref: a,
5429
+ "onUpdate:modelValue": i[6] || (i[6] = (e) => Te.value = e),
5422
5430
  "data-test": "messaging-input",
5423
5431
  rows: "1",
5424
5432
  enterkeyhint: "send",
@@ -5428,128 +5436,128 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5428
5436
  autocorrect: "on",
5429
5437
  spellcheck: "true",
5430
5438
  placeholder: Ce.value,
5431
- disabled: Se.value,
5439
+ disabled: q.value,
5432
5440
  style: {
5433
5441
  fontSize: "16px",
5434
5442
  resize: "none"
5435
5443
  },
5436
- class: T(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5444
+ class: k(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", J.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5437
5445
  onKeydown: handleKeydown
5438
- }, null, 42, ta)), [[oe, Te.value]]), v("div", ra, [
5439
- v("button", {
5440
- class: T(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
5446
+ }, null, 42, ra)), [[B, Te.value]]), x("div", aa, [
5447
+ x("button", {
5448
+ class: k(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
5441
5449
  Ae.value ? "cursor-pointer" : "cursor-default",
5442
- K.value ? "text-theme-500" : "text-white/50",
5450
+ J.value ? "text-theme-500" : "text-white/50",
5443
5451
  De.value || ke.value ? "opacity-50 pointer-events-none" : ""
5444
5452
  ]]),
5445
- disabled: Se.value || De.value || ke.value || !Ae.value,
5453
+ disabled: q.value || De.value || ke.value || !Ae.value,
5446
5454
  "aria-label": Ae.value ? "Attach file" : "File attachments unavailable",
5447
5455
  title: Ae.value ? "Attach file" : "File attachments unavailable",
5448
- onClick: o[7] || (o[7] = (e) => Ae.value && triggerFileInput())
5449
- }, [De.value ? (j(), _("i", aa)) : (j(), _("i", oa)), v("span", sa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ia),
5450
- o[35] || (o[35] = v("div", { class: "flex-1" }, null, -1)),
5451
- v("div", ca, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5456
+ onClick: i[7] || (i[7] = (e) => Ae.value && triggerFileInput())
5457
+ }, [De.value ? (M(), b("i", sa)) : (M(), b("i", ca)), x("span", la, R(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, oa),
5458
+ i[35] || (i[35] = x("div", { class: "flex-1" }, null, -1)),
5459
+ x("div", ua, [(Re.value || Be.value) && !We.value ? (M(), b("button", {
5452
5460
  key: 0,
5453
5461
  "data-test": "messaging-record-audio-btn",
5454
- class: T(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Be.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5462
+ class: k(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Be.value ? J.value ? "text-theme-900 scale-110" : "text-white scale-110" : J.value ? "text-theme-500" : "text-white/60"]),
5455
5463
  "aria-label": Ue.value,
5456
5464
  title: Ue.value,
5457
- onPointerdown: o[8] || (o[8] = de((e) => startRecording(), ["prevent"])),
5458
- onPointerup: o[9] || (o[9] = de((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5459
- onPointercancel: o[10] || (o[10] = de((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5465
+ onPointerdown: i[8] || (i[8] = H((e) => startRecording(), ["prevent"])),
5466
+ onPointerup: i[9] || (i[9] = H((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5467
+ onPointercancel: i[10] || (i[10] = H((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5460
5468
  onKeydown: [
5461
- o[11] || (o[11] = ue(de((e) => startRecording(), ["prevent"]), ["enter"])),
5462
- o[13] || (o[13] = ue(de((e) => startRecording(), ["prevent"]), ["space"])),
5463
- o[15] || (o[15] = ue(de((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5469
+ i[11] || (i[11] = de(H((e) => startRecording(), ["prevent"]), ["enter"])),
5470
+ i[13] || (i[13] = de(H((e) => startRecording(), ["prevent"]), ["space"])),
5471
+ i[15] || (i[15] = de(H((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5464
5472
  ],
5465
- onKeyup: [o[12] || (o[12] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5466
- }, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ua, I(Ue.value), 1)], 42, la)) : h("", !0), We.value && !Ze.value ? (j(), _("button", {
5473
+ onKeyup: [i[12] || (i[12] = de(H((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), i[14] || (i[14] = de(H((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5474
+ }, [x("i", { class: k([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), x("span", fa, R(Ue.value), 1)], 42, da)) : v("", !0), We.value && !Ze.value ? (M(), b("button", {
5467
5475
  key: 1,
5468
5476
  "data-test": "messaging-voice-end-btn",
5469
- class: T(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
5477
+ class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
5470
5478
  "aria-label": "End voice conversation",
5471
5479
  title: "End voice conversation",
5472
- onClick: o[16] || (o[16] = (e) => endVoiceConversation())
5473
- }, [...o[31] || (o[31] = [v("i", {
5480
+ onClick: i[16] || (i[16] = (e) => endVoiceConversation())
5481
+ }, [...i[31] || (i[31] = [x("i", {
5474
5482
  class: "i-tabler-x size-[18px]",
5475
5483
  "aria-hidden": "true"
5476
- }, null, -1), v("span", { class: "sr-only" }, "End voice conversation", -1)])], 2)) : Ze.value ? (j(), _("button", {
5484
+ }, null, -1), x("span", { class: "sr-only" }, "End voice conversation", -1)])], 2)) : Ze.value ? (M(), b("button", {
5477
5485
  key: 2,
5478
5486
  "data-test": "messaging-voice-send-btn",
5479
- class: T(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
5487
+ class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
5480
5488
  "aria-label": "Send to the call",
5481
5489
  title: "Send to the call",
5482
- onClick: o[17] || (o[17] = (e) => sendVoiceUserMessage())
5483
- }, [...o[32] || (o[32] = [v("i", {
5490
+ onClick: i[17] || (i[17] = (e) => sendVoiceUserMessage())
5491
+ }, [...i[32] || (i[32] = [x("i", {
5484
5492
  class: "i-tabler-arrow-up size-[17px]",
5485
5493
  "aria-hidden": "true"
5486
- }, null, -1), v("span", { class: "sr-only" }, "Send to the call", -1)])], 2)) : qe.value ? (j(), _("button", {
5494
+ }, null, -1), x("span", { class: "sr-only" }, "Send to the call", -1)])], 2)) : qe.value ? (M(), b("button", {
5487
5495
  key: 3,
5488
5496
  "data-test": "messaging-voice-start-btn",
5489
- class: T(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Ye.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5497
+ class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Ye.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5490
5498
  disabled: Ye.value,
5491
5499
  "aria-label": Xe.value,
5492
5500
  title: Xe.value,
5493
- onClick: o[18] || (o[18] = (e) => startVoiceConversation())
5494
- }, [v("span", fa, [(j(), _(f, null, P([
5501
+ onClick: i[18] || (i[18] = (e) => startVoiceConversation())
5502
+ }, [x("span", ma, [(M(), b(m, null, F([
5495
5503
  7,
5496
5504
  13,
5497
5505
  16,
5498
5506
  11,
5499
5507
  14
5500
- ], (e) => v("span", {
5508
+ ], (e) => x("span", {
5501
5509
  key: e,
5502
5510
  class: "w-[2px] rounded-full bg-current",
5503
- style: k({ height: `${e}px` })
5504
- }, null, 4)), 64))]), o[33] || (o[33] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, da)) : Be.value ? h("", !0) : (j(), _(f, { key: 4 }, [Fe.value ? (j(), _("button", {
5511
+ style: A({ height: `${e}px` })
5512
+ }, null, 4)), 64))]), i[33] || (i[33] = x("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, pa)) : Be.value ? v("", !0) : (M(), b(m, { key: 4 }, [Fe.value ? (M(), b("button", {
5505
5513
  key: 0,
5506
5514
  "data-test": "messaging-secondary-stop-btn",
5507
- class: T(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", K.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5515
+ class: k(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5508
5516
  "aria-label": "Stop work",
5509
5517
  title: "Stop work",
5510
- onClick: o[19] || (o[19] = (t) => e.chatController?.stopChatTurn())
5511
- }, [...o[34] || (o[34] = [v("i", {
5518
+ onClick: i[19] || (i[19] = (t) => e.chatController?.stopChatTurn())
5519
+ }, [...i[34] || (i[34] = [x("i", {
5512
5520
  class: "i-tabler-player-stop-filled size-3.5",
5513
5521
  "aria-hidden": "true"
5514
- }, null, -1), v("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : h("", !0), v("button", {
5522
+ }, null, -1), x("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : v("", !0), x("button", {
5515
5523
  "data-test": "messaging-send-btn",
5516
5524
  "data-composer-action": Me.value,
5517
- class: T(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Ne.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5525
+ class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Ne.value ? J.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" : J.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5518
5526
  disabled: !Ne.value,
5519
5527
  "aria-label": Le.value,
5520
5528
  title: Le.value,
5521
- onClick: o[20] || (o[20] = (e) => handleComposerAction())
5522
- }, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
5523
- ])], 10, ea),
5524
- e.centered && B.value.length > 0 ? (j(), _("p", _a, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5525
- !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", va, [v("div", ya, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5529
+ onClick: i[20] || (i[20] = (e) => handleComposerAction())
5530
+ }, [Me.value === "stop" ? (M(), b("i", ga)) : (M(), b("i", _a)), x("span", va, R(Le.value), 1)], 10, ha)], 64))])
5531
+ ])], 10, na),
5532
+ e.centered && U.value.length > 0 ? (M(), b("p", ya, R(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : v("", !0),
5533
+ !We.value && U.value.length === 0 && e.suggestedPrompts.length > 0 ? (M(), b("div", ba, [x("div", xa, [(M(!0), b(m, null, F(e.suggestedPrompts, (e, t) => (M(), b("button", {
5526
5534
  key: e.id,
5527
5535
  type: "button",
5528
- disabled: Se.value,
5536
+ disabled: q.value,
5529
5537
  "data-test": "messaging-suggested-prompt",
5530
- class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !A.value && t >= 3 ? "max-sm:hidden" : ""]]),
5538
+ class: k(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [q.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !ne.value && t >= 3 ? "max-sm:hidden" : ""]]),
5531
5539
  onClick: (t) => sendSuggestedPrompt(e)
5532
- }, I(e.label), 11, ba))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5540
+ }, R(e.label), 11, Sa))), 128)), e.suggestedPrompts.length > 3 ? (M(), b("button", {
5533
5541
  key: 0,
5534
5542
  type: "button",
5535
5543
  "data-test": "messaging-suggested-prompts-more",
5536
- "aria-expanded": A.value,
5544
+ "aria-expanded": ne.value,
5537
5545
  class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
5538
- onClick: o[21] || (o[21] = (e) => A.value = !A.value)
5539
- }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, xa)) : h("", !0)])])) : h("", !0)
5546
+ onClick: i[21] || (i[21] = (e) => ne.value = !ne.value)
5547
+ }, [S(R(ne.value ? "See less" : "See more") + " ", 1), x("i", { class: k(["i-tabler-chevron-down size-4 transition-transform", ne.value ? "rotate-180" : ""]) }, null, 2)], 8, Ca)) : v("", !0)])])) : v("", !0)
5540
5548
  ], 2)
5541
5549
  ], 2));
5542
5550
  }
5543
- }), Ca = { class: "agent-wrap" }, wa = {
5551
+ }), Ta = { class: "agent-wrap" }, Ea = {
5544
5552
  key: 0,
5545
5553
  class: "flex items-center justify-center h-full"
5546
- }, Ta = {
5554
+ }, Da = {
5547
5555
  key: 2,
5548
5556
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5549
5557
  role: "status",
5550
5558
  "aria-live": "polite",
5551
5559
  "data-test": "agent-unavailable"
5552
- }, Ea = /* @__PURE__ */ S({
5560
+ }, Oa = /* @__PURE__ */ T({
5553
5561
  __name: "AgentWrap",
5554
5562
  props: {
5555
5563
  sdk: {},
@@ -5566,10 +5574,10 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5566
5574
  apiBase: {}
5567
5575
  },
5568
5576
  setup(e) {
5569
- let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5577
+ let r = o("AgentWrap"), i = e, a = i.sdk || t.getInstance({
5570
5578
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5571
5579
  ...i.apiBase && { apiBase: i.apiBase }
5572
- }), s = ie(!i.agent), c = ie(i.agent ? new n({ config: i.agent }) : void 0), u = ie();
5580
+ }), s = ae(!i.agent), c = ae(i.agent ? new n({ config: i.agent }) : void 0), u = ae();
5573
5581
  async function loadAgent() {
5574
5582
  if (i.agent) {
5575
5583
  r.debug("Agent provided via props, skipping fetch", {
@@ -5587,29 +5595,29 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5587
5595
  apiBase: i.apiBase
5588
5596
  },
5589
5597
  sdkState: {
5590
- isDev: o.isDev,
5591
- apiBase: o.apiBase
5598
+ isDev: a.isDev,
5599
+ apiBase: a.apiBase
5592
5600
  }
5593
5601
  }), s.value = !1;
5594
5602
  return;
5595
5603
  }
5596
5604
  try {
5597
5605
  s.value = !0, u.value = void 0, r.debug("Fetching public agent", { handle: i.handle });
5598
- let e = await o.user.getPublicAgent({ handle: i.handle });
5606
+ let e = await a.user.getPublicAgent({ handle: i.handle });
5599
5607
  e ? (c.value = new n({ config: e }), r.debug("Successfully fetched public agent", {
5600
5608
  agentId: e.agentId,
5601
5609
  handle: e.handle
5602
- }), e.agentId && o.user.track({
5610
+ }), e.agentId && a.user.track({
5603
5611
  event: "view_profile",
5604
5612
  agentId: e.agentId,
5605
5613
  properties: { viewSource: "widget" }
5606
- })) : (u.value = o.error.value || "Agent not found", r.error("Failed to fetch public agent - no data returned", {
5614
+ })) : (u.value = a.error.value || "Agent not found", r.error("Failed to fetch public agent - no data returned", {
5607
5615
  handle: i.handle,
5608
- sdkError: o.error.value,
5616
+ sdkError: a.error.value,
5609
5617
  sdkState: {
5610
- isDev: o.isDev,
5611
- apiBase: o.apiBase,
5612
- loading: o.loading.value
5618
+ isDev: a.isDev,
5619
+ apiBase: a.apiBase,
5620
+ loading: a.loading.value
5613
5621
  }
5614
5622
  }));
5615
5623
  } catch (e) {
@@ -5620,9 +5628,9 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5620
5628
  stack: e.stack
5621
5629
  } : e,
5622
5630
  sdkState: {
5623
- isDev: o.isDev,
5624
- apiBase: o.apiBase,
5625
- error: o.error.value
5631
+ isDev: a.isDev,
5632
+ apiBase: a.apiBase,
5633
+ error: a.error.value
5626
5634
  }
5627
5635
  });
5628
5636
  } finally {
@@ -5638,30 +5646,30 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5638
5646
  apiBase: i.apiBase
5639
5647
  },
5640
5648
  sdkState: {
5641
- isDev: o.isDev,
5642
- apiBase: o.apiBase,
5643
- error: o.error.value
5649
+ isDev: a.isDev,
5650
+ apiBase: a.apiBase,
5651
+ error: a.error.value
5644
5652
  }
5645
5653
  });
5646
5654
  }
5647
5655
  }
5648
- return te(loadAgent), (t, n) => (j(), _("div", Ca, [s.value ? (j(), _("div", wa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5649
- sdk: ae(o),
5656
+ return re(loadAgent), (t, n) => (M(), b("div", Ta, [s.value ? (M(), b("div", Ea, [x("div", { class: k(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? I(t.$slots, "default", {
5657
+ sdk: oe(a),
5650
5658
  agent: c.value,
5651
5659
  context: e.clientContext ?? e.context,
5652
5660
  firstMessage: e.firstMessage,
5653
5661
  buttonText: e.buttonText,
5654
5662
  buttonIcon: e.buttonIcon,
5655
5663
  loading: s.value
5656
- }, void 0, void 0, 1) : u.value ? (j(), _("div", Ta, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5664
+ }, void 0, void 0, 1) : u.value ? (M(), b("div", Da, [n[0] || (n[0] = x("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), x("button", {
5657
5665
  type: "button",
5658
5666
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5659
5667
  "data-test": "agent-unavailable-retry",
5660
5668
  onClick: loadAgent
5661
- }, " Try again ")])) : h("", !0)]));
5669
+ }, " Try again ")])) : v("", !0)]));
5662
5670
  }
5663
5671
  });
5664
5672
  //#endregion
5665
- export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, Sa as n, Oe as o, he as p, yi as r, Ee as s, Ea as t, handleImageError as u };
5673
+ export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, he as h, si as i, getAgentAvatarUrl as l, n as m, wa as n, Oe as o, _e as p, xi as r, Ee as s, Oa as t, handleImageError as u };
5666
5674
 
5667
5675
  //# sourceMappingURL=AgentWrap.js.map