@pagelines/sdk 1.0.871 → 1.0.873
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/AgentProvider.js +235 -235
- package/dist/AgentProvider.js.map +1 -1
- package/dist/AgentWrap.js +505 -516
- package/dist/AgentWrap.js.map +1 -1
- package/dist/agent.js +6 -6
- package/dist/sdk.css +1 -1
- package/dist/ui/FSpinner.vue.d.ts +1 -22
- package/dist/widget.js +45 -45
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -2,35 +2,28 @@ import { t as e } from "./rolldown-runtime.js";
|
|
|
2
2
|
import { s as t, t as n } from "./sdkClient.js";
|
|
3
3
|
import { Agent as r, CHAT_ISSUE_COPY as i, CUSTOMER_AGENT_STATE_LABEL as a, SettingsObject as o, createLogger as s, customerAgentState as c, getDefaultAvatarUrl as u, isAssistantSilenceControl as f, parseChatCardFencePayload as p, parseChatVisualFencePayload as m } from "@pagelines/core";
|
|
4
4
|
import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as P, onMounted as ne, onUnmounted as re, openBlock as F, ref as I, renderList as R, renderSlot as ie, resolveDynamicComponent as B, shallowRef as H, toDisplayString as U, unref as ae, useTemplateRef as oe, vModelText as se, watch as ce, withCtx as ue, withDirectives as de, withKeys as pe, withModifiers as W } from "vue";
|
|
5
|
-
//#region
|
|
6
|
-
var he =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
fill: "none",
|
|
28
|
-
stroke: "currentColor",
|
|
29
|
-
"stroke-width": "5",
|
|
30
|
-
"stroke-miterlimit": "30"
|
|
31
|
-
}, null, 2)]))]));
|
|
32
|
-
}
|
|
33
|
-
}), K = [
|
|
5
|
+
//#region \0plugin-vue:export-helper
|
|
6
|
+
var he = /* @__PURE__ */ e((e, t) => {
|
|
7
|
+
let n = e.__vccOpts || e;
|
|
8
|
+
for (let [e, r] of t) n[e] = r;
|
|
9
|
+
return n;
|
|
10
|
+
}, "default"), G = {}, _e = { class: "spinner max-w-sm" };
|
|
11
|
+
function _sfc_render(e, t) {
|
|
12
|
+
return F(), x("div", _e, [...t[0] || (t[0] = [S("svg", {
|
|
13
|
+
class: "ring-circular h-full w-full origin-center",
|
|
14
|
+
viewBox: "25 25 50 50"
|
|
15
|
+
}, [S("circle", {
|
|
16
|
+
class: "ring-path",
|
|
17
|
+
cx: "50",
|
|
18
|
+
cy: "50",
|
|
19
|
+
r: "20",
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
"stroke-width": "5",
|
|
23
|
+
"stroke-miterlimit": "30"
|
|
24
|
+
})], -1)])]);
|
|
25
|
+
}
|
|
26
|
+
var K = /*#__PURE__*/ he(G, [["render", _sfc_render]]), ve = [
|
|
34
27
|
{
|
|
35
28
|
mode: "self",
|
|
36
29
|
label: "Overview",
|
|
@@ -68,7 +61,7 @@ function recorderMimeType() {
|
|
|
68
61
|
"audio/webm"
|
|
69
62
|
].find((e) => MediaRecorder.isTypeSupported?.(e)) || "";
|
|
70
63
|
}
|
|
71
|
-
var
|
|
64
|
+
var q = 400, VoiceRecorderController = class extends o {
|
|
72
65
|
constructor(e) {
|
|
73
66
|
super("VoiceRecorderController", e), t(this, "state", I({
|
|
74
67
|
phase: "idle",
|
|
@@ -102,7 +95,7 @@ var ve = 400, VoiceRecorderController = class extends o {
|
|
|
102
95
|
this.stream = t, this.recorder = r, this.chunks = [], r.addEventListener("dataavailable", (e) => {
|
|
103
96
|
e.data.size > 0 && this.chunks.push(e.data);
|
|
104
97
|
}), r.addEventListener("stop", async () => {
|
|
105
|
-
let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = this.now() - this.startedAt, i = !this.cancelOnStop && e.size > 0 && t >=
|
|
98
|
+
let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = this.now() - this.startedAt, i = !this.cancelOnStop && e.size > 0 && t >= q;
|
|
106
99
|
if (this.stopCapture(), !i) {
|
|
107
100
|
this.reset();
|
|
108
101
|
return;
|
|
@@ -185,7 +178,7 @@ var ve = 400, VoiceRecorderController = class extends o {
|
|
|
185
178
|
function durableJournalOutcome(e) {
|
|
186
179
|
return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
|
|
187
180
|
}
|
|
188
|
-
var
|
|
181
|
+
var ye = {
|
|
189
182
|
finishing: "Finishing up",
|
|
190
183
|
slowHint: "Taking longer than usual.",
|
|
191
184
|
completed: "Work complete",
|
|
@@ -193,7 +186,7 @@ var q = {
|
|
|
193
186
|
stopped: "Stopped",
|
|
194
187
|
notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
|
|
195
188
|
leaveHint: "Taking longer than usual. You can leave this chat while I work."
|
|
196
|
-
},
|
|
189
|
+
}, be = 1e4, Se = 15e3, Ce = 6e4, we = 3;
|
|
197
190
|
function toMs(e) {
|
|
198
191
|
if (!e) return;
|
|
199
192
|
let t = Date.parse(e);
|
|
@@ -209,7 +202,7 @@ function milestoneRows(e, t) {
|
|
|
209
202
|
let n = e.filter((e) => e.status === "completed" || e.status === "failed" && !!e.note).filter((e) => !t.has(e.activityId)).slice().sort(byEvent), r = [];
|
|
210
203
|
for (let e of n) {
|
|
211
204
|
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 <=
|
|
205
|
+
if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= Se) {
|
|
213
206
|
n.count += 1, n.lastMs = eventMs(e);
|
|
214
207
|
continue;
|
|
215
208
|
}
|
|
@@ -230,12 +223,12 @@ function milestoneRows(e, t) {
|
|
|
230
223
|
}));
|
|
231
224
|
}
|
|
232
225
|
function splitRows(e) {
|
|
233
|
-
return e.length <=
|
|
226
|
+
return e.length <= we ? {
|
|
234
227
|
visibleRows: e,
|
|
235
228
|
hiddenRows: []
|
|
236
229
|
} : {
|
|
237
|
-
visibleRows: e.slice(e.length -
|
|
238
|
-
hiddenRows: e.slice(0, e.length -
|
|
230
|
+
visibleRows: e.slice(e.length - we),
|
|
231
|
+
hiddenRows: e.slice(0, e.length - we)
|
|
239
232
|
};
|
|
240
233
|
}
|
|
241
234
|
function buildWorkJournalModel(e) {
|
|
@@ -247,7 +240,7 @@ function buildWorkJournalModel(e) {
|
|
|
247
240
|
terminal: {
|
|
248
241
|
id: "work-complete",
|
|
249
242
|
tone: "completed",
|
|
250
|
-
label:
|
|
243
|
+
label: ye.completed
|
|
251
244
|
}
|
|
252
245
|
};
|
|
253
246
|
if (n === "failed") {
|
|
@@ -261,7 +254,7 @@ function buildWorkJournalModel(e) {
|
|
|
261
254
|
terminal: {
|
|
262
255
|
id: "work-failed",
|
|
263
256
|
tone: "failed",
|
|
264
|
-
label:
|
|
257
|
+
label: ye.failed,
|
|
265
258
|
...o && e?.note ? { note: e.note } : {}
|
|
266
259
|
}
|
|
267
260
|
};
|
|
@@ -275,18 +268,18 @@ function buildWorkJournalModel(e) {
|
|
|
275
268
|
terminal: {
|
|
276
269
|
id: "work-stopped",
|
|
277
270
|
tone: "stopped",
|
|
278
|
-
label:
|
|
271
|
+
label: ye.stopped
|
|
279
272
|
}
|
|
280
273
|
};
|
|
281
274
|
}
|
|
282
275
|
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
276
|
let n = toMs(t.startedAt) ?? toMs(t.endedAt);
|
|
284
277
|
return n === void 0 ? e : Math.min(e, n);
|
|
285
|
-
}, Infinity), h = p +
|
|
278
|
+
}, Infinity), h = p + be, _ = (Number.isFinite(m) ? m : p) + Ce, v = r >= h, te = u || v ? {
|
|
286
279
|
id: u?.activityId ?? "work-active",
|
|
287
280
|
tone: "active",
|
|
288
|
-
label: u?.label ??
|
|
289
|
-
} : void 0, b = v ? r >= _ ? i ?
|
|
281
|
+
label: u?.label ?? ye.finishing
|
|
282
|
+
} : void 0, b = v ? r >= _ ? i ? ye.notifyHint : ye.leaveHint : ye.slowHint : void 0, x = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
|
|
290
283
|
return {
|
|
291
284
|
outcome: n,
|
|
292
285
|
visibleRows: s,
|
|
@@ -352,17 +345,17 @@ function buildLiveTurnBlocks(e) {
|
|
|
352
345
|
}
|
|
353
346
|
//#endregion
|
|
354
347
|
//#region agent/AgentController.ts
|
|
355
|
-
var
|
|
356
|
-
...
|
|
348
|
+
var Te = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Ee = /* @__PURE__ */ new Set([
|
|
349
|
+
...Te,
|
|
357
350
|
"EMPTY_STREAM",
|
|
358
351
|
"RATE_LIMIT"
|
|
359
|
-
]),
|
|
352
|
+
]), De = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Oe = {
|
|
360
353
|
CREDIT_LIMIT: "billing_budget_reached",
|
|
361
354
|
OVERAGE_CAP: "billing_runaway_cap"
|
|
362
355
|
};
|
|
363
356
|
function presentChatStreamError(e) {
|
|
364
|
-
if (!(e.bucket !== void 0 ||
|
|
365
|
-
let t = e.bucket ?? (
|
|
357
|
+
if (!(e.bucket !== void 0 || Ee.has(e.code))) return { surface: "hard" };
|
|
358
|
+
let t = e.bucket ?? (Te.has(e.code) ? "account" : "error"), n = {
|
|
366
359
|
...e.actionLabel ? { actionLabel: e.actionLabel } : {},
|
|
367
360
|
...e.actionUrl ? { actionUrl: e.actionUrl } : {},
|
|
368
361
|
...e.help ? { help: e.help } : {}
|
|
@@ -375,7 +368,7 @@ function presentChatStreamError(e) {
|
|
|
375
368
|
...n
|
|
376
369
|
},
|
|
377
370
|
sendBlockedReason: "account"
|
|
378
|
-
} :
|
|
371
|
+
} : De.has(e.code) ? {
|
|
379
372
|
surface: "transcript",
|
|
380
373
|
issue: {
|
|
381
374
|
code: e.code,
|
|
@@ -393,7 +386,7 @@ function presentChatStreamError(e) {
|
|
|
393
386
|
};
|
|
394
387
|
}
|
|
395
388
|
function transcriptMessageForChatStreamError(e) {
|
|
396
|
-
let t =
|
|
389
|
+
let t = Oe[e.code];
|
|
397
390
|
return t ? i[t].oneLine : e.error;
|
|
398
391
|
}
|
|
399
392
|
var AgentChatController = class extends o {
|
|
@@ -826,7 +819,7 @@ Current User:
|
|
|
826
819
|
let e = i[i.length - 1];
|
|
827
820
|
this.sharedMessages.value = e?.id === u ? [...i.slice(0, -1), r] : [...i, r];
|
|
828
821
|
}
|
|
829
|
-
r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code &&
|
|
822
|
+
r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && De.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
|
|
830
823
|
}, onDone = (e) => {
|
|
831
824
|
if (!isCurrentTurn()) return;
|
|
832
825
|
if (!p && !m) {
|
|
@@ -989,10 +982,10 @@ function parseButtonTemplate(e) {
|
|
|
989
982
|
}
|
|
990
983
|
//#endregion
|
|
991
984
|
//#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
|
|
992
|
-
var
|
|
985
|
+
var ke = {
|
|
993
986
|
key: 0,
|
|
994
987
|
class: "absolute inset-0 flex items-center justify-center"
|
|
995
|
-
},
|
|
988
|
+
}, Ae = /* @__PURE__ */ k({
|
|
996
989
|
__name: "ElAgentButton",
|
|
997
990
|
props: {
|
|
998
991
|
theme: { default: "primary" },
|
|
@@ -1020,7 +1013,7 @@ var Oe = {
|
|
|
1020
1013
|
md: "size-4",
|
|
1021
1014
|
lg: "size-5"
|
|
1022
1015
|
})[e.size]);
|
|
1023
|
-
return (i, a) => (F(), x("button", { class: j(["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 ? (F(), x("div",
|
|
1016
|
+
return (i, a) => (F(), x("button", { class: j(["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 ? (F(), x("div", ke, [...a[0] || (a[0] = [S("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : b("", !0), S("span", { class: j(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
|
|
1024
1017
|
e.icon ? (F(), x("i", {
|
|
1025
1018
|
key: 0,
|
|
1026
1019
|
class: j([e.icon, r.value])
|
|
@@ -1032,7 +1025,7 @@ var Oe = {
|
|
|
1032
1025
|
}, null, 2)) : b("", !0)
|
|
1033
1026
|
], 2)], 2));
|
|
1034
1027
|
}
|
|
1035
|
-
}),
|
|
1028
|
+
}), je = ["value"], Me = /* @__PURE__ */ k({
|
|
1036
1029
|
__name: "AgentInputEmail",
|
|
1037
1030
|
props: { modelValue: { default: "" } },
|
|
1038
1031
|
emits: ["update:modelValue"],
|
|
@@ -1051,9 +1044,9 @@ var Oe = {
|
|
|
1051
1044
|
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",
|
|
1052
1045
|
style: { "font-size": "16px" },
|
|
1053
1046
|
onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
|
|
1054
|
-
}, null, 40,
|
|
1047
|
+
}, null, 40, je));
|
|
1055
1048
|
}
|
|
1056
|
-
}),
|
|
1049
|
+
}), Ne = ["placeholder", "value"], Pe = /* @__PURE__ */ k({
|
|
1057
1050
|
__name: "AgentInputOneTimeCode",
|
|
1058
1051
|
props: {
|
|
1059
1052
|
modelValue: {},
|
|
@@ -1086,12 +1079,12 @@ var Oe = {
|
|
|
1086
1079
|
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",
|
|
1087
1080
|
style: { "font-size": "16px" },
|
|
1088
1081
|
onInput
|
|
1089
|
-
}, null, 40,
|
|
1082
|
+
}, null, 40, Ne));
|
|
1090
1083
|
}
|
|
1091
|
-
}),
|
|
1084
|
+
}), Fe = { class: "relative flex-shrink-0" }, Ie = ["src", "alt"], Le = { class: "absolute top-1 right-1" }, Re = {
|
|
1092
1085
|
key: 1,
|
|
1093
1086
|
class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
|
|
1094
|
-
},
|
|
1087
|
+
}, ze = { class: "min-w-0" }, Be = /* @__PURE__ */ k({
|
|
1095
1088
|
__name: "ElModeHeader",
|
|
1096
1089
|
props: {
|
|
1097
1090
|
agent: {},
|
|
@@ -1103,17 +1096,17 @@ var Oe = {
|
|
|
1103
1096
|
layout: { default: "centered" }
|
|
1104
1097
|
},
|
|
1105
1098
|
setup(e) {
|
|
1106
|
-
return (t, n) => (F(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div",
|
|
1099
|
+
return (t, n) => (F(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div", Fe, [S("div", { class: j(["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"]) }, [S("img", {
|
|
1107
1100
|
src: e.agent.avatarUrl.value,
|
|
1108
1101
|
alt: e.agent.displayName.value,
|
|
1109
1102
|
class: "w-full h-full object-cover",
|
|
1110
1103
|
onError: n[0] || (n[0] = (...e) => ae(handleImageError) && ae(handleImageError)(...e))
|
|
1111
|
-
}, null, 40,
|
|
1104
|
+
}, null, 40, Ie)], 2), S("div", Le, [e.isOnline ? (F(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
|
|
1112
1105
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
1113
1106
|
style: { "animation-duration": "3s" }
|
|
1114
|
-
}, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (F(), x("div",
|
|
1107
|
+
}, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (F(), x("div", Re))])]), S("div", ze, [S("h1", { class: j(["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" : ""]]) }, U(e.agent.displayName.value), 3), S("p", { class: j(["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"]]) }, U(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
|
|
1115
1108
|
}
|
|
1116
|
-
}),
|
|
1109
|
+
}), Ve = { class: "relative shrink-0 rounded-full" }, He = ["src", "alt"], Ue = ["src", "alt"], We = ["aria-label"], Ge = /* @__PURE__ */ k({
|
|
1117
1110
|
__name: "AgentAvatar",
|
|
1118
1111
|
props: {
|
|
1119
1112
|
agent: {},
|
|
@@ -1145,25 +1138,25 @@ var Oe = {
|
|
|
1145
1138
|
top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
|
|
1146
1139
|
right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
|
|
1147
1140
|
}, i = v(() => e.isLight ? "ring-white" : "ring-theme-900");
|
|
1148
|
-
return (t, a) => (F(), x("div",
|
|
1141
|
+
return (t, a) => (F(), x("div", Ve, [
|
|
1149
1142
|
S("img", {
|
|
1150
1143
|
src: e.agent.avatarUrl.value,
|
|
1151
1144
|
alt: e.agent.displayName.value,
|
|
1152
1145
|
class: j(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
|
|
1153
|
-
}, null, 10,
|
|
1146
|
+
}, null, 10, He),
|
|
1154
1147
|
e.showOwnerMark && e.agent.ownerMarkUrl.value ? (F(), x("img", {
|
|
1155
1148
|
key: 0,
|
|
1156
1149
|
src: e.agent.ownerMarkUrl.value,
|
|
1157
1150
|
alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
|
|
1158
1151
|
class: j(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
|
|
1159
|
-
}, null, 10,
|
|
1152
|
+
}, null, 10, Ue)) : b("", !0),
|
|
1160
1153
|
n.value ? (F(), x("span", {
|
|
1161
1154
|
key: 1,
|
|
1162
1155
|
role: "status",
|
|
1163
1156
|
"aria-label": e.agent.state.value.tooltip,
|
|
1164
1157
|
class: j(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
|
|
1165
1158
|
style: r
|
|
1166
|
-
}, null, 10,
|
|
1159
|
+
}, null, 10, We)) : b("", !0),
|
|
1167
1160
|
n.value && e.agent.state.value.lifecycle === "running" ? (F(), x("span", {
|
|
1168
1161
|
key: 2,
|
|
1169
1162
|
"aria-hidden": "true",
|
|
@@ -1172,21 +1165,21 @@ var Oe = {
|
|
|
1172
1165
|
}, null, 2)) : b("", !0)
|
|
1173
1166
|
]));
|
|
1174
1167
|
}
|
|
1175
|
-
}),
|
|
1168
|
+
}), Ke = {
|
|
1176
1169
|
key: 0,
|
|
1177
1170
|
class: "sr-only",
|
|
1178
1171
|
role: "status",
|
|
1179
1172
|
"aria-live": "polite"
|
|
1180
|
-
},
|
|
1173
|
+
}, qe = ["aria-expanded", "disabled"], Je = ["aria-expanded"], Ye = {
|
|
1181
1174
|
class: "flex w-5 shrink-0 justify-center self-stretch",
|
|
1182
1175
|
"aria-hidden": "true"
|
|
1183
|
-
},
|
|
1176
|
+
}, Xe = ["data-journal-row"], Ze = {
|
|
1184
1177
|
class: "flex w-5 shrink-0 flex-col items-center self-stretch",
|
|
1185
1178
|
"aria-hidden": "true"
|
|
1186
|
-
},
|
|
1179
|
+
}, Qe = { class: "flex h-[17px] shrink-0 items-center" }, $e = {
|
|
1187
1180
|
key: 0,
|
|
1188
1181
|
class: "sr-only"
|
|
1189
|
-
},
|
|
1182
|
+
}, et = /* @__PURE__ */ k({
|
|
1190
1183
|
__name: "AgentToolActivityGroup",
|
|
1191
1184
|
props: {
|
|
1192
1185
|
model: {},
|
|
@@ -1266,7 +1259,7 @@ var Oe = {
|
|
|
1266
1259
|
};
|
|
1267
1260
|
});
|
|
1268
1261
|
return (t, u) => (F(), x("div", { class: j(["w-full py-0.5", s.value.muted]) }, [
|
|
1269
|
-
a.value ? (F(), x("span",
|
|
1262
|
+
a.value ? (F(), x("span", Ke, U(a.value), 1)) : b("", !0),
|
|
1270
1263
|
r.value ? (F(), x("button", {
|
|
1271
1264
|
key: 1,
|
|
1272
1265
|
type: "button",
|
|
@@ -1288,7 +1281,7 @@ var Oe = {
|
|
|
1288
1281
|
class: j(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
|
|
1289
1282
|
"aria-hidden": "true"
|
|
1290
1283
|
}, null, 2)) : b("", !0)
|
|
1291
|
-
], 10,
|
|
1284
|
+
], 10, qe)) : i.value ? (F(), x("button", {
|
|
1292
1285
|
key: 2,
|
|
1293
1286
|
type: "button",
|
|
1294
1287
|
"data-test": "messaging-tool-activity-summary",
|
|
@@ -1296,28 +1289,28 @@ var Oe = {
|
|
|
1296
1289
|
"aria-expanded": n.value,
|
|
1297
1290
|
class: j(["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]),
|
|
1298
1291
|
onClick: toggle
|
|
1299
|
-
}, [S("span",
|
|
1292
|
+
}, [S("span", Ye, [S("span", {
|
|
1300
1293
|
"data-journal-spine": "dashed",
|
|
1301
1294
|
class: j(["w-0 border-l border-dashed", s.value.dashed])
|
|
1302
1295
|
}, null, 2)]), S("span", { class: j(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [C(U(i.value) + " earlier updates ", 1), S("i", {
|
|
1303
1296
|
class: j(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
|
|
1304
1297
|
"aria-hidden": "true"
|
|
1305
|
-
}, null, 2)], 2)], 10,
|
|
1298
|
+
}, null, 2)], 2)], 10, Je)) : b("", !0),
|
|
1306
1299
|
(F(!0), x(h, null, R(o.value, (e, t) => (F(), x("div", {
|
|
1307
1300
|
key: e.id,
|
|
1308
1301
|
"data-test": "messaging-tool-activity-row",
|
|
1309
1302
|
"data-journal-row": e.tone,
|
|
1310
1303
|
class: j([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
|
|
1311
|
-
}, [S("div",
|
|
1304
|
+
}, [S("div", Ze, [S("span", Qe, [(F(), te(B(c.value[e.tone].station.tag), {
|
|
1312
1305
|
"data-journal-station": e.tone,
|
|
1313
1306
|
class: j(c.value[e.tone].station.class)
|
|
1314
1307
|
}, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? b("", !0) : (F(), x("span", {
|
|
1315
1308
|
key: 0,
|
|
1316
1309
|
class: j(["w-px flex-1", s.value.spine])
|
|
1317
|
-
}, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(U(e.label), 1), c.value[e.tone].statusWord ? (F(), x("span",
|
|
1310
|
+
}, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(U(e.label), 1), c.value[e.tone].statusWord ? (F(), x("span", $e, ", " + U(c.value[e.tone].statusWord), 1)) : b("", !0)], 2), e.note ? (F(), x("p", {
|
|
1318
1311
|
key: 0,
|
|
1319
1312
|
class: j(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
|
|
1320
|
-
}, U(e.note), 3)) : b("", !0)], 2)], 10,
|
|
1313
|
+
}, U(e.note), 3)) : b("", !0)], 2)], 10, Xe))), 128)),
|
|
1321
1314
|
!r.value && e.model.hint ? (F(), x("p", {
|
|
1322
1315
|
key: 3,
|
|
1323
1316
|
"data-test": "messaging-tool-activity-hint",
|
|
@@ -1367,86 +1360,86 @@ function _unsupportedIterableToArray(e, t) {
|
|
|
1367
1360
|
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;
|
|
1368
1361
|
}
|
|
1369
1362
|
}
|
|
1370
|
-
var
|
|
1363
|
+
var tt = Object.entries, nt = Object.setPrototypeOf, J = Object.isFrozen, rt = Object.getPrototypeOf, it = Object.getOwnPropertyDescriptor, X = Object.freeze, Z = Object.seal, at = Object.create, st = typeof Reflect < "u" && Reflect, ct = st.apply, lt = st.construct;
|
|
1371
1364
|
X || (X = function freeze(e) {
|
|
1372
1365
|
return e;
|
|
1373
1366
|
}), Z || (Z = function seal(e) {
|
|
1374
1367
|
return e;
|
|
1375
|
-
}),
|
|
1368
|
+
}), ct || (ct = function apply(e, t) {
|
|
1376
1369
|
var n = [...arguments].slice(2);
|
|
1377
1370
|
return e.apply(t, n);
|
|
1378
|
-
}),
|
|
1371
|
+
}), lt || (lt = function construct(e) {
|
|
1379
1372
|
return new e(...[...arguments].slice(1));
|
|
1380
1373
|
});
|
|
1381
|
-
var
|
|
1374
|
+
var ut = unapply(Array.prototype.forEach), dt = unapply(Array.prototype.lastIndexOf), ft = unapply(Array.prototype.pop), pt = unapply(Array.prototype.push), mt = unapply(Array.prototype.splice), ht = Array.isArray, gt = unapply(String.prototype.toLowerCase), _t = unapply(String.prototype.toString), vt = unapply(String.prototype.match), yt = unapply(String.prototype.replace), bt = unapply(String.prototype.indexOf), xt = unapply(String.prototype.trim), St = unapply(Number.prototype.toString), Q = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Tt = unapply(Object.prototype.hasOwnProperty), Et = unapply(Object.prototype.toString), Dt = unapply(RegExp.prototype.test), Ot = unconstruct(TypeError);
|
|
1382
1375
|
function unapply(e) {
|
|
1383
1376
|
return function(t) {
|
|
1384
1377
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
1385
1378
|
var n = [...arguments].slice(1);
|
|
1386
|
-
return
|
|
1379
|
+
return ct(e, t, n);
|
|
1387
1380
|
};
|
|
1388
1381
|
}
|
|
1389
1382
|
function unconstruct(e) {
|
|
1390
1383
|
return function() {
|
|
1391
|
-
return
|
|
1384
|
+
return lt(e, [...arguments]);
|
|
1392
1385
|
};
|
|
1393
1386
|
}
|
|
1394
1387
|
function addToSet(e, t) {
|
|
1395
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1396
|
-
if (
|
|
1388
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gt;
|
|
1389
|
+
if (nt && nt(e, null), !ht(t)) return e;
|
|
1397
1390
|
let r = t.length;
|
|
1398
1391
|
for (; r--;) {
|
|
1399
1392
|
let i = t[r];
|
|
1400
1393
|
if (typeof i == "string") {
|
|
1401
1394
|
let e = n(i);
|
|
1402
|
-
e !== i && (
|
|
1395
|
+
e !== i && (J(t) || (t[r] = e), i = e);
|
|
1403
1396
|
}
|
|
1404
1397
|
e[i] = !0;
|
|
1405
1398
|
}
|
|
1406
1399
|
return e;
|
|
1407
1400
|
}
|
|
1408
1401
|
function cleanArray(e) {
|
|
1409
|
-
for (let t = 0; t < e.length; t++)
|
|
1402
|
+
for (let t = 0; t < e.length; t++) Tt(e, t) || (e[t] = null);
|
|
1410
1403
|
return e;
|
|
1411
1404
|
}
|
|
1412
1405
|
function clone(e) {
|
|
1413
|
-
let t =
|
|
1414
|
-
for (let r of
|
|
1406
|
+
let t = at(null);
|
|
1407
|
+
for (let r of tt(e)) {
|
|
1415
1408
|
var n = _slicedToArray(r, 2);
|
|
1416
1409
|
let i = n[0], a = n[1];
|
|
1417
|
-
|
|
1410
|
+
Tt(e, i) && (ht(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
|
|
1418
1411
|
}
|
|
1419
1412
|
return t;
|
|
1420
1413
|
}
|
|
1421
1414
|
function stringifyValue(e) {
|
|
1422
1415
|
switch (typeof e) {
|
|
1423
1416
|
case "string": return e;
|
|
1424
|
-
case "number": return
|
|
1425
|
-
case "boolean": return
|
|
1426
|
-
case "bigint": return
|
|
1427
|
-
case "symbol": return
|
|
1428
|
-
case "undefined": return
|
|
1417
|
+
case "number": return St(e);
|
|
1418
|
+
case "boolean": return Q(e);
|
|
1419
|
+
case "bigint": return Ct ? Ct(e) : "0";
|
|
1420
|
+
case "symbol": return wt ? wt(e) : "Symbol()";
|
|
1421
|
+
case "undefined": return Et(e);
|
|
1429
1422
|
case "function":
|
|
1430
1423
|
case "object": {
|
|
1431
|
-
if (e === null) return
|
|
1424
|
+
if (e === null) return Et(e);
|
|
1432
1425
|
let t = e, n = lookupGetter(t, "toString");
|
|
1433
1426
|
if (typeof n == "function") {
|
|
1434
1427
|
let e = n(t);
|
|
1435
|
-
return typeof e == "string" ? e :
|
|
1428
|
+
return typeof e == "string" ? e : Et(e);
|
|
1436
1429
|
}
|
|
1437
|
-
return
|
|
1430
|
+
return Et(e);
|
|
1438
1431
|
}
|
|
1439
|
-
default: return
|
|
1432
|
+
default: return Et(e);
|
|
1440
1433
|
}
|
|
1441
1434
|
}
|
|
1442
1435
|
function lookupGetter(e, t) {
|
|
1443
1436
|
for (; e !== null;) {
|
|
1444
|
-
let n =
|
|
1437
|
+
let n = it(e, t);
|
|
1445
1438
|
if (n) {
|
|
1446
1439
|
if (n.get) return unapply(n.get);
|
|
1447
1440
|
if (typeof n.value == "function") return unapply(n.value);
|
|
1448
1441
|
}
|
|
1449
|
-
e =
|
|
1442
|
+
e = rt(e);
|
|
1450
1443
|
}
|
|
1451
1444
|
function fallbackValue() {
|
|
1452
1445
|
return null;
|
|
@@ -1455,12 +1448,12 @@ function lookupGetter(e, t) {
|
|
|
1455
1448
|
}
|
|
1456
1449
|
function isRegex(e) {
|
|
1457
1450
|
try {
|
|
1458
|
-
return
|
|
1451
|
+
return Dt(e, ""), !0;
|
|
1459
1452
|
} catch {
|
|
1460
1453
|
return !1;
|
|
1461
1454
|
}
|
|
1462
1455
|
}
|
|
1463
|
-
var
|
|
1456
|
+
var kt = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), At = X(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), jt = X([
|
|
1464
1457
|
"feBlend",
|
|
1465
1458
|
"feColorMatrix",
|
|
1466
1459
|
"feComponentTransfer",
|
|
@@ -1486,7 +1479,7 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1486
1479
|
"feSpotLight",
|
|
1487
1480
|
"feTile",
|
|
1488
1481
|
"feTurbulence"
|
|
1489
|
-
]),
|
|
1482
|
+
]), Mt = X([
|
|
1490
1483
|
"animate",
|
|
1491
1484
|
"color-profile",
|
|
1492
1485
|
"cursor",
|
|
@@ -1509,7 +1502,7 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1509
1502
|
"solidcolor",
|
|
1510
1503
|
"unknown",
|
|
1511
1504
|
"use"
|
|
1512
|
-
]),
|
|
1505
|
+
]), Nt = X(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Pt = X([
|
|
1513
1506
|
"maction",
|
|
1514
1507
|
"maligngroup",
|
|
1515
1508
|
"malignmark",
|
|
@@ -1525,13 +1518,13 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1525
1518
|
"annotation-xml",
|
|
1526
1519
|
"mprescripts",
|
|
1527
1520
|
"none"
|
|
1528
|
-
]),
|
|
1521
|
+
]), Ft = X(["#text"]), It = X(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Lt = X(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Rt = X(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), zt = X([
|
|
1529
1522
|
"xlink:href",
|
|
1530
1523
|
"xml:id",
|
|
1531
1524
|
"xlink:title",
|
|
1532
1525
|
"xml:space",
|
|
1533
1526
|
"xmlns:xlink"
|
|
1534
|
-
]),
|
|
1527
|
+
]), Bt = Z(/{{[\w\W]*|^[\w\W]*}}/g), Vt = Z(/<%[\w\W]*|^[\w\W]*%>/g), Ht = Z(/\${[\w\W]*/g), Ut = Z(/^data-[\-\w.\u00B7-\uFFFF]+$/), Wt = Z(/^aria-[\-\w]+$/), Gt = Z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Kt = Z(/^(?:\w+script|data):/i), qt = Z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Jt = Z(/^html$/i), Yt = Z(/^[a-z][.\w]*(-[.\w]+)+$/i), Xt = Z(/<[/\w!]/g), Zt = Z(/<[/\w]/g), Qt = Z(/<\/no(script|embed|frames)/i), $t = Z(/\/>/i), en = {
|
|
1535
1528
|
element: 1,
|
|
1536
1529
|
attribute: 2,
|
|
1537
1530
|
text: 3,
|
|
@@ -1544,9 +1537,9 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1544
1537
|
documentType: 10,
|
|
1545
1538
|
documentFragment: 11,
|
|
1546
1539
|
notation: 12
|
|
1547
|
-
},
|
|
1540
|
+
}, tn = function getGlobal() {
|
|
1548
1541
|
return typeof window > "u" ? null : window;
|
|
1549
|
-
},
|
|
1542
|
+
}, nn = function _createTrustedTypesPolicy(e, t) {
|
|
1550
1543
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
1551
1544
|
let n = null, r = "data-tt-policy-suffix";
|
|
1552
1545
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -1563,7 +1556,7 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1563
1556
|
} catch {
|
|
1564
1557
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
1565
1558
|
}
|
|
1566
|
-
},
|
|
1559
|
+
}, rn = function _createHooksMap() {
|
|
1567
1560
|
return {
|
|
1568
1561
|
afterSanitizeAttributes: [],
|
|
1569
1562
|
afterSanitizeElements: [],
|
|
@@ -1575,12 +1568,12 @@ var Ot = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1575
1568
|
uponSanitizeElement: [],
|
|
1576
1569
|
uponSanitizeShadowNode: []
|
|
1577
1570
|
};
|
|
1578
|
-
},
|
|
1579
|
-
return
|
|
1571
|
+
}, an = function _resolveSetOption(e, t, n, r) {
|
|
1572
|
+
return Tt(e, t) && ht(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
|
|
1580
1573
|
};
|
|
1581
1574
|
function createDOMPurify() {
|
|
1582
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
1583
|
-
if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !==
|
|
1575
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : tn(), DOMPurify = (e) => createDOMPurify(e);
|
|
1576
|
+
if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== en.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
|
|
1584
1577
|
let t = e.document, n = t, r = n.currentScript;
|
|
1585
1578
|
e.DocumentFragment;
|
|
1586
1579
|
let i = e.HTMLTemplateElement, a = e.Node, o = e.Element, s = e.NodeFilter;
|
|
@@ -1591,7 +1584,7 @@ function createDOMPurify() {
|
|
|
1591
1584
|
e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
|
|
1592
1585
|
}
|
|
1593
1586
|
let C, T = "", k, A = !1, j = 0, M = function _assertNotInTrustedTypesPolicy() {
|
|
1594
|
-
if (j > 0) throw
|
|
1587
|
+
if (j > 0) throw Ot("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.");
|
|
1595
1588
|
}, P = function _createTrustedHTML(e) {
|
|
1596
1589
|
M(), j++;
|
|
1597
1590
|
try {
|
|
@@ -1607,21 +1600,21 @@ function createDOMPurify() {
|
|
|
1607
1600
|
j--;
|
|
1608
1601
|
}
|
|
1609
1602
|
}, re = function _getDefaultTrustedTypesPolicy() {
|
|
1610
|
-
return A || (k =
|
|
1611
|
-
}, F = t, I = F.implementation, R = F.createNodeIterator, ie = F.createDocumentFragment, B = F.getElementsByTagName, H = n.importNode, U =
|
|
1612
|
-
DOMPurify.isSupported = typeof
|
|
1613
|
-
let ae =
|
|
1614
|
-
...Ot,
|
|
1603
|
+
return A || (k = nn(u, r), A = !0), k;
|
|
1604
|
+
}, F = t, I = F.implementation, R = F.createNodeIterator, ie = F.createDocumentFragment, B = F.getElementsByTagName, H = n.importNode, U = rn();
|
|
1605
|
+
DOMPurify.isSupported = typeof tt == "function" && typeof v == "function" && I && I.createHTMLDocument !== void 0;
|
|
1606
|
+
let ae = Bt, oe = Vt, se = Ht, ce = Ut, ue = Wt, de = Kt, pe = qt, W = Yt, he = Gt, G = null, _e = addToSet({}, [
|
|
1615
1607
|
...kt,
|
|
1616
1608
|
...At,
|
|
1617
|
-
...
|
|
1618
|
-
...
|
|
1609
|
+
...jt,
|
|
1610
|
+
...Nt,
|
|
1611
|
+
...Ft
|
|
1619
1612
|
]), K = null, ve = addToSet({}, [
|
|
1620
|
-
...Ft,
|
|
1621
1613
|
...It,
|
|
1622
1614
|
...Lt,
|
|
1623
|
-
...Rt
|
|
1624
|
-
|
|
1615
|
+
...Rt,
|
|
1616
|
+
...zt
|
|
1617
|
+
]), q = Object.seal(at(null, {
|
|
1625
1618
|
tagNameCheck: {
|
|
1626
1619
|
writable: !0,
|
|
1627
1620
|
configurable: !1,
|
|
@@ -1640,7 +1633,7 @@ function createDOMPurify() {
|
|
|
1640
1633
|
enumerable: !0,
|
|
1641
1634
|
value: !1
|
|
1642
1635
|
}
|
|
1643
|
-
})), ye = null, be = null, Se = Object.seal(
|
|
1636
|
+
})), ye = null, be = null, Se = Object.seal(at(null, {
|
|
1644
1637
|
tagCheck: {
|
|
1645
1638
|
writable: !0,
|
|
1646
1639
|
configurable: !1,
|
|
@@ -1675,42 +1668,42 @@ function createDOMPurify() {
|
|
|
1675
1668
|
"value",
|
|
1676
1669
|
"style",
|
|
1677
1670
|
"xmlns"
|
|
1678
|
-
]), Ye = "http://www.w3.org/1998/Math/MathML", Xe = "http://www.w3.org/2000/svg", Ze = "http://www.w3.org/1999/xhtml", Qe = Ze, $e = !1,
|
|
1671
|
+
]), Ye = "http://www.w3.org/1998/Math/MathML", Xe = "http://www.w3.org/2000/svg", Ze = "http://www.w3.org/1999/xhtml", Qe = Ze, $e = !1, et = null, nt = addToSet({}, [
|
|
1679
1672
|
Ye,
|
|
1680
1673
|
Xe,
|
|
1681
1674
|
Ze
|
|
1682
|
-
],
|
|
1675
|
+
], _t), J = X([
|
|
1683
1676
|
"mi",
|
|
1684
1677
|
"mo",
|
|
1685
1678
|
"mn",
|
|
1686
1679
|
"ms",
|
|
1687
1680
|
"mtext"
|
|
1688
|
-
]), rt = addToSet({}, J),
|
|
1681
|
+
]), rt = addToSet({}, J), it = X(["annotation-xml"]), st = addToSet({}, it), ct = addToSet({}, [
|
|
1689
1682
|
"title",
|
|
1690
1683
|
"style",
|
|
1691
1684
|
"font",
|
|
1692
1685
|
"a",
|
|
1693
1686
|
"script"
|
|
1694
|
-
]),
|
|
1687
|
+
]), lt = null, St = ["application/xhtml+xml", "text/html"], Q = null, Ct = null, wt = t.createElement("form"), Et = function isRegexOrFunction(e) {
|
|
1695
1688
|
return e instanceof RegExp || e instanceof Function;
|
|
1696
1689
|
}, on = function _parseConfig() {
|
|
1697
1690
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1698
1691
|
if (Ct && Ct === e) return;
|
|
1699
|
-
(!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
1692
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), lt = St.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = lt === "application/xhtml+xml" ? _t : gt, G = an(e, "ALLOWED_TAGS", _e, { transform: Q }), K = an(e, "ALLOWED_ATTR", ve, { transform: Q }), et = an(e, "ALLOWED_NAMESPACES", nt, { transform: _t }), qe = an(e, "ADD_URI_SAFE_ATTR", Je, {
|
|
1700
1693
|
transform: Q,
|
|
1701
1694
|
base: Je
|
|
1702
|
-
}), Ge =
|
|
1695
|
+
}), Ge = an(e, "ADD_DATA_URI_TAGS", Ke, {
|
|
1703
1696
|
transform: Q,
|
|
1704
1697
|
base: Ke
|
|
1705
|
-
}), Ue =
|
|
1706
|
-
let t =
|
|
1707
|
-
if (q =
|
|
1698
|
+
}), Ue = an(e, "FORBID_CONTENTS", We, { transform: Q }), ye = an(e, "FORBID_TAGS", clone({}), { transform: Q }), be = an(e, "FORBID_ATTR", clone({}), { transform: Q }), He = Tt(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ce = e.ALLOW_ARIA_ATTR !== !1, we = e.ALLOW_DATA_ATTR !== !1, Te = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, ke = e.WHOLE_DOCUMENT || !1, Pe = e.RETURN_DOM || !1, Fe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, Le = e.SANITIZE_DOM !== !1, Re = e.SANITIZE_NAMED_PROPS || !1, Be = e.KEEP_CONTENT !== !1, Ve = e.IN_PLACE || !1, he = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Gt, Qe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Ze, rt = Tt(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, J), st = Tt(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, it);
|
|
1699
|
+
let t = Tt(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : at(null);
|
|
1700
|
+
if (q = at(null), Tt(t, "tagNameCheck") && Et(t.tagNameCheck) && (q.tagNameCheck = t.tagNameCheck), Tt(t, "attributeNameCheck") && Et(t.attributeNameCheck) && (q.attributeNameCheck = t.attributeNameCheck), Tt(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Z(q), De && (we = !1), Fe && (Pe = !0), He && (G = addToSet({}, Ft), K = at(null), He.html === !0 && (addToSet(G, kt), addToSet(K, It)), He.svg === !0 && (addToSet(G, At), addToSet(K, Lt), addToSet(K, zt)), He.svgFilters === !0 && (addToSet(G, jt), addToSet(K, Lt), addToSet(K, zt)), He.mathMl === !0 && (addToSet(G, Nt), addToSet(K, Rt), addToSet(K, zt))), Se.tagCheck = null, Se.attributeCheck = null, Tt(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Se.tagCheck = e.ADD_TAGS : ht(e.ADD_TAGS) && (G === _e && (G = clone(G)), addToSet(G, e.ADD_TAGS, Q))), Tt(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Se.attributeCheck = e.ADD_ATTR : ht(e.ADD_ATTR) && (K === ve && (K = clone(K)), addToSet(K, e.ADD_ATTR, Q))), Tt(e, "ADD_URI_SAFE_ATTR") && ht(e.ADD_URI_SAFE_ATTR) && addToSet(qe, e.ADD_URI_SAFE_ATTR, Q), Tt(e, "FORBID_CONTENTS") && ht(e.FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.FORBID_CONTENTS, Q)), Tt(e, "ADD_FORBID_CONTENTS") && ht(e.ADD_FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.ADD_FORBID_CONTENTS, Q)), Be && (G["#text"] = !0), ke && addToSet(G, [
|
|
1708
1701
|
"html",
|
|
1709
1702
|
"head",
|
|
1710
1703
|
"body"
|
|
1711
1704
|
]), G.table && (addToSet(G, ["tbody"]), delete ye.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
1712
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
1713
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
1705
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Ot("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
1706
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Ot("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
1714
1707
|
let t = C;
|
|
1715
1708
|
C = e.TRUSTED_TYPES_POLICY;
|
|
1716
1709
|
try {
|
|
@@ -1721,10 +1714,10 @@ function createDOMPurify() {
|
|
|
1721
1714
|
} else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, T = "") : (C === void 0 && (C = re()), C && typeof T == "string" && (T = P("")));
|
|
1722
1715
|
X && X(e), Ct = e;
|
|
1723
1716
|
}, sn = addToSet({}, [
|
|
1724
|
-
...kt,
|
|
1725
1717
|
...At,
|
|
1726
|
-
...jt
|
|
1727
|
-
|
|
1718
|
+
...jt,
|
|
1719
|
+
...Mt
|
|
1720
|
+
]), cn = addToSet({}, [...Nt, ...Pt]), ln = function _checkSvgNamespace(e, t, n) {
|
|
1728
1721
|
return t.namespaceURI === Ze ? e === "svg" : t.namespaceURI === Ye ? e === "svg" && (n === "annotation-xml" || rt[n]) : !!sn[e];
|
|
1729
1722
|
}, un = function _checkMathMlNamespace(e, t, n) {
|
|
1730
1723
|
return t.namespaceURI === Ze ? e === "math" : t.namespaceURI === Xe ? e === "math" && st[n] : !!cn[e];
|
|
@@ -1736,23 +1729,23 @@ function createDOMPurify() {
|
|
|
1736
1729
|
namespaceURI: Qe,
|
|
1737
1730
|
tagName: "template"
|
|
1738
1731
|
});
|
|
1739
|
-
let n =
|
|
1740
|
-
return
|
|
1732
|
+
let n = gt(e.tagName), r = gt(t.tagName);
|
|
1733
|
+
return et[e.namespaceURI] ? e.namespaceURI === Xe ? ln(n, t, r) : e.namespaceURI === Ye ? un(n, t, r) : e.namespaceURI === Ze ? dn(n, t, r) : !!(lt === "application/xhtml+xml" && et[e.namespaceURI]) : !1;
|
|
1741
1734
|
}, pn = function _forceRemove(e) {
|
|
1742
|
-
|
|
1735
|
+
pt(DOMPurify.removed, { element: e });
|
|
1743
1736
|
try {
|
|
1744
1737
|
v(e).removeChild(e);
|
|
1745
1738
|
} catch {
|
|
1746
|
-
if (m(e), !v(e)) throw
|
|
1739
|
+
if (m(e), !v(e)) throw Ot("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1747
1740
|
}
|
|
1748
1741
|
}, mn = function _neutralizeRoot(e) {
|
|
1749
1742
|
_n(e);
|
|
1750
1743
|
let t = _(e);
|
|
1751
1744
|
if (t) {
|
|
1752
1745
|
let e = [];
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
}),
|
|
1746
|
+
ut(t, (t) => {
|
|
1747
|
+
pt(e, t);
|
|
1748
|
+
}), ut(e, (e) => {
|
|
1756
1749
|
try {
|
|
1757
1750
|
m(e);
|
|
1758
1751
|
} catch {}
|
|
@@ -1767,12 +1760,12 @@ function createDOMPurify() {
|
|
|
1767
1760
|
}
|
|
1768
1761
|
}, hn = function _removeAttribute(e, t) {
|
|
1769
1762
|
try {
|
|
1770
|
-
|
|
1763
|
+
pt(DOMPurify.removed, {
|
|
1771
1764
|
attribute: t.getAttributeNode(e),
|
|
1772
1765
|
from: t
|
|
1773
1766
|
});
|
|
1774
1767
|
} catch {
|
|
1775
|
-
|
|
1768
|
+
pt(DOMPurify.removed, {
|
|
1776
1769
|
attribute: null,
|
|
1777
1770
|
from: t
|
|
1778
1771
|
});
|
|
@@ -1795,7 +1788,7 @@ function createDOMPurify() {
|
|
|
1795
1788
|
let t = [e];
|
|
1796
1789
|
for (; t.length > 0;) {
|
|
1797
1790
|
let e = t.pop();
|
|
1798
|
-
(x ? x(e) : e.nodeType) ===
|
|
1791
|
+
(x ? x(e) : e.nodeType) === en.element && gn(e);
|
|
1799
1792
|
let n = _(e);
|
|
1800
1793
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
1801
1794
|
}
|
|
@@ -1804,13 +1797,13 @@ function createDOMPurify() {
|
|
|
1804
1797
|
let t = [e];
|
|
1805
1798
|
for (; t.length > 0;) {
|
|
1806
1799
|
let e = t.pop(), n = x ? x(e) : e.nodeType;
|
|
1807
|
-
if (n ===
|
|
1800
|
+
if (n === en.processingInstruction || n === en.comment && Dt(Zt, e.data)) {
|
|
1808
1801
|
try {
|
|
1809
1802
|
m(e);
|
|
1810
1803
|
} catch {}
|
|
1811
1804
|
continue;
|
|
1812
1805
|
}
|
|
1813
|
-
if (n ===
|
|
1806
|
+
if (n === en.element) {
|
|
1814
1807
|
let t = e, n = Q(S ? S(e) : e.nodeName);
|
|
1815
1808
|
try {
|
|
1816
1809
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
@@ -1823,13 +1816,13 @@ function createDOMPurify() {
|
|
|
1823
1816
|
let n = null, r = null;
|
|
1824
1817
|
if (Ne) e = "<remove></remove>" + e;
|
|
1825
1818
|
else {
|
|
1826
|
-
let t =
|
|
1819
|
+
let t = vt(e, /^[\r\n\t ]+/);
|
|
1827
1820
|
r = t && t[0];
|
|
1828
1821
|
}
|
|
1829
|
-
|
|
1822
|
+
lt === "application/xhtml+xml" && Qe === Ze && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
1830
1823
|
let i = C ? P(e) : e;
|
|
1831
1824
|
if (Qe === Ze) try {
|
|
1832
|
-
n = new c().parseFromString(i,
|
|
1825
|
+
n = new c().parseFromString(i, lt);
|
|
1833
1826
|
} catch {}
|
|
1834
1827
|
if (!n || !n.documentElement) {
|
|
1835
1828
|
n = I.createDocument(Qe, "template", null);
|
|
@@ -1842,13 +1835,13 @@ function createDOMPurify() {
|
|
|
1842
1835
|
}, bn = function _createNodeIterator(e) {
|
|
1843
1836
|
return R.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
|
|
1844
1837
|
}, xn = function _stripTemplateExpressions(e) {
|
|
1845
|
-
return e =
|
|
1838
|
+
return e = yt(e, ae, " "), e = yt(e, oe, " "), e = yt(e, se, " "), e;
|
|
1846
1839
|
}, Sn = function _scrubTemplateExpressions(e) {
|
|
1847
1840
|
e.normalize();
|
|
1848
1841
|
let t = R.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
|
|
1849
1842
|
for (; n;) n.data = xn(n.data), n = t.nextNode();
|
|
1850
1843
|
let r = e.querySelectorAll?.call(e, "template");
|
|
1851
|
-
r &&
|
|
1844
|
+
r && ut(r, (e) => {
|
|
1852
1845
|
wn(e.content) && Sn(e.content);
|
|
1853
1846
|
});
|
|
1854
1847
|
}, Cn = function _isClobbered(e) {
|
|
@@ -1857,7 +1850,7 @@ function createDOMPurify() {
|
|
|
1857
1850
|
}, wn = function _isDocumentFragment(e) {
|
|
1858
1851
|
if (!x || typeof e != "object" || !e) return !1;
|
|
1859
1852
|
try {
|
|
1860
|
-
return x(e) ===
|
|
1853
|
+
return x(e) === en.documentFragment;
|
|
1861
1854
|
} catch {
|
|
1862
1855
|
return !1;
|
|
1863
1856
|
}
|
|
@@ -1870,14 +1863,14 @@ function createDOMPurify() {
|
|
|
1870
1863
|
}
|
|
1871
1864
|
};
|
|
1872
1865
|
function _executeHooks(e, t, n) {
|
|
1873
|
-
e.length !== 0 &&
|
|
1866
|
+
e.length !== 0 && ut(e, (e) => {
|
|
1874
1867
|
e.call(DOMPurify, t, n, Ct);
|
|
1875
1868
|
});
|
|
1876
1869
|
}
|
|
1877
1870
|
let En = function _isUnsafeNode(e, t) {
|
|
1878
|
-
return !!(Oe && e.hasChildNodes() && !Tn(e.firstElementChild) &&
|
|
1871
|
+
return !!(Oe && e.hasChildNodes() && !Tn(e.firstElementChild) && Dt(Xt, e.textContent) && Dt(Xt, e.innerHTML) || Oe && e.namespaceURI === Ze && t === "style" && Tn(e.firstElementChild) || e.nodeType === en.processingInstruction || Oe && e.nodeType === en.comment && Dt(Zt, e.data));
|
|
1879
1872
|
}, Dn = function _sanitizeDisallowedNode(e, t) {
|
|
1880
|
-
if (!ye[t] && jn(t) && (q.tagNameCheck instanceof RegExp &&
|
|
1873
|
+
if (!ye[t] && jn(t) && (q.tagNameCheck instanceof RegExp && Dt(q.tagNameCheck, t) || q.tagNameCheck instanceof Function && q.tagNameCheck(t))) return !1;
|
|
1881
1874
|
if (Be && !Ue[t]) {
|
|
1882
1875
|
let t = v(e), n = _(e);
|
|
1883
1876
|
if (n && t) {
|
|
@@ -1902,19 +1895,19 @@ function createDOMPurify() {
|
|
|
1902
1895
|
let t = Dn(e, n);
|
|
1903
1896
|
return t === !1 && _executeHooks(U.afterSanitizeElements, e, null), t;
|
|
1904
1897
|
}
|
|
1905
|
-
if ((x ? x(e) : e.nodeType) ===
|
|
1906
|
-
if (De && e.nodeType ===
|
|
1898
|
+
if ((x ? x(e) : e.nodeType) === en.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Dt(Qt, e.innerHTML)) return pn(e), !0;
|
|
1899
|
+
if (De && e.nodeType === en.text) {
|
|
1907
1900
|
let t = xn(e.textContent);
|
|
1908
|
-
e.textContent !== t && (
|
|
1901
|
+
e.textContent !== t && (pt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
|
|
1909
1902
|
}
|
|
1910
1903
|
return _executeHooks(U.afterSanitizeElements, e, null), !1;
|
|
1911
1904
|
}, kn = function _isValidAttribute(e, n, r) {
|
|
1912
|
-
if (be[n] || Oe && n === "patchsrc" || Oe && n === "for" && e !== "label" && e !== "output" || Le && (n === "id" || n === "name") && (r in t || r in
|
|
1905
|
+
if (be[n] || Oe && n === "patchsrc" || Oe && n === "for" && e !== "label" && e !== "output" || Le && (n === "id" || n === "name") && (r in t || r in wt)) return !1;
|
|
1913
1906
|
let i = K[n] || Se.attributeCheck instanceof Function && Se.attributeCheck(n, e);
|
|
1914
|
-
if (!(we &&
|
|
1907
|
+
if (!(we && Dt(ce, n)) && !(Ce && Dt(ue, n))) {
|
|
1915
1908
|
if (!i) {
|
|
1916
|
-
if (!(jn(e) && (q.tagNameCheck instanceof RegExp &&
|
|
1917
|
-
} else if (!qe[n] && !
|
|
1909
|
+
if (!(jn(e) && (q.tagNameCheck instanceof RegExp && Dt(q.tagNameCheck, e) || q.tagNameCheck instanceof Function && q.tagNameCheck(e)) && (q.attributeNameCheck instanceof RegExp && Dt(q.attributeNameCheck, n) || q.attributeNameCheck instanceof Function && q.attributeNameCheck(n, e)) || n === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && Dt(q.tagNameCheck, r) || q.tagNameCheck instanceof Function && q.tagNameCheck(r)))) return !1;
|
|
1910
|
+
} else if (!qe[n] && !Dt(he, yt(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && bt(r, "data:") === 0 && Ge[e]) && !(Te && !Dt(de, yt(r, pe, ""))) && r) return !1;
|
|
1918
1911
|
}
|
|
1919
1912
|
return !0;
|
|
1920
1913
|
}, An = addToSet({}, [
|
|
@@ -1927,7 +1920,7 @@ function createDOMPurify() {
|
|
|
1927
1920
|
"font-face-uri",
|
|
1928
1921
|
"missing-glyph"
|
|
1929
1922
|
]), jn = function _isBasicCustomElement(e) {
|
|
1930
|
-
return !An[
|
|
1923
|
+
return !An[gt(e)] && Dt(W, e);
|
|
1931
1924
|
}, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
|
|
1932
1925
|
if (C && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
1933
1926
|
case "TrustedHTML": return P(r);
|
|
@@ -1936,7 +1929,7 @@ function createDOMPurify() {
|
|
|
1936
1929
|
return r;
|
|
1937
1930
|
}, Nn = function _setAttributeValue(e, t, n, r) {
|
|
1938
1931
|
try {
|
|
1939
|
-
n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) :
|
|
1932
|
+
n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : ft(DOMPurify.removed);
|
|
1940
1933
|
} catch {
|
|
1941
1934
|
hn(t, e);
|
|
1942
1935
|
}
|
|
@@ -1952,12 +1945,12 @@ function createDOMPurify() {
|
|
|
1952
1945
|
forceKeepAttr: void 0
|
|
1953
1946
|
}, r = t.length, i = Q(e.nodeName);
|
|
1954
1947
|
for (; r--;) {
|
|
1955
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f :
|
|
1956
|
-
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(U.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") &&
|
|
1948
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : xt(f);
|
|
1949
|
+
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(U.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") && bt(p, ze) !== 0 && (hn(o, e), p = ze + p), Oe && Dt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
|
|
1957
1950
|
hn(o, e);
|
|
1958
1951
|
continue;
|
|
1959
1952
|
}
|
|
1960
|
-
if (u === "attributename" &&
|
|
1953
|
+
if (u === "attributename" && vt(p, "href")) {
|
|
1961
1954
|
hn(o, e);
|
|
1962
1955
|
continue;
|
|
1963
1956
|
}
|
|
@@ -1966,7 +1959,7 @@ function createDOMPurify() {
|
|
|
1966
1959
|
hn(o, e);
|
|
1967
1960
|
continue;
|
|
1968
1961
|
}
|
|
1969
|
-
if (!Ee &&
|
|
1962
|
+
if (!Ee && Dt($t, p)) {
|
|
1970
1963
|
hn(o, e);
|
|
1971
1964
|
continue;
|
|
1972
1965
|
}
|
|
@@ -1980,7 +1973,7 @@ function createDOMPurify() {
|
|
|
1980
1973
|
_executeHooks(U.afterSanitizeAttributes, e, null);
|
|
1981
1974
|
}, Fn = function _sanitizeShadowDOM(e) {
|
|
1982
1975
|
let t = null, n = bn(e);
|
|
1983
|
-
for (_executeHooks(U.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(U.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) ===
|
|
1976
|
+
for (_executeHooks(U.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(U.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === en.element) {
|
|
1984
1977
|
let e = te(t);
|
|
1985
1978
|
wn(e) && (In(e), Fn(e));
|
|
1986
1979
|
}
|
|
@@ -1996,7 +1989,7 @@ function createDOMPurify() {
|
|
|
1996
1989
|
Fn(e.shadow);
|
|
1997
1990
|
continue;
|
|
1998
1991
|
}
|
|
1999
|
-
let n = e.node, r = (x ? x(n) : n.nodeType) ===
|
|
1992
|
+
let n = e.node, r = (x ? x(n) : n.nodeType) === en.element, i = _(n);
|
|
2000
1993
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
2001
1994
|
node: i[e],
|
|
2002
1995
|
shadow: null
|
|
@@ -2025,7 +2018,7 @@ function createDOMPurify() {
|
|
|
2025
2018
|
};
|
|
2026
2019
|
return DOMPurify.sanitize = function(e) {
|
|
2027
2020
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
|
|
2028
|
-
if ($e = !e, $e && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw
|
|
2021
|
+
if ($e = !e, $e && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Ot("dirty is not a string, aborting");
|
|
2029
2022
|
if (!DOMPurify.isSupported) return e;
|
|
2030
2023
|
Ae ? (G = je, K = Me) : on(t), (U.uponSanitizeElement.length > 0 || U.uponSanitizeAttribute.length > 0) && (G = clone(G)), U.uponSanitizeAttribute.length > 0 && (K = clone(K)), DOMPurify.removed = [];
|
|
2031
2024
|
let s = Ve && typeof e != "string" && Tn(e);
|
|
@@ -2034,15 +2027,15 @@ function createDOMPurify() {
|
|
|
2034
2027
|
let t = S ? S(e) : e.nodeName;
|
|
2035
2028
|
if (typeof t == "string") {
|
|
2036
2029
|
let n = Q(t);
|
|
2037
|
-
if (!G[n] || ye[n]) throw mn(e),
|
|
2030
|
+
if (!G[n] || ye[n]) throw mn(e), Ot("root node is forbidden and cannot be sanitized in-place");
|
|
2038
2031
|
}
|
|
2039
|
-
if (Cn(e)) throw mn(e),
|
|
2032
|
+
if (Cn(e)) throw mn(e), Ot("root node is clobbered and cannot be sanitized in-place");
|
|
2040
2033
|
try {
|
|
2041
2034
|
In(e);
|
|
2042
2035
|
} catch (t) {
|
|
2043
2036
|
throw mn(e), t;
|
|
2044
2037
|
}
|
|
2045
|
-
} else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType ===
|
|
2038
|
+
} else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === en.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
|
|
2046
2039
|
else {
|
|
2047
2040
|
if (!Pe && !De && !ke && e.indexOf("<") === -1) return C && Ie ? P(e) : e;
|
|
2048
2041
|
if (r = yn(e), !r) return Pe ? null : Ie ? T : "";
|
|
@@ -2052,11 +2045,11 @@ function createDOMPurify() {
|
|
|
2052
2045
|
try {
|
|
2053
2046
|
for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
|
|
2054
2047
|
} catch (t) {
|
|
2055
|
-
throw s && (mn(e),
|
|
2048
|
+
throw s && (mn(e), ut(DOMPurify.removed, (e) => {
|
|
2056
2049
|
e.element && _n(e.element);
|
|
2057
2050
|
})), t;
|
|
2058
2051
|
}
|
|
2059
|
-
if (s) return
|
|
2052
|
+
if (s) return ut(DOMPurify.removed, (e) => {
|
|
2060
2053
|
e.element && _n(e.element);
|
|
2061
2054
|
}), De && Sn(e), e;
|
|
2062
2055
|
if (Pe) {
|
|
@@ -2065,7 +2058,7 @@ function createDOMPurify() {
|
|
|
2065
2058
|
return (K.shadowroot || K.shadowrootmode) && (o = H.call(n, o, !0)), o;
|
|
2066
2059
|
}
|
|
2067
2060
|
let f = ke ? r.outerHTML : r.innerHTML;
|
|
2068
|
-
return ke && G["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name &&
|
|
2061
|
+
return ke && G["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Dt(Jt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), De && (f = xn(f)), C && Ie ? P(f) : f;
|
|
2069
2062
|
}, DOMPurify.setConfig = function() {
|
|
2070
2063
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2071
2064
|
on(e), Ae = !0, je = G, Me = K;
|
|
@@ -2076,22 +2069,22 @@ function createDOMPurify() {
|
|
|
2076
2069
|
let r = Q(e), i = Q(t);
|
|
2077
2070
|
return kn(r, i, n);
|
|
2078
2071
|
}, DOMPurify.addHook = function(e, t) {
|
|
2079
|
-
typeof t == "function" &&
|
|
2072
|
+
typeof t == "function" && Tt(U, e) && pt(U[e], t);
|
|
2080
2073
|
}, DOMPurify.removeHook = function(e, t) {
|
|
2081
|
-
if (
|
|
2074
|
+
if (Tt(U, e)) {
|
|
2082
2075
|
if (t !== void 0) {
|
|
2083
|
-
let n =
|
|
2084
|
-
return n === -1 ? void 0 :
|
|
2076
|
+
let n = dt(U[e], t);
|
|
2077
|
+
return n === -1 ? void 0 : mt(U[e], n, 1)[0];
|
|
2085
2078
|
}
|
|
2086
|
-
return
|
|
2079
|
+
return ft(U[e]);
|
|
2087
2080
|
}
|
|
2088
2081
|
}, DOMPurify.removeHooks = function(e) {
|
|
2089
|
-
|
|
2082
|
+
Tt(U, e) && (U[e] = []);
|
|
2090
2083
|
}, DOMPurify.removeAllHooks = function() {
|
|
2091
|
-
U =
|
|
2084
|
+
U = rn();
|
|
2092
2085
|
}, DOMPurify;
|
|
2093
2086
|
}
|
|
2094
|
-
var
|
|
2087
|
+
var on = createDOMPurify(), _Class;
|
|
2095
2088
|
function z() {
|
|
2096
2089
|
return {
|
|
2097
2090
|
async: !1,
|
|
@@ -2106,11 +2099,11 @@ function z() {
|
|
|
2106
2099
|
walkTokens: null
|
|
2107
2100
|
};
|
|
2108
2101
|
}
|
|
2109
|
-
var
|
|
2102
|
+
var sn = z();
|
|
2110
2103
|
function N(e) {
|
|
2111
|
-
|
|
2104
|
+
sn = e;
|
|
2112
2105
|
}
|
|
2113
|
-
var
|
|
2106
|
+
var cn = { exec: () => null };
|
|
2114
2107
|
function E(e) {
|
|
2115
2108
|
let t = [];
|
|
2116
2109
|
return (n) => {
|
|
@@ -2122,19 +2115,19 @@ function d(e, t = "") {
|
|
|
2122
2115
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
2123
2116
|
replace: (e, t) => {
|
|
2124
2117
|
let i = typeof t == "string" ? t : t.source;
|
|
2125
|
-
return i = i.replace(
|
|
2118
|
+
return i = i.replace(un.caret, "$1"), n = n.replace(e, i), r;
|
|
2126
2119
|
},
|
|
2127
2120
|
getRegex: () => new RegExp(n, t)
|
|
2128
2121
|
};
|
|
2129
2122
|
return r;
|
|
2130
2123
|
}
|
|
2131
|
-
var
|
|
2124
|
+
var ln = ((e = "") => {
|
|
2132
2125
|
try {
|
|
2133
2126
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
2134
2127
|
} catch {
|
|
2135
2128
|
return !1;
|
|
2136
2129
|
}
|
|
2137
|
-
})(),
|
|
2130
|
+
})(), un = {
|
|
2138
2131
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
2139
2132
|
outputLinkReplace: /\\([\[\]])/g,
|
|
2140
2133
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -2191,112 +2184,112 @@ var cn = ((e = "") => {
|
|
|
2191
2184
|
headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
|
|
2192
2185
|
htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
2193
2186
|
blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
|
|
2194
|
-
},
|
|
2195
|
-
blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",
|
|
2196
|
-
code:
|
|
2197
|
-
def:
|
|
2198
|
-
fences:
|
|
2199
|
-
heading:
|
|
2200
|
-
hr:
|
|
2201
|
-
html:
|
|
2202
|
-
lheading: _n,
|
|
2203
|
-
list: Cn,
|
|
2204
|
-
newline: un,
|
|
2205
|
-
paragraph: Dn,
|
|
2206
|
-
table: sn,
|
|
2207
|
-
text: bn
|
|
2208
|
-
}, An = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), jn = {
|
|
2209
|
-
...kn,
|
|
2187
|
+
}, dn = /^(?:[ \t]*(?:\n|$))+/, fn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, mn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, gn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, _n = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, vn = d(_n).replace(/bull/g, gn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), yn = d(_n).replace(/bull/g, gn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), bn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, xn = /^[^\n]+/, Sn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Cn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Sn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), wn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, gn).getRegex(), Tn = "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", En = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Dn = 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", En).replace("tag", Tn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(bn).replace("hr", mn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex(), On = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), kn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), An = {
|
|
2188
|
+
blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", kn).getRegex(),
|
|
2189
|
+
code: fn,
|
|
2190
|
+
def: Cn,
|
|
2191
|
+
fences: pn,
|
|
2192
|
+
heading: hn,
|
|
2193
|
+
hr: mn,
|
|
2194
|
+
html: Dn,
|
|
2210
2195
|
lheading: vn,
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2196
|
+
list: wn,
|
|
2197
|
+
newline: dn,
|
|
2198
|
+
paragraph: On,
|
|
2199
|
+
table: cn,
|
|
2200
|
+
text: xn
|
|
2201
|
+
}, jn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", mn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex(), Mn = {
|
|
2202
|
+
...An,
|
|
2203
|
+
lheading: yn,
|
|
2204
|
+
table: jn,
|
|
2205
|
+
paragraph: d(bn).replace("hr", mn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", jn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex()
|
|
2206
|
+
}, Nn = {
|
|
2207
|
+
...An,
|
|
2208
|
+
html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", En).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(),
|
|
2216
2209
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
2217
2210
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
2218
|
-
fences:
|
|
2211
|
+
fences: cn,
|
|
2219
2212
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
2220
|
-
paragraph: d(
|
|
2221
|
-
},
|
|
2222
|
-
_backpedal:
|
|
2223
|
-
anyPunctuation:
|
|
2224
|
-
autolink:
|
|
2225
|
-
blockSkip:
|
|
2226
|
-
br:
|
|
2227
|
-
code:
|
|
2228
|
-
del:
|
|
2229
|
-
delLDelim:
|
|
2230
|
-
delRDelim:
|
|
2231
|
-
emStrongLDelim: Kn,
|
|
2232
|
-
emStrongRDelimAst: Yn,
|
|
2233
|
-
emStrongRDelimUnd: Zn,
|
|
2234
|
-
escape: Nn,
|
|
2235
|
-
link: ar,
|
|
2236
|
-
nolink: sr,
|
|
2237
|
-
punctuation: Bn,
|
|
2238
|
-
reflink: or,
|
|
2239
|
-
reflinkSearch: cr,
|
|
2240
|
-
tag: rr,
|
|
2241
|
-
text: In,
|
|
2242
|
-
url: sn
|
|
2243
|
-
}, dr = {
|
|
2244
|
-
...ur,
|
|
2245
|
-
link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", ir).getRegex(),
|
|
2246
|
-
reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ir).getRegex()
|
|
2247
|
-
}, fr = {
|
|
2248
|
-
...ur,
|
|
2249
|
-
emStrongRDelimAst: Xn,
|
|
2213
|
+
paragraph: d(bn).replace("hr", mn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", vn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
2214
|
+
}, Pn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Fn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, In = /^( {2,}|\\)\n(?!\s*$)/, Ln = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Rn = /[\p{P}\p{S}]/u, zn = /[\s\p{P}\p{S}]/u, Bn = /[^\s\p{P}\p{S}]/u, Vn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, zn).getRegex(), Hn = /(?!~)[\p{P}\p{S}]/u, Un = /(?!~)[\s\p{P}\p{S}]/u, Wn = /(?:[^\s\p{P}\p{S}]|~)/u, Gn = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ln ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Kn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, qn = d(Kn, "u").replace(/punct/g, Rn).getRegex(), Jn = d(Kn, "u").replace(/punct/g, Hn).getRegex(), Yn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Xn = d(Yn, "gu").replace(/notPunctSpace/g, Bn).replace(/punctSpace/g, zn).replace(/punct/g, Rn).getRegex(), Zn = d(Yn, "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Un).replace(/punct/g, Hn).getRegex(), Qn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Bn).replace(/punctSpace/g, zn).replace(/punct/g, Rn).getRegex(), $n = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Rn).getRegex(), er = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Bn).replace(/punctSpace/g, zn).replace(/punct/g, Rn).getRegex(), tr = d(/\\(punct)/, "gu").replace(/punct/g, Rn).getRegex(), nr = 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(), rr = d(En).replace("(?:-->|$)", "-->").getRegex(), ir = 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", rr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ar = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, or = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ar).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), sr = d(/^!?\[(label)\]\[(ref)\]/).replace("label", ar).replace("ref", Sn).getRegex(), cr = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Sn).getRegex(), lr = d("reflink|nolink(?!\\()", "g").replace("reflink", sr).replace("nolink", cr).getRegex(), ur = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, dr = {
|
|
2215
|
+
_backpedal: cn,
|
|
2216
|
+
anyPunctuation: tr,
|
|
2217
|
+
autolink: nr,
|
|
2218
|
+
blockSkip: Gn,
|
|
2219
|
+
br: In,
|
|
2220
|
+
code: Fn,
|
|
2221
|
+
del: cn,
|
|
2222
|
+
delLDelim: cn,
|
|
2223
|
+
delRDelim: cn,
|
|
2250
2224
|
emStrongLDelim: qn,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2225
|
+
emStrongRDelimAst: Xn,
|
|
2226
|
+
emStrongRDelimUnd: Qn,
|
|
2227
|
+
escape: Pn,
|
|
2228
|
+
link: or,
|
|
2229
|
+
nolink: cr,
|
|
2230
|
+
punctuation: Vn,
|
|
2231
|
+
reflink: sr,
|
|
2232
|
+
reflinkSearch: lr,
|
|
2233
|
+
tag: ir,
|
|
2234
|
+
text: Ln,
|
|
2235
|
+
url: cn
|
|
2236
|
+
}, fr = {
|
|
2237
|
+
...dr,
|
|
2238
|
+
link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", ar).getRegex(),
|
|
2239
|
+
reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ar).getRegex()
|
|
2240
|
+
}, pr = {
|
|
2241
|
+
...dr,
|
|
2242
|
+
emStrongRDelimAst: Zn,
|
|
2243
|
+
emStrongLDelim: Jn,
|
|
2244
|
+
delLDelim: $n,
|
|
2245
|
+
delRDelim: er,
|
|
2246
|
+
url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ur).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
2254
2247
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
2255
2248
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
2256
|
-
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",
|
|
2257
|
-
}, pr = {
|
|
2258
|
-
...fr,
|
|
2259
|
-
br: d(Fn).replace("{2,}", "*").getRegex(),
|
|
2260
|
-
text: d(fr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
2249
|
+
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", ur).getRegex()
|
|
2261
2250
|
}, mr = {
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2251
|
+
...pr,
|
|
2252
|
+
br: d(In).replace("{2,}", "*").getRegex(),
|
|
2253
|
+
text: d(pr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
2265
2254
|
}, hr = {
|
|
2266
|
-
normal:
|
|
2267
|
-
gfm:
|
|
2268
|
-
|
|
2269
|
-
pedantic: dr
|
|
2255
|
+
normal: An,
|
|
2256
|
+
gfm: Mn,
|
|
2257
|
+
pedantic: Nn
|
|
2270
2258
|
}, gr = {
|
|
2259
|
+
normal: dr,
|
|
2260
|
+
gfm: pr,
|
|
2261
|
+
breaks: mr,
|
|
2262
|
+
pedantic: fr
|
|
2263
|
+
}, _r = {
|
|
2271
2264
|
"&": "&",
|
|
2272
2265
|
"<": "<",
|
|
2273
2266
|
">": ">",
|
|
2274
2267
|
"\"": """,
|
|
2275
2268
|
"'": "'"
|
|
2276
|
-
}, ge = (e) =>
|
|
2269
|
+
}, ge = (e) => _r[e];
|
|
2277
2270
|
function O(e, t) {
|
|
2278
2271
|
if (t) {
|
|
2279
|
-
if (
|
|
2280
|
-
} else if (
|
|
2272
|
+
if (un.escapeTest.test(e)) return e.replace(un.escapeReplace, ge);
|
|
2273
|
+
} else if (un.escapeTestNoEncode.test(e)) return e.replace(un.escapeReplaceNoEncode, ge);
|
|
2281
2274
|
return e;
|
|
2282
2275
|
}
|
|
2283
2276
|
function V(e) {
|
|
2284
2277
|
try {
|
|
2285
|
-
e = encodeURI(e).replace(
|
|
2278
|
+
e = encodeURI(e).replace(un.percentDecode, "%");
|
|
2286
2279
|
} catch {
|
|
2287
2280
|
return null;
|
|
2288
2281
|
}
|
|
2289
2282
|
return e;
|
|
2290
2283
|
}
|
|
2291
2284
|
function Y(e, t) {
|
|
2292
|
-
let n = e.replace(
|
|
2285
|
+
let n = e.replace(un.findPipe, (e, t, n) => {
|
|
2293
2286
|
let r = !1, i = t;
|
|
2294
2287
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
2295
2288
|
return r ? "|" : " |";
|
|
2296
|
-
}).split(
|
|
2289
|
+
}).split(un.splitPipe), r = 0;
|
|
2297
2290
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
2298
2291
|
else for (; n.length < t;) n.push("");
|
|
2299
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
2292
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(un.slashPipe, "|");
|
|
2300
2293
|
return n;
|
|
2301
2294
|
}
|
|
2302
2295
|
function $(e, t, n) {
|
|
@@ -2313,7 +2306,7 @@ function $(e, t, n) {
|
|
|
2313
2306
|
}
|
|
2314
2307
|
function ee(e) {
|
|
2315
2308
|
let t = e.split("\n"), n = t.length - 1;
|
|
2316
|
-
for (; n >= 0 &&
|
|
2309
|
+
for (; n >= 0 && un.blankLine.test(t[n]);) n--;
|
|
2317
2310
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
2318
2311
|
}
|
|
2319
2312
|
function fe(e, t) {
|
|
@@ -2358,7 +2351,7 @@ function ot(e, t, n) {
|
|
|
2358
2351
|
}
|
|
2359
2352
|
var w = class {
|
|
2360
2353
|
constructor(e) {
|
|
2361
|
-
t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e ||
|
|
2354
|
+
t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || sn;
|
|
2362
2355
|
}
|
|
2363
2356
|
space(e) {
|
|
2364
2357
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -2808,24 +2801,24 @@ ${c}` : c;
|
|
|
2808
2801
|
};
|
|
2809
2802
|
}
|
|
2810
2803
|
}
|
|
2811
|
-
},
|
|
2804
|
+
}, vr = class l {
|
|
2812
2805
|
constructor(e) {
|
|
2813
|
-
t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
2806
|
+
t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || sn, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
2814
2807
|
inLink: !1,
|
|
2815
2808
|
inRawBlock: !1,
|
|
2816
2809
|
top: !0
|
|
2817
2810
|
};
|
|
2818
2811
|
let n = {
|
|
2819
|
-
other:
|
|
2820
|
-
block:
|
|
2821
|
-
inline:
|
|
2812
|
+
other: un,
|
|
2813
|
+
block: hr.normal,
|
|
2814
|
+
inline: gr.normal
|
|
2822
2815
|
};
|
|
2823
|
-
this.options.pedantic ? (n.block =
|
|
2816
|
+
this.options.pedantic ? (n.block = hr.pedantic, n.inline = gr.pedantic) : this.options.gfm && (n.block = hr.gfm, this.options.breaks ? n.inline = gr.breaks : n.inline = gr.gfm), this.tokenizer.rules = n;
|
|
2824
2817
|
}
|
|
2825
2818
|
static get rules() {
|
|
2826
2819
|
return {
|
|
2827
|
-
block:
|
|
2828
|
-
inline:
|
|
2820
|
+
block: hr,
|
|
2821
|
+
inline: gr
|
|
2829
2822
|
};
|
|
2830
2823
|
}
|
|
2831
2824
|
static lex(e, t) {
|
|
@@ -2835,7 +2828,7 @@ ${c}` : c;
|
|
|
2835
2828
|
return new l(t).inlineTokens(e);
|
|
2836
2829
|
}
|
|
2837
2830
|
lex(e) {
|
|
2838
|
-
e = e.replace(
|
|
2831
|
+
e = e.replace(un.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
2839
2832
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
2840
2833
|
let t = this.inlineQueue[e];
|
|
2841
2834
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -2843,7 +2836,7 @@ ${c}` : c;
|
|
|
2843
2836
|
return this.inlineQueue = [], this.tokens;
|
|
2844
2837
|
}
|
|
2845
2838
|
blockTokens(e, t = [], n = !1) {
|
|
2846
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
2839
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(un.tabCharGlobal, " ").replace(un.spaceLine, ""));
|
|
2847
2840
|
let r = Infinity;
|
|
2848
2841
|
for (; e;) {
|
|
2849
2842
|
if (e.length < r) r = e.length;
|
|
@@ -3027,13 +3020,13 @@ ${c}` : c;
|
|
|
3027
3020
|
}
|
|
3028
3021
|
}, y = class {
|
|
3029
3022
|
constructor(e) {
|
|
3030
|
-
t(this, "options", void 0), t(this, "parser", void 0), this.options = e ||
|
|
3023
|
+
t(this, "options", void 0), t(this, "parser", void 0), this.options = e || sn;
|
|
3031
3024
|
}
|
|
3032
3025
|
space(e) {
|
|
3033
3026
|
return "";
|
|
3034
3027
|
}
|
|
3035
3028
|
code({ text: e, lang: t, escaped: n }) {
|
|
3036
|
-
let r = (t || "").match(
|
|
3029
|
+
let r = (t || "").match(un.notSpaceStart)?.[0], i = e.replace(un.endingNewline, "") + "\n";
|
|
3037
3030
|
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";
|
|
3038
3031
|
}
|
|
3039
3032
|
blockquote({ tokens: e }) {
|
|
@@ -3161,9 +3154,9 @@ ${e}</tr>
|
|
|
3161
3154
|
checkbox({ raw: e }) {
|
|
3162
3155
|
return e;
|
|
3163
3156
|
}
|
|
3164
|
-
},
|
|
3157
|
+
}, yr = class l {
|
|
3165
3158
|
constructor(e) {
|
|
3166
|
-
t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e ||
|
|
3159
|
+
t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || sn, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
|
|
3167
3160
|
}
|
|
3168
3161
|
static parse(e, t) {
|
|
3169
3162
|
return new l(t).parse(e);
|
|
@@ -3309,9 +3302,9 @@ ${e}</tr>
|
|
|
3309
3302
|
}
|
|
3310
3303
|
return n;
|
|
3311
3304
|
}
|
|
3312
|
-
},
|
|
3305
|
+
}, br = (_Class = class {
|
|
3313
3306
|
constructor(e) {
|
|
3314
|
-
t(this, "options", void 0), t(this, "block", void 0), this.options = e ||
|
|
3307
|
+
t(this, "options", void 0), t(this, "block", void 0), this.options = e || sn;
|
|
3315
3308
|
}
|
|
3316
3309
|
preprocess(e) {
|
|
3317
3310
|
return e;
|
|
@@ -3326,10 +3319,10 @@ ${e}</tr>
|
|
|
3326
3319
|
return e;
|
|
3327
3320
|
}
|
|
3328
3321
|
provideLexer(e = this.block) {
|
|
3329
|
-
return e ?
|
|
3322
|
+
return e ? vr.lex : vr.lexInline;
|
|
3330
3323
|
}
|
|
3331
3324
|
provideParser(e = this.block) {
|
|
3332
|
-
return e ?
|
|
3325
|
+
return e ? yr.parse : yr.parseInline;
|
|
3333
3326
|
}
|
|
3334
3327
|
}, t(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
3335
3328
|
"preprocess",
|
|
@@ -3342,7 +3335,7 @@ ${e}</tr>
|
|
|
3342
3335
|
"processAllTokens"
|
|
3343
3336
|
])), _Class), D = class {
|
|
3344
3337
|
constructor(...e) {
|
|
3345
|
-
t(this, "defaults", z()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser",
|
|
3338
|
+
t(this, "defaults", z()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser", yr), t(this, "Renderer", y), t(this, "TextRenderer", L), t(this, "Lexer", vr), t(this, "Tokenizer", w), t(this, "Hooks", br), this.use(...e);
|
|
3346
3339
|
}
|
|
3347
3340
|
walkTokens(e, t) {
|
|
3348
3341
|
let n = [];
|
|
@@ -3421,13 +3414,13 @@ ${e}</tr>
|
|
|
3421
3414
|
n.tokenizer = t;
|
|
3422
3415
|
}
|
|
3423
3416
|
if (e.hooks) {
|
|
3424
|
-
let t = this.defaults.hooks || new
|
|
3417
|
+
let t = this.defaults.hooks || new br();
|
|
3425
3418
|
for (let n in e.hooks) {
|
|
3426
3419
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
3427
3420
|
if (["options", "block"].includes(n)) continue;
|
|
3428
3421
|
let r = n, i = e.hooks[r], a = t[r];
|
|
3429
|
-
|
|
3430
|
-
if (this.defaults.async &&
|
|
3422
|
+
br.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
3423
|
+
if (this.defaults.async && br.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
3431
3424
|
let n = await i.call(t, e);
|
|
3432
3425
|
return a.call(t, n);
|
|
3433
3426
|
})();
|
|
@@ -3464,10 +3457,10 @@ ${e}</tr>
|
|
|
3464
3457
|
}, this;
|
|
3465
3458
|
}
|
|
3466
3459
|
lexer(e, t) {
|
|
3467
|
-
return
|
|
3460
|
+
return vr.lex(e, t ?? this.defaults);
|
|
3468
3461
|
}
|
|
3469
3462
|
parser(e, t) {
|
|
3470
|
-
return
|
|
3463
|
+
return yr.parse(e, t ?? this.defaults);
|
|
3471
3464
|
}
|
|
3472
3465
|
parseMarkdown(e) {
|
|
3473
3466
|
return (t, n) => {
|
|
@@ -3479,16 +3472,16 @@ ${e}</tr>
|
|
|
3479
3472
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
3480
3473
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
3481
3474
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
3482
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
3475
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? vr.lex : vr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
3483
3476
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
3484
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
3477
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? yr.parse : yr.parseInline)(a, i);
|
|
3485
3478
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
3486
3479
|
})().catch(a);
|
|
3487
3480
|
try {
|
|
3488
3481
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
3489
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
3482
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? vr.lex : vr.lexInline)(t, i);
|
|
3490
3483
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
3491
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
3484
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? yr.parse : yr.parseInline)(n, i);
|
|
3492
3485
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
3493
3486
|
} catch (e) {
|
|
3494
3487
|
return a(e);
|
|
@@ -3505,20 +3498,20 @@ ${e}</tr>
|
|
|
3505
3498
|
throw n;
|
|
3506
3499
|
};
|
|
3507
3500
|
}
|
|
3508
|
-
},
|
|
3501
|
+
}, xr = new D();
|
|
3509
3502
|
function g(e, t) {
|
|
3510
|
-
return
|
|
3503
|
+
return xr.parse(e, t);
|
|
3511
3504
|
}
|
|
3512
3505
|
g.options = g.setOptions = function(e) {
|
|
3513
|
-
return
|
|
3514
|
-
}, g.getDefaults = z, g.defaults =
|
|
3515
|
-
return
|
|
3506
|
+
return xr.setOptions(e), g.defaults = xr.defaults, N(g.defaults), g;
|
|
3507
|
+
}, g.getDefaults = z, g.defaults = sn, g.use = function(...e) {
|
|
3508
|
+
return xr.use(...e), g.defaults = xr.defaults, N(g.defaults), g;
|
|
3516
3509
|
}, g.walkTokens = function(e, t) {
|
|
3517
|
-
return
|
|
3518
|
-
}, g.parseInline =
|
|
3510
|
+
return xr.walkTokens(e, t);
|
|
3511
|
+
}, g.parseInline = xr.parseInline, g.Parser = yr, g.parser = yr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = vr, g.lexer = vr.lex, g.Tokenizer = w, g.Hooks = br, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, yr.parse, vr.lex;
|
|
3519
3512
|
//#endregion
|
|
3520
3513
|
//#region agent/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3521
|
-
var
|
|
3514
|
+
var Sr = ["aria-label"], Cr = { class: "px-4 pb-2 pt-4" }, wr = ["innerHTML"], Tr = ["onClick"], Er = /* @__PURE__ */ k({
|
|
3522
3515
|
__name: "ChatCardBlock",
|
|
3523
3516
|
props: {
|
|
3524
3517
|
spec: {},
|
|
@@ -3529,7 +3522,7 @@ var xr = ["aria-label"], Sr = { class: "px-4 pb-2 pt-4" }, Cr = ["innerHTML"], w
|
|
|
3529
3522
|
let n = e, r = t, i = v(() => {
|
|
3530
3523
|
if (!n.spec.body) return "";
|
|
3531
3524
|
let e = g.parse(n.spec.body, { async: !1 });
|
|
3532
|
-
return
|
|
3525
|
+
return on.sanitize(e, { ADD_ATTR: ["target"] });
|
|
3533
3526
|
}), a = v(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = v(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = v(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = v(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = v(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), f = v(() => n.inverted ? "transparent" : "var(--color-theme-0)");
|
|
3534
3527
|
function actionStyle(e) {
|
|
3535
3528
|
return e === "primary" || e === "destructive" ? {
|
|
@@ -3549,7 +3542,7 @@ var xr = ["aria-label"], Sr = { class: "px-4 pb-2 pt-4" }, Cr = ["innerHTML"], w
|
|
|
3549
3542
|
}),
|
|
3550
3543
|
"aria-label": e.spec.title
|
|
3551
3544
|
}, [
|
|
3552
|
-
S("div",
|
|
3545
|
+
S("div", Cr, [S("div", {
|
|
3553
3546
|
class: "text-[14px] font-semibold leading-tight",
|
|
3554
3547
|
style: M({ color: s.value })
|
|
3555
3548
|
}, U(e.spec.title), 5)]),
|
|
@@ -3558,7 +3551,7 @@ var xr = ["aria-label"], Sr = { class: "px-4 pb-2 pt-4" }, Cr = ["innerHTML"], w
|
|
|
3558
3551
|
class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
|
|
3559
3552
|
style: M({ color: c.value }),
|
|
3560
3553
|
innerHTML: i.value
|
|
3561
|
-
}, null, 12,
|
|
3554
|
+
}, null, 12, wr)) : b("", !0),
|
|
3562
3555
|
e.spec.actions?.length ? (F(), x("div", {
|
|
3563
3556
|
key: 1,
|
|
3564
3557
|
class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
|
|
@@ -3570,15 +3563,15 @@ var xr = ["aria-label"], Sr = { class: "px-4 pb-2 pt-4" }, Cr = ["innerHTML"], w
|
|
|
3570
3563
|
class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
|
|
3571
3564
|
style: M(actionStyle(e.style)),
|
|
3572
3565
|
onClick: (t) => r("action", e.reply)
|
|
3573
|
-
}, U(e.label), 13,
|
|
3574
|
-
], 12,
|
|
3566
|
+
}, U(e.label), 13, Tr))), 128))], 4)) : b("", !0)
|
|
3567
|
+
], 12, Sr));
|
|
3575
3568
|
}
|
|
3576
|
-
}),
|
|
3569
|
+
}), Dr = 112, Or = 52, kr = 14, Ar = 54, jr = 34, Mr = 260;
|
|
3577
3570
|
function nodeWidthFor(e) {
|
|
3578
3571
|
let { orientation: t, maxRows: n, maxWidth: r } = e;
|
|
3579
|
-
if (t === "horizontal" || !r) return
|
|
3580
|
-
let i = r -
|
|
3581
|
-
return Math.min(
|
|
3572
|
+
if (t === "horizontal" || !r) return Dr;
|
|
3573
|
+
let i = r - kr * 2 - (n - 1) * Ar;
|
|
3574
|
+
return Math.min(Mr, Math.max(Dr, Math.floor(i / n)));
|
|
3582
3575
|
}
|
|
3583
3576
|
function orientationFor(e) {
|
|
3584
3577
|
return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
|
|
@@ -3615,11 +3608,11 @@ function buildLayout(e, t, n) {
|
|
|
3615
3608
|
orientation: t,
|
|
3616
3609
|
maxRows: o,
|
|
3617
3610
|
...n === void 0 ? {} : { maxWidth: n }
|
|
3618
|
-
}), u = t === "horizontal" ?
|
|
3611
|
+
}), u = t === "horizontal" ? kr * 2 + s * c + (s - 1) * Ar : kr * 2 + o * c + (o - 1) * Ar, f = t === "horizontal" ? kr * 2 + o * Or + (o - 1) * jr : kr * 2 + s * Or + (s - 1) * jr, p = [];
|
|
3619
3612
|
for (let [e, [, n]] of a.entries()) {
|
|
3620
|
-
let r = (o - n.length) * (t === "horizontal" ? 86 : c +
|
|
3613
|
+
let r = (o - n.length) * (t === "horizontal" ? 86 : c + Ar) / 2;
|
|
3621
3614
|
for (let [i, a] of n.entries()) {
|
|
3622
|
-
let n = t === "horizontal" ?
|
|
3615
|
+
let n = t === "horizontal" ? kr + e * (c + Ar) : kr + r + i * (c + Ar), o = t === "horizontal" ? kr + r + i * 86 : kr + e * 86;
|
|
3623
3616
|
p.push({
|
|
3624
3617
|
id: a.id,
|
|
3625
3618
|
label: a.label,
|
|
@@ -3628,7 +3621,7 @@ function buildLayout(e, t, n) {
|
|
|
3628
3621
|
x: n,
|
|
3629
3622
|
y: o,
|
|
3630
3623
|
width: c,
|
|
3631
|
-
height:
|
|
3624
|
+
height: Or
|
|
3632
3625
|
});
|
|
3633
3626
|
}
|
|
3634
3627
|
}
|
|
@@ -3705,14 +3698,14 @@ function formatChatVisualTick(e) {
|
|
|
3705
3698
|
let { prefix: r, suffix: i } = affixes(n);
|
|
3706
3699
|
return `${r}${formatChatVisualValue({ value: t })}${i}`;
|
|
3707
3700
|
}
|
|
3708
|
-
var
|
|
3701
|
+
var Nr = 5.4, Pr = 10, Fr = 15, Ir = 16;
|
|
3709
3702
|
function planChatVisualXLabels(e) {
|
|
3710
3703
|
let { labels: t, plotWidth: n } = e;
|
|
3711
3704
|
if (!t.length || n <= 0) return {
|
|
3712
3705
|
mode: "horizontal",
|
|
3713
3706
|
entries: []
|
|
3714
3707
|
};
|
|
3715
|
-
let r = t.map((e) => e.length >
|
|
3708
|
+
let r = t.map((e) => e.length > Ir ? `${e.slice(0, Ir - 1).trimEnd()}\u2026` : e), i = t.length - 1;
|
|
3716
3709
|
if (i === 0) return {
|
|
3717
3710
|
mode: "horizontal",
|
|
3718
3711
|
entries: [{
|
|
@@ -3720,14 +3713,14 @@ function planChatVisualXLabels(e) {
|
|
|
3720
3713
|
text: r[0]
|
|
3721
3714
|
}]
|
|
3722
3715
|
};
|
|
3723
|
-
if ((Math.max(...r.map((e) => e.length *
|
|
3716
|
+
if ((Math.max(...r.map((e) => e.length * Nr)) + Pr) * t.length <= n) return {
|
|
3724
3717
|
mode: "horizontal",
|
|
3725
3718
|
entries: r.map((e, t) => ({
|
|
3726
3719
|
index: t,
|
|
3727
3720
|
text: e
|
|
3728
3721
|
}))
|
|
3729
3722
|
};
|
|
3730
|
-
let a = Math.max(2, Math.floor(n /
|
|
3723
|
+
let a = Math.max(2, Math.floor(n / Fr));
|
|
3731
3724
|
if (t.length <= a) return {
|
|
3732
3725
|
mode: "angled",
|
|
3733
3726
|
entries: r.map((e, t) => ({
|
|
@@ -3747,22 +3740,22 @@ function planChatVisualXLabels(e) {
|
|
|
3747
3740
|
}
|
|
3748
3741
|
//#endregion
|
|
3749
3742
|
//#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3750
|
-
var
|
|
3743
|
+
var Lr = [
|
|
3751
3744
|
"data-visual-type",
|
|
3752
3745
|
"data-chart-type",
|
|
3753
3746
|
"data-stacking",
|
|
3754
3747
|
"data-diagram-type",
|
|
3755
3748
|
"aria-label"
|
|
3756
|
-
],
|
|
3749
|
+
], Rr = { class: "mb-2.5" }, zr = ["aria-label"], Br = {
|
|
3757
3750
|
key: 0,
|
|
3758
3751
|
"data-test": "chat-visual-horizontal-bars",
|
|
3759
3752
|
class: "grid gap-3"
|
|
3760
|
-
},
|
|
3753
|
+
}, Vr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Hr = ["viewBox"], Ur = [
|
|
3761
3754
|
"x1",
|
|
3762
3755
|
"x2",
|
|
3763
3756
|
"y1",
|
|
3764
3757
|
"y2"
|
|
3765
|
-
],
|
|
3758
|
+
], Wr = ["x", "y"], Gr = [
|
|
3766
3759
|
"data-row-index",
|
|
3767
3760
|
"data-series-index",
|
|
3768
3761
|
"data-data-key",
|
|
@@ -3770,35 +3763,35 @@ var Ir = [
|
|
|
3770
3763
|
"y",
|
|
3771
3764
|
"width",
|
|
3772
3765
|
"height"
|
|
3773
|
-
],
|
|
3766
|
+
], Kr = ["data-trend-key", "d"], qr = ["d"], Jr = ["cx", "cy"], Yr = ["cx", "cy"], Xr = [
|
|
3774
3767
|
"x",
|
|
3775
3768
|
"y",
|
|
3776
3769
|
"text-anchor",
|
|
3777
3770
|
"transform"
|
|
3778
|
-
],
|
|
3771
|
+
], Zr = {
|
|
3779
3772
|
key: 2,
|
|
3780
3773
|
class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
|
|
3781
|
-
},
|
|
3774
|
+
}, Qr = {
|
|
3782
3775
|
key: 1,
|
|
3783
3776
|
class: "grid gap-3"
|
|
3784
|
-
},
|
|
3777
|
+
}, $r = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, ei = { class: "shrink-0 tabular-nums" }, ti = {
|
|
3785
3778
|
key: 2,
|
|
3786
3779
|
class: "overflow-x-auto"
|
|
3787
|
-
},
|
|
3780
|
+
}, ni = ["viewBox", "aria-label"], ri = [
|
|
3788
3781
|
"data-from",
|
|
3789
3782
|
"data-to",
|
|
3790
3783
|
"x1",
|
|
3791
3784
|
"y1",
|
|
3792
3785
|
"x2",
|
|
3793
3786
|
"y2"
|
|
3794
|
-
],
|
|
3787
|
+
], ii = ["cx", "cy"], ai = ["x", "y"], oi = [
|
|
3795
3788
|
"data-node-id",
|
|
3796
3789
|
"data-node-kind",
|
|
3797
3790
|
"transform"
|
|
3798
|
-
],
|
|
3791
|
+
], si = ["points"], ci = ["width", "height"], li = ["width", "height"], ui = {
|
|
3799
3792
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
3800
3793
|
class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
|
|
3801
|
-
},
|
|
3794
|
+
}, di = /* @__PURE__ */ k({
|
|
3802
3795
|
__name: "ChatVisualBlock",
|
|
3803
3796
|
props: {
|
|
3804
3797
|
result: {},
|
|
@@ -4103,7 +4096,7 @@ var Ir = [
|
|
|
4103
4096
|
}),
|
|
4104
4097
|
"aria-label": o.value.meta.title
|
|
4105
4098
|
}, [
|
|
4106
|
-
S("header",
|
|
4099
|
+
S("header", Rr, [S("h4", {
|
|
4107
4100
|
class: "text-[13px] font-semibold leading-tight",
|
|
4108
4101
|
style: M({ color: W.value })
|
|
4109
4102
|
}, U(o.value.meta.title), 5), o.value.meta.description ? (F(), x("p", {
|
|
@@ -4118,11 +4111,11 @@ var Ir = [
|
|
|
4118
4111
|
key: 0,
|
|
4119
4112
|
role: "img",
|
|
4120
4113
|
"aria-label": o.value.meta.title
|
|
4121
|
-
}, [B.value.length ? (F(), x("div",
|
|
4114
|
+
}, [B.value.length ? (F(), x("div", Br, [(F(!0), x(h, null, R(B.value, (e) => (F(), x("div", {
|
|
4122
4115
|
key: e.key,
|
|
4123
4116
|
"data-test": "chat-visual-horizontal-bar",
|
|
4124
4117
|
class: "min-w-0"
|
|
4125
|
-
}, [S("div",
|
|
4118
|
+
}, [S("div", Vr, [S("span", {
|
|
4126
4119
|
class: "line-clamp-2 min-w-0 font-medium leading-snug",
|
|
4127
4120
|
style: M({ color: W.value })
|
|
4128
4121
|
}, U(e.label), 5), S("span", {
|
|
@@ -4154,7 +4147,7 @@ var Ir = [
|
|
|
4154
4147
|
"stroke-width": "1",
|
|
4155
4148
|
"vector-effect": "non-scaling-stroke",
|
|
4156
4149
|
style: M({ stroke: e === 0 ? K.value : _e.value })
|
|
4157
|
-
}, null, 12,
|
|
4150
|
+
}, null, 12, Ur))), 128)),
|
|
4158
4151
|
S("g", null, [(F(!0), x(h, null, R(C.value.ticks, (e) => (F(), x("text", {
|
|
4159
4152
|
key: `y-${e}`,
|
|
4160
4153
|
x: A.value.left - 7,
|
|
@@ -4165,7 +4158,7 @@ var Ir = [
|
|
|
4165
4158
|
}, U(ae(formatChatVisualTick)({
|
|
4166
4159
|
value: e,
|
|
4167
4160
|
shared: T.value
|
|
4168
|
-
})), 13,
|
|
4161
|
+
})), 13, Wr))), 128))]),
|
|
4169
4162
|
f.value.chartType === "bar" ? (F(!0), x(h, { key: 0 }, R(re.value, (e) => (F(), x("rect", {
|
|
4170
4163
|
key: e.key,
|
|
4171
4164
|
"data-test": "chat-visual-bar",
|
|
@@ -4178,7 +4171,7 @@ var Ir = [
|
|
|
4178
4171
|
height: e.height,
|
|
4179
4172
|
rx: "2.5",
|
|
4180
4173
|
style: M({ fill: seriesColor(e.seriesIndex) })
|
|
4181
|
-
}, null, 12,
|
|
4174
|
+
}, null, 12, Gr))), 128)) : (F(), x(h, { key: 1 }, [
|
|
4182
4175
|
j.value ? (F(), x("path", {
|
|
4183
4176
|
key: 0,
|
|
4184
4177
|
"data-test": "chat-visual-trend-line",
|
|
@@ -4191,7 +4184,7 @@ var Ir = [
|
|
|
4191
4184
|
"stroke-dasharray": "4 3",
|
|
4192
4185
|
"vector-effect": "non-scaling-stroke",
|
|
4193
4186
|
style: M({ stroke: seriesColor(j.value.seriesIndex) })
|
|
4194
|
-
}, null, 12,
|
|
4187
|
+
}, null, 12, Kr)) : b("", !0),
|
|
4195
4188
|
(F(!0), x(h, null, R(p.value, (e, t) => (F(), x("g", { key: e.dataKey }, [f.value.chartType === "line" ? (F(), x("path", {
|
|
4196
4189
|
key: 0,
|
|
4197
4190
|
d: pathForSeries(e.dataKey),
|
|
@@ -4201,20 +4194,20 @@ var Ir = [
|
|
|
4201
4194
|
"stroke-linejoin": "round",
|
|
4202
4195
|
"vector-effect": "non-scaling-stroke",
|
|
4203
4196
|
style: M({ stroke: seriesColor(t) })
|
|
4204
|
-
}, null, 12,
|
|
4197
|
+
}, null, 12, qr)) : b("", !0), (F(!0), x(h, null, R(u.value, (n, r) => (F(), x(h, { key: `${e.dataKey}-${r}` }, [f.value.chartType === "scatter" ? (F(), x("circle", {
|
|
4205
4198
|
key: 0,
|
|
4206
4199
|
cx: xForIndex(r, u.value.length),
|
|
4207
4200
|
cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
|
|
4208
4201
|
r: "2.6",
|
|
4209
4202
|
style: M({ fill: seriesColor(t) })
|
|
4210
|
-
}, null, 12,
|
|
4203
|
+
}, null, 12, Jr)) : b("", !0)], 64))), 128))]))), 128)),
|
|
4211
4204
|
(F(!0), x(h, null, R(se.value, (e) => (F(), x("circle", {
|
|
4212
4205
|
key: `marker-${e.key}`,
|
|
4213
4206
|
cx: e.cx,
|
|
4214
4207
|
cy: e.cy,
|
|
4215
4208
|
r: "3",
|
|
4216
4209
|
style: M({ fill: seriesColor(e.seriesIndex) })
|
|
4217
|
-
}, null, 12,
|
|
4210
|
+
}, null, 12, Yr))), 128))
|
|
4218
4211
|
], 64)),
|
|
4219
4212
|
(F(!0), x(h, null, R(ie.value, (e) => (F(), x("text", {
|
|
4220
4213
|
key: e.key,
|
|
@@ -4224,8 +4217,8 @@ var Ir = [
|
|
|
4224
4217
|
"font-size": "9.5",
|
|
4225
4218
|
transform: e.angled ? `rotate(${ae(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
|
|
4226
4219
|
style: M({ fill: G.value })
|
|
4227
|
-
}, U(e.label), 13,
|
|
4228
|
-
], 12,
|
|
4220
|
+
}, U(e.label), 13, Xr))), 128))
|
|
4221
|
+
], 12, Hr)), oe.value.length > 1 || f.value.chartType !== "bar" ? (F(), x("div", Zr, [(F(!0), x(h, null, R(oe.value, (e) => (F(), x("div", {
|
|
4229
4222
|
key: e.key,
|
|
4230
4223
|
class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
|
|
4231
4224
|
}, [
|
|
@@ -4238,10 +4231,10 @@ var Ir = [
|
|
|
4238
4231
|
class: "font-semibold tabular-nums",
|
|
4239
4232
|
style: M({ color: W.value })
|
|
4240
4233
|
}, U(e.value), 5)
|
|
4241
|
-
]))), 128))])) : b("", !0)], 8,
|
|
4234
|
+
]))), 128))])) : b("", !0)], 8, zr)) : m.value ? (F(), x("div", Qr, [(F(!0), x(h, null, R(ce.value, (e, t) => (F(), x("div", { key: e.key }, [S("div", $r, [S("span", {
|
|
4242
4235
|
class: "truncate font-medium",
|
|
4243
4236
|
style: M({ color: W.value })
|
|
4244
|
-
}, U(e.name), 5), S("span",
|
|
4237
|
+
}, U(e.name), 5), S("span", ei, [S("span", {
|
|
4245
4238
|
class: "font-semibold",
|
|
4246
4239
|
style: M({ color: W.value })
|
|
4247
4240
|
}, U(e.display), 5), S("span", {
|
|
@@ -4256,7 +4249,7 @@ var Ir = [
|
|
|
4256
4249
|
width: `${Math.max(2, e.percent * 100)}%`,
|
|
4257
4250
|
background: seriesColor(t)
|
|
4258
4251
|
})
|
|
4259
|
-
}, null, 4)], 4)]))), 128))])) : c.value && ue.value ? (F(), x("div",
|
|
4252
|
+
}, null, 4)], 4)]))), 128))])) : c.value && ue.value ? (F(), x("div", ti, [(F(), x("svg", {
|
|
4260
4253
|
"data-test": "chat-visual-diagram-svg",
|
|
4261
4254
|
class: "block h-auto overflow-visible",
|
|
4262
4255
|
viewBox: `0 0 ${ue.value.width} ${ue.value.height}`,
|
|
@@ -4280,14 +4273,14 @@ var Ir = [
|
|
|
4280
4273
|
"stroke-linecap": "round",
|
|
4281
4274
|
"vector-effect": "non-scaling-stroke",
|
|
4282
4275
|
style: M({ stroke: be.value })
|
|
4283
|
-
}, null, 12,
|
|
4276
|
+
}, null, 12, ri))), 128)),
|
|
4284
4277
|
(F(!0), x(h, null, R(ue.value.edges, (e) => (F(), x("circle", {
|
|
4285
4278
|
key: `${e.key}-dot`,
|
|
4286
4279
|
cx: e.x2,
|
|
4287
4280
|
cy: e.y2,
|
|
4288
4281
|
r: "2.4",
|
|
4289
4282
|
style: M({ fill: be.value })
|
|
4290
|
-
}, null, 12,
|
|
4283
|
+
}, null, 12, ii))), 128)),
|
|
4291
4284
|
(F(!0), x(h, null, R(ue.value.edges.filter((e) => e.label), (e) => (F(), x("foreignObject", {
|
|
4292
4285
|
key: `${e.key}-label`,
|
|
4293
4286
|
x: e.labelX - 55,
|
|
@@ -4301,7 +4294,7 @@ var Ir = [
|
|
|
4301
4294
|
color: he.value,
|
|
4302
4295
|
background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
|
|
4303
4296
|
})
|
|
4304
|
-
}, U(e.label), 5)], 8,
|
|
4297
|
+
}, U(e.label), 5)], 8, ai))), 128)),
|
|
4305
4298
|
(F(!0), x(h, null, R(ue.value.nodes, (e) => (F(), x("g", {
|
|
4306
4299
|
key: e.id,
|
|
4307
4300
|
"data-test": "chat-visual-diagram-node",
|
|
@@ -4317,7 +4310,7 @@ var Ir = [
|
|
|
4317
4310
|
fill: diagramNodeFill(e.kind),
|
|
4318
4311
|
stroke: diagramNodeStroke(e.kind)
|
|
4319
4312
|
})
|
|
4320
|
-
}, null, 12,
|
|
4313
|
+
}, null, 12, si)) : (F(), x("rect", {
|
|
4321
4314
|
key: 1,
|
|
4322
4315
|
width: e.width,
|
|
4323
4316
|
height: e.height,
|
|
@@ -4328,28 +4321,28 @@ var Ir = [
|
|
|
4328
4321
|
fill: diagramNodeFill(e.kind),
|
|
4329
4322
|
stroke: diagramNodeStroke(e.kind)
|
|
4330
4323
|
})
|
|
4331
|
-
}, null, 12,
|
|
4324
|
+
}, null, 12, ci)), (F(), x("foreignObject", {
|
|
4332
4325
|
x: "8",
|
|
4333
4326
|
y: "5",
|
|
4334
4327
|
width: e.width - 16,
|
|
4335
4328
|
height: e.height - 10
|
|
4336
|
-
}, [S("div",
|
|
4329
|
+
}, [S("div", ui, [S("div", {
|
|
4337
4330
|
class: "line-clamp-2 text-[13px] font-medium leading-snug",
|
|
4338
4331
|
style: M({ color: W.value })
|
|
4339
4332
|
}, U(e.label), 5), e.detail ? (F(), x("div", {
|
|
4340
4333
|
key: 0,
|
|
4341
4334
|
class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
|
|
4342
4335
|
style: M({ color: he.value })
|
|
4343
|
-
}, U(e.detail), 5)) : b("", !0)])], 8,
|
|
4344
|
-
], 12,
|
|
4336
|
+
}, U(e.detail), 5)) : b("", !0)])], 8, li))], 8, oi))), 128))
|
|
4337
|
+
], 12, ni))])) : b("", !0)], 512),
|
|
4345
4338
|
o.value.meta.footer ? (F(), x("footer", {
|
|
4346
4339
|
key: 0,
|
|
4347
4340
|
class: "mt-3 text-[11px] leading-snug",
|
|
4348
4341
|
style: M({ color: G.value })
|
|
4349
4342
|
}, U(o.value.meta.footer), 5)) : b("", !0)
|
|
4350
|
-
], 12,
|
|
4343
|
+
], 12, Lr)) : b("", !0);
|
|
4351
4344
|
}
|
|
4352
|
-
}),
|
|
4345
|
+
}), fi = ["innerHTML"], pi = /* @__PURE__ */ k({
|
|
4353
4346
|
__name: "ChatRichText",
|
|
4354
4347
|
props: {
|
|
4355
4348
|
text: {},
|
|
@@ -4389,7 +4382,7 @@ var Ir = [
|
|
|
4389
4382
|
function renderMarkdown(e) {
|
|
4390
4383
|
if (!e) return "";
|
|
4391
4384
|
let t = g.parse(e, { async: !1 });
|
|
4392
|
-
return
|
|
4385
|
+
return on.sanitize(t, {
|
|
4393
4386
|
ADD_ATTR: ["target"],
|
|
4394
4387
|
ADD_DATA_URI_TAGS: ["img"]
|
|
4395
4388
|
});
|
|
@@ -4527,11 +4520,11 @@ var Ir = [
|
|
|
4527
4520
|
key: 0,
|
|
4528
4521
|
class: j(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
|
|
4529
4522
|
innerHTML: t.html
|
|
4530
|
-
}, null, 10,
|
|
4523
|
+
}, null, 10, fi)) : t.kind === "visual" ? (F(), te(di, {
|
|
4531
4524
|
key: 1,
|
|
4532
4525
|
result: t.result,
|
|
4533
4526
|
inverted: e.inverted
|
|
4534
|
-
}, null, 8, ["result", "inverted"])) : t.kind === "card" ? (F(), te(
|
|
4527
|
+
}, null, 8, ["result", "inverted"])) : t.kind === "card" ? (F(), te(Er, {
|
|
4535
4528
|
key: 2,
|
|
4536
4529
|
spec: t.spec,
|
|
4537
4530
|
inverted: e.inverted,
|
|
@@ -4551,7 +4544,7 @@ var Ir = [
|
|
|
4551
4544
|
style: { background: "currentcolor" }
|
|
4552
4545
|
}, null, -1), C(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
|
|
4553
4546
|
}
|
|
4554
|
-
}),
|
|
4547
|
+
}), mi = 80, hi = 600, gi = /* @__PURE__ */ k({
|
|
4555
4548
|
__name: "ChatScroller",
|
|
4556
4549
|
setup(e, { expose: t }) {
|
|
4557
4550
|
let n = I(), r = I(), i = I(!0), a, o, s = 0;
|
|
@@ -4561,10 +4554,10 @@ var Ir = [
|
|
|
4561
4554
|
}
|
|
4562
4555
|
function onScroll() {
|
|
4563
4556
|
let e = n.value;
|
|
4564
|
-
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
4557
|
+
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= mi);
|
|
4565
4558
|
}
|
|
4566
4559
|
function markUserGesture() {
|
|
4567
|
-
s = Date.now() +
|
|
4560
|
+
s = Date.now() + hi;
|
|
4568
4561
|
}
|
|
4569
4562
|
function followPinned() {
|
|
4570
4563
|
i.value && Date.now() > s && scrollToBottom();
|
|
@@ -4596,7 +4589,7 @@ var Ir = [
|
|
|
4596
4589
|
class: "flex-1 flex flex-col"
|
|
4597
4590
|
}, [ie(e.$slots, "default")], 512)], 34));
|
|
4598
4591
|
}
|
|
4599
|
-
}),
|
|
4592
|
+
}), _i = {
|
|
4600
4593
|
VOICE_MIC_UNAVAILABLE: "I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",
|
|
4601
4594
|
VOICE_AGENT_UNAVAILABLE: "Your assistant didn't pick up. Give it a moment and start the call again.",
|
|
4602
4595
|
VOICE_CONNECT_TIMEOUT: "The call took too long to connect. Try again in a moment.",
|
|
@@ -4604,21 +4597,21 @@ var Ir = [
|
|
|
4604
4597
|
VOICE_UNAVAILABLE: "Voice isn't available right now. You can keep going by typing.",
|
|
4605
4598
|
VOICE_MINT_INVALID: "That call couldn't be started. Refresh the page and try again.",
|
|
4606
4599
|
VOICE_PROVIDER_ERROR: "The call ended unexpectedly. Try again, or keep going by typing."
|
|
4607
|
-
},
|
|
4600
|
+
}, vi = "The call ended unexpectedly. Try again, or keep going by typing.";
|
|
4608
4601
|
function voiceErrorMessage(e) {
|
|
4609
|
-
return e &&
|
|
4602
|
+
return e && _i[e] || vi;
|
|
4610
4603
|
}
|
|
4611
4604
|
//#endregion
|
|
4612
4605
|
//#region agent/ui/VoiceHistogramController.ts
|
|
4613
|
-
var
|
|
4606
|
+
var yi = [
|
|
4614
4607
|
0,
|
|
4615
4608
|
2,
|
|
4616
4609
|
4,
|
|
4617
4610
|
6,
|
|
4618
4611
|
8
|
|
4619
|
-
],
|
|
4612
|
+
], bi = 5, xi = 33, Si = .7, Ci = .1, wi = 60, Ti = 320, Ei = .55, Di = .1, Oi = .32, ki = .9, Ai = yi.map(() => 0), ji = yi.map(() => bi), VoiceHistogramController = class {
|
|
4620
4613
|
constructor(e = typeof window > "u" ? void 0 : window) {
|
|
4621
|
-
t(this, "browser", void 0), t(this, "heights", H(
|
|
4614
|
+
t(this, "browser", void 0), t(this, "heights", H(ji)), t(this, "targetBars", Ai), t(this, "displayBars", Ai), t(this, "level", {
|
|
4622
4615
|
source: "mic",
|
|
4623
4616
|
level: 0
|
|
4624
4617
|
}), t(this, "isMuted", !1), t(this, "usesIdleWave", !1), t(this, "frameId", 0), t(this, "lastFrameAt", 0), t(this, "easeFrame", (e) => {
|
|
@@ -4627,12 +4620,12 @@ var vi = [
|
|
|
4627
4620
|
this.frameId = 0;
|
|
4628
4621
|
let n = Math.min(64, Math.max(0, e - this.lastFrameAt));
|
|
4629
4622
|
this.lastFrameAt = e;
|
|
4630
|
-
let r = this.usesIdleWave ?
|
|
4631
|
-
let r = e / 1e3 *
|
|
4632
|
-
return
|
|
4623
|
+
let r = this.usesIdleWave ? yi.map((t, n) => {
|
|
4624
|
+
let r = e / 1e3 * Ei * 2 * Math.PI - n * ki;
|
|
4625
|
+
return Di + Oi * (Math.sin(r) + 1) / 2;
|
|
4633
4626
|
}) : this.targetBars;
|
|
4634
4627
|
this.displayBars = this.displayBars.map((e, t) => {
|
|
4635
|
-
let i = r[t] ?? 0, a = i > e ?
|
|
4628
|
+
let i = r[t] ?? 0, a = i > e ? wi : Ti;
|
|
4636
4629
|
return e + (i - e) * (1 - Math.exp(-n / a));
|
|
4637
4630
|
}), this.publish();
|
|
4638
4631
|
let i = this.displayBars.every((e, t) => Math.abs((r[t] ?? 0) - e) <= 5e-4);
|
|
@@ -4652,20 +4645,20 @@ var vi = [
|
|
|
4652
4645
|
this.frameId && this.browser?.cancelAnimationFrame(this.frameId), this.frameId = 0;
|
|
4653
4646
|
}
|
|
4654
4647
|
updateTargets() {
|
|
4655
|
-
let gate = (e) => Math.max(0, e -
|
|
4656
|
-
this.targetBars =
|
|
4648
|
+
let gate = (e) => Math.max(0, e - Ci) / (1 - Ci), e = this.isMuted && this.level.source === "mic";
|
|
4649
|
+
this.targetBars = yi.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
|
|
4657
4650
|
}
|
|
4658
4651
|
start() {
|
|
4659
4652
|
if (!this.browser || this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
4660
|
-
this.displayBars = this.usesIdleWave ?
|
|
4653
|
+
this.displayBars = this.usesIdleWave ? Ai : this.targetBars, this.publish();
|
|
4661
4654
|
return;
|
|
4662
4655
|
}
|
|
4663
4656
|
this.frameId || (this.lastFrameAt = this.browser.performance.now(), this.frameId = this.browser.requestAnimationFrame(this.easeFrame));
|
|
4664
4657
|
}
|
|
4665
4658
|
publish() {
|
|
4666
|
-
this.heights.value = this.displayBars.map((e) => Math.round((
|
|
4659
|
+
this.heights.value = this.displayBars.map((e) => Math.round((bi + Math.min(1, Math.max(0, e)) ** Si * xi) * 10) / 10);
|
|
4667
4660
|
}
|
|
4668
|
-
},
|
|
4661
|
+
}, Mi = {
|
|
4669
4662
|
connecting: {
|
|
4670
4663
|
label: "Connecting",
|
|
4671
4664
|
tone: "bg-amber-500",
|
|
@@ -4703,7 +4696,7 @@ function deriveActivity(e) {
|
|
|
4703
4696
|
return e.hadError ? "error" : e.sessionState === "live" ? e.speaking.agent ? "speaking" : e.speaking.user ? "listening" : e.work.active ? "working" : e.providerThinking ? "thinking" : "listening" : "connecting";
|
|
4704
4697
|
}
|
|
4705
4698
|
function deriveVoiceModePresentation(e) {
|
|
4706
|
-
let t = deriveActivity(e), n =
|
|
4699
|
+
let t = deriveActivity(e), n = Mi[t], r = t === "working" ? e.work.description || "Working on it" : n.label, i = t === "working" ? r : n.visibleText ?? "", a = e.takingLonger && (t === "thinking" || t === "working"), o = a ? `${i} ${ye.slowHint}` : i;
|
|
4707
4700
|
return {
|
|
4708
4701
|
activity: t,
|
|
4709
4702
|
label: a ? o : r,
|
|
@@ -4715,32 +4708,32 @@ function deriveVoiceModePresentation(e) {
|
|
|
4715
4708
|
}
|
|
4716
4709
|
//#endregion
|
|
4717
4710
|
//#region agent/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
|
|
4718
|
-
var
|
|
4711
|
+
var Ni = ["data-voice-state", "data-voice-activity"], Pi = ["src"], Fi = {
|
|
4719
4712
|
key: 1,
|
|
4720
4713
|
"data-test": "voice-background-fallback",
|
|
4721
4714
|
"aria-hidden": "true",
|
|
4722
4715
|
class: "pointer-events-none absolute inset-0 bg-[#0A1522]"
|
|
4723
|
-
},
|
|
4716
|
+
}, Ii = {
|
|
4724
4717
|
"data-test": "voice-stage",
|
|
4725
4718
|
class: "relative z-10 flex flex-1 flex-col items-center px-8"
|
|
4726
|
-
},
|
|
4719
|
+
}, Li = { "data-voice-assistant-avatar": "" }, Ri = {
|
|
4727
4720
|
"data-test": "voice-lower-stage",
|
|
4728
4721
|
class: "flex flex-1 flex-col items-center pt-10"
|
|
4729
|
-
},
|
|
4722
|
+
}, zi = {
|
|
4730
4723
|
"data-test": "voice-histogram",
|
|
4731
4724
|
"aria-hidden": "true",
|
|
4732
4725
|
class: "flex h-[38px] items-center gap-[5px]"
|
|
4733
|
-
},
|
|
4726
|
+
}, Bi = {
|
|
4734
4727
|
"data-test": "voice-presence-status",
|
|
4735
4728
|
role: "status",
|
|
4736
4729
|
"aria-live": "polite",
|
|
4737
4730
|
class: "sr-only"
|
|
4738
|
-
},
|
|
4731
|
+
}, Vi = ["data-taking-longer"], Hi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Ui = [
|
|
4739
4732
|
"disabled",
|
|
4740
4733
|
"aria-label",
|
|
4741
4734
|
"aria-pressed",
|
|
4742
4735
|
"title"
|
|
4743
|
-
],
|
|
4736
|
+
], Wi = /* @__PURE__ */ k({
|
|
4744
4737
|
__name: "VoiceMode",
|
|
4745
4738
|
props: {
|
|
4746
4739
|
agent: {},
|
|
@@ -4768,7 +4761,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4768
4761
|
ce(() => I.value.usesIdleWave, (e) => _.setIdleWave(e), { immediate: !0 }), ce(m, (e) => _.setMuted(e), { immediate: !0 }), ce(ie, (e) => {
|
|
4769
4762
|
P && clearTimeout(P), c.value = !1, e && (P = setTimeout(() => {
|
|
4770
4763
|
P = void 0, c.value = !0;
|
|
4771
|
-
},
|
|
4764
|
+
}, be), P.unref?.());
|
|
4772
4765
|
}, { immediate: !0 });
|
|
4773
4766
|
async function end() {
|
|
4774
4767
|
k = !0, await f.value?.end();
|
|
@@ -4832,42 +4825,42 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4832
4825
|
"aria-hidden": "true",
|
|
4833
4826
|
draggable: "false",
|
|
4834
4827
|
class: "pointer-events-none absolute inset-0 size-full object-cover"
|
|
4835
|
-
}, null, 8,
|
|
4828
|
+
}, null, 8, Pi)) : (F(), x("div", Fi)),
|
|
4836
4829
|
n[2] || (n[2] = S("div", {
|
|
4837
4830
|
"data-test": "voice-background-overlay",
|
|
4838
4831
|
"aria-hidden": "true",
|
|
4839
4832
|
class: "pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/82 via-[#050F19]/90 to-[#050F19]/99"
|
|
4840
4833
|
}, null, -1)),
|
|
4841
|
-
S("div",
|
|
4834
|
+
S("div", Ii, [
|
|
4842
4835
|
n[0] || (n[0] = S("div", {
|
|
4843
4836
|
"data-test": "voice-stage-spacer",
|
|
4844
4837
|
"aria-hidden": "true",
|
|
4845
4838
|
class: "flex-1"
|
|
4846
4839
|
}, null, -1)),
|
|
4847
|
-
S("div",
|
|
4840
|
+
S("div", Li, [T(Ge, {
|
|
4848
4841
|
agent: e.agent,
|
|
4849
4842
|
"show-status": !1,
|
|
4850
4843
|
"show-owner-mark": !1,
|
|
4851
4844
|
"is-light": !1,
|
|
4852
4845
|
class: "size-32"
|
|
4853
4846
|
}, null, 8, ["agent"])]),
|
|
4854
|
-
S("div",
|
|
4855
|
-
S("div",
|
|
4847
|
+
S("div", Ri, [
|
|
4848
|
+
S("div", zi, [(F(!0), x(h, null, R(ae(te), (e, t) => (F(), x("span", {
|
|
4856
4849
|
key: t,
|
|
4857
4850
|
"data-test": "voice-histogram-bar",
|
|
4858
4851
|
class: j(["w-[5px] rounded-full transition-colors duration-150", I.value.tone]),
|
|
4859
4852
|
style: M({ height: `${e}px` })
|
|
4860
4853
|
}, null, 6))), 128))]),
|
|
4861
|
-
S("div",
|
|
4854
|
+
S("div", Bi, U(I.value.label), 1),
|
|
4862
4855
|
S("p", {
|
|
4863
4856
|
"data-test": "voice-visible-status",
|
|
4864
4857
|
"data-taking-longer": I.value.takingLonger || void 0,
|
|
4865
4858
|
"aria-hidden": "true",
|
|
4866
4859
|
class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
|
|
4867
|
-
}, U(I.value.visibleStatus), 9,
|
|
4860
|
+
}, U(I.value.visibleStatus), 9, Vi)
|
|
4868
4861
|
])
|
|
4869
4862
|
]),
|
|
4870
|
-
S("div",
|
|
4863
|
+
S("div", Hi, [S("button", {
|
|
4871
4864
|
ref_key: "endButton",
|
|
4872
4865
|
ref: b,
|
|
4873
4866
|
type: "button",
|
|
@@ -4893,27 +4886,27 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4893
4886
|
}, [S("i", {
|
|
4894
4887
|
class: j([m.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
|
|
4895
4888
|
"aria-hidden": "true"
|
|
4896
|
-
}, null, 2)], 10,
|
|
4897
|
-
], 40,
|
|
4889
|
+
}, null, 2)], 10, Ui)])
|
|
4890
|
+
], 40, Ni));
|
|
4898
4891
|
}
|
|
4899
|
-
}),
|
|
4892
|
+
}), Gi = {
|
|
4900
4893
|
key: 0,
|
|
4901
4894
|
class: "pb-4"
|
|
4902
|
-
},
|
|
4895
|
+
}, Ki = {
|
|
4903
4896
|
key: 1,
|
|
4904
4897
|
"data-test": "messaging-sdk-header",
|
|
4905
4898
|
class: "shrink-0 border-b border-theme-100 px-4 py-3"
|
|
4906
|
-
},
|
|
4899
|
+
}, qi = { class: "min-w-0 flex-1" }, Ji = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Yi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Xi = {
|
|
4907
4900
|
key: 0,
|
|
4908
4901
|
class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
|
|
4909
|
-
},
|
|
4902
|
+
}, Zi = ["aria-label"], Qi = {
|
|
4910
4903
|
key: 0,
|
|
4911
4904
|
"data-test": "messaging-empty-state",
|
|
4912
4905
|
class: "flex flex-col items-center justify-center px-4"
|
|
4913
|
-
},
|
|
4906
|
+
}, $i = ["title"], ea = {
|
|
4914
4907
|
key: 0,
|
|
4915
4908
|
class: "flex items-center gap-3 py-3 px-2"
|
|
4916
|
-
},
|
|
4909
|
+
}, ta = ["data-journal-outcome"], na = [
|
|
4917
4910
|
"data-message-id",
|
|
4918
4911
|
"data-message-sender",
|
|
4919
4912
|
"data-conversation-id",
|
|
@@ -4924,7 +4917,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4924
4917
|
"data-issue-action-label",
|
|
4925
4918
|
"data-issue-action-url",
|
|
4926
4919
|
"data-streaming"
|
|
4927
|
-
],
|
|
4920
|
+
], ra = { class: "flex items-center gap-3" }, ia = ["href"], aa = [
|
|
4928
4921
|
"data-message-id",
|
|
4929
4922
|
"data-message-sender",
|
|
4930
4923
|
"data-conversation-id",
|
|
@@ -4933,7 +4926,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4933
4926
|
"data-issue-code",
|
|
4934
4927
|
"data-issue-bucket",
|
|
4935
4928
|
"data-streaming"
|
|
4936
|
-
],
|
|
4929
|
+
], oa = [
|
|
4937
4930
|
"data-test",
|
|
4938
4931
|
"data-message-id",
|
|
4939
4932
|
"data-message-sender",
|
|
@@ -4943,58 +4936,58 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
4943
4936
|
"data-streaming",
|
|
4944
4937
|
"data-queued",
|
|
4945
4938
|
"aria-label"
|
|
4946
|
-
],
|
|
4939
|
+
], sa = ["src", "alt"], ca = ["src"], la = ["href"], ua = {
|
|
4947
4940
|
key: 0,
|
|
4948
4941
|
"data-test": "messaging-message-text-part"
|
|
4949
|
-
},
|
|
4942
|
+
}, da = [
|
|
4950
4943
|
"src",
|
|
4951
4944
|
"alt",
|
|
4952
4945
|
"data-attachment-placement"
|
|
4953
|
-
],
|
|
4946
|
+
], fa = ["src", "data-attachment-placement"], pa = ["href", "data-attachment-placement"], ma = ["data-journal-outcome"], ha = ["data-journal-outcome"], ga = ["data-test", "data-working-description"], _a = {
|
|
4954
4947
|
key: 0,
|
|
4955
4948
|
class: "truncate"
|
|
4956
|
-
},
|
|
4949
|
+
}, va = {
|
|
4957
4950
|
key: 1,
|
|
4958
4951
|
class: "sr-only"
|
|
4959
|
-
},
|
|
4952
|
+
}, ya = ["data-issue-code"], ba = { class: "min-w-0 flex-1" }, xa = {
|
|
4960
4953
|
"data-test": "messaging-transient-issue-title",
|
|
4961
4954
|
class: "font-medium"
|
|
4962
|
-
},
|
|
4955
|
+
}, Sa = { "data-test": "messaging-transient-issue-help" }, Ca = ["href"], wa = ["inert", "aria-hidden"], Ta = ["data-seat-state"], Ea = ["src", "alt"], Da = { class: "max-w-20 truncate" }, Oa = ["onClick"], ka = {
|
|
4963
4956
|
key: 0,
|
|
4964
4957
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
4965
|
-
},
|
|
4958
|
+
}, Aa = ["data-composer-action"], ja = ["placeholder", "disabled"], Ma = { class: "font-mono text-sm tabular-nums" }, Na = { class: "mt-2.5 flex items-center" }, Pa = [
|
|
4966
4959
|
"disabled",
|
|
4967
4960
|
"aria-label",
|
|
4968
4961
|
"title"
|
|
4969
|
-
],
|
|
4962
|
+
], Fa = {
|
|
4970
4963
|
key: 0,
|
|
4971
4964
|
class: "i-svg-spinners-ring-resize size-5"
|
|
4972
|
-
},
|
|
4965
|
+
}, Ia = {
|
|
4973
4966
|
key: 1,
|
|
4974
4967
|
class: "i-tabler-plus size-5"
|
|
4975
|
-
},
|
|
4968
|
+
}, La = { class: "sr-only" }, Ra = { class: "flex items-center gap-2" }, za = ["aria-label", "title"], Ba = { class: "sr-only" }, Va = [
|
|
4976
4969
|
"disabled",
|
|
4977
4970
|
"aria-label",
|
|
4978
4971
|
"title"
|
|
4979
|
-
],
|
|
4972
|
+
], Ha = {
|
|
4980
4973
|
class: "flex h-4 items-center gap-[2px]",
|
|
4981
4974
|
"aria-hidden": "true"
|
|
4982
|
-
},
|
|
4975
|
+
}, Ua = [
|
|
4983
4976
|
"data-composer-action",
|
|
4984
4977
|
"disabled",
|
|
4985
4978
|
"aria-label",
|
|
4986
4979
|
"title"
|
|
4987
|
-
],
|
|
4980
|
+
], Wa = {
|
|
4988
4981
|
key: 0,
|
|
4989
4982
|
class: "i-tabler-player-stop-filled size-3.5"
|
|
4990
|
-
},
|
|
4983
|
+
}, Ga = {
|
|
4991
4984
|
key: 1,
|
|
4992
4985
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4993
|
-
},
|
|
4986
|
+
}, Ka = { class: "sr-only" }, qa = {
|
|
4994
4987
|
key: 2,
|
|
4995
4988
|
"data-test": "messaging-ai-notice",
|
|
4996
4989
|
class: "mx-auto max-w-[640px] @5xl/chat:max-w-[720px] pt-3 text-center text-[11.5px] leading-none text-theme-300"
|
|
4997
|
-
},
|
|
4990
|
+
}, Ja = /*#__PURE__*/ he(/* @__PURE__ */ k({
|
|
4998
4991
|
__name: "ElAgentChat",
|
|
4999
4992
|
props: {
|
|
5000
4993
|
chatController: {},
|
|
@@ -5121,7 +5114,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5121
5114
|
text: t.slice(i)
|
|
5122
5115
|
}), r;
|
|
5123
5116
|
}
|
|
5124
|
-
let
|
|
5117
|
+
let _e = v(() => s.value?.transientIssue), ve = v(() => {
|
|
5125
5118
|
if (!f.value) return;
|
|
5126
5119
|
let e = B.value, t = e[e.length - 1];
|
|
5127
5120
|
return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
|
|
@@ -5140,10 +5133,10 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5140
5133
|
function isQueuedMessage(e) {
|
|
5141
5134
|
return Le.value?.has(e) ?? !1;
|
|
5142
5135
|
}
|
|
5143
|
-
let Re = v(() => Pe.value === "stop" ? "Stop reply" : Ie.value ? "Send — answered after current work" : "Send message"),
|
|
5136
|
+
let Re = v(() => Pe.value === "stop" ? "Stop reply" : Ie.value ? "Send — answered after current work" : "Send message"), ze = v(() => Ne.value && !je.value && !!Ae.value?.canUseBrowserRecording), Ve = v(() => Ae.value?.isActive.value ?? !1), He = v(() => Ae.value?.state.value.phase === "sending"), Ue = v(() => Ae.value?.elapsedLabel.value ?? "0:00"), We = v(() => {
|
|
5144
5137
|
let e = Ae.value?.state.value.phase;
|
|
5145
|
-
return e === "preparing" || e === "sending" ? Ae.value?.statusText.value ?? "Starting microphone" :
|
|
5146
|
-
}), Ke = v(() => Ae.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ?
|
|
5138
|
+
return e === "preparing" || e === "sending" ? Ae.value?.statusText.value ?? "Starting microphone" : X.value ? "Release to send" : "Click mic to send";
|
|
5139
|
+
}), Ke = v(() => Ae.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ? X.value ? "Release to send voice message" : "Stop and send voice message" : "Record voice message"), qe = I(!1), Je = I(), Ye = I(), Xe = I(), Ze = 0, Qe = v(() => e.chatController?.canStartVoice?.value ?? !1);
|
|
5147
5140
|
ce([() => e.agent.avatar.value?.src, Qe], ([e, t]) => {
|
|
5148
5141
|
let n = ++Ze;
|
|
5149
5142
|
if (Xe.value = void 0, !t || !e || typeof Image > "u") return;
|
|
@@ -5152,16 +5145,16 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5152
5145
|
n === Ze && (Xe.value = e);
|
|
5153
5146
|
}, r.src = e;
|
|
5154
5147
|
}, { immediate: !0 });
|
|
5155
|
-
let
|
|
5148
|
+
let $e = v(() => Qe.value && !qe.value && !Ve.value && Pe.value === "idle"), tt = v(() => !u.value), nt = v(() => tt.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
|
|
5156
5149
|
function startVoiceConversation() {
|
|
5157
|
-
|
|
5150
|
+
!$e.value || tt.value || (Ye.value = Xe.value, qe.value = !0);
|
|
5158
5151
|
}
|
|
5159
5152
|
async function endVoiceConversation() {
|
|
5160
5153
|
if (!qe.value) return;
|
|
5161
5154
|
let t = Je.value;
|
|
5162
5155
|
qe.value = !1, Ye.value = void 0, await A(), await new Promise((e) => setTimeout(e, 80)), await t?.end(), window.matchMedia("(pointer: coarse)").matches || i.value?.focus(), await e.chatController?.refreshMessages();
|
|
5163
5156
|
}
|
|
5164
|
-
let J = v(() => e.variant === "light"), rt = v(() => J.value ? "bg-theme-200/70" : "bg-white/15"),
|
|
5157
|
+
let J = v(() => e.variant === "light"), rt = v(() => J.value ? "bg-theme-200/70" : "bg-white/15"), it = v(() => J.value ? "text-theme-300" : "text-white/30");
|
|
5165
5158
|
ne(async () => {
|
|
5166
5159
|
e.chatController && !u.value && await e.chatController.startTextConversation();
|
|
5167
5160
|
}), re(() => {
|
|
@@ -5211,22 +5204,22 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5211
5204
|
function finishRecording(e) {
|
|
5212
5205
|
Ae.value?.finish(e);
|
|
5213
5206
|
}
|
|
5214
|
-
let
|
|
5207
|
+
let X = H(!1), Z = !1;
|
|
5215
5208
|
function onRecordPointerDown(e) {
|
|
5216
|
-
e.pointerType === "touch" && (
|
|
5209
|
+
e.pointerType === "touch" && (Z = !0, X.value = !0, e.currentTarget.setPointerCapture?.(e.pointerId), startRecording());
|
|
5217
5210
|
}
|
|
5218
5211
|
function onRecordPointerUp(e) {
|
|
5219
|
-
e.pointerType !== "touch" || !
|
|
5212
|
+
e.pointerType !== "touch" || !X.value || (X.value = !1, finishRecording({ cancelled: !1 }));
|
|
5220
5213
|
}
|
|
5221
5214
|
function onRecordPointerCancel(e) {
|
|
5222
|
-
e.pointerType !== "touch" || !
|
|
5215
|
+
e.pointerType !== "touch" || !X.value || (X.value = !1, Z = !1, finishRecording({ cancelled: !0 }));
|
|
5223
5216
|
}
|
|
5224
5217
|
function toggleRecording() {
|
|
5225
5218
|
Ve.value ? finishRecording({ cancelled: !1 }) : startRecording();
|
|
5226
5219
|
}
|
|
5227
5220
|
function onRecordClick() {
|
|
5228
|
-
if (
|
|
5229
|
-
|
|
5221
|
+
if (Z) {
|
|
5222
|
+
Z = !1;
|
|
5230
5223
|
return;
|
|
5231
5224
|
}
|
|
5232
5225
|
toggleRecording();
|
|
@@ -5262,17 +5255,17 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5262
5255
|
"data-test": "messaging-root",
|
|
5263
5256
|
class: j(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
|
|
5264
5257
|
}, [
|
|
5265
|
-
e.showHeader && !J.value ? (F(), x("div",
|
|
5258
|
+
e.showHeader && !J.value ? (F(), x("div", Gi, [T(Be, {
|
|
5266
5259
|
agent: e.agent,
|
|
5267
5260
|
"is-online": u.value
|
|
5268
|
-
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (F(), x("div",
|
|
5269
|
-
T(
|
|
5261
|
+
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (F(), x("div", Ki, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto" : ""]) }, [
|
|
5262
|
+
T(Ge, {
|
|
5270
5263
|
agent: e.agent,
|
|
5271
5264
|
"is-light": J.value,
|
|
5272
5265
|
class: "size-10"
|
|
5273
5266
|
}, null, 8, ["agent", "is-light"]),
|
|
5274
|
-
S("div",
|
|
5275
|
-
e.headerMeta ? (F(), x("span",
|
|
5267
|
+
S("div", qi, [S("div", Ji, U(e.agent.displayName.value), 1), S("div", Yi, U(e.agent.title.value || "Assistant"), 1)]),
|
|
5268
|
+
e.headerMeta ? (F(), x("span", Xi, U(e.headerMeta), 1)) : b("", !0)
|
|
5276
5269
|
], 2)])) : b("", !0),
|
|
5277
5270
|
T(_, { name: "voice-call" }, {
|
|
5278
5271
|
default: ue(() => [qe.value ? (F(), x("div", {
|
|
@@ -5283,7 +5276,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5283
5276
|
"aria-label": `Voice conversation with ${e.agent.displayName.value}`,
|
|
5284
5277
|
class: "fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",
|
|
5285
5278
|
onKeydown: a[0] || (a[0] = pe((e) => endVoiceConversation(), ["esc"]))
|
|
5286
|
-
}, [T(
|
|
5279
|
+
}, [T(Wi, {
|
|
5287
5280
|
ref_key: "voiceMode",
|
|
5288
5281
|
ref: Je,
|
|
5289
5282
|
agent: e.agent,
|
|
@@ -5296,17 +5289,17 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5296
5289
|
"agent",
|
|
5297
5290
|
"chat-controller",
|
|
5298
5291
|
"backdrop-src"
|
|
5299
|
-
])], 40,
|
|
5292
|
+
])], 40, Zi)) : b("", !0)]),
|
|
5300
5293
|
_: 1
|
|
5301
5294
|
}),
|
|
5302
5295
|
p.value ? (F(), x("div", {
|
|
5303
5296
|
key: 2,
|
|
5304
5297
|
class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", J.value ? "text-theme-400" : "text-theme-600"])
|
|
5305
|
-
}, [T(
|
|
5298
|
+
}, [T(K, { class: "size-4" })], 2)) : e.setupHint ? (F(), x("div", {
|
|
5306
5299
|
key: 3,
|
|
5307
|
-
class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]",
|
|
5300
|
+
class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", it.value])
|
|
5308
5301
|
}, [a[14] || (a[14] = S("i", { class: "i-tabler-tool size-3" }, null, -1)), S("span", null, U(e.setupHint), 1)], 2)) : b("", !0),
|
|
5309
|
-
T(
|
|
5302
|
+
T(gi, {
|
|
5310
5303
|
ref_key: "chatScroller",
|
|
5311
5304
|
ref: r,
|
|
5312
5305
|
inert: qe.value,
|
|
@@ -5314,21 +5307,21 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5314
5307
|
class: j(B.value.length === 0 ? "flex-none" : "flex-1")
|
|
5315
5308
|
}, {
|
|
5316
5309
|
default: ue(() => [S("div", { class: j([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-8 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-8 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto w-full" : ""]) }, [
|
|
5317
|
-
B.value.length === 0 && !p.value ? (F(), x("div",
|
|
5310
|
+
B.value.length === 0 && !p.value ? (F(), x("div", Qi, [ie(t.$slots, "empty-heading", {
|
|
5318
5311
|
agent: e.agent,
|
|
5319
5312
|
isLight: J.value
|
|
5320
|
-
}, () => [T(
|
|
5313
|
+
}, () => [T(Ge, {
|
|
5321
5314
|
agent: e.agent,
|
|
5322
5315
|
"is-light": J.value,
|
|
5323
5316
|
class: "mb-4 size-20 @sm/chat:size-24"
|
|
5324
|
-
}, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, U(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (F(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm",
|
|
5317
|
+
}, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, U(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (F(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", it.value]) }, U(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
|
|
5325
5318
|
class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", J.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
5326
5319
|
title: n.value.tooltip
|
|
5327
|
-
}, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, U(n.value.label), 1)], 10,
|
|
5320
|
+
}, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, U(n.value.label), 1)], 10, $i)], 64))])) : b("", !0),
|
|
5328
5321
|
(F(!0), x(h, null, R(B.value, (e, t) => (F(), x(h, { key: e.id }, [
|
|
5329
|
-
shouldShowTimeDivider(B.value, t) ? (F(), x("div",
|
|
5322
|
+
shouldShowTimeDivider(B.value, t) ? (F(), x("div", ea, [
|
|
5330
5323
|
S("div", { class: j(["flex-1 h-px", rt.value]) }, null, 2),
|
|
5331
|
-
S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase",
|
|
5324
|
+
S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", it.value]) }, U(shouldShowTimeDivider(B.value, t)), 3),
|
|
5332
5325
|
S("div", { class: j(["flex-1 h-px", rt.value]) }, null, 2)
|
|
5333
5326
|
])) : b("", !0),
|
|
5334
5327
|
messageWorkJournal(e) ? (F(), x("div", {
|
|
@@ -5336,10 +5329,10 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5336
5329
|
"data-test": "messaging-message-tool-activity",
|
|
5337
5330
|
"data-journal-outcome": messageWorkJournal(e)?.outcome,
|
|
5338
5331
|
class: "mb-4 w-full"
|
|
5339
|
-
}, [T(
|
|
5332
|
+
}, [T(et, {
|
|
5340
5333
|
model: messageWorkJournal(e),
|
|
5341
5334
|
"is-light": J.value
|
|
5342
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5335
|
+
}, null, 8, ["model", "is-light"])], 8, ta)) : b("", !0),
|
|
5343
5336
|
isSystemExplainerMessage(e) ? (F(), x("section", {
|
|
5344
5337
|
key: 2,
|
|
5345
5338
|
"data-test": "messaging-system-msg",
|
|
@@ -5354,13 +5347,13 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5354
5347
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
5355
5348
|
"data-streaming": e.id === ve.value ? "true" : void 0,
|
|
5356
5349
|
class: "mb-6 w-full"
|
|
5357
|
-
}, [S("div", { class: j(["mb-1.5 text-center text-[10.5px] font-medium",
|
|
5350
|
+
}, [S("div", { class: j(["mb-1.5 text-center text-[10.5px] font-medium", it.value]) }, "System message", 2), S("div", ra, [
|
|
5358
5351
|
S("span", {
|
|
5359
5352
|
"data-test": "messaging-system-divider-line",
|
|
5360
5353
|
"aria-hidden": "true",
|
|
5361
5354
|
class: j(["hidden h-px flex-1 opacity-60 @md/chat:block", rt.value])
|
|
5362
5355
|
}, null, 2),
|
|
5363
|
-
S("div", { class: j(["w-[46ch] min-w-0 max-w-full rounded-2xl px-5 py-3.5 text-center text-[13px] ring-1 [&_.chat-msg-rich]:max-w-none [&_.chat-msg-rich]:text-[13px] [&_.chat-msg-rich]:italic [&_.chat-msg-rich]:leading-[1.6]", J.value ? "text-theme-700 ring-theme-200/50" : "text-white/85 ring-white/10"]) }, [e.text ? (F(), te(
|
|
5356
|
+
S("div", { class: j(["w-[46ch] min-w-0 max-w-full rounded-2xl px-5 py-3.5 text-center text-[13px] ring-1 [&_.chat-msg-rich]:max-w-none [&_.chat-msg-rich]:text-[13px] [&_.chat-msg-rich]:italic [&_.chat-msg-rich]:leading-[1.6]", J.value ? "text-theme-700 ring-theme-200/50" : "text-white/85 ring-white/10"]) }, [e.text ? (F(), te(pi, {
|
|
5364
5357
|
key: 0,
|
|
5365
5358
|
text: e.text,
|
|
5366
5359
|
inverted: !J.value,
|
|
@@ -5371,7 +5364,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5371
5364
|
"text",
|
|
5372
5365
|
"inverted",
|
|
5373
5366
|
"streaming"
|
|
5374
|
-
])) : e.issue?.help ? (F(), te(
|
|
5367
|
+
])) : e.issue?.help ? (F(), te(pi, {
|
|
5375
5368
|
key: 1,
|
|
5376
5369
|
text: e.issue.help,
|
|
5377
5370
|
inverted: !J.value
|
|
@@ -5381,13 +5374,13 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5381
5374
|
"data-test": "messaging-system-msg-action",
|
|
5382
5375
|
class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", J.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
5383
5376
|
onClick: a[2] || (a[2] = W(() => {}, ["stop"]))
|
|
5384
|
-
}, [C(U(e.issue.actionLabel) + " ", 1), a[15] || (a[15] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10,
|
|
5377
|
+
}, [C(U(e.issue.actionLabel) + " ", 1), a[15] || (a[15] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, ia)) : b("", !0)], 2),
|
|
5385
5378
|
S("span", {
|
|
5386
5379
|
"data-test": "messaging-system-divider-line",
|
|
5387
5380
|
"aria-hidden": "true",
|
|
5388
5381
|
class: j(["hidden h-px flex-1 opacity-60 @md/chat:block", rt.value])
|
|
5389
5382
|
}, null, 2)
|
|
5390
|
-
])], 8,
|
|
5383
|
+
])], 8, na)) : e.sender === "system" ? (F(), x("div", {
|
|
5391
5384
|
key: 3,
|
|
5392
5385
|
"data-test": "messaging-system-status-msg",
|
|
5393
5386
|
"data-message-id": e.id,
|
|
@@ -5402,11 +5395,11 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5402
5395
|
}, [a[16] || (a[16] = S("i", {
|
|
5403
5396
|
class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
|
|
5404
5397
|
"aria-hidden": "true"
|
|
5405
|
-
}, null, -1)), T(
|
|
5398
|
+
}, null, -1)), T(pi, {
|
|
5406
5399
|
text: e.text,
|
|
5407
5400
|
inverted: !J.value,
|
|
5408
5401
|
onClick: a[3] || (a[3] = W(() => {}, ["stop"]))
|
|
5409
|
-
}, null, 8, ["text", "inverted"])], 10,
|
|
5402
|
+
}, null, 8, ["text", "inverted"])], 10, aa)) : (F(), x("div", {
|
|
5410
5403
|
key: 4,
|
|
5411
5404
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
5412
5405
|
"data-message-id": e.id,
|
|
@@ -5436,14 +5429,14 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5436
5429
|
"data-test": "messaging-attachment",
|
|
5437
5430
|
"data-attachment-placement": "block",
|
|
5438
5431
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
5439
|
-
}, null, 8,
|
|
5432
|
+
}, null, 8, sa)) : e.type === "audio" ? (F(), x("audio", {
|
|
5440
5433
|
key: 1,
|
|
5441
5434
|
src: e.src,
|
|
5442
5435
|
controls: "",
|
|
5443
5436
|
"data-test": "messaging-attachment",
|
|
5444
5437
|
"data-attachment-placement": "block",
|
|
5445
5438
|
class: "max-w-full"
|
|
5446
|
-
}, null, 8,
|
|
5439
|
+
}, null, 8, ca)) : (F(), x("a", {
|
|
5447
5440
|
key: 2,
|
|
5448
5441
|
href: e.src,
|
|
5449
5442
|
target: "_blank",
|
|
@@ -5451,11 +5444,11 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5451
5444
|
"data-test": "messaging-attachment",
|
|
5452
5445
|
"data-attachment-placement": "block",
|
|
5453
5446
|
class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5454
|
-
}, [a[17] || (a[17] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(e.filename), 1)], 10,
|
|
5447
|
+
}, [a[17] || (a[17] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(e.filename), 1)], 10, la))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (F(), x("div", {
|
|
5455
5448
|
key: 1,
|
|
5456
5449
|
"data-test": "messaging-message-content",
|
|
5457
5450
|
class: j(e.sender === "user" ? J.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : J.value ? "text-theme-800" : "text-white/95")
|
|
5458
|
-
}, [(F(!0), x(h, null, R(messageRenderParts(e), (t) => (F(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (F(), x("div",
|
|
5451
|
+
}, [(F(!0), x(h, null, R(messageRenderParts(e), (t) => (F(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (F(), x("div", ua, [T(pi, {
|
|
5459
5452
|
text: t.text,
|
|
5460
5453
|
inverted: e.sender === "user" || !J.value,
|
|
5461
5454
|
streaming: e.id === ve.value,
|
|
@@ -5472,14 +5465,14 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5472
5465
|
"data-test": "messaging-attachment",
|
|
5473
5466
|
"data-attachment-placement": t.placement,
|
|
5474
5467
|
class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
5475
|
-
}, null, 8,
|
|
5468
|
+
}, null, 8, da)) : t.kind === "attachment" && t.attachment.type === "audio" ? (F(), x("audio", {
|
|
5476
5469
|
key: 2,
|
|
5477
5470
|
src: t.attachment.src,
|
|
5478
5471
|
controls: "",
|
|
5479
5472
|
"data-test": "messaging-attachment",
|
|
5480
5473
|
"data-attachment-placement": t.placement,
|
|
5481
5474
|
class: "my-2 max-w-full"
|
|
5482
|
-
}, null, 8,
|
|
5475
|
+
}, null, 8, fa)) : t.kind === "attachment" ? (F(), x("a", {
|
|
5483
5476
|
key: 3,
|
|
5484
5477
|
href: t.attachment.src,
|
|
5485
5478
|
target: "_blank",
|
|
@@ -5487,20 +5480,20 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5487
5480
|
"data-test": "messaging-attachment",
|
|
5488
5481
|
"data-attachment-placement": t.placement,
|
|
5489
5482
|
class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5490
|
-
}, [a[18] || (a[18] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(t.attachment.filename), 1)], 10,
|
|
5483
|
+
}, [a[18] || (a[18] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(t.attachment.filename), 1)], 10, pa)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, oa)),
|
|
5491
5484
|
e.id === he.value ? (F(), x(h, { key: 5 }, [m.value.length ? (F(!0), x(h, { key: 0 }, R(m.value, (e) => (F(), x(h, { key: e.id }, [e.kind === "work" ? (F(), x("div", {
|
|
5492
5485
|
key: 0,
|
|
5493
5486
|
"data-test": "messaging-tool-activity",
|
|
5494
5487
|
"data-journal-outcome": e.journal.outcome,
|
|
5495
5488
|
class: "chat-live-enter mb-4 w-full"
|
|
5496
|
-
}, [T(
|
|
5489
|
+
}, [T(et, {
|
|
5497
5490
|
model: e.journal,
|
|
5498
5491
|
"is-light": J.value
|
|
5499
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5492
|
+
}, null, 8, ["model", "is-light"])], 8, ma)) : e.kind === "text" && e.content ? (F(), x("div", {
|
|
5500
5493
|
key: 1,
|
|
5501
5494
|
"data-test": "messaging-live-text-block",
|
|
5502
5495
|
class: j(["mb-4", J.value ? "text-theme-800" : "text-white/95"])
|
|
5503
|
-
}, [T(
|
|
5496
|
+
}, [T(pi, {
|
|
5504
5497
|
text: e.content,
|
|
5505
5498
|
inverted: !J.value,
|
|
5506
5499
|
streaming: e.id === k.value,
|
|
@@ -5527,10 +5520,10 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5527
5520
|
"data-test": "messaging-tool-activity",
|
|
5528
5521
|
"data-journal-outcome": oe.value.outcome,
|
|
5529
5522
|
class: "chat-live-enter mb-4 w-full"
|
|
5530
|
-
}, [T(
|
|
5523
|
+
}, [T(et, {
|
|
5531
5524
|
model: oe.value,
|
|
5532
5525
|
"is-light": J.value
|
|
5533
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5526
|
+
}, null, 8, ["model", "is-light"])], 8, ha)) : b("", !0)], 64)) : b("", !0)
|
|
5534
5527
|
], 64))), 128)),
|
|
5535
5528
|
ye.value ? (F(), x("div", {
|
|
5536
5529
|
key: 1,
|
|
@@ -5547,11 +5540,11 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5547
5540
|
S("span"),
|
|
5548
5541
|
S("span"),
|
|
5549
5542
|
S("span")
|
|
5550
|
-
], -1)), ae.value ? (F(), x("span",
|
|
5551
|
-
|
|
5543
|
+
], -1)), ae.value ? (F(), x("span", _a, U(ae.value), 1)) : (F(), x("span", va, "Thinking"))], 10, ga)) : b("", !0),
|
|
5544
|
+
_e.value ? (F(), x("div", {
|
|
5552
5545
|
key: 2,
|
|
5553
5546
|
"data-test": "messaging-transient-issue",
|
|
5554
|
-
"data-issue-code":
|
|
5547
|
+
"data-issue-code": _e.value.code,
|
|
5555
5548
|
role: "alert",
|
|
5556
5549
|
class: j(["chat-live-enter mb-4 flex items-start gap-2 px-2 text-[13px] leading-snug", J.value ? "text-theme-600" : "text-white/60"])
|
|
5557
5550
|
}, [
|
|
@@ -5559,14 +5552,14 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5559
5552
|
class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
|
|
5560
5553
|
"aria-hidden": "true"
|
|
5561
5554
|
}, null, -1)),
|
|
5562
|
-
S("span",
|
|
5563
|
-
|
|
5555
|
+
S("span", ba, [S("span", xa, [C(U(_e.value.message), 1), _e.value.help ? (F(), x(h, { key: 0 }, [C(":")], 64)) : b("", !0)]), _e.value.help ? (F(), x(h, { key: 0 }, [a[21] || (a[21] = C(U(" "), -1)), S("span", Sa, U(_e.value.help), 1)], 64)) : b("", !0)]),
|
|
5556
|
+
_e.value.actionUrl && _e.value.actionLabel ? (F(), x("a", {
|
|
5564
5557
|
key: 0,
|
|
5565
|
-
href:
|
|
5558
|
+
href: _e.value.actionUrl,
|
|
5566
5559
|
class: "shrink-0 underline underline-offset-2",
|
|
5567
5560
|
onClick: a[6] || (a[6] = W(() => {}, ["stop"]))
|
|
5568
|
-
}, U(
|
|
5569
|
-
], 10,
|
|
5561
|
+
}, U(_e.value.actionLabel), 9, Ca)) : b("", !0)
|
|
5562
|
+
], 10, ya)) : b("", !0)
|
|
5570
5563
|
], 2)]),
|
|
5571
5564
|
_: 3
|
|
5572
5565
|
}, 8, [
|
|
@@ -5590,7 +5583,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5590
5583
|
role: "status",
|
|
5591
5584
|
"aria-live": "polite",
|
|
5592
5585
|
class: j(["py-3 text-center text-[14px]", J.value ? "text-theme-500" : "text-white/70"])
|
|
5593
|
-
}, U(Te.value), 11,
|
|
5586
|
+
}, U(Te.value), 11, Ta)) : (F(), x(h, { key: 1 }, [
|
|
5594
5587
|
Oe.value.length > 0 ? (F(), x("div", {
|
|
5595
5588
|
key: 0,
|
|
5596
5589
|
class: j(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[640px] @5xl/chat:max-w-[720px] mx-auto" : ""])
|
|
@@ -5602,13 +5595,13 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5602
5595
|
src: e.src,
|
|
5603
5596
|
alt: e.filename,
|
|
5604
5597
|
class: j(["size-14 rounded-xl object-cover border", J.value ? "border-black/10" : "border-white/20"])
|
|
5605
|
-
}, null, 10,
|
|
5598
|
+
}, null, 10, Ea)) : (F(), x("div", {
|
|
5606
5599
|
key: 1,
|
|
5607
5600
|
class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", J.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5608
|
-
}, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span",
|
|
5601
|
+
}, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", Da, U(e.filename), 1)], 2)), S("button", {
|
|
5609
5602
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] cursor-pointer",
|
|
5610
5603
|
onClick: (e) => removeAttachment(t)
|
|
5611
|
-
}, [...a[24] || (a[24] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8,
|
|
5604
|
+
}, [...a[24] || (a[24] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Oa)]))), 128)), ke.value ? (F(), x("div", ka, [T(K, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
|
|
5612
5605
|
Me.value ? (F(), x("input", {
|
|
5613
5606
|
key: 1,
|
|
5614
5607
|
ref_key: "fileInput",
|
|
@@ -5629,8 +5622,8 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5629
5622
|
class: j(["flex min-w-0 items-center gap-2 py-1", J.value ? "text-theme-700" : "text-white/80"])
|
|
5630
5623
|
}, [
|
|
5631
5624
|
a[25] || (a[25] = S("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5632
|
-
S("span",
|
|
5633
|
-
S("span", { class: j(["min-w-0 truncate text-sm", J.value ? "text-theme-400" : "text-white/45"]) }, U(
|
|
5625
|
+
S("span", Ma, U(Ue.value), 1),
|
|
5626
|
+
S("span", { class: j(["min-w-0 truncate text-sm", J.value ? "text-theme-400" : "text-white/45"]) }, U(We.value), 3)
|
|
5634
5627
|
], 2)) : de((F(), x("textarea", {
|
|
5635
5628
|
key: 0,
|
|
5636
5629
|
ref_key: "textarea",
|
|
@@ -5652,7 +5645,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5652
5645
|
},
|
|
5653
5646
|
class: j(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", J.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
|
|
5654
5647
|
onKeydown: handleKeydown
|
|
5655
|
-
}, null, 42,
|
|
5648
|
+
}, null, 42, ja)), [[se, De.value]]), S("div", Na, [
|
|
5656
5649
|
S("button", {
|
|
5657
5650
|
class: j(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
|
|
5658
5651
|
Me.value ? "cursor-pointer" : "cursor-default",
|
|
@@ -5663,9 +5656,9 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5663
5656
|
"aria-label": Me.value ? "Attach file" : "File attachments unavailable",
|
|
5664
5657
|
title: Me.value ? "Attach file" : "File attachments unavailable",
|
|
5665
5658
|
onClick: a[8] || (a[8] = (e) => Me.value && triggerFileInput())
|
|
5666
|
-
}, [ke.value ? (F(), x("i",
|
|
5659
|
+
}, [ke.value ? (F(), x("i", Fa)) : (F(), x("i", Ia)), S("span", La, U(Me.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Pa),
|
|
5667
5660
|
a[29] || (a[29] = S("div", { class: "flex-1" }, null, -1)),
|
|
5668
|
-
S("div",
|
|
5661
|
+
S("div", Ra, [
|
|
5669
5662
|
Ve.value && !He.value && !qe.value ? (F(), x("button", {
|
|
5670
5663
|
key: 0,
|
|
5671
5664
|
"data-test": "messaging-record-discard-btn",
|
|
@@ -5677,7 +5670,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5677
5670
|
class: "i-tabler-x size-[18px]",
|
|
5678
5671
|
"aria-hidden": "true"
|
|
5679
5672
|
}, null, -1)])], 2)) : b("", !0),
|
|
5680
|
-
(
|
|
5673
|
+
(ze.value || Ve.value) && !He.value && !qe.value ? (F(), x("button", {
|
|
5681
5674
|
key: 1,
|
|
5682
5675
|
"data-test": "messaging-record-audio-btn",
|
|
5683
5676
|
class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] hover:opacity-70 pointer-coarse:size-11", Ve.value ? J.value ? "text-theme-900 scale-110" : "text-white scale-110" : J.value ? "text-theme-500" : "text-white/60"]),
|
|
@@ -5688,8 +5681,8 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5688
5681
|
onPointercancel: W(onRecordPointerCancel, ["prevent"]),
|
|
5689
5682
|
onClick: onRecordClick,
|
|
5690
5683
|
onKeydown: a[10] || (a[10] = pe(W((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5691
|
-
}, [S("i", { class: j([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span",
|
|
5692
|
-
|
|
5684
|
+
}, [S("i", { class: j([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Ba, U(Ke.value), 1)], 42, za)) : b("", !0),
|
|
5685
|
+
$e.value ? (F(), x("button", {
|
|
5693
5686
|
key: 2,
|
|
5694
5687
|
"data-test": "messaging-voice-start-btn",
|
|
5695
5688
|
class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", tt.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
|
|
@@ -5697,7 +5690,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5697
5690
|
"aria-label": nt.value,
|
|
5698
5691
|
title: nt.value,
|
|
5699
5692
|
onClick: a[11] || (a[11] = (e) => startVoiceConversation())
|
|
5700
|
-
}, [S("span",
|
|
5693
|
+
}, [S("span", Ha, [(F(), x(h, null, R([
|
|
5701
5694
|
7,
|
|
5702
5695
|
13,
|
|
5703
5696
|
16,
|
|
@@ -5707,7 +5700,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5707
5700
|
key: e,
|
|
5708
5701
|
class: "w-[2px] rounded-full bg-current",
|
|
5709
5702
|
style: M({ height: `${e}px` })
|
|
5710
|
-
}, null, 4)), 64))]), a[27] || (a[27] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10,
|
|
5703
|
+
}, null, 4)), 64))]), a[27] || (a[27] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Va)) : Ve.value ? b("", !0) : (F(), x(h, { key: 3 }, [Ie.value ? (F(), x("button", {
|
|
5711
5704
|
key: 0,
|
|
5712
5705
|
"data-test": "messaging-secondary-stop-btn",
|
|
5713
5706
|
class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
|
|
@@ -5725,27 +5718,23 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5725
5718
|
"aria-label": Re.value,
|
|
5726
5719
|
title: Re.value,
|
|
5727
5720
|
onClick: a[13] || (a[13] = (e) => handleComposerAction())
|
|
5728
|
-
}, [Pe.value === "stop" ? (F(), x("i",
|
|
5721
|
+
}, [Pe.value === "stop" ? (F(), x("i", Wa)) : (F(), x("i", Ga)), S("span", Ka, U(Re.value), 1)], 10, Ua)], 64))
|
|
5729
5722
|
])
|
|
5730
|
-
])], 10,
|
|
5731
|
-
e.centered && B.value.length > 0 ? (F(), x("p",
|
|
5732
|
-
], 64))], !0)], 10,
|
|
5723
|
+
])], 10, Aa),
|
|
5724
|
+
e.centered && B.value.length > 0 ? (F(), x("p", qa, U(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
|
|
5725
|
+
], 64))], !0)], 10, wa)
|
|
5733
5726
|
], 2));
|
|
5734
5727
|
}
|
|
5735
|
-
}),
|
|
5736
|
-
let n = e.__vccOpts || e;
|
|
5737
|
-
for (let [e, r] of t) n[e] = r;
|
|
5738
|
-
return n;
|
|
5739
|
-
}, "default"), Ya = /*#__PURE__*/ Ja(qa, [["__scopeId", "data-v-0122d7a1"]]), Xa = { class: "agent-wrap" }, Za = {
|
|
5728
|
+
}), [["__scopeId", "data-v-0122d7a1"]]), Ya = { class: "agent-wrap" }, Xa = {
|
|
5740
5729
|
key: 0,
|
|
5741
5730
|
class: "flex items-center justify-center h-full"
|
|
5742
|
-
},
|
|
5731
|
+
}, Za = {
|
|
5743
5732
|
key: 2,
|
|
5744
5733
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5745
5734
|
role: "status",
|
|
5746
5735
|
"aria-live": "polite",
|
|
5747
5736
|
"data-test": "agent-unavailable"
|
|
5748
|
-
},
|
|
5737
|
+
}, Qa = /* @__PURE__ */ k({
|
|
5749
5738
|
__name: "AgentWrap",
|
|
5750
5739
|
props: {
|
|
5751
5740
|
sdk: {},
|
|
@@ -5841,7 +5830,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5841
5830
|
});
|
|
5842
5831
|
}
|
|
5843
5832
|
}
|
|
5844
|
-
return ne(loadAgent), (t, n) => (F(), x("div",
|
|
5833
|
+
return ne(loadAgent), (t, n) => (F(), x("div", Ya, [o.value ? (F(), x("div", Xa, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
|
|
5845
5834
|
sdk: ae(a),
|
|
5846
5835
|
agent: c.value,
|
|
5847
5836
|
context: e.clientContext ?? e.context,
|
|
@@ -5849,7 +5838,7 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5849
5838
|
buttonText: e.buttonText,
|
|
5850
5839
|
buttonIcon: e.buttonIcon,
|
|
5851
5840
|
loading: o.value
|
|
5852
|
-
}, void 0, void 0, 1) : u.value ? (F(), x("div",
|
|
5841
|
+
}, void 0, void 0, 1) : u.value ? (F(), x("div", Za, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
|
|
5853
5842
|
type: "button",
|
|
5854
5843
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5855
5844
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5858,6 +5847,6 @@ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
|
|
|
5858
5847
|
}
|
|
5859
5848
|
});
|
|
5860
5849
|
//#endregion
|
|
5861
|
-
export {
|
|
5850
|
+
export { Be as a, Ae as c, parseButtonTemplate as d, AgentChatController as f, he as g, K as h, pi as i, getAgentAvatarUrl as l, r as m, Ja as n, Pe as o, ve as p, Wi as r, Me as s, Qa as t, handleImageError as u };
|
|
5862
5851
|
|
|
5863
5852
|
//# sourceMappingURL=AgentWrap.js.map
|