@blueking/ai-blueking 2.0.0-dev.25 → 2.0.0-dev.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts +2 -2
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/manager/business/chat-business-manager.d.ts +2 -0
- package/dist/manager/business/chat-business-manager.d.ts.map +1 -1
- package/dist/manager/business/session-business-manager.d.ts +8 -0
- package/dist/manager/business/session-business-manager.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -8
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +841 -834
- package/dist/vue2/index.iife.min.js +9 -9
- package/dist/vue2/index.umd.min.js +9 -9
- package/dist/vue2/style.css +1 -1
- package/dist/vue2.d.ts.map +1 -1
- package/dist/vue3/index.es.min.js +968 -964
- package/dist/vue3/index.iife.min.js +10 -10
- package/dist/vue3/index.umd.min.js +253 -253
- package/dist/vue3/style.css +1 -1
- package/package.json +3 -3
|
@@ -606,7 +606,7 @@ const AgentIcon = h$1("svg", {
|
|
|
606
606
|
name: t$1("问问小鲸"),
|
|
607
607
|
icon: () => AIBluekingIcon
|
|
608
608
|
}];
|
|
609
|
-
var _hoisted_1$
|
|
609
|
+
var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
|
|
610
610
|
__name: "shortcut-btn",
|
|
611
611
|
props: {
|
|
612
612
|
mode: {},
|
|
@@ -628,7 +628,7 @@ var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
628
628
|
key: 0,
|
|
629
629
|
class: "ai-common-icon ai-shortcut-btn-icon",
|
|
630
630
|
src: e.shortcut.icon
|
|
631
|
-
}, null, 8, _hoisted_1$
|
|
631
|
+
}, null, 8, _hoisted_1$43)) : createCommentVNode("v-if", !0), createElementVNode("span", { class: normalizeClass(e.shortcut.icon) }, null, 2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(typeof e.shortcut?.icon == "function" ? e.shortcut.icon?.(h$1) : e.shortcut.icon), {
|
|
632
632
|
key: 1,
|
|
633
633
|
class: "ai-shortcut-btn-icon"
|
|
634
634
|
}))], 64)) : e.shortcut && !e.shortcut.components?.length ? (openBlock(), createBlock(unref(AgentIcon), {
|
|
@@ -636,7 +636,7 @@ var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
636
636
|
class: "ai-shortcut-btn-icon"
|
|
637
637
|
})) : createCommentVNode("v-if", !0), createTextVNode(" " + toDisplayString(e.shortcut?.alias || e.shortcut?.name), 1)]), renderSlot(n.$slots, "append")], 2));
|
|
638
638
|
}
|
|
639
|
-
}), _hoisted_1$
|
|
639
|
+
}), _hoisted_1$42 = { class: "ai-selection-popover-content" }, _hoisted_2$29 = {
|
|
640
640
|
key: 0,
|
|
641
641
|
class: "shortcut-menu"
|
|
642
642
|
}, ai_selection_default = /* @__PURE__ */ defineComponent({
|
|
@@ -746,17 +746,17 @@ var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
746
746
|
G(200);
|
|
747
747
|
}, q = () => {
|
|
748
748
|
G(300);
|
|
749
|
-
},
|
|
749
|
+
}, Tg = (e) => {
|
|
750
750
|
i.value && l.value?.contains(e.target) || z();
|
|
751
751
|
}, Z = (e) => {
|
|
752
752
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
753
|
-
},
|
|
753
|
+
}, Eg = () => {
|
|
754
754
|
d.value?.show();
|
|
755
755
|
};
|
|
756
756
|
return onMounted(() => {
|
|
757
|
-
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown",
|
|
757
|
+
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown", Tg), document.addEventListener("scroll", Z, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
758
758
|
}), onUnmounted(() => {
|
|
759
|
-
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown",
|
|
759
|
+
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown", Tg), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
760
760
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
761
761
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
762
762
|
key: 0,
|
|
@@ -769,7 +769,7 @@ var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
769
769
|
zIndex: unref(SELECTION_Z_INDEX)
|
|
770
770
|
}),
|
|
771
771
|
onMousedown: r[2] ||= withModifiers(() => {}, ["stop"])
|
|
772
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
772
|
+
}, [createElementVNode("div", _hoisted_1$42, [renderSlot(n.$slots, "default", { shortcuts: e.shortcuts }, () => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.shortcuts.slice(0, e.maxShortcutCount), (n, r) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [r < e.maxShortcutCount ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
773
773
|
key: 0,
|
|
774
774
|
shortcut: n,
|
|
775
775
|
onClick: (e) => B(n)
|
|
@@ -799,7 +799,7 @@ var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
799
799
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("v-if", !0)]),
|
|
800
800
|
default: withCtx(() => [createVNode(shortcut_btn_default, {
|
|
801
801
|
style: { width: "28px" },
|
|
802
|
-
onClick:
|
|
802
|
+
onClick: Eg
|
|
803
803
|
}, {
|
|
804
804
|
default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
|
|
805
805
|
_: 1
|
|
@@ -841,7 +841,7 @@ const useObserverVisibleList = (e, n, r) => {
|
|
|
841
841
|
calculateVisibleMenuItems: a
|
|
842
842
|
};
|
|
843
843
|
};
|
|
844
|
-
var _hoisted_1$
|
|
844
|
+
var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
|
|
845
845
|
__name: "shortcut-btns",
|
|
846
846
|
props: { shortcuts: {} },
|
|
847
847
|
emits: ["selectShortcut"],
|
|
@@ -893,7 +893,7 @@ var _hoisted_1$42 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
893
893
|
j.value = !1;
|
|
894
894
|
}
|
|
895
895
|
}, {
|
|
896
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
896
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$41, [(openBlock(!0), createElementBlock(Fragment, null, renderList(k.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
|
|
897
897
|
key: e.id,
|
|
898
898
|
mode: "menu",
|
|
899
899
|
shortcut: e,
|
|
@@ -911,7 +911,7 @@ var _hoisted_1$42 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
911
911
|
_: 1
|
|
912
912
|
}, 8, ["append-to", "z-index"])) : createCommentVNode("v-if", !0)], 512));
|
|
913
913
|
}
|
|
914
|
-
}), _hoisted_1$
|
|
914
|
+
}), _hoisted_1$40 = { class: "shortcut-render" }, _hoisted_2$28 = { class: "shortcut-render-header" }, _hoisted_3$20 = { class: "header-name" }, _hoisted_4$18 = { class: "shortcut-render-content" }, _hoisted_5$12 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
|
|
915
915
|
__name: "shortcut-render",
|
|
916
916
|
props: {
|
|
917
917
|
alias: {},
|
|
@@ -980,7 +980,7 @@ var _hoisted_1$42 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
980
980
|
}, j = () => {
|
|
981
981
|
i("close");
|
|
982
982
|
};
|
|
983
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
983
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$40, [createElementVNode("div", _hoisted_2$28, [
|
|
984
984
|
createVNode(unref(ThinkingIcon), { class: "header-icon" }),
|
|
985
985
|
createElementVNode("span", _hoisted_3$20, toDisplayString(e.alias || e.name), 1),
|
|
986
986
|
createVNode(unref(CloseIcon), {
|
|
@@ -4832,7 +4832,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4832
4832
|
return a;
|
|
4833
4833
|
}).map((e) => `(${e})`).join(n);
|
|
4834
4834
|
}
|
|
4835
|
-
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?",
|
|
4835
|
+
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?", Tg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Eg = (e = {}) => {
|
|
4836
4836
|
let n = /^#![ ]*\//;
|
|
4837
4837
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4838
4838
|
scope: "meta",
|
|
@@ -4843,22 +4843,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4843
4843
|
e.index !== 0 && n.ignoreMatch();
|
|
4844
4844
|
}
|
|
4845
4845
|
}, e);
|
|
4846
|
-
},
|
|
4846
|
+
}, Dg = {
|
|
4847
4847
|
begin: "\\\\[\\s\\S]",
|
|
4848
4848
|
relevance: 0
|
|
4849
|
-
},
|
|
4849
|
+
}, Og = {
|
|
4850
4850
|
scope: "string",
|
|
4851
4851
|
begin: "'",
|
|
4852
4852
|
end: "'",
|
|
4853
4853
|
illegal: "\\n",
|
|
4854
|
-
contains: [
|
|
4854
|
+
contains: [Dg]
|
|
4855
4855
|
}, $ = {
|
|
4856
4856
|
scope: "string",
|
|
4857
4857
|
begin: "\"",
|
|
4858
4858
|
end: "\"",
|
|
4859
4859
|
illegal: "\\n",
|
|
4860
|
-
contains: [
|
|
4861
|
-
},
|
|
4860
|
+
contains: [Dg]
|
|
4861
|
+
}, kg = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, Ag = function(e, n, r = {}) {
|
|
4862
4862
|
let i = o({
|
|
4863
4863
|
scope: "comment",
|
|
4864
4864
|
begin: e,
|
|
@@ -4874,50 +4874,50 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4874
4874
|
});
|
|
4875
4875
|
let a = I("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
4876
4876
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4877
|
-
},
|
|
4877
|
+
}, jg = Ag("//", "$"), Mg = Ag("/\\*", "\\*/"), Ng = Ag("#", "$"), Pg = {
|
|
4878
4878
|
scope: "number",
|
|
4879
4879
|
begin: J,
|
|
4880
4880
|
relevance: 0
|
|
4881
|
-
},
|
|
4881
|
+
}, Fg = {
|
|
4882
4882
|
scope: "number",
|
|
4883
|
-
begin:
|
|
4883
|
+
begin: Tg,
|
|
4884
4884
|
relevance: 0
|
|
4885
|
-
},
|
|
4885
|
+
}, Ig = {
|
|
4886
4886
|
scope: "number",
|
|
4887
4887
|
begin: Z,
|
|
4888
4888
|
relevance: 0
|
|
4889
|
-
},
|
|
4889
|
+
}, Lg = {
|
|
4890
4890
|
scope: "regexp",
|
|
4891
4891
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4892
4892
|
end: /\/[gimuy]*/,
|
|
4893
|
-
contains: [
|
|
4893
|
+
contains: [Dg, {
|
|
4894
4894
|
begin: /\[/,
|
|
4895
4895
|
end: /\]/,
|
|
4896
4896
|
relevance: 0,
|
|
4897
|
-
contains: [
|
|
4897
|
+
contains: [Dg]
|
|
4898
4898
|
}]
|
|
4899
|
-
},
|
|
4899
|
+
}, Rg = {
|
|
4900
4900
|
scope: "title",
|
|
4901
4901
|
begin: K,
|
|
4902
4902
|
relevance: 0
|
|
4903
|
-
},
|
|
4903
|
+
}, zg = {
|
|
4904
4904
|
scope: "title",
|
|
4905
4905
|
begin: q,
|
|
4906
4906
|
relevance: 0
|
|
4907
|
-
},
|
|
4907
|
+
}, Bg = {
|
|
4908
4908
|
begin: "\\.\\s*" + q,
|
|
4909
4909
|
relevance: 0
|
|
4910
|
-
},
|
|
4910
|
+
}, Vg = /* @__PURE__ */ Object.freeze({
|
|
4911
4911
|
__proto__: null,
|
|
4912
|
-
APOS_STRING_MODE:
|
|
4913
|
-
BACKSLASH_ESCAPE:
|
|
4914
|
-
BINARY_NUMBER_MODE:
|
|
4912
|
+
APOS_STRING_MODE: Og,
|
|
4913
|
+
BACKSLASH_ESCAPE: Dg,
|
|
4914
|
+
BINARY_NUMBER_MODE: Ig,
|
|
4915
4915
|
BINARY_NUMBER_RE: Z,
|
|
4916
|
-
COMMENT:
|
|
4917
|
-
C_BLOCK_COMMENT_MODE:
|
|
4918
|
-
C_LINE_COMMENT_MODE:
|
|
4919
|
-
C_NUMBER_MODE:
|
|
4920
|
-
C_NUMBER_RE:
|
|
4916
|
+
COMMENT: Ag,
|
|
4917
|
+
C_BLOCK_COMMENT_MODE: Mg,
|
|
4918
|
+
C_LINE_COMMENT_MODE: jg,
|
|
4919
|
+
C_NUMBER_MODE: Fg,
|
|
4920
|
+
C_NUMBER_RE: Tg,
|
|
4921
4921
|
END_SAME_AS_BEGIN: function(e) {
|
|
4922
4922
|
return Object.assign(e, {
|
|
4923
4923
|
"on:begin": (e, n) => {
|
|
@@ -4928,43 +4928,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4928
4928
|
}
|
|
4929
4929
|
});
|
|
4930
4930
|
},
|
|
4931
|
-
HASH_COMMENT_MODE:
|
|
4931
|
+
HASH_COMMENT_MODE: Ng,
|
|
4932
4932
|
IDENT_RE: K,
|
|
4933
4933
|
MATCH_NOTHING_RE: G,
|
|
4934
|
-
METHOD_GUARD:
|
|
4935
|
-
NUMBER_MODE:
|
|
4934
|
+
METHOD_GUARD: Bg,
|
|
4935
|
+
NUMBER_MODE: Pg,
|
|
4936
4936
|
NUMBER_RE: J,
|
|
4937
|
-
PHRASAL_WORDS_MODE:
|
|
4937
|
+
PHRASAL_WORDS_MODE: kg,
|
|
4938
4938
|
QUOTE_STRING_MODE: $,
|
|
4939
|
-
REGEXP_MODE:
|
|
4939
|
+
REGEXP_MODE: Lg,
|
|
4940
4940
|
RE_STARTERS_RE: Q,
|
|
4941
|
-
SHEBANG:
|
|
4942
|
-
TITLE_MODE:
|
|
4941
|
+
SHEBANG: Eg,
|
|
4942
|
+
TITLE_MODE: Rg,
|
|
4943
4943
|
UNDERSCORE_IDENT_RE: q,
|
|
4944
|
-
UNDERSCORE_TITLE_MODE:
|
|
4944
|
+
UNDERSCORE_TITLE_MODE: zg
|
|
4945
4945
|
});
|
|
4946
|
-
function
|
|
4946
|
+
function Hg(e, n) {
|
|
4947
4947
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4948
4948
|
}
|
|
4949
|
-
function
|
|
4949
|
+
function Ug(e, n) {
|
|
4950
4950
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4951
4951
|
}
|
|
4952
|
-
function
|
|
4953
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4952
|
+
function Wg(e, n) {
|
|
4953
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Hg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4954
4954
|
}
|
|
4955
|
-
function
|
|
4955
|
+
function Gg(e, n) {
|
|
4956
4956
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4957
4957
|
}
|
|
4958
|
-
function
|
|
4958
|
+
function Kg(e, n) {
|
|
4959
4959
|
if (e.match) {
|
|
4960
4960
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4961
4961
|
e.begin = e.match, delete e.match;
|
|
4962
4962
|
}
|
|
4963
4963
|
}
|
|
4964
|
-
function
|
|
4964
|
+
function qg(e, n) {
|
|
4965
4965
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4966
4966
|
}
|
|
4967
|
-
var
|
|
4967
|
+
var Jg = (e, n) => {
|
|
4968
4968
|
if (!e.beforeMatch) return;
|
|
4969
4969
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4970
4970
|
let r = Object.assign({}, e);
|
|
@@ -4974,7 +4974,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4974
4974
|
relevance: 0,
|
|
4975
4975
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4976
4976
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4977
|
-
},
|
|
4977
|
+
}, Yg = [
|
|
4978
4978
|
"of",
|
|
4979
4979
|
"and",
|
|
4980
4980
|
"for",
|
|
@@ -4986,58 +4986,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4986
4986
|
"parent",
|
|
4987
4987
|
"list",
|
|
4988
4988
|
"value"
|
|
4989
|
-
],
|
|
4990
|
-
function
|
|
4989
|
+
], Xg = "keyword";
|
|
4990
|
+
function Zg(e, n, r = Xg) {
|
|
4991
4991
|
let i = Object.create(null);
|
|
4992
4992
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4993
|
-
Object.assign(i,
|
|
4993
|
+
Object.assign(i, Zg(e[r], n, r));
|
|
4994
4994
|
}), i;
|
|
4995
4995
|
function a(e, r) {
|
|
4996
4996
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4997
4997
|
let r = n.split("|");
|
|
4998
|
-
i[r[0]] = [e,
|
|
4998
|
+
i[r[0]] = [e, Qg(r[0], r[1])];
|
|
4999
4999
|
});
|
|
5000
5000
|
}
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
return n ? Number(n) :
|
|
5002
|
+
function Qg(e, n) {
|
|
5003
|
+
return n ? Number(n) : $g(e) ? 0 : 1;
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5006
|
-
return
|
|
5005
|
+
function $g(e) {
|
|
5006
|
+
return Yg.includes(e.toLowerCase());
|
|
5007
5007
|
}
|
|
5008
|
-
var
|
|
5008
|
+
var e_ = {}, t_ = (e) => {
|
|
5009
5009
|
console.error(e);
|
|
5010
|
-
},
|
|
5010
|
+
}, n_ = (e, ...n) => {
|
|
5011
5011
|
console.log(`WARN: ${e}`, ...n);
|
|
5012
|
-
},
|
|
5013
|
-
|
|
5014
|
-
},
|
|
5015
|
-
function
|
|
5012
|
+
}, r_ = (e, n) => {
|
|
5013
|
+
e_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), e_[`${e}/${n}`] = !0);
|
|
5014
|
+
}, i_ = /* @__PURE__ */ Error();
|
|
5015
|
+
function a_(e, n, { key: r }) {
|
|
5016
5016
|
let i = 0, a = e[r], o = {}, s = {};
|
|
5017
5017
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
5018
5018
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
5019
5019
|
}
|
|
5020
|
-
function
|
|
5020
|
+
function o_(e) {
|
|
5021
5021
|
if (Array.isArray(e.begin)) {
|
|
5022
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
5023
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
5024
|
-
|
|
5022
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw t_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), i_;
|
|
5023
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw t_("beginScope must be object"), i_;
|
|
5024
|
+
a_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
5025
5025
|
}
|
|
5026
5026
|
}
|
|
5027
|
-
function
|
|
5027
|
+
function s_(e) {
|
|
5028
5028
|
if (Array.isArray(e.end)) {
|
|
5029
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
5030
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
5031
|
-
|
|
5029
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw t_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), i_;
|
|
5030
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw t_("endScope must be object"), i_;
|
|
5031
|
+
a_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
5032
5032
|
}
|
|
5033
5033
|
}
|
|
5034
|
-
function
|
|
5034
|
+
function c_(e) {
|
|
5035
5035
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5036
5036
|
}
|
|
5037
|
-
function
|
|
5038
|
-
|
|
5037
|
+
function l_(e) {
|
|
5038
|
+
c_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), o_(e), s_(e);
|
|
5039
5039
|
}
|
|
5040
|
-
function
|
|
5040
|
+
function u_(e) {
|
|
5041
5041
|
function n(n, r) {
|
|
5042
5042
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5043
5043
|
}
|
|
@@ -5099,18 +5099,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5099
5099
|
let o = r;
|
|
5100
5100
|
if (r.isCompiled) return o;
|
|
5101
5101
|
[
|
|
5102
|
+
Ug,
|
|
5102
5103
|
Kg,
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
Zg
|
|
5104
|
+
l_,
|
|
5105
|
+
Jg
|
|
5106
5106
|
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5107
|
+
Wg,
|
|
5108
|
+
Gg,
|
|
5109
|
+
qg
|
|
5110
5110
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5111
5111
|
let l = null;
|
|
5112
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&=
|
|
5113
|
-
return
|
|
5112
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= Zg(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
|
|
5113
|
+
return f_(e === "self" ? r : e);
|
|
5114
5114
|
})), r.contains.forEach(function(e) {
|
|
5115
5115
|
s(e, o);
|
|
5116
5116
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5118,19 +5118,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5118
5118
|
if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
5119
5119
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5120
5120
|
}
|
|
5121
|
-
function
|
|
5122
|
-
return e ? e.endsWithParent ||
|
|
5121
|
+
function d_(e) {
|
|
5122
|
+
return e ? e.endsWithParent || d_(e.starts) : !1;
|
|
5123
5123
|
}
|
|
5124
|
-
function
|
|
5124
|
+
function f_(e) {
|
|
5125
5125
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5126
5126
|
return o(e, { variants: null }, n);
|
|
5127
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5127
|
+
})), e.cachedVariants ? e.cachedVariants : d_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5128
5128
|
}
|
|
5129
|
-
var
|
|
5129
|
+
var p_ = "11.11.1", m_ = class extends Error {
|
|
5130
5130
|
constructor(e, n) {
|
|
5131
5131
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5132
5132
|
}
|
|
5133
|
-
},
|
|
5133
|
+
}, h_ = a, g_ = o, __ = Symbol("nomatch"), v_ = 7, y_ = function(e) {
|
|
5134
5134
|
let n = Object.create(null), a = Object.create(null), o = [], s = !0, l = "Could not find the language '{}', did you forget to load/include a language module?", u = {
|
|
5135
5135
|
disableAutodetect: !0,
|
|
5136
5136
|
name: "Plain text",
|
|
@@ -5153,21 +5153,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5153
5153
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5154
5154
|
let r = d.languageDetectRe.exec(n);
|
|
5155
5155
|
if (r) {
|
|
5156
|
-
let n =
|
|
5157
|
-
return n || (
|
|
5156
|
+
let n = Og(r[1]);
|
|
5157
|
+
return n || (n_(l.replace("{}", r[1])), n_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5158
5158
|
}
|
|
5159
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5159
|
+
return n.split(/\s+/).find((e) => m(e) || Og(e));
|
|
5160
5160
|
}
|
|
5161
5161
|
function v(e, n, r) {
|
|
5162
5162
|
let i = "", a = "";
|
|
5163
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5163
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (r_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), r_("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
|
|
5164
5164
|
let o = {
|
|
5165
5165
|
code: i,
|
|
5166
5166
|
language: a
|
|
5167
5167
|
};
|
|
5168
|
-
|
|
5168
|
+
Ng("before:highlight", o);
|
|
5169
5169
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5170
|
-
return s.code = o.code,
|
|
5170
|
+
return s.code = o.code, Ng("after:highlight", s), s;
|
|
5171
5171
|
}
|
|
5172
5172
|
function j(e, r, a, o) {
|
|
5173
5173
|
let u = Object.create(null);
|
|
@@ -5176,7 +5176,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5176
5176
|
}
|
|
5177
5177
|
function g() {
|
|
5178
5178
|
if (!Q.keywords) {
|
|
5179
|
-
|
|
5179
|
+
Dg.addText($);
|
|
5180
5180
|
return;
|
|
5181
5181
|
}
|
|
5182
5182
|
let e = 0;
|
|
@@ -5187,7 +5187,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5187
5187
|
let i = J.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Q, i);
|
|
5188
5188
|
if (a) {
|
|
5189
5189
|
let [e, o] = a;
|
|
5190
|
-
if (
|
|
5190
|
+
if (Dg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= v_ && (kg += o), e.startsWith("_")) r += n[0];
|
|
5191
5191
|
else {
|
|
5192
5192
|
let r = J.classNameAliases[e] || e;
|
|
5193
5193
|
T(n[0], r);
|
|
@@ -5195,25 +5195,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5195
5195
|
} else r += n[0];
|
|
5196
5196
|
e = Q.keywordPatternRe.lastIndex, n = Q.keywordPatternRe.exec($);
|
|
5197
5197
|
}
|
|
5198
|
-
r += $.substring(e),
|
|
5198
|
+
r += $.substring(e), Dg.addText(r);
|
|
5199
5199
|
}
|
|
5200
5200
|
function _() {
|
|
5201
5201
|
if ($ === "") return;
|
|
5202
5202
|
let e = null;
|
|
5203
5203
|
if (typeof Q.subLanguage == "string") {
|
|
5204
5204
|
if (!n[Q.subLanguage]) {
|
|
5205
|
-
|
|
5205
|
+
Dg.addText($);
|
|
5206
5206
|
return;
|
|
5207
5207
|
}
|
|
5208
|
-
e = j(Q.subLanguage, $, !0,
|
|
5208
|
+
e = j(Q.subLanguage, $, !0, Eg[Q.subLanguage]), Eg[Q.subLanguage] = e._top;
|
|
5209
5209
|
} else e = B($, Q.subLanguage.length ? Q.subLanguage : null);
|
|
5210
|
-
Q.relevance > 0 && (
|
|
5210
|
+
Q.relevance > 0 && (kg += e.relevance), Dg.__addSublanguage(e._emitter, e.language);
|
|
5211
5211
|
}
|
|
5212
5212
|
function v() {
|
|
5213
5213
|
Q.subLanguage == null ? g() : _(), $ = "";
|
|
5214
5214
|
}
|
|
5215
5215
|
function T(e, n) {
|
|
5216
|
-
e !== "" && (
|
|
5216
|
+
e !== "" && (Dg.startScope(n), Dg.addText(e), Dg.endScope());
|
|
5217
5217
|
}
|
|
5218
5218
|
function E(e, n) {
|
|
5219
5219
|
let r = 1, i = n.length - 1;
|
|
@@ -5227,7 +5227,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5227
5227
|
}
|
|
5228
5228
|
}
|
|
5229
5229
|
function O(e, n) {
|
|
5230
|
-
return e.scope && typeof e.scope == "string" &&
|
|
5230
|
+
return e.scope && typeof e.scope == "string" && Dg.openNode(J.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, J.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Q = Object.create(e, { parent: { value: Q } }), Q;
|
|
5231
5231
|
}
|
|
5232
5232
|
function k(e, n, r) {
|
|
5233
5233
|
let a = z(e.endRe, r);
|
|
@@ -5244,7 +5244,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5244
5244
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5245
5245
|
}
|
|
5246
5246
|
function I(e) {
|
|
5247
|
-
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5247
|
+
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Mg = !0, 0);
|
|
5248
5248
|
}
|
|
5249
5249
|
function L(e) {
|
|
5250
5250
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5253,18 +5253,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5253
5253
|
}
|
|
5254
5254
|
function H(e) {
|
|
5255
5255
|
let n = e[0], i = r.substring(e.index), a = k(Q, e, i);
|
|
5256
|
-
if (!a) return
|
|
5256
|
+
if (!a) return __;
|
|
5257
5257
|
let o = Q;
|
|
5258
5258
|
Q.endScope && Q.endScope._wrap ? (v(), T(n, Q.endScope._wrap)) : Q.endScope && Q.endScope._multi ? (v(), E(Q.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5259
5259
|
do
|
|
5260
|
-
Q.scope &&
|
|
5260
|
+
Q.scope && Dg.closeNode(), !Q.skip && !Q.subLanguage && (kg += Q.relevance), Q = Q.parent;
|
|
5261
5261
|
while (Q !== a.parent);
|
|
5262
5262
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5263
5263
|
}
|
|
5264
5264
|
function G() {
|
|
5265
5265
|
let e = [];
|
|
5266
5266
|
for (let n = Q; n !== J; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5267
|
-
e.forEach((e) =>
|
|
5267
|
+
e.forEach((e) => Dg.openNode(e));
|
|
5268
5268
|
}
|
|
5269
5269
|
let K = {};
|
|
5270
5270
|
function q(n, i) {
|
|
@@ -5283,59 +5283,59 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5283
5283
|
throw e.mode = Q, e;
|
|
5284
5284
|
} else if (i.type === "end") {
|
|
5285
5285
|
let e = H(i);
|
|
5286
|
-
if (e !==
|
|
5286
|
+
if (e !== __) return e;
|
|
5287
5287
|
}
|
|
5288
5288
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5289
|
-
if (
|
|
5289
|
+
if (jg > 1e5 && jg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5290
5290
|
return $ += o, o.length;
|
|
5291
5291
|
}
|
|
5292
|
-
let J =
|
|
5293
|
-
if (!J) throw
|
|
5294
|
-
let
|
|
5292
|
+
let J = Og(e);
|
|
5293
|
+
if (!J) throw t_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5294
|
+
let Tg = u_(J), Z = "", Q = o || Tg, Eg = {}, Dg = new d.__emitter(d);
|
|
5295
5295
|
G();
|
|
5296
|
-
let $ = "",
|
|
5296
|
+
let $ = "", kg = 0, Ag = 0, jg = 0, Mg = !1;
|
|
5297
5297
|
try {
|
|
5298
|
-
if (J.__emitTokens) J.__emitTokens(r,
|
|
5298
|
+
if (J.__emitTokens) J.__emitTokens(r, Dg);
|
|
5299
5299
|
else {
|
|
5300
5300
|
for (Q.matcher.considerAll();;) {
|
|
5301
|
-
|
|
5301
|
+
jg++, Mg ? Mg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = Ag;
|
|
5302
5302
|
let e = Q.matcher.exec(r);
|
|
5303
5303
|
if (!e) break;
|
|
5304
|
-
let n = q(r.substring(
|
|
5305
|
-
|
|
5304
|
+
let n = q(r.substring(Ag, e.index), e);
|
|
5305
|
+
Ag = e.index + n;
|
|
5306
5306
|
}
|
|
5307
|
-
q(r.substring(
|
|
5307
|
+
q(r.substring(Ag));
|
|
5308
5308
|
}
|
|
5309
|
-
return
|
|
5309
|
+
return Dg.finalize(), Z = Dg.toHTML(), {
|
|
5310
5310
|
language: e,
|
|
5311
5311
|
value: Z,
|
|
5312
|
-
relevance:
|
|
5312
|
+
relevance: kg,
|
|
5313
5313
|
illegal: !1,
|
|
5314
|
-
_emitter:
|
|
5314
|
+
_emitter: Dg,
|
|
5315
5315
|
_top: Q
|
|
5316
5316
|
};
|
|
5317
5317
|
} catch (n) {
|
|
5318
5318
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5319
5319
|
language: e,
|
|
5320
|
-
value:
|
|
5320
|
+
value: h_(r),
|
|
5321
5321
|
illegal: !0,
|
|
5322
5322
|
relevance: 0,
|
|
5323
5323
|
_illegalBy: {
|
|
5324
5324
|
message: n.message,
|
|
5325
|
-
index:
|
|
5326
|
-
context: r.slice(
|
|
5325
|
+
index: Ag,
|
|
5326
|
+
context: r.slice(Ag - 100, Ag + 100),
|
|
5327
5327
|
mode: n.mode,
|
|
5328
5328
|
resultSoFar: Z
|
|
5329
5329
|
},
|
|
5330
|
-
_emitter:
|
|
5330
|
+
_emitter: Dg
|
|
5331
5331
|
};
|
|
5332
5332
|
if (s) return {
|
|
5333
5333
|
language: e,
|
|
5334
|
-
value:
|
|
5334
|
+
value: h_(r),
|
|
5335
5335
|
illegal: !1,
|
|
5336
5336
|
relevance: 0,
|
|
5337
5337
|
errorRaised: n,
|
|
5338
|
-
_emitter:
|
|
5338
|
+
_emitter: Dg,
|
|
5339
5339
|
_top: Q
|
|
5340
5340
|
};
|
|
5341
5341
|
throw n;
|
|
@@ -5343,7 +5343,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
function L(e) {
|
|
5345
5345
|
let n = {
|
|
5346
|
-
value:
|
|
5346
|
+
value: h_(e),
|
|
5347
5347
|
illegal: !1,
|
|
5348
5348
|
relevance: 0,
|
|
5349
5349
|
_top: u,
|
|
@@ -5353,13 +5353,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5353
5353
|
}
|
|
5354
5354
|
function B(e, r) {
|
|
5355
5355
|
r = r || d.languages || Object.keys(n);
|
|
5356
|
-
let i = L(e), a = r.filter(
|
|
5356
|
+
let i = L(e), a = r.filter(Og).filter(kg).map((n) => j(n, e, !1));
|
|
5357
5357
|
a.unshift(i);
|
|
5358
5358
|
let [o, s] = a.sort((e, n) => {
|
|
5359
5359
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5360
5360
|
if (e.language && n.language) {
|
|
5361
|
-
if (
|
|
5362
|
-
if (
|
|
5361
|
+
if (Og(e.language).supersetOf === n.language) return 1;
|
|
5362
|
+
if (Og(n.language).supersetOf === e.language) return -1;
|
|
5363
5363
|
}
|
|
5364
5364
|
return 0;
|
|
5365
5365
|
}), l = o;
|
|
@@ -5372,14 +5372,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5372
5372
|
function G(e) {
|
|
5373
5373
|
let n = null, r = g(e);
|
|
5374
5374
|
if (m(r)) return;
|
|
5375
|
-
if (
|
|
5375
|
+
if (Ng("before:highlightElement", {
|
|
5376
5376
|
el: e,
|
|
5377
5377
|
language: r
|
|
5378
5378
|
}), e.dataset.highlighted) {
|
|
5379
5379
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5380
5380
|
return;
|
|
5381
5381
|
}
|
|
5382
|
-
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new
|
|
5382
|
+
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new m_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5383
5383
|
n = e;
|
|
5384
5384
|
let i = n.textContent, a = r ? v(i, {
|
|
5385
5385
|
language: r,
|
|
@@ -5392,28 +5392,28 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5392
5392
|
}, a.secondBest && (e.secondBest = {
|
|
5393
5393
|
language: a.secondBest.language,
|
|
5394
5394
|
relevance: a.secondBest.relevance
|
|
5395
|
-
}),
|
|
5395
|
+
}), Ng("after:highlightElement", {
|
|
5396
5396
|
el: e,
|
|
5397
5397
|
result: a,
|
|
5398
5398
|
text: i
|
|
5399
5399
|
});
|
|
5400
5400
|
}
|
|
5401
5401
|
function K(e) {
|
|
5402
|
-
d =
|
|
5402
|
+
d = g_(d, e);
|
|
5403
5403
|
}
|
|
5404
5404
|
let q = () => {
|
|
5405
|
-
Z(),
|
|
5405
|
+
Z(), r_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5406
5406
|
};
|
|
5407
5407
|
function J() {
|
|
5408
|
-
Z(),
|
|
5408
|
+
Z(), r_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5409
5409
|
}
|
|
5410
|
-
let
|
|
5410
|
+
let Tg = !1;
|
|
5411
5411
|
function Z() {
|
|
5412
5412
|
function e() {
|
|
5413
5413
|
Z();
|
|
5414
5414
|
}
|
|
5415
5415
|
if (document.readyState === "loading") {
|
|
5416
|
-
|
|
5416
|
+
Tg || window.addEventListener("DOMContentLoaded", e, !1), Tg = !0;
|
|
5417
5417
|
return;
|
|
5418
5418
|
}
|
|
5419
5419
|
document.querySelectorAll(d.cssSelector).forEach(G);
|
|
@@ -5423,20 +5423,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5423
5423
|
try {
|
|
5424
5424
|
a = i(e);
|
|
5425
5425
|
} catch (e) {
|
|
5426
|
-
if (
|
|
5426
|
+
if (t_("Language definition for '{}' could not be registered.".replace("{}", r)), s) t_(e);
|
|
5427
5427
|
else throw e;
|
|
5428
5428
|
a = u;
|
|
5429
5429
|
}
|
|
5430
5430
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5431
5431
|
}
|
|
5432
|
-
function
|
|
5432
|
+
function Eg(e) {
|
|
5433
5433
|
delete n[e];
|
|
5434
5434
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5436
|
+
function Dg() {
|
|
5437
5437
|
return Object.keys(n);
|
|
5438
5438
|
}
|
|
5439
|
-
function
|
|
5439
|
+
function Og(e) {
|
|
5440
5440
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5441
5441
|
}
|
|
5442
5442
|
function $(e, { languageName: n }) {
|
|
@@ -5444,65 +5444,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5444
5444
|
a[e.toLowerCase()] = n;
|
|
5445
5445
|
});
|
|
5446
5446
|
}
|
|
5447
|
-
function
|
|
5448
|
-
let n =
|
|
5447
|
+
function kg(e) {
|
|
5448
|
+
let n = Og(e);
|
|
5449
5449
|
return n && !n.disableAutodetect;
|
|
5450
5450
|
}
|
|
5451
|
-
function
|
|
5451
|
+
function Ag(e) {
|
|
5452
5452
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5453
5453
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5454
5454
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5455
5455
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5456
5456
|
});
|
|
5457
5457
|
}
|
|
5458
|
-
function
|
|
5459
|
-
|
|
5458
|
+
function jg(e) {
|
|
5459
|
+
Ag(e), o.push(e);
|
|
5460
5460
|
}
|
|
5461
|
-
function
|
|
5461
|
+
function Mg(e) {
|
|
5462
5462
|
let n = o.indexOf(e);
|
|
5463
5463
|
n !== -1 && o.splice(n, 1);
|
|
5464
5464
|
}
|
|
5465
|
-
function
|
|
5465
|
+
function Ng(e, n) {
|
|
5466
5466
|
let r = e;
|
|
5467
5467
|
o.forEach(function(e) {
|
|
5468
5468
|
e[r] && e[r](n);
|
|
5469
5469
|
});
|
|
5470
5470
|
}
|
|
5471
|
-
function
|
|
5472
|
-
return
|
|
5471
|
+
function Pg(e) {
|
|
5472
|
+
return r_("10.7.0", "highlightBlock will be removed entirely in v12.0"), r_("10.7.0", "Please use highlightElement now."), G(e);
|
|
5473
5473
|
}
|
|
5474
5474
|
for (let n in Object.assign(e, {
|
|
5475
5475
|
highlight: v,
|
|
5476
5476
|
highlightAuto: B,
|
|
5477
5477
|
highlightAll: Z,
|
|
5478
5478
|
highlightElement: G,
|
|
5479
|
-
highlightBlock:
|
|
5479
|
+
highlightBlock: Pg,
|
|
5480
5480
|
configure: K,
|
|
5481
5481
|
initHighlighting: q,
|
|
5482
5482
|
initHighlightingOnLoad: J,
|
|
5483
5483
|
registerLanguage: Q,
|
|
5484
|
-
unregisterLanguage:
|
|
5485
|
-
listLanguages:
|
|
5486
|
-
getLanguage:
|
|
5484
|
+
unregisterLanguage: Eg,
|
|
5485
|
+
listLanguages: Dg,
|
|
5486
|
+
getLanguage: Og,
|
|
5487
5487
|
registerAliases: $,
|
|
5488
|
-
autoDetection:
|
|
5489
|
-
inherit:
|
|
5490
|
-
addPlugin:
|
|
5491
|
-
removePlugin:
|
|
5488
|
+
autoDetection: kg,
|
|
5489
|
+
inherit: g_,
|
|
5490
|
+
addPlugin: jg,
|
|
5491
|
+
removePlugin: Mg
|
|
5492
5492
|
}), e.debugMode = function() {
|
|
5493
5493
|
s = !1;
|
|
5494
5494
|
}, e.safeMode = function() {
|
|
5495
5495
|
s = !0;
|
|
5496
|
-
}, e.versionString =
|
|
5496
|
+
}, e.versionString = p_, e.regex = {
|
|
5497
5497
|
concat: k,
|
|
5498
5498
|
lookahead: T,
|
|
5499
5499
|
either: I,
|
|
5500
5500
|
optional: O,
|
|
5501
5501
|
anyNumberOfTimes: E
|
|
5502
|
-
},
|
|
5503
|
-
return Object.assign(e,
|
|
5504
|
-
},
|
|
5505
|
-
|
|
5502
|
+
}, Vg) typeof Vg[n] == "object" && r(Vg[n]);
|
|
5503
|
+
return Object.assign(e, Vg), e;
|
|
5504
|
+
}, b_ = y_({});
|
|
5505
|
+
b_.newInstance = () => y_({}), n.exports = b_, b_.HighlightJS = b_, b_.default = b_;
|
|
5506
5506
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5507
5507
|
function r(e) {
|
|
5508
5508
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11624,7 +11624,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11624
11624
|
begin: /"/,
|
|
11625
11625
|
end: /"/,
|
|
11626
11626
|
contains: [e.BACKSLASH_ESCAPE]
|
|
11627
|
-
},
|
|
11627
|
+
}, Tg = {
|
|
11628
11628
|
scope: "string",
|
|
11629
11629
|
begin: /@"/,
|
|
11630
11630
|
end: /"/,
|
|
@@ -11639,7 +11639,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11639
11639
|
begin: /\{/,
|
|
11640
11640
|
end: /\}/,
|
|
11641
11641
|
keywords: g
|
|
11642
|
-
},
|
|
11642
|
+
}, Eg = {
|
|
11643
11643
|
scope: "string",
|
|
11644
11644
|
begin: /\$"/,
|
|
11645
11645
|
end: /"/,
|
|
@@ -11649,7 +11649,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11649
11649
|
e.BACKSLASH_ESCAPE,
|
|
11650
11650
|
Q
|
|
11651
11651
|
]
|
|
11652
|
-
},
|
|
11652
|
+
}, Dg = {
|
|
11653
11653
|
scope: "string",
|
|
11654
11654
|
begin: /(\$@|@\$)"/,
|
|
11655
11655
|
end: /"/,
|
|
@@ -11660,7 +11660,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11660
11660
|
e.BACKSLASH_ESCAPE,
|
|
11661
11661
|
Q
|
|
11662
11662
|
]
|
|
11663
|
-
},
|
|
11663
|
+
}, Og = {
|
|
11664
11664
|
scope: "string",
|
|
11665
11665
|
begin: /\$"""/,
|
|
11666
11666
|
end: /"""/,
|
|
@@ -11675,9 +11675,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11675
11675
|
match: o(/'/, l(/[^\\']/, /\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/), /'/)
|
|
11676
11676
|
};
|
|
11677
11677
|
Q.contains = [
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11678
|
+
Dg,
|
|
11679
|
+
Eg,
|
|
11680
|
+
Tg,
|
|
11681
11681
|
J,
|
|
11682
11682
|
$,
|
|
11683
11683
|
i,
|
|
@@ -11690,12 +11690,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11690
11690
|
O,
|
|
11691
11691
|
j
|
|
11692
11692
|
];
|
|
11693
|
-
let
|
|
11694
|
-
jg,
|
|
11695
|
-
Ag,
|
|
11696
|
-
kg,
|
|
11697
|
-
Z,
|
|
11693
|
+
let kg = { variants: [
|
|
11698
11694
|
Og,
|
|
11695
|
+
Dg,
|
|
11696
|
+
Eg,
|
|
11697
|
+
Z,
|
|
11698
|
+
Tg,
|
|
11699
11699
|
J,
|
|
11700
11700
|
$
|
|
11701
11701
|
] };
|
|
@@ -11707,7 +11707,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11707
11707
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11708
11708
|
contains: [
|
|
11709
11709
|
i,
|
|
11710
|
-
|
|
11710
|
+
kg,
|
|
11711
11711
|
_,
|
|
11712
11712
|
T,
|
|
11713
11713
|
H,
|
|
@@ -11719,7 +11719,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11719
11719
|
contains: [
|
|
11720
11720
|
T,
|
|
11721
11721
|
Z,
|
|
11722
|
-
|
|
11722
|
+
Tg,
|
|
11723
11723
|
J,
|
|
11724
11724
|
$,
|
|
11725
11725
|
q
|
|
@@ -13901,7 +13901,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13901
13901
|
keywords: E,
|
|
13902
13902
|
contains: ["self"].concat(q)
|
|
13903
13903
|
});
|
|
13904
|
-
let J = [].concat(K, L.contains),
|
|
13904
|
+
let J = [].concat(K, L.contains), Tg = J.concat([{
|
|
13905
13905
|
begin: /(\s*)\(/,
|
|
13906
13906
|
end: /\)/,
|
|
13907
13907
|
keywords: E,
|
|
@@ -13913,7 +13913,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13913
13913
|
excludeBegin: !0,
|
|
13914
13914
|
excludeEnd: !0,
|
|
13915
13915
|
keywords: E,
|
|
13916
|
-
contains:
|
|
13916
|
+
contains: Tg
|
|
13917
13917
|
}, Q = { variants: [{
|
|
13918
13918
|
match: [
|
|
13919
13919
|
/class/,
|
|
@@ -13940,17 +13940,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13940
13940
|
1: "keyword",
|
|
13941
13941
|
3: "title.class"
|
|
13942
13942
|
}
|
|
13943
|
-
}] },
|
|
13943
|
+
}] }, Eg = {
|
|
13944
13944
|
relevance: 0,
|
|
13945
13945
|
match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
13946
13946
|
className: "title.class",
|
|
13947
13947
|
keywords: { _: [...o, ...s] }
|
|
13948
|
-
},
|
|
13948
|
+
}, Dg = {
|
|
13949
13949
|
label: "use_strict",
|
|
13950
13950
|
className: "meta",
|
|
13951
13951
|
relevance: 10,
|
|
13952
13952
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13953
|
-
},
|
|
13953
|
+
}, Og = {
|
|
13954
13954
|
variants: [{ match: [
|
|
13955
13955
|
/function/,
|
|
13956
13956
|
/\s+/,
|
|
@@ -13969,25 +13969,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13969
13969
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13970
13970
|
className: "variable.constant"
|
|
13971
13971
|
};
|
|
13972
|
-
function
|
|
13972
|
+
function kg(e) {
|
|
13973
13973
|
return n.concat("(?!", e.join("|"), ")");
|
|
13974
13974
|
}
|
|
13975
|
-
let
|
|
13976
|
-
match: n.concat(/\b/,
|
|
13975
|
+
let Ag = {
|
|
13976
|
+
match: n.concat(/\b/, kg([
|
|
13977
13977
|
...l,
|
|
13978
13978
|
"super",
|
|
13979
13979
|
"import"
|
|
13980
13980
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13981
13981
|
className: "title.function",
|
|
13982
13982
|
relevance: 0
|
|
13983
|
-
},
|
|
13983
|
+
}, jg = {
|
|
13984
13984
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13985
13985
|
end: g,
|
|
13986
13986
|
excludeBegin: !0,
|
|
13987
13987
|
keywords: "prototype",
|
|
13988
13988
|
className: "property",
|
|
13989
13989
|
relevance: 0
|
|
13990
|
-
},
|
|
13990
|
+
}, Mg = {
|
|
13991
13991
|
match: [
|
|
13992
13992
|
/get|set/,
|
|
13993
13993
|
/\s+/,
|
|
@@ -13999,7 +13999,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13999
13999
|
3: "title.function"
|
|
14000
14000
|
},
|
|
14001
14001
|
contains: [{ begin: /\(\)/ }, Z]
|
|
14002
|
-
},
|
|
14002
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
14003
14003
|
match: [
|
|
14004
14004
|
/const|var|let/,
|
|
14005
14005
|
/\s+/,
|
|
@@ -14007,7 +14007,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14007
14007
|
/\s*/,
|
|
14008
14008
|
/=\s*/,
|
|
14009
14009
|
/(async\s*)?/,
|
|
14010
|
-
n.lookahead(
|
|
14010
|
+
n.lookahead(Ng)
|
|
14011
14011
|
],
|
|
14012
14012
|
keywords: "async",
|
|
14013
14013
|
className: {
|
|
@@ -14026,8 +14026,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14026
14026
|
],
|
|
14027
14027
|
keywords: E,
|
|
14028
14028
|
exports: {
|
|
14029
|
-
PARAMS_CONTAINS:
|
|
14030
|
-
CLASS_REFERENCE:
|
|
14029
|
+
PARAMS_CONTAINS: Tg,
|
|
14030
|
+
CLASS_REFERENCE: Eg
|
|
14031
14031
|
},
|
|
14032
14032
|
illegal: /#(?![$_A-z])/,
|
|
14033
14033
|
contains: [
|
|
@@ -14036,7 +14036,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14036
14036
|
binary: "node",
|
|
14037
14037
|
relevance: 5
|
|
14038
14038
|
}),
|
|
14039
|
-
|
|
14039
|
+
Dg,
|
|
14040
14040
|
e.APOS_STRING_MODE,
|
|
14041
14041
|
e.QUOTE_STRING_MODE,
|
|
14042
14042
|
z,
|
|
@@ -14046,13 +14046,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14046
14046
|
K,
|
|
14047
14047
|
{ match: /\$\d+/ },
|
|
14048
14048
|
I,
|
|
14049
|
-
|
|
14049
|
+
Eg,
|
|
14050
14050
|
{
|
|
14051
14051
|
scope: "attr",
|
|
14052
14052
|
match: g + n.lookahead(":"),
|
|
14053
14053
|
relevance: 0
|
|
14054
14054
|
},
|
|
14055
|
-
|
|
14055
|
+
Pg,
|
|
14056
14056
|
{
|
|
14057
14057
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14058
14058
|
keywords: "return throw case",
|
|
@@ -14062,7 +14062,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14062
14062
|
e.REGEXP_MODE,
|
|
14063
14063
|
{
|
|
14064
14064
|
className: "function",
|
|
14065
|
-
begin:
|
|
14065
|
+
begin: Ng,
|
|
14066
14066
|
returnBegin: !0,
|
|
14067
14067
|
end: "\\s*=>",
|
|
14068
14068
|
contains: [{
|
|
@@ -14083,7 +14083,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14083
14083
|
excludeBegin: !0,
|
|
14084
14084
|
excludeEnd: !0,
|
|
14085
14085
|
keywords: E,
|
|
14086
|
-
contains:
|
|
14086
|
+
contains: Tg
|
|
14087
14087
|
}
|
|
14088
14088
|
]
|
|
14089
14089
|
}]
|
|
@@ -14119,7 +14119,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14119
14119
|
}
|
|
14120
14120
|
]
|
|
14121
14121
|
},
|
|
14122
|
-
|
|
14122
|
+
Og,
|
|
14123
14123
|
{ beginKeywords: "while if switch catch for" },
|
|
14124
14124
|
{
|
|
14125
14125
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -14134,7 +14134,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14134
14134
|
match: /\.\.\./,
|
|
14135
14135
|
relevance: 0
|
|
14136
14136
|
},
|
|
14137
|
-
|
|
14137
|
+
jg,
|
|
14138
14138
|
{
|
|
14139
14139
|
match: "\\$" + g,
|
|
14140
14140
|
relevance: 0
|
|
@@ -14144,10 +14144,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14144
14144
|
className: { 1: "title.function" },
|
|
14145
14145
|
contains: [Z]
|
|
14146
14146
|
},
|
|
14147
|
-
|
|
14147
|
+
Ag,
|
|
14148
14148
|
$,
|
|
14149
14149
|
Q,
|
|
14150
|
-
|
|
14150
|
+
Mg,
|
|
14151
14151
|
{ match: /\$[(.]/ }
|
|
14152
14152
|
]
|
|
14153
14153
|
};
|
|
@@ -17669,7 +17669,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17669
17669
|
T,
|
|
17670
17670
|
E,
|
|
17671
17671
|
z
|
|
17672
|
-
],
|
|
17672
|
+
], Tg = {
|
|
17673
17673
|
begin: n.concat(/#\[\s*\\?/, n.either(a, o)),
|
|
17674
17674
|
beginScope: "meta",
|
|
17675
17675
|
end: /]/,
|
|
@@ -17699,7 +17699,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17699
17699
|
case_insensitive: !1,
|
|
17700
17700
|
keywords: I,
|
|
17701
17701
|
contains: [
|
|
17702
|
-
|
|
17702
|
+
Tg,
|
|
17703
17703
|
e.HASH_COMMENT_MODE,
|
|
17704
17704
|
e.COMMENT("//", "$"),
|
|
17705
17705
|
e.COMMENT("/\\*", "\\*/", { contains: [{
|
|
@@ -17762,7 +17762,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17762
17762
|
keywords: I,
|
|
17763
17763
|
contains: [
|
|
17764
17764
|
"self",
|
|
17765
|
-
|
|
17765
|
+
Tg,
|
|
17766
17766
|
s,
|
|
17767
17767
|
H,
|
|
17768
17768
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -21111,7 +21111,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21111
21111
|
$pattern: s(/\b\w+/, /#\w+/),
|
|
21112
21112
|
keyword: K.concat(T),
|
|
21113
21113
|
literal: _
|
|
21114
|
-
},
|
|
21114
|
+
}, Tg = [
|
|
21115
21115
|
O,
|
|
21116
21116
|
I,
|
|
21117
21117
|
q
|
|
@@ -21124,84 +21124,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21124
21124
|
}], Q = {
|
|
21125
21125
|
match: /->/,
|
|
21126
21126
|
relevance: 0
|
|
21127
|
-
},
|
|
21127
|
+
}, Eg = [Q, {
|
|
21128
21128
|
className: "operator",
|
|
21129
21129
|
relevance: 0,
|
|
21130
21130
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21131
|
-
}],
|
|
21131
|
+
}], Dg = "([0-9]_*)+", Og = "([0-9a-fA-F]_*)+", $ = {
|
|
21132
21132
|
className: "number",
|
|
21133
21133
|
relevance: 0,
|
|
21134
21134
|
variants: [
|
|
21135
|
-
{ match: `\\b(${
|
|
21136
|
-
{ match: `\\b0x(${
|
|
21135
|
+
{ match: `\\b(${Dg})(\\.(${Dg}))?([eE][+-]?(${Dg}))?\\b` },
|
|
21136
|
+
{ match: `\\b0x(${Og})(\\.(${Og}))?([pP][+-]?(${Dg}))?\\b` },
|
|
21137
21137
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21138
21138
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, kg = (e = "") => ({
|
|
21141
21141
|
className: "subst",
|
|
21142
21142
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21143
|
-
}),
|
|
21143
|
+
}), Ag = (e = "") => ({
|
|
21144
21144
|
className: "subst",
|
|
21145
21145
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21146
|
-
}),
|
|
21146
|
+
}), jg = (e = "") => ({
|
|
21147
21147
|
className: "subst",
|
|
21148
21148
|
label: "interpol",
|
|
21149
21149
|
begin: a(/\\/, e, /\(/),
|
|
21150
21150
|
end: /\)/
|
|
21151
|
-
}),
|
|
21151
|
+
}), Mg = (e = "") => ({
|
|
21152
21152
|
begin: a(e, /"""/),
|
|
21153
21153
|
end: a(/"""/, e),
|
|
21154
21154
|
contains: [
|
|
21155
|
-
|
|
21156
|
-
|
|
21157
|
-
|
|
21155
|
+
kg(e),
|
|
21156
|
+
Ag(e),
|
|
21157
|
+
jg(e)
|
|
21158
21158
|
]
|
|
21159
|
-
}),
|
|
21159
|
+
}), Ng = (e = "") => ({
|
|
21160
21160
|
begin: a(e, /"/),
|
|
21161
21161
|
end: a(/"/, e),
|
|
21162
|
-
contains: [
|
|
21163
|
-
}),
|
|
21162
|
+
contains: [kg(e), jg(e)]
|
|
21163
|
+
}), Pg = {
|
|
21164
21164
|
className: "string",
|
|
21165
21165
|
variants: [
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
|
|
21166
|
+
Mg(),
|
|
21167
|
+
Mg("#"),
|
|
21168
|
+
Mg("##"),
|
|
21169
|
+
Mg("###"),
|
|
21170
|
+
Ng(),
|
|
21171
|
+
Ng("#"),
|
|
21172
|
+
Ng("##"),
|
|
21173
|
+
Ng("###")
|
|
21174
21174
|
]
|
|
21175
|
-
},
|
|
21175
|
+
}, Fg = [e.BACKSLASH_ESCAPE, {
|
|
21176
21176
|
begin: /\[/,
|
|
21177
21177
|
end: /\]/,
|
|
21178
21178
|
relevance: 0,
|
|
21179
21179
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21180
|
-
}],
|
|
21180
|
+
}], Ig = {
|
|
21181
21181
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21182
21182
|
end: /\//,
|
|
21183
|
-
contains:
|
|
21184
|
-
},
|
|
21183
|
+
contains: Fg
|
|
21184
|
+
}, Lg = (e) => {
|
|
21185
21185
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21186
21186
|
return {
|
|
21187
21187
|
begin: n,
|
|
21188
21188
|
end: r,
|
|
21189
|
-
contains: [...
|
|
21189
|
+
contains: [...Fg, {
|
|
21190
21190
|
scope: "comment",
|
|
21191
21191
|
begin: `#(?!.*${r})`,
|
|
21192
21192
|
end: /$/
|
|
21193
21193
|
}]
|
|
21194
21194
|
};
|
|
21195
|
-
},
|
|
21195
|
+
}, Rg = {
|
|
21196
21196
|
scope: "regexp",
|
|
21197
21197
|
variants: [
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21198
|
+
Lg("###"),
|
|
21199
|
+
Lg("##"),
|
|
21200
|
+
Lg("#"),
|
|
21201
|
+
Ig
|
|
21202
21202
|
]
|
|
21203
|
-
},
|
|
21204
|
-
|
|
21203
|
+
}, zg = { match: a(/`/, z, /`/) }, Bg = [
|
|
21204
|
+
zg,
|
|
21205
21205
|
{
|
|
21206
21206
|
className: "variable",
|
|
21207
21207
|
match: /\$\d+/
|
|
@@ -21210,7 +21210,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21210
21210
|
className: "variable",
|
|
21211
21211
|
match: `\\$${L}+`
|
|
21212
21212
|
}
|
|
21213
|
-
],
|
|
21213
|
+
], Vg = [
|
|
21214
21214
|
{
|
|
21215
21215
|
match: /(@|#(un)?)available/,
|
|
21216
21216
|
scope: "keyword",
|
|
@@ -21219,9 +21219,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21219
21219
|
end: /\)/,
|
|
21220
21220
|
keywords: G,
|
|
21221
21221
|
contains: [
|
|
21222
|
-
...
|
|
21222
|
+
...Eg,
|
|
21223
21223
|
$,
|
|
21224
|
-
|
|
21224
|
+
Pg
|
|
21225
21225
|
]
|
|
21226
21226
|
}] }
|
|
21227
21227
|
},
|
|
@@ -21233,7 +21233,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21233
21233
|
scope: "meta",
|
|
21234
21234
|
match: a(/@/, z)
|
|
21235
21235
|
}
|
|
21236
|
-
],
|
|
21236
|
+
], Hg = {
|
|
21237
21237
|
match: i(/\b[A-Z]/),
|
|
21238
21238
|
relevance: 0,
|
|
21239
21239
|
contains: [
|
|
@@ -21259,20 +21259,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21259
21259
|
relevance: 0
|
|
21260
21260
|
}
|
|
21261
21261
|
]
|
|
21262
|
-
},
|
|
21262
|
+
}, Ug = {
|
|
21263
21263
|
begin: /</,
|
|
21264
21264
|
end: />/,
|
|
21265
21265
|
keywords: J,
|
|
21266
21266
|
contains: [
|
|
21267
21267
|
...o,
|
|
21268
|
-
...
|
|
21269
|
-
...
|
|
21268
|
+
...Tg,
|
|
21269
|
+
...Vg,
|
|
21270
21270
|
Q,
|
|
21271
|
-
|
|
21271
|
+
Hg
|
|
21272
21272
|
]
|
|
21273
21273
|
};
|
|
21274
|
-
|
|
21275
|
-
let
|
|
21274
|
+
Hg.contains.push(Ug);
|
|
21275
|
+
let Wg = {
|
|
21276
21276
|
begin: /\(/,
|
|
21277
21277
|
end: /\)/,
|
|
21278
21278
|
relevance: 0,
|
|
@@ -21285,22 +21285,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21285
21285
|
relevance: 0
|
|
21286
21286
|
},
|
|
21287
21287
|
...o,
|
|
21288
|
-
|
|
21289
|
-
...
|
|
21288
|
+
Rg,
|
|
21289
|
+
...Tg,
|
|
21290
21290
|
...Z,
|
|
21291
|
-
...
|
|
21291
|
+
...Eg,
|
|
21292
21292
|
$,
|
|
21293
|
-
|
|
21294
|
-
...
|
|
21295
|
-
...
|
|
21296
|
-
|
|
21293
|
+
Pg,
|
|
21294
|
+
...Bg,
|
|
21295
|
+
...Vg,
|
|
21296
|
+
Hg
|
|
21297
21297
|
]
|
|
21298
|
-
},
|
|
21298
|
+
}, Gg = {
|
|
21299
21299
|
begin: /</,
|
|
21300
21300
|
end: />/,
|
|
21301
21301
|
keywords: "repeat each",
|
|
21302
|
-
contains: [...o,
|
|
21303
|
-
},
|
|
21302
|
+
contains: [...o, Hg]
|
|
21303
|
+
}, Kg = {
|
|
21304
21304
|
begin: /\(/,
|
|
21305
21305
|
end: /\)/,
|
|
21306
21306
|
keywords: J,
|
|
@@ -21318,42 +21318,42 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21318
21318
|
}]
|
|
21319
21319
|
},
|
|
21320
21320
|
...o,
|
|
21321
|
-
...
|
|
21322
|
-
...
|
|
21321
|
+
...Tg,
|
|
21322
|
+
...Eg,
|
|
21323
21323
|
$,
|
|
21324
|
-
|
|
21325
|
-
...
|
|
21326
|
-
|
|
21327
|
-
|
|
21324
|
+
Pg,
|
|
21325
|
+
...Vg,
|
|
21326
|
+
Hg,
|
|
21327
|
+
Wg
|
|
21328
21328
|
],
|
|
21329
21329
|
endsParent: !0,
|
|
21330
21330
|
illegal: /["']/
|
|
21331
|
-
},
|
|
21331
|
+
}, qg = {
|
|
21332
21332
|
match: [
|
|
21333
21333
|
/(func|macro)/,
|
|
21334
21334
|
/\s+/,
|
|
21335
|
-
s(
|
|
21335
|
+
s(zg.match, z, j)
|
|
21336
21336
|
],
|
|
21337
21337
|
className: {
|
|
21338
21338
|
1: "keyword",
|
|
21339
21339
|
3: "title.function"
|
|
21340
21340
|
},
|
|
21341
21341
|
contains: [
|
|
21342
|
-
|
|
21343
|
-
|
|
21342
|
+
Gg,
|
|
21343
|
+
Kg,
|
|
21344
21344
|
n
|
|
21345
21345
|
],
|
|
21346
21346
|
illegal: [/\[/, /%/]
|
|
21347
|
-
},
|
|
21347
|
+
}, Jg = {
|
|
21348
21348
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21349
21349
|
className: { 1: "keyword" },
|
|
21350
21350
|
contains: [
|
|
21351
|
-
|
|
21352
|
-
|
|
21351
|
+
Gg,
|
|
21352
|
+
Kg,
|
|
21353
21353
|
n
|
|
21354
21354
|
],
|
|
21355
21355
|
illegal: /\[|%/
|
|
21356
|
-
},
|
|
21356
|
+
}, Yg = {
|
|
21357
21357
|
match: [
|
|
21358
21358
|
/operator/,
|
|
21359
21359
|
/\s+/,
|
|
@@ -21363,7 +21363,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21363
21363
|
1: "keyword",
|
|
21364
21364
|
3: "title"
|
|
21365
21365
|
}
|
|
21366
|
-
},
|
|
21366
|
+
}, Xg = {
|
|
21367
21367
|
begin: [
|
|
21368
21368
|
/precedencegroup/,
|
|
21369
21369
|
/\s+/,
|
|
@@ -21373,10 +21373,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21373
21373
|
1: "keyword",
|
|
21374
21374
|
3: "title"
|
|
21375
21375
|
},
|
|
21376
|
-
contains: [
|
|
21376
|
+
contains: [Hg],
|
|
21377
21377
|
keywords: [...v, ..._],
|
|
21378
21378
|
end: /}/
|
|
21379
|
-
},
|
|
21379
|
+
}, Zg = {
|
|
21380
21380
|
match: [
|
|
21381
21381
|
/class\b/,
|
|
21382
21382
|
/\s+/,
|
|
@@ -21389,7 +21389,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21389
21389
|
3: "keyword",
|
|
21390
21390
|
5: "title.function"
|
|
21391
21391
|
}
|
|
21392
|
-
},
|
|
21392
|
+
}, Qg = {
|
|
21393
21393
|
match: [
|
|
21394
21394
|
/class\b/,
|
|
21395
21395
|
/\s+/,
|
|
@@ -21399,7 +21399,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21399
21399
|
1: "keyword",
|
|
21400
21400
|
3: "keyword"
|
|
21401
21401
|
}
|
|
21402
|
-
},
|
|
21402
|
+
}, $g = {
|
|
21403
21403
|
begin: [
|
|
21404
21404
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21405
21405
|
/\s+/,
|
|
@@ -21412,8 +21412,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21412
21412
|
},
|
|
21413
21413
|
keywords: J,
|
|
21414
21414
|
contains: [
|
|
21415
|
-
|
|
21416
|
-
...
|
|
21415
|
+
Gg,
|
|
21416
|
+
...Tg,
|
|
21417
21417
|
{
|
|
21418
21418
|
begin: /:/,
|
|
21419
21419
|
end: /\{/,
|
|
@@ -21421,21 +21421,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21421
21421
|
contains: [{
|
|
21422
21422
|
scope: "title.class.inherited",
|
|
21423
21423
|
match: B
|
|
21424
|
-
}, ...
|
|
21424
|
+
}, ...Tg],
|
|
21425
21425
|
relevance: 0
|
|
21426
21426
|
}
|
|
21427
21427
|
]
|
|
21428
21428
|
};
|
|
21429
|
-
for (let e of
|
|
21429
|
+
for (let e of Pg.variants) {
|
|
21430
21430
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21431
21431
|
n.keywords = J;
|
|
21432
21432
|
let r = [
|
|
21433
|
-
...
|
|
21433
|
+
...Tg,
|
|
21434
21434
|
...Z,
|
|
21435
|
-
...
|
|
21435
|
+
...Eg,
|
|
21436
21436
|
$,
|
|
21437
|
-
|
|
21438
|
-
...
|
|
21437
|
+
Pg,
|
|
21438
|
+
...Bg
|
|
21439
21439
|
];
|
|
21440
21440
|
n.contains = [...r, {
|
|
21441
21441
|
begin: /\(/,
|
|
@@ -21448,29 +21448,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21448
21448
|
keywords: J,
|
|
21449
21449
|
contains: [
|
|
21450
21450
|
...o,
|
|
21451
|
-
|
|
21451
|
+
qg,
|
|
21452
|
+
Jg,
|
|
21452
21453
|
Zg,
|
|
21453
|
-
e_,
|
|
21454
|
-
t_,
|
|
21455
|
-
n_,
|
|
21456
21454
|
Qg,
|
|
21457
21455
|
$g,
|
|
21456
|
+
Yg,
|
|
21457
|
+
Xg,
|
|
21458
21458
|
{
|
|
21459
21459
|
beginKeywords: "import",
|
|
21460
21460
|
end: /$/,
|
|
21461
21461
|
contains: [...o],
|
|
21462
21462
|
relevance: 0
|
|
21463
21463
|
},
|
|
21464
|
-
|
|
21465
|
-
...
|
|
21464
|
+
Rg,
|
|
21465
|
+
...Tg,
|
|
21466
21466
|
...Z,
|
|
21467
|
-
...
|
|
21467
|
+
...Eg,
|
|
21468
21468
|
$,
|
|
21469
|
-
|
|
21470
|
-
...
|
|
21471
|
-
...
|
|
21472
|
-
|
|
21473
|
-
|
|
21469
|
+
Pg,
|
|
21470
|
+
...Bg,
|
|
21471
|
+
...Vg,
|
|
21472
|
+
Hg,
|
|
21473
|
+
Wg
|
|
21474
21474
|
]
|
|
21475
21475
|
};
|
|
21476
21476
|
}
|
|
@@ -22138,7 +22138,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22138
22138
|
keywords: E,
|
|
22139
22139
|
contains: ["self"].concat(q)
|
|
22140
22140
|
});
|
|
22141
|
-
let J = [].concat(K, L.contains),
|
|
22141
|
+
let J = [].concat(K, L.contains), Tg = J.concat([{
|
|
22142
22142
|
begin: /(\s*)\(/,
|
|
22143
22143
|
end: /\)/,
|
|
22144
22144
|
keywords: E,
|
|
@@ -22150,7 +22150,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22150
22150
|
excludeBegin: !0,
|
|
22151
22151
|
excludeEnd: !0,
|
|
22152
22152
|
keywords: E,
|
|
22153
|
-
contains:
|
|
22153
|
+
contains: Tg
|
|
22154
22154
|
}, Q = { variants: [{
|
|
22155
22155
|
match: [
|
|
22156
22156
|
/class/,
|
|
@@ -22177,17 +22177,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22177
22177
|
1: "keyword",
|
|
22178
22178
|
3: "title.class"
|
|
22179
22179
|
}
|
|
22180
|
-
}] },
|
|
22180
|
+
}] }, Eg = {
|
|
22181
22181
|
relevance: 0,
|
|
22182
22182
|
match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
22183
22183
|
className: "title.class",
|
|
22184
22184
|
keywords: { _: [...o, ...s] }
|
|
22185
|
-
},
|
|
22185
|
+
}, Dg = {
|
|
22186
22186
|
label: "use_strict",
|
|
22187
22187
|
className: "meta",
|
|
22188
22188
|
relevance: 10,
|
|
22189
22189
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22190
|
-
},
|
|
22190
|
+
}, Og = {
|
|
22191
22191
|
variants: [{ match: [
|
|
22192
22192
|
/function/,
|
|
22193
22193
|
/\s+/,
|
|
@@ -22206,25 +22206,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22206
22206
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22207
22207
|
className: "variable.constant"
|
|
22208
22208
|
};
|
|
22209
|
-
function
|
|
22209
|
+
function kg(e) {
|
|
22210
22210
|
return n.concat("(?!", e.join("|"), ")");
|
|
22211
22211
|
}
|
|
22212
|
-
let
|
|
22213
|
-
match: n.concat(/\b/,
|
|
22212
|
+
let Ag = {
|
|
22213
|
+
match: n.concat(/\b/, kg([
|
|
22214
22214
|
...l,
|
|
22215
22215
|
"super",
|
|
22216
22216
|
"import"
|
|
22217
22217
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22218
22218
|
className: "title.function",
|
|
22219
22219
|
relevance: 0
|
|
22220
|
-
},
|
|
22220
|
+
}, jg = {
|
|
22221
22221
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22222
22222
|
end: g,
|
|
22223
22223
|
excludeBegin: !0,
|
|
22224
22224
|
keywords: "prototype",
|
|
22225
22225
|
className: "property",
|
|
22226
22226
|
relevance: 0
|
|
22227
|
-
},
|
|
22227
|
+
}, Mg = {
|
|
22228
22228
|
match: [
|
|
22229
22229
|
/get|set/,
|
|
22230
22230
|
/\s+/,
|
|
@@ -22236,7 +22236,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22236
22236
|
3: "title.function"
|
|
22237
22237
|
},
|
|
22238
22238
|
contains: [{ begin: /\(\)/ }, Z]
|
|
22239
|
-
},
|
|
22239
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
22240
22240
|
match: [
|
|
22241
22241
|
/const|var|let/,
|
|
22242
22242
|
/\s+/,
|
|
@@ -22244,7 +22244,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22244
22244
|
/\s*/,
|
|
22245
22245
|
/=\s*/,
|
|
22246
22246
|
/(async\s*)?/,
|
|
22247
|
-
n.lookahead(
|
|
22247
|
+
n.lookahead(Ng)
|
|
22248
22248
|
],
|
|
22249
22249
|
keywords: "async",
|
|
22250
22250
|
className: {
|
|
@@ -22263,8 +22263,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22263
22263
|
],
|
|
22264
22264
|
keywords: E,
|
|
22265
22265
|
exports: {
|
|
22266
|
-
PARAMS_CONTAINS:
|
|
22267
|
-
CLASS_REFERENCE:
|
|
22266
|
+
PARAMS_CONTAINS: Tg,
|
|
22267
|
+
CLASS_REFERENCE: Eg
|
|
22268
22268
|
},
|
|
22269
22269
|
illegal: /#(?![$_A-z])/,
|
|
22270
22270
|
contains: [
|
|
@@ -22273,7 +22273,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22273
22273
|
binary: "node",
|
|
22274
22274
|
relevance: 5
|
|
22275
22275
|
}),
|
|
22276
|
-
|
|
22276
|
+
Dg,
|
|
22277
22277
|
e.APOS_STRING_MODE,
|
|
22278
22278
|
e.QUOTE_STRING_MODE,
|
|
22279
22279
|
z,
|
|
@@ -22283,13 +22283,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22283
22283
|
K,
|
|
22284
22284
|
{ match: /\$\d+/ },
|
|
22285
22285
|
I,
|
|
22286
|
-
|
|
22286
|
+
Eg,
|
|
22287
22287
|
{
|
|
22288
22288
|
scope: "attr",
|
|
22289
22289
|
match: g + n.lookahead(":"),
|
|
22290
22290
|
relevance: 0
|
|
22291
22291
|
},
|
|
22292
|
-
|
|
22292
|
+
Pg,
|
|
22293
22293
|
{
|
|
22294
22294
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22295
22295
|
keywords: "return throw case",
|
|
@@ -22299,7 +22299,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22299
22299
|
e.REGEXP_MODE,
|
|
22300
22300
|
{
|
|
22301
22301
|
className: "function",
|
|
22302
|
-
begin:
|
|
22302
|
+
begin: Ng,
|
|
22303
22303
|
returnBegin: !0,
|
|
22304
22304
|
end: "\\s*=>",
|
|
22305
22305
|
contains: [{
|
|
@@ -22320,7 +22320,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22320
22320
|
excludeBegin: !0,
|
|
22321
22321
|
excludeEnd: !0,
|
|
22322
22322
|
keywords: E,
|
|
22323
|
-
contains:
|
|
22323
|
+
contains: Tg
|
|
22324
22324
|
}
|
|
22325
22325
|
]
|
|
22326
22326
|
}]
|
|
@@ -22356,7 +22356,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22356
22356
|
}
|
|
22357
22357
|
]
|
|
22358
22358
|
},
|
|
22359
|
-
|
|
22359
|
+
Og,
|
|
22360
22360
|
{ beginKeywords: "while if switch catch for" },
|
|
22361
22361
|
{
|
|
22362
22362
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -22371,7 +22371,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22371
22371
|
match: /\.\.\./,
|
|
22372
22372
|
relevance: 0
|
|
22373
22373
|
},
|
|
22374
|
-
|
|
22374
|
+
jg,
|
|
22375
22375
|
{
|
|
22376
22376
|
match: "\\$" + g,
|
|
22377
22377
|
relevance: 0
|
|
@@ -22381,10 +22381,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22381
22381
|
className: { 1: "title.function" },
|
|
22382
22382
|
contains: [Z]
|
|
22383
22383
|
},
|
|
22384
|
-
|
|
22384
|
+
Ag,
|
|
22385
22385
|
$,
|
|
22386
22386
|
Q,
|
|
22387
|
-
|
|
22387
|
+
Mg,
|
|
22388
22388
|
{ match: /\$[(.]/ }
|
|
22389
22389
|
]
|
|
22390
22390
|
};
|
|
@@ -23422,7 +23422,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23422
23422
|
})), es_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
23423
23423
|
var r = require_core();
|
|
23424
23424
|
r.registerLanguage("1c", require__1c()), r.registerLanguage("abnf", require_abnf()), r.registerLanguage("accesslog", require_accesslog()), r.registerLanguage("actionscript", require_actionscript()), r.registerLanguage("ada", require_ada()), r.registerLanguage("angelscript", require_angelscript()), r.registerLanguage("apache", require_apache()), r.registerLanguage("applescript", require_applescript()), r.registerLanguage("arcade", require_arcade()), r.registerLanguage("arduino", require_arduino()), r.registerLanguage("armasm", require_armasm()), r.registerLanguage("xml", require_xml()), r.registerLanguage("asciidoc", require_asciidoc()), r.registerLanguage("aspectj", require_aspectj()), r.registerLanguage("autohotkey", require_autohotkey()), r.registerLanguage("autoit", require_autoit()), r.registerLanguage("avrasm", require_avrasm()), r.registerLanguage("awk", require_awk()), r.registerLanguage("axapta", require_axapta()), r.registerLanguage("bash", require_bash()), r.registerLanguage("basic", require_basic()), r.registerLanguage("bnf", require_bnf()), r.registerLanguage("brainfuck", require_brainfuck()), r.registerLanguage("c", require_c()), r.registerLanguage("cal", require_cal()), r.registerLanguage("capnproto", require_capnproto()), r.registerLanguage("ceylon", require_ceylon()), r.registerLanguage("clean", require_clean()), r.registerLanguage("clojure", require_clojure()), r.registerLanguage("clojure-repl", require_clojure_repl()), r.registerLanguage("cmake", require_cmake()), r.registerLanguage("coffeescript", require_coffeescript()), r.registerLanguage("coq", require_coq()), r.registerLanguage("cos", require_cos()), r.registerLanguage("cpp", require_cpp()), r.registerLanguage("crmsh", require_crmsh()), r.registerLanguage("crystal", require_crystal()), r.registerLanguage("csharp", require_csharp()), r.registerLanguage("csp", require_csp()), r.registerLanguage("css", require_css()), r.registerLanguage("d", require_d()), r.registerLanguage("markdown", require_markdown()), r.registerLanguage("dart", require_dart()), r.registerLanguage("delphi", require_delphi()), r.registerLanguage("diff", require_diff()), r.registerLanguage("django", require_django()), r.registerLanguage("dns", require_dns()), r.registerLanguage("dockerfile", require_dockerfile()), r.registerLanguage("dos", require_dos()), r.registerLanguage("dsconfig", require_dsconfig()), r.registerLanguage("dts", require_dts()), r.registerLanguage("dust", require_dust()), r.registerLanguage("ebnf", require_ebnf()), r.registerLanguage("elixir", require_elixir()), r.registerLanguage("elm", require_elm()), r.registerLanguage("ruby", require_ruby()), r.registerLanguage("erb", require_erb()), r.registerLanguage("erlang-repl", require_erlang_repl()), r.registerLanguage("erlang", require_erlang()), r.registerLanguage("excel", require_excel()), r.registerLanguage("fix", require_fix()), r.registerLanguage("flix", require_flix()), r.registerLanguage("fortran", require_fortran()), r.registerLanguage("fsharp", require_fsharp()), r.registerLanguage("gams", require_gams()), r.registerLanguage("gauss", require_gauss()), r.registerLanguage("gcode", require_gcode()), r.registerLanguage("gherkin", require_gherkin()), r.registerLanguage("glsl", require_glsl()), r.registerLanguage("gml", require_gml()), r.registerLanguage("go", require_go()), r.registerLanguage("golo", require_golo()), r.registerLanguage("gradle", require_gradle()), r.registerLanguage("graphql", require_graphql()), r.registerLanguage("groovy", require_groovy()), r.registerLanguage("haml", require_haml()), r.registerLanguage("handlebars", require_handlebars()), r.registerLanguage("haskell", require_haskell()), r.registerLanguage("haxe", require_haxe()), r.registerLanguage("hsp", require_hsp()), r.registerLanguage("http", require_http()), r.registerLanguage("hy", require_hy()), r.registerLanguage("inform7", require_inform7()), r.registerLanguage("ini", require_ini()), r.registerLanguage("irpf90", require_irpf90()), r.registerLanguage("isbl", require_isbl()), r.registerLanguage("java", require_java()), r.registerLanguage("javascript", require_javascript()), r.registerLanguage("jboss-cli", require_jboss_cli()), r.registerLanguage("json", require_json()), r.registerLanguage("julia", require_julia()), r.registerLanguage("julia-repl", require_julia_repl()), r.registerLanguage("kotlin", require_kotlin()), r.registerLanguage("lasso", require_lasso()), r.registerLanguage("latex", require_latex()), r.registerLanguage("ldif", require_ldif()), r.registerLanguage("leaf", require_leaf()), r.registerLanguage("less", require_less()), r.registerLanguage("lisp", require_lisp()), r.registerLanguage("livecodeserver", require_livecodeserver()), r.registerLanguage("livescript", require_livescript()), r.registerLanguage("llvm", require_llvm()), r.registerLanguage("lsl", require_lsl()), r.registerLanguage("lua", require_lua()), r.registerLanguage("makefile", require_makefile()), r.registerLanguage("mathematica", require_mathematica()), r.registerLanguage("matlab", require_matlab()), r.registerLanguage("maxima", require_maxima()), r.registerLanguage("mel", require_mel()), r.registerLanguage("mercury", require_mercury()), r.registerLanguage("mipsasm", require_mipsasm()), r.registerLanguage("mizar", require_mizar()), r.registerLanguage("perl", require_perl()), r.registerLanguage("mojolicious", require_mojolicious()), r.registerLanguage("monkey", require_monkey()), r.registerLanguage("moonscript", require_moonscript()), r.registerLanguage("n1ql", require_n1ql()), r.registerLanguage("nestedtext", require_nestedtext()), r.registerLanguage("nginx", require_nginx()), r.registerLanguage("nim", require_nim()), r.registerLanguage("nix", require_nix()), r.registerLanguage("node-repl", require_node_repl()), r.registerLanguage("nsis", require_nsis()), r.registerLanguage("objectivec", require_objectivec()), r.registerLanguage("ocaml", require_ocaml()), r.registerLanguage("openscad", require_openscad()), r.registerLanguage("oxygene", require_oxygene()), r.registerLanguage("parser3", require_parser3()), r.registerLanguage("pf", require_pf()), r.registerLanguage("pgsql", require_pgsql()), r.registerLanguage("php", require_php()), r.registerLanguage("php-template", require_php_template()), r.registerLanguage("plaintext", require_plaintext()), r.registerLanguage("pony", require_pony()), r.registerLanguage("powershell", require_powershell()), r.registerLanguage("processing", require_processing()), r.registerLanguage("profile", require_profile()), r.registerLanguage("prolog", require_prolog()), r.registerLanguage("properties", require_properties()), r.registerLanguage("protobuf", require_protobuf()), r.registerLanguage("puppet", require_puppet()), r.registerLanguage("purebasic", require_purebasic()), r.registerLanguage("python", require_python()), r.registerLanguage("python-repl", require_python_repl()), r.registerLanguage("q", require_q()), r.registerLanguage("qml", require_qml()), r.registerLanguage("r", require_r()), r.registerLanguage("reasonml", require_reasonml()), r.registerLanguage("rib", require_rib()), r.registerLanguage("roboconf", require_roboconf()), r.registerLanguage("routeros", require_routeros()), r.registerLanguage("rsl", require_rsl()), r.registerLanguage("ruleslanguage", require_ruleslanguage()), r.registerLanguage("rust", require_rust()), r.registerLanguage("sas", require_sas()), r.registerLanguage("scala", require_scala()), r.registerLanguage("scheme", require_scheme()), r.registerLanguage("scilab", require_scilab()), r.registerLanguage("scss", require_scss()), r.registerLanguage("shell", require_shell()), r.registerLanguage("smali", require_smali()), r.registerLanguage("smalltalk", require_smalltalk()), r.registerLanguage("sml", require_sml()), r.registerLanguage("sqf", require_sqf()), r.registerLanguage("sql", require_sql()), r.registerLanguage("stan", require_stan()), r.registerLanguage("stata", require_stata()), r.registerLanguage("step21", require_step21()), r.registerLanguage("stylus", require_stylus()), r.registerLanguage("subunit", require_subunit()), r.registerLanguage("swift", require_swift()), r.registerLanguage("taggerscript", require_taggerscript()), r.registerLanguage("yaml", require_yaml()), r.registerLanguage("tap", require_tap()), r.registerLanguage("tcl", require_tcl()), r.registerLanguage("thrift", require_thrift()), r.registerLanguage("tp", require_tp()), r.registerLanguage("twig", require_twig()), r.registerLanguage("typescript", require_typescript()), r.registerLanguage("vala", require_vala()), r.registerLanguage("vbnet", require_vbnet()), r.registerLanguage("vbscript", require_vbscript()), r.registerLanguage("vbscript-html", require_vbscript_html()), r.registerLanguage("verilog", require_verilog()), r.registerLanguage("vhdl", require_vhdl()), r.registerLanguage("vim", require_vim()), r.registerLanguage("wasm", require_wasm()), r.registerLanguage("wren", require_wren()), r.registerLanguage("x86asm", require_x86asm()), r.registerLanguage("xl", require_xl()), r.registerLanguage("xquery", require_xquery()), r.registerLanguage("zephir", require_zephir()), r.HighlightJS = r, r.default = r, n.exports = r;
|
|
23425
|
-
})))())).default, _hoisted_1$
|
|
23425
|
+
})))())).default, _hoisted_1$39 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
|
|
23426
23426
|
__name: "tool-btn",
|
|
23427
23427
|
props: {
|
|
23428
23428
|
description: {},
|
|
@@ -23451,9 +23451,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23451
23451
|
}]),
|
|
23452
23452
|
style: normalizeStyle({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
|
|
23453
23453
|
onClick: o
|
|
23454
|
-
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23454
|
+
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$39, toDisplayString(e.name), 1))], 6)), [[unref(directive), a.value]]);
|
|
23455
23455
|
}
|
|
23456
|
-
}), _hoisted_1$
|
|
23456
|
+
}), _hoisted_1$38 = { class: "code-content-wrapper" }, _hoisted_2$27 = { class: "code-content-header" }, _hoisted_3$19 = { class: "code-header-language" }, _hoisted_4$17 = { class: "hljs-pre" }, _hoisted_5$11 = ["innerHTML"], _hoisted_6$6 = ["innerHTML"], MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
|
|
23457
23457
|
__name: "code-content",
|
|
23458
23458
|
props: { token: {} },
|
|
23459
23459
|
emits: ["mounted"],
|
|
@@ -23527,7 +23527,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23527
23527
|
let e = a.value?.innerText;
|
|
23528
23528
|
e && l(e);
|
|
23529
23529
|
};
|
|
23530
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23530
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$38, [createElementVNode("div", _hoisted_2$27, [createElementVNode("span", _hoisted_3$19, toDisplayString(s.value), 1), createVNode(tool_btn_default, {
|
|
23531
23531
|
id: "copy",
|
|
23532
23532
|
description: "复制",
|
|
23533
23533
|
name: "复制",
|
|
@@ -23550,7 +23550,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23550
23550
|
}, null, 8, _hoisted_6$6)) : createCommentVNode("v-if", !0)
|
|
23551
23551
|
], 2)])]));
|
|
23552
23552
|
}
|
|
23553
|
-
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$
|
|
23553
|
+
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$37 = { class: "md-image-wrapper" }, _hoisted_2$26 = {
|
|
23554
23554
|
key: 0,
|
|
23555
23555
|
class: "md-image-loading"
|
|
23556
23556
|
}, _hoisted_3$18 = { class: "md-image-loading-text" }, _hoisted_4$16 = { class: "md-image-error" }, _hoisted_5$10 = { class: "md-image-error-text" }, _hoisted_6$5 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -23601,7 +23601,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23601
23601
|
l.value = !1, E(), k.value ? j(e) : (a.value = !0, s.value = !1);
|
|
23602
23602
|
}, { immediate: !0 }), watch(k, (e) => {
|
|
23603
23603
|
e && r.src && j(r.src);
|
|
23604
|
-
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$
|
|
23604
|
+
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$37, [createCommentVNode(" 加载中、URL 不完整、或 URL 不稳定时显示 Loading "), m.value ? (openBlock(), createElementBlock("span", _hoisted_2$26, [createVNode(unref(Loading), {
|
|
23605
23605
|
mode: "spin",
|
|
23606
23606
|
size: "mini",
|
|
23607
23607
|
theme: "primary"
|
|
@@ -23833,7 +23833,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23833
23833
|
innerHTML: r.value
|
|
23834
23834
|
}, null, 8, ["class", "innerHTML"]));
|
|
23835
23835
|
}
|
|
23836
|
-
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
23836
|
+
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$36 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
|
|
23837
23837
|
__name: "mermaid-content",
|
|
23838
23838
|
props: { token: {} },
|
|
23839
23839
|
emits: ["mounted"],
|
|
@@ -23882,13 +23882,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23882
23882
|
ref: i,
|
|
23883
23883
|
class: "mermaid-content",
|
|
23884
23884
|
innerHTML: r.value
|
|
23885
|
-
}, null, 8, _hoisted_1$
|
|
23885
|
+
}, null, 8, _hoisted_1$36));
|
|
23886
23886
|
}
|
|
23887
|
-
}), _hoisted_1$
|
|
23887
|
+
}), _hoisted_1$35 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
|
|
23888
23888
|
__name: "common-error-content",
|
|
23889
23889
|
props: { content: {} },
|
|
23890
23890
|
setup(e) {
|
|
23891
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23891
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$35, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
|
|
23892
23892
|
}
|
|
23893
23893
|
}), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
|
|
23894
23894
|
keyCounterMap = /* @__PURE__ */ new Map();
|
|
@@ -24051,7 +24051,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24051
24051
|
setup(e) {
|
|
24052
24052
|
return () => tokensToVNodes(e.tokens, e.options);
|
|
24053
24053
|
}
|
|
24054
|
-
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
24054
|
+
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$34 = { class: "markdown-content" }, _hoisted_2$25 = {
|
|
24055
24055
|
key: 1,
|
|
24056
24056
|
class: "markdown-body"
|
|
24057
24057
|
}, markdown_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -24144,7 +24144,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24144
24144
|
leading: !0,
|
|
24145
24145
|
trailing: !0
|
|
24146
24146
|
});
|
|
24147
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24147
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$34, [e.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
24148
24148
|
key: 0,
|
|
24149
24149
|
content: e.content
|
|
24150
24150
|
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$25, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e, n) => (openBlock(), createElementBlock(Fragment, { key: n }, [d(e) ? (openBlock(), createBlock(unref(mermaid_content_default), {
|
|
@@ -24166,7 +24166,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24166
24166
|
onVnodeMounted: unref(E)
|
|
24167
24167
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
24168
24168
|
}
|
|
24169
|
-
}), _hoisted_1$
|
|
24169
|
+
}), _hoisted_1$33 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
|
|
24170
24170
|
__name: "reference-content",
|
|
24171
24171
|
props: { content: {} },
|
|
24172
24172
|
setup(e) {
|
|
@@ -24186,7 +24186,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24186
24186
|
createElementVNode("span", {
|
|
24187
24187
|
class: "ai-reference-item-title",
|
|
24188
24188
|
onClick: (n) => e.url && r(e.url, n)
|
|
24189
|
-
}, toDisplayString(e.title), 9, _hoisted_1$
|
|
24189
|
+
}, toDisplayString(e.title), 9, _hoisted_1$33),
|
|
24190
24190
|
e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
|
|
24191
24191
|
key: 0,
|
|
24192
24192
|
onClick: (n) => e.url && r(e.url, n)
|
|
@@ -24574,7 +24574,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24574
24574
|
}, g();
|
|
24575
24575
|
let J = createMutationObserver(r, () => {
|
|
24576
24576
|
H && setSelectionToDOM(K, r, d, q);
|
|
24577
|
-
}),
|
|
24577
|
+
}), Tg = () => {
|
|
24578
24578
|
d = takeSelectionSnapshot(r, q);
|
|
24579
24579
|
}, Z = () => {
|
|
24580
24580
|
let e = J._flush();
|
|
@@ -24599,13 +24599,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24599
24599
|
r && (l(n(r[0])), d = r[1]);
|
|
24600
24600
|
}
|
|
24601
24601
|
}
|
|
24602
|
-
},
|
|
24602
|
+
}, Eg = () => {
|
|
24603
24603
|
B || Z();
|
|
24604
|
-
},
|
|
24604
|
+
}, Dg = (e) => {
|
|
24605
24605
|
e.preventDefault();
|
|
24606
24606
|
let n = e.inputType;
|
|
24607
24607
|
if (n.startsWith("format") || n === "historyUndo" || n === "historyRedo") return;
|
|
24608
|
-
B ? J._record(!0) :
|
|
24608
|
+
B ? J._record(!0) : Tg();
|
|
24609
24609
|
let i = e.getTargetRanges()[0];
|
|
24610
24610
|
if (i) {
|
|
24611
24611
|
let a = serializeRange(r, q, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
@@ -24616,31 +24616,31 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24616
24616
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24617
24617
|
}
|
|
24618
24618
|
B || Z();
|
|
24619
|
-
},
|
|
24620
|
-
B ||
|
|
24619
|
+
}, Og = () => {
|
|
24620
|
+
B || Tg(), B = !0;
|
|
24621
24621
|
}, $ = () => {
|
|
24622
24622
|
Z();
|
|
24623
|
-
},
|
|
24624
|
-
H = !0,
|
|
24625
|
-
},
|
|
24623
|
+
}, kg = () => {
|
|
24624
|
+
H = !0, Tg();
|
|
24625
|
+
}, Ag = () => {
|
|
24626
24626
|
H = !1;
|
|
24627
|
-
},
|
|
24627
|
+
}, jg = () => {
|
|
24628
24628
|
if (L) {
|
|
24629
24629
|
L = !1;
|
|
24630
24630
|
return;
|
|
24631
24631
|
}
|
|
24632
|
-
H && !B && !G &&
|
|
24632
|
+
H && !B && !G && Tg();
|
|
24633
|
+
}, Mg = (e) => {
|
|
24634
|
+
Tg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24635
|
+
}, Ng = (e) => {
|
|
24636
|
+
e.preventDefault(), Mg(e.clipboardData);
|
|
24637
|
+
}, Pg = (e) => {
|
|
24638
|
+
e.preventDefault(), m || (Mg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24633
24639
|
}, Fg = (e) => {
|
|
24634
|
-
Og(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24635
|
-
}, Ig = (e) => {
|
|
24636
|
-
e.preventDefault(), Fg(e.clipboardData);
|
|
24637
|
-
}, Lg = (e) => {
|
|
24638
|
-
e.preventDefault(), m || (Fg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24639
|
-
}, Rg = (e) => {
|
|
24640
24640
|
e.preventDefault();
|
|
24641
24641
|
let [n, r] = range(d);
|
|
24642
24642
|
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, q)));
|
|
24643
|
-
},
|
|
24643
|
+
}, Ig = (e) => {
|
|
24644
24644
|
e.preventDefault();
|
|
24645
24645
|
let n = e.dataTransfer, i = getPointedCaretPosition(K, r, e, q);
|
|
24646
24646
|
if (n && i) {
|
|
@@ -24649,13 +24649,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24649
24649
|
let o = e.transform(i);
|
|
24650
24650
|
e.select(o, o).insert(o, a(n, q)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24651
24651
|
}
|
|
24652
|
-
},
|
|
24653
|
-
G = !0,
|
|
24654
|
-
},
|
|
24652
|
+
}, Lg = (e) => {
|
|
24653
|
+
G = !0, Mg(e.dataTransfer);
|
|
24654
|
+
}, Rg = () => {
|
|
24655
24655
|
G = !1;
|
|
24656
24656
|
};
|
|
24657
|
-
return K.addEventListener("selectionchange",
|
|
24658
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange",
|
|
24657
|
+
return K.addEventListener("selectionchange", jg), r.addEventListener("keydown", Q), r.addEventListener("input", Eg), r.addEventListener("beforeinput", Dg), r.addEventListener("compositionstart", Og), r.addEventListener("compositionend", $), r.addEventListener("focus", kg), r.addEventListener("blur", Ag), r.addEventListener("copy", Ng), r.addEventListener("cut", Pg), r.addEventListener("paste", Fg), r.addEventListener("drop", Ig), r.addEventListener("dragstart", Lg), r.addEventListener("dragend", Rg), () => {
|
|
24658
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange", jg), r.removeEventListener("keydown", Q), r.removeEventListener("input", Eg), r.removeEventListener("beforeinput", Dg), r.removeEventListener("compositionstart", Og), r.removeEventListener("compositionend", $), r.removeEventListener("focus", kg), r.removeEventListener("blur", Ag), r.removeEventListener("copy", Ng), r.removeEventListener("cut", Pg), r.removeEventListener("paste", Fg), r.removeEventListener("drop", Ig), r.removeEventListener("dragstart", Lg), r.removeEventListener("dragend", Rg));
|
|
24659
24659
|
};
|
|
24660
24660
|
},
|
|
24661
24661
|
command: (e, ...n) => {
|
|
@@ -24727,6 +24727,7 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
|
|
|
24727
24727
|
tool: "工具",
|
|
24728
24728
|
mcp: "MCP",
|
|
24729
24729
|
doc: "知识库",
|
|
24730
|
+
knowledgebase: "知识库",
|
|
24730
24731
|
shortcut: "快捷指令"
|
|
24731
24732
|
};
|
|
24732
24733
|
let UploadStatus = /* @__PURE__ */ function(e) {
|
|
@@ -24734,7 +24735,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
|
|
|
24734
24735
|
}({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
|
|
24735
24736
|
return e.Disabled = "disabled", e.Hidden = "hidden", e;
|
|
24736
24737
|
}({});
|
|
24737
|
-
var _hoisted_1$
|
|
24738
|
+
var _hoisted_1$32 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
|
|
24738
24739
|
__name: "file-upload-btn",
|
|
24739
24740
|
props: {
|
|
24740
24741
|
accept: { default: "image/*" },
|
|
@@ -24762,7 +24763,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24762
24763
|
}
|
|
24763
24764
|
n.value = "";
|
|
24764
24765
|
};
|
|
24765
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24766
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$32, [createElementVNode("input", {
|
|
24766
24767
|
ref_key: "fileInputRef",
|
|
24767
24768
|
ref: a,
|
|
24768
24769
|
accept: e.accept,
|
|
@@ -24779,14 +24780,14 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24779
24780
|
offset: [0, 16]
|
|
24780
24781
|
}]])]));
|
|
24781
24782
|
}
|
|
24782
|
-
}), _hoisted_1$
|
|
24783
|
+
}), _hoisted_1$31 = { class: "ai-cite-content" }, _hoisted_2$23 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
|
|
24783
24784
|
__name: "cite-content",
|
|
24784
24785
|
props: {
|
|
24785
24786
|
content: {},
|
|
24786
24787
|
onClose: { type: Function }
|
|
24787
24788
|
},
|
|
24788
24789
|
setup(e) {
|
|
24789
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24790
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$31, [
|
|
24790
24791
|
createVNode(unref(CiteIcon)),
|
|
24791
24792
|
createElementVNode("span", _hoisted_2$23, toDisplayString(e.content), 1),
|
|
24792
24793
|
e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
|
|
@@ -24795,7 +24796,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24795
24796
|
})) : createCommentVNode("v-if", !0)
|
|
24796
24797
|
]));
|
|
24797
24798
|
}
|
|
24798
|
-
}), _hoisted_1$
|
|
24799
|
+
}), _hoisted_1$30 = { class: "ai-files-content" }, _hoisted_2$22 = [
|
|
24799
24800
|
"alt",
|
|
24800
24801
|
"src",
|
|
24801
24802
|
"onError"
|
|
@@ -24818,7 +24819,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24818
24819
|
}, u = (e) => {
|
|
24819
24820
|
r("deleteFile", e);
|
|
24820
24821
|
};
|
|
24821
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24822
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$30, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.files, (n) => (openBlock(), createElementBlock("div", {
|
|
24822
24823
|
key: n.file?.name,
|
|
24823
24824
|
class: normalizeClass(["file-content", { "is-file-object": !a(n) || i[s(n)] }])
|
|
24824
24825
|
}, [a(n) && !i[s(n)] ? (openBlock(), createElementBlock("img", {
|
|
@@ -24837,7 +24838,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24837
24838
|
onClick: (e) => u(n)
|
|
24838
24839
|
}, null, 8, ["onClick"]))], 2))), 128))]));
|
|
24839
24840
|
}
|
|
24840
|
-
}), _hoisted_1$
|
|
24841
|
+
}), _hoisted_1$29 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
|
|
24841
24842
|
__name: "ai-prompt-list",
|
|
24842
24843
|
props: {
|
|
24843
24844
|
onSelect: { type: Function },
|
|
@@ -24857,7 +24858,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24857
24858
|
key: n,
|
|
24858
24859
|
class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(i) === r }]),
|
|
24859
24860
|
onClick: (r) => e.onSelect(n)
|
|
24860
|
-
}, toDisplayString(n), 11, _hoisted_1$
|
|
24861
|
+
}, toDisplayString(n), 11, _hoisted_1$29))), 128))], 512));
|
|
24861
24862
|
}
|
|
24862
24863
|
}), DelayMs = 300;
|
|
24863
24864
|
const OverflowTips = {
|
|
@@ -24897,7 +24898,7 @@ const OverflowTips = {
|
|
|
24897
24898
|
e.removeEventListener("mouseenter", e.mouseEnterFunc), e.removeEventListener("mouseleave", e.mouseLeaveFunc), e.unObserverFunc?.(), e.mouseEnterFunc = void 0, e.mouseLeaveFunc = void 0, e.unObserverFunc = void 0;
|
|
24898
24899
|
}
|
|
24899
24900
|
};
|
|
24900
|
-
var _hoisted_1$
|
|
24901
|
+
var _hoisted_1$28 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$21 = ["onClick"], _hoisted_3$16 = ["onClick"], _hoisted_4$14 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
|
|
24901
24902
|
__name: "ai-slash-menu",
|
|
24902
24903
|
props: {
|
|
24903
24904
|
onSelect: { type: Function },
|
|
@@ -24908,6 +24909,7 @@ var _hoisted_1$29 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
24908
24909
|
"tool",
|
|
24909
24910
|
"shortcut",
|
|
24910
24911
|
"doc",
|
|
24912
|
+
"knowledgebase",
|
|
24911
24913
|
"mcp"
|
|
24912
24914
|
]), a = shallowRef([]), s = shallowRef([]), { activeIndex: l } = useMenuKeydown({
|
|
24913
24915
|
items: a,
|
|
@@ -24939,7 +24941,7 @@ var _hoisted_1$29 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
24939
24941
|
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (n, r) => (openBlock(), createElementBlock(Fragment, null, [n.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
24940
24942
|
key: r,
|
|
24941
24943
|
class: "ai-slash-group"
|
|
24942
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
24944
|
+
}, [createElementVNode("div", _hoisted_1$28, [
|
|
24943
24945
|
(openBlock(), createElementBlock("svg", {
|
|
24944
24946
|
class: "title-icon",
|
|
24945
24947
|
style: normalizeStyle({ transform: i.value.includes(n.type) ? "rotate(90deg)" : "rotate(0deg)" }),
|
|
@@ -24979,41 +24981,43 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
|
|
|
24979
24981
|
plain: (e) => e.label
|
|
24980
24982
|
}) }
|
|
24981
24983
|
});
|
|
24982
|
-
var _hoisted_1$
|
|
24984
|
+
var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-placeholder"], _hoisted_3$15 = { key: 0 }, _hoisted_4$13 = ["data-tag-type"], _hoisted_5$8 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
|
|
24983
24985
|
__name: "ai-slash-input",
|
|
24984
|
-
props:
|
|
24986
|
+
props: {
|
|
24987
|
+
modelValue: {},
|
|
24985
24988
|
placeholder: { default: isEn ? "Please enter content" : "请输入内容" },
|
|
24986
24989
|
prompts: { default: () => [] },
|
|
24987
24990
|
resources: { default: () => [] }
|
|
24988
|
-
},
|
|
24989
|
-
|
|
24990
|
-
|
|
24991
|
-
|
|
24992
|
-
|
|
24991
|
+
},
|
|
24992
|
+
emits: [
|
|
24993
|
+
"update:modelValue",
|
|
24994
|
+
"keydown",
|
|
24995
|
+
"upload"
|
|
24996
|
+
],
|
|
24993
24997
|
setup(e, { expose: n, emit: r }) {
|
|
24994
|
-
let i = useTemplateRef("editorRef"), a = useTemplateRef("tippyRef"), s = r, l =
|
|
24998
|
+
let i = useTemplateRef("editorRef"), a = useTemplateRef("tippyRef"), s = r, l = e, u = customRef((e, n) => ({
|
|
24995
24999
|
get() {
|
|
24996
|
-
return e(), typeof l.
|
|
25000
|
+
return e(), typeof l.modelValue == "string" ? stringToDoc(l.modelValue) : l.modelValue;
|
|
24997
25001
|
},
|
|
24998
25002
|
set(e) {
|
|
24999
|
-
l.value
|
|
25003
|
+
s("update:modelValue", e, e?.flat()?.filter((e) => e.type === "tag")?.map((e) => l.resources?.find((n) => (n.id === e.data.value || n.name === e.data.value) && n.type === e.data.type) || null)?.filter((e) => !!e) || []), n();
|
|
25000
25004
|
}
|
|
25001
|
-
})),
|
|
25005
|
+
})), d = shallowRef("slash"), m = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition: G } = useCommandSelection(), K = () => {
|
|
25002
25006
|
setTimeout(() => {
|
|
25003
|
-
let e =
|
|
25004
|
-
|
|
25007
|
+
let e = Z();
|
|
25008
|
+
m.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
25005
25009
|
left: e.coordinates?.left || 0,
|
|
25006
25010
|
top: e.coordinates?.top || 0,
|
|
25007
25011
|
width: 0,
|
|
25008
25012
|
height: 0
|
|
25009
25013
|
}) }), a.value?.show()) : a.value?.hide();
|
|
25010
25014
|
}, 16);
|
|
25011
|
-
},
|
|
25015
|
+
}, q = (e) => {
|
|
25012
25016
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
25013
|
-
e.key === "@" && (
|
|
25014
|
-
},
|
|
25015
|
-
|
|
25016
|
-
},
|
|
25017
|
+
e.key === "@" && (d.value = "slash", K()), e.key === "/" && (d.value = "prompt", K());
|
|
25018
|
+
}, J = () => {
|
|
25019
|
+
m.value = "";
|
|
25020
|
+
}, Z = () => {
|
|
25017
25021
|
let e = {
|
|
25018
25022
|
isActive: !1,
|
|
25019
25023
|
query: "",
|
|
@@ -25023,12 +25027,12 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25023
25027
|
if (!n || n.rangeCount === 0) return e;
|
|
25024
25028
|
let r = n.getRangeAt(0), i = r.startContainer, a = r.startOffset;
|
|
25025
25029
|
if (i.nodeType !== Node.TEXT_NODE) return e;
|
|
25026
|
-
let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${
|
|
25030
|
+
let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${d.value === "slash" ? "@" : "/"}[^\\s]*)$`), l = o.match(s);
|
|
25027
25031
|
if (!l) return e;
|
|
25028
|
-
let u = l[1]?.slice(1),
|
|
25032
|
+
let u = l[1]?.slice(1), m = l.index + l[0].indexOf(d.value === "slash" ? "@" : "/");
|
|
25029
25033
|
try {
|
|
25030
25034
|
let e = document.createRange();
|
|
25031
|
-
e.setStart(i,
|
|
25035
|
+
e.setStart(i, m), e.setEnd(i, m + 1);
|
|
25032
25036
|
let n = e.getBoundingClientRect();
|
|
25033
25037
|
return {
|
|
25034
25038
|
isActive: !0,
|
|
@@ -25043,27 +25047,28 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25043
25047
|
} catch {
|
|
25044
25048
|
return e;
|
|
25045
25049
|
}
|
|
25046
|
-
},
|
|
25047
|
-
|
|
25048
|
-
let { column: n, line: r } =
|
|
25049
|
-
|
|
25050
|
-
},
|
|
25050
|
+
}, Q = (e, n) => e.reduce((e, r, i) => i >= n ? e : (r.type === "text" && (e += r.text?.length || 0), r.type === "tag" && (e += 1), e), 0), Eg = (e) => {
|
|
25051
|
+
L.command(G);
|
|
25052
|
+
let { column: n, line: r } = H.value;
|
|
25053
|
+
L.command(DeleteTag, [r, n - m.value.length - 1], [r, n]), L.command(InsertTag, [r, n], e), L.command(InsertText, [r, n + m.value.length + 1 + 1], " "), a.value?.hide(), Og();
|
|
25054
|
+
}, Og = () => {
|
|
25051
25055
|
setTimeout(() => {
|
|
25052
25056
|
let e = window.getSelection(), n = document.createRange();
|
|
25053
25057
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25054
25058
|
}, 100);
|
|
25055
|
-
},
|
|
25056
|
-
|
|
25059
|
+
}, Ag = (e) => {
|
|
25060
|
+
L.command(ReplaceAll, e), Og();
|
|
25057
25061
|
};
|
|
25058
25062
|
watchEffect(() => {
|
|
25059
|
-
|
|
25063
|
+
let e = l.resources?.filter((e) => !u.value?.some((n) => n.some((n) => n.type === "tag" && n.data.value === e.id && n.data.type === e.type)));
|
|
25064
|
+
m.value ? (j.value = e.filter((e) => e.name.toLowerCase().includes(m.value.toLowerCase())), I.value = l.prompts.filter((e) => e.toLowerCase().includes(m.value.toLowerCase()))) : (j.value = e, I.value = l.prompts), !j.value.length && !I.value.length && a.value?.hide();
|
|
25060
25065
|
});
|
|
25061
|
-
let
|
|
25066
|
+
let jg = (e, n, r, i) => {
|
|
25062
25067
|
if (n.type === "tag") {
|
|
25063
|
-
let n =
|
|
25064
|
-
|
|
25068
|
+
let n = Q(e, r);
|
|
25069
|
+
L.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25065
25070
|
}
|
|
25066
|
-
},
|
|
25071
|
+
}, Mg = (e) => {
|
|
25067
25072
|
let n = e.clipboardData?.items;
|
|
25068
25073
|
if (!n) return;
|
|
25069
25074
|
let r = [];
|
|
@@ -25072,43 +25077,43 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25072
25077
|
n && r.push(n);
|
|
25073
25078
|
}
|
|
25074
25079
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25075
|
-
},
|
|
25076
|
-
|
|
25077
|
-
doc:
|
|
25080
|
+
}, Ng = () => {
|
|
25081
|
+
z?.(), L = createEditor({
|
|
25082
|
+
doc: u.value,
|
|
25078
25083
|
schema: tagSchema,
|
|
25079
25084
|
onChange: async (e) => {
|
|
25080
|
-
|
|
25085
|
+
u.value = e, K();
|
|
25081
25086
|
},
|
|
25082
|
-
onKeyDown: (e) =>
|
|
25083
|
-
}),
|
|
25084
|
-
},
|
|
25087
|
+
onKeyDown: (e) => q(e)
|
|
25088
|
+
}), z = L.input(i.value);
|
|
25089
|
+
}, Fg = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
|
|
25085
25090
|
return onMounted(() => {
|
|
25086
|
-
|
|
25091
|
+
Ng(), i.value?.addEventListener("paste", Mg);
|
|
25087
25092
|
}), onUnmounted(() => {
|
|
25088
|
-
|
|
25093
|
+
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", Mg);
|
|
25089
25094
|
}), n({
|
|
25090
25095
|
cleanup: () => {
|
|
25091
|
-
|
|
25096
|
+
L.command(ReplaceAll, "");
|
|
25092
25097
|
},
|
|
25093
|
-
focus:
|
|
25094
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25098
|
+
focus: Og
|
|
25099
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25095
25100
|
ref_key: "editorRef",
|
|
25096
25101
|
ref: i,
|
|
25097
25102
|
"aria-placeholder": e.placeholder,
|
|
25098
25103
|
class: "ai-slash-input",
|
|
25099
25104
|
spellcheck: "false"
|
|
25100
|
-
}, [
|
|
25105
|
+
}, [u.value.length && u.value.some((e) => e.length) ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(u.value, (e, n) => (openBlock(), createElementBlock("div", { key: n }, [e.length ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(e, (r, i) => (openBlock(), createElementBlock(Fragment, { key: i }, [r.type === "text" ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(r.text), 1)) : r.type === "tag" ? (openBlock(), createElementBlock("span", {
|
|
25101
25106
|
key: 1,
|
|
25102
25107
|
class: normalizeClass(`mention-tag-${r.data.type}`),
|
|
25103
25108
|
contenteditable: "false",
|
|
25104
25109
|
"data-tag-type": r.data.type
|
|
25105
25110
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25106
25111
|
class: "mention-tag-remove-icon",
|
|
25107
|
-
onClick: (a) =>
|
|
25112
|
+
onClick: (a) => jg(e, r, i, n)
|
|
25108
25113
|
}, null, 8, ["onClick"])], 10, _hoisted_4$13)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$20), createVNode(unref(Tippy), {
|
|
25109
25114
|
ref_key: "tippyRef",
|
|
25110
25115
|
ref: a,
|
|
25111
|
-
"append-to": unref(
|
|
25116
|
+
"append-to": unref(B),
|
|
25112
25117
|
arrow: !1,
|
|
25113
25118
|
"hide-on-click": !0,
|
|
25114
25119
|
interactive: !0,
|
|
@@ -25118,17 +25123,17 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25118
25123
|
trigger: "manual",
|
|
25119
25124
|
"trigger-target": i.value,
|
|
25120
25125
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25121
|
-
onHidden:
|
|
25122
|
-
onShow:
|
|
25126
|
+
onHidden: J,
|
|
25127
|
+
onShow: Fg
|
|
25123
25128
|
}, {
|
|
25124
|
-
content: withCtx(() => [
|
|
25129
|
+
content: withCtx(() => [d.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25125
25130
|
key: 0,
|
|
25126
|
-
"on-select":
|
|
25127
|
-
"resource-list":
|
|
25128
|
-
}, null, 8, ["resource-list"])) :
|
|
25131
|
+
"on-select": Eg,
|
|
25132
|
+
"resource-list": j.value
|
|
25133
|
+
}, null, 8, ["resource-list"])) : d.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25129
25134
|
key: 1,
|
|
25130
|
-
"on-select":
|
|
25131
|
-
prompts:
|
|
25135
|
+
"on-select": Ag,
|
|
25136
|
+
prompts: I.value
|
|
25132
25137
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25133
25138
|
_: 1
|
|
25134
25139
|
}, 8, [
|
|
@@ -25137,7 +25142,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25137
25142
|
"z-index"
|
|
25138
25143
|
])]));
|
|
25139
25144
|
}
|
|
25140
|
-
}), _hoisted_1$
|
|
25145
|
+
}), _hoisted_1$26 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
|
|
25141
25146
|
__name: "input-attachment",
|
|
25142
25147
|
props: { messageState: {} },
|
|
25143
25148
|
emits: ["sendMessage", "stopSending"],
|
|
@@ -25147,7 +25152,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25147
25152
|
}, o = () => {
|
|
25148
25153
|
r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
|
|
25149
25154
|
};
|
|
25150
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25155
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$26, [renderSlot(n.$slots, "default"), renderSlot(n.$slots, "send-icon", {}, () => [createElementVNode("div", { class: normalizeClass(["send-message-icon", { ["send-message-icon__" + e.messageState]: !0 }]) }, [e.messageState === unref(MessageStatus).Streaming || e.messageState === unref(MessageStatus).Pending ? withDirectives((openBlock(), createBlock(unref(LoadingMessageIcon), {
|
|
25151
25156
|
key: 0,
|
|
25152
25157
|
onClick: a
|
|
25153
25158
|
}, null, 512)), [[unref(directive), {
|
|
@@ -25163,7 +25168,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25163
25168
|
offset: [0, 16]
|
|
25164
25169
|
}]])], 2)])]));
|
|
25165
25170
|
}
|
|
25166
|
-
}), _hoisted_1$
|
|
25171
|
+
}), _hoisted_1$25 = { class: "chat-input-container" }, _hoisted_2$19 = {
|
|
25167
25172
|
key: 1,
|
|
25168
25173
|
class: "ai-divider"
|
|
25169
25174
|
}, chat_input_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25172,6 +25177,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25172
25177
|
defaultUploadFiles: {},
|
|
25173
25178
|
inputMaxHeight: { default: 200 },
|
|
25174
25179
|
messageStatus: {},
|
|
25180
|
+
modelValue: {},
|
|
25175
25181
|
onSendMessage: {},
|
|
25176
25182
|
onStopSending: {},
|
|
25177
25183
|
onUpload: {},
|
|
@@ -25181,67 +25187,69 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25181
25187
|
shortcutId: {},
|
|
25182
25188
|
shortcuts: {}
|
|
25183
25189
|
}, {
|
|
25184
|
-
modelValue: { required: !0 },
|
|
25185
|
-
modelModifiers: {},
|
|
25186
25190
|
cite: {
|
|
25187
25191
|
required: !1,
|
|
25188
25192
|
default: ""
|
|
25189
25193
|
},
|
|
25190
25194
|
citeModifiers: {}
|
|
25191
25195
|
}),
|
|
25192
|
-
emits: /* @__PURE__ */ mergeModels([
|
|
25196
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
25197
|
+
"selectShortcut",
|
|
25198
|
+
"deleteShortcut",
|
|
25199
|
+
"update:modelValue"
|
|
25200
|
+
], ["update:cite"]),
|
|
25193
25201
|
setup(e, { expose: n, emit: r }) {
|
|
25194
|
-
useCssVars((e) => ({
|
|
25195
|
-
let i = useTemplateRef("aiSlashInputRef"), a = useTemplateRef("filesRef"), o = useModel(e, "
|
|
25202
|
+
useCssVars((e) => ({ v2a99ead4: unref(CHAT_Z_INDEX) }));
|
|
25203
|
+
let i = useTemplateRef("aiSlashInputRef"), a = useTemplateRef("filesRef"), o = useModel(e, "cite"), s = shallowRef(200), l = e, u = r, m = ref(l.defaultUploadFiles || []), E = computed(() => l.shortcuts?.find((e) => e.id === l.shortcutId)), k = computed(() => l.modelValue?.length < 1 || Array.isArray(l.modelValue) && !docToString(l.modelValue).trim() ? MessageStatus.Disabled : l.messageStatus), j = computed(() => typeof l.onUpload == "function");
|
|
25196
25204
|
watchPostEffect(() => {
|
|
25197
|
-
let e =
|
|
25198
|
-
if (
|
|
25199
|
-
|
|
25205
|
+
let e = l.inputMaxHeight || 200;
|
|
25206
|
+
if (m.value.length < 1 || !a.value) {
|
|
25207
|
+
s.value = e;
|
|
25200
25208
|
return;
|
|
25201
25209
|
}
|
|
25202
|
-
|
|
25210
|
+
s.value = e + (a.value?.clientHeight || 0);
|
|
25203
25211
|
});
|
|
25204
|
-
let
|
|
25212
|
+
let L = async () => {
|
|
25205
25213
|
try {
|
|
25206
25214
|
i.value?.cleanup?.();
|
|
25207
25215
|
let e;
|
|
25208
|
-
|
|
25216
|
+
m.value?.length ? (e = m.value?.slice().map((e) => ({
|
|
25209
25217
|
type: MessageContentType.Binary,
|
|
25210
25218
|
url: e.url,
|
|
25211
25219
|
mimeType: e.file?.type || "",
|
|
25212
25220
|
filename: e.file?.name || ""
|
|
25213
|
-
})),
|
|
25221
|
+
})), l.modelValue && e.push({
|
|
25214
25222
|
type: MessageContentType.Text,
|
|
25215
|
-
text: docToString(
|
|
25216
|
-
})) : e = typeof
|
|
25223
|
+
text: docToString(l.modelValue)
|
|
25224
|
+
})) : e = typeof l.modelValue == "string" ? l.modelValue : docToString(l.modelValue), l.onSendMessage?.(e, l.modelValue), m.value = [];
|
|
25217
25225
|
} catch (e) {
|
|
25218
25226
|
console.error(e);
|
|
25219
25227
|
}
|
|
25220
|
-
},
|
|
25228
|
+
}, z = (e) => {
|
|
25221
25229
|
if (e.key === "Enter" || e.key === "NumpadEnter") {
|
|
25222
|
-
if (e.shiftKey ||
|
|
25223
|
-
|
|
25230
|
+
if (e.shiftKey || k.value === MessageStatus.Disabled) return;
|
|
25231
|
+
L();
|
|
25224
25232
|
}
|
|
25225
|
-
},
|
|
25233
|
+
}, B = async () => {
|
|
25226
25234
|
try {
|
|
25227
|
-
|
|
25235
|
+
l.onStopSending?.();
|
|
25228
25236
|
} catch (e) {
|
|
25229
25237
|
console.error(e);
|
|
25230
25238
|
}
|
|
25231
|
-
},
|
|
25232
|
-
|
|
25233
|
-
},
|
|
25234
|
-
|
|
25235
|
-
},
|
|
25236
|
-
|
|
25237
|
-
},
|
|
25238
|
-
if (
|
|
25239
|
-
if (
|
|
25239
|
+
}, H = () => {
|
|
25240
|
+
o.value = "";
|
|
25241
|
+
}, G = (e) => {
|
|
25242
|
+
u("selectShortcut", e);
|
|
25243
|
+
}, K = () => {
|
|
25244
|
+
u("deleteShortcut");
|
|
25245
|
+
}, q = async (e) => {
|
|
25246
|
+
if (j.value) for (let n of e) {
|
|
25247
|
+
if (m.value.find((e) => e.file?.name === n.name)) continue;
|
|
25240
25248
|
let e = {
|
|
25241
25249
|
file: n,
|
|
25242
25250
|
status: UploadStatus.Pending
|
|
25243
25251
|
};
|
|
25244
|
-
|
|
25252
|
+
m.value.push(e), l.onUpload?.(n).then((n) => {
|
|
25245
25253
|
if (n && typeof n == "object" && "download_url" in n) {
|
|
25246
25254
|
e.url = n.download_url, e.status = UploadStatus.Success;
|
|
25247
25255
|
return;
|
|
@@ -25251,70 +25259,72 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25251
25259
|
e.status = UploadStatus.Error;
|
|
25252
25260
|
});
|
|
25253
25261
|
}
|
|
25254
|
-
},
|
|
25255
|
-
|
|
25262
|
+
}, J = (e) => {
|
|
25263
|
+
m.value = m.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
|
|
25264
|
+
}, Tg = (e, n) => {
|
|
25265
|
+
u("update:modelValue", e, n);
|
|
25256
25266
|
};
|
|
25257
25267
|
return n({
|
|
25258
25268
|
focus: () => {
|
|
25259
25269
|
i.value?.focus?.();
|
|
25260
25270
|
},
|
|
25261
|
-
triggerSendMessage:
|
|
25262
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25271
|
+
triggerSendMessage: L
|
|
25272
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$25, [renderSlot(n.$slots, "top"), createElementVNode("div", {
|
|
25263
25273
|
class: "chat-input",
|
|
25264
|
-
style: normalizeStyle({ maxHeight:
|
|
25274
|
+
style: normalizeStyle({ maxHeight: s.value + "px" })
|
|
25265
25275
|
}, [
|
|
25266
|
-
renderSlot(n.$slots, "input-header", {}, () => [
|
|
25276
|
+
renderSlot(n.$slots, "input-header", {}, () => [o.value ? (openBlock(), createBlock(cite_content_default, {
|
|
25267
25277
|
key: 0,
|
|
25268
25278
|
class: "chat-input-cite",
|
|
25269
|
-
content:
|
|
25270
|
-
onClose:
|
|
25279
|
+
content: o.value,
|
|
25280
|
+
onClose: H
|
|
25271
25281
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25272
|
-
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files:
|
|
25282
|
+
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: m.value })), () => [m.value.length ? (openBlock(), createElementBlock("div", {
|
|
25273
25283
|
key: 0,
|
|
25274
25284
|
ref_key: "filesRef",
|
|
25275
25285
|
ref: a,
|
|
25276
25286
|
class: "chat-input-files"
|
|
25277
25287
|
}, [createVNode(file_content_default, {
|
|
25278
|
-
files:
|
|
25279
|
-
onDeleteFile:
|
|
25288
|
+
files: m.value,
|
|
25289
|
+
onDeleteFile: J
|
|
25280
25290
|
}, null, 8, ["files"])], 512)) : createCommentVNode("v-if", !0)]),
|
|
25281
25291
|
createVNode(ai_slash_input_default, {
|
|
25282
25292
|
ref_key: "aiSlashInputRef",
|
|
25283
25293
|
ref: i,
|
|
25284
|
-
|
|
25285
|
-
"onUpdate:modelValue": r[0] ||= (e) => o.value = e,
|
|
25294
|
+
"model-value": e.modelValue,
|
|
25286
25295
|
placeholder: e.placeholder,
|
|
25287
25296
|
prompts: e.prompts,
|
|
25288
25297
|
resources: e.resources,
|
|
25289
|
-
onKeydown:
|
|
25290
|
-
|
|
25298
|
+
onKeydown: z,
|
|
25299
|
+
"onUpdate:modelValue": Tg,
|
|
25300
|
+
onUpload: q
|
|
25291
25301
|
}, null, 8, [
|
|
25292
|
-
"
|
|
25302
|
+
"model-value",
|
|
25293
25303
|
"placeholder",
|
|
25294
25304
|
"prompts",
|
|
25295
25305
|
"resources"
|
|
25296
25306
|
]),
|
|
25297
25307
|
createVNode(input_attachment_default, {
|
|
25298
|
-
"message-state":
|
|
25299
|
-
onSendMessage:
|
|
25300
|
-
onStopSending:
|
|
25308
|
+
"message-state": k.value,
|
|
25309
|
+
onSendMessage: L,
|
|
25310
|
+
onStopSending: B
|
|
25301
25311
|
}, {
|
|
25302
25312
|
default: withCtx(() => [
|
|
25303
|
-
|
|
25313
|
+
j.value ? (openBlock(), createBlock(file_upload_btn_default, {
|
|
25304
25314
|
key: 0,
|
|
25305
|
-
onUpload:
|
|
25315
|
+
onUpload: q
|
|
25306
25316
|
})) : createCommentVNode("v-if", !0),
|
|
25307
|
-
|
|
25308
|
-
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !
|
|
25317
|
+
j.value && (e.shortcuts?.length || E.value) ? (openBlock(), createElementBlock("span", _hoisted_2$19)) : createCommentVNode("v-if", !0),
|
|
25318
|
+
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !E.value ? (openBlock(), createBlock(shortcut_btns_default, {
|
|
25309
25319
|
key: 0,
|
|
25310
25320
|
shortcuts: e.shortcuts,
|
|
25311
|
-
onSelectShortcut:
|
|
25312
|
-
}, null, 8, ["shortcuts"])) : createCommentVNode("v-if", !0),
|
|
25321
|
+
onSelectShortcut: G
|
|
25322
|
+
}, null, 8, ["shortcuts"])) : createCommentVNode("v-if", !0), E.value ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
25313
25323
|
key: 1,
|
|
25314
25324
|
class: "selected-shortcut-btn",
|
|
25315
|
-
shortcut:
|
|
25325
|
+
shortcut: E.value
|
|
25316
25326
|
}, {
|
|
25317
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25327
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: K })]),
|
|
25318
25328
|
_: 1
|
|
25319
25329
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25320
25330
|
]),
|
|
@@ -25323,16 +25333,16 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25323
25333
|
}, 8, ["message-state"])
|
|
25324
25334
|
], 4)]));
|
|
25325
25335
|
}
|
|
25326
|
-
}), _hoisted_1$
|
|
25336
|
+
}), _hoisted_1$24 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
|
|
25327
25337
|
__name: "scroll-btn",
|
|
25328
25338
|
props: {
|
|
25329
25339
|
disabled: { type: Boolean },
|
|
25330
25340
|
title: {}
|
|
25331
25341
|
},
|
|
25332
25342
|
setup(e) {
|
|
25333
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25343
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$24, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
|
|
25334
25344
|
}
|
|
25335
|
-
}), _hoisted_1$
|
|
25345
|
+
}), _hoisted_1$23 = { class: "ai-delete-confirm" }, _hoisted_2$18 = { class: "ai-delete-confirm__title" }, _hoisted_3$14 = { class: "ai-delete-confirm__desc" }, _hoisted_4$12 = { class: "ai-delete-confirm__actions" }, delete_tool_default = /* @__PURE__ */ defineComponent({
|
|
25336
25346
|
__name: "delete-tool",
|
|
25337
25347
|
props: {
|
|
25338
25348
|
description: {},
|
|
@@ -25372,7 +25382,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25372
25382
|
ref_key: "tippyRef",
|
|
25373
25383
|
ref: a
|
|
25374
25384
|
}, s.value, { onShow: l }), {
|
|
25375
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
25385
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$23, [
|
|
25376
25386
|
createElementVNode("div", _hoisted_2$18, toDisplayString(unref(t$1)("确认删除该回答?")), 1),
|
|
25377
25387
|
createElementVNode("div", _hoisted_3$14, toDisplayString(unref(t$1)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
25378
25388
|
createElementVNode("div", _hoisted_4$12, [createVNode(unref(Button), {
|
|
@@ -25394,7 +25404,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25394
25404
|
_: 1
|
|
25395
25405
|
}, 16));
|
|
25396
25406
|
}
|
|
25397
|
-
}), _hoisted_1$
|
|
25407
|
+
}), _hoisted_1$22 = { class: "ai-user-feedback" }, _hoisted_2$17 = { class: "ai-feedback-title" }, _hoisted_3$13 = { class: "ai-feedback-reason-list" }, _hoisted_4$11 = ["onClick"], _hoisted_5$7 = { class: "ai-feedback-other" }, _hoisted_6$3 = { class: "ai-feedback-footer" }, user_feedback_default = /* @__PURE__ */ defineComponent({
|
|
25398
25408
|
__name: "user-feedback",
|
|
25399
25409
|
props: {
|
|
25400
25410
|
loading: { type: Boolean },
|
|
@@ -25410,7 +25420,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25410
25420
|
}, u = () => {
|
|
25411
25421
|
a.value = [], i.value = "", r("cancel");
|
|
25412
25422
|
};
|
|
25413
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25423
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
|
|
25414
25424
|
createElementVNode("div", _hoisted_2$17, toDisplayString(e.title), 1),
|
|
25415
25425
|
createElementVNode("div", _hoisted_3$13, [e.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
|
|
25416
25426
|
key: e,
|
|
@@ -25447,7 +25457,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25447
25457
|
})])
|
|
25448
25458
|
]));
|
|
25449
25459
|
}
|
|
25450
|
-
}), _hoisted_1$
|
|
25460
|
+
}), _hoisted_1$21 = {
|
|
25451
25461
|
ref: "messageToolsRef",
|
|
25452
25462
|
class: "message-tools-container"
|
|
25453
25463
|
}, _hoisted_2$16 = {
|
|
@@ -25501,7 +25511,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25501
25511
|
};
|
|
25502
25512
|
return onUnmounted(() => {
|
|
25503
25513
|
j(), l.value = [];
|
|
25504
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25514
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$21, [
|
|
25505
25515
|
createElementVNode("div", _hoisted_2$16, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.messageTools, (n) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [n.id === "delete" ? (openBlock(), createBlock(delete_tool_default, mergeProps({
|
|
25506
25516
|
key: 0,
|
|
25507
25517
|
ref_for: !0
|
|
@@ -25586,7 +25596,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25586
25596
|
]))], 64))), 128))])
|
|
25587
25597
|
], 512));
|
|
25588
25598
|
}
|
|
25589
|
-
}), _hoisted_1$
|
|
25599
|
+
}), _hoisted_1$20 = { class: "ai-loading-ring" }, _hoisted_2$15 = {
|
|
25590
25600
|
fill: "none",
|
|
25591
25601
|
viewBox: "0 0 26 26"
|
|
25592
25602
|
}, _hoisted_3$11 = ["fill"], _hoisted_4$9 = { class: "ai-loading-star" }, _hoisted_5$6 = {
|
|
@@ -25610,7 +25620,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25610
25620
|
width: e.size + "px",
|
|
25611
25621
|
height: e.size + "px"
|
|
25612
25622
|
})
|
|
25613
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
25623
|
+
}, [createElementVNode("div", _hoisted_1$20, [(openBlock(), createElementBlock("svg", _hoisted_2$15, [createElementVNode("path", {
|
|
25614
25624
|
d: "M24.957 7.79785C25.6279 9.36608 26 11.0926 26 12.9062C26 19.5598 21.0013 25.0441 14.5547 25.8125L14.3154 23.8252C19.7702 23.175 24 18.5361 24 12.9062C24 11.3717 23.6848 9.91092 23.1172 8.58398L24.957 7.79785ZM11.6836 1.98633C6.2292 2.63694 2 7.27669 2 12.9062C2 14.4404 2.31452 15.9009 2.88184 17.2275L1.04199 18.0137C0.371448 16.4458 0 14.7194 0 12.9062C0 6.25306 4.99814 0.768818 11.4443 0L11.6836 1.98633Z",
|
|
25615
25625
|
fill: `url(#${i})`
|
|
25616
25626
|
}, null, 8, _hoisted_3$11), createElementVNode("defs", null, [createElementVNode("linearGradient", {
|
|
@@ -25652,7 +25662,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25652
25662
|
}, null, -1)
|
|
25653
25663
|
]])])]))])], 6));
|
|
25654
25664
|
}
|
|
25655
|
-
}), _hoisted_1$
|
|
25665
|
+
}), _hoisted_1$19 = { class: "ai-activity-message" }, _hoisted_2$14 = { class: "ai-activity-message-title-icon" }, _hoisted_3$10 = { class: "ai-activity-message-title-text" }, _hoisted_4$8 = { class: "ai-activity-message-content" }, _hoisted_5$5 = {
|
|
25656
25666
|
key: 0,
|
|
25657
25667
|
class: "knowledge-rag-content"
|
|
25658
25668
|
}, activity_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25680,7 +25690,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25680
25690
|
let e = Array.isArray(n.content) ? n.content?.length : n.content?.referenceDocument?.length;
|
|
25681
25691
|
return isEn ? `Reference ${e} documents as reference` : `引用 ${e} 篇资料作为参考`;
|
|
25682
25692
|
}), a = useModel(e, "collapsed");
|
|
25683
|
-
return (n, o) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25693
|
+
return (n, o) => (openBlock(), createElementBlock("div", _hoisted_1$19, [createElementVNode("div", {
|
|
25684
25694
|
class: "ai-activity-message-title",
|
|
25685
25695
|
onClick: o[0] ||= (e) => a.value = !a.value
|
|
25686
25696
|
}, [
|
|
@@ -25692,7 +25702,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25692
25702
|
createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": a.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
|
|
25693
25703
|
]), withDirectives(createElementVNode("div", _hoisted_4$8, [r.value ? (openBlock(), createElementBlock("div", _hoisted_5$5, [createVNode(markdown_content_default, { content: Array.isArray(e.content) ? e.content.join("\n") : e.content?.content || "" }, null, 8, ["content"])])) : createCommentVNode("v-if", !0), createVNode(reference_content_default, { content: Array.isArray(e.content) ? e.content : e.content?.referenceDocument || [] }, null, 8, ["content"])], 512), [[vShow, !a.value]])]));
|
|
25694
25704
|
}
|
|
25695
|
-
}), _hoisted_1$
|
|
25705
|
+
}), _hoisted_1$18 = { class: "toolcall-desc" }, _hoisted_2$13 = { class: "desc-title" }, _hoisted_3$9 = { class: "desc-panel" }, _hoisted_4$7 = { class: "desc-label" }, _hoisted_5$4 = { class: "desc-value" }, desc_panel_default = /* @__PURE__ */ defineComponent({
|
|
25696
25706
|
__name: "desc-panel",
|
|
25697
25707
|
props: {
|
|
25698
25708
|
desc: {},
|
|
@@ -25706,7 +25716,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25706
25716
|
return n.desc;
|
|
25707
25717
|
}
|
|
25708
25718
|
});
|
|
25709
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25719
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$18, [createElementVNode("div", _hoisted_2$13, toDisplayString(e.title), 1), createElementVNode("div", _hoisted_3$9, [typeof r.value == "object" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(r.value, (e, n) => (openBlock(), createElementBlock("div", {
|
|
25710
25720
|
key: n,
|
|
25711
25721
|
class: "desc-panel-item"
|
|
25712
25722
|
}, [createElementVNode("span", _hoisted_4$7, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$4, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
|
|
@@ -25714,7 +25724,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25714
25724
|
appendTo: "parent"
|
|
25715
25725
|
}]])]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(r.value), 1)], 64))])]));
|
|
25716
25726
|
}
|
|
25717
|
-
}), _hoisted_1$
|
|
25727
|
+
}), _hoisted_1$17 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
|
|
25718
25728
|
__name: "tool-message",
|
|
25719
25729
|
props: {
|
|
25720
25730
|
duration: {},
|
|
@@ -25729,12 +25739,12 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25729
25739
|
property: {}
|
|
25730
25740
|
},
|
|
25731
25741
|
setup(e) {
|
|
25732
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25742
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$17, [createVNode(desc_panel_default, {
|
|
25733
25743
|
desc: e.content || e.error,
|
|
25734
25744
|
title: unref(t$1)("返回内容")
|
|
25735
25745
|
}, null, 8, ["desc", "title"])]));
|
|
25736
25746
|
}
|
|
25737
|
-
}), _hoisted_1$
|
|
25747
|
+
}), _hoisted_1$16 = { class: "ai-toolcall-render" }, _hoisted_2$12 = { class: "toolcall-header-title" }, _hoisted_3$8 = { class: "toolcall-status-title" }, _hoisted_4$6 = {
|
|
25738
25748
|
key: 1,
|
|
25739
25749
|
class: "toolcall-duration"
|
|
25740
25750
|
}, _hoisted_5$3 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25760,7 +25770,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25760
25770
|
let e = n.duration || n.toolCall?.toolMessage?.duration;
|
|
25761
25771
|
return e ? formatDuration(e) : "";
|
|
25762
25772
|
});
|
|
25763
|
-
return (n, s) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25773
|
+
return (n, s) => (openBlock(), createElementBlock("div", _hoisted_1$16, [createElementVNode("div", { class: normalizeClass(["ai-toolcall-render-header", `toolcall-status-${e.status}`]) }, [
|
|
25764
25774
|
createVNode(unref(ArrowRightIcon), {
|
|
25765
25775
|
class: normalizeClass({ "is-collapsed": r.value }),
|
|
25766
25776
|
onClick: s[0] ||= (e) => r.value = !r.value
|
|
@@ -25792,7 +25802,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25792
25802
|
e.toolCall?.toolMessage ? (openBlock(), createBlock(tool_message_default, normalizeProps(mergeProps({ key: 0 }, e.toolCall.toolMessage)), null, 16)) : createCommentVNode("v-if", !0)
|
|
25793
25803
|
], 512), [[vShow, !r.value]])]));
|
|
25794
25804
|
}
|
|
25795
|
-
}), _hoisted_1$
|
|
25805
|
+
}), _hoisted_1$15 = { class: "assistant-message" }, _hoisted_2$11 = { class: "assistant-message-content" }, assistant_message_default = /* @__PURE__ */ defineComponent({
|
|
25796
25806
|
__name: "assistant-message",
|
|
25797
25807
|
props: {
|
|
25798
25808
|
toolCalls: {},
|
|
@@ -25805,7 +25815,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25805
25815
|
property: {}
|
|
25806
25816
|
},
|
|
25807
25817
|
setup(e) {
|
|
25808
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25818
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$15, [createElementVNode("div", _hoisted_2$11, [renderSlot(n.$slots, "default", normalizeProps(guardReactiveProps({ content: e.content })), () => [createVNode(content_render_default, {
|
|
25809
25819
|
content: e.content || "",
|
|
25810
25820
|
status: e.status,
|
|
25811
25821
|
type: unref(MessageContentType).Text
|
|
@@ -25819,7 +25829,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25819
25829
|
"tool-call": n
|
|
25820
25830
|
}, null, 8, ["status", "tool-call"]))), 128)) : createCommentVNode("v-if", !0)]));
|
|
25821
25831
|
}
|
|
25822
|
-
}), _hoisted_1$
|
|
25832
|
+
}), _hoisted_1$14 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
|
|
25823
25833
|
__name: "info-message",
|
|
25824
25834
|
props: {
|
|
25825
25835
|
content: {},
|
|
@@ -25831,21 +25841,21 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25831
25841
|
property: {}
|
|
25832
25842
|
},
|
|
25833
25843
|
setup(e) {
|
|
25834
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25844
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$14, [(openBlock(!0), createElementBlock(Fragment, null, renderList(Array.isArray(e.content) ? e.content : [e.content], (e, n) => (openBlock(), createElementBlock("div", {
|
|
25835
25845
|
key: n,
|
|
25836
25846
|
class: "info-message-content"
|
|
25837
25847
|
}, toDisplayString(e), 1))), 128))]));
|
|
25838
25848
|
}
|
|
25839
|
-
}), _hoisted_1$
|
|
25849
|
+
}), _hoisted_1$13 = { class: "ai-loading-message" }, loading_message_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
25840
25850
|
__name: "loading-message",
|
|
25841
25851
|
setup(e) {
|
|
25842
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25852
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$13, [createVNode(ai_loading_default, { size: 18 }), renderSlot(e.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(t$1)("请求中...")), 1)], !0)]));
|
|
25843
25853
|
}
|
|
25844
25854
|
}), __plugin_vue_export_helper_default = (e, n) => {
|
|
25845
25855
|
let r = e.__vccOpts || e;
|
|
25846
25856
|
for (let [e, i] of n) r[e] = i;
|
|
25847
25857
|
return r;
|
|
25848
|
-
}, loading_message_default = /* @__PURE__ */ __plugin_vue_export_helper_default(loading_message_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4bc7805b"]]), _hoisted_1$
|
|
25858
|
+
}, loading_message_default = /* @__PURE__ */ __plugin_vue_export_helper_default(loading_message_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4bc7805b"]]), _hoisted_1$12 = { class: "ai-reasoning-message" }, _hoisted_2$10 = {
|
|
25849
25859
|
key: 0,
|
|
25850
25860
|
class: "ai-reasoning-message-title-icon"
|
|
25851
25861
|
}, _hoisted_3$7 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$5 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25879,7 +25889,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25879
25889
|
default: return t$1("思考中");
|
|
25880
25890
|
}
|
|
25881
25891
|
});
|
|
25882
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25892
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [createElementVNode("div", {
|
|
25883
25893
|
class: normalizeClass(["ai-reasoning-message-title", {
|
|
25884
25894
|
"ai-reasoning-message-title-collapsed": r.value,
|
|
25885
25895
|
"is-thinking": e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming,
|
|
@@ -25900,7 +25910,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25900
25910
|
content: e
|
|
25901
25911
|
}, null, 8, ["content"]))), 128))], 512), [[vShow, !r.value]])]));
|
|
25902
25912
|
}
|
|
25903
|
-
}), _hoisted_1$
|
|
25913
|
+
}), _hoisted_1$11 = { class: "ai-key-value-content" }, _hoisted_2$9 = {
|
|
25904
25914
|
key: 0,
|
|
25905
25915
|
class: "ai-key-value-title"
|
|
25906
25916
|
}, _hoisted_3$6 = { class: "ai-key-value-content" }, _hoisted_4$4 = { class: "item-key" }, _hoisted_5$2 = { class: "item-value" }, key_value_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25910,7 +25920,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25910
25920
|
title: {}
|
|
25911
25921
|
},
|
|
25912
25922
|
setup(e) {
|
|
25913
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25923
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$11, [e.title ? (openBlock(), createElementBlock("div", _hoisted_2$9, [createVNode(unref(ThinkingIcon)), createTextVNode(" " + toDisplayString(e.title), 1)])) : createCommentVNode("v-if", !0), createElementVNode("div", _hoisted_3$6, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.content, (e) => (openBlock(), createElementBlock("div", {
|
|
25914
25924
|
key: e.key,
|
|
25915
25925
|
class: "key-value-item"
|
|
25916
25926
|
}, [
|
|
@@ -25919,7 +25929,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25919
25929
|
createElementVNode("div", _hoisted_5$2, toDisplayString(e.value), 1)
|
|
25920
25930
|
]))), 128))])]));
|
|
25921
25931
|
}
|
|
25922
|
-
}), _hoisted_1$
|
|
25932
|
+
}), _hoisted_1$10 = { class: "ai-user-message" }, _hoisted_2$8 = {
|
|
25923
25933
|
key: 1,
|
|
25924
25934
|
class: "ai-user-message-content"
|
|
25925
25935
|
}, _hoisted_3$5 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25933,6 +25943,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25933
25943
|
status: {},
|
|
25934
25944
|
property: {},
|
|
25935
25945
|
onAction: { type: Function },
|
|
25946
|
+
tippyOptions: {},
|
|
25936
25947
|
messageToolsStatus: {},
|
|
25937
25948
|
onInputConfirm: { type: Function },
|
|
25938
25949
|
onShortcutConfirm: { type: Function }
|
|
@@ -25988,7 +25999,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25988
25999
|
}, G = async (e, r) => {
|
|
25989
26000
|
n.onInputConfirm?.(e, r), i.value = !1;
|
|
25990
26001
|
};
|
|
25991
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26002
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
25992
26003
|
u.value && typeof u.value == "string" ? (openBlock(), createBlock(cite_content_default, {
|
|
25993
26004
|
key: 0,
|
|
25994
26005
|
class: "ai-user-message-cite",
|
|
@@ -26048,8 +26059,13 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26048
26059
|
"message-tools": unref(CONST_USER_MESSAGE_TOOLS),
|
|
26049
26060
|
"message-tools-status": e.messageToolsStatus,
|
|
26050
26061
|
"on-action": I,
|
|
26062
|
+
"tippy-options": e.tippyOptions,
|
|
26051
26063
|
"update-tools": []
|
|
26052
|
-
}, null, 8, [
|
|
26064
|
+
}, null, 8, [
|
|
26065
|
+
"message-tools",
|
|
26066
|
+
"message-tools-status",
|
|
26067
|
+
"tippy-options"
|
|
26068
|
+
]))
|
|
26053
26069
|
], 64))
|
|
26054
26070
|
]));
|
|
26055
26071
|
}
|
|
@@ -26060,6 +26076,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26060
26076
|
onInputConfirm: { type: Function },
|
|
26061
26077
|
onShortcutConfirm: { type: Function },
|
|
26062
26078
|
onAction: { type: Function },
|
|
26079
|
+
tippyOptions: {},
|
|
26063
26080
|
message: {}
|
|
26064
26081
|
},
|
|
26065
26082
|
setup(e) {
|
|
@@ -26070,7 +26087,8 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26070
26087
|
onAction: n.onAction,
|
|
26071
26088
|
onInputConfirm: n.onInputConfirm,
|
|
26072
26089
|
onShortcutConfirm: n.onShortcutConfirm,
|
|
26073
|
-
messageToolsStatus: n.messageToolsStatus
|
|
26090
|
+
messageToolsStatus: n.messageToolsStatus,
|
|
26091
|
+
tippyOptions: n.tippyOptions
|
|
26074
26092
|
});
|
|
26075
26093
|
case MessageRole$1.Assistant: return h$1(assistant_message_default, n.message, { default: (e) => renderSlot(r, "default", e, () => [h$1(content_render_default, {
|
|
26076
26094
|
content: n.message.content || "",
|
|
@@ -26086,7 +26104,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26086
26104
|
});
|
|
26087
26105
|
return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
|
|
26088
26106
|
}
|
|
26089
|
-
}), _hoisted_1$
|
|
26107
|
+
}), _hoisted_1$9 = ["onMouseenter", "onMouseleave"], _hoisted_2$7 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
|
|
26090
26108
|
__name: "message-container",
|
|
26091
26109
|
props: /* @__PURE__ */ mergeModels({
|
|
26092
26110
|
enableSelection: {
|
|
@@ -26210,13 +26228,15 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26210
26228
|
"message-tools-status": e.messageToolsStatus,
|
|
26211
26229
|
"on-action": (e) => E(e, n),
|
|
26212
26230
|
"on-input-confirm": (e, r) => L(n, e, r),
|
|
26213
|
-
"on-shortcut-confirm": (e) => z(n, e)
|
|
26231
|
+
"on-shortcut-confirm": (e) => z(n, e),
|
|
26232
|
+
"tippy-options": e.messageToolsTippyOptions
|
|
26214
26233
|
}, null, 8, [
|
|
26215
26234
|
"message",
|
|
26216
26235
|
"message-tools-status",
|
|
26217
26236
|
"on-action",
|
|
26218
26237
|
"on-input-confirm",
|
|
26219
|
-
"on-shortcut-confirm"
|
|
26238
|
+
"on-shortcut-confirm",
|
|
26239
|
+
"tippy-options"
|
|
26220
26240
|
]))])), 128)), i.type === unref(MessageRole$1).Assistant && e.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
|
|
26221
26241
|
key: 0,
|
|
26222
26242
|
"message-tools-status": e.messageToolsStatus,
|
|
@@ -26228,7 +26248,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26228
26248
|
"on-action",
|
|
26229
26249
|
"tippy-options",
|
|
26230
26250
|
"onFeedback"
|
|
26231
|
-
])) : createCommentVNode("v-if", !0)], 4)], 44, _hoisted_1$
|
|
26251
|
+
])) : createCommentVNode("v-if", !0)], 4)], 44, _hoisted_1$9))), 128)),
|
|
26232
26252
|
createElementVNode("div", {
|
|
26233
26253
|
ref_key: "messageContainerBottomRef",
|
|
26234
26254
|
ref: a,
|
|
@@ -26260,25 +26280,6 @@ function findLastUserMessageIdBefore(e, n) {
|
|
|
26260
26280
|
let r = findLastUserMessageBefore(e, n);
|
|
26261
26281
|
if (r?.id !== void 0) return typeof r.id == "number" ? r.id : Number(r.id);
|
|
26262
26282
|
}
|
|
26263
|
-
var RESOURCE_TYPE_MAP = {
|
|
26264
|
-
tool: "tool",
|
|
26265
|
-
mcp: "mcp",
|
|
26266
|
-
knowledgebase: "doc"
|
|
26267
|
-
};
|
|
26268
|
-
function flattenResources(e) {
|
|
26269
|
-
if (!e) return [];
|
|
26270
|
-
let n = [];
|
|
26271
|
-
for (let [r, i] of Object.entries(RESOURCE_TYPE_MAP)) {
|
|
26272
|
-
let a = e[r];
|
|
26273
|
-
if (a?.length) for (let e of a) n.push({
|
|
26274
|
-
id: e.code,
|
|
26275
|
-
name: e.name,
|
|
26276
|
-
icon: e.icon ?? "",
|
|
26277
|
-
type: i
|
|
26278
|
-
});
|
|
26279
|
-
}
|
|
26280
|
-
return n;
|
|
26281
|
-
}
|
|
26282
26283
|
const getCookieByName = (e) => {
|
|
26283
26284
|
let n = document.cookie.match(/* @__PURE__ */ RegExp(`(^| )${e}=([^;]*)(;|$)`));
|
|
26284
26285
|
return n ? n[2] : "";
|
|
@@ -26426,7 +26427,7 @@ function useHistoryPanel(e) {
|
|
|
26426
26427
|
isVisible: () => o.value?.state.isVisible ?? !1
|
|
26427
26428
|
};
|
|
26428
26429
|
}
|
|
26429
|
-
var _hoisted_1$
|
|
26430
|
+
var _hoisted_1$8 = { class: "history-group" }, _hoisted_2$6 = { class: "history-group-title" }, _hoisted_3$4 = { class: "history-group-list" }, history_group_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26430
26431
|
__name: "history-group",
|
|
26431
26432
|
props: {
|
|
26432
26433
|
currentSessionCode: {},
|
|
@@ -26435,9 +26436,9 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26435
26436
|
},
|
|
26436
26437
|
setup(e) {
|
|
26437
26438
|
let n = e;
|
|
26438
|
-
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26439
|
+
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$6, [createElementVNode("span", null, toDisplayString(n.title), 1)]), createElementVNode("div", _hoisted_3$4, [renderSlot(e.$slots, "default", {}, void 0, !0)])]));
|
|
26439
26440
|
}
|
|
26440
|
-
}), [["__scopeId", "data-v-3b603cb6"]]), _hoisted_1$
|
|
26441
|
+
}), [["__scopeId", "data-v-3b603cb6"]]), _hoisted_1$7 = { class: "history-item-actions" }, history_item_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26441
26442
|
__name: "history-item",
|
|
26442
26443
|
props: {
|
|
26443
26444
|
isActive: { type: Boolean },
|
|
@@ -26496,7 +26497,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26496
26497
|
}, null, 8, ["modelValue"])) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(OverflowTitle), { style: { width: "calc(100% - 42px)" } }, {
|
|
26497
26498
|
default: withCtx(() => [createTextVNode(toDisplayString(r.session.sessionName), 1)]),
|
|
26498
26499
|
_: 1
|
|
26499
|
-
}), createElementVNode("span", _hoisted_1$
|
|
26500
|
+
}), createElementVNode("span", _hoisted_1$7, [withDirectives(createElementVNode("i", {
|
|
26500
26501
|
class: "bkai-icon bkai-bianji",
|
|
26501
26502
|
onClick: withModifiers(d, ["stop"])
|
|
26502
26503
|
}, null, 512), [[unref(a), {
|
|
@@ -26520,7 +26521,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26520
26521
|
_: 1
|
|
26521
26522
|
}, 8, ["title"])])], 64))], 2));
|
|
26522
26523
|
}
|
|
26523
|
-
}), [["__scopeId", "data-v-ea1e15de"]]), _hoisted_1$
|
|
26524
|
+
}), [["__scopeId", "data-v-ea1e15de"]]), _hoisted_1$6 = { class: "history-search" }, _hoisted_2$5 = { class: "input-icon" }, history_search_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26524
26525
|
__name: "history-search",
|
|
26525
26526
|
props: {
|
|
26526
26527
|
modelValue: { default: "" },
|
|
@@ -26531,7 +26532,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26531
26532
|
let r = e, i = n, a = (e) => {
|
|
26532
26533
|
i("update:modelValue", e);
|
|
26533
26534
|
};
|
|
26534
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26535
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$6, [createVNode(unref(Input), {
|
|
26535
26536
|
"model-value": r.modelValue,
|
|
26536
26537
|
behavior: "simplicity",
|
|
26537
26538
|
placeholder: r.placeholder || unref(t)("搜索会话名称"),
|
|
@@ -26542,7 +26543,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26542
26543
|
_: 1
|
|
26543
26544
|
}, 8, ["model-value", "placeholder"])]));
|
|
26544
26545
|
}
|
|
26545
|
-
}), [["__scopeId", "data-v-e7ff40b2"]]), _hoisted_1$
|
|
26546
|
+
}), [["__scopeId", "data-v-e7ff40b2"]]), _hoisted_1$5 = { class: "bkai-history-dropdown" }, _hoisted_2$4 = { class: "history-dropdown-header" }, _hoisted_3$3 = { class: "history-dropdown-header-title" }, _hoisted_4$3 = { class: "history-dropdown-content" }, history_dropdown_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26546
26547
|
__name: "index",
|
|
26547
26548
|
props: { sessionBusinessManager: {} },
|
|
26548
26549
|
emits: [
|
|
@@ -26612,7 +26613,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26612
26613
|
}, I = () => {
|
|
26613
26614
|
s.value = null;
|
|
26614
26615
|
};
|
|
26615
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26616
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", _hoisted_2$4, [createElementVNode("h1", _hoisted_3$3, toDisplayString(unref(t)("历史会话")), 1), createVNode(history_search_default, {
|
|
26616
26617
|
modelValue: a.value,
|
|
26617
26618
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
26618
26619
|
placeholder: unref(t)("搜索会话名称")
|
|
@@ -26675,7 +26676,7 @@ function useHistoryDropdown(e) {
|
|
|
26675
26676
|
isVisible: () => !1
|
|
26676
26677
|
};
|
|
26677
26678
|
}
|
|
26678
|
-
var _hoisted_1$
|
|
26679
|
+
var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" }, _hoisted_3$2 = ["src"], _hoisted_4$2 = {
|
|
26679
26680
|
key: 0,
|
|
26680
26681
|
class: "rename-tooltip"
|
|
26681
26682
|
}, _hoisted_5$1 = { class: "rename-content" }, _hoisted_6$1 = { class: "right-section" }, ai_header_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -26773,7 +26774,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26773
26774
|
${a}
|
|
26774
26775
|
</div>
|
|
26775
26776
|
`;
|
|
26776
|
-
}),
|
|
26777
|
+
}), Og = async () => {
|
|
26777
26778
|
if (i.sessionBusinessManager) try {
|
|
26778
26779
|
await i.sessionBusinessManager.createNewSession();
|
|
26779
26780
|
} catch (e) {
|
|
@@ -26785,16 +26786,16 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26785
26786
|
a("new-chat");
|
|
26786
26787
|
}, $ = (e) => {
|
|
26787
26788
|
e.stopPropagation(), i.sessionBusinessManager ? (L || z(), L && L.handleTriggerClick(e)) : a("history-click", e);
|
|
26788
|
-
},
|
|
26789
|
+
}, Ag = () => {
|
|
26789
26790
|
a("help-click");
|
|
26790
|
-
},
|
|
26791
|
+
}, jg = (e) => {
|
|
26791
26792
|
e.stopPropagation(), L && L.isVisible() && L.hide(), j && (j.state.isVisible ? j.hide() : j.show());
|
|
26792
|
-
},
|
|
26793
|
+
}, Ng = (e) => {
|
|
26793
26794
|
e.stopPropagation(), e.preventDefault();
|
|
26794
26795
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26795
26796
|
if (!n.classList.contains("disabled")) switch (j && j.hide(), r) {
|
|
26796
26797
|
case "rename":
|
|
26797
|
-
|
|
26798
|
+
Pg();
|
|
26798
26799
|
break;
|
|
26799
26800
|
case "auto-generate":
|
|
26800
26801
|
a("auto-generate-name");
|
|
@@ -26803,9 +26804,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26803
26804
|
a("share");
|
|
26804
26805
|
break;
|
|
26805
26806
|
}
|
|
26806
|
-
},
|
|
26807
|
-
document.removeEventListener("click",
|
|
26808
|
-
document.addEventListener("click",
|
|
26807
|
+
}, Pg = () => {
|
|
26808
|
+
document.removeEventListener("click", zg), g.value = i.sessionName || "", m.value = !0, setTimeout(() => {
|
|
26809
|
+
document.addEventListener("click", zg);
|
|
26809
26810
|
}, 100), setTimeout(() => {
|
|
26810
26811
|
if (k.value) try {
|
|
26811
26812
|
let e = k.value;
|
|
@@ -26816,22 +26817,22 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26816
26817
|
console.warn("Failed to focus rename input:", e);
|
|
26817
26818
|
}
|
|
26818
26819
|
}, 100);
|
|
26819
|
-
},
|
|
26820
|
+
}, Fg = () => {
|
|
26820
26821
|
let e = g.value.trim();
|
|
26821
26822
|
if (!e) {
|
|
26822
|
-
|
|
26823
|
+
Ig();
|
|
26823
26824
|
return;
|
|
26824
26825
|
}
|
|
26825
26826
|
a("rename", e), m.value = !1, g.value = "";
|
|
26826
|
-
},
|
|
26827
|
+
}, Ig = () => {
|
|
26827
26828
|
m.value = !1, g.value = "";
|
|
26828
|
-
},
|
|
26829
|
-
g.value = e, n.key === "Enter" ?
|
|
26830
|
-
},
|
|
26829
|
+
}, Lg = (e, n) => {
|
|
26830
|
+
g.value = e, n.key === "Enter" ? Fg() : n.key === "Escape" && Ig();
|
|
26831
|
+
}, zg = (e) => {
|
|
26831
26832
|
if (!m.value) return;
|
|
26832
26833
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26833
|
-
r && !r.contains(n) &&
|
|
26834
|
-
},
|
|
26834
|
+
r && !r.contains(n) && Ig();
|
|
26835
|
+
}, Vg = async () => {
|
|
26835
26836
|
if (!u.value) return;
|
|
26836
26837
|
let e = (await import("tippy.js")).default;
|
|
26837
26838
|
j &&= (j.destroy(), null), j = e(u.value, {
|
|
@@ -26849,7 +26850,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26849
26850
|
let { default: e } = await import("tippy.js");
|
|
26850
26851
|
document.querySelectorAll(".tippy-menu-item").forEach((n) => {
|
|
26851
26852
|
let r = n;
|
|
26852
|
-
r.addEventListener("click",
|
|
26853
|
+
r.addEventListener("click", Ng);
|
|
26853
26854
|
let i = r.getAttribute("data-tippy-content");
|
|
26854
26855
|
if (i && !I.has(r)) {
|
|
26855
26856
|
let n = e(r, {
|
|
@@ -26868,7 +26869,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26868
26869
|
onHide: () => {
|
|
26869
26870
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26870
26871
|
let n = e;
|
|
26871
|
-
n.removeEventListener("click",
|
|
26872
|
+
n.removeEventListener("click", Ng);
|
|
26872
26873
|
let r = I.get(n);
|
|
26873
26874
|
r && (r.destroy(), I.delete(n));
|
|
26874
26875
|
});
|
|
@@ -26878,11 +26879,11 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26878
26879
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26879
26880
|
j && j.setContent(Z.value);
|
|
26880
26881
|
}), onMounted(() => {
|
|
26881
|
-
|
|
26882
|
+
Vg(), i.sessionBusinessManager && z(), document.addEventListener("click", zg);
|
|
26882
26883
|
}), onBeforeUnmount(() => {
|
|
26883
26884
|
j &&= (j.destroy(), null), I.forEach((e) => {
|
|
26884
26885
|
e.destroy();
|
|
26885
|
-
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click",
|
|
26886
|
+
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", zg);
|
|
26886
26887
|
}), n({
|
|
26887
26888
|
headerRef: s,
|
|
26888
26889
|
historyIconRef: l
|
|
@@ -26890,7 +26891,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26890
26891
|
ref_key: "headerRef",
|
|
26891
26892
|
ref: s,
|
|
26892
26893
|
class: normalizeClass(["ai-header drag-handle", { draggable: i.draggable }])
|
|
26893
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
26894
|
+
}, [createElementVNode("div", _hoisted_1$4, [
|
|
26894
26895
|
createElementVNode("div", _hoisted_2$3, [createElementVNode("img", {
|
|
26895
26896
|
alt: "logo",
|
|
26896
26897
|
src: unref(avatar_default)
|
|
@@ -26905,13 +26906,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26905
26906
|
"onUpdate:modelValue": r[0] ||= (e) => g.value = e,
|
|
26906
26907
|
class: "rename-input",
|
|
26907
26908
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26908
|
-
onKeyup:
|
|
26909
|
+
onKeyup: Lg
|
|
26909
26910
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26910
26911
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26911
|
-
onClick:
|
|
26912
|
+
onClick: Fg
|
|
26912
26913
|
}), createElementVNode("i", {
|
|
26913
26914
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26914
|
-
onClick:
|
|
26915
|
+
onClick: Ig
|
|
26915
26916
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26916
26917
|
], 2),
|
|
26917
26918
|
i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26919,7 +26920,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26919
26920
|
ref_key: "moreIconRef",
|
|
26920
26921
|
ref: u,
|
|
26921
26922
|
class: "bkai-icon bkai-more",
|
|
26922
|
-
onClick:
|
|
26923
|
+
onClick: jg
|
|
26923
26924
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26924
26925
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26925
26926
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26931,7 +26932,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26931
26932
|
{ disabled: !K.value }
|
|
26932
26933
|
]),
|
|
26933
26934
|
style: normalizeStyle(J()),
|
|
26934
|
-
onClick: r[1] ||= (e) => K.value ?
|
|
26935
|
+
onClick: r[1] ||= (e) => K.value ? Og() : void 0
|
|
26935
26936
|
}, null, 6)), [[unref(o), {
|
|
26936
26937
|
content: q(unref(t)("新增会话")),
|
|
26937
26938
|
boundary: "parent"
|
|
@@ -26955,7 +26956,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26955
26956
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26956
26957
|
key: 2,
|
|
26957
26958
|
class: "bkai-icon bkai-zhushou",
|
|
26958
|
-
onClick:
|
|
26959
|
+
onClick: Ag
|
|
26959
26960
|
}, null, 512)), [[unref(o), {
|
|
26960
26961
|
content: unref(t)("转人工"),
|
|
26961
26962
|
boundary: "parent"
|
|
@@ -27173,7 +27174,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27173
27174
|
};
|
|
27174
27175
|
await this.sessionModule.createSession(n);
|
|
27175
27176
|
let r = this.agentModule?.info.value;
|
|
27176
|
-
r && this.agentModule?.handleRole(r), this.emit("session-created", { session: this.sessionModule.current.value });
|
|
27177
|
+
r && this.agentModule?.handleRole(r, n.sessionCode), this.emit("session-created", { session: this.sessionModule.current.value });
|
|
27177
27178
|
} catch (e) {
|
|
27178
27179
|
throw console.error("Failed to create session:", e), this.emit("session-error", {
|
|
27179
27180
|
action: "create",
|
|
@@ -27685,7 +27686,7 @@ var UIStateManager = class {
|
|
|
27685
27686
|
reset() {
|
|
27686
27687
|
this.clearSelection(), this.disableSelectionMode(), this.stopEditingSession(), this.clearLoadingStates();
|
|
27687
27688
|
}
|
|
27688
|
-
}, _hoisted_1$
|
|
27689
|
+
}, _hoisted_1$3 = { class: "selection-footer" }, _hoisted_2$2 = { class: "selection-footer-left" }, _hoisted_3$1 = { class: "select-all-text" }, _hoisted_4$1 = { class: "selection-footer-right" }, selection_footer_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
27689
27690
|
__name: "selection-footer",
|
|
27690
27691
|
props: {
|
|
27691
27692
|
isAllSelected: { type: Boolean },
|
|
@@ -27702,7 +27703,7 @@ var UIStateManager = class {
|
|
|
27702
27703
|
],
|
|
27703
27704
|
setup(e) {
|
|
27704
27705
|
let n = e;
|
|
27705
|
-
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
27706
|
+
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", _hoisted_2$2, [createVNode(unref(Checkbox), {
|
|
27706
27707
|
"model-value": n.isAllSelected,
|
|
27707
27708
|
"onUpdate:modelValue": r[0] ||= (n) => e.$emit("toggle-all", n)
|
|
27708
27709
|
}, null, 8, ["model-value"]), createElementVNode("span", _hoisted_3$1, toDisplayString(unref(t)("全选")), 1)]), createElementVNode("div", _hoisted_4$1, [createVNode(unref(Button), {
|
|
@@ -27721,7 +27722,7 @@ var UIStateManager = class {
|
|
|
27721
27722
|
_: 1
|
|
27722
27723
|
}, 8, ["disabled", "loading"])])]));
|
|
27723
27724
|
}
|
|
27724
|
-
}), [["__scopeId", "data-v-3247bea6"]]), _hoisted_1$
|
|
27725
|
+
}), [["__scopeId", "data-v-3247bea6"]]), _hoisted_1$2 = {
|
|
27725
27726
|
key: 0,
|
|
27726
27727
|
class: "chatbot-error"
|
|
27727
27728
|
}, _hoisted_2$1 = { class: "chatbot-loading" }, _hoisted_3 = {
|
|
@@ -27800,7 +27801,7 @@ var UIStateManager = class {
|
|
|
27800
27801
|
a("receive-text");
|
|
27801
27802
|
},
|
|
27802
27803
|
onDone: () => {
|
|
27803
|
-
a("receive-end"),
|
|
27804
|
+
a("receive-end"), m_();
|
|
27804
27805
|
},
|
|
27805
27806
|
onError: (e) => {
|
|
27806
27807
|
a("error", e);
|
|
@@ -27816,11 +27817,11 @@ var UIStateManager = class {
|
|
|
27816
27817
|
return n.injectMessageModule(r.message), r;
|
|
27817
27818
|
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), G = async (e, n) => {
|
|
27818
27819
|
if (e.id === "cite") {
|
|
27819
|
-
|
|
27820
|
+
Jg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), j_();
|
|
27820
27821
|
return;
|
|
27821
27822
|
}
|
|
27822
27823
|
if (e.id === "rebuild") {
|
|
27823
|
-
await
|
|
27824
|
+
await Og(n);
|
|
27824
27825
|
return;
|
|
27825
27826
|
}
|
|
27826
27827
|
if (e.id === "delete") {
|
|
@@ -27828,7 +27829,7 @@ var UIStateManager = class {
|
|
|
27828
27829
|
return;
|
|
27829
27830
|
}
|
|
27830
27831
|
if (e.id === "share") {
|
|
27831
|
-
|
|
27832
|
+
zg && (E.value = !0), a("request-share");
|
|
27832
27833
|
return;
|
|
27833
27834
|
}
|
|
27834
27835
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27850,7 +27851,7 @@ var UIStateManager = class {
|
|
|
27850
27851
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27851
27852
|
return;
|
|
27852
27853
|
}
|
|
27853
|
-
let s = findLastUserMessageIdBefore(
|
|
27854
|
+
let s = findLastUserMessageIdBefore(Wg?.messages.value || [], n[0]);
|
|
27854
27855
|
if (s === void 0) {
|
|
27855
27856
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27856
27857
|
return;
|
|
@@ -27868,12 +27869,12 @@ var UIStateManager = class {
|
|
|
27868
27869
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27869
27870
|
}
|
|
27870
27871
|
}, Z = async (e) => {
|
|
27871
|
-
if (!
|
|
27872
|
+
if (!Wg || !z) {
|
|
27872
27873
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27873
27874
|
return;
|
|
27874
27875
|
}
|
|
27875
27876
|
try {
|
|
27876
|
-
let n =
|
|
27877
|
+
let n = Wg.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27877
27878
|
if (!r) {
|
|
27878
27879
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27879
27880
|
return;
|
|
@@ -27883,8 +27884,8 @@ var UIStateManager = class {
|
|
|
27883
27884
|
} catch (e) {
|
|
27884
27885
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27885
27886
|
}
|
|
27886
|
-
},
|
|
27887
|
-
if (!
|
|
27887
|
+
}, Og = async (e) => {
|
|
27888
|
+
if (!Wg || !z) {
|
|
27888
27889
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27889
27890
|
return;
|
|
27890
27891
|
}
|
|
@@ -27894,21 +27895,21 @@ var UIStateManager = class {
|
|
|
27894
27895
|
return;
|
|
27895
27896
|
}
|
|
27896
27897
|
try {
|
|
27897
|
-
await
|
|
27898
|
+
await Wg.regenerateFromAIMessages(e, n), m_();
|
|
27898
27899
|
} catch (e) {
|
|
27899
27900
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27900
27901
|
}
|
|
27901
27902
|
}, $ = async (e, n) => {
|
|
27902
27903
|
if (e.id === "delete") {
|
|
27903
|
-
await
|
|
27904
|
+
await Pg(n);
|
|
27904
27905
|
return;
|
|
27905
27906
|
}
|
|
27906
27907
|
if (e.id === "cite") {
|
|
27907
|
-
|
|
27908
|
+
Jg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), j_();
|
|
27908
27909
|
return;
|
|
27909
27910
|
}
|
|
27910
27911
|
console.log("handleUserAction", e, n);
|
|
27911
|
-
},
|
|
27912
|
+
}, Ag = async (e, n, r) => {
|
|
27912
27913
|
if (!z) {
|
|
27913
27914
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27914
27915
|
return;
|
|
@@ -27924,12 +27925,12 @@ var UIStateManager = class {
|
|
|
27924
27925
|
return;
|
|
27925
27926
|
}
|
|
27926
27927
|
try {
|
|
27927
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
27928
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), m_();
|
|
27928
27929
|
} catch (e) {
|
|
27929
27930
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27930
27931
|
}
|
|
27931
|
-
},
|
|
27932
|
-
if (!
|
|
27932
|
+
}, jg = async (e, n) => {
|
|
27933
|
+
if (!Wg || !z) {
|
|
27933
27934
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27934
27935
|
return;
|
|
27935
27936
|
}
|
|
@@ -27944,26 +27945,26 @@ var UIStateManager = class {
|
|
|
27944
27945
|
return;
|
|
27945
27946
|
}
|
|
27946
27947
|
try {
|
|
27947
|
-
let a =
|
|
27948
|
+
let a = Ng(e);
|
|
27948
27949
|
if (!a) {
|
|
27949
27950
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27950
27951
|
return;
|
|
27951
27952
|
}
|
|
27952
|
-
let o =
|
|
27953
|
-
await
|
|
27953
|
+
let o = E_(a, n), s = String(n.input ?? "");
|
|
27954
|
+
await Wg.resendMessageWithProperty(String(i), r, s, o), m_();
|
|
27954
27955
|
} catch (e) {
|
|
27955
27956
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27956
27957
|
}
|
|
27957
|
-
},
|
|
27958
|
+
}, Ng = (e) => {
|
|
27958
27959
|
let n = e.property?.extra;
|
|
27959
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27960
|
-
},
|
|
27961
|
-
if (!
|
|
27960
|
+
return n?.shortcut ? n.shortcut : n?.command ? p_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27961
|
+
}, Pg = async (e) => {
|
|
27962
|
+
if (!Wg || !z) {
|
|
27962
27963
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27963
27964
|
return;
|
|
27964
27965
|
}
|
|
27965
27966
|
try {
|
|
27966
|
-
let n =
|
|
27967
|
+
let n = Wg.messages.value, r = n.findIndex((n) => n === e);
|
|
27967
27968
|
if (r === -1) {
|
|
27968
27969
|
console.error("[ChatBot] User message not found in messages list");
|
|
27969
27970
|
return;
|
|
@@ -27979,29 +27980,31 @@ var UIStateManager = class {
|
|
|
27979
27980
|
} catch (e) {
|
|
27980
27981
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27981
27982
|
}
|
|
27982
|
-
},
|
|
27983
|
+
}, Ig = async () => {
|
|
27983
27984
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27984
|
-
},
|
|
27985
|
+
}, zg = !i.chatHelper, Vg = computed(() => zg ? E.value : i.enableSelection), Hg = computed(() => zg ? k.value : i.shareLoading), Ug = z ? new SessionBusinessManager(z.session, z.agent, null, {
|
|
27985
27986
|
enableChatSession: !0,
|
|
27986
27987
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27987
27988
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27988
27989
|
initialSessionCode: i.sessionCode
|
|
27989
|
-
}) : null,
|
|
27990
|
+
}) : null, Wg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
27990
27991
|
openingRemark: i.helloText,
|
|
27991
27992
|
predefinedQuestions: i.prompts,
|
|
27992
27993
|
placeholder: i.placeholder
|
|
27993
|
-
}) : null,
|
|
27994
|
+
}) : null, Gg = new ShortcutManager(null, i.shortcuts || []), qg = shallowRef([[]]), Jg = ref(""), Yg = shallowRef([]), Xg = (e, n) => {
|
|
27995
|
+
qg.value = e, Yg.value = n;
|
|
27996
|
+
}, Zg = computed(() => Wg?.messages.value ?? []), Qg = computed(() => Wg?.isMessagesLoading.value ?? !1), $g = computed(() => Wg?.isGenerating.value ?? !1), e_ = computed(() => Ug?.currentSession.value ?? null), t_ = computed(() => zg && !j.value ? !1 : !Qg.value && Zg.value.length === 0), n_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), r_ = computed(() => i.resources?.length ? i.resources : z?.agent.info.value?.resources ?? []), i_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), a_ = computed(() => ({
|
|
27994
27997
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27995
27998
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27996
|
-
})),
|
|
27997
|
-
let e =
|
|
27999
|
+
})), c_ = computed(() => {
|
|
28000
|
+
let e = Gg.shortcuts.value;
|
|
27998
28001
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27999
|
-
}),
|
|
28000
|
-
m.value = [],
|
|
28001
|
-
},
|
|
28002
|
+
}), l_ = () => {
|
|
28003
|
+
m.value = [], zg && (E.value = !1), a("cancel-share");
|
|
28004
|
+
}, u_ = async () => {
|
|
28002
28005
|
let e = m.value;
|
|
28003
|
-
|
|
28004
|
-
},
|
|
28006
|
+
zg && await d_(e), a("confirm-share", e);
|
|
28007
|
+
}, d_ = async (e) => {
|
|
28005
28008
|
if (!z || e.length === 0) return;
|
|
28006
28009
|
let n = z.session.current?.value?.sessionCode;
|
|
28007
28010
|
if (!n) {
|
|
@@ -28023,42 +28026,42 @@ var UIStateManager = class {
|
|
|
28023
28026
|
} finally {
|
|
28024
28027
|
k.value = !1, E.value = !1, m.value = [];
|
|
28025
28028
|
}
|
|
28026
|
-
},
|
|
28027
|
-
e ? m.value =
|
|
28028
|
-
},
|
|
28029
|
+
}, f_ = (e) => {
|
|
28030
|
+
e ? m.value = Zg.value : m.value = [];
|
|
28031
|
+
}, p_ = Gg.effectiveShortcuts;
|
|
28029
28032
|
watch(() => i.shortcuts, (e) => {
|
|
28030
|
-
|
|
28033
|
+
Gg.setShortcuts(e || []);
|
|
28031
28034
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
28032
|
-
e &&
|
|
28035
|
+
e && Gg.setAgentShortcuts(e);
|
|
28033
28036
|
}, { immediate: !0 });
|
|
28034
|
-
let
|
|
28037
|
+
let m_ = async () => {
|
|
28035
28038
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
28036
|
-
},
|
|
28037
|
-
if (!
|
|
28039
|
+
}, h_ = async (e, n = {}) => {
|
|
28040
|
+
if (!Wg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
28038
28041
|
let r = z.session.current?.value?.sessionCode;
|
|
28039
28042
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
28040
|
-
|
|
28043
|
+
qg.value = [[]], Jg.value = "", Yg.value = [], a("send-message", typeof e == "string" ? e : ""), await Wg.sendMessage(e, r, n);
|
|
28041
28044
|
}, __ = async (e) => {
|
|
28042
28045
|
let n = z?.session.current?.value?.sessionCode;
|
|
28043
28046
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
28044
28047
|
let r = await z.session.uploadFile(n, e);
|
|
28045
28048
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
28046
28049
|
return r;
|
|
28047
|
-
},
|
|
28050
|
+
}, y_ = async (e, n) => {
|
|
28048
28051
|
try {
|
|
28049
28052
|
let n = {};
|
|
28050
|
-
|
|
28053
|
+
Jg.value && (n.cite = Jg.value), u.value && (n.command = u.value.id), Yg.value.length && (n.resources = Yg.value), await h_(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
28051
28054
|
} catch (e) {
|
|
28052
28055
|
console.error("Failed to send message:", e), a("error", e);
|
|
28053
28056
|
}
|
|
28054
|
-
},
|
|
28055
|
-
|
|
28056
|
-
},
|
|
28057
|
-
|
|
28057
|
+
}, S_ = async () => {
|
|
28058
|
+
O_();
|
|
28059
|
+
}, C_ = (e, n) => {
|
|
28060
|
+
w_(e, n), a("shortcut-click", {
|
|
28058
28061
|
shortcut: e,
|
|
28059
28062
|
source: "main"
|
|
28060
28063
|
});
|
|
28061
|
-
},
|
|
28064
|
+
}, w_ = (e, n) => {
|
|
28062
28065
|
let r = e, i;
|
|
28063
28066
|
if (i = r.enable_fill_back && r.fill_back_component_key ? r.fill_back_component_key : r.components?.find((e) => e.fillBack)?.key, i && n) {
|
|
28064
28067
|
let e = r.components?.map((e) => e.key === i ? {
|
|
@@ -28080,9 +28083,9 @@ var UIStateManager = class {
|
|
|
28080
28083
|
...r,
|
|
28081
28084
|
formModel: { ...r.formModel }
|
|
28082
28085
|
};
|
|
28083
|
-
},
|
|
28086
|
+
}, T_ = () => {
|
|
28084
28087
|
u.value = null;
|
|
28085
|
-
},
|
|
28088
|
+
}, E_ = (e, n) => {
|
|
28086
28089
|
let r = e.components || [];
|
|
28087
28090
|
return { extra: {
|
|
28088
28091
|
cite: {
|
|
@@ -28102,42 +28105,42 @@ var UIStateManager = class {
|
|
|
28102
28105
|
__value: n[e.key]
|
|
28103
28106
|
}))
|
|
28104
28107
|
} };
|
|
28105
|
-
},
|
|
28108
|
+
}, D_ = async (e) => {
|
|
28106
28109
|
if (!u.value) {
|
|
28107
28110
|
console.error("[ChatBot] No selected shortcut");
|
|
28108
28111
|
return;
|
|
28109
28112
|
}
|
|
28110
|
-
let n =
|
|
28111
|
-
|
|
28113
|
+
let n = E_(u.value, e), r = u.value.name, i = u.value;
|
|
28114
|
+
T_();
|
|
28112
28115
|
try {
|
|
28113
|
-
await
|
|
28116
|
+
await h_(r, { property: n });
|
|
28114
28117
|
} catch (e) {
|
|
28115
28118
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
28116
28119
|
}
|
|
28117
|
-
},
|
|
28118
|
-
if (!
|
|
28120
|
+
}, O_ = () => {
|
|
28121
|
+
if (!Wg) {
|
|
28119
28122
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
28120
28123
|
return;
|
|
28121
28124
|
}
|
|
28122
|
-
|
|
28123
|
-
},
|
|
28124
|
-
if (!
|
|
28125
|
+
Wg.stopGeneration(), a("stop");
|
|
28126
|
+
}, k_ = async (e) => {
|
|
28127
|
+
if (!Ug) {
|
|
28125
28128
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
28126
28129
|
return;
|
|
28127
28130
|
}
|
|
28128
28131
|
try {
|
|
28129
|
-
await
|
|
28132
|
+
await Ug.switchSession(e), a("session-switched", Ug.currentSession.value);
|
|
28130
28133
|
} catch (e) {
|
|
28131
28134
|
console.error("Failed to switch session:", e), a("error", e);
|
|
28132
28135
|
}
|
|
28133
|
-
},
|
|
28134
|
-
|
|
28135
|
-
},
|
|
28136
|
+
}, A_ = (e) => {
|
|
28137
|
+
Jg.value = e;
|
|
28138
|
+
}, j_ = () => {
|
|
28136
28139
|
l.value?.focus?.();
|
|
28137
28140
|
};
|
|
28138
28141
|
return onMounted(async () => {
|
|
28139
28142
|
if (!(!z || I.value)) try {
|
|
28140
|
-
if (
|
|
28143
|
+
if (zg) {
|
|
28141
28144
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
28142
28145
|
else if (z.session.list.value.length > 0) {
|
|
28143
28146
|
let e = z.session.list.value[0];
|
|
@@ -28150,46 +28153,46 @@ var UIStateManager = class {
|
|
|
28150
28153
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
28151
28154
|
}
|
|
28152
28155
|
}), onBeforeUnmount(() => {
|
|
28153
|
-
|
|
28156
|
+
zg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
28154
28157
|
}), n({
|
|
28155
|
-
sendMessage: (e) =>
|
|
28156
|
-
stopGeneration:
|
|
28157
|
-
switchSession:
|
|
28158
|
-
messages:
|
|
28159
|
-
currentSession:
|
|
28160
|
-
isGenerating:
|
|
28158
|
+
sendMessage: (e) => y_(e, [[]]),
|
|
28159
|
+
stopGeneration: O_,
|
|
28160
|
+
switchSession: k_,
|
|
28161
|
+
messages: Zg,
|
|
28162
|
+
currentSession: e_,
|
|
28163
|
+
isGenerating: $g,
|
|
28161
28164
|
getChatHelper: () => z,
|
|
28162
|
-
setCiteText:
|
|
28163
|
-
focusInput:
|
|
28165
|
+
setCiteText: A_,
|
|
28166
|
+
focusInput: j_,
|
|
28164
28167
|
selectShortcut: (e, n) => {
|
|
28165
|
-
|
|
28168
|
+
w_(e, n);
|
|
28166
28169
|
}
|
|
28167
28170
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
28168
28171
|
class: normalizeClass([
|
|
28169
28172
|
"ai-chatbot",
|
|
28170
28173
|
i.extCls,
|
|
28171
|
-
{ "welcome-state":
|
|
28174
|
+
{ "welcome-state": t_.value }
|
|
28172
28175
|
]),
|
|
28173
|
-
style: normalizeStyle(
|
|
28174
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
28176
|
+
style: normalizeStyle(a_.value)
|
|
28177
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : zg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
28175
28178
|
mode: "spin",
|
|
28176
28179
|
size: "small",
|
|
28177
28180
|
theme: "primary"
|
|
28178
28181
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
28179
28182
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
28180
|
-
|
|
28181
|
-
n[
|
|
28183
|
+
t_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [
|
|
28184
|
+
n[2] ||= createElementVNode("img", {
|
|
28182
28185
|
alt: "ai-blueking",
|
|
28183
28186
|
class: "welcome-banner",
|
|
28184
28187
|
src: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='309px'%20height='93px'%20viewBox='0%200%20309%2093'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eAI%20小鲸%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='45.02491%25'%20y1='35.5927467%25'%20x2='99.2803929%25'%20y2='81.0358394%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-2'%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.885701426'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.29'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-3'%3e%3cstop%20stop-color='%231562FC'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='95.0902604%25'%20x2='35.112422%25'%20y2='19.6450217%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23DC63FE'%20offset='0.0150240385%25'%3e%3c/stop%3e%3cstop%20stop-color='%23235DFA'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='46.6072083%25'%20y1='95.8855311%25'%20x2='46.6072083%25'%20y2='50%25'%20id='linearGradient-5'%3e%3cstop%20stop-color='%23B962FD'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23565FFB'%20offset='99.984976%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23A826E2'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='-38.6691405%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-7'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%239F7BF1'%20stop-opacity='0.15'%20offset='62.335824%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='AI--小鲸'%20transform='translate(-1710,%20-3457)'%3e%3cg%20id='聊天窗/默认页'%20transform='translate(1644,%203324)'%3e%3cg%20id='AI-小鲸'%20transform='translate(66,%20133.2974)'%3e%3cg%20transform='translate(124.4167,%20-0)'%20id='编组'%3e%3cg%20transform='translate(0,%200)'%3e%3cpath%20d='M28.3965776,12.9425679%20C38.3377031,12.9425679%2046.3965776,21.0014424%2046.3965776,30.9425679%20L46.3969075,48.6505618%20C51.2162571,49.132982%2054.5842089,50.4998157%2054.5842089,53.8408323%20C54.5842089,53.8444226%2054.5842089,53.8477257%2054.5824622,53.8507588%20L54.5702354,53.8590653%20C54.5370482,53.8709895%2054.4250414,53.8772107%2054.0470184,53.8795761%20L53.8473221,53.8804155%20C53.8227592,53.8804783%2053.7973775,53.8805312%2053.7711498,53.8805746%20L53.4140599,53.8806511%20C53.3806271,53.8806219%2053.3462391,53.8805842%2053.3108685,53.8805382%20L52.8375142,53.8796076%20C51.6610285,53.8767057%2049.6921211,53.8685916%2046.3970568,53.8605313%20L46.3965776,53.8807246%20L23.4584209,53.8807246%20C14.9044209,53.8807246%207.74404265,47.9139206%205.91235374,39.9153803%20C2.4976649,38.935189%200,35.8013205%200,32.0869334%20L1.43000256,32.0866983%20C1.58407741,32.0866469%201.73656386,32.0865873%201.88747828,32.0865198%20L3.20370552,32.0857063%20C4.00314289,32.0850715%204.75405903,32.0842107%205.4593989,32.0831725%20L5.45842089,30.9425679%20C5.45842089,21.0014424%2013.5172954,12.9425679%2023.4584209,12.9425679%20L28.3965776,12.9425679%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-2)'%20x='10.9168418'%20y='18.4009888'%20width='30.0213149'%20height='30.0213149'%20rx='12'%3e%3c/rect%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-3)'%20x='49.125788'%20y='21.1301993'%20width='5.45842089'%20height='24.562894'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M51.8123687,2.72921045%20C51.8123687,6.90327561%2054.9358287,10.3478176%2058.9729609,10.8530485%20L60,10.9168418%20C55.8259348,10.9168418%2052.3813929,14.0403018%2051.8761619,18.077434%20L51.8123687,19.1044731%20C51.8123687,14.930408%2048.6889086,11.485866%2044.6517764,10.9806351%20L43.6247373,10.9168418%20C47.7988025,10.9168418%2051.2433445,7.79338174%2051.7485754,3.75624952%20L51.8123687,2.72921045%20Z'%20id='星形'%20fill='url(%23linearGradient-4)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M40.8955269,-1.43884904e-13%20C40.8955269,2.78271011%2042.9778336,5.07907143%2045.6692551,5.41589204%20L46.3539478,5.45842089%20C43.5712377,5.45842089%2041.2748763,7.54072759%2040.9380557,10.2321491%20L40.8955269,10.9168418%20C40.8955269,8.13413168%2038.8132202,5.83777036%2036.1217987,5.50094974%20L35.437106,5.45842089%20C38.2198161,5.45842089%2040.5161774,3.3761142%2040.852998,0.684692719%20L40.8955269,-1.43884904e-13%20Z'%20id='星形'%20fill='url(%23linearGradient-5)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M44.4235306,12.0484656%20C44.4235306,13.4398207%2045.464684,14.5880013%2046.8103947,14.7564116%20L47.1527411,14.7776761%20C45.761386,14.7776761%2044.6132054,15.8188294%2044.4447951,17.1645402%20L44.4235306,17.5068865%20C44.4235306,16.1155315%2043.3823773,14.9673508%2042.0366665,14.7989405%20L41.6943202,14.7776761%20C43.0856752,14.7776761%2044.2338559,13.7365227%2044.4022662,12.390812%20L44.4235306,12.0484656%20Z'%20id='星形'%20fill='%238860FC'%20fill-rule='nonzero'%3e%3c/path%3e%3crect%20id='矩形'%20fill='%2316204D'%20x='17.7398679'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3crect%20id='矩形备份'%20fill='%2316204D'%20x='28.6567097'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M33.2681489,12.9425679%20C32.5347773,9.30362068%2031.08981,7.48414704%2028.9332468,7.48414704%20C25.698402,7.48414704%2025.7333802,11.8081925%2028.9332468,11.4257275%20C30.6212196,11.223972%2031.7656965,11.7295855%2032.3666775,12.9425679%20L33.2681489,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%20transform='translate(29.8942,%2010.2134)%20scale(-1,%201)%20translate(-29.8942,%20-10.2134)'%3e%3c/path%3e%3cpath%20d='M26.5202122,12.9425679%20C25.7868406,9.30362068%2024.3418733,7.48414704%2022.1853101,7.48414704%20C18.9504653,7.48414704%2018.9854435,11.8081925%2022.1853101,11.4257275%20C23.8732829,11.223972%2025.0177598,11.7295855%2025.6187408,12.9425679%20L26.5202122,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cpath%20d='M309,81.279814%20C309,66.0493667%20239.827994,53.7026496%20154.5,53.7026496%20C69.1720062,53.7026496%200,66.0493667%200,81.279814%20C0,96.5102614%20309,96.5102614%20309,81.279814%20Z'%20id='椭圆形'%20fill='url(%23linearGradient-7)'%20opacity='0.22710455'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"
|
|
28185
28188
|
}, null, -1),
|
|
28186
|
-
n[
|
|
28187
|
-
|
|
28189
|
+
n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
|
|
28190
|
+
n_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: n_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
|
|
28188
28191
|
])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28189
28192
|
ref_key: "messagesContainerRef",
|
|
28190
28193
|
ref: s,
|
|
28191
28194
|
class: "chatbot-messages"
|
|
28192
|
-
}, [
|
|
28195
|
+
}, [Qg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28193
28196
|
mode: "spin",
|
|
28194
28197
|
size: "small",
|
|
28195
28198
|
theme: "primary"
|
|
@@ -28197,17 +28200,17 @@ var UIStateManager = class {
|
|
|
28197
28200
|
key: 1,
|
|
28198
28201
|
"selected-messages": m.value,
|
|
28199
28202
|
"onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
|
|
28200
|
-
"enable-selection":
|
|
28203
|
+
"enable-selection": Vg.value,
|
|
28201
28204
|
"message-status": B.value,
|
|
28202
28205
|
"message-tools-status": H.value,
|
|
28203
28206
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28204
|
-
messages:
|
|
28207
|
+
messages: Zg.value,
|
|
28205
28208
|
"on-agent-action": G,
|
|
28206
28209
|
"on-agent-feedback": K,
|
|
28207
28210
|
"on-user-action": $,
|
|
28208
|
-
"on-user-input-confirm":
|
|
28209
|
-
"on-user-shortcut-confirm":
|
|
28210
|
-
onStopStreaming:
|
|
28211
|
+
"on-user-input-confirm": Ag,
|
|
28212
|
+
"on-user-shortcut-confirm": jg,
|
|
28213
|
+
onStopStreaming: Ig
|
|
28211
28214
|
}, null, 8, [
|
|
28212
28215
|
"selected-messages",
|
|
28213
28216
|
"enable-selection",
|
|
@@ -28217,43 +28220,43 @@ var UIStateManager = class {
|
|
|
28217
28220
|
"messages"
|
|
28218
28221
|
]))], 512)], 2112)),
|
|
28219
28222
|
createCommentVNode(" 统一底部区域 "),
|
|
28220
|
-
!
|
|
28223
|
+
!t_.value && Vg.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28221
28224
|
key: 2,
|
|
28222
|
-
"is-all-selected": m.value.length ===
|
|
28223
|
-
loading:
|
|
28225
|
+
"is-all-selected": m.value.length === Zg.value.length,
|
|
28226
|
+
loading: Hg.value,
|
|
28224
28227
|
"selected-count": m.value.length,
|
|
28225
|
-
onCancel:
|
|
28226
|
-
onConfirm:
|
|
28227
|
-
onToggleAll:
|
|
28228
|
+
onCancel: l_,
|
|
28229
|
+
onConfirm: u_,
|
|
28230
|
+
onToggleAll: f_
|
|
28228
28231
|
}, null, 8, [
|
|
28229
28232
|
"is-all-selected",
|
|
28230
28233
|
"loading",
|
|
28231
28234
|
"selected-count"
|
|
28232
28235
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28233
|
-
onClose:
|
|
28234
|
-
onSubmit:
|
|
28236
|
+
onClose: T_,
|
|
28237
|
+
onSubmit: D_
|
|
28235
28238
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28236
28239
|
ref_key: "chatInputRef",
|
|
28237
28240
|
ref: l,
|
|
28238
|
-
|
|
28239
|
-
"onUpdate:
|
|
28240
|
-
cite: Zg.value,
|
|
28241
|
-
"onUpdate:cite": n[2] ||= (e) => Zg.value = e,
|
|
28241
|
+
cite: Jg.value,
|
|
28242
|
+
"onUpdate:cite": n[1] ||= (e) => Jg.value = e,
|
|
28242
28243
|
"message-status": B.value,
|
|
28243
|
-
"
|
|
28244
|
-
"on-
|
|
28244
|
+
"model-value": qg.value,
|
|
28245
|
+
"on-send-message": y_,
|
|
28246
|
+
"on-stop-sending": S_,
|
|
28245
28247
|
"on-upload": __,
|
|
28246
28248
|
placeholder: i.placeholder,
|
|
28247
|
-
prompts:
|
|
28248
|
-
resources:
|
|
28249
|
+
prompts: i_.value,
|
|
28250
|
+
resources: r_.value,
|
|
28249
28251
|
"shortcut-id": u.value?.id,
|
|
28250
|
-
shortcuts:
|
|
28251
|
-
onDeleteShortcut:
|
|
28252
|
-
onSelectShortcut:
|
|
28252
|
+
shortcuts: c_.value,
|
|
28253
|
+
onDeleteShortcut: T_,
|
|
28254
|
+
onSelectShortcut: C_,
|
|
28255
|
+
"onUpdate:modelValue": Xg
|
|
28253
28256
|
}, null, 8, [
|
|
28254
|
-
"modelValue",
|
|
28255
28257
|
"cite",
|
|
28256
28258
|
"message-status",
|
|
28259
|
+
"model-value",
|
|
28257
28260
|
"placeholder",
|
|
28258
28261
|
"prompts",
|
|
28259
28262
|
"resources",
|
|
@@ -29050,7 +29053,7 @@ function useDraggable(e = {}, n) {
|
|
|
29050
29053
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
29051
29054
|
}, q = (e, n) => {
|
|
29052
29055
|
v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
|
|
29053
|
-
},
|
|
29056
|
+
}, Tg = (e, n) => {
|
|
29054
29057
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
29055
29058
|
};
|
|
29056
29059
|
return onMounted(() => {
|
|
@@ -29072,13 +29075,13 @@ function useDraggable(e = {}, n) {
|
|
|
29072
29075
|
handleResizeStop: H,
|
|
29073
29076
|
toggleCompression: K,
|
|
29074
29077
|
updatePosition: q,
|
|
29075
|
-
updateSize:
|
|
29078
|
+
updateSize: Tg,
|
|
29076
29079
|
updatePositionAndSize: (e, n, r, i) => {
|
|
29077
|
-
q(e, n),
|
|
29080
|
+
q(e, n), Tg(r, i);
|
|
29078
29081
|
}
|
|
29079
29082
|
};
|
|
29080
29083
|
}
|
|
29081
|
-
var _hoisted_1$
|
|
29084
|
+
var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
29082
29085
|
__name: "draggable-container",
|
|
29083
29086
|
props: {
|
|
29084
29087
|
visible: {
|
|
@@ -29146,11 +29149,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29146
29149
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29147
29150
|
e.style.pointerEvents = "";
|
|
29148
29151
|
});
|
|
29149
|
-
},
|
|
29152
|
+
}, Eg = (e, n) => {
|
|
29150
29153
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29151
|
-
},
|
|
29154
|
+
}, Dg = (e, n, r, i) => {
|
|
29152
29155
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29153
|
-
},
|
|
29156
|
+
}, Og = (e, n) => {
|
|
29154
29157
|
I(e, n), o.value = !1, Z();
|
|
29155
29158
|
}, $ = (e, n, r, i) => {
|
|
29156
29159
|
L(e, n, r, i), o.value = !1, Z();
|
|
@@ -29182,12 +29185,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29182
29185
|
w: unref(v),
|
|
29183
29186
|
x: unref(_),
|
|
29184
29187
|
y: unref(m),
|
|
29185
|
-
onDragStop:
|
|
29186
|
-
onDragging:
|
|
29188
|
+
onDragStop: Og,
|
|
29189
|
+
onDragging: Eg,
|
|
29187
29190
|
onResizeStop: $,
|
|
29188
|
-
onResizing:
|
|
29191
|
+
onResizing: Dg
|
|
29189
29192
|
}, {
|
|
29190
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
29193
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
29191
29194
|
_: 3
|
|
29192
29195
|
}, 8, [
|
|
29193
29196
|
"active",
|
|
@@ -29205,7 +29208,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29205
29208
|
"y"
|
|
29206
29209
|
])), [[vShow, i.visible]]);
|
|
29207
29210
|
}
|
|
29208
|
-
}), [["__scopeId", "data-v-de563c20"]]), _hoisted_1
|
|
29211
|
+
}), [["__scopeId", "data-v-de563c20"]]), _hoisted_1 = { class: "nimbus-bkai-wrapper" }, _hoisted_2 = [
|
|
29209
29212
|
"width",
|
|
29210
29213
|
"height",
|
|
29211
29214
|
"src"
|
|
@@ -29307,7 +29310,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29307
29310
|
onMouseenter: r[3] ||= (...e) => unref(k) && unref(k)(...e),
|
|
29308
29311
|
onMouseleave: r[4] ||= (...e) => unref(j) && unref(j)(...e),
|
|
29309
29312
|
onMouseup: r[5] ||= (...e) => unref(L) && unref(L)(...e)
|
|
29310
|
-
}, [createElementVNode("div", _hoisted_1
|
|
29313
|
+
}, [createElementVNode("div", _hoisted_1, [createElementVNode("img", {
|
|
29311
29314
|
width: o.value.img,
|
|
29312
29315
|
height: o.value.img,
|
|
29313
29316
|
src: unref(avatar_default),
|
|
@@ -29328,7 +29331,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29328
29331
|
"onDragging"
|
|
29329
29332
|
]));
|
|
29330
29333
|
}
|
|
29331
|
-
}), [["__scopeId", "data-v-26b6f3ea"]]),
|
|
29334
|
+
}), [["__scopeId", "data-v-26b6f3ea"]]), ai_blueking_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
29332
29335
|
__name: "ai-blueking",
|
|
29333
29336
|
props: /* @__PURE__ */ mergeDefaults({
|
|
29334
29337
|
autoSwitchToInitialSession: { type: Boolean },
|
|
@@ -29428,12 +29431,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29428
29431
|
}), K = I, q = new SessionBusinessManager(K.session, K.agent, null, {
|
|
29429
29432
|
enableChatSession: i.enableChatSession,
|
|
29430
29433
|
initialSessionCode: i.initialSessionCode
|
|
29431
|
-
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value),
|
|
29434
|
+
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Og = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), Ag = ref(!1), jg = ref(""), Ng = { appendTo: (e) => {
|
|
29432
29435
|
let n = e.closest(".draggable-container-content");
|
|
29433
29436
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29434
|
-
} },
|
|
29437
|
+
} }, Pg = computed(() => m.isCompressed.value), Fg = computed(() => B.value), Ig = ref(""), Lg = ref(!0), Rg = ref(!1), zg = computed(() => i.resources?.length ? i.resources : z.value?.resources ?? []), Vg = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Hg = computed(() => {
|
|
29435
29438
|
let e = $.effectiveShortcuts.value;
|
|
29436
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29439
|
+
return typeof i.shortcutFilter == "function" && jg.value ? e.filter((e) => i.shortcutFilter?.(e, jg.value)) : e;
|
|
29437
29440
|
});
|
|
29438
29441
|
watch(() => L.value, async (e) => {
|
|
29439
29442
|
if (e && z.value) {
|
|
@@ -29453,52 +29456,52 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29453
29456
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29454
29457
|
$.setShortcuts(e || []);
|
|
29455
29458
|
}, { immediate: !0 }), watch(() => G.value, (e) => {
|
|
29456
|
-
e && (
|
|
29459
|
+
e && (Ig.value = e.sessionName || "", Rg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29457
29460
|
}, { immediate: !0 }), watch(() => K.message.list.value.length, (e) => {
|
|
29458
|
-
e > 0 && (
|
|
29461
|
+
e > 0 && (Rg.value = !0);
|
|
29459
29462
|
});
|
|
29460
|
-
let
|
|
29463
|
+
let Ug = async (e) => {
|
|
29461
29464
|
m.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29462
|
-
},
|
|
29463
|
-
await
|
|
29464
|
-
},
|
|
29465
|
+
}, Wg = async (e) => {
|
|
29466
|
+
await Ug(e);
|
|
29467
|
+
}, Gg = () => {
|
|
29465
29468
|
m.hidePanel();
|
|
29466
|
-
},
|
|
29467
|
-
|
|
29468
|
-
},
|
|
29469
|
+
}, qg = () => {
|
|
29470
|
+
Gg();
|
|
29471
|
+
}, Jg = () => {
|
|
29469
29472
|
m.handleNimbusClick();
|
|
29470
|
-
},
|
|
29471
|
-
|
|
29472
|
-
},
|
|
29473
|
-
|
|
29473
|
+
}, Xg = (e) => {
|
|
29474
|
+
jg.value = e;
|
|
29475
|
+
}, Zg = async (e, n) => {
|
|
29476
|
+
Ag.value = !1, await Ug(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29474
29477
|
shortcut: e,
|
|
29475
29478
|
source: "popup"
|
|
29476
29479
|
});
|
|
29477
|
-
},
|
|
29480
|
+
}, Qg = (e) => {
|
|
29478
29481
|
k("shortcut-click", e);
|
|
29479
|
-
},
|
|
29482
|
+
}, $g = (e) => {
|
|
29480
29483
|
m.handleDragging(e);
|
|
29481
|
-
},
|
|
29484
|
+
}, e_ = (e) => {
|
|
29482
29485
|
m.handleResizing(e);
|
|
29483
|
-
},
|
|
29486
|
+
}, t_ = (e) => {
|
|
29484
29487
|
m.handleDragStop(e);
|
|
29485
|
-
},
|
|
29488
|
+
}, n_ = (e) => {
|
|
29486
29489
|
m.handleResizeStop(e);
|
|
29487
|
-
},
|
|
29490
|
+
}, r_ = () => {
|
|
29488
29491
|
m.container.toggleCompression();
|
|
29489
|
-
},
|
|
29492
|
+
}, i_ = (e) => {
|
|
29490
29493
|
m.setCompressed(e);
|
|
29491
|
-
},
|
|
29494
|
+
}, a_ = async () => {
|
|
29492
29495
|
j.newChat();
|
|
29493
|
-
},
|
|
29496
|
+
}, o_ = (e) => {
|
|
29494
29497
|
j.historyClick(e);
|
|
29495
|
-
},
|
|
29498
|
+
}, c_ = async (e) => {
|
|
29496
29499
|
await q.switchSession(e);
|
|
29497
|
-
},
|
|
29500
|
+
}, l_ = async (e) => {
|
|
29498
29501
|
await q.deleteSession(e);
|
|
29499
|
-
},
|
|
29502
|
+
}, u_ = async (e, n) => {
|
|
29500
29503
|
await q.updateSessionName(e, n);
|
|
29501
|
-
},
|
|
29504
|
+
}, d_ = async () => {
|
|
29502
29505
|
let e = K.session.current?.value?.sessionCode;
|
|
29503
29506
|
if (!e) {
|
|
29504
29507
|
console.error("[AIBlueking] Cannot auto-generate name: no active session");
|
|
@@ -29507,14 +29510,14 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29507
29510
|
try {
|
|
29508
29511
|
await K.session.renameSession(e);
|
|
29509
29512
|
let n = K.session.list.value.find((n) => n.sessionCode === e);
|
|
29510
|
-
n && (
|
|
29513
|
+
n && (Ig.value = n.sessionName || "");
|
|
29511
29514
|
} catch (e) {
|
|
29512
|
-
console.error("[AIBlueking] Failed to auto-generate session name:", e),
|
|
29515
|
+
console.error("[AIBlueking] Failed to auto-generate session name:", e), O_(e);
|
|
29513
29516
|
}
|
|
29514
29517
|
j.autoGenerateName();
|
|
29515
|
-
},
|
|
29518
|
+
}, f_ = () => {
|
|
29516
29519
|
j.helpClick();
|
|
29517
|
-
},
|
|
29520
|
+
}, p_ = async (e) => {
|
|
29518
29521
|
let n = K.session.current?.value;
|
|
29519
29522
|
if (!n) {
|
|
29520
29523
|
console.error("[AIBlueking] Cannot rename: no active session");
|
|
@@ -29524,17 +29527,17 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29524
29527
|
await K.session.updateSession({
|
|
29525
29528
|
...n,
|
|
29526
29529
|
sessionName: e
|
|
29527
|
-
}),
|
|
29530
|
+
}), Ig.value = e;
|
|
29528
29531
|
} catch (e) {
|
|
29529
|
-
console.error("[AIBlueking] Failed to rename session:", e),
|
|
29532
|
+
console.error("[AIBlueking] Failed to rename session:", e), O_(e);
|
|
29530
29533
|
}
|
|
29531
29534
|
j.rename(e);
|
|
29532
|
-
},
|
|
29535
|
+
}, m_ = () => {
|
|
29533
29536
|
Z.enableSelectionMode(), j.share();
|
|
29534
|
-
},
|
|
29537
|
+
}, h_ = () => {
|
|
29535
29538
|
Z.disableSelectionMode();
|
|
29536
|
-
},
|
|
29537
|
-
|
|
29539
|
+
}, g_ = async (e) => {
|
|
29540
|
+
Og.value = !0;
|
|
29538
29541
|
try {
|
|
29539
29542
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
29540
29543
|
await copyToClipboard(n), Message({
|
|
@@ -29542,74 +29545,75 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29542
29545
|
theme: "success"
|
|
29543
29546
|
}), Z.disableSelectionMode(), j.shareMessages(r);
|
|
29544
29547
|
} catch (e) {
|
|
29545
|
-
console.error("[AIBlueking] Failed to share messages:", e),
|
|
29548
|
+
console.error("[AIBlueking] Failed to share messages:", e), O_(e);
|
|
29546
29549
|
} finally {
|
|
29547
|
-
|
|
29550
|
+
Og.value = !1;
|
|
29548
29551
|
}
|
|
29549
|
-
},
|
|
29552
|
+
}, __ = async (e) => {
|
|
29550
29553
|
l.value && await l.value.sendMessage(e);
|
|
29551
|
-
},
|
|
29552
|
-
|
|
29553
|
-
},
|
|
29554
|
+
}, v_ = (e) => {
|
|
29555
|
+
Rg.value = !0, j.sendMessage(e);
|
|
29556
|
+
}, y_ = () => {
|
|
29554
29557
|
j.receiveStart();
|
|
29555
|
-
},
|
|
29558
|
+
}, b_ = () => {
|
|
29556
29559
|
j.receiveText();
|
|
29557
|
-
},
|
|
29560
|
+
}, x_ = () => {
|
|
29558
29561
|
j.receiveEnd();
|
|
29559
|
-
},
|
|
29562
|
+
}, S_ = () => {
|
|
29560
29563
|
j.stop();
|
|
29561
|
-
},
|
|
29564
|
+
}, C_ = () => {
|
|
29562
29565
|
l.value && l.value.stopGeneration();
|
|
29563
|
-
},
|
|
29566
|
+
}, w_ = async (e) => {
|
|
29564
29567
|
e ? await q.createSession({ sessionCode: e }) : await q.createNewSession();
|
|
29565
|
-
},
|
|
29568
|
+
}, T_ = async (e) => {
|
|
29566
29569
|
l.value && await l.value.switchSession(e);
|
|
29567
|
-
},
|
|
29570
|
+
}, E_ = async (e, n) => {
|
|
29568
29571
|
try {
|
|
29569
|
-
await q.updateSessionName(e, n),
|
|
29572
|
+
await q.updateSessionName(e, n), Ig.value = n;
|
|
29570
29573
|
} catch (e) {
|
|
29571
|
-
console.error("[AIBlueking] Failed to update session name:", e),
|
|
29574
|
+
console.error("[AIBlueking] Failed to update session name:", e), O_(e);
|
|
29572
29575
|
}
|
|
29573
|
-
},
|
|
29574
|
-
e && (
|
|
29575
|
-
},
|
|
29576
|
+
}, D_ = (e) => {
|
|
29577
|
+
e && (Ig.value = e.sessionName || "", Rg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
|
|
29578
|
+
}, O_ = (e) => {
|
|
29576
29579
|
console.error("ChatBot error:", e), m.emitInternal("sdk-error", {
|
|
29577
29580
|
apiName: "chat",
|
|
29578
29581
|
code: -1,
|
|
29579
29582
|
message: e.message,
|
|
29580
29583
|
data: e
|
|
29581
29584
|
});
|
|
29582
|
-
},
|
|
29585
|
+
}, k_ = (e, n) => {
|
|
29583
29586
|
m.container.updatePosition(e, n);
|
|
29584
|
-
},
|
|
29587
|
+
}, A_ = (e, n) => {
|
|
29585
29588
|
m.container.updateSize(e, n);
|
|
29586
|
-
},
|
|
29589
|
+
}, j_ = (e, n, r, i) => {
|
|
29587
29590
|
m.container.updatePositionAndSize(e, n, r, i);
|
|
29588
|
-
},
|
|
29591
|
+
}, M_ = (e) => {
|
|
29589
29592
|
l.value && l.value.setCiteText(e);
|
|
29590
|
-
},
|
|
29593
|
+
}, N_ = () => {
|
|
29591
29594
|
l.value && l.value.focusInput();
|
|
29592
|
-
},
|
|
29593
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ?
|
|
29595
|
+
}, P_ = (e) => {
|
|
29596
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? Gg() : Ug());
|
|
29594
29597
|
};
|
|
29595
29598
|
return onMounted(async () => {
|
|
29596
|
-
o.value && m.setContainerRef(o.value), window.addEventListener("keydown",
|
|
29599
|
+
o.value && m.setContainerRef(o.value), window.addEventListener("keydown", P_);
|
|
29597
29600
|
}), onBeforeUnmount(() => {
|
|
29598
|
-
window.removeEventListener("keydown",
|
|
29601
|
+
window.removeEventListener("keydown", P_), m.destroy();
|
|
29599
29602
|
}), n({
|
|
29600
|
-
show:
|
|
29601
|
-
handleShow:
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
29608
|
-
|
|
29609
|
-
|
|
29610
|
-
|
|
29611
|
-
|
|
29612
|
-
|
|
29603
|
+
show: Ug,
|
|
29604
|
+
handleShow: Wg,
|
|
29605
|
+
handleClose: qg,
|
|
29606
|
+
hide: Gg,
|
|
29607
|
+
sendMessage: __,
|
|
29608
|
+
stopGeneration: C_,
|
|
29609
|
+
addNewSession: w_,
|
|
29610
|
+
switchToSession: T_,
|
|
29611
|
+
updateSessionName: E_,
|
|
29612
|
+
updatePosition: k_,
|
|
29613
|
+
updateSize: A_,
|
|
29614
|
+
updatePositionAndSize: j_,
|
|
29615
|
+
setCiteText: M_,
|
|
29616
|
+
focusInput: N_
|
|
29613
29617
|
}), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
|
|
29614
29618
|
createCommentVNode(" 可拖拽容器 "),
|
|
29615
29619
|
createVNode(unref(draggable_container_default), {
|
|
@@ -29625,42 +29629,42 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29625
29629
|
"max-width": i.maxWidth,
|
|
29626
29630
|
"max-width-percent": 80,
|
|
29627
29631
|
visible: unref(v),
|
|
29628
|
-
onCompressionChange:
|
|
29629
|
-
onDragStop:
|
|
29630
|
-
onDragging:
|
|
29631
|
-
onResizeStop:
|
|
29632
|
-
onResizing:
|
|
29632
|
+
onCompressionChange: i_,
|
|
29633
|
+
onDragStop: t_,
|
|
29634
|
+
onDragging: $g,
|
|
29635
|
+
onResizeStop: n_,
|
|
29636
|
+
onResizing: e_
|
|
29633
29637
|
}, {
|
|
29634
|
-
default: withCtx(() => [createElementVNode("div",
|
|
29638
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": Rg.value }]) }, [
|
|
29635
29639
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29636
29640
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29637
29641
|
key: 0,
|
|
29638
|
-
"agent-name":
|
|
29642
|
+
"agent-name": Fg.value,
|
|
29639
29643
|
"chat-helper": unref(K),
|
|
29640
29644
|
draggable: i.draggable,
|
|
29641
29645
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29642
29646
|
"enable-chat-session": i.enableChatSession,
|
|
29643
|
-
"has-permission":
|
|
29644
|
-
"has-session-contents":
|
|
29645
|
-
"is-compression-height":
|
|
29647
|
+
"has-permission": Lg.value,
|
|
29648
|
+
"has-session-contents": Rg.value,
|
|
29649
|
+
"is-compression-height": Pg.value,
|
|
29646
29650
|
"session-business-manager": unref(q),
|
|
29647
|
-
"session-name":
|
|
29651
|
+
"session-name": Ig.value,
|
|
29648
29652
|
"show-compression-icon": i.showCompressionIcon,
|
|
29649
29653
|
"show-history-icon": i.showHistoryIcon,
|
|
29650
29654
|
"show-more-icon": i.showMoreIcon,
|
|
29651
29655
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29652
29656
|
title: i.title,
|
|
29653
|
-
onAutoGenerateName:
|
|
29654
|
-
onClose:
|
|
29655
|
-
onHelpClick:
|
|
29656
|
-
onHistoryClick:
|
|
29657
|
-
onHistorySessionDelete:
|
|
29658
|
-
onHistorySessionRename:
|
|
29659
|
-
onHistorySessionSwitch:
|
|
29660
|
-
onNewChat:
|
|
29661
|
-
onRename:
|
|
29662
|
-
onShare:
|
|
29663
|
-
onToggleCompression:
|
|
29657
|
+
onAutoGenerateName: d_,
|
|
29658
|
+
onClose: qg,
|
|
29659
|
+
onHelpClick: f_,
|
|
29660
|
+
onHistoryClick: o_,
|
|
29661
|
+
onHistorySessionDelete: l_,
|
|
29662
|
+
onHistorySessionRename: u_,
|
|
29663
|
+
onHistorySessionSwitch: c_,
|
|
29664
|
+
onNewChat: a_,
|
|
29665
|
+
onRename: p_,
|
|
29666
|
+
onShare: m_,
|
|
29667
|
+
onToggleCompression: r_
|
|
29664
29668
|
}, null, 8, [
|
|
29665
29669
|
"agent-name",
|
|
29666
29670
|
"chat-helper",
|
|
@@ -29686,27 +29690,27 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29686
29690
|
"chat-helper": unref(K),
|
|
29687
29691
|
"enable-selection": Q.value,
|
|
29688
29692
|
"hello-text": i.helloText,
|
|
29689
|
-
"message-tools-tippy-options":
|
|
29693
|
+
"message-tools-tippy-options": Ng,
|
|
29690
29694
|
placeholder: i.placeholder,
|
|
29691
|
-
prompts:
|
|
29695
|
+
prompts: Vg.value,
|
|
29692
29696
|
"request-options": i.requestOptions,
|
|
29693
|
-
resources:
|
|
29697
|
+
resources: zg.value,
|
|
29694
29698
|
"session-code": i.initialSessionCode,
|
|
29695
|
-
"share-loading":
|
|
29699
|
+
"share-loading": Og.value,
|
|
29696
29700
|
"shortcut-limit": i.shortcutLimit,
|
|
29697
29701
|
shortcuts: i.shortcuts,
|
|
29698
29702
|
url: u.value,
|
|
29699
|
-
onCancelShare:
|
|
29700
|
-
onConfirmShare: n[0] ||= (e) =>
|
|
29701
|
-
onError: n[1] ||= (e) =>
|
|
29702
|
-
onReceiveEnd:
|
|
29703
|
-
onReceiveStart:
|
|
29704
|
-
onReceiveText:
|
|
29705
|
-
onRequestShare:
|
|
29706
|
-
onSendMessage: n[2] ||= (e) =>
|
|
29707
|
-
onSessionSwitched: n[3] ||= (e) =>
|
|
29708
|
-
onShortcutClick:
|
|
29709
|
-
onStop:
|
|
29703
|
+
onCancelShare: h_,
|
|
29704
|
+
onConfirmShare: n[0] ||= (e) => g_(e),
|
|
29705
|
+
onError: n[1] ||= (e) => O_(e),
|
|
29706
|
+
onReceiveEnd: x_,
|
|
29707
|
+
onReceiveStart: y_,
|
|
29708
|
+
onReceiveText: b_,
|
|
29709
|
+
onRequestShare: m_,
|
|
29710
|
+
onSendMessage: n[2] ||= (e) => v_(e),
|
|
29711
|
+
onSessionSwitched: n[3] ||= (e) => D_(e),
|
|
29712
|
+
onShortcutClick: Qg,
|
|
29713
|
+
onStop: S_
|
|
29710
29714
|
}, null, 8, [
|
|
29711
29715
|
"auto-load",
|
|
29712
29716
|
"chat-helper",
|
|
@@ -29722,7 +29726,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29722
29726
|
"shortcuts",
|
|
29723
29727
|
"url"
|
|
29724
29728
|
])
|
|
29725
|
-
])]),
|
|
29729
|
+
], 2)]),
|
|
29726
29730
|
_: 1
|
|
29727
29731
|
}, 8, [
|
|
29728
29732
|
"compressed-padding",
|
|
@@ -29743,7 +29747,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29743
29747
|
"onUpdate:isPanelShow": n[5] ||= (e) => isRef(v) ? v.value = e : null,
|
|
29744
29748
|
"default-minimize": i.defaultMinimize,
|
|
29745
29749
|
size: i.nimbusSize,
|
|
29746
|
-
onClick:
|
|
29750
|
+
onClick: Jg
|
|
29747
29751
|
}, null, 8, [
|
|
29748
29752
|
"is-minimize",
|
|
29749
29753
|
"is-panel-show",
|
|
@@ -29753,13 +29757,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29753
29757
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29754
29758
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29755
29759
|
key: 1,
|
|
29756
|
-
visible:
|
|
29757
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29760
|
+
visible: Ag.value,
|
|
29761
|
+
"onUpdate:visible": n[6] ||= (e) => Ag.value = e,
|
|
29758
29762
|
"exclude-selectors": [".draggable-container-wrapper"],
|
|
29759
29763
|
"max-shortcut-count": i.shortcutLimit,
|
|
29760
|
-
shortcuts:
|
|
29761
|
-
onSelectShortcut:
|
|
29762
|
-
onSelectionChange:
|
|
29764
|
+
shortcuts: Hg.value,
|
|
29765
|
+
onSelectShortcut: Zg,
|
|
29766
|
+
onSelectionChange: Xg
|
|
29763
29767
|
}, null, 8, [
|
|
29764
29768
|
"visible",
|
|
29765
29769
|
"max-shortcut-count",
|
|
@@ -29767,7 +29771,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29767
29771
|
])) : createCommentVNode("v-if", !0)
|
|
29768
29772
|
], 2)], 8, ["to"]));
|
|
29769
29773
|
}
|
|
29770
|
-
}), [["__scopeId", "data-v-
|
|
29774
|
+
}), [["__scopeId", "data-v-c4ad013c"]]), vue2_default = {
|
|
29771
29775
|
name: "AIBluekingV2",
|
|
29772
29776
|
render(e) {
|
|
29773
29777
|
return e("div", { style: {
|
|
@@ -29998,7 +30002,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29998
30002
|
this.app?.mount(this.$el), this.$nextTick(() => {
|
|
29999
30003
|
if (this.componentInstance) {
|
|
30000
30004
|
let e = this.componentInstance;
|
|
30001
|
-
this.show = e.show.bind(e), this.hide = e.hide.bind(e), this.sendMessage = e.sendMessage.bind(e), this.stopGeneration = e.stopGeneration.bind(e), this.addNewSession = e.addNewSession.bind(e), this.switchToSession = e.switchToSession.bind(e), this.updateSessionName = e.updateSessionName.bind(e), this.updatePosition = e.updatePosition.bind(e), this.updateSize = e.updateSize.bind(e), this.updatePositionAndSize = e.updatePositionAndSize.bind(e), this.setCiteText = e.setCiteText.bind(e), this.focusInput = e.focusInput.bind(e);
|
|
30005
|
+
this.show = e.show.bind(e), this.handleClose = e.handleClose.bind(e), this.hide = e.hide.bind(e), this.sendMessage = e.sendMessage.bind(e), this.stopGeneration = e.stopGeneration.bind(e), this.addNewSession = e.addNewSession.bind(e), this.switchToSession = e.switchToSession.bind(e), this.updateSessionName = e.updateSessionName.bind(e), this.updatePosition = e.updatePosition.bind(e), this.updateSize = e.updateSize.bind(e), this.updatePositionAndSize = e.updatePositionAndSize.bind(e), this.setCiteText = e.setCiteText.bind(e), this.focusInput = e.focusInput.bind(e);
|
|
30002
30006
|
}
|
|
30003
30007
|
});
|
|
30004
30008
|
},
|
|
@@ -30009,6 +30013,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
30009
30013
|
show(e, n) {
|
|
30010
30014
|
return console.warn("AIBluekingV2: show method not ready"), Promise.resolve();
|
|
30011
30015
|
},
|
|
30016
|
+
handleClose() {
|
|
30017
|
+
console.warn("AIBluekingV2: handleClose method not ready");
|
|
30018
|
+
},
|
|
30012
30019
|
hide() {
|
|
30013
30020
|
console.warn("AIBluekingV2: hide method not ready");
|
|
30014
30021
|
},
|