@blueking/ai-blueking 2.0.0-dev.24 → 2.0.0-dev.26
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 +4 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +829 -811
- package/dist/vue2/index.iife.min.js +9 -9
- package/dist/vue2/index.umd.min.js +8 -8
- package/dist/vue2/style.css +1 -1
- package/dist/vue2.d.ts.map +1 -1
- package/dist/vue3/index.es.min.js +963 -948
- package/dist/vue3/index.iife.min.js +9 -9
- package/dist/vue3/index.umd.min.js +8 -8
- 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
|
+
}, Dg = (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
|
+
}, Og = () => {
|
|
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", Dg), 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", Dg), 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: Og
|
|
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+)?", Dg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Og = (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
|
+
}, kg = {
|
|
4847
4847
|
begin: "\\\\[\\s\\S]",
|
|
4848
4848
|
relevance: 0
|
|
4849
|
-
},
|
|
4849
|
+
}, Ag = {
|
|
4850
4850
|
scope: "string",
|
|
4851
4851
|
begin: "'",
|
|
4852
4852
|
end: "'",
|
|
4853
4853
|
illegal: "\\n",
|
|
4854
|
-
contains: [
|
|
4854
|
+
contains: [kg]
|
|
4855
4855
|
}, $ = {
|
|
4856
4856
|
scope: "string",
|
|
4857
4857
|
begin: "\"",
|
|
4858
4858
|
end: "\"",
|
|
4859
4859
|
illegal: "\\n",
|
|
4860
|
-
contains: [
|
|
4861
|
-
},
|
|
4860
|
+
contains: [kg]
|
|
4861
|
+
}, jg = { 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/ }, Mg = 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
|
+
}, Ng = Mg("//", "$"), Pg = Mg("/\\*", "\\*/"), Fg = Mg("#", "$"), Ig = {
|
|
4878
4878
|
scope: "number",
|
|
4879
4879
|
begin: J,
|
|
4880
4880
|
relevance: 0
|
|
4881
|
-
},
|
|
4881
|
+
}, Lg = {
|
|
4882
4882
|
scope: "number",
|
|
4883
|
-
begin:
|
|
4883
|
+
begin: Dg,
|
|
4884
4884
|
relevance: 0
|
|
4885
|
-
},
|
|
4885
|
+
}, Rg = {
|
|
4886
4886
|
scope: "number",
|
|
4887
4887
|
begin: Z,
|
|
4888
4888
|
relevance: 0
|
|
4889
|
-
},
|
|
4889
|
+
}, zg = {
|
|
4890
4890
|
scope: "regexp",
|
|
4891
4891
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4892
4892
|
end: /\/[gimuy]*/,
|
|
4893
|
-
contains: [
|
|
4893
|
+
contains: [kg, {
|
|
4894
4894
|
begin: /\[/,
|
|
4895
4895
|
end: /\]/,
|
|
4896
4896
|
relevance: 0,
|
|
4897
|
-
contains: [
|
|
4897
|
+
contains: [kg]
|
|
4898
4898
|
}]
|
|
4899
|
-
},
|
|
4899
|
+
}, Bg = {
|
|
4900
4900
|
scope: "title",
|
|
4901
4901
|
begin: K,
|
|
4902
4902
|
relevance: 0
|
|
4903
|
-
},
|
|
4903
|
+
}, Vg = {
|
|
4904
4904
|
scope: "title",
|
|
4905
4905
|
begin: q,
|
|
4906
4906
|
relevance: 0
|
|
4907
|
-
},
|
|
4907
|
+
}, Hg = {
|
|
4908
4908
|
begin: "\\.\\s*" + q,
|
|
4909
4909
|
relevance: 0
|
|
4910
|
-
},
|
|
4910
|
+
}, Ug = /* @__PURE__ */ Object.freeze({
|
|
4911
4911
|
__proto__: null,
|
|
4912
|
-
APOS_STRING_MODE:
|
|
4913
|
-
BACKSLASH_ESCAPE:
|
|
4914
|
-
BINARY_NUMBER_MODE:
|
|
4912
|
+
APOS_STRING_MODE: Ag,
|
|
4913
|
+
BACKSLASH_ESCAPE: kg,
|
|
4914
|
+
BINARY_NUMBER_MODE: Rg,
|
|
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: Mg,
|
|
4917
|
+
C_BLOCK_COMMENT_MODE: Pg,
|
|
4918
|
+
C_LINE_COMMENT_MODE: Ng,
|
|
4919
|
+
C_NUMBER_MODE: Lg,
|
|
4920
|
+
C_NUMBER_RE: Dg,
|
|
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: Fg,
|
|
4932
4932
|
IDENT_RE: K,
|
|
4933
4933
|
MATCH_NOTHING_RE: G,
|
|
4934
|
-
METHOD_GUARD:
|
|
4935
|
-
NUMBER_MODE:
|
|
4934
|
+
METHOD_GUARD: Hg,
|
|
4935
|
+
NUMBER_MODE: Ig,
|
|
4936
4936
|
NUMBER_RE: J,
|
|
4937
|
-
PHRASAL_WORDS_MODE:
|
|
4937
|
+
PHRASAL_WORDS_MODE: jg,
|
|
4938
4938
|
QUOTE_STRING_MODE: $,
|
|
4939
|
-
REGEXP_MODE:
|
|
4939
|
+
REGEXP_MODE: zg,
|
|
4940
4940
|
RE_STARTERS_RE: Q,
|
|
4941
|
-
SHEBANG:
|
|
4942
|
-
TITLE_MODE:
|
|
4941
|
+
SHEBANG: Og,
|
|
4942
|
+
TITLE_MODE: Bg,
|
|
4943
4943
|
UNDERSCORE_IDENT_RE: q,
|
|
4944
|
-
UNDERSCORE_TITLE_MODE:
|
|
4944
|
+
UNDERSCORE_TITLE_MODE: Vg
|
|
4945
4945
|
});
|
|
4946
|
-
function
|
|
4946
|
+
function Wg(e, n) {
|
|
4947
4947
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4948
4948
|
}
|
|
4949
|
-
function
|
|
4949
|
+
function Gg(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 Kg(e, n) {
|
|
4953
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Wg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4954
4954
|
}
|
|
4955
|
-
function
|
|
4955
|
+
function qg(e, n) {
|
|
4956
4956
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4957
4957
|
}
|
|
4958
|
-
function
|
|
4958
|
+
function Jg(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 Yg(e, n) {
|
|
4965
4965
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4966
4966
|
}
|
|
4967
|
-
var
|
|
4967
|
+
var Xg = (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
|
+
}, Zg = [
|
|
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
|
+
], Qg = "keyword";
|
|
4990
|
+
function $g(e, n, r = Qg) {
|
|
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, $g(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, e_(r[0], r[1])];
|
|
4999
4999
|
});
|
|
5000
5000
|
}
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
return n ? Number(n) :
|
|
5002
|
+
function e_(e, n) {
|
|
5003
|
+
return n ? Number(n) : t_(e) ? 0 : 1;
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5006
|
-
return
|
|
5005
|
+
function t_(e) {
|
|
5006
|
+
return Zg.includes(e.toLowerCase());
|
|
5007
5007
|
}
|
|
5008
|
-
var
|
|
5008
|
+
var n_ = {}, r_ = (e) => {
|
|
5009
5009
|
console.error(e);
|
|
5010
|
-
},
|
|
5010
|
+
}, i_ = (e, ...n) => {
|
|
5011
5011
|
console.log(`WARN: ${e}`, ...n);
|
|
5012
|
-
},
|
|
5013
|
-
|
|
5014
|
-
},
|
|
5015
|
-
function
|
|
5012
|
+
}, a_ = (e, n) => {
|
|
5013
|
+
n_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), n_[`${e}/${n}`] = !0);
|
|
5014
|
+
}, o_ = /* @__PURE__ */ Error();
|
|
5015
|
+
function s_(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 c_(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 r_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), o_;
|
|
5023
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw r_("beginScope must be object"), o_;
|
|
5024
|
+
s_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
5025
5025
|
}
|
|
5026
5026
|
}
|
|
5027
|
-
function
|
|
5027
|
+
function l_(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 r_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), o_;
|
|
5030
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw r_("endScope must be object"), o_;
|
|
5031
|
+
s_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
5032
5032
|
}
|
|
5033
5033
|
}
|
|
5034
|
-
function
|
|
5034
|
+
function u_(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 d_(e) {
|
|
5038
|
+
u_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), c_(e), l_(e);
|
|
5039
5039
|
}
|
|
5040
|
-
function
|
|
5040
|
+
function f_(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
|
-
|
|
5103
|
-
Yg,
|
|
5104
|
-
f_,
|
|
5105
|
-
Zg
|
|
5106
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5107
|
-
qg,
|
|
5102
|
+
Gg,
|
|
5108
5103
|
Jg,
|
|
5104
|
+
d_,
|
|
5109
5105
|
Xg
|
|
5106
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5107
|
+
Kg,
|
|
5108
|
+
qg,
|
|
5109
|
+
Yg
|
|
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 &&= $g(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 m_(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 p_(e) {
|
|
5122
|
+
return e ? e.endsWithParent || p_(e.starts) : !1;
|
|
5123
5123
|
}
|
|
5124
|
-
function
|
|
5124
|
+
function m_(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 : p_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5128
5128
|
}
|
|
5129
|
-
var
|
|
5129
|
+
var h_ = "11.11.1", g_ = class extends Error {
|
|
5130
5130
|
constructor(e, n) {
|
|
5131
5131
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5132
5132
|
}
|
|
5133
|
-
},
|
|
5133
|
+
}, __ = a, v_ = o, y_ = Symbol("nomatch"), b_ = 7, x_ = 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 = Ag(r[1]);
|
|
5157
|
+
return n || (i_(l.replace("{}", r[1])), i_("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) || Ag(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) : (a_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), a_("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
|
+
Fg("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, Fg("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
|
+
kg.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 (kg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= b_ && (jg += 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), kg.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
|
+
kg.addText($);
|
|
5206
5206
|
return;
|
|
5207
5207
|
}
|
|
5208
|
-
e = j(Q.subLanguage, $, !0,
|
|
5208
|
+
e = j(Q.subLanguage, $, !0, Og[Q.subLanguage]), Og[Q.subLanguage] = e._top;
|
|
5209
5209
|
} else e = B($, Q.subLanguage.length ? Q.subLanguage : null);
|
|
5210
|
-
Q.relevance > 0 && (
|
|
5210
|
+
Q.relevance > 0 && (jg += e.relevance), kg.__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 !== "" && (kg.startScope(n), kg.addText(e), kg.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" && kg.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) : (Pg = !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 y_;
|
|
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 && kg.closeNode(), !Q.skip && !Q.subLanguage && (jg += 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) => kg.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 !== y_) return e;
|
|
5287
5287
|
}
|
|
5288
5288
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5289
|
-
if (
|
|
5289
|
+
if (Ng > 1e5 && Ng > 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 = Ag(e);
|
|
5293
|
+
if (!J) throw r_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5294
|
+
let Dg = f_(J), Z = "", Q = o || Dg, Og = {}, kg = new d.__emitter(d);
|
|
5295
5295
|
G();
|
|
5296
|
-
let $ = "",
|
|
5296
|
+
let $ = "", jg = 0, Mg = 0, Ng = 0, Pg = !1;
|
|
5297
5297
|
try {
|
|
5298
|
-
if (J.__emitTokens) J.__emitTokens(r,
|
|
5298
|
+
if (J.__emitTokens) J.__emitTokens(r, kg);
|
|
5299
5299
|
else {
|
|
5300
5300
|
for (Q.matcher.considerAll();;) {
|
|
5301
|
-
|
|
5301
|
+
Ng++, Pg ? Pg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = Mg;
|
|
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(Mg, e.index), e);
|
|
5305
|
+
Mg = e.index + n;
|
|
5306
5306
|
}
|
|
5307
|
-
q(r.substring(
|
|
5307
|
+
q(r.substring(Mg));
|
|
5308
5308
|
}
|
|
5309
|
-
return
|
|
5309
|
+
return kg.finalize(), Z = kg.toHTML(), {
|
|
5310
5310
|
language: e,
|
|
5311
5311
|
value: Z,
|
|
5312
|
-
relevance:
|
|
5312
|
+
relevance: jg,
|
|
5313
5313
|
illegal: !1,
|
|
5314
|
-
_emitter:
|
|
5314
|
+
_emitter: kg,
|
|
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: __(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: Mg,
|
|
5326
|
+
context: r.slice(Mg - 100, Mg + 100),
|
|
5327
5327
|
mode: n.mode,
|
|
5328
5328
|
resultSoFar: Z
|
|
5329
5329
|
},
|
|
5330
|
-
_emitter:
|
|
5330
|
+
_emitter: kg
|
|
5331
5331
|
};
|
|
5332
5332
|
if (s) return {
|
|
5333
5333
|
language: e,
|
|
5334
|
-
value:
|
|
5334
|
+
value: __(r),
|
|
5335
5335
|
illegal: !1,
|
|
5336
5336
|
relevance: 0,
|
|
5337
5337
|
errorRaised: n,
|
|
5338
|
-
_emitter:
|
|
5338
|
+
_emitter: kg,
|
|
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: __(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(Ag).filter(jg).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 (Ag(e.language).supersetOf === n.language) return 1;
|
|
5362
|
+
if (Ag(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 (Fg("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 g_("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
|
+
}), Fg("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 = v_(d, e);
|
|
5403
5403
|
}
|
|
5404
5404
|
let q = () => {
|
|
5405
|
-
Z(),
|
|
5405
|
+
Z(), a_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5406
5406
|
};
|
|
5407
5407
|
function J() {
|
|
5408
|
-
Z(),
|
|
5408
|
+
Z(), a_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5409
5409
|
}
|
|
5410
|
-
let
|
|
5410
|
+
let Dg = !1;
|
|
5411
5411
|
function Z() {
|
|
5412
5412
|
function e() {
|
|
5413
5413
|
Z();
|
|
5414
5414
|
}
|
|
5415
5415
|
if (document.readyState === "loading") {
|
|
5416
|
-
|
|
5416
|
+
Dg || window.addEventListener("DOMContentLoaded", e, !1), Dg = !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 (r_("Language definition for '{}' could not be registered.".replace("{}", r)), s) r_(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 Og(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 kg() {
|
|
5437
5437
|
return Object.keys(n);
|
|
5438
5438
|
}
|
|
5439
|
-
function
|
|
5439
|
+
function Ag(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 jg(e) {
|
|
5448
|
+
let n = Ag(e);
|
|
5449
5449
|
return n && !n.disableAutodetect;
|
|
5450
5450
|
}
|
|
5451
|
-
function
|
|
5451
|
+
function Mg(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 Ng(e) {
|
|
5459
|
+
Mg(e), o.push(e);
|
|
5460
5460
|
}
|
|
5461
|
-
function
|
|
5461
|
+
function Pg(e) {
|
|
5462
5462
|
let n = o.indexOf(e);
|
|
5463
5463
|
n !== -1 && o.splice(n, 1);
|
|
5464
5464
|
}
|
|
5465
|
-
function
|
|
5465
|
+
function Fg(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 Ig(e) {
|
|
5472
|
+
return a_("10.7.0", "highlightBlock will be removed entirely in v12.0"), a_("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: Ig,
|
|
5480
5480
|
configure: K,
|
|
5481
5481
|
initHighlighting: q,
|
|
5482
5482
|
initHighlightingOnLoad: J,
|
|
5483
5483
|
registerLanguage: Q,
|
|
5484
|
-
unregisterLanguage:
|
|
5485
|
-
listLanguages:
|
|
5486
|
-
getLanguage:
|
|
5484
|
+
unregisterLanguage: Og,
|
|
5485
|
+
listLanguages: kg,
|
|
5486
|
+
getLanguage: Ag,
|
|
5487
5487
|
registerAliases: $,
|
|
5488
|
-
autoDetection:
|
|
5489
|
-
inherit:
|
|
5490
|
-
addPlugin:
|
|
5491
|
-
removePlugin:
|
|
5488
|
+
autoDetection: jg,
|
|
5489
|
+
inherit: v_,
|
|
5490
|
+
addPlugin: Ng,
|
|
5491
|
+
removePlugin: Pg
|
|
5492
5492
|
}), e.debugMode = function() {
|
|
5493
5493
|
s = !1;
|
|
5494
5494
|
}, e.safeMode = function() {
|
|
5495
5495
|
s = !0;
|
|
5496
|
-
}, e.versionString =
|
|
5496
|
+
}, e.versionString = h_, 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
|
+
}, Ug) typeof Ug[n] == "object" && r(Ug[n]);
|
|
5503
|
+
return Object.assign(e, Ug), e;
|
|
5504
|
+
}, S_ = x_({});
|
|
5505
|
+
S_.newInstance = () => x_({}), n.exports = S_, S_.HighlightJS = S_, S_.default = S_;
|
|
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
|
+
}, Dg = {
|
|
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
|
+
}, Og = {
|
|
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
|
+
}, kg = {
|
|
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
|
+
}, Ag = {
|
|
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
|
-
Ag,
|
|
11679
11678
|
kg,
|
|
11680
11679
|
Og,
|
|
11680
|
+
Dg,
|
|
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,
|
|
11693
|
+
let jg = { variants: [
|
|
11695
11694
|
Ag,
|
|
11696
11695
|
kg,
|
|
11697
|
-
Z,
|
|
11698
11696
|
Og,
|
|
11697
|
+
Z,
|
|
11698
|
+
Dg,
|
|
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
|
+
jg,
|
|
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
|
+
Dg,
|
|
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), Dg = 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: Dg
|
|
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
|
+
}] }, Og = {
|
|
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
|
+
}, kg = {
|
|
13949
13949
|
label: "use_strict",
|
|
13950
13950
|
className: "meta",
|
|
13951
13951
|
relevance: 10,
|
|
13952
13952
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13953
|
-
},
|
|
13953
|
+
}, Ag = {
|
|
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 jg(e) {
|
|
13973
13973
|
return n.concat("(?!", e.join("|"), ")");
|
|
13974
13974
|
}
|
|
13975
|
-
let
|
|
13976
|
-
match: n.concat(/\b/,
|
|
13975
|
+
let Mg = {
|
|
13976
|
+
match: n.concat(/\b/, jg([
|
|
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
|
+
}, Ng = {
|
|
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
|
+
}, Pg = {
|
|
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
|
+
}, Fg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ig = {
|
|
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(Fg)
|
|
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: Dg,
|
|
14030
|
+
CLASS_REFERENCE: Og
|
|
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
|
+
kg,
|
|
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
|
+
Og,
|
|
14050
14050
|
{
|
|
14051
14051
|
scope: "attr",
|
|
14052
14052
|
match: g + n.lookahead(":"),
|
|
14053
14053
|
relevance: 0
|
|
14054
14054
|
},
|
|
14055
|
-
|
|
14055
|
+
Ig,
|
|
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: Fg,
|
|
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: Dg
|
|
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
|
+
Ag,
|
|
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
|
+
Ng,
|
|
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
|
+
Mg,
|
|
14148
14148
|
$,
|
|
14149
14149
|
Q,
|
|
14150
|
-
|
|
14150
|
+
Pg,
|
|
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
|
+
], Dg = {
|
|
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
|
+
Dg,
|
|
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
|
+
Dg,
|
|
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
|
+
}, Dg = [
|
|
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
|
+
}, Og = [Q, {
|
|
21128
21128
|
className: "operator",
|
|
21129
21129
|
relevance: 0,
|
|
21130
21130
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21131
|
-
}],
|
|
21131
|
+
}], kg = "([0-9]_*)+", Ag = "([0-9a-fA-F]_*)+", $ = {
|
|
21132
21132
|
className: "number",
|
|
21133
21133
|
relevance: 0,
|
|
21134
21134
|
variants: [
|
|
21135
|
-
{ match: `\\b(${
|
|
21136
|
-
{ match: `\\b0x(${
|
|
21135
|
+
{ match: `\\b(${kg})(\\.(${kg}))?([eE][+-]?(${kg}))?\\b` },
|
|
21136
|
+
{ match: `\\b0x(${Ag})(\\.(${Ag}))?([pP][+-]?(${kg}))?\\b` },
|
|
21137
21137
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21138
21138
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, jg = (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
|
+
}), Mg = (e = "") => ({
|
|
21144
21144
|
className: "subst",
|
|
21145
21145
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21146
|
-
}),
|
|
21146
|
+
}), Ng = (e = "") => ({
|
|
21147
21147
|
className: "subst",
|
|
21148
21148
|
label: "interpol",
|
|
21149
21149
|
begin: a(/\\/, e, /\(/),
|
|
21150
21150
|
end: /\)/
|
|
21151
|
-
}),
|
|
21151
|
+
}), Pg = (e = "") => ({
|
|
21152
21152
|
begin: a(e, /"""/),
|
|
21153
21153
|
end: a(/"""/, e),
|
|
21154
21154
|
contains: [
|
|
21155
|
+
jg(e),
|
|
21155
21156
|
Mg(e),
|
|
21156
|
-
Ng(e)
|
|
21157
|
-
Pg(e)
|
|
21157
|
+
Ng(e)
|
|
21158
21158
|
]
|
|
21159
|
-
}),
|
|
21159
|
+
}), Fg = (e = "") => ({
|
|
21160
21160
|
begin: a(e, /"/),
|
|
21161
21161
|
end: a(/"/, e),
|
|
21162
|
-
contains: [
|
|
21163
|
-
}),
|
|
21162
|
+
contains: [jg(e), Ng(e)]
|
|
21163
|
+
}), Ig = {
|
|
21164
21164
|
className: "string",
|
|
21165
21165
|
variants: [
|
|
21166
|
+
Pg(),
|
|
21167
|
+
Pg("#"),
|
|
21168
|
+
Pg("##"),
|
|
21169
|
+
Pg("###"),
|
|
21166
21170
|
Fg(),
|
|
21167
21171
|
Fg("#"),
|
|
21168
21172
|
Fg("##"),
|
|
21169
|
-
Fg("###")
|
|
21170
|
-
Ig(),
|
|
21171
|
-
Ig("#"),
|
|
21172
|
-
Ig("##"),
|
|
21173
|
-
Ig("###")
|
|
21173
|
+
Fg("###")
|
|
21174
21174
|
]
|
|
21175
|
-
},
|
|
21175
|
+
}, Lg = [e.BACKSLASH_ESCAPE, {
|
|
21176
21176
|
begin: /\[/,
|
|
21177
21177
|
end: /\]/,
|
|
21178
21178
|
relevance: 0,
|
|
21179
21179
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21180
|
-
}],
|
|
21180
|
+
}], Rg = {
|
|
21181
21181
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21182
21182
|
end: /\//,
|
|
21183
|
-
contains:
|
|
21184
|
-
},
|
|
21183
|
+
contains: Lg
|
|
21184
|
+
}, zg = (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: [...Lg, {
|
|
21190
21190
|
scope: "comment",
|
|
21191
21191
|
begin: `#(?!.*${r})`,
|
|
21192
21192
|
end: /$/
|
|
21193
21193
|
}]
|
|
21194
21194
|
};
|
|
21195
|
-
},
|
|
21195
|
+
}, Bg = {
|
|
21196
21196
|
scope: "regexp",
|
|
21197
21197
|
variants: [
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21198
|
+
zg("###"),
|
|
21199
|
+
zg("##"),
|
|
21200
|
+
zg("#"),
|
|
21201
|
+
Rg
|
|
21202
21202
|
]
|
|
21203
|
-
},
|
|
21204
|
-
|
|
21203
|
+
}, Vg = { match: a(/`/, z, /`/) }, Hg = [
|
|
21204
|
+
Vg,
|
|
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
|
+
], Ug = [
|
|
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
|
+
...Og,
|
|
21223
21223
|
$,
|
|
21224
|
-
|
|
21224
|
+
Ig
|
|
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
|
+
], Wg = {
|
|
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
|
+
}, Gg = {
|
|
21263
21263
|
begin: /</,
|
|
21264
21264
|
end: />/,
|
|
21265
21265
|
keywords: J,
|
|
21266
21266
|
contains: [
|
|
21267
21267
|
...o,
|
|
21268
|
-
...
|
|
21269
|
-
...
|
|
21268
|
+
...Dg,
|
|
21269
|
+
...Ug,
|
|
21270
21270
|
Q,
|
|
21271
|
-
|
|
21271
|
+
Wg
|
|
21272
21272
|
]
|
|
21273
21273
|
};
|
|
21274
|
-
|
|
21275
|
-
let
|
|
21274
|
+
Wg.contains.push(Gg);
|
|
21275
|
+
let Kg = {
|
|
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
|
+
Bg,
|
|
21289
|
+
...Dg,
|
|
21290
21290
|
...Z,
|
|
21291
|
-
...
|
|
21291
|
+
...Og,
|
|
21292
21292
|
$,
|
|
21293
|
-
|
|
21293
|
+
Ig,
|
|
21294
|
+
...Hg,
|
|
21294
21295
|
...Ug,
|
|
21295
|
-
|
|
21296
|
-
Gg
|
|
21296
|
+
Wg
|
|
21297
21297
|
]
|
|
21298
|
-
},
|
|
21298
|
+
}, qg = {
|
|
21299
21299
|
begin: /</,
|
|
21300
21300
|
end: />/,
|
|
21301
21301
|
keywords: "repeat each",
|
|
21302
|
-
contains: [...o,
|
|
21303
|
-
},
|
|
21302
|
+
contains: [...o, Wg]
|
|
21303
|
+
}, Jg = {
|
|
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
|
+
...Dg,
|
|
21321
21322
|
...Og,
|
|
21322
|
-
...kg,
|
|
21323
21323
|
$,
|
|
21324
|
-
|
|
21325
|
-
...
|
|
21326
|
-
|
|
21327
|
-
|
|
21324
|
+
Ig,
|
|
21325
|
+
...Ug,
|
|
21326
|
+
Wg,
|
|
21327
|
+
Kg
|
|
21328
21328
|
],
|
|
21329
21329
|
endsParent: !0,
|
|
21330
21330
|
illegal: /["']/
|
|
21331
|
-
},
|
|
21331
|
+
}, Yg = {
|
|
21332
21332
|
match: [
|
|
21333
21333
|
/(func|macro)/,
|
|
21334
21334
|
/\s+/,
|
|
21335
|
-
s(
|
|
21335
|
+
s(Vg.match, z, j)
|
|
21336
21336
|
],
|
|
21337
21337
|
className: {
|
|
21338
21338
|
1: "keyword",
|
|
21339
21339
|
3: "title.function"
|
|
21340
21340
|
},
|
|
21341
21341
|
contains: [
|
|
21342
|
+
qg,
|
|
21342
21343
|
Jg,
|
|
21343
|
-
Yg,
|
|
21344
21344
|
n
|
|
21345
21345
|
],
|
|
21346
21346
|
illegal: [/\[/, /%/]
|
|
21347
|
-
},
|
|
21347
|
+
}, Xg = {
|
|
21348
21348
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21349
21349
|
className: { 1: "keyword" },
|
|
21350
21350
|
contains: [
|
|
21351
|
+
qg,
|
|
21351
21352
|
Jg,
|
|
21352
|
-
Yg,
|
|
21353
21353
|
n
|
|
21354
21354
|
],
|
|
21355
21355
|
illegal: /\[|%/
|
|
21356
|
-
},
|
|
21356
|
+
}, Zg = {
|
|
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
|
+
}, Qg = {
|
|
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: [Wg],
|
|
21377
21377
|
keywords: [...v, ..._],
|
|
21378
21378
|
end: /}/
|
|
21379
|
-
},
|
|
21379
|
+
}, $g = {
|
|
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
|
+
}, e_ = {
|
|
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
|
+
}, t_ = {
|
|
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
|
+
qg,
|
|
21416
|
+
...Dg,
|
|
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
|
+
}, ...Dg],
|
|
21425
21425
|
relevance: 0
|
|
21426
21426
|
}
|
|
21427
21427
|
]
|
|
21428
21428
|
};
|
|
21429
|
-
for (let e of
|
|
21429
|
+
for (let e of Ig.variants) {
|
|
21430
21430
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21431
21431
|
n.keywords = J;
|
|
21432
21432
|
let r = [
|
|
21433
|
-
...
|
|
21433
|
+
...Dg,
|
|
21434
21434
|
...Z,
|
|
21435
|
-
...
|
|
21435
|
+
...Og,
|
|
21436
21436
|
$,
|
|
21437
|
-
|
|
21438
|
-
...
|
|
21437
|
+
Ig,
|
|
21438
|
+
...Hg
|
|
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
|
+
Yg,
|
|
21451
21452
|
Xg,
|
|
21452
|
-
|
|
21453
|
+
$g,
|
|
21453
21454
|
e_,
|
|
21454
21455
|
t_,
|
|
21455
|
-
|
|
21456
|
+
Zg,
|
|
21456
21457
|
Qg,
|
|
21457
|
-
$g,
|
|
21458
21458
|
{
|
|
21459
21459
|
beginKeywords: "import",
|
|
21460
21460
|
end: /$/,
|
|
21461
21461
|
contains: [...o],
|
|
21462
21462
|
relevance: 0
|
|
21463
21463
|
},
|
|
21464
|
-
|
|
21465
|
-
...
|
|
21464
|
+
Bg,
|
|
21465
|
+
...Dg,
|
|
21466
21466
|
...Z,
|
|
21467
|
-
...
|
|
21467
|
+
...Og,
|
|
21468
21468
|
$,
|
|
21469
|
-
|
|
21469
|
+
Ig,
|
|
21470
|
+
...Hg,
|
|
21470
21471
|
...Ug,
|
|
21471
|
-
|
|
21472
|
-
|
|
21473
|
-
qg
|
|
21472
|
+
Wg,
|
|
21473
|
+
Kg
|
|
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), Dg = 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: Dg
|
|
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
|
+
}] }, Og = {
|
|
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
|
+
}, kg = {
|
|
22186
22186
|
label: "use_strict",
|
|
22187
22187
|
className: "meta",
|
|
22188
22188
|
relevance: 10,
|
|
22189
22189
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22190
|
-
},
|
|
22190
|
+
}, Ag = {
|
|
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 jg(e) {
|
|
22210
22210
|
return n.concat("(?!", e.join("|"), ")");
|
|
22211
22211
|
}
|
|
22212
|
-
let
|
|
22213
|
-
match: n.concat(/\b/,
|
|
22212
|
+
let Mg = {
|
|
22213
|
+
match: n.concat(/\b/, jg([
|
|
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
|
+
}, Ng = {
|
|
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
|
+
}, Pg = {
|
|
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
|
+
}, Fg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ig = {
|
|
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(Fg)
|
|
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: Dg,
|
|
22267
|
+
CLASS_REFERENCE: Og
|
|
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
|
+
kg,
|
|
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
|
+
Og,
|
|
22287
22287
|
{
|
|
22288
22288
|
scope: "attr",
|
|
22289
22289
|
match: g + n.lookahead(":"),
|
|
22290
22290
|
relevance: 0
|
|
22291
22291
|
},
|
|
22292
|
-
|
|
22292
|
+
Ig,
|
|
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: Fg,
|
|
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: Dg
|
|
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
|
+
Ag,
|
|
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
|
+
Ng,
|
|
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
|
+
Mg,
|
|
22385
22385
|
$,
|
|
22386
22386
|
Q,
|
|
22387
|
-
|
|
22387
|
+
Pg,
|
|
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
|
+
}), Dg = () => {
|
|
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
|
+
}, Og = () => {
|
|
24603
24603
|
B || Z();
|
|
24604
|
-
},
|
|
24604
|
+
}, kg = (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) : Dg();
|
|
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
|
+
}, Ag = () => {
|
|
24620
|
+
B || Dg(), B = !0;
|
|
24621
24621
|
}, $ = () => {
|
|
24622
24622
|
Z();
|
|
24623
|
+
}, jg = () => {
|
|
24624
|
+
H = !0, Dg();
|
|
24623
24625
|
}, Mg = () => {
|
|
24624
|
-
H = !0, Og();
|
|
24625
|
-
}, Ng = () => {
|
|
24626
24626
|
H = !1;
|
|
24627
|
-
},
|
|
24627
|
+
}, Ng = () => {
|
|
24628
24628
|
if (L) {
|
|
24629
24629
|
L = !1;
|
|
24630
24630
|
return;
|
|
24631
24631
|
}
|
|
24632
|
-
H && !B && !G &&
|
|
24632
|
+
H && !B && !G && Dg();
|
|
24633
|
+
}, Pg = (e) => {
|
|
24634
|
+
Dg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24633
24635
|
}, Fg = (e) => {
|
|
24634
|
-
|
|
24636
|
+
e.preventDefault(), Pg(e.clipboardData);
|
|
24635
24637
|
}, Ig = (e) => {
|
|
24636
|
-
e.preventDefault(),
|
|
24638
|
+
e.preventDefault(), m || (Pg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24637
24639
|
}, 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
|
+
}, Rg = (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
|
+
}, zg = (e) => {
|
|
24653
|
+
G = !0, Pg(e.dataTransfer);
|
|
24654
|
+
}, Bg = () => {
|
|
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", Ng), r.addEventListener("keydown", Q), r.addEventListener("input", Og), r.addEventListener("beforeinput", kg), r.addEventListener("compositionstart", Ag), r.addEventListener("compositionend", $), r.addEventListener("focus", jg), r.addEventListener("blur", Mg), r.addEventListener("copy", Fg), r.addEventListener("cut", Ig), r.addEventListener("paste", Lg), r.addEventListener("drop", Rg), r.addEventListener("dragstart", zg), r.addEventListener("dragend", Bg), () => {
|
|
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", Ng), r.removeEventListener("keydown", Q), r.removeEventListener("input", Og), r.removeEventListener("beforeinput", kg), r.removeEventListener("compositionstart", Ag), r.removeEventListener("compositionend", $), r.removeEventListener("focus", jg), r.removeEventListener("blur", Mg), r.removeEventListener("copy", Fg), r.removeEventListener("cut", Ig), r.removeEventListener("paste", Lg), r.removeEventListener("drop", Rg), r.removeEventListener("dragstart", zg), r.removeEventListener("dragend", Bg));
|
|
24659
24659
|
};
|
|
24660
24660
|
},
|
|
24661
24661
|
command: (e, ...n) => {
|
|
@@ -24734,7 +24734,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
|
|
|
24734
24734
|
}({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
|
|
24735
24735
|
return e.Disabled = "disabled", e.Hidden = "hidden", e;
|
|
24736
24736
|
}({});
|
|
24737
|
-
var _hoisted_1$
|
|
24737
|
+
var _hoisted_1$32 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
|
|
24738
24738
|
__name: "file-upload-btn",
|
|
24739
24739
|
props: {
|
|
24740
24740
|
accept: { default: "image/*" },
|
|
@@ -24762,7 +24762,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24762
24762
|
}
|
|
24763
24763
|
n.value = "";
|
|
24764
24764
|
};
|
|
24765
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24765
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$32, [createElementVNode("input", {
|
|
24766
24766
|
ref_key: "fileInputRef",
|
|
24767
24767
|
ref: a,
|
|
24768
24768
|
accept: e.accept,
|
|
@@ -24779,14 +24779,14 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24779
24779
|
offset: [0, 16]
|
|
24780
24780
|
}]])]));
|
|
24781
24781
|
}
|
|
24782
|
-
}), _hoisted_1$
|
|
24782
|
+
}), _hoisted_1$31 = { class: "ai-cite-content" }, _hoisted_2$23 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
|
|
24783
24783
|
__name: "cite-content",
|
|
24784
24784
|
props: {
|
|
24785
24785
|
content: {},
|
|
24786
24786
|
onClose: { type: Function }
|
|
24787
24787
|
},
|
|
24788
24788
|
setup(e) {
|
|
24789
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24789
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$31, [
|
|
24790
24790
|
createVNode(unref(CiteIcon)),
|
|
24791
24791
|
createElementVNode("span", _hoisted_2$23, toDisplayString(e.content), 1),
|
|
24792
24792
|
e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
|
|
@@ -24795,7 +24795,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24795
24795
|
})) : createCommentVNode("v-if", !0)
|
|
24796
24796
|
]));
|
|
24797
24797
|
}
|
|
24798
|
-
}), _hoisted_1$
|
|
24798
|
+
}), _hoisted_1$30 = { class: "ai-files-content" }, _hoisted_2$22 = [
|
|
24799
24799
|
"alt",
|
|
24800
24800
|
"src",
|
|
24801
24801
|
"onError"
|
|
@@ -24818,7 +24818,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24818
24818
|
}, u = (e) => {
|
|
24819
24819
|
r("deleteFile", e);
|
|
24820
24820
|
};
|
|
24821
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24821
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$30, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.files, (n) => (openBlock(), createElementBlock("div", {
|
|
24822
24822
|
key: n.file?.name,
|
|
24823
24823
|
class: normalizeClass(["file-content", { "is-file-object": !a(n) || i[s(n)] }])
|
|
24824
24824
|
}, [a(n) && !i[s(n)] ? (openBlock(), createElementBlock("img", {
|
|
@@ -24837,7 +24837,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24837
24837
|
onClick: (e) => u(n)
|
|
24838
24838
|
}, null, 8, ["onClick"]))], 2))), 128))]));
|
|
24839
24839
|
}
|
|
24840
|
-
}), _hoisted_1$
|
|
24840
|
+
}), _hoisted_1$29 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
|
|
24841
24841
|
__name: "ai-prompt-list",
|
|
24842
24842
|
props: {
|
|
24843
24843
|
onSelect: { type: Function },
|
|
@@ -24857,7 +24857,7 @@ var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$24 = ["accept"], fi
|
|
|
24857
24857
|
key: n,
|
|
24858
24858
|
class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(i) === r }]),
|
|
24859
24859
|
onClick: (r) => e.onSelect(n)
|
|
24860
|
-
}, toDisplayString(n), 11, _hoisted_1$
|
|
24860
|
+
}, toDisplayString(n), 11, _hoisted_1$29))), 128))], 512));
|
|
24861
24861
|
}
|
|
24862
24862
|
}), DelayMs = 300;
|
|
24863
24863
|
const OverflowTips = {
|
|
@@ -24897,7 +24897,7 @@ const OverflowTips = {
|
|
|
24897
24897
|
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
24898
|
}
|
|
24899
24899
|
};
|
|
24900
|
-
var _hoisted_1$
|
|
24900
|
+
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
24901
|
__name: "ai-slash-menu",
|
|
24902
24902
|
props: {
|
|
24903
24903
|
onSelect: { type: Function },
|
|
@@ -24939,7 +24939,7 @@ var _hoisted_1$29 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
24939
24939
|
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (n, r) => (openBlock(), createElementBlock(Fragment, null, [n.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
24940
24940
|
key: r,
|
|
24941
24941
|
class: "ai-slash-group"
|
|
24942
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
24942
|
+
}, [createElementVNode("div", _hoisted_1$28, [
|
|
24943
24943
|
(openBlock(), createElementBlock("svg", {
|
|
24944
24944
|
class: "title-icon",
|
|
24945
24945
|
style: normalizeStyle({ transform: i.value.includes(n.type) ? "rotate(90deg)" : "rotate(0deg)" }),
|
|
@@ -24979,41 +24979,43 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
|
|
|
24979
24979
|
plain: (e) => e.label
|
|
24980
24980
|
}) }
|
|
24981
24981
|
});
|
|
24982
|
-
var _hoisted_1$
|
|
24982
|
+
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
24983
|
__name: "ai-slash-input",
|
|
24984
|
-
props:
|
|
24984
|
+
props: {
|
|
24985
|
+
modelValue: {},
|
|
24985
24986
|
placeholder: { default: isEn ? "Please enter content" : "请输入内容" },
|
|
24986
24987
|
prompts: { default: () => [] },
|
|
24987
24988
|
resources: { default: () => [] }
|
|
24988
|
-
},
|
|
24989
|
-
|
|
24990
|
-
|
|
24991
|
-
|
|
24992
|
-
|
|
24989
|
+
},
|
|
24990
|
+
emits: [
|
|
24991
|
+
"update:modelValue",
|
|
24992
|
+
"keydown",
|
|
24993
|
+
"upload"
|
|
24994
|
+
],
|
|
24993
24995
|
setup(e, { expose: n, emit: r }) {
|
|
24994
|
-
let i = useTemplateRef("editorRef"), a = useTemplateRef("tippyRef"), s = r, l =
|
|
24996
|
+
let i = useTemplateRef("editorRef"), a = useTemplateRef("tippyRef"), s = r, l = e, u = customRef((e, n) => ({
|
|
24995
24997
|
get() {
|
|
24996
|
-
return e(), typeof l.
|
|
24998
|
+
return e(), typeof l.modelValue == "string" ? stringToDoc(l.modelValue) : l.modelValue;
|
|
24997
24999
|
},
|
|
24998
25000
|
set(e) {
|
|
24999
|
-
l.value
|
|
25001
|
+
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
25002
|
}
|
|
25001
|
-
})),
|
|
25003
|
+
})), d = shallowRef("slash"), m = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition: G } = useCommandSelection(), K = () => {
|
|
25002
25004
|
setTimeout(() => {
|
|
25003
|
-
let e =
|
|
25004
|
-
|
|
25005
|
+
let e = Z();
|
|
25006
|
+
m.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
25005
25007
|
left: e.coordinates?.left || 0,
|
|
25006
25008
|
top: e.coordinates?.top || 0,
|
|
25007
25009
|
width: 0,
|
|
25008
25010
|
height: 0
|
|
25009
25011
|
}) }), a.value?.show()) : a.value?.hide();
|
|
25010
25012
|
}, 16);
|
|
25011
|
-
},
|
|
25013
|
+
}, q = (e) => {
|
|
25012
25014
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
25013
|
-
e.key === "@" && (
|
|
25014
|
-
},
|
|
25015
|
-
|
|
25016
|
-
},
|
|
25015
|
+
e.key === "@" && (d.value = "slash", K()), e.key === "/" && (d.value = "prompt", K());
|
|
25016
|
+
}, J = () => {
|
|
25017
|
+
m.value = "";
|
|
25018
|
+
}, Z = () => {
|
|
25017
25019
|
let e = {
|
|
25018
25020
|
isActive: !1,
|
|
25019
25021
|
query: "",
|
|
@@ -25023,12 +25025,12 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25023
25025
|
if (!n || n.rangeCount === 0) return e;
|
|
25024
25026
|
let r = n.getRangeAt(0), i = r.startContainer, a = r.startOffset;
|
|
25025
25027
|
if (i.nodeType !== Node.TEXT_NODE) return e;
|
|
25026
|
-
let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${
|
|
25028
|
+
let o = (i.textContent || "").slice(0, a), s = /* @__PURE__ */ RegExp(`(${d.value === "slash" ? "@" : "/"}[^\\s]*)$`), l = o.match(s);
|
|
25027
25029
|
if (!l) return e;
|
|
25028
|
-
let u = l[1]?.slice(1),
|
|
25030
|
+
let u = l[1]?.slice(1), m = l.index + l[0].indexOf(d.value === "slash" ? "@" : "/");
|
|
25029
25031
|
try {
|
|
25030
25032
|
let e = document.createRange();
|
|
25031
|
-
e.setStart(i,
|
|
25033
|
+
e.setStart(i, m), e.setEnd(i, m + 1);
|
|
25032
25034
|
let n = e.getBoundingClientRect();
|
|
25033
25035
|
return {
|
|
25034
25036
|
isActive: !0,
|
|
@@ -25043,27 +25045,28 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25043
25045
|
} catch {
|
|
25044
25046
|
return e;
|
|
25045
25047
|
}
|
|
25046
|
-
},
|
|
25047
|
-
|
|
25048
|
-
let { column: n, line: r } =
|
|
25049
|
-
|
|
25050
|
-
},
|
|
25048
|
+
}, 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), Og = (e) => {
|
|
25049
|
+
L.command(G);
|
|
25050
|
+
let { column: n, line: r } = H.value;
|
|
25051
|
+
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(), Ag();
|
|
25052
|
+
}, Ag = () => {
|
|
25051
25053
|
setTimeout(() => {
|
|
25052
25054
|
let e = window.getSelection(), n = document.createRange();
|
|
25053
25055
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25054
25056
|
}, 100);
|
|
25055
|
-
},
|
|
25056
|
-
|
|
25057
|
+
}, Mg = (e) => {
|
|
25058
|
+
L.command(ReplaceAll, e), Ag();
|
|
25057
25059
|
};
|
|
25058
25060
|
watchEffect(() => {
|
|
25059
|
-
|
|
25061
|
+
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)));
|
|
25062
|
+
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
25063
|
});
|
|
25061
|
-
let
|
|
25064
|
+
let Ng = (e, n, r, i) => {
|
|
25062
25065
|
if (n.type === "tag") {
|
|
25063
|
-
let n =
|
|
25064
|
-
|
|
25066
|
+
let n = Q(e, r);
|
|
25067
|
+
L.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25065
25068
|
}
|
|
25066
|
-
},
|
|
25069
|
+
}, Pg = (e) => {
|
|
25067
25070
|
let n = e.clipboardData?.items;
|
|
25068
25071
|
if (!n) return;
|
|
25069
25072
|
let r = [];
|
|
@@ -25072,43 +25075,43 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25072
25075
|
n && r.push(n);
|
|
25073
25076
|
}
|
|
25074
25077
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25075
|
-
},
|
|
25076
|
-
|
|
25077
|
-
doc:
|
|
25078
|
+
}, Fg = () => {
|
|
25079
|
+
z?.(), L = createEditor({
|
|
25080
|
+
doc: u.value,
|
|
25078
25081
|
schema: tagSchema,
|
|
25079
25082
|
onChange: async (e) => {
|
|
25080
|
-
|
|
25083
|
+
u.value = e, K();
|
|
25081
25084
|
},
|
|
25082
|
-
onKeyDown: (e) =>
|
|
25083
|
-
}),
|
|
25084
|
-
},
|
|
25085
|
+
onKeyDown: (e) => q(e)
|
|
25086
|
+
}), z = L.input(i.value);
|
|
25087
|
+
}, Lg = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
|
|
25085
25088
|
return onMounted(() => {
|
|
25086
|
-
|
|
25089
|
+
Fg(), i.value?.addEventListener("paste", Pg);
|
|
25087
25090
|
}), onUnmounted(() => {
|
|
25088
|
-
|
|
25091
|
+
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", Pg);
|
|
25089
25092
|
}), n({
|
|
25090
25093
|
cleanup: () => {
|
|
25091
|
-
|
|
25094
|
+
L.command(ReplaceAll, "");
|
|
25092
25095
|
},
|
|
25093
|
-
focus:
|
|
25094
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25096
|
+
focus: Ag
|
|
25097
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25095
25098
|
ref_key: "editorRef",
|
|
25096
25099
|
ref: i,
|
|
25097
25100
|
"aria-placeholder": e.placeholder,
|
|
25098
25101
|
class: "ai-slash-input",
|
|
25099
25102
|
spellcheck: "false"
|
|
25100
|
-
}, [
|
|
25103
|
+
}, [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
25104
|
key: 1,
|
|
25102
25105
|
class: normalizeClass(`mention-tag-${r.data.type}`),
|
|
25103
25106
|
contenteditable: "false",
|
|
25104
25107
|
"data-tag-type": r.data.type
|
|
25105
25108
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25106
25109
|
class: "mention-tag-remove-icon",
|
|
25107
|
-
onClick: (a) =>
|
|
25110
|
+
onClick: (a) => Ng(e, r, i, n)
|
|
25108
25111
|
}, 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
25112
|
ref_key: "tippyRef",
|
|
25110
25113
|
ref: a,
|
|
25111
|
-
"append-to": unref(
|
|
25114
|
+
"append-to": unref(B),
|
|
25112
25115
|
arrow: !1,
|
|
25113
25116
|
"hide-on-click": !0,
|
|
25114
25117
|
interactive: !0,
|
|
@@ -25118,17 +25121,17 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25118
25121
|
trigger: "manual",
|
|
25119
25122
|
"trigger-target": i.value,
|
|
25120
25123
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25121
|
-
onHidden:
|
|
25122
|
-
onShow:
|
|
25124
|
+
onHidden: J,
|
|
25125
|
+
onShow: Lg
|
|
25123
25126
|
}, {
|
|
25124
|
-
content: withCtx(() => [
|
|
25127
|
+
content: withCtx(() => [d.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25125
25128
|
key: 0,
|
|
25126
|
-
"on-select":
|
|
25127
|
-
"resource-list":
|
|
25128
|
-
}, null, 8, ["resource-list"])) :
|
|
25129
|
+
"on-select": Og,
|
|
25130
|
+
"resource-list": j.value
|
|
25131
|
+
}, null, 8, ["resource-list"])) : d.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25129
25132
|
key: 1,
|
|
25130
|
-
"on-select":
|
|
25131
|
-
prompts:
|
|
25133
|
+
"on-select": Mg,
|
|
25134
|
+
prompts: I.value
|
|
25132
25135
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25133
25136
|
_: 1
|
|
25134
25137
|
}, 8, [
|
|
@@ -25137,7 +25140,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25137
25140
|
"z-index"
|
|
25138
25141
|
])]));
|
|
25139
25142
|
}
|
|
25140
|
-
}), _hoisted_1$
|
|
25143
|
+
}), _hoisted_1$26 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
|
|
25141
25144
|
__name: "input-attachment",
|
|
25142
25145
|
props: { messageState: {} },
|
|
25143
25146
|
emits: ["sendMessage", "stopSending"],
|
|
@@ -25147,7 +25150,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25147
25150
|
}, o = () => {
|
|
25148
25151
|
r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
|
|
25149
25152
|
};
|
|
25150
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25153
|
+
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
25154
|
key: 0,
|
|
25152
25155
|
onClick: a
|
|
25153
25156
|
}, null, 512)), [[unref(directive), {
|
|
@@ -25163,7 +25166,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25163
25166
|
offset: [0, 16]
|
|
25164
25167
|
}]])], 2)])]));
|
|
25165
25168
|
}
|
|
25166
|
-
}), _hoisted_1$
|
|
25169
|
+
}), _hoisted_1$25 = { class: "chat-input-container" }, _hoisted_2$19 = {
|
|
25167
25170
|
key: 1,
|
|
25168
25171
|
class: "ai-divider"
|
|
25169
25172
|
}, chat_input_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25172,6 +25175,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25172
25175
|
defaultUploadFiles: {},
|
|
25173
25176
|
inputMaxHeight: { default: 200 },
|
|
25174
25177
|
messageStatus: {},
|
|
25178
|
+
modelValue: {},
|
|
25175
25179
|
onSendMessage: {},
|
|
25176
25180
|
onStopSending: {},
|
|
25177
25181
|
onUpload: {},
|
|
@@ -25181,67 +25185,69 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25181
25185
|
shortcutId: {},
|
|
25182
25186
|
shortcuts: {}
|
|
25183
25187
|
}, {
|
|
25184
|
-
modelValue: { required: !0 },
|
|
25185
|
-
modelModifiers: {},
|
|
25186
25188
|
cite: {
|
|
25187
25189
|
required: !1,
|
|
25188
25190
|
default: ""
|
|
25189
25191
|
},
|
|
25190
25192
|
citeModifiers: {}
|
|
25191
25193
|
}),
|
|
25192
|
-
emits: /* @__PURE__ */ mergeModels([
|
|
25194
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
25195
|
+
"selectShortcut",
|
|
25196
|
+
"deleteShortcut",
|
|
25197
|
+
"update:modelValue"
|
|
25198
|
+
], ["update:cite"]),
|
|
25193
25199
|
setup(e, { expose: n, emit: r }) {
|
|
25194
|
-
useCssVars((e) => ({
|
|
25195
|
-
let i = useTemplateRef("aiSlashInputRef"), a = useTemplateRef("filesRef"), o = useModel(e, "
|
|
25200
|
+
useCssVars((e) => ({ v2a99ead4: unref(CHAT_Z_INDEX) }));
|
|
25201
|
+
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
25202
|
watchPostEffect(() => {
|
|
25197
|
-
let e =
|
|
25198
|
-
if (
|
|
25199
|
-
|
|
25203
|
+
let e = l.inputMaxHeight || 200;
|
|
25204
|
+
if (m.value.length < 1 || !a.value) {
|
|
25205
|
+
s.value = e;
|
|
25200
25206
|
return;
|
|
25201
25207
|
}
|
|
25202
|
-
|
|
25208
|
+
s.value = e + (a.value?.clientHeight || 0);
|
|
25203
25209
|
});
|
|
25204
|
-
let
|
|
25210
|
+
let L = async () => {
|
|
25205
25211
|
try {
|
|
25206
25212
|
i.value?.cleanup?.();
|
|
25207
25213
|
let e;
|
|
25208
|
-
|
|
25214
|
+
m.value?.length ? (e = m.value?.slice().map((e) => ({
|
|
25209
25215
|
type: MessageContentType.Binary,
|
|
25210
25216
|
url: e.url,
|
|
25211
25217
|
mimeType: e.file?.type || "",
|
|
25212
25218
|
filename: e.file?.name || ""
|
|
25213
|
-
})),
|
|
25219
|
+
})), l.modelValue && e.push({
|
|
25214
25220
|
type: MessageContentType.Text,
|
|
25215
|
-
text: docToString(
|
|
25216
|
-
})) : e = typeof
|
|
25221
|
+
text: docToString(l.modelValue)
|
|
25222
|
+
})) : e = typeof l.modelValue == "string" ? l.modelValue : docToString(l.modelValue), l.onSendMessage?.(e, l.modelValue), m.value = [];
|
|
25217
25223
|
} catch (e) {
|
|
25218
25224
|
console.error(e);
|
|
25219
25225
|
}
|
|
25220
|
-
},
|
|
25226
|
+
}, z = (e) => {
|
|
25221
25227
|
if (e.key === "Enter" || e.key === "NumpadEnter") {
|
|
25222
|
-
if (e.shiftKey ||
|
|
25223
|
-
|
|
25228
|
+
if (e.shiftKey || k.value === MessageStatus.Disabled) return;
|
|
25229
|
+
L();
|
|
25224
25230
|
}
|
|
25225
|
-
},
|
|
25231
|
+
}, B = async () => {
|
|
25226
25232
|
try {
|
|
25227
|
-
|
|
25233
|
+
l.onStopSending?.();
|
|
25228
25234
|
} catch (e) {
|
|
25229
25235
|
console.error(e);
|
|
25230
25236
|
}
|
|
25231
|
-
},
|
|
25232
|
-
|
|
25233
|
-
},
|
|
25234
|
-
|
|
25235
|
-
},
|
|
25236
|
-
|
|
25237
|
-
},
|
|
25238
|
-
if (
|
|
25239
|
-
if (
|
|
25237
|
+
}, H = () => {
|
|
25238
|
+
o.value = "";
|
|
25239
|
+
}, G = (e) => {
|
|
25240
|
+
u("selectShortcut", e);
|
|
25241
|
+
}, K = () => {
|
|
25242
|
+
u("deleteShortcut");
|
|
25243
|
+
}, q = async (e) => {
|
|
25244
|
+
if (j.value) for (let n of e) {
|
|
25245
|
+
if (m.value.find((e) => e.file?.name === n.name)) continue;
|
|
25240
25246
|
let e = {
|
|
25241
25247
|
file: n,
|
|
25242
25248
|
status: UploadStatus.Pending
|
|
25243
25249
|
};
|
|
25244
|
-
|
|
25250
|
+
m.value.push(e), l.onUpload?.(n).then((n) => {
|
|
25245
25251
|
if (n && typeof n == "object" && "download_url" in n) {
|
|
25246
25252
|
e.url = n.download_url, e.status = UploadStatus.Success;
|
|
25247
25253
|
return;
|
|
@@ -25251,70 +25257,72 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25251
25257
|
e.status = UploadStatus.Error;
|
|
25252
25258
|
});
|
|
25253
25259
|
}
|
|
25254
|
-
},
|
|
25255
|
-
|
|
25260
|
+
}, J = (e) => {
|
|
25261
|
+
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);
|
|
25262
|
+
}, Dg = (e, n) => {
|
|
25263
|
+
u("update:modelValue", e, n);
|
|
25256
25264
|
};
|
|
25257
25265
|
return n({
|
|
25258
25266
|
focus: () => {
|
|
25259
25267
|
i.value?.focus?.();
|
|
25260
25268
|
},
|
|
25261
|
-
triggerSendMessage:
|
|
25262
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25269
|
+
triggerSendMessage: L
|
|
25270
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$25, [renderSlot(n.$slots, "top"), createElementVNode("div", {
|
|
25263
25271
|
class: "chat-input",
|
|
25264
|
-
style: normalizeStyle({ maxHeight:
|
|
25272
|
+
style: normalizeStyle({ maxHeight: s.value + "px" })
|
|
25265
25273
|
}, [
|
|
25266
|
-
renderSlot(n.$slots, "input-header", {}, () => [
|
|
25274
|
+
renderSlot(n.$slots, "input-header", {}, () => [o.value ? (openBlock(), createBlock(cite_content_default, {
|
|
25267
25275
|
key: 0,
|
|
25268
25276
|
class: "chat-input-cite",
|
|
25269
|
-
content:
|
|
25270
|
-
onClose:
|
|
25277
|
+
content: o.value,
|
|
25278
|
+
onClose: H
|
|
25271
25279
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25272
|
-
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files:
|
|
25280
|
+
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: m.value })), () => [m.value.length ? (openBlock(), createElementBlock("div", {
|
|
25273
25281
|
key: 0,
|
|
25274
25282
|
ref_key: "filesRef",
|
|
25275
25283
|
ref: a,
|
|
25276
25284
|
class: "chat-input-files"
|
|
25277
25285
|
}, [createVNode(file_content_default, {
|
|
25278
|
-
files:
|
|
25279
|
-
onDeleteFile:
|
|
25286
|
+
files: m.value,
|
|
25287
|
+
onDeleteFile: J
|
|
25280
25288
|
}, null, 8, ["files"])], 512)) : createCommentVNode("v-if", !0)]),
|
|
25281
25289
|
createVNode(ai_slash_input_default, {
|
|
25282
25290
|
ref_key: "aiSlashInputRef",
|
|
25283
25291
|
ref: i,
|
|
25284
|
-
|
|
25285
|
-
"onUpdate:modelValue": r[0] ||= (e) => o.value = e,
|
|
25292
|
+
"model-value": e.modelValue,
|
|
25286
25293
|
placeholder: e.placeholder,
|
|
25287
25294
|
prompts: e.prompts,
|
|
25288
25295
|
resources: e.resources,
|
|
25289
|
-
onKeydown:
|
|
25290
|
-
|
|
25296
|
+
onKeydown: z,
|
|
25297
|
+
"onUpdate:modelValue": Dg,
|
|
25298
|
+
onUpload: q
|
|
25291
25299
|
}, null, 8, [
|
|
25292
|
-
"
|
|
25300
|
+
"model-value",
|
|
25293
25301
|
"placeholder",
|
|
25294
25302
|
"prompts",
|
|
25295
25303
|
"resources"
|
|
25296
25304
|
]),
|
|
25297
25305
|
createVNode(input_attachment_default, {
|
|
25298
|
-
"message-state":
|
|
25299
|
-
onSendMessage:
|
|
25300
|
-
onStopSending:
|
|
25306
|
+
"message-state": k.value,
|
|
25307
|
+
onSendMessage: L,
|
|
25308
|
+
onStopSending: B
|
|
25301
25309
|
}, {
|
|
25302
25310
|
default: withCtx(() => [
|
|
25303
|
-
|
|
25311
|
+
j.value ? (openBlock(), createBlock(file_upload_btn_default, {
|
|
25304
25312
|
key: 0,
|
|
25305
|
-
onUpload:
|
|
25313
|
+
onUpload: q
|
|
25306
25314
|
})) : createCommentVNode("v-if", !0),
|
|
25307
|
-
|
|
25308
|
-
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !
|
|
25315
|
+
j.value && (e.shortcuts?.length || E.value) ? (openBlock(), createElementBlock("span", _hoisted_2$19)) : createCommentVNode("v-if", !0),
|
|
25316
|
+
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !E.value ? (openBlock(), createBlock(shortcut_btns_default, {
|
|
25309
25317
|
key: 0,
|
|
25310
25318
|
shortcuts: e.shortcuts,
|
|
25311
|
-
onSelectShortcut:
|
|
25312
|
-
}, null, 8, ["shortcuts"])) : createCommentVNode("v-if", !0),
|
|
25319
|
+
onSelectShortcut: G
|
|
25320
|
+
}, null, 8, ["shortcuts"])) : createCommentVNode("v-if", !0), E.value ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
25313
25321
|
key: 1,
|
|
25314
25322
|
class: "selected-shortcut-btn",
|
|
25315
|
-
shortcut:
|
|
25323
|
+
shortcut: E.value
|
|
25316
25324
|
}, {
|
|
25317
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25325
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: K })]),
|
|
25318
25326
|
_: 1
|
|
25319
25327
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25320
25328
|
]),
|
|
@@ -25323,16 +25331,16 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25323
25331
|
}, 8, ["message-state"])
|
|
25324
25332
|
], 4)]));
|
|
25325
25333
|
}
|
|
25326
|
-
}), _hoisted_1$
|
|
25334
|
+
}), _hoisted_1$24 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
|
|
25327
25335
|
__name: "scroll-btn",
|
|
25328
25336
|
props: {
|
|
25329
25337
|
disabled: { type: Boolean },
|
|
25330
25338
|
title: {}
|
|
25331
25339
|
},
|
|
25332
25340
|
setup(e) {
|
|
25333
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25341
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$24, [renderSlot(n.$slots, "icon"), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]));
|
|
25334
25342
|
}
|
|
25335
|
-
}), _hoisted_1$
|
|
25343
|
+
}), _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
25344
|
__name: "delete-tool",
|
|
25337
25345
|
props: {
|
|
25338
25346
|
description: {},
|
|
@@ -25372,7 +25380,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25372
25380
|
ref_key: "tippyRef",
|
|
25373
25381
|
ref: a
|
|
25374
25382
|
}, s.value, { onShow: l }), {
|
|
25375
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
25383
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$23, [
|
|
25376
25384
|
createElementVNode("div", _hoisted_2$18, toDisplayString(unref(t$1)("确认删除该回答?")), 1),
|
|
25377
25385
|
createElementVNode("div", _hoisted_3$14, toDisplayString(unref(t$1)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
25378
25386
|
createElementVNode("div", _hoisted_4$12, [createVNode(unref(Button), {
|
|
@@ -25394,7 +25402,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25394
25402
|
_: 1
|
|
25395
25403
|
}, 16));
|
|
25396
25404
|
}
|
|
25397
|
-
}), _hoisted_1$
|
|
25405
|
+
}), _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
25406
|
__name: "user-feedback",
|
|
25399
25407
|
props: {
|
|
25400
25408
|
loading: { type: Boolean },
|
|
@@ -25410,7 +25418,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25410
25418
|
}, u = () => {
|
|
25411
25419
|
a.value = [], i.value = "", r("cancel");
|
|
25412
25420
|
};
|
|
25413
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25421
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [
|
|
25414
25422
|
createElementVNode("div", _hoisted_2$17, toDisplayString(e.title), 1),
|
|
25415
25423
|
createElementVNode("div", _hoisted_3$13, [e.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(8, (e) => createElementVNode("div", {
|
|
25416
25424
|
key: e,
|
|
@@ -25447,7 +25455,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25447
25455
|
})])
|
|
25448
25456
|
]));
|
|
25449
25457
|
}
|
|
25450
|
-
}), _hoisted_1$
|
|
25458
|
+
}), _hoisted_1$21 = {
|
|
25451
25459
|
ref: "messageToolsRef",
|
|
25452
25460
|
class: "message-tools-container"
|
|
25453
25461
|
}, _hoisted_2$16 = {
|
|
@@ -25501,7 +25509,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25501
25509
|
};
|
|
25502
25510
|
return onUnmounted(() => {
|
|
25503
25511
|
j(), l.value = [];
|
|
25504
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25512
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$21, [
|
|
25505
25513
|
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
25514
|
key: 0,
|
|
25507
25515
|
ref_for: !0
|
|
@@ -25586,7 +25594,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25586
25594
|
]))], 64))), 128))])
|
|
25587
25595
|
], 512));
|
|
25588
25596
|
}
|
|
25589
|
-
}), _hoisted_1$
|
|
25597
|
+
}), _hoisted_1$20 = { class: "ai-loading-ring" }, _hoisted_2$15 = {
|
|
25590
25598
|
fill: "none",
|
|
25591
25599
|
viewBox: "0 0 26 26"
|
|
25592
25600
|
}, _hoisted_3$11 = ["fill"], _hoisted_4$9 = { class: "ai-loading-star" }, _hoisted_5$6 = {
|
|
@@ -25610,7 +25618,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25610
25618
|
width: e.size + "px",
|
|
25611
25619
|
height: e.size + "px"
|
|
25612
25620
|
})
|
|
25613
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
25621
|
+
}, [createElementVNode("div", _hoisted_1$20, [(openBlock(), createElementBlock("svg", _hoisted_2$15, [createElementVNode("path", {
|
|
25614
25622
|
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
25623
|
fill: `url(#${i})`
|
|
25616
25624
|
}, null, 8, _hoisted_3$11), createElementVNode("defs", null, [createElementVNode("linearGradient", {
|
|
@@ -25652,7 +25660,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25652
25660
|
}, null, -1)
|
|
25653
25661
|
]])])]))])], 6));
|
|
25654
25662
|
}
|
|
25655
|
-
}), _hoisted_1$
|
|
25663
|
+
}), _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
25664
|
key: 0,
|
|
25657
25665
|
class: "knowledge-rag-content"
|
|
25658
25666
|
}, activity_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25680,7 +25688,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25680
25688
|
let e = Array.isArray(n.content) ? n.content?.length : n.content?.referenceDocument?.length;
|
|
25681
25689
|
return isEn ? `Reference ${e} documents as reference` : `引用 ${e} 篇资料作为参考`;
|
|
25682
25690
|
}), a = useModel(e, "collapsed");
|
|
25683
|
-
return (n, o) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25691
|
+
return (n, o) => (openBlock(), createElementBlock("div", _hoisted_1$19, [createElementVNode("div", {
|
|
25684
25692
|
class: "ai-activity-message-title",
|
|
25685
25693
|
onClick: o[0] ||= (e) => a.value = !a.value
|
|
25686
25694
|
}, [
|
|
@@ -25692,7 +25700,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25692
25700
|
createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": a.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
|
|
25693
25701
|
]), 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
25702
|
}
|
|
25695
|
-
}), _hoisted_1$
|
|
25703
|
+
}), _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
25704
|
__name: "desc-panel",
|
|
25697
25705
|
props: {
|
|
25698
25706
|
desc: {},
|
|
@@ -25706,7 +25714,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25706
25714
|
return n.desc;
|
|
25707
25715
|
}
|
|
25708
25716
|
});
|
|
25709
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25717
|
+
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
25718
|
key: n,
|
|
25711
25719
|
class: "desc-panel-item"
|
|
25712
25720
|
}, [createElementVNode("span", _hoisted_4$7, toDisplayString(n) + ":", 1), withDirectives((openBlock(), createElementBlock("span", _hoisted_5$4, [createTextVNode(toDisplayString(e), 1)])), [[unref(OverflowTips), {
|
|
@@ -25714,7 +25722,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25714
25722
|
appendTo: "parent"
|
|
25715
25723
|
}]])]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(r.value), 1)], 64))])]));
|
|
25716
25724
|
}
|
|
25717
|
-
}), _hoisted_1$
|
|
25725
|
+
}), _hoisted_1$17 = { class: "tool-message" }, tool_message_default = /* @__PURE__ */ defineComponent({
|
|
25718
25726
|
__name: "tool-message",
|
|
25719
25727
|
props: {
|
|
25720
25728
|
duration: {},
|
|
@@ -25729,12 +25737,12 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25729
25737
|
property: {}
|
|
25730
25738
|
},
|
|
25731
25739
|
setup(e) {
|
|
25732
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25740
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$17, [createVNode(desc_panel_default, {
|
|
25733
25741
|
desc: e.content || e.error,
|
|
25734
25742
|
title: unref(t$1)("返回内容")
|
|
25735
25743
|
}, null, 8, ["desc", "title"])]));
|
|
25736
25744
|
}
|
|
25737
|
-
}), _hoisted_1$
|
|
25745
|
+
}), _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
25746
|
key: 1,
|
|
25739
25747
|
class: "toolcall-duration"
|
|
25740
25748
|
}, _hoisted_5$3 = { class: "ai-toolcall-render-content" }, toolcall_render_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25760,7 +25768,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25760
25768
|
let e = n.duration || n.toolCall?.toolMessage?.duration;
|
|
25761
25769
|
return e ? formatDuration(e) : "";
|
|
25762
25770
|
});
|
|
25763
|
-
return (n, s) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25771
|
+
return (n, s) => (openBlock(), createElementBlock("div", _hoisted_1$16, [createElementVNode("div", { class: normalizeClass(["ai-toolcall-render-header", `toolcall-status-${e.status}`]) }, [
|
|
25764
25772
|
createVNode(unref(ArrowRightIcon), {
|
|
25765
25773
|
class: normalizeClass({ "is-collapsed": r.value }),
|
|
25766
25774
|
onClick: s[0] ||= (e) => r.value = !r.value
|
|
@@ -25792,7 +25800,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25792
25800
|
e.toolCall?.toolMessage ? (openBlock(), createBlock(tool_message_default, normalizeProps(mergeProps({ key: 0 }, e.toolCall.toolMessage)), null, 16)) : createCommentVNode("v-if", !0)
|
|
25793
25801
|
], 512), [[vShow, !r.value]])]));
|
|
25794
25802
|
}
|
|
25795
|
-
}), _hoisted_1$
|
|
25803
|
+
}), _hoisted_1$15 = { class: "assistant-message" }, _hoisted_2$11 = { class: "assistant-message-content" }, assistant_message_default = /* @__PURE__ */ defineComponent({
|
|
25796
25804
|
__name: "assistant-message",
|
|
25797
25805
|
props: {
|
|
25798
25806
|
toolCalls: {},
|
|
@@ -25805,7 +25813,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25805
25813
|
property: {}
|
|
25806
25814
|
},
|
|
25807
25815
|
setup(e) {
|
|
25808
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25816
|
+
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
25817
|
content: e.content || "",
|
|
25810
25818
|
status: e.status,
|
|
25811
25819
|
type: unref(MessageContentType).Text
|
|
@@ -25819,7 +25827,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25819
25827
|
"tool-call": n
|
|
25820
25828
|
}, null, 8, ["status", "tool-call"]))), 128)) : createCommentVNode("v-if", !0)]));
|
|
25821
25829
|
}
|
|
25822
|
-
}), _hoisted_1$
|
|
25830
|
+
}), _hoisted_1$14 = { class: "info-message" }, info_message_default = /* @__PURE__ */ defineComponent({
|
|
25823
25831
|
__name: "info-message",
|
|
25824
25832
|
props: {
|
|
25825
25833
|
content: {},
|
|
@@ -25831,21 +25839,21 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25831
25839
|
property: {}
|
|
25832
25840
|
},
|
|
25833
25841
|
setup(e) {
|
|
25834
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25842
|
+
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
25843
|
key: n,
|
|
25836
25844
|
class: "info-message-content"
|
|
25837
25845
|
}, toDisplayString(e), 1))), 128))]));
|
|
25838
25846
|
}
|
|
25839
|
-
}), _hoisted_1$
|
|
25847
|
+
}), _hoisted_1$13 = { class: "ai-loading-message" }, loading_message_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
25840
25848
|
__name: "loading-message",
|
|
25841
25849
|
setup(e) {
|
|
25842
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25850
|
+
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
25851
|
}
|
|
25844
25852
|
}), __plugin_vue_export_helper_default = (e, n) => {
|
|
25845
25853
|
let r = e.__vccOpts || e;
|
|
25846
25854
|
for (let [e, i] of n) r[e] = i;
|
|
25847
25855
|
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$
|
|
25856
|
+
}, 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
25857
|
key: 0,
|
|
25850
25858
|
class: "ai-reasoning-message-title-icon"
|
|
25851
25859
|
}, _hoisted_3$7 = { class: "ai-reasoning-message-title-text" }, _hoisted_4$5 = { class: "ai-reasoning-message-content" }, reasoning_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25879,7 +25887,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25879
25887
|
default: return t$1("思考中");
|
|
25880
25888
|
}
|
|
25881
25889
|
});
|
|
25882
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25890
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$12, [createElementVNode("div", {
|
|
25883
25891
|
class: normalizeClass(["ai-reasoning-message-title", {
|
|
25884
25892
|
"ai-reasoning-message-title-collapsed": r.value,
|
|
25885
25893
|
"is-thinking": e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming,
|
|
@@ -25900,7 +25908,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25900
25908
|
content: e
|
|
25901
25909
|
}, null, 8, ["content"]))), 128))], 512), [[vShow, !r.value]])]));
|
|
25902
25910
|
}
|
|
25903
|
-
}), _hoisted_1$
|
|
25911
|
+
}), _hoisted_1$11 = { class: "ai-key-value-content" }, _hoisted_2$9 = {
|
|
25904
25912
|
key: 0,
|
|
25905
25913
|
class: "ai-key-value-title"
|
|
25906
25914
|
}, _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 +25918,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25910
25918
|
title: {}
|
|
25911
25919
|
},
|
|
25912
25920
|
setup(e) {
|
|
25913
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25921
|
+
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
25922
|
key: e.key,
|
|
25915
25923
|
class: "key-value-item"
|
|
25916
25924
|
}, [
|
|
@@ -25919,7 +25927,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25919
25927
|
createElementVNode("div", _hoisted_5$2, toDisplayString(e.value), 1)
|
|
25920
25928
|
]))), 128))])]));
|
|
25921
25929
|
}
|
|
25922
|
-
}), _hoisted_1$
|
|
25930
|
+
}), _hoisted_1$10 = { class: "ai-user-message" }, _hoisted_2$8 = {
|
|
25923
25931
|
key: 1,
|
|
25924
25932
|
class: "ai-user-message-content"
|
|
25925
25933
|
}, _hoisted_3$5 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25933,6 +25941,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25933
25941
|
status: {},
|
|
25934
25942
|
property: {},
|
|
25935
25943
|
onAction: { type: Function },
|
|
25944
|
+
tippyOptions: {},
|
|
25936
25945
|
messageToolsStatus: {},
|
|
25937
25946
|
onInputConfirm: { type: Function },
|
|
25938
25947
|
onShortcutConfirm: { type: Function }
|
|
@@ -25988,7 +25997,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25988
25997
|
}, G = async (e, r) => {
|
|
25989
25998
|
n.onInputConfirm?.(e, r), i.value = !1;
|
|
25990
25999
|
};
|
|
25991
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26000
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
25992
26001
|
u.value && typeof u.value == "string" ? (openBlock(), createBlock(cite_content_default, {
|
|
25993
26002
|
key: 0,
|
|
25994
26003
|
class: "ai-user-message-cite",
|
|
@@ -26048,8 +26057,13 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26048
26057
|
"message-tools": unref(CONST_USER_MESSAGE_TOOLS),
|
|
26049
26058
|
"message-tools-status": e.messageToolsStatus,
|
|
26050
26059
|
"on-action": I,
|
|
26060
|
+
"tippy-options": e.tippyOptions,
|
|
26051
26061
|
"update-tools": []
|
|
26052
|
-
}, null, 8, [
|
|
26062
|
+
}, null, 8, [
|
|
26063
|
+
"message-tools",
|
|
26064
|
+
"message-tools-status",
|
|
26065
|
+
"tippy-options"
|
|
26066
|
+
]))
|
|
26053
26067
|
], 64))
|
|
26054
26068
|
]));
|
|
26055
26069
|
}
|
|
@@ -26060,6 +26074,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26060
26074
|
onInputConfirm: { type: Function },
|
|
26061
26075
|
onShortcutConfirm: { type: Function },
|
|
26062
26076
|
onAction: { type: Function },
|
|
26077
|
+
tippyOptions: {},
|
|
26063
26078
|
message: {}
|
|
26064
26079
|
},
|
|
26065
26080
|
setup(e) {
|
|
@@ -26070,7 +26085,8 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26070
26085
|
onAction: n.onAction,
|
|
26071
26086
|
onInputConfirm: n.onInputConfirm,
|
|
26072
26087
|
onShortcutConfirm: n.onShortcutConfirm,
|
|
26073
|
-
messageToolsStatus: n.messageToolsStatus
|
|
26088
|
+
messageToolsStatus: n.messageToolsStatus,
|
|
26089
|
+
tippyOptions: n.tippyOptions
|
|
26074
26090
|
});
|
|
26075
26091
|
case MessageRole$1.Assistant: return h$1(assistant_message_default, n.message, { default: (e) => renderSlot(r, "default", e, () => [h$1(content_render_default, {
|
|
26076
26092
|
content: n.message.content || "",
|
|
@@ -26086,7 +26102,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26086
26102
|
});
|
|
26087
26103
|
return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(i.value)));
|
|
26088
26104
|
}
|
|
26089
|
-
}), _hoisted_1$
|
|
26105
|
+
}), _hoisted_1$9 = ["onMouseenter", "onMouseleave"], _hoisted_2$7 = { class: "ai-message-fixed-bottom" }, message_container_default = /* @__PURE__ */ defineComponent({
|
|
26090
26106
|
__name: "message-container",
|
|
26091
26107
|
props: /* @__PURE__ */ mergeModels({
|
|
26092
26108
|
enableSelection: {
|
|
@@ -26210,13 +26226,15 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26210
26226
|
"message-tools-status": e.messageToolsStatus,
|
|
26211
26227
|
"on-action": (e) => E(e, n),
|
|
26212
26228
|
"on-input-confirm": (e, r) => L(n, e, r),
|
|
26213
|
-
"on-shortcut-confirm": (e) => z(n, e)
|
|
26229
|
+
"on-shortcut-confirm": (e) => z(n, e),
|
|
26230
|
+
"tippy-options": e.messageToolsTippyOptions
|
|
26214
26231
|
}, null, 8, [
|
|
26215
26232
|
"message",
|
|
26216
26233
|
"message-tools-status",
|
|
26217
26234
|
"on-action",
|
|
26218
26235
|
"on-input-confirm",
|
|
26219
|
-
"on-shortcut-confirm"
|
|
26236
|
+
"on-shortcut-confirm",
|
|
26237
|
+
"tippy-options"
|
|
26220
26238
|
]))])), 128)), i.type === unref(MessageRole$1).Assistant && e.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
|
|
26221
26239
|
key: 0,
|
|
26222
26240
|
"message-tools-status": e.messageToolsStatus,
|
|
@@ -26228,7 +26246,7 @@ var _hoisted_1$28 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26228
26246
|
"on-action",
|
|
26229
26247
|
"tippy-options",
|
|
26230
26248
|
"onFeedback"
|
|
26231
|
-
])) : createCommentVNode("v-if", !0)], 4)], 44, _hoisted_1$
|
|
26249
|
+
])) : createCommentVNode("v-if", !0)], 4)], 44, _hoisted_1$9))), 128)),
|
|
26232
26250
|
createElementVNode("div", {
|
|
26233
26251
|
ref_key: "messageContainerBottomRef",
|
|
26234
26252
|
ref: a,
|
|
@@ -26265,19 +26283,13 @@ var RESOURCE_TYPE_MAP = {
|
|
|
26265
26283
|
mcp: "mcp",
|
|
26266
26284
|
knowledgebase: "doc"
|
|
26267
26285
|
};
|
|
26268
|
-
function
|
|
26269
|
-
|
|
26270
|
-
|
|
26271
|
-
|
|
26272
|
-
|
|
26273
|
-
|
|
26274
|
-
|
|
26275
|
-
name: e.name,
|
|
26276
|
-
icon: e.icon ?? "",
|
|
26277
|
-
type: i
|
|
26278
|
-
});
|
|
26279
|
-
}
|
|
26280
|
-
return n;
|
|
26286
|
+
function mapResourcesToSlashItems(e) {
|
|
26287
|
+
return e?.length ? e.map((e) => ({
|
|
26288
|
+
id: e.code,
|
|
26289
|
+
name: e.name,
|
|
26290
|
+
icon: e.icon ?? "",
|
|
26291
|
+
type: RESOURCE_TYPE_MAP[e.type] ?? e.type
|
|
26292
|
+
})) : [];
|
|
26281
26293
|
}
|
|
26282
26294
|
const getCookieByName = (e) => {
|
|
26283
26295
|
let n = document.cookie.match(/* @__PURE__ */ RegExp(`(^| )${e}=([^;]*)(;|$)`));
|
|
@@ -26426,7 +26438,7 @@ function useHistoryPanel(e) {
|
|
|
26426
26438
|
isVisible: () => o.value?.state.isVisible ?? !1
|
|
26427
26439
|
};
|
|
26428
26440
|
}
|
|
26429
|
-
var _hoisted_1$
|
|
26441
|
+
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
26442
|
__name: "history-group",
|
|
26431
26443
|
props: {
|
|
26432
26444
|
currentSessionCode: {},
|
|
@@ -26435,9 +26447,9 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26435
26447
|
},
|
|
26436
26448
|
setup(e) {
|
|
26437
26449
|
let n = e;
|
|
26438
|
-
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26450
|
+
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
26451
|
}
|
|
26440
|
-
}), [["__scopeId", "data-v-3b603cb6"]]), _hoisted_1$
|
|
26452
|
+
}), [["__scopeId", "data-v-3b603cb6"]]), _hoisted_1$7 = { class: "history-item-actions" }, history_item_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26441
26453
|
__name: "history-item",
|
|
26442
26454
|
props: {
|
|
26443
26455
|
isActive: { type: Boolean },
|
|
@@ -26496,7 +26508,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26496
26508
|
}, null, 8, ["modelValue"])) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(OverflowTitle), { style: { width: "calc(100% - 42px)" } }, {
|
|
26497
26509
|
default: withCtx(() => [createTextVNode(toDisplayString(r.session.sessionName), 1)]),
|
|
26498
26510
|
_: 1
|
|
26499
|
-
}), createElementVNode("span", _hoisted_1$
|
|
26511
|
+
}), createElementVNode("span", _hoisted_1$7, [withDirectives(createElementVNode("i", {
|
|
26500
26512
|
class: "bkai-icon bkai-bianji",
|
|
26501
26513
|
onClick: withModifiers(d, ["stop"])
|
|
26502
26514
|
}, null, 512), [[unref(a), {
|
|
@@ -26520,7 +26532,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26520
26532
|
_: 1
|
|
26521
26533
|
}, 8, ["title"])])], 64))], 2));
|
|
26522
26534
|
}
|
|
26523
|
-
}), [["__scopeId", "data-v-ea1e15de"]]), _hoisted_1$
|
|
26535
|
+
}), [["__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
26536
|
__name: "history-search",
|
|
26525
26537
|
props: {
|
|
26526
26538
|
modelValue: { default: "" },
|
|
@@ -26531,7 +26543,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26531
26543
|
let r = e, i = n, a = (e) => {
|
|
26532
26544
|
i("update:modelValue", e);
|
|
26533
26545
|
};
|
|
26534
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26546
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$6, [createVNode(unref(Input), {
|
|
26535
26547
|
"model-value": r.modelValue,
|
|
26536
26548
|
behavior: "simplicity",
|
|
26537
26549
|
placeholder: r.placeholder || unref(t)("搜索会话名称"),
|
|
@@ -26542,7 +26554,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26542
26554
|
_: 1
|
|
26543
26555
|
}, 8, ["model-value", "placeholder"])]));
|
|
26544
26556
|
}
|
|
26545
|
-
}), [["__scopeId", "data-v-e7ff40b2"]]), _hoisted_1$
|
|
26557
|
+
}), [["__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
26558
|
__name: "index",
|
|
26547
26559
|
props: { sessionBusinessManager: {} },
|
|
26548
26560
|
emits: [
|
|
@@ -26612,7 +26624,7 @@ var _hoisted_1$9 = { class: "history-group" }, _hoisted_2$6 = { class: "history-
|
|
|
26612
26624
|
}, I = () => {
|
|
26613
26625
|
s.value = null;
|
|
26614
26626
|
};
|
|
26615
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
26627
|
+
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
26628
|
modelValue: a.value,
|
|
26617
26629
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
26618
26630
|
placeholder: unref(t)("搜索会话名称")
|
|
@@ -26675,7 +26687,7 @@ function useHistoryDropdown(e) {
|
|
|
26675
26687
|
isVisible: () => !1
|
|
26676
26688
|
};
|
|
26677
26689
|
}
|
|
26678
|
-
var _hoisted_1$
|
|
26690
|
+
var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" }, _hoisted_3$2 = ["src"], _hoisted_4$2 = {
|
|
26679
26691
|
key: 0,
|
|
26680
26692
|
class: "rename-tooltip"
|
|
26681
26693
|
}, _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 +26785,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26773
26785
|
${a}
|
|
26774
26786
|
</div>
|
|
26775
26787
|
`;
|
|
26776
|
-
}),
|
|
26788
|
+
}), Ag = async () => {
|
|
26777
26789
|
if (i.sessionBusinessManager) try {
|
|
26778
26790
|
await i.sessionBusinessManager.createNewSession();
|
|
26779
26791
|
} catch (e) {
|
|
@@ -26785,16 +26797,16 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26785
26797
|
a("new-chat");
|
|
26786
26798
|
}, $ = (e) => {
|
|
26787
26799
|
e.stopPropagation(), i.sessionBusinessManager ? (L || z(), L && L.handleTriggerClick(e)) : a("history-click", e);
|
|
26788
|
-
},
|
|
26800
|
+
}, Mg = () => {
|
|
26789
26801
|
a("help-click");
|
|
26790
|
-
},
|
|
26802
|
+
}, Ng = (e) => {
|
|
26791
26803
|
e.stopPropagation(), L && L.isVisible() && L.hide(), j && (j.state.isVisible ? j.hide() : j.show());
|
|
26792
|
-
},
|
|
26804
|
+
}, Fg = (e) => {
|
|
26793
26805
|
e.stopPropagation(), e.preventDefault();
|
|
26794
26806
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26795
26807
|
if (!n.classList.contains("disabled")) switch (j && j.hide(), r) {
|
|
26796
26808
|
case "rename":
|
|
26797
|
-
|
|
26809
|
+
Ig();
|
|
26798
26810
|
break;
|
|
26799
26811
|
case "auto-generate":
|
|
26800
26812
|
a("auto-generate-name");
|
|
@@ -26803,9 +26815,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26803
26815
|
a("share");
|
|
26804
26816
|
break;
|
|
26805
26817
|
}
|
|
26806
|
-
},
|
|
26807
|
-
document.removeEventListener("click",
|
|
26808
|
-
document.addEventListener("click",
|
|
26818
|
+
}, Ig = () => {
|
|
26819
|
+
document.removeEventListener("click", Vg), g.value = i.sessionName || "", m.value = !0, setTimeout(() => {
|
|
26820
|
+
document.addEventListener("click", Vg);
|
|
26809
26821
|
}, 100), setTimeout(() => {
|
|
26810
26822
|
if (k.value) try {
|
|
26811
26823
|
let e = k.value;
|
|
@@ -26816,22 +26828,22 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26816
26828
|
console.warn("Failed to focus rename input:", e);
|
|
26817
26829
|
}
|
|
26818
26830
|
}, 100);
|
|
26819
|
-
},
|
|
26831
|
+
}, Lg = () => {
|
|
26820
26832
|
let e = g.value.trim();
|
|
26821
26833
|
if (!e) {
|
|
26822
|
-
|
|
26834
|
+
Rg();
|
|
26823
26835
|
return;
|
|
26824
26836
|
}
|
|
26825
26837
|
a("rename", e), m.value = !1, g.value = "";
|
|
26826
|
-
},
|
|
26838
|
+
}, Rg = () => {
|
|
26827
26839
|
m.value = !1, g.value = "";
|
|
26828
|
-
},
|
|
26829
|
-
g.value = e, n.key === "Enter" ?
|
|
26830
|
-
},
|
|
26840
|
+
}, zg = (e, n) => {
|
|
26841
|
+
g.value = e, n.key === "Enter" ? Lg() : n.key === "Escape" && Rg();
|
|
26842
|
+
}, Vg = (e) => {
|
|
26831
26843
|
if (!m.value) return;
|
|
26832
26844
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26833
|
-
r && !r.contains(n) &&
|
|
26834
|
-
},
|
|
26845
|
+
r && !r.contains(n) && Rg();
|
|
26846
|
+
}, Ug = async () => {
|
|
26835
26847
|
if (!u.value) return;
|
|
26836
26848
|
let e = (await import("tippy.js")).default;
|
|
26837
26849
|
j &&= (j.destroy(), null), j = e(u.value, {
|
|
@@ -26849,7 +26861,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26849
26861
|
let { default: e } = await import("tippy.js");
|
|
26850
26862
|
document.querySelectorAll(".tippy-menu-item").forEach((n) => {
|
|
26851
26863
|
let r = n;
|
|
26852
|
-
r.addEventListener("click",
|
|
26864
|
+
r.addEventListener("click", Fg);
|
|
26853
26865
|
let i = r.getAttribute("data-tippy-content");
|
|
26854
26866
|
if (i && !I.has(r)) {
|
|
26855
26867
|
let n = e(r, {
|
|
@@ -26868,7 +26880,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26868
26880
|
onHide: () => {
|
|
26869
26881
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26870
26882
|
let n = e;
|
|
26871
|
-
n.removeEventListener("click",
|
|
26883
|
+
n.removeEventListener("click", Fg);
|
|
26872
26884
|
let r = I.get(n);
|
|
26873
26885
|
r && (r.destroy(), I.delete(n));
|
|
26874
26886
|
});
|
|
@@ -26878,11 +26890,11 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26878
26890
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26879
26891
|
j && j.setContent(Z.value);
|
|
26880
26892
|
}), onMounted(() => {
|
|
26881
|
-
|
|
26893
|
+
Ug(), i.sessionBusinessManager && z(), document.addEventListener("click", Vg);
|
|
26882
26894
|
}), onBeforeUnmount(() => {
|
|
26883
26895
|
j &&= (j.destroy(), null), I.forEach((e) => {
|
|
26884
26896
|
e.destroy();
|
|
26885
|
-
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click",
|
|
26897
|
+
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", Vg);
|
|
26886
26898
|
}), n({
|
|
26887
26899
|
headerRef: s,
|
|
26888
26900
|
historyIconRef: l
|
|
@@ -26890,7 +26902,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26890
26902
|
ref_key: "headerRef",
|
|
26891
26903
|
ref: s,
|
|
26892
26904
|
class: normalizeClass(["ai-header drag-handle", { draggable: i.draggable }])
|
|
26893
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
26905
|
+
}, [createElementVNode("div", _hoisted_1$4, [
|
|
26894
26906
|
createElementVNode("div", _hoisted_2$3, [createElementVNode("img", {
|
|
26895
26907
|
alt: "logo",
|
|
26896
26908
|
src: unref(avatar_default)
|
|
@@ -26905,13 +26917,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26905
26917
|
"onUpdate:modelValue": r[0] ||= (e) => g.value = e,
|
|
26906
26918
|
class: "rename-input",
|
|
26907
26919
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26908
|
-
onKeyup:
|
|
26920
|
+
onKeyup: zg
|
|
26909
26921
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26910
26922
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26911
|
-
onClick:
|
|
26923
|
+
onClick: Lg
|
|
26912
26924
|
}), createElementVNode("i", {
|
|
26913
26925
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26914
|
-
onClick:
|
|
26926
|
+
onClick: Rg
|
|
26915
26927
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26916
26928
|
], 2),
|
|
26917
26929
|
i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26919,7 +26931,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26919
26931
|
ref_key: "moreIconRef",
|
|
26920
26932
|
ref: u,
|
|
26921
26933
|
class: "bkai-icon bkai-more",
|
|
26922
|
-
onClick:
|
|
26934
|
+
onClick: Ng
|
|
26923
26935
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26924
26936
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26925
26937
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26931,7 +26943,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26931
26943
|
{ disabled: !K.value }
|
|
26932
26944
|
]),
|
|
26933
26945
|
style: normalizeStyle(J()),
|
|
26934
|
-
onClick: r[1] ||= (e) => K.value ?
|
|
26946
|
+
onClick: r[1] ||= (e) => K.value ? Ag() : void 0
|
|
26935
26947
|
}, null, 6)), [[unref(o), {
|
|
26936
26948
|
content: q(unref(t)("新增会话")),
|
|
26937
26949
|
boundary: "parent"
|
|
@@ -26955,7 +26967,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26955
26967
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26956
26968
|
key: 2,
|
|
26957
26969
|
class: "bkai-icon bkai-zhushou",
|
|
26958
|
-
onClick:
|
|
26970
|
+
onClick: Mg
|
|
26959
26971
|
}, null, 512)), [[unref(o), {
|
|
26960
26972
|
content: unref(t)("转人工"),
|
|
26961
26973
|
boundary: "parent"
|
|
@@ -27173,7 +27185,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27173
27185
|
};
|
|
27174
27186
|
await this.sessionModule.createSession(n);
|
|
27175
27187
|
let r = this.agentModule?.info.value;
|
|
27176
|
-
r && this.agentModule?.handleRole(r), this.emit("session-created", { session: this.sessionModule.current.value });
|
|
27188
|
+
r && this.agentModule?.handleRole(r, n.sessionCode), this.emit("session-created", { session: this.sessionModule.current.value });
|
|
27177
27189
|
} catch (e) {
|
|
27178
27190
|
throw console.error("Failed to create session:", e), this.emit("session-error", {
|
|
27179
27191
|
action: "create",
|
|
@@ -27685,7 +27697,7 @@ var UIStateManager = class {
|
|
|
27685
27697
|
reset() {
|
|
27686
27698
|
this.clearSelection(), this.disableSelectionMode(), this.stopEditingSession(), this.clearLoadingStates();
|
|
27687
27699
|
}
|
|
27688
|
-
}, _hoisted_1$
|
|
27700
|
+
}, _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
27701
|
__name: "selection-footer",
|
|
27690
27702
|
props: {
|
|
27691
27703
|
isAllSelected: { type: Boolean },
|
|
@@ -27702,7 +27714,7 @@ var UIStateManager = class {
|
|
|
27702
27714
|
],
|
|
27703
27715
|
setup(e) {
|
|
27704
27716
|
let n = e;
|
|
27705
|
-
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
27717
|
+
return (e, r) => (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", _hoisted_2$2, [createVNode(unref(Checkbox), {
|
|
27706
27718
|
"model-value": n.isAllSelected,
|
|
27707
27719
|
"onUpdate:modelValue": r[0] ||= (n) => e.$emit("toggle-all", n)
|
|
27708
27720
|
}, null, 8, ["model-value"]), createElementVNode("span", _hoisted_3$1, toDisplayString(unref(t)("全选")), 1)]), createElementVNode("div", _hoisted_4$1, [createVNode(unref(Button), {
|
|
@@ -27721,7 +27733,7 @@ var UIStateManager = class {
|
|
|
27721
27733
|
_: 1
|
|
27722
27734
|
}, 8, ["disabled", "loading"])])]));
|
|
27723
27735
|
}
|
|
27724
|
-
}), [["__scopeId", "data-v-3247bea6"]]), _hoisted_1$
|
|
27736
|
+
}), [["__scopeId", "data-v-3247bea6"]]), _hoisted_1$2 = {
|
|
27725
27737
|
key: 0,
|
|
27726
27738
|
class: "chatbot-error"
|
|
27727
27739
|
}, _hoisted_2$1 = { class: "chatbot-loading" }, _hoisted_3 = {
|
|
@@ -27800,7 +27812,7 @@ var UIStateManager = class {
|
|
|
27800
27812
|
a("receive-text");
|
|
27801
27813
|
},
|
|
27802
27814
|
onDone: () => {
|
|
27803
|
-
a("receive-end"),
|
|
27815
|
+
a("receive-end"), g_();
|
|
27804
27816
|
},
|
|
27805
27817
|
onError: (e) => {
|
|
27806
27818
|
a("error", e);
|
|
@@ -27816,11 +27828,11 @@ var UIStateManager = class {
|
|
|
27816
27828
|
return n.injectMessageModule(r.message), r;
|
|
27817
27829
|
})(), 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
27830
|
if (e.id === "cite") {
|
|
27819
|
-
|
|
27831
|
+
Xg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), N_();
|
|
27820
27832
|
return;
|
|
27821
27833
|
}
|
|
27822
27834
|
if (e.id === "rebuild") {
|
|
27823
|
-
await
|
|
27835
|
+
await Ag(n);
|
|
27824
27836
|
return;
|
|
27825
27837
|
}
|
|
27826
27838
|
if (e.id === "delete") {
|
|
@@ -27828,7 +27840,7 @@ var UIStateManager = class {
|
|
|
27828
27840
|
return;
|
|
27829
27841
|
}
|
|
27830
27842
|
if (e.id === "share") {
|
|
27831
|
-
|
|
27843
|
+
Vg && (E.value = !0), a("request-share");
|
|
27832
27844
|
return;
|
|
27833
27845
|
}
|
|
27834
27846
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27850,7 +27862,7 @@ var UIStateManager = class {
|
|
|
27850
27862
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27851
27863
|
return;
|
|
27852
27864
|
}
|
|
27853
|
-
let s = findLastUserMessageIdBefore(
|
|
27865
|
+
let s = findLastUserMessageIdBefore(Kg?.messages.value || [], n[0]);
|
|
27854
27866
|
if (s === void 0) {
|
|
27855
27867
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27856
27868
|
return;
|
|
@@ -27868,12 +27880,12 @@ var UIStateManager = class {
|
|
|
27868
27880
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27869
27881
|
}
|
|
27870
27882
|
}, Z = async (e) => {
|
|
27871
|
-
if (!
|
|
27883
|
+
if (!Kg || !z) {
|
|
27872
27884
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27873
27885
|
return;
|
|
27874
27886
|
}
|
|
27875
27887
|
try {
|
|
27876
|
-
let n =
|
|
27888
|
+
let n = Kg.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27877
27889
|
if (!r) {
|
|
27878
27890
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27879
27891
|
return;
|
|
@@ -27883,8 +27895,8 @@ var UIStateManager = class {
|
|
|
27883
27895
|
} catch (e) {
|
|
27884
27896
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27885
27897
|
}
|
|
27886
|
-
},
|
|
27887
|
-
if (!
|
|
27898
|
+
}, Ag = async (e) => {
|
|
27899
|
+
if (!Kg || !z) {
|
|
27888
27900
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27889
27901
|
return;
|
|
27890
27902
|
}
|
|
@@ -27894,21 +27906,21 @@ var UIStateManager = class {
|
|
|
27894
27906
|
return;
|
|
27895
27907
|
}
|
|
27896
27908
|
try {
|
|
27897
|
-
await
|
|
27909
|
+
await Kg.regenerateFromAIMessages(e, n), g_();
|
|
27898
27910
|
} catch (e) {
|
|
27899
27911
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27900
27912
|
}
|
|
27901
27913
|
}, $ = async (e, n) => {
|
|
27902
27914
|
if (e.id === "delete") {
|
|
27903
|
-
await
|
|
27915
|
+
await Ig(n);
|
|
27904
27916
|
return;
|
|
27905
27917
|
}
|
|
27906
27918
|
if (e.id === "cite") {
|
|
27907
|
-
|
|
27919
|
+
Xg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), N_();
|
|
27908
27920
|
return;
|
|
27909
27921
|
}
|
|
27910
27922
|
console.log("handleUserAction", e, n);
|
|
27911
|
-
},
|
|
27923
|
+
}, Mg = async (e, n, r) => {
|
|
27912
27924
|
if (!z) {
|
|
27913
27925
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27914
27926
|
return;
|
|
@@ -27924,12 +27936,12 @@ var UIStateManager = class {
|
|
|
27924
27936
|
return;
|
|
27925
27937
|
}
|
|
27926
27938
|
try {
|
|
27927
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
27939
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), g_();
|
|
27928
27940
|
} catch (e) {
|
|
27929
27941
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27930
27942
|
}
|
|
27931
|
-
},
|
|
27932
|
-
if (!
|
|
27943
|
+
}, Ng = async (e, n) => {
|
|
27944
|
+
if (!Kg || !z) {
|
|
27933
27945
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27934
27946
|
return;
|
|
27935
27947
|
}
|
|
@@ -27944,26 +27956,26 @@ var UIStateManager = class {
|
|
|
27944
27956
|
return;
|
|
27945
27957
|
}
|
|
27946
27958
|
try {
|
|
27947
|
-
let a =
|
|
27959
|
+
let a = Fg(e);
|
|
27948
27960
|
if (!a) {
|
|
27949
27961
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27950
27962
|
return;
|
|
27951
27963
|
}
|
|
27952
|
-
let o =
|
|
27953
|
-
await
|
|
27964
|
+
let o = O_(a, n), s = String(n.input ?? "");
|
|
27965
|
+
await Kg.resendMessageWithProperty(String(i), r, s, o), g_();
|
|
27954
27966
|
} catch (e) {
|
|
27955
27967
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27956
27968
|
}
|
|
27957
|
-
},
|
|
27969
|
+
}, Fg = (e) => {
|
|
27958
27970
|
let n = e.property?.extra;
|
|
27959
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27960
|
-
},
|
|
27961
|
-
if (!
|
|
27971
|
+
return n?.shortcut ? n.shortcut : n?.command ? h_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27972
|
+
}, Ig = async (e) => {
|
|
27973
|
+
if (!Kg || !z) {
|
|
27962
27974
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27963
27975
|
return;
|
|
27964
27976
|
}
|
|
27965
27977
|
try {
|
|
27966
|
-
let n =
|
|
27978
|
+
let n = Kg.messages.value, r = n.findIndex((n) => n === e);
|
|
27967
27979
|
if (r === -1) {
|
|
27968
27980
|
console.error("[ChatBot] User message not found in messages list");
|
|
27969
27981
|
return;
|
|
@@ -27979,29 +27991,31 @@ var UIStateManager = class {
|
|
|
27979
27991
|
} catch (e) {
|
|
27980
27992
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27981
27993
|
}
|
|
27982
|
-
},
|
|
27994
|
+
}, Rg = async () => {
|
|
27983
27995
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27984
|
-
},
|
|
27996
|
+
}, Vg = !i.chatHelper, Ug = computed(() => Vg ? E.value : i.enableSelection), Wg = computed(() => Vg ? k.value : i.shareLoading), Gg = z ? new SessionBusinessManager(z.session, z.agent, null, {
|
|
27985
27997
|
enableChatSession: !0,
|
|
27986
27998
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27987
27999
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27988
28000
|
initialSessionCode: i.sessionCode
|
|
27989
|
-
}) : null,
|
|
28001
|
+
}) : null, Kg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
27990
28002
|
openingRemark: i.helloText,
|
|
27991
28003
|
predefinedQuestions: i.prompts,
|
|
27992
28004
|
placeholder: i.placeholder
|
|
27993
|
-
}) : null,
|
|
28005
|
+
}) : null, qg = new ShortcutManager(null, i.shortcuts || []), Yg = shallowRef([[]]), Xg = ref(""), Zg = shallowRef([]), Qg = (e, n) => {
|
|
28006
|
+
Yg.value = e, Zg.value = n;
|
|
28007
|
+
}, $g = computed(() => Kg?.messages.value ?? []), e_ = computed(() => Kg?.isMessagesLoading.value ?? !1), t_ = computed(() => Kg?.isGenerating.value ?? !1), n_ = computed(() => Gg?.currentSession.value ?? null), r_ = computed(() => Vg && !j.value ? !1 : !e_.value && $g.value.length === 0), i_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), a_ = computed(() => i.resources?.length ? i.resources : mapResourcesToSlashItems(z?.agent.info.value?.resources)), o_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), s_ = computed(() => ({
|
|
27994
28008
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27995
28009
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27996
|
-
})),
|
|
27997
|
-
let e =
|
|
28010
|
+
})), u_ = computed(() => {
|
|
28011
|
+
let e = qg.shortcuts.value;
|
|
27998
28012
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27999
|
-
}),
|
|
28000
|
-
m.value = [],
|
|
28001
|
-
},
|
|
28013
|
+
}), d_ = () => {
|
|
28014
|
+
m.value = [], Vg && (E.value = !1), a("cancel-share");
|
|
28015
|
+
}, f_ = async () => {
|
|
28002
28016
|
let e = m.value;
|
|
28003
|
-
|
|
28004
|
-
},
|
|
28017
|
+
Vg && await p_(e), a("confirm-share", e);
|
|
28018
|
+
}, p_ = async (e) => {
|
|
28005
28019
|
if (!z || e.length === 0) return;
|
|
28006
28020
|
let n = z.session.current?.value?.sessionCode;
|
|
28007
28021
|
if (!n) {
|
|
@@ -28023,42 +28037,42 @@ var UIStateManager = class {
|
|
|
28023
28037
|
} finally {
|
|
28024
28038
|
k.value = !1, E.value = !1, m.value = [];
|
|
28025
28039
|
}
|
|
28026
|
-
},
|
|
28027
|
-
e ? m.value =
|
|
28028
|
-
},
|
|
28040
|
+
}, m_ = (e) => {
|
|
28041
|
+
e ? m.value = $g.value : m.value = [];
|
|
28042
|
+
}, h_ = qg.effectiveShortcuts;
|
|
28029
28043
|
watch(() => i.shortcuts, (e) => {
|
|
28030
|
-
|
|
28044
|
+
qg.setShortcuts(e || []);
|
|
28031
28045
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
28032
|
-
e &&
|
|
28046
|
+
e && qg.setAgentShortcuts(e);
|
|
28033
28047
|
}, { immediate: !0 });
|
|
28034
|
-
let
|
|
28048
|
+
let g_ = async () => {
|
|
28035
28049
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
28036
|
-
},
|
|
28037
|
-
if (!
|
|
28050
|
+
}, __ = async (e, n = {}) => {
|
|
28051
|
+
if (!Kg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
28038
28052
|
let r = z.session.current?.value?.sessionCode;
|
|
28039
28053
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
28040
|
-
|
|
28041
|
-
},
|
|
28054
|
+
Yg.value = [[]], Xg.value = "", Zg.value = [], a("send-message", typeof e == "string" ? e : ""), await Kg.sendMessage(e, r, n);
|
|
28055
|
+
}, y_ = async (e) => {
|
|
28042
28056
|
let n = z?.session.current?.value?.sessionCode;
|
|
28043
28057
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
28044
28058
|
let r = await z.session.uploadFile(n, e);
|
|
28045
28059
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
28046
28060
|
return r;
|
|
28047
|
-
},
|
|
28061
|
+
}, x_ = async (e, n) => {
|
|
28048
28062
|
try {
|
|
28049
28063
|
let n = {};
|
|
28050
|
-
|
|
28064
|
+
Xg.value && (n.cite = Xg.value), u.value && (n.command = u.value.id), Zg.value.length && (n.resources = Zg.value), await __(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
28051
28065
|
} catch (e) {
|
|
28052
28066
|
console.error("Failed to send message:", e), a("error", e);
|
|
28053
28067
|
}
|
|
28054
|
-
},
|
|
28055
|
-
|
|
28056
|
-
},
|
|
28057
|
-
|
|
28068
|
+
}, w_ = async () => {
|
|
28069
|
+
A_();
|
|
28070
|
+
}, T_ = (e, n) => {
|
|
28071
|
+
E_(e, n), a("shortcut-click", {
|
|
28058
28072
|
shortcut: e,
|
|
28059
28073
|
source: "main"
|
|
28060
28074
|
});
|
|
28061
|
-
},
|
|
28075
|
+
}, E_ = (e, n) => {
|
|
28062
28076
|
let r = e, i;
|
|
28063
28077
|
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
28078
|
let e = r.components?.map((e) => e.key === i ? {
|
|
@@ -28080,9 +28094,9 @@ var UIStateManager = class {
|
|
|
28080
28094
|
...r,
|
|
28081
28095
|
formModel: { ...r.formModel }
|
|
28082
28096
|
};
|
|
28083
|
-
},
|
|
28097
|
+
}, D_ = () => {
|
|
28084
28098
|
u.value = null;
|
|
28085
|
-
},
|
|
28099
|
+
}, O_ = (e, n) => {
|
|
28086
28100
|
let r = e.components || [];
|
|
28087
28101
|
return { extra: {
|
|
28088
28102
|
cite: {
|
|
@@ -28102,42 +28116,42 @@ var UIStateManager = class {
|
|
|
28102
28116
|
__value: n[e.key]
|
|
28103
28117
|
}))
|
|
28104
28118
|
} };
|
|
28105
|
-
},
|
|
28119
|
+
}, k_ = async (e) => {
|
|
28106
28120
|
if (!u.value) {
|
|
28107
28121
|
console.error("[ChatBot] No selected shortcut");
|
|
28108
28122
|
return;
|
|
28109
28123
|
}
|
|
28110
|
-
let n =
|
|
28111
|
-
|
|
28124
|
+
let n = O_(u.value, e), r = u.value.name, i = u.value;
|
|
28125
|
+
D_();
|
|
28112
28126
|
try {
|
|
28113
|
-
await
|
|
28127
|
+
await __(r, { property: n });
|
|
28114
28128
|
} catch (e) {
|
|
28115
28129
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
28116
28130
|
}
|
|
28117
|
-
},
|
|
28118
|
-
if (!
|
|
28131
|
+
}, A_ = () => {
|
|
28132
|
+
if (!Kg) {
|
|
28119
28133
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
28120
28134
|
return;
|
|
28121
28135
|
}
|
|
28122
|
-
|
|
28123
|
-
},
|
|
28124
|
-
if (!
|
|
28136
|
+
Kg.stopGeneration(), a("stop");
|
|
28137
|
+
}, j_ = async (e) => {
|
|
28138
|
+
if (!Gg) {
|
|
28125
28139
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
28126
28140
|
return;
|
|
28127
28141
|
}
|
|
28128
28142
|
try {
|
|
28129
|
-
await
|
|
28143
|
+
await Gg.switchSession(e), a("session-switched", Gg.currentSession.value);
|
|
28130
28144
|
} catch (e) {
|
|
28131
28145
|
console.error("Failed to switch session:", e), a("error", e);
|
|
28132
28146
|
}
|
|
28133
|
-
},
|
|
28134
|
-
|
|
28135
|
-
},
|
|
28147
|
+
}, M_ = (e) => {
|
|
28148
|
+
Xg.value = e;
|
|
28149
|
+
}, N_ = () => {
|
|
28136
28150
|
l.value?.focus?.();
|
|
28137
28151
|
};
|
|
28138
28152
|
return onMounted(async () => {
|
|
28139
28153
|
if (!(!z || I.value)) try {
|
|
28140
|
-
if (
|
|
28154
|
+
if (Vg) {
|
|
28141
28155
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
28142
28156
|
else if (z.session.list.value.length > 0) {
|
|
28143
28157
|
let e = z.session.list.value[0];
|
|
@@ -28150,46 +28164,46 @@ var UIStateManager = class {
|
|
|
28150
28164
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
28151
28165
|
}
|
|
28152
28166
|
}), onBeforeUnmount(() => {
|
|
28153
|
-
|
|
28167
|
+
Vg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
28154
28168
|
}), n({
|
|
28155
|
-
sendMessage: (e) =>
|
|
28156
|
-
stopGeneration:
|
|
28157
|
-
switchSession:
|
|
28158
|
-
messages:
|
|
28159
|
-
currentSession:
|
|
28160
|
-
isGenerating:
|
|
28169
|
+
sendMessage: (e) => x_(e, [[]]),
|
|
28170
|
+
stopGeneration: A_,
|
|
28171
|
+
switchSession: j_,
|
|
28172
|
+
messages: $g,
|
|
28173
|
+
currentSession: n_,
|
|
28174
|
+
isGenerating: t_,
|
|
28161
28175
|
getChatHelper: () => z,
|
|
28162
|
-
setCiteText:
|
|
28163
|
-
focusInput:
|
|
28176
|
+
setCiteText: M_,
|
|
28177
|
+
focusInput: N_,
|
|
28164
28178
|
selectShortcut: (e, n) => {
|
|
28165
|
-
|
|
28179
|
+
E_(e, n);
|
|
28166
28180
|
}
|
|
28167
28181
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
28168
28182
|
class: normalizeClass([
|
|
28169
28183
|
"ai-chatbot",
|
|
28170
28184
|
i.extCls,
|
|
28171
|
-
{ "welcome-state":
|
|
28185
|
+
{ "welcome-state": r_.value }
|
|
28172
28186
|
]),
|
|
28173
|
-
style: normalizeStyle(
|
|
28174
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
28187
|
+
style: normalizeStyle(s_.value)
|
|
28188
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : Vg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
28175
28189
|
mode: "spin",
|
|
28176
28190
|
size: "small",
|
|
28177
28191
|
theme: "primary"
|
|
28178
28192
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
28179
28193
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
28180
|
-
|
|
28181
|
-
n[
|
|
28194
|
+
r_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [
|
|
28195
|
+
n[2] ||= createElementVNode("img", {
|
|
28182
28196
|
alt: "ai-blueking",
|
|
28183
28197
|
class: "welcome-banner",
|
|
28184
28198
|
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
28199
|
}, null, -1),
|
|
28186
|
-
n[
|
|
28187
|
-
|
|
28200
|
+
n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
|
|
28201
|
+
i_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: i_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
|
|
28188
28202
|
])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28189
28203
|
ref_key: "messagesContainerRef",
|
|
28190
28204
|
ref: s,
|
|
28191
28205
|
class: "chatbot-messages"
|
|
28192
|
-
}, [
|
|
28206
|
+
}, [e_.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28193
28207
|
mode: "spin",
|
|
28194
28208
|
size: "small",
|
|
28195
28209
|
theme: "primary"
|
|
@@ -28197,17 +28211,17 @@ var UIStateManager = class {
|
|
|
28197
28211
|
key: 1,
|
|
28198
28212
|
"selected-messages": m.value,
|
|
28199
28213
|
"onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
|
|
28200
|
-
"enable-selection":
|
|
28214
|
+
"enable-selection": Ug.value,
|
|
28201
28215
|
"message-status": B.value,
|
|
28202
28216
|
"message-tools-status": H.value,
|
|
28203
28217
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28204
|
-
messages:
|
|
28218
|
+
messages: $g.value,
|
|
28205
28219
|
"on-agent-action": G,
|
|
28206
28220
|
"on-agent-feedback": K,
|
|
28207
28221
|
"on-user-action": $,
|
|
28208
|
-
"on-user-input-confirm":
|
|
28209
|
-
"on-user-shortcut-confirm":
|
|
28210
|
-
onStopStreaming:
|
|
28222
|
+
"on-user-input-confirm": Mg,
|
|
28223
|
+
"on-user-shortcut-confirm": Ng,
|
|
28224
|
+
onStopStreaming: Rg
|
|
28211
28225
|
}, null, 8, [
|
|
28212
28226
|
"selected-messages",
|
|
28213
28227
|
"enable-selection",
|
|
@@ -28217,43 +28231,43 @@ var UIStateManager = class {
|
|
|
28217
28231
|
"messages"
|
|
28218
28232
|
]))], 512)], 2112)),
|
|
28219
28233
|
createCommentVNode(" 统一底部区域 "),
|
|
28220
|
-
!
|
|
28234
|
+
!r_.value && Ug.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28221
28235
|
key: 2,
|
|
28222
|
-
"is-all-selected": m.value.length ===
|
|
28223
|
-
loading:
|
|
28236
|
+
"is-all-selected": m.value.length === $g.value.length,
|
|
28237
|
+
loading: Wg.value,
|
|
28224
28238
|
"selected-count": m.value.length,
|
|
28225
|
-
onCancel:
|
|
28226
|
-
onConfirm:
|
|
28227
|
-
onToggleAll:
|
|
28239
|
+
onCancel: d_,
|
|
28240
|
+
onConfirm: f_,
|
|
28241
|
+
onToggleAll: m_
|
|
28228
28242
|
}, null, 8, [
|
|
28229
28243
|
"is-all-selected",
|
|
28230
28244
|
"loading",
|
|
28231
28245
|
"selected-count"
|
|
28232
28246
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28233
|
-
onClose:
|
|
28234
|
-
onSubmit:
|
|
28247
|
+
onClose: D_,
|
|
28248
|
+
onSubmit: k_
|
|
28235
28249
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28236
28250
|
ref_key: "chatInputRef",
|
|
28237
28251
|
ref: l,
|
|
28238
|
-
|
|
28239
|
-
"onUpdate:
|
|
28240
|
-
cite: Zg.value,
|
|
28241
|
-
"onUpdate:cite": n[2] ||= (e) => Zg.value = e,
|
|
28252
|
+
cite: Xg.value,
|
|
28253
|
+
"onUpdate:cite": n[1] ||= (e) => Xg.value = e,
|
|
28242
28254
|
"message-status": B.value,
|
|
28243
|
-
"
|
|
28244
|
-
"on-
|
|
28245
|
-
"on-
|
|
28255
|
+
"model-value": Yg.value,
|
|
28256
|
+
"on-send-message": x_,
|
|
28257
|
+
"on-stop-sending": w_,
|
|
28258
|
+
"on-upload": y_,
|
|
28246
28259
|
placeholder: i.placeholder,
|
|
28247
|
-
prompts:
|
|
28248
|
-
resources:
|
|
28260
|
+
prompts: o_.value,
|
|
28261
|
+
resources: a_.value,
|
|
28249
28262
|
"shortcut-id": u.value?.id,
|
|
28250
|
-
shortcuts:
|
|
28251
|
-
onDeleteShortcut:
|
|
28252
|
-
onSelectShortcut:
|
|
28263
|
+
shortcuts: u_.value,
|
|
28264
|
+
onDeleteShortcut: D_,
|
|
28265
|
+
onSelectShortcut: T_,
|
|
28266
|
+
"onUpdate:modelValue": Qg
|
|
28253
28267
|
}, null, 8, [
|
|
28254
|
-
"modelValue",
|
|
28255
28268
|
"cite",
|
|
28256
28269
|
"message-status",
|
|
28270
|
+
"model-value",
|
|
28257
28271
|
"placeholder",
|
|
28258
28272
|
"prompts",
|
|
28259
28273
|
"resources",
|
|
@@ -29050,7 +29064,7 @@ function useDraggable(e = {}, n) {
|
|
|
29050
29064
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
29051
29065
|
}, q = (e, n) => {
|
|
29052
29066
|
v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
|
|
29053
|
-
},
|
|
29067
|
+
}, Dg = (e, n) => {
|
|
29054
29068
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
29055
29069
|
};
|
|
29056
29070
|
return onMounted(() => {
|
|
@@ -29072,13 +29086,13 @@ function useDraggable(e = {}, n) {
|
|
|
29072
29086
|
handleResizeStop: H,
|
|
29073
29087
|
toggleCompression: K,
|
|
29074
29088
|
updatePosition: q,
|
|
29075
|
-
updateSize:
|
|
29089
|
+
updateSize: Dg,
|
|
29076
29090
|
updatePositionAndSize: (e, n, r, i) => {
|
|
29077
|
-
q(e, n),
|
|
29091
|
+
q(e, n), Dg(r, i);
|
|
29078
29092
|
}
|
|
29079
29093
|
};
|
|
29080
29094
|
}
|
|
29081
|
-
var _hoisted_1$
|
|
29095
|
+
var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
29082
29096
|
__name: "draggable-container",
|
|
29083
29097
|
props: {
|
|
29084
29098
|
visible: {
|
|
@@ -29146,11 +29160,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29146
29160
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29147
29161
|
e.style.pointerEvents = "";
|
|
29148
29162
|
});
|
|
29149
|
-
},
|
|
29163
|
+
}, Og = (e, n) => {
|
|
29150
29164
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29151
|
-
},
|
|
29165
|
+
}, kg = (e, n, r, i) => {
|
|
29152
29166
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29153
|
-
},
|
|
29167
|
+
}, Ag = (e, n) => {
|
|
29154
29168
|
I(e, n), o.value = !1, Z();
|
|
29155
29169
|
}, $ = (e, n, r, i) => {
|
|
29156
29170
|
L(e, n, r, i), o.value = !1, Z();
|
|
@@ -29182,12 +29196,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29182
29196
|
w: unref(v),
|
|
29183
29197
|
x: unref(_),
|
|
29184
29198
|
y: unref(m),
|
|
29185
|
-
onDragStop:
|
|
29186
|
-
onDragging:
|
|
29199
|
+
onDragStop: Ag,
|
|
29200
|
+
onDragging: Og,
|
|
29187
29201
|
onResizeStop: $,
|
|
29188
|
-
onResizing:
|
|
29202
|
+
onResizing: kg
|
|
29189
29203
|
}, {
|
|
29190
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
29204
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
29191
29205
|
_: 3
|
|
29192
29206
|
}, 8, [
|
|
29193
29207
|
"active",
|
|
@@ -29205,7 +29219,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29205
29219
|
"y"
|
|
29206
29220
|
])), [[vShow, i.visible]]);
|
|
29207
29221
|
}
|
|
29208
|
-
}), [["__scopeId", "data-v-de563c20"]]), _hoisted_1
|
|
29222
|
+
}), [["__scopeId", "data-v-de563c20"]]), _hoisted_1 = { class: "nimbus-bkai-wrapper" }, _hoisted_2 = [
|
|
29209
29223
|
"width",
|
|
29210
29224
|
"height",
|
|
29211
29225
|
"src"
|
|
@@ -29307,7 +29321,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29307
29321
|
onMouseenter: r[3] ||= (...e) => unref(k) && unref(k)(...e),
|
|
29308
29322
|
onMouseleave: r[4] ||= (...e) => unref(j) && unref(j)(...e),
|
|
29309
29323
|
onMouseup: r[5] ||= (...e) => unref(L) && unref(L)(...e)
|
|
29310
|
-
}, [createElementVNode("div", _hoisted_1
|
|
29324
|
+
}, [createElementVNode("div", _hoisted_1, [createElementVNode("img", {
|
|
29311
29325
|
width: o.value.img,
|
|
29312
29326
|
height: o.value.img,
|
|
29313
29327
|
src: unref(avatar_default),
|
|
@@ -29328,7 +29342,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29328
29342
|
"onDragging"
|
|
29329
29343
|
]));
|
|
29330
29344
|
}
|
|
29331
|
-
}), [["__scopeId", "data-v-26b6f3ea"]]),
|
|
29345
|
+
}), [["__scopeId", "data-v-26b6f3ea"]]), ai_blueking_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
29332
29346
|
__name: "ai-blueking",
|
|
29333
29347
|
props: /* @__PURE__ */ mergeDefaults({
|
|
29334
29348
|
autoSwitchToInitialSession: { type: Boolean },
|
|
@@ -29428,12 +29442,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29428
29442
|
}), K = I, q = new SessionBusinessManager(K.session, K.agent, null, {
|
|
29429
29443
|
enableChatSession: i.enableChatSession,
|
|
29430
29444
|
initialSessionCode: i.initialSessionCode
|
|
29431
|
-
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value),
|
|
29445
|
+
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Ag = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), Mg = ref(!1), Ng = ref(""), Fg = { appendTo: (e) => {
|
|
29432
29446
|
let n = e.closest(".draggable-container-content");
|
|
29433
29447
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29434
|
-
} },
|
|
29448
|
+
} }, Ig = computed(() => m.isCompressed.value), Lg = computed(() => B.value), Rg = ref(""), zg = ref(!0), Bg = ref(!1), Vg = computed(() => i.resources?.length ? i.resources : mapResourcesToSlashItems(z.value?.resources)), Ug = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Wg = computed(() => {
|
|
29435
29449
|
let e = $.effectiveShortcuts.value;
|
|
29436
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29450
|
+
return typeof i.shortcutFilter == "function" && Ng.value ? e.filter((e) => i.shortcutFilter?.(e, Ng.value)) : e;
|
|
29437
29451
|
});
|
|
29438
29452
|
watch(() => L.value, async (e) => {
|
|
29439
29453
|
if (e && z.value) {
|
|
@@ -29453,52 +29467,52 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29453
29467
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29454
29468
|
$.setShortcuts(e || []);
|
|
29455
29469
|
}, { immediate: !0 }), watch(() => G.value, (e) => {
|
|
29456
|
-
e && (
|
|
29470
|
+
e && (Rg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29457
29471
|
}, { immediate: !0 }), watch(() => K.message.list.value.length, (e) => {
|
|
29458
|
-
e > 0 && (
|
|
29472
|
+
e > 0 && (Bg.value = !0);
|
|
29459
29473
|
});
|
|
29460
|
-
let
|
|
29474
|
+
let Gg = async (e) => {
|
|
29461
29475
|
m.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29462
|
-
},
|
|
29463
|
-
await
|
|
29464
|
-
},
|
|
29476
|
+
}, Kg = async (e) => {
|
|
29477
|
+
await Gg(e);
|
|
29478
|
+
}, qg = () => {
|
|
29465
29479
|
m.hidePanel();
|
|
29480
|
+
}, Yg = () => {
|
|
29481
|
+
qg();
|
|
29466
29482
|
}, Xg = () => {
|
|
29467
|
-
Jg();
|
|
29468
|
-
}, Zg = () => {
|
|
29469
29483
|
m.handleNimbusClick();
|
|
29470
|
-
},
|
|
29471
|
-
|
|
29472
|
-
},
|
|
29473
|
-
|
|
29484
|
+
}, Qg = (e) => {
|
|
29485
|
+
Ng.value = e;
|
|
29486
|
+
}, $g = async (e, n) => {
|
|
29487
|
+
Mg.value = !1, await Gg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29474
29488
|
shortcut: e,
|
|
29475
29489
|
source: "popup"
|
|
29476
29490
|
});
|
|
29477
|
-
},
|
|
29491
|
+
}, e_ = (e) => {
|
|
29478
29492
|
k("shortcut-click", e);
|
|
29479
|
-
},
|
|
29493
|
+
}, t_ = (e) => {
|
|
29480
29494
|
m.handleDragging(e);
|
|
29481
|
-
},
|
|
29495
|
+
}, n_ = (e) => {
|
|
29482
29496
|
m.handleResizing(e);
|
|
29483
|
-
},
|
|
29497
|
+
}, r_ = (e) => {
|
|
29484
29498
|
m.handleDragStop(e);
|
|
29485
|
-
},
|
|
29499
|
+
}, i_ = (e) => {
|
|
29486
29500
|
m.handleResizeStop(e);
|
|
29487
|
-
},
|
|
29501
|
+
}, a_ = () => {
|
|
29488
29502
|
m.container.toggleCompression();
|
|
29489
|
-
},
|
|
29503
|
+
}, o_ = (e) => {
|
|
29490
29504
|
m.setCompressed(e);
|
|
29491
|
-
},
|
|
29505
|
+
}, s_ = async () => {
|
|
29492
29506
|
j.newChat();
|
|
29493
|
-
},
|
|
29507
|
+
}, c_ = (e) => {
|
|
29494
29508
|
j.historyClick(e);
|
|
29495
|
-
},
|
|
29509
|
+
}, u_ = async (e) => {
|
|
29496
29510
|
await q.switchSession(e);
|
|
29497
|
-
},
|
|
29511
|
+
}, d_ = async (e) => {
|
|
29498
29512
|
await q.deleteSession(e);
|
|
29499
|
-
},
|
|
29513
|
+
}, f_ = async (e, n) => {
|
|
29500
29514
|
await q.updateSessionName(e, n);
|
|
29501
|
-
},
|
|
29515
|
+
}, p_ = async () => {
|
|
29502
29516
|
let e = K.session.current?.value?.sessionCode;
|
|
29503
29517
|
if (!e) {
|
|
29504
29518
|
console.error("[AIBlueking] Cannot auto-generate name: no active session");
|
|
@@ -29507,14 +29521,14 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29507
29521
|
try {
|
|
29508
29522
|
await K.session.renameSession(e);
|
|
29509
29523
|
let n = K.session.list.value.find((n) => n.sessionCode === e);
|
|
29510
|
-
n && (
|
|
29524
|
+
n && (Rg.value = n.sessionName || "");
|
|
29511
29525
|
} catch (e) {
|
|
29512
|
-
console.error("[AIBlueking] Failed to auto-generate session name:", e),
|
|
29526
|
+
console.error("[AIBlueking] Failed to auto-generate session name:", e), A_(e);
|
|
29513
29527
|
}
|
|
29514
29528
|
j.autoGenerateName();
|
|
29515
|
-
},
|
|
29529
|
+
}, m_ = () => {
|
|
29516
29530
|
j.helpClick();
|
|
29517
|
-
},
|
|
29531
|
+
}, h_ = async (e) => {
|
|
29518
29532
|
let n = K.session.current?.value;
|
|
29519
29533
|
if (!n) {
|
|
29520
29534
|
console.error("[AIBlueking] Cannot rename: no active session");
|
|
@@ -29524,17 +29538,17 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29524
29538
|
await K.session.updateSession({
|
|
29525
29539
|
...n,
|
|
29526
29540
|
sessionName: e
|
|
29527
|
-
}),
|
|
29541
|
+
}), Rg.value = e;
|
|
29528
29542
|
} catch (e) {
|
|
29529
|
-
console.error("[AIBlueking] Failed to rename session:", e),
|
|
29543
|
+
console.error("[AIBlueking] Failed to rename session:", e), A_(e);
|
|
29530
29544
|
}
|
|
29531
29545
|
j.rename(e);
|
|
29532
|
-
},
|
|
29546
|
+
}, g_ = () => {
|
|
29533
29547
|
Z.enableSelectionMode(), j.share();
|
|
29534
|
-
},
|
|
29548
|
+
}, __ = () => {
|
|
29535
29549
|
Z.disableSelectionMode();
|
|
29536
|
-
},
|
|
29537
|
-
|
|
29550
|
+
}, v_ = async (e) => {
|
|
29551
|
+
Ag.value = !0;
|
|
29538
29552
|
try {
|
|
29539
29553
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
29540
29554
|
await copyToClipboard(n), Message({
|
|
@@ -29542,74 +29556,75 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29542
29556
|
theme: "success"
|
|
29543
29557
|
}), Z.disableSelectionMode(), j.shareMessages(r);
|
|
29544
29558
|
} catch (e) {
|
|
29545
|
-
console.error("[AIBlueking] Failed to share messages:", e),
|
|
29559
|
+
console.error("[AIBlueking] Failed to share messages:", e), A_(e);
|
|
29546
29560
|
} finally {
|
|
29547
|
-
|
|
29561
|
+
Ag.value = !1;
|
|
29548
29562
|
}
|
|
29549
|
-
},
|
|
29563
|
+
}, y_ = async (e) => {
|
|
29550
29564
|
l.value && await l.value.sendMessage(e);
|
|
29551
|
-
},
|
|
29552
|
-
|
|
29553
|
-
},
|
|
29565
|
+
}, b_ = (e) => {
|
|
29566
|
+
Bg.value = !0, j.sendMessage(e);
|
|
29567
|
+
}, x_ = () => {
|
|
29554
29568
|
j.receiveStart();
|
|
29555
|
-
},
|
|
29569
|
+
}, S_ = () => {
|
|
29556
29570
|
j.receiveText();
|
|
29557
|
-
},
|
|
29571
|
+
}, C_ = () => {
|
|
29558
29572
|
j.receiveEnd();
|
|
29559
|
-
},
|
|
29573
|
+
}, w_ = () => {
|
|
29560
29574
|
j.stop();
|
|
29561
|
-
},
|
|
29575
|
+
}, T_ = () => {
|
|
29562
29576
|
l.value && l.value.stopGeneration();
|
|
29563
|
-
},
|
|
29577
|
+
}, E_ = async (e) => {
|
|
29564
29578
|
e ? await q.createSession({ sessionCode: e }) : await q.createNewSession();
|
|
29565
|
-
},
|
|
29579
|
+
}, D_ = async (e) => {
|
|
29566
29580
|
l.value && await l.value.switchSession(e);
|
|
29567
|
-
},
|
|
29581
|
+
}, O_ = async (e, n) => {
|
|
29568
29582
|
try {
|
|
29569
|
-
await q.updateSessionName(e, n),
|
|
29583
|
+
await q.updateSessionName(e, n), Rg.value = n;
|
|
29570
29584
|
} catch (e) {
|
|
29571
|
-
console.error("[AIBlueking] Failed to update session name:", e),
|
|
29585
|
+
console.error("[AIBlueking] Failed to update session name:", e), A_(e);
|
|
29572
29586
|
}
|
|
29587
|
+
}, k_ = (e) => {
|
|
29588
|
+
e && (Rg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
|
|
29573
29589
|
}, A_ = (e) => {
|
|
29574
|
-
e && (zg.value = e.sessionName || "", Vg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
|
|
29575
|
-
}, j_ = (e) => {
|
|
29576
29590
|
console.error("ChatBot error:", e), m.emitInternal("sdk-error", {
|
|
29577
29591
|
apiName: "chat",
|
|
29578
29592
|
code: -1,
|
|
29579
29593
|
message: e.message,
|
|
29580
29594
|
data: e
|
|
29581
29595
|
});
|
|
29582
|
-
},
|
|
29596
|
+
}, j_ = (e, n) => {
|
|
29583
29597
|
m.container.updatePosition(e, n);
|
|
29584
|
-
},
|
|
29598
|
+
}, M_ = (e, n) => {
|
|
29585
29599
|
m.container.updateSize(e, n);
|
|
29586
|
-
},
|
|
29600
|
+
}, N_ = (e, n, r, i) => {
|
|
29587
29601
|
m.container.updatePositionAndSize(e, n, r, i);
|
|
29588
|
-
},
|
|
29602
|
+
}, P_ = (e) => {
|
|
29589
29603
|
l.value && l.value.setCiteText(e);
|
|
29590
|
-
},
|
|
29604
|
+
}, F_ = () => {
|
|
29591
29605
|
l.value && l.value.focusInput();
|
|
29592
|
-
},
|
|
29593
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ?
|
|
29606
|
+
}, I_ = (e) => {
|
|
29607
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? qg() : Gg());
|
|
29594
29608
|
};
|
|
29595
29609
|
return onMounted(async () => {
|
|
29596
|
-
o.value && m.setContainerRef(o.value), window.addEventListener("keydown",
|
|
29610
|
+
o.value && m.setContainerRef(o.value), window.addEventListener("keydown", I_);
|
|
29597
29611
|
}), onBeforeUnmount(() => {
|
|
29598
|
-
window.removeEventListener("keydown",
|
|
29612
|
+
window.removeEventListener("keydown", I_), m.destroy();
|
|
29599
29613
|
}), n({
|
|
29600
|
-
show:
|
|
29601
|
-
handleShow:
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
29608
|
-
|
|
29609
|
-
|
|
29610
|
-
|
|
29611
|
-
|
|
29612
|
-
|
|
29614
|
+
show: Gg,
|
|
29615
|
+
handleShow: Kg,
|
|
29616
|
+
handleClose: Yg,
|
|
29617
|
+
hide: qg,
|
|
29618
|
+
sendMessage: y_,
|
|
29619
|
+
stopGeneration: T_,
|
|
29620
|
+
addNewSession: E_,
|
|
29621
|
+
switchToSession: D_,
|
|
29622
|
+
updateSessionName: O_,
|
|
29623
|
+
updatePosition: j_,
|
|
29624
|
+
updateSize: M_,
|
|
29625
|
+
updatePositionAndSize: N_,
|
|
29626
|
+
setCiteText: P_,
|
|
29627
|
+
focusInput: F_
|
|
29613
29628
|
}), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
|
|
29614
29629
|
createCommentVNode(" 可拖拽容器 "),
|
|
29615
29630
|
createVNode(unref(draggable_container_default), {
|
|
@@ -29625,42 +29640,42 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29625
29640
|
"max-width": i.maxWidth,
|
|
29626
29641
|
"max-width-percent": 80,
|
|
29627
29642
|
visible: unref(v),
|
|
29628
|
-
onCompressionChange:
|
|
29629
|
-
onDragStop:
|
|
29630
|
-
onDragging:
|
|
29631
|
-
onResizeStop:
|
|
29632
|
-
onResizing:
|
|
29643
|
+
onCompressionChange: o_,
|
|
29644
|
+
onDragStop: r_,
|
|
29645
|
+
onDragging: t_,
|
|
29646
|
+
onResizeStop: i_,
|
|
29647
|
+
onResizing: n_
|
|
29633
29648
|
}, {
|
|
29634
|
-
default: withCtx(() => [createElementVNode("div",
|
|
29649
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": Bg.value }]) }, [
|
|
29635
29650
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29636
29651
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29637
29652
|
key: 0,
|
|
29638
|
-
"agent-name":
|
|
29653
|
+
"agent-name": Lg.value,
|
|
29639
29654
|
"chat-helper": unref(K),
|
|
29640
29655
|
draggable: i.draggable,
|
|
29641
29656
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29642
29657
|
"enable-chat-session": i.enableChatSession,
|
|
29643
|
-
"has-permission":
|
|
29644
|
-
"has-session-contents":
|
|
29645
|
-
"is-compression-height":
|
|
29658
|
+
"has-permission": zg.value,
|
|
29659
|
+
"has-session-contents": Bg.value,
|
|
29660
|
+
"is-compression-height": Ig.value,
|
|
29646
29661
|
"session-business-manager": unref(q),
|
|
29647
|
-
"session-name":
|
|
29662
|
+
"session-name": Rg.value,
|
|
29648
29663
|
"show-compression-icon": i.showCompressionIcon,
|
|
29649
29664
|
"show-history-icon": i.showHistoryIcon,
|
|
29650
29665
|
"show-more-icon": i.showMoreIcon,
|
|
29651
29666
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29652
29667
|
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:
|
|
29668
|
+
onAutoGenerateName: p_,
|
|
29669
|
+
onClose: Yg,
|
|
29670
|
+
onHelpClick: m_,
|
|
29671
|
+
onHistoryClick: c_,
|
|
29672
|
+
onHistorySessionDelete: d_,
|
|
29673
|
+
onHistorySessionRename: f_,
|
|
29674
|
+
onHistorySessionSwitch: u_,
|
|
29675
|
+
onNewChat: s_,
|
|
29676
|
+
onRename: h_,
|
|
29677
|
+
onShare: g_,
|
|
29678
|
+
onToggleCompression: a_
|
|
29664
29679
|
}, null, 8, [
|
|
29665
29680
|
"agent-name",
|
|
29666
29681
|
"chat-helper",
|
|
@@ -29686,27 +29701,27 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29686
29701
|
"chat-helper": unref(K),
|
|
29687
29702
|
"enable-selection": Q.value,
|
|
29688
29703
|
"hello-text": i.helloText,
|
|
29689
|
-
"message-tools-tippy-options":
|
|
29704
|
+
"message-tools-tippy-options": Fg,
|
|
29690
29705
|
placeholder: i.placeholder,
|
|
29691
|
-
prompts:
|
|
29706
|
+
prompts: Ug.value,
|
|
29692
29707
|
"request-options": i.requestOptions,
|
|
29693
|
-
resources:
|
|
29708
|
+
resources: Vg.value,
|
|
29694
29709
|
"session-code": i.initialSessionCode,
|
|
29695
|
-
"share-loading":
|
|
29710
|
+
"share-loading": Ag.value,
|
|
29696
29711
|
"shortcut-limit": i.shortcutLimit,
|
|
29697
29712
|
shortcuts: i.shortcuts,
|
|
29698
29713
|
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:
|
|
29714
|
+
onCancelShare: __,
|
|
29715
|
+
onConfirmShare: n[0] ||= (e) => v_(e),
|
|
29716
|
+
onError: n[1] ||= (e) => A_(e),
|
|
29717
|
+
onReceiveEnd: C_,
|
|
29718
|
+
onReceiveStart: x_,
|
|
29719
|
+
onReceiveText: S_,
|
|
29720
|
+
onRequestShare: g_,
|
|
29721
|
+
onSendMessage: n[2] ||= (e) => b_(e),
|
|
29722
|
+
onSessionSwitched: n[3] ||= (e) => k_(e),
|
|
29723
|
+
onShortcutClick: e_,
|
|
29724
|
+
onStop: w_
|
|
29710
29725
|
}, null, 8, [
|
|
29711
29726
|
"auto-load",
|
|
29712
29727
|
"chat-helper",
|
|
@@ -29722,7 +29737,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29722
29737
|
"shortcuts",
|
|
29723
29738
|
"url"
|
|
29724
29739
|
])
|
|
29725
|
-
])]),
|
|
29740
|
+
], 2)]),
|
|
29726
29741
|
_: 1
|
|
29727
29742
|
}, 8, [
|
|
29728
29743
|
"compressed-padding",
|
|
@@ -29743,7 +29758,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29743
29758
|
"onUpdate:isPanelShow": n[5] ||= (e) => isRef(v) ? v.value = e : null,
|
|
29744
29759
|
"default-minimize": i.defaultMinimize,
|
|
29745
29760
|
size: i.nimbusSize,
|
|
29746
|
-
onClick:
|
|
29761
|
+
onClick: Xg
|
|
29747
29762
|
}, null, 8, [
|
|
29748
29763
|
"is-minimize",
|
|
29749
29764
|
"is-panel-show",
|
|
@@ -29753,13 +29768,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29753
29768
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29754
29769
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29755
29770
|
key: 1,
|
|
29756
|
-
visible:
|
|
29757
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29771
|
+
visible: Mg.value,
|
|
29772
|
+
"onUpdate:visible": n[6] ||= (e) => Mg.value = e,
|
|
29758
29773
|
"exclude-selectors": [".draggable-container-wrapper"],
|
|
29759
29774
|
"max-shortcut-count": i.shortcutLimit,
|
|
29760
|
-
shortcuts:
|
|
29761
|
-
onSelectShortcut:
|
|
29762
|
-
onSelectionChange:
|
|
29775
|
+
shortcuts: Wg.value,
|
|
29776
|
+
onSelectShortcut: $g,
|
|
29777
|
+
onSelectionChange: Qg
|
|
29763
29778
|
}, null, 8, [
|
|
29764
29779
|
"visible",
|
|
29765
29780
|
"max-shortcut-count",
|
|
@@ -29767,7 +29782,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29767
29782
|
])) : createCommentVNode("v-if", !0)
|
|
29768
29783
|
], 2)], 8, ["to"]));
|
|
29769
29784
|
}
|
|
29770
|
-
}), [["__scopeId", "data-v-
|
|
29785
|
+
}), [["__scopeId", "data-v-438e798c"]]), vue2_default = {
|
|
29771
29786
|
name: "AIBluekingV2",
|
|
29772
29787
|
render(e) {
|
|
29773
29788
|
return e("div", { style: {
|
|
@@ -29998,7 +30013,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29998
30013
|
this.app?.mount(this.$el), this.$nextTick(() => {
|
|
29999
30014
|
if (this.componentInstance) {
|
|
30000
30015
|
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);
|
|
30016
|
+
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
30017
|
}
|
|
30003
30018
|
});
|
|
30004
30019
|
},
|
|
@@ -30009,6 +30024,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
30009
30024
|
show(e, n) {
|
|
30010
30025
|
return console.warn("AIBluekingV2: show method not ready"), Promise.resolve();
|
|
30011
30026
|
},
|
|
30027
|
+
handleClose() {
|
|
30028
|
+
console.warn("AIBluekingV2: handleClose method not ready");
|
|
30029
|
+
},
|
|
30012
30030
|
hide() {
|
|
30013
30031
|
console.warn("AIBluekingV2: hide method not ready");
|
|
30014
30032
|
},
|