@blueking/ai-blueking 2.0.0-dev.20 → 2.0.0-dev.21
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/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +532 -529
- package/dist/vue2/index.iife.min.js +2 -2
- package/dist/vue2/index.umd.min.js +25 -25
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +558 -555
- package/dist/vue3/index.iife.min.js +2 -2
- package/dist/vue3/index.umd.min.js +25 -25
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -721,25 +721,25 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
721
721
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
722
722
|
}, B = (e) => {
|
|
723
723
|
z(), a("selectShortcut", e, O.value);
|
|
724
|
-
}, H = null,
|
|
724
|
+
}, H = null, Tg = (e) => {
|
|
725
725
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
726
726
|
L();
|
|
727
727
|
}, e);
|
|
728
|
-
},
|
|
729
|
-
|
|
728
|
+
}, Eg = () => {
|
|
729
|
+
Tg(200);
|
|
730
730
|
}, K = () => {
|
|
731
|
-
|
|
731
|
+
Tg(300);
|
|
732
732
|
}, J = (e) => {
|
|
733
733
|
i.value && l.value?.contains(e.target) || z();
|
|
734
|
-
},
|
|
734
|
+
}, Dg = (e) => {
|
|
735
735
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
736
736
|
}, $ = () => {
|
|
737
737
|
d.value?.show();
|
|
738
738
|
};
|
|
739
739
|
return onMounted(() => {
|
|
740
|
-
document.addEventListener("selectionchange", K), document.addEventListener("mouseup",
|
|
740
|
+
document.addEventListener("selectionchange", K), document.addEventListener("mouseup", Eg), document.addEventListener("mousedown", J), document.addEventListener("scroll", Dg, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
741
741
|
}), onUnmounted(() => {
|
|
742
|
-
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup",
|
|
742
|
+
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", Eg), document.removeEventListener("mousedown", J), document.removeEventListener("scroll", Dg, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
743
743
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
744
744
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
745
745
|
key: 0,
|
|
@@ -1107,17 +1107,17 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1107
1107
|
}
|
|
1108
1108
|
function H() {
|
|
1109
1109
|
var e = i();
|
|
1110
|
-
if (B(e)) return
|
|
1110
|
+
if (B(e)) return Tg(e);
|
|
1111
1111
|
v = setTimeout(H, z(e));
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Tg(e) {
|
|
1114
1114
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1115
1115
|
}
|
|
1116
1116
|
function G() {
|
|
1117
1117
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return v === void 0 ? _ :
|
|
1119
|
+
function Eg() {
|
|
1120
|
+
return v === void 0 ? _ : Tg(i());
|
|
1121
1121
|
}
|
|
1122
1122
|
function K() {
|
|
1123
1123
|
var e = i(), r = B(e);
|
|
@@ -1127,7 +1127,7 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1127
1127
|
}
|
|
1128
1128
|
return v === void 0 && (v = setTimeout(H, n)), _;
|
|
1129
1129
|
}
|
|
1130
|
-
return K.cancel = G, K.flush =
|
|
1130
|
+
return K.cancel = G, K.flush = Eg, K;
|
|
1131
1131
|
}
|
|
1132
1132
|
n.exports = u;
|
|
1133
1133
|
})), require_throttle = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
@@ -4797,7 +4797,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4797
4797
|
return a;
|
|
4798
4798
|
}).map((e) => `(${e})`).join(n);
|
|
4799
4799
|
}
|
|
4800
|
-
var
|
|
4800
|
+
var Tg = /\b\B/, G = "[a-zA-Z]\\w*", Eg = "[a-zA-Z_]\\w*", K = "\\b\\d+(\\.\\d+)?", q = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", J = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Dg = (e = {}) => {
|
|
4801
4801
|
let n = /^#![ ]*\//;
|
|
4802
4802
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4803
4803
|
scope: "meta",
|
|
@@ -4811,7 +4811,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4811
4811
|
}, Q = {
|
|
4812
4812
|
begin: "\\\\[\\s\\S]",
|
|
4813
4813
|
relevance: 0
|
|
4814
|
-
},
|
|
4814
|
+
}, Og = {
|
|
4815
4815
|
scope: "string",
|
|
4816
4816
|
begin: "'",
|
|
4817
4817
|
end: "'",
|
|
@@ -4823,7 +4823,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4823
4823
|
end: "\"",
|
|
4824
4824
|
illegal: "\\n",
|
|
4825
4825
|
contains: [Q]
|
|
4826
|
-
},
|
|
4826
|
+
}, kg = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, Ag = function(e, n, r = {}) {
|
|
4827
4827
|
let i = o({
|
|
4828
4828
|
scope: "comment",
|
|
4829
4829
|
begin: e,
|
|
@@ -4839,19 +4839,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4839
4839
|
});
|
|
4840
4840
|
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,}/);
|
|
4841
4841
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4842
|
-
},
|
|
4842
|
+
}, jg = Ag("//", "$"), Mg = Ag("/\\*", "\\*/"), Ng = Ag("#", "$"), Pg = {
|
|
4843
4843
|
scope: "number",
|
|
4844
4844
|
begin: K,
|
|
4845
4845
|
relevance: 0
|
|
4846
|
-
},
|
|
4846
|
+
}, Fg = {
|
|
4847
4847
|
scope: "number",
|
|
4848
4848
|
begin: q,
|
|
4849
4849
|
relevance: 0
|
|
4850
|
-
},
|
|
4850
|
+
}, Ig = {
|
|
4851
4851
|
scope: "number",
|
|
4852
4852
|
begin: J,
|
|
4853
4853
|
relevance: 0
|
|
4854
|
-
},
|
|
4854
|
+
}, Lg = {
|
|
4855
4855
|
scope: "regexp",
|
|
4856
4856
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4857
4857
|
end: /\/[gimuy]*/,
|
|
@@ -4861,27 +4861,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4861
4861
|
relevance: 0,
|
|
4862
4862
|
contains: [Q]
|
|
4863
4863
|
}]
|
|
4864
|
-
},
|
|
4864
|
+
}, Rg = {
|
|
4865
4865
|
scope: "title",
|
|
4866
4866
|
begin: G,
|
|
4867
4867
|
relevance: 0
|
|
4868
|
-
},
|
|
4868
|
+
}, zg = {
|
|
4869
4869
|
scope: "title",
|
|
4870
|
-
begin:
|
|
4870
|
+
begin: Eg,
|
|
4871
4871
|
relevance: 0
|
|
4872
|
-
},
|
|
4873
|
-
begin: "\\.\\s*" +
|
|
4872
|
+
}, Bg = {
|
|
4873
|
+
begin: "\\.\\s*" + Eg,
|
|
4874
4874
|
relevance: 0
|
|
4875
|
-
},
|
|
4875
|
+
}, Vg = /* @__PURE__ */ Object.freeze({
|
|
4876
4876
|
__proto__: null,
|
|
4877
|
-
APOS_STRING_MODE:
|
|
4877
|
+
APOS_STRING_MODE: Og,
|
|
4878
4878
|
BACKSLASH_ESCAPE: Q,
|
|
4879
|
-
BINARY_NUMBER_MODE:
|
|
4879
|
+
BINARY_NUMBER_MODE: Ig,
|
|
4880
4880
|
BINARY_NUMBER_RE: J,
|
|
4881
|
-
COMMENT:
|
|
4882
|
-
C_BLOCK_COMMENT_MODE:
|
|
4883
|
-
C_LINE_COMMENT_MODE:
|
|
4884
|
-
C_NUMBER_MODE:
|
|
4881
|
+
COMMENT: Ag,
|
|
4882
|
+
C_BLOCK_COMMENT_MODE: Mg,
|
|
4883
|
+
C_LINE_COMMENT_MODE: jg,
|
|
4884
|
+
C_NUMBER_MODE: Fg,
|
|
4885
4885
|
C_NUMBER_RE: q,
|
|
4886
4886
|
END_SAME_AS_BEGIN: function(e) {
|
|
4887
4887
|
return Object.assign(e, {
|
|
@@ -4893,43 +4893,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4893
4893
|
}
|
|
4894
4894
|
});
|
|
4895
4895
|
},
|
|
4896
|
-
HASH_COMMENT_MODE:
|
|
4896
|
+
HASH_COMMENT_MODE: Ng,
|
|
4897
4897
|
IDENT_RE: G,
|
|
4898
|
-
MATCH_NOTHING_RE:
|
|
4899
|
-
METHOD_GUARD:
|
|
4900
|
-
NUMBER_MODE:
|
|
4898
|
+
MATCH_NOTHING_RE: Tg,
|
|
4899
|
+
METHOD_GUARD: Bg,
|
|
4900
|
+
NUMBER_MODE: Pg,
|
|
4901
4901
|
NUMBER_RE: K,
|
|
4902
|
-
PHRASAL_WORDS_MODE:
|
|
4902
|
+
PHRASAL_WORDS_MODE: kg,
|
|
4903
4903
|
QUOTE_STRING_MODE: $,
|
|
4904
|
-
REGEXP_MODE:
|
|
4904
|
+
REGEXP_MODE: Lg,
|
|
4905
4905
|
RE_STARTERS_RE: Z,
|
|
4906
|
-
SHEBANG:
|
|
4907
|
-
TITLE_MODE:
|
|
4908
|
-
UNDERSCORE_IDENT_RE:
|
|
4909
|
-
UNDERSCORE_TITLE_MODE:
|
|
4906
|
+
SHEBANG: Dg,
|
|
4907
|
+
TITLE_MODE: Rg,
|
|
4908
|
+
UNDERSCORE_IDENT_RE: Eg,
|
|
4909
|
+
UNDERSCORE_TITLE_MODE: zg
|
|
4910
4910
|
});
|
|
4911
|
-
function
|
|
4911
|
+
function Hg(e, n) {
|
|
4912
4912
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function Ug(e, n) {
|
|
4915
4915
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4918
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4917
|
+
function Wg(e, n) {
|
|
4918
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Hg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function Gg(e, n) {
|
|
4921
4921
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4922
4922
|
}
|
|
4923
|
-
function
|
|
4923
|
+
function Kg(e, n) {
|
|
4924
4924
|
if (e.match) {
|
|
4925
4925
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4926
4926
|
e.begin = e.match, delete e.match;
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
4929
|
-
function
|
|
4929
|
+
function qg(e, n) {
|
|
4930
4930
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4931
4931
|
}
|
|
4932
|
-
var
|
|
4932
|
+
var Jg = (e, n) => {
|
|
4933
4933
|
if (!e.beforeMatch) return;
|
|
4934
4934
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4935
4935
|
let r = Object.assign({}, e);
|
|
@@ -4939,7 +4939,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4939
4939
|
relevance: 0,
|
|
4940
4940
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4941
4941
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4942
|
-
},
|
|
4942
|
+
}, Yg = [
|
|
4943
4943
|
"of",
|
|
4944
4944
|
"and",
|
|
4945
4945
|
"for",
|
|
@@ -4951,58 +4951,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4951
4951
|
"parent",
|
|
4952
4952
|
"list",
|
|
4953
4953
|
"value"
|
|
4954
|
-
],
|
|
4955
|
-
function
|
|
4954
|
+
], Xg = "keyword";
|
|
4955
|
+
function Zg(e, n, r = Xg) {
|
|
4956
4956
|
let i = Object.create(null);
|
|
4957
4957
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4958
|
-
Object.assign(i,
|
|
4958
|
+
Object.assign(i, Zg(e[r], n, r));
|
|
4959
4959
|
}), i;
|
|
4960
4960
|
function a(e, r) {
|
|
4961
4961
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4962
4962
|
let r = n.split("|");
|
|
4963
|
-
i[r[0]] = [e,
|
|
4963
|
+
i[r[0]] = [e, Qg(r[0], r[1])];
|
|
4964
4964
|
});
|
|
4965
4965
|
}
|
|
4966
4966
|
}
|
|
4967
|
-
function
|
|
4968
|
-
return n ? Number(n) :
|
|
4967
|
+
function Qg(e, n) {
|
|
4968
|
+
return n ? Number(n) : $g(e) ? 0 : 1;
|
|
4969
4969
|
}
|
|
4970
|
-
function
|
|
4971
|
-
return
|
|
4970
|
+
function $g(e) {
|
|
4971
|
+
return Yg.includes(e.toLowerCase());
|
|
4972
4972
|
}
|
|
4973
|
-
var
|
|
4973
|
+
var e_ = {}, t_ = (e) => {
|
|
4974
4974
|
console.error(e);
|
|
4975
|
-
},
|
|
4975
|
+
}, n_ = (e, ...n) => {
|
|
4976
4976
|
console.log(`WARN: ${e}`, ...n);
|
|
4977
|
-
},
|
|
4978
|
-
|
|
4979
|
-
},
|
|
4980
|
-
function
|
|
4977
|
+
}, r_ = (e, n) => {
|
|
4978
|
+
e_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), e_[`${e}/${n}`] = !0);
|
|
4979
|
+
}, i_ = /* @__PURE__ */ Error();
|
|
4980
|
+
function a_(e, n, { key: r }) {
|
|
4981
4981
|
let i = 0, a = e[r], o = {}, s = {};
|
|
4982
4982
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
4983
4983
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
4984
4984
|
}
|
|
4985
|
-
function
|
|
4985
|
+
function o_(e) {
|
|
4986
4986
|
if (Array.isArray(e.begin)) {
|
|
4987
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
4988
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
4989
|
-
|
|
4987
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw t_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), i_;
|
|
4988
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw t_("beginScope must be object"), i_;
|
|
4989
|
+
a_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
function
|
|
4992
|
+
function s_(e) {
|
|
4993
4993
|
if (Array.isArray(e.end)) {
|
|
4994
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
4995
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
4996
|
-
|
|
4994
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw t_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), i_;
|
|
4995
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw t_("endScope must be object"), i_;
|
|
4996
|
+
a_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
|
-
function
|
|
4999
|
+
function c_(e) {
|
|
5000
5000
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
|
|
5002
|
+
function l_(e) {
|
|
5003
|
+
c_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), o_(e), s_(e);
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function u_(e) {
|
|
5006
5006
|
function n(n, r) {
|
|
5007
5007
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5008
5008
|
}
|
|
@@ -5064,18 +5064,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5064
5064
|
let o = r;
|
|
5065
5065
|
if (r.isCompiled) return o;
|
|
5066
5066
|
[
|
|
5067
|
-
|
|
5068
|
-
qg,
|
|
5069
|
-
u_,
|
|
5070
|
-
Yg
|
|
5071
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
-
Gg,
|
|
5067
|
+
Ug,
|
|
5073
5068
|
Kg,
|
|
5069
|
+
l_,
|
|
5074
5070
|
Jg
|
|
5071
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
+
Wg,
|
|
5073
|
+
Gg,
|
|
5074
|
+
qg
|
|
5075
5075
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5076
5076
|
let l = null;
|
|
5077
|
-
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 &&=
|
|
5078
|
-
return
|
|
5077
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= Zg(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
|
|
5078
|
+
return f_(e === "self" ? r : e);
|
|
5079
5079
|
})), r.contains.forEach(function(e) {
|
|
5080
5080
|
s(e, o);
|
|
5081
5081
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5083,19 +5083,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5083
5083
|
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.");
|
|
5084
5084
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5085
5085
|
}
|
|
5086
|
-
function
|
|
5087
|
-
return e ? e.endsWithParent ||
|
|
5086
|
+
function d_(e) {
|
|
5087
|
+
return e ? e.endsWithParent || d_(e.starts) : !1;
|
|
5088
5088
|
}
|
|
5089
|
-
function
|
|
5089
|
+
function f_(e) {
|
|
5090
5090
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5091
5091
|
return o(e, { variants: null }, n);
|
|
5092
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5092
|
+
})), e.cachedVariants ? e.cachedVariants : d_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5093
5093
|
}
|
|
5094
|
-
var
|
|
5094
|
+
var p_ = "11.11.1", m_ = class extends Error {
|
|
5095
5095
|
constructor(e, n) {
|
|
5096
5096
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5097
5097
|
}
|
|
5098
|
-
},
|
|
5098
|
+
}, h_ = a, g_ = o, __ = Symbol("nomatch"), v_ = 7, y_ = function(e) {
|
|
5099
5099
|
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 = {
|
|
5100
5100
|
disableAutodetect: !0,
|
|
5101
5101
|
name: "Plain text",
|
|
@@ -5118,21 +5118,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5118
5118
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5119
5119
|
let r = d.languageDetectRe.exec(n);
|
|
5120
5120
|
if (r) {
|
|
5121
|
-
let n =
|
|
5122
|
-
return n || (
|
|
5121
|
+
let n = Og(r[1]);
|
|
5122
|
+
return n || (n_(l.replace("{}", r[1])), n_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5123
5123
|
}
|
|
5124
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5124
|
+
return n.split(/\s+/).find((e) => m(e) || Og(e));
|
|
5125
5125
|
}
|
|
5126
5126
|
function v(e, n, r) {
|
|
5127
5127
|
let i = "", a = "";
|
|
5128
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5128
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (r_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), r_("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
|
|
5129
5129
|
let o = {
|
|
5130
5130
|
code: i,
|
|
5131
5131
|
language: a
|
|
5132
5132
|
};
|
|
5133
|
-
|
|
5133
|
+
Ng("before:highlight", o);
|
|
5134
5134
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5135
|
-
return s.code = o.code,
|
|
5135
|
+
return s.code = o.code, Ng("after:highlight", s), s;
|
|
5136
5136
|
}
|
|
5137
5137
|
function j(e, r, a, o) {
|
|
5138
5138
|
let u = Object.create(null);
|
|
@@ -5152,7 +5152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5152
5152
|
let i = K.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5153
5153
|
if (a) {
|
|
5154
5154
|
let [e, o] = a;
|
|
5155
|
-
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <=
|
|
5155
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= v_ && (kg += o), e.startsWith("_")) r += n[0];
|
|
5156
5156
|
else {
|
|
5157
5157
|
let r = K.classNameAliases[e] || e;
|
|
5158
5158
|
T(n[0], r);
|
|
@@ -5170,9 +5170,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5170
5170
|
Q.addText($);
|
|
5171
5171
|
return;
|
|
5172
5172
|
}
|
|
5173
|
-
e = j(Z.subLanguage, $, !0,
|
|
5173
|
+
e = j(Z.subLanguage, $, !0, Dg[Z.subLanguage]), Dg[Z.subLanguage] = e._top;
|
|
5174
5174
|
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5175
|
-
Z.relevance > 0 && (
|
|
5175
|
+
Z.relevance > 0 && (kg += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5176
5176
|
}
|
|
5177
5177
|
function v() {
|
|
5178
5178
|
Z.subLanguage == null ? g() : _(), $ = "";
|
|
@@ -5209,7 +5209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5209
5209
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5210
5210
|
}
|
|
5211
5211
|
function I(e) {
|
|
5212
|
-
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5212
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Mg = !0, 0);
|
|
5213
5213
|
}
|
|
5214
5214
|
function L(e) {
|
|
5215
5215
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5218,21 +5218,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5218
5218
|
}
|
|
5219
5219
|
function H(e) {
|
|
5220
5220
|
let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
|
|
5221
|
-
if (!a) return
|
|
5221
|
+
if (!a) return __;
|
|
5222
5222
|
let o = Z;
|
|
5223
5223
|
Z.endScope && Z.endScope._wrap ? (v(), T(n, Z.endScope._wrap)) : Z.endScope && Z.endScope._multi ? (v(), E(Z.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5224
5224
|
do
|
|
5225
|
-
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (
|
|
5225
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (kg += Z.relevance), Z = Z.parent;
|
|
5226
5226
|
while (Z !== a.parent);
|
|
5227
5227
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5228
5228
|
}
|
|
5229
|
-
function
|
|
5229
|
+
function Tg() {
|
|
5230
5230
|
let e = [];
|
|
5231
5231
|
for (let n = Z; n !== K; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5232
5232
|
e.forEach((e) => Q.openNode(e));
|
|
5233
5233
|
}
|
|
5234
5234
|
let G = {};
|
|
5235
|
-
function
|
|
5235
|
+
function Eg(n, i) {
|
|
5236
5236
|
let o = i && i[0];
|
|
5237
5237
|
if ($ += n, o == null) return v(), 0;
|
|
5238
5238
|
if (G.type === "begin" && i.type === "end" && G.index === i.index && o === "") {
|
|
@@ -5248,33 +5248,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5248
5248
|
throw e.mode = Z, e;
|
|
5249
5249
|
} else if (i.type === "end") {
|
|
5250
5250
|
let e = H(i);
|
|
5251
|
-
if (e !==
|
|
5251
|
+
if (e !== __) return e;
|
|
5252
5252
|
}
|
|
5253
5253
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5254
|
-
if (
|
|
5254
|
+
if (jg > 1e5 && jg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5255
5255
|
return $ += o, o.length;
|
|
5256
5256
|
}
|
|
5257
|
-
let K =
|
|
5258
|
-
if (!K) throw
|
|
5259
|
-
let q =
|
|
5260
|
-
|
|
5261
|
-
let $ = "",
|
|
5257
|
+
let K = Og(e);
|
|
5258
|
+
if (!K) throw t_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5259
|
+
let q = u_(K), J = "", Z = o || q, Dg = {}, Q = new d.__emitter(d);
|
|
5260
|
+
Tg();
|
|
5261
|
+
let $ = "", kg = 0, Ag = 0, jg = 0, Mg = !1;
|
|
5262
5262
|
try {
|
|
5263
5263
|
if (K.__emitTokens) K.__emitTokens(r, Q);
|
|
5264
5264
|
else {
|
|
5265
5265
|
for (Z.matcher.considerAll();;) {
|
|
5266
|
-
|
|
5266
|
+
jg++, Mg ? Mg = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = Ag;
|
|
5267
5267
|
let e = Z.matcher.exec(r);
|
|
5268
5268
|
if (!e) break;
|
|
5269
|
-
let n =
|
|
5270
|
-
|
|
5269
|
+
let n = Eg(r.substring(Ag, e.index), e);
|
|
5270
|
+
Ag = e.index + n;
|
|
5271
5271
|
}
|
|
5272
|
-
|
|
5272
|
+
Eg(r.substring(Ag));
|
|
5273
5273
|
}
|
|
5274
5274
|
return Q.finalize(), J = Q.toHTML(), {
|
|
5275
5275
|
language: e,
|
|
5276
5276
|
value: J,
|
|
5277
|
-
relevance:
|
|
5277
|
+
relevance: kg,
|
|
5278
5278
|
illegal: !1,
|
|
5279
5279
|
_emitter: Q,
|
|
5280
5280
|
_top: Z
|
|
@@ -5282,13 +5282,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5282
5282
|
} catch (n) {
|
|
5283
5283
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5284
5284
|
language: e,
|
|
5285
|
-
value:
|
|
5285
|
+
value: h_(r),
|
|
5286
5286
|
illegal: !0,
|
|
5287
5287
|
relevance: 0,
|
|
5288
5288
|
_illegalBy: {
|
|
5289
5289
|
message: n.message,
|
|
5290
|
-
index:
|
|
5291
|
-
context: r.slice(
|
|
5290
|
+
index: Ag,
|
|
5291
|
+
context: r.slice(Ag - 100, Ag + 100),
|
|
5292
5292
|
mode: n.mode,
|
|
5293
5293
|
resultSoFar: J
|
|
5294
5294
|
},
|
|
@@ -5296,7 +5296,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5296
5296
|
};
|
|
5297
5297
|
if (s) return {
|
|
5298
5298
|
language: e,
|
|
5299
|
-
value:
|
|
5299
|
+
value: h_(r),
|
|
5300
5300
|
illegal: !1,
|
|
5301
5301
|
relevance: 0,
|
|
5302
5302
|
errorRaised: n,
|
|
@@ -5308,7 +5308,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5308
5308
|
}
|
|
5309
5309
|
function L(e) {
|
|
5310
5310
|
let n = {
|
|
5311
|
-
value:
|
|
5311
|
+
value: h_(e),
|
|
5312
5312
|
illegal: !1,
|
|
5313
5313
|
relevance: 0,
|
|
5314
5314
|
_top: u,
|
|
@@ -5318,13 +5318,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5318
5318
|
}
|
|
5319
5319
|
function B(e, r) {
|
|
5320
5320
|
r = r || d.languages || Object.keys(n);
|
|
5321
|
-
let i = L(e), a = r.filter(
|
|
5321
|
+
let i = L(e), a = r.filter(Og).filter(kg).map((n) => j(n, e, !1));
|
|
5322
5322
|
a.unshift(i);
|
|
5323
5323
|
let [o, s] = a.sort((e, n) => {
|
|
5324
5324
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5325
5325
|
if (e.language && n.language) {
|
|
5326
|
-
if (
|
|
5327
|
-
if (
|
|
5326
|
+
if (Og(e.language).supersetOf === n.language) return 1;
|
|
5327
|
+
if (Og(n.language).supersetOf === e.language) return -1;
|
|
5328
5328
|
}
|
|
5329
5329
|
return 0;
|
|
5330
5330
|
}), l = o;
|
|
@@ -5334,17 +5334,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5334
5334
|
let i = n && a[n] || r;
|
|
5335
5335
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5336
5336
|
}
|
|
5337
|
-
function
|
|
5337
|
+
function Tg(e) {
|
|
5338
5338
|
let n = null, r = g(e);
|
|
5339
5339
|
if (m(r)) return;
|
|
5340
|
-
if (
|
|
5340
|
+
if (Ng("before:highlightElement", {
|
|
5341
5341
|
el: e,
|
|
5342
5342
|
language: r
|
|
5343
5343
|
}), e.dataset.highlighted) {
|
|
5344
5344
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5345
5345
|
return;
|
|
5346
5346
|
}
|
|
5347
|
-
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
|
|
5347
|
+
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new m_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5348
5348
|
n = e;
|
|
5349
5349
|
let i = n.textContent, a = r ? v(i, {
|
|
5350
5350
|
language: r,
|
|
@@ -5357,20 +5357,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5357
5357
|
}, a.secondBest && (e.secondBest = {
|
|
5358
5358
|
language: a.secondBest.language,
|
|
5359
5359
|
relevance: a.secondBest.relevance
|
|
5360
|
-
}),
|
|
5360
|
+
}), Ng("after:highlightElement", {
|
|
5361
5361
|
el: e,
|
|
5362
5362
|
result: a,
|
|
5363
5363
|
text: i
|
|
5364
5364
|
});
|
|
5365
5365
|
}
|
|
5366
5366
|
function G(e) {
|
|
5367
|
-
d =
|
|
5367
|
+
d = g_(d, e);
|
|
5368
5368
|
}
|
|
5369
|
-
let
|
|
5370
|
-
J(),
|
|
5369
|
+
let Eg = () => {
|
|
5370
|
+
J(), r_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5371
5371
|
};
|
|
5372
5372
|
function K() {
|
|
5373
|
-
J(),
|
|
5373
|
+
J(), r_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5374
5374
|
}
|
|
5375
5375
|
let q = !1;
|
|
5376
5376
|
function J() {
|
|
@@ -5381,27 +5381,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5381
5381
|
q || window.addEventListener("DOMContentLoaded", e, !1), q = !0;
|
|
5382
5382
|
return;
|
|
5383
5383
|
}
|
|
5384
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5384
|
+
document.querySelectorAll(d.cssSelector).forEach(Tg);
|
|
5385
5385
|
}
|
|
5386
5386
|
function Z(r, i) {
|
|
5387
5387
|
let a = null;
|
|
5388
5388
|
try {
|
|
5389
5389
|
a = i(e);
|
|
5390
5390
|
} catch (e) {
|
|
5391
|
-
if (
|
|
5391
|
+
if (t_("Language definition for '{}' could not be registered.".replace("{}", r)), s) t_(e);
|
|
5392
5392
|
else throw e;
|
|
5393
5393
|
a = u;
|
|
5394
5394
|
}
|
|
5395
5395
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5396
5396
|
}
|
|
5397
|
-
function
|
|
5397
|
+
function Dg(e) {
|
|
5398
5398
|
delete n[e];
|
|
5399
5399
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5400
5400
|
}
|
|
5401
5401
|
function Q() {
|
|
5402
5402
|
return Object.keys(n);
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function Og(e) {
|
|
5405
5405
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5406
5406
|
}
|
|
5407
5407
|
function $(e, { languageName: n }) {
|
|
@@ -5409,65 +5409,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5409
5409
|
a[e.toLowerCase()] = n;
|
|
5410
5410
|
});
|
|
5411
5411
|
}
|
|
5412
|
-
function
|
|
5413
|
-
let n =
|
|
5412
|
+
function kg(e) {
|
|
5413
|
+
let n = Og(e);
|
|
5414
5414
|
return n && !n.disableAutodetect;
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function Ag(e) {
|
|
5417
5417
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5418
5418
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5419
5419
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5420
5420
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5421
5421
|
});
|
|
5422
5422
|
}
|
|
5423
|
-
function
|
|
5424
|
-
|
|
5423
|
+
function jg(e) {
|
|
5424
|
+
Ag(e), o.push(e);
|
|
5425
5425
|
}
|
|
5426
|
-
function
|
|
5426
|
+
function Mg(e) {
|
|
5427
5427
|
let n = o.indexOf(e);
|
|
5428
5428
|
n !== -1 && o.splice(n, 1);
|
|
5429
5429
|
}
|
|
5430
|
-
function
|
|
5430
|
+
function Ng(e, n) {
|
|
5431
5431
|
let r = e;
|
|
5432
5432
|
o.forEach(function(e) {
|
|
5433
5433
|
e[r] && e[r](n);
|
|
5434
5434
|
});
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5437
|
-
return
|
|
5436
|
+
function Pg(e) {
|
|
5437
|
+
return r_("10.7.0", "highlightBlock will be removed entirely in v12.0"), r_("10.7.0", "Please use highlightElement now."), Tg(e);
|
|
5438
5438
|
}
|
|
5439
5439
|
for (let n in Object.assign(e, {
|
|
5440
5440
|
highlight: v,
|
|
5441
5441
|
highlightAuto: B,
|
|
5442
5442
|
highlightAll: J,
|
|
5443
|
-
highlightElement:
|
|
5444
|
-
highlightBlock:
|
|
5443
|
+
highlightElement: Tg,
|
|
5444
|
+
highlightBlock: Pg,
|
|
5445
5445
|
configure: G,
|
|
5446
|
-
initHighlighting:
|
|
5446
|
+
initHighlighting: Eg,
|
|
5447
5447
|
initHighlightingOnLoad: K,
|
|
5448
5448
|
registerLanguage: Z,
|
|
5449
|
-
unregisterLanguage:
|
|
5449
|
+
unregisterLanguage: Dg,
|
|
5450
5450
|
listLanguages: Q,
|
|
5451
|
-
getLanguage:
|
|
5451
|
+
getLanguage: Og,
|
|
5452
5452
|
registerAliases: $,
|
|
5453
|
-
autoDetection:
|
|
5454
|
-
inherit:
|
|
5455
|
-
addPlugin:
|
|
5456
|
-
removePlugin:
|
|
5453
|
+
autoDetection: kg,
|
|
5454
|
+
inherit: g_,
|
|
5455
|
+
addPlugin: jg,
|
|
5456
|
+
removePlugin: Mg
|
|
5457
5457
|
}), e.debugMode = function() {
|
|
5458
5458
|
s = !1;
|
|
5459
5459
|
}, e.safeMode = function() {
|
|
5460
5460
|
s = !0;
|
|
5461
|
-
}, e.versionString =
|
|
5461
|
+
}, e.versionString = p_, e.regex = {
|
|
5462
5462
|
concat: k,
|
|
5463
5463
|
lookahead: T,
|
|
5464
5464
|
either: I,
|
|
5465
5465
|
optional: O,
|
|
5466
5466
|
anyNumberOfTimes: E
|
|
5467
|
-
},
|
|
5468
|
-
return Object.assign(e,
|
|
5469
|
-
},
|
|
5470
|
-
|
|
5467
|
+
}, Vg) typeof Vg[n] == "object" && r(Vg[n]);
|
|
5468
|
+
return Object.assign(e, Vg), e;
|
|
5469
|
+
}, b_ = y_({});
|
|
5470
|
+
b_.newInstance = () => y_({}), n.exports = b_, b_.HighlightJS = b_, b_.default = b_;
|
|
5471
5471
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5472
5472
|
function r(e) {
|
|
5473
5473
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11573,7 +11573,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11573
11573
|
},
|
|
11574
11574
|
z
|
|
11575
11575
|
]
|
|
11576
|
-
},
|
|
11576
|
+
}, Tg = {
|
|
11577
11577
|
scope: "computation-expression",
|
|
11578
11578
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11579
11579
|
}, G = {
|
|
@@ -11584,7 +11584,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11584
11584
|
],
|
|
11585
11585
|
beginScope: { 2: "meta" },
|
|
11586
11586
|
end: a(/\s|$/)
|
|
11587
|
-
},
|
|
11587
|
+
}, Eg = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, K = {
|
|
11588
11588
|
scope: "string",
|
|
11589
11589
|
begin: /"/,
|
|
11590
11590
|
end: /"/,
|
|
@@ -11604,7 +11604,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11604
11604
|
begin: /\{/,
|
|
11605
11605
|
end: /\}/,
|
|
11606
11606
|
keywords: g
|
|
11607
|
-
},
|
|
11607
|
+
}, Dg = {
|
|
11608
11608
|
scope: "string",
|
|
11609
11609
|
begin: /\$"/,
|
|
11610
11610
|
end: /"/,
|
|
@@ -11625,7 +11625,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11625
11625
|
e.BACKSLASH_ESCAPE,
|
|
11626
11626
|
Z
|
|
11627
11627
|
]
|
|
11628
|
-
},
|
|
11628
|
+
}, Og = {
|
|
11629
11629
|
scope: "string",
|
|
11630
11630
|
begin: /\$"""/,
|
|
11631
11631
|
end: /"""/,
|
|
@@ -11641,7 +11641,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11641
11641
|
};
|
|
11642
11642
|
Z.contains = [
|
|
11643
11643
|
Q,
|
|
11644
|
-
|
|
11644
|
+
Dg,
|
|
11645
11645
|
q,
|
|
11646
11646
|
K,
|
|
11647
11647
|
$,
|
|
@@ -11649,16 +11649,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11649
11649
|
_,
|
|
11650
11650
|
T,
|
|
11651
11651
|
z,
|
|
11652
|
-
|
|
11652
|
+
Tg,
|
|
11653
11653
|
G,
|
|
11654
|
-
|
|
11654
|
+
Eg,
|
|
11655
11655
|
O,
|
|
11656
11656
|
j
|
|
11657
11657
|
];
|
|
11658
|
-
let
|
|
11659
|
-
kg,
|
|
11660
|
-
Q,
|
|
11658
|
+
let kg = { variants: [
|
|
11661
11659
|
Og,
|
|
11660
|
+
Q,
|
|
11661
|
+
Dg,
|
|
11662
11662
|
J,
|
|
11663
11663
|
q,
|
|
11664
11664
|
K,
|
|
@@ -11672,7 +11672,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11672
11672
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11673
11673
|
contains: [
|
|
11674
11674
|
i,
|
|
11675
|
-
|
|
11675
|
+
kg,
|
|
11676
11676
|
_,
|
|
11677
11677
|
T,
|
|
11678
11678
|
H,
|
|
@@ -11687,14 +11687,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11687
11687
|
q,
|
|
11688
11688
|
K,
|
|
11689
11689
|
$,
|
|
11690
|
-
|
|
11690
|
+
Eg
|
|
11691
11691
|
]
|
|
11692
11692
|
},
|
|
11693
11693
|
B,
|
|
11694
11694
|
z,
|
|
11695
|
-
|
|
11695
|
+
Tg,
|
|
11696
11696
|
G,
|
|
11697
|
-
|
|
11697
|
+
Eg,
|
|
11698
11698
|
O,
|
|
11699
11699
|
j
|
|
11700
11700
|
]
|
|
@@ -13808,7 +13808,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13808
13808
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13809
13809
|
subLanguage: "graphql"
|
|
13810
13810
|
}
|
|
13811
|
-
},
|
|
13811
|
+
}, Tg = {
|
|
13812
13812
|
className: "string",
|
|
13813
13813
|
begin: "`",
|
|
13814
13814
|
end: "`",
|
|
@@ -13850,21 +13850,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13850
13850
|
e.C_BLOCK_COMMENT_MODE,
|
|
13851
13851
|
e.C_LINE_COMMENT_MODE
|
|
13852
13852
|
]
|
|
13853
|
-
},
|
|
13853
|
+
}, Eg = [
|
|
13854
13854
|
e.APOS_STRING_MODE,
|
|
13855
13855
|
e.QUOTE_STRING_MODE,
|
|
13856
13856
|
z,
|
|
13857
13857
|
B,
|
|
13858
13858
|
H,
|
|
13859
|
-
|
|
13859
|
+
Tg,
|
|
13860
13860
|
{ match: /\$\d+/ },
|
|
13861
13861
|
I
|
|
13862
13862
|
];
|
|
13863
|
-
L.contains =
|
|
13863
|
+
L.contains = Eg.concat({
|
|
13864
13864
|
begin: /\{/,
|
|
13865
13865
|
end: /\}/,
|
|
13866
13866
|
keywords: E,
|
|
13867
|
-
contains: ["self"].concat(
|
|
13867
|
+
contains: ["self"].concat(Eg)
|
|
13868
13868
|
});
|
|
13869
13869
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
13870
13870
|
begin: /(\s*)\(/,
|
|
@@ -13905,7 +13905,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13905
13905
|
1: "keyword",
|
|
13906
13906
|
3: "title.class"
|
|
13907
13907
|
}
|
|
13908
|
-
}] },
|
|
13908
|
+
}] }, Dg = {
|
|
13909
13909
|
relevance: 0,
|
|
13910
13910
|
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]*)*/),
|
|
13911
13911
|
className: "title.class",
|
|
@@ -13915,7 +13915,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13915
13915
|
className: "meta",
|
|
13916
13916
|
relevance: 10,
|
|
13917
13917
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13918
|
-
},
|
|
13918
|
+
}, Og = {
|
|
13919
13919
|
variants: [{ match: [
|
|
13920
13920
|
/function/,
|
|
13921
13921
|
/\s+/,
|
|
@@ -13934,25 +13934,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13934
13934
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13935
13935
|
className: "variable.constant"
|
|
13936
13936
|
};
|
|
13937
|
-
function
|
|
13937
|
+
function kg(e) {
|
|
13938
13938
|
return n.concat("(?!", e.join("|"), ")");
|
|
13939
13939
|
}
|
|
13940
|
-
let
|
|
13941
|
-
match: n.concat(/\b/,
|
|
13940
|
+
let Ag = {
|
|
13941
|
+
match: n.concat(/\b/, kg([
|
|
13942
13942
|
...l,
|
|
13943
13943
|
"super",
|
|
13944
13944
|
"import"
|
|
13945
13945
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13946
13946
|
className: "title.function",
|
|
13947
13947
|
relevance: 0
|
|
13948
|
-
},
|
|
13948
|
+
}, jg = {
|
|
13949
13949
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13950
13950
|
end: g,
|
|
13951
13951
|
excludeBegin: !0,
|
|
13952
13952
|
keywords: "prototype",
|
|
13953
13953
|
className: "property",
|
|
13954
13954
|
relevance: 0
|
|
13955
|
-
},
|
|
13955
|
+
}, Mg = {
|
|
13956
13956
|
match: [
|
|
13957
13957
|
/get|set/,
|
|
13958
13958
|
/\s+/,
|
|
@@ -13964,7 +13964,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13964
13964
|
3: "title.function"
|
|
13965
13965
|
},
|
|
13966
13966
|
contains: [{ begin: /\(\)/ }, J]
|
|
13967
|
-
},
|
|
13967
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
13968
13968
|
match: [
|
|
13969
13969
|
/const|var|let/,
|
|
13970
13970
|
/\s+/,
|
|
@@ -13972,7 +13972,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13972
13972
|
/\s*/,
|
|
13973
13973
|
/=\s*/,
|
|
13974
13974
|
/(async\s*)?/,
|
|
13975
|
-
n.lookahead(
|
|
13975
|
+
n.lookahead(Ng)
|
|
13976
13976
|
],
|
|
13977
13977
|
keywords: "async",
|
|
13978
13978
|
className: {
|
|
@@ -13992,7 +13992,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13992
13992
|
keywords: E,
|
|
13993
13993
|
exports: {
|
|
13994
13994
|
PARAMS_CONTAINS: q,
|
|
13995
|
-
CLASS_REFERENCE:
|
|
13995
|
+
CLASS_REFERENCE: Dg
|
|
13996
13996
|
},
|
|
13997
13997
|
illegal: /#(?![$_A-z])/,
|
|
13998
13998
|
contains: [
|
|
@@ -14007,17 +14007,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14007
14007
|
z,
|
|
14008
14008
|
B,
|
|
14009
14009
|
H,
|
|
14010
|
-
|
|
14010
|
+
Tg,
|
|
14011
14011
|
G,
|
|
14012
14012
|
{ match: /\$\d+/ },
|
|
14013
14013
|
I,
|
|
14014
|
-
|
|
14014
|
+
Dg,
|
|
14015
14015
|
{
|
|
14016
14016
|
scope: "attr",
|
|
14017
14017
|
match: g + n.lookahead(":"),
|
|
14018
14018
|
relevance: 0
|
|
14019
14019
|
},
|
|
14020
|
-
|
|
14020
|
+
Pg,
|
|
14021
14021
|
{
|
|
14022
14022
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14023
14023
|
keywords: "return throw case",
|
|
@@ -14027,7 +14027,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14027
14027
|
e.REGEXP_MODE,
|
|
14028
14028
|
{
|
|
14029
14029
|
className: "function",
|
|
14030
|
-
begin:
|
|
14030
|
+
begin: Ng,
|
|
14031
14031
|
returnBegin: !0,
|
|
14032
14032
|
end: "\\s*=>",
|
|
14033
14033
|
contains: [{
|
|
@@ -14084,7 +14084,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14084
14084
|
}
|
|
14085
14085
|
]
|
|
14086
14086
|
},
|
|
14087
|
-
|
|
14087
|
+
Og,
|
|
14088
14088
|
{ beginKeywords: "while if switch catch for" },
|
|
14089
14089
|
{
|
|
14090
14090
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -14099,7 +14099,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14099
14099
|
match: /\.\.\./,
|
|
14100
14100
|
relevance: 0
|
|
14101
14101
|
},
|
|
14102
|
-
|
|
14102
|
+
jg,
|
|
14103
14103
|
{
|
|
14104
14104
|
match: "\\$" + g,
|
|
14105
14105
|
relevance: 0
|
|
@@ -14109,10 +14109,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14109
14109
|
className: { 1: "title.function" },
|
|
14110
14110
|
contains: [J]
|
|
14111
14111
|
},
|
|
14112
|
-
|
|
14112
|
+
Ag,
|
|
14113
14113
|
$,
|
|
14114
14114
|
Z,
|
|
14115
|
-
|
|
14115
|
+
Mg,
|
|
14116
14116
|
{ match: /\$[(.]/ }
|
|
14117
14117
|
]
|
|
14118
14118
|
};
|
|
@@ -15066,12 +15066,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15066
15066
|
{ begin: "!important" },
|
|
15067
15067
|
n.FUNCTION_DISPATCH
|
|
15068
15068
|
]
|
|
15069
|
-
},
|
|
15069
|
+
}, Tg = {
|
|
15070
15070
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15071
15071
|
returnBegin: !0,
|
|
15072
15072
|
contains: [H]
|
|
15073
15073
|
};
|
|
15074
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15074
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, Tg, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15075
15075
|
name: "Less",
|
|
15076
15076
|
case_insensitive: !0,
|
|
15077
15077
|
illegal: "[=>'/<($\"]",
|
|
@@ -17597,7 +17597,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17597
17597
|
3: "variable.language"
|
|
17598
17598
|
}
|
|
17599
17599
|
}
|
|
17600
|
-
] },
|
|
17600
|
+
] }, Tg = {
|
|
17601
17601
|
scope: "attr",
|
|
17602
17602
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17603
17603
|
}, G = {
|
|
@@ -17606,7 +17606,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17606
17606
|
end: /\)/,
|
|
17607
17607
|
keywords: I,
|
|
17608
17608
|
contains: [
|
|
17609
|
-
|
|
17609
|
+
Tg,
|
|
17610
17610
|
s,
|
|
17611
17611
|
H,
|
|
17612
17612
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17614,7 +17614,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17614
17614
|
E,
|
|
17615
17615
|
z
|
|
17616
17616
|
]
|
|
17617
|
-
},
|
|
17617
|
+
}, Eg = {
|
|
17618
17618
|
relevance: 0,
|
|
17619
17619
|
match: [
|
|
17620
17620
|
/\b/,
|
|
@@ -17626,9 +17626,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17626
17626
|
scope: { 3: "title.function.invoke" },
|
|
17627
17627
|
contains: [G]
|
|
17628
17628
|
};
|
|
17629
|
-
G.contains.push(
|
|
17629
|
+
G.contains.push(Eg);
|
|
17630
17630
|
let K = [
|
|
17631
|
-
|
|
17631
|
+
Tg,
|
|
17632
17632
|
H,
|
|
17633
17633
|
e.C_BLOCK_COMMENT_MODE,
|
|
17634
17634
|
T,
|
|
@@ -17690,7 +17690,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17690
17690
|
match: /\$this\b/
|
|
17691
17691
|
},
|
|
17692
17692
|
s,
|
|
17693
|
-
|
|
17693
|
+
Eg,
|
|
17694
17694
|
H,
|
|
17695
17695
|
{
|
|
17696
17696
|
match: [
|
|
@@ -21046,7 +21046,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21046
21046
|
"unknown",
|
|
21047
21047
|
"usableFromInline",
|
|
21048
21048
|
"warn_unqualified_access"
|
|
21049
|
-
],
|
|
21049
|
+
], Tg = [
|
|
21050
21050
|
"iOS",
|
|
21051
21051
|
"iOSApplicationExtension",
|
|
21052
21052
|
"macOS",
|
|
@@ -21069,7 +21069,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21069
21069
|
}, I = {
|
|
21070
21070
|
match: a(/\./, s(...g)),
|
|
21071
21071
|
relevance: 0
|
|
21072
|
-
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]),
|
|
21072
|
+
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]), Eg = { variants: [{
|
|
21073
21073
|
className: "keyword",
|
|
21074
21074
|
match: s(...g.filter((e) => typeof e != "string").concat(m).map(l), ...d)
|
|
21075
21075
|
}] }, K = {
|
|
@@ -21079,7 +21079,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21079
21079
|
}, q = [
|
|
21080
21080
|
O,
|
|
21081
21081
|
I,
|
|
21082
|
-
|
|
21082
|
+
Eg
|
|
21083
21083
|
], J = [{
|
|
21084
21084
|
match: a(/\./, s(...E)),
|
|
21085
21085
|
relevance: 0
|
|
@@ -21089,84 +21089,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21089
21089
|
}], Z = {
|
|
21090
21090
|
match: /->/,
|
|
21091
21091
|
relevance: 0
|
|
21092
|
-
},
|
|
21092
|
+
}, Dg = [Z, {
|
|
21093
21093
|
className: "operator",
|
|
21094
21094
|
relevance: 0,
|
|
21095
21095
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21096
|
-
}], Q = "([0-9]_*)+",
|
|
21096
|
+
}], Q = "([0-9]_*)+", Og = "([0-9a-fA-F]_*)+", $ = {
|
|
21097
21097
|
className: "number",
|
|
21098
21098
|
relevance: 0,
|
|
21099
21099
|
variants: [
|
|
21100
21100
|
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21101
|
-
{ match: `\\b0x(${
|
|
21101
|
+
{ match: `\\b0x(${Og})(\\.(${Og}))?([pP][+-]?(${Q}))?\\b` },
|
|
21102
21102
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21103
21103
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21104
21104
|
]
|
|
21105
|
-
},
|
|
21105
|
+
}, kg = (e = "") => ({
|
|
21106
21106
|
className: "subst",
|
|
21107
21107
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21108
|
-
}),
|
|
21108
|
+
}), Ag = (e = "") => ({
|
|
21109
21109
|
className: "subst",
|
|
21110
21110
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21111
|
-
}),
|
|
21111
|
+
}), jg = (e = "") => ({
|
|
21112
21112
|
className: "subst",
|
|
21113
21113
|
label: "interpol",
|
|
21114
21114
|
begin: a(/\\/, e, /\(/),
|
|
21115
21115
|
end: /\)/
|
|
21116
|
-
}),
|
|
21116
|
+
}), Mg = (e = "") => ({
|
|
21117
21117
|
begin: a(e, /"""/),
|
|
21118
21118
|
end: a(/"""/, e),
|
|
21119
21119
|
contains: [
|
|
21120
|
+
kg(e),
|
|
21120
21121
|
Ag(e),
|
|
21121
|
-
jg(e)
|
|
21122
|
-
Mg(e)
|
|
21122
|
+
jg(e)
|
|
21123
21123
|
]
|
|
21124
|
-
}),
|
|
21124
|
+
}), Ng = (e = "") => ({
|
|
21125
21125
|
begin: a(e, /"/),
|
|
21126
21126
|
end: a(/"/, e),
|
|
21127
|
-
contains: [
|
|
21128
|
-
}),
|
|
21127
|
+
contains: [kg(e), jg(e)]
|
|
21128
|
+
}), Pg = {
|
|
21129
21129
|
className: "string",
|
|
21130
21130
|
variants: [
|
|
21131
|
+
Mg(),
|
|
21132
|
+
Mg("#"),
|
|
21133
|
+
Mg("##"),
|
|
21134
|
+
Mg("###"),
|
|
21131
21135
|
Ng(),
|
|
21132
21136
|
Ng("#"),
|
|
21133
21137
|
Ng("##"),
|
|
21134
|
-
Ng("###")
|
|
21135
|
-
Pg(),
|
|
21136
|
-
Pg("#"),
|
|
21137
|
-
Pg("##"),
|
|
21138
|
-
Pg("###")
|
|
21138
|
+
Ng("###")
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, Fg = [e.BACKSLASH_ESCAPE, {
|
|
21141
21141
|
begin: /\[/,
|
|
21142
21142
|
end: /\]/,
|
|
21143
21143
|
relevance: 0,
|
|
21144
21144
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21145
|
-
}],
|
|
21145
|
+
}], Ig = {
|
|
21146
21146
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21147
21147
|
end: /\//,
|
|
21148
|
-
contains:
|
|
21149
|
-
},
|
|
21148
|
+
contains: Fg
|
|
21149
|
+
}, Lg = (e) => {
|
|
21150
21150
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21151
21151
|
return {
|
|
21152
21152
|
begin: n,
|
|
21153
21153
|
end: r,
|
|
21154
|
-
contains: [...
|
|
21154
|
+
contains: [...Fg, {
|
|
21155
21155
|
scope: "comment",
|
|
21156
21156
|
begin: `#(?!.*${r})`,
|
|
21157
21157
|
end: /$/
|
|
21158
21158
|
}]
|
|
21159
21159
|
};
|
|
21160
|
-
},
|
|
21160
|
+
}, Rg = {
|
|
21161
21161
|
scope: "regexp",
|
|
21162
21162
|
variants: [
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21163
|
+
Lg("###"),
|
|
21164
|
+
Lg("##"),
|
|
21165
|
+
Lg("#"),
|
|
21166
|
+
Ig
|
|
21167
21167
|
]
|
|
21168
|
-
},
|
|
21169
|
-
|
|
21168
|
+
}, zg = { match: a(/`/, z, /`/) }, Bg = [
|
|
21169
|
+
zg,
|
|
21170
21170
|
{
|
|
21171
21171
|
className: "variable",
|
|
21172
21172
|
match: /\$\d+/
|
|
@@ -21175,18 +21175,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21175
|
className: "variable",
|
|
21176
21176
|
match: `\\$${L}+`
|
|
21177
21177
|
}
|
|
21178
|
-
],
|
|
21178
|
+
], Vg = [
|
|
21179
21179
|
{
|
|
21180
21180
|
match: /(@|#(un)?)available/,
|
|
21181
21181
|
scope: "keyword",
|
|
21182
21182
|
starts: { contains: [{
|
|
21183
21183
|
begin: /\(/,
|
|
21184
21184
|
end: /\)/,
|
|
21185
|
-
keywords:
|
|
21185
|
+
keywords: Tg,
|
|
21186
21186
|
contains: [
|
|
21187
|
-
...
|
|
21187
|
+
...Dg,
|
|
21188
21188
|
$,
|
|
21189
|
-
|
|
21189
|
+
Pg
|
|
21190
21190
|
]
|
|
21191
21191
|
}] }
|
|
21192
21192
|
},
|
|
@@ -21198,7 +21198,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21198
21198
|
scope: "meta",
|
|
21199
21199
|
match: a(/@/, z)
|
|
21200
21200
|
}
|
|
21201
|
-
],
|
|
21201
|
+
], Hg = {
|
|
21202
21202
|
match: i(/\b[A-Z]/),
|
|
21203
21203
|
relevance: 0,
|
|
21204
21204
|
contains: [
|
|
@@ -21224,20 +21224,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21224
21224
|
relevance: 0
|
|
21225
21225
|
}
|
|
21226
21226
|
]
|
|
21227
|
-
},
|
|
21227
|
+
}, Ug = {
|
|
21228
21228
|
begin: /</,
|
|
21229
21229
|
end: />/,
|
|
21230
21230
|
keywords: K,
|
|
21231
21231
|
contains: [
|
|
21232
21232
|
...o,
|
|
21233
21233
|
...q,
|
|
21234
|
-
...
|
|
21234
|
+
...Vg,
|
|
21235
21235
|
Z,
|
|
21236
|
-
|
|
21236
|
+
Hg
|
|
21237
21237
|
]
|
|
21238
21238
|
};
|
|
21239
|
-
|
|
21240
|
-
let
|
|
21239
|
+
Hg.contains.push(Ug);
|
|
21240
|
+
let Wg = {
|
|
21241
21241
|
begin: /\(/,
|
|
21242
21242
|
end: /\)/,
|
|
21243
21243
|
relevance: 0,
|
|
@@ -21250,22 +21250,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21250
21250
|
relevance: 0
|
|
21251
21251
|
},
|
|
21252
21252
|
...o,
|
|
21253
|
-
|
|
21253
|
+
Rg,
|
|
21254
21254
|
...q,
|
|
21255
21255
|
...J,
|
|
21256
|
-
...
|
|
21256
|
+
...Dg,
|
|
21257
21257
|
$,
|
|
21258
|
-
|
|
21258
|
+
Pg,
|
|
21259
|
+
...Bg,
|
|
21259
21260
|
...Vg,
|
|
21260
|
-
|
|
21261
|
-
Ug
|
|
21261
|
+
Hg
|
|
21262
21262
|
]
|
|
21263
|
-
},
|
|
21263
|
+
}, Gg = {
|
|
21264
21264
|
begin: /</,
|
|
21265
21265
|
end: />/,
|
|
21266
21266
|
keywords: "repeat each",
|
|
21267
|
-
contains: [...o,
|
|
21268
|
-
},
|
|
21267
|
+
contains: [...o, Hg]
|
|
21268
|
+
}, Kg = {
|
|
21269
21269
|
begin: /\(/,
|
|
21270
21270
|
end: /\)/,
|
|
21271
21271
|
keywords: K,
|
|
@@ -21284,41 +21284,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21284
21284
|
},
|
|
21285
21285
|
...o,
|
|
21286
21286
|
...q,
|
|
21287
|
-
...
|
|
21287
|
+
...Dg,
|
|
21288
21288
|
$,
|
|
21289
|
-
|
|
21290
|
-
...
|
|
21291
|
-
|
|
21292
|
-
|
|
21289
|
+
Pg,
|
|
21290
|
+
...Vg,
|
|
21291
|
+
Hg,
|
|
21292
|
+
Wg
|
|
21293
21293
|
],
|
|
21294
21294
|
endsParent: !0,
|
|
21295
21295
|
illegal: /["']/
|
|
21296
|
-
},
|
|
21296
|
+
}, qg = {
|
|
21297
21297
|
match: [
|
|
21298
21298
|
/(func|macro)/,
|
|
21299
21299
|
/\s+/,
|
|
21300
|
-
s(
|
|
21300
|
+
s(zg.match, z, j)
|
|
21301
21301
|
],
|
|
21302
21302
|
className: {
|
|
21303
21303
|
1: "keyword",
|
|
21304
21304
|
3: "title.function"
|
|
21305
21305
|
},
|
|
21306
21306
|
contains: [
|
|
21307
|
+
Gg,
|
|
21307
21308
|
Kg,
|
|
21308
|
-
qg,
|
|
21309
21309
|
n
|
|
21310
21310
|
],
|
|
21311
21311
|
illegal: [/\[/, /%/]
|
|
21312
|
-
},
|
|
21312
|
+
}, Jg = {
|
|
21313
21313
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21314
21314
|
className: { 1: "keyword" },
|
|
21315
21315
|
contains: [
|
|
21316
|
+
Gg,
|
|
21316
21317
|
Kg,
|
|
21317
|
-
qg,
|
|
21318
21318
|
n
|
|
21319
21319
|
],
|
|
21320
21320
|
illegal: /\[|%/
|
|
21321
|
-
},
|
|
21321
|
+
}, Yg = {
|
|
21322
21322
|
match: [
|
|
21323
21323
|
/operator/,
|
|
21324
21324
|
/\s+/,
|
|
@@ -21328,7 +21328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21328
21328
|
1: "keyword",
|
|
21329
21329
|
3: "title"
|
|
21330
21330
|
}
|
|
21331
|
-
},
|
|
21331
|
+
}, Xg = {
|
|
21332
21332
|
begin: [
|
|
21333
21333
|
/precedencegroup/,
|
|
21334
21334
|
/\s+/,
|
|
@@ -21338,10 +21338,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21338
21338
|
1: "keyword",
|
|
21339
21339
|
3: "title"
|
|
21340
21340
|
},
|
|
21341
|
-
contains: [
|
|
21341
|
+
contains: [Hg],
|
|
21342
21342
|
keywords: [...v, ..._],
|
|
21343
21343
|
end: /}/
|
|
21344
|
-
},
|
|
21344
|
+
}, Zg = {
|
|
21345
21345
|
match: [
|
|
21346
21346
|
/class\b/,
|
|
21347
21347
|
/\s+/,
|
|
@@ -21354,7 +21354,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21354
21354
|
3: "keyword",
|
|
21355
21355
|
5: "title.function"
|
|
21356
21356
|
}
|
|
21357
|
-
},
|
|
21357
|
+
}, Qg = {
|
|
21358
21358
|
match: [
|
|
21359
21359
|
/class\b/,
|
|
21360
21360
|
/\s+/,
|
|
@@ -21364,7 +21364,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21364
21364
|
1: "keyword",
|
|
21365
21365
|
3: "keyword"
|
|
21366
21366
|
}
|
|
21367
|
-
},
|
|
21367
|
+
}, $g = {
|
|
21368
21368
|
begin: [
|
|
21369
21369
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21370
21370
|
/\s+/,
|
|
@@ -21377,7 +21377,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21377
21377
|
},
|
|
21378
21378
|
keywords: K,
|
|
21379
21379
|
contains: [
|
|
21380
|
-
|
|
21380
|
+
Gg,
|
|
21381
21381
|
...q,
|
|
21382
21382
|
{
|
|
21383
21383
|
begin: /:/,
|
|
@@ -21391,16 +21391,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21391
21391
|
}
|
|
21392
21392
|
]
|
|
21393
21393
|
};
|
|
21394
|
-
for (let e of
|
|
21394
|
+
for (let e of Pg.variants) {
|
|
21395
21395
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21396
21396
|
n.keywords = K;
|
|
21397
21397
|
let r = [
|
|
21398
21398
|
...q,
|
|
21399
21399
|
...J,
|
|
21400
|
-
...
|
|
21400
|
+
...Dg,
|
|
21401
21401
|
$,
|
|
21402
|
-
|
|
21403
|
-
...
|
|
21402
|
+
Pg,
|
|
21403
|
+
...Bg
|
|
21404
21404
|
];
|
|
21405
21405
|
n.contains = [...r, {
|
|
21406
21406
|
begin: /\(/,
|
|
@@ -21413,29 +21413,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21413
|
keywords: K,
|
|
21414
21414
|
contains: [
|
|
21415
21415
|
...o,
|
|
21416
|
+
qg,
|
|
21416
21417
|
Jg,
|
|
21417
|
-
|
|
21418
|
+
Zg,
|
|
21418
21419
|
Qg,
|
|
21419
21420
|
$g,
|
|
21420
|
-
|
|
21421
|
+
Yg,
|
|
21421
21422
|
Xg,
|
|
21422
|
-
Zg,
|
|
21423
21423
|
{
|
|
21424
21424
|
beginKeywords: "import",
|
|
21425
21425
|
end: /$/,
|
|
21426
21426
|
contains: [...o],
|
|
21427
21427
|
relevance: 0
|
|
21428
21428
|
},
|
|
21429
|
-
|
|
21429
|
+
Rg,
|
|
21430
21430
|
...q,
|
|
21431
21431
|
...J,
|
|
21432
|
-
...
|
|
21432
|
+
...Dg,
|
|
21433
21433
|
$,
|
|
21434
|
-
|
|
21434
|
+
Pg,
|
|
21435
|
+
...Bg,
|
|
21435
21436
|
...Vg,
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
Gg
|
|
21437
|
+
Hg,
|
|
21438
|
+
Wg
|
|
21439
21439
|
]
|
|
21440
21440
|
};
|
|
21441
21441
|
}
|
|
@@ -22045,7 +22045,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22045
22045
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22046
22046
|
subLanguage: "graphql"
|
|
22047
22047
|
}
|
|
22048
|
-
},
|
|
22048
|
+
}, Tg = {
|
|
22049
22049
|
className: "string",
|
|
22050
22050
|
begin: "`",
|
|
22051
22051
|
end: "`",
|
|
@@ -22087,21 +22087,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22087
22087
|
e.C_BLOCK_COMMENT_MODE,
|
|
22088
22088
|
e.C_LINE_COMMENT_MODE
|
|
22089
22089
|
]
|
|
22090
|
-
},
|
|
22090
|
+
}, Eg = [
|
|
22091
22091
|
e.APOS_STRING_MODE,
|
|
22092
22092
|
e.QUOTE_STRING_MODE,
|
|
22093
22093
|
z,
|
|
22094
22094
|
B,
|
|
22095
22095
|
H,
|
|
22096
|
-
|
|
22096
|
+
Tg,
|
|
22097
22097
|
{ match: /\$\d+/ },
|
|
22098
22098
|
I
|
|
22099
22099
|
];
|
|
22100
|
-
L.contains =
|
|
22100
|
+
L.contains = Eg.concat({
|
|
22101
22101
|
begin: /\{/,
|
|
22102
22102
|
end: /\}/,
|
|
22103
22103
|
keywords: E,
|
|
22104
|
-
contains: ["self"].concat(
|
|
22104
|
+
contains: ["self"].concat(Eg)
|
|
22105
22105
|
});
|
|
22106
22106
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
22107
22107
|
begin: /(\s*)\(/,
|
|
@@ -22142,7 +22142,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22142
22142
|
1: "keyword",
|
|
22143
22143
|
3: "title.class"
|
|
22144
22144
|
}
|
|
22145
|
-
}] },
|
|
22145
|
+
}] }, Dg = {
|
|
22146
22146
|
relevance: 0,
|
|
22147
22147
|
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]*)*/),
|
|
22148
22148
|
className: "title.class",
|
|
@@ -22152,7 +22152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22152
22152
|
className: "meta",
|
|
22153
22153
|
relevance: 10,
|
|
22154
22154
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22155
|
-
},
|
|
22155
|
+
}, Og = {
|
|
22156
22156
|
variants: [{ match: [
|
|
22157
22157
|
/function/,
|
|
22158
22158
|
/\s+/,
|
|
@@ -22171,25 +22171,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22171
22171
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22172
22172
|
className: "variable.constant"
|
|
22173
22173
|
};
|
|
22174
|
-
function
|
|
22174
|
+
function kg(e) {
|
|
22175
22175
|
return n.concat("(?!", e.join("|"), ")");
|
|
22176
22176
|
}
|
|
22177
|
-
let
|
|
22178
|
-
match: n.concat(/\b/,
|
|
22177
|
+
let Ag = {
|
|
22178
|
+
match: n.concat(/\b/, kg([
|
|
22179
22179
|
...l,
|
|
22180
22180
|
"super",
|
|
22181
22181
|
"import"
|
|
22182
22182
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22183
22183
|
className: "title.function",
|
|
22184
22184
|
relevance: 0
|
|
22185
|
-
},
|
|
22185
|
+
}, jg = {
|
|
22186
22186
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22187
22187
|
end: g,
|
|
22188
22188
|
excludeBegin: !0,
|
|
22189
22189
|
keywords: "prototype",
|
|
22190
22190
|
className: "property",
|
|
22191
22191
|
relevance: 0
|
|
22192
|
-
},
|
|
22192
|
+
}, Mg = {
|
|
22193
22193
|
match: [
|
|
22194
22194
|
/get|set/,
|
|
22195
22195
|
/\s+/,
|
|
@@ -22201,7 +22201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22201
22201
|
3: "title.function"
|
|
22202
22202
|
},
|
|
22203
22203
|
contains: [{ begin: /\(\)/ }, J]
|
|
22204
|
-
},
|
|
22204
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
22205
22205
|
match: [
|
|
22206
22206
|
/const|var|let/,
|
|
22207
22207
|
/\s+/,
|
|
@@ -22209,7 +22209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22209
22209
|
/\s*/,
|
|
22210
22210
|
/=\s*/,
|
|
22211
22211
|
/(async\s*)?/,
|
|
22212
|
-
n.lookahead(
|
|
22212
|
+
n.lookahead(Ng)
|
|
22213
22213
|
],
|
|
22214
22214
|
keywords: "async",
|
|
22215
22215
|
className: {
|
|
@@ -22229,7 +22229,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22229
22229
|
keywords: E,
|
|
22230
22230
|
exports: {
|
|
22231
22231
|
PARAMS_CONTAINS: q,
|
|
22232
|
-
CLASS_REFERENCE:
|
|
22232
|
+
CLASS_REFERENCE: Dg
|
|
22233
22233
|
},
|
|
22234
22234
|
illegal: /#(?![$_A-z])/,
|
|
22235
22235
|
contains: [
|
|
@@ -22244,17 +22244,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22244
22244
|
z,
|
|
22245
22245
|
B,
|
|
22246
22246
|
H,
|
|
22247
|
-
|
|
22247
|
+
Tg,
|
|
22248
22248
|
G,
|
|
22249
22249
|
{ match: /\$\d+/ },
|
|
22250
22250
|
I,
|
|
22251
|
-
|
|
22251
|
+
Dg,
|
|
22252
22252
|
{
|
|
22253
22253
|
scope: "attr",
|
|
22254
22254
|
match: g + n.lookahead(":"),
|
|
22255
22255
|
relevance: 0
|
|
22256
22256
|
},
|
|
22257
|
-
|
|
22257
|
+
Pg,
|
|
22258
22258
|
{
|
|
22259
22259
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22260
22260
|
keywords: "return throw case",
|
|
@@ -22264,7 +22264,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22264
22264
|
e.REGEXP_MODE,
|
|
22265
22265
|
{
|
|
22266
22266
|
className: "function",
|
|
22267
|
-
begin:
|
|
22267
|
+
begin: Ng,
|
|
22268
22268
|
returnBegin: !0,
|
|
22269
22269
|
end: "\\s*=>",
|
|
22270
22270
|
contains: [{
|
|
@@ -22321,7 +22321,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22321
22321
|
}
|
|
22322
22322
|
]
|
|
22323
22323
|
},
|
|
22324
|
-
|
|
22324
|
+
Og,
|
|
22325
22325
|
{ beginKeywords: "while if switch catch for" },
|
|
22326
22326
|
{
|
|
22327
22327
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -22336,7 +22336,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22336
22336
|
match: /\.\.\./,
|
|
22337
22337
|
relevance: 0
|
|
22338
22338
|
},
|
|
22339
|
-
|
|
22339
|
+
jg,
|
|
22340
22340
|
{
|
|
22341
22341
|
match: "\\$" + g,
|
|
22342
22342
|
relevance: 0
|
|
@@ -22346,10 +22346,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22346
22346
|
className: { 1: "title.function" },
|
|
22347
22347
|
contains: [J]
|
|
22348
22348
|
},
|
|
22349
|
-
|
|
22349
|
+
Ag,
|
|
22350
22350
|
$,
|
|
22351
22351
|
Z,
|
|
22352
|
-
|
|
22352
|
+
Mg,
|
|
22353
22353
|
{ match: /\$[(.]/ }
|
|
22354
22354
|
]
|
|
22355
22355
|
};
|
|
@@ -23485,7 +23485,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23485
23485
|
immediate: !0,
|
|
23486
23486
|
deep: !0
|
|
23487
23487
|
});
|
|
23488
|
-
let
|
|
23488
|
+
let Tg = () => {
|
|
23489
23489
|
let e = a.value?.innerText;
|
|
23490
23490
|
e && l(e);
|
|
23491
23491
|
};
|
|
@@ -23493,7 +23493,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23493
23493
|
id: "copy",
|
|
23494
23494
|
description: "复制",
|
|
23495
23495
|
name: "复制",
|
|
23496
|
-
onClick:
|
|
23496
|
+
onClick: Tg
|
|
23497
23497
|
})]), createElementVNode("pre", _hoisted_4$16, [createElementVNode("code", {
|
|
23498
23498
|
ref_key: "codeRef",
|
|
23499
23499
|
ref: a,
|
|
@@ -24527,7 +24527,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24527
24527
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24528
24528
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24529
24529
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24530
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24530
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, Tg = !1, G = getCurrentDocument(r), Eg = {
|
|
24531
24531
|
_document: G,
|
|
24532
24532
|
_isBlock: s
|
|
24533
24533
|
};
|
|
@@ -24535,9 +24535,9 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24535
24535
|
r.contentEditable = m ? "false" : "true", r.ariaReadOnly = m ? "true" : null;
|
|
24536
24536
|
}, g();
|
|
24537
24537
|
let K = createMutationObserver(r, () => {
|
|
24538
|
-
H && setSelectionToDOM(G, r, d,
|
|
24538
|
+
H && setSelectionToDOM(G, r, d, Eg);
|
|
24539
24539
|
}), q = () => {
|
|
24540
|
-
d = takeSelectionSnapshot(r,
|
|
24540
|
+
d = takeSelectionSnapshot(r, Eg);
|
|
24541
24541
|
}, J = () => {
|
|
24542
24542
|
let e = K._flush();
|
|
24543
24543
|
if (K._record(!1), e.length) {
|
|
@@ -24547,7 +24547,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24547
24547
|
for (let n = r.length - 1; n >= 0; n--) e.insertBefore(r[n], a);
|
|
24548
24548
|
for (let n = i.length - 1; n >= 0; n--) e.removeChild(i[n]);
|
|
24549
24549
|
} else n.target.nodeValue = n.oldValue;
|
|
24550
|
-
K._flush(), L = setSelectionToDOM(G, r, d,
|
|
24550
|
+
K._flush(), L = setSelectionToDOM(G, r, d, Eg);
|
|
24551
24551
|
}
|
|
24552
24552
|
E(z), B = !1, z = null;
|
|
24553
24553
|
}, Z = (e) => {
|
|
@@ -24561,7 +24561,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24561
24561
|
r && (l(n(r[0])), d = r[1]);
|
|
24562
24562
|
}
|
|
24563
24563
|
}
|
|
24564
|
-
},
|
|
24564
|
+
}, Dg = () => {
|
|
24565
24565
|
B || J();
|
|
24566
24566
|
}, Q = (e) => {
|
|
24567
24567
|
e.preventDefault();
|
|
@@ -24570,7 +24570,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24570
24570
|
B ? K._record(!0) : q();
|
|
24571
24571
|
let i = e.getTargetRanges()[0];
|
|
24572
24572
|
if (i) {
|
|
24573
|
-
let a = serializeRange(r,
|
|
24573
|
+
let a = serializeRange(r, Eg, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
24574
24574
|
if (o == null) {
|
|
24575
24575
|
let n = e.dataTransfer;
|
|
24576
24576
|
n && (o = n.getData("text/plain"));
|
|
@@ -24578,46 +24578,46 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24578
24578
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24579
24579
|
}
|
|
24580
24580
|
B || J();
|
|
24581
|
-
},
|
|
24581
|
+
}, Og = () => {
|
|
24582
24582
|
B || q(), B = !0;
|
|
24583
24583
|
}, $ = () => {
|
|
24584
24584
|
J();
|
|
24585
|
-
},
|
|
24585
|
+
}, kg = () => {
|
|
24586
24586
|
H = !0, q();
|
|
24587
|
-
},
|
|
24587
|
+
}, Ag = () => {
|
|
24588
24588
|
H = !1;
|
|
24589
|
-
},
|
|
24589
|
+
}, jg = () => {
|
|
24590
24590
|
if (L) {
|
|
24591
24591
|
L = !1;
|
|
24592
24592
|
return;
|
|
24593
24593
|
}
|
|
24594
|
-
H && !B && !
|
|
24595
|
-
},
|
|
24594
|
+
H && !B && !Tg && q();
|
|
24595
|
+
}, Mg = (e) => {
|
|
24596
24596
|
q(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24597
|
+
}, Ng = (e) => {
|
|
24598
|
+
e.preventDefault(), Mg(e.clipboardData);
|
|
24597
24599
|
}, Pg = (e) => {
|
|
24598
|
-
e.preventDefault(),
|
|
24600
|
+
e.preventDefault(), m || (Mg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24599
24601
|
}, Fg = (e) => {
|
|
24600
|
-
e.preventDefault(), m || (Ng(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24601
|
-
}, Ig = (e) => {
|
|
24602
24602
|
e.preventDefault();
|
|
24603
24603
|
let [n, r] = range(d);
|
|
24604
|
-
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData,
|
|
24605
|
-
},
|
|
24604
|
+
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, Eg)));
|
|
24605
|
+
}, Ig = (e) => {
|
|
24606
24606
|
e.preventDefault();
|
|
24607
|
-
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e,
|
|
24607
|
+
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, Eg);
|
|
24608
24608
|
if (n && i) {
|
|
24609
24609
|
let e = new Transaction();
|
|
24610
|
-
|
|
24610
|
+
Tg && e.delete(...range(d));
|
|
24611
24611
|
let o = e.transform(i);
|
|
24612
|
-
e.select(o, o).insert(o, a(n,
|
|
24612
|
+
e.select(o, o).insert(o, a(n, Eg)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24613
24613
|
}
|
|
24614
|
-
},
|
|
24615
|
-
|
|
24616
|
-
},
|
|
24617
|
-
|
|
24614
|
+
}, Lg = (e) => {
|
|
24615
|
+
Tg = !0, Mg(e.dataTransfer);
|
|
24616
|
+
}, Rg = () => {
|
|
24617
|
+
Tg = !1;
|
|
24618
24618
|
};
|
|
24619
|
-
return G.addEventListener("selectionchange",
|
|
24620
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange",
|
|
24619
|
+
return G.addEventListener("selectionchange", jg), r.addEventListener("keydown", Z), r.addEventListener("input", Dg), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", Og), r.addEventListener("compositionend", $), r.addEventListener("focus", kg), r.addEventListener("blur", Ag), r.addEventListener("copy", Ng), r.addEventListener("cut", Pg), r.addEventListener("paste", Fg), r.addEventListener("drop", Ig), r.addEventListener("dragstart", Lg), r.addEventListener("dragend", Rg), () => {
|
|
24620
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange", jg), r.removeEventListener("keydown", Z), r.removeEventListener("input", Dg), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", Og), r.removeEventListener("compositionend", $), r.removeEventListener("focus", kg), r.removeEventListener("blur", Ag), r.removeEventListener("copy", Ng), r.removeEventListener("cut", Pg), r.removeEventListener("paste", Fg), r.removeEventListener("drop", Ig), r.removeEventListener("dragstart", Lg), r.removeEventListener("dragend", Rg));
|
|
24621
24621
|
};
|
|
24622
24622
|
},
|
|
24623
24623
|
command: (e, ...n) => {
|
|
@@ -24960,7 +24960,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24960
24960
|
set(e) {
|
|
24961
24961
|
l.value = e, n();
|
|
24962
24962
|
}
|
|
24963
|
-
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H,
|
|
24963
|
+
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, Tg = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
|
|
24964
24964
|
setTimeout(() => {
|
|
24965
24965
|
let e = $();
|
|
24966
24966
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
@@ -24973,7 +24973,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24973
24973
|
}, J = (e) => {
|
|
24974
24974
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
24975
24975
|
e.key === "@" && (k.value = "slash", q()), e.key === "/" && (k.value = "prompt", q());
|
|
24976
|
-
},
|
|
24976
|
+
}, Dg = () => {
|
|
24977
24977
|
j.value = "";
|
|
24978
24978
|
}, $ = () => {
|
|
24979
24979
|
let e = {
|
|
@@ -25005,27 +25005,27 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25005
25005
|
} catch {
|
|
25006
25006
|
return e;
|
|
25007
25007
|
}
|
|
25008
|
-
},
|
|
25008
|
+
}, kg = (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), Ag = (e) => {
|
|
25009
25009
|
z.value.push(e), B.command(K);
|
|
25010
25010
|
let { column: n, line: r } = G.value;
|
|
25011
|
-
B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(),
|
|
25012
|
-
},
|
|
25011
|
+
B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(), jg();
|
|
25012
|
+
}, jg = () => {
|
|
25013
25013
|
setTimeout(() => {
|
|
25014
25014
|
let e = window.getSelection(), n = document.createRange();
|
|
25015
25015
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25016
25016
|
}, 100);
|
|
25017
|
-
},
|
|
25018
|
-
B.command(ReplaceAll, e),
|
|
25017
|
+
}, Ng = (e) => {
|
|
25018
|
+
B.command(ReplaceAll, e), jg();
|
|
25019
25019
|
};
|
|
25020
25020
|
watchEffect(() => {
|
|
25021
25021
|
j.value ? (I.value = u.resources.filter((e) => e.name.toLowerCase().includes(j.value.toLowerCase())), L.value = u.prompts.filter((e) => e.toLowerCase().includes(j.value.toLowerCase()))) : (I.value = u.resources, L.value = u.prompts), !I.value.length && !L.value.length && a.value?.hide();
|
|
25022
25022
|
});
|
|
25023
|
-
let
|
|
25023
|
+
let Pg = (e, n, r, i) => {
|
|
25024
25024
|
if (n.type === "tag") {
|
|
25025
|
-
let n =
|
|
25025
|
+
let n = kg(e, r);
|
|
25026
25026
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25027
25027
|
}
|
|
25028
|
-
},
|
|
25028
|
+
}, Lg = (e) => {
|
|
25029
25029
|
let n = e.clipboardData?.items;
|
|
25030
25030
|
if (!n) return;
|
|
25031
25031
|
let r = [];
|
|
@@ -25034,7 +25034,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25034
25034
|
n && r.push(n);
|
|
25035
25035
|
}
|
|
25036
25036
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25037
|
-
},
|
|
25037
|
+
}, zg = () => {
|
|
25038
25038
|
H?.(), B = createEditor({
|
|
25039
25039
|
doc: d.value,
|
|
25040
25040
|
schema: tagSchema,
|
|
@@ -25043,16 +25043,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25043
25043
|
},
|
|
25044
25044
|
onKeyDown: (e) => J(e)
|
|
25045
25045
|
}), H = B.input(i.value);
|
|
25046
|
-
},
|
|
25046
|
+
}, Vg = () => k.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
25047
25047
|
return onMounted(() => {
|
|
25048
|
-
|
|
25048
|
+
zg(), i.value?.addEventListener("paste", Lg);
|
|
25049
25049
|
}), onUnmounted(() => {
|
|
25050
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
25050
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Lg);
|
|
25051
25051
|
}), n({
|
|
25052
25052
|
cleanup: () => {
|
|
25053
25053
|
B.command(ReplaceAll, "");
|
|
25054
25054
|
},
|
|
25055
|
-
focus:
|
|
25055
|
+
focus: jg
|
|
25056
25056
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25057
25057
|
ref_key: "editorRef",
|
|
25058
25058
|
ref: i,
|
|
@@ -25066,11 +25066,11 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25066
25066
|
"data-tag-type": r.data.type
|
|
25067
25067
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25068
25068
|
class: "mention-tag-remove-icon",
|
|
25069
|
-
onClick: (a) =>
|
|
25069
|
+
onClick: (a) => Pg(e, r, i, n)
|
|
25070
25070
|
}, null, 8, ["onClick"])], 10, _hoisted_4$12)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$19), createVNode(unref(Tippy), {
|
|
25071
25071
|
ref_key: "tippyRef",
|
|
25072
25072
|
ref: a,
|
|
25073
|
-
"append-to": unref(
|
|
25073
|
+
"append-to": unref(Tg),
|
|
25074
25074
|
arrow: !1,
|
|
25075
25075
|
"hide-on-click": !0,
|
|
25076
25076
|
interactive: !0,
|
|
@@ -25080,16 +25080,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25080
25080
|
trigger: "manual",
|
|
25081
25081
|
"trigger-target": i.value,
|
|
25082
25082
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25083
|
-
onHidden:
|
|
25084
|
-
onShow:
|
|
25083
|
+
onHidden: Dg,
|
|
25084
|
+
onShow: Vg
|
|
25085
25085
|
}, {
|
|
25086
25086
|
content: withCtx(() => [k.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25087
25087
|
key: 0,
|
|
25088
|
-
"on-select":
|
|
25088
|
+
"on-select": Ag,
|
|
25089
25089
|
"resource-list": I.value
|
|
25090
25090
|
}, null, 8, ["resource-list"])) : k.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25091
25091
|
key: 1,
|
|
25092
|
-
"on-select":
|
|
25092
|
+
"on-select": Ng,
|
|
25093
25093
|
prompts: L.value
|
|
25094
25094
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25095
25095
|
_: 1
|
|
@@ -25190,11 +25190,11 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25190
25190
|
} catch (e) {
|
|
25191
25191
|
console.error(e);
|
|
25192
25192
|
}
|
|
25193
|
-
},
|
|
25193
|
+
}, Tg = () => {
|
|
25194
25194
|
s.value = "";
|
|
25195
25195
|
}, G = (e) => {
|
|
25196
25196
|
T("selectShortcut", e);
|
|
25197
|
-
},
|
|
25197
|
+
}, Eg = () => {
|
|
25198
25198
|
T("deleteShortcut");
|
|
25199
25199
|
}, J = async (e) => {
|
|
25200
25200
|
if (L.value) for (let n of e) {
|
|
@@ -25229,7 +25229,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25229
25229
|
key: 0,
|
|
25230
25230
|
class: "chat-input-cite",
|
|
25231
25231
|
content: s.value,
|
|
25232
|
-
onClose:
|
|
25232
|
+
onClose: Tg
|
|
25233
25233
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25234
25234
|
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: O.value })), () => [O.value.length ? (openBlock(), createElementBlock("div", {
|
|
25235
25235
|
key: 0,
|
|
@@ -25276,7 +25276,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25276
25276
|
class: "selected-shortcut-btn",
|
|
25277
25277
|
shortcut: k.value
|
|
25278
25278
|
}, {
|
|
25279
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25279
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: Eg })]),
|
|
25280
25280
|
_: 1
|
|
25281
25281
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25282
25282
|
]),
|
|
@@ -26604,7 +26604,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26604
26604
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
26605
26605
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
26606
26606
|
}));
|
|
26607
|
-
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")),
|
|
26607
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), Tg = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), Dg = (e) => K.value ? e : t("暂无使用权限"), Q = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), $ = computed(() => {
|
|
26608
26608
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
26609
26609
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
26610
26610
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -26626,7 +26626,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26626
26626
|
${a}
|
|
26627
26627
|
</div>
|
|
26628
26628
|
`;
|
|
26629
|
-
}),
|
|
26629
|
+
}), kg = async () => {
|
|
26630
26630
|
if (i.sessionBusinessManager) try {
|
|
26631
26631
|
await i.sessionBusinessManager.createNewSession();
|
|
26632
26632
|
} catch (e) {
|
|
@@ -26636,18 +26636,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26636
26636
|
});
|
|
26637
26637
|
}
|
|
26638
26638
|
a("new-chat");
|
|
26639
|
-
},
|
|
26639
|
+
}, jg = (e) => {
|
|
26640
26640
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26641
|
-
},
|
|
26641
|
+
}, Mg = () => {
|
|
26642
26642
|
a("help-click");
|
|
26643
|
-
},
|
|
26643
|
+
}, Ng = (e) => {
|
|
26644
26644
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26645
|
-
},
|
|
26645
|
+
}, Pg = (e) => {
|
|
26646
26646
|
e.stopPropagation(), e.preventDefault();
|
|
26647
26647
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26648
26648
|
if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
|
|
26649
26649
|
case "rename":
|
|
26650
|
-
|
|
26650
|
+
Fg();
|
|
26651
26651
|
break;
|
|
26652
26652
|
case "auto-generate":
|
|
26653
26653
|
a("auto-generate-name");
|
|
@@ -26656,9 +26656,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26656
26656
|
a("share");
|
|
26657
26657
|
break;
|
|
26658
26658
|
}
|
|
26659
|
-
},
|
|
26660
|
-
document.removeEventListener("click",
|
|
26661
|
-
document.addEventListener("click",
|
|
26659
|
+
}, Fg = () => {
|
|
26660
|
+
document.removeEventListener("click", Vg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26661
|
+
document.addEventListener("click", Vg);
|
|
26662
26662
|
}, 100), setTimeout(() => {
|
|
26663
26663
|
if (I.value) try {
|
|
26664
26664
|
let e = I.value;
|
|
@@ -26669,22 +26669,22 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26669
26669
|
console.warn("Failed to focus rename input:", e);
|
|
26670
26670
|
}
|
|
26671
26671
|
}, 100);
|
|
26672
|
-
},
|
|
26672
|
+
}, Lg = () => {
|
|
26673
26673
|
let e = j.value.trim();
|
|
26674
26674
|
if (!e) {
|
|
26675
|
-
|
|
26675
|
+
zg();
|
|
26676
26676
|
return;
|
|
26677
26677
|
}
|
|
26678
26678
|
a("rename", e), k.value = !1, j.value = "";
|
|
26679
|
-
},
|
|
26679
|
+
}, zg = () => {
|
|
26680
26680
|
k.value = !1, j.value = "";
|
|
26681
|
-
},
|
|
26682
|
-
j.value = e, n.key === "Enter" ?
|
|
26683
|
-
},
|
|
26681
|
+
}, Bg = (e, n) => {
|
|
26682
|
+
j.value = e, n.key === "Enter" ? Lg() : n.key === "Escape" && zg();
|
|
26683
|
+
}, Vg = (e) => {
|
|
26684
26684
|
if (!k.value) return;
|
|
26685
26685
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26686
|
-
r && !r.contains(n) &&
|
|
26687
|
-
},
|
|
26686
|
+
r && !r.contains(n) && zg();
|
|
26687
|
+
}, Hg = async () => {
|
|
26688
26688
|
if (!u.value) return;
|
|
26689
26689
|
let e = (await import("tippy.js")).default;
|
|
26690
26690
|
L &&= (L.destroy(), null), L = e(u.value, {
|
|
@@ -26700,13 +26700,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26700
26700
|
onShow: () => {
|
|
26701
26701
|
setTimeout(() => {
|
|
26702
26702
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26703
|
-
e.addEventListener("click",
|
|
26703
|
+
e.addEventListener("click", Pg);
|
|
26704
26704
|
});
|
|
26705
26705
|
}, 0);
|
|
26706
26706
|
},
|
|
26707
26707
|
onHide: () => {
|
|
26708
26708
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26709
|
-
e.removeEventListener("click",
|
|
26709
|
+
e.removeEventListener("click", Pg);
|
|
26710
26710
|
});
|
|
26711
26711
|
}
|
|
26712
26712
|
});
|
|
@@ -26714,9 +26714,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26714
26714
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26715
26715
|
L && L.setContent($.value);
|
|
26716
26716
|
}), onMounted(() => {
|
|
26717
|
-
|
|
26717
|
+
Hg(), i.sessionBusinessManager && B(), document.addEventListener("click", Vg);
|
|
26718
26718
|
}), onBeforeUnmount(() => {
|
|
26719
|
-
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click",
|
|
26719
|
+
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Vg);
|
|
26720
26720
|
}), n({
|
|
26721
26721
|
headerRef: s,
|
|
26722
26722
|
historyIconRef: l
|
|
@@ -26739,13 +26739,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26739
26739
|
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
26740
26740
|
class: "rename-input",
|
|
26741
26741
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26742
|
-
onKeyup:
|
|
26742
|
+
onKeyup: Bg
|
|
26743
26743
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26744
26744
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26745
|
-
onClick:
|
|
26745
|
+
onClick: Lg
|
|
26746
26746
|
}), createElementVNode("i", {
|
|
26747
26747
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26748
|
-
onClick:
|
|
26748
|
+
onClick: zg
|
|
26749
26749
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26750
26750
|
], 2),
|
|
26751
26751
|
i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26753,7 +26753,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26753
26753
|
ref_key: "moreIconRef",
|
|
26754
26754
|
ref: u,
|
|
26755
26755
|
class: "bkai-icon bkai-more",
|
|
26756
|
-
onClick:
|
|
26756
|
+
onClick: Ng
|
|
26757
26757
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26758
26758
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26759
26759
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26765,9 +26765,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26765
26765
|
{ disabled: !K.value }
|
|
26766
26766
|
]),
|
|
26767
26767
|
style: normalizeStyle(Q()),
|
|
26768
|
-
onClick: r[1] ||= (e) => K.value ?
|
|
26768
|
+
onClick: r[1] ||= (e) => K.value ? kg() : void 0
|
|
26769
26769
|
}, null, 6)), [[unref(o), {
|
|
26770
|
-
content:
|
|
26770
|
+
content: Dg(unref(t)("新增会话")),
|
|
26771
26771
|
boundary: "parent"
|
|
26772
26772
|
}]]) : createCommentVNode("v-if", !0),
|
|
26773
26773
|
createCommentVNode(" 历史会话按钮 "),
|
|
@@ -26781,15 +26781,15 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26781
26781
|
{ disabled: !K.value }
|
|
26782
26782
|
]),
|
|
26783
26783
|
style: normalizeStyle(Q()),
|
|
26784
|
-
onClick: r[2] ||= (e) => K.value ?
|
|
26784
|
+
onClick: r[2] ||= (e) => K.value ? jg(e) : void 0
|
|
26785
26785
|
}, null, 6)), [[unref(o), {
|
|
26786
|
-
content:
|
|
26786
|
+
content: Dg(unref(t)("历史会话")),
|
|
26787
26787
|
boundary: "parent"
|
|
26788
26788
|
}]]) : createCommentVNode("v-if", !0),
|
|
26789
26789
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26790
26790
|
key: 2,
|
|
26791
26791
|
class: "bkai-icon bkai-zhushou",
|
|
26792
|
-
onClick:
|
|
26792
|
+
onClick: Mg
|
|
26793
26793
|
}, null, 512)), [[unref(o), {
|
|
26794
26794
|
content: unref(t)("转人工"),
|
|
26795
26795
|
boundary: "parent"
|
|
@@ -26798,7 +26798,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26798
26798
|
key: 3,
|
|
26799
26799
|
ref_key: "compressionRef",
|
|
26800
26800
|
ref: m,
|
|
26801
|
-
class: normalizeClass(["bkai-icon",
|
|
26801
|
+
class: normalizeClass(["bkai-icon", Tg.value]),
|
|
26802
26802
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
26803
26803
|
}, null, 2)), [[unref(o), {
|
|
26804
26804
|
content: G.value,
|
|
@@ -27636,7 +27636,7 @@ var UIStateManager = class {
|
|
|
27636
27636
|
a("receive-text");
|
|
27637
27637
|
},
|
|
27638
27638
|
onDone: () => {
|
|
27639
|
-
a("receive-end"),
|
|
27639
|
+
a("receive-end"), f_();
|
|
27640
27640
|
},
|
|
27641
27641
|
onError: (e) => {
|
|
27642
27642
|
a("error", e);
|
|
@@ -27652,7 +27652,7 @@ var UIStateManager = class {
|
|
|
27652
27652
|
return n.injectMessageModule(r.message), r;
|
|
27653
27653
|
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), K = async (e, n) => {
|
|
27654
27654
|
if (e.id === "cite") {
|
|
27655
|
-
|
|
27655
|
+
Jg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), k_();
|
|
27656
27656
|
return;
|
|
27657
27657
|
}
|
|
27658
27658
|
if (e.id === "rebuild") {
|
|
@@ -27664,7 +27664,7 @@ var UIStateManager = class {
|
|
|
27664
27664
|
return;
|
|
27665
27665
|
}
|
|
27666
27666
|
if (e.id === "share") {
|
|
27667
|
-
|
|
27667
|
+
Bg && (O.value = !0), a("request-share");
|
|
27668
27668
|
return;
|
|
27669
27669
|
}
|
|
27670
27670
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27676,7 +27676,7 @@ var UIStateManager = class {
|
|
|
27676
27676
|
}
|
|
27677
27677
|
}
|
|
27678
27678
|
console.log("handleAgentAction", e, n);
|
|
27679
|
-
},
|
|
27679
|
+
}, Dg = async (e, n, r, i) => {
|
|
27680
27680
|
if (!z) {
|
|
27681
27681
|
console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
|
|
27682
27682
|
return;
|
|
@@ -27686,7 +27686,7 @@ var UIStateManager = class {
|
|
|
27686
27686
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27687
27687
|
return;
|
|
27688
27688
|
}
|
|
27689
|
-
let s = findLastUserMessageIdBefore(
|
|
27689
|
+
let s = findLastUserMessageIdBefore(Gg?.messages.value || [], n[0]);
|
|
27690
27690
|
if (s === void 0) {
|
|
27691
27691
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27692
27692
|
return;
|
|
@@ -27704,12 +27704,12 @@ var UIStateManager = class {
|
|
|
27704
27704
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27705
27705
|
}
|
|
27706
27706
|
}, Q = async (e) => {
|
|
27707
|
-
if (!
|
|
27707
|
+
if (!Gg || !z) {
|
|
27708
27708
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27709
27709
|
return;
|
|
27710
27710
|
}
|
|
27711
27711
|
try {
|
|
27712
|
-
let n =
|
|
27712
|
+
let n = Gg.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27713
27713
|
if (!r) {
|
|
27714
27714
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27715
27715
|
return;
|
|
@@ -27720,7 +27720,7 @@ var UIStateManager = class {
|
|
|
27720
27720
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27721
27721
|
}
|
|
27722
27722
|
}, $ = async (e) => {
|
|
27723
|
-
if (!
|
|
27723
|
+
if (!Gg || !z) {
|
|
27724
27724
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27725
27725
|
return;
|
|
27726
27726
|
}
|
|
@@ -27730,21 +27730,21 @@ var UIStateManager = class {
|
|
|
27730
27730
|
return;
|
|
27731
27731
|
}
|
|
27732
27732
|
try {
|
|
27733
|
-
await
|
|
27733
|
+
await Gg.regenerateFromAIMessages(e, n), f_();
|
|
27734
27734
|
} catch (e) {
|
|
27735
27735
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27736
27736
|
}
|
|
27737
|
-
},
|
|
27737
|
+
}, kg = async (e, n) => {
|
|
27738
27738
|
if (e.id === "delete") {
|
|
27739
|
-
await
|
|
27739
|
+
await Lg(n);
|
|
27740
27740
|
return;
|
|
27741
27741
|
}
|
|
27742
27742
|
if (e.id === "cite") {
|
|
27743
|
-
|
|
27743
|
+
Jg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), k_();
|
|
27744
27744
|
return;
|
|
27745
27745
|
}
|
|
27746
27746
|
console.log("handleUserAction", e, n);
|
|
27747
|
-
},
|
|
27747
|
+
}, jg = async (e, n, r) => {
|
|
27748
27748
|
if (!z) {
|
|
27749
27749
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27750
27750
|
return;
|
|
@@ -27760,12 +27760,12 @@ var UIStateManager = class {
|
|
|
27760
27760
|
return;
|
|
27761
27761
|
}
|
|
27762
27762
|
try {
|
|
27763
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
27763
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), f_();
|
|
27764
27764
|
} catch (e) {
|
|
27765
27765
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27766
27766
|
}
|
|
27767
|
-
},
|
|
27768
|
-
if (!
|
|
27767
|
+
}, Mg = async (e, n) => {
|
|
27768
|
+
if (!Gg || !z) {
|
|
27769
27769
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27770
27770
|
return;
|
|
27771
27771
|
}
|
|
@@ -27780,26 +27780,26 @@ var UIStateManager = class {
|
|
|
27780
27780
|
return;
|
|
27781
27781
|
}
|
|
27782
27782
|
try {
|
|
27783
|
-
let a =
|
|
27783
|
+
let a = Pg(e);
|
|
27784
27784
|
if (!a) {
|
|
27785
27785
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27786
27786
|
return;
|
|
27787
27787
|
}
|
|
27788
|
-
let o =
|
|
27789
|
-
await
|
|
27788
|
+
let o = w_(a, n), s = String(n.input ?? "");
|
|
27789
|
+
await Gg.resendMessageWithProperty(String(i), r, s, o), f_();
|
|
27790
27790
|
} catch (e) {
|
|
27791
27791
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27792
27792
|
}
|
|
27793
|
-
},
|
|
27793
|
+
}, Pg = (e) => {
|
|
27794
27794
|
let n = e.property?.extra;
|
|
27795
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27796
|
-
},
|
|
27797
|
-
if (!
|
|
27795
|
+
return n?.shortcut ? n.shortcut : n?.command ? d_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27796
|
+
}, Lg = async (e) => {
|
|
27797
|
+
if (!Gg || !z) {
|
|
27798
27798
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27799
27799
|
return;
|
|
27800
27800
|
}
|
|
27801
27801
|
try {
|
|
27802
|
-
let n =
|
|
27802
|
+
let n = Gg.messages.value, r = n.findIndex((n) => n === e);
|
|
27803
27803
|
if (r === -1) {
|
|
27804
27804
|
console.error("[ChatBot] User message not found in messages list");
|
|
27805
27805
|
return;
|
|
@@ -27815,29 +27815,29 @@ var UIStateManager = class {
|
|
|
27815
27815
|
} catch (e) {
|
|
27816
27816
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27817
27817
|
}
|
|
27818
|
-
},
|
|
27818
|
+
}, zg = async () => {
|
|
27819
27819
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27820
|
-
},
|
|
27820
|
+
}, Bg = !i.chatHelper, Vg = computed(() => Bg ? O.value : i.enableSelection), Hg = computed(() => Bg ? k.value : i.shareLoading), Ug = z ? new SessionBusinessManager(z.session, z.message, null, {
|
|
27821
27821
|
enableChatSession: !0,
|
|
27822
27822
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27823
27823
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27824
27824
|
initialSessionCode: i.sessionCode
|
|
27825
|
-
}) : null,
|
|
27825
|
+
}) : null, Gg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
27826
27826
|
openingRemark: i.helloText,
|
|
27827
27827
|
predefinedQuestions: i.prompts,
|
|
27828
27828
|
placeholder: i.placeholder
|
|
27829
|
-
}) : null,
|
|
27829
|
+
}) : null, Kg = new ShortcutManager(null, i.shortcuts || []), qg = shallowRef([[]]), Jg = ref(""), Yg = computed(() => Gg?.messages.value ?? []), Xg = computed(() => Gg?.isMessagesLoading.value ?? !1), Zg = computed(() => Gg?.isGenerating.value ?? !1), Qg = computed(() => Ug?.currentSession.value ?? null), $g = computed(() => Bg && !j.value ? !1 : !Xg.value && Yg.value.length === 0), e_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), t_ = computed(() => i.resources?.length ? i.resources : flattenResources(z?.agent.info.value?.resources)), n_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), r_ = computed(() => ({
|
|
27830
27830
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27831
27831
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27832
|
-
})),
|
|
27833
|
-
let e =
|
|
27832
|
+
})), o_ = computed(() => {
|
|
27833
|
+
let e = Kg.shortcuts.value;
|
|
27834
27834
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27835
|
-
}),
|
|
27836
|
-
T.value = [],
|
|
27837
|
-
},
|
|
27835
|
+
}), s_ = () => {
|
|
27836
|
+
T.value = [], Bg && (O.value = !1), a("cancel-share");
|
|
27837
|
+
}, c_ = async () => {
|
|
27838
27838
|
let e = T.value;
|
|
27839
|
-
|
|
27840
|
-
},
|
|
27839
|
+
Bg && await l_(e), a("confirm-share", e);
|
|
27840
|
+
}, l_ = async (e) => {
|
|
27841
27841
|
if (!z || e.length === 0) return;
|
|
27842
27842
|
let n = z.session.current?.value?.sessionCode;
|
|
27843
27843
|
if (!n) {
|
|
@@ -27859,42 +27859,42 @@ var UIStateManager = class {
|
|
|
27859
27859
|
} finally {
|
|
27860
27860
|
k.value = !1, O.value = !1, T.value = [];
|
|
27861
27861
|
}
|
|
27862
|
-
},
|
|
27863
|
-
e ? T.value =
|
|
27864
|
-
},
|
|
27862
|
+
}, u_ = (e) => {
|
|
27863
|
+
e ? T.value = Yg.value : T.value = [];
|
|
27864
|
+
}, d_ = Kg.effectiveShortcuts;
|
|
27865
27865
|
watch(() => i.shortcuts, (e) => {
|
|
27866
|
-
|
|
27866
|
+
Kg.setShortcuts(e || []);
|
|
27867
27867
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27868
|
-
e &&
|
|
27868
|
+
e && Kg.setAgentShortcuts(e);
|
|
27869
27869
|
}, { immediate: !0 });
|
|
27870
|
-
let
|
|
27870
|
+
let f_ = async () => {
|
|
27871
27871
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27872
|
-
},
|
|
27873
|
-
if (!
|
|
27872
|
+
}, p_ = async (e, n = {}) => {
|
|
27873
|
+
if (!Gg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
27874
27874
|
let r = z.session.current?.value?.sessionCode;
|
|
27875
27875
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
27876
|
-
|
|
27877
|
-
},
|
|
27876
|
+
qg.value = [[]], Jg.value = "", a("send-message", typeof e == "string" ? e : ""), await Gg.sendMessage(e, r, n);
|
|
27877
|
+
}, m_ = async (e) => {
|
|
27878
27878
|
let n = z?.session.current?.value?.sessionCode;
|
|
27879
27879
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
27880
27880
|
let r = await z.session.uploadFile(n, e);
|
|
27881
27881
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
27882
27882
|
return r;
|
|
27883
|
-
},
|
|
27883
|
+
}, g_ = async (e, n) => {
|
|
27884
27884
|
try {
|
|
27885
27885
|
let n = {};
|
|
27886
|
-
|
|
27886
|
+
Jg.value && (n.cite = Jg.value), u.value && (n.command = u.value.id), await p_(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
27887
27887
|
} catch (e) {
|
|
27888
27888
|
console.error("Failed to send message:", e), a("error", e);
|
|
27889
27889
|
}
|
|
27890
|
-
},
|
|
27891
|
-
|
|
27892
|
-
},
|
|
27893
|
-
|
|
27890
|
+
}, __ = async () => {
|
|
27891
|
+
E_();
|
|
27892
|
+
}, y_ = (e, n) => {
|
|
27893
|
+
S_(e, n), a("shortcut-click", {
|
|
27894
27894
|
shortcut: e,
|
|
27895
27895
|
source: "main"
|
|
27896
27896
|
});
|
|
27897
|
-
},
|
|
27897
|
+
}, S_ = (e, n) => {
|
|
27898
27898
|
let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
|
|
27899
27899
|
u.value = {
|
|
27900
27900
|
...r,
|
|
@@ -27903,9 +27903,9 @@ var UIStateManager = class {
|
|
|
27903
27903
|
[i]: n || ""
|
|
27904
27904
|
}
|
|
27905
27905
|
};
|
|
27906
|
-
},
|
|
27906
|
+
}, C_ = () => {
|
|
27907
27907
|
u.value = null;
|
|
27908
|
-
},
|
|
27908
|
+
}, w_ = (e, n) => {
|
|
27909
27909
|
let r = e.components || [];
|
|
27910
27910
|
return { extra: {
|
|
27911
27911
|
cite: {
|
|
@@ -27925,42 +27925,42 @@ var UIStateManager = class {
|
|
|
27925
27925
|
__value: n[e.key]
|
|
27926
27926
|
}))
|
|
27927
27927
|
} };
|
|
27928
|
-
},
|
|
27928
|
+
}, T_ = async (e) => {
|
|
27929
27929
|
if (!u.value) {
|
|
27930
27930
|
console.error("[ChatBot] No selected shortcut");
|
|
27931
27931
|
return;
|
|
27932
27932
|
}
|
|
27933
|
-
let n =
|
|
27934
|
-
|
|
27933
|
+
let n = w_(u.value, e), r = u.value.name, i = u.value;
|
|
27934
|
+
C_();
|
|
27935
27935
|
try {
|
|
27936
|
-
await
|
|
27936
|
+
await p_(r, { property: n });
|
|
27937
27937
|
} catch (e) {
|
|
27938
27938
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
27939
27939
|
}
|
|
27940
|
-
},
|
|
27941
|
-
if (!
|
|
27940
|
+
}, E_ = () => {
|
|
27941
|
+
if (!Gg) {
|
|
27942
27942
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27943
27943
|
return;
|
|
27944
27944
|
}
|
|
27945
|
-
|
|
27946
|
-
},
|
|
27947
|
-
if (!
|
|
27945
|
+
Gg.stopGeneration(), a("stop");
|
|
27946
|
+
}, D_ = async (e) => {
|
|
27947
|
+
if (!Ug) {
|
|
27948
27948
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27949
27949
|
return;
|
|
27950
27950
|
}
|
|
27951
27951
|
try {
|
|
27952
|
-
await
|
|
27952
|
+
await Ug.switchSession(e), a("session-switched", Ug.currentSession.value);
|
|
27953
27953
|
} catch (e) {
|
|
27954
27954
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27955
27955
|
}
|
|
27956
|
-
},
|
|
27957
|
-
|
|
27958
|
-
},
|
|
27956
|
+
}, O_ = (e) => {
|
|
27957
|
+
Jg.value = e;
|
|
27958
|
+
}, k_ = () => {
|
|
27959
27959
|
l.value?.focus?.();
|
|
27960
27960
|
};
|
|
27961
27961
|
return onMounted(async () => {
|
|
27962
27962
|
if (!(!z || I.value)) try {
|
|
27963
|
-
if (
|
|
27963
|
+
if (Bg) {
|
|
27964
27964
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
27965
27965
|
else if (z.session.list.value.length > 0) {
|
|
27966
27966
|
let e = z.session.list.value[0];
|
|
@@ -27973,38 +27973,38 @@ var UIStateManager = class {
|
|
|
27973
27973
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
27974
27974
|
}
|
|
27975
27975
|
}), onBeforeUnmount(() => {
|
|
27976
|
-
|
|
27976
|
+
Bg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
27977
27977
|
}), n({
|
|
27978
|
-
sendMessage: (e) =>
|
|
27979
|
-
stopGeneration:
|
|
27980
|
-
switchSession:
|
|
27981
|
-
messages:
|
|
27982
|
-
currentSession:
|
|
27983
|
-
isGenerating:
|
|
27978
|
+
sendMessage: (e) => g_(e, [[]]),
|
|
27979
|
+
stopGeneration: E_,
|
|
27980
|
+
switchSession: D_,
|
|
27981
|
+
messages: Yg,
|
|
27982
|
+
currentSession: Qg,
|
|
27983
|
+
isGenerating: Zg,
|
|
27984
27984
|
getChatHelper: () => z,
|
|
27985
|
-
setCiteText:
|
|
27986
|
-
focusInput:
|
|
27985
|
+
setCiteText: O_,
|
|
27986
|
+
focusInput: k_,
|
|
27987
27987
|
selectShortcut: (e, n) => {
|
|
27988
|
-
|
|
27988
|
+
S_(e, n);
|
|
27989
27989
|
}
|
|
27990
27990
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
27991
27991
|
class: normalizeClass([
|
|
27992
27992
|
"ai-chatbot",
|
|
27993
27993
|
i.extCls,
|
|
27994
|
-
{ "welcome-state":
|
|
27994
|
+
{ "welcome-state": $g.value }
|
|
27995
27995
|
]),
|
|
27996
|
-
style: normalizeStyle(
|
|
27997
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) :
|
|
27996
|
+
style: normalizeStyle(r_.value)
|
|
27997
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : Bg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
27998
27998
|
mode: "spin",
|
|
27999
27999
|
size: "small",
|
|
28000
28000
|
theme: "primary"
|
|
28001
28001
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
28002
28002
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
28003
|
-
|
|
28003
|
+
$g.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), e_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: e_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28004
28004
|
ref_key: "messagesContainerRef",
|
|
28005
28005
|
ref: s,
|
|
28006
28006
|
class: "chatbot-messages"
|
|
28007
|
-
}, [
|
|
28007
|
+
}, [Xg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28008
28008
|
mode: "spin",
|
|
28009
28009
|
size: "small",
|
|
28010
28010
|
theme: "primary"
|
|
@@ -28012,17 +28012,17 @@ var UIStateManager = class {
|
|
|
28012
28012
|
key: 1,
|
|
28013
28013
|
"selected-messages": T.value,
|
|
28014
28014
|
"onUpdate:selectedMessages": n[0] ||= (e) => T.value = e,
|
|
28015
|
-
"enable-selection":
|
|
28015
|
+
"enable-selection": Vg.value,
|
|
28016
28016
|
"message-status": B.value,
|
|
28017
28017
|
"message-tools-status": H.value,
|
|
28018
28018
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28019
|
-
messages:
|
|
28019
|
+
messages: Yg.value,
|
|
28020
28020
|
"on-agent-action": K,
|
|
28021
|
-
"on-agent-feedback":
|
|
28022
|
-
"on-user-action":
|
|
28023
|
-
"on-user-input-confirm":
|
|
28024
|
-
"on-user-shortcut-confirm":
|
|
28025
|
-
onStopStreaming:
|
|
28021
|
+
"on-agent-feedback": Dg,
|
|
28022
|
+
"on-user-action": kg,
|
|
28023
|
+
"on-user-input-confirm": jg,
|
|
28024
|
+
"on-user-shortcut-confirm": Mg,
|
|
28025
|
+
onStopStreaming: zg
|
|
28026
28026
|
}, null, 8, [
|
|
28027
28027
|
"selected-messages",
|
|
28028
28028
|
"enable-selection",
|
|
@@ -28032,39 +28032,39 @@ var UIStateManager = class {
|
|
|
28032
28032
|
"messages"
|
|
28033
28033
|
]))], 512)], 2112)),
|
|
28034
28034
|
createCommentVNode(" 统一底部区域 "),
|
|
28035
|
-
|
|
28035
|
+
!$g.value && Vg.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28036
28036
|
key: 2,
|
|
28037
|
-
"is-all-selected": T.value.length ===
|
|
28038
|
-
loading:
|
|
28037
|
+
"is-all-selected": T.value.length === Yg.value.length,
|
|
28038
|
+
loading: Hg.value,
|
|
28039
28039
|
"selected-count": T.value.length,
|
|
28040
|
-
onCancel:
|
|
28041
|
-
onConfirm:
|
|
28042
|
-
onToggleAll:
|
|
28040
|
+
onCancel: s_,
|
|
28041
|
+
onConfirm: c_,
|
|
28042
|
+
onToggleAll: u_
|
|
28043
28043
|
}, null, 8, [
|
|
28044
28044
|
"is-all-selected",
|
|
28045
28045
|
"loading",
|
|
28046
28046
|
"selected-count"
|
|
28047
28047
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28048
|
-
onClose:
|
|
28049
|
-
onSubmit:
|
|
28048
|
+
onClose: C_,
|
|
28049
|
+
onSubmit: T_
|
|
28050
28050
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28051
28051
|
ref_key: "chatInputRef",
|
|
28052
28052
|
ref: l,
|
|
28053
|
-
modelValue:
|
|
28054
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
28055
|
-
cite:
|
|
28056
|
-
"onUpdate:cite": n[2] ||= (e) =>
|
|
28053
|
+
modelValue: qg.value,
|
|
28054
|
+
"onUpdate:modelValue": n[1] ||= (e) => qg.value = e,
|
|
28055
|
+
cite: Jg.value,
|
|
28056
|
+
"onUpdate:cite": n[2] ||= (e) => Jg.value = e,
|
|
28057
28057
|
"message-status": B.value,
|
|
28058
|
-
"on-send-message":
|
|
28059
|
-
"on-stop-sending":
|
|
28060
|
-
"on-upload":
|
|
28058
|
+
"on-send-message": g_,
|
|
28059
|
+
"on-stop-sending": __,
|
|
28060
|
+
"on-upload": m_,
|
|
28061
28061
|
placeholder: i.placeholder,
|
|
28062
|
-
prompts:
|
|
28063
|
-
resources:
|
|
28062
|
+
prompts: n_.value,
|
|
28063
|
+
resources: t_.value,
|
|
28064
28064
|
"shortcut-id": u.value?.id,
|
|
28065
|
-
shortcuts:
|
|
28066
|
-
onDeleteShortcut:
|
|
28067
|
-
onSelectShortcut:
|
|
28065
|
+
shortcuts: o_.value,
|
|
28066
|
+
onDeleteShortcut: C_,
|
|
28067
|
+
onSelectShortcut: y_
|
|
28068
28068
|
}, null, 8, [
|
|
28069
28069
|
"modelValue",
|
|
28070
28070
|
"cite",
|
|
@@ -28894,7 +28894,7 @@ function useDraggable(e = {}, n) {
|
|
|
28894
28894
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
28895
28895
|
}, H = (e, r, i, a) => {
|
|
28896
28896
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
28897
|
-
},
|
|
28897
|
+
}, Tg = () => {
|
|
28898
28898
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
28899
28899
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
28900
28900
|
else {
|
|
@@ -28905,7 +28905,7 @@ function useDraggable(e = {}, n) {
|
|
|
28905
28905
|
}
|
|
28906
28906
|
T.value > O.value && (T.value = O.value);
|
|
28907
28907
|
});
|
|
28908
|
-
},
|
|
28908
|
+
}, Eg = () => {
|
|
28909
28909
|
k.value ? (_.value = d.value, nextTick(() => {
|
|
28910
28910
|
E.value = m.value, v.value = u.value, T.value = g.value;
|
|
28911
28911
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
@@ -28915,9 +28915,9 @@ function useDraggable(e = {}, n) {
|
|
|
28915
28915
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28916
28916
|
};
|
|
28917
28917
|
return onMounted(() => {
|
|
28918
|
-
window.addEventListener("resize",
|
|
28918
|
+
window.addEventListener("resize", Tg);
|
|
28919
28919
|
}), onBeforeUnmount(() => {
|
|
28920
|
-
window.removeEventListener("resize",
|
|
28920
|
+
window.removeEventListener("resize", Tg);
|
|
28921
28921
|
}), {
|
|
28922
28922
|
minWidth: i,
|
|
28923
28923
|
minHeight: a,
|
|
@@ -28931,7 +28931,7 @@ function useDraggable(e = {}, n) {
|
|
|
28931
28931
|
handleResizing: z,
|
|
28932
28932
|
handleDragStop: B,
|
|
28933
28933
|
handleResizeStop: H,
|
|
28934
|
-
toggleCompression:
|
|
28934
|
+
toggleCompression: Eg,
|
|
28935
28935
|
updatePosition: K,
|
|
28936
28936
|
updateSize: q,
|
|
28937
28937
|
updatePositionAndSize: (e, n, r, i) => {
|
|
@@ -28976,7 +28976,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28976
28976
|
"compression-change"
|
|
28977
28977
|
],
|
|
28978
28978
|
setup(e, { expose: n, emit: r }) {
|
|
28979
|
-
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize:
|
|
28979
|
+
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: Tg } = useDraggable({
|
|
28980
28980
|
initWidth: i.defaultWidth,
|
|
28981
28981
|
minWidth: i.minWidth,
|
|
28982
28982
|
minHeight: i.minHeight,
|
|
@@ -29007,13 +29007,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29007
29007
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29008
29008
|
e.style.pointerEvents = "";
|
|
29009
29009
|
});
|
|
29010
|
-
},
|
|
29010
|
+
}, Dg = (e, n) => {
|
|
29011
29011
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29012
29012
|
}, Q = (e, n, r, i) => {
|
|
29013
29013
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29014
29014
|
}, $ = (e, n) => {
|
|
29015
29015
|
I(e, n), o.value = !1, Z();
|
|
29016
|
-
},
|
|
29016
|
+
}, kg = (e, n, r, i) => {
|
|
29017
29017
|
L(e, n, r, i), o.value = !1, Z();
|
|
29018
29018
|
};
|
|
29019
29019
|
return watch(O, (e) => {
|
|
@@ -29021,7 +29021,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29021
29021
|
}), n({
|
|
29022
29022
|
updatePosition: B,
|
|
29023
29023
|
updateSize: H,
|
|
29024
|
-
updatePositionAndSize:
|
|
29024
|
+
updatePositionAndSize: Tg,
|
|
29025
29025
|
toggleCompression: z,
|
|
29026
29026
|
positionAndSize: K,
|
|
29027
29027
|
isCompressed: O
|
|
@@ -29043,10 +29043,10 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29043
29043
|
"prevent-deactivation": !0,
|
|
29044
29044
|
"drag-handle": i.dragHandle,
|
|
29045
29045
|
"class-name": "draggable-container-inner",
|
|
29046
|
-
onDragging:
|
|
29046
|
+
onDragging: Dg,
|
|
29047
29047
|
onResizing: Q,
|
|
29048
29048
|
onDragStop: $,
|
|
29049
|
-
onResizeStop:
|
|
29049
|
+
onResizeStop: kg
|
|
29050
29050
|
}, {
|
|
29051
29051
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
29052
29052
|
_: 3
|
|
@@ -29129,7 +29129,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29129
29129
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
29130
29130
|
theme: "ai-blueking",
|
|
29131
29131
|
delay: [0, 0]
|
|
29132
|
-
}),
|
|
29132
|
+
}), Tg = () => {
|
|
29133
29133
|
nextTick(() => {
|
|
29134
29134
|
K();
|
|
29135
29135
|
});
|
|
@@ -29143,9 +29143,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29143
29143
|
}), onMounted(() => {
|
|
29144
29144
|
nextTick(() => {
|
|
29145
29145
|
K();
|
|
29146
|
-
}), window.addEventListener("resize",
|
|
29146
|
+
}), window.addEventListener("resize", Tg);
|
|
29147
29147
|
}), onBeforeUnmount(() => {
|
|
29148
|
-
window.removeEventListener("resize",
|
|
29148
|
+
window.removeEventListener("resize", Tg);
|
|
29149
29149
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
29150
29150
|
active: !e.isPanelShow,
|
|
29151
29151
|
axis: "y",
|
|
@@ -29263,7 +29263,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29263
29263
|
}), T = _.panelVisible, O = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29264
29264
|
componentManager: _,
|
|
29265
29265
|
emit: a
|
|
29266
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession:
|
|
29266
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession: Tg } = useChatBootstrap({
|
|
29267
29267
|
url: u,
|
|
29268
29268
|
requestOptions: i.requestOptions,
|
|
29269
29269
|
autoInit: !0,
|
|
@@ -29289,12 +29289,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29289
29289
|
}), G = I, K = new SessionBusinessManager(G.session, G.message, null, {
|
|
29290
29290
|
enableChatSession: i.enableChatSession,
|
|
29291
29291
|
initialSessionCode: i.initialSessionCode
|
|
29292
|
-
}), q = new ShareBusinessManager(G.message, G.session),
|
|
29292
|
+
}), q = new ShareBusinessManager(G.message, G.session), Dg = new UIStateManager(), Q = computed(() => Dg.isSelectionMode.value), $ = ref(!1), kg = new ShortcutManager(null, i.shortcuts || []), jg = ref(!1), Mg = ref(""), Ng = { appendTo: (e) => {
|
|
29293
29293
|
let n = e.closest(".draggable-container-content");
|
|
29294
29294
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29295
|
-
} },
|
|
29296
|
-
let e =
|
|
29297
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29295
|
+
} }, Pg = computed(() => _.isCompressed.value), Fg = computed(() => H.value), Ig = ref(""), Lg = ref(!0), zg = ref(!1), Bg = computed(() => i.resources?.length ? i.resources : flattenResources(B.value?.resources)), Vg = computed(() => i.prompts?.length ? i.prompts : B.value?.conversationSettings?.predefinedQuestions ?? []), Hg = computed(() => {
|
|
29296
|
+
let e = kg.effectiveShortcuts.value;
|
|
29297
|
+
return typeof i.shortcutFilter == "function" && Mg.value ? e.filter((e) => i.shortcutFilter?.(e, Mg.value)) : e;
|
|
29298
29298
|
});
|
|
29299
29299
|
watch(() => L.value, async (e) => {
|
|
29300
29300
|
if (e && B.value) {
|
|
@@ -29305,31 +29305,33 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29305
29305
|
}).catch(() => {}), e.conversationSettings && (k("session-initialized", {
|
|
29306
29306
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29307
29307
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29308
|
-
}), e.conversationSettings.commands &&
|
|
29308
|
+
}), e.conversationSettings.commands && kg.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29309
29309
|
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29310
29310
|
} catch (e) {
|
|
29311
29311
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29312
29312
|
}
|
|
29313
29313
|
}
|
|
29314
29314
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29315
|
-
|
|
29316
|
-
}, { immediate: !0 }), watch(() =>
|
|
29317
|
-
e && (
|
|
29315
|
+
kg.setShortcuts(e || []);
|
|
29316
|
+
}, { immediate: !0 }), watch(() => Tg.value, (e) => {
|
|
29317
|
+
e && (Ig.value = e.sessionName || "", zg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29318
29318
|
}, { immediate: !0 }), watch(() => G.message.list.value.length, (e) => {
|
|
29319
|
-
e > 0 && (
|
|
29319
|
+
e > 0 && (zg.value = !0);
|
|
29320
29320
|
});
|
|
29321
|
-
let
|
|
29321
|
+
let Ug = async (e) => {
|
|
29322
29322
|
_.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29323
|
+
}, Gg = async (e) => {
|
|
29324
|
+
await Ug(e);
|
|
29323
29325
|
}, Kg = () => {
|
|
29324
29326
|
_.hidePanel();
|
|
29325
|
-
},
|
|
29327
|
+
}, Jg = () => {
|
|
29326
29328
|
Kg();
|
|
29327
29329
|
}, Yg = () => {
|
|
29328
29330
|
_.handleNimbusClick();
|
|
29329
29331
|
}, Xg = (e) => {
|
|
29330
|
-
|
|
29332
|
+
Mg.value = e;
|
|
29331
29333
|
}, Zg = async (e, n) => {
|
|
29332
|
-
|
|
29334
|
+
jg.value = !1, await Ug(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29333
29335
|
shortcut: e,
|
|
29334
29336
|
source: "popup"
|
|
29335
29337
|
});
|
|
@@ -29347,7 +29349,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29347
29349
|
_.container.toggleCompression();
|
|
29348
29350
|
}, i_ = (e) => {
|
|
29349
29351
|
_.setCompressed(e);
|
|
29350
|
-
},
|
|
29352
|
+
}, o_ = async () => {
|
|
29351
29353
|
j.newChat();
|
|
29352
29354
|
}, s_ = (e) => {
|
|
29353
29355
|
j.historyClick(e);
|
|
@@ -29366,7 +29368,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29366
29368
|
try {
|
|
29367
29369
|
await G.session.renameSession(e);
|
|
29368
29370
|
let n = G.session.list.value.find((n) => n.sessionCode === e);
|
|
29369
|
-
n && (
|
|
29371
|
+
n && (Ig.value = n.sessionName || "");
|
|
29370
29372
|
} catch (e) {
|
|
29371
29373
|
console.error("[AIBlueking] Failed to auto-generate session name:", e), O_(e);
|
|
29372
29374
|
}
|
|
@@ -29383,15 +29385,15 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29383
29385
|
await G.session.updateSession({
|
|
29384
29386
|
...n,
|
|
29385
29387
|
sessionName: e
|
|
29386
|
-
}),
|
|
29388
|
+
}), Ig.value = e;
|
|
29387
29389
|
} catch (e) {
|
|
29388
29390
|
console.error("[AIBlueking] Failed to rename session:", e), O_(e);
|
|
29389
29391
|
}
|
|
29390
29392
|
j.rename(e);
|
|
29391
29393
|
}, m_ = () => {
|
|
29392
|
-
|
|
29394
|
+
Dg.enableSelectionMode(), j.share();
|
|
29393
29395
|
}, h_ = () => {
|
|
29394
|
-
|
|
29396
|
+
Dg.disableSelectionMode();
|
|
29395
29397
|
}, g_ = async (e) => {
|
|
29396
29398
|
$.value = !0;
|
|
29397
29399
|
try {
|
|
@@ -29399,7 +29401,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29399
29401
|
await copyToClipboard(n), Message({
|
|
29400
29402
|
message: t("分享链接已复制到剪贴板"),
|
|
29401
29403
|
theme: "success"
|
|
29402
|
-
}),
|
|
29404
|
+
}), Dg.disableSelectionMode(), j.shareMessages(r);
|
|
29403
29405
|
} catch (e) {
|
|
29404
29406
|
console.error("[AIBlueking] Failed to share messages:", e), O_(e);
|
|
29405
29407
|
} finally {
|
|
@@ -29408,7 +29410,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29408
29410
|
}, __ = async (e) => {
|
|
29409
29411
|
l.value && await l.value.sendMessage(e);
|
|
29410
29412
|
}, v_ = (e) => {
|
|
29411
|
-
|
|
29413
|
+
zg.value = !0, j.sendMessage(e);
|
|
29412
29414
|
}, y_ = () => {
|
|
29413
29415
|
j.receiveStart();
|
|
29414
29416
|
}, b_ = () => {
|
|
@@ -29425,12 +29427,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29425
29427
|
l.value && await l.value.switchSession(e);
|
|
29426
29428
|
}, E_ = async (e, n) => {
|
|
29427
29429
|
try {
|
|
29428
|
-
await K.updateSessionName(e, n),
|
|
29430
|
+
await K.updateSessionName(e, n), Ig.value = n;
|
|
29429
29431
|
} catch (e) {
|
|
29430
29432
|
console.error("[AIBlueking] Failed to update session name:", e), O_(e);
|
|
29431
29433
|
}
|
|
29432
29434
|
}, D_ = (e) => {
|
|
29433
|
-
e && (
|
|
29435
|
+
e && (Ig.value = e.sessionName || "", zg.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
|
|
29434
29436
|
}, O_ = (e) => {
|
|
29435
29437
|
console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
|
|
29436
29438
|
apiName: "chat",
|
|
@@ -29449,14 +29451,15 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29449
29451
|
}, N_ = () => {
|
|
29450
29452
|
l.value && l.value.focusInput();
|
|
29451
29453
|
}, P_ = (e) => {
|
|
29452
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? Kg() :
|
|
29454
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? Kg() : Ug());
|
|
29453
29455
|
};
|
|
29454
29456
|
return onMounted(async () => {
|
|
29455
29457
|
o.value && _.setContainerRef(o.value), window.addEventListener("keydown", P_);
|
|
29456
29458
|
}), onBeforeUnmount(() => {
|
|
29457
29459
|
window.removeEventListener("keydown", P_), _.destroy();
|
|
29458
29460
|
}), n({
|
|
29459
|
-
show:
|
|
29461
|
+
show: Ug,
|
|
29462
|
+
handleShow: Gg,
|
|
29460
29463
|
hide: Kg,
|
|
29461
29464
|
sendMessage: __,
|
|
29462
29465
|
stopGeneration: C_,
|
|
@@ -29493,29 +29496,29 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29493
29496
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29494
29497
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29495
29498
|
key: 0,
|
|
29496
|
-
"agent-name":
|
|
29499
|
+
"agent-name": Fg.value,
|
|
29497
29500
|
"chat-helper": unref(G),
|
|
29498
29501
|
draggable: i.draggable,
|
|
29499
29502
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29500
29503
|
"enable-chat-session": i.enableChatSession,
|
|
29501
|
-
"has-permission":
|
|
29502
|
-
"has-session-contents":
|
|
29503
|
-
"is-compression-height":
|
|
29504
|
+
"has-permission": Lg.value,
|
|
29505
|
+
"has-session-contents": zg.value,
|
|
29506
|
+
"is-compression-height": Pg.value,
|
|
29504
29507
|
"session-business-manager": unref(K),
|
|
29505
|
-
"session-name":
|
|
29508
|
+
"session-name": Ig.value,
|
|
29506
29509
|
"show-compression-icon": i.showCompressionIcon,
|
|
29507
29510
|
"show-history-icon": i.showHistoryIcon,
|
|
29508
29511
|
"show-more-icon": i.showMoreIcon,
|
|
29509
29512
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29510
29513
|
title: i.title,
|
|
29511
29514
|
onAutoGenerateName: d_,
|
|
29512
|
-
onClose:
|
|
29515
|
+
onClose: Jg,
|
|
29513
29516
|
onHelpClick: f_,
|
|
29514
29517
|
onHistoryClick: s_,
|
|
29515
29518
|
onHistorySessionDelete: l_,
|
|
29516
29519
|
onHistorySessionRename: u_,
|
|
29517
29520
|
onHistorySessionSwitch: c_,
|
|
29518
|
-
onNewChat:
|
|
29521
|
+
onNewChat: o_,
|
|
29519
29522
|
onRename: p_,
|
|
29520
29523
|
onShare: m_,
|
|
29521
29524
|
onToggleCompression: r_
|
|
@@ -29544,11 +29547,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29544
29547
|
"chat-helper": unref(G),
|
|
29545
29548
|
"enable-selection": Q.value,
|
|
29546
29549
|
"hello-text": i.helloText,
|
|
29547
|
-
"message-tools-tippy-options":
|
|
29550
|
+
"message-tools-tippy-options": Ng,
|
|
29548
29551
|
placeholder: i.placeholder,
|
|
29549
|
-
prompts:
|
|
29552
|
+
prompts: Vg.value,
|
|
29550
29553
|
"request-options": i.requestOptions,
|
|
29551
|
-
resources:
|
|
29554
|
+
resources: Bg.value,
|
|
29552
29555
|
"session-code": i.initialSessionCode,
|
|
29553
29556
|
"share-loading": $.value,
|
|
29554
29557
|
"shortcut-limit": i.shortcutLimit,
|
|
@@ -29611,10 +29614,10 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29611
29614
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29612
29615
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29613
29616
|
key: 1,
|
|
29614
|
-
visible:
|
|
29615
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29617
|
+
visible: jg.value,
|
|
29618
|
+
"onUpdate:visible": n[6] ||= (e) => jg.value = e,
|
|
29616
29619
|
"max-shortcut-count": i.shortcutLimit,
|
|
29617
|
-
shortcuts:
|
|
29620
|
+
shortcuts: Hg.value,
|
|
29618
29621
|
onSelectShortcut: Zg,
|
|
29619
29622
|
onSelectionChange: Xg
|
|
29620
29623
|
}, null, 8, [
|
|
@@ -29624,5 +29627,5 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29624
29627
|
])) : createCommentVNode("v-if", !0)
|
|
29625
29628
|
], 2)], 8, ["to"]));
|
|
29626
29629
|
}
|
|
29627
|
-
}), [["__scopeId", "data-v-
|
|
29630
|
+
}), [["__scopeId", "data-v-ddf60092"]]);
|
|
29628
29631
|
export { AGUIProtocol, ai_blueking_default as AIBlueking, ai_blueking_default as default, BluekingProtocol, BootstrapPhase, chat_bot_default as ChatBot, ChatBusinessManager, ComponentManager, draggable_container_default as DraggableContainer, MessageContentType, SessionBusinessManager, ShortcutManager, UIStateManager, createBluekingProtocol, createComponentManager, defaultProps, useChatBootstrap, useChatHelper, useDraggable };
|