@pagelines/sdk 1.0.709 → 1.0.710

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, parseChatVisualFencePayload as c } from "@pagelines/core";
4
- import { Fragment as u, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as _, createTextVNode as v, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, normalizeStyle as T, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as k, ref as A, renderList as j, renderSlot as ie, resolveDynamicComponent as ae, shallowRef as P, toDisplayString as F, unref as oe, vModelText as I, watch as se, withCtx as ce, withDirectives as R, withKeys as ue, withModifiers as z } from "vue";
3
+ import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatCardFencePayload as c, parseChatVisualFencePayload as u } from "@pagelines/core";
4
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as te, createVNode as b, defineComponent as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as re, onMounted as ie, onUnmounted as ae, openBlock as T, ref as k, renderList as A, renderSlot as oe, resolveDynamicComponent as j, shallowRef as se, toDisplayString as P, unref as ce, vModelText as ue, watch as de, withCtx as F, withDirectives as pe, withKeys as he, withModifiers as I } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var de = { class: "spinner max-w-sm" }, B = {
6
+ var R = { class: "spinner max-w-sm" }, z = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
- }, pe = /* @__PURE__ */ x({
9
+ }, _e = /* @__PURE__ */ x({
10
10
  __name: "FSpinner",
11
11
  props: {
12
12
  width: {
@@ -19,8 +19,8 @@ var de = { class: "spinner max-w-sm" }, B = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (k(), h("div", de, [(k(), h("svg", B, [_("circle", {
23
- class: C([e.colorMode, "ring-path"]),
22
+ return (t, n) => (T(), _("div", R, [(T(), _("svg", z, [v("circle", {
23
+ class: S([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
26
26
  r: "20",
@@ -30,7 +30,7 @@ var de = { class: "spinner max-w-sm" }, B = {
30
30
  "stroke-miterlimit": "30"
31
31
  }, null, 2)]))]));
32
32
  }
33
- }), he = [
33
+ }), ve = [
34
34
  {
35
35
  mode: "self",
36
36
  label: "Overview",
@@ -70,10 +70,10 @@ function recorderMimeType() {
70
70
  }
71
71
  var VoiceRecorderController = class extends i {
72
72
  constructor(t) {
73
- super("VoiceRecorderController", t), e(this, "state", A({
73
+ super("VoiceRecorderController", t), e(this, "state", k({
74
74
  phase: "idle",
75
75
  elapsedMs: 0
76
- })), e(this, "isActive", f(() => this.state.value.phase !== "idle")), e(this, "isBusy", f(() => this.state.value.phase !== "idle")), e(this, "elapsedLabel", f(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), e(this, "statusText", f(() => 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", 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);
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 B = {
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, ye = 6e4, H = 3;
196
+ }, ye = 15e3, H = 6e4, be = 3;
197
197
  function toMs(e) {
198
198
  if (!e) return;
199
199
  let t = Date.parse(e);
@@ -209,7 +209,7 @@ function milestoneRows(e, t) {
209
209
  let n = e.filter((e) => e.status === "completed" || e.status === "failed" && !!e.note).filter((e) => !t.has(e.activityId)).slice().sort(byEvent), r = [];
210
210
  for (let e of n) {
211
211
  let t = e.status === "completed" ? "done" : "failed", n = r[r.length - 1];
212
- if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= ve) {
212
+ if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= ye) {
213
213
  n.count += 1, n.lastMs = eventMs(e);
214
214
  continue;
215
215
  }
@@ -230,12 +230,12 @@ function milestoneRows(e, t) {
230
230
  }));
231
231
  }
232
232
  function splitRows(e) {
233
- return e.length <= H ? {
233
+ return e.length <= be ? {
234
234
  visibleRows: e,
235
235
  hiddenRows: []
236
236
  } : {
237
- visibleRows: e.slice(e.length - H),
238
- hiddenRows: e.slice(0, e.length - H)
237
+ visibleRows: e.slice(e.length - be),
238
+ hiddenRows: e.slice(0, e.length - be)
239
239
  };
240
240
  }
241
241
  function buildWorkJournalModel(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: B.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: B.failed,
265
265
  ...o && e?.note ? { note: e.note } : {}
266
266
  }
267
267
  };
@@ -275,25 +275,25 @@ function buildWorkJournalModel(e) {
275
275
  terminal: {
276
276
  id: "work-stopped",
277
277
  tone: "stopped",
278
- label: _e.stopped
278
+ label: B.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) + ye, v = r >= h, b = u || v ? {
285
+ }, Infinity), h = p + ye, _ = (Number.isFinite(m) ? m : p) + H, v = r >= h, te = 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 ? B.waiting : B.finishing : u.label
289
+ } : void 0, b = v && r >= _ ? i ? B.notifyHint : B.leaveHint : void 0, x = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
290
290
  return {
291
291
  outcome: n,
292
292
  visibleRows: s,
293
293
  hiddenRows: c,
294
- ...b ? { terminal: b } : {},
295
- ...x ? { hint: x } : {},
296
- ...S === void 0 ? {} : { nextBoundaryAtMs: S }
294
+ ...te ? { terminal: te } : {},
295
+ ...b ? { hint: b } : {},
296
+ ...x === void 0 ? {} : { nextBoundaryAtMs: x }
297
297
  };
298
298
  }
299
299
  function buildLiveTurnBlocks(e) {
@@ -352,17 +352,17 @@ function buildLiveTurnBlocks(e) {
352
352
  }
353
353
  //#endregion
354
354
  //#region agent/AgentController.ts
355
- var be = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), U = /* @__PURE__ */ new Set([
356
- ...be,
355
+ var U = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Se = /* @__PURE__ */ new Set([
356
+ ...U,
357
357
  "EMPTY_STREAM",
358
358
  "RATE_LIMIT"
359
- ]), Se = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), W = {
359
+ ]), W = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Ce = {
360
360
  CREDIT_LIMIT: "billing_budget_reached",
361
361
  OVERAGE_CAP: "billing_runaway_cap"
362
362
  };
363
363
  function presentChatStreamError(e) {
364
- if (!(e.bucket !== void 0 || U.has(e.code))) return { surface: "hard" };
365
- let t = e.bucket ?? (be.has(e.code) ? "account" : "error"), n = {
364
+ if (!(e.bucket !== void 0 || Se.has(e.code))) return { surface: "hard" };
365
+ let t = e.bucket ?? (U.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
- } : Se.has(e.code) ? {
378
+ } : W.has(e.code) ? {
379
379
  surface: "transcript",
380
380
  issue: {
381
381
  code: e.code,
@@ -393,7 +393,7 @@ function presentChatStreamError(e) {
393
393
  };
394
394
  }
395
395
  function transcriptMessageForChatStreamError(e) {
396
- let t = W[e.code];
396
+ let t = Ce[e.code];
397
397
  return t ? r[t].oneLine : e.error;
398
398
  }
399
399
  var AgentChatController = class extends i {
@@ -401,16 +401,16 @@ var AgentChatController = class extends i {
401
401
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
402
402
  hash: "",
403
403
  time: 0
404
- }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", P(Date.now())), e(this, "toolActivityTiming", P({})), e(this, "lastVisibleProgressAtMs", P()), e(this, "liveSegments", P([])), e(this, "liveStreamMessageId", P(void 0)), e(this, "conversationId", void 0), e(this, "textState", A({
404
+ }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", se(Date.now())), e(this, "toolActivityTiming", se({})), e(this, "lastVisibleProgressAtMs", se()), e(this, "liveSegments", se([])), e(this, "liveStreamMessageId", se(void 0)), e(this, "conversationId", void 0), e(this, "textState", k({
405
405
  isActive: !1,
406
406
  isConnected: !1,
407
407
  isThinking: !1,
408
408
  connectionStatus: "disconnected"
409
- })), e(this, "agentMode", A("self")), e(this, "sharedMessages", A([])), e(this, "composerState", A({
409
+ })), e(this, "agentMode", k("self")), e(this, "sharedMessages", k([])), e(this, "composerState", k({
410
410
  text: "",
411
411
  pendingAttachments: [],
412
412
  isUploading: !1
413
- })), e(this, "workJournal", f(() => {
413
+ })), e(this, "workJournal", p(() => {
414
414
  let e = this.textState.value.isThinking ? "running" : this.textState.value.turnOutcome;
415
415
  if (!e) return;
416
416
  let t = this.textState.value.toolActivities;
@@ -421,7 +421,7 @@ var AgentChatController = class extends i {
421
421
  canNotifyOnCompletion: !1,
422
422
  lastVisibleProgressAtMs: this.lastVisibleProgressAtMs.value
423
423
  });
424
- })), e(this, "liveTurnBlocks", f(() => {
424
+ })), e(this, "liveTurnBlocks", p(() => {
425
425
  if (!this.textState.value.isThinking) return [];
426
426
  let e = this.textState.value.toolActivities ?? [], t = this.liveSegments.value;
427
427
  return !t.length && !e.length ? [] : buildLiveTurnBlocks({
@@ -431,14 +431,14 @@ var AgentChatController = class extends i {
431
431
  canNotifyOnCompletion: !1,
432
432
  lastVisibleProgressAtMs: this.lastVisibleProgressAtMs.value
433
433
  });
434
- })), e(this, "canUseComposer", f(() => this.textState.value.sendBlockedReason !== "agent_deleted" && !this.composerState.value.isUploading && !this.textState.value.isThinking)), e(this, "canAttachFile", f(() => !!this.settings.uploadFileFn)), e(this, "canRecordAudio", f(() => this.canAttachFile.value && this.canUseComposer.value && !this.composerState.value.text.trim() && this.composerState.value.pendingAttachments.length === 0)), e(this, "voiceRecorder", new VoiceRecorderController({
434
+ })), e(this, "canUseComposer", p(() => this.textState.value.sendBlockedReason !== "agent_deleted" && !this.composerState.value.isUploading && !this.textState.value.isThinking)), 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({
435
435
  getCanRecord: () => this.canRecordAudio.value,
436
436
  getUploadFn: () => {
437
437
  let e = this.settings.uploadFileFn;
438
438
  return e ? (t) => e({ file: t }) : void 0;
439
439
  },
440
440
  getChatController: () => this
441
- })), e(this, "canSend", f(() => (this.composerState.value.text.trim().length > 0 || this.composerState.value.pendingAttachments.length > 0) && this.canUseComposer.value && !this.voiceRecorder.isBusy.value)), e(this, "canStop", f(() => this.textState.value.isThinking && !this.composerState.value.isUploading && !this.voiceRecorder.isBusy.value)), e(this, "composerAction", f(() => this.canStop.value ? "stop" : this.canSend.value ? "send" : "idle")), e(this, "_agent", void 0), this._agent = t.agent instanceof n ? t.agent : new n({ config: t.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher(), this.setupBoundaryWatcher();
441
+ })), 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.canStop.value ? "stop" : this.canSend.value ? "send" : "idle")), e(this, "_agent", void 0), this._agent = t.agent instanceof n ? t.agent : new n({ config: t.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher(), this.setupBoundaryWatcher();
442
442
  }
443
443
  get chatEnabled() {
444
444
  let e = this._agent.state.value.lifecycle;
@@ -577,7 +577,7 @@ Current User:
577
577
  });
578
578
  }
579
579
  setupBoundaryWatcher() {
580
- se(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
580
+ de(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
581
581
  this.scheduleBoundary(e);
582
582
  });
583
583
  }
@@ -639,12 +639,12 @@ Current User:
639
639
  });
640
640
  }
641
641
  setupModeWatcher() {
642
- se(this.agentMode, async (e, t) => {
642
+ de(this.agentMode, async (e, t) => {
643
643
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
644
644
  });
645
645
  }
646
646
  setupAvailabilityWatcher() {
647
- se(() => this.chatEnabled, (e) => {
647
+ de(() => this.chatEnabled, (e) => {
648
648
  if (!(!this.isTextMode || this.isConnecting)) {
649
649
  if (e) {
650
650
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -779,7 +779,7 @@ Current User:
779
779
  let e = i[i.length - 1];
780
780
  this.sharedMessages.value = e?.id === a ? [...i.slice(0, -1), r] : [...i, r];
781
781
  }
782
- 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" });
782
+ r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && W.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
783
783
  }, onDone = (e) => {
784
784
  if (!isCurrentTurn()) return;
785
785
  if (!o && !c) {
@@ -949,10 +949,10 @@ function parseButtonTemplate(e) {
949
949
  }
950
950
  //#endregion
951
951
  //#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
952
- var Ce = {
952
+ var we = {
953
953
  key: 0,
954
954
  class: "absolute inset-0 flex items-center justify-center"
955
- }, we = /* @__PURE__ */ x({
955
+ }, Te = /* @__PURE__ */ x({
956
956
  __name: "ElAgentButton",
957
957
  props: {
958
958
  theme: { default: "primary" },
@@ -965,40 +965,40 @@ var Ce = {
965
965
  iconAfter: {}
966
966
  },
967
967
  setup(e) {
968
- let t = f(() => ({
968
+ let t = p(() => ({
969
969
  primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
970
970
  green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
971
971
  red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
972
972
  default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20",
973
973
  dark: "bg-theme-900 border-transparent hover:bg-theme-800"
974
- })[e.theme]), n = f(() => ({
974
+ })[e.theme]), n = p(() => ({
975
975
  sm: "px-4 py-2 text-sm",
976
976
  md: "px-6 py-3 text-base",
977
977
  lg: "px-8 py-4 text-base"
978
- })[e.size]), r = f(() => ({
978
+ })[e.size]), r = p(() => ({
979
979
  sm: "size-4",
980
980
  md: "size-4",
981
981
  lg: "size-5"
982
982
  })[e.size]);
983
- return (i, a) => (k(), h("button", { class: C(["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 ? (k(), h("div", Ce, [...a[0] || (a[0] = [_("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : m("", !0), _("span", { class: C(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
984
- e.icon ? (k(), h("i", {
983
+ return (i, a) => (T(), _("button", { class: S(["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 ? (T(), _("div", we, [...a[0] || (a[0] = [v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : h("", !0), v("span", { class: S(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
984
+ e.icon ? (T(), _("i", {
985
985
  key: 0,
986
- class: C([e.icon, r.value])
987
- }, null, 2)) : m("", !0),
988
- ie(i.$slots, "default"),
989
- e.iconAfter ? (k(), h("i", {
986
+ class: S([e.icon, r.value])
987
+ }, null, 2)) : h("", !0),
988
+ oe(i.$slots, "default"),
989
+ e.iconAfter ? (T(), _("i", {
990
990
  key: 1,
991
- class: C([e.iconAfter, r.value])
992
- }, null, 2)) : m("", !0)
991
+ class: S([e.iconAfter, r.value])
992
+ }, null, 2)) : h("", !0)
993
993
  ], 2)], 2));
994
994
  }
995
- }), Te = ["value"], Ee = /* @__PURE__ */ x({
995
+ }), Ee = ["value"], De = /* @__PURE__ */ x({
996
996
  __name: "AgentInputEmail",
997
997
  props: { modelValue: { default: "" } },
998
998
  emits: ["update:modelValue"],
999
999
  setup(e, { emit: t }) {
1000
1000
  let n = t;
1001
- return (t, r) => (k(), h("input", {
1001
+ return (t, r) => (T(), _("input", {
1002
1002
  name: "username",
1003
1003
  type: "email",
1004
1004
  inputmode: "email",
@@ -1011,9 +1011,9 @@ var Ce = {
1011
1011
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1012
1012
  style: { "font-size": "16px" },
1013
1013
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
1014
- }, null, 40, Te));
1014
+ }, null, 40, Ee));
1015
1015
  }
1016
- }), De = ["placeholder", "value"], Oe = /* @__PURE__ */ x({
1016
+ }), Oe = ["placeholder", "value"], ke = /* @__PURE__ */ x({
1017
1017
  __name: "AgentInputOneTimeCode",
1018
1018
  props: {
1019
1019
  modelValue: {},
@@ -1022,15 +1022,15 @@ var Ce = {
1022
1022
  },
1023
1023
  emits: ["update:modelValue", "autoSubmit"],
1024
1024
  setup(e, { emit: t }) {
1025
- let n = e, r = t, i = A(null), a = f(() => "0".repeat(n.length));
1026
- ne(() => {
1025
+ let n = e, r = t, i = k(null), a = p(() => "0".repeat(n.length));
1026
+ ie(() => {
1027
1027
  n.focusFirst && !("ontouchstart" in window) && i.value?.focus();
1028
1028
  });
1029
1029
  function onInput(e) {
1030
1030
  let t = e.target.value.replace(/\D/g, "").slice(0, n.length);
1031
1031
  r("update:modelValue", t), t.length === n.length && r("autoSubmit", t);
1032
1032
  }
1033
- return (t, n) => (k(), h("input", {
1033
+ return (t, n) => (T(), _("input", {
1034
1034
  ref_key: "input",
1035
1035
  ref: i,
1036
1036
  name: "one-time-code",
@@ -1046,9 +1046,9 @@ var Ce = {
1046
1046
  class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1047
1047
  style: { "font-size": "16px" },
1048
1048
  onInput
1049
- }, null, 40, De));
1049
+ }, null, 40, Oe));
1050
1050
  }
1051
- }), ke = { class: "relative flex-shrink-0" }, Ae = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1051
+ }), G = { class: "relative flex-shrink-0" }, Ae = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1052
1052
  key: 1,
1053
1053
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1054
1054
  }, Ne = { class: "min-w-0" }, Pe = /* @__PURE__ */ x({
@@ -1063,15 +1063,15 @@ var Ce = {
1063
1063
  layout: { default: "centered" }
1064
1064
  },
1065
1065
  setup(e) {
1066
- return (t, n) => (k(), h("div", { class: C(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [_("div", ke, [_("div", { class: C(["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"]) }, [_("img", {
1066
+ return (t, n) => (T(), _("div", { class: S(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", G, [v("div", { class: S(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1067
1067
  src: e.agent.avatarUrl.value,
1068
1068
  alt: e.agent.displayName.value,
1069
1069
  class: "w-full h-full object-cover",
1070
- onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1071
- }, null, 40, Ae)], 2), _("div", je, [e.isOnline ? (k(), h(u, { key: 0 }, [n[1] || (n[1] = _("div", {
1070
+ onError: n[0] || (n[0] = (...e) => ce(handleImageError) && ce(handleImageError)(...e))
1071
+ }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (T(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1072
1072
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1073
1073
  style: { "animation-duration": "3s" }
1074
- }, null, -1)), n[2] || (n[2] = _("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (k(), h("div", Me))])]), _("div", Ne, [_("h1", { class: C(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, F(e.agent.displayName.value), 3), _("p", { class: C(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, F(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1074
+ }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (T(), _("div", Me))])]), v("div", Ne, [v("h1", { class: S(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, P(e.agent.displayName.value), 3), v("p", { class: S(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, P(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1075
1075
  }
1076
1076
  }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ x({
1077
1077
  __name: "AgentAvatar",
@@ -1092,7 +1092,7 @@ var Ce = {
1092
1092
  amber: "bg-amber-500",
1093
1093
  red: "bg-red-500",
1094
1094
  grey: "bg-theme-300"
1095
- }, n = f(() => {
1095
+ }, n = p(() => {
1096
1096
  let n = e.agent.state.value;
1097
1097
  return e.showStatus && n.lifecycle !== "unknown" ? t[n.color] : null;
1098
1098
  }), r = {
@@ -1100,32 +1100,32 @@ var Ce = {
1100
1100
  height: "clamp(7px, 14%, 14px)",
1101
1101
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1102
1102
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1103
- }, i = f(() => e.isLight ? "ring-white" : "ring-theme-900");
1104
- return (t, a) => (k(), h("div", Fe, [
1105
- _("img", {
1103
+ }, i = p(() => e.isLight ? "ring-white" : "ring-theme-900");
1104
+ return (t, a) => (T(), _("div", Fe, [
1105
+ v("img", {
1106
1106
  src: e.agent.avatarUrl.value,
1107
1107
  alt: e.agent.displayName.value,
1108
- class: C(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1108
+ class: S(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1109
1109
  }, null, 10, Ie),
1110
- e.agent.ownerMarkUrl.value ? (k(), h("img", {
1110
+ e.agent.ownerMarkUrl.value ? (T(), _("img", {
1111
1111
  key: 0,
1112
1112
  src: e.agent.ownerMarkUrl.value,
1113
1113
  alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
1114
- class: C(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1115
- }, null, 10, Le)) : m("", !0),
1116
- n.value ? (k(), h("span", {
1114
+ class: S(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1115
+ }, null, 10, Le)) : h("", !0),
1116
+ n.value ? (T(), _("span", {
1117
1117
  key: 1,
1118
1118
  role: "status",
1119
1119
  "aria-label": e.agent.state.value.tooltip,
1120
- class: C(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1120
+ class: S(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1121
1121
  style: r
1122
- }, null, 10, Re)) : m("", !0),
1123
- n.value && e.agent.state.value.lifecycle === "running" ? (k(), h("span", {
1122
+ }, null, 10, Re)) : h("", !0),
1123
+ n.value && e.agent.state.value.lifecycle === "running" ? (T(), _("span", {
1124
1124
  key: 2,
1125
1125
  "aria-hidden": "true",
1126
- class: C(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
1126
+ class: S(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
1127
1127
  style: r
1128
- }, null, 2)) : m("", !0)
1128
+ }, null, 2)) : h("", !0)
1129
1129
  ]));
1130
1130
  }
1131
1131
  }), Be = {
@@ -1133,7 +1133,7 @@ var Ce = {
1133
1133
  class: "sr-only",
1134
1134
  role: "status",
1135
1135
  "aria-live": "polite"
1136
- }, Ve = ["aria-expanded", "disabled"], G = ["aria-expanded"], He = {
1136
+ }, K = ["aria-expanded", "disabled"], Ve = ["aria-expanded"], He = {
1137
1137
  class: "flex w-5 shrink-0 justify-center self-stretch",
1138
1138
  "aria-hidden": "true"
1139
1139
  }, Ue = ["data-journal-row"], We = {
@@ -1149,18 +1149,18 @@ var Ce = {
1149
1149
  isLight: { type: Boolean }
1150
1150
  },
1151
1151
  setup(e) {
1152
- let t = e, n = P(!1);
1152
+ let t = e, n = se(!1);
1153
1153
  function toggle() {
1154
1154
  n.value = !n.value;
1155
1155
  }
1156
- let r = f(() => t.model.outcome === "completed"), i = f(() => t.model.hiddenRows.length), a = f(() => t.model.hint ?? (t.model.terminal?.tone === "active" ? t.model.terminal.label : void 0)), o = f(() => {
1156
+ 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(() => {
1157
1157
  let e = t.model;
1158
1158
  return r.value ? n.value ? e.hiddenRows : [] : [
1159
1159
  ...n.value ? e.hiddenRows : [],
1160
1160
  ...e.visibleRows,
1161
1161
  ...e.terminal ? [e.terminal] : []
1162
1162
  ];
1163
- }), s = f(() => t.isLight ? {
1163
+ }), s = p(() => t.isLight ? {
1164
1164
  spine: "bg-theme-200",
1165
1165
  dashed: "border-theme-300",
1166
1166
  doneMark: "text-theme-400",
@@ -1176,7 +1176,7 @@ var Ce = {
1176
1176
  stoppedSquare: "bg-white/55",
1177
1177
  muted: "text-white/55",
1178
1178
  ring: "focus-visible:ring-white"
1179
- }), c = f(() => {
1179
+ }), c = p(() => {
1180
1180
  let e = t.isLight;
1181
1181
  return {
1182
1182
  done: {
@@ -1219,64 +1219,64 @@ var Ce = {
1219
1219
  }
1220
1220
  };
1221
1221
  });
1222
- return (t, f) => (k(), h("div", { class: C(["w-full py-0.5", s.value.muted]) }, [
1223
- a.value ? (k(), h("span", Be, F(a.value), 1)) : m("", !0),
1224
- r.value ? (k(), h("button", {
1222
+ return (t, u) => (T(), _("div", { class: S(["w-full py-0.5", s.value.muted]) }, [
1223
+ a.value ? (T(), _("span", Be, P(a.value), 1)) : h("", !0),
1224
+ r.value ? (T(), _("button", {
1225
1225
  key: 1,
1226
1226
  type: "button",
1227
1227
  "data-test": "messaging-tool-activity-summary",
1228
1228
  "data-journal-disclosure": "",
1229
1229
  "aria-expanded": n.value,
1230
1230
  disabled: i.value === 0,
1231
- class: C(["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]),
1231
+ class: S(["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]),
1232
1232
  onClick: toggle
1233
1233
  }, [
1234
- f[0] || (f[0] = _("i", {
1234
+ u[0] || (u[0] = v("i", {
1235
1235
  "data-journal-station": "completed",
1236
1236
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1237
1237
  "aria-hidden": "true"
1238
1238
  }, null, -1)),
1239
- _("span", { class: C(["text-[12.5px] font-medium leading-none", s.value.muted]) }, F(e.model.terminal?.label), 3),
1240
- i.value ? (k(), h("i", {
1239
+ v("span", { class: S(["text-[12.5px] font-medium leading-none", s.value.muted]) }, P(e.model.terminal?.label), 3),
1240
+ i.value ? (T(), _("i", {
1241
1241
  key: 0,
1242
- class: C(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1242
+ class: S(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1243
1243
  "aria-hidden": "true"
1244
- }, null, 2)) : m("", !0)
1245
- ], 10, Ve)) : i.value ? (k(), h("button", {
1244
+ }, null, 2)) : h("", !0)
1245
+ ], 10, K)) : i.value ? (T(), _("button", {
1246
1246
  key: 2,
1247
1247
  type: "button",
1248
1248
  "data-test": "messaging-tool-activity-summary",
1249
1249
  "data-journal-disclosure": "",
1250
1250
  "aria-expanded": n.value,
1251
- class: C(["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]),
1251
+ class: S(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1252
1252
  onClick: toggle
1253
- }, [_("span", He, [_("span", {
1253
+ }, [v("span", He, [v("span", {
1254
1254
  "data-journal-spine": "dashed",
1255
- class: C(["w-0 border-l border-dashed", s.value.dashed])
1256
- }, null, 2)]), _("span", { class: C(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [v(F(i.value) + " earlier updates ", 1), _("i", {
1257
- class: C(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1255
+ class: S(["w-0 border-l border-dashed", s.value.dashed])
1256
+ }, null, 2)]), v("span", { class: S(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [te(P(i.value) + " earlier updates ", 1), v("i", {
1257
+ class: S(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1258
1258
  "aria-hidden": "true"
1259
- }, null, 2)], 2)], 10, G)) : m("", !0),
1260
- (k(!0), h(u, null, j(o.value, (e, t) => (k(), h("div", {
1259
+ }, null, 2)], 2)], 10, Ve)) : h("", !0),
1260
+ (T(!0), _(f, null, A(o.value, (e, t) => (T(), _("div", {
1261
1261
  key: e.id,
1262
1262
  "data-test": "messaging-tool-activity-row",
1263
1263
  "data-journal-row": e.tone,
1264
- class: C([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1265
- }, [_("div", We, [_("span", Ge, [(k(), p(ae(c.value[e.tone].station.tag), {
1264
+ class: S([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1265
+ }, [v("div", We, [v("span", Ge, [(T(), m(j(c.value[e.tone].station.tag), {
1266
1266
  "data-journal-station": e.tone,
1267
- class: C(c.value[e.tone].station.class)
1268
- }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? m("", !0) : (k(), h("span", {
1267
+ class: S(c.value[e.tone].station.class)
1268
+ }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (T(), _("span", {
1269
1269
  key: 0,
1270
- class: C(["w-px flex-1", s.value.spine])
1271
- }, null, 2))]), _("div", { class: C(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [_("span", { class: C(["relative block leading-snug", c.value[e.tone].label]) }, [v(F(e.label), 1), c.value[e.tone].statusWord ? (k(), h("span", Ke, ", " + F(c.value[e.tone].statusWord), 1)) : m("", !0)], 2), e.note ? (k(), h("p", {
1270
+ class: S(["w-px flex-1", s.value.spine])
1271
+ }, null, 2))]), v("div", { class: S(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: S(["relative block leading-snug", c.value[e.tone].label]) }, [te(P(e.label), 1), c.value[e.tone].statusWord ? (T(), _("span", Ke, ", " + P(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (T(), _("p", {
1272
1272
  key: 0,
1273
- class: C(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1274
- }, F(e.note), 3)) : m("", !0)], 2)], 10, Ue))), 128)),
1275
- !r.value && e.model.hint ? (k(), h("p", {
1273
+ class: S(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1274
+ }, P(e.note), 3)) : h("", !0)], 2)], 10, Ue))), 128)),
1275
+ !r.value && e.model.hint ? (T(), _("p", {
1276
1276
  key: 3,
1277
1277
  "data-test": "messaging-tool-activity-hint",
1278
- class: C(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1279
- }, F(e.model.hint), 3)) : m("", !0)
1278
+ class: S(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1279
+ }, P(e.model.hint), 3)) : h("", !0)
1280
1280
  ], 2));
1281
1281
  }
1282
1282
  });
@@ -1321,10 +1321,10 @@ function _unsupportedIterableToArray(e, t) {
1321
1321
  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;
1322
1322
  }
1323
1323
  }
1324
- var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, K = Object.freeze, q = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1325
- K || (K = function freeze(e) {
1324
+ var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = 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;
1325
+ q || (q = function freeze(e) {
1326
1326
  return e;
1327
- }), q || (q = function seal(e) {
1327
+ }), J || (J = function seal(e) {
1328
1328
  return e;
1329
1329
  }), tt || (tt = function apply(e, t) {
1330
1330
  var n = [...arguments].slice(2);
@@ -1332,7 +1332,7 @@ K || (K = function freeze(e) {
1332
1332
  }), nt || (nt = function construct(e) {
1333
1333
  return new e(...[...arguments].slice(1));
1334
1334
  });
1335
- 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), J = unapply(Object.prototype.hasOwnProperty), bt = unapply(Object.prototype.toString), X = unapply(RegExp.prototype.test), xt = unconstruct(TypeError);
1335
+ 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);
1336
1336
  function unapply(e) {
1337
1337
  return function(t) {
1338
1338
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1360,7 +1360,7 @@ function addToSet(e, t) {
1360
1360
  return e;
1361
1361
  }
1362
1362
  function cleanArray(e) {
1363
- for (let t = 0; t < e.length; t++) J(e, t) || (e[t] = null);
1363
+ for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1364
1364
  return e;
1365
1365
  }
1366
1366
  function clone(e) {
@@ -1368,7 +1368,7 @@ function clone(e) {
1368
1368
  for (let r of Je(e)) {
1369
1369
  var n = _slicedToArray(r, 2);
1370
1370
  let i = n[0], a = n[1];
1371
- J(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1371
+ X(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1372
1372
  }
1373
1373
  return t;
1374
1374
  }
@@ -1409,12 +1409,12 @@ function lookupGetter(e, t) {
1409
1409
  }
1410
1410
  function isRegex(e) {
1411
1411
  try {
1412
- return X(e, ""), !0;
1412
+ return Z(e, ""), !0;
1413
1413
  } catch {
1414
1414
  return !1;
1415
1415
  }
1416
1416
  }
1417
- var St = K(/* @__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 = K(/* @__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 = K([
1417
+ 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([
1418
1418
  "feBlend",
1419
1419
  "feColorMatrix",
1420
1420
  "feComponentTransfer",
@@ -1440,7 +1440,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1440
1440
  "feSpotLight",
1441
1441
  "feTile",
1442
1442
  "feTurbulence"
1443
- ]), Tt = K([
1443
+ ]), Tt = q([
1444
1444
  "animate",
1445
1445
  "color-profile",
1446
1446
  "cursor",
@@ -1463,7 +1463,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1463
1463
  "solidcolor",
1464
1464
  "unknown",
1465
1465
  "use"
1466
- ]), Et = K(/* @__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 = K([
1466
+ ]), 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([
1467
1467
  "maction",
1468
1468
  "maligngroup",
1469
1469
  "malignmark",
@@ -1479,13 +1479,13 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1479
1479
  "annotation-xml",
1480
1480
  "mprescripts",
1481
1481
  "none"
1482
- ]), Ot = K(["#text"]), kt = K(/* @__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 = K(/* @__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 = K(/* @__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 = K([
1482
+ ]), 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([
1483
1483
  "xlink:href",
1484
1484
  "xml:id",
1485
1485
  "xlink:title",
1486
1486
  "xml:space",
1487
1487
  "xmlns:xlink"
1488
- ]), Nt = q(/{{[\w\W]*|^[\w\W]*}}/g), Pt = q(/<%[\w\W]*|^[\w\W]*%>/g), Ft = q(/\${[\w\W]*/g), It = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Lt = q(/^aria-[\-\w]+$/), Rt = q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zt = q(/^(?:\w+script|data):/i), Bt = q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vt = q(/^html$/i), Ht = q(/^[a-z][.\w]*(-[.\w]+)+$/i), Ut = q(/<[/\w!]/g), Wt = q(/<[/\w]/g), Gt = q(/<\/no(script|embed|frames)/i), Kt = q(/\/>/i), qt = {
1488
+ ]), 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 = {
1489
1489
  element: 1,
1490
1490
  attribute: 2,
1491
1491
  text: 3,
@@ -1530,7 +1530,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1530
1530
  uponSanitizeShadowNode: []
1531
1531
  };
1532
1532
  }, Zt = function _resolveSetOption(e, t, n, r) {
1533
- return J(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1533
+ return X(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1534
1534
  };
1535
1535
  function createDOMPurify() {
1536
1536
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jt(), DOMPurify = (e) => createDOMPurify(e);
@@ -1539,32 +1539,32 @@ function createDOMPurify() {
1539
1539
  e.DocumentFragment;
1540
1540
  let i = e.HTMLTemplateElement, a = e.Node, o = e.Element, s = e.NodeFilter;
1541
1541
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
1542
- let c = e.DOMParser, u = e.trustedTypes, f = o.prototype, p = lookupGetter(f, "cloneNode"), m = lookupGetter(f, "remove"), h = lookupGetter(f, "nextSibling"), _ = lookupGetter(f, "childNodes"), v = lookupGetter(f, "parentNode"), b = lookupGetter(f, "shadowRoot"), x = lookupGetter(f, "attributes"), S = a && a.prototype ? lookupGetter(a.prototype, "nodeType") : null, C = a && a.prototype ? lookupGetter(a.prototype, "nodeName") : null;
1542
+ let c = e.DOMParser, u = e.trustedTypes, f = o.prototype, p = lookupGetter(f, "cloneNode"), m = lookupGetter(f, "remove"), h = lookupGetter(f, "nextSibling"), _ = lookupGetter(f, "childNodes"), v = lookupGetter(f, "parentNode"), te = lookupGetter(f, "shadowRoot"), b = lookupGetter(f, "attributes"), x = a && a.prototype ? lookupGetter(a.prototype, "nodeType") : null, ne = a && a.prototype ? lookupGetter(a.prototype, "nodeName") : null;
1543
1543
  if (typeof i == "function") {
1544
1544
  let e = t.createElement("template");
1545
1545
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1546
1546
  }
1547
- let T, te = "", ne, re = !1, k = 0, A = function _assertNotInTrustedTypesPolicy() {
1548
- if (k > 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.");
1549
- }, j = function _createTrustedHTML(e) {
1550
- A(), k++;
1547
+ let S, C = "", re, ie = !1, ae = 0, T = function _assertNotInTrustedTypesPolicy() {
1548
+ if (ae > 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.");
1549
+ }, k = function _createTrustedHTML(e) {
1550
+ T(), ae++;
1551
1551
  try {
1552
- return T.createHTML(e);
1552
+ return S.createHTML(e);
1553
1553
  } finally {
1554
- k--;
1554
+ ae--;
1555
1555
  }
1556
- }, ie = function _createTrustedScriptURL(e) {
1557
- A(), k++;
1556
+ }, A = function _createTrustedScriptURL(e) {
1557
+ T(), ae++;
1558
1558
  try {
1559
- return T.createScriptURL(e);
1559
+ return S.createScriptURL(e);
1560
1560
  } finally {
1561
- k--;
1561
+ ae--;
1562
1562
  }
1563
- }, ae = function _getDefaultTrustedTypesPolicy() {
1564
- return re || (ne = Yt(u, r), re = !0), ne;
1565
- }, P = t, F = P.implementation, oe = P.createNodeIterator, I = P.createDocumentFragment, se = P.getElementsByTagName, ce = n.importNode, R = Xt();
1566
- DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1567
- let ue = Nt, z = Pt, de = Ft, B = It, pe = Lt, he = zt, _e = Bt, ve = Ht, ye = Rt, H = null, be = addToSet({}, [
1563
+ }, oe = function _getDefaultTrustedTypesPolicy() {
1564
+ return ie || (re = Yt(u, r), ie = !0), re;
1565
+ }, j = t, se = j.implementation, P = j.createNodeIterator, ce = j.createDocumentFragment, ue = j.getElementsByTagName, de = n.importNode, F = Xt();
1566
+ DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && se && se.createHTMLDocument !== void 0;
1567
+ let pe = Nt, he = Pt, I = Ft, R = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1568
1568
  ...St,
1569
1569
  ...Ct,
1570
1570
  ...wt,
@@ -1607,14 +1607,14 @@ function createDOMPurify() {
1607
1607
  enumerable: !0,
1608
1608
  value: null
1609
1609
  }
1610
- })), Ee = !0, De = !0, Oe = !1, ke = !0, Ae = !1, je = !0, Me = !1, Ne = !1, Pe = null, Fe = null, Ie = !1, Le = !1, Re = !1, ze = !1, Be = !0, Ve = !1, G = "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, Ye = addToSet({}, [
1610
+ })), Ee = !0, De = !0, Oe = !1, ke = !0, G = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, K = "user-content-", Ve = !0, He = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1611
1611
  "audio",
1612
1612
  "video",
1613
1613
  "img",
1614
1614
  "source",
1615
1615
  "image",
1616
1616
  "track"
1617
- ]), Xe = null, Ze = addToSet({}, [
1617
+ ]), Ye = null, Xe = addToSet({}, [
1618
1618
  "alt",
1619
1619
  "class",
1620
1620
  "for",
@@ -1629,69 +1629,69 @@ function createDOMPurify() {
1629
1629
  "value",
1630
1630
  "style",
1631
1631
  "xmlns"
1632
- ]), Qe = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xhtml", nt = tt, gt = !1, _t = null, vt = addToSet({}, [
1632
+ ]), Ze = "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({}, [
1633
+ Ze,
1633
1634
  Qe,
1634
- et,
1635
- tt
1636
- ], dt), yt = K([
1635
+ et
1636
+ ], dt), vt = q([
1637
1637
  "mi",
1638
1638
  "mo",
1639
1639
  "mn",
1640
1640
  "ms",
1641
1641
  "mtext"
1642
- ]), bt = addToSet({}, yt), Qt = K(["annotation-xml"]), $t = addToSet({}, Qt), en = addToSet({}, [
1642
+ ]), yt = addToSet({}, vt), bt = q(["annotation-xml"]), Qt = addToSet({}, bt), $t = addToSet({}, [
1643
1643
  "title",
1644
1644
  "style",
1645
1645
  "font",
1646
1646
  "a",
1647
1647
  "script"
1648
- ]), tn = null, Z = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1648
+ ]), en = null, tn = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1649
1649
  return e instanceof RegExp || e instanceof Function;
1650
1650
  }, on = function _parseConfig() {
1651
1651
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1652
1652
  if (nn && nn === e) return;
1653
- (!e || typeof e != "object") && (e = {}), e = clone(e), tn = Z.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = tn === "application/xhtml+xml" ? dt : ut, H = Zt(e, "ALLOWED_TAGS", be, { transform: Q }), U = Zt(e, "ALLOWED_ATTR", Se, { transform: Q }), _t = Zt(e, "ALLOWED_NAMESPACES", vt, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", Ze, {
1653
+ (!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, H = Zt(e, "ALLOWED_TAGS", be, { transform: Q }), U = Zt(e, "ALLOWED_ATTR", Se, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Ye = Zt(e, "ADD_URI_SAFE_ATTR", Xe, {
1654
1654
  transform: Q,
1655
- base: Ze
1656
- }), qe = Zt(e, "ADD_DATA_URI_TAGS", Ye, {
1655
+ base: Xe
1656
+ }), Ke = Zt(e, "ADD_DATA_URI_TAGS", qe, {
1657
1657
  transform: Q,
1658
- base: Ye
1659
- }), Ge = Zt(e, "FORBID_CONTENTS", Ke, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), We = J(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = e.SAFE_FOR_TEMPLATES || !1, je = e.SAFE_FOR_XML !== !1, Me = e.WHOLE_DOCUMENT || !1, Le = e.RETURN_DOM || !1, Re = e.RETURN_DOM_FRAGMENT || !1, ze = e.RETURN_TRUSTED_TYPE || !1, Ie = e.FORCE_BODY || !1, Be = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, nt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : tt, bt = J(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, yt), $t = J(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Qt);
1660
- let t = J(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1661
- if (W = $e(null), J(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), J(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), J(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), q(W), Ae && (De = !1), Re && (Le = !0), We && (H = addToSet({}, Ot), U = $e(null), We.html === !0 && (addToSet(H, St), addToSet(U, kt)), We.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), We.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), We.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, J(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), J(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), J(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Xe, e.ADD_URI_SAFE_ATTR, Q), J(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), J(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), He && (H["#text"] = !0), Me && addToSet(H, [
1658
+ base: qe
1659
+ }), We = Zt(e, "FORBID_CONTENTS", Ge, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1660
+ let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1661
+ if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), G && (De = !1), Le && (Ie = !0), Ue && (H = addToSet({}, Ot), U = $e(null), Ue.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ue.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ue.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ue.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), Ve && (H["#text"] = !0), je && addToSet(H, [
1662
1662
  "html",
1663
1663
  "head",
1664
1664
  "body"
1665
1665
  ]), H.table && (addToSet(H, ["tbody"]), delete Ce.tbody), e.TRUSTED_TYPES_POLICY) {
1666
1666
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1667
1667
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1668
- let t = T;
1669
- T = e.TRUSTED_TYPES_POLICY;
1668
+ let t = S;
1669
+ S = e.TRUSTED_TYPES_POLICY;
1670
1670
  try {
1671
- te = j("");
1671
+ C = k("");
1672
1672
  } catch (e) {
1673
- throw T = t, e;
1673
+ throw S = t, e;
1674
1674
  }
1675
- } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = ae()), T && typeof te == "string" && (te = j("")));
1676
- K && K(e), nn = e;
1675
+ } else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = oe()), S && typeof C == "string" && (C = k("")));
1676
+ q && q(e), nn = e;
1677
1677
  }, sn = addToSet({}, [
1678
1678
  ...Ct,
1679
1679
  ...wt,
1680
1680
  ...Tt
1681
1681
  ]), cn = addToSet({}, [...Et, ...Dt]), ln = function _checkSvgNamespace(e, t, n) {
1682
- return t.namespaceURI === tt ? e === "svg" : t.namespaceURI === Qe ? e === "svg" && (n === "annotation-xml" || bt[n]) : !!sn[e];
1682
+ return t.namespaceURI === et ? e === "svg" : t.namespaceURI === Ze ? e === "svg" && (n === "annotation-xml" || yt[n]) : !!sn[e];
1683
1683
  }, un = function _checkMathMlNamespace(e, t, n) {
1684
- return t.namespaceURI === tt ? e === "math" : t.namespaceURI === et ? e === "math" && $t[n] : !!cn[e];
1684
+ return t.namespaceURI === et ? e === "math" : t.namespaceURI === Qe ? e === "math" && Qt[n] : !!cn[e];
1685
1685
  }, dn = function _checkHtmlNamespace(e, t, n) {
1686
- return t.namespaceURI === et && !$t[n] || t.namespaceURI === Qe && !bt[n] ? !1 : !cn[e] && (en[e] || !sn[e]);
1686
+ return t.namespaceURI === Qe && !Qt[n] || t.namespaceURI === Ze && !yt[n] ? !1 : !cn[e] && ($t[e] || !sn[e]);
1687
1687
  }, fn = function _checkValidNamespace(e) {
1688
1688
  let t = v(e);
1689
1689
  (!t || !t.tagName) && (t = {
1690
- namespaceURI: nt,
1690
+ namespaceURI: tt,
1691
1691
  tagName: "template"
1692
1692
  });
1693
1693
  let n = ut(e.tagName), r = ut(t.tagName);
1694
- return _t[e.namespaceURI] ? e.namespaceURI === et ? ln(n, t, r) : e.namespaceURI === Qe ? un(n, t, r) : e.namespaceURI === tt ? dn(n, t, r) : !!(tn === "application/xhtml+xml" && _t[e.namespaceURI]) : !1;
1694
+ return gt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI === Ze ? un(n, t, r) : e.namespaceURI === et ? dn(n, t, r) : !!(en === "application/xhtml+xml" && gt[e.namespaceURI]) : !1;
1695
1695
  }, pn = function _forceRemove(e) {
1696
1696
  st(DOMPurify.removed, { element: e });
1697
1697
  try {
@@ -1712,7 +1712,7 @@ function createDOMPurify() {
1712
1712
  } catch {}
1713
1713
  });
1714
1714
  }
1715
- let n = x(e);
1715
+ let n = b(e);
1716
1716
  if (n) for (let t = n.length - 1; t >= 0; --t) {
1717
1717
  let r = n[t], i = r && r.name;
1718
1718
  if (typeof i == "string") try {
@@ -1731,14 +1731,14 @@ function createDOMPurify() {
1731
1731
  from: t
1732
1732
  });
1733
1733
  }
1734
- if (t.removeAttribute(e), e === "is") if (Le || Re) try {
1734
+ if (t.removeAttribute(e), e === "is") if (Ie || Le) try {
1735
1735
  pn(t);
1736
1736
  } catch {}
1737
1737
  else try {
1738
1738
  t.setAttribute(e, "");
1739
1739
  } catch {}
1740
1740
  }, gn = function _stripDisallowedAttributes(e) {
1741
- let t = x(e);
1741
+ let t = b(e);
1742
1742
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1743
1743
  let r = t[n], i = r && r.name;
1744
1744
  if (!(typeof i != "string" || U[Q(i)])) try {
@@ -1749,23 +1749,23 @@ function createDOMPurify() {
1749
1749
  let t = [e];
1750
1750
  for (; t.length > 0;) {
1751
1751
  let e = t.pop();
1752
- (S ? S(e) : e.nodeType) === qt.element && gn(e);
1752
+ (x ? x(e) : e.nodeType) === qt.element && gn(e);
1753
1753
  let n = _(e);
1754
1754
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1755
1755
  }
1756
1756
  }, vn = function _neutralizePatchLinkage(e) {
1757
- if (!je) return;
1757
+ if (!Ae) return;
1758
1758
  let t = [e];
1759
1759
  for (; t.length > 0;) {
1760
- let e = t.pop(), n = S ? S(e) : e.nodeType;
1761
- if (n === qt.processingInstruction || n === qt.comment && X(Wt, e.data)) {
1760
+ let e = t.pop(), n = x ? x(e) : e.nodeType;
1761
+ if (n === qt.processingInstruction || n === qt.comment && Z(Wt, e.data)) {
1762
1762
  try {
1763
1763
  m(e);
1764
1764
  } catch {}
1765
1765
  continue;
1766
1766
  }
1767
1767
  if (n === qt.element) {
1768
- let t = e, n = Q(C ? C(e) : e.nodeName);
1768
+ let t = e, n = Q(ne ? ne(e) : e.nodeName);
1769
1769
  try {
1770
1770
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
1771
1771
  } catch {}
@@ -1775,50 +1775,50 @@ function createDOMPurify() {
1775
1775
  }
1776
1776
  }, yn = function _initDocument(e) {
1777
1777
  let n = null, r = null;
1778
- if (Ie) e = "<remove></remove>" + e;
1778
+ if (Fe) e = "<remove></remove>" + e;
1779
1779
  else {
1780
1780
  let t = ft(e, /^[\r\n\t ]+/);
1781
1781
  r = t && t[0];
1782
1782
  }
1783
- tn === "application/xhtml+xml" && nt === tt && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1784
- let i = T ? j(e) : e;
1785
- if (nt === tt) try {
1786
- n = new c().parseFromString(i, tn);
1783
+ en === "application/xhtml+xml" && tt === et && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1784
+ let i = S ? k(e) : e;
1785
+ if (tt === et) try {
1786
+ n = new c().parseFromString(i, en);
1787
1787
  } catch {}
1788
1788
  if (!n || !n.documentElement) {
1789
- n = F.createDocument(nt, "template", null);
1789
+ n = se.createDocument(tt, "template", null);
1790
1790
  try {
1791
- n.documentElement.innerHTML = gt ? te : i;
1791
+ n.documentElement.innerHTML = nt ? C : i;
1792
1792
  } catch {}
1793
1793
  }
1794
1794
  let a = n.body || n.documentElement;
1795
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), nt === tt ? se.call(n, Me ? "html" : "body")[0] : Me ? n.documentElement : a;
1795
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? ue.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1796
1796
  }, bn = function _createNodeIterator(e) {
1797
- return oe.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1797
+ return P.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1798
1798
  }, xn = function _stripTemplateExpressions(e) {
1799
- return e = pt(e, ue, " "), e = pt(e, z, " "), e = pt(e, de, " "), e;
1799
+ return e = pt(e, pe, " "), e = pt(e, he, " "), e = pt(e, I, " "), e;
1800
1800
  }, Sn = function _scrubTemplateExpressions(e) {
1801
1801
  e.normalize();
1802
- let t = oe.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1802
+ let t = P.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1803
1803
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1804
1804
  let r = e.querySelectorAll?.call(e, "template");
1805
1805
  r && rt(r, (e) => {
1806
1806
  wn(e.content) && Sn(e.content);
1807
1807
  });
1808
1808
  }, Cn = function _isClobbered(e) {
1809
- let t = C ? C(e) : null;
1810
- return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== x(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== S(e) || e.childNodes !== _(e);
1809
+ let t = ne ? ne(e) : null;
1810
+ return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1811
1811
  }, wn = function _isDocumentFragment(e) {
1812
- if (!S || typeof e != "object" || !e) return !1;
1812
+ if (!x || typeof e != "object" || !e) return !1;
1813
1813
  try {
1814
- return S(e) === qt.documentFragment;
1814
+ return x(e) === qt.documentFragment;
1815
1815
  } catch {
1816
1816
  return !1;
1817
1817
  }
1818
1818
  }, Tn = function _isNode(e) {
1819
- if (!S || typeof e != "object" || !e) return !1;
1819
+ if (!x || typeof e != "object" || !e) return !1;
1820
1820
  try {
1821
- return typeof S(e) == "number";
1821
+ return typeof x(e) == "number";
1822
1822
  } catch {
1823
1823
  return !1;
1824
1824
  }
@@ -1829,46 +1829,46 @@ function createDOMPurify() {
1829
1829
  });
1830
1830
  }
1831
1831
  let En = function _isUnsafeNode(e, t) {
1832
- return !!(je && e.hasChildNodes() && !Tn(e.firstElementChild) && X(Ut, e.textContent) && X(Ut, e.innerHTML) || je && e.namespaceURI === tt && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || je && e.nodeType === qt.comment && X(Wt, e.data));
1832
+ return !!(Ae && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || Ae && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || Ae && e.nodeType === qt.comment && Z(Wt, e.data));
1833
1833
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1834
- if (!Ce[t] && jn(t) && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
1835
- if (He && !Ge[t]) {
1834
+ if (!Ce[t] && jn(t) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
1835
+ if (Ve && !We[t]) {
1836
1836
  let t = v(e), n = _(e);
1837
1837
  if (n && t) {
1838
1838
  let r = n.length;
1839
1839
  for (let i = r - 1; i >= 0; --i) {
1840
- let r = Ue ? n[i] : p(n[i], !0);
1840
+ let r = He ? n[i] : p(n[i], !0);
1841
1841
  t.insertBefore(r, h(e));
1842
1842
  }
1843
1843
  }
1844
1844
  }
1845
1845
  return pn(e), !0;
1846
1846
  }, On = function _sanitizeElements(e, t) {
1847
- if (_executeHooks(R.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1847
+ if (_executeHooks(F.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1848
1848
  if (Cn(e)) return pn(e), !0;
1849
- let n = Q(C ? C(e) : e.nodeName);
1850
- if (_executeHooks(R.uponSanitizeElement, e, {
1849
+ let n = Q(ne ? ne(e) : e.nodeName);
1850
+ if (_executeHooks(F.uponSanitizeElement, e, {
1851
1851
  tagName: n,
1852
1852
  allowedTags: H
1853
1853
  }), e !== t && v(e) === null) return !0;
1854
1854
  if (En(e, n)) return pn(e), !0;
1855
1855
  if (Ce[n] || !(Te.tagCheck instanceof Function && Te.tagCheck(n)) && !H[n]) {
1856
1856
  let t = Dn(e, n);
1857
- return t === !1 && _executeHooks(R.afterSanitizeElements, e, null), t;
1857
+ return t === !1 && _executeHooks(F.afterSanitizeElements, e, null), t;
1858
1858
  }
1859
- if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && X(Gt, e.innerHTML)) return pn(e), !0;
1860
- if (Ae && e.nodeType === qt.text) {
1859
+ if ((x ? x(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1860
+ if (G && e.nodeType === qt.text) {
1861
1861
  let t = xn(e.textContent);
1862
1862
  e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1863
1863
  }
1864
- return _executeHooks(R.afterSanitizeElements, e, null), !1;
1864
+ return _executeHooks(F.afterSanitizeElements, e, null), !1;
1865
1865
  }, kn = function _isValidAttribute(e, n, r) {
1866
- if (we[n] || je && n === "patchsrc" || je && n === "for" && e !== "label" && e !== "output" || Be && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1866
+ if (we[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1867
1867
  let i = U[n] || Te.attributeCheck instanceof Function && Te.attributeCheck(n, e);
1868
- if (!(De && X(B, n)) && !(Ee && X(pe, n))) {
1868
+ if (!(De && Z(R, n)) && !(Ee && Z(z, n))) {
1869
1869
  if (!i) {
1870
- if (!(jn(e) && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && X(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
1871
- } else if (!Xe[n] && !X(ye, pt(r, _e, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(Oe && !X(he, pt(r, _e, ""))) && r) return !1;
1870
+ if (!(jn(e) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && Z(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
1871
+ } else if (!Ye[n] && !Z(ye, pt(r, ve, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && Ke[e]) && !(Oe && !Z(_e, pt(r, ve, ""))) && r) return !1;
1872
1872
  }
1873
1873
  return !0;
1874
1874
  }, An = addToSet({}, [
@@ -1881,11 +1881,11 @@ function createDOMPurify() {
1881
1881
  "font-face-uri",
1882
1882
  "missing-glyph"
1883
1883
  ]), jn = function _isBasicCustomElement(e) {
1884
- return !An[ut(e)] && X(ve, e);
1884
+ return !An[ut(e)] && Z(B, e);
1885
1885
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1886
- if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1887
- case "TrustedHTML": return j(r);
1888
- case "TrustedScriptURL": return ie(r);
1886
+ if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1887
+ case "TrustedHTML": return k(r);
1888
+ case "TrustedScriptURL": return A(r);
1889
1889
  }
1890
1890
  return r;
1891
1891
  }, Nn = function _setAttributeValue(e, t, n, r) {
@@ -1895,7 +1895,7 @@ function createDOMPurify() {
1895
1895
  hn(t, e);
1896
1896
  }
1897
1897
  }, Pn = function _sanitizeAttributes(e) {
1898
- _executeHooks(R.beforeSanitizeAttributes, e, null);
1898
+ _executeHooks(F.beforeSanitizeAttributes, e, null);
1899
1899
  let t = e.attributes;
1900
1900
  if (!t || Cn(e)) return;
1901
1901
  let n = {
@@ -1907,7 +1907,7 @@ function createDOMPurify() {
1907
1907
  }, r = t.length, i = Q(e.nodeName);
1908
1908
  for (; r--;) {
1909
1909
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1910
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue, Ve && (u === "id" || u === "name") && mt(p, G) !== 0 && (hn(o, e), p = G + p), je && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1910
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(F.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, K) !== 0 && (hn(o, e), p = K + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1911
1911
  hn(o, e);
1912
1912
  continue;
1913
1913
  }
@@ -1920,25 +1920,25 @@ function createDOMPurify() {
1920
1920
  hn(o, e);
1921
1921
  continue;
1922
1922
  }
1923
- if (!ke && X(Kt, p)) {
1923
+ if (!ke && Z(Kt, p)) {
1924
1924
  hn(o, e);
1925
1925
  continue;
1926
1926
  }
1927
- if (Ae && (p = xn(p)), !kn(i, u, p)) {
1927
+ if (G && (p = xn(p)), !kn(i, u, p)) {
1928
1928
  hn(o, e);
1929
1929
  continue;
1930
1930
  }
1931
1931
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1932
1932
  }
1933
1933
  }
1934
- _executeHooks(R.afterSanitizeAttributes, e, null);
1934
+ _executeHooks(F.afterSanitizeAttributes, e, null);
1935
1935
  }, Fn = function _sanitizeShadowDOM(e) {
1936
1936
  let t = null, n = bn(e);
1937
- for (_executeHooks(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) {
1938
- let e = b(t);
1937
+ for (_executeHooks(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(F.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === qt.element) {
1938
+ let e = te(t);
1939
1939
  wn(e) && (In(e), Fn(e));
1940
1940
  }
1941
- _executeHooks(R.afterSanitizeShadowDOM, e, null);
1941
+ _executeHooks(F.afterSanitizeShadowDOM, e, null);
1942
1942
  }, In = function _sanitizeAttachedShadowRoots(e) {
1943
1943
  let t = [{
1944
1944
  node: e,
@@ -1950,13 +1950,13 @@ function createDOMPurify() {
1950
1950
  Fn(e.shadow);
1951
1951
  continue;
1952
1952
  }
1953
- let n = e.node, r = (S ? S(n) : n.nodeType) === qt.element, i = _(n);
1953
+ let n = e.node, r = (x ? x(n) : n.nodeType) === qt.element, i = _(n);
1954
1954
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
1955
1955
  node: i[e],
1956
1956
  shadow: null
1957
1957
  });
1958
1958
  if (r) {
1959
- let e = C ? C(n) : null;
1959
+ let e = ne ? ne(n) : null;
1960
1960
  if (typeof e == "string" && Q(e) === "template") {
1961
1961
  let e = n.content;
1962
1962
  wn(e) && t.push({
@@ -1966,7 +1966,7 @@ function createDOMPurify() {
1966
1966
  }
1967
1967
  }
1968
1968
  if (r) {
1969
- let e = b(n);
1969
+ let e = te(n);
1970
1970
  wn(e) && t.push({
1971
1971
  node: null,
1972
1972
  shadow: e
@@ -1979,13 +1979,13 @@ function createDOMPurify() {
1979
1979
  };
1980
1980
  return DOMPurify.sanitize = function(e) {
1981
1981
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
1982
- if (gt = !e, gt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1982
+ if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1983
1983
  if (!DOMPurify.isSupported) return e;
1984
- Ne ? (H = Pe, U = Fe) : on(t), (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && (H = clone(H)), R.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
- let s = Ue && typeof e != "string" && Tn(e);
1984
+ Me ? (H = Ne, U = Pe) : on(t), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (H = clone(H)), F.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
+ let s = He && typeof e != "string" && Tn(e);
1986
1986
  if (s) {
1987
1987
  vn(e);
1988
- let t = C ? C(e) : e.nodeName;
1988
+ let t = ne ? ne(e) : e.nodeName;
1989
1989
  if (typeof t == "string") {
1990
1990
  let n = Q(t);
1991
1991
  if (!H[n] || Ce[n]) throw mn(e), xt("root node is forbidden and cannot be sanitized in-place");
@@ -1998,10 +1998,10 @@ function createDOMPurify() {
1998
1998
  }
1999
1999
  } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2000
2000
  else {
2001
- if (!Le && !Ae && !Me && e.indexOf("<") === -1) return T && ze ? j(e) : e;
2002
- if (r = yn(e), !r) return Le ? null : ze ? te : "";
2001
+ if (!Ie && !G && !je && e.indexOf("<") === -1) return S && Re ? k(e) : e;
2002
+ if (r = yn(e), !r) return Ie ? null : Re ? C : "";
2003
2003
  }
2004
- r && Ie && pn(r.firstChild);
2004
+ r && Fe && pn(r.firstChild);
2005
2005
  let c = s ? e : r, u = bn(c);
2006
2006
  try {
2007
2007
  for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
@@ -2012,37 +2012,37 @@ function createDOMPurify() {
2012
2012
  }
2013
2013
  if (s) return rt(DOMPurify.removed, (e) => {
2014
2014
  e.element && _n(e.element);
2015
- }), Ae && Sn(e), e;
2016
- if (Le) {
2017
- if (Ae && Sn(r), Re) for (o = I.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2015
+ }), G && Sn(e), e;
2016
+ if (Ie) {
2017
+ if (G && Sn(r), Le) for (o = ce.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2018
2018
  else o = r;
2019
- return (U.shadowroot || U.shadowrootmode) && (o = ce.call(n, o, !0)), o;
2019
+ return (U.shadowroot || U.shadowrootmode) && (o = de.call(n, o, !0)), o;
2020
2020
  }
2021
- let f = Me ? r.outerHTML : r.innerHTML;
2022
- return Me && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && X(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Ae && (f = xn(f)), T && ze ? j(f) : f;
2021
+ let f = je ? r.outerHTML : r.innerHTML;
2022
+ return je && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), G && (f = xn(f)), S && Re ? k(f) : f;
2023
2023
  }, DOMPurify.setConfig = function() {
2024
2024
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2025
- on(e), Ne = !0, Pe = H, Fe = U;
2025
+ on(e), Me = !0, Ne = H, Pe = U;
2026
2026
  }, DOMPurify.clearConfig = function() {
2027
- nn = null, Ne = !1, Pe = null, Fe = null, T = ne, te = "";
2027
+ nn = null, Me = !1, Ne = null, Pe = null, S = re, C = "";
2028
2028
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2029
2029
  nn || on({});
2030
2030
  let r = Q(e), i = Q(t);
2031
2031
  return kn(r, i, n);
2032
2032
  }, DOMPurify.addHook = function(e, t) {
2033
- typeof t == "function" && J(R, e) && st(R[e], t);
2033
+ typeof t == "function" && X(F, e) && st(F[e], t);
2034
2034
  }, DOMPurify.removeHook = function(e, t) {
2035
- if (J(R, e)) {
2035
+ if (X(F, e)) {
2036
2036
  if (t !== void 0) {
2037
- let n = it(R[e], t);
2038
- return n === -1 ? void 0 : ct(R[e], n, 1)[0];
2037
+ let n = it(F[e], t);
2038
+ return n === -1 ? void 0 : ct(F[e], n, 1)[0];
2039
2039
  }
2040
- return at(R[e]);
2040
+ return at(F[e]);
2041
2041
  }
2042
2042
  }, DOMPurify.removeHooks = function(e) {
2043
- J(R, e) && (R[e] = []);
2043
+ X(F, e) && (F[e] = []);
2044
2044
  }, DOMPurify.removeAllHooks = function() {
2045
- R = Xt();
2045
+ F = Xt();
2046
2046
  }, DOMPurify;
2047
2047
  }
2048
2048
  var Qt = createDOMPurify(), _Class;
@@ -2076,7 +2076,7 @@ function d(e, t = "") {
2076
2076
  let n = typeof e == "string" ? e : e.source, r = {
2077
2077
  replace: (e, t) => {
2078
2078
  let i = typeof t == "string" ? t : t.source;
2079
- return i = i.replace(Z.caret, "$1"), n = n.replace(e, i), r;
2079
+ return i = i.replace(Q.caret, "$1"), n = n.replace(e, i), r;
2080
2080
  },
2081
2081
  getRegex: () => new RegExp(n, t)
2082
2082
  };
@@ -2088,7 +2088,7 @@ var tn = ((e = "") => {
2088
2088
  } catch {
2089
2089
  return !1;
2090
2090
  }
2091
- })(), Z = {
2091
+ })(), Q = {
2092
2092
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
2093
2093
  outputLinkReplace: /\\([\[\]])/g,
2094
2094
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2145,112 +2145,112 @@ var tn = ((e = "") => {
2145
2145
  headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
2146
2146
  htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
2147
2147
  blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
2148
- }, Q = /^(?:[ \t]*(?:\n|$))+/, nn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, rn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, an = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, on = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, cn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ln = d(cn).replace(/bull/g, sn).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}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), un = d(cn).replace(/bull/g, sn).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}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fn = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), gn = "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", _n = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, vn = 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", _n).replace("tag", gn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), yn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), bn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), xn = {
2149
- blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", bn).getRegex(),
2150
- code: nn,
2151
- def: mn,
2152
- fences: rn,
2153
- heading: on,
2154
- hr: an,
2155
- html: vn,
2156
- lheading: ln,
2157
- list: hn,
2158
- newline: Q,
2159
- paragraph: yn,
2160
- table: en,
2161
- text: fn
2162
- }, Sn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), Cn = {
2163
- ...xn,
2148
+ }, 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}/).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}/).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| +\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)|~{3,})[^\\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]+[^ \t\n]/), Sn = {
2149
+ blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xn).getRegex(),
2150
+ code: rn,
2151
+ def: hn,
2152
+ fences: an,
2153
+ heading: sn,
2154
+ hr: on,
2155
+ html: yn,
2164
2156
  lheading: un,
2165
- table: Sn,
2166
- paragraph: d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Sn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex()
2167
- }, wn = {
2168
- ...xn,
2169
- html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", _n).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(),
2157
+ list: gn,
2158
+ newline: nn,
2159
+ paragraph: bn,
2160
+ table: en,
2161
+ text: pn
2162
+ }, 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)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), wn = {
2163
+ ...Sn,
2164
+ lheading: dn,
2165
+ table: Cn,
2166
+ 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)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex()
2167
+ }, Tn = {
2168
+ ...Sn,
2169
+ 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(),
2170
2170
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2171
2171
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2172
2172
  fences: en,
2173
2173
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2174
- paragraph: d(dn).replace("hr", an).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ln).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2175
- }, Tn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, En = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Dn = /^( {2,}|\\)\n(?!\s*$)/, On = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, kn = /[\p{P}\p{S}]/u, An = /[\s\p{P}\p{S}]/u, jn = /[^\s\p{P}\p{S}]/u, Mn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, An).getRegex(), Nn = /(?!~)[\p{P}\p{S}]/u, Pn = /(?!~)[\s\p{P}\p{S}]/u, Fn = /(?:[^\s\p{P}\p{S}]|~)/u, In = 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(), Ln = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rn = d(Ln, "u").replace(/punct/g, kn).getRegex(), zn = d(Ln, "u").replace(/punct/g, Nn).getRegex(), Bn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vn = d(Bn, "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Hn = d(Bn, "gu").replace(/notPunctSpace/g, Fn).replace(/punctSpace/g, Pn).replace(/punct/g, Nn).getRegex(), Un = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Wn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, kn).getRegex(), Gn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Kn = d(/\\(punct)/, "gu").replace(/punct/g, kn).getRegex(), qn = 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(), Jn = d(_n).replace("(?:-->|$)", "-->").getRegex(), Yn = 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", Jn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Xn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zn = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Xn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Qn = d(/^!?\[(label)\]\[(ref)\]/).replace("label", Xn).replace("ref", pn).getRegex(), $n = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), er = d("reflink|nolink(?!\\()", "g").replace("reflink", Qn).replace("nolink", $n).getRegex(), tr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nr = {
2174
+ 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()
2175
+ }, 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 = {
2176
2176
  _backpedal: en,
2177
- anyPunctuation: Kn,
2178
- autolink: qn,
2179
- blockSkip: In,
2180
- br: Dn,
2181
- code: En,
2177
+ anyPunctuation: qn,
2178
+ autolink: Jn,
2179
+ blockSkip: Ln,
2180
+ br: On,
2181
+ code: Dn,
2182
2182
  del: en,
2183
2183
  delLDelim: en,
2184
2184
  delRDelim: en,
2185
- emStrongLDelim: Rn,
2186
- emStrongRDelimAst: Vn,
2187
- emStrongRDelimUnd: Un,
2188
- escape: Tn,
2189
- link: Zn,
2190
- nolink: $n,
2191
- punctuation: Mn,
2192
- reflink: Qn,
2193
- reflinkSearch: er,
2194
- tag: Yn,
2195
- text: On,
2185
+ emStrongLDelim: zn,
2186
+ emStrongRDelimAst: Hn,
2187
+ emStrongRDelimUnd: Wn,
2188
+ escape: En,
2189
+ link: Qn,
2190
+ nolink: er,
2191
+ punctuation: Nn,
2192
+ reflink: $n,
2193
+ reflinkSearch: tr,
2194
+ tag: Xn,
2195
+ text: kn,
2196
2196
  url: en
2197
- }, rr = {
2198
- ...nr,
2199
- link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Xn).getRegex(),
2200
- reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Xn).getRegex()
2201
2197
  }, ir = {
2202
- ...nr,
2203
- emStrongRDelimAst: Hn,
2204
- emStrongLDelim: zn,
2205
- delLDelim: Wn,
2206
- delRDelim: Gn,
2207
- url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", tr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2198
+ ...rr,
2199
+ link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Zn).getRegex(),
2200
+ reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Zn).getRegex()
2201
+ }, ar = {
2202
+ ...rr,
2203
+ emStrongRDelimAst: Un,
2204
+ emStrongLDelim: Bn,
2205
+ delLDelim: Gn,
2206
+ delRDelim: Kn,
2207
+ 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(),
2208
2208
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2209
2209
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2210
- 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", tr).getRegex()
2211
- }, ar = {
2212
- ...ir,
2213
- br: d(Dn).replace("{2,}", "*").getRegex(),
2214
- text: d(ir.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2210
+ 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()
2215
2211
  }, or = {
2216
- normal: xn,
2217
- gfm: Cn,
2218
- pedantic: wn
2212
+ ...ar,
2213
+ br: d(On).replace("{2,}", "*").getRegex(),
2214
+ text: d(ar.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2219
2215
  }, sr = {
2220
- normal: nr,
2221
- gfm: ir,
2222
- breaks: ar,
2223
- pedantic: rr
2216
+ normal: Sn,
2217
+ gfm: wn,
2218
+ pedantic: Tn
2224
2219
  }, cr = {
2220
+ normal: rr,
2221
+ gfm: ar,
2222
+ breaks: or,
2223
+ pedantic: ir
2224
+ }, lr = {
2225
2225
  "&": "&amp;",
2226
2226
  "<": "&lt;",
2227
2227
  ">": "&gt;",
2228
2228
  "\"": "&quot;",
2229
2229
  "'": "&#39;"
2230
- }, ge = (e) => cr[e];
2230
+ }, ge = (e) => lr[e];
2231
2231
  function O(e, t) {
2232
2232
  if (t) {
2233
- if (Z.escapeTest.test(e)) return e.replace(Z.escapeReplace, ge);
2234
- } else if (Z.escapeTestNoEncode.test(e)) return e.replace(Z.escapeReplaceNoEncode, ge);
2233
+ if (Q.escapeTest.test(e)) return e.replace(Q.escapeReplace, ge);
2234
+ } else if (Q.escapeTestNoEncode.test(e)) return e.replace(Q.escapeReplaceNoEncode, ge);
2235
2235
  return e;
2236
2236
  }
2237
2237
  function V(e) {
2238
2238
  try {
2239
- e = encodeURI(e).replace(Z.percentDecode, "%");
2239
+ e = encodeURI(e).replace(Q.percentDecode, "%");
2240
2240
  } catch {
2241
2241
  return null;
2242
2242
  }
2243
2243
  return e;
2244
2244
  }
2245
2245
  function Y(e, t) {
2246
- let n = e.replace(Z.findPipe, (e, t, n) => {
2246
+ let n = e.replace(Q.findPipe, (e, t, n) => {
2247
2247
  let r = !1, i = t;
2248
2248
  for (; --i >= 0 && n[i] === "\\";) r = !r;
2249
2249
  return r ? "|" : " |";
2250
- }).split(Z.splitPipe), r = 0;
2250
+ }).split(Q.splitPipe), r = 0;
2251
2251
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
2252
2252
  else for (; n.length < t;) n.push("");
2253
- for (; r < n.length; r++) n[r] = n[r].trim().replace(Z.slashPipe, "|");
2253
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(Q.slashPipe, "|");
2254
2254
  return n;
2255
2255
  }
2256
2256
  function $(e, t, n) {
@@ -2267,7 +2267,7 @@ function $(e, t, n) {
2267
2267
  }
2268
2268
  function ee(e) {
2269
2269
  let t = e.split("\n"), n = t.length - 1;
2270
- for (; n >= 0 && Z.blankLine.test(t[n]);) n--;
2270
+ for (; n >= 0 && Q.blankLine.test(t[n]);) n--;
2271
2271
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2272
2272
  }
2273
2273
  function fe(e, t) {
@@ -2762,7 +2762,7 @@ ${c}` : c;
2762
2762
  };
2763
2763
  }
2764
2764
  }
2765
- }, lr = class l {
2765
+ }, ur = class l {
2766
2766
  constructor(t) {
2767
2767
  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 = {
2768
2768
  inLink: !1,
@@ -2770,16 +2770,16 @@ ${c}` : c;
2770
2770
  top: !0
2771
2771
  };
2772
2772
  let n = {
2773
- other: Z,
2774
- block: or.normal,
2775
- inline: sr.normal
2773
+ other: Q,
2774
+ block: sr.normal,
2775
+ inline: cr.normal
2776
2776
  };
2777
- this.options.pedantic ? (n.block = or.pedantic, n.inline = sr.pedantic) : this.options.gfm && (n.block = or.gfm, this.options.breaks ? n.inline = sr.breaks : n.inline = sr.gfm), this.tokenizer.rules = n;
2777
+ 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;
2778
2778
  }
2779
2779
  static get rules() {
2780
2780
  return {
2781
- block: or,
2782
- inline: sr
2781
+ block: sr,
2782
+ inline: cr
2783
2783
  };
2784
2784
  }
2785
2785
  static lex(e, t) {
@@ -2789,7 +2789,7 @@ ${c}` : c;
2789
2789
  return new l(t).inlineTokens(e);
2790
2790
  }
2791
2791
  lex(e) {
2792
- e = e.replace(Z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2792
+ e = e.replace(Q.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2793
2793
  for (let e = 0; e < this.inlineQueue.length; e++) {
2794
2794
  let t = this.inlineQueue[e];
2795
2795
  this.inlineTokens(t.src, t.tokens);
@@ -2797,7 +2797,7 @@ ${c}` : c;
2797
2797
  return this.inlineQueue = [], this.tokens;
2798
2798
  }
2799
2799
  blockTokens(e, t = [], n = !1) {
2800
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Z.tabCharGlobal, " ").replace(Z.spaceLine, ""));
2800
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Q.tabCharGlobal, " ").replace(Q.spaceLine, ""));
2801
2801
  let r = Infinity;
2802
2802
  for (; e;) {
2803
2803
  if (e.length < r) r = e.length;
@@ -2987,7 +2987,7 @@ ${c}` : c;
2987
2987
  return "";
2988
2988
  }
2989
2989
  code({ text: e, lang: t, escaped: n }) {
2990
- let r = (t || "").match(Z.notSpaceStart)?.[0], i = e.replace(Z.endingNewline, "") + "\n";
2990
+ let r = (t || "").match(Q.notSpaceStart)?.[0], i = e.replace(Q.endingNewline, "") + "\n";
2991
2991
  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";
2992
2992
  }
2993
2993
  blockquote({ tokens: e }) {
@@ -3115,7 +3115,7 @@ ${e}</tr>
3115
3115
  checkbox({ raw: e }) {
3116
3116
  return e;
3117
3117
  }
3118
- }, ur = class l {
3118
+ }, dr = class l {
3119
3119
  constructor(t) {
3120
3120
  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();
3121
3121
  }
@@ -3263,7 +3263,7 @@ ${e}</tr>
3263
3263
  }
3264
3264
  return n;
3265
3265
  }
3266
- }, dr = (_Class = class {
3266
+ }, fr = (_Class = class {
3267
3267
  constructor(t) {
3268
3268
  e(this, "options", void 0), e(this, "block", void 0), this.options = t || $t;
3269
3269
  }
@@ -3280,10 +3280,10 @@ ${e}</tr>
3280
3280
  return e;
3281
3281
  }
3282
3282
  provideLexer(e = this.block) {
3283
- return e ? lr.lex : lr.lexInline;
3283
+ return e ? ur.lex : ur.lexInline;
3284
3284
  }
3285
3285
  provideParser(e = this.block) {
3286
- return e ? ur.parse : ur.parseInline;
3286
+ return e ? dr.parse : dr.parseInline;
3287
3287
  }
3288
3288
  }, e(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
3289
3289
  "preprocess",
@@ -3296,7 +3296,7 @@ ${e}</tr>
3296
3296
  "processAllTokens"
3297
3297
  ])), _Class), D = class {
3298
3298
  constructor(...t) {
3299
- e(this, "defaults", M()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", ur), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", lr), e(this, "Tokenizer", w), e(this, "Hooks", dr), this.use(...t);
3299
+ e(this, "defaults", M()), 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);
3300
3300
  }
3301
3301
  walkTokens(e, t) {
3302
3302
  let n = [];
@@ -3375,13 +3375,13 @@ ${e}</tr>
3375
3375
  n.tokenizer = t;
3376
3376
  }
3377
3377
  if (e.hooks) {
3378
- let t = this.defaults.hooks || new dr();
3378
+ let t = this.defaults.hooks || new fr();
3379
3379
  for (let n in e.hooks) {
3380
3380
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
3381
3381
  if (["options", "block"].includes(n)) continue;
3382
3382
  let r = n, i = e.hooks[r], a = t[r];
3383
- dr.passThroughHooks.has(n) ? t[r] = (e) => {
3384
- if (this.defaults.async && dr.passThroughHooksRespectAsync.has(n)) return (async () => {
3383
+ fr.passThroughHooks.has(n) ? t[r] = (e) => {
3384
+ if (this.defaults.async && fr.passThroughHooksRespectAsync.has(n)) return (async () => {
3385
3385
  let n = await i.call(t, e);
3386
3386
  return a.call(t, n);
3387
3387
  })();
@@ -3418,10 +3418,10 @@ ${e}</tr>
3418
3418
  }, this;
3419
3419
  }
3420
3420
  lexer(e, t) {
3421
- return lr.lex(e, t ?? this.defaults);
3421
+ return ur.lex(e, t ?? this.defaults);
3422
3422
  }
3423
3423
  parser(e, t) {
3424
- return ur.parse(e, t ?? this.defaults);
3424
+ return dr.parse(e, t ?? this.defaults);
3425
3425
  }
3426
3426
  parseMarkdown(e) {
3427
3427
  return (t, n) => {
@@ -3433,16 +3433,16 @@ ${e}</tr>
3433
3433
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
3434
3434
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
3435
3435
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
3436
- let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3436
+ 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;
3437
3437
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
3438
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(a, i);
3438
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(a, i);
3439
3439
  return i.hooks ? await i.hooks.postprocess(o) : o;
3440
3440
  })().catch(a);
3441
3441
  try {
3442
3442
  i.hooks && (t = i.hooks.preprocess(t));
3443
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(t, i);
3443
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? ur.lex : ur.lexInline)(t, i);
3444
3444
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
3445
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(n, i);
3445
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(n, i);
3446
3446
  return i.hooks && (r = i.hooks.postprocess(r)), r;
3447
3447
  } catch (e) {
3448
3448
  return a(e);
@@ -3459,25 +3459,79 @@ ${e}</tr>
3459
3459
  throw n;
3460
3460
  };
3461
3461
  }
3462
- }, fr = new D();
3462
+ }, pr = new D();
3463
3463
  function g(e, t) {
3464
- return fr.parse(e, t);
3464
+ return pr.parse(e, t);
3465
3465
  }
3466
3466
  g.options = g.setOptions = function(e) {
3467
- return fr.setOptions(e), g.defaults = fr.defaults, N(g.defaults), g;
3467
+ return pr.setOptions(e), g.defaults = pr.defaults, N(g.defaults), g;
3468
3468
  }, g.getDefaults = M, g.defaults = $t, g.use = function(...e) {
3469
- return fr.use(...e), g.defaults = fr.defaults, N(g.defaults), g;
3469
+ return pr.use(...e), g.defaults = pr.defaults, N(g.defaults), g;
3470
3470
  }, g.walkTokens = function(e, t) {
3471
- return fr.walkTokens(e, t);
3472
- }, g.parseInline = fr.parseInline, g.Parser = ur, g.parser = ur.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = lr, g.lexer = lr.lex, g.Tokenizer = w, g.Hooks = dr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, ur.parse, lr.lex;
3471
+ return pr.walkTokens(e, t);
3472
+ }, 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;
3473
3473
  //#endregion
3474
- //#region agent/ui/chat-diagram-layout.ts
3475
- var pr = 112, mr = 52, hr = 14, gr = 54, _r = 34, vr = 260;
3474
+ //#region agent/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
3475
+ var mr = ["aria-label"], hr = ["innerHTML"], gr = {
3476
+ key: 1,
3477
+ class: "mt-4 flex flex-wrap gap-2"
3478
+ }, _r = ["onClick"], vr = /* @__PURE__ */ x({
3479
+ __name: "ChatCardBlock",
3480
+ props: {
3481
+ spec: {},
3482
+ inverted: { type: Boolean }
3483
+ },
3484
+ emits: ["action"],
3485
+ setup(e, { emit: t }) {
3486
+ let n = e, r = t, i = p(() => {
3487
+ if (!n.spec.body) return "";
3488
+ let e = g.parse(n.spec.body, { async: !1 });
3489
+ return Qt.sanitize(e, { ADD_ATTR: ["target"] });
3490
+ }), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), o = p(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), s = p(() => n.inverted ? "rgba(255, 255, 255, 0.7)" : "var(--color-theme-700)");
3491
+ function actionStyle(e) {
3492
+ return e === "primary" ? {
3493
+ background: "var(--color-primary-500)",
3494
+ color: "#fff"
3495
+ } : e === "destructive" ? {
3496
+ background: "color-mix(in oklch, var(--color-theme-900) 6%, transparent)",
3497
+ color: "var(--color-red-600, #dc2626)"
3498
+ } : {
3499
+ background: "color-mix(in oklch, var(--color-theme-900) 6%, transparent)",
3500
+ color: "var(--color-theme-900)"
3501
+ };
3502
+ }
3503
+ return (t, n) => (T(), _("div", {
3504
+ "data-test": "chat-card",
3505
+ class: "my-6 w-full rounded-[20px] px-5 pb-4 pt-4",
3506
+ style: C({ boxShadow: `inset 0 0 0 1px ${a.value}` }),
3507
+ "aria-label": e.spec.title
3508
+ }, [
3509
+ v("div", {
3510
+ class: "text-[14px] font-semibold leading-tight",
3511
+ style: C({ color: o.value })
3512
+ }, P(e.spec.title), 5),
3513
+ i.value ? (T(), _("div", {
3514
+ key: 0,
3515
+ class: "chat-msg-prose mt-2 text-[13px] leading-relaxed",
3516
+ style: C({ color: s.value }),
3517
+ innerHTML: i.value
3518
+ }, null, 12, hr)) : h("", !0),
3519
+ e.spec.actions?.length ? (T(), _("div", gr, [(T(!0), _(f, null, A(e.spec.actions, (e) => (T(), _("button", {
3520
+ key: e.label,
3521
+ type: "button",
3522
+ "data-test": "chat-card-action",
3523
+ class: "rounded-full px-4 py-2 text-[13px] font-medium transition-colors duration-150 active:opacity-80",
3524
+ style: C(actionStyle(e.style)),
3525
+ onClick: (t) => r("action", e.reply)
3526
+ }, P(e.label), 13, _r))), 128))])) : h("", !0)
3527
+ ], 12, mr));
3528
+ }
3529
+ }), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
3476
3530
  function nodeWidthFor(e) {
3477
3531
  let { orientation: t, maxRows: n, maxWidth: r } = e;
3478
- if (t === "horizontal" || !r) return pr;
3479
- let i = r - hr * 2 - (n - 1) * gr;
3480
- return Math.min(vr, Math.max(pr, Math.floor(i / n)));
3532
+ if (t === "horizontal" || !r) return yr;
3533
+ let i = r - xr * 2 - (n - 1) * Sr;
3534
+ return Math.min(wr, Math.max(yr, Math.floor(i / n)));
3481
3535
  }
3482
3536
  function orientationFor(e) {
3483
3537
  return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
@@ -3514,11 +3568,11 @@ function buildLayout(e, t, n) {
3514
3568
  orientation: t,
3515
3569
  maxRows: o,
3516
3570
  ...n === void 0 ? {} : { maxWidth: n }
3517
- }), u = t === "horizontal" ? hr * 2 + s * c + (s - 1) * gr : hr * 2 + o * c + (o - 1) * gr, f = t === "horizontal" ? hr * 2 + o * mr + (o - 1) * _r : hr * 2 + s * mr + (s - 1) * _r, p = [];
3571
+ }), 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 = [];
3518
3572
  for (let [e, [, n]] of a.entries()) {
3519
- let r = (o - n.length) * (t === "horizontal" ? 86 : c + gr) / 2;
3573
+ let r = (o - n.length) * (t === "horizontal" ? 86 : c + Sr) / 2;
3520
3574
  for (let [i, a] of n.entries()) {
3521
- let n = t === "horizontal" ? hr + e * (c + gr) : hr + r + i * (c + gr), o = t === "horizontal" ? hr + r + i * 86 : hr + e * 86;
3575
+ let n = t === "horizontal" ? xr + e * (c + Sr) : xr + r + i * (c + Sr), o = t === "horizontal" ? xr + r + i * 86 : xr + e * 86;
3522
3576
  p.push({
3523
3577
  id: a.id,
3524
3578
  label: a.label,
@@ -3527,7 +3581,7 @@ function buildLayout(e, t, n) {
3527
3581
  x: n,
3528
3582
  y: o,
3529
3583
  width: c,
3530
- height: mr
3584
+ height: br
3531
3585
  });
3532
3586
  }
3533
3587
  }
@@ -3604,14 +3658,14 @@ function formatChatVisualTick(e) {
3604
3658
  let { prefix: r, suffix: i } = affixes(n);
3605
3659
  return `${r}${formatChatVisualValue({ value: t })}${i}`;
3606
3660
  }
3607
- var yr = 5.4, br = 10, xr = 15, Sr = 16;
3661
+ var Tr = 5.4, Er = 10, Dr = 15, Or = 16;
3608
3662
  function planChatVisualXLabels(e) {
3609
3663
  let { labels: t, plotWidth: n } = e;
3610
3664
  if (!t.length || n <= 0) return {
3611
3665
  mode: "horizontal",
3612
3666
  entries: []
3613
3667
  };
3614
- let r = t.map((e) => e.length > Sr ? `${e.slice(0, Sr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3668
+ let r = t.map((e) => e.length > Or ? `${e.slice(0, Or - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3615
3669
  if (i === 0) return {
3616
3670
  mode: "horizontal",
3617
3671
  entries: [{
@@ -3619,14 +3673,14 @@ function planChatVisualXLabels(e) {
3619
3673
  text: r[0]
3620
3674
  }]
3621
3675
  };
3622
- if ((Math.max(...r.map((e) => e.length * yr)) + br) * t.length <= n) return {
3676
+ if ((Math.max(...r.map((e) => e.length * Tr)) + Er) * t.length <= n) return {
3623
3677
  mode: "horizontal",
3624
3678
  entries: r.map((e, t) => ({
3625
3679
  index: t,
3626
3680
  text: e
3627
3681
  }))
3628
3682
  };
3629
- let a = Math.max(2, Math.floor(n / xr));
3683
+ let a = Math.max(2, Math.floor(n / Dr));
3630
3684
  if (t.length <= a) return {
3631
3685
  mode: "angled",
3632
3686
  entries: r.map((e, t) => ({
@@ -3646,22 +3700,22 @@ function planChatVisualXLabels(e) {
3646
3700
  }
3647
3701
  //#endregion
3648
3702
  //#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
3649
- var Cr = [
3703
+ var kr = [
3650
3704
  "data-visual-type",
3651
3705
  "data-chart-type",
3652
3706
  "data-stacking",
3653
3707
  "data-diagram-type",
3654
3708
  "aria-label"
3655
- ], wr = { class: "mb-2.5" }, Tr = ["aria-label"], Er = {
3709
+ ], Ar = { class: "mb-2.5" }, jr = ["aria-label"], Mr = {
3656
3710
  key: 0,
3657
3711
  "data-test": "chat-visual-horizontal-bars",
3658
3712
  class: "grid gap-3"
3659
- }, Dr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Or = ["viewBox"], kr = [
3713
+ }, Nr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Pr = ["viewBox"], Fr = [
3660
3714
  "x1",
3661
3715
  "x2",
3662
3716
  "y1",
3663
3717
  "y2"
3664
- ], Ar = ["x", "y"], jr = [
3718
+ ], Ir = ["x", "y"], Lr = [
3665
3719
  "data-row-index",
3666
3720
  "data-series-index",
3667
3721
  "data-data-key",
@@ -3669,56 +3723,56 @@ var Cr = [
3669
3723
  "y",
3670
3724
  "width",
3671
3725
  "height"
3672
- ], Mr = ["data-trend-key", "d"], Nr = ["d"], Pr = ["cx", "cy"], Fr = ["cx", "cy"], Ir = [
3726
+ ], Rr = ["data-trend-key", "d"], zr = ["d"], Br = ["cx", "cy"], Vr = ["cx", "cy"], Hr = [
3673
3727
  "x",
3674
3728
  "y",
3675
3729
  "text-anchor",
3676
3730
  "transform"
3677
- ], Lr = {
3731
+ ], Ur = {
3678
3732
  key: 2,
3679
3733
  class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
3680
- }, Rr = {
3734
+ }, Wr = {
3681
3735
  key: 1,
3682
3736
  class: "grid gap-3"
3683
- }, zr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Br = { class: "shrink-0 tabular-nums" }, Vr = {
3737
+ }, Gr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Kr = { class: "shrink-0 tabular-nums" }, qr = {
3684
3738
  key: 2,
3685
3739
  class: "overflow-x-auto"
3686
- }, Hr = ["viewBox", "aria-label"], Ur = [
3740
+ }, Jr = ["viewBox", "aria-label"], Yr = [
3687
3741
  "data-from",
3688
3742
  "data-to",
3689
3743
  "x1",
3690
3744
  "y1",
3691
3745
  "x2",
3692
3746
  "y2"
3693
- ], Wr = ["cx", "cy"], Gr = ["x", "y"], Kr = [
3747
+ ], Xr = ["cx", "cy"], Zr = ["x", "y"], Qr = [
3694
3748
  "data-node-id",
3695
3749
  "data-node-kind",
3696
3750
  "transform"
3697
- ], qr = ["points"], Jr = ["width", "height"], Yr = ["width", "height"], Xr = {
3751
+ ], $r = ["points"], ei = ["width", "height"], ti = ["width", "height"], ni = {
3698
3752
  xmlns: "http://www.w3.org/1999/xhtml",
3699
3753
  class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
3700
- }, Zr = /* @__PURE__ */ x({
3754
+ }, ri = /* @__PURE__ */ x({
3701
3755
  __name: "ChatVisualBlock",
3702
3756
  props: {
3703
3757
  result: {},
3704
3758
  inverted: { type: Boolean }
3705
3759
  },
3706
3760
  setup(e) {
3707
- let t = e, n = A(), r = P(360), i;
3708
- ne(() => {
3761
+ let t = e, n = k(), r = se(360), i;
3762
+ ie(() => {
3709
3763
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3710
3764
  let t = e[0]?.contentRect.width;
3711
3765
  t && (r.value = Math.round(t));
3712
3766
  }), i.observe(n.value));
3713
- }), te(() => i?.disconnect());
3714
- let a = f(() => Math.min(720, Math.max(280, r.value))), o = f(() => t.result.ok ? t.result.spec : null), s = f(() => o.value?.visualType === "chart" ? o.value : null), c = f(() => o.value?.visualType === "diagram" ? o.value : null);
3767
+ }), re(() => i?.disconnect());
3768
+ 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);
3715
3769
  function isCartesianChart(e) {
3716
3770
  return e?.chartType === "bar" || e?.chartType === "line" || e?.chartType === "scatter";
3717
3771
  }
3718
3772
  function isPieChart(e) {
3719
3773
  return e?.chartType === "pie";
3720
3774
  }
3721
- let p = f(() => s.value?.data ?? []), v = f(() => isCartesianChart(s.value) ? s.value : null), b = f(() => v.value?.series ?? []), x = f(() => isPieChart(s.value) ? s.value : null), S = f(() => v.value?.chartType === "bar" && v.value.stacking === "stacked");
3775
+ let u = p(() => s.value?.data ?? []), m = p(() => isCartesianChart(s.value) ? s.value : null), te = p(() => m.value?.series ?? []), b = p(() => isPieChart(s.value) ? s.value : null), x = p(() => m.value?.chartType === "bar" && m.value.stacking === "stacked");
3722
3776
  function numericValue(e) {
3723
3777
  return typeof e == "number" && Number.isFinite(e) ? e : null;
3724
3778
  }
@@ -3750,8 +3804,8 @@ var Cr = [
3750
3804
  intercept: (r - s * n) / t
3751
3805
  };
3752
3806
  }
3753
- let C = f(() => {
3754
- let e = [], t = v.value;
3807
+ let ne = p(() => {
3808
+ let e = [], t = m.value;
3755
3809
  if (!t) return e;
3756
3810
  if (t.chartType === "bar" && t.stacking === "stacked") for (let n of t.data) {
3757
3811
  let r = 0, i = 0;
@@ -3780,8 +3834,8 @@ var Cr = [
3780
3834
  let n = e > 0 ? e : 1, r = Math.floor(Math.log10(n)), i = n / 10 ** r, a;
3781
3835
  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;
3782
3836
  }
3783
- let re = f(() => {
3784
- let e = C.value, t = e.length ? Math.max(0, ...e) : 1, n = e.length ? Math.min(0, ...e) : 0;
3837
+ let S = p(() => {
3838
+ let e = ne.value, t = e.length ? Math.max(0, ...e) : 1, n = e.length ? Math.min(0, ...e) : 0;
3785
3839
  if (n === t) return {
3786
3840
  min: 0,
3787
3841
  max: t || 1,
@@ -3794,8 +3848,8 @@ var Cr = [
3794
3848
  max: a,
3795
3849
  ticks: o
3796
3850
  };
3797
- }), ie = f(() => resolveSharedSeriesFormat({ series: b.value })), ae = f(() => {
3798
- let e = v.value;
3851
+ }), ae = p(() => resolveSharedSeriesFormat({ series: te.value })), oe = p(() => {
3852
+ let e = m.value;
3799
3853
  if (!e) return {
3800
3854
  mode: "horizontal",
3801
3855
  entries: []
@@ -3805,8 +3859,8 @@ var Cr = [
3805
3859
  labels: e.data.map((e) => String(e?.[t] ?? "")),
3806
3860
  plotWidth: Math.max(200, a.value - 42)
3807
3861
  });
3808
- }), I = f(() => {
3809
- let e = ie.value?.valueFormat, t = !!(ie.value && (e === "currency" || e === "percent" || ie.value.valuePrefix || ie.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = ae.value.mode === "angled";
3862
+ }), j = p(() => {
3863
+ let e = ae.value?.valueFormat, t = !!(ae.value && (e === "currency" || e === "percent" || ae.value.valuePrefix || ae.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = oe.value.mode === "angled";
3810
3864
  return {
3811
3865
  width: a.value,
3812
3866
  height: 168 + (r ? 36 : 0),
@@ -3817,7 +3871,7 @@ var Cr = [
3817
3871
  };
3818
3872
  });
3819
3873
  function labelCenterX(e, t) {
3820
- let n = v.value, r = I.value;
3874
+ let n = m.value, r = j.value;
3821
3875
  if (n?.chartType === "bar") {
3822
3876
  let n = r.width - r.left - r.right;
3823
3877
  return r.left + (e + .5) * (n / Math.max(t, 1));
@@ -3825,22 +3879,22 @@ var Cr = [
3825
3879
  return xForIndex(e, t);
3826
3880
  }
3827
3881
  function xForIndex(e, t) {
3828
- let n = I.value, r = n.width - n.left - n.right;
3882
+ let n = j.value, r = n.width - n.left - n.right;
3829
3883
  return t <= 1 ? n.left + r / 2 : n.left + r * e / (t - 1);
3830
3884
  }
3831
3885
  function yForValue(e) {
3832
- let { min: t, max: n } = re.value, r = I.value, i = r.height - r.top - r.bottom;
3886
+ let { min: t, max: n } = S.value, r = j.value, i = r.height - r.top - r.bottom;
3833
3887
  return r.top + (n - e) / (n - t || 1) * i;
3834
3888
  }
3835
3889
  function pathForSeries(e) {
3836
- let t = v.value;
3890
+ let t = m.value;
3837
3891
  return t ? t.data.map((n, r) => {
3838
3892
  let i = numericValue(n[e]) ?? 0;
3839
3893
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3840
3894
  }).join(" ") : "";
3841
3895
  }
3842
- let se = f(() => {
3843
- let e = v.value;
3896
+ let ue = p(() => {
3897
+ let e = m.value;
3844
3898
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3845
3899
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
3846
3900
  if (!n || !t.length) return null;
@@ -3850,11 +3904,11 @@ var Cr = [
3850
3904
  dataKey: e.trendLine.dataKey,
3851
3905
  seriesIndex: s
3852
3906
  };
3853
- }), ce = f(() => {
3854
- let e = v.value;
3907
+ }), de = p(() => {
3908
+ let e = m.value;
3855
3909
  if (!e || e.chartType !== "bar") return [];
3856
- let t = I.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3857
- if (S.value) {
3910
+ let t = j.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3911
+ if (x.value) {
3858
3912
  let r = Math.max(4, Math.min(24, n * .42));
3859
3913
  return e.data.flatMap((i, a) => {
3860
3914
  let o = 0, s = 0, c = t.left + a * n + (n - r) / 2;
@@ -3887,12 +3941,12 @@ var Cr = [
3887
3941
  dataKey: e.dataKey
3888
3942
  };
3889
3943
  }));
3890
- }), R = f(() => {
3891
- let e = v.value;
3944
+ }), F = p(() => {
3945
+ let e = m.value;
3892
3946
  if (!e) return [];
3893
3947
  let t = e.data;
3894
3948
  if (!t.length) return [];
3895
- let n = t.length - 1, r = ae.value, i = r.mode === "angled";
3949
+ let n = t.length - 1, r = oe.value, i = r.mode === "angled";
3896
3950
  return r.entries.map(({ index: e, text: r }) => ({
3897
3951
  key: `${e}`,
3898
3952
  label: r,
@@ -3900,9 +3954,9 @@ var Cr = [
3900
3954
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
3901
3955
  angled: i
3902
3956
  })).filter((e) => e.label);
3903
- }), ue = f(() => {
3904
- let e = v.value;
3905
- if (!e || e.chartType !== "bar" || e.series.length !== 1 || S.value) return [];
3957
+ }), pe = p(() => {
3958
+ let e = m.value;
3959
+ if (!e || e.chartType !== "bar" || e.series.length !== 1 || x.value) return [];
3906
3960
  let t = e.series[0], n = e.data.map((n, r) => {
3907
3961
  let i = categoryLabel(n, e.xKey), a = numericValue(n[t.dataKey]);
3908
3962
  return !i || a === null ? null : {
@@ -3923,8 +3977,8 @@ var Cr = [
3923
3977
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
3924
3978
  seriesIndex: 0
3925
3979
  }));
3926
- }), z = f(() => {
3927
- let e = v.value;
3980
+ }), he = p(() => {
3981
+ let e = m.value;
3928
3982
  if (!e?.data.length) return [];
3929
3983
  let t = e.data[e.data.length - 1];
3930
3984
  return e.series.map((e, n) => {
@@ -3939,8 +3993,8 @@ var Cr = [
3939
3993
  seriesIndex: n
3940
3994
  };
3941
3995
  });
3942
- }), de = f(() => {
3943
- let e = v.value;
3996
+ }), I = p(() => {
3997
+ let e = m.value;
3944
3998
  if (!e?.data.length || e.chartType !== "line") return [];
3945
3999
  let t = e.data.length - 1, n = e.data[t];
3946
4000
  return e.series.map((r, i) => {
@@ -3952,8 +4006,8 @@ var Cr = [
3952
4006
  seriesIndex: i
3953
4007
  };
3954
4008
  }).filter((e) => e !== null);
3955
- }), B = f(() => {
3956
- let e = x.value;
4009
+ }), R = p(() => {
4010
+ let e = b.value;
3957
4011
  if (!e) return [];
3958
4012
  let t = e.data.map((t) => ({
3959
4013
  name: String(t[e.nameKey] ?? ""),
@@ -3968,17 +4022,17 @@ var Cr = [
3968
4022
  series: r
3969
4023
  })
3970
4024
  }));
3971
- }), pe = f(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), he = [
4025
+ }), z = p(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), _e = [
3972
4026
  "var(--color-theme-900)",
3973
4027
  "var(--color-primary-500)",
3974
4028
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
3975
- ], _e = [
4029
+ ], ve = [
3976
4030
  "rgba(255, 255, 255, 0.92)",
3977
4031
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
3978
4032
  "rgba(255, 255, 255, 0.55)"
3979
4033
  ];
3980
4034
  function seriesColor(e) {
3981
- let n = t.inverted ? _e : he;
4035
+ let n = t.inverted ? ve : _e;
3982
4036
  return n[e % n.length];
3983
4037
  }
3984
4038
  function diagramNodeFill(e) {
@@ -3987,82 +4041,82 @@ var Cr = [
3987
4041
  function diagramNodeStroke(e) {
3988
4042
  return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : Se.value;
3989
4043
  }
3990
- let ve = f(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ye = f(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = f(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = f(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = f(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = f(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = f(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Ce = f(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = f(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
3991
- return (e, r) => o.value ? (k(), h("section", {
4044
+ let B = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), 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)");
4045
+ return (e, r) => o.value ? (T(), _("section", {
3992
4046
  key: 0,
3993
4047
  "data-test": "chat-visual",
3994
4048
  "data-visual-type": o.value.visualType,
3995
4049
  "data-chart-type": s.value?.chartType,
3996
- "data-stacking": S.value ? "stacked" : void 0,
4050
+ "data-stacking": x.value ? "stacked" : void 0,
3997
4051
  "data-diagram-type": c.value?.diagramType,
3998
4052
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
3999
- style: T({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
4053
+ style: C({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
4000
4054
  "aria-label": o.value.meta.title
4001
4055
  }, [
4002
- _("header", wr, [_("h4", {
4056
+ v("header", Ar, [v("h4", {
4003
4057
  class: "text-[13px] font-semibold leading-tight",
4004
- style: T({ color: ve.value })
4005
- }, F(o.value.meta.title), 5), o.value.meta.description ? (k(), h("p", {
4058
+ style: C({ color: B.value })
4059
+ }, P(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
4006
4060
  key: 0,
4007
4061
  class: "mt-0.5 text-[12px] leading-snug",
4008
- style: T({ color: ye.value })
4009
- }, F(o.value.meta.description), 5)) : m("", !0)]),
4010
- _("div", {
4062
+ style: C({ color: ye.value })
4063
+ }, P(o.value.meta.description), 5)) : h("", !0)]),
4064
+ v("div", {
4011
4065
  ref_key: "bodyEl",
4012
4066
  ref: n
4013
- }, [v.value ? (k(), h("div", {
4067
+ }, [m.value ? (T(), _("div", {
4014
4068
  key: 0,
4015
4069
  role: "img",
4016
4070
  "aria-label": o.value.meta.title
4017
- }, [ue.value.length ? (k(), h("div", Er, [(k(!0), h(u, null, j(ue.value, (e) => (k(), h("div", {
4071
+ }, [pe.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
4018
4072
  key: e.key,
4019
4073
  "data-test": "chat-visual-horizontal-bar",
4020
4074
  class: "min-w-0"
4021
- }, [_("div", Dr, [_("span", {
4075
+ }, [v("div", Nr, [v("span", {
4022
4076
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4023
- style: T({ color: ve.value })
4024
- }, F(e.label), 5), _("span", {
4077
+ style: C({ color: B.value })
4078
+ }, P(e.label), 5), v("span", {
4025
4079
  class: "shrink-0 font-semibold tabular-nums",
4026
- style: T({ color: ve.value })
4027
- }, F(e.value), 5)]), _("div", {
4080
+ style: C({ color: B.value })
4081
+ }, P(e.value), 5)]), v("div", {
4028
4082
  class: "h-2 w-full overflow-hidden rounded-full",
4029
- style: T({ background: we.value })
4030
- }, [_("div", {
4083
+ style: C({ background: we.value })
4084
+ }, [v("div", {
4031
4085
  class: "h-full rounded-full",
4032
- style: T({
4086
+ style: C({
4033
4087
  width: `${e.width}%`,
4034
4088
  background: seriesColor(e.seriesIndex)
4035
4089
  })
4036
- }, null, 4)], 4)]))), 128))])) : (k(), h("svg", {
4090
+ }, null, 4)], 4)]))), 128))])) : (T(), _("svg", {
4037
4091
  key: 1,
4038
4092
  class: "block h-auto w-full overflow-visible",
4039
- viewBox: `0 0 ${I.value.width} ${I.value.height}`,
4040
- style: T({ aspectRatio: `${I.value.width} / ${I.value.height}` }),
4093
+ viewBox: `0 0 ${j.value.width} ${j.value.height}`,
4094
+ style: C({ aspectRatio: `${j.value.width} / ${j.value.height}` }),
4041
4095
  preserveAspectRatio: "xMidYMid meet",
4042
4096
  "aria-hidden": "true"
4043
4097
  }, [
4044
- (k(!0), h(u, null, j(re.value.ticks, (e) => (k(), h("line", {
4098
+ (T(!0), _(f, null, A(S.value.ticks, (e) => (T(), _("line", {
4045
4099
  key: `grid-${e}`,
4046
- x1: I.value.left,
4047
- x2: I.value.width - I.value.right,
4100
+ x1: j.value.left,
4101
+ x2: j.value.width - j.value.right,
4048
4102
  y1: yForValue(e),
4049
4103
  y2: yForValue(e),
4050
4104
  "stroke-width": "1",
4051
4105
  "vector-effect": "non-scaling-stroke",
4052
- style: T({ stroke: e === 0 ? U.value : be.value })
4053
- }, null, 12, kr))), 128)),
4054
- _("g", null, [(k(!0), h(u, null, j(re.value.ticks, (e) => (k(), h("text", {
4106
+ style: C({ stroke: e === 0 ? U.value : be.value })
4107
+ }, null, 12, Fr))), 128)),
4108
+ v("g", null, [(T(!0), _(f, null, A(S.value.ticks, (e) => (T(), _("text", {
4055
4109
  key: `y-${e}`,
4056
- x: I.value.left - 7,
4110
+ x: j.value.left - 7,
4057
4111
  y: yForValue(e) + 3,
4058
4112
  "text-anchor": "end",
4059
4113
  "font-size": "9.5",
4060
- style: T({ fill: H.value })
4061
- }, F(oe(formatChatVisualTick)({
4114
+ style: C({ fill: H.value })
4115
+ }, P(ce(formatChatVisualTick)({
4062
4116
  value: e,
4063
- shared: ie.value
4064
- })), 13, Ar))), 128))]),
4065
- v.value.chartType === "bar" ? (k(!0), h(u, { key: 0 }, j(ce.value, (e) => (k(), h("rect", {
4117
+ shared: ae.value
4118
+ })), 13, Ir))), 128))]),
4119
+ m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(de.value, (e) => (T(), _("rect", {
4066
4120
  key: e.key,
4067
4121
  "data-test": "chat-visual-bar",
4068
4122
  "data-row-index": e.rowIndex,
@@ -4073,22 +4127,22 @@ var Cr = [
4073
4127
  width: e.width,
4074
4128
  height: e.height,
4075
4129
  rx: "2.5",
4076
- style: T({ fill: seriesColor(e.seriesIndex) })
4077
- }, null, 12, jr))), 128)) : (k(), h(u, { key: 1 }, [
4078
- se.value ? (k(), h("path", {
4130
+ style: C({ fill: seriesColor(e.seriesIndex) })
4131
+ }, null, 12, Lr))), 128)) : (T(), _(f, { key: 1 }, [
4132
+ ue.value ? (T(), _("path", {
4079
4133
  key: 0,
4080
4134
  "data-test": "chat-visual-trend-line",
4081
- "data-trend-key": se.value.dataKey,
4082
- d: se.value.path,
4135
+ "data-trend-key": ue.value.dataKey,
4136
+ d: ue.value.path,
4083
4137
  fill: "none",
4084
4138
  "stroke-width": "1.4",
4085
4139
  "stroke-linecap": "round",
4086
4140
  "stroke-linejoin": "round",
4087
4141
  "stroke-dasharray": "4 3",
4088
4142
  "vector-effect": "non-scaling-stroke",
4089
- style: T({ stroke: seriesColor(se.value.seriesIndex) })
4090
- }, null, 12, Mr)) : m("", !0),
4091
- (k(!0), h(u, null, j(b.value, (e, t) => (k(), h("g", { key: e.dataKey }, [v.value.chartType === "line" ? (k(), h("path", {
4143
+ style: C({ stroke: seriesColor(ue.value.seriesIndex) })
4144
+ }, null, 12, Rr)) : h("", !0),
4145
+ (T(!0), _(f, null, A(te.value, (e, t) => (T(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (T(), _("path", {
4092
4146
  key: 0,
4093
4147
  d: pathForSeries(e.dataKey),
4094
4148
  fill: "none",
@@ -4096,74 +4150,74 @@ var Cr = [
4096
4150
  "stroke-linecap": "round",
4097
4151
  "stroke-linejoin": "round",
4098
4152
  "vector-effect": "non-scaling-stroke",
4099
- style: T({ stroke: seriesColor(t) })
4100
- }, null, 12, Nr)) : m("", !0), (k(!0), h(u, null, j(p.value, (n, r) => (k(), h(u, { key: `${e.dataKey}-${r}` }, [v.value.chartType === "scatter" ? (k(), h("circle", {
4153
+ style: C({ stroke: seriesColor(t) })
4154
+ }, null, 12, zr)) : h("", !0), (T(!0), _(f, null, A(u.value, (n, r) => (T(), _(f, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (T(), _("circle", {
4101
4155
  key: 0,
4102
- cx: xForIndex(r, p.value.length),
4156
+ cx: xForIndex(r, u.value.length),
4103
4157
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4104
4158
  r: "2.6",
4105
- style: T({ fill: seriesColor(t) })
4106
- }, null, 12, Pr)) : m("", !0)], 64))), 128))]))), 128)),
4107
- (k(!0), h(u, null, j(de.value, (e) => (k(), h("circle", {
4159
+ style: C({ fill: seriesColor(t) })
4160
+ }, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
4161
+ (T(!0), _(f, null, A(I.value, (e) => (T(), _("circle", {
4108
4162
  key: `marker-${e.key}`,
4109
4163
  cx: e.cx,
4110
4164
  cy: e.cy,
4111
4165
  r: "3",
4112
- style: T({ fill: seriesColor(e.seriesIndex) })
4113
- }, null, 12, Fr))), 128))
4166
+ style: C({ fill: seriesColor(e.seriesIndex) })
4167
+ }, null, 12, Vr))), 128))
4114
4168
  ], 64)),
4115
- (k(!0), h(u, null, j(R.value, (e) => (k(), h("text", {
4169
+ (T(!0), _(f, null, A(F.value, (e) => (T(), _("text", {
4116
4170
  key: e.key,
4117
4171
  x: e.x,
4118
- y: e.angled ? I.value.height - I.value.bottom + 12 : I.value.height - 6,
4172
+ y: e.angled ? j.value.height - j.value.bottom + 12 : j.value.height - 6,
4119
4173
  "text-anchor": e.anchor,
4120
4174
  "font-size": "9.5",
4121
- transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${I.value.height - I.value.bottom + 12})` : void 0,
4122
- style: T({ fill: H.value })
4123
- }, F(e.label), 13, Ir))), 128))
4124
- ], 12, Or)), z.value.length > 1 || v.value.chartType !== "bar" ? (k(), h("div", Lr, [(k(!0), h(u, null, j(z.value, (e) => (k(), h("div", {
4175
+ transform: e.angled ? `rotate(${ce(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4176
+ style: C({ fill: H.value })
4177
+ }, P(e.label), 13, Hr))), 128))
4178
+ ], 12, Pr)), he.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(he.value, (e) => (T(), _("div", {
4125
4179
  key: e.key,
4126
4180
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4127
4181
  }, [
4128
- _("span", {
4182
+ v("span", {
4129
4183
  class: "size-2.5 shrink-0 rounded-full",
4130
- style: T({ background: seriesColor(e.seriesIndex) })
4184
+ style: C({ background: seriesColor(e.seriesIndex) })
4131
4185
  }, null, 4),
4132
- _("span", { style: T({ color: ye.value }) }, F(e.label), 5),
4133
- _("span", {
4186
+ v("span", { style: C({ color: ye.value }) }, P(e.label), 5),
4187
+ v("span", {
4134
4188
  class: "font-semibold tabular-nums",
4135
- style: T({ color: ve.value })
4136
- }, F(e.value), 5)
4137
- ]))), 128))])) : m("", !0)], 8, Tr)) : x.value ? (k(), h("div", Rr, [(k(!0), h(u, null, j(B.value, (e, t) => (k(), h("div", { key: e.key }, [_("div", zr, [_("span", {
4189
+ style: C({ color: B.value })
4190
+ }, P(e.value), 5)
4191
+ ]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(R.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4138
4192
  class: "truncate font-medium",
4139
- style: T({ color: ve.value })
4140
- }, F(e.name), 5), _("span", Br, [_("span", {
4193
+ style: C({ color: B.value })
4194
+ }, P(e.name), 5), v("span", Kr, [v("span", {
4141
4195
  class: "font-semibold",
4142
- style: T({ color: ve.value })
4143
- }, F(e.display), 5), _("span", {
4196
+ style: C({ color: B.value })
4197
+ }, P(e.display), 5), v("span", {
4144
4198
  class: "ml-1.5",
4145
- style: T({ color: ye.value })
4146
- }, F(Math.round(e.percent * 100)) + "%", 5)])]), _("div", {
4199
+ style: C({ color: ye.value })
4200
+ }, P(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4147
4201
  class: "h-1.5 w-full overflow-hidden rounded-full",
4148
- style: T({ background: we.value })
4149
- }, [_("div", {
4202
+ style: C({ background: we.value })
4203
+ }, [v("div", {
4150
4204
  class: "h-full rounded-full",
4151
- style: T({
4205
+ style: C({
4152
4206
  width: `${Math.max(2, e.percent * 100)}%`,
4153
4207
  background: seriesColor(t)
4154
4208
  })
4155
- }, null, 4)], 4)]))), 128))])) : c.value && pe.value ? (k(), h("div", Vr, [(k(), h("svg", {
4209
+ }, null, 4)], 4)]))), 128))])) : c.value && z.value ? (T(), _("div", qr, [(T(), _("svg", {
4156
4210
  "data-test": "chat-visual-diagram-svg",
4157
4211
  class: "block h-auto overflow-visible",
4158
- viewBox: `0 0 ${pe.value.width} ${pe.value.height}`,
4159
- style: T({
4160
- width: `${pe.value.width}px`,
4161
- aspectRatio: `${pe.value.width} / ${pe.value.height}`
4212
+ viewBox: `0 0 ${z.value.width} ${z.value.height}`,
4213
+ style: C({
4214
+ width: `${z.value.width}px`,
4215
+ aspectRatio: `${z.value.width} / ${z.value.height}`
4162
4216
  }),
4163
4217
  role: "img",
4164
4218
  "aria-label": o.value.meta.title
4165
4219
  }, [
4166
- (k(!0), h(u, null, j(pe.value.edges, (e) => (k(), h("line", {
4220
+ (T(!0), _(f, null, A(z.value.edges, (e) => (T(), _("line", {
4167
4221
  key: e.key,
4168
4222
  "data-test": "chat-visual-diagram-edge",
4169
4223
  "data-from": e.from,
@@ -4175,98 +4229,99 @@ var Cr = [
4175
4229
  "stroke-width": "1.4",
4176
4230
  "stroke-linecap": "round",
4177
4231
  "vector-effect": "non-scaling-stroke",
4178
- style: T({ stroke: Ce.value })
4179
- }, null, 12, Ur))), 128)),
4180
- (k(!0), h(u, null, j(pe.value.edges, (e) => (k(), h("circle", {
4232
+ style: C({ stroke: Ce.value })
4233
+ }, null, 12, Yr))), 128)),
4234
+ (T(!0), _(f, null, A(z.value.edges, (e) => (T(), _("circle", {
4181
4235
  key: `${e.key}-dot`,
4182
4236
  cx: e.x2,
4183
4237
  cy: e.y2,
4184
4238
  r: "2.4",
4185
- style: T({ fill: Ce.value })
4186
- }, null, 12, Wr))), 128)),
4187
- (k(!0), h(u, null, j(pe.value.edges.filter((e) => e.label), (e) => (k(), h("foreignObject", {
4239
+ style: C({ fill: Ce.value })
4240
+ }, null, 12, Xr))), 128)),
4241
+ (T(!0), _(f, null, A(z.value.edges.filter((e) => e.label), (e) => (T(), _("foreignObject", {
4188
4242
  key: `${e.key}-label`,
4189
4243
  x: e.labelX - 55,
4190
4244
  y: e.labelY - 12,
4191
4245
  width: "110",
4192
4246
  height: "24"
4193
- }, [_("div", {
4247
+ }, [v("div", {
4194
4248
  xmlns: "http://www.w3.org/1999/xhtml",
4195
4249
  class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
4196
- style: T({
4250
+ style: C({
4197
4251
  color: ye.value,
4198
4252
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4199
4253
  })
4200
- }, F(e.label), 5)], 8, Gr))), 128)),
4201
- (k(!0), h(u, null, j(pe.value.nodes, (e) => (k(), h("g", {
4254
+ }, P(e.label), 5)], 8, Zr))), 128)),
4255
+ (T(!0), _(f, null, A(z.value.nodes, (e) => (T(), _("g", {
4202
4256
  key: e.id,
4203
4257
  "data-test": "chat-visual-diagram-node",
4204
4258
  "data-node-id": e.id,
4205
4259
  "data-node-kind": e.kind,
4206
4260
  transform: `translate(${e.x} ${e.y})`
4207
- }, [e.kind === "decision" ? (k(), h("polygon", {
4261
+ }, [e.kind === "decision" ? (T(), _("polygon", {
4208
4262
  key: 0,
4209
4263
  points: `${e.width / 2},0 ${e.width},${e.height / 2} ${e.width / 2},${e.height} 0,${e.height / 2}`,
4210
4264
  "stroke-width": "1",
4211
4265
  "vector-effect": "non-scaling-stroke",
4212
- style: T({
4266
+ style: C({
4213
4267
  fill: diagramNodeFill(e.kind),
4214
4268
  stroke: diagramNodeStroke(e.kind)
4215
4269
  })
4216
- }, null, 12, qr)) : (k(), h("rect", {
4270
+ }, null, 12, $r)) : (T(), _("rect", {
4217
4271
  key: 1,
4218
4272
  width: e.width,
4219
4273
  height: e.height,
4220
4274
  rx: "12",
4221
4275
  "stroke-width": "1",
4222
4276
  "vector-effect": "non-scaling-stroke",
4223
- style: T({
4277
+ style: C({
4224
4278
  fill: diagramNodeFill(e.kind),
4225
4279
  stroke: diagramNodeStroke(e.kind)
4226
4280
  })
4227
- }, null, 12, Jr)), (k(), h("foreignObject", {
4281
+ }, null, 12, ei)), (T(), _("foreignObject", {
4228
4282
  x: "8",
4229
4283
  y: "5",
4230
4284
  width: e.width - 16,
4231
4285
  height: e.height - 10
4232
- }, [_("div", Xr, [_("div", {
4286
+ }, [v("div", ni, [v("div", {
4233
4287
  class: "line-clamp-2 text-[13px] font-semibold leading-tight",
4234
- style: T({ color: ve.value })
4235
- }, F(e.label), 5), e.detail ? (k(), h("div", {
4288
+ style: C({ color: B.value })
4289
+ }, P(e.label), 5), e.detail ? (T(), _("div", {
4236
4290
  key: 0,
4237
4291
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4238
- style: T({ color: ye.value })
4239
- }, F(e.detail), 5)) : m("", !0)])], 8, Yr))], 8, Kr))), 128))
4240
- ], 12, Hr))])) : m("", !0)], 512),
4241
- o.value.meta.footer ? (k(), h("footer", {
4292
+ style: C({ color: ye.value })
4293
+ }, P(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4294
+ ], 12, Jr))])) : h("", !0)], 512),
4295
+ o.value.meta.footer ? (T(), _("footer", {
4242
4296
  key: 0,
4243
4297
  class: "mt-3 text-[11px] leading-snug",
4244
- style: T({ color: H.value })
4245
- }, F(o.value.meta.footer), 5)) : m("", !0)
4246
- ], 12, Cr)) : m("", !0);
4298
+ style: C({ color: H.value })
4299
+ }, P(o.value.meta.footer), 5)) : h("", !0)
4300
+ ], 12, kr)) : h("", !0);
4247
4301
  }
4248
- }), Qr = ["innerHTML"], $r = /* @__PURE__ */ x({
4302
+ }), ii = ["innerHTML"], ai = /* @__PURE__ */ x({
4249
4303
  __name: "ChatRichText",
4250
4304
  props: {
4251
4305
  text: {},
4252
4306
  inverted: { type: Boolean },
4253
4307
  streaming: { type: Boolean }
4254
4308
  },
4255
- setup(e) {
4256
- let t = e, n = P(t.text), r;
4257
- se([() => t.text, () => t.streaming], ([e, i]) => {
4258
- if (!i) {
4259
- r !== void 0 && (cancelAnimationFrame(r), r = void 0), n.value = e;
4309
+ emits: ["action"],
4310
+ setup(e, { emit: t }) {
4311
+ let n = e, r = t, i = se(n.text), a;
4312
+ de([() => n.text, () => n.streaming], ([e, t]) => {
4313
+ if (!t) {
4314
+ a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4260
4315
  return;
4261
4316
  }
4262
- r === void 0 && (r = requestAnimationFrame(() => {
4263
- r = void 0, n.value = t.text;
4317
+ a === void 0 && (a = requestAnimationFrame(() => {
4318
+ a = void 0, i.value = n.text;
4264
4319
  }));
4265
- }), te(() => {
4266
- r !== void 0 && cancelAnimationFrame(r);
4320
+ }), re(() => {
4321
+ a !== void 0 && cancelAnimationFrame(a);
4267
4322
  });
4268
- let i = new g.Renderer();
4269
- i.link = ({ href: e, text: t }) => {
4323
+ let o = new g.Renderer();
4324
+ o.link = ({ href: e, text: t }) => {
4270
4325
  let n = e.trim();
4271
4326
  if (!n || n === "#") return t;
4272
4327
  let r = !1;
@@ -4279,7 +4334,7 @@ var Cr = [
4279
4334
  }, g.setOptions({
4280
4335
  breaks: !0,
4281
4336
  gfm: !0,
4282
- renderer: i
4337
+ renderer: o
4283
4338
  });
4284
4339
  function renderMarkdown(e) {
4285
4340
  if (!e) return "";
@@ -4338,147 +4393,170 @@ var Cr = [
4338
4393
  height: e.target.naturalHeight || null
4339
4394
  });
4340
4395
  }
4341
- let a = /```(?:pl-visual|pl-platform-visual)[ \t]*(?:\r?\n|$)/;
4396
+ let s = /```(?:pl-visual|pl-platform-visual|pl-card)[ \t]*(?:\r?\n|$)/;
4342
4397
  function richTextSegments(e) {
4343
- let { text: t, streaming: n } = e, r = [], i = /```(?:pl-visual|pl-platform-visual)[ \t]*\r?\n([\s\S]*?)```/g, o = 0, s = 0, u = i.exec(t);
4344
- for (; u !== null;) {
4345
- let e = renderMarkdown(t.slice(o, u.index));
4398
+ 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);
4399
+ for (; f !== null;) {
4400
+ let e = renderMarkdown(t.slice(a, f.index));
4346
4401
  e && r.push({
4347
4402
  kind: "markdown",
4348
- key: `md-${s}`,
4403
+ key: `md-${o}`,
4349
4404
  html: e
4350
4405
  });
4351
- let n = c(u[1].trim());
4352
- if (n.ok) r.push({
4353
- kind: "visual",
4354
- key: `visual-${s}`,
4355
- result: n
4356
- });
4357
- else {
4358
- typeof console < "u" && console.warn("[pl-visual] parse_failed", {
4359
- reason: n.reason,
4360
- message: n.message,
4361
- hasFallbackMarkdown: !!n.fallbackMarkdown,
4362
- payloadChars: u[1].trim().length,
4363
- ...visualPayloadShape(u[1].trim())
4364
- });
4365
- let e = n.fallbackMarkdown ? renderMarkdown(n.fallbackMarkdown) : "";
4366
- e && r.push({
4406
+ let n = f[1], s = f[2].trim();
4407
+ if (n === "pl-card") {
4408
+ let e = c(s);
4409
+ e.ok ? r.push({
4410
+ kind: "card",
4411
+ key: `card-${o}`,
4412
+ spec: e.spec
4413
+ }) : (typeof console < "u" && console.warn("[pl-card] parse_failed", {
4414
+ reason: e.reason,
4415
+ message: e.message,
4416
+ payloadChars: s.length
4417
+ }), r.push({
4367
4418
  kind: "markdown",
4368
- key: `visual-${s}`,
4369
- html: e
4419
+ key: `card-${o}`,
4420
+ html: renderMarkdown(`\`\`\`\n${s}\n\`\`\``)
4421
+ }));
4422
+ } else {
4423
+ let e = u(s);
4424
+ if (e.ok) r.push({
4425
+ kind: "visual",
4426
+ key: `visual-${o}`,
4427
+ result: e
4370
4428
  });
4429
+ else {
4430
+ typeof console < "u" && console.warn("[pl-visual] parse_failed", {
4431
+ reason: e.reason,
4432
+ message: e.message,
4433
+ hasFallbackMarkdown: !!e.fallbackMarkdown,
4434
+ payloadChars: s.length,
4435
+ ...visualPayloadShape(s)
4436
+ });
4437
+ let t = e.fallbackMarkdown ? renderMarkdown(e.fallbackMarkdown) : "";
4438
+ t && r.push({
4439
+ kind: "markdown",
4440
+ key: `visual-${o}`,
4441
+ html: t
4442
+ });
4443
+ }
4371
4444
  }
4372
- o = u.index + u[0].length, s += 1, u = i.exec(t);
4445
+ a = f.index + f[0].length, o += 1, f = i.exec(t);
4373
4446
  }
4374
- let f = t.slice(o), p = n ? a.exec(f) : null;
4375
- if (p) {
4376
- let e = renderMarkdown(f.slice(0, p.index));
4447
+ let p = t.slice(a), m = n ? s.exec(p) : null;
4448
+ if (m) {
4449
+ let e = renderMarkdown(p.slice(0, m.index));
4377
4450
  return e && r.push({
4378
4451
  kind: "markdown",
4379
- key: `md-${s}`,
4452
+ key: `md-${o}`,
4380
4453
  html: e
4381
4454
  }), r.push({
4382
4455
  kind: "pending-visual",
4383
- key: `pending-${s}`
4456
+ key: `pending-${o}`
4384
4457
  }), r;
4385
4458
  }
4386
- let m = renderMarkdown(f);
4387
- return m && r.push({
4459
+ let h = renderMarkdown(p);
4460
+ return h && r.push({
4388
4461
  kind: "markdown",
4389
- key: `md-${s}`,
4390
- html: m
4462
+ key: `md-${o}`,
4463
+ html: h
4391
4464
  }), r;
4392
4465
  }
4393
- let o = f(() => {
4394
- let e = n.value;
4466
+ let h = p(() => {
4467
+ let e = i.value;
4395
4468
  return e ? richTextSegments({
4396
4469
  text: e,
4397
- streaming: !!t.streaming
4470
+ streaming: !!n.streaming
4398
4471
  }) : [];
4399
4472
  });
4400
- return (t, n) => (k(), h("div", {
4473
+ return (t, n) => (T(), _("div", {
4401
4474
  class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:max-w-[65ch] @sm/chat:text-[16px] @sm/chat:leading-relaxed",
4402
4475
  onErrorCapture: onRichTextAssetError
4403
- }, [(k(!0), h(u, null, j(o.value, (t) => (k(), h(u, { key: t.key }, [t.kind === "markdown" ? (k(), h("div", {
4476
+ }, [(T(!0), _(f, null, A(h.value, (t) => (T(), _(f, { key: t.key }, [t.kind === "markdown" ? (T(), _("div", {
4404
4477
  key: 0,
4405
- class: C(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4478
+ class: S(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4406
4479
  innerHTML: t.html
4407
- }, null, 10, Qr)) : t.kind === "visual" ? (k(), p(Zr, {
4480
+ }, null, 10, ii)) : t.kind === "visual" ? (T(), m(ri, {
4408
4481
  key: 1,
4409
4482
  result: t.result,
4410
4483
  inverted: e.inverted
4411
- }, null, 8, ["result", "inverted"])) : (k(), h("div", {
4484
+ }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (T(), m(vr, {
4412
4485
  key: 2,
4486
+ spec: t.spec,
4487
+ inverted: e.inverted,
4488
+ onAction: n[0] || (n[0] = (e) => r("action", e))
4489
+ }, null, 8, ["spec", "inverted"])) : (T(), _("div", {
4490
+ key: 3,
4413
4491
  "data-test": "chat-visual-pending",
4414
4492
  role: "status",
4415
4493
  class: "my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",
4416
- style: T({
4494
+ style: C({
4417
4495
  boxShadow: `inset 0 0 0 1px ${e.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,
4418
4496
  color: e.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"
4419
4497
  })
4420
- }, [...n[0] || (n[0] = [_("span", {
4498
+ }, [...n[1] || (n[1] = [v("span", {
4421
4499
  class: "size-2 shrink-0 animate-pulse rounded-full",
4422
4500
  style: { background: "currentcolor" }
4423
- }, null, -1), v(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4501
+ }, null, -1), te(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4424
4502
  }
4425
- }), ei = 80, ti = 600, ni = /* @__PURE__ */ x({
4503
+ }), oi = 80, si = 600, ci = /* @__PURE__ */ x({
4426
4504
  __name: "ChatScroller",
4427
4505
  setup(e, { expose: t }) {
4428
- let n = A(), r = A(), i = A(!0), a, o = 0;
4506
+ let n = k(), r = k(), i = k(!0), a, o = 0;
4429
4507
  function scrollToBottom() {
4430
4508
  let e = n.value;
4431
4509
  e && (e.scrollTop = e.scrollHeight);
4432
4510
  }
4433
4511
  function onScroll() {
4434
4512
  let e = n.value;
4435
- e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= ei);
4513
+ e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= oi);
4436
4514
  }
4437
4515
  function markUserGesture() {
4438
- o = Date.now() + ti;
4516
+ o = Date.now() + si;
4439
4517
  }
4440
4518
  function pin() {
4441
4519
  i.value = !0, scrollToBottom();
4442
4520
  }
4443
- return t({ pin }), ne(() => {
4521
+ return t({ pin }), ie(() => {
4444
4522
  requestAnimationFrame(() => {
4445
4523
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4446
4524
  }), r.value && (a = new ResizeObserver(() => {
4447
4525
  i.value && Date.now() > o && scrollToBottom();
4448
4526
  }), a.observe(r.value), n.value && a.observe(n.value));
4449
- }), te(() => {
4527
+ }), re(() => {
4450
4528
  a?.disconnect();
4451
- }), (e, t) => (k(), h("div", {
4529
+ }), (e, t) => (T(), _("div", {
4452
4530
  ref_key: "viewport",
4453
4531
  ref: n,
4454
- class: C(["overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4532
+ class: S(["overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4455
4533
  onScrollPassive: onScroll,
4456
4534
  onWheelPassive: markUserGesture,
4457
4535
  onTouchstartPassive: markUserGesture
4458
- }, [_("div", {
4536
+ }, [v("div", {
4459
4537
  ref_key: "content",
4460
4538
  ref: r,
4461
4539
  class: "flex-1 flex flex-col"
4462
- }, [ie(e.$slots, "default")], 512)], 34));
4540
+ }, [oe(e.$slots, "default")], 512)], 34));
4463
4541
  }
4464
- }), ri = {
4542
+ }), li = {
4465
4543
  key: 0,
4466
4544
  class: "pb-4"
4467
- }, ii = {
4545
+ }, ui = {
4468
4546
  key: 1,
4469
4547
  "data-test": "messaging-sdk-header",
4470
4548
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4471
- }, ai = { class: "min-w-0 flex-1" }, oi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, si = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, ci = {
4549
+ }, di = { class: "min-w-0 flex-1" }, fi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, pi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, mi = {
4472
4550
  key: 0,
4473
4551
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4474
- }, li = {
4552
+ }, hi = {
4475
4553
  key: 0,
4476
4554
  "data-test": "messaging-empty-state",
4477
4555
  class: "flex flex-col items-center justify-center px-4"
4478
- }, ui = ["title"], di = {
4556
+ }, gi = ["title"], _i = {
4479
4557
  key: 0,
4480
4558
  class: "flex items-center gap-3 py-3 px-2"
4481
- }, fi = ["data-journal-outcome"], pi = [
4559
+ }, vi = ["data-journal-outcome"], yi = [
4482
4560
  "data-message-id",
4483
4561
  "data-message-sender",
4484
4562
  "data-conversation-id",
@@ -4489,7 +4567,7 @@ var Cr = [
4489
4567
  "data-issue-action-label",
4490
4568
  "data-issue-action-url",
4491
4569
  "data-streaming"
4492
- ], mi = { class: "max-w-[85%] min-w-0" }, hi = ["href"], gi = [
4570
+ ], bi = { class: "max-w-[85%] min-w-0" }, xi = ["href"], Si = [
4493
4571
  "data-message-id",
4494
4572
  "data-message-sender",
4495
4573
  "data-conversation-id",
@@ -4498,7 +4576,7 @@ var Cr = [
4498
4576
  "data-issue-code",
4499
4577
  "data-issue-bucket",
4500
4578
  "data-streaming"
4501
- ], _i = [
4579
+ ], Ci = [
4502
4580
  "data-test",
4503
4581
  "data-message-id",
4504
4582
  "data-message-sender",
@@ -4506,51 +4584,51 @@ var Cr = [
4506
4584
  "data-message-sequence",
4507
4585
  "data-system-kind",
4508
4586
  "data-streaming"
4509
- ], vi = ["src", "alt"], yi = ["src"], bi = ["href"], xi = {
4587
+ ], wi = ["src", "alt"], Ti = ["src"], Ei = ["href"], Di = {
4510
4588
  key: 0,
4511
4589
  "data-test": "messaging-message-text-part"
4512
- }, Si = [
4590
+ }, Oi = [
4513
4591
  "src",
4514
4592
  "alt",
4515
4593
  "data-attachment-placement"
4516
- ], Ci = ["src", "data-attachment-placement"], wi = ["href", "data-attachment-placement"], Ti = ["data-journal-outcome"], Ei = {
4594
+ ], ki = ["src", "data-attachment-placement"], Ai = ["href", "data-attachment-placement"], ji = ["data-journal-outcome"], Mi = {
4517
4595
  key: 2,
4518
4596
  "data-test": "messaging-tool-activity-tail",
4519
4597
  "aria-label": "Assistant is still working",
4520
4598
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4521
- }, Di = ["data-journal-outcome"], Oi = ["data-working-description"], ki = { class: "truncate" }, Ai = ["data-issue-code"], ji = ["href"], Mi = {
4599
+ }, Ni = ["data-journal-outcome"], Pi = ["data-working-description"], Fi = { class: "truncate" }, Ii = ["data-issue-code"], Li = ["href"], Ri = {
4522
4600
  key: 3,
4523
4601
  "data-test": "messaging-thinking-indicator",
4524
4602
  class: "flex gap-2 justify-start items-center mb-4"
4525
- }, Ni = ["src", "alt"], Pi = { class: "max-w-20 truncate" }, Fi = ["onClick"], Ii = {
4603
+ }, zi = ["src", "alt"], Bi = { class: "max-w-20 truncate" }, Vi = ["onClick"], Hi = {
4526
4604
  key: 0,
4527
4605
  class: "shrink-0 flex items-center justify-center size-14"
4528
- }, Li = ["data-composer-action"], Ri = ["placeholder", "disabled"], zi = { class: "font-mono text-sm tabular-nums" }, Bi = { class: "mt-2.5 flex items-center" }, Vi = [
4606
+ }, Ui = ["data-composer-action"], Wi = ["placeholder", "disabled"], Gi = { class: "font-mono text-sm tabular-nums" }, Ki = { class: "mt-2.5 flex items-center" }, qi = [
4529
4607
  "disabled",
4530
4608
  "aria-label",
4531
4609
  "title"
4532
- ], Hi = {
4610
+ ], Ji = {
4533
4611
  key: 0,
4534
4612
  class: "i-svg-spinners-ring-resize size-5"
4535
- }, Ui = {
4613
+ }, Yi = {
4536
4614
  key: 1,
4537
4615
  class: "i-tabler-plus size-5"
4538
- }, Wi = { class: "sr-only" }, Gi = { class: "flex items-center gap-2" }, Ki = ["aria-label", "title"], qi = { class: "sr-only" }, Ji = [
4616
+ }, Xi = { class: "sr-only" }, Zi = { class: "flex items-center gap-2" }, Qi = ["aria-label", "title"], $i = { class: "sr-only" }, ea = [
4539
4617
  "data-composer-action",
4540
4618
  "disabled",
4541
4619
  "aria-label",
4542
4620
  "title"
4543
- ], Yi = {
4621
+ ], ta = {
4544
4622
  key: 0,
4545
4623
  class: "i-tabler-player-stop-filled size-3.5"
4546
- }, Xi = {
4624
+ }, na = {
4547
4625
  key: 1,
4548
4626
  class: "i-tabler-arrow-up size-[17px]"
4549
- }, Zi = { class: "sr-only" }, Qi = {
4627
+ }, ra = { class: "sr-only" }, ia = {
4550
4628
  key: 2,
4551
4629
  "data-test": "messaging-suggested-prompts",
4552
4630
  class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
4553
- }, $i = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ea = ["disabled", "onClick"], ta = ["aria-expanded"], na = /* @__PURE__ */ x({
4631
+ }, aa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, oa = ["disabled", "onClick"], sa = ["aria-expanded"], ca = /* @__PURE__ */ x({
4554
4632
  __name: "ElAgentChat",
4555
4633
  props: {
4556
4634
  chatController: {},
@@ -4588,10 +4666,10 @@ var Cr = [
4588
4666
  label: "Public",
4589
4667
  tooltip: "Anyone with the link can see this"
4590
4668
  }
4591
- }, n = f(() => {
4669
+ }, n = p(() => {
4592
4670
  let n = { ...t[e.scope] };
4593
4671
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
4594
- }), r = A(!1), i = A(), a = A(), o = A();
4672
+ }), r = k(!1), i = k(), a = k(), o = k();
4595
4673
  function containsMarkdownLink(e) {
4596
4674
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4597
4675
  }
@@ -4602,23 +4680,23 @@ var Cr = [
4602
4680
  let n = e[t], r = e[t + 1];
4603
4681
  return !r || r.sender !== n.sender;
4604
4682
  }
4605
- let s = f(() => e.chatController?.textState.value), c = f(() => s.value?.isConnected ?? !1), x = f(() => s.value?.isThinking ?? !1), T = f(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), te = f(() => s.value?.connectionStatus !== "connected" && !s.value?.error), ae = A(!1), P = f(() => e.chatController?.liveTurnBlocks?.value ?? []), oe = f(() => {
4606
- for (let e = P.value.length - 1; e >= 0; e--) {
4607
- let t = P.value[e];
4683
+ let s = p(() => e.chatController?.textState.value), c = p(() => s.value?.isConnected ?? !1), u = p(() => s.value?.isThinking ?? !1), x = p(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), C = p(() => s.value?.connectionStatus !== "connected" && !s.value?.error), re = k(!1), j = p(() => e.chatController?.liveTurnBlocks?.value ?? []), se = p(() => {
4684
+ for (let e = j.value.length - 1; e >= 0; e--) {
4685
+ let t = j.value[e];
4608
4686
  if (t?.kind === "text") return t.id;
4609
4687
  }
4610
- }), de = f(() => e.chatController?.liveStreamMessageId?.value), B = f(() => {
4688
+ }), ce = p(() => e.chatController?.liveStreamMessageId?.value), R = p(() => {
4611
4689
  let t = e.chatController?.sharedMessages.value ?? [];
4612
- return P.value.length && de.value ? t.filter((e) => e.id !== de.value) : t;
4613
- }), he = f(() => {
4690
+ return j.value.length && ce.value ? t.filter((e) => e.id !== ce.value) : t;
4691
+ }), z = p(() => {
4614
4692
  if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
4615
- }), _e = f(() => e.chatController?.workJournal?.value), ve = f(() => {
4616
- if (!_e.value && !P.value.length) return;
4617
- let e = B.value, t = e[e.length - 1];
4693
+ }), ve = p(() => e.chatController?.workJournal?.value), B = p(() => {
4694
+ if (!ve.value && !j.value.length) return;
4695
+ let e = R.value, t = e[e.length - 1];
4618
4696
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4619
- }), ye = f(() => {
4697
+ }), ye = p(() => {
4620
4698
  let t = {};
4621
- for (let n of B.value) {
4699
+ for (let n of R.value) {
4622
4700
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4623
4701
  let r = e.chatController?.workJournalFor?.({
4624
4702
  activities: n.toolActivities,
@@ -4678,42 +4756,45 @@ var Cr = [
4678
4756
  text: t.slice(i)
4679
4757
  }), r;
4680
4758
  }
4681
- let H = f(() => s.value?.transientIssue), be = f(() => {
4682
- if (!x.value) return;
4683
- let e = B.value, t = e[e.length - 1];
4759
+ let H = p(() => s.value?.transientIssue), be = p(() => {
4760
+ if (!u.value) return;
4761
+ let e = R.value, t = e[e.length - 1];
4684
4762
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4685
- }), U = f(() => !x.value || he.value || _e.value || P.value.length ? !1 : be.value === void 0), Se = f(() => s.value?.sendBlockedReason), W = f(() => Se.value === "agent_deleted"), Ce = f(() => T.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : te.value ? "Connecting..." : Se.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = f(() => e.chatController?.composerState?.value ?? {
4763
+ }), U = p(() => !u.value || z.value || ve.value || j.value.length ? !1 : be.value === void 0), Se = p(() => s.value?.sendBlockedReason), W = p(() => Se.value === "agent_deleted"), Ce = p(() => x.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : C.value ? "Connecting..." : Se.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
4686
4764
  text: "",
4687
4765
  pendingAttachments: [],
4688
4766
  isUploading: !1
4689
- }), Te = f({
4767
+ }), Te = p({
4690
4768
  get: () => we.value.text,
4691
4769
  set: (t) => e.chatController?.setComposerText?.({ text: t })
4692
- }), Ee = f(() => we.value.pendingAttachments), De = f(() => we.value.isUploading), Oe = f(() => e.chatController?.voiceRecorder), ke = f(() => Oe.value?.isBusy.value ?? !1), Ae = f(() => e.chatController?.canAttachFile?.value ?? !1), je = f(() => e.chatController?.canRecordAudio?.value ?? !1), Me = f(() => e.chatController?.composerAction?.value ?? "idle"), Ne = f(() => Me.value !== "idle"), Fe = f(() => Me.value === "stop" ? "Stop reply" : "Send message"), Ie = f(() => je.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Le = f(() => Oe.value?.isActive.value ?? !1), Re = f(() => Oe.value?.elapsedLabel.value ?? "0:00"), Be = f(() => Oe.value?.statusText.value ?? "Release to send"), Ve = f(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Le.value ? "Release to send voice message" : "Hold to record voice message"), G = f(() => e.variant === "light"), He = f(() => G.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Ue = f(() => G.value ? "text-theme-300" : "text-white/30");
4693
- ne(async () => {
4770
+ }), Ee = p(() => we.value.pendingAttachments), De = p(() => we.value.isUploading), Oe = p(() => e.chatController?.voiceRecorder), ke = p(() => Oe.value?.isBusy.value ?? !1), G = p(() => e.chatController?.canAttachFile?.value ?? !1), Ae = p(() => e.chatController?.canRecordAudio?.value ?? !1), je = p(() => e.chatController?.composerAction?.value ?? "idle"), Me = p(() => je.value !== "idle"), Ne = p(() => je.value === "stop" ? "Stop reply" : "Send message"), Fe = p(() => Ae.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Ie = p(() => Oe.value?.isActive.value ?? !1), Le = p(() => Oe.value?.elapsedLabel.value ?? "0:00"), Re = p(() => Oe.value?.statusText.value ?? "Release to send"), Be = p(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Ie.value ? "Release to send voice message" : "Hold to record voice message"), K = p(() => e.variant === "light"), Ve = 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"), He = p(() => K.value ? "text-theme-300" : "text-white/30");
4771
+ ie(async () => {
4694
4772
  e.chatController && !c.value && await e.chatController.startTextConversation();
4695
- }), re(() => {
4773
+ }), ae(() => {
4696
4774
  e.chatController?.voiceRecorder?.teardown();
4697
4775
  });
4698
4776
  async function sendMessage() {
4699
- !e.chatController || Me.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4777
+ !e.chatController || je.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4778
+ }
4779
+ async function handleCardAction(t) {
4780
+ !e.chatController || W.value || (i.value?.pin(), await e.chatController.sendChatMessage(t));
4700
4781
  }
4701
4782
  async function sendSuggestedPrompt(t) {
4702
4783
  !e.chatController || W.value || (i.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4703
4784
  }
4704
4785
  async function handleComposerAction() {
4705
- e.chatController && (Me.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4786
+ e.chatController && (je.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4706
4787
  }
4707
4788
  async function handleKeydown(e) {
4708
4789
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
4709
4790
  }
4710
4791
  function focusComposer(e) {
4711
- Le.value || W.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4792
+ Ie.value || W.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4712
4793
  }
4713
4794
  function adjustTextareaHeight() {
4714
4795
  a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
4715
4796
  }
4716
- se(Te, () => S(() => adjustTextareaHeight()));
4797
+ de(Te, () => ne(() => adjustTextareaHeight()));
4717
4798
  function triggerFileInput() {
4718
4799
  o.value?.click();
4719
4800
  }
@@ -4757,59 +4838,59 @@ var Cr = [
4757
4838
  ...o ? {} : { year: "numeric" }
4758
4839
  })}, ${a}`;
4759
4840
  }
4760
- return (t, s) => (k(), h("div", { class: C(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
4761
- e.showHeader && !G.value ? (k(), h("div", ri, [b(Pe, {
4841
+ return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
4842
+ e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
4762
4843
  agent: e.agent,
4763
4844
  "is-online": c.value
4764
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (k(), h("div", ii, [_("div", { class: C(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
4845
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (T(), _("div", ui, [v("div", { class: S(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
4765
4846
  b(ze, {
4766
4847
  agent: e.agent,
4767
- "is-light": G.value,
4848
+ "is-light": K.value,
4768
4849
  class: "size-10"
4769
4850
  }, null, 8, ["agent", "is-light"]),
4770
- _("div", ai, [_("div", oi, F(e.agent.displayName.value), 1), _("div", si, F(e.agent.title.value || "Assistant"), 1)]),
4771
- e.headerMeta ? (k(), h("span", ci, F(e.headerMeta), 1)) : m("", !0)
4772
- ], 2)])) : m("", !0),
4773
- te.value ? (k(), h("div", {
4851
+ v("div", di, [v("div", fi, P(e.agent.displayName.value), 1), v("div", pi, P(e.agent.title.value || "Assistant"), 1)]),
4852
+ e.headerMeta ? (T(), _("span", mi, P(e.headerMeta), 1)) : h("", !0)
4853
+ ], 2)])) : h("", !0),
4854
+ C.value ? (T(), _("div", {
4774
4855
  key: 2,
4775
- class: C(["py-16 flex flex-col items-center justify-center gap-2 text-sm", G.value ? "text-theme-400" : "text-theme-600"])
4776
- }, [b(pe, { class: "size-4" })], 2)) : e.setupHint ? (k(), h("div", {
4856
+ class: S(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
4857
+ }, [b(_e, { class: "size-4" })], 2)) : e.setupHint ? (T(), _("div", {
4777
4858
  key: 3,
4778
- class: C(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Ue.value])
4779
- }, [s[20] || (s[20] = _("i", { class: "i-tabler-tool size-3" }, null, -1)), _("span", null, F(e.setupHint), 1)], 2)) : m("", !0),
4780
- b(ni, {
4859
+ class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", He.value])
4860
+ }, [s[20] || (s[20] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, P(e.setupHint), 1)], 2)) : h("", !0),
4861
+ b(ci, {
4781
4862
  ref_key: "chatScroller",
4782
4863
  ref: i,
4783
- class: C(B.value.length === 0 ? "flex-none" : "flex-1")
4864
+ class: S(R.value.length === 0 ? "flex-none" : "flex-1")
4784
4865
  }, {
4785
- default: ce(() => [_("div", { class: C([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-[120px] px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4786
- B.value.length === 0 && !te.value ? (k(), h("div", li, [ie(t.$slots, "empty-heading", {
4866
+ default: F(() => [v("div", { class: S([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-[120px] px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4867
+ R.value.length === 0 && !C.value ? (T(), _("div", hi, [oe(t.$slots, "empty-heading", {
4787
4868
  agent: e.agent,
4788
- isLight: G.value
4869
+ isLight: K.value
4789
4870
  }, () => [b(ze, {
4790
4871
  agent: e.agent,
4791
- "is-light": G.value,
4872
+ "is-light": K.value,
4792
4873
  class: "mb-4 size-20 @sm/chat:size-24"
4793
- }, null, 8, ["agent", "is-light"]), _("div", { class: C(["text-base @sm/chat:text-lg font-semibold", G.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? m("", !0) : (k(), h(u, { key: 0 }, [_("p", { class: C(["mt-1 text-center text-xs @sm/chat:text-sm", Ue.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), _("div", {
4794
- class: C(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", G.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4874
+ }, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, P(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", He.value]) }, P(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
4875
+ class: S(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4795
4876
  title: n.value.tooltip
4796
- }, [_("i", { class: C([n.value.icon, "size-3"]) }, null, 2), _("span", null, F(n.value.label), 1)], 10, ui)], 64))])) : m("", !0),
4797
- (k(!0), h(u, null, j(B.value, (e, t) => (k(), h(u, { key: e.id }, [
4798
- shouldShowTimeDivider(B.value, t) ? (k(), h("div", di, [
4799
- _("div", { class: C(["flex-1 h-px", He.value]) }, null, 2),
4800
- _("span", { class: C(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Ue.value]) }, F(shouldShowTimeDivider(B.value, t)), 3),
4801
- _("div", { class: C(["flex-1 h-px", He.value]) }, null, 2)
4802
- ])) : m("", !0),
4803
- messageWorkJournal(e) ? (k(), h("div", {
4877
+ }, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, P(n.value.label), 1)], 10, gi)], 64))])) : h("", !0),
4878
+ (T(!0), _(f, null, A(R.value, (e, t) => (T(), _(f, { key: e.id }, [
4879
+ shouldShowTimeDivider(R.value, t) ? (T(), _("div", _i, [
4880
+ v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2),
4881
+ v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", He.value]) }, P(shouldShowTimeDivider(R.value, t)), 3),
4882
+ v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2)
4883
+ ])) : h("", !0),
4884
+ messageWorkJournal(e) ? (T(), _("div", {
4804
4885
  key: 1,
4805
4886
  "data-test": "messaging-message-tool-activity",
4806
4887
  "data-journal-outcome": messageWorkJournal(e)?.outcome,
4807
4888
  class: "mb-4 w-full"
4808
4889
  }, [b(qe, {
4809
4890
  model: messageWorkJournal(e),
4810
- "is-light": G.value
4811
- }, null, 8, ["model", "is-light"])], 8, fi)) : m("", !0),
4812
- isSystemExplainerMessage(e) ? (k(), h("div", {
4891
+ "is-light": K.value
4892
+ }, null, 8, ["model", "is-light"])], 8, vi)) : h("", !0),
4893
+ isSystemExplainerMessage(e) ? (T(), _("div", {
4813
4894
  key: 2,
4814
4895
  "data-test": "messaging-system-msg",
4815
4896
  "data-message-id": e.id,
@@ -4823,27 +4904,28 @@ var Cr = [
4823
4904
  "data-issue-action-url": e.issue?.actionUrl,
4824
4905
  "data-streaming": e.id === be.value ? "true" : void 0,
4825
4906
  class: "flex gap-2 items-end justify-start mb-4"
4826
- }, [_("div", mi, [_("div", { class: C(["mb-1 pl-1 text-[11px] font-medium", G.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), _("div", { class: C(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", G.value ? "bg-theme-25 border-theme-200 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (k(), p($r, {
4907
+ }, [v("div", bi, [v("div", { class: S(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: S(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", K.value ? "bg-theme-25 border-theme-200 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (T(), m(ai, {
4827
4908
  key: 0,
4828
4909
  text: e.text,
4829
- inverted: !G.value,
4910
+ inverted: !K.value,
4830
4911
  streaming: e.id === be.value,
4831
- onClick: s[0] || (s[0] = z(() => {}, ["stop"]))
4912
+ onClick: s[0] || (s[0] = I(() => {}, ["stop"])),
4913
+ onAction: handleCardAction
4832
4914
  }, null, 8, [
4833
4915
  "text",
4834
4916
  "inverted",
4835
4917
  "streaming"
4836
- ])) : e.issue?.help ? (k(), p($r, {
4918
+ ])) : e.issue?.help ? (T(), m(ai, {
4837
4919
  key: 1,
4838
4920
  text: e.issue.help,
4839
- inverted: !G.value
4840
- }, null, 8, ["text", "inverted"])) : m("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (k(), h("a", {
4921
+ inverted: !K.value
4922
+ }, null, 8, ["text", "inverted"])) : h("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (T(), _("a", {
4841
4923
  key: 2,
4842
4924
  href: e.issue.actionUrl,
4843
4925
  "data-test": "messaging-system-msg-action",
4844
- class: C(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", G.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4845
- onClick: s[1] || (s[1] = z(() => {}, ["stop"]))
4846
- }, [v(F(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = _("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, hi)) : m("", !0)], 2)])], 8, pi)) : e.sender === "system" ? (k(), h("div", {
4926
+ class: S(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4927
+ onClick: s[1] || (s[1] = I(() => {}, ["stop"]))
4928
+ }, [te(P(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, xi)) : h("", !0)], 2)])], 8, yi)) : e.sender === "system" ? (T(), _("div", {
4847
4929
  key: 3,
4848
4930
  "data-test": "messaging-system-status-msg",
4849
4931
  "data-message-id": e.id,
@@ -4854,12 +4936,12 @@ var Cr = [
4854
4936
  "data-issue-code": e.issue?.code,
4855
4937
  "data-issue-bucket": e.issue?.bucket,
4856
4938
  "data-streaming": e.id === be.value ? "true" : void 0,
4857
- class: C(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", G.value ? "text-theme-500" : "text-white/60"])
4858
- }, [s[22] || (s[22] = _("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b($r, {
4939
+ class: S(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"])
4940
+ }, [s[22] || (s[22] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ai, {
4859
4941
  text: e.text,
4860
- inverted: !G.value,
4861
- onClick: s[2] || (s[2] = z(() => {}, ["stop"]))
4862
- }, null, 8, ["text", "inverted"])], 10, gi)) : (k(), h("div", {
4942
+ inverted: !K.value,
4943
+ onClick: s[2] || (s[2] = I(() => {}, ["stop"]))
4944
+ }, null, 8, ["text", "inverted"])], 10, Si)) : (T(), _("div", {
4863
4945
  key: 4,
4864
4946
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
4865
4947
  "data-message-id": e.id,
@@ -4868,160 +4950,162 @@ var Cr = [
4868
4950
  "data-message-sequence": e.sequence,
4869
4951
  "data-system-kind": e.systemKind,
4870
4952
  "data-streaming": e.id === be.value ? "true" : void 0,
4871
- class: C(["flex gap-2 items-end", {
4953
+ class: S(["flex gap-2 items-end", {
4872
4954
  "justify-end": e.sender === "user",
4873
4955
  "justify-start": e.sender === "agent",
4874
- "mb-6": isGroupEnd(B.value, t)
4956
+ "mb-6": isGroupEnd(R.value, t)
4875
4957
  }])
4876
- }, [_("div", {
4958
+ }, [v("div", {
4877
4959
  "data-test": "messaging-message-body",
4878
- class: C(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0 @sm/chat:pr-[1em] @lg/chat:pr-[2em]")
4879
- }, [blockAttachmentsForMessage(e).length ? (k(), h("div", {
4960
+ class: S(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0 @sm/chat:pr-[1em] @lg/chat:pr-[2em]")
4961
+ }, [blockAttachmentsForMessage(e).length ? (T(), _("div", {
4880
4962
  key: 0,
4881
- class: C(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
4882
- }, [(k(!0), h(u, null, j(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (k(), h(u, { key: attachmentKey(e, t) }, [e.type === "image" ? (k(), h("img", {
4963
+ class: S(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
4964
+ }, [(T(!0), _(f, null, A(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (T(), _(f, { key: attachmentKey(e, t) }, [e.type === "image" ? (T(), _("img", {
4883
4965
  key: 0,
4884
4966
  src: e.src,
4885
4967
  alt: e.filename,
4886
4968
  "data-test": "messaging-attachment",
4887
4969
  "data-attachment-placement": "block",
4888
4970
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4889
- }, null, 8, vi)) : e.type === "audio" ? (k(), h("audio", {
4971
+ }, null, 8, wi)) : e.type === "audio" ? (T(), _("audio", {
4890
4972
  key: 1,
4891
4973
  src: e.src,
4892
4974
  controls: "",
4893
4975
  "data-test": "messaging-attachment",
4894
4976
  "data-attachment-placement": "block",
4895
4977
  class: "max-w-full"
4896
- }, null, 8, yi)) : (k(), h("a", {
4978
+ }, null, 8, Ti)) : (T(), _("a", {
4897
4979
  key: 2,
4898
4980
  href: e.src,
4899
4981
  target: "_blank",
4900
4982
  rel: "noopener",
4901
4983
  "data-test": "messaging-attachment",
4902
4984
  "data-attachment-placement": "block",
4903
- class: C(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4904
- }, [s[23] || (s[23] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(e.filename), 1)], 10, bi))], 64))), 128))], 2)) : m("", !0), messageRenderParts(e).length ? (k(), h("div", {
4985
+ class: S(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4986
+ }, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(e.filename), 1)], 10, Ei))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
4905
4987
  key: 1,
4906
4988
  "data-test": "messaging-message-content",
4907
- class: C(e.sender === "user" ? G.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : G.value ? "text-theme-800" : "text-white/95")
4908
- }, [(k(!0), h(u, null, j(messageRenderParts(e), (t) => (k(), h(u, { key: t.key }, [t.kind === "text" && t.text ? (k(), h("div", xi, [b($r, {
4989
+ class: S(e.sender === "user" ? K.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : K.value ? "text-theme-800" : "text-white/95")
4990
+ }, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Di, [b(ai, {
4909
4991
  text: t.text,
4910
- inverted: e.sender === "user" || !G.value,
4992
+ inverted: e.sender === "user" || !K.value,
4911
4993
  streaming: e.id === be.value,
4912
- onClick: s[3] || (s[3] = z(() => {}, ["stop"]))
4994
+ onClick: s[3] || (s[3] = I(() => {}, ["stop"])),
4995
+ onAction: handleCardAction
4913
4996
  }, null, 8, [
4914
4997
  "text",
4915
4998
  "inverted",
4916
4999
  "streaming"
4917
- ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (k(), h("img", {
5000
+ ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (T(), _("img", {
4918
5001
  key: 1,
4919
5002
  src: t.attachment.src,
4920
5003
  alt: t.attachment.filename,
4921
5004
  "data-test": "messaging-attachment",
4922
5005
  "data-attachment-placement": t.placement,
4923
5006
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4924
- }, null, 8, Si)) : t.kind === "attachment" && t.attachment.type === "audio" ? (k(), h("audio", {
5007
+ }, null, 8, Oi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
4925
5008
  key: 2,
4926
5009
  src: t.attachment.src,
4927
5010
  controls: "",
4928
5011
  "data-test": "messaging-attachment",
4929
5012
  "data-attachment-placement": t.placement,
4930
5013
  class: "my-2 max-w-full"
4931
- }, null, 8, Ci)) : t.kind === "attachment" ? (k(), h("a", {
5014
+ }, null, 8, ki)) : t.kind === "attachment" ? (T(), _("a", {
4932
5015
  key: 3,
4933
5016
  href: t.attachment.src,
4934
5017
  target: "_blank",
4935
5018
  rel: "noopener",
4936
5019
  "data-test": "messaging-attachment",
4937
5020
  "data-attachment-placement": t.placement,
4938
- class: C(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4939
- }, [s[24] || (s[24] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(t.attachment.filename), 1)], 10, wi)) : m("", !0)], 64))), 128))], 2)) : m("", !0)], 2)], 10, _i)),
4940
- e.id === ve.value ? (k(), h(u, { key: 5 }, [P.value.length ? (k(!0), h(u, { key: 0 }, j(P.value, (e) => (k(), h(u, { key: e.id }, [e.kind === "work" ? (k(), h("div", {
5021
+ class: S(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5022
+ }, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(t.attachment.filename), 1)], 10, Ai)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Ci)),
5023
+ e.id === B.value ? (T(), _(f, { key: 5 }, [j.value.length ? (T(!0), _(f, { key: 0 }, A(j.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
4941
5024
  key: 0,
4942
5025
  "data-test": "messaging-tool-activity",
4943
5026
  "data-journal-outcome": e.journal.outcome,
4944
5027
  class: "mb-4 w-full"
4945
5028
  }, [b(qe, {
4946
5029
  model: e.journal,
4947
- "is-light": G.value
4948
- }, null, 8, ["model", "is-light"])], 8, Ti)) : e.kind === "text" && e.content ? (k(), h("div", {
5030
+ "is-light": K.value
5031
+ }, null, 8, ["model", "is-light"])], 8, ji)) : e.kind === "text" && e.content ? (T(), _("div", {
4949
5032
  key: 1,
4950
5033
  "data-test": "messaging-live-text-block",
4951
- class: C(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", G.value ? "text-theme-800" : "text-white/95"])
4952
- }, [b($r, {
5034
+ class: S(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
5035
+ }, [b(ai, {
4953
5036
  text: e.content,
4954
- inverted: !G.value,
4955
- streaming: e.id === oe.value,
4956
- onClick: s[4] || (s[4] = z(() => {}, ["stop"]))
5037
+ inverted: !K.value,
5038
+ streaming: e.id === se.value,
5039
+ onClick: s[4] || (s[4] = I(() => {}, ["stop"])),
5040
+ onAction: handleCardAction
4957
5041
  }, null, 8, [
4958
5042
  "text",
4959
5043
  "inverted",
4960
5044
  "streaming"
4961
- ])], 2)) : (k(), h("div", Ei, [b(pe, { class: C(["size-3.5", G.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : _e.value ? (k(), h("div", {
5045
+ ])], 2)) : (T(), _("div", Mi, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : ve.value ? (T(), _("div", {
4962
5046
  key: 1,
4963
5047
  "data-test": "messaging-tool-activity",
4964
- "data-journal-outcome": _e.value.outcome,
5048
+ "data-journal-outcome": ve.value.outcome,
4965
5049
  class: "mb-4 w-full"
4966
5050
  }, [b(qe, {
4967
- model: _e.value,
4968
- "is-light": G.value
4969
- }, null, 8, ["model", "is-light"])], 8, Di)) : m("", !0)], 64)) : m("", !0)
5051
+ model: ve.value,
5052
+ "is-light": K.value
5053
+ }, null, 8, ["model", "is-light"])], 8, Ni)) : h("", !0)], 64)) : h("", !0)
4970
5054
  ], 64))), 128)),
4971
- he.value ? (k(), h("div", {
5055
+ z.value ? (T(), _("div", {
4972
5056
  key: 1,
4973
5057
  "data-test": "messaging-working-state",
4974
- "data-working-description": he.value,
4975
- class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", G.value ? "text-theme-500" : "text-white/45"])
4976
- }, [s[25] || (s[25] = _("i", {
5058
+ "data-working-description": z.value,
5059
+ class: S(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", K.value ? "text-theme-500" : "text-white/45"])
5060
+ }, [s[25] || (s[25] = v("i", {
4977
5061
  class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
4978
5062
  "aria-hidden": "true"
4979
- }, null, -1)), _("span", ki, F(he.value), 1)], 10, Oi)) : m("", !0),
4980
- H.value ? (k(), h("div", {
5063
+ }, null, -1)), v("span", Fi, P(z.value), 1)], 10, Pi)) : h("", !0),
5064
+ H.value ? (T(), _("div", {
4981
5065
  key: 2,
4982
5066
  "data-test": "messaging-transient-issue",
4983
5067
  "data-issue-code": H.value.code,
4984
- class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", G.value ? "text-theme-600" : "text-white/60"])
5068
+ class: S(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", K.value ? "text-theme-600" : "text-white/60"])
4985
5069
  }, [
4986
- s[26] || (s[26] = _("i", {
5070
+ s[26] || (s[26] = v("i", {
4987
5071
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
4988
5072
  "aria-hidden": "true"
4989
5073
  }, null, -1)),
4990
- _("span", null, [v(F(H.value.message), 1), H.value.help ? (k(), h(u, { key: 0 }, [v(F(H.value.help), 1)], 64)) : m("", !0)]),
4991
- H.value.actionUrl && H.value.actionLabel ? (k(), h("a", {
5074
+ v("span", null, [te(P(H.value.message), 1), H.value.help ? (T(), _(f, { key: 0 }, [te(P(H.value.help), 1)], 64)) : h("", !0)]),
5075
+ H.value.actionUrl && H.value.actionLabel ? (T(), _("a", {
4992
5076
  key: 0,
4993
5077
  href: H.value.actionUrl,
4994
5078
  class: "shrink-0 underline underline-offset-2",
4995
- onClick: s[5] || (s[5] = z(() => {}, ["stop"]))
4996
- }, F(H.value.actionLabel), 9, ji)) : m("", !0)
4997
- ], 10, Ai)) : m("", !0),
4998
- U.value ? (k(), h("div", Mi, [_("i", {
4999
- class: C(["i-svg-spinners-3-dots-bounce size-7", G.value ? "text-theme-400" : "text-white/50"]),
5079
+ onClick: s[5] || (s[5] = I(() => {}, ["stop"]))
5080
+ }, P(H.value.actionLabel), 9, Li)) : h("", !0)
5081
+ ], 10, Ii)) : h("", !0),
5082
+ U.value ? (T(), _("div", Ri, [v("i", {
5083
+ class: S(["i-svg-spinners-3-dots-bounce size-7", K.value ? "text-theme-400" : "text-white/50"]),
5000
5084
  "aria-hidden": "true"
5001
- }, null, 2)])) : m("", !0)
5085
+ }, null, 2)])) : h("", !0)
5002
5086
  ], 2)]),
5003
5087
  _: 3
5004
5088
  }, 8, ["class"]),
5005
- _("div", { class: C(["left-0 right-0 z-30 px-5 pb-4 pt-3", [B.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", G.value ? "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"]]) }, [
5006
- Ee.value.length > 0 ? (k(), h("div", {
5089
+ v("div", { class: S(["left-0 right-0 z-30 px-5 pb-4 pt-3", [R.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", K.value ? "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"]]) }, [
5090
+ Ee.value.length > 0 ? (T(), _("div", {
5007
5091
  key: 0,
5008
- class: C(["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" : ""])
5009
- }, [(k(!0), h(u, null, j(Ee.value, (e, t) => (k(), h("div", {
5092
+ class: S(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5093
+ }, [(T(!0), _(f, null, A(Ee.value, (e, t) => (T(), _("div", {
5010
5094
  key: t,
5011
5095
  class: "relative shrink-0 group"
5012
- }, [e.type === "image" ? (k(), h("img", {
5096
+ }, [e.type === "image" ? (T(), _("img", {
5013
5097
  key: 0,
5014
5098
  src: e.src,
5015
5099
  alt: e.filename,
5016
- class: C(["size-14 rounded-xl object-cover border", G.value ? "border-black/10" : "border-white/20"])
5017
- }, null, 10, Ni)) : (k(), h("div", {
5100
+ class: S(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5101
+ }, null, 10, zi)) : (T(), _("div", {
5018
5102
  key: 1,
5019
- class: C(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", G.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5020
- }, [s[27] || (s[27] = _("i", { class: "i-tabler-file size-4" }, null, -1)), _("span", Pi, F(e.filename), 1)], 2)), _("button", {
5103
+ class: S(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5104
+ }, [s[27] || (s[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Bi, P(e.filename), 1)], 2)), v("button", {
5021
5105
  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",
5022
5106
  onClick: (e) => removeAttachment(t)
5023
- }, [...s[28] || (s[28] = [_("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Fi)]))), 128)), De.value ? (k(), h("div", Ii, [b(pe, { class: "size-5" })])) : m("", !0)], 2)) : m("", !0),
5024
- Ae.value ? (k(), h("input", {
5107
+ }, [...s[28] || (s[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Vi)]))), 128)), De.value ? (T(), _("div", Hi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5108
+ G.value ? (T(), _("input", {
5025
5109
  key: 1,
5026
5110
  ref_key: "fileInput",
5027
5111
  ref: o,
@@ -5029,21 +5113,21 @@ var Cr = [
5029
5113
  accept: "image/*,audio/*,video/*",
5030
5114
  class: "hidden",
5031
5115
  onChange: handleFileSelect
5032
- }, null, 544)) : m("", !0),
5033
- _("div", {
5116
+ }, null, 544)) : h("", !0),
5117
+ v("div", {
5034
5118
  "data-test": "messaging-composer",
5035
- "data-composer-action": Me.value,
5036
- class: C(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", G.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5119
+ "data-composer-action": je.value,
5120
+ class: S(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", K.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5037
5121
  onClick: focusComposer
5038
- }, [Le.value ? (k(), h("div", {
5122
+ }, [Ie.value ? (T(), _("div", {
5039
5123
  key: 1,
5040
5124
  "data-test": "messaging-recording-state",
5041
- class: C(["flex min-w-0 items-center gap-2 py-1", G.value ? "text-theme-700" : "text-white/80"])
5125
+ class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5042
5126
  }, [
5043
- s[29] || (s[29] = _("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5044
- _("span", zi, F(Re.value), 1),
5045
- _("span", { class: C(["min-w-0 truncate text-sm", G.value ? "text-theme-400" : "text-white/45"]) }, F(Be.value), 3)
5046
- ], 2)) : R((k(), h("textarea", {
5127
+ s[29] || (s[29] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5128
+ v("span", Gi, P(Le.value), 1),
5129
+ v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, P(Re.value), 3)
5130
+ ], 2)) : pe((T(), _("textarea", {
5047
5131
  key: 0,
5048
5132
  ref_key: "textarea",
5049
5133
  ref: a,
@@ -5057,77 +5141,77 @@ var Cr = [
5057
5141
  fontSize: "16px",
5058
5142
  resize: "none"
5059
5143
  },
5060
- class: C(["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", G.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5144
+ class: S(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5061
5145
  onKeydown: handleKeydown,
5062
5146
  onFocus: s[7] || (s[7] = (e) => r.value = !0),
5063
5147
  onBlur: s[8] || (s[8] = (e) => r.value = !1)
5064
- }, null, 42, Ri)), [[I, Te.value]]), _("div", Bi, [
5065
- _("button", {
5066
- class: C(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
5067
- Ae.value ? "cursor-pointer" : "cursor-default",
5068
- G.value ? "text-theme-500" : "text-white/50",
5148
+ }, null, 42, Wi)), [[ue, Te.value]]), v("div", Ki, [
5149
+ v("button", {
5150
+ class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
5151
+ G.value ? "cursor-pointer" : "cursor-default",
5152
+ K.value ? "text-theme-500" : "text-white/50",
5069
5153
  De.value || ke.value ? "opacity-50 pointer-events-none" : ""
5070
5154
  ]]),
5071
- disabled: W.value || De.value || ke.value || !Ae.value,
5072
- "aria-label": Ae.value ? "Attach file" : "File attachments unavailable",
5073
- title: Ae.value ? "Attach file" : "File attachments unavailable",
5074
- onClick: s[9] || (s[9] = (e) => Ae.value && triggerFileInput())
5075
- }, [De.value ? (k(), h("i", Hi)) : (k(), h("i", Ui)), _("span", Wi, F(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Vi),
5076
- s[30] || (s[30] = _("div", { class: "flex-1" }, null, -1)),
5077
- _("div", Gi, [Ie.value || Le.value ? (k(), h("button", {
5155
+ disabled: W.value || De.value || ke.value || !G.value,
5156
+ "aria-label": G.value ? "Attach file" : "File attachments unavailable",
5157
+ title: G.value ? "Attach file" : "File attachments unavailable",
5158
+ onClick: s[9] || (s[9] = (e) => G.value && triggerFileInput())
5159
+ }, [De.value ? (T(), _("i", Ji)) : (T(), _("i", Yi)), v("span", Xi, P(G.value ? "Attach file" : "File attachments unavailable"), 1)], 10, qi),
5160
+ s[30] || (s[30] = v("div", { class: "flex-1" }, null, -1)),
5161
+ v("div", Zi, [Fe.value || Ie.value ? (T(), _("button", {
5078
5162
  key: 0,
5079
5163
  "data-test": "messaging-record-audio-btn",
5080
- class: C(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Le.value ? G.value ? "text-theme-900 scale-110" : "text-white scale-110" : G.value ? "text-theme-500" : "text-white/60"]),
5081
- "aria-label": Ve.value,
5082
- title: Ve.value,
5083
- onPointerdown: s[10] || (s[10] = z((e) => startRecording(), ["prevent"])),
5084
- onPointerup: s[11] || (s[11] = z((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5085
- onPointercancel: s[12] || (s[12] = z((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5164
+ class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Ie.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5165
+ "aria-label": Be.value,
5166
+ title: Be.value,
5167
+ onPointerdown: s[10] || (s[10] = I((e) => startRecording(), ["prevent"])),
5168
+ onPointerup: s[11] || (s[11] = I((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5169
+ onPointercancel: s[12] || (s[12] = I((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5086
5170
  onKeydown: [
5087
- s[13] || (s[13] = ue(z((e) => startRecording(), ["prevent"]), ["enter"])),
5088
- s[15] || (s[15] = ue(z((e) => startRecording(), ["prevent"]), ["space"])),
5089
- s[17] || (s[17] = ue(z((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5171
+ s[13] || (s[13] = he(I((e) => startRecording(), ["prevent"]), ["enter"])),
5172
+ s[15] || (s[15] = he(I((e) => startRecording(), ["prevent"]), ["space"])),
5173
+ s[17] || (s[17] = he(I((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5090
5174
  ],
5091
- onKeyup: [s[14] || (s[14] = ue(z((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = ue(z((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5092
- }, [_("i", { class: C([Le.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), _("span", qi, F(Ve.value), 1)], 42, Ki)) : m("", !0), Le.value ? m("", !0) : (k(), h("button", {
5175
+ onKeyup: [s[14] || (s[14] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5176
+ }, [v("i", { class: S([Ie.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", $i, P(Be.value), 1)], 42, Qi)) : h("", !0), Ie.value ? h("", !0) : (T(), _("button", {
5093
5177
  key: 1,
5094
5178
  "data-test": "messaging-send-btn",
5095
- "data-composer-action": Me.value,
5096
- class: C(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Ne.value ? G.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" : G.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5097
- disabled: !Ne.value,
5098
- "aria-label": Fe.value,
5099
- title: Fe.value,
5179
+ "data-composer-action": je.value,
5180
+ class: S(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Me.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"]),
5181
+ disabled: !Me.value,
5182
+ "aria-label": Ne.value,
5183
+ title: Ne.value,
5100
5184
  onClick: s[18] || (s[18] = (e) => handleComposerAction())
5101
- }, [Me.value === "stop" ? (k(), h("i", Yi)) : (k(), h("i", Xi)), _("span", Zi, F(Fe.value), 1)], 10, Ji))])
5102
- ])], 10, Li),
5103
- B.value.length === 0 && e.suggestedPrompts.length > 0 ? (k(), h("div", Qi, [_("div", $i, [(k(!0), h(u, null, j(e.suggestedPrompts, (e, t) => (k(), h("button", {
5185
+ }, [je.value === "stop" ? (T(), _("i", ta)) : (T(), _("i", na)), v("span", ra, P(Ne.value), 1)], 10, ea))])
5186
+ ])], 10, Ui),
5187
+ R.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", ia, [v("div", aa, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
5104
5188
  key: e.id,
5105
5189
  type: "button",
5106
5190
  disabled: W.value,
5107
5191
  "data-test": "messaging-suggested-prompt",
5108
- class: C(["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]", [W.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !ae.value && t >= 3 ? "max-sm:hidden" : ""]]),
5192
+ class: S(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [W.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !re.value && t >= 3 ? "max-sm:hidden" : ""]]),
5109
5193
  onClick: (t) => sendSuggestedPrompt(e)
5110
- }, F(e.label), 11, ea))), 128)), e.suggestedPrompts.length > 3 ? (k(), h("button", {
5194
+ }, P(e.label), 11, oa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
5111
5195
  key: 0,
5112
5196
  type: "button",
5113
5197
  "data-test": "messaging-suggested-prompts-more",
5114
- "aria-expanded": ae.value,
5198
+ "aria-expanded": re.value,
5115
5199
  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",
5116
- onClick: s[19] || (s[19] = (e) => ae.value = !ae.value)
5117
- }, [v(F(ae.value ? "See less" : "See more") + " ", 1), _("i", { class: C(["i-tabler-chevron-down size-4 transition-transform", ae.value ? "rotate-180" : ""]) }, null, 2)], 8, ta)) : m("", !0)])])) : m("", !0)
5200
+ onClick: s[19] || (s[19] = (e) => re.value = !re.value)
5201
+ }, [te(P(re.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", re.value ? "rotate-180" : ""]) }, null, 2)], 8, sa)) : h("", !0)])])) : h("", !0)
5118
5202
  ], 2)
5119
5203
  ], 2));
5120
5204
  }
5121
- }), ra = { class: "agent-wrap" }, ia = {
5205
+ }), la = { class: "agent-wrap" }, ua = {
5122
5206
  key: 0,
5123
5207
  class: "flex items-center justify-center h-full"
5124
- }, aa = {
5208
+ }, da = {
5125
5209
  key: 2,
5126
5210
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5127
5211
  role: "status",
5128
5212
  "aria-live": "polite",
5129
5213
  "data-test": "agent-unavailable"
5130
- }, oa = /* @__PURE__ */ x({
5214
+ }, fa = /* @__PURE__ */ x({
5131
5215
  __name: "AgentWrap",
5132
5216
  props: {
5133
5217
  sdk: {},
@@ -5147,7 +5231,7 @@ var Cr = [
5147
5231
  let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5148
5232
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5149
5233
  ...i.apiBase && { apiBase: i.apiBase }
5150
- }), s = P(!i.agent), c = P(i.agent ? new n({ config: i.agent }) : void 0), u = P();
5234
+ }), s = se(!i.agent), c = se(i.agent ? new n({ config: i.agent }) : void 0), u = se();
5151
5235
  async function loadAgent() {
5152
5236
  if (i.agent) {
5153
5237
  r.debug("Agent provided via props, skipping fetch", {
@@ -5223,23 +5307,23 @@ var Cr = [
5223
5307
  });
5224
5308
  }
5225
5309
  }
5226
- return ne(loadAgent), (t, n) => (k(), h("div", ra, [s.value ? (k(), h("div", ia, [_("div", { class: C(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
5227
- sdk: oe(o),
5310
+ return ie(loadAgent), (t, n) => (T(), _("div", la, [s.value ? (T(), _("div", ua, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
5311
+ sdk: ce(o),
5228
5312
  agent: c.value,
5229
5313
  context: e.clientContext ?? e.context,
5230
5314
  firstMessage: e.firstMessage,
5231
5315
  buttonText: e.buttonText,
5232
5316
  buttonIcon: e.buttonIcon,
5233
5317
  loading: s.value
5234
- }, void 0, void 0, 1) : u.value ? (k(), h("div", aa, [n[0] || (n[0] = _("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), _("button", {
5318
+ }, void 0, void 0, 1) : u.value ? (T(), _("div", da, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5235
5319
  type: "button",
5236
5320
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5237
5321
  "data-test": "agent-unavailable-retry",
5238
5322
  onClick: loadAgent
5239
- }, " Try again ")])) : m("", !0)]));
5323
+ }, " Try again ")])) : h("", !0)]));
5240
5324
  }
5241
5325
  });
5242
5326
  //#endregion
5243
- export { Oe as a, getAgentAvatarUrl as c, AgentChatController as d, he as f, Pe as i, handleImageError as l, pe as m, na as n, Ee as o, n as p, $r as r, we as s, oa as t, parseButtonTemplate as u };
5327
+ export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, ca as n, De as o, n as p, ai as r, Te as s, fa as t, parseButtonTemplate as u };
5244
5328
 
5245
5329
  //# sourceMappingURL=AgentWrap.js.map