page-agent-sdk 3.15.0 → 3.17.0
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/README.md +5 -3
- package/README.zh-CN.md +5 -3
- package/dist/page-agent-sdk.headless.js +34 -9
- package/dist/page-agent-sdk.iife.js +132 -129
- package/dist/page-agent-sdk.js +1052 -907
- package/dist/page-agent-sdk.umd.cjs +36 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/skills/page-agent-sdk-integrate/references/integration-prompt.md +1 -0
- package/types/index.d.ts +37 -0
package/dist/page-agent-sdk.js
CHANGED
|
@@ -5718,9 +5718,9 @@ var $u = {
|
|
|
5718
5718
|
function ed(e, t = "code") {
|
|
5719
5719
|
let n = `use_${e}`;
|
|
5720
5720
|
return [
|
|
5721
|
-
`【执行纪律(最重要)】收到代码组件任务后:**新建类直接委派**(追加组件无需通读/翻页现有数组,子 agent
|
|
5721
|
+
`【执行纪律(最重要)】收到代码组件任务后:**新建类直接委派**(追加组件无需通读/翻页现有数组,子 agent 自会采样一个组件看结构;**新建组件由子 agent 全权创建** —— 它自己把整个组件(含 ${t})写进数组,你不需要也不能替它创建/追加/落地代码)→ 修改类才 read 定位(by name)→ 调 ${n} 委派 → read 核对 → 回复用户。**中间绝不输出过渡性文字** —— 「我先看看…」「稍后委派」「接下来我会…」这类计划性回复等于任务没做就结束了(回复即本轮终止);所有调研和委派在本轮内连续完成,完成后才回复总结。`,
|
|
5722
5722
|
"【产物形态】每个组件是完整、自包含的 HTML 页面(含 style/script,可独立成页);你只负责委派和收尾,不关心宿主如何渲染(v-html / iframe / SFC 是集成方的事)。",
|
|
5723
|
-
`【主 agent 职责边界(硬规则)】禁止直接 read/write 代码组件的 ${t} 字段(read 只得 <code Nkb> 摘要没用;write 绕过 vfs/verify 危险)—— 生成/修改/排查代码一律经 ${n},收尾 read
|
|
5723
|
+
`【主 agent 职责边界(硬规则)】禁止直接 read/write 代码组件的 ${t} 字段(read 只得 <code Nkb> 摘要没用;write 绕过 vfs/verify 危险)—— 生成/修改/排查代码一律经 ${n},收尾 read 核对。**委派返回即已落地**:${n} 的结论说「已创建组件 X」= 组件已在数组里,**不要再 write/append 一遍**(子 agent 已自己创建,你再写 = 造出重复组件,还得花轮次删;真 LLM 实测踩过:主 agent 把返回的 code 又追加了一次 → 索引 8/9 重复)。核对方式 = read 该数组尾部(确认新组件存在 + name 唯一),仅此而已。`,
|
|
5724
5724
|
`【多组件委派(防上下文污染)】一次要多个组件:① write_todos 列出(每项 name + 要点)② **不同组件可在同一轮并行发多个 ${n} 委派**(每组件一次 ${n},task 只写该组件 name + 要点 + 主题/风格;每次委派是独立子 agent 实例,互不共享上下文);**同一组件同一时间只能有一个委派在途**,勿对同一组件同轮发两个委派 ③ 委派返回后逐个 read 核对(确认已生成 + 名称对)+ update_todo 标完成 ④ 主题/风格在每次 task 里转述(每个子 agent 全新上下文,不知其他组件)。一次 task 塞多个组件仍禁止(同一子 agent 共享上下文生成多个 → class/样式冲突污染);主 agent 自己的 write(普通组件属性)可与委派同轮发出,不必等委派返回。`,
|
|
5725
5725
|
`【委派 task 规格化(收窄子 agent 决策,防开放任务致装饰穷举)】委派 ${n} 的 task 必须含:① 组件定位(by name)② 视觉风格(配色/质感/字体;**给 1-2 个具体视觉锚** —— 主色 hex **取自平台 UI/设计规范 skill 的定义值**(有规范类 skill 先 load 再引用其 hex,勿凭页面观察自造近似色;无规范才自定,如「金黄 #F7C948」)、主体占比(如「杯高约画布 60%」)或装饰密度(如「仅 2 类背景装饰」)—— 细节空间收窄,子 agent 不在装饰细节上展开推演)③ 内容(文案/数据/图)④ 交互意图(动效/状态/触发)⑤ 历史偏好(可选):聊天上下文中有与该组件相关的用户历史偏好/反馈(如「用户偏好深色系」「上轮嫌动画太快」),提炼一句附 task 末尾(新子 agent 无记忆,全靠 task);**不含技术实现**(SVG vs CSS / keyframes vs transition 归子 agent 选)。❌「生成啤酒杯动画」→ ✅「啤酒杯倒酒(beer):金黄啤酒 #F7C948 从上方倒入透明杯(杯高约画布 60%),深绿背景,液体循环下落 2s,hover 杯子放大」。规格简练(4 要素各半句),远省子 agent 思考 token。`,
|
|
5726
5726
|
`【委派失败重试】${n} 返回乱码/内部标记(如 <|DSML|)/空结论或报错 = 子 agent 异常,**重新委派一次**(task 附「上次失败,这次先把代码写短些/分步」);连续两次失败才降级告知用户。**不要因此自己直接 write/edit ${t} 字段**(绕过 vfs/格式校验,且你拿不到规范全文)。`,
|
|
@@ -9011,6 +9011,7 @@ ${`- 输出形态:完整、自包含的 HTML 页面(.${r},可独立成页)`}
|
|
|
9011
9011
|
|
|
9012
9012
|
诚实交付:
|
|
9013
9013
|
- 按用户需求产出完整 HTML 页面。若某需求无法实现,结论简短说明(不展开权衡、不解释渲染原理)。禁止假装实现了未做到的特性。
|
|
9014
|
+
- **结论首行必须是落地声明**(主 agent 据此判定已完成,不再自己写):新建写「已创建组件 <name>(索引 N)」、修改写「已修改组件 <name>」;**结论里不要贴代码全文**(已写进 data,主 agent 贴了会诱发它再写一遍造成重复组件)。
|
|
9014
9015
|
- 收尾回复末尾附 1 行交接笔记(格式见文末「收口格式」,**必守**)。
|
|
9015
9016
|
|
|
9016
9017
|
工作方式:
|
|
@@ -13834,9 +13835,32 @@ async function g_(e) {
|
|
|
13834
13835
|
}
|
|
13835
13836
|
}
|
|
13836
13837
|
//#endregion
|
|
13838
|
+
//#region src/core/components/icons.ts
|
|
13839
|
+
var __ = {
|
|
13840
|
+
header: "🤖",
|
|
13841
|
+
subagent: "🤖",
|
|
13842
|
+
subagentProgress: "🧬",
|
|
13843
|
+
empty: "💬",
|
|
13844
|
+
focus: "🎯",
|
|
13845
|
+
queued: "📋",
|
|
13846
|
+
queuedEdit: "✏️",
|
|
13847
|
+
recommend: "💡",
|
|
13848
|
+
conflict: "⚠️"
|
|
13849
|
+
};
|
|
13850
|
+
function v_(e) {
|
|
13851
|
+
let t = { ...__ };
|
|
13852
|
+
if (!e) return t;
|
|
13853
|
+
let n = Object.keys(__);
|
|
13854
|
+
for (let r of n) {
|
|
13855
|
+
let n = e[r];
|
|
13856
|
+
typeof n == "string" && (t[r] = n);
|
|
13857
|
+
}
|
|
13858
|
+
return e.assistantAvatar && (t.assistantAvatar = e.assistantAvatar), e.userAvatar && (t.userAvatar = e.userAvatar), t;
|
|
13859
|
+
}
|
|
13860
|
+
//#endregion
|
|
13837
13861
|
//#region src/core/composables/chatContext.ts
|
|
13838
|
-
var
|
|
13839
|
-
function
|
|
13862
|
+
var y_ = Symbol("chatContext");
|
|
13863
|
+
function b_(e = {}) {
|
|
13840
13864
|
let t = h_({
|
|
13841
13865
|
fetchResponse: e.fetchResponse,
|
|
13842
13866
|
fetchStream: e.fetchStream,
|
|
@@ -13922,26 +13946,27 @@ function v_(e = {}) {
|
|
|
13922
13946
|
},
|
|
13923
13947
|
focusChipClick: (t) => {
|
|
13924
13948
|
e.onFocusChipClick?.(t);
|
|
13925
|
-
}
|
|
13949
|
+
},
|
|
13950
|
+
icons: v_(e.icons)
|
|
13926
13951
|
};
|
|
13927
13952
|
}
|
|
13928
|
-
function
|
|
13929
|
-
let e = $r(
|
|
13953
|
+
function x_() {
|
|
13954
|
+
let e = $r(y_);
|
|
13930
13955
|
if (!e) throw Error("useChatContext 必须在 provide(chatContextKey) 的组件子树内调用");
|
|
13931
13956
|
return e;
|
|
13932
13957
|
}
|
|
13933
13958
|
//#endregion
|
|
13934
13959
|
//#region src/core/components/ChatHeader.vue?vue&type=script&setup=true&lang.ts
|
|
13935
|
-
var
|
|
13960
|
+
var S_ = { class: "chat-header" }, C_ = { class: "header-left" }, w_ = { class: "header-icon" }, T_ = { class: "header-title" }, E_ = {
|
|
13936
13961
|
key: 0,
|
|
13937
13962
|
class: "status-dot pulse"
|
|
13938
|
-
},
|
|
13963
|
+
}, D_ = ["data-sid", "onClick"], O_ = { class: "hist-title" }, k_ = { class: "hist-meta" }, A_ = ["onClick"], j_ = {
|
|
13939
13964
|
key: 0,
|
|
13940
13965
|
class: "debug-badge"
|
|
13941
|
-
},
|
|
13966
|
+
}, M_ = {
|
|
13942
13967
|
key: 0,
|
|
13943
13968
|
class: "more-item-badge"
|
|
13944
|
-
},
|
|
13969
|
+
}, N_ = ["disabled"], P_ = /*@__PURE__*/ Fi({
|
|
13945
13970
|
__name: "ChatHeader",
|
|
13946
13971
|
props: {
|
|
13947
13972
|
title: {},
|
|
@@ -13956,22 +13981,22 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
13956
13981
|
},
|
|
13957
13982
|
emits: ["close"],
|
|
13958
13983
|
setup(e) {
|
|
13959
|
-
let t = e, n =
|
|
13960
|
-
function
|
|
13984
|
+
let t = e, n = x_(), { chat: r, icons: i } = n, { state: a, reset: o, clearMessages: s } = r, c = /* @__PURE__ */ Cn(!1), l = /* @__PURE__ */ Cn(!1), u = Qs(() => a.messages.length > 0), d = Qs(() => (t.debugLogs?.length ?? 0) > 0);
|
|
13985
|
+
function f(e) {
|
|
13961
13986
|
let t = Date.now() - e;
|
|
13962
13987
|
return t < 6e4 ? "刚刚" : t < 36e5 ? Math.floor(t / 6e4) + "分钟前" : new Date(e).toLocaleString();
|
|
13963
13988
|
}
|
|
13964
|
-
function
|
|
13965
|
-
|
|
13989
|
+
function p() {
|
|
13990
|
+
o(), t.onNewSession?.();
|
|
13966
13991
|
}
|
|
13967
|
-
function
|
|
13968
|
-
|
|
13992
|
+
function m(e) {
|
|
13993
|
+
o(), t.onOpenSession?.(e);
|
|
13969
13994
|
}
|
|
13970
|
-
return (t, r) => (Y(), X("div",
|
|
13971
|
-
Z("div",
|
|
13972
|
-
|
|
13973
|
-
Z("span",
|
|
13974
|
-
K(
|
|
13995
|
+
return (t, r) => (Y(), X("div", S_, [
|
|
13996
|
+
Z("div", C_, [
|
|
13997
|
+
Z("span", w_, U(K(i).header), 1),
|
|
13998
|
+
Z("span", T_, U(e.title), 1),
|
|
13999
|
+
K(a).loading ? (Y(), X("span", E_)) : Q("", !0)
|
|
13975
14000
|
]),
|
|
13976
14001
|
Z("div", {
|
|
13977
14002
|
class: "header-actions",
|
|
@@ -13982,8 +14007,8 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
13982
14007
|
class: "action-btn",
|
|
13983
14008
|
"data-test": "new-chat",
|
|
13984
14009
|
title: "新建会话",
|
|
13985
|
-
onClick:
|
|
13986
|
-
}, [...r[
|
|
14010
|
+
onClick: p
|
|
14011
|
+
}, [...r[10] ||= [Z("svg", {
|
|
13987
14012
|
width: "16",
|
|
13988
14013
|
height: "16",
|
|
13989
14014
|
viewBox: "0 0 24 24",
|
|
@@ -13993,13 +14018,13 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
13993
14018
|
}, [Z("path", { d: "M12 5v14M5 12h14" })], -1)]])) : Q("", !0),
|
|
13994
14019
|
e.sessions ? (Y(), X("button", {
|
|
13995
14020
|
key: 1,
|
|
13996
|
-
class: H(["action-btn", { active:
|
|
14021
|
+
class: H(["action-btn", { active: l.value }]),
|
|
13997
14022
|
"data-test": "toggle-history",
|
|
13998
14023
|
title: "历史记录",
|
|
13999
14024
|
onClick: r[0] ||= (e) => {
|
|
14000
|
-
|
|
14025
|
+
c.value = !1, l.value = !l.value;
|
|
14001
14026
|
}
|
|
14002
|
-
}, [...r[
|
|
14027
|
+
}, [...r[11] ||= [Z("svg", {
|
|
14003
14028
|
width: "16",
|
|
14004
14029
|
height: "16",
|
|
14005
14030
|
viewBox: "0 0 24 24",
|
|
@@ -14011,7 +14036,7 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14011
14036
|
Z("path", { d: "M3 3v5h5" }),
|
|
14012
14037
|
Z("path", { d: "M12 7v5l3 2" })
|
|
14013
14038
|
], -1)]], 2)) : Q("", !0),
|
|
14014
|
-
e.sessions &&
|
|
14039
|
+
e.sessions && l.value ? (Y(), X("div", {
|
|
14015
14040
|
key: 2,
|
|
14016
14041
|
class: "cs-history-menu",
|
|
14017
14042
|
onClick: r[1] ||= yl(() => {}, ["stop"])
|
|
@@ -14019,20 +14044,20 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14019
14044
|
key: t.sessionId,
|
|
14020
14045
|
class: H(["hist-item", { active: e.currentSessionId === t.sessionId }]),
|
|
14021
14046
|
"data-sid": t.sessionId,
|
|
14022
|
-
onClick: (e) =>
|
|
14023
|
-
}, [Z("div",
|
|
14047
|
+
onClick: (e) => m(t.sessionId)
|
|
14048
|
+
}, [Z("div", O_, U(t.title || "会话 " + t.sessionId.slice(-6)), 1), Z("div", k_, [Z("span", null, U(f(t.lastAccessed)), 1), e.currentSessionId === t.sessionId ? Q("", !0) : (Y(), X("button", {
|
|
14024
14049
|
key: 0,
|
|
14025
14050
|
class: "hist-del",
|
|
14026
14051
|
"data-test": "del-btn",
|
|
14027
14052
|
onClick: yl((n) => e.onRemoveSession?.(t.sessionId), ["stop"])
|
|
14028
|
-
}, "✕", 8,
|
|
14053
|
+
}, "✕", 8, A_))])], 10, D_))), 128))])) : Q("", !0),
|
|
14029
14054
|
Z("button", {
|
|
14030
|
-
class: H(["action-btn more-btn", { active:
|
|
14055
|
+
class: H(["action-btn more-btn", { active: c.value }]),
|
|
14031
14056
|
title: "更多",
|
|
14032
14057
|
onClick: r[2] ||= (e) => {
|
|
14033
|
-
|
|
14058
|
+
l.value = !1, c.value = !c.value;
|
|
14034
14059
|
}
|
|
14035
|
-
}, [r[
|
|
14060
|
+
}, [r[12] ||= Z("svg", {
|
|
14036
14061
|
width: "16",
|
|
14037
14062
|
height: "16",
|
|
14038
14063
|
viewBox: "0 0 24 24",
|
|
@@ -14053,8 +14078,8 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14053
14078
|
cy: "19",
|
|
14054
14079
|
r: "1.6"
|
|
14055
14080
|
})
|
|
14056
|
-
], -1),
|
|
14057
|
-
|
|
14081
|
+
], -1), d.value ? (Y(), X("span", j_, U(e.debugLogs?.length), 1)) : Q("", !0)], 2),
|
|
14082
|
+
c.value ? (Y(), X("div", {
|
|
14058
14083
|
key: 3,
|
|
14059
14084
|
class: "more-menu",
|
|
14060
14085
|
onClick: r[6] ||= yl(() => {}, ["stop"])
|
|
@@ -14063,10 +14088,10 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14063
14088
|
class: "more-item",
|
|
14064
14089
|
title: "日志 / 执行流程 / Agent 信息",
|
|
14065
14090
|
onClick: r[3] ||= (e) => {
|
|
14066
|
-
K(n).openDebug(),
|
|
14091
|
+
K(n).openDebug(), c.value = !1;
|
|
14067
14092
|
}
|
|
14068
14093
|
}, [
|
|
14069
|
-
r[
|
|
14094
|
+
r[13] ||= Z("svg", {
|
|
14070
14095
|
width: "15",
|
|
14071
14096
|
height: "15",
|
|
14072
14097
|
viewBox: "0 0 24 24",
|
|
@@ -14078,17 +14103,17 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14078
14103
|
Z("path", { d: "M9 2h6" }),
|
|
14079
14104
|
Z("path", { d: "M9 18h6" })
|
|
14080
14105
|
], -1),
|
|
14081
|
-
r[
|
|
14082
|
-
|
|
14106
|
+
r[14] ||= Z("span", null, "调试 / 日志", -1),
|
|
14107
|
+
d.value ? (Y(), X("span", M_, U(e.debugLogs?.length), 1)) : Q("", !0)
|
|
14083
14108
|
]),
|
|
14084
14109
|
e.skillAvailable ? (Y(), X("button", {
|
|
14085
14110
|
key: 0,
|
|
14086
14111
|
class: "more-item",
|
|
14087
14112
|
title: "创建 / 管理自定义 Skill",
|
|
14088
14113
|
onClick: r[4] ||= (e) => {
|
|
14089
|
-
K(n).openSkill(),
|
|
14114
|
+
K(n).openSkill(), c.value = !1;
|
|
14090
14115
|
}
|
|
14091
|
-
}, [...r[
|
|
14116
|
+
}, [...r[15] ||= [Z("svg", {
|
|
14092
14117
|
width: "15",
|
|
14093
14118
|
height: "15",
|
|
14094
14119
|
viewBox: "0 0 24 24",
|
|
@@ -14099,25 +14124,25 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14099
14124
|
Z("button", {
|
|
14100
14125
|
class: "more-item",
|
|
14101
14126
|
title: "清空对话",
|
|
14102
|
-
disabled: !
|
|
14127
|
+
disabled: !u.value,
|
|
14103
14128
|
onClick: r[5] ||= (e) => {
|
|
14104
|
-
K(
|
|
14129
|
+
K(s)(), c.value = !1;
|
|
14105
14130
|
}
|
|
14106
|
-
}, [...r[
|
|
14131
|
+
}, [...r[16] ||= [Z("svg", {
|
|
14107
14132
|
width: "15",
|
|
14108
14133
|
height: "15",
|
|
14109
14134
|
viewBox: "0 0 24 24",
|
|
14110
14135
|
fill: "none",
|
|
14111
14136
|
stroke: "currentColor",
|
|
14112
14137
|
"stroke-width": "2"
|
|
14113
|
-
}, [Z("polyline", { points: "3 6 5 6 21 6" }), Z("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })], -1), Z("span", null, "清空对话", -1)]], 8,
|
|
14138
|
+
}, [Z("polyline", { points: "3 6 5 6 21 6" }), Z("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })], -1), Z("span", null, "清空对话", -1)]], 8, N_)
|
|
14114
14139
|
])) : Q("", !0),
|
|
14115
14140
|
e.drawer ? (Y(), X("button", {
|
|
14116
14141
|
key: 4,
|
|
14117
14142
|
class: "action-btn",
|
|
14118
14143
|
title: "关闭",
|
|
14119
14144
|
onClick: r[7] ||= (e) => t.$emit("close")
|
|
14120
|
-
}, [...r[
|
|
14145
|
+
}, [...r[17] ||= [Z("svg", {
|
|
14121
14146
|
width: "16",
|
|
14122
14147
|
height: "16",
|
|
14123
14148
|
viewBox: "0 0 24 24",
|
|
@@ -14126,35 +14151,36 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14126
14151
|
"stroke-width": "2"
|
|
14127
14152
|
}, [Z("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])) : Q("", !0)
|
|
14128
14153
|
]),
|
|
14129
|
-
|
|
14154
|
+
c.value || l.value ? (Y(), X("div", {
|
|
14130
14155
|
key: 0,
|
|
14131
14156
|
class: "more-overlay",
|
|
14132
14157
|
onClick: r[9] ||= (e) => {
|
|
14133
|
-
|
|
14158
|
+
c.value = !1, l.value = !1;
|
|
14134
14159
|
}
|
|
14135
14160
|
})) : Q("", !0)
|
|
14136
14161
|
]));
|
|
14137
14162
|
}
|
|
14138
|
-
}),
|
|
14163
|
+
}), F_ = (e, t) => {
|
|
14139
14164
|
let n = e.__vccOpts || e;
|
|
14140
14165
|
for (let [e, r] of t) n[e] = r;
|
|
14141
14166
|
return n;
|
|
14142
|
-
},
|
|
14167
|
+
}, I_ = /*#__PURE__*/ F_(P_, [["__scopeId", "data-v-c039d238"]]), L_ = {
|
|
14143
14168
|
key: 0,
|
|
14144
14169
|
class: "focus-bar"
|
|
14145
|
-
},
|
|
14170
|
+
}, R_ = { class: "focus-bar-icon" }, z_ = { class: "focus-bar-text" }, B_ = {
|
|
14146
14171
|
key: 0,
|
|
14147
14172
|
class: "focus-bar-label"
|
|
14148
|
-
},
|
|
14173
|
+
}, V_ = { class: "focus-bar-path" }, H_ = {
|
|
14149
14174
|
key: 0,
|
|
14150
14175
|
class: "focus-edit-row"
|
|
14151
|
-
},
|
|
14176
|
+
}, U_ = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
14152
14177
|
__name: "FocusBar",
|
|
14153
14178
|
props: {
|
|
14154
|
-
getFocus: {
|
|
14155
|
-
onSetFocus: {
|
|
14156
|
-
onClearFocus: {
|
|
14157
|
-
infoTick: {}
|
|
14179
|
+
getFocus: {},
|
|
14180
|
+
onSetFocus: {},
|
|
14181
|
+
onClearFocus: {},
|
|
14182
|
+
infoTick: {},
|
|
14183
|
+
icons: { default: () => ({ ...__ }) }
|
|
14158
14184
|
},
|
|
14159
14185
|
setup(e) {
|
|
14160
14186
|
let t = e, n = Qs(() => (t.infoTick?.value, t.getFocus?.())), r = /* @__PURE__ */ Cn(!1), i = /* @__PURE__ */ Cn(""), a = /* @__PURE__ */ Cn("");
|
|
@@ -14170,13 +14196,13 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14170
14196
|
function s() {
|
|
14171
14197
|
t.onClearFocus?.(), r.value = !1;
|
|
14172
14198
|
}
|
|
14173
|
-
return (
|
|
14174
|
-
|
|
14175
|
-
Z("span",
|
|
14199
|
+
return (t, c) => n.value ? (Y(), X("div", L_, [
|
|
14200
|
+
Z("span", R_, U(e.icons.focus), 1),
|
|
14201
|
+
Z("span", z_, [n.value.label ? (Y(), X("span", B_, U(n.value.label), 1)) : Q("", !0), Z("code", V_, U(n.value.path), 1)]),
|
|
14176
14202
|
Z("button", {
|
|
14177
14203
|
class: "focus-bar-btn",
|
|
14178
14204
|
title: "切换聚焦路径",
|
|
14179
|
-
onClick:
|
|
14205
|
+
onClick: c[0] ||= (e) => r.value = !r.value
|
|
14180
14206
|
}, "▾"),
|
|
14181
14207
|
Z("button", {
|
|
14182
14208
|
class: "focus-bar-btn",
|
|
@@ -14184,16 +14210,16 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14184
14210
|
"data-test": "focus-clear",
|
|
14185
14211
|
onClick: s
|
|
14186
14212
|
}, "✕"),
|
|
14187
|
-
r.value ? (Y(), X("div",
|
|
14213
|
+
r.value ? (Y(), X("div", H_, [
|
|
14188
14214
|
Xr(Z("input", {
|
|
14189
|
-
"onUpdate:modelValue":
|
|
14215
|
+
"onUpdate:modelValue": c[1] ||= (e) => i.value = e,
|
|
14190
14216
|
class: "focus-edit-input",
|
|
14191
14217
|
placeholder: "jsonPath,如 components.3",
|
|
14192
14218
|
"data-test": "focus-path-input",
|
|
14193
14219
|
onKeyup: xl(o, ["enter"])
|
|
14194
14220
|
}, null, 544), [[gl, i.value]]),
|
|
14195
14221
|
Xr(Z("input", {
|
|
14196
|
-
"onUpdate:modelValue":
|
|
14222
|
+
"onUpdate:modelValue": c[2] ||= (e) => a.value = e,
|
|
14197
14223
|
class: "focus-edit-input focus-edit-label",
|
|
14198
14224
|
placeholder: "标签(可选)",
|
|
14199
14225
|
onKeyup: xl(o, ["enter"])
|
|
@@ -14206,10 +14232,10 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14206
14232
|
])) : Q("", !0)
|
|
14207
14233
|
])) : Q("", !0);
|
|
14208
14234
|
}
|
|
14209
|
-
}), [["__scopeId", "data-v-
|
|
14235
|
+
}), [["__scopeId", "data-v-2f9c89df"]]), W_ = { class: "reasoning-toggle" }, G_ = {
|
|
14210
14236
|
key: 0,
|
|
14211
14237
|
class: "reasoning-body"
|
|
14212
|
-
},
|
|
14238
|
+
}, K_ = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
14213
14239
|
__name: "MessageReasoning",
|
|
14214
14240
|
props: {
|
|
14215
14241
|
text: {},
|
|
@@ -14226,13 +14252,13 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14226
14252
|
}, [
|
|
14227
14253
|
n[1] ||= Z("span", { class: "status-dot ok" }, null, -1),
|
|
14228
14254
|
n[2] ||= Z("span", { class: "reasoning-title" }, "思考过程", -1),
|
|
14229
|
-
Z("span",
|
|
14230
|
-
]), e.expanded ? (Y(), X("div",
|
|
14255
|
+
Z("span", W_, U(e.expanded ? "收起" : "展开"), 1)
|
|
14256
|
+
]), e.expanded ? (Y(), X("div", G_, U(e.text), 1)) : Q("", !0)], 2)) : Q("", !0);
|
|
14231
14257
|
}
|
|
14232
|
-
}), [["__scopeId", "data-v-dbe90e42"]]),
|
|
14258
|
+
}), [["__scopeId", "data-v-dbe90e42"]]), q_ = ["open"], J_ = { class: "sub-reason-head" }, Y_ = {
|
|
14233
14259
|
key: 0,
|
|
14234
14260
|
class: "sub-reason-trunc"
|
|
14235
|
-
},
|
|
14261
|
+
}, X_ = ["title"], Z_ = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
14236
14262
|
__name: "SubReasonDetails",
|
|
14237
14263
|
props: {
|
|
14238
14264
|
subReason: {},
|
|
@@ -14259,47 +14285,65 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14259
14285
|
class: "step-sub-reason",
|
|
14260
14286
|
open: r.value,
|
|
14261
14287
|
onToggle: i[0] ||= (e) => r.value = e.target.open
|
|
14262
|
-
}, [Z("summary",
|
|
14288
|
+
}, [Z("summary", J_, [
|
|
14263
14289
|
Z("span", { class: H(["status-dot sm", e.status === "running" ? "running" : "ok"]) }, null, 2),
|
|
14264
14290
|
Z("span", { class: H(["sub-reason-label", { pulsing: e.status === "running" }]) }, U(e.status === "running" ? `思考中… ${a.value}字` : "思考过程"), 3),
|
|
14265
|
-
o.value ? (Y(), X("span",
|
|
14291
|
+
o.value ? (Y(), X("span", Y_, "(仅显最近 " + U(e.subReason.length) + " 字)", 1)) : Q("", !0),
|
|
14266
14292
|
Z("button", {
|
|
14267
14293
|
type: "button",
|
|
14268
14294
|
class: H(["sub-reason-copy", { copied: s.value }]),
|
|
14269
14295
|
title: o.value ? "复制完整思考(渲染已截尾,复制取全量)" : "复制完整思考内容",
|
|
14270
14296
|
onClick: yl(c, ["stop", "prevent"])
|
|
14271
|
-
}, U(s.value ? "已复制" : "复制"), 11,
|
|
14297
|
+
}, U(s.value ? "已复制" : "复制"), 11, X_)
|
|
14272
14298
|
]), Z("div", {
|
|
14273
14299
|
ref_key: "bodyRef",
|
|
14274
14300
|
ref: n,
|
|
14275
14301
|
class: "sub-reason-body"
|
|
14276
|
-
}, U(o.value ? "…(前面已截断)\n" : "") + U(e.subReason), 513)], 40,
|
|
14302
|
+
}, U(o.value ? "…(前面已截断)\n" : "") + U(e.subReason), 513)], 40, q_));
|
|
14277
14303
|
}
|
|
14278
|
-
}), [["__scopeId", "data-v-f415f3c9"]]),
|
|
14304
|
+
}), [["__scopeId", "data-v-f415f3c9"]]), Q_ = {
|
|
14279
14305
|
key: 0,
|
|
14280
14306
|
class: "steps-block"
|
|
14281
|
-
},
|
|
14307
|
+
}, $_ = { class: "step-head" }, ev = { class: "step-name" }, tv = {
|
|
14282
14308
|
key: 0,
|
|
14283
14309
|
class: "subagent-badge",
|
|
14284
14310
|
title: "子 agent 委派(独立上下文,只回结论)"
|
|
14285
|
-
},
|
|
14311
|
+
}, nv = {
|
|
14286
14312
|
key: 1,
|
|
14287
14313
|
class: "step-count"
|
|
14288
|
-
},
|
|
14314
|
+
}, rv = {
|
|
14289
14315
|
key: 2,
|
|
14290
14316
|
class: "step-duration"
|
|
14291
|
-
},
|
|
14317
|
+
}, iv = ["onClick"], av = {
|
|
14318
|
+
key: 0,
|
|
14319
|
+
class: "step-detail"
|
|
14320
|
+
}, ov = {
|
|
14321
|
+
key: 0,
|
|
14322
|
+
class: "step-detail-call-label"
|
|
14323
|
+
}, sv = {
|
|
14292
14324
|
key: 1,
|
|
14325
|
+
class: "step-detail-section"
|
|
14326
|
+
}, cv = { class: "step-detail-head" }, lv = ["onClick"], uv = { class: "step-detail-pre" }, dv = {
|
|
14327
|
+
key: 2,
|
|
14328
|
+
class: "step-detail-section"
|
|
14329
|
+
}, fv = { class: "step-detail-head" }, pv = ["onClick"], mv = {
|
|
14330
|
+
key: 3,
|
|
14331
|
+
class: "step-detail-empty"
|
|
14332
|
+
}, hv = {
|
|
14333
|
+
key: 2,
|
|
14293
14334
|
class: "step-children"
|
|
14294
|
-
},
|
|
14335
|
+
}, gv = { class: "step-children-label" }, _v = { class: "step-name" }, vv = {
|
|
14295
14336
|
key: 0,
|
|
14296
14337
|
class: "step-count"
|
|
14297
|
-
},
|
|
14338
|
+
}, yv = {
|
|
14298
14339
|
key: 1,
|
|
14299
14340
|
class: "step-status running"
|
|
14300
|
-
},
|
|
14341
|
+
}, bv = 2e3, xv = 4e3, Sv = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
14301
14342
|
__name: "MessageSteps",
|
|
14302
|
-
props: {
|
|
14343
|
+
props: {
|
|
14344
|
+
steps: {},
|
|
14345
|
+
icons: { default: () => ({ ...__ }) }
|
|
14346
|
+
},
|
|
14303
14347
|
setup(e) {
|
|
14304
14348
|
let t = e;
|
|
14305
14349
|
function n(e) {
|
|
@@ -14309,12 +14353,13 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14309
14353
|
let t = [];
|
|
14310
14354
|
for (let n of e) {
|
|
14311
14355
|
let e = t.length ? t[t.length - 1] : null;
|
|
14312
|
-
e && e.name === n.name ? (e.count++, n.status === "running" && (e.hasRunning = !0), n.status === "error" && (e.hasError = !0), n.durationMs && (e.totalMs += n.durationMs), n.children?.length && e.children.push(...n.children), n.subReason && (e.subReason = (e.subReason || "") + n.subReason), n.subReasonFull && (e.subReasonFull = (e.subReasonFull || "") + n.subReasonFull)) : t.push({
|
|
14356
|
+
e && e.name === n.name ? (e.count++, n.status === "running" && (e.hasRunning = !0), n.status === "error" && (e.hasError = !0), n.durationMs && (e.totalMs += n.durationMs), n.children?.length && e.children.push(...n.children), n.subReason && (e.subReason = (e.subReason || "") + n.subReason), n.subReasonFull && (e.subReasonFull = (e.subReasonFull || "") + n.subReasonFull), e.calls.push(n)) : t.push({
|
|
14313
14357
|
name: n.name,
|
|
14314
14358
|
count: 1,
|
|
14315
14359
|
hasRunning: n.status === "running",
|
|
14316
14360
|
hasError: n.status === "error",
|
|
14317
14361
|
children: n.children?.length ? [...n.children] : [],
|
|
14362
|
+
calls: [n],
|
|
14318
14363
|
totalMs: n.durationMs ?? 0,
|
|
14319
14364
|
subReason: n.subReason,
|
|
14320
14365
|
subReasonFull: n.subReasonFull
|
|
@@ -14325,6 +14370,7 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14325
14370
|
count: e.count,
|
|
14326
14371
|
status: e.hasError ? "error" : e.hasRunning ? "running" : "done",
|
|
14327
14372
|
children: e.children,
|
|
14373
|
+
calls: e.calls,
|
|
14328
14374
|
durationMs: e.totalMs || void 0,
|
|
14329
14375
|
subReason: e.subReason,
|
|
14330
14376
|
subReasonFull: e.subReasonFull
|
|
@@ -14341,43 +14387,122 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14341
14387
|
}
|
|
14342
14388
|
return `${e}ms`;
|
|
14343
14389
|
}
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14390
|
+
let s = /* @__PURE__ */ ln(/* @__PURE__ */ new Set()), c = 0, l = `s${++c}`, u = {
|
|
14391
|
+
has: (e) => s.has(`${l}:${e}`),
|
|
14392
|
+
toggle: (e) => {
|
|
14393
|
+
let t = `${l}:${e}`;
|
|
14394
|
+
s.has(t) ? s.delete(t) : (s.clear(), s.add(t));
|
|
14395
|
+
}
|
|
14396
|
+
};
|
|
14397
|
+
function d(e) {
|
|
14398
|
+
u.toggle(e);
|
|
14399
|
+
}
|
|
14400
|
+
function f(e) {
|
|
14401
|
+
return !!e?.some((e) => e.args != null || e.result != null);
|
|
14402
|
+
}
|
|
14403
|
+
function p(e) {
|
|
14404
|
+
if (e == null) return {
|
|
14405
|
+
text: "",
|
|
14406
|
+
truncated: !1
|
|
14407
|
+
};
|
|
14408
|
+
let t;
|
|
14409
|
+
try {
|
|
14410
|
+
t = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
14411
|
+
} catch {
|
|
14412
|
+
t = String(e);
|
|
14413
|
+
}
|
|
14414
|
+
return t.length > bv ? {
|
|
14415
|
+
text: t.slice(0, bv) + "\n…(展示截断,复制可得全量)",
|
|
14416
|
+
truncated: !0
|
|
14417
|
+
} : {
|
|
14418
|
+
text: t,
|
|
14419
|
+
truncated: !1
|
|
14420
|
+
};
|
|
14421
|
+
}
|
|
14422
|
+
function m(e) {
|
|
14423
|
+
return e == null || e === "" ? {
|
|
14424
|
+
text: "",
|
|
14425
|
+
truncated: !1
|
|
14426
|
+
} : e.length > xv ? {
|
|
14427
|
+
text: e.slice(0, xv) + "\n…(展示截断,复制可得全量)",
|
|
14428
|
+
truncated: !0
|
|
14429
|
+
} : {
|
|
14430
|
+
text: e,
|
|
14431
|
+
truncated: !1
|
|
14432
|
+
};
|
|
14433
|
+
}
|
|
14434
|
+
function h(e, t, n) {
|
|
14435
|
+
if (t && n != null) {
|
|
14436
|
+
let e;
|
|
14437
|
+
try {
|
|
14438
|
+
e = typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
14439
|
+
} catch {
|
|
14440
|
+
e = String(n);
|
|
14441
|
+
}
|
|
14442
|
+
g_(e);
|
|
14443
|
+
return;
|
|
14444
|
+
}
|
|
14445
|
+
g_(e);
|
|
14446
|
+
}
|
|
14447
|
+
return (t, s) => e.steps.length ? (Y(), X("div", Q_, [(Y(!0), X(J, null, sa(i.value, (t, i) => (Y(), X("div", {
|
|
14448
|
+
key: i,
|
|
14449
|
+
class: H(["step-item", t.status])
|
|
14347
14450
|
}, [
|
|
14348
|
-
Z("div",
|
|
14349
|
-
Z("span", { class: H(["status-dot",
|
|
14350
|
-
Z("span",
|
|
14351
|
-
a(
|
|
14352
|
-
|
|
14353
|
-
Z("span", { class: H(["step-status",
|
|
14354
|
-
|
|
14451
|
+
Z("div", $_, [
|
|
14452
|
+
Z("span", { class: H(["status-dot", t.status]) }, null, 2),
|
|
14453
|
+
Z("span", ev, U(t.name), 1),
|
|
14454
|
+
a(t.name) ? (Y(), X("span", tv, U(e.icons.subagent) + " 子", 1)) : Q("", !0),
|
|
14455
|
+
t.count > 1 ? (Y(), X("span", nv, "×" + U(t.count), 1)) : Q("", !0),
|
|
14456
|
+
Z("span", { class: H(["step-status", t.status]) }, U(n(t.status)), 3),
|
|
14457
|
+
t.durationMs != null && t.status !== "running" ? (Y(), X("span", rv, U(o(t.durationMs)), 1)) : Q("", !0),
|
|
14458
|
+
f(t.calls) ? (Y(), X("button", {
|
|
14459
|
+
key: 3,
|
|
14460
|
+
type: "button",
|
|
14461
|
+
class: H(["step-detail-toggle", { open: u.has(i) }]),
|
|
14462
|
+
onClick: (e) => d(i)
|
|
14463
|
+
}, U(u.has(i) ? "收起" : "展开"), 11, iv)) : Q("", !0)
|
|
14355
14464
|
]),
|
|
14356
|
-
|
|
14357
|
-
key:
|
|
14358
|
-
"
|
|
14359
|
-
|
|
14360
|
-
|
|
14465
|
+
u.has(i) && t.calls?.length ? (Y(), X("div", av, [(Y(!0), X(J, null, sa(t.calls, (e, n) => (Y(), X("div", {
|
|
14466
|
+
key: n,
|
|
14467
|
+
class: "step-detail-call"
|
|
14468
|
+
}, [
|
|
14469
|
+
t.count > 1 ? (Y(), X("div", ov, "第 " + U(n + 1) + " 次", 1)) : Q("", !0),
|
|
14470
|
+
p(e.args).text ? (Y(), X("div", sv, [Z("div", cv, [s[0] ||= _s("入参", -1), Z("button", {
|
|
14471
|
+
type: "button",
|
|
14472
|
+
class: "step-detail-copy",
|
|
14473
|
+
onClick: (t) => h(p(e.args).text, p(e.args).truncated, e.args)
|
|
14474
|
+
}, "复制", 8, lv)]), Z("pre", uv, U(p(e.args).text), 1)])) : Q("", !0),
|
|
14475
|
+
e.status !== "running" && m(e.result).text ? (Y(), X("div", dv, [Z("div", fv, [s[1] ||= _s("返回值", -1), Z("button", {
|
|
14476
|
+
type: "button",
|
|
14477
|
+
class: "step-detail-copy",
|
|
14478
|
+
onClick: (t) => h(m(e.result).text, m(e.result).truncated, e.result)
|
|
14479
|
+
}, "复制", 8, pv)]), Z("pre", { class: H(["step-detail-pre", { err: e.status === "error" }]) }, U(m(e.result).text), 3)])) : e.status !== "running" && !m(e.result).text ? (Y(), X("div", mv, "(无返回值)")) : Q("", !0)
|
|
14480
|
+
]))), 128))])) : Q("", !0),
|
|
14481
|
+
t.subReason ? (Y(), as(Z_, {
|
|
14482
|
+
key: 1,
|
|
14483
|
+
"sub-reason": t.subReason,
|
|
14484
|
+
"sub-reason-full": t.subReasonFull,
|
|
14485
|
+
status: t.status
|
|
14361
14486
|
}, null, 8, [
|
|
14362
14487
|
"sub-reason",
|
|
14363
14488
|
"sub-reason-full",
|
|
14364
14489
|
"status"
|
|
14365
14490
|
])) : Q("", !0),
|
|
14366
|
-
|
|
14491
|
+
t.children && t.children.length ? (Y(), X("div", hv, [Z("div", gv, U(e.icons.subagentProgress) + " 子 agent 进度", 1), (Y(!0), X(J, null, sa(r(t.children), (e, t) => (Y(), X("div", {
|
|
14367
14492
|
key: t,
|
|
14368
14493
|
class: H(["step-child", e.status])
|
|
14369
14494
|
}, [
|
|
14370
14495
|
Z("span", { class: H(["status-dot sm", e.status]) }, null, 2),
|
|
14371
|
-
Z("span",
|
|
14372
|
-
e.count > 1 ? (Y(), X("span",
|
|
14373
|
-
e.status === "running" ? (Y(), X("span",
|
|
14496
|
+
Z("span", _v, U(e.name), 1),
|
|
14497
|
+
e.count > 1 ? (Y(), X("span", vv, "×" + U(e.count), 1)) : Q("", !0),
|
|
14498
|
+
e.status === "running" ? (Y(), X("span", yv, "…")) : Q("", !0)
|
|
14374
14499
|
], 2))), 128))])) : Q("", !0)
|
|
14375
14500
|
], 2))), 128))])) : Q("", !0);
|
|
14376
14501
|
}
|
|
14377
|
-
}), [["__scopeId", "data-v-
|
|
14502
|
+
}), [["__scopeId", "data-v-a60af5d9"]]);
|
|
14378
14503
|
//#endregion
|
|
14379
14504
|
//#region node_modules/marked/lib/marked.esm.js
|
|
14380
|
-
function
|
|
14505
|
+
function Cv() {
|
|
14381
14506
|
return {
|
|
14382
14507
|
async: !1,
|
|
14383
14508
|
breaks: !1,
|
|
@@ -14391,35 +14516,35 @@ function av() {
|
|
|
14391
14516
|
walkTokens: null
|
|
14392
14517
|
};
|
|
14393
14518
|
}
|
|
14394
|
-
var
|
|
14395
|
-
function
|
|
14396
|
-
|
|
14519
|
+
var wv = Cv();
|
|
14520
|
+
function Tv(e) {
|
|
14521
|
+
wv = e;
|
|
14397
14522
|
}
|
|
14398
|
-
var
|
|
14399
|
-
function
|
|
14523
|
+
var Ev = { exec: () => null };
|
|
14524
|
+
function Dv(e) {
|
|
14400
14525
|
let t = [];
|
|
14401
14526
|
return (n) => {
|
|
14402
14527
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
14403
14528
|
return i || (i = e(r), t[r] = i), i;
|
|
14404
14529
|
};
|
|
14405
14530
|
}
|
|
14406
|
-
function
|
|
14531
|
+
function Ov(e, t = "") {
|
|
14407
14532
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
14408
14533
|
replace: (e, t) => {
|
|
14409
14534
|
let i = typeof t == "string" ? t : t.source;
|
|
14410
|
-
return i = i.replace(
|
|
14535
|
+
return i = i.replace(Av.caret, "$1"), n = n.replace(e, i), r;
|
|
14411
14536
|
},
|
|
14412
14537
|
getRegex: () => new RegExp(n, t)
|
|
14413
14538
|
};
|
|
14414
14539
|
return r;
|
|
14415
14540
|
}
|
|
14416
|
-
var
|
|
14541
|
+
var kv = ((e = "") => {
|
|
14417
14542
|
try {
|
|
14418
14543
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
14419
14544
|
} catch {
|
|
14420
14545
|
return !1;
|
|
14421
14546
|
}
|
|
14422
|
-
})(),
|
|
14547
|
+
})(), Av = {
|
|
14423
14548
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
14424
14549
|
outputLinkReplace: /\\([\[\]])/g,
|
|
14425
14550
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -14470,121 +14595,121 @@ var dv = ((e = "") => {
|
|
|
14470
14595
|
notSpaceStart: /^\S*/,
|
|
14471
14596
|
endingNewline: /\n$/,
|
|
14472
14597
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
14473
|
-
nextBulletRegex:
|
|
14474
|
-
hrRegex:
|
|
14475
|
-
fencesBeginRegex:
|
|
14476
|
-
headingBeginRegex:
|
|
14477
|
-
htmlBeginRegex:
|
|
14478
|
-
blockquoteBeginRegex:
|
|
14479
|
-
},
|
|
14480
|
-
blockquote:
|
|
14481
|
-
code:
|
|
14482
|
-
def:
|
|
14483
|
-
fences:
|
|
14484
|
-
heading:
|
|
14485
|
-
hr:
|
|
14486
|
-
html:
|
|
14487
|
-
lheading:
|
|
14488
|
-
list:
|
|
14489
|
-
newline:
|
|
14490
|
-
paragraph:
|
|
14491
|
-
table:
|
|
14492
|
-
text:
|
|
14493
|
-
},
|
|
14494
|
-
...
|
|
14495
|
-
lheading:
|
|
14496
|
-
table:
|
|
14497
|
-
paragraph:
|
|
14498
|
-
},
|
|
14499
|
-
...
|
|
14500
|
-
html:
|
|
14598
|
+
nextBulletRegex: Dv((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
14599
|
+
hrRegex: Dv((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
14600
|
+
fencesBeginRegex: Dv((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
14601
|
+
headingBeginRegex: Dv((e) => RegExp(`^ {0,${e}}#`)),
|
|
14602
|
+
htmlBeginRegex: Dv((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
14603
|
+
blockquoteBeginRegex: Dv((e) => RegExp(`^ {0,${e}}>`))
|
|
14604
|
+
}, jv = /^(?:[ \t]*(?:\n|$))+/, Mv = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Nv = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Pv = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Fv = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Iv = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Lv = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Rv = Ov(Lv).replace(/bull/g, Iv).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(), zv = Ov(Lv).replace(/bull/g, Iv).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(), Bv = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Vv = /^[^\n]+/, Hv = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Uv = Ov(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Hv).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wv = Ov(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Iv).getRegex(), Gv = "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", Kv = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, qv = Ov("^ {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", Kv).replace("tag", Gv).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Jv = (e) => Ov(Bv).replace("hr", Pv).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", Gv).getRegex(), Yv = Jv(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Xv = Jv(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), Zv = {
|
|
14605
|
+
blockquote: Ov(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Xv).getRegex(),
|
|
14606
|
+
code: Mv,
|
|
14607
|
+
def: Uv,
|
|
14608
|
+
fences: Nv,
|
|
14609
|
+
heading: Fv,
|
|
14610
|
+
hr: Pv,
|
|
14611
|
+
html: qv,
|
|
14612
|
+
lheading: Rv,
|
|
14613
|
+
list: Wv,
|
|
14614
|
+
newline: jv,
|
|
14615
|
+
paragraph: Yv,
|
|
14616
|
+
table: Ev,
|
|
14617
|
+
text: Vv
|
|
14618
|
+
}, Qv = Ov("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Pv).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", Gv).getRegex(), $v = {
|
|
14619
|
+
...Zv,
|
|
14620
|
+
lheading: zv,
|
|
14621
|
+
table: Qv,
|
|
14622
|
+
paragraph: Ov(Bv).replace("hr", Pv).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Qv).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", Gv).getRegex()
|
|
14623
|
+
}, ey = {
|
|
14624
|
+
...Zv,
|
|
14625
|
+
html: Ov("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Kv).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(),
|
|
14501
14626
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
14502
14627
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
14503
|
-
fences:
|
|
14628
|
+
fences: Ev,
|
|
14504
14629
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
14505
|
-
paragraph:
|
|
14506
|
-
},
|
|
14507
|
-
_backpedal:
|
|
14508
|
-
anyPunctuation:
|
|
14509
|
-
autolink:
|
|
14510
|
-
blockSkip:
|
|
14511
|
-
br:
|
|
14512
|
-
code:
|
|
14513
|
-
del:
|
|
14514
|
-
delLDelim:
|
|
14515
|
-
delRDelim:
|
|
14516
|
-
emStrongLDelim:
|
|
14517
|
-
emStrongRDelimAst:
|
|
14518
|
-
emStrongRDelimUnd:
|
|
14519
|
-
escape:
|
|
14520
|
-
link:
|
|
14521
|
-
nolink:
|
|
14522
|
-
punctuation:
|
|
14523
|
-
reflink:
|
|
14524
|
-
reflinkSearch:
|
|
14525
|
-
tag:
|
|
14526
|
-
text:
|
|
14527
|
-
url:
|
|
14528
|
-
},
|
|
14529
|
-
...
|
|
14530
|
-
link:
|
|
14531
|
-
reflink:
|
|
14532
|
-
},
|
|
14533
|
-
...
|
|
14534
|
-
emStrongRDelimAst:
|
|
14535
|
-
emStrongLDelim:
|
|
14536
|
-
delLDelim:
|
|
14537
|
-
delRDelim:
|
|
14538
|
-
url:
|
|
14630
|
+
paragraph: Ov(Bv).replace("hr", Pv).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Rv).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
14631
|
+
}, ty = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ny = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ry = /^( {2,}|\\)\n(?!\s*$)/, iy = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ay = /[\p{P}\p{S}]/u, oy = /[\s\p{P}\p{S}]/u, sy = /[^\s\p{P}\p{S}]/u, cy = Ov(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, oy).getRegex(), ly = /(?!~)[\p{P}\p{S}]/u, uy = /(?!~)[\s\p{P}\p{S}]/u, dy = /(?:[^\s\p{P}\p{S}]|~)/u, fy = Ov(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", kv ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), py = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, my = Ov(py, "u").replace(/punct/g, ay).getRegex(), hy = Ov(py, "u").replace(/punct/g, ly).getRegex(), gy = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _y = Ov(gy, "gu").replace(/notPunctSpace/g, sy).replace(/punctSpace/g, oy).replace(/punct/g, ay).getRegex(), vy = Ov(gy, "gu").replace(/notPunctSpace/g, dy).replace(/punctSpace/g, uy).replace(/punct/g, ly).getRegex(), yy = Ov("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, sy).replace(/punctSpace/g, oy).replace(/punct/g, ay).getRegex(), by = Ov(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ay).getRegex(), xy = Ov("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, sy).replace(/punctSpace/g, oy).replace(/punct/g, ay).getRegex(), Sy = Ov(/\\(punct)/, "gu").replace(/punct/g, ay).getRegex(), Cy = Ov(/^<(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(), wy = Ov(Kv).replace("(?:-->|$)", "-->").getRegex(), Ty = Ov("^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", wy).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ey = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Dy = Ov(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ey).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Oy = Ov(/^!?\[(label)\]\[(ref)\]/).replace("label", Ey).replace("ref", Hv).getRegex(), ky = Ov(/^!?\[(ref)\](?:\[\])?/).replace("ref", Hv).getRegex(), Ay = Ov("reflink|nolink(?!\\()", "g").replace("reflink", Oy).replace("nolink", ky).getRegex(), jy = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, My = {
|
|
14632
|
+
_backpedal: Ev,
|
|
14633
|
+
anyPunctuation: Sy,
|
|
14634
|
+
autolink: Cy,
|
|
14635
|
+
blockSkip: fy,
|
|
14636
|
+
br: ry,
|
|
14637
|
+
code: ny,
|
|
14638
|
+
del: Ev,
|
|
14639
|
+
delLDelim: Ev,
|
|
14640
|
+
delRDelim: Ev,
|
|
14641
|
+
emStrongLDelim: my,
|
|
14642
|
+
emStrongRDelimAst: _y,
|
|
14643
|
+
emStrongRDelimUnd: yy,
|
|
14644
|
+
escape: ty,
|
|
14645
|
+
link: Dy,
|
|
14646
|
+
nolink: ky,
|
|
14647
|
+
punctuation: cy,
|
|
14648
|
+
reflink: Oy,
|
|
14649
|
+
reflinkSearch: Ay,
|
|
14650
|
+
tag: Ty,
|
|
14651
|
+
text: iy,
|
|
14652
|
+
url: Ev
|
|
14653
|
+
}, Ny = {
|
|
14654
|
+
...My,
|
|
14655
|
+
link: Ov(/^!?\[(label)\]\((.*?)\)/).replace("label", Ey).getRegex(),
|
|
14656
|
+
reflink: Ov(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ey).getRegex()
|
|
14657
|
+
}, Py = {
|
|
14658
|
+
...My,
|
|
14659
|
+
emStrongRDelimAst: vy,
|
|
14660
|
+
emStrongLDelim: hy,
|
|
14661
|
+
delLDelim: by,
|
|
14662
|
+
delRDelim: xy,
|
|
14663
|
+
url: Ov(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", jy).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
14539
14664
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
14540
14665
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
14541
|
-
text:
|
|
14542
|
-
},
|
|
14543
|
-
...
|
|
14544
|
-
br:
|
|
14545
|
-
text:
|
|
14546
|
-
},
|
|
14547
|
-
normal:
|
|
14548
|
-
gfm:
|
|
14549
|
-
pedantic:
|
|
14550
|
-
},
|
|
14551
|
-
normal:
|
|
14552
|
-
gfm:
|
|
14553
|
-
breaks:
|
|
14554
|
-
pedantic:
|
|
14555
|
-
},
|
|
14666
|
+
text: Ov(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", jy).getRegex()
|
|
14667
|
+
}, Fy = {
|
|
14668
|
+
...Py,
|
|
14669
|
+
br: Ov(ry).replace("{2,}", "*").getRegex(),
|
|
14670
|
+
text: Ov(Py.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
14671
|
+
}, Iy = {
|
|
14672
|
+
normal: Zv,
|
|
14673
|
+
gfm: $v,
|
|
14674
|
+
pedantic: ey
|
|
14675
|
+
}, Ly = {
|
|
14676
|
+
normal: My,
|
|
14677
|
+
gfm: Py,
|
|
14678
|
+
breaks: Fy,
|
|
14679
|
+
pedantic: Ny
|
|
14680
|
+
}, Ry = {
|
|
14556
14681
|
"&": "&",
|
|
14557
14682
|
"<": "<",
|
|
14558
14683
|
">": ">",
|
|
14559
14684
|
"\"": """,
|
|
14560
14685
|
"'": "'"
|
|
14561
|
-
},
|
|
14562
|
-
function
|
|
14686
|
+
}, zy = (e) => Ry[e];
|
|
14687
|
+
function By(e, t) {
|
|
14563
14688
|
if (t) {
|
|
14564
|
-
if (
|
|
14565
|
-
} else if (
|
|
14689
|
+
if (Av.escapeTest.test(e)) return e.replace(Av.escapeReplace, zy);
|
|
14690
|
+
} else if (Av.escapeTestNoEncode.test(e)) return e.replace(Av.escapeReplaceNoEncode, zy);
|
|
14566
14691
|
return e;
|
|
14567
14692
|
}
|
|
14568
|
-
function
|
|
14693
|
+
function Vy(e) {
|
|
14569
14694
|
try {
|
|
14570
|
-
e = encodeURI(e).replace(
|
|
14695
|
+
e = encodeURI(e).replace(Av.percentDecode, "%");
|
|
14571
14696
|
} catch {
|
|
14572
14697
|
return null;
|
|
14573
14698
|
}
|
|
14574
14699
|
return e;
|
|
14575
14700
|
}
|
|
14576
|
-
function
|
|
14577
|
-
let n = e.replace(
|
|
14701
|
+
function Hy(e, t) {
|
|
14702
|
+
let n = e.replace(Av.findPipe, (e, t, n) => {
|
|
14578
14703
|
let r = !1, i = t;
|
|
14579
14704
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
14580
14705
|
return r ? "|" : " |";
|
|
14581
|
-
}).split(
|
|
14706
|
+
}).split(Av.splitPipe), r = 0;
|
|
14582
14707
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
14583
14708
|
else for (; n.length < t;) n.push("");
|
|
14584
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
14709
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(Av.slashPipe, "|");
|
|
14585
14710
|
return n;
|
|
14586
14711
|
}
|
|
14587
|
-
function
|
|
14712
|
+
function Uy(e, t, n) {
|
|
14588
14713
|
let r = e.length;
|
|
14589
14714
|
if (r === 0) return "";
|
|
14590
14715
|
let i = 0;
|
|
@@ -14596,12 +14721,12 @@ function Ty(e, t, n) {
|
|
|
14596
14721
|
}
|
|
14597
14722
|
return e.slice(0, r - i);
|
|
14598
14723
|
}
|
|
14599
|
-
function
|
|
14724
|
+
function Wy(e) {
|
|
14600
14725
|
let t = e.split("\n"), n = t.length - 1;
|
|
14601
|
-
for (; n >= 0 &&
|
|
14726
|
+
for (; n >= 0 && Av.blankLine.test(t[n]);) n--;
|
|
14602
14727
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
14603
14728
|
}
|
|
14604
|
-
function
|
|
14729
|
+
function Gy(e, t) {
|
|
14605
14730
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
14606
14731
|
let n = 0;
|
|
14607
14732
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -14609,7 +14734,7 @@ function Dy(e, t) {
|
|
|
14609
14734
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
14610
14735
|
return n > 0 ? -2 : -1;
|
|
14611
14736
|
}
|
|
14612
|
-
function
|
|
14737
|
+
function Ky(e, t = 0) {
|
|
14613
14738
|
let n = t, r = "";
|
|
14614
14739
|
for (let t of e) if (t === " ") {
|
|
14615
14740
|
let e = 4 - n % 4;
|
|
@@ -14617,7 +14742,7 @@ function Oy(e, t = 0) {
|
|
|
14617
14742
|
} else r += t, n++;
|
|
14618
14743
|
return r;
|
|
14619
14744
|
}
|
|
14620
|
-
function
|
|
14745
|
+
function qy(e, t, n, r, i) {
|
|
14621
14746
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
14622
14747
|
r.state.inLink = !0;
|
|
14623
14748
|
let c = {
|
|
@@ -14630,7 +14755,7 @@ function ky(e, t, n, r, i) {
|
|
|
14630
14755
|
};
|
|
14631
14756
|
return r.state.inLink = !1, c;
|
|
14632
14757
|
}
|
|
14633
|
-
function
|
|
14758
|
+
function Jy(e, t, n) {
|
|
14634
14759
|
let r = e.match(n.other.indentCodeCompensation);
|
|
14635
14760
|
if (r === null) return t;
|
|
14636
14761
|
let i = r[1];
|
|
@@ -14641,12 +14766,12 @@ function Ay(e, t, n) {
|
|
|
14641
14766
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
14642
14767
|
}).join("\n");
|
|
14643
14768
|
}
|
|
14644
|
-
var
|
|
14769
|
+
var Yy = class {
|
|
14645
14770
|
options;
|
|
14646
14771
|
rules;
|
|
14647
14772
|
lexer;
|
|
14648
14773
|
constructor(e) {
|
|
14649
|
-
this.options = e ||
|
|
14774
|
+
this.options = e || wv;
|
|
14650
14775
|
}
|
|
14651
14776
|
space(e) {
|
|
14652
14777
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -14658,7 +14783,7 @@ var jy = class {
|
|
|
14658
14783
|
code(e) {
|
|
14659
14784
|
let t = this.rules.block.code.exec(e);
|
|
14660
14785
|
if (t) {
|
|
14661
|
-
let e = this.options.pedantic ? t[0] :
|
|
14786
|
+
let e = this.options.pedantic ? t[0] : Wy(t[0]);
|
|
14662
14787
|
return {
|
|
14663
14788
|
type: "code",
|
|
14664
14789
|
raw: e,
|
|
@@ -14670,7 +14795,7 @@ var jy = class {
|
|
|
14670
14795
|
fences(e) {
|
|
14671
14796
|
let t = this.rules.block.fences.exec(e);
|
|
14672
14797
|
if (t) {
|
|
14673
|
-
let e = t[0], n =
|
|
14798
|
+
let e = t[0], n = Jy(e, t[3] || "", this.rules);
|
|
14674
14799
|
return {
|
|
14675
14800
|
type: "code",
|
|
14676
14801
|
raw: e,
|
|
@@ -14684,12 +14809,12 @@ var jy = class {
|
|
|
14684
14809
|
if (t) {
|
|
14685
14810
|
let e = t[2].trim();
|
|
14686
14811
|
if (this.rules.other.endingHash.test(e)) {
|
|
14687
|
-
let t =
|
|
14812
|
+
let t = Uy(e, "#");
|
|
14688
14813
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
14689
14814
|
}
|
|
14690
14815
|
return {
|
|
14691
14816
|
type: "heading",
|
|
14692
|
-
raw:
|
|
14817
|
+
raw: Uy(t[0], "\n"),
|
|
14693
14818
|
depth: t[1].length,
|
|
14694
14819
|
text: e,
|
|
14695
14820
|
tokens: this.lexer.inline(e)
|
|
@@ -14700,13 +14825,13 @@ var jy = class {
|
|
|
14700
14825
|
let t = this.rules.block.hr.exec(e);
|
|
14701
14826
|
if (t) return {
|
|
14702
14827
|
type: "hr",
|
|
14703
|
-
raw:
|
|
14828
|
+
raw: Uy(t[0], "\n")
|
|
14704
14829
|
};
|
|
14705
14830
|
}
|
|
14706
14831
|
blockquote(e) {
|
|
14707
14832
|
let t = this.rules.block.blockquote.exec(e);
|
|
14708
14833
|
if (t) {
|
|
14709
|
-
let e =
|
|
14834
|
+
let e = Uy(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
14710
14835
|
for (; e.length > 0;) {
|
|
14711
14836
|
let t = !1, a = [], o;
|
|
14712
14837
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -14756,7 +14881,7 @@ ${c}` : c;
|
|
|
14756
14881
|
let n = !1, r = "", s = "";
|
|
14757
14882
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
14758
14883
|
r = t[0], e = e.substring(r.length);
|
|
14759
|
-
let c =
|
|
14884
|
+
let c = Ky(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
14760
14885
|
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
14761
14886
|
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
|
|
14762
14887
|
for (; e;) {
|
|
@@ -14822,7 +14947,7 @@ ${c}` : c;
|
|
|
14822
14947
|
html(e) {
|
|
14823
14948
|
let t = this.rules.block.html.exec(e);
|
|
14824
14949
|
if (t) {
|
|
14825
|
-
let e =
|
|
14950
|
+
let e = Wy(t[0]);
|
|
14826
14951
|
return {
|
|
14827
14952
|
type: "html",
|
|
14828
14953
|
block: !0,
|
|
@@ -14839,7 +14964,7 @@ ${c}` : c;
|
|
|
14839
14964
|
return {
|
|
14840
14965
|
type: "def",
|
|
14841
14966
|
tag: e,
|
|
14842
|
-
raw:
|
|
14967
|
+
raw: Uy(t[0], "\n"),
|
|
14843
14968
|
href: n,
|
|
14844
14969
|
title: r
|
|
14845
14970
|
};
|
|
@@ -14848,9 +14973,9 @@ ${c}` : c;
|
|
|
14848
14973
|
table(e) {
|
|
14849
14974
|
let t = this.rules.block.table.exec(e);
|
|
14850
14975
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
14851
|
-
let n =
|
|
14976
|
+
let n = Hy(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
14852
14977
|
type: "table",
|
|
14853
|
-
raw:
|
|
14978
|
+
raw: Uy(t[0], "\n"),
|
|
14854
14979
|
header: [],
|
|
14855
14980
|
align: [],
|
|
14856
14981
|
rows: []
|
|
@@ -14863,7 +14988,7 @@ ${c}` : c;
|
|
|
14863
14988
|
header: !0,
|
|
14864
14989
|
align: a.align[e]
|
|
14865
14990
|
});
|
|
14866
|
-
for (let e of i) a.rows.push(
|
|
14991
|
+
for (let e of i) a.rows.push(Hy(e, a.header.length).map((e, t) => ({
|
|
14867
14992
|
text: e,
|
|
14868
14993
|
tokens: this.lexer.inline(e),
|
|
14869
14994
|
header: !1,
|
|
@@ -14878,7 +15003,7 @@ ${c}` : c;
|
|
|
14878
15003
|
let e = t[1].trim();
|
|
14879
15004
|
return {
|
|
14880
15005
|
type: "heading",
|
|
14881
|
-
raw:
|
|
15006
|
+
raw: Uy(t[0], "\n"),
|
|
14882
15007
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
14883
15008
|
text: e,
|
|
14884
15009
|
tokens: this.lexer.inline(e)
|
|
@@ -14931,10 +15056,10 @@ ${c}` : c;
|
|
|
14931
15056
|
let e = t[2].trim();
|
|
14932
15057
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
14933
15058
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
14934
|
-
let t =
|
|
15059
|
+
let t = Uy(e.slice(0, -1), "\\");
|
|
14935
15060
|
if ((e.length - t.length) % 2 == 0) return;
|
|
14936
15061
|
} else {
|
|
14937
|
-
let e =
|
|
15062
|
+
let e = Gy(t[2], "()");
|
|
14938
15063
|
if (e === -2) return;
|
|
14939
15064
|
if (e > -1) {
|
|
14940
15065
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -14946,7 +15071,7 @@ ${c}` : c;
|
|
|
14946
15071
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
14947
15072
|
e && (n = e[1], r = e[3]);
|
|
14948
15073
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
14949
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
15074
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), qy(t, {
|
|
14950
15075
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
14951
15076
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
14952
15077
|
}, t[0], this.lexer, this.rules);
|
|
@@ -14964,7 +15089,7 @@ ${c}` : c;
|
|
|
14964
15089
|
text: e
|
|
14965
15090
|
};
|
|
14966
15091
|
}
|
|
14967
|
-
return
|
|
15092
|
+
return qy(n, e, n[0], this.lexer, this.rules);
|
|
14968
15093
|
}
|
|
14969
15094
|
}
|
|
14970
15095
|
emStrong(e, t, n = "") {
|
|
@@ -15096,29 +15221,29 @@ ${c}` : c;
|
|
|
15096
15221
|
};
|
|
15097
15222
|
}
|
|
15098
15223
|
}
|
|
15099
|
-
},
|
|
15224
|
+
}, Xy = class e {
|
|
15100
15225
|
tokens;
|
|
15101
15226
|
options;
|
|
15102
15227
|
state;
|
|
15103
15228
|
inlineQueue;
|
|
15104
15229
|
tokenizer;
|
|
15105
15230
|
constructor(e) {
|
|
15106
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
15231
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || wv, this.options.tokenizer = this.options.tokenizer || new Yy(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
15107
15232
|
inLink: !1,
|
|
15108
15233
|
inRawBlock: !1,
|
|
15109
15234
|
top: !0
|
|
15110
15235
|
};
|
|
15111
15236
|
let t = {
|
|
15112
|
-
other:
|
|
15113
|
-
block:
|
|
15114
|
-
inline:
|
|
15237
|
+
other: Av,
|
|
15238
|
+
block: Iy.normal,
|
|
15239
|
+
inline: Ly.normal
|
|
15115
15240
|
};
|
|
15116
|
-
this.options.pedantic ? (t.block =
|
|
15241
|
+
this.options.pedantic ? (t.block = Iy.pedantic, t.inline = Ly.pedantic) : this.options.gfm && (t.block = Iy.gfm, this.options.breaks ? t.inline = Ly.breaks : t.inline = Ly.gfm), this.tokenizer.rules = t;
|
|
15117
15242
|
}
|
|
15118
15243
|
static get rules() {
|
|
15119
15244
|
return {
|
|
15120
|
-
block:
|
|
15121
|
-
inline:
|
|
15245
|
+
block: Iy,
|
|
15246
|
+
inline: Ly
|
|
15122
15247
|
};
|
|
15123
15248
|
}
|
|
15124
15249
|
static lex(t, n) {
|
|
@@ -15128,7 +15253,7 @@ ${c}` : c;
|
|
|
15128
15253
|
return new e(n).inlineTokens(t);
|
|
15129
15254
|
}
|
|
15130
15255
|
lex(e) {
|
|
15131
|
-
e = e.replace(
|
|
15256
|
+
e = e.replace(Av.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
15132
15257
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
15133
15258
|
let t = this.inlineQueue[e];
|
|
15134
15259
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -15136,7 +15261,7 @@ ${c}` : c;
|
|
|
15136
15261
|
return this.inlineQueue = [], this.tokens;
|
|
15137
15262
|
}
|
|
15138
15263
|
blockTokens(e, t = [], n = !1) {
|
|
15139
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
15264
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Av.tabCharGlobal, " ").replace(Av.spaceLine, ""));
|
|
15140
15265
|
let r = Infinity;
|
|
15141
15266
|
for (; e;) {
|
|
15142
15267
|
if (e.length < r) r = e.length;
|
|
@@ -15318,18 +15443,18 @@ ${c}` : c;
|
|
|
15318
15443
|
if (this.options.silent) console.error(t);
|
|
15319
15444
|
else throw Error(t);
|
|
15320
15445
|
}
|
|
15321
|
-
},
|
|
15446
|
+
}, Zy = class {
|
|
15322
15447
|
options;
|
|
15323
15448
|
parser;
|
|
15324
15449
|
constructor(e) {
|
|
15325
|
-
this.options = e ||
|
|
15450
|
+
this.options = e || wv;
|
|
15326
15451
|
}
|
|
15327
15452
|
space(e) {
|
|
15328
15453
|
return "";
|
|
15329
15454
|
}
|
|
15330
15455
|
code({ text: e, lang: t, escaped: n }) {
|
|
15331
|
-
let r = (t || "").match(
|
|
15332
|
-
return r ? "<pre><code class=\"language-" +
|
|
15456
|
+
let r = (t || "").match(Av.notSpaceStart)?.[0], i = e.replace(Av.endingNewline, "") + "\n";
|
|
15457
|
+
return r ? "<pre><code class=\"language-" + By(r) + "\">" + (n ? i : By(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : By(i, !0)) + "</code></pre>\n";
|
|
15333
15458
|
}
|
|
15334
15459
|
blockquote({ tokens: e }) {
|
|
15335
15460
|
return `<blockquote>
|
|
@@ -15399,7 +15524,7 @@ ${e}</tr>
|
|
|
15399
15524
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
15400
15525
|
}
|
|
15401
15526
|
codespan({ text: e }) {
|
|
15402
|
-
return `<code>${
|
|
15527
|
+
return `<code>${By(e, !0)}</code>`;
|
|
15403
15528
|
}
|
|
15404
15529
|
br(e) {
|
|
15405
15530
|
return "<br>";
|
|
@@ -15408,24 +15533,24 @@ ${e}</tr>
|
|
|
15408
15533
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
15409
15534
|
}
|
|
15410
15535
|
link({ href: e, title: t, tokens: n }) {
|
|
15411
|
-
let r = this.parser.parseInline(n), i =
|
|
15536
|
+
let r = this.parser.parseInline(n), i = Vy(e);
|
|
15412
15537
|
if (i === null) return r;
|
|
15413
15538
|
e = i;
|
|
15414
15539
|
let a = "<a href=\"" + e + "\"";
|
|
15415
|
-
return t && (a += " title=\"" +
|
|
15540
|
+
return t && (a += " title=\"" + By(t) + "\""), a += ">" + r + "</a>", a;
|
|
15416
15541
|
}
|
|
15417
15542
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
15418
15543
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
15419
|
-
let i =
|
|
15420
|
-
if (i === null) return
|
|
15544
|
+
let i = Vy(e);
|
|
15545
|
+
if (i === null) return By(n);
|
|
15421
15546
|
e = i;
|
|
15422
|
-
let a = `<img src="${e}" alt="${
|
|
15423
|
-
return t && (a += ` title="${
|
|
15547
|
+
let a = `<img src="${e}" alt="${By(n)}"`;
|
|
15548
|
+
return t && (a += ` title="${By(t)}"`), a += ">", a;
|
|
15424
15549
|
}
|
|
15425
15550
|
text(e) {
|
|
15426
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
15551
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : By(e.text);
|
|
15427
15552
|
}
|
|
15428
|
-
},
|
|
15553
|
+
}, Qy = class {
|
|
15429
15554
|
strong({ text: e }) {
|
|
15430
15555
|
return e;
|
|
15431
15556
|
}
|
|
@@ -15456,12 +15581,12 @@ ${e}</tr>
|
|
|
15456
15581
|
checkbox({ raw: e }) {
|
|
15457
15582
|
return e;
|
|
15458
15583
|
}
|
|
15459
|
-
},
|
|
15584
|
+
}, $y = class e {
|
|
15460
15585
|
options;
|
|
15461
15586
|
renderer;
|
|
15462
15587
|
textRenderer;
|
|
15463
15588
|
constructor(e) {
|
|
15464
|
-
this.options = e ||
|
|
15589
|
+
this.options = e || wv, this.options.renderer = this.options.renderer || new Zy(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Qy();
|
|
15465
15590
|
}
|
|
15466
15591
|
static parse(t, n) {
|
|
15467
15592
|
return new e(n).parse(t);
|
|
@@ -15607,11 +15732,11 @@ ${e}</tr>
|
|
|
15607
15732
|
}
|
|
15608
15733
|
return n;
|
|
15609
15734
|
}
|
|
15610
|
-
},
|
|
15735
|
+
}, eb = class {
|
|
15611
15736
|
options;
|
|
15612
15737
|
block;
|
|
15613
15738
|
constructor(e) {
|
|
15614
|
-
this.options = e ||
|
|
15739
|
+
this.options = e || wv;
|
|
15615
15740
|
}
|
|
15616
15741
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
15617
15742
|
"preprocess",
|
|
@@ -15637,22 +15762,22 @@ ${e}</tr>
|
|
|
15637
15762
|
return e;
|
|
15638
15763
|
}
|
|
15639
15764
|
provideLexer(e = this.block) {
|
|
15640
|
-
return e ?
|
|
15765
|
+
return e ? Xy.lex : Xy.lexInline;
|
|
15641
15766
|
}
|
|
15642
15767
|
provideParser(e = this.block) {
|
|
15643
|
-
return e ?
|
|
15768
|
+
return e ? $y.parse : $y.parseInline;
|
|
15644
15769
|
}
|
|
15645
|
-
},
|
|
15646
|
-
defaults =
|
|
15770
|
+
}, tb = new class {
|
|
15771
|
+
defaults = Cv();
|
|
15647
15772
|
options = this.setOptions;
|
|
15648
15773
|
parse = this.parseMarkdown(!0);
|
|
15649
15774
|
parseInline = this.parseMarkdown(!1);
|
|
15650
|
-
Parser =
|
|
15651
|
-
Renderer =
|
|
15652
|
-
TextRenderer =
|
|
15653
|
-
Lexer =
|
|
15654
|
-
Tokenizer =
|
|
15655
|
-
Hooks =
|
|
15775
|
+
Parser = $y;
|
|
15776
|
+
Renderer = Zy;
|
|
15777
|
+
TextRenderer = Qy;
|
|
15778
|
+
Lexer = Xy;
|
|
15779
|
+
Tokenizer = Yy;
|
|
15780
|
+
Hooks = eb;
|
|
15656
15781
|
constructor(...e) {
|
|
15657
15782
|
this.use(...e);
|
|
15658
15783
|
}
|
|
@@ -15703,7 +15828,7 @@ ${e}</tr>
|
|
|
15703
15828
|
}
|
|
15704
15829
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
15705
15830
|
}), n.extensions = t), e.renderer) {
|
|
15706
|
-
let t = this.defaults.renderer || new
|
|
15831
|
+
let t = this.defaults.renderer || new Zy(this.defaults);
|
|
15707
15832
|
for (let n in e.renderer) {
|
|
15708
15833
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
15709
15834
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -15716,7 +15841,7 @@ ${e}</tr>
|
|
|
15716
15841
|
n.renderer = t;
|
|
15717
15842
|
}
|
|
15718
15843
|
if (e.tokenizer) {
|
|
15719
|
-
let t = this.defaults.tokenizer || new
|
|
15844
|
+
let t = this.defaults.tokenizer || new Yy(this.defaults);
|
|
15720
15845
|
for (let n in e.tokenizer) {
|
|
15721
15846
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
15722
15847
|
if ([
|
|
@@ -15733,13 +15858,13 @@ ${e}</tr>
|
|
|
15733
15858
|
n.tokenizer = t;
|
|
15734
15859
|
}
|
|
15735
15860
|
if (e.hooks) {
|
|
15736
|
-
let t = this.defaults.hooks || new
|
|
15861
|
+
let t = this.defaults.hooks || new eb();
|
|
15737
15862
|
for (let n in e.hooks) {
|
|
15738
15863
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
15739
15864
|
if (["options", "block"].includes(n)) continue;
|
|
15740
15865
|
let r = n, i = e.hooks[r], a = t[r];
|
|
15741
|
-
|
|
15742
|
-
if (this.defaults.async &&
|
|
15866
|
+
eb.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
15867
|
+
if (this.defaults.async && eb.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
15743
15868
|
let n = await i.call(t, e);
|
|
15744
15869
|
return a.call(t, n);
|
|
15745
15870
|
})();
|
|
@@ -15776,10 +15901,10 @@ ${e}</tr>
|
|
|
15776
15901
|
}, this;
|
|
15777
15902
|
}
|
|
15778
15903
|
lexer(e, t) {
|
|
15779
|
-
return
|
|
15904
|
+
return Xy.lex(e, t ?? this.defaults);
|
|
15780
15905
|
}
|
|
15781
15906
|
parser(e, t) {
|
|
15782
|
-
return
|
|
15907
|
+
return $y.parse(e, t ?? this.defaults);
|
|
15783
15908
|
}
|
|
15784
15909
|
parseMarkdown(e) {
|
|
15785
15910
|
return (t, n) => {
|
|
@@ -15791,16 +15916,16 @@ ${e}</tr>
|
|
|
15791
15916
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
15792
15917
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
15793
15918
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
15794
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
15919
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? Xy.lex : Xy.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
15795
15920
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
15796
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
15921
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? $y.parse : $y.parseInline)(a, i);
|
|
15797
15922
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
15798
15923
|
})().catch(a);
|
|
15799
15924
|
try {
|
|
15800
15925
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
15801
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
15926
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? Xy.lex : Xy.lexInline)(t, i);
|
|
15802
15927
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
15803
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
15928
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? $y.parse : $y.parseInline)(n, i);
|
|
15804
15929
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
15805
15930
|
} catch (e) {
|
|
15806
15931
|
return a(e);
|
|
@@ -15810,7 +15935,7 @@ ${e}</tr>
|
|
|
15810
15935
|
onError(e, t) {
|
|
15811
15936
|
return (n) => {
|
|
15812
15937
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
15813
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
15938
|
+
let e = "<p>An error occurred:</p><pre>" + By(n.message + "", !0) + "</pre>";
|
|
15814
15939
|
return t ? Promise.resolve(e) : e;
|
|
15815
15940
|
}
|
|
15816
15941
|
if (t) return Promise.reject(n);
|
|
@@ -15818,19 +15943,19 @@ ${e}</tr>
|
|
|
15818
15943
|
};
|
|
15819
15944
|
}
|
|
15820
15945
|
}();
|
|
15821
|
-
function
|
|
15822
|
-
return
|
|
15823
|
-
}
|
|
15824
|
-
|
|
15825
|
-
return
|
|
15826
|
-
},
|
|
15827
|
-
return
|
|
15828
|
-
},
|
|
15829
|
-
return
|
|
15830
|
-
},
|
|
15946
|
+
function nb(e, t) {
|
|
15947
|
+
return tb.parse(e, t);
|
|
15948
|
+
}
|
|
15949
|
+
nb.options = nb.setOptions = function(e) {
|
|
15950
|
+
return tb.setOptions(e), nb.defaults = tb.defaults, Tv(nb.defaults), nb;
|
|
15951
|
+
}, nb.getDefaults = Cv, nb.defaults = wv, nb.use = function(...e) {
|
|
15952
|
+
return tb.use(...e), nb.defaults = tb.defaults, Tv(nb.defaults), nb;
|
|
15953
|
+
}, nb.walkTokens = function(e, t) {
|
|
15954
|
+
return tb.walkTokens(e, t);
|
|
15955
|
+
}, nb.parseInline = tb.parseInline, nb.Parser = $y, nb.parser = $y.parse, nb.Renderer = Zy, nb.TextRenderer = Qy, nb.Lexer = Xy, nb.lexer = Xy.lex, nb.Tokenizer = Yy, nb.Hooks = eb, nb.parse = nb, nb.options, nb.setOptions, nb.use, nb.walkTokens, nb.parseInline, $y.parse, Xy.lex;
|
|
15831
15956
|
//#endregion
|
|
15832
15957
|
//#region node_modules/highlight.js/lib/core.js
|
|
15833
|
-
var
|
|
15958
|
+
var rb = /* @__PURE__ */ h(((e, t) => {
|
|
15834
15959
|
function n(e) {
|
|
15835
15960
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
15836
15961
|
throw Error("map is read-only");
|
|
@@ -16671,7 +16796,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
16671
16796
|
return Object.assign(e, L), e;
|
|
16672
16797
|
}, je = Ae({});
|
|
16673
16798
|
je.newInstance = () => Ae({}), t.exports = je, je.HighlightJS = je, je.default = je;
|
|
16674
|
-
})),
|
|
16799
|
+
})), ib = /* @__PURE__ */ h(((e, t) => {
|
|
16675
16800
|
function n(e) {
|
|
16676
16801
|
let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
|
|
16677
16802
|
className: "symbol",
|
|
@@ -16836,7 +16961,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
16836
16961
|
};
|
|
16837
16962
|
}
|
|
16838
16963
|
t.exports = n;
|
|
16839
|
-
})),
|
|
16964
|
+
})), ab = /* @__PURE__ */ h(((e, t) => {
|
|
16840
16965
|
function n(e) {
|
|
16841
16966
|
let t = e.regex, n = {}, r = {
|
|
16842
16967
|
begin: /\$\{/,
|
|
@@ -17004,7 +17129,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17004
17129
|
};
|
|
17005
17130
|
}
|
|
17006
17131
|
t.exports = n;
|
|
17007
|
-
})),
|
|
17132
|
+
})), ob = /* @__PURE__ */ h(((e, t) => {
|
|
17008
17133
|
function n(e) {
|
|
17009
17134
|
let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
|
|
17010
17135
|
className: "type",
|
|
@@ -17179,7 +17304,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17179
17304
|
};
|
|
17180
17305
|
}
|
|
17181
17306
|
t.exports = n;
|
|
17182
|
-
})),
|
|
17307
|
+
})), sb = /* @__PURE__ */ h(((e, t) => {
|
|
17183
17308
|
function n(e) {
|
|
17184
17309
|
let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(?!struct)(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
|
|
17185
17310
|
className: "type",
|
|
@@ -17403,7 +17528,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17403
17528
|
};
|
|
17404
17529
|
}
|
|
17405
17530
|
t.exports = n;
|
|
17406
|
-
})),
|
|
17531
|
+
})), cb = /* @__PURE__ */ h(((e, t) => {
|
|
17407
17532
|
function n(e) {
|
|
17408
17533
|
let t = [
|
|
17409
17534
|
"bool",
|
|
@@ -17662,7 +17787,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17662
17787
|
};
|
|
17663
17788
|
}
|
|
17664
17789
|
t.exports = n;
|
|
17665
|
-
})),
|
|
17790
|
+
})), lb = /* @__PURE__ */ h(((e, t) => {
|
|
17666
17791
|
var n = (e) => ({
|
|
17667
17792
|
IMPORTANT: {
|
|
17668
17793
|
scope: "meta",
|
|
@@ -17801,7 +17926,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17801
17926
|
};
|
|
17802
17927
|
}
|
|
17803
17928
|
t.exports = u;
|
|
17804
|
-
})),
|
|
17929
|
+
})), ub = /* @__PURE__ */ h(((e, t) => {
|
|
17805
17930
|
function n(e) {
|
|
17806
17931
|
let t = e.regex, n = {
|
|
17807
17932
|
begin: /<\/?[A-Za-z_]/,
|
|
@@ -17981,7 +18106,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17981
18106
|
};
|
|
17982
18107
|
}
|
|
17983
18108
|
t.exports = n;
|
|
17984
|
-
})),
|
|
18109
|
+
})), db = /* @__PURE__ */ h(((e, t) => {
|
|
17985
18110
|
function n(e) {
|
|
17986
18111
|
let t = e.regex;
|
|
17987
18112
|
return {
|
|
@@ -18019,7 +18144,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18019
18144
|
};
|
|
18020
18145
|
}
|
|
18021
18146
|
t.exports = n;
|
|
18022
|
-
})),
|
|
18147
|
+
})), fb = /* @__PURE__ */ h(((e, t) => {
|
|
18023
18148
|
function n(e) {
|
|
18024
18149
|
let t = e.regex, n = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", r = t.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/), i = t.concat(r, /(::\w+)*/), a = {
|
|
18025
18150
|
"variable.constant": [
|
|
@@ -18280,7 +18405,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18280
18405
|
};
|
|
18281
18406
|
}
|
|
18282
18407
|
t.exports = n;
|
|
18283
|
-
})),
|
|
18408
|
+
})), pb = /* @__PURE__ */ h(((e, t) => {
|
|
18284
18409
|
function n(e) {
|
|
18285
18410
|
let t = {
|
|
18286
18411
|
keyword: [
|
|
@@ -18419,7 +18544,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18419
18544
|
};
|
|
18420
18545
|
}
|
|
18421
18546
|
t.exports = n;
|
|
18422
|
-
})),
|
|
18547
|
+
})), mb = /* @__PURE__ */ h(((e, t) => {
|
|
18423
18548
|
function n(e) {
|
|
18424
18549
|
let t = e.regex;
|
|
18425
18550
|
return {
|
|
@@ -18485,7 +18610,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18485
18610
|
};
|
|
18486
18611
|
}
|
|
18487
18612
|
t.exports = n;
|
|
18488
|
-
})),
|
|
18613
|
+
})), hb = /* @__PURE__ */ h(((e, t) => {
|
|
18489
18614
|
function n(e) {
|
|
18490
18615
|
let t = e.regex, n = {
|
|
18491
18616
|
className: "number",
|
|
@@ -18572,7 +18697,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18572
18697
|
};
|
|
18573
18698
|
}
|
|
18574
18699
|
t.exports = n;
|
|
18575
|
-
})),
|
|
18700
|
+
})), gb = /* @__PURE__ */ h(((e, t) => {
|
|
18576
18701
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
18577
18702
|
className: "number",
|
|
18578
18703
|
variants: [
|
|
@@ -18740,7 +18865,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18740
18865
|
};
|
|
18741
18866
|
}
|
|
18742
18867
|
t.exports = s;
|
|
18743
|
-
})),
|
|
18868
|
+
})), _b = /* @__PURE__ */ h(((e, t) => {
|
|
18744
18869
|
var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
|
|
18745
18870
|
"true",
|
|
18746
18871
|
"false",
|
|
@@ -19175,7 +19300,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19175
19300
|
};
|
|
19176
19301
|
}
|
|
19177
19302
|
t.exports = u;
|
|
19178
|
-
})),
|
|
19303
|
+
})), vb = /* @__PURE__ */ h(((e, t) => {
|
|
19179
19304
|
function n(e) {
|
|
19180
19305
|
let t = {
|
|
19181
19306
|
className: "attr",
|
|
@@ -19210,7 +19335,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19210
19335
|
};
|
|
19211
19336
|
}
|
|
19212
19337
|
t.exports = n;
|
|
19213
|
-
})),
|
|
19338
|
+
})), yb = /* @__PURE__ */ h(((e, t) => {
|
|
19214
19339
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
19215
19340
|
className: "number",
|
|
19216
19341
|
variants: [
|
|
@@ -19410,7 +19535,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19410
19535
|
};
|
|
19411
19536
|
}
|
|
19412
19537
|
t.exports = o;
|
|
19413
|
-
})),
|
|
19538
|
+
})), bb = /* @__PURE__ */ h(((e, t) => {
|
|
19414
19539
|
var n = (e) => ({
|
|
19415
19540
|
IMPORTANT: {
|
|
19416
19541
|
scope: "meta",
|
|
@@ -19601,7 +19726,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19601
19726
|
};
|
|
19602
19727
|
}
|
|
19603
19728
|
t.exports = d;
|
|
19604
|
-
})),
|
|
19729
|
+
})), xb = /* @__PURE__ */ h(((e, t) => {
|
|
19605
19730
|
function n(e) {
|
|
19606
19731
|
let t = "\\[=*\\[", n = "\\]=*\\]", r = {
|
|
19607
19732
|
begin: t,
|
|
@@ -19646,7 +19771,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19646
19771
|
};
|
|
19647
19772
|
}
|
|
19648
19773
|
t.exports = n;
|
|
19649
|
-
})),
|
|
19774
|
+
})), Sb = /* @__PURE__ */ h(((e, t) => {
|
|
19650
19775
|
function n(e) {
|
|
19651
19776
|
let t = {
|
|
19652
19777
|
className: "variable",
|
|
@@ -19702,7 +19827,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19702
19827
|
};
|
|
19703
19828
|
}
|
|
19704
19829
|
t.exports = n;
|
|
19705
|
-
})),
|
|
19830
|
+
})), Cb = /* @__PURE__ */ h(((e, t) => {
|
|
19706
19831
|
function n(e) {
|
|
19707
19832
|
let t = e.regex, n = /* @__PURE__ */ "abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0".split("."), r = /[dualxmsipngr]{0,12}/, i = {
|
|
19708
19833
|
$pattern: /[\w.]+/,
|
|
@@ -19893,7 +20018,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19893
20018
|
};
|
|
19894
20019
|
}
|
|
19895
20020
|
t.exports = n;
|
|
19896
|
-
})),
|
|
20021
|
+
})), wb = /* @__PURE__ */ h(((e, t) => {
|
|
19897
20022
|
function n(e) {
|
|
19898
20023
|
let t = {
|
|
19899
20024
|
className: "built_in",
|
|
@@ -20009,7 +20134,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20009
20134
|
};
|
|
20010
20135
|
}
|
|
20011
20136
|
t.exports = n;
|
|
20012
|
-
})),
|
|
20137
|
+
})), Tb = /* @__PURE__ */ h(((e, t) => {
|
|
20013
20138
|
function n(e) {
|
|
20014
20139
|
let t = e.regex, n = /(?![A-Za-z0-9])(?![$])/, r = t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, n), i = t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, n), a = t.concat(/[A-Z]+/, n), o = {
|
|
20015
20140
|
scope: "variable",
|
|
@@ -20302,7 +20427,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20302
20427
|
};
|
|
20303
20428
|
}
|
|
20304
20429
|
t.exports = n;
|
|
20305
|
-
})),
|
|
20430
|
+
})), Eb = /* @__PURE__ */ h(((e, t) => {
|
|
20306
20431
|
function n(e) {
|
|
20307
20432
|
return {
|
|
20308
20433
|
name: "PHP template",
|
|
@@ -20344,7 +20469,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20344
20469
|
};
|
|
20345
20470
|
}
|
|
20346
20471
|
t.exports = n;
|
|
20347
|
-
})),
|
|
20472
|
+
})), Db = /* @__PURE__ */ h(((e, t) => {
|
|
20348
20473
|
function n(e) {
|
|
20349
20474
|
return {
|
|
20350
20475
|
name: "Plain text",
|
|
@@ -20353,7 +20478,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20353
20478
|
};
|
|
20354
20479
|
}
|
|
20355
20480
|
t.exports = n;
|
|
20356
|
-
})),
|
|
20481
|
+
})), Ob = /* @__PURE__ */ h(((e, t) => {
|
|
20357
20482
|
function n(e) {
|
|
20358
20483
|
let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
|
|
20359
20484
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
@@ -20590,7 +20715,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20590
20715
|
};
|
|
20591
20716
|
}
|
|
20592
20717
|
t.exports = n;
|
|
20593
|
-
})),
|
|
20718
|
+
})), kb = /* @__PURE__ */ h(((e, t) => {
|
|
20594
20719
|
function n(e) {
|
|
20595
20720
|
return {
|
|
20596
20721
|
aliases: ["pycon"],
|
|
@@ -20608,7 +20733,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20608
20733
|
};
|
|
20609
20734
|
}
|
|
20610
20735
|
t.exports = n;
|
|
20611
|
-
})),
|
|
20736
|
+
})), Ab = /* @__PURE__ */ h(((e, t) => {
|
|
20612
20737
|
function n(e) {
|
|
20613
20738
|
let t = e.regex, n = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/, r = t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/, /(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/), i = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/, a = t.either(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/);
|
|
20614
20739
|
return {
|
|
@@ -20747,7 +20872,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20747
20872
|
};
|
|
20748
20873
|
}
|
|
20749
20874
|
t.exports = n;
|
|
20750
|
-
})),
|
|
20875
|
+
})), jb = /* @__PURE__ */ h(((e, t) => {
|
|
20751
20876
|
function n(e) {
|
|
20752
20877
|
let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
|
|
20753
20878
|
className: "title.function.invoke",
|
|
@@ -20915,7 +21040,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20915
21040
|
};
|
|
20916
21041
|
}
|
|
20917
21042
|
t.exports = n;
|
|
20918
|
-
})),
|
|
21043
|
+
})), Mb = /* @__PURE__ */ h(((e, t) => {
|
|
20919
21044
|
var n = (e) => ({
|
|
20920
21045
|
IMPORTANT: {
|
|
20921
21046
|
scope: "meta",
|
|
@@ -21064,7 +21189,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21064
21189
|
};
|
|
21065
21190
|
}
|
|
21066
21191
|
t.exports = u;
|
|
21067
|
-
})),
|
|
21192
|
+
})), Nb = /* @__PURE__ */ h(((e, t) => {
|
|
21068
21193
|
function n(e) {
|
|
21069
21194
|
return {
|
|
21070
21195
|
name: "Shell Session",
|
|
@@ -21080,7 +21205,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21080
21205
|
};
|
|
21081
21206
|
}
|
|
21082
21207
|
t.exports = n;
|
|
21083
|
-
})),
|
|
21208
|
+
})), Pb = /* @__PURE__ */ h(((e, t) => {
|
|
21084
21209
|
function n(e) {
|
|
21085
21210
|
let t = e.regex, n = e.COMMENT("--", "$"), r = {
|
|
21086
21211
|
scope: "string",
|
|
@@ -21197,7 +21322,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21197
21322
|
};
|
|
21198
21323
|
}
|
|
21199
21324
|
t.exports = n;
|
|
21200
|
-
})),
|
|
21325
|
+
})), Fb = /* @__PURE__ */ h(((e, t) => {
|
|
21201
21326
|
function n(e) {
|
|
21202
21327
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
21203
21328
|
}
|
|
@@ -21770,7 +21895,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21770
21895
|
};
|
|
21771
21896
|
}
|
|
21772
21897
|
t.exports = T;
|
|
21773
|
-
})),
|
|
21898
|
+
})), Ib = /* @__PURE__ */ h(((e, t) => {
|
|
21774
21899
|
function n(e) {
|
|
21775
21900
|
let t = "true false yes no null", n = {
|
|
21776
21901
|
className: "attr",
|
|
@@ -21913,7 +22038,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21913
22038
|
};
|
|
21914
22039
|
}
|
|
21915
22040
|
t.exports = n;
|
|
21916
|
-
})),
|
|
22041
|
+
})), Lb = /* @__PURE__ */ h(((e, t) => {
|
|
21917
22042
|
var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
|
|
21918
22043
|
"true",
|
|
21919
22044
|
"false",
|
|
@@ -22433,7 +22558,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22433
22558
|
}), a;
|
|
22434
22559
|
}
|
|
22435
22560
|
t.exports = d;
|
|
22436
|
-
})),
|
|
22561
|
+
})), Rb = /* @__PURE__ */ h(((e, t) => {
|
|
22437
22562
|
function n(e) {
|
|
22438
22563
|
let t = e.regex, n = {
|
|
22439
22564
|
className: "string",
|
|
@@ -22501,7 +22626,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22501
22626
|
};
|
|
22502
22627
|
}
|
|
22503
22628
|
t.exports = n;
|
|
22504
|
-
})),
|
|
22629
|
+
})), zb = /* @__PURE__ */ h(((e, t) => {
|
|
22505
22630
|
function n(e) {
|
|
22506
22631
|
e.regex;
|
|
22507
22632
|
let t = e.COMMENT(/\(;/, /;\)/);
|
|
@@ -22563,21 +22688,21 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22563
22688
|
};
|
|
22564
22689
|
}
|
|
22565
22690
|
t.exports = n;
|
|
22566
|
-
})),
|
|
22567
|
-
var n =
|
|
22568
|
-
n.registerLanguage("xml",
|
|
22691
|
+
})), Bb = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
|
|
22692
|
+
var n = rb();
|
|
22693
|
+
n.registerLanguage("xml", ib()), n.registerLanguage("bash", ab()), n.registerLanguage("c", ob()), n.registerLanguage("cpp", sb()), n.registerLanguage("csharp", cb()), n.registerLanguage("css", lb()), n.registerLanguage("markdown", ub()), n.registerLanguage("diff", db()), n.registerLanguage("ruby", fb()), n.registerLanguage("go", pb()), n.registerLanguage("graphql", mb()), n.registerLanguage("ini", hb()), n.registerLanguage("java", gb()), n.registerLanguage("javascript", _b()), n.registerLanguage("json", vb()), n.registerLanguage("kotlin", yb()), n.registerLanguage("less", bb()), n.registerLanguage("lua", xb()), n.registerLanguage("makefile", Sb()), n.registerLanguage("perl", Cb()), n.registerLanguage("objectivec", wb()), n.registerLanguage("php", Tb()), n.registerLanguage("php-template", Eb()), n.registerLanguage("plaintext", Db()), n.registerLanguage("python", Ob()), n.registerLanguage("python-repl", kb()), n.registerLanguage("r", Ab()), n.registerLanguage("rust", jb()), n.registerLanguage("scss", Mb()), n.registerLanguage("shell", Nb()), n.registerLanguage("sql", Pb()), n.registerLanguage("swift", Fb()), n.registerLanguage("yaml", Ib()), n.registerLanguage("typescript", Lb()), n.registerLanguage("vbnet", Rb()), n.registerLanguage("wasm", zb()), n.HighlightJS = n, n.default = n, t.exports = n;
|
|
22569
22694
|
})))())).default;
|
|
22570
22695
|
//#endregion
|
|
22571
22696
|
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
22572
|
-
function
|
|
22697
|
+
function Vb(e, t) {
|
|
22573
22698
|
(t == null || t > e.length) && (t = e.length);
|
|
22574
22699
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
22575
22700
|
return r;
|
|
22576
22701
|
}
|
|
22577
|
-
function
|
|
22702
|
+
function Hb(e) {
|
|
22578
22703
|
if (Array.isArray(e)) return e;
|
|
22579
22704
|
}
|
|
22580
|
-
function
|
|
22705
|
+
function Ub(e, t) {
|
|
22581
22706
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
22582
22707
|
if (n != null) {
|
|
22583
22708
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -22595,113 +22720,113 @@ function Tb(e, t) {
|
|
|
22595
22720
|
return s;
|
|
22596
22721
|
}
|
|
22597
22722
|
}
|
|
22598
|
-
function
|
|
22723
|
+
function Wb() {
|
|
22599
22724
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22600
22725
|
}
|
|
22601
|
-
function
|
|
22602
|
-
return
|
|
22726
|
+
function Gb(e, t) {
|
|
22727
|
+
return Hb(e) || Ub(e, t) || Kb(e, t) || Wb();
|
|
22603
22728
|
}
|
|
22604
|
-
function
|
|
22729
|
+
function Kb(e, t) {
|
|
22605
22730
|
if (e) {
|
|
22606
|
-
if (typeof e == "string") return
|
|
22731
|
+
if (typeof e == "string") return Vb(e, t);
|
|
22607
22732
|
var n = {}.toString.call(e).slice(8, -1);
|
|
22608
|
-
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) ?
|
|
22733
|
+
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) ? Vb(e, t) : void 0;
|
|
22609
22734
|
}
|
|
22610
22735
|
}
|
|
22611
|
-
var
|
|
22612
|
-
|
|
22736
|
+
var qb = Object.entries, Jb = Object.setPrototypeOf, Yb = Object.isFrozen, Xb = Object.getPrototypeOf, Zb = Object.getOwnPropertyDescriptor, Qb = Object.freeze, $b = Object.seal, ex = Object.create, tx = typeof Reflect < "u" && Reflect, nx = tx.apply, rx = tx.construct;
|
|
22737
|
+
Qb ||= function(e) {
|
|
22613
22738
|
return e;
|
|
22614
|
-
},
|
|
22739
|
+
}, $b ||= function(e) {
|
|
22615
22740
|
return e;
|
|
22616
|
-
},
|
|
22741
|
+
}, nx ||= function(e, t) {
|
|
22617
22742
|
var n = [...arguments].slice(2);
|
|
22618
22743
|
return e.apply(t, n);
|
|
22619
|
-
},
|
|
22744
|
+
}, rx ||= function(e) {
|
|
22620
22745
|
return new e(...[...arguments].slice(1));
|
|
22621
22746
|
};
|
|
22622
|
-
var
|
|
22623
|
-
function
|
|
22747
|
+
var ix = wx(Array.prototype.forEach), ax = wx(Array.prototype.lastIndexOf), ox = wx(Array.prototype.pop), sx = wx(Array.prototype.push), cx = wx(Array.prototype.splice), lx = Array.isArray, ux = wx(String.prototype.toLowerCase), dx = wx(String.prototype.toString), fx = wx(String.prototype.match), px = wx(String.prototype.replace), mx = wx(String.prototype.indexOf), hx = wx(String.prototype.trim), gx = wx(Number.prototype.toString), _x = wx(Boolean.prototype.toString), vx = typeof BigInt > "u" ? null : wx(BigInt.prototype.toString), yx = typeof Symbol > "u" ? null : wx(Symbol.prototype.toString), bx = wx(Object.prototype.hasOwnProperty), xx = wx(Object.prototype.toString), Sx = wx(RegExp.prototype.test), Cx = Tx(TypeError);
|
|
22748
|
+
function wx(e) {
|
|
22624
22749
|
return function(t) {
|
|
22625
22750
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
22626
22751
|
var n = [...arguments].slice(1);
|
|
22627
|
-
return
|
|
22752
|
+
return nx(e, t, n);
|
|
22628
22753
|
};
|
|
22629
22754
|
}
|
|
22630
|
-
function
|
|
22755
|
+
function Tx(e) {
|
|
22631
22756
|
return function() {
|
|
22632
|
-
return
|
|
22757
|
+
return rx(e, [...arguments]);
|
|
22633
22758
|
};
|
|
22634
22759
|
}
|
|
22635
|
-
function
|
|
22636
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
22637
|
-
if (
|
|
22760
|
+
function Ex(e, t) {
|
|
22761
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ux;
|
|
22762
|
+
if (Jb && Jb(e, null), !lx(t)) return e;
|
|
22638
22763
|
let r = t.length;
|
|
22639
22764
|
for (; r--;) {
|
|
22640
22765
|
let i = t[r];
|
|
22641
22766
|
if (typeof i == "string") {
|
|
22642
22767
|
let e = n(i);
|
|
22643
|
-
e !== i && (
|
|
22768
|
+
e !== i && (Yb(t) || (t[r] = e), i = e);
|
|
22644
22769
|
}
|
|
22645
22770
|
e[i] = !0;
|
|
22646
22771
|
}
|
|
22647
22772
|
return e;
|
|
22648
22773
|
}
|
|
22649
|
-
function
|
|
22650
|
-
for (let t = 0; t < e.length; t++)
|
|
22774
|
+
function Dx(e) {
|
|
22775
|
+
for (let t = 0; t < e.length; t++) bx(e, t) || (e[t] = null);
|
|
22651
22776
|
return e;
|
|
22652
22777
|
}
|
|
22653
|
-
function
|
|
22654
|
-
let t =
|
|
22655
|
-
for (let r of
|
|
22656
|
-
var n =
|
|
22778
|
+
function Ox(e) {
|
|
22779
|
+
let t = ex(null);
|
|
22780
|
+
for (let r of qb(e)) {
|
|
22781
|
+
var n = Gb(r, 2);
|
|
22657
22782
|
let i = n[0], a = n[1];
|
|
22658
|
-
|
|
22783
|
+
bx(e, i) && (lx(a) ? t[i] = Dx(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = Ox(a) : t[i] = a);
|
|
22659
22784
|
}
|
|
22660
22785
|
return t;
|
|
22661
22786
|
}
|
|
22662
|
-
function
|
|
22787
|
+
function kx(e) {
|
|
22663
22788
|
switch (typeof e) {
|
|
22664
22789
|
case "string": return e;
|
|
22665
|
-
case "number": return
|
|
22666
|
-
case "boolean": return
|
|
22667
|
-
case "bigint": return
|
|
22668
|
-
case "symbol": return
|
|
22669
|
-
case "undefined": return
|
|
22790
|
+
case "number": return gx(e);
|
|
22791
|
+
case "boolean": return _x(e);
|
|
22792
|
+
case "bigint": return vx ? vx(e) : "0";
|
|
22793
|
+
case "symbol": return yx ? yx(e) : "Symbol()";
|
|
22794
|
+
case "undefined": return xx(e);
|
|
22670
22795
|
case "function":
|
|
22671
22796
|
case "object": {
|
|
22672
|
-
if (e === null) return
|
|
22673
|
-
let t = e, n =
|
|
22797
|
+
if (e === null) return xx(e);
|
|
22798
|
+
let t = e, n = Ax(t, "toString");
|
|
22674
22799
|
if (typeof n == "function") {
|
|
22675
22800
|
let e = n(t);
|
|
22676
|
-
return typeof e == "string" ? e :
|
|
22801
|
+
return typeof e == "string" ? e : xx(e);
|
|
22677
22802
|
}
|
|
22678
|
-
return
|
|
22803
|
+
return xx(e);
|
|
22679
22804
|
}
|
|
22680
|
-
default: return
|
|
22805
|
+
default: return xx(e);
|
|
22681
22806
|
}
|
|
22682
22807
|
}
|
|
22683
|
-
function
|
|
22808
|
+
function Ax(e, t) {
|
|
22684
22809
|
for (; e !== null;) {
|
|
22685
|
-
let n =
|
|
22810
|
+
let n = Zb(e, t);
|
|
22686
22811
|
if (n) {
|
|
22687
|
-
if (n.get) return
|
|
22688
|
-
if (typeof n.value == "function") return
|
|
22812
|
+
if (n.get) return wx(n.get);
|
|
22813
|
+
if (typeof n.value == "function") return wx(n.value);
|
|
22689
22814
|
}
|
|
22690
|
-
e =
|
|
22815
|
+
e = Xb(e);
|
|
22691
22816
|
}
|
|
22692
22817
|
function n() {
|
|
22693
22818
|
return null;
|
|
22694
22819
|
}
|
|
22695
22820
|
return n;
|
|
22696
22821
|
}
|
|
22697
|
-
function
|
|
22822
|
+
function jx(e) {
|
|
22698
22823
|
try {
|
|
22699
|
-
return
|
|
22824
|
+
return Sx(e, ""), !0;
|
|
22700
22825
|
} catch {
|
|
22701
22826
|
return !1;
|
|
22702
22827
|
}
|
|
22703
22828
|
}
|
|
22704
|
-
var
|
|
22829
|
+
var Mx = Qb(/* @__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(".")), Nx = Qb(/* @__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(".")), Px = Qb([
|
|
22705
22830
|
"feBlend",
|
|
22706
22831
|
"feColorMatrix",
|
|
22707
22832
|
"feComponentTransfer",
|
|
@@ -22727,7 +22852,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22727
22852
|
"feSpotLight",
|
|
22728
22853
|
"feTile",
|
|
22729
22854
|
"feTurbulence"
|
|
22730
|
-
]),
|
|
22855
|
+
]), Fx = Qb([
|
|
22731
22856
|
"animate",
|
|
22732
22857
|
"color-profile",
|
|
22733
22858
|
"cursor",
|
|
@@ -22750,7 +22875,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22750
22875
|
"solidcolor",
|
|
22751
22876
|
"unknown",
|
|
22752
22877
|
"use"
|
|
22753
|
-
]),
|
|
22878
|
+
]), Ix = Qb(/* @__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(".")), Lx = Qb([
|
|
22754
22879
|
"maction",
|
|
22755
22880
|
"maligngroup",
|
|
22756
22881
|
"malignmark",
|
|
@@ -22766,13 +22891,13 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22766
22891
|
"annotation-xml",
|
|
22767
22892
|
"mprescripts",
|
|
22768
22893
|
"none"
|
|
22769
|
-
]),
|
|
22894
|
+
]), Rx = Qb(["#text"]), zx = Qb(/* @__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(".")), Bx = Qb(/* @__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(".")), Vx = Qb(/* @__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(".")), Hx = Qb([
|
|
22770
22895
|
"xlink:href",
|
|
22771
22896
|
"xml:id",
|
|
22772
22897
|
"xlink:title",
|
|
22773
22898
|
"xml:space",
|
|
22774
22899
|
"xmlns:xlink"
|
|
22775
|
-
]),
|
|
22900
|
+
]), Ux = $b(/{{[\w\W]*|^[\w\W]*}}/g), Wx = $b(/<%[\w\W]*|^[\w\W]*%>/g), Gx = $b(/\${[\w\W]*/g), Kx = $b(/^data-[\-\w.\u00B7-\uFFFF]+$/), qx = $b(/^aria-[\-\w]+$/), Jx = $b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Yx = $b(/^(?:\w+script|data):/i), Xx = $b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Zx = $b(/^html$/i), Qx = $b(/^[a-z][.\w]*(-[.\w]+)+$/i), $x = $b(/<[/\w!]/g), eS = $b(/<[/\w]/g), tS = $b(/<\/no(script|embed|frames)/i), nS = $b(/\/>/i), rS = {
|
|
22776
22901
|
element: 1,
|
|
22777
22902
|
attribute: 2,
|
|
22778
22903
|
text: 3,
|
|
@@ -22785,9 +22910,9 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22785
22910
|
documentType: 10,
|
|
22786
22911
|
documentFragment: 11,
|
|
22787
22912
|
notation: 12
|
|
22788
|
-
},
|
|
22913
|
+
}, iS = function() {
|
|
22789
22914
|
return typeof window > "u" ? null : window;
|
|
22790
|
-
},
|
|
22915
|
+
}, aS = function(e, t) {
|
|
22791
22916
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
22792
22917
|
let n = null, r = "data-tt-policy-suffix";
|
|
22793
22918
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -22804,7 +22929,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22804
22929
|
} catch {
|
|
22805
22930
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
22806
22931
|
}
|
|
22807
|
-
},
|
|
22932
|
+
}, oS = function() {
|
|
22808
22933
|
return {
|
|
22809
22934
|
afterSanitizeAttributes: [],
|
|
22810
22935
|
afterSanitizeElements: [],
|
|
@@ -22816,23 +22941,23 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22816
22941
|
uponSanitizeElement: [],
|
|
22817
22942
|
uponSanitizeShadowNode: []
|
|
22818
22943
|
};
|
|
22819
|
-
},
|
|
22820
|
-
return
|
|
22944
|
+
}, sS = function(e, t, n, r) {
|
|
22945
|
+
return bx(e, t) && lx(e[t]) ? Ex(r.base ? Ox(r.base) : {}, e[t], r.transform) : n;
|
|
22821
22946
|
};
|
|
22822
|
-
function
|
|
22823
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
22824
|
-
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
22947
|
+
function cS() {
|
|
22948
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iS(), t = (e) => cS(e);
|
|
22949
|
+
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== rS.document || !e.Element) return t.isSupported = !1, t;
|
|
22825
22950
|
let n = e.document, r = n, i = r.currentScript;
|
|
22826
22951
|
e.DocumentFragment;
|
|
22827
22952
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
22828
22953
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
22829
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
22954
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Ax(d, "cloneNode"), p = Ax(d, "remove"), m = Ax(d, "nextSibling"), h = Ax(d, "childNodes"), g = Ax(d, "parentNode"), _ = Ax(d, "shadowRoot"), v = Ax(d, "attributes"), y = o && o.prototype ? Ax(o.prototype, "nodeType") : null, b = o && o.prototype ? Ax(o.prototype, "nodeName") : null, x = o && o.prototype ? Ax(o.prototype, "ownerDocument") : null;
|
|
22830
22955
|
if (typeof a == "function") {
|
|
22831
22956
|
let e = n.createElement("template");
|
|
22832
22957
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
22833
22958
|
}
|
|
22834
22959
|
let S, C = "", w, T = !1, E = 0, D = function() {
|
|
22835
|
-
if (E > 0) throw
|
|
22960
|
+
if (E > 0) throw Cx("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
22836
22961
|
}, O = function(e) {
|
|
22837
22962
|
D(), E++;
|
|
22838
22963
|
try {
|
|
@@ -22848,21 +22973,21 @@ function Wx() {
|
|
|
22848
22973
|
E--;
|
|
22849
22974
|
}
|
|
22850
22975
|
}, A = function() {
|
|
22851
|
-
return T ||= (w =
|
|
22852
|
-
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F =
|
|
22853
|
-
t.isSupported = typeof
|
|
22854
|
-
let ne =
|
|
22855
|
-
...
|
|
22856
|
-
...
|
|
22857
|
-
...
|
|
22858
|
-
...
|
|
22859
|
-
...
|
|
22860
|
-
]), ce = null, le =
|
|
22861
|
-
...
|
|
22862
|
-
...
|
|
22863
|
-
...
|
|
22864
|
-
...
|
|
22865
|
-
]), ue = Object.seal(
|
|
22976
|
+
return T ||= (w = aS(u, i), !0), w;
|
|
22977
|
+
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F = oS();
|
|
22978
|
+
t.isSupported = typeof qb == "function" && typeof g == "function" && j && j.createHTMLDocument !== void 0;
|
|
22979
|
+
let ne = Ux, I = Wx, L = Gx, re = Kx, R = qx, ie = Yx, z = Xx, ae = Qx, oe = Jx, B = null, se = Ex({}, [
|
|
22980
|
+
...Mx,
|
|
22981
|
+
...Nx,
|
|
22982
|
+
...Px,
|
|
22983
|
+
...Ix,
|
|
22984
|
+
...Rx
|
|
22985
|
+
]), ce = null, le = Ex({}, [
|
|
22986
|
+
...zx,
|
|
22987
|
+
...Bx,
|
|
22988
|
+
...Vx,
|
|
22989
|
+
...Hx
|
|
22990
|
+
]), ue = Object.seal(ex(null, {
|
|
22866
22991
|
tagNameCheck: {
|
|
22867
22992
|
writable: !0,
|
|
22868
22993
|
configurable: !1,
|
|
@@ -22881,7 +23006,7 @@ function Wx() {
|
|
|
22881
23006
|
enumerable: !0,
|
|
22882
23007
|
value: !1
|
|
22883
23008
|
}
|
|
22884
|
-
})), de = null, V = null, fe = Object.seal(
|
|
23009
|
+
})), de = null, V = null, fe = Object.seal(ex(null, {
|
|
22885
23010
|
tagCheck: {
|
|
22886
23011
|
writable: !0,
|
|
22887
23012
|
configurable: !1,
|
|
@@ -22894,14 +23019,14 @@ function Wx() {
|
|
|
22894
23019
|
enumerable: !0,
|
|
22895
23020
|
value: null
|
|
22896
23021
|
}
|
|
22897
|
-
})), pe = !0, me = !0, he = !1, ge = !0, _e = !1, ve = !0, ye = !1, be = !1, xe = null, Se = null, Ce = !1, we = !1, Te = !1, Ee = !1, De = !0, Oe = !1, ke = "user-content-", Ae = !0, je = !1, Me = {}, H = null, Ne =
|
|
23022
|
+
})), pe = !0, me = !0, he = !1, ge = !0, _e = !1, ve = !0, ye = !1, be = !1, xe = null, Se = null, Ce = !1, we = !1, Te = !1, Ee = !1, De = !0, Oe = !1, ke = "user-content-", Ae = !0, je = !1, Me = {}, H = null, Ne = Ex({}, /* @__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(".")), Pe = null, Fe = Ex({}, [
|
|
22898
23023
|
"audio",
|
|
22899
23024
|
"video",
|
|
22900
23025
|
"img",
|
|
22901
23026
|
"source",
|
|
22902
23027
|
"image",
|
|
22903
23028
|
"track"
|
|
22904
|
-
]), Ie = null, Le =
|
|
23029
|
+
]), Ie = null, Le = Ex({}, [
|
|
22905
23030
|
"alt",
|
|
22906
23031
|
"class",
|
|
22907
23032
|
"for",
|
|
@@ -22916,17 +23041,17 @@ function Wx() {
|
|
|
22916
23041
|
"value",
|
|
22917
23042
|
"style",
|
|
22918
23043
|
"xmlns"
|
|
22919
|
-
]), Re = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", Be = "http://www.w3.org/1999/xhtml", Ve = Be, He = !1, Ue = null, We =
|
|
23044
|
+
]), Re = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", Be = "http://www.w3.org/1999/xhtml", Ve = Be, He = !1, Ue = null, We = Ex({}, [
|
|
22920
23045
|
Re,
|
|
22921
23046
|
ze,
|
|
22922
23047
|
Be
|
|
22923
|
-
],
|
|
23048
|
+
], dx), U = Qb([
|
|
22924
23049
|
"mi",
|
|
22925
23050
|
"mo",
|
|
22926
23051
|
"mn",
|
|
22927
23052
|
"ms",
|
|
22928
23053
|
"mtext"
|
|
22929
|
-
]), Ge =
|
|
23054
|
+
]), Ge = Ex({}, U), Ke = Qb(["annotation-xml"]), qe = Ex({}, Ke), Je = Ex({}, [
|
|
22930
23055
|
"title",
|
|
22931
23056
|
"style",
|
|
22932
23057
|
"font",
|
|
@@ -22937,21 +23062,21 @@ function Wx() {
|
|
|
22937
23062
|
}, et = function() {
|
|
22938
23063
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22939
23064
|
if (W && W === e) return;
|
|
22940
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
23065
|
+
(!e || typeof e != "object") && (e = {}), e = Ox(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? dx : ux, B = sS(e, "ALLOWED_TAGS", se, { transform: Ze }), ce = sS(e, "ALLOWED_ATTR", le, { transform: Ze }), Ue = sS(e, "ALLOWED_NAMESPACES", We, { transform: dx }), Ie = sS(e, "ADD_URI_SAFE_ATTR", Le, {
|
|
22941
23066
|
transform: Ze,
|
|
22942
23067
|
base: Le
|
|
22943
|
-
}), Pe =
|
|
23068
|
+
}), Pe = sS(e, "ADD_DATA_URI_TAGS", Fe, {
|
|
22944
23069
|
transform: Ze,
|
|
22945
23070
|
base: Fe
|
|
22946
|
-
}), H =
|
|
22947
|
-
let t =
|
|
22948
|
-
if (ue =
|
|
23071
|
+
}), H = sS(e, "FORBID_CONTENTS", Ne, { transform: Ze }), de = sS(e, "FORBID_TAGS", Ox({}), { transform: Ze }), V = sS(e, "FORBID_ATTR", Ox({}), { transform: Ze }), Me = bx(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Ox(e.USE_PROFILES) : e.USE_PROFILES : !1, pe = e.ALLOW_ARIA_ATTR !== !1, me = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = e.SAFE_FOR_TEMPLATES || !1, ve = e.SAFE_FOR_XML !== !1, ye = e.WHOLE_DOCUMENT || !1, we = e.RETURN_DOM || !1, Te = e.RETURN_DOM_FRAGMENT || !1, Ee = e.RETURN_TRUSTED_TYPE || !1, Ce = e.FORCE_BODY || !1, De = e.SANITIZE_DOM !== !1, Oe = e.SANITIZE_NAMED_PROPS || !1, Ae = e.KEEP_CONTENT !== !1, je = e.IN_PLACE || !1, oe = jx(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Jx, Ve = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Be, Ge = bx(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Ox(e.MATHML_TEXT_INTEGRATION_POINTS) : Ex({}, U), qe = bx(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? Ox(e.HTML_INTEGRATION_POINTS) : Ex({}, Ke);
|
|
23072
|
+
let t = bx(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? Ox(e.CUSTOM_ELEMENT_HANDLING) : ex(null);
|
|
23073
|
+
if (ue = ex(null), bx(t, "tagNameCheck") && $e(t.tagNameCheck) && (ue.tagNameCheck = t.tagNameCheck), bx(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (ue.attributeNameCheck = t.attributeNameCheck), bx(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), $b(ue), _e && (me = !1), Te && (we = !0), Me && (B = Ex({}, Rx), ce = ex(null), Me.html === !0 && (Ex(B, Mx), Ex(ce, zx)), Me.svg === !0 && (Ex(B, Nx), Ex(ce, Bx), Ex(ce, Hx)), Me.svgFilters === !0 && (Ex(B, Px), Ex(ce, Bx), Ex(ce, Hx)), Me.mathMl === !0 && (Ex(B, Ix), Ex(ce, Vx), Ex(ce, Hx))), fe.tagCheck = null, fe.attributeCheck = null, bx(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? fe.tagCheck = e.ADD_TAGS : lx(e.ADD_TAGS) && (B === se && (B = Ox(B)), Ex(B, e.ADD_TAGS, Ze))), bx(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? fe.attributeCheck = e.ADD_ATTR : lx(e.ADD_ATTR) && (ce === le && (ce = Ox(ce)), Ex(ce, e.ADD_ATTR, Ze))), bx(e, "ADD_URI_SAFE_ATTR") && lx(e.ADD_URI_SAFE_ATTR) && Ex(Ie, e.ADD_URI_SAFE_ATTR, Ze), bx(e, "FORBID_CONTENTS") && lx(e.FORBID_CONTENTS) && (H === Ne && (H = Ox(H)), Ex(H, e.FORBID_CONTENTS, Ze)), bx(e, "ADD_FORBID_CONTENTS") && lx(e.ADD_FORBID_CONTENTS) && (H === Ne && (H = Ox(H)), Ex(H, e.ADD_FORBID_CONTENTS, Ze)), Ae && (B["#text"] = !0), ye && Ex(B, [
|
|
22949
23074
|
"html",
|
|
22950
23075
|
"head",
|
|
22951
23076
|
"body"
|
|
22952
|
-
]), B.table && (
|
|
22953
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
22954
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
23077
|
+
]), B.table && (Ex(B, ["tbody"]), delete de.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
23078
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Cx("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
23079
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Cx("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
22955
23080
|
let t = S;
|
|
22956
23081
|
S = e.TRUSTED_TYPES_POLICY;
|
|
22957
23082
|
try {
|
|
@@ -22960,12 +23085,12 @@ function Wx() {
|
|
|
22960
23085
|
throw S = t, e;
|
|
22961
23086
|
}
|
|
22962
23087
|
} else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = A()), S && typeof C == "string" && (C = O("")));
|
|
22963
|
-
|
|
22964
|
-
}, tt =
|
|
22965
|
-
...
|
|
22966
|
-
...
|
|
22967
|
-
...
|
|
22968
|
-
]), nt =
|
|
23088
|
+
Qb && Qb(e), W = e;
|
|
23089
|
+
}, tt = Ex({}, [
|
|
23090
|
+
...Nx,
|
|
23091
|
+
...Px,
|
|
23092
|
+
...Fx
|
|
23093
|
+
]), nt = Ex({}, [...Ix, ...Lx]), rt = function(e, t, n) {
|
|
22969
23094
|
return t.namespaceURI === Be ? e === "svg" : t.namespaceURI === Re ? e === "svg" && (n === "annotation-xml" || Ge[n]) : !!tt[e];
|
|
22970
23095
|
}, it = function(e, t, n) {
|
|
22971
23096
|
return t.namespaceURI === Be ? e === "math" : t.namespaceURI === ze ? e === "math" && qe[n] : !!nt[e];
|
|
@@ -22977,23 +23102,23 @@ function Wx() {
|
|
|
22977
23102
|
namespaceURI: Ve,
|
|
22978
23103
|
tagName: "template"
|
|
22979
23104
|
});
|
|
22980
|
-
let n =
|
|
23105
|
+
let n = ux(e.tagName), r = ux(t.tagName);
|
|
22981
23106
|
return Ue[e.namespaceURI] ? e.namespaceURI === ze ? rt(n, t, r) : e.namespaceURI === Re ? it(n, t, r) : e.namespaceURI === Be ? at(n, t, r) : !!(Ye === "application/xhtml+xml" && Ue[e.namespaceURI]) : !1;
|
|
22982
23107
|
}, st = function(e) {
|
|
22983
|
-
|
|
23108
|
+
sx(t.removed, { element: e });
|
|
22984
23109
|
try {
|
|
22985
23110
|
g(e).removeChild(e);
|
|
22986
23111
|
} catch {
|
|
22987
|
-
if (p(e), !g(e)) throw
|
|
23112
|
+
if (p(e), !g(e)) throw Cx("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
22988
23113
|
}
|
|
22989
23114
|
}, ct = function(e) {
|
|
22990
23115
|
dt(e);
|
|
22991
23116
|
let t = h(e);
|
|
22992
23117
|
if (t) {
|
|
22993
23118
|
let e = [];
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
}),
|
|
23119
|
+
ix(t, (t) => {
|
|
23120
|
+
sx(e, t);
|
|
23121
|
+
}), ix(e, (e) => {
|
|
22997
23122
|
try {
|
|
22998
23123
|
p(e);
|
|
22999
23124
|
} catch {}
|
|
@@ -23008,12 +23133,12 @@ function Wx() {
|
|
|
23008
23133
|
}
|
|
23009
23134
|
}, lt = function(e, n) {
|
|
23010
23135
|
try {
|
|
23011
|
-
|
|
23136
|
+
sx(t.removed, {
|
|
23012
23137
|
attribute: n.getAttributeNode(e),
|
|
23013
23138
|
from: n
|
|
23014
23139
|
});
|
|
23015
23140
|
} catch {
|
|
23016
|
-
|
|
23141
|
+
sx(t.removed, {
|
|
23017
23142
|
attribute: null,
|
|
23018
23143
|
from: n
|
|
23019
23144
|
});
|
|
@@ -23036,7 +23161,7 @@ function Wx() {
|
|
|
23036
23161
|
let t = [e];
|
|
23037
23162
|
for (; t.length > 0;) {
|
|
23038
23163
|
let e = t.pop();
|
|
23039
|
-
(y ? y(e) : e.nodeType) ===
|
|
23164
|
+
(y ? y(e) : e.nodeType) === rS.element && ut(e);
|
|
23040
23165
|
let n = h(e);
|
|
23041
23166
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
23042
23167
|
}
|
|
@@ -23045,13 +23170,13 @@ function Wx() {
|
|
|
23045
23170
|
let t = [e];
|
|
23046
23171
|
for (; t.length > 0;) {
|
|
23047
23172
|
let e = t.pop(), n = y ? y(e) : e.nodeType;
|
|
23048
|
-
if (n ===
|
|
23173
|
+
if (n === rS.processingInstruction || n === rS.comment && Sx(eS, e.data)) {
|
|
23049
23174
|
try {
|
|
23050
23175
|
p(e);
|
|
23051
23176
|
} catch {}
|
|
23052
23177
|
continue;
|
|
23053
23178
|
}
|
|
23054
|
-
if (n ===
|
|
23179
|
+
if (n === rS.element) {
|
|
23055
23180
|
let t = e, n = Ze(b ? b(e) : e.nodeName);
|
|
23056
23181
|
try {
|
|
23057
23182
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
@@ -23064,7 +23189,7 @@ function Wx() {
|
|
|
23064
23189
|
let t = null, r = null;
|
|
23065
23190
|
if (Ce) e = "<remove></remove>" + e;
|
|
23066
23191
|
else {
|
|
23067
|
-
let t =
|
|
23192
|
+
let t = fx(e, /^[\r\n\t ]+/);
|
|
23068
23193
|
r = t && t[0];
|
|
23069
23194
|
}
|
|
23070
23195
|
Ye === "application/xhtml+xml" && Ve === Be && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
@@ -23084,13 +23209,13 @@ function Wx() {
|
|
|
23084
23209
|
let t = x ? x(e) : e.ownerDocument;
|
|
23085
23210
|
return M.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
23086
23211
|
}, ht = function(e) {
|
|
23087
|
-
return e =
|
|
23212
|
+
return e = px(e, ne, " "), e = px(e, I, " "), e = px(e, L, " "), e;
|
|
23088
23213
|
}, gt = function(e) {
|
|
23089
23214
|
e.normalize();
|
|
23090
23215
|
let t = x ? x(e) : e.ownerDocument, n = M.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
23091
23216
|
for (; r;) r.data = ht(r.data), r = n.nextNode();
|
|
23092
23217
|
let i = e.querySelectorAll?.call(e, "template");
|
|
23093
|
-
i &&
|
|
23218
|
+
i && ix(i, (e) => {
|
|
23094
23219
|
vt(e.content) && gt(e.content);
|
|
23095
23220
|
});
|
|
23096
23221
|
}, _t = function(e) {
|
|
@@ -23099,7 +23224,7 @@ function Wx() {
|
|
|
23099
23224
|
}, vt = function(e) {
|
|
23100
23225
|
if (!y || typeof e != "object" || !e) return !1;
|
|
23101
23226
|
try {
|
|
23102
|
-
return y(e) ===
|
|
23227
|
+
return y(e) === rS.documentFragment;
|
|
23103
23228
|
} catch {
|
|
23104
23229
|
return !1;
|
|
23105
23230
|
}
|
|
@@ -23112,14 +23237,14 @@ function Wx() {
|
|
|
23112
23237
|
}
|
|
23113
23238
|
};
|
|
23114
23239
|
function bt(e, n, r) {
|
|
23115
|
-
e.length !== 0 &&
|
|
23240
|
+
e.length !== 0 && ix(e, (e) => {
|
|
23116
23241
|
e.call(t, n, r, W);
|
|
23117
23242
|
});
|
|
23118
23243
|
}
|
|
23119
23244
|
let xt = function(e, t) {
|
|
23120
|
-
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) &&
|
|
23245
|
+
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) && Sx($x, e.textContent) && Sx($x, e.innerHTML) || ve && e.namespaceURI === Be && t === "style" && yt(e.firstElementChild) || e.nodeType === rS.processingInstruction || ve && e.nodeType === rS.comment && Sx(eS, e.data));
|
|
23121
23246
|
}, St = function(e, t, n) {
|
|
23122
|
-
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp &&
|
|
23247
|
+
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp && Sx(ue.tagNameCheck, t) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(t))) return !1;
|
|
23123
23248
|
if (Ae && !H[t]) {
|
|
23124
23249
|
let t = g(e), r = h(e);
|
|
23125
23250
|
if (r && t) {
|
|
@@ -23132,7 +23257,7 @@ function Wx() {
|
|
|
23132
23257
|
}
|
|
23133
23258
|
return st(e), !0;
|
|
23134
23259
|
}, Ct = function(e, t, n, r) {
|
|
23135
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
23260
|
+
return e.length === 0 ? t : t === n || t === r ? Ox(t) : t;
|
|
23136
23261
|
}, wt = function(e, n) {
|
|
23137
23262
|
if (bt(F.beforeSanitizeElements, e, null), e !== n && g(e) === null) return je && dt(e), !0;
|
|
23138
23263
|
if (_t(e)) return st(e), !0;
|
|
@@ -23146,22 +23271,22 @@ function Wx() {
|
|
|
23146
23271
|
let t = St(e, r, n);
|
|
23147
23272
|
return t === !1 && bt(F.afterSanitizeElements, e, null), t;
|
|
23148
23273
|
}
|
|
23149
|
-
if ((y ? y(e) : e.nodeType) ===
|
|
23150
|
-
if (_e && e.nodeType ===
|
|
23274
|
+
if ((y ? y(e) : e.nodeType) === rS.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Sx(tS, e.innerHTML)) return st(e), !0;
|
|
23275
|
+
if (_e && e.nodeType === rS.text) {
|
|
23151
23276
|
let n = ht(e.textContent);
|
|
23152
|
-
e.textContent !== n && (
|
|
23277
|
+
e.textContent !== n && (sx(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
23153
23278
|
}
|
|
23154
23279
|
return bt(F.afterSanitizeElements, e, null), !1;
|
|
23155
23280
|
}, Tt = function(e, t, r) {
|
|
23156
23281
|
if (V[t] || ve && t === "patchsrc" || ve && t === "for" && e !== "label" && e !== "output" || De && (t === "id" || t === "name") && (r in n || r in Qe)) return !1;
|
|
23157
23282
|
let i = ce[t] || fe.attributeCheck instanceof Function && fe.attributeCheck(t, e);
|
|
23158
|
-
if (!(me &&
|
|
23283
|
+
if (!(me && Sx(re, t)) && !(pe && Sx(R, t))) {
|
|
23159
23284
|
if (!i) {
|
|
23160
|
-
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp &&
|
|
23161
|
-
} else if (!Ie[t] && !
|
|
23285
|
+
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp && Sx(ue.tagNameCheck, e) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(e)) && (ue.attributeNameCheck instanceof RegExp && Sx(ue.attributeNameCheck, t) || ue.attributeNameCheck instanceof Function && ue.attributeNameCheck(t, e)) || t === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && Sx(ue.tagNameCheck, r) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(r)))) return !1;
|
|
23286
|
+
} else if (!Ie[t] && !Sx(oe, px(r, z, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && mx(r, "data:") === 0 && Pe[e]) && !(he && !Sx(ie, px(r, z, ""))) && r) return !1;
|
|
23162
23287
|
}
|
|
23163
23288
|
return !0;
|
|
23164
|
-
}, Et =
|
|
23289
|
+
}, Et = Ex({}, [
|
|
23165
23290
|
"annotation-xml",
|
|
23166
23291
|
"color-profile",
|
|
23167
23292
|
"font-face",
|
|
@@ -23171,7 +23296,7 @@ function Wx() {
|
|
|
23171
23296
|
"font-face-uri",
|
|
23172
23297
|
"missing-glyph"
|
|
23173
23298
|
]), Dt = function(e) {
|
|
23174
|
-
return !Et[
|
|
23299
|
+
return !Et[ux(e)] && Sx(ae, e);
|
|
23175
23300
|
}, G = function(e, t, n, r) {
|
|
23176
23301
|
if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
23177
23302
|
case "TrustedHTML": return O(r);
|
|
@@ -23180,7 +23305,7 @@ function Wx() {
|
|
|
23180
23305
|
return r;
|
|
23181
23306
|
}, Ot = function(e, n, r, i) {
|
|
23182
23307
|
try {
|
|
23183
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) :
|
|
23308
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) : ox(t.removed);
|
|
23184
23309
|
} catch {
|
|
23185
23310
|
lt(n, e);
|
|
23186
23311
|
}
|
|
@@ -23197,12 +23322,12 @@ function Wx() {
|
|
|
23197
23322
|
forceKeepAttr: void 0
|
|
23198
23323
|
}, r = t.length, i = Ze(e.nodeName);
|
|
23199
23324
|
for (; r--;) {
|
|
23200
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u :
|
|
23201
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Oe && (l === "id" || l === "name") &&
|
|
23325
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : hx(u);
|
|
23326
|
+
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Oe && (l === "id" || l === "name") && mx(d, ke) !== 0 && (lt(o, e), d = ke + d), ve && Sx(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
23202
23327
|
lt(o, e);
|
|
23203
23328
|
continue;
|
|
23204
23329
|
}
|
|
23205
|
-
if (l === "attributename" &&
|
|
23330
|
+
if (l === "attributename" && fx(d, "href")) {
|
|
23206
23331
|
lt(o, e);
|
|
23207
23332
|
continue;
|
|
23208
23333
|
}
|
|
@@ -23211,7 +23336,7 @@ function Wx() {
|
|
|
23211
23336
|
lt(o, e);
|
|
23212
23337
|
continue;
|
|
23213
23338
|
}
|
|
23214
|
-
if (!ge &&
|
|
23339
|
+
if (!ge && Sx(nS, d)) {
|
|
23215
23340
|
lt(o, e);
|
|
23216
23341
|
continue;
|
|
23217
23342
|
}
|
|
@@ -23225,7 +23350,7 @@ function Wx() {
|
|
|
23225
23350
|
bt(F.afterSanitizeAttributes, e, null);
|
|
23226
23351
|
}, At = function(e) {
|
|
23227
23352
|
let t = null, n = mt(e);
|
|
23228
|
-
for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), kt(t), vt(t.content) && At(t.content), (y ? y(t) : t.nodeType) ===
|
|
23353
|
+
for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), kt(t), vt(t.content) && At(t.content), (y ? y(t) : t.nodeType) === rS.element) {
|
|
23229
23354
|
let e = _(t);
|
|
23230
23355
|
vt(e) && (jt(e), At(e));
|
|
23231
23356
|
}
|
|
@@ -23241,7 +23366,7 @@ function Wx() {
|
|
|
23241
23366
|
At(e.shadow);
|
|
23242
23367
|
continue;
|
|
23243
23368
|
}
|
|
23244
|
-
let n = e.node, r = (y ? y(n) : n.nodeType) ===
|
|
23369
|
+
let n = e.node, r = (y ? y(n) : n.nodeType) === rS.element, i = h(n);
|
|
23245
23370
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
23246
23371
|
node: i[e],
|
|
23247
23372
|
shadow: null
|
|
@@ -23270,24 +23395,24 @@ function Wx() {
|
|
|
23270
23395
|
};
|
|
23271
23396
|
return t.sanitize = function(e) {
|
|
23272
23397
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
23273
|
-
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e =
|
|
23398
|
+
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = kx(e), typeof e != "string")) throw Cx("dirty is not a string, aborting");
|
|
23274
23399
|
if (!t.isSupported) return e;
|
|
23275
|
-
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B =
|
|
23400
|
+
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B = Ox(B)), F.uponSanitizeAttribute.length > 0 && (ce = Ox(ce)), t.removed = [];
|
|
23276
23401
|
let c = je && typeof e != "string" && yt(e);
|
|
23277
23402
|
if (c) {
|
|
23278
23403
|
ft(e);
|
|
23279
23404
|
let t = b ? b(e) : e.nodeName;
|
|
23280
23405
|
if (typeof t == "string") {
|
|
23281
23406
|
let n = Ze(t);
|
|
23282
|
-
if (!B[n] || de[n]) throw ct(e),
|
|
23407
|
+
if (!B[n] || de[n]) throw ct(e), Cx("root node is forbidden and cannot be sanitized in-place");
|
|
23283
23408
|
}
|
|
23284
|
-
if (_t(e)) throw ct(e),
|
|
23409
|
+
if (_t(e)) throw ct(e), Cx("root node is clobbered and cannot be sanitized in-place");
|
|
23285
23410
|
try {
|
|
23286
23411
|
jt(e);
|
|
23287
23412
|
} catch (t) {
|
|
23288
23413
|
throw ct(e), t;
|
|
23289
23414
|
}
|
|
23290
|
-
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType ===
|
|
23415
|
+
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === rS.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), jt(a);
|
|
23291
23416
|
else {
|
|
23292
23417
|
if (!we && !_e && !ye && e.indexOf("<") === -1) return S && Ee ? O(e) : e;
|
|
23293
23418
|
if (i = pt(e), !i) return we ? null : Ee ? C : "";
|
|
@@ -23298,11 +23423,11 @@ function Wx() {
|
|
|
23298
23423
|
let e = mt(l);
|
|
23299
23424
|
for (; o = e.nextNode();) wt(o, l), kt(o), vt(o.content) && At(o.content);
|
|
23300
23425
|
} catch (n) {
|
|
23301
|
-
throw c && (ct(e),
|
|
23426
|
+
throw c && (ct(e), ix(t.removed, (e) => {
|
|
23302
23427
|
e.element && dt(e.element);
|
|
23303
23428
|
})), n;
|
|
23304
23429
|
}
|
|
23305
|
-
if (c) return
|
|
23430
|
+
if (c) return ix(t.removed, (e) => {
|
|
23306
23431
|
e.element && dt(e.element);
|
|
23307
23432
|
}), _e && gt(e), e;
|
|
23308
23433
|
if (we) {
|
|
@@ -23311,7 +23436,7 @@ function Wx() {
|
|
|
23311
23436
|
return (ce.shadowroot || ce.shadowrootmode) && (s = P.call(r, s, !0)), s;
|
|
23312
23437
|
}
|
|
23313
23438
|
let u = ye ? i.outerHTML : i.innerHTML;
|
|
23314
|
-
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name &&
|
|
23439
|
+
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Sx(Zx, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), _e && (u = ht(u)), S && Ee ? O(u) : u;
|
|
23315
23440
|
}, t.setConfig = function() {
|
|
23316
23441
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23317
23442
|
et(e), be = !0, xe = B, Se = ce;
|
|
@@ -23322,77 +23447,77 @@ function Wx() {
|
|
|
23322
23447
|
let r = Ze(e), i = Ze(t);
|
|
23323
23448
|
return Tt(r, i, n);
|
|
23324
23449
|
}, t.addHook = function(e, t) {
|
|
23325
|
-
typeof t == "function" &&
|
|
23450
|
+
typeof t == "function" && bx(F, e) && sx(F[e], t);
|
|
23326
23451
|
}, t.removeHook = function(e, t) {
|
|
23327
|
-
if (
|
|
23452
|
+
if (bx(F, e)) {
|
|
23328
23453
|
if (t !== void 0) {
|
|
23329
|
-
let n =
|
|
23330
|
-
return n === -1 ? void 0 :
|
|
23454
|
+
let n = ax(F[e], t);
|
|
23455
|
+
return n === -1 ? void 0 : cx(F[e], n, 1)[0];
|
|
23331
23456
|
}
|
|
23332
|
-
return
|
|
23457
|
+
return ox(F[e]);
|
|
23333
23458
|
}
|
|
23334
23459
|
}, t.removeHooks = function(e) {
|
|
23335
|
-
|
|
23460
|
+
bx(F, e) && (F[e] = []);
|
|
23336
23461
|
}, t.removeAllHooks = function() {
|
|
23337
|
-
F =
|
|
23462
|
+
F = oS();
|
|
23338
23463
|
}, t;
|
|
23339
23464
|
}
|
|
23340
|
-
var
|
|
23465
|
+
var lS = cS();
|
|
23341
23466
|
//#endregion
|
|
23342
23467
|
//#region src/core/composables/useMarkdown.ts
|
|
23343
|
-
|
|
23468
|
+
nb.setOptions({
|
|
23344
23469
|
breaks: !0,
|
|
23345
23470
|
gfm: !0
|
|
23346
23471
|
});
|
|
23347
|
-
var
|
|
23348
|
-
|
|
23472
|
+
var uS = 2e4, dS = new nb.Renderer();
|
|
23473
|
+
dS.code = ({ text: e, lang: t }) => {
|
|
23349
23474
|
let n = (t || "").trim() || "plaintext", r = "";
|
|
23350
|
-
if (e.length > 2e4) r =
|
|
23475
|
+
if (e.length > 2e4) r = pS(e);
|
|
23351
23476
|
else try {
|
|
23352
|
-
r =
|
|
23477
|
+
r = Bb.highlight(e, {
|
|
23353
23478
|
language: n,
|
|
23354
23479
|
ignoreIllegals: !0
|
|
23355
23480
|
}).value;
|
|
23356
23481
|
} catch {
|
|
23357
|
-
r =
|
|
23482
|
+
r = pS(e);
|
|
23358
23483
|
}
|
|
23359
|
-
let i = encodeURIComponent(e), a =
|
|
23484
|
+
let i = encodeURIComponent(e), a = fS(n);
|
|
23360
23485
|
return `<pre class="code-block" data-lang="${a}" data-code="${i}"><code class="hljs language-${a}">${r}</code></pre>`;
|
|
23361
23486
|
};
|
|
23362
|
-
function
|
|
23487
|
+
function fS(e) {
|
|
23363
23488
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
23364
23489
|
}
|
|
23365
|
-
function
|
|
23490
|
+
function pS(e) {
|
|
23366
23491
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
23367
23492
|
}
|
|
23368
|
-
var
|
|
23493
|
+
var mS = { ADD_ATTR: [
|
|
23369
23494
|
"data-code",
|
|
23370
23495
|
"data-lang",
|
|
23371
23496
|
"target",
|
|
23372
23497
|
"rel"
|
|
23373
23498
|
] };
|
|
23374
|
-
function
|
|
23375
|
-
return
|
|
23499
|
+
function hS(e) {
|
|
23500
|
+
return lS.sanitize(e, mS);
|
|
23376
23501
|
}
|
|
23377
|
-
function
|
|
23378
|
-
return
|
|
23502
|
+
function gS(e) {
|
|
23503
|
+
return nb.parse(e || "", { renderer: dS });
|
|
23379
23504
|
}
|
|
23380
|
-
function
|
|
23381
|
-
return
|
|
23505
|
+
function _S(e) {
|
|
23506
|
+
return hS(gS(e));
|
|
23382
23507
|
}
|
|
23383
|
-
var
|
|
23384
|
-
function
|
|
23385
|
-
let t = /* @__PURE__ */ wn(
|
|
23508
|
+
var vS = 100, yS = 2e3;
|
|
23509
|
+
function bS(e) {
|
|
23510
|
+
let t = /* @__PURE__ */ wn(_S(e())), n = 0, r = null;
|
|
23386
23511
|
function i() {
|
|
23387
|
-
r = null, n = Date.now(), t.value =
|
|
23512
|
+
r = null, n = Date.now(), t.value = _S(e());
|
|
23388
23513
|
}
|
|
23389
23514
|
return ni(e, () => {
|
|
23390
23515
|
let a = e();
|
|
23391
|
-
if (a.length <=
|
|
23392
|
-
r &&= (clearTimeout(r), null), n = Date.now(), t.value =
|
|
23516
|
+
if (a.length <= yS) {
|
|
23517
|
+
r &&= (clearTimeout(r), null), n = Date.now(), t.value = _S(a);
|
|
23393
23518
|
return;
|
|
23394
23519
|
}
|
|
23395
|
-
let o = n +
|
|
23520
|
+
let o = n + vS - Date.now();
|
|
23396
23521
|
o <= 0 ? (r &&= (clearTimeout(r), null), i()) : r ||= setTimeout(i, o);
|
|
23397
23522
|
}), Ze(() => {
|
|
23398
23523
|
r &&= (clearTimeout(r), null);
|
|
@@ -23410,20 +23535,20 @@ function nS(e) {
|
|
|
23410
23535
|
}
|
|
23411
23536
|
//#endregion
|
|
23412
23537
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
23413
|
-
var
|
|
23538
|
+
var xS = { class: "code-preview-modal" }, SS = { class: "preview-header" }, CS = { class: "preview-title" }, wS = { class: "preview-tabs" }, TS = ["disabled"], ES = { class: "preview-actions" }, DS = ["title"], OS = {
|
|
23414
23539
|
key: 0,
|
|
23415
23540
|
viewBox: "0 0 16 16",
|
|
23416
23541
|
fill: "none",
|
|
23417
23542
|
"aria-hidden": "true"
|
|
23418
|
-
},
|
|
23543
|
+
}, kS = {
|
|
23419
23544
|
key: 1,
|
|
23420
23545
|
viewBox: "0 0 16 16",
|
|
23421
23546
|
fill: "none",
|
|
23422
23547
|
"aria-hidden": "true"
|
|
23423
|
-
},
|
|
23548
|
+
}, AS = { class: "preview-body" }, jS = ["srcdoc"], MS = {
|
|
23424
23549
|
key: 1,
|
|
23425
23550
|
class: "preview-source"
|
|
23426
|
-
},
|
|
23551
|
+
}, NS = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23427
23552
|
__name: "CodePreview",
|
|
23428
23553
|
props: {
|
|
23429
23554
|
code: {},
|
|
@@ -23482,28 +23607,28 @@ app.mount('#app');
|
|
|
23482
23607
|
return (t, n) => (Y(), X("div", {
|
|
23483
23608
|
class: "code-preview-overlay",
|
|
23484
23609
|
onClick: n[3] ||= yl((e) => r("close"), ["self"])
|
|
23485
|
-
}, [Z("div",
|
|
23486
|
-
Z("span",
|
|
23487
|
-
Z("div",
|
|
23610
|
+
}, [Z("div", xS, [Z("div", SS, [
|
|
23611
|
+
Z("span", CS, "代码预览 · " + U(e.lang), 1),
|
|
23612
|
+
Z("div", wS, [Z("button", {
|
|
23488
23613
|
class: H({ active: a.value === "preview" }),
|
|
23489
23614
|
disabled: !s.value,
|
|
23490
23615
|
onClick: n[0] ||= (e) => a.value = "preview"
|
|
23491
|
-
}, "预览", 10,
|
|
23616
|
+
}, "预览", 10, TS), Z("button", {
|
|
23492
23617
|
class: H({ active: a.value === "source" }),
|
|
23493
23618
|
onClick: n[1] ||= (e) => a.value = "source"
|
|
23494
23619
|
}, "源码", 2)]),
|
|
23495
|
-
Z("div",
|
|
23620
|
+
Z("div", ES, [
|
|
23496
23621
|
Z("button", {
|
|
23497
23622
|
class: H(["icon-btn", { done: o.value }]),
|
|
23498
23623
|
title: o.value ? "已复制" : "复制代码",
|
|
23499
23624
|
onClick: u
|
|
23500
|
-
}, [o.value ? (Y(), X("svg",
|
|
23625
|
+
}, [o.value ? (Y(), X("svg", OS, [...n[4] ||= [Z("path", {
|
|
23501
23626
|
d: "M3 8.5l3 3 7-7",
|
|
23502
23627
|
stroke: "currentColor",
|
|
23503
23628
|
"stroke-width": "1.6",
|
|
23504
23629
|
"stroke-linecap": "round",
|
|
23505
23630
|
"stroke-linejoin": "round"
|
|
23506
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
23631
|
+
}, null, -1)]])) : (Y(), X("svg", kS, [...n[5] ||= [Z("rect", {
|
|
23507
23632
|
x: "5.5",
|
|
23508
23633
|
y: "5.5",
|
|
23509
23634
|
width: "8",
|
|
@@ -23515,7 +23640,7 @@ app.mount('#app');
|
|
|
23515
23640
|
d: "M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3.5A1.5 1.5 0 0 0 2 3v5.5A1.5 1.5 0 0 0 3.5 10H4",
|
|
23516
23641
|
stroke: "currentColor",
|
|
23517
23642
|
"stroke-width": "1.3"
|
|
23518
|
-
}, null, -1)]]))], 10,
|
|
23643
|
+
}, null, -1)]]))], 10, DS),
|
|
23519
23644
|
Z("button", {
|
|
23520
23645
|
class: "icon-btn",
|
|
23521
23646
|
title: "新窗口打开",
|
|
@@ -23551,20 +23676,20 @@ app.mount('#app');
|
|
|
23551
23676
|
"stroke-linecap": "round"
|
|
23552
23677
|
})], -1)]])
|
|
23553
23678
|
])
|
|
23554
|
-
]), Z("div",
|
|
23679
|
+
]), Z("div", AS, [a.value === "preview" && s.value ? (Y(), X("iframe", {
|
|
23555
23680
|
key: 0,
|
|
23556
23681
|
ref_key: "iframeRef",
|
|
23557
23682
|
ref: i,
|
|
23558
23683
|
class: "preview-iframe",
|
|
23559
23684
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
23560
23685
|
srcdoc: c.value
|
|
23561
|
-
}, null, 8,
|
|
23686
|
+
}, null, 8, jS)) : (Y(), X("pre", MS, [Z("code", null, U(e.code), 1)]))])])]));
|
|
23562
23687
|
}
|
|
23563
|
-
}), [["__scopeId", "data-v-bf0ccf96"]]),
|
|
23688
|
+
}), [["__scopeId", "data-v-bf0ccf96"]]), PS = ["innerHTML"], FS = /* @__PURE__ */ Fi({
|
|
23564
23689
|
__name: "MessageContent",
|
|
23565
23690
|
props: { content: {} },
|
|
23566
23691
|
setup(e) {
|
|
23567
|
-
let t = e, { html: n, codeBlocks: r } =
|
|
23692
|
+
let t = e, { html: n, codeBlocks: r } = bS(() => t.content), i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn(null), o = [
|
|
23568
23693
|
"html",
|
|
23569
23694
|
"htm",
|
|
23570
23695
|
"vue",
|
|
@@ -23637,17 +23762,17 @@ app.mount('#app');
|
|
|
23637
23762
|
ref_key: "containerRef",
|
|
23638
23763
|
ref: i,
|
|
23639
23764
|
innerHTML: K(n)
|
|
23640
|
-
}, null, 8,
|
|
23765
|
+
}, null, 8, PS), (Y(), as(_i, { to: "body" }, [a.value ? (Y(), as(NS, {
|
|
23641
23766
|
key: 0,
|
|
23642
23767
|
code: a.value.code,
|
|
23643
23768
|
lang: a.value.lang,
|
|
23644
23769
|
onClose: t[0] ||= (e) => a.value = null
|
|
23645
23770
|
}, null, 8, ["code", "lang"])) : Q("", !0)]))], 64));
|
|
23646
23771
|
}
|
|
23647
|
-
}),
|
|
23772
|
+
}), IS = {
|
|
23648
23773
|
key: 0,
|
|
23649
23774
|
class: "stream-cursor"
|
|
23650
|
-
},
|
|
23775
|
+
}, LS = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23651
23776
|
__name: "MessageBubble",
|
|
23652
23777
|
props: {
|
|
23653
23778
|
content: {},
|
|
@@ -23657,43 +23782,43 @@ app.mount('#app');
|
|
|
23657
23782
|
showCursor: { type: Boolean }
|
|
23658
23783
|
},
|
|
23659
23784
|
setup(e) {
|
|
23660
|
-
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: H(["typing-dot", { pulse: e.showTyping }]) }, null, 2), n[0] ||= Z("span", { class: "typing-text" }, "思考中...", -1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), as(
|
|
23785
|
+
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: H(["typing-dot", { pulse: e.showTyping }]) }, null, 2), n[0] ||= Z("span", { class: "typing-text" }, "思考中...", -1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), as(FS, {
|
|
23661
23786
|
key: 0,
|
|
23662
23787
|
content: e.content
|
|
23663
|
-
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span",
|
|
23788
|
+
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", IS)) : Q("", !0)], 64));
|
|
23664
23789
|
}
|
|
23665
|
-
}), [["__scopeId", "data-v-c38029d9"]]),
|
|
23790
|
+
}), [["__scopeId", "data-v-c38029d9"]]), RS = { class: "message-time" }, zS = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23666
23791
|
__name: "MessageTime",
|
|
23667
23792
|
props: { time: {} },
|
|
23668
23793
|
setup(e) {
|
|
23669
|
-
return (t, n) => (Y(), X("div",
|
|
23794
|
+
return (t, n) => (Y(), X("div", RS, U(e.time), 1));
|
|
23670
23795
|
}
|
|
23671
|
-
}), [["__scopeId", "data-v-4a976e4a"]]),
|
|
23796
|
+
}), [["__scopeId", "data-v-4a976e4a"]]), BS = { class: "msg-actions" }, VS = ["title"], HS = {
|
|
23672
23797
|
key: 0,
|
|
23673
23798
|
viewBox: "0 0 16 16",
|
|
23674
23799
|
fill: "none",
|
|
23675
23800
|
"aria-hidden": "true"
|
|
23676
|
-
},
|
|
23801
|
+
}, US = {
|
|
23677
23802
|
key: 1,
|
|
23678
23803
|
viewBox: "0 0 16 16",
|
|
23679
23804
|
fill: "none",
|
|
23680
23805
|
"aria-hidden": "true"
|
|
23681
|
-
},
|
|
23806
|
+
}, WS = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23682
23807
|
__name: "MessageActions",
|
|
23683
23808
|
props: { copied: { type: Boolean } },
|
|
23684
23809
|
emits: ["copy", "regenerate"],
|
|
23685
23810
|
setup(e) {
|
|
23686
|
-
return (t, n) => (Y(), X("div",
|
|
23811
|
+
return (t, n) => (Y(), X("div", BS, [Z("button", {
|
|
23687
23812
|
class: H(["msg-action-btn", { done: e.copied }]),
|
|
23688
23813
|
title: e.copied ? "已复制" : "复制",
|
|
23689
23814
|
onClick: n[0] ||= (e) => t.$emit("copy")
|
|
23690
|
-
}, [e.copied ? (Y(), X("svg",
|
|
23815
|
+
}, [e.copied ? (Y(), X("svg", HS, [...n[2] ||= [Z("path", {
|
|
23691
23816
|
d: "M3 8.5l3 3 7-7",
|
|
23692
23817
|
stroke: "currentColor",
|
|
23693
23818
|
"stroke-width": "1.6",
|
|
23694
23819
|
"stroke-linecap": "round",
|
|
23695
23820
|
"stroke-linejoin": "round"
|
|
23696
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
23821
|
+
}, null, -1)]])) : (Y(), X("svg", US, [...n[3] ||= [Z("rect", {
|
|
23697
23822
|
x: "5.5",
|
|
23698
23823
|
y: "5.5",
|
|
23699
23824
|
width: "8",
|
|
@@ -23705,7 +23830,7 @@ app.mount('#app');
|
|
|
23705
23830
|
d: "M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3.5A1.5 1.5 0 0 0 2 3v5.5A1.5 1.5 0 0 0 3.5 10H4",
|
|
23706
23831
|
stroke: "currentColor",
|
|
23707
23832
|
"stroke-width": "1.3"
|
|
23708
|
-
}, null, -1)]])), Z("span", null, U(e.copied ? "已复制" : "复制"), 1)], 10,
|
|
23833
|
+
}, null, -1)]])), Z("span", null, U(e.copied ? "已复制" : "复制"), 1)], 10, VS), Z("button", {
|
|
23709
23834
|
class: "msg-action-btn",
|
|
23710
23835
|
title: "重新生成",
|
|
23711
23836
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
@@ -23726,31 +23851,37 @@ app.mount('#app');
|
|
|
23726
23851
|
"stroke-linejoin": "round"
|
|
23727
23852
|
})], -1), Z("span", null, "重新生成", -1)]])]));
|
|
23728
23853
|
}
|
|
23729
|
-
}), [["__scopeId", "data-v-49dbc830"]]),
|
|
23854
|
+
}), [["__scopeId", "data-v-49dbc830"]]), GS = {
|
|
23730
23855
|
key: 0,
|
|
23856
|
+
class: "avatar-glyph"
|
|
23857
|
+
}, KS = {
|
|
23858
|
+
key: 1,
|
|
23731
23859
|
class: "avatar-icon",
|
|
23732
23860
|
viewBox: "0 0 1024 1024",
|
|
23733
23861
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23734
23862
|
"aria-hidden": "true"
|
|
23735
|
-
},
|
|
23736
|
-
key:
|
|
23863
|
+
}, qS = {
|
|
23864
|
+
key: 2,
|
|
23737
23865
|
class: "avatar-icon",
|
|
23738
23866
|
viewBox: "0 0 1024 1024",
|
|
23739
23867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23740
23868
|
"aria-hidden": "true"
|
|
23741
|
-
},
|
|
23869
|
+
}, JS = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23742
23870
|
__name: "AvatarIcon",
|
|
23743
|
-
props: {
|
|
23871
|
+
props: {
|
|
23872
|
+
role: {},
|
|
23873
|
+
glyph: {}
|
|
23874
|
+
},
|
|
23744
23875
|
setup(e) {
|
|
23745
|
-
return (t, n) => e.role === "user" ? (Y(), X("svg",
|
|
23876
|
+
return (t, n) => e.glyph ? (Y(), X("span", GS, U(e.glyph), 1)) : e.role === "user" ? (Y(), X("svg", KS, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", qS, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
|
|
23746
23877
|
}
|
|
23747
|
-
}), [["__scopeId", "data-v-
|
|
23878
|
+
}), [["__scopeId", "data-v-e6430248"]]), YS = ["data-msg-idx"], XS = {
|
|
23748
23879
|
key: 0,
|
|
23749
23880
|
class: "message-avatar"
|
|
23750
|
-
},
|
|
23881
|
+
}, ZS = { class: "message-content" }, QS = {
|
|
23751
23882
|
key: 2,
|
|
23752
23883
|
class: "msg-focuses"
|
|
23753
|
-
},
|
|
23884
|
+
}, $S = ["title", "onClick"], eC = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23754
23885
|
__name: "MessageRow",
|
|
23755
23886
|
props: {
|
|
23756
23887
|
message: {},
|
|
@@ -23770,32 +23901,32 @@ app.mount('#app');
|
|
|
23770
23901
|
"regenerate"
|
|
23771
23902
|
],
|
|
23772
23903
|
setup(e) {
|
|
23773
|
-
let t = e, n =
|
|
23904
|
+
let t = e, n = x_(), r = Qs(() => t.message.role === "assistant"), i = Qs(() => r.value && "reasoning" in t.message ? t.message.reasoning ?? "" : ""), a = Qs(() => r.value && "steps" in t.message ? t.message.steps ?? [] : []), o = Qs(() => r.value && !!t.message.content && !t.loading && t.isLast), s = Qs(() => r.value && t.loading && t.isLast && !!t.message.content);
|
|
23774
23905
|
return (t, c) => (Y(), X("div", {
|
|
23775
23906
|
class: H(["message-row", e.message.role]),
|
|
23776
23907
|
"data-msg-idx": e.index
|
|
23777
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
23778
|
-
|
|
23908
|
+
}, [e.showAvatar ? (Y(), X("div", XS, [fs(JS, {
|
|
23909
|
+
role: e.message.role,
|
|
23910
|
+
glyph: e.message.role === "user" ? K(n).icons.userAvatar : K(n).icons.assistantAvatar
|
|
23911
|
+
}, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div", ZS, [
|
|
23912
|
+
r.value ? (Y(), as(K_, {
|
|
23779
23913
|
key: 0,
|
|
23780
23914
|
text: i.value,
|
|
23781
23915
|
expanded: e.reasoningExpanded,
|
|
23782
23916
|
onToggle: c[0] ||= (e) => t.$emit("toggle-reasoning")
|
|
23783
23917
|
}, null, 8, ["text", "expanded"])) : Q("", !0),
|
|
23784
|
-
r.value ? (Y(), as(
|
|
23918
|
+
r.value ? (Y(), as(Sv, {
|
|
23785
23919
|
key: 1,
|
|
23786
|
-
steps: a.value
|
|
23787
|
-
|
|
23788
|
-
|
|
23920
|
+
steps: a.value,
|
|
23921
|
+
icons: K(n).icons
|
|
23922
|
+
}, null, 8, ["steps", "icons"])) : Q("", !0),
|
|
23923
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", QS, [(Y(!0), X(J, null, sa(e.message.focuses, (e) => (Y(), X("span", {
|
|
23789
23924
|
key: e.path,
|
|
23790
23925
|
class: "msg-focus-chip",
|
|
23791
23926
|
title: `回看 ${e.path}`,
|
|
23792
23927
|
onClick: (t) => K(n).focusChipClick(e)
|
|
23793
|
-
},
|
|
23794
|
-
|
|
23795
|
-
class: "msg-focus-chip-x",
|
|
23796
|
-
onClick: yl((t) => K(n).removeFocus(e.path), ["stop"])
|
|
23797
|
-
}, "✕", 8, FS)], 8, PS))), 128))])) : Q("", !0),
|
|
23798
|
-
fs(yS, {
|
|
23928
|
+
}, U(K(n).icons.focus) + " " + U(e.path), 9, $S))), 128))])) : Q("", !0),
|
|
23929
|
+
fs(LS, {
|
|
23799
23930
|
content: e.message.content,
|
|
23800
23931
|
role: e.message.role,
|
|
23801
23932
|
"is-pending-assistant": e.isPendingAssistant,
|
|
@@ -23808,38 +23939,38 @@ app.mount('#app');
|
|
|
23808
23939
|
"show-typing",
|
|
23809
23940
|
"show-cursor"
|
|
23810
23941
|
]),
|
|
23811
|
-
fs(
|
|
23812
|
-
o.value ? (Y(), as(
|
|
23942
|
+
fs(zS, { time: e.time }, null, 8, ["time"]),
|
|
23943
|
+
o.value ? (Y(), as(WS, {
|
|
23813
23944
|
key: 3,
|
|
23814
23945
|
copied: e.copied,
|
|
23815
23946
|
onCopy: c[1] ||= (e) => t.$emit("copy"),
|
|
23816
23947
|
onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
|
|
23817
23948
|
}, null, 8, ["copied"])) : Q("", !0)
|
|
23818
|
-
])], 10,
|
|
23949
|
+
])], 10, YS));
|
|
23819
23950
|
}
|
|
23820
|
-
}), [["__scopeId", "data-v-
|
|
23951
|
+
}), [["__scopeId", "data-v-fccdaca0"]]), tC = { class: "chat-body" }, nC = {
|
|
23821
23952
|
key: 0,
|
|
23822
23953
|
class: "empty-state"
|
|
23823
|
-
},
|
|
23954
|
+
}, rC = { class: "empty-icon" }, iC = {
|
|
23824
23955
|
key: 1,
|
|
23825
23956
|
class: "message-row assistant"
|
|
23826
|
-
},
|
|
23957
|
+
}, aC = {
|
|
23827
23958
|
key: 0,
|
|
23828
23959
|
class: "message-avatar"
|
|
23829
|
-
},
|
|
23960
|
+
}, oC = { class: "message-content" }, sC = {
|
|
23830
23961
|
key: 2,
|
|
23831
23962
|
class: "error-bar"
|
|
23832
|
-
},
|
|
23963
|
+
}, cC = { class: "error-text" }, lC = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23833
23964
|
__name: "MessageList",
|
|
23834
23965
|
props: {
|
|
23835
23966
|
showAvatar: { type: Boolean },
|
|
23836
23967
|
showTyping: { type: Boolean }
|
|
23837
23968
|
},
|
|
23838
23969
|
setup(e) {
|
|
23839
|
-
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l } =
|
|
23840
|
-
return (t,
|
|
23841
|
-
|
|
23842
|
-
(Y(!0), X(J, null, sa(K(
|
|
23970
|
+
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u } = x_(), { state: d, retry: f, regenerate: p } = t, m = Qs(() => d.messages.length > 0), h = Qs(() => d.messages.some((e) => e.role === "user")), g = Qs(() => d.messages[d.messages.length - 1]?.role === "assistant");
|
|
23971
|
+
return (t, _) => (Y(), X("div", tC, [
|
|
23972
|
+
m.value ? Q("", !0) : (Y(), X("div", nC, [Z("div", rC, U(K(u).empty), 1), _[2] ||= Z("p", null, "有什么可以帮你的?", -1)])),
|
|
23973
|
+
(Y(!0), X(J, null, sa(K(d).messages, (t, c) => (Y(), as(eC, {
|
|
23843
23974
|
key: c,
|
|
23844
23975
|
message: t,
|
|
23845
23976
|
index: c,
|
|
@@ -23848,12 +23979,12 @@ app.mount('#app');
|
|
|
23848
23979
|
"is-pending-assistant": K(a)(c),
|
|
23849
23980
|
"reasoning-expanded": K(o)(c),
|
|
23850
23981
|
copied: K(r),
|
|
23851
|
-
"is-last": c === K(
|
|
23852
|
-
loading: K(
|
|
23982
|
+
"is-last": c === K(d).messages.length - 1,
|
|
23983
|
+
loading: K(d).loading,
|
|
23853
23984
|
time: K(n)(t.timestamp),
|
|
23854
23985
|
onToggleReasoning: (e) => K(s)(c),
|
|
23855
23986
|
onCopy: (e) => K(i)(t.content),
|
|
23856
|
-
onRegenerate: K(
|
|
23987
|
+
onRegenerate: K(p)
|
|
23857
23988
|
}, null, 8, [
|
|
23858
23989
|
"message",
|
|
23859
23990
|
"index",
|
|
@@ -23869,88 +24000,91 @@ app.mount('#app');
|
|
|
23869
24000
|
"onCopy",
|
|
23870
24001
|
"onRegenerate"
|
|
23871
24002
|
]))), 128)),
|
|
23872
|
-
K(
|
|
24003
|
+
K(d).loading && !g.value ? (Y(), X("div", iC, [e.showAvatar ? (Y(), X("div", aC, [fs(JS, {
|
|
24004
|
+
role: "assistant",
|
|
24005
|
+
glyph: K(u).assistantAvatar
|
|
24006
|
+
}, null, 8, ["glyph"])])) : Q("", !0), Z("div", oC, [fs(LS, {
|
|
23873
24007
|
content: "",
|
|
23874
24008
|
role: "assistant",
|
|
23875
24009
|
"is-pending-assistant": !0,
|
|
23876
24010
|
"show-typing": e.showTyping,
|
|
23877
24011
|
"show-cursor": !1
|
|
23878
24012
|
}, null, 8, ["show-typing"])])])) : Q("", !0),
|
|
23879
|
-
K(
|
|
23880
|
-
Z("span",
|
|
23881
|
-
|
|
24013
|
+
K(d).error ? (Y(), X("div", sC, [
|
|
24014
|
+
Z("span", cC, U(K(d).error), 1),
|
|
24015
|
+
h.value ? (Y(), X("button", {
|
|
23882
24016
|
key: 0,
|
|
23883
24017
|
class: "retry-btn",
|
|
23884
|
-
onClick:
|
|
24018
|
+
onClick: _[0] ||= (...e) => K(f) && K(f)(...e)
|
|
23885
24019
|
}, "重试")) : Q("", !0),
|
|
23886
24020
|
K(c) ? (Y(), X("button", {
|
|
23887
24021
|
key: 1,
|
|
23888
24022
|
class: "undo-btn",
|
|
23889
24023
|
title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
23890
|
-
onClick:
|
|
24024
|
+
onClick: _[1] ||= (...e) => K(l) && K(l)(...e)
|
|
23891
24025
|
}, "↩ 回退")) : Q("", !0)
|
|
23892
24026
|
])) : Q("", !0)
|
|
23893
24027
|
]));
|
|
23894
24028
|
}
|
|
23895
|
-
}), [["__scopeId", "data-v-
|
|
24029
|
+
}), [["__scopeId", "data-v-df6d11af"]]), uC = {
|
|
23896
24030
|
key: 0,
|
|
23897
24031
|
class: "queued-bar"
|
|
23898
|
-
},
|
|
24032
|
+
}, dC = { class: "queued-head" }, fC = { class: "queued-icon" }, pC = { class: "queued-count" }, mC = { class: "queued-idx" }, hC = { class: "queued-text" }, gC = ["onClick"], _C = ["onClick"], vC = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23899
24033
|
__name: "QueuedBar",
|
|
23900
24034
|
setup(e) {
|
|
23901
|
-
let { chat: t, editQueued: n } =
|
|
23902
|
-
return (e, t) => K(
|
|
23903
|
-
|
|
23904
|
-
t[
|
|
23905
|
-
Z("span",
|
|
23906
|
-
]), (Y(!0), X(J, null, sa(K(
|
|
24035
|
+
let { chat: t, editQueued: n, icons: r } = x_(), { queuedTasks: i, removeQueuedTask: a } = t;
|
|
24036
|
+
return (e, t) => K(i).length ? (Y(), X("div", uC, [Z("div", dC, [
|
|
24037
|
+
Z("span", fC, U(K(r).queued), 1),
|
|
24038
|
+
t[0] ||= Z("span", { class: "queued-title" }, "排队中 · 生成完后自动执行", -1),
|
|
24039
|
+
Z("span", pC, U(K(i).length), 1)
|
|
24040
|
+
]), (Y(!0), X(J, null, sa(K(i), (e, t) => (Y(), X("div", {
|
|
23907
24041
|
key: t,
|
|
23908
24042
|
class: "queued-item"
|
|
23909
24043
|
}, [
|
|
23910
|
-
Z("span",
|
|
23911
|
-
Z("span",
|
|
24044
|
+
Z("span", mC, U(t + 1), 1),
|
|
24045
|
+
Z("span", hC, U(e), 1),
|
|
23912
24046
|
Z("button", {
|
|
23913
24047
|
class: "queued-act",
|
|
23914
24048
|
title: "修改(填回输入框编辑)",
|
|
23915
24049
|
onClick: (e) => K(n)(t)
|
|
23916
|
-
},
|
|
24050
|
+
}, U(K(r).queuedEdit), 9, gC),
|
|
23917
24051
|
Z("button", {
|
|
23918
24052
|
class: "queued-act queued-del",
|
|
23919
24053
|
title: "撤销该任务",
|
|
23920
|
-
onClick: (e) => K(
|
|
23921
|
-
}, "✕", 8,
|
|
24054
|
+
onClick: (e) => K(a)(t)
|
|
24055
|
+
}, "✕", 8, _C)
|
|
23922
24056
|
]))), 128))])) : Q("", !0);
|
|
23923
24057
|
}
|
|
23924
|
-
}), [["__scopeId", "data-v-
|
|
24058
|
+
}), [["__scopeId", "data-v-d8bbbb53"]]), yC = {
|
|
23925
24059
|
key: 0,
|
|
23926
24060
|
class: "approval-bar"
|
|
23927
|
-
},
|
|
24061
|
+
}, bC = {
|
|
23928
24062
|
key: 0,
|
|
23929
24063
|
class: "approval-question"
|
|
23930
|
-
},
|
|
24064
|
+
}, xC = {
|
|
23931
24065
|
key: 1,
|
|
23932
24066
|
class: "approval-context"
|
|
23933
|
-
},
|
|
24067
|
+
}, SC = {
|
|
23934
24068
|
key: 2,
|
|
23935
24069
|
class: "approval-recommend"
|
|
23936
|
-
},
|
|
24070
|
+
}, CC = {
|
|
23937
24071
|
key: 3,
|
|
23938
24072
|
class: "approval-options"
|
|
23939
|
-
},
|
|
24073
|
+
}, wC = ["onClick"], TC = { class: "approval-actions" }, EC = { class: "approval-head" }, DC = { class: "approval-title" }, OC = {
|
|
23940
24074
|
key: 0,
|
|
23941
24075
|
class: "approval-args"
|
|
23942
|
-
},
|
|
24076
|
+
}, kC = { class: "approval-actions" }, AC = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
23943
24077
|
__name: "ApprovalBar",
|
|
23944
24078
|
setup(e) {
|
|
23945
|
-
let { pendingApproval:
|
|
23946
|
-
ni(
|
|
23947
|
-
|
|
24079
|
+
let t = x_(), { pendingApproval: n, resolveApproval: r } = t.chat, i = /* @__PURE__ */ Cn(!1);
|
|
24080
|
+
ni(n, () => {
|
|
24081
|
+
i.value = !1;
|
|
23948
24082
|
});
|
|
23949
|
-
let
|
|
23950
|
-
let e =
|
|
24083
|
+
let a = Qs(() => n.value?.toolName === "request_human_confirmation"), o = Qs(() => {
|
|
24084
|
+
let e = n.value?.args?.options;
|
|
23951
24085
|
return Array.isArray(e) ? e.map(String) : [];
|
|
23952
|
-
}),
|
|
23953
|
-
let e =
|
|
24086
|
+
}), s = Qs(() => {
|
|
24087
|
+
let e = n.value?.args;
|
|
23954
24088
|
if (e == null) return "";
|
|
23955
24089
|
try {
|
|
23956
24090
|
let t = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
@@ -23959,55 +24093,56 @@ app.mount('#app');
|
|
|
23959
24093
|
return String(e);
|
|
23960
24094
|
}
|
|
23961
24095
|
});
|
|
23962
|
-
return (e,
|
|
23963
|
-
|
|
23964
|
-
K(
|
|
23965
|
-
K(
|
|
23966
|
-
K(
|
|
23967
|
-
|
|
24096
|
+
return (e, c) => K(n) ? (Y(), X("div", yC, [a.value ? (Y(), X(J, { key: 0 }, [
|
|
24097
|
+
c[5] ||= Z("div", { class: "approval-head" }, [Z("span", { class: "approval-icon" }, "❓"), Z("span", { class: "approval-title" }, "AI 需要你确认")], -1),
|
|
24098
|
+
K(n).args?.question ? (Y(), X("div", bC, U(K(n).args.question), 1)) : Q("", !0),
|
|
24099
|
+
K(n).args?.context ? (Y(), X("div", xC, U(K(n).args.context), 1)) : Q("", !0),
|
|
24100
|
+
K(n).args?.recommendation ? (Y(), X("div", SC, U(K(t).icons.recommend) + " 推荐:" + U(K(n).args.recommendation), 1)) : Q("", !0),
|
|
24101
|
+
o.value.length ? (Y(), X("div", CC, [(Y(!0), X(J, null, sa(o.value, (e) => (Y(), X("button", {
|
|
23968
24102
|
key: e,
|
|
23969
24103
|
class: "approval-opt",
|
|
23970
|
-
onClick: (t) => K(
|
|
23971
|
-
}, U(e), 9,
|
|
23972
|
-
Z("div",
|
|
24104
|
+
onClick: (t) => K(r)(e)
|
|
24105
|
+
}, U(e), 9, wC))), 128))])) : Q("", !0),
|
|
24106
|
+
Z("div", TC, [Z("button", {
|
|
23973
24107
|
class: "approval-deny",
|
|
23974
|
-
onClick:
|
|
23975
|
-
}, "拒绝"),
|
|
24108
|
+
onClick: c[0] ||= (e) => K(r)(!1)
|
|
24109
|
+
}, "拒绝"), o.value.length ? Q("", !0) : (Y(), X("button", {
|
|
23976
24110
|
key: 0,
|
|
23977
24111
|
class: "approval-allow",
|
|
23978
|
-
onClick:
|
|
24112
|
+
onClick: c[1] ||= (e) => K(r)(!0)
|
|
23979
24113
|
}, "允许"))])
|
|
23980
24114
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
23981
|
-
Z("div",
|
|
23982
|
-
|
|
23983
|
-
Z("span",
|
|
23984
|
-
|
|
24115
|
+
Z("div", EC, [
|
|
24116
|
+
c[7] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
24117
|
+
Z("span", DC, [c[6] ||= _s("需确认工具调用:", -1), Z("code", null, U(K(n).toolName), 1)]),
|
|
24118
|
+
s.value ? (Y(), X("button", {
|
|
23985
24119
|
key: 0,
|
|
23986
24120
|
class: "approval-toggle",
|
|
23987
|
-
onClick:
|
|
23988
|
-
}, U(
|
|
24121
|
+
onClick: c[2] ||= (e) => i.value = !i.value
|
|
24122
|
+
}, U(i.value ? "收起参数" : "查看参数") + U(i.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
23989
24123
|
]),
|
|
23990
|
-
|
|
23991
|
-
Z("div",
|
|
24124
|
+
s.value && i.value ? (Y(), X("pre", OC, U(s.value), 1)) : Q("", !0),
|
|
24125
|
+
Z("div", kC, [Z("button", {
|
|
23992
24126
|
class: "approval-deny",
|
|
23993
|
-
onClick:
|
|
24127
|
+
onClick: c[3] ||= (e) => K(r)(!1)
|
|
23994
24128
|
}, "拒绝"), Z("button", {
|
|
23995
24129
|
class: "approval-allow",
|
|
23996
|
-
onClick:
|
|
24130
|
+
onClick: c[4] ||= (e) => K(r)(!0)
|
|
23997
24131
|
}, "允许")])
|
|
23998
24132
|
], 64))])) : Q("", !0);
|
|
23999
24133
|
}
|
|
24000
|
-
}), [["__scopeId", "data-v-
|
|
24134
|
+
}), [["__scopeId", "data-v-f3a61bb6"]]), jC = {
|
|
24001
24135
|
key: 0,
|
|
24002
24136
|
class: "conflict-bar"
|
|
24003
|
-
},
|
|
24137
|
+
}, MC = { class: "conflict-head" }, NC = { class: "conflict-icon" }, PC = { class: "conflict-title" }, FC = { class: "conflict-detail" }, IC = {
|
|
24004
24138
|
key: 0,
|
|
24005
24139
|
class: "conflict-diff"
|
|
24006
|
-
},
|
|
24140
|
+
}, LC = { class: "conflict-diff-col" }, RC = { class: "conflict-diff-pre" }, zC = { class: "conflict-diff-col" }, BC = { class: "conflict-diff-pre" }, VC = { class: "conflict-actions" }, HC = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
24007
24141
|
__name: "ConflictBar",
|
|
24008
24142
|
props: {
|
|
24009
24143
|
pendingConflict: {},
|
|
24010
|
-
onResolve: {
|
|
24144
|
+
onResolve: {},
|
|
24145
|
+
icons: { default: () => ({ ...__ }) }
|
|
24011
24146
|
},
|
|
24012
24147
|
setup(e) {
|
|
24013
24148
|
let t = e, n = /* @__PURE__ */ Cn(!1);
|
|
@@ -24033,19 +24168,19 @@ app.mount('#app');
|
|
|
24033
24168
|
return String(e);
|
|
24034
24169
|
}
|
|
24035
24170
|
});
|
|
24036
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
24037
|
-
Z("div",
|
|
24171
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", jC, [
|
|
24172
|
+
Z("div", MC, [Z("span", NC, U(e.icons.conflict), 1), Z("span", PC, [
|
|
24038
24173
|
a[4] ||= _s("写入冲突:", -1),
|
|
24039
24174
|
Z("code", null, U(e.pendingConflict.path), 1),
|
|
24040
24175
|
a[5] ||= _s(" 已被外部修改", -1)
|
|
24041
24176
|
])]),
|
|
24042
|
-
Z("div",
|
|
24177
|
+
Z("div", FC, " AI 基于「读取时的旧值」准备" + U(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
|
|
24043
24178
|
Z("button", {
|
|
24044
24179
|
class: "conflict-toggle",
|
|
24045
24180
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
24046
24181
|
}, U(n.value ? "收起对比" : "查看值对比") + U(n.value ? " ▴" : " ▾"), 1),
|
|
24047
|
-
n.value ? (Y(), X("div",
|
|
24048
|
-
Z("div",
|
|
24182
|
+
n.value ? (Y(), X("div", IC, [Z("div", LC, [a[6] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", RC, U(r.value || "(delete 操作无值)"), 1)]), Z("div", zC, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", BC, U(i.value), 1)])])) : Q("", !0),
|
|
24183
|
+
Z("div", VC, [
|
|
24049
24184
|
Z("button", {
|
|
24050
24185
|
class: "conflict-keep",
|
|
24051
24186
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
@@ -24064,16 +24199,16 @@ app.mount('#app');
|
|
|
24064
24199
|
])
|
|
24065
24200
|
])) : Q("", !0);
|
|
24066
24201
|
}
|
|
24067
|
-
}), [["__scopeId", "data-v-
|
|
24202
|
+
}), [["__scopeId", "data-v-71f89be4"]]), UC = { class: "chat-footer" }, WC = { class: "chat-input-wrap" }, GC = {
|
|
24068
24203
|
key: 0,
|
|
24069
24204
|
class: "focus-chips"
|
|
24070
|
-
},
|
|
24205
|
+
}, KC = ["title", "onClick"], qC = { class: "focus-chip-icon" }, JC = { class: "focus-chip-path" }, YC = ["onClick"], XC = ["placeholder", "rows"], ZC = { class: "input-actions" }, QC = ["disabled", "title"], $C = {
|
|
24071
24206
|
key: 0,
|
|
24072
24207
|
width: "16",
|
|
24073
24208
|
height: "16",
|
|
24074
24209
|
viewBox: "0 0 24 24",
|
|
24075
24210
|
fill: "currentColor"
|
|
24076
|
-
},
|
|
24211
|
+
}, ew = {
|
|
24077
24212
|
key: 1,
|
|
24078
24213
|
width: "18",
|
|
24079
24214
|
height: "18",
|
|
@@ -24081,246 +24216,246 @@ app.mount('#app');
|
|
|
24081
24216
|
fill: "none",
|
|
24082
24217
|
stroke: "currentColor",
|
|
24083
24218
|
"stroke-width": "2"
|
|
24084
|
-
},
|
|
24219
|
+
}, tw = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
24085
24220
|
__name: "ChatInput",
|
|
24086
24221
|
props: {
|
|
24087
24222
|
placeholder: {},
|
|
24088
24223
|
inputRows: {}
|
|
24089
24224
|
},
|
|
24090
24225
|
setup(e) {
|
|
24091
|
-
let t =
|
|
24092
|
-
return (t,
|
|
24226
|
+
let t = x_(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l, icons: u } = t, { state: d, stop: f } = t.chat;
|
|
24227
|
+
return (t, p) => (Y(), X("div", UC, [K(a) ? (Y(), X("button", {
|
|
24093
24228
|
key: 0,
|
|
24094
24229
|
class: "undo-foot-btn",
|
|
24095
24230
|
title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
24096
|
-
onClick:
|
|
24097
|
-
}, "↩ 回退")) : Q("", !0), Z("div",
|
|
24098
|
-
K(s).length ? (Y(), X("div",
|
|
24231
|
+
onClick: p[0] ||= (...e) => K(o) && K(o)(...e)
|
|
24232
|
+
}, "↩ 回退")) : Q("", !0), Z("div", WC, [
|
|
24233
|
+
K(s).length ? (Y(), X("div", GC, [(Y(!0), X(J, null, sa(K(s), (e) => (Y(), X("span", {
|
|
24099
24234
|
key: e.path,
|
|
24100
24235
|
class: "focus-chip",
|
|
24101
24236
|
title: `精修中:${e.path}(点击回看 · ✕ 移除)`,
|
|
24102
24237
|
onClick: (t) => K(l)(e)
|
|
24103
24238
|
}, [
|
|
24104
|
-
|
|
24105
|
-
Z("code",
|
|
24239
|
+
Z("span", qC, U(K(u).focus), 1),
|
|
24240
|
+
Z("code", JC, U(e.path), 1),
|
|
24106
24241
|
Z("button", {
|
|
24107
24242
|
type: "button",
|
|
24108
24243
|
class: "focus-chip-x",
|
|
24109
24244
|
"data-test": "focus-clear",
|
|
24110
24245
|
title: "移除此焦点",
|
|
24111
24246
|
onClick: yl((t) => K(c)(e.path), ["stop"])
|
|
24112
|
-
}, "✕", 8,
|
|
24113
|
-
], 8,
|
|
24247
|
+
}, "✕", 8, YC)
|
|
24248
|
+
], 8, KC))), 128))])) : Q("", !0),
|
|
24114
24249
|
Xr(Z("textarea", {
|
|
24115
|
-
"onUpdate:modelValue":
|
|
24250
|
+
"onUpdate:modelValue": p[1] ||= (e) => /* @__PURE__ */ Sn(n) ? n.value = e : null,
|
|
24116
24251
|
class: H(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
|
|
24117
24252
|
placeholder: e.placeholder,
|
|
24118
24253
|
rows: e.inputRows,
|
|
24119
|
-
onKeydown:
|
|
24120
|
-
}, null, 42,
|
|
24121
|
-
Z("div",
|
|
24122
|
-
class: H(["send-btn", { "stop-btn": K(
|
|
24123
|
-
disabled: !K(
|
|
24124
|
-
title: K(
|
|
24125
|
-
onClick:
|
|
24126
|
-
}, [K(
|
|
24254
|
+
onKeydown: p[2] ||= (...e) => K(i) && K(i)(...e)
|
|
24255
|
+
}, null, 42, XC), [[gl, K(n)]]),
|
|
24256
|
+
Z("div", ZC, [p[6] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
|
|
24257
|
+
class: H(["send-btn", { "stop-btn": K(d).loading }]),
|
|
24258
|
+
disabled: !K(d).loading && !K(n).trim(),
|
|
24259
|
+
title: K(d).loading ? "停止生成" : "发送",
|
|
24260
|
+
onClick: p[3] ||= (e) => K(d).loading ? K(f)() : K(r)()
|
|
24261
|
+
}, [K(d).loading ? (Y(), X("svg", $C, [...p[4] ||= [Z("rect", {
|
|
24127
24262
|
x: "6",
|
|
24128
24263
|
y: "6",
|
|
24129
24264
|
width: "12",
|
|
24130
24265
|
height: "12",
|
|
24131
24266
|
rx: "2"
|
|
24132
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
24267
|
+
}, null, -1)]])) : (Y(), X("svg", ew, [...p[5] ||= [Z("line", {
|
|
24133
24268
|
x1: "22",
|
|
24134
24269
|
y1: "2",
|
|
24135
24270
|
x2: "11",
|
|
24136
24271
|
y2: "13"
|
|
24137
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
24272
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, QC)])
|
|
24138
24273
|
])]));
|
|
24139
24274
|
}
|
|
24140
|
-
}), [["__scopeId", "data-v-
|
|
24275
|
+
}), [["__scopeId", "data-v-2f56980e"]]), nw = {
|
|
24141
24276
|
key: 0,
|
|
24142
24277
|
class: "debug-drawer"
|
|
24143
|
-
},
|
|
24278
|
+
}, rw = { class: "drawer-header" }, iw = { class: "tab-group" }, aw = { class: "header-actions" }, ow = {
|
|
24144
24279
|
key: 0,
|
|
24145
24280
|
class: "drawer-filters"
|
|
24146
|
-
},
|
|
24281
|
+
}, sw = ["onClick"], cw = { class: "chip-count" }, lw = { class: "chip-count" }, uw = { class: "drawer-body" }, dw = {
|
|
24147
24282
|
key: 0,
|
|
24148
24283
|
class: "trace-panel"
|
|
24149
|
-
},
|
|
24284
|
+
}, fw = {
|
|
24150
24285
|
key: 0,
|
|
24151
24286
|
class: "trace-empty"
|
|
24152
|
-
},
|
|
24287
|
+
}, pw = { class: "trace-metrics" }, mw = { class: "metric-card" }, hw = { class: "metric-card" }, gw = { class: "metric-card" }, _w = { class: "metric-card" }, vw = {
|
|
24153
24288
|
key: 0,
|
|
24154
24289
|
class: "metric-card"
|
|
24155
|
-
},
|
|
24290
|
+
}, yw = {
|
|
24156
24291
|
key: 1,
|
|
24157
24292
|
class: "metric-card"
|
|
24158
|
-
},
|
|
24293
|
+
}, bw = { class: "trace-spans" }, xw = { class: "span-ico" }, Sw = { class: "span-name" }, Cw = {
|
|
24159
24294
|
key: 0,
|
|
24160
24295
|
class: "span-dur"
|
|
24161
|
-
},
|
|
24296
|
+
}, ww = {
|
|
24162
24297
|
key: 1,
|
|
24163
24298
|
class: "span-status"
|
|
24164
|
-
},
|
|
24299
|
+
}, Tw = {
|
|
24165
24300
|
key: 1,
|
|
24166
24301
|
class: "context-panel"
|
|
24167
|
-
},
|
|
24302
|
+
}, Ew = {
|
|
24168
24303
|
key: 0,
|
|
24169
24304
|
class: "trace-empty"
|
|
24170
|
-
},
|
|
24305
|
+
}, Dw = { class: "ctx-overview" }, Ow = { class: "ctx-occupancy" }, kw = ["title"], Aw = { class: "ctx-pct" }, jw = { class: "ctx-kv-row" }, Mw = { class: "ctx-kv" }, Nw = {
|
|
24171
24306
|
key: 0,
|
|
24172
24307
|
class: "ctx-kv"
|
|
24173
|
-
},
|
|
24308
|
+
}, Pw = {
|
|
24174
24309
|
key: 1,
|
|
24175
24310
|
class: "ctx-kv"
|
|
24176
|
-
},
|
|
24311
|
+
}, Fw = ["title"], Iw = { class: "ctx-cat-bar" }, Lw = { class: "ctx-cat-tokens" }, Rw = {
|
|
24177
24312
|
key: 0,
|
|
24178
24313
|
class: "ctx-compression"
|
|
24179
|
-
},
|
|
24314
|
+
}, zw = { class: "ctx-kv-row" }, Bw = { class: "ctx-kv" }, Vw = { class: "ctx-kv" }, Hw = { class: "ctx-kv" }, Uw = {
|
|
24180
24315
|
key: 0,
|
|
24181
24316
|
class: "ctx-kv"
|
|
24182
|
-
},
|
|
24317
|
+
}, Ww = {
|
|
24183
24318
|
key: 2,
|
|
24184
24319
|
class: "subagent-panel"
|
|
24185
|
-
},
|
|
24320
|
+
}, Gw = {
|
|
24186
24321
|
key: 0,
|
|
24187
24322
|
class: "sub-section"
|
|
24188
|
-
},
|
|
24323
|
+
}, Kw = { class: "sub-section-title" }, qw = {
|
|
24189
24324
|
key: 1,
|
|
24190
24325
|
class: "trace-empty"
|
|
24191
|
-
},
|
|
24326
|
+
}, Jw = {
|
|
24192
24327
|
key: 0,
|
|
24193
24328
|
class: "sub-section"
|
|
24194
|
-
},
|
|
24329
|
+
}, Yw = { class: "sub-section-title" }, Xw = { class: "sub-head" }, Zw = { class: "sub-label" }, Qw = { class: "sub-steps-badge" }, $w = { class: "sub-task" }, eT = {
|
|
24195
24330
|
key: 1,
|
|
24196
24331
|
class: "sub-section"
|
|
24197
|
-
},
|
|
24332
|
+
}, tT = { class: "sub-section-title" }, nT = { class: "sub-head" }, rT = { class: "sub-label" }, iT = {
|
|
24198
24333
|
key: 0,
|
|
24199
24334
|
class: "sub-dur"
|
|
24200
|
-
},
|
|
24335
|
+
}, aT = ["onClick"], oT = { class: "sub-task" }, sT = {
|
|
24201
24336
|
key: 0,
|
|
24202
24337
|
class: "sub-result"
|
|
24203
|
-
},
|
|
24338
|
+
}, cT = {
|
|
24204
24339
|
key: 1,
|
|
24205
24340
|
class: "sub-steps-list"
|
|
24206
|
-
},
|
|
24341
|
+
}, lT = { class: "sub-step-kind" }, uT = { class: "sub-step-name" }, dT = { class: "sub-step-ts" }, fT = {
|
|
24207
24342
|
key: 0,
|
|
24208
24343
|
class: "empty"
|
|
24209
|
-
},
|
|
24344
|
+
}, pT = { class: "log-head" }, mT = {
|
|
24210
24345
|
key: 0,
|
|
24211
24346
|
class: "log-source"
|
|
24212
|
-
},
|
|
24347
|
+
}, hT = { class: "log-time" }, gT = { class: "log-body" }, _T = { class: "kv-grid" }, vT = { class: "kv" }, yT = { class: "v" }, bT = { class: "kv" }, xT = { class: "v" }, ST = { class: "kv" }, CT = { class: "v" }, wT = { class: "kv" }, TT = { class: "v" }, ET = { class: "section-label" }, DT = { class: "chip-row" }, OT = { class: "msg-list" }, kT = { class: "msg-text" }, AT = { class: "badge-row" }, jT = { class: "badge" }, MT = {
|
|
24213
24348
|
key: 0,
|
|
24214
24349
|
class: "badge muted"
|
|
24215
|
-
},
|
|
24350
|
+
}, NT = { class: "badge muted" }, PT = {
|
|
24216
24351
|
key: 1,
|
|
24217
24352
|
class: "badge muted"
|
|
24218
|
-
},
|
|
24353
|
+
}, FT = ["onClick"], IT = {
|
|
24219
24354
|
key: 0,
|
|
24220
24355
|
class: "msg-list"
|
|
24221
|
-
},
|
|
24356
|
+
}, LT = { class: "msg-detail" }, RT = {
|
|
24222
24357
|
key: 0,
|
|
24223
24358
|
class: "msg-text"
|
|
24224
|
-
},
|
|
24359
|
+
}, zT = { class: "tc-inline-name" }, BT = { class: "tc-inline-args" }, VT = {
|
|
24225
24360
|
key: 1,
|
|
24226
24361
|
class: "tc-id"
|
|
24227
|
-
},
|
|
24362
|
+
}, HT = {
|
|
24228
24363
|
key: 1,
|
|
24229
24364
|
class: "log-raw"
|
|
24230
|
-
},
|
|
24365
|
+
}, UT = { class: "badge-row" }, WT = { class: "badge" }, GT = {
|
|
24231
24366
|
key: 0,
|
|
24232
24367
|
class: "badge warn"
|
|
24233
|
-
},
|
|
24368
|
+
}, KT = {
|
|
24234
24369
|
key: 0,
|
|
24235
24370
|
class: "resp-content"
|
|
24236
|
-
},
|
|
24371
|
+
}, qT = {
|
|
24237
24372
|
key: 1,
|
|
24238
24373
|
class: "tc-list"
|
|
24239
|
-
},
|
|
24374
|
+
}, JT = { class: "tc-name" }, YT = { class: "tc-args" }, XT = {
|
|
24240
24375
|
key: 2,
|
|
24241
24376
|
class: "usage-row"
|
|
24242
|
-
},
|
|
24377
|
+
}, ZT = { class: "usage" }, QT = { class: "usage" }, $T = { class: "usage" }, eE = {
|
|
24243
24378
|
key: 3,
|
|
24244
24379
|
class: "tc-card inline"
|
|
24245
|
-
},
|
|
24380
|
+
}, tE = { class: "tc-name" }, nE = { class: "tc-args" }, rE = {
|
|
24246
24381
|
key: 4,
|
|
24247
24382
|
class: "tc-card inline"
|
|
24248
|
-
},
|
|
24383
|
+
}, iE = { class: "tc-name" }, aE = { class: "tc-args" }, oE = {
|
|
24249
24384
|
key: 5,
|
|
24250
24385
|
class: "err-box"
|
|
24251
|
-
},
|
|
24386
|
+
}, sE = { class: "log-footer" }, cE = ["onClick"], lE = ["onClick"], uE = {
|
|
24252
24387
|
key: 0,
|
|
24253
24388
|
class: "log-raw"
|
|
24254
|
-
},
|
|
24389
|
+
}, dE = {
|
|
24255
24390
|
key: 0,
|
|
24256
24391
|
class: "empty"
|
|
24257
|
-
},
|
|
24392
|
+
}, fE = {
|
|
24258
24393
|
key: 1,
|
|
24259
24394
|
class: "flow-section"
|
|
24260
|
-
},
|
|
24395
|
+
}, pE = { class: "flow-ico" }, mE = { class: "flow-label" }, hE = { class: "flow-detail" }, gE = { class: "flow-time" }, _E = { class: "flow-round-head" }, vE = { class: "flow-round-body" }, yE = { class: "flow-ico" }, bE = { class: "flow-label" }, xE = { class: "flow-detail" }, SE = { class: "flow-time" }, CE = {
|
|
24261
24396
|
key: 5,
|
|
24262
24397
|
class: "info-body"
|
|
24263
|
-
},
|
|
24398
|
+
}, wE = {
|
|
24264
24399
|
key: 0,
|
|
24265
24400
|
class: "empty"
|
|
24266
|
-
},
|
|
24401
|
+
}, TE = { class: "info-section" }, EE = { class: "kv-grid" }, DE = { class: "kv" }, OE = { class: "v" }, kE = { class: "kv" }, AE = { class: "v" }, jE = { class: "kv" }, ME = { class: "v" }, NE = { class: "kv" }, PE = { class: "v" }, FE = {
|
|
24267
24402
|
class: "kv",
|
|
24268
24403
|
style: { "margin-top": "6px" }
|
|
24269
|
-
},
|
|
24404
|
+
}, IE = {
|
|
24270
24405
|
class: "v",
|
|
24271
24406
|
style: { "font-size": "11px" }
|
|
24272
|
-
},
|
|
24407
|
+
}, LE = { class: "info-section" }, RE = { class: "info-title" }, zE = { class: "info-name" }, BE = { class: "info-desc" }, VE = {
|
|
24273
24408
|
key: 0,
|
|
24274
24409
|
class: "info-section"
|
|
24275
|
-
},
|
|
24410
|
+
}, HE = { class: "info-title" }, UE = ["onClick"], WE = { class: "info-desc" }, GE = {
|
|
24276
24411
|
key: 0,
|
|
24277
24412
|
class: "skill-content"
|
|
24278
|
-
},
|
|
24413
|
+
}, KE = {
|
|
24279
24414
|
key: 0,
|
|
24280
24415
|
class: "skill-loading"
|
|
24281
|
-
},
|
|
24416
|
+
}, qE = {
|
|
24282
24417
|
key: 1,
|
|
24283
24418
|
class: "skill-error"
|
|
24284
|
-
},
|
|
24419
|
+
}, JE = {
|
|
24285
24420
|
key: 2,
|
|
24286
24421
|
class: "skill-pre"
|
|
24287
|
-
},
|
|
24422
|
+
}, YE = {
|
|
24288
24423
|
key: 1,
|
|
24289
24424
|
class: "info-section"
|
|
24290
|
-
},
|
|
24425
|
+
}, XE = { class: "info-item" }, ZE = { class: "info-name" }, QE = { class: "info-desc" }, $E = { class: "info-section" }, eD = { class: "kv-grid" }, tD = { class: "kv" }, nD = { class: "v" }, rD = { class: "kv" }, iD = { class: "v" }, aD = { class: "kv" }, oD = { class: "v" }, sD = { class: "kv" }, cD = {
|
|
24291
24426
|
class: "v",
|
|
24292
24427
|
style: { "font-size": "11px" }
|
|
24293
|
-
},
|
|
24428
|
+
}, lD = {
|
|
24294
24429
|
key: 2,
|
|
24295
24430
|
class: "info-section"
|
|
24296
|
-
},
|
|
24431
|
+
}, uD = { class: "info-title" }, dD = { class: "info-name" }, fD = { class: "src-tag mcp" }, pD = { class: "info-desc" }, mD = {
|
|
24297
24432
|
key: 3,
|
|
24298
24433
|
class: "info-section"
|
|
24299
|
-
},
|
|
24434
|
+
}, hD = { class: "kv-grid" }, gD = { class: "kv" }, _D = { class: "v" }, vD = { class: "kv" }, yD = { class: "v" }, bD = { class: "kv" }, xD = { class: "v" }, SD = {
|
|
24300
24435
|
key: 0,
|
|
24301
24436
|
class: "kv"
|
|
24302
|
-
},
|
|
24437
|
+
}, CD = {
|
|
24303
24438
|
class: "v",
|
|
24304
24439
|
style: { "font-size": "11px" }
|
|
24305
|
-
},
|
|
24440
|
+
}, wD = {
|
|
24306
24441
|
key: 4,
|
|
24307
24442
|
class: "info-section"
|
|
24308
|
-
},
|
|
24443
|
+
}, TD = { class: "info-title" }, ED = {
|
|
24309
24444
|
key: 5,
|
|
24310
24445
|
class: "info-section"
|
|
24311
|
-
},
|
|
24446
|
+
}, DD = { class: "info-pre" }, OD = {
|
|
24312
24447
|
key: 6,
|
|
24313
24448
|
class: "info-section"
|
|
24314
|
-
},
|
|
24449
|
+
}, kD = { class: "info-kv" }, AD = { class: "kv" }, jD = { class: "v" }, MD = { class: "kv" }, ND = { class: "v" }, PD = { class: "kv" }, FD = { class: "v" }, ID = { class: "kv" }, LD = { class: "v" }, RD = { class: "kv" }, zD = {
|
|
24315
24450
|
class: "v",
|
|
24316
24451
|
style: { "font-size": "11px" }
|
|
24317
|
-
},
|
|
24452
|
+
}, BD = {
|
|
24318
24453
|
key: 0,
|
|
24319
24454
|
class: "kv"
|
|
24320
|
-
},
|
|
24455
|
+
}, VD = {
|
|
24321
24456
|
class: "v",
|
|
24322
24457
|
style: { "font-size": "11px" }
|
|
24323
|
-
},
|
|
24458
|
+
}, HD = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
24324
24459
|
__name: "DebugDrawer",
|
|
24325
24460
|
props: {
|
|
24326
24461
|
logs: { default: () => [] },
|
|
@@ -24572,8 +24707,8 @@ app.mount('#app');
|
|
|
24572
24707
|
}
|
|
24573
24708
|
}
|
|
24574
24709
|
return (t, n) => (Y(), as(_i, { to: "body" }, [fs(gc, { name: "drawer" }, {
|
|
24575
|
-
default: Jr(() => [e.visible ? (Y(), X("div",
|
|
24576
|
-
Z("div",
|
|
24710
|
+
default: Jr(() => [e.visible ? (Y(), X("div", nw, [Z("div", { class: H(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
24711
|
+
Z("div", rw, [Z("div", iw, [
|
|
24577
24712
|
Z("button", {
|
|
24578
24713
|
class: H(["tab-btn", { active: y.value === "logs" }]),
|
|
24579
24714
|
onClick: n[0] ||= (e) => w("logs")
|
|
@@ -24602,7 +24737,7 @@ app.mount('#app');
|
|
|
24602
24737
|
class: H(["tab-btn", { active: y.value === "info" }]),
|
|
24603
24738
|
onClick: n[5] ||= (e) => w("info")
|
|
24604
24739
|
}, "🧬 Agent 信息", 2)) : Q("", !0)
|
|
24605
|
-
]), Z("div",
|
|
24740
|
+
]), Z("div", aw, [y.value === "logs" ? (Y(), X("button", {
|
|
24606
24741
|
key: 0,
|
|
24607
24742
|
class: "hd-btn",
|
|
24608
24743
|
title: "清空日志",
|
|
@@ -24612,38 +24747,38 @@ app.mount('#app');
|
|
|
24612
24747
|
title: "关闭",
|
|
24613
24748
|
onClick: _
|
|
24614
24749
|
}, "✕")])]),
|
|
24615
|
-
y.value === "logs" ? (Y(), X("div",
|
|
24750
|
+
y.value === "logs" ? (Y(), X("div", ow, [(Y(), X(J, null, sa(s, (e, t) => Z("button", {
|
|
24616
24751
|
key: t,
|
|
24617
24752
|
class: H(["filter-chip", { active: i.value === t }]),
|
|
24618
24753
|
style: Oe({ "--chip-color": e.color }),
|
|
24619
24754
|
onClick: (e) => i.value = t
|
|
24620
|
-
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span",
|
|
24755
|
+
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span", cw, U(u.value[t] || 0), 1)], 14, sw)), 64)), Z("button", {
|
|
24621
24756
|
class: H(["filter-chip all", { active: i.value === "all" }]),
|
|
24622
24757
|
onClick: n[6] ||= (e) => i.value = "all"
|
|
24623
|
-
}, [n[7] ||= _s(" 全部 ", -1), Z("span",
|
|
24624
|
-
Z("div",
|
|
24625
|
-
y.value === "trace" ? (Y(), X("div",
|
|
24626
|
-
Z("div",
|
|
24627
|
-
Z("div",
|
|
24628
|
-
Z("div",
|
|
24629
|
-
Z("div",
|
|
24630
|
-
j.value.compressions ? (Y(), X("div",
|
|
24631
|
-
j.value.totalTokens ? (Y(), X("div",
|
|
24632
|
-
]), Z("div",
|
|
24758
|
+
}, [n[7] ||= _s(" 全部 ", -1), Z("span", lw, U(u.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
24759
|
+
Z("div", uw, [
|
|
24760
|
+
y.value === "trace" ? (Y(), X("div", dw, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", pw, [
|
|
24761
|
+
Z("div", mw, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, U(j.value.rounds), 1)]),
|
|
24762
|
+
Z("div", hw, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, U(j.value.totalDurationMs) + "ms", 1)]),
|
|
24763
|
+
Z("div", gw, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, U(j.value.avgRoundMs) + "ms", 1)]),
|
|
24764
|
+
Z("div", _w, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, U(j.value.toolCalls) + "(✅" + U(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
|
|
24765
|
+
j.value.compressions ? (Y(), X("div", vw, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, U(j.value.compressions), 1)])) : Q("", !0),
|
|
24766
|
+
j.value.totalTokens ? (Y(), X("div", yw, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, U(j.value.totalTokens.total), 1)])) : Q("", !0)
|
|
24767
|
+
]), Z("div", bw, [(Y(!0), X(J, null, sa(ee.value, (e) => (Y(), X("div", {
|
|
24633
24768
|
key: e.id,
|
|
24634
24769
|
class: H(["trace-span", [e.type, e.status]])
|
|
24635
24770
|
}, [
|
|
24636
|
-
Z("span",
|
|
24637
|
-
Z("span",
|
|
24638
|
-
e.durationMs ? (Y(), X("span",
|
|
24639
|
-
e.status === "error" ? (Y(), X("span",
|
|
24640
|
-
], 2))), 128))])], 64)) : (Y(), X("div",
|
|
24771
|
+
Z("span", xw, U(re(e.type)), 1),
|
|
24772
|
+
Z("span", Sw, U(e.name), 1),
|
|
24773
|
+
e.durationMs ? (Y(), X("span", Cw, U(A(e.durationMs)), 1)) : Q("", !0),
|
|
24774
|
+
e.status === "error" ? (Y(), X("span", ww, "❌")) : Q("", !0)
|
|
24775
|
+
], 2))), 128))])], 64)) : (Y(), X("div", fw, [...n[8] ||= [
|
|
24641
24776
|
_s("未开启 tracing(", -1),
|
|
24642
24777
|
Z("code", null, "capabilities.tracing:true", -1),
|
|
24643
24778
|
_s(")或暂无 trace。跑一轮 agent 后刷新。", -1)
|
|
24644
24779
|
]]))])) : Q("", !0),
|
|
24645
|
-
y.value === "context" ? (Y(), X("div",
|
|
24646
|
-
Z("div",
|
|
24780
|
+
y.value === "context" ? (Y(), X("div", Tw, [M.value ? (Y(), X(J, { key: 1 }, [
|
|
24781
|
+
Z("div", Dw, [Z("div", Ow, [Z("div", {
|
|
24647
24782
|
class: "ctx-bar-track",
|
|
24648
24783
|
title: `占用 ${Math.round(M.value.occupancy * 100)}%`
|
|
24649
24784
|
}, [Z("div", {
|
|
@@ -24654,10 +24789,10 @@ app.mount('#app');
|
|
|
24654
24789
|
class: "ctx-threshold-mark",
|
|
24655
24790
|
style: Oe({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
|
|
24656
24791
|
title: "压缩阈值"
|
|
24657
|
-
}, null, 4)) : Q("", !0)], 8,
|
|
24658
|
-
Z("span",
|
|
24659
|
-
M.value.contextWindow ? (Y(), X("span",
|
|
24660
|
-
M.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
24792
|
+
}, null, 4)) : Q("", !0)], 8, kw), Z("span", Aw, U(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", jw, [
|
|
24793
|
+
Z("span", Mw, "估算 " + U(M.value.totalTokens) + " token", 1),
|
|
24794
|
+
M.value.contextWindow ? (Y(), X("span", Nw, "窗口 " + U(M.value.contextWindow), 1)) : Q("", !0),
|
|
24795
|
+
M.value.thresholdRatio > 0 ? (Y(), X("span", Pw, "阈值 " + U(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
24661
24796
|
])]),
|
|
24662
24797
|
n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
|
|
24663
24798
|
(Y(!0), X(J, null, sa(M.value.categories, (e) => (Y(), X("div", {
|
|
@@ -24667,228 +24802,228 @@ app.mount('#app');
|
|
|
24667
24802
|
Z("span", {
|
|
24668
24803
|
class: "ctx-cat-label",
|
|
24669
24804
|
title: e.label
|
|
24670
|
-
}, U(e.label), 9,
|
|
24671
|
-
Z("div",
|
|
24805
|
+
}, U(e.label), 9, Fw),
|
|
24806
|
+
Z("div", Iw, [Z("div", {
|
|
24672
24807
|
class: "ctx-cat-fill",
|
|
24673
24808
|
style: Oe({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
24674
24809
|
}, null, 4)]),
|
|
24675
|
-
Z("span",
|
|
24810
|
+
Z("span", Lw, [_s(U(e.tokens) + " ", 1), Z("i", null, "(" + U(Math.round(e.pct * 100)) + "%)", 1)])
|
|
24676
24811
|
]))), 128)),
|
|
24677
|
-
M.value.compression ? (Y(), X("div",
|
|
24678
|
-
Z("span",
|
|
24679
|
-
Z("span",
|
|
24680
|
-
Z("span",
|
|
24681
|
-
M.value.compression.decision ? (Y(), X("span",
|
|
24812
|
+
M.value.compression ? (Y(), X("div", Rw, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", zw, [
|
|
24813
|
+
Z("span", Bw, "摘要 " + U(M.value.compression.roundsSummarized) + "/" + U(M.value.compression.roundsTotal) + " 轮", 1),
|
|
24814
|
+
Z("span", Vw, "召回 " + U(M.value.compression.roundsRecalled), 1),
|
|
24815
|
+
Z("span", Hw, U(M.value.compression.strategy), 1),
|
|
24816
|
+
M.value.compression.decision ? (Y(), X("span", Uw, "🤖 agent 决策:" + U(R(M.value.compression.decision)), 1)) : Q("", !0)
|
|
24682
24817
|
])])) : Q("", !0)
|
|
24683
|
-
], 64)) : (Y(), X("div",
|
|
24684
|
-
y.value === "subagent" ? (Y(), X("div",
|
|
24818
|
+
], 64)) : (Y(), X("div", Ew, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
|
|
24819
|
+
y.value === "subagent" ? (Y(), X("div", Ww, [F.value.length ? (Y(), X("div", Gw, [Z("div", Kw, "🔒 组件锁 (" + U(F.value.length) + ")", 1), (Y(!0), X(J, null, sa(F.value, ([e, t]) => (Y(), X("div", {
|
|
24685
24820
|
key: "lock-" + e,
|
|
24686
24821
|
class: "sub-task"
|
|
24687
|
-
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div",
|
|
24822
|
+
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div", qw, [...n[17] ||= [
|
|
24688
24823
|
_s(" 尚未委派子 agent。主 agent 调用 ", -1),
|
|
24689
24824
|
Z("code", null, "use_<id>", -1),
|
|
24690
24825
|
_s(" 或 ", -1),
|
|
24691
24826
|
Z("code", null, "spawn_agent", -1),
|
|
24692
24827
|
_s(" 后,这里展示运行状态与委派历史。 ", -1)
|
|
24693
|
-
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div",
|
|
24828
|
+
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div", Jw, [Z("div", Yw, "▶ 运行中 (" + U(te.value.length) + ")", 1), (Y(!0), X(J, null, sa(te.value, (e, t) => (Y(), X("div", {
|
|
24694
24829
|
key: "a" + t,
|
|
24695
24830
|
class: H(["sub-card", e.status])
|
|
24696
|
-
}, [Z("div",
|
|
24831
|
+
}, [Z("div", Xw, [
|
|
24697
24832
|
Z("span", {
|
|
24698
24833
|
class: "sub-status",
|
|
24699
24834
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24700
24835
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24701
|
-
Z("span",
|
|
24702
|
-
Z("span",
|
|
24703
|
-
]), Z("div",
|
|
24836
|
+
Z("span", Zw, U(e.label), 1),
|
|
24837
|
+
Z("span", Qw, U(e.steps.length) + " 步", 1)
|
|
24838
|
+
]), Z("div", $w, U(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), P.value.length ? (Y(), X("div", eT, [Z("div", tT, "🕐 历史 (" + U(P.value.length) + ")", 1), (Y(!0), X(J, null, sa(P.value, (e, t) => (Y(), X("div", {
|
|
24704
24839
|
key: "h" + t,
|
|
24705
24840
|
class: H(["sub-card", e.status])
|
|
24706
24841
|
}, [
|
|
24707
|
-
Z("div",
|
|
24842
|
+
Z("div", nT, [
|
|
24708
24843
|
Z("span", {
|
|
24709
24844
|
class: "sub-status",
|
|
24710
24845
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24711
24846
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24712
|
-
Z("span",
|
|
24713
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
24847
|
+
Z("span", rT, U(e.label), 1),
|
|
24848
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", iT, U(A(e.durationMs)), 1)),
|
|
24714
24849
|
e.steps.length ? (Y(), X("button", {
|
|
24715
24850
|
key: 1,
|
|
24716
24851
|
class: "sub-toggle",
|
|
24717
24852
|
onClick: (e) => L(t)
|
|
24718
|
-
}, U(I.value.has(t) ? "收起" : "步骤"), 9,
|
|
24853
|
+
}, U(I.value.has(t) ? "收起" : "步骤"), 9, aT)) : Q("", !0)
|
|
24719
24854
|
]),
|
|
24720
|
-
Z("div",
|
|
24721
|
-
e.resultPreview ? (Y(), X("div",
|
|
24722
|
-
I.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
24855
|
+
Z("div", oT, U(k(e.task, 80)), 1),
|
|
24856
|
+
e.resultPreview ? (Y(), X("div", sT, U(e.resultPreview), 1)) : Q("", !0),
|
|
24857
|
+
I.value.has(t) && e.steps.length ? (Y(), X("div", cT, [(Y(!0), X(J, null, sa(e.steps, (e, t) => (Y(), X("div", {
|
|
24723
24858
|
key: t,
|
|
24724
24859
|
class: "sub-step"
|
|
24725
24860
|
}, [
|
|
24726
|
-
Z("span",
|
|
24727
|
-
Z("span",
|
|
24728
|
-
Z("span",
|
|
24861
|
+
Z("span", lT, U(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
24862
|
+
Z("span", uT, U(e.name), 1),
|
|
24863
|
+
Z("span", dT, U(d(e.ts)), 1)
|
|
24729
24864
|
]))), 128))])) : Q("", !0)
|
|
24730
24865
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
24731
|
-
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div",
|
|
24866
|
+
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", fT, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, sa(l.value, (e, t) => (Y(), X("div", {
|
|
24732
24867
|
key: t,
|
|
24733
24868
|
class: "log-item"
|
|
24734
24869
|
}, [
|
|
24735
|
-
Z("div",
|
|
24870
|
+
Z("div", pT, [
|
|
24736
24871
|
Z("span", {
|
|
24737
24872
|
class: "log-type",
|
|
24738
24873
|
style: Oe({ background: s[e.type].color })
|
|
24739
24874
|
}, U(s[e.type].icon) + " " + U(s[e.type].label), 5),
|
|
24740
|
-
e.source ? (Y(), X("span",
|
|
24741
|
-
Z("span",
|
|
24875
|
+
e.source ? (Y(), X("span", mT, "↳ " + U(e.source), 1)) : Q("", !0),
|
|
24876
|
+
Z("span", hT, U(d(e.timestamp)), 1)
|
|
24742
24877
|
]),
|
|
24743
|
-
Z("div",
|
|
24744
|
-
Z("div",
|
|
24745
|
-
Z("div",
|
|
24746
|
-
Z("div",
|
|
24747
|
-
Z("div",
|
|
24748
|
-
Z("div",
|
|
24878
|
+
Z("div", gT, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
24879
|
+
Z("div", _T, [
|
|
24880
|
+
Z("div", vT, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", yT, U(e.data.model), 1)]),
|
|
24881
|
+
Z("div", bT, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", xT, U(e.data.temperature), 1)]),
|
|
24882
|
+
Z("div", ST, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", CT, U(e.data.maxTokens), 1)]),
|
|
24883
|
+
Z("div", wT, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", TT, U(e.data.totalMessages), 1)])
|
|
24749
24884
|
]),
|
|
24750
|
-
Z("div",
|
|
24751
|
-
Z("div",
|
|
24885
|
+
Z("div", ET, "工具 (" + U(e.data.tools?.length || 0) + ")", 1),
|
|
24886
|
+
Z("div", DT, [(Y(!0), X(J, null, sa(e.data.tools, (e) => (Y(), X("span", {
|
|
24752
24887
|
key: e,
|
|
24753
24888
|
class: "tool-chip"
|
|
24754
24889
|
}, U(e), 1))), 128))]),
|
|
24755
24890
|
n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
|
|
24756
|
-
Z("div",
|
|
24891
|
+
Z("div", OT, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
24757
24892
|
key: t,
|
|
24758
24893
|
class: "msg-row"
|
|
24759
24894
|
}, [Z("span", {
|
|
24760
24895
|
class: "msg-role",
|
|
24761
24896
|
style: Oe({ background: g(e.type).color })
|
|
24762
|
-
}, U(g(e.type).label), 5), Z("span",
|
|
24763
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
24764
|
-
Z("span",
|
|
24765
|
-
e.data.model ? (Y(), X("span",
|
|
24766
|
-
Z("span",
|
|
24767
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
24897
|
+
}, U(g(e.type).label), 5), Z("span", kT, U(e.content), 1)]))), 128))])
|
|
24898
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", AT, [
|
|
24899
|
+
Z("span", jT, "第 " + U(e.data.round) + " 轮", 1),
|
|
24900
|
+
e.data.model ? (Y(), X("span", MT, U(e.data.model), 1)) : Q("", !0),
|
|
24901
|
+
Z("span", NT, U((e.data.messages || []).length) + " 条消息", 1),
|
|
24902
|
+
e.data.tools?.length ? (Y(), X("span", PT, U(e.data.tools.length) + " 工具", 1)) : Q("", !0),
|
|
24768
24903
|
Z("button", {
|
|
24769
24904
|
class: "view-toggle",
|
|
24770
24905
|
onClick: (e) => p(t)
|
|
24771
|
-
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9,
|
|
24772
|
-
]), o.value.has(t) ? (Y(), X("pre",
|
|
24906
|
+
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, FT)
|
|
24907
|
+
]), o.value.has(t) ? (Y(), X("pre", HT, [Z("code", null, U(m(e.data.messages)), 1)])) : (Y(), X("div", IT, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
24773
24908
|
key: t,
|
|
24774
24909
|
class: "msg-row"
|
|
24775
24910
|
}, [Z("span", {
|
|
24776
24911
|
class: "msg-role",
|
|
24777
24912
|
style: Oe({ background: g(e.role).color })
|
|
24778
|
-
}, U(g(e.role).label), 5), Z("div",
|
|
24779
|
-
e.content ? (Y(), X("span",
|
|
24913
|
+
}, U(g(e.role).label), 5), Z("div", LT, [
|
|
24914
|
+
e.content ? (Y(), X("span", RT, U(e.content), 1)) : Q("", !0),
|
|
24780
24915
|
(Y(!0), X(J, null, sa(e.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
24781
24916
|
key: t,
|
|
24782
24917
|
class: "tc-inline"
|
|
24783
|
-
}, [Z("span",
|
|
24784
|
-
e.tool_call_id ? (Y(), X("span",
|
|
24918
|
+
}, [Z("span", zT, "🔧 " + U(e.function?.name || e.name), 1), Z("code", BT, U(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
24919
|
+
e.tool_call_id ? (Y(), X("span", VT, "↳ tool_call_id: " + U(e.tool_call_id), 1)) : Q("", !0)
|
|
24785
24920
|
])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
24786
|
-
Z("div",
|
|
24787
|
-
e.data.content ? (Y(), X("div",
|
|
24788
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
24921
|
+
Z("div", UT, [Z("span", WT, "第 " + U(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", GT, "🔧 " + U(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
|
|
24922
|
+
e.data.content ? (Y(), X("div", KT, U(e.data.content), 1)) : Q("", !0),
|
|
24923
|
+
e.data.toolCalls?.length ? (Y(), X("div", qT, [(Y(!0), X(J, null, sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
24789
24924
|
key: t,
|
|
24790
24925
|
class: "tc-card"
|
|
24791
|
-
}, [Z("div",
|
|
24792
|
-
e.data.usage ? (Y(), X("div",
|
|
24793
|
-
Z("span",
|
|
24794
|
-
Z("span",
|
|
24795
|
-
Z("span",
|
|
24926
|
+
}, [Z("div", JT, "🔧 " + U(e.name), 1), Z("pre", YT, U(m(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
24927
|
+
e.data.usage ? (Y(), X("div", XT, [
|
|
24928
|
+
Z("span", ZT, "prompt: " + U(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
24929
|
+
Z("span", QT, "completion: " + U(e.data.usage.completion_tokens ?? "-"), 1),
|
|
24930
|
+
Z("span", $T, "total: " + U(e.data.usage.total_tokens ?? "-"), 1)
|
|
24796
24931
|
])) : Q("", !0)
|
|
24797
|
-
], 64)) : e.type === "tool_call" ? (Y(), X("div",
|
|
24798
|
-
Z("div",
|
|
24932
|
+
], 64)) : e.type === "tool_call" ? (Y(), X("div", eE, [Z("div", tE, "🔧 " + U(e.data.name), 1), Z("pre", nE, U(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", rE, [Z("div", iE, "✅ " + U(e.data.name) + " 结果", 1), Z("pre", aE, U(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", oE, U(e.data.tool ? `[${e.data.tool}] ` : "") + U(e.data.error), 1)) : Q("", !0)]),
|
|
24933
|
+
Z("div", sE, [Z("button", {
|
|
24799
24934
|
class: "raw-toggle",
|
|
24800
24935
|
onClick: (e) => f(t)
|
|
24801
|
-
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9,
|
|
24936
|
+
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, cE), Z("button", {
|
|
24802
24937
|
class: "raw-toggle",
|
|
24803
24938
|
onClick: (t) => K(g_)(m(e.data))
|
|
24804
|
-
}, "复制", 8,
|
|
24805
|
-
a.value.has(t) ? (Y(), X("pre",
|
|
24939
|
+
}, "复制", 8, lE)]),
|
|
24940
|
+
a.value.has(t) ? (Y(), X("pre", uE, [Z("code", null, U(m(e.data)), 1)])) : Q("", !0)
|
|
24806
24941
|
]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
|
|
24807
|
-
c.value.length ? Q("", !0) : (Y(), X("div",
|
|
24808
|
-
O.value.pre.length ? (Y(), X("div",
|
|
24942
|
+
c.value.length ? Q("", !0) : (Y(), X("div", dE, "暂无日志,发送消息后这里按轮次展示执行流程")),
|
|
24943
|
+
O.value.pre.length ? (Y(), X("div", fE, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, sa(O.value.pre, (e, t) => (Y(), X("div", {
|
|
24809
24944
|
key: "p" + t,
|
|
24810
24945
|
class: H(["flow-node", e.type])
|
|
24811
24946
|
}, [
|
|
24812
|
-
Z("span",
|
|
24813
|
-
Z("span",
|
|
24814
|
-
Z("span",
|
|
24815
|
-
Z("span",
|
|
24947
|
+
Z("span", pE, U(s[e.type]?.icon), 1),
|
|
24948
|
+
Z("span", mE, U(s[e.type]?.label), 1),
|
|
24949
|
+
Z("span", hE, U(ie(e)), 1),
|
|
24950
|
+
Z("span", gE, U(d(e.timestamp)), 1)
|
|
24816
24951
|
], 2))), 128))])) : Q("", !0),
|
|
24817
24952
|
(Y(!0), X(J, null, sa(O.value.rounds, (e) => (Y(), X("div", {
|
|
24818
24953
|
key: e.round,
|
|
24819
24954
|
class: "flow-round"
|
|
24820
|
-
}, [Z("div",
|
|
24955
|
+
}, [Z("div", _E, "🔁 第 " + U(e.round) + " 轮", 1), Z("div", vE, [(Y(!0), X(J, null, sa(e.items, (e, t) => (Y(), X("div", {
|
|
24821
24956
|
key: t,
|
|
24822
24957
|
class: H(["flow-node", e.type])
|
|
24823
24958
|
}, [
|
|
24824
|
-
Z("span",
|
|
24825
|
-
Z("span",
|
|
24826
|
-
Z("span",
|
|
24827
|
-
Z("span",
|
|
24959
|
+
Z("span", yE, U(s[e.type]?.icon), 1),
|
|
24960
|
+
Z("span", bE, U(s[e.type]?.label), 1),
|
|
24961
|
+
Z("span", xE, U(ie(e)), 1),
|
|
24962
|
+
Z("span", SE, U(d(e.timestamp)), 1)
|
|
24828
24963
|
], 2))), 128))])]))), 128))
|
|
24829
|
-
], 64)) : (Y(), X("div",
|
|
24830
|
-
Z("div",
|
|
24964
|
+
], 64)) : (Y(), X("div", CE, [b.value ? (Y(), X(J, { key: 1 }, [
|
|
24965
|
+
Z("div", TE, [
|
|
24831
24966
|
n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
|
|
24832
|
-
Z("div",
|
|
24833
|
-
Z("div",
|
|
24834
|
-
Z("div",
|
|
24835
|
-
Z("div",
|
|
24836
|
-
Z("div",
|
|
24967
|
+
Z("div", EE, [
|
|
24968
|
+
Z("div", DE, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OE, U(b.value.id), 1)]),
|
|
24969
|
+
Z("div", kE, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", AE, U(b.value.model || "-"), 1)]),
|
|
24970
|
+
Z("div", jE, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", ME, U(b.value.tools.length), 1)]),
|
|
24971
|
+
Z("div", NE, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", PE, U(b.value.middleware.length), 1)])
|
|
24837
24972
|
]),
|
|
24838
|
-
Z("div",
|
|
24973
|
+
Z("div", FE, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", IE, U(b.value.middleware.join(" → ") || "-"), 1)])
|
|
24839
24974
|
]),
|
|
24840
|
-
Z("div",
|
|
24975
|
+
Z("div", LE, [Z("div", RE, "🔧 工具 (" + U(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.tools, (e) => (Y(), X("div", {
|
|
24841
24976
|
key: e.name,
|
|
24842
24977
|
class: "info-item"
|
|
24843
|
-
}, [Z("div",
|
|
24978
|
+
}, [Z("div", zE, [_s(U(e.name), 1), e.source ? (Y(), X("span", {
|
|
24844
24979
|
key: 0,
|
|
24845
24980
|
class: H(["src-tag", D(e.source)])
|
|
24846
|
-
}, U(e.source), 3)) : Q("", !0)]), Z("div",
|
|
24847
|
-
b.value.skills.length ? (Y(), X("div",
|
|
24981
|
+
}, U(e.source), 3)) : Q("", !0)]), Z("div", BE, U(e.description), 1)]))), 128))]),
|
|
24982
|
+
b.value.skills.length ? (Y(), X("div", VE, [Z("div", HE, [_s("📘 技能 (" + U(b.value.skills.length) + ")", 1), n[30] ||= Z("span", { class: "info-hint" }, "点击展开查看全文", -1)]), (Y(!0), X(J, null, sa(b.value.skills, (e) => (Y(), X("div", {
|
|
24848
24983
|
key: e.name,
|
|
24849
24984
|
class: "info-item"
|
|
24850
24985
|
}, [
|
|
24851
24986
|
Z("div", {
|
|
24852
24987
|
class: "info-name skill-toggle",
|
|
24853
24988
|
onClick: (t) => S(e.name)
|
|
24854
|
-
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8,
|
|
24855
|
-
Z("div",
|
|
24856
|
-
x.value[e.name] ? (Y(), X("div",
|
|
24989
|
+
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8, UE),
|
|
24990
|
+
Z("div", WE, U(e.description), 1),
|
|
24991
|
+
x.value[e.name] ? (Y(), X("div", GE, [x.value[e.name].loading ? (Y(), X("div", KE, "加载中…")) : x.value[e.name].error ? (Y(), X("div", qE, U(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", JE, U(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
24857
24992
|
]))), 128))])) : Q("", !0),
|
|
24858
|
-
b.value.data ? (Y(), X("div",
|
|
24859
|
-
Z("div",
|
|
24860
|
-
Z("div",
|
|
24861
|
-
Z("div",
|
|
24862
|
-
Z("div",
|
|
24863
|
-
Z("div",
|
|
24993
|
+
b.value.data ? (Y(), X("div", YE, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", XE, [Z("div", ZE, U(b.value.data.description || "主数据对象"), 1), Z("div", QE, "schema: " + U(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
|
|
24994
|
+
Z("div", $E, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", eD, [
|
|
24995
|
+
Z("div", tD, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", nD, U(b.value.subagent.enabled ? "是" : "否"), 1)]),
|
|
24996
|
+
Z("div", rD, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", iD, U(b.value.subagent.maxDepth), 1)]),
|
|
24997
|
+
Z("div", aD, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", oD, U(b.value.subagent.maxParallel), 1)]),
|
|
24998
|
+
Z("div", sD, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", cD, U(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
|
|
24864
24999
|
])]),
|
|
24865
|
-
b.value.mcp?.servers?.length ? (Y(), X("div",
|
|
25000
|
+
b.value.mcp?.servers?.length ? (Y(), X("div", lD, [Z("div", uD, "🔌 MCP (" + U(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.mcp.servers, (e) => (Y(), X("div", {
|
|
24866
25001
|
key: e.name,
|
|
24867
25002
|
class: "info-item"
|
|
24868
|
-
}, [Z("div",
|
|
24869
|
-
b.value.verify ? (Y(), X("div",
|
|
24870
|
-
Z("div",
|
|
24871
|
-
Z("div",
|
|
24872
|
-
Z("div",
|
|
24873
|
-
b.value.verify.adversarial ? (Y(), X("div",
|
|
25003
|
+
}, [Z("div", dD, [_s(U(e.name) + " ", 1), Z("span", fD, U(e.toolCount) + " 工具", 1)]), Z("div", pD, U(e.url), 1)]))), 128))])) : Q("", !0),
|
|
25004
|
+
b.value.verify ? (Y(), X("div", mD, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", hD, [
|
|
25005
|
+
Z("div", gD, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", _D, U(b.value.verify.enabled ? "是" : "否"), 1)]),
|
|
25006
|
+
Z("div", vD, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", yD, U(b.value.verify.maxAttempts), 1)]),
|
|
25007
|
+
Z("div", bD, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", xD, U(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
|
|
25008
|
+
b.value.verify.adversarial ? (Y(), X("div", SD, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", CD, U(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
|
|
24874
25009
|
])])) : Q("", !0),
|
|
24875
|
-
b.value.todos.length ? (Y(), X("div",
|
|
25010
|
+
b.value.todos.length ? (Y(), X("div", wD, [Z("div", TD, "📋 任务清单 (" + U(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.todos, (e, t) => (Y(), X("div", {
|
|
24876
25011
|
key: t,
|
|
24877
25012
|
class: "info-todo"
|
|
24878
25013
|
}, [Z("span", {
|
|
24879
25014
|
class: "todo-tag",
|
|
24880
25015
|
style: Oe({ background: T[e.status] && T[e.status].color || "#9ca3af" })
|
|
24881
25016
|
}, U(E(e.status)), 5), Z("span", null, U(e.content), 1)]))), 128))])) : Q("", !0),
|
|
24882
|
-
b.value.memory ? (Y(), X("div",
|
|
24883
|
-
b.value.lastCompression ? (Y(), X("div",
|
|
24884
|
-
Z("div",
|
|
24885
|
-
Z("div",
|
|
24886
|
-
Z("div",
|
|
24887
|
-
Z("div",
|
|
24888
|
-
Z("div",
|
|
24889
|
-
b.value.lastCompression.decision ? (Y(), X("div",
|
|
25017
|
+
b.value.memory ? (Y(), X("div", ED, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", DD, U(b.value.memory), 1)])) : Q("", !0),
|
|
25018
|
+
b.value.lastCompression ? (Y(), X("div", OD, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", kD, [
|
|
25019
|
+
Z("div", AD, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", jD, U(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
|
|
25020
|
+
Z("div", MD, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", ND, U(b.value.lastCompression.roundsSummarized) + " / " + U(b.value.lastCompression.roundsTotal), 1)]),
|
|
25021
|
+
Z("div", PD, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", FD, U(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
|
|
25022
|
+
Z("div", ID, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", LD, U(b.value.lastCompression.originalMessages) + " → " + U(b.value.lastCompression.compressedMessages), 1)]),
|
|
25023
|
+
Z("div", RD, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", zD, U(b.value.lastCompression.strategy), 1)]),
|
|
25024
|
+
b.value.lastCompression.decision ? (Y(), X("div", BD, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", VD, "🤖 " + U(R(b.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
24890
25025
|
])])) : Q("", !0)
|
|
24891
|
-
], 64)) : (Y(), X("div",
|
|
25026
|
+
], 64)) : (Y(), X("div", wE, "暂无信息"))]))
|
|
24892
25027
|
])
|
|
24893
25028
|
], 2), Z("div", {
|
|
24894
25029
|
class: "drawer-mask",
|
|
@@ -24897,16 +25032,16 @@ app.mount('#app');
|
|
|
24897
25032
|
_: 1
|
|
24898
25033
|
})]));
|
|
24899
25034
|
}
|
|
24900
|
-
}), [["__scopeId", "data-v-9c201fc3"]]),
|
|
25035
|
+
}), [["__scopeId", "data-v-9c201fc3"]]), UD = { class: "skill-panel" }, WD = { class: "skill-header" }, GD = { class: "skill-section" }, KD = { class: "section-title" }, qD = { class: "field" }, JD = ["disabled"], YD = { class: "field" }, XD = { class: "field field-textarea" }, ZD = {
|
|
24901
25036
|
key: 0,
|
|
24902
25037
|
class: "skill-error"
|
|
24903
|
-
},
|
|
25038
|
+
}, QD = { class: "skill-section" }, $D = { class: "section-title" }, eO = {
|
|
24904
25039
|
key: 0,
|
|
24905
25040
|
class: "empty-hint"
|
|
24906
|
-
},
|
|
25041
|
+
}, tO = {
|
|
24907
25042
|
key: 1,
|
|
24908
25043
|
class: "skill-list"
|
|
24909
|
-
},
|
|
25044
|
+
}, nO = { class: "skill-actions" }, rO = ["onClick"], iO = ["onClick"], aO = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
24910
25045
|
__name: "SkillPanel",
|
|
24911
25046
|
props: {
|
|
24912
25047
|
visible: { type: Boolean },
|
|
@@ -24960,54 +25095,54 @@ app.mount('#app');
|
|
|
24960
25095
|
key: 0,
|
|
24961
25096
|
class: "skill-mask",
|
|
24962
25097
|
onClick: n[4] ||= yl((e) => r("close"), ["self"])
|
|
24963
|
-
}, [Z("div",
|
|
24964
|
-
Z("div",
|
|
25098
|
+
}, [Z("div", UD, [
|
|
25099
|
+
Z("div", WD, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
|
|
24965
25100
|
class: "skill-close",
|
|
24966
25101
|
title: "关闭",
|
|
24967
25102
|
onClick: n[0] ||= (e) => r("close")
|
|
24968
25103
|
}, "✕")]),
|
|
24969
|
-
Z("div",
|
|
24970
|
-
Z("div",
|
|
25104
|
+
Z("div", GD, [
|
|
25105
|
+
Z("div", KD, [_s(U(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
|
|
24971
25106
|
key: 0,
|
|
24972
25107
|
class: "btn btn-ghost btn-cancel",
|
|
24973
25108
|
title: "取消编辑,回到新建",
|
|
24974
25109
|
onClick: h
|
|
24975
25110
|
}, "取消编辑")) : Q("", !0)]),
|
|
24976
|
-
Z("label",
|
|
25111
|
+
Z("label", qD, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), Xr(Z("input", {
|
|
24977
25112
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
24978
25113
|
disabled: !!u.value,
|
|
24979
25114
|
placeholder: "如:my-writer",
|
|
24980
25115
|
class: "field-input"
|
|
24981
|
-
}, null, 8,
|
|
24982
|
-
Z("label",
|
|
25116
|
+
}, null, 8, JD), [[gl, i.value]])]),
|
|
25117
|
+
Z("label", YD, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), Xr(Z("input", {
|
|
24983
25118
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
24984
25119
|
placeholder: "一句话说明用途与触发时机",
|
|
24985
25120
|
class: "field-input"
|
|
24986
25121
|
}, null, 512), [[gl, a.value]])]),
|
|
24987
|
-
Z("label",
|
|
25122
|
+
Z("label", XD, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), Xr(Z("textarea", {
|
|
24988
25123
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
24989
25124
|
placeholder: "skill 全文指令(支持 Markdown)",
|
|
24990
25125
|
rows: "6",
|
|
24991
25126
|
class: "field-input"
|
|
24992
25127
|
}, null, 512), [[gl, o.value]])]),
|
|
24993
|
-
s.value ? (Y(), X("div",
|
|
25128
|
+
s.value ? (Y(), X("div", ZD, U(s.value), 1)) : Q("", !0),
|
|
24994
25129
|
Z("button", {
|
|
24995
25130
|
class: "btn btn-primary",
|
|
24996
25131
|
onClick: f
|
|
24997
25132
|
}, U(u.value ? "保存修改" : "添加 Skill"), 1)
|
|
24998
25133
|
]),
|
|
24999
|
-
Z("div",
|
|
25134
|
+
Z("div", QD, [Z("div", $D, "已创建 Skill(" + U(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", tO, [(Y(!0), X(J, null, sa(c.value, (e) => (Y(), X("li", {
|
|
25000
25135
|
key: e,
|
|
25001
25136
|
class: "skill-item"
|
|
25002
|
-
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span",
|
|
25137
|
+
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span", nO, [Z("button", {
|
|
25003
25138
|
class: "btn btn-ghost btn-edit",
|
|
25004
25139
|
title: "加载到表单编辑",
|
|
25005
25140
|
onClick: (t) => m(e)
|
|
25006
|
-
}, "编辑", 8,
|
|
25141
|
+
}, "编辑", 8, rO), Z("button", {
|
|
25007
25142
|
class: "btn btn-ghost btn-del",
|
|
25008
25143
|
title: "删除该用户 skill",
|
|
25009
25144
|
onClick: (t) => p(e)
|
|
25010
|
-
}, "删除", 8,
|
|
25145
|
+
}, "删除", 8, iO)])]))), 128))])) : (Y(), X("div", eO, "暂无用户创建的 skill"))]),
|
|
25011
25146
|
n[9] ||= Z("div", { class: "skill-hint" }, [
|
|
25012
25147
|
_s(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
|
|
25013
25148
|
Z("code", null, "load_skill(name)"),
|
|
@@ -25019,7 +25154,7 @@ app.mount('#app');
|
|
|
25019
25154
|
_: 1
|
|
25020
25155
|
})]));
|
|
25021
25156
|
}
|
|
25022
|
-
}), [["__scopeId", "data-v-c6a22ea5"]]),
|
|
25157
|
+
}), [["__scopeId", "data-v-c6a22ea5"]]), oO = /*#__PURE__*/ F_(/* @__PURE__ */ Fi({
|
|
25023
25158
|
__name: "ChatDialog",
|
|
25024
25159
|
props: {
|
|
25025
25160
|
fetchResponse: {},
|
|
@@ -25067,11 +25202,12 @@ app.mount('#app');
|
|
|
25067
25202
|
onRemoveFocus: {},
|
|
25068
25203
|
onFocusChipClick: {},
|
|
25069
25204
|
sections: {},
|
|
25070
|
-
csTheme: {}
|
|
25205
|
+
csTheme: {},
|
|
25206
|
+
icons: {}
|
|
25071
25207
|
},
|
|
25072
25208
|
emits: ["close"],
|
|
25073
25209
|
setup(e, { emit: t }) {
|
|
25074
|
-
let n = e, r = t, i =
|
|
25210
|
+
let n = e, r = t, i = b_({
|
|
25075
25211
|
fetchResponse: n.fetchResponse,
|
|
25076
25212
|
fetchStream: n.fetchStream,
|
|
25077
25213
|
messages: n.initialMessages,
|
|
@@ -25086,9 +25222,10 @@ app.mount('#app');
|
|
|
25086
25222
|
onRemoveFocus: n.onRemoveFocus,
|
|
25087
25223
|
onClearFocus: n.onClearFocus,
|
|
25088
25224
|
onFocusChipClick: n.onFocusChipClick,
|
|
25089
|
-
infoTick: n.infoTick
|
|
25225
|
+
infoTick: n.infoTick,
|
|
25226
|
+
icons: n.icons
|
|
25090
25227
|
});
|
|
25091
|
-
Qr(
|
|
25228
|
+
Qr(y_, i);
|
|
25092
25229
|
let { isExpanded: a, debugVisible: o, skillVisible: s, closeSkill: c } = i, { scrollContainer: l, onScroll: u, onWheel: d } = i.chat;
|
|
25093
25230
|
function f(e) {
|
|
25094
25231
|
return e === "focus" ? n.sections?.focus === !0 : n.sections?.[e] !== !1;
|
|
@@ -25116,7 +25253,7 @@ app.mount('#app');
|
|
|
25116
25253
|
f("header") ? ca(t.$slots, "header", {
|
|
25117
25254
|
key: 0,
|
|
25118
25255
|
chat: K(i)
|
|
25119
|
-
}, () => [fs(
|
|
25256
|
+
}, () => [fs(I_, {
|
|
25120
25257
|
title: e.title,
|
|
25121
25258
|
drawer: e.drawer,
|
|
25122
25259
|
"debug-logs": e.debugLogs,
|
|
@@ -25141,16 +25278,18 @@ app.mount('#app');
|
|
|
25141
25278
|
f("focus") ? ca(t.$slots, "focus", {
|
|
25142
25279
|
key: 1,
|
|
25143
25280
|
chat: K(i)
|
|
25144
|
-
}, () => [fs(
|
|
25281
|
+
}, () => [fs(U_, {
|
|
25145
25282
|
"get-focus": e.getFocus,
|
|
25146
25283
|
"on-set-focus": e.onSetFocus,
|
|
25147
25284
|
"on-clear-focus": e.onClearFocus,
|
|
25148
|
-
"info-tick": e.infoTick
|
|
25285
|
+
"info-tick": e.infoTick,
|
|
25286
|
+
icons: K(i).icons
|
|
25149
25287
|
}, null, 8, [
|
|
25150
25288
|
"get-focus",
|
|
25151
25289
|
"on-set-focus",
|
|
25152
25290
|
"on-clear-focus",
|
|
25153
|
-
"info-tick"
|
|
25291
|
+
"info-tick",
|
|
25292
|
+
"icons"
|
|
25154
25293
|
])], !0) : Q("", !0),
|
|
25155
25294
|
Z("div", {
|
|
25156
25295
|
class: "chat-main",
|
|
@@ -25163,7 +25302,7 @@ app.mount('#app');
|
|
|
25163
25302
|
key: 0,
|
|
25164
25303
|
name: "cs-slide"
|
|
25165
25304
|
}, {
|
|
25166
|
-
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(
|
|
25305
|
+
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(lC, {
|
|
25167
25306
|
"show-avatar": e.showAvatar,
|
|
25168
25307
|
"show-typing": e.showTyping
|
|
25169
25308
|
}, null, 8, ["show-avatar", "show-typing"]), [[Pc, K(a)]])], !0)]),
|
|
@@ -25172,24 +25311,29 @@ app.mount('#app');
|
|
|
25172
25311
|
f("queued") ? ca(t.$slots, "queued", {
|
|
25173
25312
|
key: 1,
|
|
25174
25313
|
chat: K(i)
|
|
25175
|
-
}, () => [fs(
|
|
25314
|
+
}, () => [fs(vC)], !0) : Q("", !0),
|
|
25176
25315
|
f("approval") ? ca(t.$slots, "approval", {
|
|
25177
25316
|
key: 2,
|
|
25178
25317
|
chat: K(i)
|
|
25179
|
-
}, () => [fs(
|
|
25318
|
+
}, () => [fs(AC)], !0) : Q("", !0),
|
|
25180
25319
|
f("conflict") ? ca(t.$slots, "conflict", {
|
|
25181
25320
|
key: 3,
|
|
25182
25321
|
chat: K(i)
|
|
25183
|
-
}, () => [fs(
|
|
25322
|
+
}, () => [fs(HC, {
|
|
25184
25323
|
"pending-conflict": e.pendingConflict,
|
|
25185
|
-
"on-resolve": e.onResolveConflict
|
|
25186
|
-
|
|
25324
|
+
"on-resolve": e.onResolveConflict,
|
|
25325
|
+
icons: K(i).icons
|
|
25326
|
+
}, null, 8, [
|
|
25327
|
+
"pending-conflict",
|
|
25328
|
+
"on-resolve",
|
|
25329
|
+
"icons"
|
|
25330
|
+
])], !0) : Q("", !0)
|
|
25187
25331
|
], 544),
|
|
25188
25332
|
f("footer") ? (Y(), as(gc, {
|
|
25189
25333
|
key: 2,
|
|
25190
25334
|
name: "cs-slide"
|
|
25191
25335
|
}, {
|
|
25192
|
-
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(
|
|
25336
|
+
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(tw, {
|
|
25193
25337
|
placeholder: e.placeholder,
|
|
25194
25338
|
"input-rows": e.inputRows
|
|
25195
25339
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
@@ -25198,7 +25342,7 @@ app.mount('#app');
|
|
|
25198
25342
|
f("debug") ? ca(t.$slots, "debug", {
|
|
25199
25343
|
key: 3,
|
|
25200
25344
|
chat: K(i)
|
|
25201
|
-
}, () => [fs(
|
|
25345
|
+
}, () => [fs(HD, {
|
|
25202
25346
|
visible: K(o),
|
|
25203
25347
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ Sn(o) ? o.value = e : null,
|
|
25204
25348
|
logs: e.debugLogs,
|
|
@@ -25217,7 +25361,7 @@ app.mount('#app');
|
|
|
25217
25361
|
f("skill") ? ca(t.$slots, "skill", {
|
|
25218
25362
|
key: 4,
|
|
25219
25363
|
chat: K(i)
|
|
25220
|
-
}, () => [fs(
|
|
25364
|
+
}, () => [fs(aO, {
|
|
25221
25365
|
visible: K(s),
|
|
25222
25366
|
"on-add-skill": e.onAddSkill,
|
|
25223
25367
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -25234,13 +25378,13 @@ app.mount('#app');
|
|
|
25234
25378
|
])], !0) : Q("", !0)
|
|
25235
25379
|
], 6)], 64));
|
|
25236
25380
|
}
|
|
25237
|
-
}), [["__scopeId", "data-v-
|
|
25381
|
+
}), [["__scopeId", "data-v-74327cc5"]]);
|
|
25238
25382
|
//#endregion
|
|
25239
25383
|
//#region src/core/sdk/mountChatDialog.ts
|
|
25240
|
-
function
|
|
25384
|
+
function sO(e) {
|
|
25241
25385
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
25242
25386
|
return r = Tl(/* @__PURE__ */ Fi({ setup() {
|
|
25243
|
-
return () => $s(
|
|
25387
|
+
return () => $s(oO, {
|
|
25244
25388
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
25245
25389
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
25246
25390
|
if (n) {
|
|
@@ -25286,6 +25430,7 @@ function zD(e) {
|
|
|
25286
25430
|
drawerHidden: n.drawerHidden === !0,
|
|
25287
25431
|
inputRows: n.inputRows,
|
|
25288
25432
|
sections: n.sections,
|
|
25433
|
+
icons: n.icons,
|
|
25289
25434
|
getFocus: () => t.getFocus(),
|
|
25290
25435
|
getFocuses: () => t.getFocuses(),
|
|
25291
25436
|
onSetFocus: (e) => t.setFocus(e),
|
|
@@ -25339,7 +25484,7 @@ function zD(e) {
|
|
|
25339
25484
|
}
|
|
25340
25485
|
//#endregion
|
|
25341
25486
|
//#region src/core/sdk/ragSubagent.ts
|
|
25342
|
-
function
|
|
25487
|
+
function cO(e, t, n, r, i) {
|
|
25343
25488
|
let a = [];
|
|
25344
25489
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
25345
25490
|
let o = [];
|
|
@@ -25354,7 +25499,7 @@ function BD(e, t, n, r, i) {
|
|
|
25354
25499
|
|
|
25355
25500
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
25356
25501
|
}
|
|
25357
|
-
function
|
|
25502
|
+
function lO(e, t, n, r, i) {
|
|
25358
25503
|
let a = [], o = [];
|
|
25359
25504
|
return e && (a.push("- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查"), o.push("- 静态文档(组件库文档 / UI 规范):vfs_grep")), t && (a.push(`- ${r}:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用`), o.push(`- 语义相似(「瀑布流组件」「倒计时」「拼团」):${r}`)), n && (a.push(`- ${i}:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档`), o.push(`- 已知文档 id / URL:${i}`)), a.push("- fetch_document:公网 URL —— 查公开资料"), o.push("- 公开 URL(设计规范网站 / 第三方文档):fetch_document"), `# 知识检索策略(RAG)
|
|
25360
25505
|
|
|
@@ -25371,12 +25516,12 @@ ${a.join("\n")}
|
|
|
25371
25516
|
## 何时用何源
|
|
25372
25517
|
${o.join("\n")}`;
|
|
25373
25518
|
}
|
|
25374
|
-
var
|
|
25519
|
+
var uO = {
|
|
25375
25520
|
name: "rag-search",
|
|
25376
25521
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
25377
|
-
getContent: () =>
|
|
25522
|
+
getContent: () => lO(!0, !0, !0, "search_docs", "load_doc")
|
|
25378
25523
|
};
|
|
25379
|
-
function
|
|
25524
|
+
function dO(e, n, i) {
|
|
25380
25525
|
return r(async ({ query: e, topK: t }) => {
|
|
25381
25526
|
try {
|
|
25382
25527
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -25393,7 +25538,7 @@ function UD(e, n, i) {
|
|
|
25393
25538
|
})
|
|
25394
25539
|
});
|
|
25395
25540
|
}
|
|
25396
|
-
function
|
|
25541
|
+
function fO(e, n) {
|
|
25397
25542
|
return r(async ({ source: e }) => {
|
|
25398
25543
|
try {
|
|
25399
25544
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -25407,19 +25552,19 @@ function WD(e, n) {
|
|
|
25407
25552
|
schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
|
|
25408
25553
|
});
|
|
25409
25554
|
}
|
|
25410
|
-
function
|
|
25555
|
+
function pO(e) {
|
|
25411
25556
|
let { retriever: t, loader: n, useVfs: r = !0, id: i = "rag", description: a, topK: o = 5, searchToolName: s = "search_docs", loadToolName: c = "load_doc", maxToolRounds: l = 8, summarization: u, skills: d, extraTools: f } = e;
|
|
25412
25557
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
25413
25558
|
let p = [];
|
|
25414
|
-
t && p.push(
|
|
25559
|
+
t && p.push(dO(s, t, o)), n && p.push(fO(c, n)), f && p.push(...f);
|
|
25415
25560
|
let m = r ? [
|
|
25416
25561
|
"vfs_grep",
|
|
25417
25562
|
"vfs_read",
|
|
25418
25563
|
"vfs_json_read"
|
|
25419
|
-
] : void 0, h =
|
|
25564
|
+
] : void 0, h = cO(r, !!t, !!n, s, c), g = {
|
|
25420
25565
|
name: "rag-search",
|
|
25421
|
-
description:
|
|
25422
|
-
getContent: () =>
|
|
25566
|
+
description: uO.description,
|
|
25567
|
+
getContent: () => lO(r, !!t, !!n, s, c)
|
|
25423
25568
|
};
|
|
25424
25569
|
return {
|
|
25425
25570
|
id: i,
|
|
@@ -25434,8 +25579,8 @@ function GD(e) {
|
|
|
25434
25579
|
}
|
|
25435
25580
|
//#endregion
|
|
25436
25581
|
//#region src/core/index.ts
|
|
25437
|
-
function
|
|
25438
|
-
return p_(e,
|
|
25582
|
+
function mO(e) {
|
|
25583
|
+
return p_(e, sO);
|
|
25439
25584
|
}
|
|
25440
25585
|
//#endregion
|
|
25441
|
-
export {
|
|
25586
|
+
export { AC as ApprovalBar, Eh as CAPABILITIES, kh as CONTEXT_PRESETS, oO as ChatDialog, I_ as ChatHeader, tw as ChatInput, NS as CodePreview, Bm as CompressDecisionSchema, HC as ConflictBar, __ as DEFAULT_DIALOG_ICONS, Kf as DEFAULT_PROMPT_SOFT_CAP, Wp as DEFAULT_SYSTEM_PROMPT, HD as DebugDrawer, U_ as FocusBar, uS as HLJS_BLOCK_MAX_CHARS, om as HTML_VOID_TAGS, vf as HUMAN_CONFIRM_TOOL_NAME, Ul as MIN_CONTEXT_WINDOW, FS as MessageContent, lC as MessageList, eC as MessageRow, vC as QueuedBar, Gf as SOFT_CAP_MIN_WINDOW, zf as STOP_WORDS, aO as SkillPanel, hd as UNSAFE_KEYS, Hg as actionsToInspectInfo, Vg as actionsToTools, Il as agentError, Lp as analyzeContext, Od as applyPatchToClone, jd as applyPatchToLive, Fl as asAgentError, Gp as buildDataPrompt, jm as buildHtmlFragmentSkill, Kp as buildSystemPrompt, y_ as chatContextKey, hg as commitSetToBind, Up as connectMcp, C as constructLlmFromConfig, S as constructOpenLlmSync, g_ as copyText, ku as createAgent, _f as createApprovalMiddleware, b_ as createChatContext, mO as createChatSdk, Of as createCheckpointManager, kf as createCheckpointMiddleware, Qm as createConflictManager, Rp as createContextInspectorMiddleware, Cg as createDataOps, Nm as createHtmlFormatCheck, Im as createHtmlSubagent, xf as createHumanConfirmMiddleware, bf as createHumanConfirmTool, yh as createMemoryBackend, uf as createMemoryMiddleware, y as createProxyLlm, pO as createRagSubagent, qd as createSandboxRunner, Oh as createSdkEvents, a_ as createSerialRunner, Ch as createSessionStore, t_ as createSkillStore, mp as createSubagentMiddleware, Qf as createSubagentTracker, _p as createSubagentsMiddleware, Yg as createUsageHintsMiddleware, vp as createVerifyMiddleware, Xp as createVfs, xh as createWebStorageBackend, wp as createWriteBackCheck, xd as deepClone, Gg as defineDataToolset, Yd as defineSkill, Lm as defineTool, bd as deleteByPath, Vm as deriveTitle, Ku as describeSchemaNode, pu as detectGarbledToolCall, _u as detectTransitionalReply, Fd as diffObjects, kg as domToStructure, jg as domTools, Wg as domToolsStatic, Vf as estimateMessageTokens, Hf as estimateRoundTokens, Gl as estimateTokens, T as extractReasoningDelta, ad as extractSchemaHint, zp as extractText, w as extractTextDelta, E as extractUsage, Tg as fetchDocTools, Ug as fetchTools, mg as filterByToolMode, Pd as findStrippedKeys, qu as formatConstraints, jl as formatZodIssues, vd as getByPath, Ag as getDomTool, Pg as getEnvSummary, Nu as getSchemaAtPath, Au as getSchemaTopKeys, Jl as getTraceMetrics, Dd as hashValue, Mm as htmlFragmentSkill, ed as htmlOrchestratorPrompt, Uf as indexSummarize, Lg as inspectEnvTool, Rg as inspectTools, Hm as isChatModel, iu as isContextLengthError, ju as isPathAllowed, dh as isQuotaError, gd as isUnsafePath, Uh as jpEval, Nl as jsonParseError, wd as limitDepth, gS as markedToHtml, Sd as maybeParseValue, Ad as moveByPath, x as normalizeBaseUrl, O as normalizeUsage, ql as offloadPassThroughChars, Kl as offloadThresholdChars, $u as presets, Bu as projectBySchema, zu as projectBySchemaDeep, Cd as projectFields, Wf as recallRounds, _S as renderMarkdownHtml, Ju as renderSchemaHint, Yu as renderSchemaOverview, Qu as renderSchemaShallow, Dh as resolveCapabilities, jh as resolveContextOptions, Th as resolveDialogConfig, v_ as resolveDialogIcons, Zm as resolveLlm, Wl as resolveModelCaps, qf as resolvePromptSoftCap, wh as resolveStorage, Nd as restoreInPlace, Md as restoreLive, Pl as routeError, Jd as runHostScript, qh as runSandboxedScript, _d as safeMerge, Ng as safeSerialize, Td as safeStringify, mu as sanitizeGarbledContent, Gh as searchJson, Kg as selectBuiltinTools, yd as setByPath, Jf as shouldTriggerCompression, b as stripStainlessFetch, td as systemPromptHelpers, Bf as tokenize, $ as toolError, Mu as unwrapSchema, h_ as useChat, x_ as useChatContext, cm as validateHtmlFormat, e as z, Ml as zodError };
|