page-agent-sdk 3.19.1 → 3.20.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 +4 -2
- package/README.zh-CN.md +4 -2
- package/dist/page-agent-sdk.headless.js +235 -29
- package/dist/page-agent-sdk.iife.js +143 -144
- package/dist/page-agent-sdk.js +1240 -1002
- package/dist/page-agent-sdk.umd.cjs +39 -40
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +90 -0
package/dist/page-agent-sdk.js
CHANGED
|
@@ -6201,7 +6201,8 @@ function Bd(e) {
|
|
|
6201
6201
|
let n = [
|
|
6202
6202
|
"## 当前精修目标",
|
|
6203
6203
|
t.map((e) => `· ${e.path}${e.label ? `(${e.label})` : ""}`).join("\n"),
|
|
6204
|
-
`仅操作上述 ${t.length} 个聚焦子树${t.length > 1 ? "之一" : ""},用户未指明目标的指令默认作用于聚焦组件;不要改动其他组件;${i}
|
|
6204
|
+
`仅操作上述 ${t.length} 个聚焦子树${t.length > 1 ? "之一" : ""},用户未指明目标的指令默认作用于聚焦组件;不要改动其他组件;${i}`,
|
|
6205
|
+
"read 不带路径时默认只返回聚焦子树;需要全量主数据时显式列顶层键(read({jsonPaths:[...]}) )"
|
|
6205
6206
|
], r = e.getSchema();
|
|
6206
6207
|
if (r) {
|
|
6207
6208
|
let e = t.map((e) => {
|
|
@@ -6230,6 +6231,22 @@ function Bd(e) {
|
|
|
6230
6231
|
if (!r.length) return o("(整体数据)");
|
|
6231
6232
|
for (let n of r) if (!t.some((e) => Rd(n, e.path)) && !zd(n, e.getBind?.())) return o(n);
|
|
6232
6233
|
}
|
|
6234
|
+
if (n.name === "read") {
|
|
6235
|
+
let e = n.args;
|
|
6236
|
+
if (!e?.jsonPath && !e?.jsonPaths) {
|
|
6237
|
+
let i = t.map((e) => e.path), a = await r({
|
|
6238
|
+
...n,
|
|
6239
|
+
args: {
|
|
6240
|
+
...e,
|
|
6241
|
+
jsonPaths: i
|
|
6242
|
+
}
|
|
6243
|
+
}), o = `【聚焦模式】read 未带路径 → 默认返回聚焦子树(${i.join(", ")});需要全量主数据时显式列顶层键,如 read({jsonPaths:['<顶层键1>','<顶层键2>']})\n`;
|
|
6244
|
+
return {
|
|
6245
|
+
...a,
|
|
6246
|
+
content: o + a.content
|
|
6247
|
+
};
|
|
6248
|
+
}
|
|
6249
|
+
}
|
|
6233
6250
|
}
|
|
6234
6251
|
return r(n);
|
|
6235
6252
|
},
|
|
@@ -9299,17 +9316,19 @@ function Gm(e) {
|
|
|
9299
9316
|
let n = Hm(t) ? t : null, r = Hm(t) ? null : t;
|
|
9300
9317
|
if (r && !r.apiKey) return;
|
|
9301
9318
|
let i = n;
|
|
9302
|
-
return async (
|
|
9303
|
-
let
|
|
9319
|
+
return async (t) => {
|
|
9320
|
+
let n = t.filter((e) => e.role === "user" || e.role === "assistant").map((e) => `${e.role === "user" ? "用户" : "助手"}: ${e.content}`).join("\n").slice(0, 800), s = new AbortController(), c = setTimeout(() => s.abort(), 1e4);
|
|
9304
9321
|
try {
|
|
9305
|
-
|
|
9322
|
+
!i && r && (i = await C(r, {
|
|
9306
9323
|
temperature: 0,
|
|
9307
9324
|
maxTokens: 30
|
|
9308
|
-
}))
|
|
9325
|
+
}));
|
|
9326
|
+
let t = await i.invoke([new o(e.dialog?.locale === "en-US" ? "Generate a short English title (max 10 words) summarizing the conversation below. Output the title text only, no quotes or punctuation." : "根据以下对话的主旨,生成一个简短的中文标题(不超过15个字,不要标点和引号,直接输出标题文字)。"), new a(n)], { signal: s.signal }), c = e.dialog?.locale === "en-US" ? 60 : 20;
|
|
9327
|
+
return Um(t).trim().replace(/^["'""「『]|["'""」』]$/g, "").split("\n")[0].slice(0, c);
|
|
9309
9328
|
} catch {
|
|
9310
9329
|
return "";
|
|
9311
9330
|
} finally {
|
|
9312
|
-
clearTimeout(
|
|
9331
|
+
clearTimeout(c);
|
|
9313
9332
|
}
|
|
9314
9333
|
};
|
|
9315
9334
|
}
|
|
@@ -13918,12 +13937,197 @@ function v_(e) {
|
|
|
13918
13937
|
let n = e[r];
|
|
13919
13938
|
typeof n == "string" && (t[r] = n);
|
|
13920
13939
|
}
|
|
13921
|
-
return e.assistantAvatar && (t.assistantAvatar = e.assistantAvatar), e.userAvatar && (t.userAvatar = e.userAvatar), t;
|
|
13940
|
+
return e.assistantAvatar && (t.assistantAvatar = e.assistantAvatar), e.userAvatar && (t.userAvatar = e.userAvatar), e.send && (t.send = e.send), t;
|
|
13941
|
+
}
|
|
13942
|
+
//#endregion
|
|
13943
|
+
//#region src/core/components/messages.ts
|
|
13944
|
+
var y_ = {
|
|
13945
|
+
defaultTitle: "AI 助手",
|
|
13946
|
+
inputPlaceholder: "输入消息,Enter 发送...",
|
|
13947
|
+
newSession: "新建会话",
|
|
13948
|
+
history: "历史记录",
|
|
13949
|
+
more: "更多",
|
|
13950
|
+
close: "关闭",
|
|
13951
|
+
debugMenu: "调试 / 日志",
|
|
13952
|
+
debugMenuTitle: "日志 / 执行流程 / Agent 信息",
|
|
13953
|
+
skillMenu: "Skill 管理",
|
|
13954
|
+
skillMenuTitle: "创建 / 管理自定义 Skill",
|
|
13955
|
+
clearChat: "清空对话",
|
|
13956
|
+
sessionFallbackPrefix: "会话 ",
|
|
13957
|
+
justNow: "刚刚",
|
|
13958
|
+
minutesAgoSuffix: "分钟前",
|
|
13959
|
+
emptyGreeting: "有什么可以帮你的?",
|
|
13960
|
+
retry: "重试",
|
|
13961
|
+
undo: "↩ 回退",
|
|
13962
|
+
undoTitle: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
13963
|
+
thinking: "思考中...",
|
|
13964
|
+
statusRunning: "执行中",
|
|
13965
|
+
statusDone: "成功",
|
|
13966
|
+
statusError: "失败",
|
|
13967
|
+
subagentBadge: "子",
|
|
13968
|
+
subagentBadgeTitle: "子 agent 委派(独立上下文,只回结论)",
|
|
13969
|
+
subagentProgress: "子 agent 进度",
|
|
13970
|
+
nthCallPrefix: "第 ",
|
|
13971
|
+
nthCallSuffix: " 次",
|
|
13972
|
+
argsLabel: "入参",
|
|
13973
|
+
resultLabel: "返回值",
|
|
13974
|
+
copy: "复制",
|
|
13975
|
+
copied: "已复制",
|
|
13976
|
+
regenerate: "重新生成",
|
|
13977
|
+
expand: "展开",
|
|
13978
|
+
collapse: "收起",
|
|
13979
|
+
noResult: "(无返回值)",
|
|
13980
|
+
displayTruncatedSuffix: "\n…(展示截断,复制可得全量)",
|
|
13981
|
+
thinkingCountPrefix: "思考中… ",
|
|
13982
|
+
charCountSuffix: "字",
|
|
13983
|
+
reasoningTitle: "思考过程",
|
|
13984
|
+
truncatedNotePrefix: "(仅显最近 ",
|
|
13985
|
+
truncatedNoteSuffix: " 字)",
|
|
13986
|
+
copyThinking: "复制完整思考内容",
|
|
13987
|
+
copyThinkingTruncTitle: "复制完整思考(渲染已截尾,复制取全量)",
|
|
13988
|
+
focusChipTitlePrefix: "精修中:",
|
|
13989
|
+
focusChipTitleHint: "(点击回看 · ✕ 移除)",
|
|
13990
|
+
historyFocusChipTitlePrefix: "回看 ",
|
|
13991
|
+
removeFocus: "移除此焦点",
|
|
13992
|
+
sendHint: "Enter 发送 · Shift+Enter 换行",
|
|
13993
|
+
sendTitle: "发送",
|
|
13994
|
+
stopTitle: "停止生成",
|
|
13995
|
+
queuedTitle: "排队中 · 生成完后自动执行",
|
|
13996
|
+
queuedEditTitle: "修改(填回输入框编辑)",
|
|
13997
|
+
removeQueuedTitle: "撤销该任务",
|
|
13998
|
+
humanConfirmTitle: "AI 需要你确认",
|
|
13999
|
+
recommendPrefix: " 推荐:",
|
|
14000
|
+
approve: "允许",
|
|
14001
|
+
deny: "拒绝",
|
|
14002
|
+
toolConfirmPrefix: "需确认工具调用:",
|
|
14003
|
+
viewArgs: "查看参数",
|
|
14004
|
+
collapseArgs: "收起参数",
|
|
14005
|
+
argsTruncatedSuffix: "\n…(已截断)",
|
|
14006
|
+
conflictTitlePrefix: "写入冲突:",
|
|
14007
|
+
conflictTitleSuffix: " 已被外部修改",
|
|
14008
|
+
conflictDetailTemplate: "AI 基于「读取时的旧值」准备{op},但该属性在你读取之后被外部代码/其他 agent/手动改过。",
|
|
14009
|
+
conflictOpWrite: "写入",
|
|
14010
|
+
conflictOpDelete: "删除",
|
|
14011
|
+
viewDiff: "查看值对比",
|
|
14012
|
+
collapseDiff: "收起对比",
|
|
14013
|
+
agentValueLabel: "AI 想写的值",
|
|
14014
|
+
currentValueLabel: "外部改后的当前值",
|
|
14015
|
+
deleteNoValue: "(delete 操作无值)",
|
|
14016
|
+
keepExternal: "保留外部",
|
|
14017
|
+
keepExternalTitle: "不写入,保留外部修改后的值,AI 重新读取再改",
|
|
14018
|
+
overwrite: "强制覆盖",
|
|
14019
|
+
overwriteTitle: "用 AI 的值覆盖外部修改",
|
|
14020
|
+
restore: "回退",
|
|
14021
|
+
restoreTitle: "回退到最近一次历史快照(agent 之前操作的检查点),撤销外部修改 + AI 不写入",
|
|
14022
|
+
switchFocusTitle: "切换聚焦路径",
|
|
14023
|
+
exitFocusTitle: "退出精修",
|
|
14024
|
+
focusPathPlaceholder: "jsonPath,如 components.3",
|
|
14025
|
+
focusLabelPlaceholder: "标签(可选)",
|
|
14026
|
+
focusSubmit: "聚焦"
|
|
14027
|
+
}, b_ = {
|
|
14028
|
+
defaultTitle: "AI Assistant",
|
|
14029
|
+
inputPlaceholder: "Type a message, Enter to send...",
|
|
14030
|
+
newSession: "New chat",
|
|
14031
|
+
history: "History",
|
|
14032
|
+
more: "More",
|
|
14033
|
+
close: "Close",
|
|
14034
|
+
debugMenu: "Debug / Logs",
|
|
14035
|
+
debugMenuTitle: "Logs / execution flow / agent info",
|
|
14036
|
+
skillMenu: "Skills",
|
|
14037
|
+
skillMenuTitle: "Create / manage custom skills",
|
|
14038
|
+
clearChat: "Clear conversation",
|
|
14039
|
+
sessionFallbackPrefix: "Session ",
|
|
14040
|
+
justNow: "just now",
|
|
14041
|
+
minutesAgoSuffix: " min ago",
|
|
14042
|
+
emptyGreeting: "How can I help you?",
|
|
14043
|
+
retry: "Retry",
|
|
14044
|
+
undo: "↩ Undo",
|
|
14045
|
+
undoTitle: "Restore the last good state (conversation + page data + workspace)",
|
|
14046
|
+
thinking: "Thinking...",
|
|
14047
|
+
statusRunning: "Running",
|
|
14048
|
+
statusDone: "Success",
|
|
14049
|
+
statusError: "Failed",
|
|
14050
|
+
subagentBadge: "sub",
|
|
14051
|
+
subagentBadgeTitle: "Sub-agent delegation (isolated context, conclusion only)",
|
|
14052
|
+
subagentProgress: "Sub-agent progress",
|
|
14053
|
+
nthCallPrefix: "Call #",
|
|
14054
|
+
nthCallSuffix: "",
|
|
14055
|
+
argsLabel: "Args",
|
|
14056
|
+
resultLabel: "Result",
|
|
14057
|
+
copy: "Copy",
|
|
14058
|
+
copied: "Copied",
|
|
14059
|
+
regenerate: "Regenerate",
|
|
14060
|
+
expand: "Expand",
|
|
14061
|
+
collapse: "Collapse",
|
|
14062
|
+
noResult: "(no result)",
|
|
14063
|
+
displayTruncatedSuffix: "\n…(truncated for display, copy for full)",
|
|
14064
|
+
thinkingCountPrefix: "Thinking… ",
|
|
14065
|
+
charCountSuffix: " chars",
|
|
14066
|
+
reasoningTitle: "Reasoning",
|
|
14067
|
+
truncatedNotePrefix: "(last ",
|
|
14068
|
+
truncatedNoteSuffix: " chars only)",
|
|
14069
|
+
copyThinking: "Copy full reasoning",
|
|
14070
|
+
copyThinkingTruncTitle: "Copy full reasoning (display truncated, copy gets all)",
|
|
14071
|
+
focusChipTitlePrefix: "Focus:",
|
|
14072
|
+
focusChipTitleHint: "(click to view · ✕ remove)",
|
|
14073
|
+
historyFocusChipTitlePrefix: "View ",
|
|
14074
|
+
removeFocus: "Remove this focus",
|
|
14075
|
+
sendHint: "Enter to send · Shift+Enter for newline",
|
|
14076
|
+
sendTitle: "Send",
|
|
14077
|
+
stopTitle: "Stop generating",
|
|
14078
|
+
queuedTitle: "Queued · runs when current finishes",
|
|
14079
|
+
queuedEditTitle: "Edit (fill back into input)",
|
|
14080
|
+
removeQueuedTitle: "Drop this task",
|
|
14081
|
+
humanConfirmTitle: "AI needs your confirmation",
|
|
14082
|
+
recommendPrefix: " Recommend:",
|
|
14083
|
+
approve: "Allow",
|
|
14084
|
+
deny: "Deny",
|
|
14085
|
+
toolConfirmPrefix: "Confirm tool call:",
|
|
14086
|
+
viewArgs: "View args",
|
|
14087
|
+
collapseArgs: "Collapse args",
|
|
14088
|
+
argsTruncatedSuffix: "\n…(truncated)",
|
|
14089
|
+
conflictTitlePrefix: "Write conflict:",
|
|
14090
|
+
conflictTitleSuffix: " was modified externally",
|
|
14091
|
+
conflictDetailTemplate: "The AI prepared to {op} based on the stale value it read, but the property was changed afterwards by external code / another agent / manual edit.",
|
|
14092
|
+
conflictOpWrite: "write",
|
|
14093
|
+
conflictOpDelete: "delete",
|
|
14094
|
+
viewDiff: "View diff",
|
|
14095
|
+
collapseDiff: "Collapse diff",
|
|
14096
|
+
agentValueLabel: "Value AI wants to write",
|
|
14097
|
+
currentValueLabel: "Current value (external)",
|
|
14098
|
+
deleteNoValue: "(delete op has no value)",
|
|
14099
|
+
keepExternal: "Keep external",
|
|
14100
|
+
keepExternalTitle: "Skip the write, keep the external value; AI re-reads then retries",
|
|
14101
|
+
overwrite: "Overwrite",
|
|
14102
|
+
overwriteTitle: "Overwrite external changes with the AI value",
|
|
14103
|
+
restore: "Restore",
|
|
14104
|
+
restoreTitle: "Restore the latest snapshot (checkpoint before the agent op); undo external change, AI does not write",
|
|
14105
|
+
switchFocusTitle: "Switch focus path",
|
|
14106
|
+
exitFocusTitle: "Exit focus",
|
|
14107
|
+
focusPathPlaceholder: "jsonPath, e.g. components.3",
|
|
14108
|
+
focusLabelPlaceholder: "Label (optional)",
|
|
14109
|
+
focusSubmit: "Focus"
|
|
14110
|
+
}, x_ = {
|
|
14111
|
+
"zh-CN": y_,
|
|
14112
|
+
"en-US": b_
|
|
14113
|
+
};
|
|
14114
|
+
function S_(e = "zh-CN", t) {
|
|
14115
|
+
let n = {
|
|
14116
|
+
...y_,
|
|
14117
|
+
...x_[e]
|
|
14118
|
+
};
|
|
14119
|
+
if (!t) return n;
|
|
14120
|
+
let r = { ...n };
|
|
14121
|
+
for (let e of Object.keys(n)) {
|
|
14122
|
+
let n = t[e];
|
|
14123
|
+
typeof n == "string" && (r[e] = n);
|
|
14124
|
+
}
|
|
14125
|
+
return r;
|
|
13922
14126
|
}
|
|
13923
14127
|
//#endregion
|
|
13924
14128
|
//#region src/core/composables/chatContext.ts
|
|
13925
|
-
var
|
|
13926
|
-
function
|
|
14129
|
+
var C_ = Symbol("chatContext");
|
|
14130
|
+
function w_(e = {}) {
|
|
13927
14131
|
let t = h_({
|
|
13928
14132
|
fetchResponse: e.fetchResponse,
|
|
13929
14133
|
fetchStream: e.fetchStream,
|
|
@@ -13957,7 +14161,7 @@ function b_(e = {}) {
|
|
|
13957
14161
|
};
|
|
13958
14162
|
}), x = Qs(() => (n.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), S = () => {
|
|
13959
14163
|
e.onUndo?.() && (n.error = null);
|
|
13960
|
-
}, C = (e) => new Date(e).toLocaleTimeString(
|
|
14164
|
+
}, C = (e) => new Date(e).toLocaleTimeString(N, {
|
|
13961
14165
|
hour: "2-digit",
|
|
13962
14166
|
minute: "2-digit"
|
|
13963
14167
|
}), w = () => {
|
|
@@ -13971,7 +14175,16 @@ function b_(e = {}) {
|
|
|
13971
14175
|
if (!r || r.role !== "assistant") return !1;
|
|
13972
14176
|
let i = "reasoning" in r ? r.reasoning : void 0;
|
|
13973
14177
|
return n.loading && e === t.length - 1 && !r.content && !i;
|
|
13974
|
-
}, O = Qs(() => (e.infoTick?.value, e.getFocuses?.() ?? []))
|
|
14178
|
+
}, O = Qs(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), k = (t) => e.onAddFocus ? e.onAddFocus(t) : {
|
|
14179
|
+
ok: !1,
|
|
14180
|
+
error: "focus 未启用"
|
|
14181
|
+
}, A = (t) => {
|
|
14182
|
+
e.onRemoveFocus?.(t);
|
|
14183
|
+
}, ee = () => {
|
|
14184
|
+
e.onClearFocus?.();
|
|
14185
|
+
}, j = (t) => {
|
|
14186
|
+
e.onFocusChipClick?.(t);
|
|
14187
|
+
}, M = v_(e.icons), N = e.locale ?? "zh-CN";
|
|
13975
14188
|
return {
|
|
13976
14189
|
chat: t,
|
|
13977
14190
|
inputText: o,
|
|
@@ -13997,38 +14210,31 @@ function b_(e = {}) {
|
|
|
13997
14210
|
editQueued: E,
|
|
13998
14211
|
isPendingAssistant: D,
|
|
13999
14212
|
focuses: O,
|
|
14000
|
-
addFocus:
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
clearFocus: () => {
|
|
14008
|
-
e.onClearFocus?.();
|
|
14009
|
-
},
|
|
14010
|
-
focusChipClick: (t) => {
|
|
14011
|
-
e.onFocusChipClick?.(t);
|
|
14012
|
-
},
|
|
14013
|
-
icons: v_(e.icons)
|
|
14213
|
+
addFocus: k,
|
|
14214
|
+
removeFocus: A,
|
|
14215
|
+
clearFocus: ee,
|
|
14216
|
+
focusChipClick: j,
|
|
14217
|
+
icons: M,
|
|
14218
|
+
locale: N,
|
|
14219
|
+
messages: S_(N, e.dialogMessages)
|
|
14014
14220
|
};
|
|
14015
14221
|
}
|
|
14016
|
-
function
|
|
14017
|
-
let e = $r(
|
|
14222
|
+
function T_() {
|
|
14223
|
+
let e = $r(C_);
|
|
14018
14224
|
if (!e) throw Error("useChatContext 必须在 provide(chatContextKey) 的组件子树内调用");
|
|
14019
14225
|
return e;
|
|
14020
14226
|
}
|
|
14021
14227
|
//#endregion
|
|
14022
14228
|
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
14023
|
-
function
|
|
14229
|
+
function E_(e, t) {
|
|
14024
14230
|
(t == null || t > e.length) && (t = e.length);
|
|
14025
14231
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
14026
14232
|
return r;
|
|
14027
14233
|
}
|
|
14028
|
-
function
|
|
14234
|
+
function D_(e) {
|
|
14029
14235
|
if (Array.isArray(e)) return e;
|
|
14030
14236
|
}
|
|
14031
|
-
function
|
|
14237
|
+
function O_(e, t) {
|
|
14032
14238
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
14033
14239
|
if (n != null) {
|
|
14034
14240
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -14046,113 +14252,113 @@ function w_(e, t) {
|
|
|
14046
14252
|
return s;
|
|
14047
14253
|
}
|
|
14048
14254
|
}
|
|
14049
|
-
function
|
|
14255
|
+
function k_() {
|
|
14050
14256
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14051
14257
|
}
|
|
14052
|
-
function
|
|
14053
|
-
return
|
|
14258
|
+
function A_(e, t) {
|
|
14259
|
+
return D_(e) || O_(e, t) || j_(e, t) || k_();
|
|
14054
14260
|
}
|
|
14055
|
-
function
|
|
14261
|
+
function j_(e, t) {
|
|
14056
14262
|
if (e) {
|
|
14057
|
-
if (typeof e == "string") return
|
|
14263
|
+
if (typeof e == "string") return E_(e, t);
|
|
14058
14264
|
var n = {}.toString.call(e).slice(8, -1);
|
|
14059
|
-
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) ?
|
|
14265
|
+
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) ? E_(e, t) : void 0;
|
|
14060
14266
|
}
|
|
14061
14267
|
}
|
|
14062
|
-
var
|
|
14063
|
-
|
|
14268
|
+
var M_ = Object.entries, N_ = Object.setPrototypeOf, P_ = Object.isFrozen, F_ = Object.getPrototypeOf, I_ = Object.getOwnPropertyDescriptor, L_ = Object.freeze, R_ = Object.seal, z_ = Object.create, B_ = typeof Reflect < "u" && Reflect, V_ = B_.apply, H_ = B_.construct;
|
|
14269
|
+
L_ ||= function(e) {
|
|
14064
14270
|
return e;
|
|
14065
|
-
},
|
|
14271
|
+
}, R_ ||= function(e) {
|
|
14066
14272
|
return e;
|
|
14067
|
-
},
|
|
14273
|
+
}, V_ ||= function(e, t) {
|
|
14068
14274
|
var n = [...arguments].slice(2);
|
|
14069
14275
|
return e.apply(t, n);
|
|
14070
|
-
},
|
|
14276
|
+
}, H_ ||= function(e) {
|
|
14071
14277
|
return new e(...[...arguments].slice(1));
|
|
14072
14278
|
};
|
|
14073
|
-
var
|
|
14074
|
-
function
|
|
14279
|
+
var U_ = lv(Array.prototype.forEach), W_ = lv(Array.prototype.lastIndexOf), G_ = lv(Array.prototype.pop), K_ = lv(Array.prototype.push), q_ = lv(Array.prototype.splice), J_ = Array.isArray, Y_ = lv(String.prototype.toLowerCase), X_ = lv(String.prototype.toString), Z_ = lv(String.prototype.match), Q_ = lv(String.prototype.replace), $_ = lv(String.prototype.indexOf), ev = lv(String.prototype.trim), tv = lv(Number.prototype.toString), nv = lv(Boolean.prototype.toString), rv = typeof BigInt > "u" ? null : lv(BigInt.prototype.toString), iv = typeof Symbol > "u" ? null : lv(Symbol.prototype.toString), av = lv(Object.prototype.hasOwnProperty), ov = lv(Object.prototype.toString), sv = lv(RegExp.prototype.test), cv = uv(TypeError);
|
|
14280
|
+
function lv(e) {
|
|
14075
14281
|
return function(t) {
|
|
14076
14282
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
14077
14283
|
var n = [...arguments].slice(1);
|
|
14078
|
-
return
|
|
14284
|
+
return V_(e, t, n);
|
|
14079
14285
|
};
|
|
14080
14286
|
}
|
|
14081
|
-
function
|
|
14287
|
+
function uv(e) {
|
|
14082
14288
|
return function() {
|
|
14083
|
-
return
|
|
14289
|
+
return H_(e, [...arguments]);
|
|
14084
14290
|
};
|
|
14085
14291
|
}
|
|
14086
|
-
function
|
|
14087
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
14088
|
-
if (
|
|
14292
|
+
function dv(e, t) {
|
|
14293
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Y_;
|
|
14294
|
+
if (N_ && N_(e, null), !J_(t)) return e;
|
|
14089
14295
|
let r = t.length;
|
|
14090
14296
|
for (; r--;) {
|
|
14091
14297
|
let i = t[r];
|
|
14092
14298
|
if (typeof i == "string") {
|
|
14093
14299
|
let e = n(i);
|
|
14094
|
-
e !== i && (
|
|
14300
|
+
e !== i && (P_(t) || (t[r] = e), i = e);
|
|
14095
14301
|
}
|
|
14096
14302
|
e[i] = !0;
|
|
14097
14303
|
}
|
|
14098
14304
|
return e;
|
|
14099
14305
|
}
|
|
14100
|
-
function
|
|
14101
|
-
for (let t = 0; t < e.length; t++)
|
|
14306
|
+
function fv(e) {
|
|
14307
|
+
for (let t = 0; t < e.length; t++) av(e, t) || (e[t] = null);
|
|
14102
14308
|
return e;
|
|
14103
14309
|
}
|
|
14104
|
-
function
|
|
14105
|
-
let t =
|
|
14106
|
-
for (let r of
|
|
14107
|
-
var n =
|
|
14310
|
+
function pv(e) {
|
|
14311
|
+
let t = z_(null);
|
|
14312
|
+
for (let r of M_(e)) {
|
|
14313
|
+
var n = A_(r, 2);
|
|
14108
14314
|
let i = n[0], a = n[1];
|
|
14109
|
-
|
|
14315
|
+
av(e, i) && (J_(a) ? t[i] = fv(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = pv(a) : t[i] = a);
|
|
14110
14316
|
}
|
|
14111
14317
|
return t;
|
|
14112
14318
|
}
|
|
14113
|
-
function
|
|
14319
|
+
function mv(e) {
|
|
14114
14320
|
switch (typeof e) {
|
|
14115
14321
|
case "string": return e;
|
|
14116
|
-
case "number": return
|
|
14117
|
-
case "boolean": return
|
|
14118
|
-
case "bigint": return
|
|
14119
|
-
case "symbol": return
|
|
14120
|
-
case "undefined": return
|
|
14322
|
+
case "number": return tv(e);
|
|
14323
|
+
case "boolean": return nv(e);
|
|
14324
|
+
case "bigint": return rv ? rv(e) : "0";
|
|
14325
|
+
case "symbol": return iv ? iv(e) : "Symbol()";
|
|
14326
|
+
case "undefined": return ov(e);
|
|
14121
14327
|
case "function":
|
|
14122
14328
|
case "object": {
|
|
14123
|
-
if (e === null) return
|
|
14124
|
-
let t = e, n =
|
|
14329
|
+
if (e === null) return ov(e);
|
|
14330
|
+
let t = e, n = hv(t, "toString");
|
|
14125
14331
|
if (typeof n == "function") {
|
|
14126
14332
|
let e = n(t);
|
|
14127
|
-
return typeof e == "string" ? e :
|
|
14333
|
+
return typeof e == "string" ? e : ov(e);
|
|
14128
14334
|
}
|
|
14129
|
-
return
|
|
14335
|
+
return ov(e);
|
|
14130
14336
|
}
|
|
14131
|
-
default: return
|
|
14337
|
+
default: return ov(e);
|
|
14132
14338
|
}
|
|
14133
14339
|
}
|
|
14134
|
-
function
|
|
14340
|
+
function hv(e, t) {
|
|
14135
14341
|
for (; e !== null;) {
|
|
14136
|
-
let n =
|
|
14342
|
+
let n = I_(e, t);
|
|
14137
14343
|
if (n) {
|
|
14138
|
-
if (n.get) return
|
|
14139
|
-
if (typeof n.value == "function") return
|
|
14344
|
+
if (n.get) return lv(n.get);
|
|
14345
|
+
if (typeof n.value == "function") return lv(n.value);
|
|
14140
14346
|
}
|
|
14141
|
-
e =
|
|
14347
|
+
e = F_(e);
|
|
14142
14348
|
}
|
|
14143
14349
|
function n() {
|
|
14144
14350
|
return null;
|
|
14145
14351
|
}
|
|
14146
14352
|
return n;
|
|
14147
14353
|
}
|
|
14148
|
-
function
|
|
14354
|
+
function gv(e) {
|
|
14149
14355
|
try {
|
|
14150
|
-
return
|
|
14356
|
+
return sv(e, ""), !0;
|
|
14151
14357
|
} catch {
|
|
14152
14358
|
return !1;
|
|
14153
14359
|
}
|
|
14154
14360
|
}
|
|
14155
|
-
var
|
|
14361
|
+
var _v = L_(/* @__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(".")), vv = L_(/* @__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(".")), yv = L_([
|
|
14156
14362
|
"feBlend",
|
|
14157
14363
|
"feColorMatrix",
|
|
14158
14364
|
"feComponentTransfer",
|
|
@@ -14178,7 +14384,7 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14178
14384
|
"feSpotLight",
|
|
14179
14385
|
"feTile",
|
|
14180
14386
|
"feTurbulence"
|
|
14181
|
-
]),
|
|
14387
|
+
]), bv = L_([
|
|
14182
14388
|
"animate",
|
|
14183
14389
|
"color-profile",
|
|
14184
14390
|
"cursor",
|
|
@@ -14201,7 +14407,7 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14201
14407
|
"solidcolor",
|
|
14202
14408
|
"unknown",
|
|
14203
14409
|
"use"
|
|
14204
|
-
]),
|
|
14410
|
+
]), xv = L_(/* @__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(".")), Sv = L_([
|
|
14205
14411
|
"maction",
|
|
14206
14412
|
"maligngroup",
|
|
14207
14413
|
"malignmark",
|
|
@@ -14217,13 +14423,13 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14217
14423
|
"annotation-xml",
|
|
14218
14424
|
"mprescripts",
|
|
14219
14425
|
"none"
|
|
14220
|
-
]),
|
|
14426
|
+
]), Cv = L_(["#text"]), wv = L_(/* @__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(".")), Tv = L_(/* @__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(".")), Ev = L_(/* @__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(".")), Dv = L_([
|
|
14221
14427
|
"xlink:href",
|
|
14222
14428
|
"xml:id",
|
|
14223
14429
|
"xlink:title",
|
|
14224
14430
|
"xml:space",
|
|
14225
14431
|
"xmlns:xlink"
|
|
14226
|
-
]),
|
|
14432
|
+
]), Ov = R_(/{{[\w\W]*|^[\w\W]*}}/g), kv = R_(/<%[\w\W]*|^[\w\W]*%>/g), Av = R_(/\${[\w\W]*/g), jv = R_(/^data-[\-\w.\u00B7-\uFFFF]+$/), Mv = R_(/^aria-[\-\w]+$/), Nv = R_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Pv = R_(/^(?:\w+script|data):/i), Fv = R_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Iv = R_(/^html$/i), Lv = R_(/^[a-z][.\w]*(-[.\w]+)+$/i), Rv = R_(/<[/\w!]/g), zv = R_(/<[/\w]/g), Bv = R_(/<\/no(script|embed|frames)/i), Vv = R_(/\/>/i), Hv = {
|
|
14227
14433
|
element: 1,
|
|
14228
14434
|
attribute: 2,
|
|
14229
14435
|
text: 3,
|
|
@@ -14236,9 +14442,9 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14236
14442
|
documentType: 10,
|
|
14237
14443
|
documentFragment: 11,
|
|
14238
14444
|
notation: 12
|
|
14239
|
-
},
|
|
14445
|
+
}, Uv = function() {
|
|
14240
14446
|
return typeof window > "u" ? null : window;
|
|
14241
|
-
},
|
|
14447
|
+
}, Wv = function(e, t) {
|
|
14242
14448
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
14243
14449
|
let n = null, r = "data-tt-policy-suffix";
|
|
14244
14450
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -14255,7 +14461,7 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14255
14461
|
} catch {
|
|
14256
14462
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
14257
14463
|
}
|
|
14258
|
-
},
|
|
14464
|
+
}, Gv = function() {
|
|
14259
14465
|
return {
|
|
14260
14466
|
afterSanitizeAttributes: [],
|
|
14261
14467
|
afterSanitizeElements: [],
|
|
@@ -14267,23 +14473,23 @@ var pv = N_(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
14267
14473
|
uponSanitizeElement: [],
|
|
14268
14474
|
uponSanitizeShadowNode: []
|
|
14269
14475
|
};
|
|
14270
|
-
},
|
|
14271
|
-
return
|
|
14476
|
+
}, Kv = function(e, t, n, r) {
|
|
14477
|
+
return av(e, t) && J_(e[t]) ? dv(r.base ? pv(r.base) : {}, e[t], r.transform) : n;
|
|
14272
14478
|
};
|
|
14273
|
-
function
|
|
14274
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
14275
|
-
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
14479
|
+
function qv() {
|
|
14480
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Uv(), t = (e) => qv(e);
|
|
14481
|
+
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== Hv.document || !e.Element) return t.isSupported = !1, t;
|
|
14276
14482
|
let n = e.document, r = n, i = r.currentScript;
|
|
14277
14483
|
e.DocumentFragment;
|
|
14278
14484
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
14279
14485
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
14280
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
14486
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = hv(d, "cloneNode"), p = hv(d, "remove"), m = hv(d, "nextSibling"), h = hv(d, "childNodes"), g = hv(d, "parentNode"), _ = hv(d, "shadowRoot"), v = hv(d, "attributes"), y = o && o.prototype ? hv(o.prototype, "nodeType") : null, b = o && o.prototype ? hv(o.prototype, "nodeName") : null, x = o && o.prototype ? hv(o.prototype, "ownerDocument") : null;
|
|
14281
14487
|
if (typeof a == "function") {
|
|
14282
14488
|
let e = n.createElement("template");
|
|
14283
14489
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
14284
14490
|
}
|
|
14285
14491
|
let S, C = "", w, T = !1, E = 0, D = function() {
|
|
14286
|
-
if (E > 0) throw
|
|
14492
|
+
if (E > 0) throw cv("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.");
|
|
14287
14493
|
}, O = function(e) {
|
|
14288
14494
|
D(), E++;
|
|
14289
14495
|
try {
|
|
@@ -14299,21 +14505,21 @@ function Uv() {
|
|
|
14299
14505
|
E--;
|
|
14300
14506
|
}
|
|
14301
14507
|
}, A = function() {
|
|
14302
|
-
return T ||= (w =
|
|
14303
|
-
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F =
|
|
14304
|
-
t.isSupported = typeof
|
|
14305
|
-
let ne =
|
|
14306
|
-
...pv,
|
|
14307
|
-
...mv,
|
|
14308
|
-
...hv,
|
|
14508
|
+
return T ||= (w = Wv(u, i), !0), w;
|
|
14509
|
+
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F = Gv();
|
|
14510
|
+
t.isSupported = typeof M_ == "function" && typeof g == "function" && j && j.createHTMLDocument !== void 0;
|
|
14511
|
+
let ne = Ov, I = kv, L = Av, re = jv, R = Mv, ie = Pv, z = Fv, ae = Lv, oe = Nv, B = null, se = dv({}, [
|
|
14309
14512
|
..._v,
|
|
14310
|
-
...
|
|
14311
|
-
|
|
14312
|
-
...bv,
|
|
14513
|
+
...vv,
|
|
14514
|
+
...yv,
|
|
14313
14515
|
...xv,
|
|
14314
|
-
...Sv,
|
|
14315
14516
|
...Cv
|
|
14316
|
-
]),
|
|
14517
|
+
]), ce = null, le = dv({}, [
|
|
14518
|
+
...wv,
|
|
14519
|
+
...Tv,
|
|
14520
|
+
...Ev,
|
|
14521
|
+
...Dv
|
|
14522
|
+
]), ue = Object.seal(z_(null, {
|
|
14317
14523
|
tagNameCheck: {
|
|
14318
14524
|
writable: !0,
|
|
14319
14525
|
configurable: !1,
|
|
@@ -14332,7 +14538,7 @@ function Uv() {
|
|
|
14332
14538
|
enumerable: !0,
|
|
14333
14539
|
value: !1
|
|
14334
14540
|
}
|
|
14335
|
-
})), de = null, V = null, fe = Object.seal(
|
|
14541
|
+
})), de = null, V = null, fe = Object.seal(z_(null, {
|
|
14336
14542
|
tagCheck: {
|
|
14337
14543
|
writable: !0,
|
|
14338
14544
|
configurable: !1,
|
|
@@ -14345,14 +14551,14 @@ function Uv() {
|
|
|
14345
14551
|
enumerable: !0,
|
|
14346
14552
|
value: null
|
|
14347
14553
|
}
|
|
14348
|
-
})), 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 =
|
|
14554
|
+
})), 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 = dv({}, /* @__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 = dv({}, [
|
|
14349
14555
|
"audio",
|
|
14350
14556
|
"video",
|
|
14351
14557
|
"img",
|
|
14352
14558
|
"source",
|
|
14353
14559
|
"image",
|
|
14354
14560
|
"track"
|
|
14355
|
-
]), Ie = null, Le =
|
|
14561
|
+
]), Ie = null, Le = dv({}, [
|
|
14356
14562
|
"alt",
|
|
14357
14563
|
"class",
|
|
14358
14564
|
"for",
|
|
@@ -14367,17 +14573,17 @@ function Uv() {
|
|
|
14367
14573
|
"value",
|
|
14368
14574
|
"style",
|
|
14369
14575
|
"xmlns"
|
|
14370
|
-
]), 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 =
|
|
14576
|
+
]), 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 = dv({}, [
|
|
14371
14577
|
Re,
|
|
14372
14578
|
ze,
|
|
14373
14579
|
Be
|
|
14374
|
-
],
|
|
14580
|
+
], X_), U = L_([
|
|
14375
14581
|
"mi",
|
|
14376
14582
|
"mo",
|
|
14377
14583
|
"mn",
|
|
14378
14584
|
"ms",
|
|
14379
14585
|
"mtext"
|
|
14380
|
-
]), Ge =
|
|
14586
|
+
]), Ge = dv({}, U), Ke = L_(["annotation-xml"]), qe = dv({}, Ke), Je = dv({}, [
|
|
14381
14587
|
"title",
|
|
14382
14588
|
"style",
|
|
14383
14589
|
"font",
|
|
@@ -14388,21 +14594,21 @@ function Uv() {
|
|
|
14388
14594
|
}, et = function() {
|
|
14389
14595
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
14390
14596
|
if (W && W === e) return;
|
|
14391
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
14597
|
+
(!e || typeof e != "object") && (e = {}), e = pv(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? X_ : Y_, B = Kv(e, "ALLOWED_TAGS", se, { transform: Ze }), ce = Kv(e, "ALLOWED_ATTR", le, { transform: Ze }), Ue = Kv(e, "ALLOWED_NAMESPACES", We, { transform: X_ }), Ie = Kv(e, "ADD_URI_SAFE_ATTR", Le, {
|
|
14392
14598
|
transform: Ze,
|
|
14393
14599
|
base: Le
|
|
14394
|
-
}), Pe =
|
|
14600
|
+
}), Pe = Kv(e, "ADD_DATA_URI_TAGS", Fe, {
|
|
14395
14601
|
transform: Ze,
|
|
14396
14602
|
base: Fe
|
|
14397
|
-
}), H =
|
|
14398
|
-
let t =
|
|
14399
|
-
if (ue =
|
|
14603
|
+
}), H = Kv(e, "FORBID_CONTENTS", Ne, { transform: Ze }), de = Kv(e, "FORBID_TAGS", pv({}), { transform: Ze }), V = Kv(e, "FORBID_ATTR", pv({}), { transform: Ze }), Me = av(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? pv(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 = gv(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Nv, Ve = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Be, Ge = av(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? pv(e.MATHML_TEXT_INTEGRATION_POINTS) : dv({}, U), qe = av(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? pv(e.HTML_INTEGRATION_POINTS) : dv({}, Ke);
|
|
14604
|
+
let t = av(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? pv(e.CUSTOM_ELEMENT_HANDLING) : z_(null);
|
|
14605
|
+
if (ue = z_(null), av(t, "tagNameCheck") && $e(t.tagNameCheck) && (ue.tagNameCheck = t.tagNameCheck), av(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (ue.attributeNameCheck = t.attributeNameCheck), av(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), R_(ue), _e && (me = !1), Te && (we = !0), Me && (B = dv({}, Cv), ce = z_(null), Me.html === !0 && (dv(B, _v), dv(ce, wv)), Me.svg === !0 && (dv(B, vv), dv(ce, Tv), dv(ce, Dv)), Me.svgFilters === !0 && (dv(B, yv), dv(ce, Tv), dv(ce, Dv)), Me.mathMl === !0 && (dv(B, xv), dv(ce, Ev), dv(ce, Dv))), fe.tagCheck = null, fe.attributeCheck = null, av(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? fe.tagCheck = e.ADD_TAGS : J_(e.ADD_TAGS) && (B === se && (B = pv(B)), dv(B, e.ADD_TAGS, Ze))), av(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? fe.attributeCheck = e.ADD_ATTR : J_(e.ADD_ATTR) && (ce === le && (ce = pv(ce)), dv(ce, e.ADD_ATTR, Ze))), av(e, "ADD_URI_SAFE_ATTR") && J_(e.ADD_URI_SAFE_ATTR) && dv(Ie, e.ADD_URI_SAFE_ATTR, Ze), av(e, "FORBID_CONTENTS") && J_(e.FORBID_CONTENTS) && (H === Ne && (H = pv(H)), dv(H, e.FORBID_CONTENTS, Ze)), av(e, "ADD_FORBID_CONTENTS") && J_(e.ADD_FORBID_CONTENTS) && (H === Ne && (H = pv(H)), dv(H, e.ADD_FORBID_CONTENTS, Ze)), Ae && (B["#text"] = !0), ye && dv(B, [
|
|
14400
14606
|
"html",
|
|
14401
14607
|
"head",
|
|
14402
14608
|
"body"
|
|
14403
|
-
]), B.table && (
|
|
14404
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
14405
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
14609
|
+
]), B.table && (dv(B, ["tbody"]), delete de.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
14610
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw cv("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
14611
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw cv("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
14406
14612
|
let t = S;
|
|
14407
14613
|
S = e.TRUSTED_TYPES_POLICY;
|
|
14408
14614
|
try {
|
|
@@ -14411,12 +14617,12 @@ function Uv() {
|
|
|
14411
14617
|
throw S = t, e;
|
|
14412
14618
|
}
|
|
14413
14619
|
} else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = A()), S && typeof C == "string" && (C = O("")));
|
|
14414
|
-
|
|
14415
|
-
}, tt =
|
|
14416
|
-
...
|
|
14417
|
-
...
|
|
14418
|
-
...
|
|
14419
|
-
]), nt =
|
|
14620
|
+
L_ && L_(e), W = e;
|
|
14621
|
+
}, tt = dv({}, [
|
|
14622
|
+
...vv,
|
|
14623
|
+
...yv,
|
|
14624
|
+
...bv
|
|
14625
|
+
]), nt = dv({}, [...xv, ...Sv]), rt = function(e, t, n) {
|
|
14420
14626
|
return t.namespaceURI === Be ? e === "svg" : t.namespaceURI === Re ? e === "svg" && (n === "annotation-xml" || Ge[n]) : !!tt[e];
|
|
14421
14627
|
}, it = function(e, t, n) {
|
|
14422
14628
|
return t.namespaceURI === Be ? e === "math" : t.namespaceURI === ze ? e === "math" && qe[n] : !!nt[e];
|
|
@@ -14428,23 +14634,23 @@ function Uv() {
|
|
|
14428
14634
|
namespaceURI: Ve,
|
|
14429
14635
|
tagName: "template"
|
|
14430
14636
|
});
|
|
14431
|
-
let n =
|
|
14637
|
+
let n = Y_(e.tagName), r = Y_(t.tagName);
|
|
14432
14638
|
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;
|
|
14433
14639
|
}, st = function(e) {
|
|
14434
|
-
|
|
14640
|
+
K_(t.removed, { element: e });
|
|
14435
14641
|
try {
|
|
14436
14642
|
g(e).removeChild(e);
|
|
14437
14643
|
} catch {
|
|
14438
|
-
if (p(e), !g(e)) throw
|
|
14644
|
+
if (p(e), !g(e)) throw cv("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
14439
14645
|
}
|
|
14440
14646
|
}, ct = function(e) {
|
|
14441
14647
|
dt(e);
|
|
14442
14648
|
let t = h(e);
|
|
14443
14649
|
if (t) {
|
|
14444
14650
|
let e = [];
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
}),
|
|
14651
|
+
U_(t, (t) => {
|
|
14652
|
+
K_(e, t);
|
|
14653
|
+
}), U_(e, (e) => {
|
|
14448
14654
|
try {
|
|
14449
14655
|
p(e);
|
|
14450
14656
|
} catch {}
|
|
@@ -14459,12 +14665,12 @@ function Uv() {
|
|
|
14459
14665
|
}
|
|
14460
14666
|
}, lt = function(e, n) {
|
|
14461
14667
|
try {
|
|
14462
|
-
|
|
14668
|
+
K_(t.removed, {
|
|
14463
14669
|
attribute: n.getAttributeNode(e),
|
|
14464
14670
|
from: n
|
|
14465
14671
|
});
|
|
14466
14672
|
} catch {
|
|
14467
|
-
|
|
14673
|
+
K_(t.removed, {
|
|
14468
14674
|
attribute: null,
|
|
14469
14675
|
from: n
|
|
14470
14676
|
});
|
|
@@ -14487,7 +14693,7 @@ function Uv() {
|
|
|
14487
14693
|
let t = [e];
|
|
14488
14694
|
for (; t.length > 0;) {
|
|
14489
14695
|
let e = t.pop();
|
|
14490
|
-
(y ? y(e) : e.nodeType) ===
|
|
14696
|
+
(y ? y(e) : e.nodeType) === Hv.element && ut(e);
|
|
14491
14697
|
let n = h(e);
|
|
14492
14698
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
14493
14699
|
}
|
|
@@ -14496,13 +14702,13 @@ function Uv() {
|
|
|
14496
14702
|
let t = [e];
|
|
14497
14703
|
for (; t.length > 0;) {
|
|
14498
14704
|
let e = t.pop(), n = y ? y(e) : e.nodeType;
|
|
14499
|
-
if (n ===
|
|
14705
|
+
if (n === Hv.processingInstruction || n === Hv.comment && sv(zv, e.data)) {
|
|
14500
14706
|
try {
|
|
14501
14707
|
p(e);
|
|
14502
14708
|
} catch {}
|
|
14503
14709
|
continue;
|
|
14504
14710
|
}
|
|
14505
|
-
if (n ===
|
|
14711
|
+
if (n === Hv.element) {
|
|
14506
14712
|
let t = e, n = Ze(b ? b(e) : e.nodeName);
|
|
14507
14713
|
try {
|
|
14508
14714
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
@@ -14515,7 +14721,7 @@ function Uv() {
|
|
|
14515
14721
|
let t = null, r = null;
|
|
14516
14722
|
if (Ce) e = "<remove></remove>" + e;
|
|
14517
14723
|
else {
|
|
14518
|
-
let t =
|
|
14724
|
+
let t = Z_(e, /^[\r\n\t ]+/);
|
|
14519
14725
|
r = t && t[0];
|
|
14520
14726
|
}
|
|
14521
14727
|
Ye === "application/xhtml+xml" && Ve === Be && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
@@ -14535,13 +14741,13 @@ function Uv() {
|
|
|
14535
14741
|
let t = x ? x(e) : e.ownerDocument;
|
|
14536
14742
|
return M.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
14537
14743
|
}, ht = function(e) {
|
|
14538
|
-
return e =
|
|
14744
|
+
return e = Q_(e, ne, " "), e = Q_(e, I, " "), e = Q_(e, L, " "), e;
|
|
14539
14745
|
}, gt = function(e) {
|
|
14540
14746
|
e.normalize();
|
|
14541
14747
|
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();
|
|
14542
14748
|
for (; r;) r.data = ht(r.data), r = n.nextNode();
|
|
14543
14749
|
let i = e.querySelectorAll?.call(e, "template");
|
|
14544
|
-
i &&
|
|
14750
|
+
i && U_(i, (e) => {
|
|
14545
14751
|
vt(e.content) && gt(e.content);
|
|
14546
14752
|
});
|
|
14547
14753
|
}, _t = function(e) {
|
|
@@ -14550,7 +14756,7 @@ function Uv() {
|
|
|
14550
14756
|
}, vt = function(e) {
|
|
14551
14757
|
if (!y || typeof e != "object" || !e) return !1;
|
|
14552
14758
|
try {
|
|
14553
|
-
return y(e) ===
|
|
14759
|
+
return y(e) === Hv.documentFragment;
|
|
14554
14760
|
} catch {
|
|
14555
14761
|
return !1;
|
|
14556
14762
|
}
|
|
@@ -14563,14 +14769,14 @@ function Uv() {
|
|
|
14563
14769
|
}
|
|
14564
14770
|
};
|
|
14565
14771
|
function bt(e, n, r) {
|
|
14566
|
-
e.length !== 0 &&
|
|
14772
|
+
e.length !== 0 && U_(e, (e) => {
|
|
14567
14773
|
e.call(t, n, r, W);
|
|
14568
14774
|
});
|
|
14569
14775
|
}
|
|
14570
14776
|
let xt = function(e, t) {
|
|
14571
|
-
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) &&
|
|
14777
|
+
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) && sv(Rv, e.textContent) && sv(Rv, e.innerHTML) || ve && e.namespaceURI === Be && t === "style" && yt(e.firstElementChild) || e.nodeType === Hv.processingInstruction || ve && e.nodeType === Hv.comment && sv(zv, e.data));
|
|
14572
14778
|
}, St = function(e, t, n) {
|
|
14573
|
-
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp &&
|
|
14779
|
+
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp && sv(ue.tagNameCheck, t) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(t))) return !1;
|
|
14574
14780
|
if (Ae && !H[t]) {
|
|
14575
14781
|
let t = g(e), r = h(e);
|
|
14576
14782
|
if (r && t) {
|
|
@@ -14583,7 +14789,7 @@ function Uv() {
|
|
|
14583
14789
|
}
|
|
14584
14790
|
return st(e), !0;
|
|
14585
14791
|
}, Ct = function(e, t, n, r) {
|
|
14586
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
14792
|
+
return e.length === 0 ? t : t === n || t === r ? pv(t) : t;
|
|
14587
14793
|
}, wt = function(e, n) {
|
|
14588
14794
|
if (bt(F.beforeSanitizeElements, e, null), e !== n && g(e) === null) return je && dt(e), !0;
|
|
14589
14795
|
if (_t(e)) return st(e), !0;
|
|
@@ -14597,22 +14803,22 @@ function Uv() {
|
|
|
14597
14803
|
let t = St(e, r, n);
|
|
14598
14804
|
return t === !1 && bt(F.afterSanitizeElements, e, null), t;
|
|
14599
14805
|
}
|
|
14600
|
-
if ((y ? y(e) : e.nodeType) ===
|
|
14601
|
-
if (_e && e.nodeType ===
|
|
14806
|
+
if ((y ? y(e) : e.nodeType) === Hv.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && sv(Bv, e.innerHTML)) return st(e), !0;
|
|
14807
|
+
if (_e && e.nodeType === Hv.text) {
|
|
14602
14808
|
let n = ht(e.textContent);
|
|
14603
|
-
e.textContent !== n && (
|
|
14809
|
+
e.textContent !== n && (K_(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
14604
14810
|
}
|
|
14605
14811
|
return bt(F.afterSanitizeElements, e, null), !1;
|
|
14606
14812
|
}, Tt = function(e, t, r) {
|
|
14607
14813
|
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;
|
|
14608
14814
|
let i = ce[t] || fe.attributeCheck instanceof Function && fe.attributeCheck(t, e);
|
|
14609
|
-
if (!(me &&
|
|
14815
|
+
if (!(me && sv(re, t)) && !(pe && sv(R, t))) {
|
|
14610
14816
|
if (!i) {
|
|
14611
|
-
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp &&
|
|
14612
|
-
} else if (!Ie[t] && !
|
|
14817
|
+
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp && sv(ue.tagNameCheck, e) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(e)) && (ue.attributeNameCheck instanceof RegExp && sv(ue.attributeNameCheck, t) || ue.attributeNameCheck instanceof Function && ue.attributeNameCheck(t, e)) || t === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && sv(ue.tagNameCheck, r) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(r)))) return !1;
|
|
14818
|
+
} else if (!Ie[t] && !sv(oe, Q_(r, z, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && $_(r, "data:") === 0 && Pe[e]) && !(he && !sv(ie, Q_(r, z, ""))) && r) return !1;
|
|
14613
14819
|
}
|
|
14614
14820
|
return !0;
|
|
14615
|
-
}, Et =
|
|
14821
|
+
}, Et = dv({}, [
|
|
14616
14822
|
"annotation-xml",
|
|
14617
14823
|
"color-profile",
|
|
14618
14824
|
"font-face",
|
|
@@ -14622,7 +14828,7 @@ function Uv() {
|
|
|
14622
14828
|
"font-face-uri",
|
|
14623
14829
|
"missing-glyph"
|
|
14624
14830
|
]), Dt = function(e) {
|
|
14625
|
-
return !Et[
|
|
14831
|
+
return !Et[Y_(e)] && sv(ae, e);
|
|
14626
14832
|
}, G = function(e, t, n, r) {
|
|
14627
14833
|
if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
14628
14834
|
case "TrustedHTML": return O(r);
|
|
@@ -14631,7 +14837,7 @@ function Uv() {
|
|
|
14631
14837
|
return r;
|
|
14632
14838
|
}, Ot = function(e, n, r, i) {
|
|
14633
14839
|
try {
|
|
14634
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) :
|
|
14840
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) : G_(t.removed);
|
|
14635
14841
|
} catch {
|
|
14636
14842
|
lt(n, e);
|
|
14637
14843
|
}
|
|
@@ -14648,12 +14854,12 @@ function Uv() {
|
|
|
14648
14854
|
forceKeepAttr: void 0
|
|
14649
14855
|
}, r = t.length, i = Ze(e.nodeName);
|
|
14650
14856
|
for (; r--;) {
|
|
14651
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u :
|
|
14652
|
-
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") &&
|
|
14857
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : ev(u);
|
|
14858
|
+
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") && $_(d, ke) !== 0 && (lt(o, e), d = ke + d), ve && sv(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
14653
14859
|
lt(o, e);
|
|
14654
14860
|
continue;
|
|
14655
14861
|
}
|
|
14656
|
-
if (l === "attributename" &&
|
|
14862
|
+
if (l === "attributename" && Z_(d, "href")) {
|
|
14657
14863
|
lt(o, e);
|
|
14658
14864
|
continue;
|
|
14659
14865
|
}
|
|
@@ -14662,7 +14868,7 @@ function Uv() {
|
|
|
14662
14868
|
lt(o, e);
|
|
14663
14869
|
continue;
|
|
14664
14870
|
}
|
|
14665
|
-
if (!ge &&
|
|
14871
|
+
if (!ge && sv(Vv, d)) {
|
|
14666
14872
|
lt(o, e);
|
|
14667
14873
|
continue;
|
|
14668
14874
|
}
|
|
@@ -14676,7 +14882,7 @@ function Uv() {
|
|
|
14676
14882
|
bt(F.afterSanitizeAttributes, e, null);
|
|
14677
14883
|
}, At = function(e) {
|
|
14678
14884
|
let t = null, n = mt(e);
|
|
14679
|
-
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) ===
|
|
14885
|
+
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) === Hv.element) {
|
|
14680
14886
|
let e = _(t);
|
|
14681
14887
|
vt(e) && (jt(e), At(e));
|
|
14682
14888
|
}
|
|
@@ -14692,7 +14898,7 @@ function Uv() {
|
|
|
14692
14898
|
At(e.shadow);
|
|
14693
14899
|
continue;
|
|
14694
14900
|
}
|
|
14695
|
-
let n = e.node, r = (y ? y(n) : n.nodeType) ===
|
|
14901
|
+
let n = e.node, r = (y ? y(n) : n.nodeType) === Hv.element, i = h(n);
|
|
14696
14902
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
14697
14903
|
node: i[e],
|
|
14698
14904
|
shadow: null
|
|
@@ -14721,24 +14927,24 @@ function Uv() {
|
|
|
14721
14927
|
};
|
|
14722
14928
|
return t.sanitize = function(e) {
|
|
14723
14929
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
14724
|
-
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e =
|
|
14930
|
+
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = mv(e), typeof e != "string")) throw cv("dirty is not a string, aborting");
|
|
14725
14931
|
if (!t.isSupported) return e;
|
|
14726
|
-
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B =
|
|
14932
|
+
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B = pv(B)), F.uponSanitizeAttribute.length > 0 && (ce = pv(ce)), t.removed = [];
|
|
14727
14933
|
let c = je && typeof e != "string" && yt(e);
|
|
14728
14934
|
if (c) {
|
|
14729
14935
|
ft(e);
|
|
14730
14936
|
let t = b ? b(e) : e.nodeName;
|
|
14731
14937
|
if (typeof t == "string") {
|
|
14732
14938
|
let n = Ze(t);
|
|
14733
|
-
if (!B[n] || de[n]) throw ct(e),
|
|
14939
|
+
if (!B[n] || de[n]) throw ct(e), cv("root node is forbidden and cannot be sanitized in-place");
|
|
14734
14940
|
}
|
|
14735
|
-
if (_t(e)) throw ct(e),
|
|
14941
|
+
if (_t(e)) throw ct(e), cv("root node is clobbered and cannot be sanitized in-place");
|
|
14736
14942
|
try {
|
|
14737
14943
|
jt(e);
|
|
14738
14944
|
} catch (t) {
|
|
14739
14945
|
throw ct(e), t;
|
|
14740
14946
|
}
|
|
14741
|
-
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType ===
|
|
14947
|
+
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === Hv.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), jt(a);
|
|
14742
14948
|
else {
|
|
14743
14949
|
if (!we && !_e && !ye && e.indexOf("<") === -1) return S && Ee ? O(e) : e;
|
|
14744
14950
|
if (i = pt(e), !i) return we ? null : Ee ? C : "";
|
|
@@ -14749,11 +14955,11 @@ function Uv() {
|
|
|
14749
14955
|
let e = mt(l);
|
|
14750
14956
|
for (; o = e.nextNode();) wt(o, l), kt(o), vt(o.content) && At(o.content);
|
|
14751
14957
|
} catch (n) {
|
|
14752
|
-
throw c && (ct(e),
|
|
14958
|
+
throw c && (ct(e), U_(t.removed, (e) => {
|
|
14753
14959
|
e.element && dt(e.element);
|
|
14754
14960
|
})), n;
|
|
14755
14961
|
}
|
|
14756
|
-
if (c) return
|
|
14962
|
+
if (c) return U_(t.removed, (e) => {
|
|
14757
14963
|
e.element && dt(e.element);
|
|
14758
14964
|
}), _e && gt(e), e;
|
|
14759
14965
|
if (we) {
|
|
@@ -14762,7 +14968,7 @@ function Uv() {
|
|
|
14762
14968
|
return (ce.shadowroot || ce.shadowrootmode) && (s = P.call(r, s, !0)), s;
|
|
14763
14969
|
}
|
|
14764
14970
|
let u = ye ? i.outerHTML : i.innerHTML;
|
|
14765
|
-
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name &&
|
|
14971
|
+
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && sv(Iv, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), _e && (u = ht(u)), S && Ee ? O(u) : u;
|
|
14766
14972
|
}, t.setConfig = function() {
|
|
14767
14973
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
14768
14974
|
et(e), be = !0, xe = B, Se = ce;
|
|
@@ -14773,28 +14979,28 @@ function Uv() {
|
|
|
14773
14979
|
let r = Ze(e), i = Ze(t);
|
|
14774
14980
|
return Tt(r, i, n);
|
|
14775
14981
|
}, t.addHook = function(e, t) {
|
|
14776
|
-
typeof t == "function" &&
|
|
14982
|
+
typeof t == "function" && av(F, e) && K_(F[e], t);
|
|
14777
14983
|
}, t.removeHook = function(e, t) {
|
|
14778
|
-
if (
|
|
14984
|
+
if (av(F, e)) {
|
|
14779
14985
|
if (t !== void 0) {
|
|
14780
|
-
let n =
|
|
14781
|
-
return n === -1 ? void 0 :
|
|
14986
|
+
let n = W_(F[e], t);
|
|
14987
|
+
return n === -1 ? void 0 : q_(F[e], n, 1)[0];
|
|
14782
14988
|
}
|
|
14783
|
-
return
|
|
14989
|
+
return G_(F[e]);
|
|
14784
14990
|
}
|
|
14785
14991
|
}, t.removeHooks = function(e) {
|
|
14786
|
-
|
|
14992
|
+
av(F, e) && (F[e] = []);
|
|
14787
14993
|
}, t.removeAllHooks = function() {
|
|
14788
|
-
F =
|
|
14994
|
+
F = Gv();
|
|
14789
14995
|
}, t;
|
|
14790
14996
|
}
|
|
14791
|
-
var
|
|
14997
|
+
var Jv = qv();
|
|
14792
14998
|
//#endregion
|
|
14793
14999
|
//#region src/core/components/iconHtml.ts
|
|
14794
|
-
function
|
|
15000
|
+
function Yv(e) {
|
|
14795
15001
|
return e.trimStart().startsWith("<");
|
|
14796
15002
|
}
|
|
14797
|
-
var
|
|
15003
|
+
var Xv = [
|
|
14798
15004
|
"svg",
|
|
14799
15005
|
"path",
|
|
14800
15006
|
"circle",
|
|
@@ -14809,44 +15015,44 @@ var Kv = [
|
|
|
14809
15015
|
"em",
|
|
14810
15016
|
"b",
|
|
14811
15017
|
"span"
|
|
14812
|
-
],
|
|
14813
|
-
function
|
|
14814
|
-
return
|
|
14815
|
-
ALLOWED_TAGS: [...
|
|
14816
|
-
ALLOWED_ATTR: [...
|
|
15018
|
+
], Zv = /* @__PURE__ */ "viewBox.xmlns.width.height.fill.fill-rule.fill-opacity.stroke.stroke-width.stroke-linecap.stroke-linejoin.stroke-opacity.stroke-dasharray.d.cx.cy.r.rx.ry.x.y.x1.y1.x2.y2.points.transform.opacity.clip-rule.src.alt.class.aria-hidden".split(".");
|
|
15019
|
+
function Qv(e) {
|
|
15020
|
+
return Jv.sanitize(e, {
|
|
15021
|
+
ALLOWED_TAGS: [...Xv],
|
|
15022
|
+
ALLOWED_ATTR: [...Zv],
|
|
14817
15023
|
ALLOW_DATA_ATTR: !1
|
|
14818
15024
|
});
|
|
14819
15025
|
}
|
|
14820
15026
|
//#endregion
|
|
14821
15027
|
//#region src/core/components/IconGlyph.vue?vue&type=script&setup=true&lang.ts
|
|
14822
|
-
var
|
|
15028
|
+
var $v = ["innerHTML"], ey = {
|
|
14823
15029
|
key: 1,
|
|
14824
15030
|
class: "icon-text"
|
|
14825
|
-
},
|
|
15031
|
+
}, ty = /*@__PURE__*/ Fi({
|
|
14826
15032
|
__name: "IconGlyph",
|
|
14827
15033
|
props: { icon: {} },
|
|
14828
15034
|
setup(e) {
|
|
14829
|
-
let t = e, n = Qs(() =>
|
|
15035
|
+
let t = e, n = Qs(() => Yv(t.icon)), r = Qs(() => n.value ? Qv(t.icon) : "");
|
|
14830
15036
|
return (t, i) => n.value ? (Y(), X("span", {
|
|
14831
15037
|
key: 0,
|
|
14832
15038
|
class: "icon-html",
|
|
14833
15039
|
innerHTML: r.value
|
|
14834
|
-
}, null, 8,
|
|
15040
|
+
}, null, 8, $v)) : (Y(), X("span", ey, U(e.icon), 1));
|
|
14835
15041
|
}
|
|
14836
|
-
}),
|
|
15042
|
+
}), ny = (e, t) => {
|
|
14837
15043
|
let n = e.__vccOpts || e;
|
|
14838
15044
|
for (let [e, r] of t) n[e] = r;
|
|
14839
15045
|
return n;
|
|
14840
|
-
},
|
|
15046
|
+
}, ry = /*#__PURE__*/ ny(ty, [["__scopeId", "data-v-7d3cf5e5"]]), iy = { class: "chat-header" }, ay = { class: "header-left" }, oy = { class: "header-icon" }, sy = { class: "header-title" }, cy = {
|
|
14841
15047
|
key: 0,
|
|
14842
15048
|
class: "status-dot pulse"
|
|
14843
|
-
},
|
|
15049
|
+
}, ly = ["title"], uy = ["title"], dy = ["data-sid", "onClick"], fy = { class: "hist-title" }, py = { class: "hist-meta" }, my = ["onClick"], hy = ["title"], gy = {
|
|
14844
15050
|
key: 0,
|
|
14845
15051
|
class: "debug-badge"
|
|
14846
|
-
},
|
|
15052
|
+
}, _y = ["title"], vy = {
|
|
14847
15053
|
key: 0,
|
|
14848
15054
|
class: "more-item-badge"
|
|
14849
|
-
},
|
|
15055
|
+
}, yy = ["title"], by = ["title", "disabled"], xy = ["title"], Sy = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
14850
15056
|
__name: "ChatHeader",
|
|
14851
15057
|
props: {
|
|
14852
15058
|
title: {},
|
|
@@ -14861,22 +15067,22 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14861
15067
|
},
|
|
14862
15068
|
emits: ["close"],
|
|
14863
15069
|
setup(e) {
|
|
14864
|
-
let t = e, n =
|
|
14865
|
-
function
|
|
15070
|
+
let t = e, n = T_(), { chat: r, icons: i, messages: a } = n, { state: o, reset: s, clearMessages: c } = r, l = /* @__PURE__ */ Cn(!1), u = /* @__PURE__ */ Cn(!1), d = Qs(() => o.messages.length > 0), f = Qs(() => (t.debugLogs?.length ?? 0) > 0);
|
|
15071
|
+
function p(e) {
|
|
14866
15072
|
let t = Date.now() - e;
|
|
14867
|
-
return t < 6e4 ?
|
|
15073
|
+
return t < 6e4 ? a.justNow : t < 36e5 ? Math.floor(t / 6e4) + a.minutesAgoSuffix : new Date(e).toLocaleString();
|
|
14868
15074
|
}
|
|
14869
|
-
function
|
|
14870
|
-
|
|
15075
|
+
function m() {
|
|
15076
|
+
s(), t.onNewSession?.();
|
|
14871
15077
|
}
|
|
14872
|
-
function
|
|
14873
|
-
|
|
15078
|
+
function h(e) {
|
|
15079
|
+
s(), t.onOpenSession?.(e);
|
|
14874
15080
|
}
|
|
14875
|
-
return (t, r) => (Y(), X("div",
|
|
14876
|
-
Z("div",
|
|
14877
|
-
Z("span",
|
|
14878
|
-
Z("span",
|
|
14879
|
-
K(
|
|
15081
|
+
return (t, r) => (Y(), X("div", iy, [
|
|
15082
|
+
Z("div", ay, [
|
|
15083
|
+
Z("span", oy, [fs(ry, { icon: K(i).header }, null, 8, ["icon"])]),
|
|
15084
|
+
Z("span", sy, U(e.title), 1),
|
|
15085
|
+
K(o).loading ? (Y(), X("span", cy)) : Q("", !0)
|
|
14880
15086
|
]),
|
|
14881
15087
|
Z("div", {
|
|
14882
15088
|
class: "header-actions",
|
|
@@ -14886,8 +15092,8 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14886
15092
|
key: 0,
|
|
14887
15093
|
class: "action-btn",
|
|
14888
15094
|
"data-test": "new-chat",
|
|
14889
|
-
title:
|
|
14890
|
-
onClick:
|
|
15095
|
+
title: K(a).newSession,
|
|
15096
|
+
onClick: m
|
|
14891
15097
|
}, [...r[10] ||= [Z("svg", {
|
|
14892
15098
|
width: "16",
|
|
14893
15099
|
height: "16",
|
|
@@ -14895,14 +15101,14 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14895
15101
|
fill: "none",
|
|
14896
15102
|
stroke: "currentColor",
|
|
14897
15103
|
"stroke-width": "2"
|
|
14898
|
-
}, [Z("path", { d: "M12 5v14M5 12h14" })], -1)]])) : Q("", !0),
|
|
15104
|
+
}, [Z("path", { d: "M12 5v14M5 12h14" })], -1)]], 8, ly)) : Q("", !0),
|
|
14899
15105
|
e.sessions ? (Y(), X("button", {
|
|
14900
15106
|
key: 1,
|
|
14901
|
-
class: H(["action-btn", { active:
|
|
15107
|
+
class: H(["action-btn", { active: u.value }]),
|
|
14902
15108
|
"data-test": "toggle-history",
|
|
14903
|
-
title:
|
|
15109
|
+
title: K(a).history,
|
|
14904
15110
|
onClick: r[0] ||= (e) => {
|
|
14905
|
-
|
|
15111
|
+
l.value = !1, u.value = !u.value;
|
|
14906
15112
|
}
|
|
14907
15113
|
}, [...r[11] ||= [Z("svg", {
|
|
14908
15114
|
width: "16",
|
|
@@ -14915,8 +15121,8 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14915
15121
|
Z("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }),
|
|
14916
15122
|
Z("path", { d: "M3 3v5h5" }),
|
|
14917
15123
|
Z("path", { d: "M12 7v5l3 2" })
|
|
14918
|
-
], -1)]],
|
|
14919
|
-
e.sessions &&
|
|
15124
|
+
], -1)]], 10, uy)) : Q("", !0),
|
|
15125
|
+
e.sessions && u.value ? (Y(), X("div", {
|
|
14920
15126
|
key: 2,
|
|
14921
15127
|
class: "cs-history-menu",
|
|
14922
15128
|
onClick: r[1] ||= yl(() => {}, ["stop"])
|
|
@@ -14924,18 +15130,18 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14924
15130
|
key: t.sessionId,
|
|
14925
15131
|
class: H(["hist-item", { active: e.currentSessionId === t.sessionId }]),
|
|
14926
15132
|
"data-sid": t.sessionId,
|
|
14927
|
-
onClick: (e) =>
|
|
14928
|
-
}, [Z("div",
|
|
15133
|
+
onClick: (e) => h(t.sessionId)
|
|
15134
|
+
}, [Z("div", fy, U(t.title || K(a).sessionFallbackPrefix + t.sessionId.slice(-6)), 1), Z("div", py, [Z("span", null, U(p(t.lastAccessed)), 1), e.currentSessionId === t.sessionId ? Q("", !0) : (Y(), X("button", {
|
|
14929
15135
|
key: 0,
|
|
14930
15136
|
class: "hist-del",
|
|
14931
15137
|
"data-test": "del-btn",
|
|
14932
15138
|
onClick: yl((n) => e.onRemoveSession?.(t.sessionId), ["stop"])
|
|
14933
|
-
}, "✕", 8,
|
|
15139
|
+
}, "✕", 8, my))])], 10, dy))), 128))])) : Q("", !0),
|
|
14934
15140
|
Z("button", {
|
|
14935
|
-
class: H(["action-btn more-btn", { active:
|
|
14936
|
-
title:
|
|
15141
|
+
class: H(["action-btn more-btn", { active: l.value }]),
|
|
15142
|
+
title: K(a).more,
|
|
14937
15143
|
onClick: r[2] ||= (e) => {
|
|
14938
|
-
|
|
15144
|
+
u.value = !1, l.value = !l.value;
|
|
14939
15145
|
}
|
|
14940
15146
|
}, [r[12] ||= Z("svg", {
|
|
14941
15147
|
width: "16",
|
|
@@ -14958,17 +15164,17 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14958
15164
|
cy: "19",
|
|
14959
15165
|
r: "1.6"
|
|
14960
15166
|
})
|
|
14961
|
-
], -1),
|
|
14962
|
-
|
|
15167
|
+
], -1), f.value ? (Y(), X("span", gy, U(e.debugLogs?.length), 1)) : Q("", !0)], 10, hy),
|
|
15168
|
+
l.value ? (Y(), X("div", {
|
|
14963
15169
|
key: 3,
|
|
14964
15170
|
class: "more-menu",
|
|
14965
15171
|
onClick: r[6] ||= yl(() => {}, ["stop"])
|
|
14966
15172
|
}, [
|
|
14967
15173
|
Z("button", {
|
|
14968
15174
|
class: "more-item",
|
|
14969
|
-
title:
|
|
15175
|
+
title: K(a).debugMenuTitle,
|
|
14970
15176
|
onClick: r[3] ||= (e) => {
|
|
14971
|
-
K(n).openDebug(),
|
|
15177
|
+
K(n).openDebug(), l.value = !1;
|
|
14972
15178
|
}
|
|
14973
15179
|
}, [
|
|
14974
15180
|
r[13] ||= Z("svg", {
|
|
@@ -14983,80 +15189,81 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
14983
15189
|
Z("path", { d: "M9 2h6" }),
|
|
14984
15190
|
Z("path", { d: "M9 18h6" })
|
|
14985
15191
|
], -1),
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
]),
|
|
15192
|
+
Z("span", null, U(K(a).debugMenu), 1),
|
|
15193
|
+
f.value ? (Y(), X("span", vy, U(e.debugLogs?.length), 1)) : Q("", !0)
|
|
15194
|
+
], 8, _y),
|
|
14989
15195
|
e.skillAvailable ? (Y(), X("button", {
|
|
14990
15196
|
key: 0,
|
|
14991
15197
|
class: "more-item",
|
|
14992
|
-
title:
|
|
15198
|
+
title: K(a).skillMenuTitle,
|
|
14993
15199
|
onClick: r[4] ||= (e) => {
|
|
14994
|
-
K(n).openSkill(),
|
|
15200
|
+
K(n).openSkill(), l.value = !1;
|
|
14995
15201
|
}
|
|
14996
|
-
}, [
|
|
15202
|
+
}, [r[14] ||= Z("svg", {
|
|
14997
15203
|
width: "15",
|
|
14998
15204
|
height: "15",
|
|
14999
15205
|
viewBox: "0 0 24 24",
|
|
15000
15206
|
fill: "none",
|
|
15001
15207
|
stroke: "currentColor",
|
|
15002
15208
|
"stroke-width": "2"
|
|
15003
|
-
}, [Z("path", { d: "M12 2l2.4 7.4H22l-6 4.4 2.3 7.2L12 16.8 5.7 21l2.3-7.2-6-4.4h7.6z" })], -1), Z("span", null,
|
|
15209
|
+
}, [Z("path", { d: "M12 2l2.4 7.4H22l-6 4.4 2.3 7.2L12 16.8 5.7 21l2.3-7.2-6-4.4h7.6z" })], -1), Z("span", null, U(K(a).skillMenu), 1)], 8, yy)) : Q("", !0),
|
|
15004
15210
|
Z("button", {
|
|
15005
15211
|
class: "more-item",
|
|
15006
|
-
title:
|
|
15007
|
-
disabled: !
|
|
15212
|
+
title: K(a).clearChat,
|
|
15213
|
+
disabled: !d.value,
|
|
15008
15214
|
onClick: r[5] ||= (e) => {
|
|
15009
|
-
K(
|
|
15215
|
+
K(c)(), l.value = !1;
|
|
15010
15216
|
}
|
|
15011
|
-
}, [
|
|
15217
|
+
}, [r[15] ||= Z("svg", {
|
|
15012
15218
|
width: "15",
|
|
15013
15219
|
height: "15",
|
|
15014
15220
|
viewBox: "0 0 24 24",
|
|
15015
15221
|
fill: "none",
|
|
15016
15222
|
stroke: "currentColor",
|
|
15017
15223
|
"stroke-width": "2"
|
|
15018
|
-
}, [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,
|
|
15224
|
+
}, [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, U(K(a).clearChat), 1)], 8, by)
|
|
15019
15225
|
])) : Q("", !0),
|
|
15020
15226
|
e.drawer ? (Y(), X("button", {
|
|
15021
15227
|
key: 4,
|
|
15022
15228
|
class: "action-btn",
|
|
15023
|
-
title:
|
|
15229
|
+
title: K(a).close,
|
|
15024
15230
|
onClick: r[7] ||= (e) => t.$emit("close")
|
|
15025
|
-
}, [...r[
|
|
15231
|
+
}, [...r[16] ||= [Z("svg", {
|
|
15026
15232
|
width: "16",
|
|
15027
15233
|
height: "16",
|
|
15028
15234
|
viewBox: "0 0 24 24",
|
|
15029
15235
|
fill: "none",
|
|
15030
15236
|
stroke: "currentColor",
|
|
15031
15237
|
"stroke-width": "2"
|
|
15032
|
-
}, [Z("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])) : Q("", !0)
|
|
15238
|
+
}, [Z("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]], 8, xy)) : Q("", !0)
|
|
15033
15239
|
]),
|
|
15034
|
-
|
|
15240
|
+
l.value || u.value ? (Y(), X("div", {
|
|
15035
15241
|
key: 0,
|
|
15036
15242
|
class: "more-overlay",
|
|
15037
15243
|
onClick: r[9] ||= (e) => {
|
|
15038
|
-
|
|
15244
|
+
l.value = !1, u.value = !1;
|
|
15039
15245
|
}
|
|
15040
15246
|
})) : Q("", !0)
|
|
15041
15247
|
]));
|
|
15042
15248
|
}
|
|
15043
|
-
}), [["__scopeId", "data-v-
|
|
15249
|
+
}), [["__scopeId", "data-v-859b1fc6"]]), Cy = {
|
|
15044
15250
|
key: 0,
|
|
15045
15251
|
class: "focus-bar"
|
|
15046
|
-
},
|
|
15252
|
+
}, wy = { class: "focus-bar-icon" }, Ty = { class: "focus-bar-text" }, Ey = {
|
|
15047
15253
|
key: 0,
|
|
15048
15254
|
class: "focus-bar-label"
|
|
15049
|
-
},
|
|
15255
|
+
}, Dy = { class: "focus-bar-path" }, Oy = ["title"], ky = ["title"], Ay = {
|
|
15050
15256
|
key: 0,
|
|
15051
15257
|
class: "focus-edit-row"
|
|
15052
|
-
},
|
|
15258
|
+
}, jy = ["placeholder"], My = ["placeholder"], Ny = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
15053
15259
|
__name: "FocusBar",
|
|
15054
15260
|
props: {
|
|
15055
15261
|
getFocus: {},
|
|
15056
15262
|
onSetFocus: {},
|
|
15057
15263
|
onClearFocus: {},
|
|
15058
15264
|
infoTick: {},
|
|
15059
|
-
icons: { default: () => ({ ...__ }) }
|
|
15265
|
+
icons: { default: () => ({ ...__ }) },
|
|
15266
|
+
messages: { default: () => ({ ...y_ }) }
|
|
15060
15267
|
},
|
|
15061
15268
|
setup(e) {
|
|
15062
15269
|
let t = e, n = Qs(() => (t.infoTick?.value, t.getFocus?.())), r = /* @__PURE__ */ Cn(!1), i = /* @__PURE__ */ Cn(""), a = /* @__PURE__ */ Cn("");
|
|
@@ -15072,46 +15279,46 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15072
15279
|
function s() {
|
|
15073
15280
|
t.onClearFocus?.(), r.value = !1;
|
|
15074
15281
|
}
|
|
15075
|
-
return (t, c) => n.value ? (Y(), X("div",
|
|
15076
|
-
Z("span",
|
|
15077
|
-
Z("span",
|
|
15282
|
+
return (t, c) => n.value ? (Y(), X("div", Cy, [
|
|
15283
|
+
Z("span", wy, [fs(ry, { icon: e.icons.focus }, null, 8, ["icon"])]),
|
|
15284
|
+
Z("span", Ty, [n.value.label ? (Y(), X("span", Ey, U(n.value.label), 1)) : Q("", !0), Z("code", Dy, U(n.value.path), 1)]),
|
|
15078
15285
|
Z("button", {
|
|
15079
15286
|
class: "focus-bar-btn",
|
|
15080
|
-
title:
|
|
15287
|
+
title: e.messages.switchFocusTitle,
|
|
15081
15288
|
onClick: c[0] ||= (e) => r.value = !r.value
|
|
15082
|
-
}, "▾"),
|
|
15289
|
+
}, "▾", 8, Oy),
|
|
15083
15290
|
Z("button", {
|
|
15084
15291
|
class: "focus-bar-btn",
|
|
15085
|
-
title:
|
|
15292
|
+
title: e.messages.exitFocusTitle,
|
|
15086
15293
|
"data-test": "focus-clear",
|
|
15087
15294
|
onClick: s
|
|
15088
|
-
}, "✕"),
|
|
15089
|
-
r.value ? (Y(), X("div",
|
|
15295
|
+
}, "✕", 8, ky),
|
|
15296
|
+
r.value ? (Y(), X("div", Ay, [
|
|
15090
15297
|
Xr(Z("input", {
|
|
15091
15298
|
"onUpdate:modelValue": c[1] ||= (e) => i.value = e,
|
|
15092
15299
|
class: "focus-edit-input",
|
|
15093
|
-
placeholder:
|
|
15300
|
+
placeholder: e.messages.focusPathPlaceholder,
|
|
15094
15301
|
"data-test": "focus-path-input",
|
|
15095
15302
|
onKeyup: xl(o, ["enter"])
|
|
15096
|
-
}, null,
|
|
15303
|
+
}, null, 40, jy), [[gl, i.value]]),
|
|
15097
15304
|
Xr(Z("input", {
|
|
15098
15305
|
"onUpdate:modelValue": c[2] ||= (e) => a.value = e,
|
|
15099
15306
|
class: "focus-edit-input focus-edit-label",
|
|
15100
|
-
placeholder:
|
|
15307
|
+
placeholder: e.messages.focusLabelPlaceholder,
|
|
15101
15308
|
onKeyup: xl(o, ["enter"])
|
|
15102
|
-
}, null,
|
|
15309
|
+
}, null, 40, My), [[gl, a.value]]),
|
|
15103
15310
|
Z("button", {
|
|
15104
15311
|
class: "focus-edit-go",
|
|
15105
15312
|
"data-test": "focus-submit",
|
|
15106
15313
|
onClick: o
|
|
15107
|
-
},
|
|
15314
|
+
}, U(e.messages.focusSubmit), 1)
|
|
15108
15315
|
])) : Q("", !0)
|
|
15109
15316
|
])) : Q("", !0);
|
|
15110
15317
|
}
|
|
15111
|
-
}), [["__scopeId", "data-v-
|
|
15318
|
+
}), [["__scopeId", "data-v-4904b0b4"]]), Py = { class: "reasoning-toggle" }, Fy = {
|
|
15112
15319
|
key: 0,
|
|
15113
15320
|
class: "reasoning-body"
|
|
15114
|
-
},
|
|
15321
|
+
}, Iy = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
15115
15322
|
__name: "MessageReasoning",
|
|
15116
15323
|
props: {
|
|
15117
15324
|
text: {},
|
|
@@ -15128,18 +15335,19 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15128
15335
|
}, [
|
|
15129
15336
|
n[1] ||= Z("span", { class: "status-dot ok" }, null, -1),
|
|
15130
15337
|
n[2] ||= Z("span", { class: "reasoning-title" }, "思考过程", -1),
|
|
15131
|
-
Z("span",
|
|
15132
|
-
]), e.expanded ? (Y(), X("div",
|
|
15338
|
+
Z("span", Py, U(e.expanded ? "收起" : "展开"), 1)
|
|
15339
|
+
]), e.expanded ? (Y(), X("div", Fy, U(e.text), 1)) : Q("", !0)], 2)) : Q("", !0);
|
|
15133
15340
|
}
|
|
15134
|
-
}), [["__scopeId", "data-v-dbe90e42"]]),
|
|
15341
|
+
}), [["__scopeId", "data-v-dbe90e42"]]), Ly = ["open"], Ry = { class: "sub-reason-head" }, zy = {
|
|
15135
15342
|
key: 0,
|
|
15136
15343
|
class: "sub-reason-trunc"
|
|
15137
|
-
},
|
|
15344
|
+
}, By = ["title"], Vy = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
15138
15345
|
__name: "SubReasonDetails",
|
|
15139
15346
|
props: {
|
|
15140
15347
|
subReason: {},
|
|
15141
15348
|
subReasonFull: {},
|
|
15142
|
-
status: {}
|
|
15349
|
+
status: {},
|
|
15350
|
+
messages: { default: () => ({ ...y_ }) }
|
|
15143
15351
|
},
|
|
15144
15352
|
setup(e) {
|
|
15145
15353
|
let t = e, n = /* @__PURE__ */ Cn(), r = /* @__PURE__ */ Cn(!1);
|
|
@@ -15161,69 +15369,67 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15161
15369
|
class: "step-sub-reason",
|
|
15162
15370
|
open: r.value,
|
|
15163
15371
|
onToggle: i[0] ||= (e) => r.value = e.target.open
|
|
15164
|
-
}, [Z("summary",
|
|
15372
|
+
}, [Z("summary", Ry, [
|
|
15165
15373
|
Z("span", { class: H(["status-dot sm", e.status === "running" ? "running" : "ok"]) }, null, 2),
|
|
15166
|
-
Z("span", { class: H(["sub-reason-label", { pulsing: e.status === "running" }]) }, U(e.status === "running" ?
|
|
15167
|
-
o.value ? (Y(), X("span",
|
|
15374
|
+
Z("span", { class: H(["sub-reason-label", { pulsing: e.status === "running" }]) }, U(e.status === "running" ? `${e.messages.thinkingCountPrefix}${a.value}${e.messages.charCountSuffix}` : e.messages.reasoningTitle), 3),
|
|
15375
|
+
o.value ? (Y(), X("span", zy, U(e.messages.truncatedNotePrefix) + U(e.subReason.length) + U(e.messages.truncatedNoteSuffix), 1)) : Q("", !0),
|
|
15168
15376
|
Z("button", {
|
|
15169
15377
|
type: "button",
|
|
15170
15378
|
class: H(["sub-reason-copy", { copied: s.value }]),
|
|
15171
|
-
title: o.value ?
|
|
15379
|
+
title: o.value ? e.messages.copyThinkingTruncTitle : e.messages.copyThinking,
|
|
15172
15380
|
onClick: yl(c, ["stop", "prevent"])
|
|
15173
|
-
}, U(s.value ?
|
|
15381
|
+
}, U(s.value ? e.messages.copied : e.messages.copy), 11, By)
|
|
15174
15382
|
]), Z("div", {
|
|
15175
15383
|
ref_key: "bodyRef",
|
|
15176
15384
|
ref: n,
|
|
15177
15385
|
class: "sub-reason-body"
|
|
15178
|
-
}, U(o.value ? "…(前面已截断)\n" : "") + U(e.subReason), 513)], 40,
|
|
15386
|
+
}, U(o.value ? "…(前面已截断)\n" : "") + U(e.subReason), 513)], 40, Ly));
|
|
15179
15387
|
}
|
|
15180
|
-
}), [["__scopeId", "data-v-
|
|
15388
|
+
}), [["__scopeId", "data-v-282d02cd"]]), Hy = {
|
|
15181
15389
|
key: 0,
|
|
15182
15390
|
class: "steps-block"
|
|
15183
|
-
},
|
|
15184
|
-
key: 0,
|
|
15185
|
-
class: "subagent-badge",
|
|
15186
|
-
title: "子 agent 委派(独立上下文,只回结论)"
|
|
15187
|
-
}, My = {
|
|
15391
|
+
}, Uy = { class: "step-head" }, Wy = { class: "step-name" }, Gy = ["title"], Ky = {
|
|
15188
15392
|
key: 1,
|
|
15189
15393
|
class: "step-count"
|
|
15190
|
-
},
|
|
15394
|
+
}, qy = {
|
|
15191
15395
|
key: 2,
|
|
15192
15396
|
class: "step-duration"
|
|
15193
|
-
},
|
|
15397
|
+
}, Jy = ["onClick"], Yy = {
|
|
15194
15398
|
key: 0,
|
|
15195
15399
|
class: "step-detail"
|
|
15196
|
-
},
|
|
15400
|
+
}, Xy = {
|
|
15197
15401
|
key: 0,
|
|
15198
15402
|
class: "step-detail-call-label"
|
|
15199
|
-
},
|
|
15403
|
+
}, Zy = {
|
|
15200
15404
|
key: 1,
|
|
15201
15405
|
class: "step-detail-section"
|
|
15202
|
-
},
|
|
15406
|
+
}, Qy = { class: "step-detail-head" }, $y = ["onClick"], eb = { class: "step-detail-pre" }, tb = {
|
|
15203
15407
|
key: 2,
|
|
15204
15408
|
class: "step-detail-section"
|
|
15205
|
-
},
|
|
15409
|
+
}, nb = { class: "step-detail-head" }, rb = ["onClick"], ib = {
|
|
15206
15410
|
key: 3,
|
|
15207
15411
|
class: "step-detail-empty"
|
|
15208
|
-
},
|
|
15412
|
+
}, ab = {
|
|
15209
15413
|
key: 2,
|
|
15210
15414
|
class: "step-children"
|
|
15211
|
-
},
|
|
15415
|
+
}, ob = { class: "step-children-label" }, sb = { class: "step-name" }, cb = {
|
|
15212
15416
|
key: 0,
|
|
15213
15417
|
class: "step-count"
|
|
15214
|
-
},
|
|
15418
|
+
}, lb = {
|
|
15215
15419
|
key: 1,
|
|
15216
15420
|
class: "step-status running"
|
|
15217
|
-
},
|
|
15421
|
+
}, ub = 2e3, db = 4e3, fb = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
15218
15422
|
__name: "MessageSteps",
|
|
15219
15423
|
props: {
|
|
15220
15424
|
steps: {},
|
|
15221
|
-
icons: { default: () => ({ ...__ }) }
|
|
15425
|
+
icons: { default: () => ({ ...__ }) },
|
|
15426
|
+
messages: { default: () => ({ ...y_ }) }
|
|
15222
15427
|
},
|
|
15223
15428
|
setup(e) {
|
|
15224
15429
|
let t = e;
|
|
15225
15430
|
function n(e) {
|
|
15226
|
-
|
|
15431
|
+
let n = t.messages;
|
|
15432
|
+
return e === "running" ? n.statusRunning : e === "error" ? n.statusError : n.statusDone;
|
|
15227
15433
|
}
|
|
15228
15434
|
function r(e) {
|
|
15229
15435
|
let t = [];
|
|
@@ -15285,17 +15491,17 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15285
15491
|
text: "",
|
|
15286
15492
|
truncated: !1
|
|
15287
15493
|
};
|
|
15288
|
-
let
|
|
15494
|
+
let n;
|
|
15289
15495
|
try {
|
|
15290
|
-
|
|
15496
|
+
n = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
15291
15497
|
} catch {
|
|
15292
|
-
|
|
15498
|
+
n = String(e);
|
|
15293
15499
|
}
|
|
15294
|
-
return
|
|
15295
|
-
text:
|
|
15500
|
+
return n.length > ub ? {
|
|
15501
|
+
text: n.slice(0, ub) + t.messages.displayTruncatedSuffix,
|
|
15296
15502
|
truncated: !0
|
|
15297
15503
|
} : {
|
|
15298
|
-
text:
|
|
15504
|
+
text: n,
|
|
15299
15505
|
truncated: !1
|
|
15300
15506
|
};
|
|
15301
15507
|
}
|
|
@@ -15303,8 +15509,8 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15303
15509
|
return e == null || e === "" ? {
|
|
15304
15510
|
text: "",
|
|
15305
15511
|
truncated: !1
|
|
15306
|
-
} : e.length >
|
|
15307
|
-
text: e.slice(0,
|
|
15512
|
+
} : e.length > db ? {
|
|
15513
|
+
text: e.slice(0, db) + t.messages.displayTruncatedSuffix,
|
|
15308
15514
|
truncated: !0
|
|
15309
15515
|
} : {
|
|
15310
15516
|
text: e,
|
|
@@ -15324,65 +15530,71 @@ var Yv = ["innerHTML"], Xv = {
|
|
|
15324
15530
|
}
|
|
15325
15531
|
g_(e);
|
|
15326
15532
|
}
|
|
15327
|
-
return (t, s) => e.steps.length ? (Y(), X("div",
|
|
15533
|
+
return (t, s) => e.steps.length ? (Y(), X("div", Hy, [(Y(!0), X(J, null, sa(i.value, (t, i) => (Y(), X("div", {
|
|
15328
15534
|
key: i,
|
|
15329
15535
|
class: H(["step-item", t.status])
|
|
15330
15536
|
}, [
|
|
15331
|
-
Z("div",
|
|
15537
|
+
Z("div", Uy, [
|
|
15332
15538
|
Z("span", { class: H(["status-dot", t.status]) }, null, 2),
|
|
15333
|
-
Z("span",
|
|
15334
|
-
a(t.name) ? (Y(), X("span",
|
|
15335
|
-
|
|
15539
|
+
Z("span", Wy, U(t.name), 1),
|
|
15540
|
+
a(t.name) ? (Y(), X("span", {
|
|
15541
|
+
key: 0,
|
|
15542
|
+
class: "subagent-badge",
|
|
15543
|
+
title: e.messages.subagentBadgeTitle
|
|
15544
|
+
}, [fs(ry, { icon: e.icons.subagent }, null, 8, ["icon"]), _s(" " + U(e.messages.subagentBadge), 1)], 8, Gy)) : Q("", !0),
|
|
15545
|
+
t.count > 1 ? (Y(), X("span", Ky, "×" + U(t.count), 1)) : Q("", !0),
|
|
15336
15546
|
Z("span", { class: H(["step-status", t.status]) }, U(n(t.status)), 3),
|
|
15337
|
-
t.durationMs != null && t.status !== "running" ? (Y(), X("span",
|
|
15547
|
+
t.durationMs != null && t.status !== "running" ? (Y(), X("span", qy, U(o(t.durationMs)), 1)) : Q("", !0),
|
|
15338
15548
|
f(t.calls) ? (Y(), X("button", {
|
|
15339
15549
|
key: 3,
|
|
15340
15550
|
type: "button",
|
|
15341
15551
|
class: H(["step-detail-toggle", { open: u.has(i) }]),
|
|
15342
15552
|
onClick: (e) => d(i)
|
|
15343
|
-
}, U(u.has(i) ?
|
|
15553
|
+
}, U(u.has(i) ? e.messages.collapse : e.messages.expand), 11, Jy)) : Q("", !0)
|
|
15344
15554
|
]),
|
|
15345
|
-
u.has(i) && t.calls?.length ? (Y(), X("div",
|
|
15346
|
-
key:
|
|
15555
|
+
u.has(i) && t.calls?.length ? (Y(), X("div", Yy, [(Y(!0), X(J, null, sa(t.calls, (n, r) => (Y(), X("div", {
|
|
15556
|
+
key: r,
|
|
15347
15557
|
class: "step-detail-call"
|
|
15348
15558
|
}, [
|
|
15349
|
-
t.count > 1 ? (Y(), X("div",
|
|
15350
|
-
p(
|
|
15559
|
+
t.count > 1 ? (Y(), X("div", Xy, U(e.messages.nthCallPrefix) + U(r + 1) + U(e.messages.nthCallSuffix), 1)) : Q("", !0),
|
|
15560
|
+
p(n.args).text ? (Y(), X("div", Zy, [Z("div", Qy, [_s(U(e.messages.argsLabel), 1), Z("button", {
|
|
15351
15561
|
type: "button",
|
|
15352
15562
|
class: "step-detail-copy",
|
|
15353
|
-
onClick: (
|
|
15354
|
-
},
|
|
15355
|
-
|
|
15563
|
+
onClick: (e) => h(p(n.args).text, p(n.args).truncated, n.args)
|
|
15564
|
+
}, U(e.messages.copy), 9, $y)]), Z("pre", eb, U(p(n.args).text), 1)])) : Q("", !0),
|
|
15565
|
+
n.status !== "running" && m(n.result).text ? (Y(), X("div", tb, [Z("div", nb, [_s(U(e.messages.resultLabel), 1), Z("button", {
|
|
15356
15566
|
type: "button",
|
|
15357
15567
|
class: "step-detail-copy",
|
|
15358
|
-
onClick: (
|
|
15359
|
-
},
|
|
15568
|
+
onClick: (e) => h(m(n.result).text, m(n.result).truncated, n.result)
|
|
15569
|
+
}, U(e.messages.copy), 9, rb)]), Z("pre", { class: H(["step-detail-pre", { err: n.status === "error" }]) }, U(m(n.result).text), 3)])) : n.status !== "running" && !m(n.result).text ? (Y(), X("div", ib, U(e.messages.noResult), 1)) : Q("", !0)
|
|
15360
15570
|
]))), 128))])) : Q("", !0),
|
|
15361
|
-
t.subReason ? (Y(), as(
|
|
15571
|
+
t.subReason ? (Y(), as(Vy, {
|
|
15362
15572
|
key: 1,
|
|
15363
15573
|
"sub-reason": t.subReason,
|
|
15364
15574
|
"sub-reason-full": t.subReasonFull,
|
|
15365
|
-
status: t.status
|
|
15575
|
+
status: t.status,
|
|
15576
|
+
messages: e.messages
|
|
15366
15577
|
}, null, 8, [
|
|
15367
15578
|
"sub-reason",
|
|
15368
15579
|
"sub-reason-full",
|
|
15369
|
-
"status"
|
|
15580
|
+
"status",
|
|
15581
|
+
"messages"
|
|
15370
15582
|
])) : Q("", !0),
|
|
15371
|
-
t.children && t.children.length ? (Y(), X("div",
|
|
15583
|
+
t.children && t.children.length ? (Y(), X("div", ab, [Z("div", ob, [fs(ry, { icon: e.icons.subagentProgress }, null, 8, ["icon"]), _s(" " + U(e.messages.subagentProgress), 1)]), (Y(!0), X(J, null, sa(r(t.children), (e, t) => (Y(), X("div", {
|
|
15372
15584
|
key: t,
|
|
15373
15585
|
class: H(["step-child", e.status])
|
|
15374
15586
|
}, [
|
|
15375
15587
|
Z("span", { class: H(["status-dot sm", e.status]) }, null, 2),
|
|
15376
|
-
Z("span",
|
|
15377
|
-
e.count > 1 ? (Y(), X("span",
|
|
15378
|
-
e.status === "running" ? (Y(), X("span",
|
|
15588
|
+
Z("span", sb, U(e.name), 1),
|
|
15589
|
+
e.count > 1 ? (Y(), X("span", cb, "×" + U(e.count), 1)) : Q("", !0),
|
|
15590
|
+
e.status === "running" ? (Y(), X("span", lb, "…")) : Q("", !0)
|
|
15379
15591
|
], 2))), 128))])) : Q("", !0)
|
|
15380
15592
|
], 2))), 128))])) : Q("", !0);
|
|
15381
15593
|
}
|
|
15382
|
-
}), [["__scopeId", "data-v-
|
|
15594
|
+
}), [["__scopeId", "data-v-998950a4"]]);
|
|
15383
15595
|
//#endregion
|
|
15384
15596
|
//#region node_modules/marked/lib/marked.esm.js
|
|
15385
|
-
function
|
|
15597
|
+
function pb() {
|
|
15386
15598
|
return {
|
|
15387
15599
|
async: !1,
|
|
15388
15600
|
breaks: !1,
|
|
@@ -15396,35 +15608,35 @@ function $y() {
|
|
|
15396
15608
|
walkTokens: null
|
|
15397
15609
|
};
|
|
15398
15610
|
}
|
|
15399
|
-
var
|
|
15400
|
-
function
|
|
15401
|
-
|
|
15611
|
+
var mb = pb();
|
|
15612
|
+
function hb(e) {
|
|
15613
|
+
mb = e;
|
|
15402
15614
|
}
|
|
15403
|
-
var
|
|
15404
|
-
function
|
|
15615
|
+
var gb = { exec: () => null };
|
|
15616
|
+
function _b(e) {
|
|
15405
15617
|
let t = [];
|
|
15406
15618
|
return (n) => {
|
|
15407
15619
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
15408
15620
|
return i || (i = e(r), t[r] = i), i;
|
|
15409
15621
|
};
|
|
15410
15622
|
}
|
|
15411
|
-
function
|
|
15623
|
+
function vb(e, t = "") {
|
|
15412
15624
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
15413
15625
|
replace: (e, t) => {
|
|
15414
15626
|
let i = typeof t == "string" ? t : t.source;
|
|
15415
|
-
return i = i.replace(
|
|
15627
|
+
return i = i.replace(bb.caret, "$1"), n = n.replace(e, i), r;
|
|
15416
15628
|
},
|
|
15417
15629
|
getRegex: () => new RegExp(n, t)
|
|
15418
15630
|
};
|
|
15419
15631
|
return r;
|
|
15420
15632
|
}
|
|
15421
|
-
var
|
|
15633
|
+
var yb = ((e = "") => {
|
|
15422
15634
|
try {
|
|
15423
15635
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
15424
15636
|
} catch {
|
|
15425
15637
|
return !1;
|
|
15426
15638
|
}
|
|
15427
|
-
})(),
|
|
15639
|
+
})(), bb = {
|
|
15428
15640
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
15429
15641
|
outputLinkReplace: /\\([\[\]])/g,
|
|
15430
15642
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -15475,121 +15687,121 @@ var ab = ((e = "") => {
|
|
|
15475
15687
|
notSpaceStart: /^\S*/,
|
|
15476
15688
|
endingNewline: /\n$/,
|
|
15477
15689
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
15478
|
-
nextBulletRegex:
|
|
15479
|
-
hrRegex:
|
|
15480
|
-
fencesBeginRegex:
|
|
15481
|
-
headingBeginRegex:
|
|
15482
|
-
htmlBeginRegex:
|
|
15483
|
-
blockquoteBeginRegex:
|
|
15484
|
-
},
|
|
15485
|
-
blockquote:
|
|
15486
|
-
code:
|
|
15487
|
-
def:
|
|
15488
|
-
fences:
|
|
15489
|
-
heading:
|
|
15490
|
-
hr:
|
|
15491
|
-
html:
|
|
15492
|
-
lheading:
|
|
15493
|
-
list:
|
|
15494
|
-
newline:
|
|
15495
|
-
paragraph:
|
|
15496
|
-
table:
|
|
15497
|
-
text:
|
|
15498
|
-
},
|
|
15499
|
-
...
|
|
15500
|
-
lheading:
|
|
15501
|
-
table:
|
|
15502
|
-
paragraph:
|
|
15503
|
-
},
|
|
15504
|
-
...
|
|
15505
|
-
html:
|
|
15690
|
+
nextBulletRegex: _b((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
15691
|
+
hrRegex: _b((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
15692
|
+
fencesBeginRegex: _b((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
15693
|
+
headingBeginRegex: _b((e) => RegExp(`^ {0,${e}}#`)),
|
|
15694
|
+
htmlBeginRegex: _b((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
15695
|
+
blockquoteBeginRegex: _b((e) => RegExp(`^ {0,${e}}>`))
|
|
15696
|
+
}, xb = /^(?:[ \t]*(?:\n|$))+/, Sb = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Cb = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, wb = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Tb = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Eb = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Db = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ob = vb(Db).replace(/bull/g, Eb).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(), kb = vb(Db).replace(/bull/g, Eb).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(), Ab = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, jb = /^[^\n]+/, Mb = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Nb = vb(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Mb).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pb = vb(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Eb).getRegex(), Fb = "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", Ib = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Lb = vb("^ {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", Ib).replace("tag", Fb).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Rb = (e) => vb(Ab).replace("hr", wb).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", Fb).getRegex(), zb = Rb(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Bb = Rb(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), Vb = {
|
|
15697
|
+
blockquote: vb(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Bb).getRegex(),
|
|
15698
|
+
code: Sb,
|
|
15699
|
+
def: Nb,
|
|
15700
|
+
fences: Cb,
|
|
15701
|
+
heading: Tb,
|
|
15702
|
+
hr: wb,
|
|
15703
|
+
html: Lb,
|
|
15704
|
+
lheading: Ob,
|
|
15705
|
+
list: Pb,
|
|
15706
|
+
newline: xb,
|
|
15707
|
+
paragraph: zb,
|
|
15708
|
+
table: gb,
|
|
15709
|
+
text: jb
|
|
15710
|
+
}, Hb = vb("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", wb).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", Fb).getRegex(), Ub = {
|
|
15711
|
+
...Vb,
|
|
15712
|
+
lheading: kb,
|
|
15713
|
+
table: Hb,
|
|
15714
|
+
paragraph: vb(Ab).replace("hr", wb).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Hb).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", Fb).getRegex()
|
|
15715
|
+
}, Wb = {
|
|
15716
|
+
...Vb,
|
|
15717
|
+
html: vb("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ib).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(),
|
|
15506
15718
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
15507
15719
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
15508
|
-
fences:
|
|
15720
|
+
fences: gb,
|
|
15509
15721
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
15510
|
-
paragraph:
|
|
15511
|
-
},
|
|
15512
|
-
_backpedal:
|
|
15513
|
-
anyPunctuation:
|
|
15514
|
-
autolink:
|
|
15515
|
-
blockSkip:
|
|
15516
|
-
br:
|
|
15517
|
-
code:
|
|
15518
|
-
del:
|
|
15519
|
-
delLDelim:
|
|
15520
|
-
delRDelim:
|
|
15521
|
-
emStrongLDelim:
|
|
15522
|
-
emStrongRDelimAst:
|
|
15523
|
-
emStrongRDelimUnd:
|
|
15524
|
-
escape:
|
|
15525
|
-
link:
|
|
15526
|
-
nolink:
|
|
15527
|
-
punctuation:
|
|
15528
|
-
reflink:
|
|
15529
|
-
reflinkSearch:
|
|
15530
|
-
tag:
|
|
15531
|
-
text:
|
|
15532
|
-
url:
|
|
15533
|
-
},
|
|
15534
|
-
...
|
|
15535
|
-
link:
|
|
15536
|
-
reflink:
|
|
15537
|
-
},
|
|
15538
|
-
...
|
|
15539
|
-
emStrongRDelimAst:
|
|
15540
|
-
emStrongLDelim:
|
|
15541
|
-
delLDelim:
|
|
15542
|
-
delRDelim:
|
|
15543
|
-
url:
|
|
15722
|
+
paragraph: vb(Ab).replace("hr", wb).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Ob).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
15723
|
+
}, Gb = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kb = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, qb = /^( {2,}|\\)\n(?!\s*$)/, Jb = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yb = /[\p{P}\p{S}]/u, Xb = /[\s\p{P}\p{S}]/u, Zb = /[^\s\p{P}\p{S}]/u, Qb = vb(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Xb).getRegex(), $b = /(?!~)[\p{P}\p{S}]/u, ex = /(?!~)[\s\p{P}\p{S}]/u, tx = /(?:[^\s\p{P}\p{S}]|~)/u, nx = vb(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", yb ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), rx = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ix = vb(rx, "u").replace(/punct/g, Yb).getRegex(), ax = vb(rx, "u").replace(/punct/g, $b).getRegex(), ox = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", sx = vb(ox, "gu").replace(/notPunctSpace/g, Zb).replace(/punctSpace/g, Xb).replace(/punct/g, Yb).getRegex(), cx = vb(ox, "gu").replace(/notPunctSpace/g, tx).replace(/punctSpace/g, ex).replace(/punct/g, $b).getRegex(), lx = vb("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Zb).replace(/punctSpace/g, Xb).replace(/punct/g, Yb).getRegex(), ux = vb(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Yb).getRegex(), dx = vb("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zb).replace(/punctSpace/g, Xb).replace(/punct/g, Yb).getRegex(), fx = vb(/\\(punct)/, "gu").replace(/punct/g, Yb).getRegex(), px = vb(/^<(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(), mx = vb(Ib).replace("(?:-->|$)", "-->").getRegex(), hx = vb("^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", mx).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gx = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, _x = vb(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gx).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vx = vb(/^!?\[(label)\]\[(ref)\]/).replace("label", gx).replace("ref", Mb).getRegex(), yx = vb(/^!?\[(ref)\](?:\[\])?/).replace("ref", Mb).getRegex(), bx = vb("reflink|nolink(?!\\()", "g").replace("reflink", vx).replace("nolink", yx).getRegex(), xx = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Sx = {
|
|
15724
|
+
_backpedal: gb,
|
|
15725
|
+
anyPunctuation: fx,
|
|
15726
|
+
autolink: px,
|
|
15727
|
+
blockSkip: nx,
|
|
15728
|
+
br: qb,
|
|
15729
|
+
code: Kb,
|
|
15730
|
+
del: gb,
|
|
15731
|
+
delLDelim: gb,
|
|
15732
|
+
delRDelim: gb,
|
|
15733
|
+
emStrongLDelim: ix,
|
|
15734
|
+
emStrongRDelimAst: sx,
|
|
15735
|
+
emStrongRDelimUnd: lx,
|
|
15736
|
+
escape: Gb,
|
|
15737
|
+
link: _x,
|
|
15738
|
+
nolink: yx,
|
|
15739
|
+
punctuation: Qb,
|
|
15740
|
+
reflink: vx,
|
|
15741
|
+
reflinkSearch: bx,
|
|
15742
|
+
tag: hx,
|
|
15743
|
+
text: Jb,
|
|
15744
|
+
url: gb
|
|
15745
|
+
}, Cx = {
|
|
15746
|
+
...Sx,
|
|
15747
|
+
link: vb(/^!?\[(label)\]\((.*?)\)/).replace("label", gx).getRegex(),
|
|
15748
|
+
reflink: vb(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gx).getRegex()
|
|
15749
|
+
}, wx = {
|
|
15750
|
+
...Sx,
|
|
15751
|
+
emStrongRDelimAst: cx,
|
|
15752
|
+
emStrongLDelim: ax,
|
|
15753
|
+
delLDelim: ux,
|
|
15754
|
+
delRDelim: dx,
|
|
15755
|
+
url: vb(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", xx).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
15544
15756
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
15545
15757
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
15546
|
-
text:
|
|
15547
|
-
},
|
|
15548
|
-
...
|
|
15549
|
-
br:
|
|
15550
|
-
text:
|
|
15551
|
-
},
|
|
15552
|
-
normal:
|
|
15553
|
-
gfm:
|
|
15554
|
-
pedantic:
|
|
15555
|
-
},
|
|
15556
|
-
normal:
|
|
15557
|
-
gfm:
|
|
15558
|
-
breaks:
|
|
15559
|
-
pedantic:
|
|
15560
|
-
},
|
|
15758
|
+
text: vb(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", xx).getRegex()
|
|
15759
|
+
}, Tx = {
|
|
15760
|
+
...wx,
|
|
15761
|
+
br: vb(qb).replace("{2,}", "*").getRegex(),
|
|
15762
|
+
text: vb(wx.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
15763
|
+
}, Ex = {
|
|
15764
|
+
normal: Vb,
|
|
15765
|
+
gfm: Ub,
|
|
15766
|
+
pedantic: Wb
|
|
15767
|
+
}, Dx = {
|
|
15768
|
+
normal: Sx,
|
|
15769
|
+
gfm: wx,
|
|
15770
|
+
breaks: Tx,
|
|
15771
|
+
pedantic: Cx
|
|
15772
|
+
}, Ox = {
|
|
15561
15773
|
"&": "&",
|
|
15562
15774
|
"<": "<",
|
|
15563
15775
|
">": ">",
|
|
15564
15776
|
"\"": """,
|
|
15565
15777
|
"'": "'"
|
|
15566
|
-
},
|
|
15567
|
-
function
|
|
15778
|
+
}, kx = (e) => Ox[e];
|
|
15779
|
+
function Ax(e, t) {
|
|
15568
15780
|
if (t) {
|
|
15569
|
-
if (
|
|
15570
|
-
} else if (
|
|
15781
|
+
if (bb.escapeTest.test(e)) return e.replace(bb.escapeReplace, kx);
|
|
15782
|
+
} else if (bb.escapeTestNoEncode.test(e)) return e.replace(bb.escapeReplaceNoEncode, kx);
|
|
15571
15783
|
return e;
|
|
15572
15784
|
}
|
|
15573
|
-
function
|
|
15785
|
+
function jx(e) {
|
|
15574
15786
|
try {
|
|
15575
|
-
e = encodeURI(e).replace(
|
|
15787
|
+
e = encodeURI(e).replace(bb.percentDecode, "%");
|
|
15576
15788
|
} catch {
|
|
15577
15789
|
return null;
|
|
15578
15790
|
}
|
|
15579
15791
|
return e;
|
|
15580
15792
|
}
|
|
15581
|
-
function
|
|
15582
|
-
let n = e.replace(
|
|
15793
|
+
function Mx(e, t) {
|
|
15794
|
+
let n = e.replace(bb.findPipe, (e, t, n) => {
|
|
15583
15795
|
let r = !1, i = t;
|
|
15584
15796
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
15585
15797
|
return r ? "|" : " |";
|
|
15586
|
-
}).split(
|
|
15798
|
+
}).split(bb.splitPipe), r = 0;
|
|
15587
15799
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
15588
15800
|
else for (; n.length < t;) n.push("");
|
|
15589
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
15801
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(bb.slashPipe, "|");
|
|
15590
15802
|
return n;
|
|
15591
15803
|
}
|
|
15592
|
-
function
|
|
15804
|
+
function Nx(e, t, n) {
|
|
15593
15805
|
let r = e.length;
|
|
15594
15806
|
if (r === 0) return "";
|
|
15595
15807
|
let i = 0;
|
|
@@ -15601,12 +15813,12 @@ function yx(e, t, n) {
|
|
|
15601
15813
|
}
|
|
15602
15814
|
return e.slice(0, r - i);
|
|
15603
15815
|
}
|
|
15604
|
-
function
|
|
15816
|
+
function Px(e) {
|
|
15605
15817
|
let t = e.split("\n"), n = t.length - 1;
|
|
15606
|
-
for (; n >= 0 &&
|
|
15818
|
+
for (; n >= 0 && bb.blankLine.test(t[n]);) n--;
|
|
15607
15819
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
15608
15820
|
}
|
|
15609
|
-
function
|
|
15821
|
+
function Fx(e, t) {
|
|
15610
15822
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
15611
15823
|
let n = 0;
|
|
15612
15824
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -15614,7 +15826,7 @@ function xx(e, t) {
|
|
|
15614
15826
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
15615
15827
|
return n > 0 ? -2 : -1;
|
|
15616
15828
|
}
|
|
15617
|
-
function
|
|
15829
|
+
function Ix(e, t = 0) {
|
|
15618
15830
|
let n = t, r = "";
|
|
15619
15831
|
for (let t of e) if (t === " ") {
|
|
15620
15832
|
let e = 4 - n % 4;
|
|
@@ -15622,7 +15834,7 @@ function Sx(e, t = 0) {
|
|
|
15622
15834
|
} else r += t, n++;
|
|
15623
15835
|
return r;
|
|
15624
15836
|
}
|
|
15625
|
-
function
|
|
15837
|
+
function Lx(e, t, n, r, i) {
|
|
15626
15838
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
15627
15839
|
r.state.inLink = !0;
|
|
15628
15840
|
let c = {
|
|
@@ -15635,7 +15847,7 @@ function Cx(e, t, n, r, i) {
|
|
|
15635
15847
|
};
|
|
15636
15848
|
return r.state.inLink = !1, c;
|
|
15637
15849
|
}
|
|
15638
|
-
function
|
|
15850
|
+
function Rx(e, t, n) {
|
|
15639
15851
|
let r = e.match(n.other.indentCodeCompensation);
|
|
15640
15852
|
if (r === null) return t;
|
|
15641
15853
|
let i = r[1];
|
|
@@ -15646,12 +15858,12 @@ function wx(e, t, n) {
|
|
|
15646
15858
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
15647
15859
|
}).join("\n");
|
|
15648
15860
|
}
|
|
15649
|
-
var
|
|
15861
|
+
var zx = class {
|
|
15650
15862
|
options;
|
|
15651
15863
|
rules;
|
|
15652
15864
|
lexer;
|
|
15653
15865
|
constructor(e) {
|
|
15654
|
-
this.options = e ||
|
|
15866
|
+
this.options = e || mb;
|
|
15655
15867
|
}
|
|
15656
15868
|
space(e) {
|
|
15657
15869
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -15663,7 +15875,7 @@ var Tx = class {
|
|
|
15663
15875
|
code(e) {
|
|
15664
15876
|
let t = this.rules.block.code.exec(e);
|
|
15665
15877
|
if (t) {
|
|
15666
|
-
let e = this.options.pedantic ? t[0] :
|
|
15878
|
+
let e = this.options.pedantic ? t[0] : Px(t[0]);
|
|
15667
15879
|
return {
|
|
15668
15880
|
type: "code",
|
|
15669
15881
|
raw: e,
|
|
@@ -15675,7 +15887,7 @@ var Tx = class {
|
|
|
15675
15887
|
fences(e) {
|
|
15676
15888
|
let t = this.rules.block.fences.exec(e);
|
|
15677
15889
|
if (t) {
|
|
15678
|
-
let e = t[0], n =
|
|
15890
|
+
let e = t[0], n = Rx(e, t[3] || "", this.rules);
|
|
15679
15891
|
return {
|
|
15680
15892
|
type: "code",
|
|
15681
15893
|
raw: e,
|
|
@@ -15689,12 +15901,12 @@ var Tx = class {
|
|
|
15689
15901
|
if (t) {
|
|
15690
15902
|
let e = t[2].trim();
|
|
15691
15903
|
if (this.rules.other.endingHash.test(e)) {
|
|
15692
|
-
let t =
|
|
15904
|
+
let t = Nx(e, "#");
|
|
15693
15905
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
15694
15906
|
}
|
|
15695
15907
|
return {
|
|
15696
15908
|
type: "heading",
|
|
15697
|
-
raw:
|
|
15909
|
+
raw: Nx(t[0], "\n"),
|
|
15698
15910
|
depth: t[1].length,
|
|
15699
15911
|
text: e,
|
|
15700
15912
|
tokens: this.lexer.inline(e)
|
|
@@ -15705,13 +15917,13 @@ var Tx = class {
|
|
|
15705
15917
|
let t = this.rules.block.hr.exec(e);
|
|
15706
15918
|
if (t) return {
|
|
15707
15919
|
type: "hr",
|
|
15708
|
-
raw:
|
|
15920
|
+
raw: Nx(t[0], "\n")
|
|
15709
15921
|
};
|
|
15710
15922
|
}
|
|
15711
15923
|
blockquote(e) {
|
|
15712
15924
|
let t = this.rules.block.blockquote.exec(e);
|
|
15713
15925
|
if (t) {
|
|
15714
|
-
let e =
|
|
15926
|
+
let e = Nx(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
15715
15927
|
for (; e.length > 0;) {
|
|
15716
15928
|
let t = !1, a = [], o;
|
|
15717
15929
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -15761,7 +15973,7 @@ ${c}` : c;
|
|
|
15761
15973
|
let n = !1, r = "", s = "";
|
|
15762
15974
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
15763
15975
|
r = t[0], e = e.substring(r.length);
|
|
15764
|
-
let c =
|
|
15976
|
+
let c = Ix(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
15765
15977
|
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) {
|
|
15766
15978
|
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);
|
|
15767
15979
|
for (; e;) {
|
|
@@ -15827,7 +16039,7 @@ ${c}` : c;
|
|
|
15827
16039
|
html(e) {
|
|
15828
16040
|
let t = this.rules.block.html.exec(e);
|
|
15829
16041
|
if (t) {
|
|
15830
|
-
let e =
|
|
16042
|
+
let e = Px(t[0]);
|
|
15831
16043
|
return {
|
|
15832
16044
|
type: "html",
|
|
15833
16045
|
block: !0,
|
|
@@ -15844,7 +16056,7 @@ ${c}` : c;
|
|
|
15844
16056
|
return {
|
|
15845
16057
|
type: "def",
|
|
15846
16058
|
tag: e,
|
|
15847
|
-
raw:
|
|
16059
|
+
raw: Nx(t[0], "\n"),
|
|
15848
16060
|
href: n,
|
|
15849
16061
|
title: r
|
|
15850
16062
|
};
|
|
@@ -15853,9 +16065,9 @@ ${c}` : c;
|
|
|
15853
16065
|
table(e) {
|
|
15854
16066
|
let t = this.rules.block.table.exec(e);
|
|
15855
16067
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
15856
|
-
let n =
|
|
16068
|
+
let n = Mx(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 = {
|
|
15857
16069
|
type: "table",
|
|
15858
|
-
raw:
|
|
16070
|
+
raw: Nx(t[0], "\n"),
|
|
15859
16071
|
header: [],
|
|
15860
16072
|
align: [],
|
|
15861
16073
|
rows: []
|
|
@@ -15868,7 +16080,7 @@ ${c}` : c;
|
|
|
15868
16080
|
header: !0,
|
|
15869
16081
|
align: a.align[e]
|
|
15870
16082
|
});
|
|
15871
|
-
for (let e of i) a.rows.push(
|
|
16083
|
+
for (let e of i) a.rows.push(Mx(e, a.header.length).map((e, t) => ({
|
|
15872
16084
|
text: e,
|
|
15873
16085
|
tokens: this.lexer.inline(e),
|
|
15874
16086
|
header: !1,
|
|
@@ -15883,7 +16095,7 @@ ${c}` : c;
|
|
|
15883
16095
|
let e = t[1].trim();
|
|
15884
16096
|
return {
|
|
15885
16097
|
type: "heading",
|
|
15886
|
-
raw:
|
|
16098
|
+
raw: Nx(t[0], "\n"),
|
|
15887
16099
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
15888
16100
|
text: e,
|
|
15889
16101
|
tokens: this.lexer.inline(e)
|
|
@@ -15936,10 +16148,10 @@ ${c}` : c;
|
|
|
15936
16148
|
let e = t[2].trim();
|
|
15937
16149
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
15938
16150
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
15939
|
-
let t =
|
|
16151
|
+
let t = Nx(e.slice(0, -1), "\\");
|
|
15940
16152
|
if ((e.length - t.length) % 2 == 0) return;
|
|
15941
16153
|
} else {
|
|
15942
|
-
let e =
|
|
16154
|
+
let e = Fx(t[2], "()");
|
|
15943
16155
|
if (e === -2) return;
|
|
15944
16156
|
if (e > -1) {
|
|
15945
16157
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -15951,7 +16163,7 @@ ${c}` : c;
|
|
|
15951
16163
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
15952
16164
|
e && (n = e[1], r = e[3]);
|
|
15953
16165
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
15954
|
-
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)),
|
|
16166
|
+
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)), Lx(t, {
|
|
15955
16167
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
15956
16168
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
15957
16169
|
}, t[0], this.lexer, this.rules);
|
|
@@ -15969,7 +16181,7 @@ ${c}` : c;
|
|
|
15969
16181
|
text: e
|
|
15970
16182
|
};
|
|
15971
16183
|
}
|
|
15972
|
-
return
|
|
16184
|
+
return Lx(n, e, n[0], this.lexer, this.rules);
|
|
15973
16185
|
}
|
|
15974
16186
|
}
|
|
15975
16187
|
emStrong(e, t, n = "") {
|
|
@@ -16101,29 +16313,29 @@ ${c}` : c;
|
|
|
16101
16313
|
};
|
|
16102
16314
|
}
|
|
16103
16315
|
}
|
|
16104
|
-
},
|
|
16316
|
+
}, Bx = class e {
|
|
16105
16317
|
tokens;
|
|
16106
16318
|
options;
|
|
16107
16319
|
state;
|
|
16108
16320
|
inlineQueue;
|
|
16109
16321
|
tokenizer;
|
|
16110
16322
|
constructor(e) {
|
|
16111
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
16323
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || mb, this.options.tokenizer = this.options.tokenizer || new zx(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
16112
16324
|
inLink: !1,
|
|
16113
16325
|
inRawBlock: !1,
|
|
16114
16326
|
top: !0
|
|
16115
16327
|
};
|
|
16116
16328
|
let t = {
|
|
16117
|
-
other:
|
|
16118
|
-
block:
|
|
16119
|
-
inline:
|
|
16329
|
+
other: bb,
|
|
16330
|
+
block: Ex.normal,
|
|
16331
|
+
inline: Dx.normal
|
|
16120
16332
|
};
|
|
16121
|
-
this.options.pedantic ? (t.block =
|
|
16333
|
+
this.options.pedantic ? (t.block = Ex.pedantic, t.inline = Dx.pedantic) : this.options.gfm && (t.block = Ex.gfm, this.options.breaks ? t.inline = Dx.breaks : t.inline = Dx.gfm), this.tokenizer.rules = t;
|
|
16122
16334
|
}
|
|
16123
16335
|
static get rules() {
|
|
16124
16336
|
return {
|
|
16125
|
-
block:
|
|
16126
|
-
inline:
|
|
16337
|
+
block: Ex,
|
|
16338
|
+
inline: Dx
|
|
16127
16339
|
};
|
|
16128
16340
|
}
|
|
16129
16341
|
static lex(t, n) {
|
|
@@ -16133,7 +16345,7 @@ ${c}` : c;
|
|
|
16133
16345
|
return new e(n).inlineTokens(t);
|
|
16134
16346
|
}
|
|
16135
16347
|
lex(e) {
|
|
16136
|
-
e = e.replace(
|
|
16348
|
+
e = e.replace(bb.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
16137
16349
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
16138
16350
|
let t = this.inlineQueue[e];
|
|
16139
16351
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -16141,7 +16353,7 @@ ${c}` : c;
|
|
|
16141
16353
|
return this.inlineQueue = [], this.tokens;
|
|
16142
16354
|
}
|
|
16143
16355
|
blockTokens(e, t = [], n = !1) {
|
|
16144
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
16356
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(bb.tabCharGlobal, " ").replace(bb.spaceLine, ""));
|
|
16145
16357
|
let r = Infinity;
|
|
16146
16358
|
for (; e;) {
|
|
16147
16359
|
if (e.length < r) r = e.length;
|
|
@@ -16323,18 +16535,18 @@ ${c}` : c;
|
|
|
16323
16535
|
if (this.options.silent) console.error(t);
|
|
16324
16536
|
else throw Error(t);
|
|
16325
16537
|
}
|
|
16326
|
-
},
|
|
16538
|
+
}, Vx = class {
|
|
16327
16539
|
options;
|
|
16328
16540
|
parser;
|
|
16329
16541
|
constructor(e) {
|
|
16330
|
-
this.options = e ||
|
|
16542
|
+
this.options = e || mb;
|
|
16331
16543
|
}
|
|
16332
16544
|
space(e) {
|
|
16333
16545
|
return "";
|
|
16334
16546
|
}
|
|
16335
16547
|
code({ text: e, lang: t, escaped: n }) {
|
|
16336
|
-
let r = (t || "").match(
|
|
16337
|
-
return r ? "<pre><code class=\"language-" +
|
|
16548
|
+
let r = (t || "").match(bb.notSpaceStart)?.[0], i = e.replace(bb.endingNewline, "") + "\n";
|
|
16549
|
+
return r ? "<pre><code class=\"language-" + Ax(r) + "\">" + (n ? i : Ax(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : Ax(i, !0)) + "</code></pre>\n";
|
|
16338
16550
|
}
|
|
16339
16551
|
blockquote({ tokens: e }) {
|
|
16340
16552
|
return `<blockquote>
|
|
@@ -16404,7 +16616,7 @@ ${e}</tr>
|
|
|
16404
16616
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
16405
16617
|
}
|
|
16406
16618
|
codespan({ text: e }) {
|
|
16407
|
-
return `<code>${
|
|
16619
|
+
return `<code>${Ax(e, !0)}</code>`;
|
|
16408
16620
|
}
|
|
16409
16621
|
br(e) {
|
|
16410
16622
|
return "<br>";
|
|
@@ -16413,24 +16625,24 @@ ${e}</tr>
|
|
|
16413
16625
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
16414
16626
|
}
|
|
16415
16627
|
link({ href: e, title: t, tokens: n }) {
|
|
16416
|
-
let r = this.parser.parseInline(n), i =
|
|
16628
|
+
let r = this.parser.parseInline(n), i = jx(e);
|
|
16417
16629
|
if (i === null) return r;
|
|
16418
16630
|
e = i;
|
|
16419
16631
|
let a = "<a href=\"" + e + "\"";
|
|
16420
|
-
return t && (a += " title=\"" +
|
|
16632
|
+
return t && (a += " title=\"" + Ax(t) + "\""), a += ">" + r + "</a>", a;
|
|
16421
16633
|
}
|
|
16422
16634
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
16423
16635
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
16424
|
-
let i =
|
|
16425
|
-
if (i === null) return
|
|
16636
|
+
let i = jx(e);
|
|
16637
|
+
if (i === null) return Ax(n);
|
|
16426
16638
|
e = i;
|
|
16427
|
-
let a = `<img src="${e}" alt="${
|
|
16428
|
-
return t && (a += ` title="${
|
|
16639
|
+
let a = `<img src="${e}" alt="${Ax(n)}"`;
|
|
16640
|
+
return t && (a += ` title="${Ax(t)}"`), a += ">", a;
|
|
16429
16641
|
}
|
|
16430
16642
|
text(e) {
|
|
16431
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
16643
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : Ax(e.text);
|
|
16432
16644
|
}
|
|
16433
|
-
},
|
|
16645
|
+
}, Hx = class {
|
|
16434
16646
|
strong({ text: e }) {
|
|
16435
16647
|
return e;
|
|
16436
16648
|
}
|
|
@@ -16461,12 +16673,12 @@ ${e}</tr>
|
|
|
16461
16673
|
checkbox({ raw: e }) {
|
|
16462
16674
|
return e;
|
|
16463
16675
|
}
|
|
16464
|
-
},
|
|
16676
|
+
}, Ux = class e {
|
|
16465
16677
|
options;
|
|
16466
16678
|
renderer;
|
|
16467
16679
|
textRenderer;
|
|
16468
16680
|
constructor(e) {
|
|
16469
|
-
this.options = e ||
|
|
16681
|
+
this.options = e || mb, this.options.renderer = this.options.renderer || new Vx(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Hx();
|
|
16470
16682
|
}
|
|
16471
16683
|
static parse(t, n) {
|
|
16472
16684
|
return new e(n).parse(t);
|
|
@@ -16612,11 +16824,11 @@ ${e}</tr>
|
|
|
16612
16824
|
}
|
|
16613
16825
|
return n;
|
|
16614
16826
|
}
|
|
16615
|
-
},
|
|
16827
|
+
}, Wx = class {
|
|
16616
16828
|
options;
|
|
16617
16829
|
block;
|
|
16618
16830
|
constructor(e) {
|
|
16619
|
-
this.options = e ||
|
|
16831
|
+
this.options = e || mb;
|
|
16620
16832
|
}
|
|
16621
16833
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
16622
16834
|
"preprocess",
|
|
@@ -16642,22 +16854,22 @@ ${e}</tr>
|
|
|
16642
16854
|
return e;
|
|
16643
16855
|
}
|
|
16644
16856
|
provideLexer(e = this.block) {
|
|
16645
|
-
return e ?
|
|
16857
|
+
return e ? Bx.lex : Bx.lexInline;
|
|
16646
16858
|
}
|
|
16647
16859
|
provideParser(e = this.block) {
|
|
16648
|
-
return e ?
|
|
16860
|
+
return e ? Ux.parse : Ux.parseInline;
|
|
16649
16861
|
}
|
|
16650
|
-
},
|
|
16651
|
-
defaults =
|
|
16862
|
+
}, Gx = new class {
|
|
16863
|
+
defaults = pb();
|
|
16652
16864
|
options = this.setOptions;
|
|
16653
16865
|
parse = this.parseMarkdown(!0);
|
|
16654
16866
|
parseInline = this.parseMarkdown(!1);
|
|
16655
|
-
Parser =
|
|
16656
|
-
Renderer =
|
|
16657
|
-
TextRenderer =
|
|
16658
|
-
Lexer =
|
|
16659
|
-
Tokenizer =
|
|
16660
|
-
Hooks =
|
|
16867
|
+
Parser = Ux;
|
|
16868
|
+
Renderer = Vx;
|
|
16869
|
+
TextRenderer = Hx;
|
|
16870
|
+
Lexer = Bx;
|
|
16871
|
+
Tokenizer = zx;
|
|
16872
|
+
Hooks = Wx;
|
|
16661
16873
|
constructor(...e) {
|
|
16662
16874
|
this.use(...e);
|
|
16663
16875
|
}
|
|
@@ -16708,7 +16920,7 @@ ${e}</tr>
|
|
|
16708
16920
|
}
|
|
16709
16921
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
16710
16922
|
}), n.extensions = t), e.renderer) {
|
|
16711
|
-
let t = this.defaults.renderer || new
|
|
16923
|
+
let t = this.defaults.renderer || new Vx(this.defaults);
|
|
16712
16924
|
for (let n in e.renderer) {
|
|
16713
16925
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
16714
16926
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -16721,7 +16933,7 @@ ${e}</tr>
|
|
|
16721
16933
|
n.renderer = t;
|
|
16722
16934
|
}
|
|
16723
16935
|
if (e.tokenizer) {
|
|
16724
|
-
let t = this.defaults.tokenizer || new
|
|
16936
|
+
let t = this.defaults.tokenizer || new zx(this.defaults);
|
|
16725
16937
|
for (let n in e.tokenizer) {
|
|
16726
16938
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
16727
16939
|
if ([
|
|
@@ -16738,13 +16950,13 @@ ${e}</tr>
|
|
|
16738
16950
|
n.tokenizer = t;
|
|
16739
16951
|
}
|
|
16740
16952
|
if (e.hooks) {
|
|
16741
|
-
let t = this.defaults.hooks || new
|
|
16953
|
+
let t = this.defaults.hooks || new Wx();
|
|
16742
16954
|
for (let n in e.hooks) {
|
|
16743
16955
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
16744
16956
|
if (["options", "block"].includes(n)) continue;
|
|
16745
16957
|
let r = n, i = e.hooks[r], a = t[r];
|
|
16746
|
-
|
|
16747
|
-
if (this.defaults.async &&
|
|
16958
|
+
Wx.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
16959
|
+
if (this.defaults.async && Wx.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
16748
16960
|
let n = await i.call(t, e);
|
|
16749
16961
|
return a.call(t, n);
|
|
16750
16962
|
})();
|
|
@@ -16781,10 +16993,10 @@ ${e}</tr>
|
|
|
16781
16993
|
}, this;
|
|
16782
16994
|
}
|
|
16783
16995
|
lexer(e, t) {
|
|
16784
|
-
return
|
|
16996
|
+
return Bx.lex(e, t ?? this.defaults);
|
|
16785
16997
|
}
|
|
16786
16998
|
parser(e, t) {
|
|
16787
|
-
return
|
|
16999
|
+
return Ux.parse(e, t ?? this.defaults);
|
|
16788
17000
|
}
|
|
16789
17001
|
parseMarkdown(e) {
|
|
16790
17002
|
return (t, n) => {
|
|
@@ -16796,16 +17008,16 @@ ${e}</tr>
|
|
|
16796
17008
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
16797
17009
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
16798
17010
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
16799
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
17011
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? Bx.lex : Bx.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
16800
17012
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
16801
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
17013
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Ux.parse : Ux.parseInline)(a, i);
|
|
16802
17014
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
16803
17015
|
})().catch(a);
|
|
16804
17016
|
try {
|
|
16805
17017
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
16806
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
17018
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? Bx.lex : Bx.lexInline)(t, i);
|
|
16807
17019
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
16808
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
17020
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? Ux.parse : Ux.parseInline)(n, i);
|
|
16809
17021
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
16810
17022
|
} catch (e) {
|
|
16811
17023
|
return a(e);
|
|
@@ -16815,7 +17027,7 @@ ${e}</tr>
|
|
|
16815
17027
|
onError(e, t) {
|
|
16816
17028
|
return (n) => {
|
|
16817
17029
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
16818
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
17030
|
+
let e = "<p>An error occurred:</p><pre>" + Ax(n.message + "", !0) + "</pre>";
|
|
16819
17031
|
return t ? Promise.resolve(e) : e;
|
|
16820
17032
|
}
|
|
16821
17033
|
if (t) return Promise.reject(n);
|
|
@@ -16823,19 +17035,19 @@ ${e}</tr>
|
|
|
16823
17035
|
};
|
|
16824
17036
|
}
|
|
16825
17037
|
}();
|
|
16826
|
-
function
|
|
16827
|
-
return
|
|
16828
|
-
}
|
|
16829
|
-
|
|
16830
|
-
return
|
|
16831
|
-
},
|
|
16832
|
-
return
|
|
16833
|
-
},
|
|
16834
|
-
return
|
|
16835
|
-
},
|
|
17038
|
+
function Kx(e, t) {
|
|
17039
|
+
return Gx.parse(e, t);
|
|
17040
|
+
}
|
|
17041
|
+
Kx.options = Kx.setOptions = function(e) {
|
|
17042
|
+
return Gx.setOptions(e), Kx.defaults = Gx.defaults, hb(Kx.defaults), Kx;
|
|
17043
|
+
}, Kx.getDefaults = pb, Kx.defaults = mb, Kx.use = function(...e) {
|
|
17044
|
+
return Gx.use(...e), Kx.defaults = Gx.defaults, hb(Kx.defaults), Kx;
|
|
17045
|
+
}, Kx.walkTokens = function(e, t) {
|
|
17046
|
+
return Gx.walkTokens(e, t);
|
|
17047
|
+
}, Kx.parseInline = Gx.parseInline, Kx.Parser = Ux, Kx.parser = Ux.parse, Kx.Renderer = Vx, Kx.TextRenderer = Hx, Kx.Lexer = Bx, Kx.lexer = Bx.lex, Kx.Tokenizer = zx, Kx.Hooks = Wx, Kx.parse = Kx, Kx.options, Kx.setOptions, Kx.use, Kx.walkTokens, Kx.parseInline, Ux.parse, Bx.lex;
|
|
16836
17048
|
//#endregion
|
|
16837
17049
|
//#region node_modules/highlight.js/lib/core.js
|
|
16838
|
-
var
|
|
17050
|
+
var qx = /* @__PURE__ */ h(((e, t) => {
|
|
16839
17051
|
function n(e) {
|
|
16840
17052
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
16841
17053
|
throw Error("map is read-only");
|
|
@@ -17676,7 +17888,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
17676
17888
|
return Object.assign(e, L), e;
|
|
17677
17889
|
}, je = Ae({});
|
|
17678
17890
|
je.newInstance = () => Ae({}), t.exports = je, je.HighlightJS = je, je.default = je;
|
|
17679
|
-
})),
|
|
17891
|
+
})), Jx = /* @__PURE__ */ h(((e, t) => {
|
|
17680
17892
|
function n(e) {
|
|
17681
17893
|
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 = {
|
|
17682
17894
|
className: "symbol",
|
|
@@ -17841,7 +18053,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
17841
18053
|
};
|
|
17842
18054
|
}
|
|
17843
18055
|
t.exports = n;
|
|
17844
|
-
})),
|
|
18056
|
+
})), Yx = /* @__PURE__ */ h(((e, t) => {
|
|
17845
18057
|
function n(e) {
|
|
17846
18058
|
let t = e.regex, n = {}, r = {
|
|
17847
18059
|
begin: /\$\{/,
|
|
@@ -18009,7 +18221,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18009
18221
|
};
|
|
18010
18222
|
}
|
|
18011
18223
|
t.exports = n;
|
|
18012
|
-
})),
|
|
18224
|
+
})), Xx = /* @__PURE__ */ h(((e, t) => {
|
|
18013
18225
|
function n(e) {
|
|
18014
18226
|
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 = {
|
|
18015
18227
|
className: "type",
|
|
@@ -18184,7 +18396,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18184
18396
|
};
|
|
18185
18397
|
}
|
|
18186
18398
|
t.exports = n;
|
|
18187
|
-
})),
|
|
18399
|
+
})), Zx = /* @__PURE__ */ h(((e, t) => {
|
|
18188
18400
|
function n(e) {
|
|
18189
18401
|
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 = {
|
|
18190
18402
|
className: "type",
|
|
@@ -18408,7 +18620,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18408
18620
|
};
|
|
18409
18621
|
}
|
|
18410
18622
|
t.exports = n;
|
|
18411
|
-
})),
|
|
18623
|
+
})), Qx = /* @__PURE__ */ h(((e, t) => {
|
|
18412
18624
|
function n(e) {
|
|
18413
18625
|
let t = [
|
|
18414
18626
|
"bool",
|
|
@@ -18667,7 +18879,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18667
18879
|
};
|
|
18668
18880
|
}
|
|
18669
18881
|
t.exports = n;
|
|
18670
|
-
})),
|
|
18882
|
+
})), $x = /* @__PURE__ */ h(((e, t) => {
|
|
18671
18883
|
var n = (e) => ({
|
|
18672
18884
|
IMPORTANT: {
|
|
18673
18885
|
scope: "meta",
|
|
@@ -18806,7 +19018,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18806
19018
|
};
|
|
18807
19019
|
}
|
|
18808
19020
|
t.exports = u;
|
|
18809
|
-
})),
|
|
19021
|
+
})), eS = /* @__PURE__ */ h(((e, t) => {
|
|
18810
19022
|
function n(e) {
|
|
18811
19023
|
let t = e.regex, n = {
|
|
18812
19024
|
begin: /<\/?[A-Za-z_]/,
|
|
@@ -18986,7 +19198,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
18986
19198
|
};
|
|
18987
19199
|
}
|
|
18988
19200
|
t.exports = n;
|
|
18989
|
-
})),
|
|
19201
|
+
})), tS = /* @__PURE__ */ h(((e, t) => {
|
|
18990
19202
|
function n(e) {
|
|
18991
19203
|
let t = e.regex;
|
|
18992
19204
|
return {
|
|
@@ -19024,7 +19236,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19024
19236
|
};
|
|
19025
19237
|
}
|
|
19026
19238
|
t.exports = n;
|
|
19027
|
-
})),
|
|
19239
|
+
})), nS = /* @__PURE__ */ h(((e, t) => {
|
|
19028
19240
|
function n(e) {
|
|
19029
19241
|
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 = {
|
|
19030
19242
|
"variable.constant": [
|
|
@@ -19285,7 +19497,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19285
19497
|
};
|
|
19286
19498
|
}
|
|
19287
19499
|
t.exports = n;
|
|
19288
|
-
})),
|
|
19500
|
+
})), rS = /* @__PURE__ */ h(((e, t) => {
|
|
19289
19501
|
function n(e) {
|
|
19290
19502
|
let t = {
|
|
19291
19503
|
keyword: [
|
|
@@ -19424,7 +19636,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19424
19636
|
};
|
|
19425
19637
|
}
|
|
19426
19638
|
t.exports = n;
|
|
19427
|
-
})),
|
|
19639
|
+
})), iS = /* @__PURE__ */ h(((e, t) => {
|
|
19428
19640
|
function n(e) {
|
|
19429
19641
|
let t = e.regex;
|
|
19430
19642
|
return {
|
|
@@ -19490,7 +19702,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19490
19702
|
};
|
|
19491
19703
|
}
|
|
19492
19704
|
t.exports = n;
|
|
19493
|
-
})),
|
|
19705
|
+
})), aS = /* @__PURE__ */ h(((e, t) => {
|
|
19494
19706
|
function n(e) {
|
|
19495
19707
|
let t = e.regex, n = {
|
|
19496
19708
|
className: "number",
|
|
@@ -19577,7 +19789,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19577
19789
|
};
|
|
19578
19790
|
}
|
|
19579
19791
|
t.exports = n;
|
|
19580
|
-
})),
|
|
19792
|
+
})), oS = /* @__PURE__ */ h(((e, t) => {
|
|
19581
19793
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
19582
19794
|
className: "number",
|
|
19583
19795
|
variants: [
|
|
@@ -19745,7 +19957,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
19745
19957
|
};
|
|
19746
19958
|
}
|
|
19747
19959
|
t.exports = s;
|
|
19748
|
-
})),
|
|
19960
|
+
})), sS = /* @__PURE__ */ h(((e, t) => {
|
|
19749
19961
|
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 = [
|
|
19750
19962
|
"true",
|
|
19751
19963
|
"false",
|
|
@@ -20180,7 +20392,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20180
20392
|
};
|
|
20181
20393
|
}
|
|
20182
20394
|
t.exports = u;
|
|
20183
|
-
})),
|
|
20395
|
+
})), cS = /* @__PURE__ */ h(((e, t) => {
|
|
20184
20396
|
function n(e) {
|
|
20185
20397
|
let t = {
|
|
20186
20398
|
className: "attr",
|
|
@@ -20215,7 +20427,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20215
20427
|
};
|
|
20216
20428
|
}
|
|
20217
20429
|
t.exports = n;
|
|
20218
|
-
})),
|
|
20430
|
+
})), lS = /* @__PURE__ */ h(((e, t) => {
|
|
20219
20431
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
20220
20432
|
className: "number",
|
|
20221
20433
|
variants: [
|
|
@@ -20415,7 +20627,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20415
20627
|
};
|
|
20416
20628
|
}
|
|
20417
20629
|
t.exports = o;
|
|
20418
|
-
})),
|
|
20630
|
+
})), uS = /* @__PURE__ */ h(((e, t) => {
|
|
20419
20631
|
var n = (e) => ({
|
|
20420
20632
|
IMPORTANT: {
|
|
20421
20633
|
scope: "meta",
|
|
@@ -20606,7 +20818,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20606
20818
|
};
|
|
20607
20819
|
}
|
|
20608
20820
|
t.exports = d;
|
|
20609
|
-
})),
|
|
20821
|
+
})), dS = /* @__PURE__ */ h(((e, t) => {
|
|
20610
20822
|
function n(e) {
|
|
20611
20823
|
let t = "\\[=*\\[", n = "\\]=*\\]", r = {
|
|
20612
20824
|
begin: t,
|
|
@@ -20651,7 +20863,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20651
20863
|
};
|
|
20652
20864
|
}
|
|
20653
20865
|
t.exports = n;
|
|
20654
|
-
})),
|
|
20866
|
+
})), fS = /* @__PURE__ */ h(((e, t) => {
|
|
20655
20867
|
function n(e) {
|
|
20656
20868
|
let t = {
|
|
20657
20869
|
className: "variable",
|
|
@@ -20707,7 +20919,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20707
20919
|
};
|
|
20708
20920
|
}
|
|
20709
20921
|
t.exports = n;
|
|
20710
|
-
})),
|
|
20922
|
+
})), pS = /* @__PURE__ */ h(((e, t) => {
|
|
20711
20923
|
function n(e) {
|
|
20712
20924
|
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 = {
|
|
20713
20925
|
$pattern: /[\w.]+/,
|
|
@@ -20898,7 +21110,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
20898
21110
|
};
|
|
20899
21111
|
}
|
|
20900
21112
|
t.exports = n;
|
|
20901
|
-
})),
|
|
21113
|
+
})), mS = /* @__PURE__ */ h(((e, t) => {
|
|
20902
21114
|
function n(e) {
|
|
20903
21115
|
let t = {
|
|
20904
21116
|
className: "built_in",
|
|
@@ -21014,7 +21226,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21014
21226
|
};
|
|
21015
21227
|
}
|
|
21016
21228
|
t.exports = n;
|
|
21017
|
-
})),
|
|
21229
|
+
})), hS = /* @__PURE__ */ h(((e, t) => {
|
|
21018
21230
|
function n(e) {
|
|
21019
21231
|
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 = {
|
|
21020
21232
|
scope: "variable",
|
|
@@ -21307,7 +21519,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21307
21519
|
};
|
|
21308
21520
|
}
|
|
21309
21521
|
t.exports = n;
|
|
21310
|
-
})),
|
|
21522
|
+
})), gS = /* @__PURE__ */ h(((e, t) => {
|
|
21311
21523
|
function n(e) {
|
|
21312
21524
|
return {
|
|
21313
21525
|
name: "PHP template",
|
|
@@ -21349,7 +21561,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21349
21561
|
};
|
|
21350
21562
|
}
|
|
21351
21563
|
t.exports = n;
|
|
21352
|
-
})),
|
|
21564
|
+
})), _S = /* @__PURE__ */ h(((e, t) => {
|
|
21353
21565
|
function n(e) {
|
|
21354
21566
|
return {
|
|
21355
21567
|
name: "Plain text",
|
|
@@ -21358,7 +21570,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21358
21570
|
};
|
|
21359
21571
|
}
|
|
21360
21572
|
t.exports = n;
|
|
21361
|
-
})),
|
|
21573
|
+
})), vS = /* @__PURE__ */ h(((e, t) => {
|
|
21362
21574
|
function n(e) {
|
|
21363
21575
|
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 = {
|
|
21364
21576
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
@@ -21595,7 +21807,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21595
21807
|
};
|
|
21596
21808
|
}
|
|
21597
21809
|
t.exports = n;
|
|
21598
|
-
})),
|
|
21810
|
+
})), yS = /* @__PURE__ */ h(((e, t) => {
|
|
21599
21811
|
function n(e) {
|
|
21600
21812
|
return {
|
|
21601
21813
|
aliases: ["pycon"],
|
|
@@ -21613,7 +21825,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21613
21825
|
};
|
|
21614
21826
|
}
|
|
21615
21827
|
t.exports = n;
|
|
21616
|
-
})),
|
|
21828
|
+
})), bS = /* @__PURE__ */ h(((e, t) => {
|
|
21617
21829
|
function n(e) {
|
|
21618
21830
|
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(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/);
|
|
21619
21831
|
return {
|
|
@@ -21752,7 +21964,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21752
21964
|
};
|
|
21753
21965
|
}
|
|
21754
21966
|
t.exports = n;
|
|
21755
|
-
})),
|
|
21967
|
+
})), xS = /* @__PURE__ */ h(((e, t) => {
|
|
21756
21968
|
function n(e) {
|
|
21757
21969
|
let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
|
|
21758
21970
|
className: "title.function.invoke",
|
|
@@ -21920,7 +22132,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
21920
22132
|
};
|
|
21921
22133
|
}
|
|
21922
22134
|
t.exports = n;
|
|
21923
|
-
})),
|
|
22135
|
+
})), SS = /* @__PURE__ */ h(((e, t) => {
|
|
21924
22136
|
var n = (e) => ({
|
|
21925
22137
|
IMPORTANT: {
|
|
21926
22138
|
scope: "meta",
|
|
@@ -22069,7 +22281,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
22069
22281
|
};
|
|
22070
22282
|
}
|
|
22071
22283
|
t.exports = u;
|
|
22072
|
-
})),
|
|
22284
|
+
})), CS = /* @__PURE__ */ h(((e, t) => {
|
|
22073
22285
|
function n(e) {
|
|
22074
22286
|
return {
|
|
22075
22287
|
name: "Shell Session",
|
|
@@ -22085,7 +22297,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
22085
22297
|
};
|
|
22086
22298
|
}
|
|
22087
22299
|
t.exports = n;
|
|
22088
|
-
})),
|
|
22300
|
+
})), wS = /* @__PURE__ */ h(((e, t) => {
|
|
22089
22301
|
function n(e) {
|
|
22090
22302
|
let t = e.regex, n = e.COMMENT("--", "$"), r = {
|
|
22091
22303
|
scope: "string",
|
|
@@ -22202,7 +22414,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
22202
22414
|
};
|
|
22203
22415
|
}
|
|
22204
22416
|
t.exports = n;
|
|
22205
|
-
})),
|
|
22417
|
+
})), TS = /* @__PURE__ */ h(((e, t) => {
|
|
22206
22418
|
function n(e) {
|
|
22207
22419
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
22208
22420
|
}
|
|
@@ -22775,7 +22987,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
22775
22987
|
};
|
|
22776
22988
|
}
|
|
22777
22989
|
t.exports = T;
|
|
22778
|
-
})),
|
|
22990
|
+
})), ES = /* @__PURE__ */ h(((e, t) => {
|
|
22779
22991
|
function n(e) {
|
|
22780
22992
|
let t = "true false yes no null", n = {
|
|
22781
22993
|
className: "attr",
|
|
@@ -22918,7 +23130,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
22918
23130
|
};
|
|
22919
23131
|
}
|
|
22920
23132
|
t.exports = n;
|
|
22921
|
-
})),
|
|
23133
|
+
})), DS = /* @__PURE__ */ h(((e, t) => {
|
|
22922
23134
|
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 = [
|
|
22923
23135
|
"true",
|
|
22924
23136
|
"false",
|
|
@@ -23438,7 +23650,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
23438
23650
|
}), a;
|
|
23439
23651
|
}
|
|
23440
23652
|
t.exports = d;
|
|
23441
|
-
})),
|
|
23653
|
+
})), OS = /* @__PURE__ */ h(((e, t) => {
|
|
23442
23654
|
function n(e) {
|
|
23443
23655
|
let t = e.regex, n = {
|
|
23444
23656
|
className: "string",
|
|
@@ -23506,7 +23718,7 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
23506
23718
|
};
|
|
23507
23719
|
}
|
|
23508
23720
|
t.exports = n;
|
|
23509
|
-
})),
|
|
23721
|
+
})), kS = /* @__PURE__ */ h(((e, t) => {
|
|
23510
23722
|
function n(e) {
|
|
23511
23723
|
e.regex;
|
|
23512
23724
|
let t = e.COMMENT(/\(;/, /;\)/);
|
|
@@ -23568,65 +23780,65 @@ var Nx = /* @__PURE__ */ h(((e, t) => {
|
|
|
23568
23780
|
};
|
|
23569
23781
|
}
|
|
23570
23782
|
t.exports = n;
|
|
23571
|
-
})),
|
|
23572
|
-
var n =
|
|
23573
|
-
n.registerLanguage("xml",
|
|
23783
|
+
})), AS = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
|
|
23784
|
+
var n = qx();
|
|
23785
|
+
n.registerLanguage("xml", Jx()), n.registerLanguage("bash", Yx()), n.registerLanguage("c", Xx()), n.registerLanguage("cpp", Zx()), n.registerLanguage("csharp", Qx()), n.registerLanguage("css", $x()), n.registerLanguage("markdown", eS()), n.registerLanguage("diff", tS()), n.registerLanguage("ruby", nS()), n.registerLanguage("go", rS()), n.registerLanguage("graphql", iS()), n.registerLanguage("ini", aS()), n.registerLanguage("java", oS()), n.registerLanguage("javascript", sS()), n.registerLanguage("json", cS()), n.registerLanguage("kotlin", lS()), n.registerLanguage("less", uS()), n.registerLanguage("lua", dS()), n.registerLanguage("makefile", fS()), n.registerLanguage("perl", pS()), n.registerLanguage("objectivec", mS()), n.registerLanguage("php", hS()), n.registerLanguage("php-template", gS()), n.registerLanguage("plaintext", _S()), n.registerLanguage("python", vS()), n.registerLanguage("python-repl", yS()), n.registerLanguage("r", bS()), n.registerLanguage("rust", xS()), n.registerLanguage("scss", SS()), n.registerLanguage("shell", CS()), n.registerLanguage("sql", wS()), n.registerLanguage("swift", TS()), n.registerLanguage("yaml", ES()), n.registerLanguage("typescript", DS()), n.registerLanguage("vbnet", OS()), n.registerLanguage("wasm", kS()), n.HighlightJS = n, n.default = n, t.exports = n;
|
|
23574
23786
|
})))())).default;
|
|
23575
23787
|
//#endregion
|
|
23576
23788
|
//#region src/core/composables/useMarkdown.ts
|
|
23577
|
-
|
|
23789
|
+
Kx.setOptions({
|
|
23578
23790
|
breaks: !0,
|
|
23579
23791
|
gfm: !0
|
|
23580
23792
|
});
|
|
23581
|
-
var
|
|
23582
|
-
|
|
23793
|
+
var jS = 2e4, MS = new Kx.Renderer();
|
|
23794
|
+
MS.code = ({ text: e, lang: t }) => {
|
|
23583
23795
|
let n = (t || "").trim() || "plaintext", r = "";
|
|
23584
|
-
if (e.length > 2e4) r =
|
|
23796
|
+
if (e.length > 2e4) r = PS(e);
|
|
23585
23797
|
else try {
|
|
23586
|
-
r =
|
|
23798
|
+
r = AS.highlight(e, {
|
|
23587
23799
|
language: n,
|
|
23588
23800
|
ignoreIllegals: !0
|
|
23589
23801
|
}).value;
|
|
23590
23802
|
} catch {
|
|
23591
|
-
r =
|
|
23803
|
+
r = PS(e);
|
|
23592
23804
|
}
|
|
23593
|
-
let i = encodeURIComponent(e), a =
|
|
23805
|
+
let i = encodeURIComponent(e), a = NS(n);
|
|
23594
23806
|
return `<pre class="code-block" data-lang="${a}" data-code="${i}"><code class="hljs language-${a}">${r}</code></pre>`;
|
|
23595
23807
|
};
|
|
23596
|
-
function
|
|
23808
|
+
function NS(e) {
|
|
23597
23809
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
23598
23810
|
}
|
|
23599
|
-
function
|
|
23811
|
+
function PS(e) {
|
|
23600
23812
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
23601
23813
|
}
|
|
23602
|
-
var
|
|
23814
|
+
var FS = { ADD_ATTR: [
|
|
23603
23815
|
"data-code",
|
|
23604
23816
|
"data-lang",
|
|
23605
23817
|
"target",
|
|
23606
23818
|
"rel"
|
|
23607
23819
|
] };
|
|
23608
|
-
function
|
|
23609
|
-
return
|
|
23820
|
+
function IS(e) {
|
|
23821
|
+
return Jv.sanitize(e, FS);
|
|
23610
23822
|
}
|
|
23611
|
-
function
|
|
23612
|
-
return
|
|
23823
|
+
function LS(e) {
|
|
23824
|
+
return Kx.parse(e || "", { renderer: MS });
|
|
23613
23825
|
}
|
|
23614
|
-
function
|
|
23615
|
-
return
|
|
23826
|
+
function RS(e) {
|
|
23827
|
+
return IS(LS(e));
|
|
23616
23828
|
}
|
|
23617
|
-
var
|
|
23618
|
-
function
|
|
23619
|
-
let t = /* @__PURE__ */ wn(
|
|
23829
|
+
var zS = 100, BS = 2e3;
|
|
23830
|
+
function VS(e) {
|
|
23831
|
+
let t = /* @__PURE__ */ wn(RS(e())), n = 0, r = null;
|
|
23620
23832
|
function i() {
|
|
23621
|
-
r = null, n = Date.now(), t.value =
|
|
23833
|
+
r = null, n = Date.now(), t.value = RS(e());
|
|
23622
23834
|
}
|
|
23623
23835
|
return ni(e, () => {
|
|
23624
23836
|
let a = e();
|
|
23625
|
-
if (a.length <=
|
|
23626
|
-
r &&= (clearTimeout(r), null), n = Date.now(), t.value =
|
|
23837
|
+
if (a.length <= BS) {
|
|
23838
|
+
r &&= (clearTimeout(r), null), n = Date.now(), t.value = RS(a);
|
|
23627
23839
|
return;
|
|
23628
23840
|
}
|
|
23629
|
-
let o = n +
|
|
23841
|
+
let o = n + zS - Date.now();
|
|
23630
23842
|
o <= 0 ? (r &&= (clearTimeout(r), null), i()) : r ||= setTimeout(i, o);
|
|
23631
23843
|
}), Ze(() => {
|
|
23632
23844
|
r &&= (clearTimeout(r), null);
|
|
@@ -23644,20 +23856,20 @@ function DS(e) {
|
|
|
23644
23856
|
}
|
|
23645
23857
|
//#endregion
|
|
23646
23858
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
23647
|
-
var
|
|
23859
|
+
var HS = { class: "code-preview-modal" }, US = { class: "preview-header" }, WS = { class: "preview-title" }, GS = { class: "preview-tabs" }, KS = ["disabled"], qS = { class: "preview-actions" }, JS = ["title"], YS = {
|
|
23648
23860
|
key: 0,
|
|
23649
23861
|
viewBox: "0 0 16 16",
|
|
23650
23862
|
fill: "none",
|
|
23651
23863
|
"aria-hidden": "true"
|
|
23652
|
-
},
|
|
23864
|
+
}, XS = {
|
|
23653
23865
|
key: 1,
|
|
23654
23866
|
viewBox: "0 0 16 16",
|
|
23655
23867
|
fill: "none",
|
|
23656
23868
|
"aria-hidden": "true"
|
|
23657
|
-
},
|
|
23869
|
+
}, ZS = { class: "preview-body" }, QS = ["srcdoc"], $S = {
|
|
23658
23870
|
key: 1,
|
|
23659
23871
|
class: "preview-source"
|
|
23660
|
-
},
|
|
23872
|
+
}, eC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23661
23873
|
__name: "CodePreview",
|
|
23662
23874
|
props: {
|
|
23663
23875
|
code: {},
|
|
@@ -23716,28 +23928,28 @@ app.mount('#app');
|
|
|
23716
23928
|
return (t, n) => (Y(), X("div", {
|
|
23717
23929
|
class: "code-preview-overlay",
|
|
23718
23930
|
onClick: n[3] ||= yl((e) => r("close"), ["self"])
|
|
23719
|
-
}, [Z("div",
|
|
23720
|
-
Z("span",
|
|
23721
|
-
Z("div",
|
|
23931
|
+
}, [Z("div", HS, [Z("div", US, [
|
|
23932
|
+
Z("span", WS, "代码预览 · " + U(e.lang), 1),
|
|
23933
|
+
Z("div", GS, [Z("button", {
|
|
23722
23934
|
class: H({ active: a.value === "preview" }),
|
|
23723
23935
|
disabled: !s.value,
|
|
23724
23936
|
onClick: n[0] ||= (e) => a.value = "preview"
|
|
23725
|
-
}, "预览", 10,
|
|
23937
|
+
}, "预览", 10, KS), Z("button", {
|
|
23726
23938
|
class: H({ active: a.value === "source" }),
|
|
23727
23939
|
onClick: n[1] ||= (e) => a.value = "source"
|
|
23728
23940
|
}, "源码", 2)]),
|
|
23729
|
-
Z("div",
|
|
23941
|
+
Z("div", qS, [
|
|
23730
23942
|
Z("button", {
|
|
23731
23943
|
class: H(["icon-btn", { done: o.value }]),
|
|
23732
23944
|
title: o.value ? "已复制" : "复制代码",
|
|
23733
23945
|
onClick: u
|
|
23734
|
-
}, [o.value ? (Y(), X("svg",
|
|
23946
|
+
}, [o.value ? (Y(), X("svg", YS, [...n[4] ||= [Z("path", {
|
|
23735
23947
|
d: "M3 8.5l3 3 7-7",
|
|
23736
23948
|
stroke: "currentColor",
|
|
23737
23949
|
"stroke-width": "1.6",
|
|
23738
23950
|
"stroke-linecap": "round",
|
|
23739
23951
|
"stroke-linejoin": "round"
|
|
23740
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
23952
|
+
}, null, -1)]])) : (Y(), X("svg", XS, [...n[5] ||= [Z("rect", {
|
|
23741
23953
|
x: "5.5",
|
|
23742
23954
|
y: "5.5",
|
|
23743
23955
|
width: "8",
|
|
@@ -23749,7 +23961,7 @@ app.mount('#app');
|
|
|
23749
23961
|
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",
|
|
23750
23962
|
stroke: "currentColor",
|
|
23751
23963
|
"stroke-width": "1.3"
|
|
23752
|
-
}, null, -1)]]))], 10,
|
|
23964
|
+
}, null, -1)]]))], 10, JS),
|
|
23753
23965
|
Z("button", {
|
|
23754
23966
|
class: "icon-btn",
|
|
23755
23967
|
title: "新窗口打开",
|
|
@@ -23785,20 +23997,20 @@ app.mount('#app');
|
|
|
23785
23997
|
"stroke-linecap": "round"
|
|
23786
23998
|
})], -1)]])
|
|
23787
23999
|
])
|
|
23788
|
-
]), Z("div",
|
|
24000
|
+
]), Z("div", ZS, [a.value === "preview" && s.value ? (Y(), X("iframe", {
|
|
23789
24001
|
key: 0,
|
|
23790
24002
|
ref_key: "iframeRef",
|
|
23791
24003
|
ref: i,
|
|
23792
24004
|
class: "preview-iframe",
|
|
23793
24005
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
23794
24006
|
srcdoc: c.value
|
|
23795
|
-
}, null, 8,
|
|
24007
|
+
}, null, 8, QS)) : (Y(), X("pre", $S, [Z("code", null, U(e.code), 1)]))])])]));
|
|
23796
24008
|
}
|
|
23797
|
-
}), [["__scopeId", "data-v-bf0ccf96"]]),
|
|
24009
|
+
}), [["__scopeId", "data-v-bf0ccf96"]]), tC = ["innerHTML"], nC = /* @__PURE__ */ Fi({
|
|
23798
24010
|
__name: "MessageContent",
|
|
23799
24011
|
props: { content: {} },
|
|
23800
24012
|
setup(e) {
|
|
23801
|
-
let t = e, { html: n, codeBlocks: r } =
|
|
24013
|
+
let t = e, { html: n, codeBlocks: r } = VS(() => t.content), i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn(null), o = [
|
|
23802
24014
|
"html",
|
|
23803
24015
|
"htm",
|
|
23804
24016
|
"vue",
|
|
@@ -23871,63 +24083,67 @@ app.mount('#app');
|
|
|
23871
24083
|
ref_key: "containerRef",
|
|
23872
24084
|
ref: i,
|
|
23873
24085
|
innerHTML: K(n)
|
|
23874
|
-
}, null, 8,
|
|
24086
|
+
}, null, 8, tC), (Y(), as(_i, { to: "body" }, [a.value ? (Y(), as(eC, {
|
|
23875
24087
|
key: 0,
|
|
23876
24088
|
code: a.value.code,
|
|
23877
24089
|
lang: a.value.lang,
|
|
23878
24090
|
onClose: t[0] ||= (e) => a.value = null
|
|
23879
24091
|
}, null, 8, ["code", "lang"])) : Q("", !0)]))], 64));
|
|
23880
24092
|
}
|
|
23881
|
-
}),
|
|
24093
|
+
}), rC = { class: "typing-text" }, iC = {
|
|
23882
24094
|
key: 0,
|
|
23883
24095
|
class: "stream-cursor"
|
|
23884
|
-
},
|
|
24096
|
+
}, aC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23885
24097
|
__name: "MessageBubble",
|
|
23886
24098
|
props: {
|
|
23887
24099
|
content: {},
|
|
23888
24100
|
role: {},
|
|
23889
24101
|
isPendingAssistant: { type: Boolean },
|
|
23890
24102
|
showTyping: { type: Boolean },
|
|
23891
|
-
showCursor: { type: Boolean }
|
|
24103
|
+
showCursor: { type: Boolean },
|
|
24104
|
+
messages: { default: () => ({ ...y_ }) }
|
|
23892
24105
|
},
|
|
23893
24106
|
setup(e) {
|
|
23894
|
-
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),
|
|
24107
|
+
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), Z("span", rC, U(e.messages.thinking), 1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), as(nC, {
|
|
23895
24108
|
key: 0,
|
|
23896
24109
|
content: e.content
|
|
23897
|
-
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span",
|
|
24110
|
+
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", iC)) : Q("", !0)], 64));
|
|
23898
24111
|
}
|
|
23899
|
-
}), [["__scopeId", "data-v-
|
|
24112
|
+
}), [["__scopeId", "data-v-58bcf5c9"]]), oC = { class: "message-time" }, sC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23900
24113
|
__name: "MessageTime",
|
|
23901
24114
|
props: { time: {} },
|
|
23902
24115
|
setup(e) {
|
|
23903
|
-
return (t, n) => (Y(), X("div",
|
|
24116
|
+
return (t, n) => (Y(), X("div", oC, U(e.time), 1));
|
|
23904
24117
|
}
|
|
23905
|
-
}), [["__scopeId", "data-v-4a976e4a"]]),
|
|
24118
|
+
}), [["__scopeId", "data-v-4a976e4a"]]), cC = { class: "msg-actions" }, lC = ["title"], uC = {
|
|
23906
24119
|
key: 0,
|
|
23907
24120
|
viewBox: "0 0 16 16",
|
|
23908
24121
|
fill: "none",
|
|
23909
24122
|
"aria-hidden": "true"
|
|
23910
|
-
},
|
|
24123
|
+
}, dC = {
|
|
23911
24124
|
key: 1,
|
|
23912
24125
|
viewBox: "0 0 16 16",
|
|
23913
24126
|
fill: "none",
|
|
23914
24127
|
"aria-hidden": "true"
|
|
23915
|
-
},
|
|
24128
|
+
}, fC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23916
24129
|
__name: "MessageActions",
|
|
23917
|
-
props: {
|
|
24130
|
+
props: {
|
|
24131
|
+
copied: { type: Boolean },
|
|
24132
|
+
messages: { default: () => ({ ...y_ }) }
|
|
24133
|
+
},
|
|
23918
24134
|
emits: ["copy", "regenerate"],
|
|
23919
24135
|
setup(e) {
|
|
23920
|
-
return (t, n) => (Y(), X("div",
|
|
24136
|
+
return (t, n) => (Y(), X("div", cC, [Z("button", {
|
|
23921
24137
|
class: H(["msg-action-btn", { done: e.copied }]),
|
|
23922
|
-
title: e.copied ?
|
|
24138
|
+
title: e.copied ? e.messages.copied : e.messages.copy,
|
|
23923
24139
|
onClick: n[0] ||= (e) => t.$emit("copy")
|
|
23924
|
-
}, [e.copied ? (Y(), X("svg",
|
|
24140
|
+
}, [e.copied ? (Y(), X("svg", uC, [...n[2] ||= [Z("path", {
|
|
23925
24141
|
d: "M3 8.5l3 3 7-7",
|
|
23926
24142
|
stroke: "currentColor",
|
|
23927
24143
|
"stroke-width": "1.6",
|
|
23928
24144
|
"stroke-linecap": "round",
|
|
23929
24145
|
"stroke-linejoin": "round"
|
|
23930
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
24146
|
+
}, null, -1)]])) : (Y(), X("svg", dC, [...n[3] ||= [Z("rect", {
|
|
23931
24147
|
x: "5.5",
|
|
23932
24148
|
y: "5.5",
|
|
23933
24149
|
width: "8",
|
|
@@ -23939,11 +24155,10 @@ app.mount('#app');
|
|
|
23939
24155
|
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",
|
|
23940
24156
|
stroke: "currentColor",
|
|
23941
24157
|
"stroke-width": "1.3"
|
|
23942
|
-
}, null, -1)]])), Z("span", null, U(e.copied ?
|
|
24158
|
+
}, null, -1)]])), Z("span", null, U(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, lC), Z("button", {
|
|
23943
24159
|
class: "msg-action-btn",
|
|
23944
|
-
title: "重新生成",
|
|
23945
24160
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
23946
|
-
}, [
|
|
24161
|
+
}, [n[4] ||= Z("svg", {
|
|
23947
24162
|
viewBox: "0 0 16 16",
|
|
23948
24163
|
fill: "none",
|
|
23949
24164
|
"aria-hidden": "true"
|
|
@@ -23958,40 +24173,40 @@ app.mount('#app');
|
|
|
23958
24173
|
"stroke-width": "1.3",
|
|
23959
24174
|
"stroke-linecap": "round",
|
|
23960
24175
|
"stroke-linejoin": "round"
|
|
23961
|
-
})], -1), Z("span", null,
|
|
24176
|
+
})], -1), Z("span", null, U(e.messages.regenerate), 1)])]));
|
|
23962
24177
|
}
|
|
23963
|
-
}), [["__scopeId", "data-v-
|
|
24178
|
+
}), [["__scopeId", "data-v-dc051a49"]]), pC = {
|
|
23964
24179
|
key: 1,
|
|
23965
24180
|
class: "avatar-icon",
|
|
23966
24181
|
viewBox: "0 0 1024 1024",
|
|
23967
24182
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23968
24183
|
"aria-hidden": "true"
|
|
23969
|
-
},
|
|
24184
|
+
}, mC = {
|
|
23970
24185
|
key: 2,
|
|
23971
24186
|
class: "avatar-icon",
|
|
23972
24187
|
viewBox: "0 0 1024 1024",
|
|
23973
24188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23974
24189
|
"aria-hidden": "true"
|
|
23975
|
-
},
|
|
24190
|
+
}, hC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23976
24191
|
__name: "AvatarIcon",
|
|
23977
24192
|
props: {
|
|
23978
24193
|
role: {},
|
|
23979
24194
|
glyph: {}
|
|
23980
24195
|
},
|
|
23981
24196
|
setup(e) {
|
|
23982
|
-
return (t, n) => e.glyph ? (Y(), as(
|
|
24197
|
+
return (t, n) => e.glyph ? (Y(), as(ry, {
|
|
23983
24198
|
key: 0,
|
|
23984
24199
|
icon: e.glyph,
|
|
23985
24200
|
class: "avatar-glyph"
|
|
23986
|
-
}, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg",
|
|
24201
|
+
}, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg", pC, [...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", mC, [...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)]]));
|
|
23987
24202
|
}
|
|
23988
|
-
}), [["__scopeId", "data-v-a0b508ea"]]),
|
|
24203
|
+
}), [["__scopeId", "data-v-a0b508ea"]]), gC = ["data-msg-idx"], _C = {
|
|
23989
24204
|
key: 0,
|
|
23990
24205
|
class: "message-avatar"
|
|
23991
|
-
},
|
|
24206
|
+
}, vC = { class: "message-content" }, yC = {
|
|
23992
24207
|
key: 2,
|
|
23993
24208
|
class: "msg-focuses"
|
|
23994
|
-
},
|
|
24209
|
+
}, bC = ["title", "onClick"], xC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
23995
24210
|
__name: "MessageRow",
|
|
23996
24211
|
props: {
|
|
23997
24212
|
message: {},
|
|
@@ -24011,76 +24226,84 @@ app.mount('#app');
|
|
|
24011
24226
|
"regenerate"
|
|
24012
24227
|
],
|
|
24013
24228
|
setup(e) {
|
|
24014
|
-
let t = e, n =
|
|
24229
|
+
let t = e, n = T_(), 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);
|
|
24015
24230
|
return (t, c) => (Y(), X("div", {
|
|
24016
24231
|
class: H(["message-row", e.message.role]),
|
|
24017
24232
|
"data-msg-idx": e.index
|
|
24018
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
24233
|
+
}, [e.showAvatar ? (Y(), X("div", _C, [fs(hC, {
|
|
24019
24234
|
role: e.message.role,
|
|
24020
24235
|
glyph: e.message.role === "user" ? K(n).icons.userAvatar : K(n).icons.assistantAvatar
|
|
24021
|
-
}, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div",
|
|
24022
|
-
r.value ? (Y(), as(
|
|
24236
|
+
}, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div", vC, [
|
|
24237
|
+
r.value ? (Y(), as(Iy, {
|
|
24023
24238
|
key: 0,
|
|
24024
24239
|
text: i.value,
|
|
24025
24240
|
expanded: e.reasoningExpanded,
|
|
24026
24241
|
onToggle: c[0] ||= (e) => t.$emit("toggle-reasoning")
|
|
24027
24242
|
}, null, 8, ["text", "expanded"])) : Q("", !0),
|
|
24028
|
-
r.value ? (Y(), as(
|
|
24243
|
+
r.value ? (Y(), as(fb, {
|
|
24029
24244
|
key: 1,
|
|
24030
24245
|
steps: a.value,
|
|
24031
|
-
icons: K(n).icons
|
|
24032
|
-
|
|
24033
|
-
|
|
24246
|
+
icons: K(n).icons,
|
|
24247
|
+
messages: K(n).messages
|
|
24248
|
+
}, null, 8, [
|
|
24249
|
+
"steps",
|
|
24250
|
+
"icons",
|
|
24251
|
+
"messages"
|
|
24252
|
+
])) : Q("", !0),
|
|
24253
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", yC, [(Y(!0), X(J, null, sa(e.message.focuses, (e) => (Y(), X("span", {
|
|
24034
24254
|
key: e.path,
|
|
24035
24255
|
class: "msg-focus-chip",
|
|
24036
|
-
title:
|
|
24256
|
+
title: K(n).messages.historyFocusChipTitlePrefix + e.path,
|
|
24037
24257
|
onClick: (t) => K(n).focusChipClick(e)
|
|
24038
|
-
}, [fs(
|
|
24039
|
-
fs(
|
|
24258
|
+
}, [fs(ry, { icon: K(n).icons.focus }, null, 8, ["icon"]), _s(" " + U(e.path), 1)], 8, bC))), 128))])) : Q("", !0),
|
|
24259
|
+
fs(aC, {
|
|
24260
|
+
messages: K(n).messages,
|
|
24040
24261
|
content: e.message.content,
|
|
24041
24262
|
role: e.message.role,
|
|
24042
24263
|
"is-pending-assistant": e.isPendingAssistant,
|
|
24043
24264
|
"show-typing": e.showTyping,
|
|
24044
24265
|
"show-cursor": s.value
|
|
24045
24266
|
}, null, 8, [
|
|
24267
|
+
"messages",
|
|
24046
24268
|
"content",
|
|
24047
24269
|
"role",
|
|
24048
24270
|
"is-pending-assistant",
|
|
24049
24271
|
"show-typing",
|
|
24050
24272
|
"show-cursor"
|
|
24051
24273
|
]),
|
|
24052
|
-
fs(
|
|
24053
|
-
o.value ? (Y(), as(
|
|
24274
|
+
fs(sC, { time: e.time }, null, 8, ["time"]),
|
|
24275
|
+
o.value ? (Y(), as(fC, {
|
|
24054
24276
|
key: 3,
|
|
24277
|
+
messages: K(n).messages,
|
|
24055
24278
|
copied: e.copied,
|
|
24056
24279
|
onCopy: c[1] ||= (e) => t.$emit("copy"),
|
|
24057
24280
|
onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
|
|
24058
|
-
}, null, 8, ["copied"])) : Q("", !0)
|
|
24059
|
-
])], 10,
|
|
24281
|
+
}, null, 8, ["messages", "copied"])) : Q("", !0)
|
|
24282
|
+
])], 10, gC));
|
|
24060
24283
|
}
|
|
24061
|
-
}), [["__scopeId", "data-v-
|
|
24284
|
+
}), [["__scopeId", "data-v-18d4a5dd"]]), SC = { class: "chat-body" }, CC = {
|
|
24062
24285
|
key: 0,
|
|
24063
24286
|
class: "empty-state"
|
|
24064
|
-
},
|
|
24287
|
+
}, wC = { class: "empty-icon" }, TC = {
|
|
24065
24288
|
key: 1,
|
|
24066
24289
|
class: "message-row assistant"
|
|
24067
|
-
},
|
|
24290
|
+
}, EC = {
|
|
24068
24291
|
key: 0,
|
|
24069
24292
|
class: "message-avatar"
|
|
24070
|
-
},
|
|
24293
|
+
}, DC = { class: "message-content" }, OC = {
|
|
24071
24294
|
key: 2,
|
|
24072
24295
|
class: "error-bar"
|
|
24073
|
-
},
|
|
24296
|
+
}, kC = { class: "error-text" }, AC = ["title"], jC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24074
24297
|
__name: "MessageList",
|
|
24075
24298
|
props: {
|
|
24076
24299
|
showAvatar: { type: Boolean },
|
|
24077
24300
|
showTyping: { type: Boolean }
|
|
24078
24301
|
},
|
|
24079
24302
|
setup(e) {
|
|
24080
|
-
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u } =
|
|
24081
|
-
return (t,
|
|
24082
|
-
|
|
24083
|
-
(Y(!0), X(J, null, sa(K(
|
|
24303
|
+
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u, messages: d } = T_(), { state: f, retry: p, regenerate: m } = t, h = Qs(() => f.messages.length > 0), g = Qs(() => f.messages.some((e) => e.role === "user")), _ = Qs(() => f.messages[f.messages.length - 1]?.role === "assistant");
|
|
24304
|
+
return (t, v) => (Y(), X("div", SC, [
|
|
24305
|
+
h.value ? Q("", !0) : (Y(), X("div", CC, [Z("div", wC, [fs(ry, { icon: K(u).empty }, null, 8, ["icon"])]), Z("p", null, U(K(d).emptyGreeting), 1)])),
|
|
24306
|
+
(Y(!0), X(J, null, sa(K(f).messages, (t, c) => (Y(), as(xC, {
|
|
24084
24307
|
key: c,
|
|
24085
24308
|
message: t,
|
|
24086
24309
|
index: c,
|
|
@@ -24089,12 +24312,12 @@ app.mount('#app');
|
|
|
24089
24312
|
"is-pending-assistant": K(a)(c),
|
|
24090
24313
|
"reasoning-expanded": K(o)(c),
|
|
24091
24314
|
copied: K(r),
|
|
24092
|
-
"is-last": c === K(
|
|
24093
|
-
loading: K(
|
|
24315
|
+
"is-last": c === K(f).messages.length - 1,
|
|
24316
|
+
loading: K(f).loading,
|
|
24094
24317
|
time: K(n)(t.timestamp),
|
|
24095
24318
|
onToggleReasoning: (e) => K(s)(c),
|
|
24096
24319
|
onCopy: (e) => K(i)(t.content),
|
|
24097
|
-
onRegenerate: K(
|
|
24320
|
+
onRegenerate: K(m)
|
|
24098
24321
|
}, null, 8, [
|
|
24099
24322
|
"message",
|
|
24100
24323
|
"index",
|
|
@@ -24110,149 +24333,151 @@ app.mount('#app');
|
|
|
24110
24333
|
"onCopy",
|
|
24111
24334
|
"onRegenerate"
|
|
24112
24335
|
]))), 128)),
|
|
24113
|
-
K(
|
|
24336
|
+
K(f).loading && !_.value ? (Y(), X("div", TC, [e.showAvatar ? (Y(), X("div", EC, [fs(hC, {
|
|
24114
24337
|
role: "assistant",
|
|
24115
24338
|
glyph: K(u).assistantAvatar
|
|
24116
|
-
}, null, 8, ["glyph"])])) : Q("", !0), Z("div",
|
|
24339
|
+
}, null, 8, ["glyph"])])) : Q("", !0), Z("div", DC, [fs(aC, {
|
|
24117
24340
|
content: "",
|
|
24118
24341
|
role: "assistant",
|
|
24119
24342
|
"is-pending-assistant": !0,
|
|
24120
24343
|
"show-typing": e.showTyping,
|
|
24121
|
-
"show-cursor": !1
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24344
|
+
"show-cursor": !1,
|
|
24345
|
+
messages: K(d)
|
|
24346
|
+
}, null, 8, ["show-typing", "messages"])])])) : Q("", !0),
|
|
24347
|
+
K(f).error ? (Y(), X("div", OC, [
|
|
24348
|
+
Z("span", kC, U(K(f).error), 1),
|
|
24349
|
+
g.value ? (Y(), X("button", {
|
|
24126
24350
|
key: 0,
|
|
24127
24351
|
class: "retry-btn",
|
|
24128
|
-
onClick:
|
|
24129
|
-
},
|
|
24352
|
+
onClick: v[0] ||= (...e) => K(p) && K(p)(...e)
|
|
24353
|
+
}, U(K(d).retry), 1)) : Q("", !0),
|
|
24130
24354
|
K(c) ? (Y(), X("button", {
|
|
24131
24355
|
key: 1,
|
|
24132
24356
|
class: "undo-btn",
|
|
24133
|
-
title:
|
|
24134
|
-
onClick:
|
|
24135
|
-
},
|
|
24357
|
+
title: K(d).undoTitle,
|
|
24358
|
+
onClick: v[1] ||= (...e) => K(l) && K(l)(...e)
|
|
24359
|
+
}, U(K(d).undo), 9, AC)) : Q("", !0)
|
|
24136
24360
|
])) : Q("", !0)
|
|
24137
24361
|
]));
|
|
24138
24362
|
}
|
|
24139
|
-
}), [["__scopeId", "data-v-
|
|
24363
|
+
}), [["__scopeId", "data-v-f293c6ab"]]), MC = {
|
|
24140
24364
|
key: 0,
|
|
24141
24365
|
class: "queued-bar"
|
|
24142
|
-
},
|
|
24366
|
+
}, NC = { class: "queued-head" }, PC = { class: "queued-icon" }, FC = { class: "queued-title" }, IC = { class: "queued-count" }, LC = { class: "queued-idx" }, RC = { class: "queued-text" }, zC = ["title", "onClick"], BC = ["title", "onClick"], VC = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24143
24367
|
__name: "QueuedBar",
|
|
24144
24368
|
setup(e) {
|
|
24145
|
-
let { chat: t, editQueued: n, icons: r } =
|
|
24146
|
-
return (e, t) => K(
|
|
24147
|
-
Z("span",
|
|
24148
|
-
|
|
24149
|
-
Z("span",
|
|
24150
|
-
]), (Y(!0), X(J, null, sa(K(
|
|
24369
|
+
let { chat: t, editQueued: n, icons: r, messages: i } = T_(), { queuedTasks: a, removeQueuedTask: o } = t;
|
|
24370
|
+
return (e, t) => K(a).length ? (Y(), X("div", MC, [Z("div", NC, [
|
|
24371
|
+
Z("span", PC, [fs(ry, { icon: K(r).queued }, null, 8, ["icon"])]),
|
|
24372
|
+
Z("span", FC, U(K(i).queuedTitle), 1),
|
|
24373
|
+
Z("span", IC, U(K(a).length), 1)
|
|
24374
|
+
]), (Y(!0), X(J, null, sa(K(a), (e, t) => (Y(), X("div", {
|
|
24151
24375
|
key: t,
|
|
24152
24376
|
class: "queued-item"
|
|
24153
24377
|
}, [
|
|
24154
|
-
Z("span",
|
|
24155
|
-
Z("span",
|
|
24378
|
+
Z("span", LC, U(t + 1), 1),
|
|
24379
|
+
Z("span", RC, U(e), 1),
|
|
24156
24380
|
Z("button", {
|
|
24157
24381
|
class: "queued-act",
|
|
24158
|
-
title:
|
|
24382
|
+
title: K(i).queuedEditTitle,
|
|
24159
24383
|
onClick: (e) => K(n)(t)
|
|
24160
|
-
}, [fs(
|
|
24384
|
+
}, [fs(ry, { icon: K(r).queuedEdit }, null, 8, ["icon"])], 8, zC),
|
|
24161
24385
|
Z("button", {
|
|
24162
24386
|
class: "queued-act queued-del",
|
|
24163
|
-
title:
|
|
24164
|
-
onClick: (e) => K(
|
|
24165
|
-
}, "✕", 8,
|
|
24387
|
+
title: K(i).removeQueuedTitle,
|
|
24388
|
+
onClick: (e) => K(o)(t)
|
|
24389
|
+
}, "✕", 8, BC)
|
|
24166
24390
|
]))), 128))])) : Q("", !0);
|
|
24167
24391
|
}
|
|
24168
|
-
}), [["__scopeId", "data-v-
|
|
24392
|
+
}), [["__scopeId", "data-v-7b61eb04"]]), HC = {
|
|
24169
24393
|
key: 0,
|
|
24170
24394
|
class: "approval-bar"
|
|
24171
|
-
},
|
|
24395
|
+
}, UC = { class: "approval-head" }, WC = { class: "approval-title" }, GC = {
|
|
24172
24396
|
key: 0,
|
|
24173
24397
|
class: "approval-question"
|
|
24174
|
-
},
|
|
24398
|
+
}, KC = {
|
|
24175
24399
|
key: 1,
|
|
24176
24400
|
class: "approval-context"
|
|
24177
|
-
},
|
|
24401
|
+
}, qC = {
|
|
24178
24402
|
key: 2,
|
|
24179
24403
|
class: "approval-recommend"
|
|
24180
|
-
},
|
|
24404
|
+
}, JC = {
|
|
24181
24405
|
key: 3,
|
|
24182
24406
|
class: "approval-options"
|
|
24183
|
-
},
|
|
24407
|
+
}, YC = ["onClick"], XC = { class: "approval-actions" }, ZC = { class: "approval-head" }, QC = { class: "approval-title" }, $C = {
|
|
24184
24408
|
key: 0,
|
|
24185
24409
|
class: "approval-args"
|
|
24186
|
-
},
|
|
24410
|
+
}, ew = { class: "approval-actions" }, tw = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24187
24411
|
__name: "ApprovalBar",
|
|
24188
24412
|
setup(e) {
|
|
24189
|
-
let t =
|
|
24413
|
+
let t = T_(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = /* @__PURE__ */ Cn(!1);
|
|
24190
24414
|
ni(n, () => {
|
|
24191
|
-
|
|
24415
|
+
a.value = !1;
|
|
24192
24416
|
});
|
|
24193
|
-
let
|
|
24417
|
+
let o = Qs(() => n.value?.toolName === "request_human_confirmation"), s = Qs(() => {
|
|
24194
24418
|
let e = n.value?.args?.options;
|
|
24195
24419
|
return Array.isArray(e) ? e.map(String) : [];
|
|
24196
|
-
}),
|
|
24420
|
+
}), c = Qs(() => {
|
|
24197
24421
|
let e = n.value?.args;
|
|
24198
24422
|
if (e == null) return "";
|
|
24199
24423
|
try {
|
|
24200
24424
|
let t = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
24201
|
-
return t.length > 400 ? t.slice(0, 400) +
|
|
24425
|
+
return t.length > 400 ? t.slice(0, 400) + i.argsTruncatedSuffix : t;
|
|
24202
24426
|
} catch {
|
|
24203
24427
|
return String(e);
|
|
24204
24428
|
}
|
|
24205
24429
|
});
|
|
24206
|
-
return (e,
|
|
24207
|
-
|
|
24208
|
-
K(n).args?.question ? (Y(), X("div",
|
|
24209
|
-
K(n).args?.context ? (Y(), X("div",
|
|
24210
|
-
K(n).args?.recommendation ? (Y(), X("div",
|
|
24211
|
-
|
|
24430
|
+
return (e, l) => K(n) ? (Y(), X("div", HC, [o.value ? (Y(), X(J, { key: 0 }, [
|
|
24431
|
+
Z("div", UC, [l[5] ||= Z("span", { class: "approval-icon" }, "❓", -1), Z("span", WC, U(K(i).humanConfirmTitle), 1)]),
|
|
24432
|
+
K(n).args?.question ? (Y(), X("div", GC, U(K(n).args.question), 1)) : Q("", !0),
|
|
24433
|
+
K(n).args?.context ? (Y(), X("div", KC, U(K(n).args.context), 1)) : Q("", !0),
|
|
24434
|
+
K(n).args?.recommendation ? (Y(), X("div", qC, [fs(ry, { icon: K(t).icons.recommend }, null, 8, ["icon"]), _s(U(K(i).recommendPrefix) + U(K(n).args.recommendation), 1)])) : Q("", !0),
|
|
24435
|
+
s.value.length ? (Y(), X("div", JC, [(Y(!0), X(J, null, sa(s.value, (e) => (Y(), X("button", {
|
|
24212
24436
|
key: e,
|
|
24213
24437
|
class: "approval-opt",
|
|
24214
24438
|
onClick: (t) => K(r)(e)
|
|
24215
|
-
}, U(e), 9,
|
|
24216
|
-
Z("div",
|
|
24439
|
+
}, U(e), 9, YC))), 128))])) : Q("", !0),
|
|
24440
|
+
Z("div", XC, [Z("button", {
|
|
24217
24441
|
class: "approval-deny",
|
|
24218
|
-
onClick:
|
|
24219
|
-
},
|
|
24442
|
+
onClick: l[0] ||= (e) => K(r)(!1)
|
|
24443
|
+
}, U(K(i).deny), 1), s.value.length ? Q("", !0) : (Y(), X("button", {
|
|
24220
24444
|
key: 0,
|
|
24221
24445
|
class: "approval-allow",
|
|
24222
|
-
onClick:
|
|
24223
|
-
},
|
|
24446
|
+
onClick: l[1] ||= (e) => K(r)(!0)
|
|
24447
|
+
}, U(K(i).approve), 1))])
|
|
24224
24448
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
24225
|
-
Z("div",
|
|
24226
|
-
|
|
24227
|
-
Z("span",
|
|
24228
|
-
|
|
24449
|
+
Z("div", ZC, [
|
|
24450
|
+
l[6] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
24451
|
+
Z("span", QC, [_s(U(K(i).toolConfirmPrefix), 1), Z("code", null, U(K(n).toolName), 1)]),
|
|
24452
|
+
c.value ? (Y(), X("button", {
|
|
24229
24453
|
key: 0,
|
|
24230
24454
|
class: "approval-toggle",
|
|
24231
|
-
onClick:
|
|
24232
|
-
}, U(
|
|
24455
|
+
onClick: l[2] ||= (e) => a.value = !a.value
|
|
24456
|
+
}, U(a.value ? K(i).collapseArgs : K(i).viewArgs) + U(a.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
24233
24457
|
]),
|
|
24234
|
-
|
|
24235
|
-
Z("div",
|
|
24458
|
+
c.value && a.value ? (Y(), X("pre", $C, U(c.value), 1)) : Q("", !0),
|
|
24459
|
+
Z("div", ew, [Z("button", {
|
|
24236
24460
|
class: "approval-deny",
|
|
24237
|
-
onClick:
|
|
24238
|
-
},
|
|
24461
|
+
onClick: l[3] ||= (e) => K(r)(!1)
|
|
24462
|
+
}, U(K(i).deny), 1), Z("button", {
|
|
24239
24463
|
class: "approval-allow",
|
|
24240
|
-
onClick:
|
|
24241
|
-
},
|
|
24464
|
+
onClick: l[4] ||= (e) => K(r)(!0)
|
|
24465
|
+
}, U(K(i).approve), 1)])
|
|
24242
24466
|
], 64))])) : Q("", !0);
|
|
24243
24467
|
}
|
|
24244
|
-
}), [["__scopeId", "data-v-
|
|
24468
|
+
}), [["__scopeId", "data-v-b7a72fd2"]]), nw = {
|
|
24245
24469
|
key: 0,
|
|
24246
24470
|
class: "conflict-bar"
|
|
24247
|
-
},
|
|
24471
|
+
}, rw = { class: "conflict-head" }, iw = { class: "conflict-icon" }, aw = { class: "conflict-title" }, ow = { class: "conflict-detail" }, sw = {
|
|
24248
24472
|
key: 0,
|
|
24249
24473
|
class: "conflict-diff"
|
|
24250
|
-
},
|
|
24474
|
+
}, cw = { class: "conflict-diff-col" }, lw = { class: "conflict-diff-label" }, uw = { class: "conflict-diff-pre" }, dw = { class: "conflict-diff-col" }, fw = { class: "conflict-diff-label" }, pw = { class: "conflict-diff-pre" }, mw = { class: "conflict-actions" }, hw = ["title"], gw = ["title"], _w = ["title"], vw = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24251
24475
|
__name: "ConflictBar",
|
|
24252
24476
|
props: {
|
|
24253
24477
|
pendingConflict: {},
|
|
24254
24478
|
onResolve: {},
|
|
24255
|
-
icons: { default: () => ({ ...__ }) }
|
|
24479
|
+
icons: { default: () => ({ ...__ }) },
|
|
24480
|
+
messages: { default: () => ({ ...y_ }) }
|
|
24256
24481
|
},
|
|
24257
24482
|
setup(e) {
|
|
24258
24483
|
let t = e, n = /* @__PURE__ */ Cn(!1);
|
|
@@ -24263,8 +24488,8 @@ app.mount('#app');
|
|
|
24263
24488
|
let e = t.pendingConflict?.agentValue;
|
|
24264
24489
|
if (e === void 0) return "";
|
|
24265
24490
|
try {
|
|
24266
|
-
let
|
|
24267
|
-
return
|
|
24491
|
+
let n = JSON.stringify(e, null, 2);
|
|
24492
|
+
return n.length > 400 ? n.slice(0, 400) + t.messages.argsTruncatedSuffix : n;
|
|
24268
24493
|
} catch {
|
|
24269
24494
|
return String(e);
|
|
24270
24495
|
}
|
|
@@ -24272,300 +24497,303 @@ app.mount('#app');
|
|
|
24272
24497
|
let e = t.pendingConflict?.currentValue;
|
|
24273
24498
|
if (e == null) return "";
|
|
24274
24499
|
try {
|
|
24275
|
-
let
|
|
24276
|
-
return
|
|
24500
|
+
let n = JSON.stringify(e, null, 2);
|
|
24501
|
+
return n.length > 400 ? n.slice(0, 400) + t.messages.argsTruncatedSuffix : n;
|
|
24277
24502
|
} catch {
|
|
24278
24503
|
return String(e);
|
|
24279
24504
|
}
|
|
24280
24505
|
});
|
|
24281
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
24282
|
-
Z("div",
|
|
24283
|
-
|
|
24506
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", nw, [
|
|
24507
|
+
Z("div", rw, [Z("span", iw, [fs(ry, { icon: e.icons.conflict }, null, 8, ["icon"])]), Z("span", aw, [
|
|
24508
|
+
_s(U(e.messages.conflictTitlePrefix), 1),
|
|
24284
24509
|
Z("code", null, U(e.pendingConflict.path), 1),
|
|
24285
|
-
|
|
24510
|
+
_s(U(e.messages.conflictTitleSuffix), 1)
|
|
24286
24511
|
])]),
|
|
24287
|
-
Z("div",
|
|
24512
|
+
Z("div", ow, U(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
|
|
24288
24513
|
Z("button", {
|
|
24289
24514
|
class: "conflict-toggle",
|
|
24290
24515
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
24291
|
-
}, U(n.value ?
|
|
24292
|
-
n.value ? (Y(), X("div",
|
|
24293
|
-
Z("div",
|
|
24516
|
+
}, U(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + U(n.value ? " ▴" : " ▾"), 1),
|
|
24517
|
+
n.value ? (Y(), X("div", sw, [Z("div", cw, [Z("div", lw, U(e.messages.agentValueLabel), 1), Z("pre", uw, U(r.value || e.messages.deleteNoValue), 1)]), Z("div", dw, [Z("div", fw, U(e.messages.currentValueLabel), 1), Z("pre", pw, U(i.value), 1)])])) : Q("", !0),
|
|
24518
|
+
Z("div", mw, [
|
|
24294
24519
|
Z("button", {
|
|
24295
24520
|
class: "conflict-keep",
|
|
24296
24521
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
24297
|
-
title:
|
|
24298
|
-
},
|
|
24522
|
+
title: e.messages.keepExternalTitle
|
|
24523
|
+
}, U(e.messages.keepExternal), 9, hw),
|
|
24299
24524
|
Z("button", {
|
|
24300
24525
|
class: "conflict-overwrite",
|
|
24301
24526
|
onClick: a[2] ||= (t) => e.onResolve?.("overwrite"),
|
|
24302
|
-
title:
|
|
24303
|
-
},
|
|
24527
|
+
title: e.messages.overwriteTitle
|
|
24528
|
+
}, U(e.messages.overwrite), 9, gw),
|
|
24304
24529
|
Z("button", {
|
|
24305
24530
|
class: "conflict-restore",
|
|
24306
24531
|
onClick: a[3] ||= (t) => e.onResolve?.("restore"),
|
|
24307
|
-
title:
|
|
24308
|
-
},
|
|
24532
|
+
title: e.messages.restoreTitle
|
|
24533
|
+
}, U(e.messages.restore), 9, _w)
|
|
24309
24534
|
])
|
|
24310
24535
|
])) : Q("", !0);
|
|
24311
24536
|
}
|
|
24312
|
-
}), [["__scopeId", "data-v-
|
|
24537
|
+
}), [["__scopeId", "data-v-9796837c"]]), yw = { class: "chat-footer" }, bw = ["title"], xw = { class: "chat-input-wrap" }, Sw = {
|
|
24313
24538
|
key: 0,
|
|
24314
24539
|
class: "focus-chips"
|
|
24315
|
-
},
|
|
24540
|
+
}, Cw = ["title", "onClick"], ww = { class: "focus-chip-icon" }, Tw = { class: "focus-chip-path" }, Ew = ["onClick"], Dw = ["placeholder", "rows"], Ow = { class: "input-actions" }, kw = { class: "send-hint" }, Aw = ["disabled", "title"], jw = {
|
|
24316
24541
|
key: 0,
|
|
24317
24542
|
width: "16",
|
|
24318
24543
|
height: "16",
|
|
24319
24544
|
viewBox: "0 0 24 24",
|
|
24320
24545
|
fill: "currentColor"
|
|
24321
|
-
},
|
|
24322
|
-
key:
|
|
24546
|
+
}, Mw = {
|
|
24547
|
+
key: 2,
|
|
24323
24548
|
width: "18",
|
|
24324
24549
|
height: "18",
|
|
24325
24550
|
viewBox: "0 0 24 24",
|
|
24326
24551
|
fill: "none",
|
|
24327
24552
|
stroke: "currentColor",
|
|
24328
24553
|
"stroke-width": "2"
|
|
24329
|
-
},
|
|
24554
|
+
}, Nw = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24330
24555
|
__name: "ChatInput",
|
|
24331
24556
|
props: {
|
|
24332
24557
|
placeholder: {},
|
|
24333
24558
|
inputRows: {}
|
|
24334
24559
|
},
|
|
24335
24560
|
setup(e) {
|
|
24336
|
-
let t =
|
|
24337
|
-
return (t,
|
|
24561
|
+
let t = T_(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l, icons: u, messages: d } = t, { state: f, stop: p } = t.chat;
|
|
24562
|
+
return (t, m) => (Y(), X("div", yw, [K(a) ? (Y(), X("button", {
|
|
24338
24563
|
key: 0,
|
|
24339
24564
|
class: "undo-foot-btn",
|
|
24340
|
-
title:
|
|
24341
|
-
onClick:
|
|
24342
|
-
},
|
|
24343
|
-
K(s).length ? (Y(), X("div",
|
|
24565
|
+
title: K(d).undoTitle,
|
|
24566
|
+
onClick: m[0] ||= (...e) => K(o) && K(o)(...e)
|
|
24567
|
+
}, U(K(d).undo), 9, bw)) : Q("", !0), Z("div", xw, [
|
|
24568
|
+
K(s).length ? (Y(), X("div", Sw, [(Y(!0), X(J, null, sa(K(s), (e) => (Y(), X("span", {
|
|
24344
24569
|
key: e.path,
|
|
24345
24570
|
class: "focus-chip",
|
|
24346
|
-
title:
|
|
24571
|
+
title: K(d).focusChipTitlePrefix + e.path + K(d).focusChipTitleHint,
|
|
24347
24572
|
onClick: (t) => K(l)(e)
|
|
24348
24573
|
}, [
|
|
24349
|
-
Z("span",
|
|
24350
|
-
Z("code",
|
|
24574
|
+
Z("span", ww, [fs(ry, { icon: K(u).focus }, null, 8, ["icon"])]),
|
|
24575
|
+
Z("code", Tw, U(e.path), 1),
|
|
24351
24576
|
Z("button", {
|
|
24352
24577
|
type: "button",
|
|
24353
24578
|
class: "focus-chip-x",
|
|
24354
24579
|
"data-test": "focus-clear",
|
|
24355
24580
|
title: "移除此焦点",
|
|
24356
24581
|
onClick: yl((t) => K(c)(e.path), ["stop"])
|
|
24357
|
-
}, "✕", 8,
|
|
24358
|
-
], 8,
|
|
24582
|
+
}, "✕", 8, Ew)
|
|
24583
|
+
], 8, Cw))), 128))])) : Q("", !0),
|
|
24359
24584
|
Xr(Z("textarea", {
|
|
24360
|
-
"onUpdate:modelValue":
|
|
24585
|
+
"onUpdate:modelValue": m[1] ||= (e) => /* @__PURE__ */ Sn(n) ? n.value = e : null,
|
|
24361
24586
|
class: H(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
|
|
24362
24587
|
placeholder: e.placeholder,
|
|
24363
24588
|
rows: e.inputRows,
|
|
24364
|
-
onKeydown:
|
|
24365
|
-
}, null, 42,
|
|
24366
|
-
Z("div",
|
|
24367
|
-
class: H(["send-btn", { "stop-btn": K(
|
|
24368
|
-
disabled: !K(
|
|
24369
|
-
title: K(
|
|
24370
|
-
onClick:
|
|
24371
|
-
}, [K(
|
|
24589
|
+
onKeydown: m[2] ||= (...e) => K(i) && K(i)(...e)
|
|
24590
|
+
}, null, 42, Dw), [[gl, K(n)]]),
|
|
24591
|
+
Z("div", Ow, [Z("span", kw, U(K(d).sendHint), 1), Z("button", {
|
|
24592
|
+
class: H(["send-btn", { "stop-btn": K(f).loading }]),
|
|
24593
|
+
disabled: !K(f).loading && !K(n).trim(),
|
|
24594
|
+
title: K(f).loading ? K(d).stopTitle : K(d).sendTitle,
|
|
24595
|
+
onClick: m[3] ||= (e) => K(f).loading ? K(p)() : K(r)()
|
|
24596
|
+
}, [K(f).loading ? (Y(), X("svg", jw, [...m[4] ||= [Z("rect", {
|
|
24372
24597
|
x: "6",
|
|
24373
24598
|
y: "6",
|
|
24374
24599
|
width: "12",
|
|
24375
24600
|
height: "12",
|
|
24376
24601
|
rx: "2"
|
|
24377
|
-
}, null, -1)]])) : (Y(),
|
|
24602
|
+
}, null, -1)]])) : K(u).send ? (Y(), as(ry, {
|
|
24603
|
+
key: 1,
|
|
24604
|
+
icon: K(u).send
|
|
24605
|
+
}, null, 8, ["icon"])) : (Y(), X("svg", Mw, [...m[5] ||= [Z("line", {
|
|
24378
24606
|
x1: "22",
|
|
24379
24607
|
y1: "2",
|
|
24380
24608
|
x2: "11",
|
|
24381
24609
|
y2: "13"
|
|
24382
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
24610
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, Aw)])
|
|
24383
24611
|
])]));
|
|
24384
24612
|
}
|
|
24385
|
-
}), [["__scopeId", "data-v-
|
|
24613
|
+
}), [["__scopeId", "data-v-b737316a"]]), Pw = {
|
|
24386
24614
|
key: 0,
|
|
24387
24615
|
class: "debug-drawer"
|
|
24388
|
-
},
|
|
24616
|
+
}, Fw = { class: "drawer-header" }, Iw = { class: "tab-group" }, Lw = { class: "header-actions" }, Rw = {
|
|
24389
24617
|
key: 0,
|
|
24390
24618
|
class: "drawer-filters"
|
|
24391
|
-
},
|
|
24619
|
+
}, zw = ["onClick"], Bw = { class: "chip-count" }, Vw = { class: "chip-count" }, Hw = { class: "drawer-body" }, Uw = {
|
|
24392
24620
|
key: 0,
|
|
24393
24621
|
class: "trace-panel"
|
|
24394
|
-
},
|
|
24622
|
+
}, Ww = {
|
|
24395
24623
|
key: 0,
|
|
24396
24624
|
class: "trace-empty"
|
|
24397
|
-
},
|
|
24625
|
+
}, Gw = { class: "trace-metrics" }, Kw = { class: "metric-card" }, qw = { class: "metric-card" }, Jw = { class: "metric-card" }, Yw = { class: "metric-card" }, Xw = {
|
|
24398
24626
|
key: 0,
|
|
24399
24627
|
class: "metric-card"
|
|
24400
|
-
},
|
|
24628
|
+
}, Zw = {
|
|
24401
24629
|
key: 1,
|
|
24402
24630
|
class: "metric-card"
|
|
24403
|
-
},
|
|
24631
|
+
}, Qw = { class: "trace-spans" }, $w = { class: "span-ico" }, eT = { class: "span-name" }, tT = {
|
|
24404
24632
|
key: 0,
|
|
24405
24633
|
class: "span-dur"
|
|
24406
|
-
},
|
|
24634
|
+
}, nT = {
|
|
24407
24635
|
key: 1,
|
|
24408
24636
|
class: "span-status"
|
|
24409
|
-
},
|
|
24637
|
+
}, rT = {
|
|
24410
24638
|
key: 1,
|
|
24411
24639
|
class: "context-panel"
|
|
24412
|
-
},
|
|
24640
|
+
}, iT = {
|
|
24413
24641
|
key: 0,
|
|
24414
24642
|
class: "trace-empty"
|
|
24415
|
-
},
|
|
24643
|
+
}, aT = { class: "ctx-overview" }, oT = { class: "ctx-occupancy" }, sT = ["title"], cT = { class: "ctx-pct" }, lT = { class: "ctx-kv-row" }, uT = { class: "ctx-kv" }, dT = {
|
|
24416
24644
|
key: 0,
|
|
24417
24645
|
class: "ctx-kv"
|
|
24418
|
-
},
|
|
24646
|
+
}, fT = {
|
|
24419
24647
|
key: 1,
|
|
24420
24648
|
class: "ctx-kv"
|
|
24421
|
-
},
|
|
24649
|
+
}, pT = ["title"], mT = { class: "ctx-cat-bar" }, hT = { class: "ctx-cat-tokens" }, gT = {
|
|
24422
24650
|
key: 0,
|
|
24423
24651
|
class: "ctx-compression"
|
|
24424
|
-
},
|
|
24652
|
+
}, _T = { class: "ctx-kv-row" }, vT = { class: "ctx-kv" }, yT = { class: "ctx-kv" }, bT = { class: "ctx-kv" }, xT = {
|
|
24425
24653
|
key: 0,
|
|
24426
24654
|
class: "ctx-kv"
|
|
24427
|
-
},
|
|
24655
|
+
}, ST = {
|
|
24428
24656
|
key: 2,
|
|
24429
24657
|
class: "subagent-panel"
|
|
24430
|
-
},
|
|
24658
|
+
}, CT = {
|
|
24431
24659
|
key: 0,
|
|
24432
24660
|
class: "sub-section"
|
|
24433
|
-
},
|
|
24661
|
+
}, wT = { class: "sub-section-title" }, TT = {
|
|
24434
24662
|
key: 1,
|
|
24435
24663
|
class: "trace-empty"
|
|
24436
|
-
},
|
|
24664
|
+
}, ET = {
|
|
24437
24665
|
key: 0,
|
|
24438
24666
|
class: "sub-section"
|
|
24439
|
-
},
|
|
24667
|
+
}, DT = { class: "sub-section-title" }, OT = { class: "sub-head" }, kT = { class: "sub-label" }, AT = { class: "sub-steps-badge" }, jT = { class: "sub-task" }, MT = {
|
|
24440
24668
|
key: 1,
|
|
24441
24669
|
class: "sub-section"
|
|
24442
|
-
},
|
|
24670
|
+
}, NT = { class: "sub-section-title" }, PT = { class: "sub-head" }, FT = { class: "sub-label" }, IT = {
|
|
24443
24671
|
key: 0,
|
|
24444
24672
|
class: "sub-dur"
|
|
24445
|
-
},
|
|
24673
|
+
}, LT = ["onClick"], RT = { class: "sub-task" }, zT = {
|
|
24446
24674
|
key: 0,
|
|
24447
24675
|
class: "sub-result"
|
|
24448
|
-
},
|
|
24676
|
+
}, BT = {
|
|
24449
24677
|
key: 1,
|
|
24450
24678
|
class: "sub-steps-list"
|
|
24451
|
-
},
|
|
24679
|
+
}, VT = { class: "sub-step-kind" }, HT = { class: "sub-step-name" }, UT = { class: "sub-step-ts" }, WT = {
|
|
24452
24680
|
key: 0,
|
|
24453
24681
|
class: "empty"
|
|
24454
|
-
},
|
|
24682
|
+
}, GT = { class: "log-head" }, KT = {
|
|
24455
24683
|
key: 0,
|
|
24456
24684
|
class: "log-source"
|
|
24457
|
-
},
|
|
24685
|
+
}, qT = { class: "log-time" }, JT = { class: "log-body" }, YT = { class: "kv-grid" }, XT = { class: "kv" }, ZT = { class: "v" }, QT = { class: "kv" }, $T = { class: "v" }, eE = { class: "kv" }, tE = { class: "v" }, nE = { class: "kv" }, rE = { class: "v" }, iE = { class: "section-label" }, aE = { class: "chip-row" }, oE = { class: "msg-list" }, sE = { class: "msg-text" }, cE = { class: "badge-row" }, lE = { class: "badge" }, uE = {
|
|
24458
24686
|
key: 0,
|
|
24459
24687
|
class: "badge muted"
|
|
24460
|
-
},
|
|
24688
|
+
}, dE = { class: "badge muted" }, fE = {
|
|
24461
24689
|
key: 1,
|
|
24462
24690
|
class: "badge muted"
|
|
24463
|
-
},
|
|
24691
|
+
}, pE = ["onClick"], mE = {
|
|
24464
24692
|
key: 0,
|
|
24465
24693
|
class: "msg-list"
|
|
24466
|
-
},
|
|
24694
|
+
}, hE = { class: "msg-detail" }, gE = {
|
|
24467
24695
|
key: 0,
|
|
24468
24696
|
class: "msg-text"
|
|
24469
|
-
},
|
|
24697
|
+
}, _E = { class: "tc-inline-name" }, vE = { class: "tc-inline-args" }, yE = {
|
|
24470
24698
|
key: 1,
|
|
24471
24699
|
class: "tc-id"
|
|
24472
|
-
},
|
|
24700
|
+
}, bE = {
|
|
24473
24701
|
key: 1,
|
|
24474
24702
|
class: "log-raw"
|
|
24475
|
-
},
|
|
24703
|
+
}, xE = { class: "badge-row" }, SE = { class: "badge" }, CE = {
|
|
24476
24704
|
key: 0,
|
|
24477
24705
|
class: "badge warn"
|
|
24478
|
-
},
|
|
24706
|
+
}, wE = {
|
|
24479
24707
|
key: 0,
|
|
24480
24708
|
class: "resp-content"
|
|
24481
|
-
},
|
|
24709
|
+
}, TE = {
|
|
24482
24710
|
key: 1,
|
|
24483
24711
|
class: "tc-list"
|
|
24484
|
-
},
|
|
24712
|
+
}, EE = { class: "tc-name" }, DE = { class: "tc-args" }, OE = {
|
|
24485
24713
|
key: 2,
|
|
24486
24714
|
class: "usage-row"
|
|
24487
|
-
},
|
|
24715
|
+
}, kE = { class: "usage" }, AE = { class: "usage" }, jE = { class: "usage" }, ME = {
|
|
24488
24716
|
key: 3,
|
|
24489
24717
|
class: "tc-card inline"
|
|
24490
|
-
},
|
|
24718
|
+
}, NE = { class: "tc-name" }, PE = { class: "tc-args" }, FE = {
|
|
24491
24719
|
key: 4,
|
|
24492
24720
|
class: "tc-card inline"
|
|
24493
|
-
},
|
|
24721
|
+
}, IE = { class: "tc-name" }, LE = { class: "tc-args" }, RE = {
|
|
24494
24722
|
key: 5,
|
|
24495
24723
|
class: "err-box"
|
|
24496
|
-
},
|
|
24724
|
+
}, zE = { class: "log-footer" }, BE = ["onClick"], VE = ["onClick"], HE = {
|
|
24497
24725
|
key: 0,
|
|
24498
24726
|
class: "log-raw"
|
|
24499
|
-
},
|
|
24727
|
+
}, UE = {
|
|
24500
24728
|
key: 0,
|
|
24501
24729
|
class: "empty"
|
|
24502
|
-
},
|
|
24730
|
+
}, WE = {
|
|
24503
24731
|
key: 1,
|
|
24504
24732
|
class: "flow-section"
|
|
24505
|
-
},
|
|
24733
|
+
}, GE = { class: "flow-ico" }, KE = { class: "flow-label" }, qE = { class: "flow-detail" }, JE = { class: "flow-time" }, YE = { class: "flow-round-head" }, XE = { class: "flow-round-body" }, ZE = { class: "flow-ico" }, QE = { class: "flow-label" }, $E = { class: "flow-detail" }, eD = { class: "flow-time" }, tD = {
|
|
24506
24734
|
key: 5,
|
|
24507
24735
|
class: "info-body"
|
|
24508
|
-
},
|
|
24736
|
+
}, nD = {
|
|
24509
24737
|
key: 0,
|
|
24510
24738
|
class: "empty"
|
|
24511
|
-
},
|
|
24739
|
+
}, rD = { class: "info-section" }, iD = { class: "kv-grid" }, aD = { class: "kv" }, oD = { class: "v" }, sD = { class: "kv" }, cD = { class: "v" }, lD = { class: "kv" }, uD = { class: "v" }, dD = { class: "kv" }, fD = { class: "v" }, pD = {
|
|
24512
24740
|
class: "kv",
|
|
24513
24741
|
style: { "margin-top": "6px" }
|
|
24514
|
-
},
|
|
24742
|
+
}, mD = {
|
|
24515
24743
|
class: "v",
|
|
24516
24744
|
style: { "font-size": "11px" }
|
|
24517
|
-
},
|
|
24745
|
+
}, hD = { class: "info-section" }, gD = { class: "info-title" }, _D = { class: "info-name" }, vD = { class: "info-desc" }, yD = {
|
|
24518
24746
|
key: 0,
|
|
24519
24747
|
class: "info-section"
|
|
24520
|
-
},
|
|
24748
|
+
}, bD = { class: "info-title" }, xD = ["onClick"], SD = { class: "info-desc" }, CD = {
|
|
24521
24749
|
key: 0,
|
|
24522
24750
|
class: "skill-content"
|
|
24523
|
-
},
|
|
24751
|
+
}, wD = {
|
|
24524
24752
|
key: 0,
|
|
24525
24753
|
class: "skill-loading"
|
|
24526
|
-
},
|
|
24754
|
+
}, TD = {
|
|
24527
24755
|
key: 1,
|
|
24528
24756
|
class: "skill-error"
|
|
24529
|
-
},
|
|
24757
|
+
}, ED = {
|
|
24530
24758
|
key: 2,
|
|
24531
24759
|
class: "skill-pre"
|
|
24532
|
-
},
|
|
24760
|
+
}, DD = {
|
|
24533
24761
|
key: 1,
|
|
24534
24762
|
class: "info-section"
|
|
24535
|
-
},
|
|
24763
|
+
}, OD = { class: "info-item" }, kD = { class: "info-name" }, AD = { class: "info-desc" }, jD = { class: "info-section" }, MD = { class: "kv-grid" }, ND = { class: "kv" }, PD = { class: "v" }, FD = { class: "kv" }, ID = { class: "v" }, LD = { class: "kv" }, RD = { class: "v" }, zD = { class: "kv" }, BD = {
|
|
24536
24764
|
class: "v",
|
|
24537
24765
|
style: { "font-size": "11px" }
|
|
24538
|
-
},
|
|
24766
|
+
}, VD = {
|
|
24539
24767
|
key: 2,
|
|
24540
24768
|
class: "info-section"
|
|
24541
|
-
},
|
|
24769
|
+
}, HD = { class: "info-title" }, UD = { class: "info-name" }, WD = { class: "src-tag mcp" }, GD = { class: "info-desc" }, KD = {
|
|
24542
24770
|
key: 3,
|
|
24543
24771
|
class: "info-section"
|
|
24544
|
-
},
|
|
24772
|
+
}, qD = { class: "kv-grid" }, JD = { class: "kv" }, YD = { class: "v" }, XD = { class: "kv" }, ZD = { class: "v" }, QD = { class: "kv" }, $D = { class: "v" }, eO = {
|
|
24545
24773
|
key: 0,
|
|
24546
24774
|
class: "kv"
|
|
24547
|
-
},
|
|
24775
|
+
}, tO = {
|
|
24548
24776
|
class: "v",
|
|
24549
24777
|
style: { "font-size": "11px" }
|
|
24550
|
-
},
|
|
24778
|
+
}, nO = {
|
|
24551
24779
|
key: 4,
|
|
24552
24780
|
class: "info-section"
|
|
24553
|
-
},
|
|
24781
|
+
}, rO = { class: "info-title" }, iO = {
|
|
24554
24782
|
key: 5,
|
|
24555
24783
|
class: "info-section"
|
|
24556
|
-
},
|
|
24784
|
+
}, aO = { class: "info-pre" }, oO = {
|
|
24557
24785
|
key: 6,
|
|
24558
24786
|
class: "info-section"
|
|
24559
|
-
},
|
|
24787
|
+
}, sO = { class: "info-kv" }, cO = { class: "kv" }, lO = { class: "v" }, uO = { class: "kv" }, dO = { class: "v" }, fO = { class: "kv" }, pO = { class: "v" }, mO = { class: "kv" }, hO = { class: "v" }, gO = { class: "kv" }, _O = {
|
|
24560
24788
|
class: "v",
|
|
24561
24789
|
style: { "font-size": "11px" }
|
|
24562
|
-
},
|
|
24790
|
+
}, vO = {
|
|
24563
24791
|
key: 0,
|
|
24564
24792
|
class: "kv"
|
|
24565
|
-
},
|
|
24793
|
+
}, yO = {
|
|
24566
24794
|
class: "v",
|
|
24567
24795
|
style: { "font-size": "11px" }
|
|
24568
|
-
},
|
|
24796
|
+
}, bO = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
24569
24797
|
__name: "DebugDrawer",
|
|
24570
24798
|
props: {
|
|
24571
24799
|
logs: { default: () => [] },
|
|
@@ -24817,8 +25045,8 @@ app.mount('#app');
|
|
|
24817
25045
|
}
|
|
24818
25046
|
}
|
|
24819
25047
|
return (t, n) => (Y(), as(_i, { to: "body" }, [fs(gc, { name: "drawer" }, {
|
|
24820
|
-
default: Jr(() => [e.visible ? (Y(), X("div",
|
|
24821
|
-
Z("div",
|
|
25048
|
+
default: Jr(() => [e.visible ? (Y(), X("div", Pw, [Z("div", { class: H(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
25049
|
+
Z("div", Fw, [Z("div", Iw, [
|
|
24822
25050
|
Z("button", {
|
|
24823
25051
|
class: H(["tab-btn", { active: y.value === "logs" }]),
|
|
24824
25052
|
onClick: n[0] ||= (e) => w("logs")
|
|
@@ -24847,7 +25075,7 @@ app.mount('#app');
|
|
|
24847
25075
|
class: H(["tab-btn", { active: y.value === "info" }]),
|
|
24848
25076
|
onClick: n[5] ||= (e) => w("info")
|
|
24849
25077
|
}, "🧬 Agent 信息", 2)) : Q("", !0)
|
|
24850
|
-
]), Z("div",
|
|
25078
|
+
]), Z("div", Lw, [y.value === "logs" ? (Y(), X("button", {
|
|
24851
25079
|
key: 0,
|
|
24852
25080
|
class: "hd-btn",
|
|
24853
25081
|
title: "清空日志",
|
|
@@ -24857,38 +25085,38 @@ app.mount('#app');
|
|
|
24857
25085
|
title: "关闭",
|
|
24858
25086
|
onClick: _
|
|
24859
25087
|
}, "✕")])]),
|
|
24860
|
-
y.value === "logs" ? (Y(), X("div",
|
|
25088
|
+
y.value === "logs" ? (Y(), X("div", Rw, [(Y(), X(J, null, sa(s, (e, t) => Z("button", {
|
|
24861
25089
|
key: t,
|
|
24862
25090
|
class: H(["filter-chip", { active: i.value === t }]),
|
|
24863
25091
|
style: Oe({ "--chip-color": e.color }),
|
|
24864
25092
|
onClick: (e) => i.value = t
|
|
24865
|
-
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span",
|
|
25093
|
+
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span", Bw, U(u.value[t] || 0), 1)], 14, zw)), 64)), Z("button", {
|
|
24866
25094
|
class: H(["filter-chip all", { active: i.value === "all" }]),
|
|
24867
25095
|
onClick: n[6] ||= (e) => i.value = "all"
|
|
24868
|
-
}, [n[7] ||= _s(" 全部 ", -1), Z("span",
|
|
24869
|
-
Z("div",
|
|
24870
|
-
y.value === "trace" ? (Y(), X("div",
|
|
24871
|
-
Z("div",
|
|
24872
|
-
Z("div",
|
|
24873
|
-
Z("div",
|
|
24874
|
-
Z("div",
|
|
24875
|
-
j.value.compressions ? (Y(), X("div",
|
|
24876
|
-
j.value.totalTokens ? (Y(), X("div",
|
|
24877
|
-
]), Z("div",
|
|
25096
|
+
}, [n[7] ||= _s(" 全部 ", -1), Z("span", Vw, U(u.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
25097
|
+
Z("div", Hw, [
|
|
25098
|
+
y.value === "trace" ? (Y(), X("div", Uw, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", Gw, [
|
|
25099
|
+
Z("div", Kw, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, U(j.value.rounds), 1)]),
|
|
25100
|
+
Z("div", qw, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, U(j.value.totalDurationMs) + "ms", 1)]),
|
|
25101
|
+
Z("div", Jw, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, U(j.value.avgRoundMs) + "ms", 1)]),
|
|
25102
|
+
Z("div", Yw, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, U(j.value.toolCalls) + "(✅" + U(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
|
|
25103
|
+
j.value.compressions ? (Y(), X("div", Xw, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, U(j.value.compressions), 1)])) : Q("", !0),
|
|
25104
|
+
j.value.totalTokens ? (Y(), X("div", Zw, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, U(j.value.totalTokens.total), 1)])) : Q("", !0)
|
|
25105
|
+
]), Z("div", Qw, [(Y(!0), X(J, null, sa(ee.value, (e) => (Y(), X("div", {
|
|
24878
25106
|
key: e.id,
|
|
24879
25107
|
class: H(["trace-span", [e.type, e.status]])
|
|
24880
25108
|
}, [
|
|
24881
|
-
Z("span",
|
|
24882
|
-
Z("span",
|
|
24883
|
-
e.durationMs ? (Y(), X("span",
|
|
24884
|
-
e.status === "error" ? (Y(), X("span",
|
|
24885
|
-
], 2))), 128))])], 64)) : (Y(), X("div",
|
|
25109
|
+
Z("span", $w, U(re(e.type)), 1),
|
|
25110
|
+
Z("span", eT, U(e.name), 1),
|
|
25111
|
+
e.durationMs ? (Y(), X("span", tT, U(A(e.durationMs)), 1)) : Q("", !0),
|
|
25112
|
+
e.status === "error" ? (Y(), X("span", nT, "❌")) : Q("", !0)
|
|
25113
|
+
], 2))), 128))])], 64)) : (Y(), X("div", Ww, [...n[8] ||= [
|
|
24886
25114
|
_s("未开启 tracing(", -1),
|
|
24887
25115
|
Z("code", null, "capabilities.tracing:true", -1),
|
|
24888
25116
|
_s(")或暂无 trace。跑一轮 agent 后刷新。", -1)
|
|
24889
25117
|
]]))])) : Q("", !0),
|
|
24890
|
-
y.value === "context" ? (Y(), X("div",
|
|
24891
|
-
Z("div",
|
|
25118
|
+
y.value === "context" ? (Y(), X("div", rT, [M.value ? (Y(), X(J, { key: 1 }, [
|
|
25119
|
+
Z("div", aT, [Z("div", oT, [Z("div", {
|
|
24892
25120
|
class: "ctx-bar-track",
|
|
24893
25121
|
title: `占用 ${Math.round(M.value.occupancy * 100)}%`
|
|
24894
25122
|
}, [Z("div", {
|
|
@@ -24899,10 +25127,10 @@ app.mount('#app');
|
|
|
24899
25127
|
class: "ctx-threshold-mark",
|
|
24900
25128
|
style: Oe({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
|
|
24901
25129
|
title: "压缩阈值"
|
|
24902
|
-
}, null, 4)) : Q("", !0)], 8,
|
|
24903
|
-
Z("span",
|
|
24904
|
-
M.value.contextWindow ? (Y(), X("span",
|
|
24905
|
-
M.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
25130
|
+
}, null, 4)) : Q("", !0)], 8, sT), Z("span", cT, U(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", lT, [
|
|
25131
|
+
Z("span", uT, "估算 " + U(M.value.totalTokens) + " token", 1),
|
|
25132
|
+
M.value.contextWindow ? (Y(), X("span", dT, "窗口 " + U(M.value.contextWindow), 1)) : Q("", !0),
|
|
25133
|
+
M.value.thresholdRatio > 0 ? (Y(), X("span", fT, "阈值 " + U(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
24906
25134
|
])]),
|
|
24907
25135
|
n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
|
|
24908
25136
|
(Y(!0), X(J, null, sa(M.value.categories, (e) => (Y(), X("div", {
|
|
@@ -24912,228 +25140,228 @@ app.mount('#app');
|
|
|
24912
25140
|
Z("span", {
|
|
24913
25141
|
class: "ctx-cat-label",
|
|
24914
25142
|
title: e.label
|
|
24915
|
-
}, U(e.label), 9,
|
|
24916
|
-
Z("div",
|
|
25143
|
+
}, U(e.label), 9, pT),
|
|
25144
|
+
Z("div", mT, [Z("div", {
|
|
24917
25145
|
class: "ctx-cat-fill",
|
|
24918
25146
|
style: Oe({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
24919
25147
|
}, null, 4)]),
|
|
24920
|
-
Z("span",
|
|
25148
|
+
Z("span", hT, [_s(U(e.tokens) + " ", 1), Z("i", null, "(" + U(Math.round(e.pct * 100)) + "%)", 1)])
|
|
24921
25149
|
]))), 128)),
|
|
24922
|
-
M.value.compression ? (Y(), X("div",
|
|
24923
|
-
Z("span",
|
|
24924
|
-
Z("span",
|
|
24925
|
-
Z("span",
|
|
24926
|
-
M.value.compression.decision ? (Y(), X("span",
|
|
25150
|
+
M.value.compression ? (Y(), X("div", gT, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", _T, [
|
|
25151
|
+
Z("span", vT, "摘要 " + U(M.value.compression.roundsSummarized) + "/" + U(M.value.compression.roundsTotal) + " 轮", 1),
|
|
25152
|
+
Z("span", yT, "召回 " + U(M.value.compression.roundsRecalled), 1),
|
|
25153
|
+
Z("span", bT, U(M.value.compression.strategy), 1),
|
|
25154
|
+
M.value.compression.decision ? (Y(), X("span", xT, "🤖 agent 决策:" + U(R(M.value.compression.decision)), 1)) : Q("", !0)
|
|
24927
25155
|
])])) : Q("", !0)
|
|
24928
|
-
], 64)) : (Y(), X("div",
|
|
24929
|
-
y.value === "subagent" ? (Y(), X("div",
|
|
25156
|
+
], 64)) : (Y(), X("div", iT, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
|
|
25157
|
+
y.value === "subagent" ? (Y(), X("div", ST, [F.value.length ? (Y(), X("div", CT, [Z("div", wT, "🔒 组件锁 (" + U(F.value.length) + ")", 1), (Y(!0), X(J, null, sa(F.value, ([e, t]) => (Y(), X("div", {
|
|
24930
25158
|
key: "lock-" + e,
|
|
24931
25159
|
class: "sub-task"
|
|
24932
|
-
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div",
|
|
25160
|
+
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div", TT, [...n[17] ||= [
|
|
24933
25161
|
_s(" 尚未委派子 agent。主 agent 调用 ", -1),
|
|
24934
25162
|
Z("code", null, "use_<id>", -1),
|
|
24935
25163
|
_s(" 或 ", -1),
|
|
24936
25164
|
Z("code", null, "spawn_agent", -1),
|
|
24937
25165
|
_s(" 后,这里展示运行状态与委派历史。 ", -1)
|
|
24938
|
-
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div",
|
|
25166
|
+
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div", ET, [Z("div", DT, "▶ 运行中 (" + U(te.value.length) + ")", 1), (Y(!0), X(J, null, sa(te.value, (e, t) => (Y(), X("div", {
|
|
24939
25167
|
key: "a" + t,
|
|
24940
25168
|
class: H(["sub-card", e.status])
|
|
24941
|
-
}, [Z("div",
|
|
25169
|
+
}, [Z("div", OT, [
|
|
24942
25170
|
Z("span", {
|
|
24943
25171
|
class: "sub-status",
|
|
24944
25172
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24945
25173
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24946
|
-
Z("span",
|
|
24947
|
-
Z("span",
|
|
24948
|
-
]), Z("div",
|
|
25174
|
+
Z("span", kT, U(e.label), 1),
|
|
25175
|
+
Z("span", AT, U(e.steps.length) + " 步", 1)
|
|
25176
|
+
]), Z("div", jT, U(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), P.value.length ? (Y(), X("div", MT, [Z("div", NT, "🕐 历史 (" + U(P.value.length) + ")", 1), (Y(!0), X(J, null, sa(P.value, (e, t) => (Y(), X("div", {
|
|
24949
25177
|
key: "h" + t,
|
|
24950
25178
|
class: H(["sub-card", e.status])
|
|
24951
25179
|
}, [
|
|
24952
|
-
Z("div",
|
|
25180
|
+
Z("div", PT, [
|
|
24953
25181
|
Z("span", {
|
|
24954
25182
|
class: "sub-status",
|
|
24955
25183
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24956
25184
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24957
|
-
Z("span",
|
|
24958
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
25185
|
+
Z("span", FT, U(e.label), 1),
|
|
25186
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", IT, U(A(e.durationMs)), 1)),
|
|
24959
25187
|
e.steps.length ? (Y(), X("button", {
|
|
24960
25188
|
key: 1,
|
|
24961
25189
|
class: "sub-toggle",
|
|
24962
25190
|
onClick: (e) => L(t)
|
|
24963
|
-
}, U(I.value.has(t) ? "收起" : "步骤"), 9,
|
|
25191
|
+
}, U(I.value.has(t) ? "收起" : "步骤"), 9, LT)) : Q("", !0)
|
|
24964
25192
|
]),
|
|
24965
|
-
Z("div",
|
|
24966
|
-
e.resultPreview ? (Y(), X("div",
|
|
24967
|
-
I.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
25193
|
+
Z("div", RT, U(k(e.task, 80)), 1),
|
|
25194
|
+
e.resultPreview ? (Y(), X("div", zT, U(e.resultPreview), 1)) : Q("", !0),
|
|
25195
|
+
I.value.has(t) && e.steps.length ? (Y(), X("div", BT, [(Y(!0), X(J, null, sa(e.steps, (e, t) => (Y(), X("div", {
|
|
24968
25196
|
key: t,
|
|
24969
25197
|
class: "sub-step"
|
|
24970
25198
|
}, [
|
|
24971
|
-
Z("span",
|
|
24972
|
-
Z("span",
|
|
24973
|
-
Z("span",
|
|
25199
|
+
Z("span", VT, U(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
25200
|
+
Z("span", HT, U(e.name), 1),
|
|
25201
|
+
Z("span", UT, U(d(e.ts)), 1)
|
|
24974
25202
|
]))), 128))])) : Q("", !0)
|
|
24975
25203
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
24976
|
-
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div",
|
|
25204
|
+
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", WT, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, sa(l.value, (e, t) => (Y(), X("div", {
|
|
24977
25205
|
key: t,
|
|
24978
25206
|
class: "log-item"
|
|
24979
25207
|
}, [
|
|
24980
|
-
Z("div",
|
|
25208
|
+
Z("div", GT, [
|
|
24981
25209
|
Z("span", {
|
|
24982
25210
|
class: "log-type",
|
|
24983
25211
|
style: Oe({ background: s[e.type].color })
|
|
24984
25212
|
}, U(s[e.type].icon) + " " + U(s[e.type].label), 5),
|
|
24985
|
-
e.source ? (Y(), X("span",
|
|
24986
|
-
Z("span",
|
|
25213
|
+
e.source ? (Y(), X("span", KT, "↳ " + U(e.source), 1)) : Q("", !0),
|
|
25214
|
+
Z("span", qT, U(d(e.timestamp)), 1)
|
|
24987
25215
|
]),
|
|
24988
|
-
Z("div",
|
|
24989
|
-
Z("div",
|
|
24990
|
-
Z("div",
|
|
24991
|
-
Z("div",
|
|
24992
|
-
Z("div",
|
|
24993
|
-
Z("div",
|
|
25216
|
+
Z("div", JT, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
25217
|
+
Z("div", YT, [
|
|
25218
|
+
Z("div", XT, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", ZT, U(e.data.model), 1)]),
|
|
25219
|
+
Z("div", QT, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", $T, U(e.data.temperature), 1)]),
|
|
25220
|
+
Z("div", eE, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", tE, U(e.data.maxTokens), 1)]),
|
|
25221
|
+
Z("div", nE, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", rE, U(e.data.totalMessages), 1)])
|
|
24994
25222
|
]),
|
|
24995
|
-
Z("div",
|
|
24996
|
-
Z("div",
|
|
25223
|
+
Z("div", iE, "工具 (" + U(e.data.tools?.length || 0) + ")", 1),
|
|
25224
|
+
Z("div", aE, [(Y(!0), X(J, null, sa(e.data.tools, (e) => (Y(), X("span", {
|
|
24997
25225
|
key: e,
|
|
24998
25226
|
class: "tool-chip"
|
|
24999
25227
|
}, U(e), 1))), 128))]),
|
|
25000
25228
|
n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
|
|
25001
|
-
Z("div",
|
|
25229
|
+
Z("div", oE, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
25002
25230
|
key: t,
|
|
25003
25231
|
class: "msg-row"
|
|
25004
25232
|
}, [Z("span", {
|
|
25005
25233
|
class: "msg-role",
|
|
25006
25234
|
style: Oe({ background: g(e.type).color })
|
|
25007
|
-
}, U(g(e.type).label), 5), Z("span",
|
|
25008
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
25009
|
-
Z("span",
|
|
25010
|
-
e.data.model ? (Y(), X("span",
|
|
25011
|
-
Z("span",
|
|
25012
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
25235
|
+
}, U(g(e.type).label), 5), Z("span", sE, U(e.content), 1)]))), 128))])
|
|
25236
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", cE, [
|
|
25237
|
+
Z("span", lE, "第 " + U(e.data.round) + " 轮", 1),
|
|
25238
|
+
e.data.model ? (Y(), X("span", uE, U(e.data.model), 1)) : Q("", !0),
|
|
25239
|
+
Z("span", dE, U((e.data.messages || []).length) + " 条消息", 1),
|
|
25240
|
+
e.data.tools?.length ? (Y(), X("span", fE, U(e.data.tools.length) + " 工具", 1)) : Q("", !0),
|
|
25013
25241
|
Z("button", {
|
|
25014
25242
|
class: "view-toggle",
|
|
25015
25243
|
onClick: (e) => p(t)
|
|
25016
|
-
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9,
|
|
25017
|
-
]), o.value.has(t) ? (Y(), X("pre",
|
|
25244
|
+
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, pE)
|
|
25245
|
+
]), o.value.has(t) ? (Y(), X("pre", bE, [Z("code", null, U(m(e.data.messages)), 1)])) : (Y(), X("div", mE, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
25018
25246
|
key: t,
|
|
25019
25247
|
class: "msg-row"
|
|
25020
25248
|
}, [Z("span", {
|
|
25021
25249
|
class: "msg-role",
|
|
25022
25250
|
style: Oe({ background: g(e.role).color })
|
|
25023
|
-
}, U(g(e.role).label), 5), Z("div",
|
|
25024
|
-
e.content ? (Y(), X("span",
|
|
25251
|
+
}, U(g(e.role).label), 5), Z("div", hE, [
|
|
25252
|
+
e.content ? (Y(), X("span", gE, U(e.content), 1)) : Q("", !0),
|
|
25025
25253
|
(Y(!0), X(J, null, sa(e.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
25026
25254
|
key: t,
|
|
25027
25255
|
class: "tc-inline"
|
|
25028
|
-
}, [Z("span",
|
|
25029
|
-
e.tool_call_id ? (Y(), X("span",
|
|
25256
|
+
}, [Z("span", _E, "🔧 " + U(e.function?.name || e.name), 1), Z("code", vE, U(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
25257
|
+
e.tool_call_id ? (Y(), X("span", yE, "↳ tool_call_id: " + U(e.tool_call_id), 1)) : Q("", !0)
|
|
25030
25258
|
])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
25031
|
-
Z("div",
|
|
25032
|
-
e.data.content ? (Y(), X("div",
|
|
25033
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
25259
|
+
Z("div", xE, [Z("span", SE, "第 " + U(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", CE, "🔧 " + U(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
|
|
25260
|
+
e.data.content ? (Y(), X("div", wE, U(e.data.content), 1)) : Q("", !0),
|
|
25261
|
+
e.data.toolCalls?.length ? (Y(), X("div", TE, [(Y(!0), X(J, null, sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
25034
25262
|
key: t,
|
|
25035
25263
|
class: "tc-card"
|
|
25036
|
-
}, [Z("div",
|
|
25037
|
-
e.data.usage ? (Y(), X("div",
|
|
25038
|
-
Z("span",
|
|
25039
|
-
Z("span",
|
|
25040
|
-
Z("span",
|
|
25264
|
+
}, [Z("div", EE, "🔧 " + U(e.name), 1), Z("pre", DE, U(m(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
25265
|
+
e.data.usage ? (Y(), X("div", OE, [
|
|
25266
|
+
Z("span", kE, "prompt: " + U(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
25267
|
+
Z("span", AE, "completion: " + U(e.data.usage.completion_tokens ?? "-"), 1),
|
|
25268
|
+
Z("span", jE, "total: " + U(e.data.usage.total_tokens ?? "-"), 1)
|
|
25041
25269
|
])) : Q("", !0)
|
|
25042
|
-
], 64)) : e.type === "tool_call" ? (Y(), X("div",
|
|
25043
|
-
Z("div",
|
|
25270
|
+
], 64)) : e.type === "tool_call" ? (Y(), X("div", ME, [Z("div", NE, "🔧 " + U(e.data.name), 1), Z("pre", PE, U(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", FE, [Z("div", IE, "✅ " + U(e.data.name) + " 结果", 1), Z("pre", LE, U(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", RE, U(e.data.tool ? `[${e.data.tool}] ` : "") + U(e.data.error), 1)) : Q("", !0)]),
|
|
25271
|
+
Z("div", zE, [Z("button", {
|
|
25044
25272
|
class: "raw-toggle",
|
|
25045
25273
|
onClick: (e) => f(t)
|
|
25046
|
-
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9,
|
|
25274
|
+
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, BE), Z("button", {
|
|
25047
25275
|
class: "raw-toggle",
|
|
25048
25276
|
onClick: (t) => K(g_)(m(e.data))
|
|
25049
|
-
}, "复制", 8,
|
|
25050
|
-
a.value.has(t) ? (Y(), X("pre",
|
|
25277
|
+
}, "复制", 8, VE)]),
|
|
25278
|
+
a.value.has(t) ? (Y(), X("pre", HE, [Z("code", null, U(m(e.data)), 1)])) : Q("", !0)
|
|
25051
25279
|
]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
|
|
25052
|
-
c.value.length ? Q("", !0) : (Y(), X("div",
|
|
25053
|
-
O.value.pre.length ? (Y(), X("div",
|
|
25280
|
+
c.value.length ? Q("", !0) : (Y(), X("div", UE, "暂无日志,发送消息后这里按轮次展示执行流程")),
|
|
25281
|
+
O.value.pre.length ? (Y(), X("div", WE, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, sa(O.value.pre, (e, t) => (Y(), X("div", {
|
|
25054
25282
|
key: "p" + t,
|
|
25055
25283
|
class: H(["flow-node", e.type])
|
|
25056
25284
|
}, [
|
|
25057
|
-
Z("span",
|
|
25058
|
-
Z("span",
|
|
25059
|
-
Z("span",
|
|
25060
|
-
Z("span",
|
|
25285
|
+
Z("span", GE, U(s[e.type]?.icon), 1),
|
|
25286
|
+
Z("span", KE, U(s[e.type]?.label), 1),
|
|
25287
|
+
Z("span", qE, U(ie(e)), 1),
|
|
25288
|
+
Z("span", JE, U(d(e.timestamp)), 1)
|
|
25061
25289
|
], 2))), 128))])) : Q("", !0),
|
|
25062
25290
|
(Y(!0), X(J, null, sa(O.value.rounds, (e) => (Y(), X("div", {
|
|
25063
25291
|
key: e.round,
|
|
25064
25292
|
class: "flow-round"
|
|
25065
|
-
}, [Z("div",
|
|
25293
|
+
}, [Z("div", YE, "🔁 第 " + U(e.round) + " 轮", 1), Z("div", XE, [(Y(!0), X(J, null, sa(e.items, (e, t) => (Y(), X("div", {
|
|
25066
25294
|
key: t,
|
|
25067
25295
|
class: H(["flow-node", e.type])
|
|
25068
25296
|
}, [
|
|
25069
|
-
Z("span",
|
|
25070
|
-
Z("span",
|
|
25071
|
-
Z("span",
|
|
25072
|
-
Z("span",
|
|
25297
|
+
Z("span", ZE, U(s[e.type]?.icon), 1),
|
|
25298
|
+
Z("span", QE, U(s[e.type]?.label), 1),
|
|
25299
|
+
Z("span", $E, U(ie(e)), 1),
|
|
25300
|
+
Z("span", eD, U(d(e.timestamp)), 1)
|
|
25073
25301
|
], 2))), 128))])]))), 128))
|
|
25074
|
-
], 64)) : (Y(), X("div",
|
|
25075
|
-
Z("div",
|
|
25302
|
+
], 64)) : (Y(), X("div", tD, [b.value ? (Y(), X(J, { key: 1 }, [
|
|
25303
|
+
Z("div", rD, [
|
|
25076
25304
|
n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
|
|
25077
|
-
Z("div",
|
|
25078
|
-
Z("div",
|
|
25079
|
-
Z("div",
|
|
25080
|
-
Z("div",
|
|
25081
|
-
Z("div",
|
|
25305
|
+
Z("div", iD, [
|
|
25306
|
+
Z("div", aD, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", oD, U(b.value.id), 1)]),
|
|
25307
|
+
Z("div", sD, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", cD, U(b.value.model || "-"), 1)]),
|
|
25308
|
+
Z("div", lD, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", uD, U(b.value.tools.length), 1)]),
|
|
25309
|
+
Z("div", dD, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", fD, U(b.value.middleware.length), 1)])
|
|
25082
25310
|
]),
|
|
25083
|
-
Z("div",
|
|
25311
|
+
Z("div", pD, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", mD, U(b.value.middleware.join(" → ") || "-"), 1)])
|
|
25084
25312
|
]),
|
|
25085
|
-
Z("div",
|
|
25313
|
+
Z("div", hD, [Z("div", gD, "🔧 工具 (" + U(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.tools, (e) => (Y(), X("div", {
|
|
25086
25314
|
key: e.name,
|
|
25087
25315
|
class: "info-item"
|
|
25088
|
-
}, [Z("div",
|
|
25316
|
+
}, [Z("div", _D, [_s(U(e.name), 1), e.source ? (Y(), X("span", {
|
|
25089
25317
|
key: 0,
|
|
25090
25318
|
class: H(["src-tag", D(e.source)])
|
|
25091
|
-
}, U(e.source), 3)) : Q("", !0)]), Z("div",
|
|
25092
|
-
b.value.skills.length ? (Y(), X("div",
|
|
25319
|
+
}, U(e.source), 3)) : Q("", !0)]), Z("div", vD, U(e.description), 1)]))), 128))]),
|
|
25320
|
+
b.value.skills.length ? (Y(), X("div", yD, [Z("div", bD, [_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", {
|
|
25093
25321
|
key: e.name,
|
|
25094
25322
|
class: "info-item"
|
|
25095
25323
|
}, [
|
|
25096
25324
|
Z("div", {
|
|
25097
25325
|
class: "info-name skill-toggle",
|
|
25098
25326
|
onClick: (t) => S(e.name)
|
|
25099
|
-
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8,
|
|
25100
|
-
Z("div",
|
|
25101
|
-
x.value[e.name] ? (Y(), X("div",
|
|
25327
|
+
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8, xD),
|
|
25328
|
+
Z("div", SD, U(e.description), 1),
|
|
25329
|
+
x.value[e.name] ? (Y(), X("div", CD, [x.value[e.name].loading ? (Y(), X("div", wD, "加载中…")) : x.value[e.name].error ? (Y(), X("div", TD, U(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", ED, U(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
25102
25330
|
]))), 128))])) : Q("", !0),
|
|
25103
|
-
b.value.data ? (Y(), X("div",
|
|
25104
|
-
Z("div",
|
|
25105
|
-
Z("div",
|
|
25106
|
-
Z("div",
|
|
25107
|
-
Z("div",
|
|
25108
|
-
Z("div",
|
|
25331
|
+
b.value.data ? (Y(), X("div", DD, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", OD, [Z("div", kD, U(b.value.data.description || "主数据对象"), 1), Z("div", AD, "schema: " + U(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
|
|
25332
|
+
Z("div", jD, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", MD, [
|
|
25333
|
+
Z("div", ND, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", PD, U(b.value.subagent.enabled ? "是" : "否"), 1)]),
|
|
25334
|
+
Z("div", FD, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", ID, U(b.value.subagent.maxDepth), 1)]),
|
|
25335
|
+
Z("div", LD, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", RD, U(b.value.subagent.maxParallel), 1)]),
|
|
25336
|
+
Z("div", zD, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", BD, U(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
|
|
25109
25337
|
])]),
|
|
25110
|
-
b.value.mcp?.servers?.length ? (Y(), X("div",
|
|
25338
|
+
b.value.mcp?.servers?.length ? (Y(), X("div", VD, [Z("div", HD, "🔌 MCP (" + U(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.mcp.servers, (e) => (Y(), X("div", {
|
|
25111
25339
|
key: e.name,
|
|
25112
25340
|
class: "info-item"
|
|
25113
|
-
}, [Z("div",
|
|
25114
|
-
b.value.verify ? (Y(), X("div",
|
|
25115
|
-
Z("div",
|
|
25116
|
-
Z("div",
|
|
25117
|
-
Z("div",
|
|
25118
|
-
b.value.verify.adversarial ? (Y(), X("div",
|
|
25341
|
+
}, [Z("div", UD, [_s(U(e.name) + " ", 1), Z("span", WD, U(e.toolCount) + " 工具", 1)]), Z("div", GD, U(e.url), 1)]))), 128))])) : Q("", !0),
|
|
25342
|
+
b.value.verify ? (Y(), X("div", KD, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", qD, [
|
|
25343
|
+
Z("div", JD, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", YD, U(b.value.verify.enabled ? "是" : "否"), 1)]),
|
|
25344
|
+
Z("div", XD, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", ZD, U(b.value.verify.maxAttempts), 1)]),
|
|
25345
|
+
Z("div", QD, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", $D, U(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
|
|
25346
|
+
b.value.verify.adversarial ? (Y(), X("div", eO, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", tO, U(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
|
|
25119
25347
|
])])) : Q("", !0),
|
|
25120
|
-
b.value.todos.length ? (Y(), X("div",
|
|
25348
|
+
b.value.todos.length ? (Y(), X("div", nO, [Z("div", rO, "📋 任务清单 (" + U(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.todos, (e, t) => (Y(), X("div", {
|
|
25121
25349
|
key: t,
|
|
25122
25350
|
class: "info-todo"
|
|
25123
25351
|
}, [Z("span", {
|
|
25124
25352
|
class: "todo-tag",
|
|
25125
25353
|
style: Oe({ background: T[e.status] && T[e.status].color || "#9ca3af" })
|
|
25126
25354
|
}, U(E(e.status)), 5), Z("span", null, U(e.content), 1)]))), 128))])) : Q("", !0),
|
|
25127
|
-
b.value.memory ? (Y(), X("div",
|
|
25128
|
-
b.value.lastCompression ? (Y(), X("div",
|
|
25129
|
-
Z("div",
|
|
25130
|
-
Z("div",
|
|
25131
|
-
Z("div",
|
|
25132
|
-
Z("div",
|
|
25133
|
-
Z("div",
|
|
25134
|
-
b.value.lastCompression.decision ? (Y(), X("div",
|
|
25355
|
+
b.value.memory ? (Y(), X("div", iO, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", aO, U(b.value.memory), 1)])) : Q("", !0),
|
|
25356
|
+
b.value.lastCompression ? (Y(), X("div", oO, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", sO, [
|
|
25357
|
+
Z("div", cO, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", lO, U(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
|
|
25358
|
+
Z("div", uO, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", dO, U(b.value.lastCompression.roundsSummarized) + " / " + U(b.value.lastCompression.roundsTotal), 1)]),
|
|
25359
|
+
Z("div", fO, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", pO, U(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
|
|
25360
|
+
Z("div", mO, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", hO, U(b.value.lastCompression.originalMessages) + " → " + U(b.value.lastCompression.compressedMessages), 1)]),
|
|
25361
|
+
Z("div", gO, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", _O, U(b.value.lastCompression.strategy), 1)]),
|
|
25362
|
+
b.value.lastCompression.decision ? (Y(), X("div", vO, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", yO, "🤖 " + U(R(b.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
25135
25363
|
])])) : Q("", !0)
|
|
25136
|
-
], 64)) : (Y(), X("div",
|
|
25364
|
+
], 64)) : (Y(), X("div", nD, "暂无信息"))]))
|
|
25137
25365
|
])
|
|
25138
25366
|
], 2), Z("div", {
|
|
25139
25367
|
class: "drawer-mask",
|
|
@@ -25142,16 +25370,16 @@ app.mount('#app');
|
|
|
25142
25370
|
_: 1
|
|
25143
25371
|
})]));
|
|
25144
25372
|
}
|
|
25145
|
-
}), [["__scopeId", "data-v-9c201fc3"]]),
|
|
25373
|
+
}), [["__scopeId", "data-v-9c201fc3"]]), xO = { class: "skill-panel" }, SO = { class: "skill-header" }, CO = { class: "skill-section" }, wO = { class: "section-title" }, TO = { class: "field" }, EO = ["disabled"], DO = { class: "field" }, OO = { class: "field field-textarea" }, kO = {
|
|
25146
25374
|
key: 0,
|
|
25147
25375
|
class: "skill-error"
|
|
25148
|
-
},
|
|
25376
|
+
}, AO = { class: "skill-section" }, jO = { class: "section-title" }, MO = {
|
|
25149
25377
|
key: 0,
|
|
25150
25378
|
class: "empty-hint"
|
|
25151
|
-
},
|
|
25379
|
+
}, NO = {
|
|
25152
25380
|
key: 1,
|
|
25153
25381
|
class: "skill-list"
|
|
25154
|
-
},
|
|
25382
|
+
}, PO = { class: "skill-actions" }, FO = ["onClick"], IO = ["onClick"], LO = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
25155
25383
|
__name: "SkillPanel",
|
|
25156
25384
|
props: {
|
|
25157
25385
|
visible: { type: Boolean },
|
|
@@ -25205,54 +25433,54 @@ app.mount('#app');
|
|
|
25205
25433
|
key: 0,
|
|
25206
25434
|
class: "skill-mask",
|
|
25207
25435
|
onClick: n[4] ||= yl((e) => r("close"), ["self"])
|
|
25208
|
-
}, [Z("div",
|
|
25209
|
-
Z("div",
|
|
25436
|
+
}, [Z("div", xO, [
|
|
25437
|
+
Z("div", SO, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
|
|
25210
25438
|
class: "skill-close",
|
|
25211
25439
|
title: "关闭",
|
|
25212
25440
|
onClick: n[0] ||= (e) => r("close")
|
|
25213
25441
|
}, "✕")]),
|
|
25214
|
-
Z("div",
|
|
25215
|
-
Z("div",
|
|
25442
|
+
Z("div", CO, [
|
|
25443
|
+
Z("div", wO, [_s(U(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
|
|
25216
25444
|
key: 0,
|
|
25217
25445
|
class: "btn btn-ghost btn-cancel",
|
|
25218
25446
|
title: "取消编辑,回到新建",
|
|
25219
25447
|
onClick: h
|
|
25220
25448
|
}, "取消编辑")) : Q("", !0)]),
|
|
25221
|
-
Z("label",
|
|
25449
|
+
Z("label", TO, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), Xr(Z("input", {
|
|
25222
25450
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
25223
25451
|
disabled: !!u.value,
|
|
25224
25452
|
placeholder: "如:my-writer",
|
|
25225
25453
|
class: "field-input"
|
|
25226
|
-
}, null, 8,
|
|
25227
|
-
Z("label",
|
|
25454
|
+
}, null, 8, EO), [[gl, i.value]])]),
|
|
25455
|
+
Z("label", DO, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), Xr(Z("input", {
|
|
25228
25456
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
25229
25457
|
placeholder: "一句话说明用途与触发时机",
|
|
25230
25458
|
class: "field-input"
|
|
25231
25459
|
}, null, 512), [[gl, a.value]])]),
|
|
25232
|
-
Z("label",
|
|
25460
|
+
Z("label", OO, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), Xr(Z("textarea", {
|
|
25233
25461
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
25234
25462
|
placeholder: "skill 全文指令(支持 Markdown)",
|
|
25235
25463
|
rows: "6",
|
|
25236
25464
|
class: "field-input"
|
|
25237
25465
|
}, null, 512), [[gl, o.value]])]),
|
|
25238
|
-
s.value ? (Y(), X("div",
|
|
25466
|
+
s.value ? (Y(), X("div", kO, U(s.value), 1)) : Q("", !0),
|
|
25239
25467
|
Z("button", {
|
|
25240
25468
|
class: "btn btn-primary",
|
|
25241
25469
|
onClick: f
|
|
25242
25470
|
}, U(u.value ? "保存修改" : "添加 Skill"), 1)
|
|
25243
25471
|
]),
|
|
25244
|
-
Z("div",
|
|
25472
|
+
Z("div", AO, [Z("div", jO, "已创建 Skill(" + U(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", NO, [(Y(!0), X(J, null, sa(c.value, (e) => (Y(), X("li", {
|
|
25245
25473
|
key: e,
|
|
25246
25474
|
class: "skill-item"
|
|
25247
|
-
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span",
|
|
25475
|
+
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span", PO, [Z("button", {
|
|
25248
25476
|
class: "btn btn-ghost btn-edit",
|
|
25249
25477
|
title: "加载到表单编辑",
|
|
25250
25478
|
onClick: (t) => m(e)
|
|
25251
|
-
}, "编辑", 8,
|
|
25479
|
+
}, "编辑", 8, FO), Z("button", {
|
|
25252
25480
|
class: "btn btn-ghost btn-del",
|
|
25253
25481
|
title: "删除该用户 skill",
|
|
25254
25482
|
onClick: (t) => p(e)
|
|
25255
|
-
}, "删除", 8,
|
|
25483
|
+
}, "删除", 8, IO)])]))), 128))])) : (Y(), X("div", MO, "暂无用户创建的 skill"))]),
|
|
25256
25484
|
n[9] ||= Z("div", { class: "skill-hint" }, [
|
|
25257
25485
|
_s(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
|
|
25258
25486
|
Z("code", null, "load_skill(name)"),
|
|
@@ -25264,13 +25492,13 @@ app.mount('#app');
|
|
|
25264
25492
|
_: 1
|
|
25265
25493
|
})]));
|
|
25266
25494
|
}
|
|
25267
|
-
}), [["__scopeId", "data-v-c6a22ea5"]]),
|
|
25495
|
+
}), [["__scopeId", "data-v-c6a22ea5"]]), RO = /*#__PURE__*/ ny(/* @__PURE__ */ Fi({
|
|
25268
25496
|
__name: "ChatDialog",
|
|
25269
25497
|
props: {
|
|
25270
25498
|
fetchResponse: {},
|
|
25271
25499
|
fetchStream: {},
|
|
25272
|
-
title: {
|
|
25273
|
-
placeholder: {
|
|
25500
|
+
title: {},
|
|
25501
|
+
placeholder: {},
|
|
25274
25502
|
debugLogs: {},
|
|
25275
25503
|
initialMessages: {},
|
|
25276
25504
|
onPersist: {},
|
|
@@ -25313,11 +25541,13 @@ app.mount('#app');
|
|
|
25313
25541
|
onFocusChipClick: {},
|
|
25314
25542
|
sections: {},
|
|
25315
25543
|
csTheme: {},
|
|
25316
|
-
icons: {}
|
|
25544
|
+
icons: {},
|
|
25545
|
+
locale: {},
|
|
25546
|
+
messages: {}
|
|
25317
25547
|
},
|
|
25318
25548
|
emits: ["close"],
|
|
25319
25549
|
setup(e, { emit: t }) {
|
|
25320
|
-
let n = e, r = t, i =
|
|
25550
|
+
let n = e, r = t, i = w_({
|
|
25321
25551
|
fetchResponse: n.fetchResponse,
|
|
25322
25552
|
fetchStream: n.fetchStream,
|
|
25323
25553
|
messages: n.initialMessages,
|
|
@@ -25333,9 +25563,11 @@ app.mount('#app');
|
|
|
25333
25563
|
onClearFocus: n.onClearFocus,
|
|
25334
25564
|
onFocusChipClick: n.onFocusChipClick,
|
|
25335
25565
|
infoTick: n.infoTick,
|
|
25336
|
-
icons: n.icons
|
|
25566
|
+
icons: n.icons,
|
|
25567
|
+
locale: n.locale,
|
|
25568
|
+
dialogMessages: n.messages
|
|
25337
25569
|
});
|
|
25338
|
-
Qr(
|
|
25570
|
+
Qr(C_, i);
|
|
25339
25571
|
let { isExpanded: a, debugVisible: o, skillVisible: s, closeSkill: c } = i, { scrollContainer: l, onScroll: u, onWheel: d } = i.chat;
|
|
25340
25572
|
function f(e) {
|
|
25341
25573
|
return e === "focus" ? n.sections?.focus === !0 : n.sections?.[e] !== !1;
|
|
@@ -25363,8 +25595,8 @@ app.mount('#app');
|
|
|
25363
25595
|
f("header") ? ca(t.$slots, "header", {
|
|
25364
25596
|
key: 0,
|
|
25365
25597
|
chat: K(i)
|
|
25366
|
-
}, () => [fs(
|
|
25367
|
-
title: e.title,
|
|
25598
|
+
}, () => [fs(Sy, {
|
|
25599
|
+
title: e.title || K(i).messages.defaultTitle,
|
|
25368
25600
|
drawer: e.drawer,
|
|
25369
25601
|
"debug-logs": e.debugLogs,
|
|
25370
25602
|
"skill-available": p.value,
|
|
@@ -25388,18 +25620,20 @@ app.mount('#app');
|
|
|
25388
25620
|
f("focus") ? ca(t.$slots, "focus", {
|
|
25389
25621
|
key: 1,
|
|
25390
25622
|
chat: K(i)
|
|
25391
|
-
}, () => [fs(
|
|
25623
|
+
}, () => [fs(Ny, {
|
|
25392
25624
|
"get-focus": e.getFocus,
|
|
25393
25625
|
"on-set-focus": e.onSetFocus,
|
|
25394
25626
|
"on-clear-focus": e.onClearFocus,
|
|
25395
25627
|
"info-tick": e.infoTick,
|
|
25396
|
-
icons: K(i).icons
|
|
25628
|
+
icons: K(i).icons,
|
|
25629
|
+
messages: K(i).messages
|
|
25397
25630
|
}, null, 8, [
|
|
25398
25631
|
"get-focus",
|
|
25399
25632
|
"on-set-focus",
|
|
25400
25633
|
"on-clear-focus",
|
|
25401
25634
|
"info-tick",
|
|
25402
|
-
"icons"
|
|
25635
|
+
"icons",
|
|
25636
|
+
"messages"
|
|
25403
25637
|
])], !0) : Q("", !0),
|
|
25404
25638
|
Z("div", {
|
|
25405
25639
|
class: "chat-main",
|
|
@@ -25412,7 +25646,7 @@ app.mount('#app');
|
|
|
25412
25646
|
key: 0,
|
|
25413
25647
|
name: "cs-slide"
|
|
25414
25648
|
}, {
|
|
25415
|
-
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(
|
|
25649
|
+
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(jC, {
|
|
25416
25650
|
"show-avatar": e.showAvatar,
|
|
25417
25651
|
"show-typing": e.showTyping
|
|
25418
25652
|
}, null, 8, ["show-avatar", "show-typing"]), [[Pc, K(a)]])], !0)]),
|
|
@@ -25421,30 +25655,32 @@ app.mount('#app');
|
|
|
25421
25655
|
f("queued") ? ca(t.$slots, "queued", {
|
|
25422
25656
|
key: 1,
|
|
25423
25657
|
chat: K(i)
|
|
25424
|
-
}, () => [fs(
|
|
25658
|
+
}, () => [fs(VC)], !0) : Q("", !0),
|
|
25425
25659
|
f("approval") ? ca(t.$slots, "approval", {
|
|
25426
25660
|
key: 2,
|
|
25427
25661
|
chat: K(i)
|
|
25428
|
-
}, () => [fs(
|
|
25662
|
+
}, () => [fs(tw)], !0) : Q("", !0),
|
|
25429
25663
|
f("conflict") ? ca(t.$slots, "conflict", {
|
|
25430
25664
|
key: 3,
|
|
25431
25665
|
chat: K(i)
|
|
25432
|
-
}, () => [fs(
|
|
25666
|
+
}, () => [fs(vw, {
|
|
25433
25667
|
"pending-conflict": e.pendingConflict,
|
|
25434
25668
|
"on-resolve": e.onResolveConflict,
|
|
25435
|
-
icons: K(i).icons
|
|
25669
|
+
icons: K(i).icons,
|
|
25670
|
+
messages: K(i).messages
|
|
25436
25671
|
}, null, 8, [
|
|
25437
25672
|
"pending-conflict",
|
|
25438
25673
|
"on-resolve",
|
|
25439
|
-
"icons"
|
|
25674
|
+
"icons",
|
|
25675
|
+
"messages"
|
|
25440
25676
|
])], !0) : Q("", !0)
|
|
25441
25677
|
], 544),
|
|
25442
25678
|
f("footer") ? (Y(), as(gc, {
|
|
25443
25679
|
key: 2,
|
|
25444
25680
|
name: "cs-slide"
|
|
25445
25681
|
}, {
|
|
25446
|
-
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(
|
|
25447
|
-
placeholder: e.placeholder,
|
|
25682
|
+
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(Nw, {
|
|
25683
|
+
placeholder: e.placeholder || K(i).messages.inputPlaceholder,
|
|
25448
25684
|
"input-rows": e.inputRows
|
|
25449
25685
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
25450
25686
|
_: 3
|
|
@@ -25452,7 +25688,7 @@ app.mount('#app');
|
|
|
25452
25688
|
f("debug") ? ca(t.$slots, "debug", {
|
|
25453
25689
|
key: 3,
|
|
25454
25690
|
chat: K(i)
|
|
25455
|
-
}, () => [fs(
|
|
25691
|
+
}, () => [fs(bO, {
|
|
25456
25692
|
visible: K(o),
|
|
25457
25693
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ Sn(o) ? o.value = e : null,
|
|
25458
25694
|
logs: e.debugLogs,
|
|
@@ -25471,7 +25707,7 @@ app.mount('#app');
|
|
|
25471
25707
|
f("skill") ? ca(t.$slots, "skill", {
|
|
25472
25708
|
key: 4,
|
|
25473
25709
|
chat: K(i)
|
|
25474
|
-
}, () => [fs(
|
|
25710
|
+
}, () => [fs(LO, {
|
|
25475
25711
|
visible: K(s),
|
|
25476
25712
|
"on-add-skill": e.onAddSkill,
|
|
25477
25713
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -25488,13 +25724,13 @@ app.mount('#app');
|
|
|
25488
25724
|
])], !0) : Q("", !0)
|
|
25489
25725
|
], 6)], 64));
|
|
25490
25726
|
}
|
|
25491
|
-
}), [["__scopeId", "data-v-
|
|
25727
|
+
}), [["__scopeId", "data-v-464c4b06"]]);
|
|
25492
25728
|
//#endregion
|
|
25493
25729
|
//#region src/core/sdk/mountChatDialog.ts
|
|
25494
|
-
function
|
|
25730
|
+
function zO(e) {
|
|
25495
25731
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
25496
25732
|
return r = Tl(/* @__PURE__ */ Fi({ setup() {
|
|
25497
|
-
return () => $s(
|
|
25733
|
+
return () => $s(RO, {
|
|
25498
25734
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
25499
25735
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
25500
25736
|
if (n) {
|
|
@@ -25541,6 +25777,8 @@ function pO(e) {
|
|
|
25541
25777
|
inputRows: n.inputRows,
|
|
25542
25778
|
sections: n.sections,
|
|
25543
25779
|
icons: n.icons,
|
|
25780
|
+
locale: n.locale,
|
|
25781
|
+
messages: n.messages,
|
|
25544
25782
|
getFocus: () => t.getFocus(),
|
|
25545
25783
|
getFocuses: () => t.getFocuses(),
|
|
25546
25784
|
onSetFocus: (e) => t.setFocus(e),
|
|
@@ -25594,7 +25832,7 @@ function pO(e) {
|
|
|
25594
25832
|
}
|
|
25595
25833
|
//#endregion
|
|
25596
25834
|
//#region src/core/sdk/ragSubagent.ts
|
|
25597
|
-
function
|
|
25835
|
+
function BO(e, t, n, r, i) {
|
|
25598
25836
|
let a = [];
|
|
25599
25837
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
25600
25838
|
let o = [];
|
|
@@ -25609,7 +25847,7 @@ function mO(e, t, n, r, i) {
|
|
|
25609
25847
|
|
|
25610
25848
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
25611
25849
|
}
|
|
25612
|
-
function
|
|
25850
|
+
function VO(e, t, n, r, i) {
|
|
25613
25851
|
let a = [], o = [];
|
|
25614
25852
|
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)
|
|
25615
25853
|
|
|
@@ -25626,12 +25864,12 @@ ${a.join("\n")}
|
|
|
25626
25864
|
## 何时用何源
|
|
25627
25865
|
${o.join("\n")}`;
|
|
25628
25866
|
}
|
|
25629
|
-
var
|
|
25867
|
+
var HO = {
|
|
25630
25868
|
name: "rag-search",
|
|
25631
25869
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
25632
|
-
getContent: () =>
|
|
25870
|
+
getContent: () => VO(!0, !0, !0, "search_docs", "load_doc")
|
|
25633
25871
|
};
|
|
25634
|
-
function
|
|
25872
|
+
function UO(e, n, i) {
|
|
25635
25873
|
return r(async ({ query: e, topK: t }) => {
|
|
25636
25874
|
try {
|
|
25637
25875
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -25648,7 +25886,7 @@ function _O(e, n, i) {
|
|
|
25648
25886
|
})
|
|
25649
25887
|
});
|
|
25650
25888
|
}
|
|
25651
|
-
function
|
|
25889
|
+
function WO(e, n) {
|
|
25652
25890
|
return r(async ({ source: e }) => {
|
|
25653
25891
|
try {
|
|
25654
25892
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -25662,19 +25900,19 @@ function vO(e, n) {
|
|
|
25662
25900
|
schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
|
|
25663
25901
|
});
|
|
25664
25902
|
}
|
|
25665
|
-
function
|
|
25903
|
+
function GO(e) {
|
|
25666
25904
|
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;
|
|
25667
25905
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
25668
25906
|
let p = [];
|
|
25669
|
-
t && p.push(
|
|
25907
|
+
t && p.push(UO(s, t, o)), n && p.push(WO(c, n)), f && p.push(...f);
|
|
25670
25908
|
let m = r ? [
|
|
25671
25909
|
"vfs_grep",
|
|
25672
25910
|
"vfs_read",
|
|
25673
25911
|
"vfs_json_read"
|
|
25674
|
-
] : void 0, h =
|
|
25912
|
+
] : void 0, h = BO(r, !!t, !!n, s, c), g = {
|
|
25675
25913
|
name: "rag-search",
|
|
25676
|
-
description:
|
|
25677
|
-
getContent: () =>
|
|
25914
|
+
description: HO.description,
|
|
25915
|
+
getContent: () => VO(r, !!t, !!n, s, c)
|
|
25678
25916
|
};
|
|
25679
25917
|
return {
|
|
25680
25918
|
id: i,
|
|
@@ -25689,8 +25927,8 @@ function yO(e) {
|
|
|
25689
25927
|
}
|
|
25690
25928
|
//#endregion
|
|
25691
25929
|
//#region src/core/index.ts
|
|
25692
|
-
function
|
|
25693
|
-
return p_(e,
|
|
25930
|
+
function KO(e) {
|
|
25931
|
+
return p_(e, zO);
|
|
25694
25932
|
}
|
|
25695
25933
|
//#endregion
|
|
25696
|
-
export {
|
|
25934
|
+
export { tw as ApprovalBar, Eh as CAPABILITIES, kh as CONTEXT_PRESETS, RO as ChatDialog, Sy as ChatHeader, Nw as ChatInput, eC as CodePreview, Bm as CompressDecisionSchema, vw as ConflictBar, __ as DEFAULT_DIALOG_ICONS, Kf as DEFAULT_PROMPT_SOFT_CAP, Wp as DEFAULT_SYSTEM_PROMPT, bO as DebugDrawer, Ny as FocusBar, jS as HLJS_BLOCK_MAX_CHARS, om as HTML_VOID_TAGS, vf as HUMAN_CONFIRM_TOOL_NAME, ry as IconGlyph, b_ as MESSAGES_EN_US, y_ as MESSAGES_ZH_CN, Ul as MIN_CONTEXT_WINDOW, nC as MessageContent, jC as MessageList, xC as MessageRow, VC as QueuedBar, Gf as SOFT_CAP_MIN_WINDOW, zf as STOP_WORDS, LO 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, C_ as chatContextKey, hg as commitSetToBind, Up as connectMcp, C as constructLlmFromConfig, S as constructOpenLlmSync, g_ as copyText, ku as createAgent, _f as createApprovalMiddleware, w_ as createChatContext, KO 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, GO 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, Yv as isIconHtml, ju as isPathAllowed, dh as isQuotaError, gd as isUnsafePath, Uh as jpEval, Nl as jsonParseError, wd as limitDepth, LS 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, RS as renderMarkdownHtml, Ju as renderSchemaHint, Yu as renderSchemaOverview, Qu as renderSchemaShallow, Dh as resolveCapabilities, jh as resolveContextOptions, Th as resolveDialogConfig, v_ as resolveDialogIcons, S_ as resolveDialogMessages, 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, Qv as sanitizeIconHtml, 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, T_ as useChatContext, cm as validateHtmlFormat, e as z, Ml as zodError };
|