@pagelines/sdk 1.0.693 → 1.0.695
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentWrap.js +459 -464
- package/dist/AgentWrap.js.map +1 -1
- package/dist/widget.js +1 -1
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./rolldown-runtime.js";
|
|
2
2
|
import { s as e, t } from "./sdkClient.js";
|
|
3
3
|
import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatVisualFencePayload as c } from "@pagelines/core";
|
|
4
|
-
import { Fragment as u, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as _, createTextVNode as v, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, normalizeStyle as T, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as k, ref as A, renderList as j, renderSlot as ie, resolveDynamicComponent as ae, shallowRef as P, toDisplayString as F, unref as oe, vModelText as I,
|
|
4
|
+
import { Fragment as u, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as _, createTextVNode as v, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, normalizeStyle as T, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as k, ref as A, renderList as j, renderSlot as ie, resolveDynamicComponent as ae, shallowRef as P, toDisplayString as F, unref as oe, vModelText as I, watch as se, withCtx as ce, withDirectives as R, withKeys as ue, withModifiers as z } from "vue";
|
|
5
5
|
//#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var de = { class: "spinner max-w-sm" }, pe = {
|
|
7
7
|
class: "ring-circular h-full w-full origin-center",
|
|
8
8
|
viewBox: "25 25 50 50"
|
|
9
|
-
},
|
|
9
|
+
}, he = /* @__PURE__ */ x({
|
|
10
10
|
__name: "FSpinner",
|
|
11
11
|
props: {
|
|
12
12
|
width: {
|
|
@@ -19,7 +19,7 @@ var he = { class: "spinner max-w-sm" }, z = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
setup(e) {
|
|
22
|
-
return (t, n) => (k(), h("div",
|
|
22
|
+
return (t, n) => (k(), h("div", de, [(k(), h("svg", pe, [_("circle", {
|
|
23
23
|
class: C([e.colorMode, "ring-path"]),
|
|
24
24
|
cx: "50",
|
|
25
25
|
cy: "50",
|
|
@@ -30,7 +30,7 @@ var he = { class: "spinner max-w-sm" }, z = {
|
|
|
30
30
|
"stroke-miterlimit": "30"
|
|
31
31
|
}, null, 2)]))]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), _e = [
|
|
34
34
|
{
|
|
35
35
|
mode: "self",
|
|
36
36
|
label: "Overview",
|
|
@@ -185,7 +185,7 @@ var VoiceRecorderController = class extends i {
|
|
|
185
185
|
function durableJournalOutcome(e) {
|
|
186
186
|
return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var ve = {
|
|
189
189
|
waiting: "Waiting for results",
|
|
190
190
|
finishing: "Finishing up",
|
|
191
191
|
completed: "Work complete",
|
|
@@ -193,7 +193,7 @@ var B = {
|
|
|
193
193
|
stopped: "Stopped",
|
|
194
194
|
notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
|
|
195
195
|
leaveHint: "Taking longer than usual. You can leave this chat while I work."
|
|
196
|
-
}, ye = 15e3,
|
|
196
|
+
}, ye = 15e3, B = 6e4, H = 3;
|
|
197
197
|
function toMs(e) {
|
|
198
198
|
if (!e) return;
|
|
199
199
|
let t = Date.parse(e);
|
|
@@ -230,12 +230,12 @@ function milestoneRows(e, t) {
|
|
|
230
230
|
}));
|
|
231
231
|
}
|
|
232
232
|
function splitRows(e) {
|
|
233
|
-
return e.length <=
|
|
233
|
+
return e.length <= H ? {
|
|
234
234
|
visibleRows: e,
|
|
235
235
|
hiddenRows: []
|
|
236
236
|
} : {
|
|
237
|
-
visibleRows: e.slice(e.length -
|
|
238
|
-
hiddenRows: e.slice(0, e.length -
|
|
237
|
+
visibleRows: e.slice(e.length - H),
|
|
238
|
+
hiddenRows: e.slice(0, e.length - H)
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
function buildWorkJournalModel(e) {
|
|
@@ -247,7 +247,7 @@ function buildWorkJournalModel(e) {
|
|
|
247
247
|
terminal: {
|
|
248
248
|
id: "work-complete",
|
|
249
249
|
tone: "completed",
|
|
250
|
-
label:
|
|
250
|
+
label: ve.completed
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
if (n === "failed") {
|
|
@@ -261,7 +261,7 @@ function buildWorkJournalModel(e) {
|
|
|
261
261
|
terminal: {
|
|
262
262
|
id: "work-failed",
|
|
263
263
|
tone: "failed",
|
|
264
|
-
label:
|
|
264
|
+
label: ve.failed,
|
|
265
265
|
...o && e?.note ? { note: e.note } : {}
|
|
266
266
|
}
|
|
267
267
|
};
|
|
@@ -275,18 +275,18 @@ function buildWorkJournalModel(e) {
|
|
|
275
275
|
terminal: {
|
|
276
276
|
id: "work-stopped",
|
|
277
277
|
tone: "stopped",
|
|
278
|
-
label:
|
|
278
|
+
label: ve.stopped
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
let { visibleRows: s, hiddenRows: c } = splitRows(milestoneRows(t, /* @__PURE__ */ new Set())), u = t.filter((e) => e.status === "started").sort(byEvent).pop(), f = t.reduce((e, t) => Math.max(e, eventMs(t)), a ?? -Infinity), p = Number.isFinite(f) ? f : r, m = t.reduce((e, t) => {
|
|
283
283
|
let n = toMs(t.startedAt) ?? toMs(t.endedAt);
|
|
284
284
|
return n === void 0 ? e : Math.min(e, n);
|
|
285
|
-
}, Infinity), h = p + ye, _ = (Number.isFinite(m) ? m : p) +
|
|
285
|
+
}, Infinity), h = p + ye, _ = (Number.isFinite(m) ? m : p) + B, v = r >= h, b = u || v ? {
|
|
286
286
|
id: u?.activityId ?? "work-active",
|
|
287
287
|
tone: "active",
|
|
288
|
-
label: v ? u ?
|
|
289
|
-
} : void 0, x = v && r >= _ ? i ?
|
|
288
|
+
label: v ? u ? ve.waiting : ve.finishing : u.label
|
|
289
|
+
} : void 0, x = v && r >= _ ? i ? ve.notifyHint : ve.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
|
|
290
290
|
return {
|
|
291
291
|
outcome: n,
|
|
292
292
|
visibleRows: s,
|
|
@@ -352,17 +352,17 @@ function buildLiveTurnBlocks(e) {
|
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
354
354
|
//#region agent/AgentController.ts
|
|
355
|
-
var
|
|
356
|
-
...
|
|
355
|
+
var be = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), U = /* @__PURE__ */ new Set([
|
|
356
|
+
...be,
|
|
357
357
|
"EMPTY_STREAM",
|
|
358
358
|
"RATE_LIMIT"
|
|
359
|
-
]),
|
|
359
|
+
]), Se = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), W = {
|
|
360
360
|
CREDIT_LIMIT: "billing_budget_reached",
|
|
361
361
|
OVERAGE_CAP: "billing_runaway_cap"
|
|
362
362
|
};
|
|
363
363
|
function presentChatStreamError(e) {
|
|
364
|
-
if (!(e.bucket !== void 0 ||
|
|
365
|
-
let t = e.bucket ?? (
|
|
364
|
+
if (!(e.bucket !== void 0 || U.has(e.code))) return { surface: "hard" };
|
|
365
|
+
let t = e.bucket ?? (be.has(e.code) ? "account" : "error"), n = {
|
|
366
366
|
...e.actionLabel ? { actionLabel: e.actionLabel } : {},
|
|
367
367
|
...e.actionUrl ? { actionUrl: e.actionUrl } : {},
|
|
368
368
|
...e.help ? { help: e.help } : {}
|
|
@@ -375,7 +375,7 @@ function presentChatStreamError(e) {
|
|
|
375
375
|
...n
|
|
376
376
|
},
|
|
377
377
|
sendBlockedReason: "account"
|
|
378
|
-
} :
|
|
378
|
+
} : Se.has(e.code) ? {
|
|
379
379
|
surface: "transcript",
|
|
380
380
|
issue: {
|
|
381
381
|
code: e.code,
|
|
@@ -393,7 +393,7 @@ function presentChatStreamError(e) {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
function transcriptMessageForChatStreamError(e) {
|
|
396
|
-
let t =
|
|
396
|
+
let t = W[e.code];
|
|
397
397
|
return t ? r[t].oneLine : e.error;
|
|
398
398
|
}
|
|
399
399
|
var AgentChatController = class extends i {
|
|
@@ -569,7 +569,7 @@ Current User:
|
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
571
|
setupBoundaryWatcher() {
|
|
572
|
-
|
|
572
|
+
se(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
|
|
573
573
|
this.scheduleBoundary(e);
|
|
574
574
|
});
|
|
575
575
|
}
|
|
@@ -631,12 +631,12 @@ Current User:
|
|
|
631
631
|
});
|
|
632
632
|
}
|
|
633
633
|
setupModeWatcher() {
|
|
634
|
-
|
|
634
|
+
se(this.agentMode, async (e, t) => {
|
|
635
635
|
this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
638
|
setupAvailabilityWatcher() {
|
|
639
|
-
|
|
639
|
+
se(() => this.chatEnabled, (e) => {
|
|
640
640
|
if (!(!this.isTextMode || this.isConnecting)) {
|
|
641
641
|
if (e) {
|
|
642
642
|
this.textState.value.isConnected || this.updateState(this.textState, {
|
|
@@ -771,7 +771,7 @@ Current User:
|
|
|
771
771
|
let e = i[i.length - 1];
|
|
772
772
|
this.sharedMessages.value = e?.id === a ? [...i.slice(0, -1), r] : [...i, r];
|
|
773
773
|
}
|
|
774
|
-
r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code &&
|
|
774
|
+
r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && Se.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
|
|
775
775
|
}, onDone = (e) => {
|
|
776
776
|
if (!isCurrentTurn()) return;
|
|
777
777
|
if (!o && !c) {
|
|
@@ -1131,7 +1131,7 @@ var Ce = {
|
|
|
1131
1131
|
}, We = ["data-journal-row"], Ge = {
|
|
1132
1132
|
class: "flex w-5 shrink-0 flex-col items-center self-stretch",
|
|
1133
1133
|
"aria-hidden": "true"
|
|
1134
|
-
},
|
|
1134
|
+
}, G = { class: "flex h-[17px] shrink-0 items-center" }, Ke = {
|
|
1135
1135
|
key: 0,
|
|
1136
1136
|
class: "sr-only"
|
|
1137
1137
|
}, qe = /* @__PURE__ */ x({
|
|
@@ -1254,7 +1254,7 @@ var Ce = {
|
|
|
1254
1254
|
"data-test": "messaging-tool-activity-row",
|
|
1255
1255
|
"data-journal-row": e.tone,
|
|
1256
1256
|
class: C([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
|
|
1257
|
-
}, [_("div", Ge, [_("span",
|
|
1257
|
+
}, [_("div", Ge, [_("span", G, [(k(), p(ae(c.value[e.tone].station.tag), {
|
|
1258
1258
|
"data-journal-station": e.tone,
|
|
1259
1259
|
class: C(c.value[e.tone].station.class)
|
|
1260
1260
|
}, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? m("", !0) : (k(), h("span", {
|
|
@@ -1313,10 +1313,10 @@ function _unsupportedIterableToArray(e, t) {
|
|
|
1313
1313
|
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;
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor,
|
|
1317
|
-
|
|
1316
|
+
var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, K = Object.freeze, q = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
|
|
1317
|
+
K || (K = function freeze(e) {
|
|
1318
1318
|
return e;
|
|
1319
|
-
}),
|
|
1319
|
+
}), q || (q = function seal(e) {
|
|
1320
1320
|
return e;
|
|
1321
1321
|
}), tt || (tt = function apply(e, t) {
|
|
1322
1322
|
var n = [...arguments].slice(2);
|
|
@@ -1324,7 +1324,7 @@ q || (q = function freeze(e) {
|
|
|
1324
1324
|
}), nt || (nt = function construct(e) {
|
|
1325
1325
|
return new e(...[...arguments].slice(1));
|
|
1326
1326
|
});
|
|
1327
|
-
var rt = unapply(Array.prototype.forEach), it = unapply(Array.prototype.lastIndexOf), at = unapply(Array.prototype.pop), st = unapply(Array.prototype.push), ct = unapply(Array.prototype.splice), lt = Array.isArray, ut = unapply(String.prototype.toLowerCase), dt = unapply(String.prototype.toString), ft = unapply(String.prototype.match), pt = unapply(String.prototype.replace), mt = unapply(String.prototype.indexOf), ht = unapply(String.prototype.trim), gt = unapply(Number.prototype.toString), _t = unapply(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString),
|
|
1327
|
+
var rt = unapply(Array.prototype.forEach), it = unapply(Array.prototype.lastIndexOf), at = unapply(Array.prototype.pop), st = unapply(Array.prototype.push), ct = unapply(Array.prototype.splice), lt = Array.isArray, ut = unapply(String.prototype.toLowerCase), dt = unapply(String.prototype.toString), ft = unapply(String.prototype.match), pt = unapply(String.prototype.replace), mt = unapply(String.prototype.indexOf), ht = unapply(String.prototype.trim), gt = unapply(Number.prototype.toString), _t = unapply(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), J = unapply(Object.prototype.hasOwnProperty), bt = unapply(Object.prototype.toString), X = unapply(RegExp.prototype.test), xt = unconstruct(TypeError);
|
|
1328
1328
|
function unapply(e) {
|
|
1329
1329
|
return function(t) {
|
|
1330
1330
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -1352,7 +1352,7 @@ function addToSet(e, t) {
|
|
|
1352
1352
|
return e;
|
|
1353
1353
|
}
|
|
1354
1354
|
function cleanArray(e) {
|
|
1355
|
-
for (let t = 0; t < e.length; t++)
|
|
1355
|
+
for (let t = 0; t < e.length; t++) J(e, t) || (e[t] = null);
|
|
1356
1356
|
return e;
|
|
1357
1357
|
}
|
|
1358
1358
|
function clone(e) {
|
|
@@ -1360,7 +1360,7 @@ function clone(e) {
|
|
|
1360
1360
|
for (let r of Je(e)) {
|
|
1361
1361
|
var n = _slicedToArray(r, 2);
|
|
1362
1362
|
let i = n[0], a = n[1];
|
|
1363
|
-
|
|
1363
|
+
J(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
|
|
1364
1364
|
}
|
|
1365
1365
|
return t;
|
|
1366
1366
|
}
|
|
@@ -1401,12 +1401,12 @@ function lookupGetter(e, t) {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
function isRegex(e) {
|
|
1403
1403
|
try {
|
|
1404
|
-
return
|
|
1404
|
+
return X(e, ""), !0;
|
|
1405
1405
|
} catch {
|
|
1406
1406
|
return !1;
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
var St =
|
|
1409
|
+
var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ct = K(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), wt = K([
|
|
1410
1410
|
"feBlend",
|
|
1411
1411
|
"feColorMatrix",
|
|
1412
1412
|
"feComponentTransfer",
|
|
@@ -1432,7 +1432,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1432
1432
|
"feSpotLight",
|
|
1433
1433
|
"feTile",
|
|
1434
1434
|
"feTurbulence"
|
|
1435
|
-
]), Tt =
|
|
1435
|
+
]), Tt = K([
|
|
1436
1436
|
"animate",
|
|
1437
1437
|
"color-profile",
|
|
1438
1438
|
"cursor",
|
|
@@ -1455,7 +1455,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1455
1455
|
"solidcolor",
|
|
1456
1456
|
"unknown",
|
|
1457
1457
|
"use"
|
|
1458
|
-
]), Et =
|
|
1458
|
+
]), Et = K(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Dt = K([
|
|
1459
1459
|
"maction",
|
|
1460
1460
|
"maligngroup",
|
|
1461
1461
|
"malignmark",
|
|
@@ -1471,13 +1471,13 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1471
1471
|
"annotation-xml",
|
|
1472
1472
|
"mprescripts",
|
|
1473
1473
|
"none"
|
|
1474
|
-
]), Ot =
|
|
1474
|
+
]), Ot = K(["#text"]), kt = K(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), At = K(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), jt = K(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Mt = K([
|
|
1475
1475
|
"xlink:href",
|
|
1476
1476
|
"xml:id",
|
|
1477
1477
|
"xlink:title",
|
|
1478
1478
|
"xml:space",
|
|
1479
1479
|
"xmlns:xlink"
|
|
1480
|
-
]), Nt =
|
|
1480
|
+
]), Nt = q(/{{[\w\W]*|^[\w\W]*}}/g), Pt = q(/<%[\w\W]*|^[\w\W]*%>/g), Ft = q(/\${[\w\W]*/g), It = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Lt = q(/^aria-[\-\w]+$/), Rt = q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zt = q(/^(?:\w+script|data):/i), Bt = q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vt = q(/^html$/i), Ht = q(/^[a-z][.\w]*(-[.\w]+)+$/i), Ut = q(/<[/\w!]/g), Wt = q(/<[/\w]/g), Gt = q(/<\/no(script|embed|frames)/i), Kt = q(/\/>/i), qt = {
|
|
1481
1481
|
element: 1,
|
|
1482
1482
|
attribute: 2,
|
|
1483
1483
|
text: 3,
|
|
@@ -1522,7 +1522,7 @@ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1522
1522
|
uponSanitizeShadowNode: []
|
|
1523
1523
|
};
|
|
1524
1524
|
}, Zt = function _resolveSetOption(e, t, n, r) {
|
|
1525
|
-
return
|
|
1525
|
+
return J(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
|
|
1526
1526
|
};
|
|
1527
1527
|
function createDOMPurify() {
|
|
1528
1528
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jt(), DOMPurify = (e) => createDOMPurify(e);
|
|
@@ -1556,7 +1556,7 @@ function createDOMPurify() {
|
|
|
1556
1556
|
return re || (ne = Yt(u, r), re = !0), ne;
|
|
1557
1557
|
}, P = t, F = P.implementation, oe = P.createNodeIterator, I = P.createDocumentFragment, se = P.getElementsByTagName, ce = n.importNode, R = Xt();
|
|
1558
1558
|
DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
|
|
1559
|
-
let ue = Nt,
|
|
1559
|
+
let ue = Nt, z = Pt, de = Ft, pe = It, he = Lt, _e = zt, ve = Bt, ye = Ht, B = Rt, H = null, be = addToSet({}, [
|
|
1560
1560
|
...St,
|
|
1561
1561
|
...Ct,
|
|
1562
1562
|
...wt,
|
|
@@ -1586,7 +1586,7 @@ function createDOMPurify() {
|
|
|
1586
1586
|
enumerable: !0,
|
|
1587
1587
|
value: !1
|
|
1588
1588
|
}
|
|
1589
|
-
})),
|
|
1589
|
+
})), Ce = null, we = null, Te = Object.seal($e(null, {
|
|
1590
1590
|
tagCheck: {
|
|
1591
1591
|
writable: !0,
|
|
1592
1592
|
configurable: !1,
|
|
@@ -1599,14 +1599,14 @@ function createDOMPurify() {
|
|
|
1599
1599
|
enumerable: !0,
|
|
1600
1600
|
value: null
|
|
1601
1601
|
}
|
|
1602
|
-
})),
|
|
1602
|
+
})), Ee = !0, De = !0, Oe = !1, ke = !0, Ae = !1, je = !0, Me = !1, Ne = !1, Pe = null, Fe = null, Ie = !1, Le = !1, Re = !1, ze = !1, Be = !0, Ve = !1, He = "user-content-", Ue = !0, We = !1, Ge = {}, G = null, Ke = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), qe = null, Ye = addToSet({}, [
|
|
1603
1603
|
"audio",
|
|
1604
1604
|
"video",
|
|
1605
1605
|
"img",
|
|
1606
1606
|
"source",
|
|
1607
1607
|
"image",
|
|
1608
1608
|
"track"
|
|
1609
|
-
]),
|
|
1609
|
+
]), Xe = null, Ze = addToSet({}, [
|
|
1610
1610
|
"alt",
|
|
1611
1611
|
"class",
|
|
1612
1612
|
"for",
|
|
@@ -1621,40 +1621,40 @@ function createDOMPurify() {
|
|
|
1621
1621
|
"value",
|
|
1622
1622
|
"style",
|
|
1623
1623
|
"xmlns"
|
|
1624
|
-
]),
|
|
1625
|
-
Ze,
|
|
1624
|
+
]), Qe = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xhtml", nt = tt, gt = !1, _t = null, vt = addToSet({}, [
|
|
1626
1625
|
Qe,
|
|
1627
|
-
et
|
|
1628
|
-
|
|
1626
|
+
et,
|
|
1627
|
+
tt
|
|
1628
|
+
], dt), yt = K([
|
|
1629
1629
|
"mi",
|
|
1630
1630
|
"mo",
|
|
1631
1631
|
"mn",
|
|
1632
1632
|
"ms",
|
|
1633
1633
|
"mtext"
|
|
1634
|
-
]),
|
|
1634
|
+
]), bt = addToSet({}, yt), Qt = K(["annotation-xml"]), $t = addToSet({}, Qt), en = addToSet({}, [
|
|
1635
1635
|
"title",
|
|
1636
1636
|
"style",
|
|
1637
1637
|
"font",
|
|
1638
1638
|
"a",
|
|
1639
1639
|
"script"
|
|
1640
|
-
]),
|
|
1640
|
+
]), tn = null, Z = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
|
|
1641
1641
|
return e instanceof RegExp || e instanceof Function;
|
|
1642
1642
|
}, on = function _parseConfig() {
|
|
1643
1643
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1644
1644
|
if (nn && nn === e) return;
|
|
1645
|
-
(!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
1645
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), tn = Z.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = tn === "application/xhtml+xml" ? dt : ut, H = Zt(e, "ALLOWED_TAGS", be, { transform: Q }), U = Zt(e, "ALLOWED_ATTR", Se, { transform: Q }), _t = Zt(e, "ALLOWED_NAMESPACES", vt, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", Ze, {
|
|
1646
1646
|
transform: Q,
|
|
1647
|
-
base:
|
|
1648
|
-
}),
|
|
1647
|
+
base: Ze
|
|
1648
|
+
}), qe = Zt(e, "ADD_DATA_URI_TAGS", Ye, {
|
|
1649
1649
|
transform: Q,
|
|
1650
|
-
base:
|
|
1651
|
-
}),
|
|
1652
|
-
let t =
|
|
1653
|
-
if (W = $e(null),
|
|
1650
|
+
base: Ye
|
|
1651
|
+
}), G = Zt(e, "FORBID_CONTENTS", Ke, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ge = J(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = e.SAFE_FOR_TEMPLATES || !1, je = e.SAFE_FOR_XML !== !1, Me = e.WHOLE_DOCUMENT || !1, Le = e.RETURN_DOM || !1, Re = e.RETURN_DOM_FRAGMENT || !1, ze = e.RETURN_TRUSTED_TYPE || !1, Ie = e.FORCE_BODY || !1, Be = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Ue = e.KEEP_CONTENT !== !1, We = e.IN_PLACE || !1, B = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, nt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : tt, bt = J(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, yt), $t = J(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Qt);
|
|
1652
|
+
let t = J(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
|
|
1653
|
+
if (W = $e(null), J(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), J(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), J(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), q(W), Ae && (De = !1), Re && (Le = !0), Ge && (H = addToSet({}, Ot), U = $e(null), Ge.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ge.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ge.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ge.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, J(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), J(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), J(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Xe, e.ADD_URI_SAFE_ATTR, Q), J(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (G === Ke && (G = clone(G)), addToSet(G, e.FORBID_CONTENTS, Q)), J(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (G === Ke && (G = clone(G)), addToSet(G, e.ADD_FORBID_CONTENTS, Q)), Ue && (H["#text"] = !0), Me && addToSet(H, [
|
|
1654
1654
|
"html",
|
|
1655
1655
|
"head",
|
|
1656
1656
|
"body"
|
|
1657
|
-
]), H.table && (addToSet(H, ["tbody"]), delete
|
|
1657
|
+
]), H.table && (addToSet(H, ["tbody"]), delete Ce.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
1658
1658
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
1659
1659
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
1660
1660
|
let t = T;
|
|
@@ -1665,25 +1665,25 @@ function createDOMPurify() {
|
|
|
1665
1665
|
throw T = t, e;
|
|
1666
1666
|
}
|
|
1667
1667
|
} else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = ae()), T && typeof te == "string" && (te = j("")));
|
|
1668
|
-
|
|
1668
|
+
K && K(e), nn = e;
|
|
1669
1669
|
}, sn = addToSet({}, [
|
|
1670
1670
|
...Ct,
|
|
1671
1671
|
...wt,
|
|
1672
1672
|
...Tt
|
|
1673
1673
|
]), cn = addToSet({}, [...Et, ...Dt]), ln = function _checkSvgNamespace(e, t, n) {
|
|
1674
|
-
return t.namespaceURI ===
|
|
1674
|
+
return t.namespaceURI === tt ? e === "svg" : t.namespaceURI === Qe ? e === "svg" && (n === "annotation-xml" || bt[n]) : !!sn[e];
|
|
1675
1675
|
}, un = function _checkMathMlNamespace(e, t, n) {
|
|
1676
|
-
return t.namespaceURI ===
|
|
1676
|
+
return t.namespaceURI === tt ? e === "math" : t.namespaceURI === et ? e === "math" && $t[n] : !!cn[e];
|
|
1677
1677
|
}, dn = function _checkHtmlNamespace(e, t, n) {
|
|
1678
|
-
return t.namespaceURI ===
|
|
1678
|
+
return t.namespaceURI === et && !$t[n] || t.namespaceURI === Qe && !bt[n] ? !1 : !cn[e] && (en[e] || !sn[e]);
|
|
1679
1679
|
}, fn = function _checkValidNamespace(e) {
|
|
1680
1680
|
let t = v(e);
|
|
1681
1681
|
(!t || !t.tagName) && (t = {
|
|
1682
|
-
namespaceURI:
|
|
1682
|
+
namespaceURI: nt,
|
|
1683
1683
|
tagName: "template"
|
|
1684
1684
|
});
|
|
1685
1685
|
let n = ut(e.tagName), r = ut(t.tagName);
|
|
1686
|
-
return
|
|
1686
|
+
return _t[e.namespaceURI] ? e.namespaceURI === et ? ln(n, t, r) : e.namespaceURI === Qe ? un(n, t, r) : e.namespaceURI === tt ? dn(n, t, r) : !!(tn === "application/xhtml+xml" && _t[e.namespaceURI]) : !1;
|
|
1687
1687
|
}, pn = function _forceRemove(e) {
|
|
1688
1688
|
st(DOMPurify.removed, { element: e });
|
|
1689
1689
|
try {
|
|
@@ -1723,7 +1723,7 @@ function createDOMPurify() {
|
|
|
1723
1723
|
from: t
|
|
1724
1724
|
});
|
|
1725
1725
|
}
|
|
1726
|
-
if (t.removeAttribute(e), e === "is") if (
|
|
1726
|
+
if (t.removeAttribute(e), e === "is") if (Le || Re) try {
|
|
1727
1727
|
pn(t);
|
|
1728
1728
|
} catch {}
|
|
1729
1729
|
else try {
|
|
@@ -1746,11 +1746,11 @@ function createDOMPurify() {
|
|
|
1746
1746
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
1747
1747
|
}
|
|
1748
1748
|
}, vn = function _neutralizePatchLinkage(e) {
|
|
1749
|
-
if (!
|
|
1749
|
+
if (!je) return;
|
|
1750
1750
|
let t = [e];
|
|
1751
1751
|
for (; t.length > 0;) {
|
|
1752
1752
|
let e = t.pop(), n = S ? S(e) : e.nodeType;
|
|
1753
|
-
if (n === qt.processingInstruction || n === qt.comment &&
|
|
1753
|
+
if (n === qt.processingInstruction || n === qt.comment && X(Wt, e.data)) {
|
|
1754
1754
|
try {
|
|
1755
1755
|
m(e);
|
|
1756
1756
|
} catch {}
|
|
@@ -1767,28 +1767,28 @@ function createDOMPurify() {
|
|
|
1767
1767
|
}
|
|
1768
1768
|
}, yn = function _initDocument(e) {
|
|
1769
1769
|
let n = null, r = null;
|
|
1770
|
-
if (
|
|
1770
|
+
if (Ie) e = "<remove></remove>" + e;
|
|
1771
1771
|
else {
|
|
1772
1772
|
let t = ft(e, /^[\r\n\t ]+/);
|
|
1773
1773
|
r = t && t[0];
|
|
1774
1774
|
}
|
|
1775
|
-
|
|
1775
|
+
tn === "application/xhtml+xml" && nt === tt && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
1776
1776
|
let i = T ? j(e) : e;
|
|
1777
|
-
if (
|
|
1778
|
-
n = new c().parseFromString(i,
|
|
1777
|
+
if (nt === tt) try {
|
|
1778
|
+
n = new c().parseFromString(i, tn);
|
|
1779
1779
|
} catch {}
|
|
1780
1780
|
if (!n || !n.documentElement) {
|
|
1781
|
-
n = F.createDocument(
|
|
1781
|
+
n = F.createDocument(nt, "template", null);
|
|
1782
1782
|
try {
|
|
1783
|
-
n.documentElement.innerHTML =
|
|
1783
|
+
n.documentElement.innerHTML = gt ? te : i;
|
|
1784
1784
|
} catch {}
|
|
1785
1785
|
}
|
|
1786
1786
|
let a = n.body || n.documentElement;
|
|
1787
|
-
return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null),
|
|
1787
|
+
return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), nt === tt ? se.call(n, Me ? "html" : "body")[0] : Me ? n.documentElement : a;
|
|
1788
1788
|
}, bn = function _createNodeIterator(e) {
|
|
1789
1789
|
return oe.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
|
|
1790
1790
|
}, xn = function _stripTemplateExpressions(e) {
|
|
1791
|
-
return e = pt(e, ue, " "), e = pt(e,
|
|
1791
|
+
return e = pt(e, ue, " "), e = pt(e, z, " "), e = pt(e, de, " "), e;
|
|
1792
1792
|
}, Sn = function _scrubTemplateExpressions(e) {
|
|
1793
1793
|
e.normalize();
|
|
1794
1794
|
let t = oe.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
|
|
@@ -1821,15 +1821,15 @@ function createDOMPurify() {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
}
|
|
1823
1823
|
let En = function _isUnsafeNode(e, t) {
|
|
1824
|
-
return !!(
|
|
1824
|
+
return !!(je && e.hasChildNodes() && !Tn(e.firstElementChild) && X(Ut, e.textContent) && X(Ut, e.innerHTML) || je && e.namespaceURI === tt && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || je && e.nodeType === qt.comment && X(Wt, e.data));
|
|
1825
1825
|
}, Dn = function _sanitizeDisallowedNode(e, t) {
|
|
1826
|
-
if (!
|
|
1827
|
-
if (
|
|
1826
|
+
if (!Ce[t] && jn(t) && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
|
|
1827
|
+
if (Ue && !G[t]) {
|
|
1828
1828
|
let t = v(e), n = _(e);
|
|
1829
1829
|
if (n && t) {
|
|
1830
1830
|
let r = n.length;
|
|
1831
1831
|
for (let i = r - 1; i >= 0; --i) {
|
|
1832
|
-
let r =
|
|
1832
|
+
let r = We ? n[i] : p(n[i], !0);
|
|
1833
1833
|
t.insertBefore(r, h(e));
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
@@ -1844,23 +1844,23 @@ function createDOMPurify() {
|
|
|
1844
1844
|
allowedTags: H
|
|
1845
1845
|
}), e !== t && v(e) === null) return !0;
|
|
1846
1846
|
if (En(e, n)) return pn(e), !0;
|
|
1847
|
-
if (
|
|
1847
|
+
if (Ce[n] || !(Te.tagCheck instanceof Function && Te.tagCheck(n)) && !H[n]) {
|
|
1848
1848
|
let t = Dn(e, n);
|
|
1849
1849
|
return t === !1 && _executeHooks(R.afterSanitizeElements, e, null), t;
|
|
1850
1850
|
}
|
|
1851
|
-
if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") &&
|
|
1852
|
-
if (
|
|
1851
|
+
if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && X(Gt, e.innerHTML)) return pn(e), !0;
|
|
1852
|
+
if (Ae && e.nodeType === qt.text) {
|
|
1853
1853
|
let t = xn(e.textContent);
|
|
1854
1854
|
e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
|
|
1855
1855
|
}
|
|
1856
1856
|
return _executeHooks(R.afterSanitizeElements, e, null), !1;
|
|
1857
1857
|
}, kn = function _isValidAttribute(e, n, r) {
|
|
1858
|
-
if (
|
|
1859
|
-
let i = U[n] ||
|
|
1860
|
-
if (!(
|
|
1858
|
+
if (we[n] || je && n === "patchsrc" || je && n === "for" && e !== "label" && e !== "output" || Be && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
|
|
1859
|
+
let i = U[n] || Te.attributeCheck instanceof Function && Te.attributeCheck(n, e);
|
|
1860
|
+
if (!(De && X(pe, n)) && !(Ee && X(he, n))) {
|
|
1861
1861
|
if (!i) {
|
|
1862
|
-
if (!(jn(e) && (W.tagNameCheck instanceof RegExp &&
|
|
1863
|
-
} else if (!
|
|
1862
|
+
if (!(jn(e) && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && X(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && X(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
|
|
1863
|
+
} else if (!Xe[n] && !X(B, pt(r, ve, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(Oe && !X(_e, pt(r, ve, ""))) && r) return !1;
|
|
1864
1864
|
}
|
|
1865
1865
|
return !0;
|
|
1866
1866
|
}, An = addToSet({}, [
|
|
@@ -1873,7 +1873,7 @@ function createDOMPurify() {
|
|
|
1873
1873
|
"font-face-uri",
|
|
1874
1874
|
"missing-glyph"
|
|
1875
1875
|
]), jn = function _isBasicCustomElement(e) {
|
|
1876
|
-
return !An[ut(e)] &&
|
|
1876
|
+
return !An[ut(e)] && X(ye, e);
|
|
1877
1877
|
}, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
|
|
1878
1878
|
if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
1879
1879
|
case "TrustedHTML": return j(r);
|
|
@@ -1899,7 +1899,7 @@ function createDOMPurify() {
|
|
|
1899
1899
|
}, r = t.length, i = Q(e.nodeName);
|
|
1900
1900
|
for (; r--;) {
|
|
1901
1901
|
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
|
|
1902
|
-
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue,
|
|
1902
|
+
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue, Ve && (u === "id" || u === "name") && mt(p, He) !== 0 && (hn(o, e), p = He + p), je && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
|
|
1903
1903
|
hn(o, e);
|
|
1904
1904
|
continue;
|
|
1905
1905
|
}
|
|
@@ -1912,11 +1912,11 @@ function createDOMPurify() {
|
|
|
1912
1912
|
hn(o, e);
|
|
1913
1913
|
continue;
|
|
1914
1914
|
}
|
|
1915
|
-
if (!
|
|
1915
|
+
if (!ke && X(Kt, p)) {
|
|
1916
1916
|
hn(o, e);
|
|
1917
1917
|
continue;
|
|
1918
1918
|
}
|
|
1919
|
-
if (
|
|
1919
|
+
if (Ae && (p = xn(p)), !kn(i, u, p)) {
|
|
1920
1920
|
hn(o, e);
|
|
1921
1921
|
continue;
|
|
1922
1922
|
}
|
|
@@ -1971,16 +1971,16 @@ function createDOMPurify() {
|
|
|
1971
1971
|
};
|
|
1972
1972
|
return DOMPurify.sanitize = function(e) {
|
|
1973
1973
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
|
|
1974
|
-
if (
|
|
1974
|
+
if (gt = !e, gt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
|
|
1975
1975
|
if (!DOMPurify.isSupported) return e;
|
|
1976
|
-
|
|
1977
|
-
let s =
|
|
1976
|
+
Ne ? (H = Pe, U = Fe) : on(t), (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && (H = clone(H)), R.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
|
|
1977
|
+
let s = We && typeof e != "string" && Tn(e);
|
|
1978
1978
|
if (s) {
|
|
1979
1979
|
vn(e);
|
|
1980
1980
|
let t = C ? C(e) : e.nodeName;
|
|
1981
1981
|
if (typeof t == "string") {
|
|
1982
1982
|
let n = Q(t);
|
|
1983
|
-
if (!H[n] ||
|
|
1983
|
+
if (!H[n] || Ce[n]) throw mn(e), xt("root node is forbidden and cannot be sanitized in-place");
|
|
1984
1984
|
}
|
|
1985
1985
|
if (Cn(e)) throw mn(e), xt("root node is clobbered and cannot be sanitized in-place");
|
|
1986
1986
|
try {
|
|
@@ -1990,10 +1990,10 @@ function createDOMPurify() {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
} else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
|
|
1992
1992
|
else {
|
|
1993
|
-
if (!
|
|
1994
|
-
if (r = yn(e), !r) return
|
|
1993
|
+
if (!Le && !Ae && !Me && e.indexOf("<") === -1) return T && ze ? j(e) : e;
|
|
1994
|
+
if (r = yn(e), !r) return Le ? null : ze ? te : "";
|
|
1995
1995
|
}
|
|
1996
|
-
r &&
|
|
1996
|
+
r && Ie && pn(r.firstChild);
|
|
1997
1997
|
let c = s ? e : r, u = bn(c);
|
|
1998
1998
|
try {
|
|
1999
1999
|
for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
|
|
@@ -2004,27 +2004,27 @@ function createDOMPurify() {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
if (s) return rt(DOMPurify.removed, (e) => {
|
|
2006
2006
|
e.element && _n(e.element);
|
|
2007
|
-
}),
|
|
2008
|
-
if (
|
|
2009
|
-
if (
|
|
2007
|
+
}), Ae && Sn(e), e;
|
|
2008
|
+
if (Le) {
|
|
2009
|
+
if (Ae && Sn(r), Re) for (o = I.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
|
|
2010
2010
|
else o = r;
|
|
2011
2011
|
return (U.shadowroot || U.shadowrootmode) && (o = ce.call(n, o, !0)), o;
|
|
2012
2012
|
}
|
|
2013
|
-
let f =
|
|
2014
|
-
return
|
|
2013
|
+
let f = Me ? r.outerHTML : r.innerHTML;
|
|
2014
|
+
return Me && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && X(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Ae && (f = xn(f)), T && ze ? j(f) : f;
|
|
2015
2015
|
}, DOMPurify.setConfig = function() {
|
|
2016
2016
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2017
|
-
on(e),
|
|
2017
|
+
on(e), Ne = !0, Pe = H, Fe = U;
|
|
2018
2018
|
}, DOMPurify.clearConfig = function() {
|
|
2019
|
-
nn = null,
|
|
2019
|
+
nn = null, Ne = !1, Pe = null, Fe = null, T = ne, te = "";
|
|
2020
2020
|
}, DOMPurify.isValidAttribute = function(e, t, n) {
|
|
2021
2021
|
nn || on({});
|
|
2022
2022
|
let r = Q(e), i = Q(t);
|
|
2023
2023
|
return kn(r, i, n);
|
|
2024
2024
|
}, DOMPurify.addHook = function(e, t) {
|
|
2025
|
-
typeof t == "function" &&
|
|
2025
|
+
typeof t == "function" && J(R, e) && st(R[e], t);
|
|
2026
2026
|
}, DOMPurify.removeHook = function(e, t) {
|
|
2027
|
-
if (
|
|
2027
|
+
if (J(R, e)) {
|
|
2028
2028
|
if (t !== void 0) {
|
|
2029
2029
|
let n = it(R[e], t);
|
|
2030
2030
|
return n === -1 ? void 0 : ct(R[e], n, 1)[0];
|
|
@@ -2032,7 +2032,7 @@ function createDOMPurify() {
|
|
|
2032
2032
|
return at(R[e]);
|
|
2033
2033
|
}
|
|
2034
2034
|
}, DOMPurify.removeHooks = function(e) {
|
|
2035
|
-
|
|
2035
|
+
J(R, e) && (R[e] = []);
|
|
2036
2036
|
}, DOMPurify.removeAllHooks = function() {
|
|
2037
2037
|
R = Xt();
|
|
2038
2038
|
}, DOMPurify;
|
|
@@ -2068,7 +2068,7 @@ function d(e, t = "") {
|
|
|
2068
2068
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
2069
2069
|
replace: (e, t) => {
|
|
2070
2070
|
let i = typeof t == "string" ? t : t.source;
|
|
2071
|
-
return i = i.replace(
|
|
2071
|
+
return i = i.replace(Z.caret, "$1"), n = n.replace(e, i), r;
|
|
2072
2072
|
},
|
|
2073
2073
|
getRegex: () => new RegExp(n, t)
|
|
2074
2074
|
};
|
|
@@ -2080,7 +2080,7 @@ var tn = ((e = "") => {
|
|
|
2080
2080
|
} catch {
|
|
2081
2081
|
return !1;
|
|
2082
2082
|
}
|
|
2083
|
-
})(),
|
|
2083
|
+
})(), Z = {
|
|
2084
2084
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
2085
2085
|
outputLinkReplace: /\\([\[\]])/g,
|
|
2086
2086
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -2137,112 +2137,112 @@ var tn = ((e = "") => {
|
|
|
2137
2137
|
headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
|
|
2138
2138
|
htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
2139
2139
|
blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
|
|
2140
|
-
},
|
|
2141
|
-
blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",
|
|
2142
|
-
code:
|
|
2143
|
-
def:
|
|
2144
|
-
fences:
|
|
2145
|
-
heading:
|
|
2146
|
-
hr:
|
|
2147
|
-
html:
|
|
2148
|
-
lheading:
|
|
2149
|
-
list:
|
|
2150
|
-
newline:
|
|
2151
|
-
paragraph:
|
|
2140
|
+
}, Q = /^(?:[ \t]*(?:\n|$))+/, nn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, rn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, an = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, on = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, cn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ln = d(cn).replace(/bull/g, sn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), un = d(cn).replace(/bull/g, sn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fn = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), gn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _n = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, vn = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _n).replace("tag", gn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), yn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), bn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), xn = {
|
|
2141
|
+
blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", bn).getRegex(),
|
|
2142
|
+
code: nn,
|
|
2143
|
+
def: mn,
|
|
2144
|
+
fences: rn,
|
|
2145
|
+
heading: on,
|
|
2146
|
+
hr: an,
|
|
2147
|
+
html: vn,
|
|
2148
|
+
lheading: ln,
|
|
2149
|
+
list: hn,
|
|
2150
|
+
newline: Q,
|
|
2151
|
+
paragraph: yn,
|
|
2152
2152
|
table: en,
|
|
2153
|
-
text:
|
|
2154
|
-
},
|
|
2155
|
-
...
|
|
2156
|
-
lheading:
|
|
2157
|
-
table:
|
|
2158
|
-
paragraph: d(
|
|
2159
|
-
},
|
|
2160
|
-
...
|
|
2161
|
-
html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",
|
|
2153
|
+
text: fn
|
|
2154
|
+
}, Sn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), Cn = {
|
|
2155
|
+
...xn,
|
|
2156
|
+
lheading: un,
|
|
2157
|
+
table: Sn,
|
|
2158
|
+
paragraph: d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Sn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex()
|
|
2159
|
+
}, wn = {
|
|
2160
|
+
...xn,
|
|
2161
|
+
html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", _n).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
2162
2162
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
2163
2163
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
2164
2164
|
fences: en,
|
|
2165
2165
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
2166
|
-
paragraph: d(
|
|
2167
|
-
},
|
|
2166
|
+
paragraph: d(dn).replace("hr", an).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ln).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
2167
|
+
}, Tn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, En = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Dn = /^( {2,}|\\)\n(?!\s*$)/, On = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, kn = /[\p{P}\p{S}]/u, An = /[\s\p{P}\p{S}]/u, jn = /[^\s\p{P}\p{S}]/u, Mn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, An).getRegex(), Nn = /(?!~)[\p{P}\p{S}]/u, Pn = /(?!~)[\s\p{P}\p{S}]/u, Fn = /(?:[^\s\p{P}\p{S}]|~)/u, In = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ln = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rn = d(Ln, "u").replace(/punct/g, kn).getRegex(), zn = d(Ln, "u").replace(/punct/g, Nn).getRegex(), Bn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vn = d(Bn, "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Hn = d(Bn, "gu").replace(/notPunctSpace/g, Fn).replace(/punctSpace/g, Pn).replace(/punct/g, Nn).getRegex(), Un = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Wn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, kn).getRegex(), Gn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Kn = d(/\\(punct)/, "gu").replace(/punct/g, kn).getRegex(), qn = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Jn = d(_n).replace("(?:-->|$)", "-->").getRegex(), Yn = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Jn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Xn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zn = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Xn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Qn = d(/^!?\[(label)\]\[(ref)\]/).replace("label", Xn).replace("ref", pn).getRegex(), $n = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), er = d("reflink|nolink(?!\\()", "g").replace("reflink", Qn).replace("nolink", $n).getRegex(), tr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nr = {
|
|
2168
2168
|
_backpedal: en,
|
|
2169
|
-
anyPunctuation:
|
|
2170
|
-
autolink:
|
|
2171
|
-
blockSkip:
|
|
2172
|
-
br:
|
|
2173
|
-
code:
|
|
2169
|
+
anyPunctuation: Kn,
|
|
2170
|
+
autolink: qn,
|
|
2171
|
+
blockSkip: In,
|
|
2172
|
+
br: Dn,
|
|
2173
|
+
code: En,
|
|
2174
2174
|
del: en,
|
|
2175
2175
|
delLDelim: en,
|
|
2176
2176
|
delRDelim: en,
|
|
2177
|
-
emStrongLDelim:
|
|
2178
|
-
emStrongRDelimAst:
|
|
2179
|
-
emStrongRDelimUnd:
|
|
2180
|
-
escape:
|
|
2181
|
-
link:
|
|
2182
|
-
nolink:
|
|
2183
|
-
punctuation:
|
|
2184
|
-
reflink:
|
|
2185
|
-
reflinkSearch:
|
|
2186
|
-
tag:
|
|
2187
|
-
text:
|
|
2177
|
+
emStrongLDelim: Rn,
|
|
2178
|
+
emStrongRDelimAst: Vn,
|
|
2179
|
+
emStrongRDelimUnd: Un,
|
|
2180
|
+
escape: Tn,
|
|
2181
|
+
link: Zn,
|
|
2182
|
+
nolink: $n,
|
|
2183
|
+
punctuation: Mn,
|
|
2184
|
+
reflink: Qn,
|
|
2185
|
+
reflinkSearch: er,
|
|
2186
|
+
tag: Yn,
|
|
2187
|
+
text: On,
|
|
2188
2188
|
url: en
|
|
2189
|
+
}, rr = {
|
|
2190
|
+
...nr,
|
|
2191
|
+
link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Xn).getRegex(),
|
|
2192
|
+
reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Xn).getRegex()
|
|
2189
2193
|
}, ir = {
|
|
2190
|
-
...
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
emStrongLDelim: Bn,
|
|
2197
|
-
delLDelim: Gn,
|
|
2198
|
-
delRDelim: Kn,
|
|
2199
|
-
url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", nr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
2194
|
+
...nr,
|
|
2195
|
+
emStrongRDelimAst: Hn,
|
|
2196
|
+
emStrongLDelim: zn,
|
|
2197
|
+
delLDelim: Wn,
|
|
2198
|
+
delRDelim: Gn,
|
|
2199
|
+
url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", tr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
2200
2200
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
2201
2201
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
2202
|
-
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",
|
|
2202
|
+
text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", tr).getRegex()
|
|
2203
|
+
}, ar = {
|
|
2204
|
+
...ir,
|
|
2205
|
+
br: d(Dn).replace("{2,}", "*").getRegex(),
|
|
2206
|
+
text: d(ir.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
2203
2207
|
}, or = {
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2208
|
+
normal: xn,
|
|
2209
|
+
gfm: Cn,
|
|
2210
|
+
pedantic: wn
|
|
2207
2211
|
}, sr = {
|
|
2208
|
-
normal:
|
|
2209
|
-
gfm:
|
|
2210
|
-
|
|
2212
|
+
normal: nr,
|
|
2213
|
+
gfm: ir,
|
|
2214
|
+
breaks: ar,
|
|
2215
|
+
pedantic: rr
|
|
2211
2216
|
}, cr = {
|
|
2212
|
-
normal: rr,
|
|
2213
|
-
gfm: ar,
|
|
2214
|
-
breaks: or,
|
|
2215
|
-
pedantic: ir
|
|
2216
|
-
}, lr = {
|
|
2217
2217
|
"&": "&",
|
|
2218
2218
|
"<": "<",
|
|
2219
2219
|
">": ">",
|
|
2220
2220
|
"\"": """,
|
|
2221
2221
|
"'": "'"
|
|
2222
|
-
}, ge = (e) =>
|
|
2222
|
+
}, ge = (e) => cr[e];
|
|
2223
2223
|
function O(e, t) {
|
|
2224
2224
|
if (t) {
|
|
2225
|
-
if (
|
|
2226
|
-
} else if (
|
|
2225
|
+
if (Z.escapeTest.test(e)) return e.replace(Z.escapeReplace, ge);
|
|
2226
|
+
} else if (Z.escapeTestNoEncode.test(e)) return e.replace(Z.escapeReplaceNoEncode, ge);
|
|
2227
2227
|
return e;
|
|
2228
2228
|
}
|
|
2229
2229
|
function V(e) {
|
|
2230
2230
|
try {
|
|
2231
|
-
e = encodeURI(e).replace(
|
|
2231
|
+
e = encodeURI(e).replace(Z.percentDecode, "%");
|
|
2232
2232
|
} catch {
|
|
2233
2233
|
return null;
|
|
2234
2234
|
}
|
|
2235
2235
|
return e;
|
|
2236
2236
|
}
|
|
2237
2237
|
function Y(e, t) {
|
|
2238
|
-
let n = e.replace(
|
|
2238
|
+
let n = e.replace(Z.findPipe, (e, t, n) => {
|
|
2239
2239
|
let r = !1, i = t;
|
|
2240
2240
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
2241
2241
|
return r ? "|" : " |";
|
|
2242
|
-
}).split(
|
|
2242
|
+
}).split(Z.splitPipe), r = 0;
|
|
2243
2243
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
2244
2244
|
else for (; n.length < t;) n.push("");
|
|
2245
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
2245
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(Z.slashPipe, "|");
|
|
2246
2246
|
return n;
|
|
2247
2247
|
}
|
|
2248
2248
|
function $(e, t, n) {
|
|
@@ -2259,7 +2259,7 @@ function $(e, t, n) {
|
|
|
2259
2259
|
}
|
|
2260
2260
|
function ee(e) {
|
|
2261
2261
|
let t = e.split("\n"), n = t.length - 1;
|
|
2262
|
-
for (; n >= 0 &&
|
|
2262
|
+
for (; n >= 0 && Z.blankLine.test(t[n]);) n--;
|
|
2263
2263
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
2264
2264
|
}
|
|
2265
2265
|
function fe(e, t) {
|
|
@@ -2754,7 +2754,7 @@ ${c}` : c;
|
|
|
2754
2754
|
};
|
|
2755
2755
|
}
|
|
2756
2756
|
}
|
|
2757
|
-
},
|
|
2757
|
+
}, lr = class l {
|
|
2758
2758
|
constructor(t) {
|
|
2759
2759
|
e(this, "tokens", void 0), e(this, "options", void 0), e(this, "state", void 0), e(this, "inlineQueue", void 0), e(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = t || $t, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
2760
2760
|
inLink: !1,
|
|
@@ -2762,16 +2762,16 @@ ${c}` : c;
|
|
|
2762
2762
|
top: !0
|
|
2763
2763
|
};
|
|
2764
2764
|
let n = {
|
|
2765
|
-
other:
|
|
2766
|
-
block:
|
|
2767
|
-
inline:
|
|
2765
|
+
other: Z,
|
|
2766
|
+
block: or.normal,
|
|
2767
|
+
inline: sr.normal
|
|
2768
2768
|
};
|
|
2769
|
-
this.options.pedantic ? (n.block =
|
|
2769
|
+
this.options.pedantic ? (n.block = or.pedantic, n.inline = sr.pedantic) : this.options.gfm && (n.block = or.gfm, this.options.breaks ? n.inline = sr.breaks : n.inline = sr.gfm), this.tokenizer.rules = n;
|
|
2770
2770
|
}
|
|
2771
2771
|
static get rules() {
|
|
2772
2772
|
return {
|
|
2773
|
-
block:
|
|
2774
|
-
inline:
|
|
2773
|
+
block: or,
|
|
2774
|
+
inline: sr
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
2777
2777
|
static lex(e, t) {
|
|
@@ -2781,7 +2781,7 @@ ${c}` : c;
|
|
|
2781
2781
|
return new l(t).inlineTokens(e);
|
|
2782
2782
|
}
|
|
2783
2783
|
lex(e) {
|
|
2784
|
-
e = e.replace(
|
|
2784
|
+
e = e.replace(Z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
2785
2785
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
2786
2786
|
let t = this.inlineQueue[e];
|
|
2787
2787
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -2789,7 +2789,7 @@ ${c}` : c;
|
|
|
2789
2789
|
return this.inlineQueue = [], this.tokens;
|
|
2790
2790
|
}
|
|
2791
2791
|
blockTokens(e, t = [], n = !1) {
|
|
2792
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
2792
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Z.tabCharGlobal, " ").replace(Z.spaceLine, ""));
|
|
2793
2793
|
let r = Infinity;
|
|
2794
2794
|
for (; e;) {
|
|
2795
2795
|
if (e.length < r) r = e.length;
|
|
@@ -2979,7 +2979,7 @@ ${c}` : c;
|
|
|
2979
2979
|
return "";
|
|
2980
2980
|
}
|
|
2981
2981
|
code({ text: e, lang: t, escaped: n }) {
|
|
2982
|
-
let r = (t || "").match(
|
|
2982
|
+
let r = (t || "").match(Z.notSpaceStart)?.[0], i = e.replace(Z.endingNewline, "") + "\n";
|
|
2983
2983
|
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";
|
|
2984
2984
|
}
|
|
2985
2985
|
blockquote({ tokens: e }) {
|
|
@@ -3107,7 +3107,7 @@ ${e}</tr>
|
|
|
3107
3107
|
checkbox({ raw: e }) {
|
|
3108
3108
|
return e;
|
|
3109
3109
|
}
|
|
3110
|
-
},
|
|
3110
|
+
}, ur = class l {
|
|
3111
3111
|
constructor(t) {
|
|
3112
3112
|
e(this, "options", void 0), e(this, "renderer", void 0), e(this, "textRenderer", void 0), this.options = t || $t, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
|
|
3113
3113
|
}
|
|
@@ -3255,7 +3255,7 @@ ${e}</tr>
|
|
|
3255
3255
|
}
|
|
3256
3256
|
return n;
|
|
3257
3257
|
}
|
|
3258
|
-
},
|
|
3258
|
+
}, dr = (_Class = class {
|
|
3259
3259
|
constructor(t) {
|
|
3260
3260
|
e(this, "options", void 0), e(this, "block", void 0), this.options = t || $t;
|
|
3261
3261
|
}
|
|
@@ -3272,10 +3272,10 @@ ${e}</tr>
|
|
|
3272
3272
|
return e;
|
|
3273
3273
|
}
|
|
3274
3274
|
provideLexer(e = this.block) {
|
|
3275
|
-
return e ?
|
|
3275
|
+
return e ? lr.lex : lr.lexInline;
|
|
3276
3276
|
}
|
|
3277
3277
|
provideParser(e = this.block) {
|
|
3278
|
-
return e ?
|
|
3278
|
+
return e ? ur.parse : ur.parseInline;
|
|
3279
3279
|
}
|
|
3280
3280
|
}, e(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
3281
3281
|
"preprocess",
|
|
@@ -3288,7 +3288,7 @@ ${e}</tr>
|
|
|
3288
3288
|
"processAllTokens"
|
|
3289
3289
|
])), _Class), D = class {
|
|
3290
3290
|
constructor(...t) {
|
|
3291
|
-
e(this, "defaults", M()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser",
|
|
3291
|
+
e(this, "defaults", M()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", ur), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", lr), e(this, "Tokenizer", w), e(this, "Hooks", dr), this.use(...t);
|
|
3292
3292
|
}
|
|
3293
3293
|
walkTokens(e, t) {
|
|
3294
3294
|
let n = [];
|
|
@@ -3367,13 +3367,13 @@ ${e}</tr>
|
|
|
3367
3367
|
n.tokenizer = t;
|
|
3368
3368
|
}
|
|
3369
3369
|
if (e.hooks) {
|
|
3370
|
-
let t = this.defaults.hooks || new
|
|
3370
|
+
let t = this.defaults.hooks || new dr();
|
|
3371
3371
|
for (let n in e.hooks) {
|
|
3372
3372
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
3373
3373
|
if (["options", "block"].includes(n)) continue;
|
|
3374
3374
|
let r = n, i = e.hooks[r], a = t[r];
|
|
3375
|
-
|
|
3376
|
-
if (this.defaults.async &&
|
|
3375
|
+
dr.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
3376
|
+
if (this.defaults.async && dr.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
3377
3377
|
let n = await i.call(t, e);
|
|
3378
3378
|
return a.call(t, n);
|
|
3379
3379
|
})();
|
|
@@ -3410,10 +3410,10 @@ ${e}</tr>
|
|
|
3410
3410
|
}, this;
|
|
3411
3411
|
}
|
|
3412
3412
|
lexer(e, t) {
|
|
3413
|
-
return
|
|
3413
|
+
return lr.lex(e, t ?? this.defaults);
|
|
3414
3414
|
}
|
|
3415
3415
|
parser(e, t) {
|
|
3416
|
-
return
|
|
3416
|
+
return ur.parse(e, t ?? this.defaults);
|
|
3417
3417
|
}
|
|
3418
3418
|
parseMarkdown(e) {
|
|
3419
3419
|
return (t, n) => {
|
|
@@ -3425,16 +3425,16 @@ ${e}</tr>
|
|
|
3425
3425
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
3426
3426
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
3427
3427
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
3428
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
3428
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
3429
3429
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
3430
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
3430
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(a, i);
|
|
3431
3431
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
3432
3432
|
})().catch(a);
|
|
3433
3433
|
try {
|
|
3434
3434
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
3435
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
3435
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(t, i);
|
|
3436
3436
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
3437
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
3437
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(n, i);
|
|
3438
3438
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
3439
3439
|
} catch (e) {
|
|
3440
3440
|
return a(e);
|
|
@@ -3451,25 +3451,25 @@ ${e}</tr>
|
|
|
3451
3451
|
throw n;
|
|
3452
3452
|
};
|
|
3453
3453
|
}
|
|
3454
|
-
},
|
|
3454
|
+
}, fr = new D();
|
|
3455
3455
|
function g(e, t) {
|
|
3456
|
-
return
|
|
3456
|
+
return fr.parse(e, t);
|
|
3457
3457
|
}
|
|
3458
3458
|
g.options = g.setOptions = function(e) {
|
|
3459
|
-
return
|
|
3459
|
+
return fr.setOptions(e), g.defaults = fr.defaults, N(g.defaults), g;
|
|
3460
3460
|
}, g.getDefaults = M, g.defaults = $t, g.use = function(...e) {
|
|
3461
|
-
return
|
|
3461
|
+
return fr.use(...e), g.defaults = fr.defaults, N(g.defaults), g;
|
|
3462
3462
|
}, g.walkTokens = function(e, t) {
|
|
3463
|
-
return
|
|
3464
|
-
}, g.parseInline =
|
|
3463
|
+
return fr.walkTokens(e, t);
|
|
3464
|
+
}, g.parseInline = fr.parseInline, g.Parser = ur, g.parser = ur.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = lr, g.lexer = lr.lex, g.Tokenizer = w, g.Hooks = dr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, ur.parse, lr.lex;
|
|
3465
3465
|
//#endregion
|
|
3466
3466
|
//#region agent/ui/chat-diagram-layout.ts
|
|
3467
|
-
var
|
|
3467
|
+
var pr = 112, mr = 52, hr = 14, gr = 54, _r = 34, vr = 260;
|
|
3468
3468
|
function nodeWidthFor(e) {
|
|
3469
3469
|
let { orientation: t, maxRows: n, maxWidth: r } = e;
|
|
3470
|
-
if (t === "horizontal" || !r) return
|
|
3471
|
-
let i = r -
|
|
3472
|
-
return Math.min(
|
|
3470
|
+
if (t === "horizontal" || !r) return pr;
|
|
3471
|
+
let i = r - hr * 2 - (n - 1) * gr;
|
|
3472
|
+
return Math.min(vr, Math.max(pr, Math.floor(i / n)));
|
|
3473
3473
|
}
|
|
3474
3474
|
function orientationFor(e) {
|
|
3475
3475
|
return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
|
|
@@ -3506,11 +3506,11 @@ function buildLayout(e, t, n) {
|
|
|
3506
3506
|
orientation: t,
|
|
3507
3507
|
maxRows: o,
|
|
3508
3508
|
...n === void 0 ? {} : { maxWidth: n }
|
|
3509
|
-
}), u = t === "horizontal" ?
|
|
3509
|
+
}), u = t === "horizontal" ? hr * 2 + s * c + (s - 1) * gr : hr * 2 + o * c + (o - 1) * gr, f = t === "horizontal" ? hr * 2 + o * mr + (o - 1) * _r : hr * 2 + s * mr + (s - 1) * _r, p = [];
|
|
3510
3510
|
for (let [e, [, n]] of a.entries()) {
|
|
3511
|
-
let r = (o - n.length) * (t === "horizontal" ? 86 : c +
|
|
3511
|
+
let r = (o - n.length) * (t === "horizontal" ? 86 : c + gr) / 2;
|
|
3512
3512
|
for (let [i, a] of n.entries()) {
|
|
3513
|
-
let n = t === "horizontal" ?
|
|
3513
|
+
let n = t === "horizontal" ? hr + e * (c + gr) : hr + r + i * (c + gr), o = t === "horizontal" ? hr + r + i * 86 : hr + e * 86;
|
|
3514
3514
|
p.push({
|
|
3515
3515
|
id: a.id,
|
|
3516
3516
|
label: a.label,
|
|
@@ -3519,7 +3519,7 @@ function buildLayout(e, t, n) {
|
|
|
3519
3519
|
x: n,
|
|
3520
3520
|
y: o,
|
|
3521
3521
|
width: c,
|
|
3522
|
-
height:
|
|
3522
|
+
height: mr
|
|
3523
3523
|
});
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
@@ -3596,14 +3596,14 @@ function formatChatVisualTick(e) {
|
|
|
3596
3596
|
let { prefix: r, suffix: i } = affixes(n);
|
|
3597
3597
|
return `${r}${formatChatVisualValue({ value: t })}${i}`;
|
|
3598
3598
|
}
|
|
3599
|
-
var
|
|
3599
|
+
var yr = 5.4, br = 10, xr = 15, Sr = 16;
|
|
3600
3600
|
function planChatVisualXLabels(e) {
|
|
3601
3601
|
let { labels: t, plotWidth: n } = e;
|
|
3602
3602
|
if (!t.length || n <= 0) return {
|
|
3603
3603
|
mode: "horizontal",
|
|
3604
3604
|
entries: []
|
|
3605
3605
|
};
|
|
3606
|
-
let r = t.map((e) => e.length >
|
|
3606
|
+
let r = t.map((e) => e.length > Sr ? `${e.slice(0, Sr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
|
|
3607
3607
|
if (i === 0) return {
|
|
3608
3608
|
mode: "horizontal",
|
|
3609
3609
|
entries: [{
|
|
@@ -3611,14 +3611,14 @@ function planChatVisualXLabels(e) {
|
|
|
3611
3611
|
text: r[0]
|
|
3612
3612
|
}]
|
|
3613
3613
|
};
|
|
3614
|
-
if ((Math.max(...r.map((e) => e.length *
|
|
3614
|
+
if ((Math.max(...r.map((e) => e.length * yr)) + br) * t.length <= n) return {
|
|
3615
3615
|
mode: "horizontal",
|
|
3616
3616
|
entries: r.map((e, t) => ({
|
|
3617
3617
|
index: t,
|
|
3618
3618
|
text: e
|
|
3619
3619
|
}))
|
|
3620
3620
|
};
|
|
3621
|
-
let a = Math.max(2, Math.floor(n /
|
|
3621
|
+
let a = Math.max(2, Math.floor(n / xr));
|
|
3622
3622
|
if (t.length <= a) return {
|
|
3623
3623
|
mode: "angled",
|
|
3624
3624
|
entries: r.map((e, t) => ({
|
|
@@ -3638,22 +3638,22 @@ function planChatVisualXLabels(e) {
|
|
|
3638
3638
|
}
|
|
3639
3639
|
//#endregion
|
|
3640
3640
|
//#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3641
|
-
var
|
|
3641
|
+
var Cr = [
|
|
3642
3642
|
"data-visual-type",
|
|
3643
3643
|
"data-chart-type",
|
|
3644
3644
|
"data-stacking",
|
|
3645
3645
|
"data-diagram-type",
|
|
3646
3646
|
"aria-label"
|
|
3647
|
-
],
|
|
3647
|
+
], wr = { class: "mb-2.5" }, Tr = ["aria-label"], Er = {
|
|
3648
3648
|
key: 0,
|
|
3649
3649
|
"data-test": "chat-visual-horizontal-bars",
|
|
3650
3650
|
class: "grid gap-3"
|
|
3651
|
-
},
|
|
3651
|
+
}, Dr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Or = ["viewBox"], kr = [
|
|
3652
3652
|
"x1",
|
|
3653
3653
|
"x2",
|
|
3654
3654
|
"y1",
|
|
3655
3655
|
"y2"
|
|
3656
|
-
],
|
|
3656
|
+
], Ar = ["x", "y"], jr = [
|
|
3657
3657
|
"data-row-index",
|
|
3658
3658
|
"data-series-index",
|
|
3659
3659
|
"data-data-key",
|
|
@@ -3661,35 +3661,35 @@ var wr = [
|
|
|
3661
3661
|
"y",
|
|
3662
3662
|
"width",
|
|
3663
3663
|
"height"
|
|
3664
|
-
],
|
|
3664
|
+
], Mr = ["data-trend-key", "d"], Nr = ["d"], Pr = ["cx", "cy"], Fr = ["cx", "cy"], Ir = [
|
|
3665
3665
|
"x",
|
|
3666
3666
|
"y",
|
|
3667
3667
|
"text-anchor",
|
|
3668
3668
|
"transform"
|
|
3669
|
-
],
|
|
3669
|
+
], Lr = {
|
|
3670
3670
|
key: 2,
|
|
3671
3671
|
class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
|
|
3672
|
-
},
|
|
3672
|
+
}, Rr = {
|
|
3673
3673
|
key: 1,
|
|
3674
3674
|
class: "grid gap-3"
|
|
3675
|
-
},
|
|
3675
|
+
}, zr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Br = { class: "shrink-0 tabular-nums" }, Vr = {
|
|
3676
3676
|
key: 2,
|
|
3677
3677
|
class: "overflow-x-auto"
|
|
3678
|
-
},
|
|
3678
|
+
}, Hr = ["viewBox", "aria-label"], Ur = [
|
|
3679
3679
|
"data-from",
|
|
3680
3680
|
"data-to",
|
|
3681
3681
|
"x1",
|
|
3682
3682
|
"y1",
|
|
3683
3683
|
"x2",
|
|
3684
3684
|
"y2"
|
|
3685
|
-
],
|
|
3685
|
+
], Wr = ["cx", "cy"], Gr = ["x", "y"], Kr = [
|
|
3686
3686
|
"data-node-id",
|
|
3687
3687
|
"data-node-kind",
|
|
3688
3688
|
"transform"
|
|
3689
|
-
],
|
|
3689
|
+
], qr = ["points"], Jr = ["width", "height"], Yr = ["width", "height"], Xr = {
|
|
3690
3690
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
3691
3691
|
class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
|
|
3692
|
-
},
|
|
3692
|
+
}, Zr = /* @__PURE__ */ x({
|
|
3693
3693
|
__name: "ChatVisualBlock",
|
|
3694
3694
|
props: {
|
|
3695
3695
|
result: {},
|
|
@@ -3915,7 +3915,7 @@ var wr = [
|
|
|
3915
3915
|
width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
|
|
3916
3916
|
seriesIndex: 0
|
|
3917
3917
|
}));
|
|
3918
|
-
}),
|
|
3918
|
+
}), z = f(() => {
|
|
3919
3919
|
let e = v.value;
|
|
3920
3920
|
if (!e?.data.length) return [];
|
|
3921
3921
|
let t = e.data[e.data.length - 1];
|
|
@@ -3931,7 +3931,7 @@ var wr = [
|
|
|
3931
3931
|
seriesIndex: n
|
|
3932
3932
|
};
|
|
3933
3933
|
});
|
|
3934
|
-
}),
|
|
3934
|
+
}), de = f(() => {
|
|
3935
3935
|
let e = v.value;
|
|
3936
3936
|
if (!e?.data.length || e.chartType !== "line") return [];
|
|
3937
3937
|
let t = e.data.length - 1, n = e.data[t];
|
|
@@ -3944,7 +3944,7 @@ var wr = [
|
|
|
3944
3944
|
seriesIndex: i
|
|
3945
3945
|
};
|
|
3946
3946
|
}).filter((e) => e !== null);
|
|
3947
|
-
}),
|
|
3947
|
+
}), pe = f(() => {
|
|
3948
3948
|
let e = x.value;
|
|
3949
3949
|
if (!e) return [];
|
|
3950
3950
|
let t = e.data.map((t) => ({
|
|
@@ -3960,7 +3960,7 @@ var wr = [
|
|
|
3960
3960
|
series: r
|
|
3961
3961
|
})
|
|
3962
3962
|
}));
|
|
3963
|
-
}),
|
|
3963
|
+
}), he = f(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), _e = [
|
|
3964
3964
|
"var(--color-theme-900)",
|
|
3965
3965
|
"var(--color-primary-500)",
|
|
3966
3966
|
"color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
|
|
@@ -3979,7 +3979,7 @@ var wr = [
|
|
|
3979
3979
|
function diagramNodeStroke(e) {
|
|
3980
3980
|
return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : Se.value;
|
|
3981
3981
|
}
|
|
3982
|
-
let
|
|
3982
|
+
let ye = f(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), B = f(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = f(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = f(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = f(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = f(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = f(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), Ce = f(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = f(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
|
|
3983
3983
|
return (e, r) => o.value ? (k(), h("section", {
|
|
3984
3984
|
key: 0,
|
|
3985
3985
|
"data-test": "chat-visual",
|
|
@@ -3991,13 +3991,13 @@ var wr = [
|
|
|
3991
3991
|
style: T({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
|
|
3992
3992
|
"aria-label": o.value.meta.title
|
|
3993
3993
|
}, [
|
|
3994
|
-
_("header",
|
|
3994
|
+
_("header", wr, [_("h4", {
|
|
3995
3995
|
class: "text-[13px] font-semibold leading-tight",
|
|
3996
|
-
style: T({ color:
|
|
3996
|
+
style: T({ color: ye.value })
|
|
3997
3997
|
}, F(o.value.meta.title), 5), o.value.meta.description ? (k(), h("p", {
|
|
3998
3998
|
key: 0,
|
|
3999
3999
|
class: "mt-0.5 text-[12px] leading-snug",
|
|
4000
|
-
style: T({ color:
|
|
4000
|
+
style: T({ color: B.value })
|
|
4001
4001
|
}, F(o.value.meta.description), 5)) : m("", !0)]),
|
|
4002
4002
|
_("div", {
|
|
4003
4003
|
ref_key: "bodyEl",
|
|
@@ -4006,19 +4006,19 @@ var wr = [
|
|
|
4006
4006
|
key: 0,
|
|
4007
4007
|
role: "img",
|
|
4008
4008
|
"aria-label": o.value.meta.title
|
|
4009
|
-
}, [ue.value.length ? (k(), h("div",
|
|
4009
|
+
}, [ue.value.length ? (k(), h("div", Er, [(k(!0), h(u, null, j(ue.value, (e) => (k(), h("div", {
|
|
4010
4010
|
key: e.key,
|
|
4011
4011
|
"data-test": "chat-visual-horizontal-bar",
|
|
4012
4012
|
class: "min-w-0"
|
|
4013
|
-
}, [_("div",
|
|
4013
|
+
}, [_("div", Dr, [_("span", {
|
|
4014
4014
|
class: "line-clamp-2 min-w-0 font-medium leading-snug",
|
|
4015
|
-
style: T({ color:
|
|
4015
|
+
style: T({ color: ye.value })
|
|
4016
4016
|
}, F(e.label), 5), _("span", {
|
|
4017
4017
|
class: "shrink-0 font-semibold tabular-nums",
|
|
4018
|
-
style: T({ color:
|
|
4018
|
+
style: T({ color: ye.value })
|
|
4019
4019
|
}, F(e.value), 5)]), _("div", {
|
|
4020
4020
|
class: "h-2 w-full overflow-hidden rounded-full",
|
|
4021
|
-
style: T({ background:
|
|
4021
|
+
style: T({ background: we.value })
|
|
4022
4022
|
}, [_("div", {
|
|
4023
4023
|
class: "h-full rounded-full",
|
|
4024
4024
|
style: T({
|
|
@@ -4042,7 +4042,7 @@ var wr = [
|
|
|
4042
4042
|
"stroke-width": "1",
|
|
4043
4043
|
"vector-effect": "non-scaling-stroke",
|
|
4044
4044
|
style: T({ stroke: e === 0 ? U.value : be.value })
|
|
4045
|
-
}, null, 12,
|
|
4045
|
+
}, null, 12, kr))), 128)),
|
|
4046
4046
|
_("g", null, [(k(!0), h(u, null, j(re.value.ticks, (e) => (k(), h("text", {
|
|
4047
4047
|
key: `y-${e}`,
|
|
4048
4048
|
x: I.value.left - 7,
|
|
@@ -4053,7 +4053,7 @@ var wr = [
|
|
|
4053
4053
|
}, F(oe(formatChatVisualTick)({
|
|
4054
4054
|
value: e,
|
|
4055
4055
|
shared: ie.value
|
|
4056
|
-
})), 13,
|
|
4056
|
+
})), 13, Ar))), 128))]),
|
|
4057
4057
|
v.value.chartType === "bar" ? (k(!0), h(u, { key: 0 }, j(ce.value, (e) => (k(), h("rect", {
|
|
4058
4058
|
key: e.key,
|
|
4059
4059
|
"data-test": "chat-visual-bar",
|
|
@@ -4066,7 +4066,7 @@ var wr = [
|
|
|
4066
4066
|
height: e.height,
|
|
4067
4067
|
rx: "2.5",
|
|
4068
4068
|
style: T({ fill: seriesColor(e.seriesIndex) })
|
|
4069
|
-
}, null, 12,
|
|
4069
|
+
}, null, 12, jr))), 128)) : (k(), h(u, { key: 1 }, [
|
|
4070
4070
|
se.value ? (k(), h("path", {
|
|
4071
4071
|
key: 0,
|
|
4072
4072
|
"data-test": "chat-visual-trend-line",
|
|
@@ -4079,7 +4079,7 @@ var wr = [
|
|
|
4079
4079
|
"stroke-dasharray": "4 3",
|
|
4080
4080
|
"vector-effect": "non-scaling-stroke",
|
|
4081
4081
|
style: T({ stroke: seriesColor(se.value.seriesIndex) })
|
|
4082
|
-
}, null, 12,
|
|
4082
|
+
}, null, 12, Mr)) : m("", !0),
|
|
4083
4083
|
(k(!0), h(u, null, j(b.value, (e, t) => (k(), h("g", { key: e.dataKey }, [v.value.chartType === "line" ? (k(), h("path", {
|
|
4084
4084
|
key: 0,
|
|
4085
4085
|
d: pathForSeries(e.dataKey),
|
|
@@ -4089,20 +4089,20 @@ var wr = [
|
|
|
4089
4089
|
"stroke-linejoin": "round",
|
|
4090
4090
|
"vector-effect": "non-scaling-stroke",
|
|
4091
4091
|
style: T({ stroke: seriesColor(t) })
|
|
4092
|
-
}, null, 12,
|
|
4092
|
+
}, null, 12, Nr)) : m("", !0), (k(!0), h(u, null, j(p.value, (n, r) => (k(), h(u, { key: `${e.dataKey}-${r}` }, [v.value.chartType === "scatter" ? (k(), h("circle", {
|
|
4093
4093
|
key: 0,
|
|
4094
4094
|
cx: xForIndex(r, p.value.length),
|
|
4095
4095
|
cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
|
|
4096
4096
|
r: "2.6",
|
|
4097
4097
|
style: T({ fill: seriesColor(t) })
|
|
4098
|
-
}, null, 12,
|
|
4099
|
-
(k(!0), h(u, null, j(
|
|
4098
|
+
}, null, 12, Pr)) : m("", !0)], 64))), 128))]))), 128)),
|
|
4099
|
+
(k(!0), h(u, null, j(de.value, (e) => (k(), h("circle", {
|
|
4100
4100
|
key: `marker-${e.key}`,
|
|
4101
4101
|
cx: e.cx,
|
|
4102
4102
|
cy: e.cy,
|
|
4103
4103
|
r: "3",
|
|
4104
4104
|
style: T({ fill: seriesColor(e.seriesIndex) })
|
|
4105
|
-
}, null, 12,
|
|
4105
|
+
}, null, 12, Fr))), 128))
|
|
4106
4106
|
], 64)),
|
|
4107
4107
|
(k(!0), h(u, null, j(R.value, (e) => (k(), h("text", {
|
|
4108
4108
|
key: e.key,
|
|
@@ -4112,8 +4112,8 @@ var wr = [
|
|
|
4112
4112
|
"font-size": "9.5",
|
|
4113
4113
|
transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${I.value.height - I.value.bottom + 12})` : void 0,
|
|
4114
4114
|
style: T({ fill: H.value })
|
|
4115
|
-
}, F(e.label), 13,
|
|
4116
|
-
], 12,
|
|
4115
|
+
}, F(e.label), 13, Ir))), 128))
|
|
4116
|
+
], 12, Or)), z.value.length > 1 || v.value.chartType !== "bar" ? (k(), h("div", Lr, [(k(!0), h(u, null, j(z.value, (e) => (k(), h("div", {
|
|
4117
4117
|
key: e.key,
|
|
4118
4118
|
class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
|
|
4119
4119
|
}, [
|
|
@@ -4121,41 +4121,41 @@ var wr = [
|
|
|
4121
4121
|
class: "size-2.5 shrink-0 rounded-full",
|
|
4122
4122
|
style: T({ background: seriesColor(e.seriesIndex) })
|
|
4123
4123
|
}, null, 4),
|
|
4124
|
-
_("span", { style: T({ color:
|
|
4124
|
+
_("span", { style: T({ color: B.value }) }, F(e.label), 5),
|
|
4125
4125
|
_("span", {
|
|
4126
4126
|
class: "font-semibold tabular-nums",
|
|
4127
|
-
style: T({ color:
|
|
4127
|
+
style: T({ color: ye.value })
|
|
4128
4128
|
}, F(e.value), 5)
|
|
4129
|
-
]))), 128))])) : m("", !0)], 8,
|
|
4129
|
+
]))), 128))])) : m("", !0)], 8, Tr)) : x.value ? (k(), h("div", Rr, [(k(!0), h(u, null, j(pe.value, (e, t) => (k(), h("div", { key: e.key }, [_("div", zr, [_("span", {
|
|
4130
4130
|
class: "truncate font-medium",
|
|
4131
|
-
style: T({ color:
|
|
4132
|
-
}, F(e.name), 5), _("span",
|
|
4131
|
+
style: T({ color: ye.value })
|
|
4132
|
+
}, F(e.name), 5), _("span", Br, [_("span", {
|
|
4133
4133
|
class: "font-semibold",
|
|
4134
|
-
style: T({ color:
|
|
4134
|
+
style: T({ color: ye.value })
|
|
4135
4135
|
}, F(e.display), 5), _("span", {
|
|
4136
4136
|
class: "ml-1.5",
|
|
4137
|
-
style: T({ color:
|
|
4137
|
+
style: T({ color: B.value })
|
|
4138
4138
|
}, F(Math.round(e.percent * 100)) + "%", 5)])]), _("div", {
|
|
4139
4139
|
class: "h-1.5 w-full overflow-hidden rounded-full",
|
|
4140
|
-
style: T({ background:
|
|
4140
|
+
style: T({ background: we.value })
|
|
4141
4141
|
}, [_("div", {
|
|
4142
4142
|
class: "h-full rounded-full",
|
|
4143
4143
|
style: T({
|
|
4144
4144
|
width: `${Math.max(2, e.percent * 100)}%`,
|
|
4145
4145
|
background: seriesColor(t)
|
|
4146
4146
|
})
|
|
4147
|
-
}, null, 4)], 4)]))), 128))])) : c.value &&
|
|
4147
|
+
}, null, 4)], 4)]))), 128))])) : c.value && he.value ? (k(), h("div", Vr, [(k(), h("svg", {
|
|
4148
4148
|
"data-test": "chat-visual-diagram-svg",
|
|
4149
4149
|
class: "block h-auto overflow-visible",
|
|
4150
|
-
viewBox: `0 0 ${
|
|
4150
|
+
viewBox: `0 0 ${he.value.width} ${he.value.height}`,
|
|
4151
4151
|
style: T({
|
|
4152
|
-
width: `${
|
|
4153
|
-
aspectRatio: `${
|
|
4152
|
+
width: `${he.value.width}px`,
|
|
4153
|
+
aspectRatio: `${he.value.width} / ${he.value.height}`
|
|
4154
4154
|
}),
|
|
4155
4155
|
role: "img",
|
|
4156
4156
|
"aria-label": o.value.meta.title
|
|
4157
4157
|
}, [
|
|
4158
|
-
(k(!0), h(u, null, j(
|
|
4158
|
+
(k(!0), h(u, null, j(he.value.edges, (e) => (k(), h("line", {
|
|
4159
4159
|
key: e.key,
|
|
4160
4160
|
"data-test": "chat-visual-diagram-edge",
|
|
4161
4161
|
"data-from": e.from,
|
|
@@ -4167,16 +4167,16 @@ var wr = [
|
|
|
4167
4167
|
"stroke-width": "1.4",
|
|
4168
4168
|
"stroke-linecap": "round",
|
|
4169
4169
|
"vector-effect": "non-scaling-stroke",
|
|
4170
|
-
style: T({ stroke:
|
|
4171
|
-
}, null, 12,
|
|
4172
|
-
(k(!0), h(u, null, j(
|
|
4170
|
+
style: T({ stroke: Ce.value })
|
|
4171
|
+
}, null, 12, Ur))), 128)),
|
|
4172
|
+
(k(!0), h(u, null, j(he.value.edges, (e) => (k(), h("circle", {
|
|
4173
4173
|
key: `${e.key}-dot`,
|
|
4174
4174
|
cx: e.x2,
|
|
4175
4175
|
cy: e.y2,
|
|
4176
4176
|
r: "2.4",
|
|
4177
|
-
style: T({ fill:
|
|
4178
|
-
}, null, 12,
|
|
4179
|
-
(k(!0), h(u, null, j(
|
|
4177
|
+
style: T({ fill: Ce.value })
|
|
4178
|
+
}, null, 12, Wr))), 128)),
|
|
4179
|
+
(k(!0), h(u, null, j(he.value.edges.filter((e) => e.label), (e) => (k(), h("foreignObject", {
|
|
4180
4180
|
key: `${e.key}-label`,
|
|
4181
4181
|
x: e.labelX - 55,
|
|
4182
4182
|
y: e.labelY - 12,
|
|
@@ -4186,11 +4186,11 @@ var wr = [
|
|
|
4186
4186
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
4187
4187
|
class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
|
|
4188
4188
|
style: T({
|
|
4189
|
-
color:
|
|
4189
|
+
color: B.value,
|
|
4190
4190
|
background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
|
|
4191
4191
|
})
|
|
4192
|
-
}, F(e.label), 5)], 8,
|
|
4193
|
-
(k(!0), h(u, null, j(
|
|
4192
|
+
}, F(e.label), 5)], 8, Gr))), 128)),
|
|
4193
|
+
(k(!0), h(u, null, j(he.value.nodes, (e) => (k(), h("g", {
|
|
4194
4194
|
key: e.id,
|
|
4195
4195
|
"data-test": "chat-visual-diagram-node",
|
|
4196
4196
|
"data-node-id": e.id,
|
|
@@ -4205,7 +4205,7 @@ var wr = [
|
|
|
4205
4205
|
fill: diagramNodeFill(e.kind),
|
|
4206
4206
|
stroke: diagramNodeStroke(e.kind)
|
|
4207
4207
|
})
|
|
4208
|
-
}, null, 12,
|
|
4208
|
+
}, null, 12, qr)) : (k(), h("rect", {
|
|
4209
4209
|
key: 1,
|
|
4210
4210
|
width: e.width,
|
|
4211
4211
|
height: e.height,
|
|
@@ -4216,28 +4216,28 @@ var wr = [
|
|
|
4216
4216
|
fill: diagramNodeFill(e.kind),
|
|
4217
4217
|
stroke: diagramNodeStroke(e.kind)
|
|
4218
4218
|
})
|
|
4219
|
-
}, null, 12,
|
|
4219
|
+
}, null, 12, Jr)), (k(), h("foreignObject", {
|
|
4220
4220
|
x: "8",
|
|
4221
4221
|
y: "5",
|
|
4222
4222
|
width: e.width - 16,
|
|
4223
4223
|
height: e.height - 10
|
|
4224
|
-
}, [_("div",
|
|
4224
|
+
}, [_("div", Xr, [_("div", {
|
|
4225
4225
|
class: "line-clamp-2 text-[13px] font-semibold leading-tight",
|
|
4226
|
-
style: T({ color:
|
|
4226
|
+
style: T({ color: ye.value })
|
|
4227
4227
|
}, F(e.label), 5), e.detail ? (k(), h("div", {
|
|
4228
4228
|
key: 0,
|
|
4229
4229
|
class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
|
|
4230
|
-
style: T({ color:
|
|
4231
|
-
}, F(e.detail), 5)) : m("", !0)])], 8,
|
|
4232
|
-
], 12,
|
|
4230
|
+
style: T({ color: B.value })
|
|
4231
|
+
}, F(e.detail), 5)) : m("", !0)])], 8, Yr))], 8, Kr))), 128))
|
|
4232
|
+
], 12, Hr))])) : m("", !0)], 512),
|
|
4233
4233
|
o.value.meta.footer ? (k(), h("footer", {
|
|
4234
4234
|
key: 0,
|
|
4235
4235
|
class: "mt-3 text-[11px] leading-snug",
|
|
4236
4236
|
style: T({ color: H.value })
|
|
4237
4237
|
}, F(o.value.meta.footer), 5)) : m("", !0)
|
|
4238
|
-
], 12,
|
|
4238
|
+
], 12, Cr)) : m("", !0);
|
|
4239
4239
|
}
|
|
4240
|
-
}),
|
|
4240
|
+
}), Qr = ["innerHTML"], $r = /* @__PURE__ */ x({
|
|
4241
4241
|
__name: "ChatRichText",
|
|
4242
4242
|
props: {
|
|
4243
4243
|
text: {},
|
|
@@ -4246,7 +4246,7 @@ var wr = [
|
|
|
4246
4246
|
},
|
|
4247
4247
|
setup(e) {
|
|
4248
4248
|
let t = e, n = P(t.text), r;
|
|
4249
|
-
|
|
4249
|
+
se([() => t.text, () => t.streaming], ([e, i]) => {
|
|
4250
4250
|
if (!i) {
|
|
4251
4251
|
r !== void 0 && (cancelAnimationFrame(r), r = void 0), n.value = e;
|
|
4252
4252
|
return;
|
|
@@ -4390,13 +4390,13 @@ var wr = [
|
|
|
4390
4390
|
}) : [];
|
|
4391
4391
|
});
|
|
4392
4392
|
return (t, n) => (k(), h("div", {
|
|
4393
|
-
class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:text-[16px] @sm/chat:leading-relaxed",
|
|
4393
|
+
class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:max-w-[55ch] @sm/chat:text-[16px] @sm/chat:leading-relaxed",
|
|
4394
4394
|
onErrorCapture: onRichTextAssetError
|
|
4395
4395
|
}, [(k(!0), h(u, null, j(o.value, (t) => (k(), h(u, { key: t.key }, [t.kind === "markdown" ? (k(), h("div", {
|
|
4396
4396
|
key: 0,
|
|
4397
4397
|
class: C(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
|
|
4398
4398
|
innerHTML: t.html
|
|
4399
|
-
}, null, 10,
|
|
4399
|
+
}, null, 10, Qr)) : t.kind === "visual" ? (k(), p(Zr, {
|
|
4400
4400
|
key: 1,
|
|
4401
4401
|
result: t.result,
|
|
4402
4402
|
inverted: e.inverted
|
|
@@ -4414,7 +4414,7 @@ var wr = [
|
|
|
4414
4414
|
style: { background: "currentcolor" }
|
|
4415
4415
|
}, null, -1), v(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
|
|
4416
4416
|
}
|
|
4417
|
-
}),
|
|
4417
|
+
}), ei = 80, ti = /* @__PURE__ */ x({
|
|
4418
4418
|
__name: "ChatScroller",
|
|
4419
4419
|
setup(e, { expose: t }) {
|
|
4420
4420
|
let n = A(), r = A(), i = A(!0), a;
|
|
@@ -4424,7 +4424,7 @@ var wr = [
|
|
|
4424
4424
|
}
|
|
4425
4425
|
function onScroll() {
|
|
4426
4426
|
let e = n.value;
|
|
4427
|
-
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
4427
|
+
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= ei);
|
|
4428
4428
|
}
|
|
4429
4429
|
function pin() {
|
|
4430
4430
|
i.value = !0, scrollToBottom();
|
|
@@ -4448,28 +4448,28 @@ var wr = [
|
|
|
4448
4448
|
class: "flex-1 flex flex-col"
|
|
4449
4449
|
}, [ie(e.$slots, "default")], 512)], 34));
|
|
4450
4450
|
}
|
|
4451
|
-
}),
|
|
4451
|
+
}), ni = {
|
|
4452
4452
|
key: 0,
|
|
4453
4453
|
class: "pb-4"
|
|
4454
|
-
},
|
|
4454
|
+
}, ri = {
|
|
4455
4455
|
key: 1,
|
|
4456
4456
|
"data-test": "messaging-sdk-header",
|
|
4457
4457
|
class: "shrink-0 border-b border-theme-100 px-4 py-3"
|
|
4458
|
-
},
|
|
4458
|
+
}, ii = { class: "min-w-0 flex-1" }, ai = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, oi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, si = {
|
|
4459
4459
|
key: 0,
|
|
4460
4460
|
class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
|
|
4461
|
-
},
|
|
4461
|
+
}, ci = {
|
|
4462
4462
|
key: 2,
|
|
4463
4463
|
class: "flex flex-col items-center justify-center px-6 py-16 text-center",
|
|
4464
4464
|
"data-test": "chat-offline"
|
|
4465
|
-
},
|
|
4465
|
+
}, li = {
|
|
4466
4466
|
key: 0,
|
|
4467
4467
|
"data-test": "messaging-empty-state",
|
|
4468
4468
|
class: "flex flex-col items-center justify-center px-4"
|
|
4469
|
-
},
|
|
4469
|
+
}, ui = ["title"], di = {
|
|
4470
4470
|
key: 0,
|
|
4471
4471
|
class: "flex items-center gap-3 py-3 px-2"
|
|
4472
|
-
},
|
|
4472
|
+
}, fi = ["data-journal-outcome"], pi = [
|
|
4473
4473
|
"data-message-id",
|
|
4474
4474
|
"data-message-sender",
|
|
4475
4475
|
"data-conversation-id",
|
|
@@ -4480,7 +4480,7 @@ var wr = [
|
|
|
4480
4480
|
"data-issue-action-label",
|
|
4481
4481
|
"data-issue-action-url",
|
|
4482
4482
|
"data-streaming"
|
|
4483
|
-
],
|
|
4483
|
+
], mi = { class: "max-w-[85%] min-w-0" }, hi = ["href"], gi = [
|
|
4484
4484
|
"data-message-id",
|
|
4485
4485
|
"data-message-sender",
|
|
4486
4486
|
"data-conversation-id",
|
|
@@ -4489,7 +4489,7 @@ var wr = [
|
|
|
4489
4489
|
"data-issue-code",
|
|
4490
4490
|
"data-issue-bucket",
|
|
4491
4491
|
"data-streaming"
|
|
4492
|
-
],
|
|
4492
|
+
], _i = [
|
|
4493
4493
|
"data-test",
|
|
4494
4494
|
"data-message-id",
|
|
4495
4495
|
"data-message-sender",
|
|
@@ -4497,55 +4497,51 @@ var wr = [
|
|
|
4497
4497
|
"data-message-sequence",
|
|
4498
4498
|
"data-system-kind",
|
|
4499
4499
|
"data-streaming"
|
|
4500
|
-
],
|
|
4500
|
+
], vi = ["src", "alt"], yi = ["src"], bi = ["href"], xi = {
|
|
4501
4501
|
key: 0,
|
|
4502
4502
|
"data-test": "messaging-message-text-part"
|
|
4503
|
-
},
|
|
4503
|
+
}, Si = [
|
|
4504
4504
|
"src",
|
|
4505
4505
|
"alt",
|
|
4506
4506
|
"data-attachment-placement"
|
|
4507
|
-
],
|
|
4507
|
+
], Ci = ["src", "data-attachment-placement"], wi = ["href", "data-attachment-placement"], Ti = ["data-journal-outcome"], Ei = {
|
|
4508
4508
|
key: 2,
|
|
4509
4509
|
"data-test": "messaging-tool-activity-tail",
|
|
4510
4510
|
"aria-label": "Assistant is still working",
|
|
4511
4511
|
class: "mb-4 grid h-[17px] w-5 place-items-center"
|
|
4512
|
-
},
|
|
4512
|
+
}, Di = ["data-journal-outcome"], Oi = ["data-working-description"], ki = { class: "truncate" }, Ai = ["data-issue-code"], ji = ["href"], Mi = {
|
|
4513
4513
|
key: 3,
|
|
4514
4514
|
"data-test": "messaging-thinking-indicator",
|
|
4515
4515
|
class: "flex gap-2 justify-start items-center mb-4"
|
|
4516
|
-
},
|
|
4516
|
+
}, Ni = ["src", "alt"], Pi = { class: "max-w-20 truncate" }, Fi = ["onClick"], Ii = {
|
|
4517
4517
|
key: 0,
|
|
4518
4518
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
4519
|
-
},
|
|
4519
|
+
}, Li = ["data-composer-action"], Ri = ["placeholder", "disabled"], zi = { class: "font-mono text-sm tabular-nums" }, Bi = { class: "mt-2.5 flex items-center" }, Vi = [
|
|
4520
4520
|
"disabled",
|
|
4521
4521
|
"aria-label",
|
|
4522
4522
|
"title"
|
|
4523
|
-
],
|
|
4523
|
+
], Hi = {
|
|
4524
4524
|
key: 0,
|
|
4525
4525
|
class: "i-svg-spinners-ring-resize size-5"
|
|
4526
|
-
},
|
|
4526
|
+
}, Ui = {
|
|
4527
4527
|
key: 1,
|
|
4528
4528
|
class: "i-tabler-plus size-5"
|
|
4529
|
-
},
|
|
4529
|
+
}, Wi = { class: "sr-only" }, Gi = { class: "flex items-center gap-2" }, Ki = ["aria-label", "title"], qi = { class: "sr-only" }, Ji = [
|
|
4530
4530
|
"data-composer-action",
|
|
4531
4531
|
"disabled",
|
|
4532
4532
|
"aria-label",
|
|
4533
4533
|
"title"
|
|
4534
|
-
],
|
|
4534
|
+
], Yi = {
|
|
4535
4535
|
key: 0,
|
|
4536
4536
|
class: "i-tabler-player-stop-filled size-3.5"
|
|
4537
|
-
},
|
|
4537
|
+
}, Xi = {
|
|
4538
4538
|
key: 1,
|
|
4539
4539
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4540
|
-
},
|
|
4540
|
+
}, Zi = { class: "sr-only" }, Qi = {
|
|
4541
4541
|
key: 2,
|
|
4542
4542
|
"data-test": "messaging-suggested-prompts",
|
|
4543
4543
|
class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
|
|
4544
|
-
},
|
|
4545
|
-
"disabled",
|
|
4546
|
-
"tabindex",
|
|
4547
|
-
"onClick"
|
|
4548
|
-
], na = ["aria-expanded"], ra = 2500, ia = /* @__PURE__ */ x({
|
|
4544
|
+
}, $i = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ea = ["disabled", "onClick"], ta = ["aria-expanded"], na = 2500, ra = /* @__PURE__ */ x({
|
|
4549
4545
|
__name: "ElAgentChat",
|
|
4550
4546
|
props: {
|
|
4551
4547
|
chatController: {},
|
|
@@ -4598,36 +4594,36 @@ var wr = [
|
|
|
4598
4594
|
return !r || r.sender !== n.sender;
|
|
4599
4595
|
}
|
|
4600
4596
|
let s = f(() => e.chatController?.textState.value), c = f(() => s.value?.isConnected ?? !1), x = f(() => s.value?.isThinking ?? !1), T = f(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), te = f(() => s.value?.connectionStatus !== "connected" && !s.value?.error), ae = A(!1), P;
|
|
4601
|
-
|
|
4597
|
+
se(T, (e) => {
|
|
4602
4598
|
if (clearTimeout(P), !e) {
|
|
4603
4599
|
ae.value = !1;
|
|
4604
4600
|
return;
|
|
4605
4601
|
}
|
|
4606
4602
|
P = setTimeout(() => {
|
|
4607
4603
|
ae.value = !0;
|
|
4608
|
-
},
|
|
4604
|
+
}, na);
|
|
4609
4605
|
}, { immediate: !0 }), re(() => clearTimeout(P));
|
|
4610
|
-
let oe = f(() => T.value && ae.value),
|
|
4606
|
+
let oe = f(() => T.value && ae.value), de = f(() => te.value || T.value && !ae.value), pe = A(!1);
|
|
4611
4607
|
async function retryConnection() {
|
|
4612
4608
|
await e.chatController?.startTextConversation();
|
|
4613
4609
|
}
|
|
4614
|
-
let
|
|
4615
|
-
for (let e =
|
|
4616
|
-
let t =
|
|
4610
|
+
let _e = f(() => e.chatController?.liveTurnBlocks?.value ?? []), ve = f(() => {
|
|
4611
|
+
for (let e = _e.value.length - 1; e >= 0; e--) {
|
|
4612
|
+
let t = _e.value[e];
|
|
4617
4613
|
if (t?.kind === "text") return t.id;
|
|
4618
4614
|
}
|
|
4619
|
-
}), ye = f(() => e.chatController?.liveStreamMessageId?.value),
|
|
4615
|
+
}), ye = f(() => e.chatController?.liveStreamMessageId?.value), B = f(() => {
|
|
4620
4616
|
let t = e.chatController?.sharedMessages.value ?? [];
|
|
4621
|
-
return
|
|
4622
|
-
}),
|
|
4617
|
+
return _e.value.length && ye.value ? t.filter((e) => e.id !== ye.value) : t;
|
|
4618
|
+
}), H = f(() => {
|
|
4623
4619
|
if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
|
|
4624
|
-
}),
|
|
4625
|
-
if (!
|
|
4626
|
-
let e =
|
|
4620
|
+
}), be = f(() => e.chatController?.workJournal?.value), U = f(() => {
|
|
4621
|
+
if (!be.value && !_e.value.length) return;
|
|
4622
|
+
let e = B.value, t = e[e.length - 1];
|
|
4627
4623
|
if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
|
|
4628
|
-
}),
|
|
4624
|
+
}), Se = f(() => {
|
|
4629
4625
|
let t = {};
|
|
4630
|
-
for (let n of
|
|
4626
|
+
for (let n of B.value) {
|
|
4631
4627
|
if (n.sender === "user" || !n.toolActivities?.length) continue;
|
|
4632
4628
|
let r = e.chatController?.workJournalFor?.({
|
|
4633
4629
|
activities: n.toolActivities,
|
|
@@ -4639,7 +4635,7 @@ var wr = [
|
|
|
4639
4635
|
return t;
|
|
4640
4636
|
});
|
|
4641
4637
|
function messageWorkJournal(e) {
|
|
4642
|
-
return
|
|
4638
|
+
return Se.value[e.id];
|
|
4643
4639
|
}
|
|
4644
4640
|
function inlineOffset(e, t) {
|
|
4645
4641
|
return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
|
|
@@ -4687,18 +4683,18 @@ var wr = [
|
|
|
4687
4683
|
text: t.slice(i)
|
|
4688
4684
|
}), r;
|
|
4689
4685
|
}
|
|
4690
|
-
let
|
|
4686
|
+
let W = f(() => s.value?.transientIssue), Ce = f(() => {
|
|
4691
4687
|
if (!x.value) return;
|
|
4692
|
-
let e =
|
|
4688
|
+
let e = B.value, t = e[e.length - 1];
|
|
4693
4689
|
return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
|
|
4694
|
-
}), we = f(() => !x.value ||
|
|
4690
|
+
}), we = f(() => !x.value || H.value || be.value || _e.value.length ? !1 : Ce.value === void 0), Te = f(() => s.value?.sendBlockedReason), Ee = f(() => !c.value || Te.value !== void 0), De = f(() => T.value ? "Agent is offline" : te.value ? "Connecting..." : Te.value === "agent_deleted" ? "This assistant was deleted" : Te.value === "account" ? "Open billing to keep chatting" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Oe = f(() => e.chatController?.composerState?.value ?? {
|
|
4695
4691
|
text: "",
|
|
4696
4692
|
pendingAttachments: [],
|
|
4697
4693
|
isUploading: !1
|
|
4698
4694
|
}), ke = f({
|
|
4699
4695
|
get: () => Oe.value.text,
|
|
4700
4696
|
set: (t) => e.chatController?.setComposerText?.({ text: t })
|
|
4701
|
-
}), Ae = f(() => Oe.value.pendingAttachments), je = f(() => Oe.value.isUploading), Me = f(() => e.chatController?.voiceRecorder), Ne = f(() => Me.value?.isBusy.value ?? !1), Fe = f(() => e.chatController?.canAttachFile?.value ?? !1), Ie = f(() => e.chatController?.canRecordAudio?.value ?? !1), Le = f(() => e.chatController?.composerAction?.value ?? "idle"), Re = f(() => Le.value !== "idle"), Be = f(() => Le.value === "stop" ? "Stop reply" : "Send message"), Ve = f(() => Ie.value && !Ne.value && !!Me.value?.canUseBrowserRecording), He = f(() => Me.value?.isActive.value ?? !1), Ue = f(() => Me.value?.elapsedLabel.value ?? "0:00"), We = f(() => Me.value?.statusText.value ?? "Release to send"), Ge = f(() => Me.value?.state.value.phase === "sending" ? "Sending voice message" : He.value ? "Release to send voice message" : "Hold to record voice message"),
|
|
4697
|
+
}), Ae = f(() => Oe.value.pendingAttachments), je = f(() => Oe.value.isUploading), Me = f(() => e.chatController?.voiceRecorder), Ne = f(() => Me.value?.isBusy.value ?? !1), Fe = f(() => e.chatController?.canAttachFile?.value ?? !1), Ie = f(() => e.chatController?.canRecordAudio?.value ?? !1), Le = f(() => e.chatController?.composerAction?.value ?? "idle"), Re = f(() => Le.value !== "idle"), Be = f(() => Le.value === "stop" ? "Stop reply" : "Send message"), Ve = f(() => Ie.value && !Ne.value && !!Me.value?.canUseBrowserRecording), He = f(() => Me.value?.isActive.value ?? !1), Ue = f(() => Me.value?.elapsedLabel.value ?? "0:00"), We = f(() => Me.value?.statusText.value ?? "Release to send"), Ge = f(() => Me.value?.state.value.phase === "sending" ? "Sending voice message" : He.value ? "Release to send voice message" : "Hold to record voice message"), G = f(() => e.variant === "light"), Ke = f(() => G.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Je = f(() => G.value ? "text-theme-300" : "text-white/30");
|
|
4702
4698
|
ne(async () => {
|
|
4703
4699
|
e.chatController && !c.value && await e.chatController.startTextConversation();
|
|
4704
4700
|
}), re(() => {
|
|
@@ -4722,7 +4718,7 @@ var wr = [
|
|
|
4722
4718
|
function adjustTextareaHeight() {
|
|
4723
4719
|
a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
|
|
4724
4720
|
}
|
|
4725
|
-
|
|
4721
|
+
se(ke, () => S(() => adjustTextareaHeight()));
|
|
4726
4722
|
function triggerFileInput() {
|
|
4727
4723
|
o.value?.click();
|
|
4728
4724
|
}
|
|
@@ -4766,56 +4762,56 @@ var wr = [
|
|
|
4766
4762
|
...o ? {} : { year: "numeric" }
|
|
4767
4763
|
})}, ${a}`;
|
|
4768
4764
|
}
|
|
4769
|
-
return (t, s) => (k(), h("div", { class: C(["@container/chat relative flex h-full flex-col",
|
|
4770
|
-
e.showHeader && !
|
|
4765
|
+
return (t, s) => (k(), h("div", { class: C(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
|
|
4766
|
+
e.showHeader && !G.value ? (k(), h("div", ni, [b(Pe, {
|
|
4771
4767
|
agent: e.agent,
|
|
4772
4768
|
"is-online": c.value
|
|
4773
|
-
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (k(), h("div",
|
|
4769
|
+
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (k(), h("div", ri, [_("div", { class: C(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
|
|
4774
4770
|
b(ze, {
|
|
4775
4771
|
agent: e.agent,
|
|
4776
|
-
"is-light":
|
|
4772
|
+
"is-light": G.value,
|
|
4777
4773
|
class: "size-10"
|
|
4778
4774
|
}, null, 8, ["agent", "is-light"]),
|
|
4779
|
-
_("div",
|
|
4780
|
-
e.headerMeta ? (k(), h("span",
|
|
4775
|
+
_("div", ii, [_("div", ai, F(e.agent.displayName.value), 1), _("div", oi, F(e.agent.title.value || "Assistant"), 1)]),
|
|
4776
|
+
e.headerMeta ? (k(), h("span", si, F(e.headerMeta), 1)) : m("", !0)
|
|
4781
4777
|
], 2)])) : m("", !0),
|
|
4782
|
-
oe.value ? (k(), h("div",
|
|
4783
|
-
_("p", { class: C(["text-[15px] font-semibold",
|
|
4784
|
-
_("p", { class: C(["mt-1.5 max-w-[340px] text-pretty text-[13.5px] leading-relaxed",
|
|
4778
|
+
oe.value ? (k(), h("div", ci, [
|
|
4779
|
+
_("p", { class: C(["text-[15px] font-semibold", G.value ? "text-theme-900" : "text-white"]) }, " Can't reach " + F(e.agent?.displayName.value || "your assistant") + " right now ", 3),
|
|
4780
|
+
_("p", { class: C(["mt-1.5 max-w-[340px] text-pretty text-[13.5px] leading-relaxed", G.value ? "text-theme-500" : "text-white/60"]) }, " Your messages are safe. This usually clears on its own. ", 2),
|
|
4785
4781
|
_("button", {
|
|
4786
4782
|
type: "button",
|
|
4787
4783
|
"data-test": "chat-offline-retry",
|
|
4788
|
-
class: C(["mt-5 cursor-pointer rounded-full px-4 py-2 text-[13.5px] font-semibold transition-colors",
|
|
4784
|
+
class: C(["mt-5 cursor-pointer rounded-full px-4 py-2 text-[13.5px] font-semibold transition-colors", G.value ? "text-theme-900 ring-1 ring-theme-200 hover:bg-theme-50" : "text-white ring-1 ring-white/20 hover:bg-white/10"]),
|
|
4789
4785
|
onClick: s[0] || (s[0] = (e) => retryConnection())
|
|
4790
4786
|
}, " Try again ", 2)
|
|
4791
|
-
])) :
|
|
4787
|
+
])) : de.value ? (k(), h("div", {
|
|
4792
4788
|
key: 3,
|
|
4793
|
-
class: C(["py-16 flex flex-col items-center justify-center gap-2 text-sm",
|
|
4794
|
-
}, [b(
|
|
4789
|
+
class: C(["py-16 flex flex-col items-center justify-center gap-2 text-sm", G.value ? "text-theme-400" : "text-theme-600"])
|
|
4790
|
+
}, [b(he, { class: "size-4" })], 2)) : e.setupHint ? (k(), h("div", {
|
|
4795
4791
|
key: 4,
|
|
4796
4792
|
class: C(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Je.value])
|
|
4797
4793
|
}, [s[21] || (s[21] = _("i", { class: "i-tabler-tool size-3" }, null, -1)), _("span", null, F(e.setupHint), 1)], 2)) : m("", !0),
|
|
4798
|
-
b(
|
|
4794
|
+
b(ti, {
|
|
4799
4795
|
ref_key: "chatScroller",
|
|
4800
4796
|
ref: i,
|
|
4801
|
-
class: C(
|
|
4797
|
+
class: C(B.value.length === 0 ? "flex-none" : "flex-1")
|
|
4802
4798
|
}, {
|
|
4803
|
-
default:
|
|
4804
|
-
|
|
4799
|
+
default: ce(() => [_("div", { class: C([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
|
|
4800
|
+
B.value.length === 0 && !de.value && !oe.value ? (k(), h("div", li, [ie(t.$slots, "empty-heading", {
|
|
4805
4801
|
agent: e.agent,
|
|
4806
|
-
isLight:
|
|
4802
|
+
isLight: G.value
|
|
4807
4803
|
}, () => [b(ze, {
|
|
4808
4804
|
agent: e.agent,
|
|
4809
|
-
"is-light":
|
|
4805
|
+
"is-light": G.value,
|
|
4810
4806
|
class: "mb-4 size-20 @sm/chat:size-24"
|
|
4811
|
-
}, null, 8, ["agent", "is-light"]), _("div", { class: C(["text-base @sm/chat:text-lg font-semibold",
|
|
4812
|
-
class: C(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]",
|
|
4807
|
+
}, null, 8, ["agent", "is-light"]), _("div", { class: C(["text-base @sm/chat:text-lg font-semibold", G.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? m("", !0) : (k(), h(u, { key: 0 }, [_("p", { class: C(["mt-1 text-center text-xs @sm/chat:text-sm", Je.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), _("div", {
|
|
4808
|
+
class: C(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", G.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
4813
4809
|
title: n.value.tooltip
|
|
4814
|
-
}, [_("i", { class: C([n.value.icon, "size-3"]) }, null, 2), _("span", null, F(n.value.label), 1)], 10,
|
|
4815
|
-
(k(!0), h(u, null, j(
|
|
4816
|
-
shouldShowTimeDivider(
|
|
4810
|
+
}, [_("i", { class: C([n.value.icon, "size-3"]) }, null, 2), _("span", null, F(n.value.label), 1)], 10, ui)], 64))])) : m("", !0),
|
|
4811
|
+
(k(!0), h(u, null, j(B.value, (e, t) => (k(), h(u, { key: e.id }, [
|
|
4812
|
+
shouldShowTimeDivider(B.value, t) ? (k(), h("div", di, [
|
|
4817
4813
|
_("div", { class: C(["flex-1 h-px", Ke.value]) }, null, 2),
|
|
4818
|
-
_("span", { class: C(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Je.value]) }, F(shouldShowTimeDivider(
|
|
4814
|
+
_("span", { class: C(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Je.value]) }, F(shouldShowTimeDivider(B.value, t)), 3),
|
|
4819
4815
|
_("div", { class: C(["flex-1 h-px", Ke.value]) }, null, 2)
|
|
4820
4816
|
])) : m("", !0),
|
|
4821
4817
|
messageWorkJournal(e) ? (k(), h("div", {
|
|
@@ -4825,8 +4821,8 @@ var wr = [
|
|
|
4825
4821
|
class: "mb-4 w-full"
|
|
4826
4822
|
}, [b(qe, {
|
|
4827
4823
|
model: messageWorkJournal(e),
|
|
4828
|
-
"is-light":
|
|
4829
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4824
|
+
"is-light": G.value
|
|
4825
|
+
}, null, 8, ["model", "is-light"])], 8, fi)) : m("", !0),
|
|
4830
4826
|
isSystemExplainerMessage(e) ? (k(), h("div", {
|
|
4831
4827
|
key: 2,
|
|
4832
4828
|
"data-test": "messaging-system-msg",
|
|
@@ -4841,27 +4837,27 @@ var wr = [
|
|
|
4841
4837
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
4842
4838
|
"data-streaming": e.id === Ce.value ? "true" : void 0,
|
|
4843
4839
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
4844
|
-
}, [_("div",
|
|
4840
|
+
}, [_("div", mi, [_("div", { class: C(["mb-1 pl-1 text-[11px] font-medium", G.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), _("div", { class: C(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", G.value ? "bg-theme-25 border-theme-100 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (k(), p($r, {
|
|
4845
4841
|
key: 0,
|
|
4846
4842
|
text: e.text,
|
|
4847
|
-
inverted: !
|
|
4843
|
+
inverted: !G.value,
|
|
4848
4844
|
streaming: e.id === Ce.value,
|
|
4849
|
-
onClick: s[1] || (s[1] =
|
|
4845
|
+
onClick: s[1] || (s[1] = z(() => {}, ["stop"]))
|
|
4850
4846
|
}, null, 8, [
|
|
4851
4847
|
"text",
|
|
4852
4848
|
"inverted",
|
|
4853
4849
|
"streaming"
|
|
4854
|
-
])) : e.issue?.help ? (k(), p(
|
|
4850
|
+
])) : e.issue?.help ? (k(), p($r, {
|
|
4855
4851
|
key: 1,
|
|
4856
4852
|
text: e.issue.help,
|
|
4857
|
-
inverted: !
|
|
4853
|
+
inverted: !G.value
|
|
4858
4854
|
}, null, 8, ["text", "inverted"])) : m("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (k(), h("a", {
|
|
4859
4855
|
key: 2,
|
|
4860
4856
|
href: e.issue.actionUrl,
|
|
4861
4857
|
"data-test": "messaging-system-msg-action",
|
|
4862
|
-
class: C(["mt-2 text-[12px] font-medium inline-flex items-center gap-1",
|
|
4863
|
-
onClick: s[2] || (s[2] =
|
|
4864
|
-
}, [v(F(e.issue.actionLabel) + " ", 1), s[22] || (s[22] = _("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10,
|
|
4858
|
+
class: C(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", G.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
4859
|
+
onClick: s[2] || (s[2] = z(() => {}, ["stop"]))
|
|
4860
|
+
}, [v(F(e.issue.actionLabel) + " ", 1), s[22] || (s[22] = _("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, hi)) : m("", !0)], 2)])], 8, pi)) : e.sender === "system" ? (k(), h("div", {
|
|
4865
4861
|
key: 3,
|
|
4866
4862
|
"data-test": "messaging-system-status-msg",
|
|
4867
4863
|
"data-message-id": e.id,
|
|
@@ -4872,12 +4868,12 @@ var wr = [
|
|
|
4872
4868
|
"data-issue-code": e.issue?.code,
|
|
4873
4869
|
"data-issue-bucket": e.issue?.bucket,
|
|
4874
4870
|
"data-streaming": e.id === Ce.value ? "true" : void 0,
|
|
4875
|
-
class: C(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed",
|
|
4876
|
-
}, [s[23] || (s[23] = _("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(
|
|
4871
|
+
class: C(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", G.value ? "text-theme-500" : "text-white/60"])
|
|
4872
|
+
}, [s[23] || (s[23] = _("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b($r, {
|
|
4877
4873
|
text: e.text,
|
|
4878
|
-
inverted: !
|
|
4879
|
-
onClick: s[3] || (s[3] =
|
|
4880
|
-
}, null, 8, ["text", "inverted"])], 10,
|
|
4874
|
+
inverted: !G.value,
|
|
4875
|
+
onClick: s[3] || (s[3] = z(() => {}, ["stop"]))
|
|
4876
|
+
}, null, 8, ["text", "inverted"])], 10, gi)) : (k(), h("div", {
|
|
4881
4877
|
key: 4,
|
|
4882
4878
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
4883
4879
|
"data-message-id": e.id,
|
|
@@ -4889,11 +4885,11 @@ var wr = [
|
|
|
4889
4885
|
class: C(["flex gap-2 items-end", {
|
|
4890
4886
|
"justify-end": e.sender === "user",
|
|
4891
4887
|
"justify-start": e.sender === "agent",
|
|
4892
|
-
"mb-6": isGroupEnd(
|
|
4888
|
+
"mb-6": isGroupEnd(B.value, t)
|
|
4893
4889
|
}])
|
|
4894
4890
|
}, [_("div", {
|
|
4895
4891
|
"data-test": "messaging-message-body",
|
|
4896
|
-
class: C(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0 @sm/chat:pr-[1em]")
|
|
4892
|
+
class: C(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0 @sm/chat:pr-[1em] @lg/chat:pr-[2em]")
|
|
4897
4893
|
}, [blockAttachmentsForMessage(e).length ? (k(), h("div", {
|
|
4898
4894
|
key: 0,
|
|
4899
4895
|
class: C(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
|
|
@@ -4904,30 +4900,30 @@ var wr = [
|
|
|
4904
4900
|
"data-test": "messaging-attachment",
|
|
4905
4901
|
"data-attachment-placement": "block",
|
|
4906
4902
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
4907
|
-
}, null, 8,
|
|
4903
|
+
}, null, 8, vi)) : e.type === "audio" ? (k(), h("audio", {
|
|
4908
4904
|
key: 1,
|
|
4909
4905
|
src: e.src,
|
|
4910
4906
|
controls: "",
|
|
4911
4907
|
"data-test": "messaging-attachment",
|
|
4912
4908
|
"data-attachment-placement": "block",
|
|
4913
4909
|
class: "max-w-full"
|
|
4914
|
-
}, null, 8,
|
|
4910
|
+
}, null, 8, yi)) : (k(), h("a", {
|
|
4915
4911
|
key: 2,
|
|
4916
4912
|
href: e.src,
|
|
4917
4913
|
target: "_blank",
|
|
4918
4914
|
rel: "noopener",
|
|
4919
4915
|
"data-test": "messaging-attachment",
|
|
4920
4916
|
"data-attachment-placement": "block",
|
|
4921
|
-
class: C(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",
|
|
4922
|
-
}, [s[24] || (s[24] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(e.filename), 1)], 10,
|
|
4917
|
+
class: C(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
4918
|
+
}, [s[24] || (s[24] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(e.filename), 1)], 10, bi))], 64))), 128))], 2)) : m("", !0), messageRenderParts(e).length ? (k(), h("div", {
|
|
4923
4919
|
key: 1,
|
|
4924
4920
|
"data-test": "messaging-message-content",
|
|
4925
|
-
class: C(e.sender === "user" ?
|
|
4926
|
-
}, [(k(!0), h(u, null, j(messageRenderParts(e), (t) => (k(), h(u, { key: t.key }, [t.kind === "text" && t.text ? (k(), h("div",
|
|
4921
|
+
class: C(e.sender === "user" ? G.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : G.value ? "text-theme-800" : "text-white/95")
|
|
4922
|
+
}, [(k(!0), h(u, null, j(messageRenderParts(e), (t) => (k(), h(u, { key: t.key }, [t.kind === "text" && t.text ? (k(), h("div", xi, [b($r, {
|
|
4927
4923
|
text: t.text,
|
|
4928
|
-
inverted: e.sender === "user" || !
|
|
4924
|
+
inverted: e.sender === "user" || !G.value,
|
|
4929
4925
|
streaming: e.id === Ce.value,
|
|
4930
|
-
onClick: s[4] || (s[4] =
|
|
4926
|
+
onClick: s[4] || (s[4] = z(() => {}, ["stop"]))
|
|
4931
4927
|
}, null, 8, [
|
|
4932
4928
|
"text",
|
|
4933
4929
|
"inverted",
|
|
@@ -4939,88 +4935,88 @@ var wr = [
|
|
|
4939
4935
|
"data-test": "messaging-attachment",
|
|
4940
4936
|
"data-attachment-placement": t.placement,
|
|
4941
4937
|
class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
4942
|
-
}, null, 8,
|
|
4938
|
+
}, null, 8, Si)) : t.kind === "attachment" && t.attachment.type === "audio" ? (k(), h("audio", {
|
|
4943
4939
|
key: 2,
|
|
4944
4940
|
src: t.attachment.src,
|
|
4945
4941
|
controls: "",
|
|
4946
4942
|
"data-test": "messaging-attachment",
|
|
4947
4943
|
"data-attachment-placement": t.placement,
|
|
4948
4944
|
class: "my-2 max-w-full"
|
|
4949
|
-
}, null, 8,
|
|
4945
|
+
}, null, 8, Ci)) : t.kind === "attachment" ? (k(), h("a", {
|
|
4950
4946
|
key: 3,
|
|
4951
4947
|
href: t.attachment.src,
|
|
4952
4948
|
target: "_blank",
|
|
4953
4949
|
rel: "noopener",
|
|
4954
4950
|
"data-test": "messaging-attachment",
|
|
4955
4951
|
"data-attachment-placement": t.placement,
|
|
4956
|
-
class: C(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",
|
|
4957
|
-
}, [s[25] || (s[25] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(t.attachment.filename), 1)], 10,
|
|
4958
|
-
e.id ===
|
|
4952
|
+
class: C(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
4953
|
+
}, [s[25] || (s[25] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(t.attachment.filename), 1)], 10, wi)) : m("", !0)], 64))), 128))], 2)) : m("", !0)], 2)], 10, _i)),
|
|
4954
|
+
e.id === U.value ? (k(), h(u, { key: 5 }, [_e.value.length ? (k(!0), h(u, { key: 0 }, j(_e.value, (e) => (k(), h(u, { key: e.id }, [e.kind === "work" ? (k(), h("div", {
|
|
4959
4955
|
key: 0,
|
|
4960
4956
|
"data-test": "messaging-tool-activity",
|
|
4961
4957
|
"data-journal-outcome": e.journal.outcome,
|
|
4962
4958
|
class: "mb-4 w-full"
|
|
4963
4959
|
}, [b(qe, {
|
|
4964
4960
|
model: e.journal,
|
|
4965
|
-
"is-light":
|
|
4966
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4961
|
+
"is-light": G.value
|
|
4962
|
+
}, null, 8, ["model", "is-light"])], 8, Ti)) : e.kind === "text" && e.content ? (k(), h("div", {
|
|
4967
4963
|
key: 1,
|
|
4968
4964
|
"data-test": "messaging-live-text-block",
|
|
4969
|
-
class: C(["mb-4 @sm/chat:pr-[1em]",
|
|
4970
|
-
}, [b(
|
|
4965
|
+
class: C(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", G.value ? "text-theme-800" : "text-white/95"])
|
|
4966
|
+
}, [b($r, {
|
|
4971
4967
|
text: e.content,
|
|
4972
|
-
inverted: !
|
|
4973
|
-
streaming: e.id ===
|
|
4974
|
-
onClick: s[5] || (s[5] =
|
|
4968
|
+
inverted: !G.value,
|
|
4969
|
+
streaming: e.id === ve.value,
|
|
4970
|
+
onClick: s[5] || (s[5] = z(() => {}, ["stop"]))
|
|
4975
4971
|
}, null, 8, [
|
|
4976
4972
|
"text",
|
|
4977
4973
|
"inverted",
|
|
4978
4974
|
"streaming"
|
|
4979
|
-
])], 2)) : (k(), h("div",
|
|
4975
|
+
])], 2)) : (k(), h("div", Ei, [b(he, { class: C(["size-3.5", G.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : be.value ? (k(), h("div", {
|
|
4980
4976
|
key: 1,
|
|
4981
4977
|
"data-test": "messaging-tool-activity",
|
|
4982
|
-
"data-journal-outcome":
|
|
4978
|
+
"data-journal-outcome": be.value.outcome,
|
|
4983
4979
|
class: "mb-4 w-full"
|
|
4984
4980
|
}, [b(qe, {
|
|
4985
|
-
model:
|
|
4986
|
-
"is-light":
|
|
4987
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4981
|
+
model: be.value,
|
|
4982
|
+
"is-light": G.value
|
|
4983
|
+
}, null, 8, ["model", "is-light"])], 8, Di)) : m("", !0)], 64)) : m("", !0)
|
|
4988
4984
|
], 64))), 128)),
|
|
4989
|
-
|
|
4985
|
+
H.value ? (k(), h("div", {
|
|
4990
4986
|
key: 1,
|
|
4991
4987
|
"data-test": "messaging-working-state",
|
|
4992
|
-
"data-working-description":
|
|
4993
|
-
class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none",
|
|
4988
|
+
"data-working-description": H.value,
|
|
4989
|
+
class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", G.value ? "text-theme-500" : "text-white/45"])
|
|
4994
4990
|
}, [s[26] || (s[26] = _("i", {
|
|
4995
4991
|
class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
|
|
4996
4992
|
"aria-hidden": "true"
|
|
4997
|
-
}, null, -1)), _("span",
|
|
4998
|
-
|
|
4993
|
+
}, null, -1)), _("span", ki, F(H.value), 1)], 10, Oi)) : m("", !0),
|
|
4994
|
+
W.value ? (k(), h("div", {
|
|
4999
4995
|
key: 2,
|
|
5000
4996
|
"data-test": "messaging-transient-issue",
|
|
5001
|
-
"data-issue-code":
|
|
5002
|
-
class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug",
|
|
4997
|
+
"data-issue-code": W.value.code,
|
|
4998
|
+
class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", G.value ? "text-theme-600" : "text-white/60"])
|
|
5003
4999
|
}, [
|
|
5004
5000
|
s[27] || (s[27] = _("i", {
|
|
5005
5001
|
class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
|
|
5006
5002
|
"aria-hidden": "true"
|
|
5007
5003
|
}, null, -1)),
|
|
5008
|
-
_("span", null, [v(F(
|
|
5009
|
-
|
|
5004
|
+
_("span", null, [v(F(W.value.message), 1), W.value.help ? (k(), h(u, { key: 0 }, [v(F(W.value.help), 1)], 64)) : m("", !0)]),
|
|
5005
|
+
W.value.actionUrl && W.value.actionLabel ? (k(), h("a", {
|
|
5010
5006
|
key: 0,
|
|
5011
|
-
href:
|
|
5007
|
+
href: W.value.actionUrl,
|
|
5012
5008
|
class: "shrink-0 underline underline-offset-2",
|
|
5013
|
-
onClick: s[6] || (s[6] =
|
|
5014
|
-
}, F(
|
|
5015
|
-
], 10,
|
|
5016
|
-
we.value ? (k(), h("div",
|
|
5017
|
-
class: C(["i-svg-spinners-3-dots-bounce size-7",
|
|
5009
|
+
onClick: s[6] || (s[6] = z(() => {}, ["stop"]))
|
|
5010
|
+
}, F(W.value.actionLabel), 9, ji)) : m("", !0)
|
|
5011
|
+
], 10, Ai)) : m("", !0),
|
|
5012
|
+
we.value ? (k(), h("div", Mi, [_("i", {
|
|
5013
|
+
class: C(["i-svg-spinners-3-dots-bounce size-7", G.value ? "text-theme-400" : "text-white/50"]),
|
|
5018
5014
|
"aria-hidden": "true"
|
|
5019
5015
|
}, null, 2)])) : m("", !0)
|
|
5020
5016
|
], 2)]),
|
|
5021
5017
|
_: 3
|
|
5022
5018
|
}, 8, ["class"]),
|
|
5023
|
-
_("div", { class: C(["left-0 right-0 z-30 px-5 pb-4 pt-3", [
|
|
5019
|
+
_("div", { class: C(["left-0 right-0 z-30 px-5 pb-4 pt-3", [B.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", G.value ? "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"]]) }, [
|
|
5024
5020
|
Ae.value.length > 0 ? (k(), h("div", {
|
|
5025
5021
|
key: 0,
|
|
5026
5022
|
class: C(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
|
|
@@ -5031,14 +5027,14 @@ var wr = [
|
|
|
5031
5027
|
key: 0,
|
|
5032
5028
|
src: e.src,
|
|
5033
5029
|
alt: e.filename,
|
|
5034
|
-
class: C(["size-14 rounded-xl object-cover border",
|
|
5035
|
-
}, null, 10,
|
|
5030
|
+
class: C(["size-14 rounded-xl object-cover border", G.value ? "border-black/10" : "border-white/20"])
|
|
5031
|
+
}, null, 10, Ni)) : (k(), h("div", {
|
|
5036
5032
|
key: 1,
|
|
5037
|
-
class: C(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border",
|
|
5038
|
-
}, [s[28] || (s[28] = _("i", { class: "i-tabler-file size-4" }, null, -1)), _("span",
|
|
5033
|
+
class: C(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", G.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5034
|
+
}, [s[28] || (s[28] = _("i", { class: "i-tabler-file size-4" }, null, -1)), _("span", Pi, F(e.filename), 1)], 2)), _("button", {
|
|
5039
5035
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
|
|
5040
5036
|
onClick: (e) => removeAttachment(t)
|
|
5041
|
-
}, [...s[29] || (s[29] = [_("i", { class: "i-tabler-x size-3" }, null, -1)])], 8,
|
|
5037
|
+
}, [...s[29] || (s[29] = [_("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Fi)]))), 128)), je.value ? (k(), h("div", Ii, [b(he, { class: "size-5" })])) : m("", !0)], 2)) : m("", !0),
|
|
5042
5038
|
Fe.value ? (k(), h("input", {
|
|
5043
5039
|
key: 1,
|
|
5044
5040
|
ref_key: "fileInput",
|
|
@@ -5051,17 +5047,17 @@ var wr = [
|
|
|
5051
5047
|
_("div", {
|
|
5052
5048
|
"data-test": "messaging-composer",
|
|
5053
5049
|
"data-composer-action": Le.value,
|
|
5054
|
-
class: C(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "",
|
|
5050
|
+
class: C(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", G.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
|
|
5055
5051
|
onClick: focusComposer
|
|
5056
5052
|
}, [He.value ? (k(), h("div", {
|
|
5057
5053
|
key: 1,
|
|
5058
5054
|
"data-test": "messaging-recording-state",
|
|
5059
|
-
class: C(["flex min-w-0 items-center gap-2 py-1",
|
|
5055
|
+
class: C(["flex min-w-0 items-center gap-2 py-1", G.value ? "text-theme-700" : "text-white/80"])
|
|
5060
5056
|
}, [
|
|
5061
5057
|
s[30] || (s[30] = _("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5062
|
-
_("span",
|
|
5063
|
-
_("span", { class: C(["min-w-0 truncate text-sm",
|
|
5064
|
-
], 2)) :
|
|
5058
|
+
_("span", zi, F(Ue.value), 1),
|
|
5059
|
+
_("span", { class: C(["min-w-0 truncate text-sm", G.value ? "text-theme-400" : "text-white/45"]) }, F(We.value), 3)
|
|
5060
|
+
], 2)) : R((k(), h("textarea", {
|
|
5065
5061
|
key: 0,
|
|
5066
5062
|
ref_key: "textarea",
|
|
5067
5063
|
ref: a,
|
|
@@ -5075,78 +5071,77 @@ var wr = [
|
|
|
5075
5071
|
fontSize: "16px",
|
|
5076
5072
|
resize: "none"
|
|
5077
5073
|
},
|
|
5078
|
-
class: C(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
5074
|
+
class: C(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", G.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
|
|
5079
5075
|
onKeydown: handleKeydown,
|
|
5080
5076
|
onFocus: s[8] || (s[8] = (e) => r.value = !0),
|
|
5081
5077
|
onBlur: s[9] || (s[9] = (e) => r.value = !1)
|
|
5082
|
-
}, null, 42,
|
|
5078
|
+
}, null, 42, Ri)), [[I, ke.value]]), _("div", Bi, [
|
|
5083
5079
|
_("button", {
|
|
5084
5080
|
class: C(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
|
|
5085
5081
|
Fe.value ? "cursor-pointer" : "cursor-default",
|
|
5086
|
-
|
|
5082
|
+
G.value ? "text-theme-500" : "text-white/50",
|
|
5087
5083
|
je.value || Ne.value ? "opacity-50 pointer-events-none" : ""
|
|
5088
5084
|
]]),
|
|
5089
5085
|
disabled: Ee.value || je.value || Ne.value || !Fe.value,
|
|
5090
5086
|
"aria-label": Fe.value ? "Attach file" : "File attachments unavailable",
|
|
5091
5087
|
title: Fe.value ? "Attach file" : "File attachments unavailable",
|
|
5092
5088
|
onClick: s[10] || (s[10] = (e) => Fe.value && triggerFileInput())
|
|
5093
|
-
}, [je.value ? (k(), h("i",
|
|
5089
|
+
}, [je.value ? (k(), h("i", Hi)) : (k(), h("i", Ui)), _("span", Wi, F(Fe.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Vi),
|
|
5094
5090
|
s[31] || (s[31] = _("div", { class: "flex-1" }, null, -1)),
|
|
5095
|
-
_("div",
|
|
5091
|
+
_("div", Gi, [Ve.value || He.value ? (k(), h("button", {
|
|
5096
5092
|
key: 0,
|
|
5097
5093
|
"data-test": "messaging-record-audio-btn",
|
|
5098
|
-
class: C(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", He.value ?
|
|
5094
|
+
class: C(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", He.value ? G.value ? "text-theme-900 scale-110" : "text-white scale-110" : G.value ? "text-theme-500" : "text-white/60"]),
|
|
5099
5095
|
"aria-label": Ge.value,
|
|
5100
5096
|
title: Ge.value,
|
|
5101
|
-
onPointerdown: s[11] || (s[11] =
|
|
5102
|
-
onPointerup: s[12] || (s[12] =
|
|
5103
|
-
onPointercancel: s[13] || (s[13] =
|
|
5097
|
+
onPointerdown: s[11] || (s[11] = z((e) => startRecording(), ["prevent"])),
|
|
5098
|
+
onPointerup: s[12] || (s[12] = z((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
|
|
5099
|
+
onPointercancel: s[13] || (s[13] = z((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
|
|
5104
5100
|
onKeydown: [
|
|
5105
|
-
s[14] || (s[14] =
|
|
5106
|
-
s[16] || (s[16] =
|
|
5107
|
-
s[18] || (s[18] =
|
|
5101
|
+
s[14] || (s[14] = ue(z((e) => startRecording(), ["prevent"]), ["enter"])),
|
|
5102
|
+
s[16] || (s[16] = ue(z((e) => startRecording(), ["prevent"]), ["space"])),
|
|
5103
|
+
s[18] || (s[18] = ue(z((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5108
5104
|
],
|
|
5109
|
-
onKeyup: [s[15] || (s[15] =
|
|
5110
|
-
}, [_("i", { class: C([He.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), _("span",
|
|
5105
|
+
onKeyup: [s[15] || (s[15] = ue(z((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[17] || (s[17] = ue(z((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
|
|
5106
|
+
}, [_("i", { class: C([He.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), _("span", qi, F(Ge.value), 1)], 42, Ki)) : m("", !0), He.value ? m("", !0) : (k(), h("button", {
|
|
5111
5107
|
key: 1,
|
|
5112
5108
|
"data-test": "messaging-send-btn",
|
|
5113
5109
|
"data-composer-action": Le.value,
|
|
5114
|
-
class: C(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Re.value ?
|
|
5110
|
+
class: C(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Re.value ? G.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : G.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
|
|
5115
5111
|
disabled: !Re.value,
|
|
5116
5112
|
"aria-label": Be.value,
|
|
5117
5113
|
title: Be.value,
|
|
5118
5114
|
onClick: s[19] || (s[19] = (e) => handleComposerAction())
|
|
5119
|
-
}, [Le.value === "stop" ? (k(), h("i",
|
|
5120
|
-
])], 10,
|
|
5121
|
-
|
|
5115
|
+
}, [Le.value === "stop" ? (k(), h("i", Yi)) : (k(), h("i", Xi)), _("span", Zi, F(Be.value), 1)], 10, Ji))])
|
|
5116
|
+
])], 10, Li),
|
|
5117
|
+
B.value.length === 0 && e.suggestedPrompts.length > 0 ? (k(), h("div", Qi, [_("div", $i, [(k(!0), h(u, null, j(e.suggestedPrompts, (e, t) => (k(), h("button", {
|
|
5122
5118
|
key: e.id,
|
|
5123
5119
|
type: "button",
|
|
5124
5120
|
disabled: Ee.value,
|
|
5125
|
-
tabindex: z.value || t < 3 ? void 0 : -1,
|
|
5126
5121
|
"data-test": "messaging-suggested-prompt",
|
|
5127
|
-
class: C(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", Ee.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900"]),
|
|
5122
|
+
class: C(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Ee.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !pe.value && t >= 3 ? "max-sm:hidden" : ""]]),
|
|
5128
5123
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5129
|
-
}, F(e.label), 11,
|
|
5124
|
+
}, F(e.label), 11, ea))), 128)), e.suggestedPrompts.length > 3 ? (k(), h("button", {
|
|
5130
5125
|
key: 0,
|
|
5131
5126
|
type: "button",
|
|
5132
5127
|
"data-test": "messaging-suggested-prompts-more",
|
|
5133
|
-
"aria-expanded":
|
|
5134
|
-
class:
|
|
5135
|
-
onClick: s[20] || (s[20] = (e) =>
|
|
5136
|
-
}, [
|
|
5128
|
+
"aria-expanded": pe.value,
|
|
5129
|
+
class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
|
|
5130
|
+
onClick: s[20] || (s[20] = (e) => pe.value = !pe.value)
|
|
5131
|
+
}, [v(F(pe.value ? "See less" : "See more") + " ", 1), _("i", { class: C(["i-tabler-chevron-down size-4 transition-transform", pe.value ? "rotate-180" : ""]) }, null, 2)], 8, ta)) : m("", !0)])])) : m("", !0)
|
|
5137
5132
|
], 2)
|
|
5138
5133
|
], 2));
|
|
5139
5134
|
}
|
|
5140
|
-
}),
|
|
5135
|
+
}), ia = { class: "agent-wrap" }, aa = {
|
|
5141
5136
|
key: 0,
|
|
5142
5137
|
class: "flex items-center justify-center h-full"
|
|
5143
|
-
},
|
|
5138
|
+
}, oa = {
|
|
5144
5139
|
key: 2,
|
|
5145
5140
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5146
5141
|
role: "status",
|
|
5147
5142
|
"aria-live": "polite",
|
|
5148
5143
|
"data-test": "agent-unavailable"
|
|
5149
|
-
},
|
|
5144
|
+
}, sa = /* @__PURE__ */ x({
|
|
5150
5145
|
__name: "AgentWrap",
|
|
5151
5146
|
props: {
|
|
5152
5147
|
sdk: {},
|
|
@@ -5242,7 +5237,7 @@ var wr = [
|
|
|
5242
5237
|
});
|
|
5243
5238
|
}
|
|
5244
5239
|
}
|
|
5245
|
-
return ne(loadAgent), (t, n) => (k(), h("div",
|
|
5240
|
+
return ne(loadAgent), (t, n) => (k(), h("div", ia, [s.value ? (k(), h("div", aa, [_("div", { class: C(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
|
|
5246
5241
|
sdk: oe(o),
|
|
5247
5242
|
agent: c.value,
|
|
5248
5243
|
context: e.clientContext ?? e.context,
|
|
@@ -5250,7 +5245,7 @@ var wr = [
|
|
|
5250
5245
|
buttonText: e.buttonText,
|
|
5251
5246
|
buttonIcon: e.buttonIcon,
|
|
5252
5247
|
loading: s.value
|
|
5253
|
-
}, void 0, void 0, 1) : u.value ? (k(), h("div",
|
|
5248
|
+
}, void 0, void 0, 1) : u.value ? (k(), h("div", oa, [n[0] || (n[0] = _("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), _("button", {
|
|
5254
5249
|
type: "button",
|
|
5255
5250
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5256
5251
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5259,6 +5254,6 @@ var wr = [
|
|
|
5259
5254
|
}
|
|
5260
5255
|
});
|
|
5261
5256
|
//#endregion
|
|
5262
|
-
export { Oe as a, getAgentAvatarUrl as c, AgentChatController as d,
|
|
5257
|
+
export { Oe as a, getAgentAvatarUrl as c, AgentChatController as d, _e as f, Pe as i, handleImageError as l, he as m, ra as n, Ee as o, n as p, $r as r, we as s, sa as t, parseButtonTemplate as u };
|
|
5263
5258
|
|
|
5264
5259
|
//# sourceMappingURL=AgentWrap.js.map
|