@blueking/ai-blueking 2.0.0-dev.3 → 2.0.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/views/nimbus.vue.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +667 -661
- package/dist/vue2/index.iife.min.js +193 -193
- package/dist/vue2/index.umd.min.js +5 -5
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +662 -656
- package/dist/vue3/index.iife.min.js +6 -6
- package/dist/vue3/index.umd.min.js +5 -5
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -698,25 +698,25 @@ var _hoisted_1$41 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
698
698
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
699
699
|
}, B = (e) => {
|
|
700
700
|
z(), a("selectShortcut", e, O.value);
|
|
701
|
-
}, H = null,
|
|
701
|
+
}, H = null, ug = (e) => {
|
|
702
702
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
703
703
|
L();
|
|
704
704
|
}, e);
|
|
705
|
-
},
|
|
706
|
-
|
|
705
|
+
}, dg = () => {
|
|
706
|
+
ug(200);
|
|
707
707
|
}, K = () => {
|
|
708
|
-
|
|
708
|
+
ug(300);
|
|
709
709
|
}, J = (e) => {
|
|
710
710
|
i.value && l.value?.contains(e.target) || z();
|
|
711
|
-
},
|
|
711
|
+
}, fg = (e) => {
|
|
712
712
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
713
713
|
}, $ = () => {
|
|
714
714
|
d.value?.show();
|
|
715
715
|
};
|
|
716
716
|
return onMounted(() => {
|
|
717
|
-
document.addEventListener("selectionchange", K), document.addEventListener("mouseup",
|
|
717
|
+
document.addEventListener("selectionchange", K), document.addEventListener("mouseup", dg), document.addEventListener("mousedown", J), document.addEventListener("scroll", fg, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
718
718
|
}), onUnmounted(() => {
|
|
719
|
-
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup",
|
|
719
|
+
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", dg), document.removeEventListener("mousedown", J), document.removeEventListener("scroll", fg, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
720
720
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
721
721
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
722
722
|
key: 0,
|
|
@@ -1083,17 +1083,17 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1083
1083
|
}
|
|
1084
1084
|
function H() {
|
|
1085
1085
|
var e = i();
|
|
1086
|
-
if (B(e)) return
|
|
1086
|
+
if (B(e)) return ug(e);
|
|
1087
1087
|
v = setTimeout(H, z(e));
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function ug(e) {
|
|
1090
1090
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1091
1091
|
}
|
|
1092
1092
|
function G() {
|
|
1093
1093
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return v === void 0 ? _ :
|
|
1095
|
+
function dg() {
|
|
1096
|
+
return v === void 0 ? _ : ug(i());
|
|
1097
1097
|
}
|
|
1098
1098
|
function K() {
|
|
1099
1099
|
var e = i(), r = B(e);
|
|
@@ -1103,7 +1103,7 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1103
1103
|
}
|
|
1104
1104
|
return v === void 0 && (v = setTimeout(H, n)), _;
|
|
1105
1105
|
}
|
|
1106
|
-
return K.cancel = G, K.flush =
|
|
1106
|
+
return K.cancel = G, K.flush = dg, K;
|
|
1107
1107
|
}
|
|
1108
1108
|
n.exports = u;
|
|
1109
1109
|
})), require_throttle = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
@@ -4769,7 +4769,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4769
4769
|
return a;
|
|
4770
4770
|
}).map((e) => `(${e})`).join(n);
|
|
4771
4771
|
}
|
|
4772
|
-
var
|
|
4772
|
+
var ug = /\b\B/, G = "[a-zA-Z]\\w*", dg = "[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 = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", fg = (e = {}) => {
|
|
4773
4773
|
let n = /^#![ ]*\//;
|
|
4774
4774
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4775
4775
|
scope: "meta",
|
|
@@ -4783,7 +4783,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4783
4783
|
}, Q = {
|
|
4784
4784
|
begin: "\\\\[\\s\\S]",
|
|
4785
4785
|
relevance: 0
|
|
4786
|
-
},
|
|
4786
|
+
}, pg = {
|
|
4787
4787
|
scope: "string",
|
|
4788
4788
|
begin: "'",
|
|
4789
4789
|
end: "'",
|
|
@@ -4795,7 +4795,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4795
4795
|
end: "\"",
|
|
4796
4796
|
illegal: "\\n",
|
|
4797
4797
|
contains: [Q]
|
|
4798
|
-
},
|
|
4798
|
+
}, mg = { 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/ }, hg = function(e, n, r = {}) {
|
|
4799
4799
|
let i = o({
|
|
4800
4800
|
scope: "comment",
|
|
4801
4801
|
begin: e,
|
|
@@ -4811,19 +4811,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4811
4811
|
});
|
|
4812
4812
|
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,}/);
|
|
4813
4813
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4814
|
-
},
|
|
4814
|
+
}, gg = hg("//", "$"), _g = hg("/\\*", "\\*/"), vg = hg("#", "$"), yg = {
|
|
4815
4815
|
scope: "number",
|
|
4816
4816
|
begin: K,
|
|
4817
4817
|
relevance: 0
|
|
4818
|
-
},
|
|
4818
|
+
}, bg = {
|
|
4819
4819
|
scope: "number",
|
|
4820
4820
|
begin: q,
|
|
4821
4821
|
relevance: 0
|
|
4822
|
-
},
|
|
4822
|
+
}, xg = {
|
|
4823
4823
|
scope: "number",
|
|
4824
4824
|
begin: J,
|
|
4825
4825
|
relevance: 0
|
|
4826
|
-
},
|
|
4826
|
+
}, Sg = {
|
|
4827
4827
|
scope: "regexp",
|
|
4828
4828
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4829
4829
|
end: /\/[gimuy]*/,
|
|
@@ -4833,27 +4833,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4833
4833
|
relevance: 0,
|
|
4834
4834
|
contains: [Q]
|
|
4835
4835
|
}]
|
|
4836
|
-
},
|
|
4836
|
+
}, Cg = {
|
|
4837
4837
|
scope: "title",
|
|
4838
4838
|
begin: G,
|
|
4839
4839
|
relevance: 0
|
|
4840
|
-
},
|
|
4840
|
+
}, wg = {
|
|
4841
4841
|
scope: "title",
|
|
4842
|
-
begin:
|
|
4842
|
+
begin: dg,
|
|
4843
4843
|
relevance: 0
|
|
4844
|
-
},
|
|
4845
|
-
begin: "\\.\\s*" +
|
|
4844
|
+
}, Tg = {
|
|
4845
|
+
begin: "\\.\\s*" + dg,
|
|
4846
4846
|
relevance: 0
|
|
4847
|
-
},
|
|
4847
|
+
}, Eg = /* @__PURE__ */ Object.freeze({
|
|
4848
4848
|
__proto__: null,
|
|
4849
|
-
APOS_STRING_MODE:
|
|
4849
|
+
APOS_STRING_MODE: pg,
|
|
4850
4850
|
BACKSLASH_ESCAPE: Q,
|
|
4851
|
-
BINARY_NUMBER_MODE:
|
|
4851
|
+
BINARY_NUMBER_MODE: xg,
|
|
4852
4852
|
BINARY_NUMBER_RE: J,
|
|
4853
|
-
COMMENT:
|
|
4854
|
-
C_BLOCK_COMMENT_MODE:
|
|
4855
|
-
C_LINE_COMMENT_MODE:
|
|
4856
|
-
C_NUMBER_MODE:
|
|
4853
|
+
COMMENT: hg,
|
|
4854
|
+
C_BLOCK_COMMENT_MODE: _g,
|
|
4855
|
+
C_LINE_COMMENT_MODE: gg,
|
|
4856
|
+
C_NUMBER_MODE: bg,
|
|
4857
4857
|
C_NUMBER_RE: q,
|
|
4858
4858
|
END_SAME_AS_BEGIN: function(e) {
|
|
4859
4859
|
return Object.assign(e, {
|
|
@@ -4865,43 +4865,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4865
4865
|
}
|
|
4866
4866
|
});
|
|
4867
4867
|
},
|
|
4868
|
-
HASH_COMMENT_MODE:
|
|
4868
|
+
HASH_COMMENT_MODE: vg,
|
|
4869
4869
|
IDENT_RE: G,
|
|
4870
|
-
MATCH_NOTHING_RE:
|
|
4871
|
-
METHOD_GUARD:
|
|
4872
|
-
NUMBER_MODE:
|
|
4870
|
+
MATCH_NOTHING_RE: ug,
|
|
4871
|
+
METHOD_GUARD: Tg,
|
|
4872
|
+
NUMBER_MODE: yg,
|
|
4873
4873
|
NUMBER_RE: K,
|
|
4874
|
-
PHRASAL_WORDS_MODE:
|
|
4874
|
+
PHRASAL_WORDS_MODE: mg,
|
|
4875
4875
|
QUOTE_STRING_MODE: $,
|
|
4876
|
-
REGEXP_MODE:
|
|
4876
|
+
REGEXP_MODE: Sg,
|
|
4877
4877
|
RE_STARTERS_RE: Z,
|
|
4878
|
-
SHEBANG:
|
|
4879
|
-
TITLE_MODE:
|
|
4880
|
-
UNDERSCORE_IDENT_RE:
|
|
4881
|
-
UNDERSCORE_TITLE_MODE:
|
|
4878
|
+
SHEBANG: fg,
|
|
4879
|
+
TITLE_MODE: Cg,
|
|
4880
|
+
UNDERSCORE_IDENT_RE: dg,
|
|
4881
|
+
UNDERSCORE_TITLE_MODE: wg
|
|
4882
4882
|
});
|
|
4883
|
-
function
|
|
4883
|
+
function Dg(e, n) {
|
|
4884
4884
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4885
4885
|
}
|
|
4886
|
-
function
|
|
4886
|
+
function Og(e, n) {
|
|
4887
4887
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4888
4888
|
}
|
|
4889
|
-
function
|
|
4890
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4889
|
+
function kg(e, n) {
|
|
4890
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Dg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4891
4891
|
}
|
|
4892
|
-
function
|
|
4892
|
+
function Ag(e, n) {
|
|
4893
4893
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4894
4894
|
}
|
|
4895
|
-
function
|
|
4895
|
+
function jg(e, n) {
|
|
4896
4896
|
if (e.match) {
|
|
4897
4897
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4898
4898
|
e.begin = e.match, delete e.match;
|
|
4899
4899
|
}
|
|
4900
4900
|
}
|
|
4901
|
-
function
|
|
4901
|
+
function Mg(e, n) {
|
|
4902
4902
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4903
4903
|
}
|
|
4904
|
-
var
|
|
4904
|
+
var Ng = (e, n) => {
|
|
4905
4905
|
if (!e.beforeMatch) return;
|
|
4906
4906
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4907
4907
|
let r = Object.assign({}, e);
|
|
@@ -4911,7 +4911,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4911
4911
|
relevance: 0,
|
|
4912
4912
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4913
4913
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4914
|
-
},
|
|
4914
|
+
}, Pg = [
|
|
4915
4915
|
"of",
|
|
4916
4916
|
"and",
|
|
4917
4917
|
"for",
|
|
@@ -4923,58 +4923,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4923
4923
|
"parent",
|
|
4924
4924
|
"list",
|
|
4925
4925
|
"value"
|
|
4926
|
-
],
|
|
4927
|
-
function
|
|
4926
|
+
], Fg = "keyword";
|
|
4927
|
+
function Ig(e, n, r = Fg) {
|
|
4928
4928
|
let i = Object.create(null);
|
|
4929
4929
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4930
|
-
Object.assign(i,
|
|
4930
|
+
Object.assign(i, Ig(e[r], n, r));
|
|
4931
4931
|
}), i;
|
|
4932
4932
|
function a(e, r) {
|
|
4933
4933
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4934
4934
|
let r = n.split("|");
|
|
4935
|
-
i[r[0]] = [e,
|
|
4935
|
+
i[r[0]] = [e, Lg(r[0], r[1])];
|
|
4936
4936
|
});
|
|
4937
4937
|
}
|
|
4938
4938
|
}
|
|
4939
|
-
function
|
|
4940
|
-
return n ? Number(n) :
|
|
4939
|
+
function Lg(e, n) {
|
|
4940
|
+
return n ? Number(n) : Rg(e) ? 0 : 1;
|
|
4941
4941
|
}
|
|
4942
|
-
function
|
|
4943
|
-
return
|
|
4942
|
+
function Rg(e) {
|
|
4943
|
+
return Pg.includes(e.toLowerCase());
|
|
4944
4944
|
}
|
|
4945
|
-
var
|
|
4945
|
+
var zg = {}, Bg = (e) => {
|
|
4946
4946
|
console.error(e);
|
|
4947
|
-
},
|
|
4947
|
+
}, Vg = (e, ...n) => {
|
|
4948
4948
|
console.log(`WARN: ${e}`, ...n);
|
|
4949
|
-
},
|
|
4950
|
-
|
|
4951
|
-
},
|
|
4952
|
-
function
|
|
4949
|
+
}, Hg = (e, n) => {
|
|
4950
|
+
zg[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), zg[`${e}/${n}`] = !0);
|
|
4951
|
+
}, Ug = /* @__PURE__ */ Error();
|
|
4952
|
+
function Wg(e, n, { key: r }) {
|
|
4953
4953
|
let i = 0, a = e[r], o = {}, s = {};
|
|
4954
4954
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
4955
4955
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
4956
4956
|
}
|
|
4957
|
-
function
|
|
4957
|
+
function Gg(e) {
|
|
4958
4958
|
if (Array.isArray(e.begin)) {
|
|
4959
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
4960
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
4961
|
-
|
|
4959
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw Bg("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Ug;
|
|
4960
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw Bg("beginScope must be object"), Ug;
|
|
4961
|
+
Wg(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4962
4962
|
}
|
|
4963
4963
|
}
|
|
4964
|
-
function
|
|
4964
|
+
function Kg(e) {
|
|
4965
4965
|
if (Array.isArray(e.end)) {
|
|
4966
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
4967
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
4968
|
-
|
|
4966
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw Bg("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Ug;
|
|
4967
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw Bg("endScope must be object"), Ug;
|
|
4968
|
+
Wg(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4969
4969
|
}
|
|
4970
4970
|
}
|
|
4971
|
-
function
|
|
4971
|
+
function qg(e) {
|
|
4972
4972
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
4973
4973
|
}
|
|
4974
|
-
function
|
|
4975
|
-
|
|
4974
|
+
function Jg(e) {
|
|
4975
|
+
qg(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Gg(e), Kg(e);
|
|
4976
4976
|
}
|
|
4977
|
-
function
|
|
4977
|
+
function Yg(e) {
|
|
4978
4978
|
function n(n, r) {
|
|
4979
4979
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
4980
4980
|
}
|
|
@@ -5036,18 +5036,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5036
5036
|
let o = r;
|
|
5037
5037
|
if (r.isCompiled) return o;
|
|
5038
5038
|
[
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5039
|
+
Og,
|
|
5040
|
+
jg,
|
|
5041
|
+
Jg,
|
|
5042
|
+
Ng
|
|
5043
5043
|
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5044
|
+
kg,
|
|
5045
|
+
Ag,
|
|
5046
|
+
Mg
|
|
5047
5047
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5048
5048
|
let l = null;
|
|
5049
|
-
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 &&=
|
|
5050
|
-
return
|
|
5049
|
+
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 &&= Ig(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) {
|
|
5050
|
+
return Zg(e === "self" ? r : e);
|
|
5051
5051
|
})), r.contains.forEach(function(e) {
|
|
5052
5052
|
s(e, o);
|
|
5053
5053
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5055,19 +5055,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5055
5055
|
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.");
|
|
5056
5056
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5057
5057
|
}
|
|
5058
|
-
function
|
|
5059
|
-
return e ? e.endsWithParent ||
|
|
5058
|
+
function Xg(e) {
|
|
5059
|
+
return e ? e.endsWithParent || Xg(e.starts) : !1;
|
|
5060
5060
|
}
|
|
5061
|
-
function
|
|
5061
|
+
function Zg(e) {
|
|
5062
5062
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5063
5063
|
return o(e, { variants: null }, n);
|
|
5064
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5064
|
+
})), e.cachedVariants ? e.cachedVariants : Xg(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5065
5065
|
}
|
|
5066
|
-
var
|
|
5066
|
+
var Qg = "11.11.1", $g = class extends Error {
|
|
5067
5067
|
constructor(e, n) {
|
|
5068
5068
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5069
5069
|
}
|
|
5070
|
-
},
|
|
5070
|
+
}, e_ = a, t_ = o, n_ = Symbol("nomatch"), r_ = 7, i_ = function(e) {
|
|
5071
5071
|
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 = {
|
|
5072
5072
|
disableAutodetect: !0,
|
|
5073
5073
|
name: "Plain text",
|
|
@@ -5090,21 +5090,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5090
5090
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5091
5091
|
let r = d.languageDetectRe.exec(n);
|
|
5092
5092
|
if (r) {
|
|
5093
|
-
let n =
|
|
5094
|
-
return n || (
|
|
5093
|
+
let n = pg(r[1]);
|
|
5094
|
+
return n || (Vg(l.replace("{}", r[1])), Vg("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5095
5095
|
}
|
|
5096
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5096
|
+
return n.split(/\s+/).find((e) => m(e) || pg(e));
|
|
5097
5097
|
}
|
|
5098
5098
|
function v(e, n, r) {
|
|
5099
5099
|
let i = "", a = "";
|
|
5100
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5100
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (Hg("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Hg("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);
|
|
5101
5101
|
let o = {
|
|
5102
5102
|
code: i,
|
|
5103
5103
|
language: a
|
|
5104
5104
|
};
|
|
5105
|
-
|
|
5105
|
+
vg("before:highlight", o);
|
|
5106
5106
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5107
|
-
return s.code = o.code,
|
|
5107
|
+
return s.code = o.code, vg("after:highlight", s), s;
|
|
5108
5108
|
}
|
|
5109
5109
|
function j(e, r, a, o) {
|
|
5110
5110
|
let u = Object.create(null);
|
|
@@ -5124,7 +5124,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5124
5124
|
let i = K.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5125
5125
|
if (a) {
|
|
5126
5126
|
let [e, o] = a;
|
|
5127
|
-
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <=
|
|
5127
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= r_ && (mg += o), e.startsWith("_")) r += n[0];
|
|
5128
5128
|
else {
|
|
5129
5129
|
let r = K.classNameAliases[e] || e;
|
|
5130
5130
|
T(n[0], r);
|
|
@@ -5142,9 +5142,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5142
5142
|
Q.addText($);
|
|
5143
5143
|
return;
|
|
5144
5144
|
}
|
|
5145
|
-
e = j(Z.subLanguage, $, !0,
|
|
5145
|
+
e = j(Z.subLanguage, $, !0, fg[Z.subLanguage]), fg[Z.subLanguage] = e._top;
|
|
5146
5146
|
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5147
|
-
Z.relevance > 0 && (
|
|
5147
|
+
Z.relevance > 0 && (mg += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5148
5148
|
}
|
|
5149
5149
|
function v() {
|
|
5150
5150
|
Z.subLanguage == null ? g() : _(), $ = "";
|
|
@@ -5181,7 +5181,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5181
5181
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5182
5182
|
}
|
|
5183
5183
|
function I(e) {
|
|
5184
|
-
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5184
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (_g = !0, 0);
|
|
5185
5185
|
}
|
|
5186
5186
|
function L(e) {
|
|
5187
5187
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5190,21 +5190,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5190
5190
|
}
|
|
5191
5191
|
function H(e) {
|
|
5192
5192
|
let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
|
|
5193
|
-
if (!a) return
|
|
5193
|
+
if (!a) return n_;
|
|
5194
5194
|
let o = Z;
|
|
5195
5195
|
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));
|
|
5196
5196
|
do
|
|
5197
|
-
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (
|
|
5197
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (mg += Z.relevance), Z = Z.parent;
|
|
5198
5198
|
while (Z !== a.parent);
|
|
5199
5199
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5200
5200
|
}
|
|
5201
|
-
function
|
|
5201
|
+
function ug() {
|
|
5202
5202
|
let e = [];
|
|
5203
5203
|
for (let n = Z; n !== K; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5204
5204
|
e.forEach((e) => Q.openNode(e));
|
|
5205
5205
|
}
|
|
5206
5206
|
let G = {};
|
|
5207
|
-
function
|
|
5207
|
+
function dg(n, i) {
|
|
5208
5208
|
let o = i && i[0];
|
|
5209
5209
|
if ($ += n, o == null) return v(), 0;
|
|
5210
5210
|
if (G.type === "begin" && i.type === "end" && G.index === i.index && o === "") {
|
|
@@ -5220,33 +5220,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5220
5220
|
throw e.mode = Z, e;
|
|
5221
5221
|
} else if (i.type === "end") {
|
|
5222
5222
|
let e = H(i);
|
|
5223
|
-
if (e !==
|
|
5223
|
+
if (e !== n_) return e;
|
|
5224
5224
|
}
|
|
5225
5225
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5226
|
-
if (
|
|
5226
|
+
if (gg > 1e5 && gg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5227
5227
|
return $ += o, o.length;
|
|
5228
5228
|
}
|
|
5229
|
-
let K =
|
|
5230
|
-
if (!K) throw
|
|
5231
|
-
let q =
|
|
5232
|
-
|
|
5233
|
-
let $ = "",
|
|
5229
|
+
let K = pg(e);
|
|
5230
|
+
if (!K) throw Bg(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5231
|
+
let q = Yg(K), J = "", Z = o || q, fg = {}, Q = new d.__emitter(d);
|
|
5232
|
+
ug();
|
|
5233
|
+
let $ = "", mg = 0, hg = 0, gg = 0, _g = !1;
|
|
5234
5234
|
try {
|
|
5235
5235
|
if (K.__emitTokens) K.__emitTokens(r, Q);
|
|
5236
5236
|
else {
|
|
5237
5237
|
for (Z.matcher.considerAll();;) {
|
|
5238
|
-
|
|
5238
|
+
gg++, _g ? _g = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = hg;
|
|
5239
5239
|
let e = Z.matcher.exec(r);
|
|
5240
5240
|
if (!e) break;
|
|
5241
|
-
let n =
|
|
5242
|
-
|
|
5241
|
+
let n = dg(r.substring(hg, e.index), e);
|
|
5242
|
+
hg = e.index + n;
|
|
5243
5243
|
}
|
|
5244
|
-
|
|
5244
|
+
dg(r.substring(hg));
|
|
5245
5245
|
}
|
|
5246
5246
|
return Q.finalize(), J = Q.toHTML(), {
|
|
5247
5247
|
language: e,
|
|
5248
5248
|
value: J,
|
|
5249
|
-
relevance:
|
|
5249
|
+
relevance: mg,
|
|
5250
5250
|
illegal: !1,
|
|
5251
5251
|
_emitter: Q,
|
|
5252
5252
|
_top: Z
|
|
@@ -5254,13 +5254,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5254
5254
|
} catch (n) {
|
|
5255
5255
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5256
5256
|
language: e,
|
|
5257
|
-
value:
|
|
5257
|
+
value: e_(r),
|
|
5258
5258
|
illegal: !0,
|
|
5259
5259
|
relevance: 0,
|
|
5260
5260
|
_illegalBy: {
|
|
5261
5261
|
message: n.message,
|
|
5262
|
-
index:
|
|
5263
|
-
context: r.slice(
|
|
5262
|
+
index: hg,
|
|
5263
|
+
context: r.slice(hg - 100, hg + 100),
|
|
5264
5264
|
mode: n.mode,
|
|
5265
5265
|
resultSoFar: J
|
|
5266
5266
|
},
|
|
@@ -5268,7 +5268,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5268
5268
|
};
|
|
5269
5269
|
if (s) return {
|
|
5270
5270
|
language: e,
|
|
5271
|
-
value:
|
|
5271
|
+
value: e_(r),
|
|
5272
5272
|
illegal: !1,
|
|
5273
5273
|
relevance: 0,
|
|
5274
5274
|
errorRaised: n,
|
|
@@ -5280,7 +5280,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5280
5280
|
}
|
|
5281
5281
|
function L(e) {
|
|
5282
5282
|
let n = {
|
|
5283
|
-
value:
|
|
5283
|
+
value: e_(e),
|
|
5284
5284
|
illegal: !1,
|
|
5285
5285
|
relevance: 0,
|
|
5286
5286
|
_top: u,
|
|
@@ -5290,13 +5290,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5290
5290
|
}
|
|
5291
5291
|
function B(e, r) {
|
|
5292
5292
|
r = r || d.languages || Object.keys(n);
|
|
5293
|
-
let i = L(e), a = r.filter(
|
|
5293
|
+
let i = L(e), a = r.filter(pg).filter(mg).map((n) => j(n, e, !1));
|
|
5294
5294
|
a.unshift(i);
|
|
5295
5295
|
let [o, s] = a.sort((e, n) => {
|
|
5296
5296
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5297
5297
|
if (e.language && n.language) {
|
|
5298
|
-
if (
|
|
5299
|
-
if (
|
|
5298
|
+
if (pg(e.language).supersetOf === n.language) return 1;
|
|
5299
|
+
if (pg(n.language).supersetOf === e.language) return -1;
|
|
5300
5300
|
}
|
|
5301
5301
|
return 0;
|
|
5302
5302
|
}), l = o;
|
|
@@ -5306,17 +5306,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5306
5306
|
let i = n && a[n] || r;
|
|
5307
5307
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5308
5308
|
}
|
|
5309
|
-
function
|
|
5309
|
+
function ug(e) {
|
|
5310
5310
|
let n = null, r = g(e);
|
|
5311
5311
|
if (m(r)) return;
|
|
5312
|
-
if (
|
|
5312
|
+
if (vg("before:highlightElement", {
|
|
5313
5313
|
el: e,
|
|
5314
5314
|
language: r
|
|
5315
5315
|
}), e.dataset.highlighted) {
|
|
5316
5316
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5317
5317
|
return;
|
|
5318
5318
|
}
|
|
5319
|
-
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
|
|
5319
|
+
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new $g("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5320
5320
|
n = e;
|
|
5321
5321
|
let i = n.textContent, a = r ? v(i, {
|
|
5322
5322
|
language: r,
|
|
@@ -5329,20 +5329,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5329
5329
|
}, a.secondBest && (e.secondBest = {
|
|
5330
5330
|
language: a.secondBest.language,
|
|
5331
5331
|
relevance: a.secondBest.relevance
|
|
5332
|
-
}),
|
|
5332
|
+
}), vg("after:highlightElement", {
|
|
5333
5333
|
el: e,
|
|
5334
5334
|
result: a,
|
|
5335
5335
|
text: i
|
|
5336
5336
|
});
|
|
5337
5337
|
}
|
|
5338
5338
|
function G(e) {
|
|
5339
|
-
d =
|
|
5339
|
+
d = t_(d, e);
|
|
5340
5340
|
}
|
|
5341
|
-
let
|
|
5342
|
-
J(),
|
|
5341
|
+
let dg = () => {
|
|
5342
|
+
J(), Hg("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5343
5343
|
};
|
|
5344
5344
|
function K() {
|
|
5345
|
-
J(),
|
|
5345
|
+
J(), Hg("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5346
5346
|
}
|
|
5347
5347
|
let q = !1;
|
|
5348
5348
|
function J() {
|
|
@@ -5353,27 +5353,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5353
5353
|
q || window.addEventListener("DOMContentLoaded", e, !1), q = !0;
|
|
5354
5354
|
return;
|
|
5355
5355
|
}
|
|
5356
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5356
|
+
document.querySelectorAll(d.cssSelector).forEach(ug);
|
|
5357
5357
|
}
|
|
5358
5358
|
function Z(r, i) {
|
|
5359
5359
|
let a = null;
|
|
5360
5360
|
try {
|
|
5361
5361
|
a = i(e);
|
|
5362
5362
|
} catch (e) {
|
|
5363
|
-
if (
|
|
5363
|
+
if (Bg("Language definition for '{}' could not be registered.".replace("{}", r)), s) Bg(e);
|
|
5364
5364
|
else throw e;
|
|
5365
5365
|
a = u;
|
|
5366
5366
|
}
|
|
5367
5367
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5368
5368
|
}
|
|
5369
|
-
function
|
|
5369
|
+
function fg(e) {
|
|
5370
5370
|
delete n[e];
|
|
5371
5371
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5372
5372
|
}
|
|
5373
5373
|
function Q() {
|
|
5374
5374
|
return Object.keys(n);
|
|
5375
5375
|
}
|
|
5376
|
-
function
|
|
5376
|
+
function pg(e) {
|
|
5377
5377
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5378
5378
|
}
|
|
5379
5379
|
function $(e, { languageName: n }) {
|
|
@@ -5381,65 +5381,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5381
5381
|
a[e.toLowerCase()] = n;
|
|
5382
5382
|
});
|
|
5383
5383
|
}
|
|
5384
|
-
function
|
|
5385
|
-
let n =
|
|
5384
|
+
function mg(e) {
|
|
5385
|
+
let n = pg(e);
|
|
5386
5386
|
return n && !n.disableAutodetect;
|
|
5387
5387
|
}
|
|
5388
|
-
function
|
|
5388
|
+
function hg(e) {
|
|
5389
5389
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5390
5390
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5391
5391
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5392
5392
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5393
5393
|
});
|
|
5394
5394
|
}
|
|
5395
|
-
function
|
|
5396
|
-
|
|
5395
|
+
function gg(e) {
|
|
5396
|
+
hg(e), o.push(e);
|
|
5397
5397
|
}
|
|
5398
|
-
function
|
|
5398
|
+
function _g(e) {
|
|
5399
5399
|
let n = o.indexOf(e);
|
|
5400
5400
|
n !== -1 && o.splice(n, 1);
|
|
5401
5401
|
}
|
|
5402
|
-
function
|
|
5402
|
+
function vg(e, n) {
|
|
5403
5403
|
let r = e;
|
|
5404
5404
|
o.forEach(function(e) {
|
|
5405
5405
|
e[r] && e[r](n);
|
|
5406
5406
|
});
|
|
5407
5407
|
}
|
|
5408
|
-
function
|
|
5409
|
-
return
|
|
5408
|
+
function yg(e) {
|
|
5409
|
+
return Hg("10.7.0", "highlightBlock will be removed entirely in v12.0"), Hg("10.7.0", "Please use highlightElement now."), ug(e);
|
|
5410
5410
|
}
|
|
5411
5411
|
for (let n in Object.assign(e, {
|
|
5412
5412
|
highlight: v,
|
|
5413
5413
|
highlightAuto: B,
|
|
5414
5414
|
highlightAll: J,
|
|
5415
|
-
highlightElement:
|
|
5416
|
-
highlightBlock:
|
|
5415
|
+
highlightElement: ug,
|
|
5416
|
+
highlightBlock: yg,
|
|
5417
5417
|
configure: G,
|
|
5418
|
-
initHighlighting:
|
|
5418
|
+
initHighlighting: dg,
|
|
5419
5419
|
initHighlightingOnLoad: K,
|
|
5420
5420
|
registerLanguage: Z,
|
|
5421
|
-
unregisterLanguage:
|
|
5421
|
+
unregisterLanguage: fg,
|
|
5422
5422
|
listLanguages: Q,
|
|
5423
|
-
getLanguage:
|
|
5423
|
+
getLanguage: pg,
|
|
5424
5424
|
registerAliases: $,
|
|
5425
|
-
autoDetection:
|
|
5426
|
-
inherit:
|
|
5427
|
-
addPlugin:
|
|
5428
|
-
removePlugin:
|
|
5425
|
+
autoDetection: mg,
|
|
5426
|
+
inherit: t_,
|
|
5427
|
+
addPlugin: gg,
|
|
5428
|
+
removePlugin: _g
|
|
5429
5429
|
}), e.debugMode = function() {
|
|
5430
5430
|
s = !1;
|
|
5431
5431
|
}, e.safeMode = function() {
|
|
5432
5432
|
s = !0;
|
|
5433
|
-
}, e.versionString =
|
|
5433
|
+
}, e.versionString = Qg, e.regex = {
|
|
5434
5434
|
concat: k,
|
|
5435
5435
|
lookahead: T,
|
|
5436
5436
|
either: I,
|
|
5437
5437
|
optional: O,
|
|
5438
5438
|
anyNumberOfTimes: E
|
|
5439
|
-
},
|
|
5440
|
-
return Object.assign(e,
|
|
5441
|
-
},
|
|
5442
|
-
|
|
5439
|
+
}, Eg) typeof Eg[n] == "object" && r(Eg[n]);
|
|
5440
|
+
return Object.assign(e, Eg), e;
|
|
5441
|
+
}, a_ = i_({});
|
|
5442
|
+
a_.newInstance = () => i_({}), n.exports = a_, a_.HighlightJS = a_, a_.default = a_;
|
|
5443
5443
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5444
5444
|
function r(e) {
|
|
5445
5445
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11545,7 +11545,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11545
11545
|
},
|
|
11546
11546
|
z
|
|
11547
11547
|
]
|
|
11548
|
-
},
|
|
11548
|
+
}, ug = {
|
|
11549
11549
|
scope: "computation-expression",
|
|
11550
11550
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11551
11551
|
}, G = {
|
|
@@ -11556,7 +11556,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11556
11556
|
],
|
|
11557
11557
|
beginScope: { 2: "meta" },
|
|
11558
11558
|
end: a(/\s|$/)
|
|
11559
|
-
},
|
|
11559
|
+
}, dg = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, K = {
|
|
11560
11560
|
scope: "string",
|
|
11561
11561
|
begin: /"/,
|
|
11562
11562
|
end: /"/,
|
|
@@ -11576,7 +11576,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11576
11576
|
begin: /\{/,
|
|
11577
11577
|
end: /\}/,
|
|
11578
11578
|
keywords: g
|
|
11579
|
-
},
|
|
11579
|
+
}, fg = {
|
|
11580
11580
|
scope: "string",
|
|
11581
11581
|
begin: /\$"/,
|
|
11582
11582
|
end: /"/,
|
|
@@ -11597,7 +11597,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11597
11597
|
e.BACKSLASH_ESCAPE,
|
|
11598
11598
|
Z
|
|
11599
11599
|
]
|
|
11600
|
-
},
|
|
11600
|
+
}, pg = {
|
|
11601
11601
|
scope: "string",
|
|
11602
11602
|
begin: /\$"""/,
|
|
11603
11603
|
end: /"""/,
|
|
@@ -11613,7 +11613,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11613
11613
|
};
|
|
11614
11614
|
Z.contains = [
|
|
11615
11615
|
Q,
|
|
11616
|
-
|
|
11616
|
+
fg,
|
|
11617
11617
|
q,
|
|
11618
11618
|
K,
|
|
11619
11619
|
$,
|
|
@@ -11621,16 +11621,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11621
11621
|
_,
|
|
11622
11622
|
T,
|
|
11623
11623
|
z,
|
|
11624
|
-
|
|
11624
|
+
ug,
|
|
11625
11625
|
G,
|
|
11626
|
-
|
|
11626
|
+
dg,
|
|
11627
11627
|
O,
|
|
11628
11628
|
j
|
|
11629
11629
|
];
|
|
11630
|
-
let
|
|
11631
|
-
|
|
11630
|
+
let mg = { variants: [
|
|
11631
|
+
pg,
|
|
11632
11632
|
Q,
|
|
11633
|
-
|
|
11633
|
+
fg,
|
|
11634
11634
|
J,
|
|
11635
11635
|
q,
|
|
11636
11636
|
K,
|
|
@@ -11644,7 +11644,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11644
11644
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11645
11645
|
contains: [
|
|
11646
11646
|
i,
|
|
11647
|
-
|
|
11647
|
+
mg,
|
|
11648
11648
|
_,
|
|
11649
11649
|
T,
|
|
11650
11650
|
H,
|
|
@@ -11659,14 +11659,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11659
11659
|
q,
|
|
11660
11660
|
K,
|
|
11661
11661
|
$,
|
|
11662
|
-
|
|
11662
|
+
dg
|
|
11663
11663
|
]
|
|
11664
11664
|
},
|
|
11665
11665
|
B,
|
|
11666
11666
|
z,
|
|
11667
|
-
|
|
11667
|
+
ug,
|
|
11668
11668
|
G,
|
|
11669
|
-
|
|
11669
|
+
dg,
|
|
11670
11670
|
O,
|
|
11671
11671
|
j
|
|
11672
11672
|
]
|
|
@@ -13780,7 +13780,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13780
13780
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13781
13781
|
subLanguage: "graphql"
|
|
13782
13782
|
}
|
|
13783
|
-
},
|
|
13783
|
+
}, ug = {
|
|
13784
13784
|
className: "string",
|
|
13785
13785
|
begin: "`",
|
|
13786
13786
|
end: "`",
|
|
@@ -13822,21 +13822,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13822
13822
|
e.C_BLOCK_COMMENT_MODE,
|
|
13823
13823
|
e.C_LINE_COMMENT_MODE
|
|
13824
13824
|
]
|
|
13825
|
-
},
|
|
13825
|
+
}, dg = [
|
|
13826
13826
|
e.APOS_STRING_MODE,
|
|
13827
13827
|
e.QUOTE_STRING_MODE,
|
|
13828
13828
|
z,
|
|
13829
13829
|
B,
|
|
13830
13830
|
H,
|
|
13831
|
-
|
|
13831
|
+
ug,
|
|
13832
13832
|
{ match: /\$\d+/ },
|
|
13833
13833
|
I
|
|
13834
13834
|
];
|
|
13835
|
-
L.contains =
|
|
13835
|
+
L.contains = dg.concat({
|
|
13836
13836
|
begin: /\{/,
|
|
13837
13837
|
end: /\}/,
|
|
13838
13838
|
keywords: E,
|
|
13839
|
-
contains: ["self"].concat(
|
|
13839
|
+
contains: ["self"].concat(dg)
|
|
13840
13840
|
});
|
|
13841
13841
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
13842
13842
|
begin: /(\s*)\(/,
|
|
@@ -13877,7 +13877,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13877
13877
|
1: "keyword",
|
|
13878
13878
|
3: "title.class"
|
|
13879
13879
|
}
|
|
13880
|
-
}] },
|
|
13880
|
+
}] }, fg = {
|
|
13881
13881
|
relevance: 0,
|
|
13882
13882
|
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]*)*/),
|
|
13883
13883
|
className: "title.class",
|
|
@@ -13887,7 +13887,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13887
13887
|
className: "meta",
|
|
13888
13888
|
relevance: 10,
|
|
13889
13889
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13890
|
-
},
|
|
13890
|
+
}, pg = {
|
|
13891
13891
|
variants: [{ match: [
|
|
13892
13892
|
/function/,
|
|
13893
13893
|
/\s+/,
|
|
@@ -13906,25 +13906,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13906
13906
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13907
13907
|
className: "variable.constant"
|
|
13908
13908
|
};
|
|
13909
|
-
function
|
|
13909
|
+
function mg(e) {
|
|
13910
13910
|
return n.concat("(?!", e.join("|"), ")");
|
|
13911
13911
|
}
|
|
13912
|
-
let
|
|
13913
|
-
match: n.concat(/\b/,
|
|
13912
|
+
let hg = {
|
|
13913
|
+
match: n.concat(/\b/, mg([
|
|
13914
13914
|
...l,
|
|
13915
13915
|
"super",
|
|
13916
13916
|
"import"
|
|
13917
13917
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13918
13918
|
className: "title.function",
|
|
13919
13919
|
relevance: 0
|
|
13920
|
-
},
|
|
13920
|
+
}, gg = {
|
|
13921
13921
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13922
13922
|
end: g,
|
|
13923
13923
|
excludeBegin: !0,
|
|
13924
13924
|
keywords: "prototype",
|
|
13925
13925
|
className: "property",
|
|
13926
13926
|
relevance: 0
|
|
13927
|
-
},
|
|
13927
|
+
}, _g = {
|
|
13928
13928
|
match: [
|
|
13929
13929
|
/get|set/,
|
|
13930
13930
|
/\s+/,
|
|
@@ -13936,7 +13936,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13936
13936
|
3: "title.function"
|
|
13937
13937
|
},
|
|
13938
13938
|
contains: [{ begin: /\(\)/ }, J]
|
|
13939
|
-
},
|
|
13939
|
+
}, vg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", yg = {
|
|
13940
13940
|
match: [
|
|
13941
13941
|
/const|var|let/,
|
|
13942
13942
|
/\s+/,
|
|
@@ -13944,7 +13944,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13944
13944
|
/\s*/,
|
|
13945
13945
|
/=\s*/,
|
|
13946
13946
|
/(async\s*)?/,
|
|
13947
|
-
n.lookahead(
|
|
13947
|
+
n.lookahead(vg)
|
|
13948
13948
|
],
|
|
13949
13949
|
keywords: "async",
|
|
13950
13950
|
className: {
|
|
@@ -13964,7 +13964,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13964
13964
|
keywords: E,
|
|
13965
13965
|
exports: {
|
|
13966
13966
|
PARAMS_CONTAINS: q,
|
|
13967
|
-
CLASS_REFERENCE:
|
|
13967
|
+
CLASS_REFERENCE: fg
|
|
13968
13968
|
},
|
|
13969
13969
|
illegal: /#(?![$_A-z])/,
|
|
13970
13970
|
contains: [
|
|
@@ -13979,17 +13979,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13979
13979
|
z,
|
|
13980
13980
|
B,
|
|
13981
13981
|
H,
|
|
13982
|
-
|
|
13982
|
+
ug,
|
|
13983
13983
|
G,
|
|
13984
13984
|
{ match: /\$\d+/ },
|
|
13985
13985
|
I,
|
|
13986
|
-
|
|
13986
|
+
fg,
|
|
13987
13987
|
{
|
|
13988
13988
|
scope: "attr",
|
|
13989
13989
|
match: g + n.lookahead(":"),
|
|
13990
13990
|
relevance: 0
|
|
13991
13991
|
},
|
|
13992
|
-
|
|
13992
|
+
yg,
|
|
13993
13993
|
{
|
|
13994
13994
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
13995
13995
|
keywords: "return throw case",
|
|
@@ -13999,7 +13999,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13999
13999
|
e.REGEXP_MODE,
|
|
14000
14000
|
{
|
|
14001
14001
|
className: "function",
|
|
14002
|
-
begin:
|
|
14002
|
+
begin: vg,
|
|
14003
14003
|
returnBegin: !0,
|
|
14004
14004
|
end: "\\s*=>",
|
|
14005
14005
|
contains: [{
|
|
@@ -14056,7 +14056,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14056
14056
|
}
|
|
14057
14057
|
]
|
|
14058
14058
|
},
|
|
14059
|
-
|
|
14059
|
+
pg,
|
|
14060
14060
|
{ beginKeywords: "while if switch catch for" },
|
|
14061
14061
|
{
|
|
14062
14062
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -14071,7 +14071,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14071
14071
|
match: /\.\.\./,
|
|
14072
14072
|
relevance: 0
|
|
14073
14073
|
},
|
|
14074
|
-
|
|
14074
|
+
gg,
|
|
14075
14075
|
{
|
|
14076
14076
|
match: "\\$" + g,
|
|
14077
14077
|
relevance: 0
|
|
@@ -14081,10 +14081,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14081
14081
|
className: { 1: "title.function" },
|
|
14082
14082
|
contains: [J]
|
|
14083
14083
|
},
|
|
14084
|
-
|
|
14084
|
+
hg,
|
|
14085
14085
|
$,
|
|
14086
14086
|
Z,
|
|
14087
|
-
|
|
14087
|
+
_g,
|
|
14088
14088
|
{ match: /\$[(.]/ }
|
|
14089
14089
|
]
|
|
14090
14090
|
};
|
|
@@ -15038,12 +15038,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15038
15038
|
{ begin: "!important" },
|
|
15039
15039
|
n.FUNCTION_DISPATCH
|
|
15040
15040
|
]
|
|
15041
|
-
},
|
|
15041
|
+
}, ug = {
|
|
15042
15042
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15043
15043
|
returnBegin: !0,
|
|
15044
15044
|
contains: [H]
|
|
15045
15045
|
};
|
|
15046
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15046
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, ug, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15047
15047
|
name: "Less",
|
|
15048
15048
|
case_insensitive: !0,
|
|
15049
15049
|
illegal: "[=>'/<($\"]",
|
|
@@ -17569,7 +17569,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17569
17569
|
3: "variable.language"
|
|
17570
17570
|
}
|
|
17571
17571
|
}
|
|
17572
|
-
] },
|
|
17572
|
+
] }, ug = {
|
|
17573
17573
|
scope: "attr",
|
|
17574
17574
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17575
17575
|
}, G = {
|
|
@@ -17578,7 +17578,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17578
17578
|
end: /\)/,
|
|
17579
17579
|
keywords: I,
|
|
17580
17580
|
contains: [
|
|
17581
|
-
|
|
17581
|
+
ug,
|
|
17582
17582
|
s,
|
|
17583
17583
|
H,
|
|
17584
17584
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17586,7 +17586,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17586
17586
|
E,
|
|
17587
17587
|
z
|
|
17588
17588
|
]
|
|
17589
|
-
},
|
|
17589
|
+
}, dg = {
|
|
17590
17590
|
relevance: 0,
|
|
17591
17591
|
match: [
|
|
17592
17592
|
/\b/,
|
|
@@ -17598,9 +17598,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17598
17598
|
scope: { 3: "title.function.invoke" },
|
|
17599
17599
|
contains: [G]
|
|
17600
17600
|
};
|
|
17601
|
-
G.contains.push(
|
|
17601
|
+
G.contains.push(dg);
|
|
17602
17602
|
let K = [
|
|
17603
|
-
|
|
17603
|
+
ug,
|
|
17604
17604
|
H,
|
|
17605
17605
|
e.C_BLOCK_COMMENT_MODE,
|
|
17606
17606
|
T,
|
|
@@ -17662,7 +17662,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17662
17662
|
match: /\$this\b/
|
|
17663
17663
|
},
|
|
17664
17664
|
s,
|
|
17665
|
-
|
|
17665
|
+
dg,
|
|
17666
17666
|
H,
|
|
17667
17667
|
{
|
|
17668
17668
|
match: [
|
|
@@ -21018,7 +21018,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21018
21018
|
"unknown",
|
|
21019
21019
|
"usableFromInline",
|
|
21020
21020
|
"warn_unqualified_access"
|
|
21021
|
-
],
|
|
21021
|
+
], ug = [
|
|
21022
21022
|
"iOS",
|
|
21023
21023
|
"iOSApplicationExtension",
|
|
21024
21024
|
"macOS",
|
|
@@ -21041,7 +21041,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21041
21041
|
}, I = {
|
|
21042
21042
|
match: a(/\./, s(...g)),
|
|
21043
21043
|
relevance: 0
|
|
21044
|
-
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]),
|
|
21044
|
+
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]), dg = { variants: [{
|
|
21045
21045
|
className: "keyword",
|
|
21046
21046
|
match: s(...g.filter((e) => typeof e != "string").concat(m).map(l), ...d)
|
|
21047
21047
|
}] }, K = {
|
|
@@ -21051,7 +21051,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21051
21051
|
}, q = [
|
|
21052
21052
|
O,
|
|
21053
21053
|
I,
|
|
21054
|
-
|
|
21054
|
+
dg
|
|
21055
21055
|
], J = [{
|
|
21056
21056
|
match: a(/\./, s(...E)),
|
|
21057
21057
|
relevance: 0
|
|
@@ -21061,84 +21061,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21061
21061
|
}], Z = {
|
|
21062
21062
|
match: /->/,
|
|
21063
21063
|
relevance: 0
|
|
21064
|
-
},
|
|
21064
|
+
}, fg = [Z, {
|
|
21065
21065
|
className: "operator",
|
|
21066
21066
|
relevance: 0,
|
|
21067
21067
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21068
|
-
}], Q = "([0-9]_*)+",
|
|
21068
|
+
}], Q = "([0-9]_*)+", pg = "([0-9a-fA-F]_*)+", $ = {
|
|
21069
21069
|
className: "number",
|
|
21070
21070
|
relevance: 0,
|
|
21071
21071
|
variants: [
|
|
21072
21072
|
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21073
|
-
{ match: `\\b0x(${
|
|
21073
|
+
{ match: `\\b0x(${pg})(\\.(${pg}))?([pP][+-]?(${Q}))?\\b` },
|
|
21074
21074
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21075
21075
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21076
21076
|
]
|
|
21077
|
-
},
|
|
21077
|
+
}, mg = (e = "") => ({
|
|
21078
21078
|
className: "subst",
|
|
21079
21079
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21080
|
-
}),
|
|
21080
|
+
}), hg = (e = "") => ({
|
|
21081
21081
|
className: "subst",
|
|
21082
21082
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21083
|
-
}),
|
|
21083
|
+
}), gg = (e = "") => ({
|
|
21084
21084
|
className: "subst",
|
|
21085
21085
|
label: "interpol",
|
|
21086
21086
|
begin: a(/\\/, e, /\(/),
|
|
21087
21087
|
end: /\)/
|
|
21088
|
-
}),
|
|
21088
|
+
}), _g = (e = "") => ({
|
|
21089
21089
|
begin: a(e, /"""/),
|
|
21090
21090
|
end: a(/"""/, e),
|
|
21091
21091
|
contains: [
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21092
|
+
mg(e),
|
|
21093
|
+
hg(e),
|
|
21094
|
+
gg(e)
|
|
21095
21095
|
]
|
|
21096
|
-
}),
|
|
21096
|
+
}), vg = (e = "") => ({
|
|
21097
21097
|
begin: a(e, /"/),
|
|
21098
21098
|
end: a(/"/, e),
|
|
21099
|
-
contains: [
|
|
21100
|
-
}),
|
|
21099
|
+
contains: [mg(e), gg(e)]
|
|
21100
|
+
}), yg = {
|
|
21101
21101
|
className: "string",
|
|
21102
21102
|
variants: [
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
|
|
21110
|
-
|
|
21103
|
+
_g(),
|
|
21104
|
+
_g("#"),
|
|
21105
|
+
_g("##"),
|
|
21106
|
+
_g("###"),
|
|
21107
|
+
vg(),
|
|
21108
|
+
vg("#"),
|
|
21109
|
+
vg("##"),
|
|
21110
|
+
vg("###")
|
|
21111
21111
|
]
|
|
21112
|
-
},
|
|
21112
|
+
}, bg = [e.BACKSLASH_ESCAPE, {
|
|
21113
21113
|
begin: /\[/,
|
|
21114
21114
|
end: /\]/,
|
|
21115
21115
|
relevance: 0,
|
|
21116
21116
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21117
|
-
}],
|
|
21117
|
+
}], xg = {
|
|
21118
21118
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21119
21119
|
end: /\//,
|
|
21120
|
-
contains:
|
|
21121
|
-
},
|
|
21120
|
+
contains: bg
|
|
21121
|
+
}, Sg = (e) => {
|
|
21122
21122
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21123
21123
|
return {
|
|
21124
21124
|
begin: n,
|
|
21125
21125
|
end: r,
|
|
21126
|
-
contains: [...
|
|
21126
|
+
contains: [...bg, {
|
|
21127
21127
|
scope: "comment",
|
|
21128
21128
|
begin: `#(?!.*${r})`,
|
|
21129
21129
|
end: /$/
|
|
21130
21130
|
}]
|
|
21131
21131
|
};
|
|
21132
|
-
},
|
|
21132
|
+
}, Cg = {
|
|
21133
21133
|
scope: "regexp",
|
|
21134
21134
|
variants: [
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21135
|
+
Sg("###"),
|
|
21136
|
+
Sg("##"),
|
|
21137
|
+
Sg("#"),
|
|
21138
|
+
xg
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21141
|
-
|
|
21140
|
+
}, wg = { match: a(/`/, z, /`/) }, Tg = [
|
|
21141
|
+
wg,
|
|
21142
21142
|
{
|
|
21143
21143
|
className: "variable",
|
|
21144
21144
|
match: /\$\d+/
|
|
@@ -21147,18 +21147,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21147
21147
|
className: "variable",
|
|
21148
21148
|
match: `\\$${L}+`
|
|
21149
21149
|
}
|
|
21150
|
-
],
|
|
21150
|
+
], Eg = [
|
|
21151
21151
|
{
|
|
21152
21152
|
match: /(@|#(un)?)available/,
|
|
21153
21153
|
scope: "keyword",
|
|
21154
21154
|
starts: { contains: [{
|
|
21155
21155
|
begin: /\(/,
|
|
21156
21156
|
end: /\)/,
|
|
21157
|
-
keywords:
|
|
21157
|
+
keywords: ug,
|
|
21158
21158
|
contains: [
|
|
21159
|
-
...
|
|
21159
|
+
...fg,
|
|
21160
21160
|
$,
|
|
21161
|
-
|
|
21161
|
+
yg
|
|
21162
21162
|
]
|
|
21163
21163
|
}] }
|
|
21164
21164
|
},
|
|
@@ -21170,7 +21170,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21170
21170
|
scope: "meta",
|
|
21171
21171
|
match: a(/@/, z)
|
|
21172
21172
|
}
|
|
21173
|
-
],
|
|
21173
|
+
], Dg = {
|
|
21174
21174
|
match: i(/\b[A-Z]/),
|
|
21175
21175
|
relevance: 0,
|
|
21176
21176
|
contains: [
|
|
@@ -21196,20 +21196,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21196
21196
|
relevance: 0
|
|
21197
21197
|
}
|
|
21198
21198
|
]
|
|
21199
|
-
},
|
|
21199
|
+
}, Og = {
|
|
21200
21200
|
begin: /</,
|
|
21201
21201
|
end: />/,
|
|
21202
21202
|
keywords: K,
|
|
21203
21203
|
contains: [
|
|
21204
21204
|
...o,
|
|
21205
21205
|
...q,
|
|
21206
|
-
...
|
|
21206
|
+
...Eg,
|
|
21207
21207
|
Z,
|
|
21208
|
-
|
|
21208
|
+
Dg
|
|
21209
21209
|
]
|
|
21210
21210
|
};
|
|
21211
|
-
|
|
21212
|
-
let
|
|
21211
|
+
Dg.contains.push(Og);
|
|
21212
|
+
let kg = {
|
|
21213
21213
|
begin: /\(/,
|
|
21214
21214
|
end: /\)/,
|
|
21215
21215
|
relevance: 0,
|
|
@@ -21222,22 +21222,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21222
21222
|
relevance: 0
|
|
21223
21223
|
},
|
|
21224
21224
|
...o,
|
|
21225
|
-
|
|
21225
|
+
Cg,
|
|
21226
21226
|
...q,
|
|
21227
21227
|
...J,
|
|
21228
|
-
...
|
|
21228
|
+
...fg,
|
|
21229
21229
|
$,
|
|
21230
|
-
|
|
21231
|
-
...
|
|
21232
|
-
...
|
|
21233
|
-
|
|
21230
|
+
yg,
|
|
21231
|
+
...Tg,
|
|
21232
|
+
...Eg,
|
|
21233
|
+
Dg
|
|
21234
21234
|
]
|
|
21235
|
-
},
|
|
21235
|
+
}, Ag = {
|
|
21236
21236
|
begin: /</,
|
|
21237
21237
|
end: />/,
|
|
21238
21238
|
keywords: "repeat each",
|
|
21239
|
-
contains: [...o,
|
|
21240
|
-
},
|
|
21239
|
+
contains: [...o, Dg]
|
|
21240
|
+
}, jg = {
|
|
21241
21241
|
begin: /\(/,
|
|
21242
21242
|
end: /\)/,
|
|
21243
21243
|
keywords: K,
|
|
@@ -21256,41 +21256,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21256
21256
|
},
|
|
21257
21257
|
...o,
|
|
21258
21258
|
...q,
|
|
21259
|
-
...
|
|
21259
|
+
...fg,
|
|
21260
21260
|
$,
|
|
21261
|
-
|
|
21262
|
-
...
|
|
21263
|
-
|
|
21264
|
-
|
|
21261
|
+
yg,
|
|
21262
|
+
...Eg,
|
|
21263
|
+
Dg,
|
|
21264
|
+
kg
|
|
21265
21265
|
],
|
|
21266
21266
|
endsParent: !0,
|
|
21267
21267
|
illegal: /["']/
|
|
21268
|
-
},
|
|
21268
|
+
}, Mg = {
|
|
21269
21269
|
match: [
|
|
21270
21270
|
/(func|macro)/,
|
|
21271
21271
|
/\s+/,
|
|
21272
|
-
s(
|
|
21272
|
+
s(wg.match, z, j)
|
|
21273
21273
|
],
|
|
21274
21274
|
className: {
|
|
21275
21275
|
1: "keyword",
|
|
21276
21276
|
3: "title.function"
|
|
21277
21277
|
},
|
|
21278
21278
|
contains: [
|
|
21279
|
-
|
|
21280
|
-
|
|
21279
|
+
Ag,
|
|
21280
|
+
jg,
|
|
21281
21281
|
n
|
|
21282
21282
|
],
|
|
21283
21283
|
illegal: [/\[/, /%/]
|
|
21284
|
-
},
|
|
21284
|
+
}, Ng = {
|
|
21285
21285
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21286
21286
|
className: { 1: "keyword" },
|
|
21287
21287
|
contains: [
|
|
21288
|
-
|
|
21289
|
-
|
|
21288
|
+
Ag,
|
|
21289
|
+
jg,
|
|
21290
21290
|
n
|
|
21291
21291
|
],
|
|
21292
21292
|
illegal: /\[|%/
|
|
21293
|
-
},
|
|
21293
|
+
}, Pg = {
|
|
21294
21294
|
match: [
|
|
21295
21295
|
/operator/,
|
|
21296
21296
|
/\s+/,
|
|
@@ -21300,7 +21300,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21300
21300
|
1: "keyword",
|
|
21301
21301
|
3: "title"
|
|
21302
21302
|
}
|
|
21303
|
-
},
|
|
21303
|
+
}, Fg = {
|
|
21304
21304
|
begin: [
|
|
21305
21305
|
/precedencegroup/,
|
|
21306
21306
|
/\s+/,
|
|
@@ -21310,10 +21310,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21310
21310
|
1: "keyword",
|
|
21311
21311
|
3: "title"
|
|
21312
21312
|
},
|
|
21313
|
-
contains: [
|
|
21313
|
+
contains: [Dg],
|
|
21314
21314
|
keywords: [...v, ..._],
|
|
21315
21315
|
end: /}/
|
|
21316
|
-
},
|
|
21316
|
+
}, Ig = {
|
|
21317
21317
|
match: [
|
|
21318
21318
|
/class\b/,
|
|
21319
21319
|
/\s+/,
|
|
@@ -21326,7 +21326,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21326
21326
|
3: "keyword",
|
|
21327
21327
|
5: "title.function"
|
|
21328
21328
|
}
|
|
21329
|
-
},
|
|
21329
|
+
}, Lg = {
|
|
21330
21330
|
match: [
|
|
21331
21331
|
/class\b/,
|
|
21332
21332
|
/\s+/,
|
|
@@ -21336,7 +21336,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21336
21336
|
1: "keyword",
|
|
21337
21337
|
3: "keyword"
|
|
21338
21338
|
}
|
|
21339
|
-
},
|
|
21339
|
+
}, Rg = {
|
|
21340
21340
|
begin: [
|
|
21341
21341
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21342
21342
|
/\s+/,
|
|
@@ -21349,7 +21349,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21349
21349
|
},
|
|
21350
21350
|
keywords: K,
|
|
21351
21351
|
contains: [
|
|
21352
|
-
|
|
21352
|
+
Ag,
|
|
21353
21353
|
...q,
|
|
21354
21354
|
{
|
|
21355
21355
|
begin: /:/,
|
|
@@ -21363,16 +21363,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21363
21363
|
}
|
|
21364
21364
|
]
|
|
21365
21365
|
};
|
|
21366
|
-
for (let e of
|
|
21366
|
+
for (let e of yg.variants) {
|
|
21367
21367
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21368
21368
|
n.keywords = K;
|
|
21369
21369
|
let r = [
|
|
21370
21370
|
...q,
|
|
21371
21371
|
...J,
|
|
21372
|
-
...
|
|
21372
|
+
...fg,
|
|
21373
21373
|
$,
|
|
21374
|
-
|
|
21375
|
-
...
|
|
21374
|
+
yg,
|
|
21375
|
+
...Tg
|
|
21376
21376
|
];
|
|
21377
21377
|
n.contains = [...r, {
|
|
21378
21378
|
begin: /\(/,
|
|
@@ -21385,29 +21385,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21385
21385
|
keywords: K,
|
|
21386
21386
|
contains: [
|
|
21387
21387
|
...o,
|
|
21388
|
+
Mg,
|
|
21389
|
+
Ng,
|
|
21390
|
+
Ig,
|
|
21388
21391
|
Lg,
|
|
21389
21392
|
Rg,
|
|
21390
|
-
|
|
21391
|
-
|
|
21392
|
-
Ug,
|
|
21393
|
-
zg,
|
|
21394
|
-
Bg,
|
|
21393
|
+
Pg,
|
|
21394
|
+
Fg,
|
|
21395
21395
|
{
|
|
21396
21396
|
beginKeywords: "import",
|
|
21397
21397
|
end: /$/,
|
|
21398
21398
|
contains: [...o],
|
|
21399
21399
|
relevance: 0
|
|
21400
21400
|
},
|
|
21401
|
-
|
|
21401
|
+
Cg,
|
|
21402
21402
|
...q,
|
|
21403
21403
|
...J,
|
|
21404
|
-
...
|
|
21404
|
+
...fg,
|
|
21405
21405
|
$,
|
|
21406
|
-
|
|
21407
|
-
...
|
|
21408
|
-
...
|
|
21409
|
-
|
|
21410
|
-
|
|
21406
|
+
yg,
|
|
21407
|
+
...Tg,
|
|
21408
|
+
...Eg,
|
|
21409
|
+
Dg,
|
|
21410
|
+
kg
|
|
21411
21411
|
]
|
|
21412
21412
|
};
|
|
21413
21413
|
}
|
|
@@ -22017,7 +22017,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22017
22017
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22018
22018
|
subLanguage: "graphql"
|
|
22019
22019
|
}
|
|
22020
|
-
},
|
|
22020
|
+
}, ug = {
|
|
22021
22021
|
className: "string",
|
|
22022
22022
|
begin: "`",
|
|
22023
22023
|
end: "`",
|
|
@@ -22059,21 +22059,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22059
22059
|
e.C_BLOCK_COMMENT_MODE,
|
|
22060
22060
|
e.C_LINE_COMMENT_MODE
|
|
22061
22061
|
]
|
|
22062
|
-
},
|
|
22062
|
+
}, dg = [
|
|
22063
22063
|
e.APOS_STRING_MODE,
|
|
22064
22064
|
e.QUOTE_STRING_MODE,
|
|
22065
22065
|
z,
|
|
22066
22066
|
B,
|
|
22067
22067
|
H,
|
|
22068
|
-
|
|
22068
|
+
ug,
|
|
22069
22069
|
{ match: /\$\d+/ },
|
|
22070
22070
|
I
|
|
22071
22071
|
];
|
|
22072
|
-
L.contains =
|
|
22072
|
+
L.contains = dg.concat({
|
|
22073
22073
|
begin: /\{/,
|
|
22074
22074
|
end: /\}/,
|
|
22075
22075
|
keywords: E,
|
|
22076
|
-
contains: ["self"].concat(
|
|
22076
|
+
contains: ["self"].concat(dg)
|
|
22077
22077
|
});
|
|
22078
22078
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
22079
22079
|
begin: /(\s*)\(/,
|
|
@@ -22114,7 +22114,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22114
22114
|
1: "keyword",
|
|
22115
22115
|
3: "title.class"
|
|
22116
22116
|
}
|
|
22117
|
-
}] },
|
|
22117
|
+
}] }, fg = {
|
|
22118
22118
|
relevance: 0,
|
|
22119
22119
|
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]*)*/),
|
|
22120
22120
|
className: "title.class",
|
|
@@ -22124,7 +22124,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22124
22124
|
className: "meta",
|
|
22125
22125
|
relevance: 10,
|
|
22126
22126
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22127
|
-
},
|
|
22127
|
+
}, pg = {
|
|
22128
22128
|
variants: [{ match: [
|
|
22129
22129
|
/function/,
|
|
22130
22130
|
/\s+/,
|
|
@@ -22143,25 +22143,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22143
22143
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22144
22144
|
className: "variable.constant"
|
|
22145
22145
|
};
|
|
22146
|
-
function
|
|
22146
|
+
function mg(e) {
|
|
22147
22147
|
return n.concat("(?!", e.join("|"), ")");
|
|
22148
22148
|
}
|
|
22149
|
-
let
|
|
22150
|
-
match: n.concat(/\b/,
|
|
22149
|
+
let hg = {
|
|
22150
|
+
match: n.concat(/\b/, mg([
|
|
22151
22151
|
...l,
|
|
22152
22152
|
"super",
|
|
22153
22153
|
"import"
|
|
22154
22154
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22155
22155
|
className: "title.function",
|
|
22156
22156
|
relevance: 0
|
|
22157
|
-
},
|
|
22157
|
+
}, gg = {
|
|
22158
22158
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22159
22159
|
end: g,
|
|
22160
22160
|
excludeBegin: !0,
|
|
22161
22161
|
keywords: "prototype",
|
|
22162
22162
|
className: "property",
|
|
22163
22163
|
relevance: 0
|
|
22164
|
-
},
|
|
22164
|
+
}, _g = {
|
|
22165
22165
|
match: [
|
|
22166
22166
|
/get|set/,
|
|
22167
22167
|
/\s+/,
|
|
@@ -22173,7 +22173,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22173
22173
|
3: "title.function"
|
|
22174
22174
|
},
|
|
22175
22175
|
contains: [{ begin: /\(\)/ }, J]
|
|
22176
|
-
},
|
|
22176
|
+
}, vg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", yg = {
|
|
22177
22177
|
match: [
|
|
22178
22178
|
/const|var|let/,
|
|
22179
22179
|
/\s+/,
|
|
@@ -22181,7 +22181,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22181
22181
|
/\s*/,
|
|
22182
22182
|
/=\s*/,
|
|
22183
22183
|
/(async\s*)?/,
|
|
22184
|
-
n.lookahead(
|
|
22184
|
+
n.lookahead(vg)
|
|
22185
22185
|
],
|
|
22186
22186
|
keywords: "async",
|
|
22187
22187
|
className: {
|
|
@@ -22201,7 +22201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22201
22201
|
keywords: E,
|
|
22202
22202
|
exports: {
|
|
22203
22203
|
PARAMS_CONTAINS: q,
|
|
22204
|
-
CLASS_REFERENCE:
|
|
22204
|
+
CLASS_REFERENCE: fg
|
|
22205
22205
|
},
|
|
22206
22206
|
illegal: /#(?![$_A-z])/,
|
|
22207
22207
|
contains: [
|
|
@@ -22216,17 +22216,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22216
22216
|
z,
|
|
22217
22217
|
B,
|
|
22218
22218
|
H,
|
|
22219
|
-
|
|
22219
|
+
ug,
|
|
22220
22220
|
G,
|
|
22221
22221
|
{ match: /\$\d+/ },
|
|
22222
22222
|
I,
|
|
22223
|
-
|
|
22223
|
+
fg,
|
|
22224
22224
|
{
|
|
22225
22225
|
scope: "attr",
|
|
22226
22226
|
match: g + n.lookahead(":"),
|
|
22227
22227
|
relevance: 0
|
|
22228
22228
|
},
|
|
22229
|
-
|
|
22229
|
+
yg,
|
|
22230
22230
|
{
|
|
22231
22231
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22232
22232
|
keywords: "return throw case",
|
|
@@ -22236,7 +22236,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22236
22236
|
e.REGEXP_MODE,
|
|
22237
22237
|
{
|
|
22238
22238
|
className: "function",
|
|
22239
|
-
begin:
|
|
22239
|
+
begin: vg,
|
|
22240
22240
|
returnBegin: !0,
|
|
22241
22241
|
end: "\\s*=>",
|
|
22242
22242
|
contains: [{
|
|
@@ -22293,7 +22293,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22293
22293
|
}
|
|
22294
22294
|
]
|
|
22295
22295
|
},
|
|
22296
|
-
|
|
22296
|
+
pg,
|
|
22297
22297
|
{ beginKeywords: "while if switch catch for" },
|
|
22298
22298
|
{
|
|
22299
22299
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -22308,7 +22308,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22308
22308
|
match: /\.\.\./,
|
|
22309
22309
|
relevance: 0
|
|
22310
22310
|
},
|
|
22311
|
-
|
|
22311
|
+
gg,
|
|
22312
22312
|
{
|
|
22313
22313
|
match: "\\$" + g,
|
|
22314
22314
|
relevance: 0
|
|
@@ -22318,10 +22318,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22318
22318
|
className: { 1: "title.function" },
|
|
22319
22319
|
contains: [J]
|
|
22320
22320
|
},
|
|
22321
|
-
|
|
22321
|
+
hg,
|
|
22322
22322
|
$,
|
|
22323
22323
|
Z,
|
|
22324
|
-
|
|
22324
|
+
_g,
|
|
22325
22325
|
{ match: /\$[(.]/ }
|
|
22326
22326
|
]
|
|
22327
22327
|
};
|
|
@@ -24462,7 +24462,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24462
24462
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24463
24463
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24464
24464
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24465
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24465
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, ug = !1, G = getCurrentDocument(r), dg = {
|
|
24466
24466
|
_document: G,
|
|
24467
24467
|
_isBlock: s
|
|
24468
24468
|
};
|
|
@@ -24470,9 +24470,9 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24470
24470
|
r.contentEditable = m ? "false" : "true", r.ariaReadOnly = m ? "true" : null;
|
|
24471
24471
|
}, g();
|
|
24472
24472
|
let K = createMutationObserver(r, () => {
|
|
24473
|
-
H && setSelectionToDOM(G, r, d,
|
|
24473
|
+
H && setSelectionToDOM(G, r, d, dg);
|
|
24474
24474
|
}), q = () => {
|
|
24475
|
-
d = takeSelectionSnapshot(r,
|
|
24475
|
+
d = takeSelectionSnapshot(r, dg);
|
|
24476
24476
|
}, J = () => {
|
|
24477
24477
|
let e = K._flush();
|
|
24478
24478
|
if (K._record(!1), e.length) {
|
|
@@ -24482,7 +24482,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24482
24482
|
for (let n = r.length - 1; n >= 0; n--) e.insertBefore(r[n], a);
|
|
24483
24483
|
for (let n = i.length - 1; n >= 0; n--) e.removeChild(i[n]);
|
|
24484
24484
|
} else n.target.nodeValue = n.oldValue;
|
|
24485
|
-
K._flush(), L = setSelectionToDOM(G, r, d,
|
|
24485
|
+
K._flush(), L = setSelectionToDOM(G, r, d, dg);
|
|
24486
24486
|
}
|
|
24487
24487
|
E(z), B = !1, z = null;
|
|
24488
24488
|
}, Z = (e) => {
|
|
@@ -24496,7 +24496,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24496
24496
|
r && (l(n(r[0])), d = r[1]);
|
|
24497
24497
|
}
|
|
24498
24498
|
}
|
|
24499
|
-
},
|
|
24499
|
+
}, fg = () => {
|
|
24500
24500
|
B || J();
|
|
24501
24501
|
}, Q = (e) => {
|
|
24502
24502
|
e.preventDefault();
|
|
@@ -24505,7 +24505,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24505
24505
|
B ? K._record(!0) : q();
|
|
24506
24506
|
let i = e.getTargetRanges()[0];
|
|
24507
24507
|
if (i) {
|
|
24508
|
-
let a = serializeRange(r,
|
|
24508
|
+
let a = serializeRange(r, dg, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
24509
24509
|
if (o == null) {
|
|
24510
24510
|
let n = e.dataTransfer;
|
|
24511
24511
|
n && (o = n.getData("text/plain"));
|
|
@@ -24513,46 +24513,46 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24513
24513
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24514
24514
|
}
|
|
24515
24515
|
B || J();
|
|
24516
|
-
},
|
|
24516
|
+
}, pg = () => {
|
|
24517
24517
|
B || q(), B = !0;
|
|
24518
24518
|
}, $ = () => {
|
|
24519
24519
|
J();
|
|
24520
|
-
},
|
|
24520
|
+
}, mg = () => {
|
|
24521
24521
|
H = !0, q();
|
|
24522
|
-
},
|
|
24522
|
+
}, hg = () => {
|
|
24523
24523
|
H = !1;
|
|
24524
|
-
},
|
|
24524
|
+
}, gg = () => {
|
|
24525
24525
|
if (L) {
|
|
24526
24526
|
L = !1;
|
|
24527
24527
|
return;
|
|
24528
24528
|
}
|
|
24529
|
-
H && !B && !
|
|
24530
|
-
},
|
|
24529
|
+
H && !B && !ug && q();
|
|
24530
|
+
}, _g = (e) => {
|
|
24531
24531
|
q(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24532
|
-
},
|
|
24533
|
-
e.preventDefault(),
|
|
24534
|
-
},
|
|
24535
|
-
e.preventDefault(), m || (
|
|
24536
|
-
},
|
|
24532
|
+
}, vg = (e) => {
|
|
24533
|
+
e.preventDefault(), _g(e.clipboardData);
|
|
24534
|
+
}, yg = (e) => {
|
|
24535
|
+
e.preventDefault(), m || (_g(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24536
|
+
}, bg = (e) => {
|
|
24537
24537
|
e.preventDefault();
|
|
24538
24538
|
let [n, r] = range(d);
|
|
24539
|
-
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData,
|
|
24540
|
-
},
|
|
24539
|
+
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, dg)));
|
|
24540
|
+
}, xg = (e) => {
|
|
24541
24541
|
e.preventDefault();
|
|
24542
|
-
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e,
|
|
24542
|
+
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, dg);
|
|
24543
24543
|
if (n && i) {
|
|
24544
24544
|
let e = new Transaction();
|
|
24545
|
-
|
|
24545
|
+
ug && e.delete(...range(d));
|
|
24546
24546
|
let o = e.transform(i);
|
|
24547
|
-
e.select(o, o).insert(o, a(n,
|
|
24547
|
+
e.select(o, o).insert(o, a(n, dg)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24548
24548
|
}
|
|
24549
|
-
},
|
|
24550
|
-
|
|
24551
|
-
},
|
|
24552
|
-
|
|
24549
|
+
}, Sg = (e) => {
|
|
24550
|
+
ug = !0, _g(e.dataTransfer);
|
|
24551
|
+
}, Cg = () => {
|
|
24552
|
+
ug = !1;
|
|
24553
24553
|
};
|
|
24554
|
-
return G.addEventListener("selectionchange",
|
|
24555
|
-
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",
|
|
24554
|
+
return G.addEventListener("selectionchange", gg), r.addEventListener("keydown", Z), r.addEventListener("input", fg), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", pg), r.addEventListener("compositionend", $), r.addEventListener("focus", mg), r.addEventListener("blur", hg), r.addEventListener("copy", vg), r.addEventListener("cut", yg), r.addEventListener("paste", bg), r.addEventListener("drop", xg), r.addEventListener("dragstart", Sg), r.addEventListener("dragend", Cg), () => {
|
|
24555
|
+
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", gg), r.removeEventListener("keydown", Z), r.removeEventListener("input", fg), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", pg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", mg), r.removeEventListener("blur", hg), r.removeEventListener("copy", vg), r.removeEventListener("cut", yg), r.removeEventListener("paste", bg), r.removeEventListener("drop", xg), r.removeEventListener("dragstart", Sg), r.removeEventListener("dragend", Cg));
|
|
24556
24556
|
};
|
|
24557
24557
|
},
|
|
24558
24558
|
command: (e, ...n) => {
|
|
@@ -24893,7 +24893,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24893
24893
|
set(e) {
|
|
24894
24894
|
l.value = e, n();
|
|
24895
24895
|
}
|
|
24896
|
-
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H,
|
|
24896
|
+
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, ug = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
|
|
24897
24897
|
setTimeout(() => {
|
|
24898
24898
|
let e = $();
|
|
24899
24899
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
@@ -24906,7 +24906,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24906
24906
|
}, J = (e) => {
|
|
24907
24907
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
24908
24908
|
e.key === "@" && (k.value = "slash", q()), e.key === "/" && (k.value = "prompt", q());
|
|
24909
|
-
},
|
|
24909
|
+
}, fg = () => {
|
|
24910
24910
|
j.value = "";
|
|
24911
24911
|
}, $ = () => {
|
|
24912
24912
|
let e = {
|
|
@@ -24938,27 +24938,27 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24938
24938
|
} catch {
|
|
24939
24939
|
return e;
|
|
24940
24940
|
}
|
|
24941
|
-
},
|
|
24941
|
+
}, mg = (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), hg = (e) => {
|
|
24942
24942
|
z.value.push(e), B.command(K);
|
|
24943
24943
|
let { column: n, line: r } = G.value;
|
|
24944
|
-
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(),
|
|
24945
|
-
},
|
|
24944
|
+
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(), gg();
|
|
24945
|
+
}, gg = () => {
|
|
24946
24946
|
setTimeout(() => {
|
|
24947
24947
|
let e = window.getSelection(), n = document.createRange();
|
|
24948
24948
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
24949
24949
|
}, 100);
|
|
24950
|
-
},
|
|
24951
|
-
B.command(ReplaceAll, e),
|
|
24950
|
+
}, vg = (e) => {
|
|
24951
|
+
B.command(ReplaceAll, e), gg();
|
|
24952
24952
|
};
|
|
24953
24953
|
watchEffect(() => {
|
|
24954
24954
|
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();
|
|
24955
24955
|
});
|
|
24956
|
-
let
|
|
24956
|
+
let yg = (e, n, r, i) => {
|
|
24957
24957
|
if (n.type === "tag") {
|
|
24958
|
-
let n =
|
|
24958
|
+
let n = mg(e, r);
|
|
24959
24959
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
24960
24960
|
}
|
|
24961
|
-
},
|
|
24961
|
+
}, Sg = (e) => {
|
|
24962
24962
|
let n = e.clipboardData?.items;
|
|
24963
24963
|
if (!n) return;
|
|
24964
24964
|
let r = [];
|
|
@@ -24967,7 +24967,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24967
24967
|
n && r.push(n);
|
|
24968
24968
|
}
|
|
24969
24969
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
24970
|
-
},
|
|
24970
|
+
}, wg = () => {
|
|
24971
24971
|
H?.(), B = createEditor({
|
|
24972
24972
|
doc: d.value,
|
|
24973
24973
|
schema: tagSchema,
|
|
@@ -24976,16 +24976,16 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24976
24976
|
},
|
|
24977
24977
|
onKeyDown: (e) => J(e)
|
|
24978
24978
|
}), H = B.input(i.value);
|
|
24979
|
-
},
|
|
24979
|
+
}, Eg = () => k.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
24980
24980
|
return onMounted(() => {
|
|
24981
|
-
|
|
24981
|
+
wg(), i.value?.addEventListener("paste", Sg);
|
|
24982
24982
|
}), onUnmounted(() => {
|
|
24983
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
24983
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Sg);
|
|
24984
24984
|
}), n({
|
|
24985
24985
|
cleanup: () => {
|
|
24986
24986
|
B.command(ReplaceAll, "");
|
|
24987
24987
|
},
|
|
24988
|
-
focus:
|
|
24988
|
+
focus: gg
|
|
24989
24989
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createElementVNode("div", {
|
|
24990
24990
|
ref_key: "editorRef",
|
|
24991
24991
|
ref: i,
|
|
@@ -24999,11 +24999,11 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24999
24999
|
"data-tag-type": r.data.type
|
|
25000
25000
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25001
25001
|
class: "mention-tag-remove-icon",
|
|
25002
|
-
onClick: (a) =>
|
|
25002
|
+
onClick: (a) => yg(e, r, i, n)
|
|
25003
25003
|
}, null, 8, ["onClick"])], 10, _hoisted_4$11)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$7))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$18), createVNode(unref(Tippy), {
|
|
25004
25004
|
ref_key: "tippyRef",
|
|
25005
25005
|
ref: a,
|
|
25006
|
-
"append-to": unref(
|
|
25006
|
+
"append-to": unref(ug),
|
|
25007
25007
|
arrow: !1,
|
|
25008
25008
|
"hide-on-click": !0,
|
|
25009
25009
|
interactive: !0,
|
|
@@ -25013,16 +25013,16 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25013
25013
|
trigger: "manual",
|
|
25014
25014
|
"trigger-target": i.value,
|
|
25015
25015
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25016
|
-
onHidden:
|
|
25017
|
-
onShow:
|
|
25016
|
+
onHidden: fg,
|
|
25017
|
+
onShow: Eg
|
|
25018
25018
|
}, {
|
|
25019
25019
|
content: withCtx(() => [k.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25020
25020
|
key: 0,
|
|
25021
|
-
"on-select":
|
|
25021
|
+
"on-select": hg,
|
|
25022
25022
|
"resource-list": I.value
|
|
25023
25023
|
}, null, 8, ["resource-list"])) : k.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25024
25024
|
key: 1,
|
|
25025
|
-
"on-select":
|
|
25025
|
+
"on-select": vg,
|
|
25026
25026
|
prompts: L.value
|
|
25027
25027
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25028
25028
|
_: 1
|
|
@@ -25123,11 +25123,11 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25123
25123
|
} catch (e) {
|
|
25124
25124
|
console.error(e);
|
|
25125
25125
|
}
|
|
25126
|
-
},
|
|
25126
|
+
}, ug = () => {
|
|
25127
25127
|
s.value = "";
|
|
25128
25128
|
}, G = (e) => {
|
|
25129
25129
|
T("selectShortcut", e);
|
|
25130
|
-
},
|
|
25130
|
+
}, dg = () => {
|
|
25131
25131
|
T("deleteShortcut");
|
|
25132
25132
|
}, J = async (e) => {
|
|
25133
25133
|
if (L.value) for (let n of e) {
|
|
@@ -25158,7 +25158,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25158
25158
|
key: 0,
|
|
25159
25159
|
class: "chat-input-cite",
|
|
25160
25160
|
content: s.value,
|
|
25161
|
-
onClose:
|
|
25161
|
+
onClose: ug
|
|
25162
25162
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25163
25163
|
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: O.value })), () => [O.value.length ? (openBlock(), createElementBlock("div", {
|
|
25164
25164
|
key: 0,
|
|
@@ -25205,7 +25205,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25205
25205
|
class: "selected-shortcut-btn",
|
|
25206
25206
|
shortcut: k.value
|
|
25207
25207
|
}, {
|
|
25208
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25208
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: dg })]),
|
|
25209
25209
|
_: 1
|
|
25210
25210
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25211
25211
|
]),
|
|
@@ -25964,6 +25964,10 @@ function isMac() {
|
|
|
25964
25964
|
function getTogglePanelShortcut() {
|
|
25965
25965
|
return isMac() ? "Cmd + I" : "Ctrl + I";
|
|
25966
25966
|
}
|
|
25967
|
+
function isTogglePanelShortcut(e) {
|
|
25968
|
+
let n = isMac() ? e.metaKey : e.ctrlKey, r = e.key.toLowerCase() === "i";
|
|
25969
|
+
return n && r && !e.shiftKey && !e.altKey;
|
|
25970
|
+
}
|
|
25967
25971
|
const lang = getCookieByName("blueking_language") || "zh-cn", langData = {
|
|
25968
25972
|
小鲸: "BK GPT",
|
|
25969
25973
|
关闭: "close",
|
|
@@ -26397,7 +26401,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26397
26401
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
26398
26402
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
26399
26403
|
}));
|
|
26400
|
-
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")),
|
|
26404
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), ug = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), fg = (e) => K.value ? e : t("暂无使用权限"), Q = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), $ = computed(() => {
|
|
26401
26405
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
26402
26406
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
26403
26407
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -26419,7 +26423,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26419
26423
|
${a}
|
|
26420
26424
|
</div>
|
|
26421
26425
|
`;
|
|
26422
|
-
}),
|
|
26426
|
+
}), mg = async () => {
|
|
26423
26427
|
if (i.sessionBusinessManager) try {
|
|
26424
26428
|
await i.sessionBusinessManager.createNewSession();
|
|
26425
26429
|
} catch (e) {
|
|
@@ -26429,18 +26433,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26429
26433
|
});
|
|
26430
26434
|
}
|
|
26431
26435
|
a("new-chat");
|
|
26432
|
-
},
|
|
26436
|
+
}, gg = (e) => {
|
|
26433
26437
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26434
|
-
},
|
|
26438
|
+
}, _g = () => {
|
|
26435
26439
|
a("help-click");
|
|
26436
|
-
},
|
|
26440
|
+
}, vg = (e) => {
|
|
26437
26441
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26438
|
-
},
|
|
26442
|
+
}, yg = (e) => {
|
|
26439
26443
|
e.stopPropagation(), e.preventDefault();
|
|
26440
26444
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26441
26445
|
if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
|
|
26442
26446
|
case "rename":
|
|
26443
|
-
|
|
26447
|
+
bg();
|
|
26444
26448
|
break;
|
|
26445
26449
|
case "auto-generate":
|
|
26446
26450
|
a("auto-generate-name");
|
|
@@ -26449,9 +26453,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26449
26453
|
a("share");
|
|
26450
26454
|
break;
|
|
26451
26455
|
}
|
|
26452
|
-
},
|
|
26453
|
-
document.removeEventListener("click",
|
|
26454
|
-
document.addEventListener("click",
|
|
26456
|
+
}, bg = () => {
|
|
26457
|
+
document.removeEventListener("click", Eg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26458
|
+
document.addEventListener("click", Eg);
|
|
26455
26459
|
}, 100), setTimeout(() => {
|
|
26456
26460
|
if (I.value) try {
|
|
26457
26461
|
let e = I.value;
|
|
@@ -26462,22 +26466,22 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26462
26466
|
console.warn("Failed to focus rename input:", e);
|
|
26463
26467
|
}
|
|
26464
26468
|
}, 100);
|
|
26465
|
-
},
|
|
26469
|
+
}, Sg = () => {
|
|
26466
26470
|
let e = j.value.trim();
|
|
26467
26471
|
if (!e) {
|
|
26468
|
-
|
|
26472
|
+
wg();
|
|
26469
26473
|
return;
|
|
26470
26474
|
}
|
|
26471
26475
|
a("rename", e), k.value = !1, j.value = "";
|
|
26472
|
-
},
|
|
26476
|
+
}, wg = () => {
|
|
26473
26477
|
k.value = !1, j.value = "";
|
|
26474
|
-
},
|
|
26475
|
-
j.value = e, n.key === "Enter" ?
|
|
26476
|
-
},
|
|
26478
|
+
}, Tg = (e, n) => {
|
|
26479
|
+
j.value = e, n.key === "Enter" ? Sg() : n.key === "Escape" && wg();
|
|
26480
|
+
}, Eg = (e) => {
|
|
26477
26481
|
if (!k.value) return;
|
|
26478
26482
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26479
|
-
r && !r.contains(n) &&
|
|
26480
|
-
},
|
|
26483
|
+
r && !r.contains(n) && wg();
|
|
26484
|
+
}, Dg = async () => {
|
|
26481
26485
|
if (!u.value) return;
|
|
26482
26486
|
let e = (await import("tippy.js")).default;
|
|
26483
26487
|
L &&= (L.destroy(), null), L = e(u.value, {
|
|
@@ -26493,13 +26497,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26493
26497
|
onShow: () => {
|
|
26494
26498
|
setTimeout(() => {
|
|
26495
26499
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26496
|
-
e.addEventListener("click",
|
|
26500
|
+
e.addEventListener("click", yg);
|
|
26497
26501
|
});
|
|
26498
26502
|
}, 0);
|
|
26499
26503
|
},
|
|
26500
26504
|
onHide: () => {
|
|
26501
26505
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26502
|
-
e.removeEventListener("click",
|
|
26506
|
+
e.removeEventListener("click", yg);
|
|
26503
26507
|
});
|
|
26504
26508
|
}
|
|
26505
26509
|
});
|
|
@@ -26507,9 +26511,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26507
26511
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26508
26512
|
L && L.setContent($.value);
|
|
26509
26513
|
}), onMounted(() => {
|
|
26510
|
-
|
|
26514
|
+
Dg(), i.sessionBusinessManager && B(), document.addEventListener("click", Eg);
|
|
26511
26515
|
}), onBeforeUnmount(() => {
|
|
26512
|
-
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click",
|
|
26516
|
+
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Eg);
|
|
26513
26517
|
}), n({
|
|
26514
26518
|
headerRef: s,
|
|
26515
26519
|
historyIconRef: l
|
|
@@ -26532,13 +26536,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26532
26536
|
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
26533
26537
|
class: "rename-input",
|
|
26534
26538
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26535
|
-
onKeyup:
|
|
26539
|
+
onKeyup: Tg
|
|
26536
26540
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26537
26541
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26538
|
-
onClick:
|
|
26542
|
+
onClick: Sg
|
|
26539
26543
|
}), createElementVNode("i", {
|
|
26540
26544
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26541
|
-
onClick:
|
|
26545
|
+
onClick: wg
|
|
26542
26546
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26543
26547
|
], 2),
|
|
26544
26548
|
i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26546,7 +26550,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26546
26550
|
ref_key: "moreIconRef",
|
|
26547
26551
|
ref: u,
|
|
26548
26552
|
class: "bkai-icon bkai-more",
|
|
26549
|
-
onClick:
|
|
26553
|
+
onClick: vg
|
|
26550
26554
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26551
26555
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26552
26556
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26558,9 +26562,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26558
26562
|
{ disabled: !K.value }
|
|
26559
26563
|
]),
|
|
26560
26564
|
style: normalizeStyle(Q()),
|
|
26561
|
-
onClick: r[1] ||= (e) => K.value ?
|
|
26565
|
+
onClick: r[1] ||= (e) => K.value ? mg() : void 0
|
|
26562
26566
|
}, null, 6)), [[unref(o), {
|
|
26563
|
-
content:
|
|
26567
|
+
content: fg(unref(t)("新增会话")),
|
|
26564
26568
|
boundary: "parent"
|
|
26565
26569
|
}]]) : createCommentVNode("v-if", !0),
|
|
26566
26570
|
createCommentVNode(" 历史会话按钮 "),
|
|
@@ -26574,15 +26578,15 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26574
26578
|
{ disabled: !K.value }
|
|
26575
26579
|
]),
|
|
26576
26580
|
style: normalizeStyle(Q()),
|
|
26577
|
-
onClick: r[2] ||= (e) => K.value ?
|
|
26581
|
+
onClick: r[2] ||= (e) => K.value ? gg(e) : void 0
|
|
26578
26582
|
}, null, 6)), [[unref(o), {
|
|
26579
|
-
content:
|
|
26583
|
+
content: fg(unref(t)("历史会话")),
|
|
26580
26584
|
boundary: "parent"
|
|
26581
26585
|
}]]) : createCommentVNode("v-if", !0),
|
|
26582
26586
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26583
26587
|
key: 2,
|
|
26584
26588
|
class: "bkai-icon bkai-zhushou",
|
|
26585
|
-
onClick:
|
|
26589
|
+
onClick: _g
|
|
26586
26590
|
}, null, 512)), [[unref(o), {
|
|
26587
26591
|
content: unref(t)("转人工"),
|
|
26588
26592
|
boundary: "parent"
|
|
@@ -26591,7 +26595,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26591
26595
|
key: 3,
|
|
26592
26596
|
ref_key: "compressionRef",
|
|
26593
26597
|
ref: m,
|
|
26594
|
-
class: normalizeClass(["bkai-icon",
|
|
26598
|
+
class: normalizeClass(["bkai-icon", ug.value]),
|
|
26595
26599
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
26596
26600
|
}, null, 2)), [[unref(o), {
|
|
26597
26601
|
content: G.value,
|
|
@@ -27416,7 +27420,7 @@ var UIStateManager = class {
|
|
|
27416
27420
|
a("receive-text");
|
|
27417
27421
|
},
|
|
27418
27422
|
onDone: () => {
|
|
27419
|
-
a("receive-end"),
|
|
27423
|
+
a("receive-end"), Hg();
|
|
27420
27424
|
},
|
|
27421
27425
|
onError: (e) => {
|
|
27422
27426
|
a("error", e);
|
|
@@ -27439,11 +27443,11 @@ var UIStateManager = class {
|
|
|
27439
27443
|
}) : (console.error(e.error), k.value = Error(e.error), null);
|
|
27440
27444
|
})(), z = computed(() => ((i.chatHelper || L)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), B = async (e, n) => {
|
|
27441
27445
|
if (e.id === "cite") {
|
|
27442
|
-
|
|
27446
|
+
Og.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), t_();
|
|
27443
27447
|
return;
|
|
27444
27448
|
}
|
|
27445
27449
|
if (e.id === "rebuild") {
|
|
27446
|
-
await
|
|
27450
|
+
await fg(n);
|
|
27447
27451
|
return;
|
|
27448
27452
|
}
|
|
27449
27453
|
if (e.id === "delete") {
|
|
@@ -27473,7 +27477,7 @@ var UIStateManager = class {
|
|
|
27473
27477
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27474
27478
|
return;
|
|
27475
27479
|
}
|
|
27476
|
-
let s = findLastUserMessageIdBefore(
|
|
27480
|
+
let s = findLastUserMessageIdBefore(Tg?.messages.value || [], n[0]);
|
|
27477
27481
|
if (s === void 0) {
|
|
27478
27482
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27479
27483
|
return;
|
|
@@ -27491,12 +27495,12 @@ var UIStateManager = class {
|
|
|
27491
27495
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27492
27496
|
}
|
|
27493
27497
|
}, K = async (e) => {
|
|
27494
|
-
if (!
|
|
27498
|
+
if (!Tg || !L) {
|
|
27495
27499
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27496
27500
|
return;
|
|
27497
27501
|
}
|
|
27498
27502
|
try {
|
|
27499
|
-
let n =
|
|
27503
|
+
let n = Tg.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27500
27504
|
if (!r) {
|
|
27501
27505
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27502
27506
|
return;
|
|
@@ -27506,8 +27510,8 @@ var UIStateManager = class {
|
|
|
27506
27510
|
} catch (e) {
|
|
27507
27511
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27508
27512
|
}
|
|
27509
|
-
},
|
|
27510
|
-
if (!
|
|
27513
|
+
}, fg = async (e) => {
|
|
27514
|
+
if (!Tg || !L) {
|
|
27511
27515
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27512
27516
|
return;
|
|
27513
27517
|
}
|
|
@@ -27517,17 +27521,17 @@ var UIStateManager = class {
|
|
|
27517
27521
|
return;
|
|
27518
27522
|
}
|
|
27519
27523
|
try {
|
|
27520
|
-
await
|
|
27524
|
+
await Tg.regenerateFromAIMessages(e, n), Hg();
|
|
27521
27525
|
} catch (e) {
|
|
27522
27526
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27523
27527
|
}
|
|
27524
27528
|
}, Q = async (e, n) => {
|
|
27525
27529
|
if (e.id === "delete") {
|
|
27526
|
-
await
|
|
27530
|
+
await _g(n);
|
|
27527
27531
|
return;
|
|
27528
27532
|
}
|
|
27529
27533
|
if (e.id === "cite") {
|
|
27530
|
-
|
|
27534
|
+
Og.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), t_();
|
|
27531
27535
|
return;
|
|
27532
27536
|
}
|
|
27533
27537
|
console.log("handleUserAction", e, n);
|
|
@@ -27554,12 +27558,12 @@ var UIStateManager = class {
|
|
|
27554
27558
|
console.error("[ChatBot] Cannot edit message: invalid content type");
|
|
27555
27559
|
return;
|
|
27556
27560
|
}
|
|
27557
|
-
await L.agent.resendMessage(String(o), i, e),
|
|
27561
|
+
await L.agent.resendMessage(String(o), i, e), Hg();
|
|
27558
27562
|
} catch (e) {
|
|
27559
27563
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27560
27564
|
}
|
|
27561
|
-
},
|
|
27562
|
-
if (!
|
|
27565
|
+
}, mg = async (e, n) => {
|
|
27566
|
+
if (!Tg || !L) {
|
|
27563
27567
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27564
27568
|
return;
|
|
27565
27569
|
}
|
|
@@ -27574,26 +27578,26 @@ var UIStateManager = class {
|
|
|
27574
27578
|
return;
|
|
27575
27579
|
}
|
|
27576
27580
|
try {
|
|
27577
|
-
let a =
|
|
27581
|
+
let a = gg(e);
|
|
27578
27582
|
if (!a) {
|
|
27579
27583
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27580
27584
|
return;
|
|
27581
27585
|
}
|
|
27582
|
-
let o =
|
|
27583
|
-
await
|
|
27586
|
+
let o = Yg(a, n), s = String(n.input ?? "");
|
|
27587
|
+
await Tg.resendMessageWithProperty(String(i), r, s, o), Hg();
|
|
27584
27588
|
} catch (e) {
|
|
27585
27589
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27586
27590
|
}
|
|
27587
|
-
},
|
|
27591
|
+
}, gg = (e) => {
|
|
27588
27592
|
let n = e.property?.extra;
|
|
27589
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27590
|
-
},
|
|
27591
|
-
if (!
|
|
27593
|
+
return n?.shortcut ? n.shortcut : n?.command ? Vg.value.find((e) => e.id === n.command) ?? null : null;
|
|
27594
|
+
}, _g = async (e) => {
|
|
27595
|
+
if (!Tg || !L) {
|
|
27592
27596
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27593
27597
|
return;
|
|
27594
27598
|
}
|
|
27595
27599
|
try {
|
|
27596
|
-
let n =
|
|
27600
|
+
let n = Tg.messages.value, r = n.findIndex((n) => n === e);
|
|
27597
27601
|
if (r === -1) {
|
|
27598
27602
|
console.error("[ChatBot] User message not found in messages list");
|
|
27599
27603
|
return;
|
|
@@ -27609,59 +27613,59 @@ var UIStateManager = class {
|
|
|
27609
27613
|
} catch (e) {
|
|
27610
27614
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27611
27615
|
}
|
|
27612
|
-
},
|
|
27616
|
+
}, yg = async () => {
|
|
27613
27617
|
((i.chatHelper || L)?.agent)?.stopChat?.();
|
|
27614
|
-
},
|
|
27615
|
-
|
|
27616
|
-
let
|
|
27618
|
+
}, Sg = !i.chatHelper;
|
|
27619
|
+
Sg && L && j.injectMessageModule(L.message);
|
|
27620
|
+
let wg = L ? new SessionBusinessManager(L.session, L.message, null, {
|
|
27617
27621
|
enableChatSession: !0,
|
|
27618
27622
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27619
27623
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27620
27624
|
initialSessionCode: i.sessionCode
|
|
27621
|
-
}) : null,
|
|
27625
|
+
}) : null, Tg = L ? new ChatBusinessManager(L.agent, L.message, L.session, null, {
|
|
27622
27626
|
openingRemark: i.helloText,
|
|
27623
27627
|
predefinedQuestions: i.prompts,
|
|
27624
27628
|
placeholder: i.placeholder
|
|
27625
|
-
}) : null,
|
|
27629
|
+
}) : null, Eg = new ShortcutManager(null, i.shortcuts || []), Dg = shallowRef([[]]), Og = ref(""), Ag = computed(() => Tg?.messages.value ?? []), jg = computed(() => Tg?.isMessagesLoading.value ?? !1), Mg = computed(() => Tg?.isGenerating.value ?? !1), Ng = computed(() => wg?.currentSession.value ?? null), Pg = computed(() => !jg.value && Ag.value.length === 0), Fg = computed(() => L?.agent.info.value?.conversationSettings?.openingRemark || ""), Ig = computed(() => ({
|
|
27626
27630
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27627
27631
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27628
|
-
})),
|
|
27629
|
-
let e =
|
|
27632
|
+
})), Lg = computed(() => {
|
|
27633
|
+
let e = Eg.shortcuts.value;
|
|
27630
27634
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27631
|
-
}),
|
|
27635
|
+
}), Rg = () => {
|
|
27632
27636
|
T.value = [], a("cancel-share");
|
|
27633
|
-
},
|
|
27637
|
+
}, zg = () => {
|
|
27634
27638
|
a("confirm-share", T.value);
|
|
27635
|
-
},
|
|
27636
|
-
e ? T.value =
|
|
27637
|
-
},
|
|
27639
|
+
}, Bg = (e) => {
|
|
27640
|
+
e ? T.value = Ag.value : T.value = [];
|
|
27641
|
+
}, Vg = Eg.effectiveShortcuts;
|
|
27638
27642
|
watch(() => i.shortcuts, (e) => {
|
|
27639
|
-
|
|
27643
|
+
Eg.setShortcuts(e || []);
|
|
27640
27644
|
}, { immediate: !0 }), watch(() => L?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27641
|
-
e &&
|
|
27645
|
+
e && Eg.setAgentShortcuts(e);
|
|
27642
27646
|
}, { immediate: !0 });
|
|
27643
|
-
let
|
|
27647
|
+
let Hg = async () => {
|
|
27644
27648
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27645
|
-
},
|
|
27646
|
-
if (!
|
|
27649
|
+
}, Ug = async (e, n = {}) => {
|
|
27650
|
+
if (!Tg || !L) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
27647
27651
|
let r = L.session.current?.value.sessionCode;
|
|
27648
27652
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
27649
|
-
|
|
27650
|
-
},
|
|
27653
|
+
Dg.value = [[]], Og.value = "", a("send-message", e), await Tg.sendMessage(e, r, n);
|
|
27654
|
+
}, Wg = async (e, n) => {
|
|
27651
27655
|
try {
|
|
27652
|
-
let n =
|
|
27653
|
-
typeof e == "string" && await
|
|
27656
|
+
let n = Og.value ? { property: { extra: { cite: Og.value } } } : {};
|
|
27657
|
+
typeof e == "string" && await Ug(e, n);
|
|
27654
27658
|
} catch (e) {
|
|
27655
27659
|
console.error("Failed to send message:", e), a("error", e);
|
|
27656
27660
|
}
|
|
27657
|
-
},
|
|
27658
|
-
|
|
27659
|
-
},
|
|
27660
|
-
|
|
27661
|
+
}, Gg = async () => {
|
|
27662
|
+
Zg();
|
|
27663
|
+
}, Kg = (e, n) => {
|
|
27664
|
+
qg(e, n), a("shortcut-click", {
|
|
27661
27665
|
shortcut: e,
|
|
27662
27666
|
source: "main"
|
|
27663
27667
|
});
|
|
27664
|
-
},
|
|
27668
|
+
}, qg = (e, n) => {
|
|
27665
27669
|
let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
|
|
27666
27670
|
u.value = {
|
|
27667
27671
|
...r,
|
|
@@ -27670,9 +27674,9 @@ var UIStateManager = class {
|
|
|
27670
27674
|
[i]: n || ""
|
|
27671
27675
|
}
|
|
27672
27676
|
};
|
|
27673
|
-
},
|
|
27677
|
+
}, Jg = () => {
|
|
27674
27678
|
u.value = null;
|
|
27675
|
-
},
|
|
27679
|
+
}, Yg = (e, n) => {
|
|
27676
27680
|
let r = e.components || [];
|
|
27677
27681
|
return { extra: {
|
|
27678
27682
|
cite: {
|
|
@@ -27692,41 +27696,41 @@ var UIStateManager = class {
|
|
|
27692
27696
|
__value: n[e.key]
|
|
27693
27697
|
}))
|
|
27694
27698
|
} };
|
|
27695
|
-
},
|
|
27699
|
+
}, Xg = async (e) => {
|
|
27696
27700
|
try {
|
|
27697
27701
|
if (!u.value) {
|
|
27698
27702
|
console.error("[ChatBot] No selected shortcut");
|
|
27699
27703
|
return;
|
|
27700
27704
|
}
|
|
27701
|
-
let n =
|
|
27702
|
-
await
|
|
27705
|
+
let n = Yg(u.value, e);
|
|
27706
|
+
await Ug(String(e.input ?? ""), { property: n }), Jg();
|
|
27703
27707
|
} catch (e) {
|
|
27704
27708
|
console.error("Failed to submit shortcut:", e), a("error", e);
|
|
27705
27709
|
}
|
|
27706
|
-
},
|
|
27707
|
-
if (!
|
|
27710
|
+
}, Zg = () => {
|
|
27711
|
+
if (!Tg) {
|
|
27708
27712
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27709
27713
|
return;
|
|
27710
27714
|
}
|
|
27711
|
-
|
|
27712
|
-
},
|
|
27713
|
-
if (!
|
|
27715
|
+
Tg.stopGeneration(), a("stop");
|
|
27716
|
+
}, Qg = async (e) => {
|
|
27717
|
+
if (!wg) {
|
|
27714
27718
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27715
27719
|
return;
|
|
27716
27720
|
}
|
|
27717
27721
|
try {
|
|
27718
|
-
await
|
|
27722
|
+
await wg.switchSession(e), a("session-switched", wg.currentSession.value);
|
|
27719
27723
|
} catch (e) {
|
|
27720
27724
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27721
27725
|
}
|
|
27722
|
-
},
|
|
27723
|
-
|
|
27724
|
-
},
|
|
27726
|
+
}, $g = (e) => {
|
|
27727
|
+
Og.value = e;
|
|
27728
|
+
}, t_ = () => {
|
|
27725
27729
|
l.value?.focus?.();
|
|
27726
27730
|
};
|
|
27727
27731
|
return onMounted(async () => {
|
|
27728
27732
|
if (!(!L || k.value)) try {
|
|
27729
|
-
if (
|
|
27733
|
+
if (Sg) {
|
|
27730
27734
|
if (await L.agent.getAgentInfo(), await L.session.getSessions(), i.sessionCode) await L.session.chooseSession(i.sessionCode);
|
|
27731
27735
|
else if (L.session.list.value.length > 0) {
|
|
27732
27736
|
let e = L.session.list.value[0];
|
|
@@ -27739,48 +27743,48 @@ var UIStateManager = class {
|
|
|
27739
27743
|
console.error("Failed to initialize ChatBot:", e), k.value = e, a("error", e);
|
|
27740
27744
|
}
|
|
27741
27745
|
}), onBeforeUnmount(() => {
|
|
27742
|
-
|
|
27746
|
+
Sg && L && L.agent.stopChat();
|
|
27743
27747
|
}), n({
|
|
27744
|
-
sendMessage: (e) =>
|
|
27745
|
-
stopGeneration:
|
|
27746
|
-
switchSession:
|
|
27747
|
-
messages:
|
|
27748
|
-
currentSession:
|
|
27749
|
-
isGenerating:
|
|
27748
|
+
sendMessage: (e) => Wg(e, [[]]),
|
|
27749
|
+
stopGeneration: Zg,
|
|
27750
|
+
switchSession: Qg,
|
|
27751
|
+
messages: Ag,
|
|
27752
|
+
currentSession: Ng,
|
|
27753
|
+
isGenerating: Mg,
|
|
27750
27754
|
getChatHelper: () => L,
|
|
27751
|
-
setCiteText:
|
|
27752
|
-
focusInput:
|
|
27755
|
+
setCiteText: $g,
|
|
27756
|
+
focusInput: t_,
|
|
27753
27757
|
selectShortcut: (e, n) => {
|
|
27754
|
-
|
|
27758
|
+
qg(e, n);
|
|
27755
27759
|
}
|
|
27756
27760
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
27757
27761
|
class: normalizeClass([
|
|
27758
27762
|
"ai-chatbot",
|
|
27759
27763
|
i.extCls,
|
|
27760
|
-
{ "welcome-state":
|
|
27764
|
+
{ "welcome-state": Pg.value }
|
|
27761
27765
|
]),
|
|
27762
|
-
style: normalizeStyle(
|
|
27763
|
-
}, [createCommentVNode(" 初始化错误提示 "), k.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(k.value.message), 1)])) :
|
|
27766
|
+
style: normalizeStyle(Ig.value)
|
|
27767
|
+
}, [createCommentVNode(" 初始化错误提示 "), k.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(k.value.message), 1)])) : Pg.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 欢迎状态:垂直居中布局 "), createElementVNode("div", _hoisted_2$1, [
|
|
27764
27768
|
createCommentVNode(" 欢迎区域 "),
|
|
27765
|
-
createElementVNode("div", _hoisted_3, [n[5] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
|
|
27769
|
+
createElementVNode("div", _hoisted_3, [n[5] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), Fg.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(content_render_default), { content: Fg.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)]),
|
|
27766
27770
|
createCommentVNode(" 快捷方式表单 "),
|
|
27767
27771
|
u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
27768
|
-
onClose:
|
|
27769
|
-
onSubmit:
|
|
27772
|
+
onClose: Jg,
|
|
27773
|
+
onSubmit: Xg
|
|
27770
27774
|
}), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 输入框 "), createElementVNode("div", _hoisted_5, [renderSlot(e.$slots, "input", {}, () => [createVNode(unref(chat_input_default), {
|
|
27771
27775
|
ref_key: "chatInputRef",
|
|
27772
27776
|
ref: l,
|
|
27773
|
-
modelValue:
|
|
27774
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
27775
|
-
cite:
|
|
27776
|
-
"onUpdate:cite": n[1] ||= (e) =>
|
|
27777
|
+
modelValue: Dg.value,
|
|
27778
|
+
"onUpdate:modelValue": n[0] ||= (e) => Dg.value = e,
|
|
27779
|
+
cite: Og.value,
|
|
27780
|
+
"onUpdate:cite": n[1] ||= (e) => Og.value = e,
|
|
27777
27781
|
"message-status": z.value,
|
|
27778
|
-
"on-send-message":
|
|
27779
|
-
"on-stop-sending":
|
|
27782
|
+
"on-send-message": Wg,
|
|
27783
|
+
"on-stop-sending": Gg,
|
|
27780
27784
|
placeholder: i.placeholder,
|
|
27781
27785
|
"shortcut-id": u.value?.id,
|
|
27782
|
-
shortcuts:
|
|
27783
|
-
onSelectShortcut:
|
|
27786
|
+
shortcuts: Lg.value,
|
|
27787
|
+
onSelectShortcut: Kg
|
|
27784
27788
|
}, null, 8, [
|
|
27785
27789
|
"modelValue",
|
|
27786
27790
|
"cite",
|
|
@@ -27796,19 +27800,19 @@ var UIStateManager = class {
|
|
|
27796
27800
|
ref_key: "messagesContainerRef",
|
|
27797
27801
|
ref: s,
|
|
27798
27802
|
class: "chatbot-messages"
|
|
27799
|
-
}, [
|
|
27803
|
+
}, [jg.value ? (openBlock(), createElementBlock("div", _hoisted_6, " 加载中... ")) : (openBlock(), createBlock(unref(message_container_default), {
|
|
27800
27804
|
key: 1,
|
|
27801
27805
|
"selected-messages": T.value,
|
|
27802
27806
|
"onUpdate:selectedMessages": n[2] ||= (e) => T.value = e,
|
|
27803
27807
|
"enable-selection": i.enableSelection,
|
|
27804
27808
|
"message-status": z.value,
|
|
27805
|
-
messages:
|
|
27809
|
+
messages: Ag.value,
|
|
27806
27810
|
"on-agent-action": B,
|
|
27807
27811
|
"on-agent-feedback": H,
|
|
27808
27812
|
"on-user-action": Q,
|
|
27809
27813
|
"on-user-input-confirm": $,
|
|
27810
|
-
"on-user-shortcut-confirm":
|
|
27811
|
-
onStopStreaming:
|
|
27814
|
+
"on-user-shortcut-confirm": mg,
|
|
27815
|
+
onStopStreaming: yg
|
|
27812
27816
|
}, null, 8, [
|
|
27813
27817
|
"selected-messages",
|
|
27814
27818
|
"enable-selection",
|
|
@@ -27818,33 +27822,33 @@ var UIStateManager = class {
|
|
|
27818
27822
|
createCommentVNode(" 选择模式底部操作栏 "),
|
|
27819
27823
|
i.enableSelection ? (openBlock(), createBlock(selection_footer_default, {
|
|
27820
27824
|
key: 0,
|
|
27821
|
-
"is-all-selected": T.value.length ===
|
|
27825
|
+
"is-all-selected": T.value.length === Ag.value.length,
|
|
27822
27826
|
loading: i.shareLoading,
|
|
27823
27827
|
"selected-count": T.value.length,
|
|
27824
|
-
onCancel:
|
|
27825
|
-
onConfirm:
|
|
27826
|
-
onToggleAll:
|
|
27828
|
+
onCancel: Rg,
|
|
27829
|
+
onConfirm: zg,
|
|
27830
|
+
onToggleAll: Bg
|
|
27827
27831
|
}, null, 8, [
|
|
27828
27832
|
"is-all-selected",
|
|
27829
27833
|
"loading",
|
|
27830
27834
|
"selected-count"
|
|
27831
27835
|
])) : u.value?.components?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 快捷方式表单 "), createVNode(unref(shortcut_render_default), mergeProps(u.value, {
|
|
27832
|
-
onClose:
|
|
27833
|
-
onSubmit:
|
|
27836
|
+
onClose: Jg,
|
|
27837
|
+
onSubmit: Xg
|
|
27834
27838
|
}), null, 16)], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" 输入框 "), createElementVNode("div", _hoisted_7, [renderSlot(e.$slots, "input", {}, () => [createVNode(unref(chat_input_default), {
|
|
27835
27839
|
ref_key: "chatInputRef",
|
|
27836
27840
|
ref: l,
|
|
27837
|
-
modelValue:
|
|
27838
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
27839
|
-
cite:
|
|
27840
|
-
"onUpdate:cite": n[4] ||= (e) =>
|
|
27841
|
+
modelValue: Dg.value,
|
|
27842
|
+
"onUpdate:modelValue": n[3] ||= (e) => Dg.value = e,
|
|
27843
|
+
cite: Og.value,
|
|
27844
|
+
"onUpdate:cite": n[4] ||= (e) => Og.value = e,
|
|
27841
27845
|
"message-status": z.value,
|
|
27842
|
-
"on-send-message":
|
|
27843
|
-
"on-stop-sending":
|
|
27846
|
+
"on-send-message": Wg,
|
|
27847
|
+
"on-stop-sending": Gg,
|
|
27844
27848
|
placeholder: i.placeholder,
|
|
27845
27849
|
"shortcut-id": u.value?.id,
|
|
27846
|
-
shortcuts:
|
|
27847
|
-
onSelectShortcut:
|
|
27850
|
+
shortcuts: Lg.value,
|
|
27851
|
+
onSelectShortcut: Kg
|
|
27848
27852
|
}, null, 8, [
|
|
27849
27853
|
"modelValue",
|
|
27850
27854
|
"cite",
|
|
@@ -28672,7 +28676,7 @@ function useDraggable(e = {}, n) {
|
|
|
28672
28676
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
28673
28677
|
}, H = (e, r, i, a) => {
|
|
28674
28678
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
28675
|
-
},
|
|
28679
|
+
}, ug = () => {
|
|
28676
28680
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
28677
28681
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
28678
28682
|
else {
|
|
@@ -28683,7 +28687,7 @@ function useDraggable(e = {}, n) {
|
|
|
28683
28687
|
}
|
|
28684
28688
|
T.value > O.value && (T.value = O.value);
|
|
28685
28689
|
});
|
|
28686
|
-
},
|
|
28690
|
+
}, dg = () => {
|
|
28687
28691
|
k.value ? (_.value = d.value, nextTick(() => {
|
|
28688
28692
|
E.value = m.value, v.value = u.value, T.value = g.value;
|
|
28689
28693
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
@@ -28693,9 +28697,9 @@ function useDraggable(e = {}, n) {
|
|
|
28693
28697
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28694
28698
|
};
|
|
28695
28699
|
return onMounted(() => {
|
|
28696
|
-
window.addEventListener("resize",
|
|
28700
|
+
window.addEventListener("resize", ug);
|
|
28697
28701
|
}), onBeforeUnmount(() => {
|
|
28698
|
-
window.removeEventListener("resize",
|
|
28702
|
+
window.removeEventListener("resize", ug);
|
|
28699
28703
|
}), {
|
|
28700
28704
|
minWidth: i,
|
|
28701
28705
|
minHeight: a,
|
|
@@ -28709,7 +28713,7 @@ function useDraggable(e = {}, n) {
|
|
|
28709
28713
|
handleResizing: z,
|
|
28710
28714
|
handleDragStop: B,
|
|
28711
28715
|
handleResizeStop: H,
|
|
28712
|
-
toggleCompression:
|
|
28716
|
+
toggleCompression: dg,
|
|
28713
28717
|
updatePosition: K,
|
|
28714
28718
|
updateSize: q,
|
|
28715
28719
|
updatePositionAndSize: (e, n, r, i) => {
|
|
@@ -28754,7 +28758,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28754
28758
|
"compression-change"
|
|
28755
28759
|
],
|
|
28756
28760
|
setup(e, { expose: n, emit: r }) {
|
|
28757
|
-
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:
|
|
28761
|
+
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: ug } = useDraggable({
|
|
28758
28762
|
initWidth: i.defaultWidth,
|
|
28759
28763
|
minWidth: i.minWidth,
|
|
28760
28764
|
minHeight: i.minHeight,
|
|
@@ -28785,13 +28789,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28785
28789
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
28786
28790
|
e.style.pointerEvents = "";
|
|
28787
28791
|
});
|
|
28788
|
-
},
|
|
28792
|
+
}, fg = (e, n) => {
|
|
28789
28793
|
o.value || (o.value = !0, J()), k(e, n);
|
|
28790
28794
|
}, Q = (e, n, r, i) => {
|
|
28791
28795
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
28792
28796
|
}, $ = (e, n) => {
|
|
28793
28797
|
I(e, n), o.value = !1, Z();
|
|
28794
|
-
},
|
|
28798
|
+
}, mg = (e, n, r, i) => {
|
|
28795
28799
|
L(e, n, r, i), o.value = !1, Z();
|
|
28796
28800
|
};
|
|
28797
28801
|
return watch(O, (e) => {
|
|
@@ -28799,7 +28803,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28799
28803
|
}), n({
|
|
28800
28804
|
updatePosition: B,
|
|
28801
28805
|
updateSize: H,
|
|
28802
|
-
updatePositionAndSize:
|
|
28806
|
+
updatePositionAndSize: ug,
|
|
28803
28807
|
toggleCompression: z,
|
|
28804
28808
|
positionAndSize: K,
|
|
28805
28809
|
isCompressed: O
|
|
@@ -28821,10 +28825,10 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28821
28825
|
"prevent-deactivation": !0,
|
|
28822
28826
|
"drag-handle": i.dragHandle,
|
|
28823
28827
|
"class-name": "draggable-container-inner",
|
|
28824
|
-
onDragging:
|
|
28828
|
+
onDragging: fg,
|
|
28825
28829
|
onResizing: Q,
|
|
28826
28830
|
onDragStop: $,
|
|
28827
|
-
onResizeStop:
|
|
28831
|
+
onResizeStop: mg
|
|
28828
28832
|
}, {
|
|
28829
28833
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
28830
28834
|
_: 3
|
|
@@ -28863,11 +28867,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28863
28867
|
],
|
|
28864
28868
|
setup(e, { emit: n }) {
|
|
28865
28869
|
useCssVars((e) => ({
|
|
28866
|
-
|
|
28867
|
-
|
|
28868
|
-
|
|
28869
|
-
|
|
28870
|
-
|
|
28870
|
+
v05a8b16e: `${o.value.container}px`,
|
|
28871
|
+
v4e1cf4ca: `${o.value.wrapper}px`,
|
|
28872
|
+
v5ab0c513: `${o.value.mini.right}px`,
|
|
28873
|
+
v40c13a80: `${o.value.mini.size}px`,
|
|
28874
|
+
v0d35a9ef: `${o.value.mini.fontSize}px`
|
|
28871
28875
|
}));
|
|
28872
28876
|
let r = e, i = n, a = {
|
|
28873
28877
|
small: {
|
|
@@ -28907,7 +28911,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28907
28911
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
28908
28912
|
theme: "ai-blueking",
|
|
28909
28913
|
delay: [0, 0]
|
|
28910
|
-
}),
|
|
28914
|
+
}), ug = () => {
|
|
28911
28915
|
nextTick(() => {
|
|
28912
28916
|
K();
|
|
28913
28917
|
});
|
|
@@ -28921,9 +28925,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28921
28925
|
}), onMounted(() => {
|
|
28922
28926
|
nextTick(() => {
|
|
28923
28927
|
K();
|
|
28924
|
-
}), window.addEventListener("resize",
|
|
28928
|
+
}), window.addEventListener("resize", ug);
|
|
28925
28929
|
}), onBeforeUnmount(() => {
|
|
28926
|
-
window.removeEventListener("resize",
|
|
28930
|
+
window.removeEventListener("resize", ug);
|
|
28927
28931
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
28928
28932
|
active: !e.isPanelShow,
|
|
28929
28933
|
axis: "y",
|
|
@@ -28967,7 +28971,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28967
28971
|
"onDragging"
|
|
28968
28972
|
]));
|
|
28969
28973
|
}
|
|
28970
|
-
}), [["__scopeId", "data-v-
|
|
28974
|
+
}), [["__scopeId", "data-v-26b6f3ea"]]), _hoisted_1 = { class: "ai-blueking-panel" }, ai_blueking_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
28971
28975
|
__name: "ai-blueking",
|
|
28972
28976
|
props: /* @__PURE__ */ mergeDefaults({
|
|
28973
28977
|
autoSwitchToInitialSession: { type: Boolean },
|
|
@@ -29042,7 +29046,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29042
29046
|
}), T = _.panelVisible, O = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29043
29047
|
componentManager: _,
|
|
29044
29048
|
emit: a
|
|
29045
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession:
|
|
29049
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession: ug } = useChatBootstrap({
|
|
29046
29050
|
url: u,
|
|
29047
29051
|
requestOptions: i.requestOptions,
|
|
29048
29052
|
autoInit: !0,
|
|
@@ -29068,9 +29072,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29068
29072
|
}), G = I, K = new SessionBusinessManager(G.session, G.message, null, {
|
|
29069
29073
|
enableChatSession: i.enableChatSession,
|
|
29070
29074
|
initialSessionCode: i.initialSessionCode
|
|
29071
|
-
}), q = new UIStateManager(),
|
|
29072
|
-
let e =
|
|
29073
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29075
|
+
}), q = new UIStateManager(), fg = computed(() => q.isSelectionMode.value), Q = shallowRef([]), $ = ref(!1), mg = new ShortcutManager(null, i.shortcuts || []), gg = ref(!1), _g = ref(""), vg = computed(() => _.isCompressed.value), yg = computed(() => H.value), xg = ref(""), Sg = ref(!0), wg = ref(!1), Tg = computed(() => {
|
|
29076
|
+
let e = mg.effectiveShortcuts.value;
|
|
29077
|
+
return typeof i.shortcutFilter == "function" && _g.value ? e.filter((e) => i.shortcutFilter?.(e, _g.value)) : e;
|
|
29074
29078
|
});
|
|
29075
29079
|
watch(() => L.value, async (e) => {
|
|
29076
29080
|
if (e && B.value) {
|
|
@@ -29081,20 +29085,20 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29081
29085
|
}).catch(() => {}), e.conversationSettings && (k("session-initialized", {
|
|
29082
29086
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29083
29087
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29084
|
-
}), e.conversationSettings.commands &&
|
|
29088
|
+
}), e.conversationSettings.commands && mg.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29085
29089
|
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29086
29090
|
} catch (e) {
|
|
29087
29091
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29088
29092
|
}
|
|
29089
29093
|
}
|
|
29090
29094
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29091
|
-
|
|
29092
|
-
}, { immediate: !0 }), watch(() =>
|
|
29093
|
-
e && (
|
|
29095
|
+
mg.setShortcuts(e || []);
|
|
29096
|
+
}, { immediate: !0 }), watch(() => ug.value, (e) => {
|
|
29097
|
+
e && (xg.value = e.sessionName || "", wg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29094
29098
|
}, { immediate: !0 }), watch(() => G.message.list.value.length, (e) => {
|
|
29095
|
-
e > 0 && (
|
|
29099
|
+
e > 0 && (wg.value = !0);
|
|
29096
29100
|
});
|
|
29097
|
-
let
|
|
29101
|
+
let Eg = (e) => {
|
|
29098
29102
|
if (e?.agent?.info?.value) {
|
|
29099
29103
|
let n = e.agent.info.value;
|
|
29100
29104
|
n.conversationSettings && k("session-initialized", {
|
|
@@ -29102,48 +29106,48 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29102
29106
|
predefinedQuestions: n.conversationSettings.predefinedQuestions || []
|
|
29103
29107
|
});
|
|
29104
29108
|
}
|
|
29105
|
-
},
|
|
29109
|
+
}, Dg = async (e) => {
|
|
29106
29110
|
_.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29107
|
-
},
|
|
29111
|
+
}, Og = () => {
|
|
29108
29112
|
_.hidePanel();
|
|
29109
|
-
},
|
|
29110
|
-
|
|
29111
|
-
},
|
|
29113
|
+
}, Ag = () => {
|
|
29114
|
+
Og();
|
|
29115
|
+
}, jg = () => {
|
|
29112
29116
|
_.handleNimbusClick();
|
|
29113
|
-
},
|
|
29114
|
-
|
|
29115
|
-
},
|
|
29116
|
-
|
|
29117
|
+
}, Ng = (e) => {
|
|
29118
|
+
_g.value = e;
|
|
29119
|
+
}, Pg = async (e, n) => {
|
|
29120
|
+
gg.value = !1, await Dg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29117
29121
|
shortcut: e,
|
|
29118
29122
|
source: "popup"
|
|
29119
29123
|
});
|
|
29120
|
-
},
|
|
29124
|
+
}, Fg = (e) => {
|
|
29121
29125
|
k("shortcut-click", e);
|
|
29122
|
-
},
|
|
29126
|
+
}, Ig = (e) => {
|
|
29123
29127
|
_.handleDragging(e);
|
|
29124
|
-
},
|
|
29128
|
+
}, Lg = (e) => {
|
|
29125
29129
|
_.handleResizing(e);
|
|
29126
|
-
},
|
|
29130
|
+
}, Rg = (e) => {
|
|
29127
29131
|
_.handleDragStop(e);
|
|
29128
|
-
},
|
|
29132
|
+
}, zg = (e) => {
|
|
29129
29133
|
_.handleResizeStop(e);
|
|
29130
|
-
},
|
|
29134
|
+
}, Bg = () => {
|
|
29131
29135
|
_.container.toggleCompression();
|
|
29132
|
-
},
|
|
29136
|
+
}, Vg = (e) => {
|
|
29133
29137
|
_.setCompressed(e);
|
|
29134
|
-
},
|
|
29138
|
+
}, Hg = async () => {
|
|
29135
29139
|
j.newChat();
|
|
29136
|
-
},
|
|
29140
|
+
}, Ug = (e) => {
|
|
29137
29141
|
j.historyClick(e);
|
|
29138
|
-
},
|
|
29142
|
+
}, Gg = async (e) => {
|
|
29139
29143
|
await K.switchSession(e);
|
|
29140
|
-
},
|
|
29144
|
+
}, Kg = async (e) => {
|
|
29141
29145
|
await K.deleteSession(e);
|
|
29142
|
-
},
|
|
29143
|
-
|
|
29144
|
-
},
|
|
29146
|
+
}, qg = (e) => {
|
|
29147
|
+
wg.value = !1, xg.value = "", k("session-deleted", { sessionCode: e });
|
|
29148
|
+
}, Jg = async (e, n) => {
|
|
29145
29149
|
await K.updateSessionName(e, n);
|
|
29146
|
-
},
|
|
29150
|
+
}, Yg = async () => {
|
|
29147
29151
|
let e = G.session.current?.value?.sessionCode;
|
|
29148
29152
|
if (!e) {
|
|
29149
29153
|
console.error("[AIBlueking] Cannot auto-generate name: no active session");
|
|
@@ -29152,14 +29156,14 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29152
29156
|
try {
|
|
29153
29157
|
await G.session.renameSession(e);
|
|
29154
29158
|
let n = G.session.list.value.find((n) => n.sessionCode === e);
|
|
29155
|
-
n && (
|
|
29159
|
+
n && (xg.value = n.sessionName || "");
|
|
29156
29160
|
} catch (e) {
|
|
29157
|
-
console.error("[AIBlueking] Failed to auto-generate session name:", e),
|
|
29161
|
+
console.error("[AIBlueking] Failed to auto-generate session name:", e), p_(e);
|
|
29158
29162
|
}
|
|
29159
29163
|
j.autoGenerateName();
|
|
29160
|
-
},
|
|
29164
|
+
}, Xg = () => {
|
|
29161
29165
|
j.helpClick();
|
|
29162
|
-
},
|
|
29166
|
+
}, Zg = async (e) => {
|
|
29163
29167
|
let n = G.session.current?.value;
|
|
29164
29168
|
if (!n) {
|
|
29165
29169
|
console.error("[AIBlueking] Cannot rename: no active session");
|
|
@@ -29169,16 +29173,16 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29169
29173
|
await G.session.updateSession({
|
|
29170
29174
|
...n,
|
|
29171
29175
|
sessionName: e
|
|
29172
|
-
}),
|
|
29176
|
+
}), xg.value = e;
|
|
29173
29177
|
} catch (e) {
|
|
29174
|
-
console.error("[AIBlueking] Failed to rename session:", e),
|
|
29178
|
+
console.error("[AIBlueking] Failed to rename session:", e), p_(e);
|
|
29175
29179
|
}
|
|
29176
29180
|
j.rename(e);
|
|
29177
|
-
},
|
|
29181
|
+
}, Qg = () => {
|
|
29178
29182
|
q.enableSelectionMode(), j.share();
|
|
29179
|
-
},
|
|
29183
|
+
}, $g = () => {
|
|
29180
29184
|
q.disableSelectionMode(), Q.value = [];
|
|
29181
|
-
},
|
|
29185
|
+
}, e_ = async (e) => {
|
|
29182
29186
|
if (typeof navigator < "u" && "clipboard" in navigator) try {
|
|
29183
29187
|
return await navigator.clipboard.writeText(e), !0;
|
|
29184
29188
|
} catch {}
|
|
@@ -29191,7 +29195,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29191
29195
|
} finally {
|
|
29192
29196
|
document.body.removeChild(n);
|
|
29193
29197
|
}
|
|
29194
|
-
},
|
|
29198
|
+
}, t_ = async (e) => {
|
|
29195
29199
|
if ($.value = !0, e.length === 0) {
|
|
29196
29200
|
$.value = !1;
|
|
29197
29201
|
return;
|
|
@@ -29203,74 +29207,76 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29203
29207
|
}
|
|
29204
29208
|
try {
|
|
29205
29209
|
let r = await G.message.shareMessages(n, e);
|
|
29206
|
-
r && (await
|
|
29210
|
+
r && (await e_(`${r.share_page}${r.share_token}`), Message({
|
|
29207
29211
|
message: t("分享链接已复制到剪贴板"),
|
|
29208
29212
|
theme: "success"
|
|
29209
29213
|
}));
|
|
29210
29214
|
let i = e.filter((e) => e.role === "user").map((e) => String(e.id));
|
|
29211
29215
|
q.disableSelectionMode(), Q.value = [], j.shareMessages(i);
|
|
29212
29216
|
} catch (e) {
|
|
29213
|
-
console.error("[AIBlueking] Failed to share messages:", e),
|
|
29217
|
+
console.error("[AIBlueking] Failed to share messages:", e), p_(e);
|
|
29214
29218
|
} finally {
|
|
29215
29219
|
$.value = !1;
|
|
29216
29220
|
}
|
|
29217
|
-
},
|
|
29221
|
+
}, n_ = async (e) => {
|
|
29218
29222
|
l.value && await l.value.sendMessage(e);
|
|
29219
|
-
},
|
|
29220
|
-
|
|
29221
|
-
},
|
|
29223
|
+
}, r_ = (e) => {
|
|
29224
|
+
wg.value = !0, j.sendMessage(e);
|
|
29225
|
+
}, i_ = () => {
|
|
29222
29226
|
j.receiveStart();
|
|
29223
|
-
},
|
|
29227
|
+
}, a_ = () => {
|
|
29224
29228
|
j.receiveText();
|
|
29225
|
-
},
|
|
29229
|
+
}, o_ = () => {
|
|
29226
29230
|
j.receiveEnd();
|
|
29227
|
-
},
|
|
29231
|
+
}, s_ = () => {
|
|
29228
29232
|
j.stop();
|
|
29229
|
-
},
|
|
29233
|
+
}, c_ = () => {
|
|
29230
29234
|
l.value && l.value.stopGeneration();
|
|
29231
|
-
},
|
|
29235
|
+
}, l_ = async () => {
|
|
29232
29236
|
await K.createNewSession();
|
|
29233
|
-
},
|
|
29237
|
+
}, u_ = async (e) => {
|
|
29234
29238
|
l.value && await l.value.switchSession(e);
|
|
29235
|
-
},
|
|
29236
|
-
|
|
29237
|
-
},
|
|
29238
|
-
e && (
|
|
29239
|
-
},
|
|
29239
|
+
}, d_ = async (e, n) => {
|
|
29240
|
+
xg.value = n;
|
|
29241
|
+
}, f_ = (e) => {
|
|
29242
|
+
e && (xg.value = e.sessionName || "", wg.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
|
|
29243
|
+
}, p_ = (e) => {
|
|
29240
29244
|
console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
|
|
29241
29245
|
apiName: "chat",
|
|
29242
29246
|
code: -1,
|
|
29243
29247
|
message: e.message,
|
|
29244
29248
|
data: e
|
|
29245
29249
|
});
|
|
29250
|
+
}, m_ = (e, n) => {
|
|
29251
|
+
_.container.updatePosition(e, n);
|
|
29252
|
+
}, h_ = (e, n) => {
|
|
29253
|
+
_.container.updateSize(e, n);
|
|
29254
|
+
}, g_ = (e, n, r, i) => {
|
|
29255
|
+
_.container.updatePositionAndSize(e, n, r, i);
|
|
29256
|
+
}, __ = (e) => {
|
|
29257
|
+
l.value && l.value.setCiteText(e);
|
|
29258
|
+
}, v_ = () => {
|
|
29259
|
+
l.value && l.value.focusInput();
|
|
29260
|
+
}, y_ = (e) => {
|
|
29261
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? Og() : Dg());
|
|
29246
29262
|
};
|
|
29247
29263
|
return onMounted(async () => {
|
|
29248
|
-
o.value && _.setContainerRef(o.value);
|
|
29264
|
+
o.value && _.setContainerRef(o.value), window.addEventListener("keydown", y_);
|
|
29249
29265
|
}), onBeforeUnmount(() => {
|
|
29250
|
-
_.destroy();
|
|
29266
|
+
window.removeEventListener("keydown", y_), _.destroy();
|
|
29251
29267
|
}), n({
|
|
29252
|
-
show:
|
|
29253
|
-
hide:
|
|
29254
|
-
sendMessage:
|
|
29255
|
-
stopGeneration:
|
|
29256
|
-
addNewSession:
|
|
29257
|
-
switchToSession:
|
|
29258
|
-
updateSessionName:
|
|
29259
|
-
updatePosition:
|
|
29260
|
-
|
|
29261
|
-
|
|
29262
|
-
|
|
29263
|
-
|
|
29264
|
-
},
|
|
29265
|
-
updatePositionAndSize: (e, n, r, i) => {
|
|
29266
|
-
_.container.updatePositionAndSize(e, n, r, i);
|
|
29267
|
-
},
|
|
29268
|
-
setCiteText: (e) => {
|
|
29269
|
-
l.value && l.value.setCiteText(e);
|
|
29270
|
-
},
|
|
29271
|
-
focusInput: () => {
|
|
29272
|
-
l.value && l.value.focusInput();
|
|
29273
|
-
}
|
|
29268
|
+
show: Dg,
|
|
29269
|
+
hide: Og,
|
|
29270
|
+
sendMessage: n_,
|
|
29271
|
+
stopGeneration: c_,
|
|
29272
|
+
addNewSession: l_,
|
|
29273
|
+
switchToSession: u_,
|
|
29274
|
+
updateSessionName: d_,
|
|
29275
|
+
updatePosition: m_,
|
|
29276
|
+
updateSize: h_,
|
|
29277
|
+
updatePositionAndSize: g_,
|
|
29278
|
+
setCiteText: __,
|
|
29279
|
+
focusInput: v_
|
|
29274
29280
|
}), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
|
|
29275
29281
|
createCommentVNode(" 可拖拽容器 "),
|
|
29276
29282
|
createVNode(unref(draggable_container_default), {
|
|
@@ -29286,42 +29292,42 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29286
29292
|
"max-width": i.maxWidth,
|
|
29287
29293
|
"max-width-percent": 80,
|
|
29288
29294
|
visible: unref(T),
|
|
29289
|
-
onCompressionChange:
|
|
29290
|
-
onDragStop:
|
|
29291
|
-
onDragging:
|
|
29292
|
-
onResizeStop:
|
|
29293
|
-
onResizing:
|
|
29295
|
+
onCompressionChange: Vg,
|
|
29296
|
+
onDragStop: Rg,
|
|
29297
|
+
onDragging: Ig,
|
|
29298
|
+
onResizeStop: zg,
|
|
29299
|
+
onResizing: Lg
|
|
29294
29300
|
}, {
|
|
29295
29301
|
default: withCtx(() => [createElementVNode("div", _hoisted_1, [
|
|
29296
29302
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29297
29303
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29298
29304
|
key: 0,
|
|
29299
|
-
"agent-name":
|
|
29305
|
+
"agent-name": yg.value,
|
|
29300
29306
|
"chat-helper": unref(G),
|
|
29301
29307
|
draggable: i.draggable,
|
|
29302
29308
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29303
29309
|
"enable-chat-session": i.enableChatSession,
|
|
29304
|
-
"has-permission":
|
|
29305
|
-
"has-session-contents":
|
|
29306
|
-
"is-compression-height":
|
|
29310
|
+
"has-permission": Sg.value,
|
|
29311
|
+
"has-session-contents": wg.value,
|
|
29312
|
+
"is-compression-height": vg.value,
|
|
29307
29313
|
"session-business-manager": unref(K),
|
|
29308
|
-
"session-name":
|
|
29314
|
+
"session-name": xg.value,
|
|
29309
29315
|
"show-compression-icon": i.showCompressionIcon,
|
|
29310
29316
|
"show-history-icon": i.showHistoryIcon,
|
|
29311
29317
|
"show-more-icon": i.showMoreIcon,
|
|
29312
29318
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29313
29319
|
title: i.title,
|
|
29314
|
-
onAutoGenerateName:
|
|
29315
|
-
onClose:
|
|
29316
|
-
onHelpClick:
|
|
29317
|
-
onHistoryClick:
|
|
29318
|
-
onHistorySessionDelete:
|
|
29319
|
-
onHistorySessionRename:
|
|
29320
|
-
onHistorySessionSwitch:
|
|
29321
|
-
onNewChat:
|
|
29322
|
-
onRename:
|
|
29323
|
-
onShare:
|
|
29324
|
-
onToggleCompression:
|
|
29320
|
+
onAutoGenerateName: Yg,
|
|
29321
|
+
onClose: Ag,
|
|
29322
|
+
onHelpClick: Xg,
|
|
29323
|
+
onHistoryClick: Ug,
|
|
29324
|
+
onHistorySessionDelete: Kg,
|
|
29325
|
+
onHistorySessionRename: Jg,
|
|
29326
|
+
onHistorySessionSwitch: Gg,
|
|
29327
|
+
onNewChat: Hg,
|
|
29328
|
+
onRename: Zg,
|
|
29329
|
+
onShare: Qg,
|
|
29330
|
+
onToggleCompression: Bg
|
|
29325
29331
|
}, null, 8, [
|
|
29326
29332
|
"agent-name",
|
|
29327
29333
|
"chat-helper",
|
|
@@ -29345,7 +29351,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29345
29351
|
ref: l,
|
|
29346
29352
|
"auto-load": i.loadRecentSessionOnMount,
|
|
29347
29353
|
"chat-helper": unref(G),
|
|
29348
|
-
"enable-selection":
|
|
29354
|
+
"enable-selection": fg.value,
|
|
29349
29355
|
"hello-text": i.helloText,
|
|
29350
29356
|
placeholder: i.placeholder,
|
|
29351
29357
|
prompts: i.prompts,
|
|
@@ -29355,19 +29361,19 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29355
29361
|
"shortcut-limit": i.shortcutLimit,
|
|
29356
29362
|
shortcuts: i.shortcuts,
|
|
29357
29363
|
url: u.value,
|
|
29358
|
-
onAgentInfoLoaded: n[0] ||= (e) =>
|
|
29359
|
-
onCancelShare:
|
|
29360
|
-
onConfirmShare: n[1] ||= (e) =>
|
|
29361
|
-
onError: n[2] ||= (e) =>
|
|
29362
|
-
onReceiveEnd:
|
|
29363
|
-
onReceiveStart:
|
|
29364
|
-
onReceiveText:
|
|
29365
|
-
onRequestShare:
|
|
29366
|
-
onSendMessage: n[3] ||= (e) =>
|
|
29367
|
-
onSessionDeleted: n[4] ||= (e) =>
|
|
29368
|
-
onSessionSwitched: n[5] ||= (e) =>
|
|
29369
|
-
onShortcutClick: n[6] ||= (e) =>
|
|
29370
|
-
onStop:
|
|
29364
|
+
onAgentInfoLoaded: n[0] ||= (e) => Eg(e),
|
|
29365
|
+
onCancelShare: $g,
|
|
29366
|
+
onConfirmShare: n[1] ||= (e) => t_(e),
|
|
29367
|
+
onError: n[2] ||= (e) => p_(e),
|
|
29368
|
+
onReceiveEnd: o_,
|
|
29369
|
+
onReceiveStart: i_,
|
|
29370
|
+
onReceiveText: a_,
|
|
29371
|
+
onRequestShare: Qg,
|
|
29372
|
+
onSendMessage: n[3] ||= (e) => r_(e),
|
|
29373
|
+
onSessionDeleted: n[4] ||= (e) => qg(e),
|
|
29374
|
+
onSessionSwitched: n[5] ||= (e) => f_(e),
|
|
29375
|
+
onShortcutClick: n[6] ||= (e) => Fg(e),
|
|
29376
|
+
onStop: s_
|
|
29371
29377
|
}, null, 8, [
|
|
29372
29378
|
"auto-load",
|
|
29373
29379
|
"chat-helper",
|
|
@@ -29403,7 +29409,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29403
29409
|
"onUpdate:isPanelShow": n[8] ||= (e) => isRef(T) ? T.value = e : null,
|
|
29404
29410
|
"default-minimize": i.defaultMinimize,
|
|
29405
29411
|
size: i.nimbusSize,
|
|
29406
|
-
onClick:
|
|
29412
|
+
onClick: jg
|
|
29407
29413
|
}, null, 8, [
|
|
29408
29414
|
"is-minimize",
|
|
29409
29415
|
"is-panel-show",
|
|
@@ -29413,12 +29419,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29413
29419
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29414
29420
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29415
29421
|
key: 1,
|
|
29416
|
-
visible:
|
|
29417
|
-
"onUpdate:visible": n[9] ||= (e) =>
|
|
29422
|
+
visible: gg.value,
|
|
29423
|
+
"onUpdate:visible": n[9] ||= (e) => gg.value = e,
|
|
29418
29424
|
"max-shortcut-count": i.shortcutLimit,
|
|
29419
|
-
shortcuts:
|
|
29420
|
-
onSelectShortcut:
|
|
29421
|
-
onSelectionChange:
|
|
29425
|
+
shortcuts: Tg.value,
|
|
29426
|
+
onSelectShortcut: Pg,
|
|
29427
|
+
onSelectionChange: Ng
|
|
29422
29428
|
}, null, 8, [
|
|
29423
29429
|
"visible",
|
|
29424
29430
|
"max-shortcut-count",
|
|
@@ -29426,5 +29432,5 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29426
29432
|
])) : createCommentVNode("v-if", !0)
|
|
29427
29433
|
], 2)], 8, ["to"]));
|
|
29428
29434
|
}
|
|
29429
|
-
}), [["__scopeId", "data-v-
|
|
29435
|
+
}), [["__scopeId", "data-v-673517f0"]]);
|
|
29430
29436
|
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 };
|