@blueking/ai-blueking 2.0.0-dev.7 → 2.0.0-dev.8
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 +1 -1
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts +0 -8
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/components/types.d.ts +0 -12
- package/dist/components/types.d.ts.map +1 -1
- package/dist/manager/business/index.d.ts +1 -0
- package/dist/manager/business/index.d.ts.map +1 -1
- package/dist/manager/business/share-business-manager.d.ts +28 -0
- package/dist/manager/business/share-business-manager.d.ts.map +1 -0
- package/dist/manager/business/types.d.ts +38 -29
- package/dist/manager/business/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +965 -979
- package/dist/vue2/index.iife.min.js +8 -8
- package/dist/vue2/index.umd.min.js +7 -7
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +738 -752
- package/dist/vue3/index.iife.min.js +56 -56
- package/dist/vue3/index.umd.min.js +279 -279
- package/dist/vue3/style.css +1 -1
- package/package.json +2 -2
|
@@ -718,25 +718,25 @@ var _hoisted_1$41 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
718
718
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
719
719
|
}, B = (e) => {
|
|
720
720
|
z(), a("selectShortcut", e, E.value);
|
|
721
|
-
}, H = null,
|
|
721
|
+
}, H = null, gg = (e) => {
|
|
722
722
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
723
723
|
L();
|
|
724
724
|
}, e);
|
|
725
|
+
}, G = () => {
|
|
726
|
+
gg(200);
|
|
725
727
|
}, K = () => {
|
|
726
|
-
|
|
727
|
-
},
|
|
728
|
-
G(300);
|
|
729
|
-
}, ug = (e) => {
|
|
728
|
+
gg(300);
|
|
729
|
+
}, _g = (e) => {
|
|
730
730
|
i.value && l.value?.contains(e.target) || z();
|
|
731
|
-
},
|
|
731
|
+
}, J = (e) => {
|
|
732
732
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
733
|
-
},
|
|
733
|
+
}, vg = () => {
|
|
734
734
|
d.value?.show();
|
|
735
735
|
};
|
|
736
736
|
return onMounted(() => {
|
|
737
|
-
document.addEventListener("selectionchange",
|
|
737
|
+
document.addEventListener("selectionchange", K), document.addEventListener("mouseup", G), document.addEventListener("mousedown", _g), document.addEventListener("scroll", J, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
738
738
|
}), onUnmounted(() => {
|
|
739
|
-
document.removeEventListener("selectionchange",
|
|
739
|
+
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", G), document.removeEventListener("mousedown", _g), document.removeEventListener("scroll", J, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
740
740
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
741
741
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
742
742
|
key: 0,
|
|
@@ -779,7 +779,7 @@ var _hoisted_1$41 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
779
779
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("v-if", !0)]),
|
|
780
780
|
default: withCtx(() => [createVNode(shortcut_btn_default, {
|
|
781
781
|
style: { width: "28px" },
|
|
782
|
-
onClick:
|
|
782
|
+
onClick: vg
|
|
783
783
|
}, {
|
|
784
784
|
default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
|
|
785
785
|
_: 1
|
|
@@ -1103,19 +1103,19 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1103
1103
|
}
|
|
1104
1104
|
function H() {
|
|
1105
1105
|
var e = i();
|
|
1106
|
-
if (B(e)) return
|
|
1106
|
+
if (B(e)) return gg(e);
|
|
1107
1107
|
v = setTimeout(H, z(e));
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function gg(e) {
|
|
1110
1110
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function G() {
|
|
1113
1113
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return v === void 0 ? _ :
|
|
1115
|
+
function K() {
|
|
1116
|
+
return v === void 0 ? _ : gg(i());
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function q() {
|
|
1119
1119
|
var e = i(), r = B(e);
|
|
1120
1120
|
if (d = arguments, m = this, T = e, r) {
|
|
1121
1121
|
if (v === void 0) return L(T);
|
|
@@ -1123,7 +1123,7 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1123
1123
|
}
|
|
1124
1124
|
return v === void 0 && (v = setTimeout(H, n)), _;
|
|
1125
1125
|
}
|
|
1126
|
-
return
|
|
1126
|
+
return q.cancel = G, q.flush = K, q;
|
|
1127
1127
|
}
|
|
1128
1128
|
n.exports = u;
|
|
1129
1129
|
})), require_throttle = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
@@ -4789,7 +4789,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4789
4789
|
return a;
|
|
4790
4790
|
}).map((e) => `(${e})`).join(n);
|
|
4791
4791
|
}
|
|
4792
|
-
var
|
|
4792
|
+
var gg = /\b\B/, G = "[a-zA-Z]\\w*", K = "[a-zA-Z_]\\w*", q = "\\b\\d+(\\.\\d+)?", _g = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", J = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", vg = (e = {}) => {
|
|
4793
4793
|
let n = /^#![ ]*\//;
|
|
4794
4794
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4795
4795
|
scope: "meta",
|
|
@@ -4800,22 +4800,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4800
4800
|
e.index !== 0 && n.ignoreMatch();
|
|
4801
4801
|
}
|
|
4802
4802
|
}, e);
|
|
4803
|
-
},
|
|
4803
|
+
}, Q = {
|
|
4804
4804
|
begin: "\\\\[\\s\\S]",
|
|
4805
4805
|
relevance: 0
|
|
4806
|
-
},
|
|
4806
|
+
}, yg = {
|
|
4807
4807
|
scope: "string",
|
|
4808
4808
|
begin: "'",
|
|
4809
4809
|
end: "'",
|
|
4810
4810
|
illegal: "\\n",
|
|
4811
|
-
contains: [
|
|
4811
|
+
contains: [Q]
|
|
4812
4812
|
}, $ = {
|
|
4813
4813
|
scope: "string",
|
|
4814
4814
|
begin: "\"",
|
|
4815
4815
|
end: "\"",
|
|
4816
4816
|
illegal: "\\n",
|
|
4817
|
-
contains: [
|
|
4818
|
-
},
|
|
4817
|
+
contains: [Q]
|
|
4818
|
+
}, bg = { 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/ }, xg = function(e, n, r = {}) {
|
|
4819
4819
|
let i = o({
|
|
4820
4820
|
scope: "comment",
|
|
4821
4821
|
begin: e,
|
|
@@ -4831,50 +4831,50 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4831
4831
|
});
|
|
4832
4832
|
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,}/);
|
|
4833
4833
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4834
|
-
},
|
|
4834
|
+
}, Sg = xg("//", "$"), Cg = xg("/\\*", "\\*/"), wg = xg("#", "$"), Tg = {
|
|
4835
4835
|
scope: "number",
|
|
4836
|
-
begin:
|
|
4836
|
+
begin: q,
|
|
4837
4837
|
relevance: 0
|
|
4838
|
-
},
|
|
4838
|
+
}, Eg = {
|
|
4839
4839
|
scope: "number",
|
|
4840
|
-
begin:
|
|
4840
|
+
begin: _g,
|
|
4841
4841
|
relevance: 0
|
|
4842
|
-
},
|
|
4842
|
+
}, Dg = {
|
|
4843
4843
|
scope: "number",
|
|
4844
|
-
begin:
|
|
4844
|
+
begin: J,
|
|
4845
4845
|
relevance: 0
|
|
4846
|
-
},
|
|
4846
|
+
}, Og = {
|
|
4847
4847
|
scope: "regexp",
|
|
4848
4848
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4849
4849
|
end: /\/[gimuy]*/,
|
|
4850
|
-
contains: [
|
|
4850
|
+
contains: [Q, {
|
|
4851
4851
|
begin: /\[/,
|
|
4852
4852
|
end: /\]/,
|
|
4853
4853
|
relevance: 0,
|
|
4854
|
-
contains: [
|
|
4854
|
+
contains: [Q]
|
|
4855
4855
|
}]
|
|
4856
|
-
},
|
|
4856
|
+
}, kg = {
|
|
4857
4857
|
scope: "title",
|
|
4858
|
-
begin:
|
|
4858
|
+
begin: G,
|
|
4859
4859
|
relevance: 0
|
|
4860
|
-
},
|
|
4860
|
+
}, Ag = {
|
|
4861
4861
|
scope: "title",
|
|
4862
|
-
begin:
|
|
4862
|
+
begin: K,
|
|
4863
4863
|
relevance: 0
|
|
4864
|
-
},
|
|
4865
|
-
begin: "\\.\\s*" +
|
|
4864
|
+
}, jg = {
|
|
4865
|
+
begin: "\\.\\s*" + K,
|
|
4866
4866
|
relevance: 0
|
|
4867
|
-
},
|
|
4867
|
+
}, Mg = /* @__PURE__ */ Object.freeze({
|
|
4868
4868
|
__proto__: null,
|
|
4869
|
-
APOS_STRING_MODE:
|
|
4870
|
-
BACKSLASH_ESCAPE:
|
|
4871
|
-
BINARY_NUMBER_MODE:
|
|
4872
|
-
BINARY_NUMBER_RE:
|
|
4873
|
-
COMMENT:
|
|
4874
|
-
C_BLOCK_COMMENT_MODE:
|
|
4875
|
-
C_LINE_COMMENT_MODE:
|
|
4876
|
-
C_NUMBER_MODE:
|
|
4877
|
-
C_NUMBER_RE:
|
|
4869
|
+
APOS_STRING_MODE: yg,
|
|
4870
|
+
BACKSLASH_ESCAPE: Q,
|
|
4871
|
+
BINARY_NUMBER_MODE: Dg,
|
|
4872
|
+
BINARY_NUMBER_RE: J,
|
|
4873
|
+
COMMENT: xg,
|
|
4874
|
+
C_BLOCK_COMMENT_MODE: Cg,
|
|
4875
|
+
C_LINE_COMMENT_MODE: Sg,
|
|
4876
|
+
C_NUMBER_MODE: Eg,
|
|
4877
|
+
C_NUMBER_RE: _g,
|
|
4878
4878
|
END_SAME_AS_BEGIN: function(e) {
|
|
4879
4879
|
return Object.assign(e, {
|
|
4880
4880
|
"on:begin": (e, n) => {
|
|
@@ -4885,43 +4885,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4885
4885
|
}
|
|
4886
4886
|
});
|
|
4887
4887
|
},
|
|
4888
|
-
HASH_COMMENT_MODE:
|
|
4889
|
-
IDENT_RE:
|
|
4890
|
-
MATCH_NOTHING_RE:
|
|
4891
|
-
METHOD_GUARD:
|
|
4892
|
-
NUMBER_MODE:
|
|
4893
|
-
NUMBER_RE:
|
|
4894
|
-
PHRASAL_WORDS_MODE:
|
|
4888
|
+
HASH_COMMENT_MODE: wg,
|
|
4889
|
+
IDENT_RE: G,
|
|
4890
|
+
MATCH_NOTHING_RE: gg,
|
|
4891
|
+
METHOD_GUARD: jg,
|
|
4892
|
+
NUMBER_MODE: Tg,
|
|
4893
|
+
NUMBER_RE: q,
|
|
4894
|
+
PHRASAL_WORDS_MODE: bg,
|
|
4895
4895
|
QUOTE_STRING_MODE: $,
|
|
4896
|
-
REGEXP_MODE:
|
|
4897
|
-
RE_STARTERS_RE:
|
|
4898
|
-
SHEBANG:
|
|
4899
|
-
TITLE_MODE:
|
|
4900
|
-
UNDERSCORE_IDENT_RE:
|
|
4901
|
-
UNDERSCORE_TITLE_MODE:
|
|
4896
|
+
REGEXP_MODE: Og,
|
|
4897
|
+
RE_STARTERS_RE: Z,
|
|
4898
|
+
SHEBANG: vg,
|
|
4899
|
+
TITLE_MODE: kg,
|
|
4900
|
+
UNDERSCORE_IDENT_RE: K,
|
|
4901
|
+
UNDERSCORE_TITLE_MODE: Ag
|
|
4902
4902
|
});
|
|
4903
|
-
function
|
|
4903
|
+
function Ng(e, n) {
|
|
4904
4904
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4905
4905
|
}
|
|
4906
|
-
function
|
|
4906
|
+
function Pg(e, n) {
|
|
4907
4907
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4908
4908
|
}
|
|
4909
|
-
function
|
|
4910
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4909
|
+
function Fg(e, n) {
|
|
4910
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Ng, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4911
4911
|
}
|
|
4912
|
-
function
|
|
4912
|
+
function Ig(e, n) {
|
|
4913
4913
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4914
4914
|
}
|
|
4915
|
-
function
|
|
4915
|
+
function Lg(e, n) {
|
|
4916
4916
|
if (e.match) {
|
|
4917
4917
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4918
4918
|
e.begin = e.match, delete e.match;
|
|
4919
4919
|
}
|
|
4920
4920
|
}
|
|
4921
|
-
function
|
|
4921
|
+
function Rg(e, n) {
|
|
4922
4922
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4923
4923
|
}
|
|
4924
|
-
var
|
|
4924
|
+
var zg = (e, n) => {
|
|
4925
4925
|
if (!e.beforeMatch) return;
|
|
4926
4926
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4927
4927
|
let r = Object.assign({}, e);
|
|
@@ -4931,7 +4931,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4931
4931
|
relevance: 0,
|
|
4932
4932
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4933
4933
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4934
|
-
},
|
|
4934
|
+
}, Bg = [
|
|
4935
4935
|
"of",
|
|
4936
4936
|
"and",
|
|
4937
4937
|
"for",
|
|
@@ -4943,58 +4943,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4943
4943
|
"parent",
|
|
4944
4944
|
"list",
|
|
4945
4945
|
"value"
|
|
4946
|
-
],
|
|
4947
|
-
function
|
|
4946
|
+
], Vg = "keyword";
|
|
4947
|
+
function Hg(e, n, r = Vg) {
|
|
4948
4948
|
let i = Object.create(null);
|
|
4949
4949
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4950
|
-
Object.assign(i,
|
|
4950
|
+
Object.assign(i, Hg(e[r], n, r));
|
|
4951
4951
|
}), i;
|
|
4952
4952
|
function a(e, r) {
|
|
4953
4953
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4954
4954
|
let r = n.split("|");
|
|
4955
|
-
i[r[0]] = [e,
|
|
4955
|
+
i[r[0]] = [e, Ug(r[0], r[1])];
|
|
4956
4956
|
});
|
|
4957
4957
|
}
|
|
4958
4958
|
}
|
|
4959
|
-
function
|
|
4960
|
-
return n ? Number(n) :
|
|
4959
|
+
function Ug(e, n) {
|
|
4960
|
+
return n ? Number(n) : Wg(e) ? 0 : 1;
|
|
4961
4961
|
}
|
|
4962
|
-
function
|
|
4963
|
-
return
|
|
4962
|
+
function Wg(e) {
|
|
4963
|
+
return Bg.includes(e.toLowerCase());
|
|
4964
4964
|
}
|
|
4965
|
-
var
|
|
4965
|
+
var Gg = {}, Kg = (e) => {
|
|
4966
4966
|
console.error(e);
|
|
4967
|
-
},
|
|
4967
|
+
}, qg = (e, ...n) => {
|
|
4968
4968
|
console.log(`WARN: ${e}`, ...n);
|
|
4969
|
-
},
|
|
4970
|
-
|
|
4971
|
-
},
|
|
4972
|
-
function
|
|
4969
|
+
}, Jg = (e, n) => {
|
|
4970
|
+
Gg[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), Gg[`${e}/${n}`] = !0);
|
|
4971
|
+
}, Yg = /* @__PURE__ */ Error();
|
|
4972
|
+
function Xg(e, n, { key: r }) {
|
|
4973
4973
|
let i = 0, a = e[r], o = {}, s = {};
|
|
4974
4974
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
4975
4975
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
4976
4976
|
}
|
|
4977
|
-
function
|
|
4977
|
+
function Zg(e) {
|
|
4978
4978
|
if (Array.isArray(e.begin)) {
|
|
4979
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
4980
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
4981
|
-
|
|
4979
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw Kg("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Yg;
|
|
4980
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw Kg("beginScope must be object"), Yg;
|
|
4981
|
+
Xg(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4982
4982
|
}
|
|
4983
4983
|
}
|
|
4984
|
-
function
|
|
4984
|
+
function Qg(e) {
|
|
4985
4985
|
if (Array.isArray(e.end)) {
|
|
4986
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
4987
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
4988
|
-
|
|
4986
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw Kg("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Yg;
|
|
4987
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw Kg("endScope must be object"), Yg;
|
|
4988
|
+
Xg(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4989
4989
|
}
|
|
4990
4990
|
}
|
|
4991
|
-
function
|
|
4991
|
+
function $g(e) {
|
|
4992
4992
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
4993
4993
|
}
|
|
4994
|
-
function
|
|
4995
|
-
|
|
4994
|
+
function e_(e) {
|
|
4995
|
+
$g(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Zg(e), Qg(e);
|
|
4996
4996
|
}
|
|
4997
|
-
function
|
|
4997
|
+
function t_(e) {
|
|
4998
4998
|
function n(n, r) {
|
|
4999
4999
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5000
5000
|
}
|
|
@@ -5056,18 +5056,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5056
5056
|
let o = r;
|
|
5057
5057
|
if (r.isCompiled) return o;
|
|
5058
5058
|
[
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5059
|
+
Pg,
|
|
5060
|
+
Lg,
|
|
5061
|
+
e_,
|
|
5062
|
+
zg
|
|
5063
5063
|
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5064
|
+
Fg,
|
|
5065
|
+
Ig,
|
|
5066
|
+
Rg
|
|
5067
5067
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5068
5068
|
let l = null;
|
|
5069
|
-
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 &&=
|
|
5070
|
-
return
|
|
5069
|
+
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 &&= Hg(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) {
|
|
5070
|
+
return r_(e === "self" ? r : e);
|
|
5071
5071
|
})), r.contains.forEach(function(e) {
|
|
5072
5072
|
s(e, o);
|
|
5073
5073
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5075,19 +5075,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5075
5075
|
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.");
|
|
5076
5076
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5077
5077
|
}
|
|
5078
|
-
function
|
|
5079
|
-
return e ? e.endsWithParent ||
|
|
5078
|
+
function n_(e) {
|
|
5079
|
+
return e ? e.endsWithParent || n_(e.starts) : !1;
|
|
5080
5080
|
}
|
|
5081
|
-
function
|
|
5081
|
+
function r_(e) {
|
|
5082
5082
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5083
5083
|
return o(e, { variants: null }, n);
|
|
5084
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5084
|
+
})), e.cachedVariants ? e.cachedVariants : n_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5085
5085
|
}
|
|
5086
|
-
var
|
|
5086
|
+
var i_ = "11.11.1", a_ = class extends Error {
|
|
5087
5087
|
constructor(e, n) {
|
|
5088
5088
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5089
5089
|
}
|
|
5090
|
-
},
|
|
5090
|
+
}, o_ = a, s_ = o, c_ = Symbol("nomatch"), l_ = 7, u_ = function(e) {
|
|
5091
5091
|
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 = {
|
|
5092
5092
|
disableAutodetect: !0,
|
|
5093
5093
|
name: "Plain text",
|
|
@@ -5110,21 +5110,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5110
5110
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5111
5111
|
let r = d.languageDetectRe.exec(n);
|
|
5112
5112
|
if (r) {
|
|
5113
|
-
let n =
|
|
5114
|
-
return n || (
|
|
5113
|
+
let n = yg(r[1]);
|
|
5114
|
+
return n || (qg(l.replace("{}", r[1])), qg("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5115
5115
|
}
|
|
5116
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5116
|
+
return n.split(/\s+/).find((e) => m(e) || yg(e));
|
|
5117
5117
|
}
|
|
5118
5118
|
function v(e, n, r) {
|
|
5119
5119
|
let i = "", a = "";
|
|
5120
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5120
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (Jg("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Jg("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);
|
|
5121
5121
|
let o = {
|
|
5122
5122
|
code: i,
|
|
5123
5123
|
language: a
|
|
5124
5124
|
};
|
|
5125
|
-
|
|
5125
|
+
wg("before:highlight", o);
|
|
5126
5126
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5127
|
-
return s.code = o.code,
|
|
5127
|
+
return s.code = o.code, wg("after:highlight", s), s;
|
|
5128
5128
|
}
|
|
5129
5129
|
function j(e, r, a, o) {
|
|
5130
5130
|
let u = Object.create(null);
|
|
@@ -5132,45 +5132,45 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5132
5132
|
return e.keywords[n];
|
|
5133
5133
|
}
|
|
5134
5134
|
function g() {
|
|
5135
|
-
if (!
|
|
5136
|
-
|
|
5135
|
+
if (!Z.keywords) {
|
|
5136
|
+
Q.addText($);
|
|
5137
5137
|
return;
|
|
5138
5138
|
}
|
|
5139
5139
|
let e = 0;
|
|
5140
|
-
|
|
5141
|
-
let n =
|
|
5140
|
+
Z.keywordPatternRe.lastIndex = 0;
|
|
5141
|
+
let n = Z.keywordPatternRe.exec($), r = "";
|
|
5142
5142
|
for (; n;) {
|
|
5143
5143
|
r += $.substring(e, n.index);
|
|
5144
|
-
let i =
|
|
5144
|
+
let i = q.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5145
5145
|
if (a) {
|
|
5146
5146
|
let [e, o] = a;
|
|
5147
|
-
if (
|
|
5147
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= l_ && (bg += o), e.startsWith("_")) r += n[0];
|
|
5148
5148
|
else {
|
|
5149
|
-
let r =
|
|
5149
|
+
let r = q.classNameAliases[e] || e;
|
|
5150
5150
|
T(n[0], r);
|
|
5151
5151
|
}
|
|
5152
5152
|
} else r += n[0];
|
|
5153
|
-
e =
|
|
5153
|
+
e = Z.keywordPatternRe.lastIndex, n = Z.keywordPatternRe.exec($);
|
|
5154
5154
|
}
|
|
5155
|
-
r += $.substring(e),
|
|
5155
|
+
r += $.substring(e), Q.addText(r);
|
|
5156
5156
|
}
|
|
5157
5157
|
function _() {
|
|
5158
5158
|
if ($ === "") return;
|
|
5159
5159
|
let e = null;
|
|
5160
|
-
if (typeof
|
|
5161
|
-
if (!n[
|
|
5162
|
-
|
|
5160
|
+
if (typeof Z.subLanguage == "string") {
|
|
5161
|
+
if (!n[Z.subLanguage]) {
|
|
5162
|
+
Q.addText($);
|
|
5163
5163
|
return;
|
|
5164
5164
|
}
|
|
5165
|
-
e = j(
|
|
5166
|
-
} else e = B($,
|
|
5167
|
-
|
|
5165
|
+
e = j(Z.subLanguage, $, !0, vg[Z.subLanguage]), vg[Z.subLanguage] = e._top;
|
|
5166
|
+
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5167
|
+
Z.relevance > 0 && (bg += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5168
5168
|
}
|
|
5169
5169
|
function v() {
|
|
5170
|
-
|
|
5170
|
+
Z.subLanguage == null ? g() : _(), $ = "";
|
|
5171
5171
|
}
|
|
5172
5172
|
function T(e, n) {
|
|
5173
|
-
e !== "" && (
|
|
5173
|
+
e !== "" && (Q.startScope(n), Q.addText(e), Q.endScope());
|
|
5174
5174
|
}
|
|
5175
5175
|
function E(e, n) {
|
|
5176
5176
|
let r = 1, i = n.length - 1;
|
|
@@ -5179,12 +5179,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5179
5179
|
r++;
|
|
5180
5180
|
continue;
|
|
5181
5181
|
}
|
|
5182
|
-
let i =
|
|
5182
|
+
let i = q.classNameAliases[e[r]] || e[r], a = n[r];
|
|
5183
5183
|
i ? T(a, i) : ($ = a, g(), $ = ""), r++;
|
|
5184
5184
|
}
|
|
5185
5185
|
}
|
|
5186
5186
|
function O(e, n) {
|
|
5187
|
-
return e.scope && typeof e.scope == "string" &&
|
|
5187
|
+
return e.scope && typeof e.scope == "string" && Q.openNode(q.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, q.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Z = Object.create(e, { parent: { value: Z } }), Z;
|
|
5188
5188
|
}
|
|
5189
5189
|
function k(e, n, r) {
|
|
5190
5190
|
let a = z(e.endRe, r);
|
|
@@ -5201,7 +5201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5201
5201
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5202
5202
|
}
|
|
5203
5203
|
function I(e) {
|
|
5204
|
-
return
|
|
5204
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Cg = !0, 0);
|
|
5205
5205
|
}
|
|
5206
5206
|
function L(e) {
|
|
5207
5207
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5209,98 +5209,98 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5209
5209
|
return r.skip ? $ += n : (r.excludeBegin && ($ += n), v(), !r.returnBegin && !r.excludeBegin && ($ = n)), O(r, e), r.returnBegin ? 0 : n.length;
|
|
5210
5210
|
}
|
|
5211
5211
|
function H(e) {
|
|
5212
|
-
let n = e[0], i = r.substring(e.index), a = k(
|
|
5213
|
-
if (!a) return
|
|
5214
|
-
let o =
|
|
5215
|
-
|
|
5212
|
+
let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
|
|
5213
|
+
if (!a) return c_;
|
|
5214
|
+
let o = Z;
|
|
5215
|
+
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));
|
|
5216
5216
|
do
|
|
5217
|
-
|
|
5218
|
-
while (
|
|
5217
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (bg += Z.relevance), Z = Z.parent;
|
|
5218
|
+
while (Z !== a.parent);
|
|
5219
5219
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5220
5220
|
}
|
|
5221
|
-
function
|
|
5221
|
+
function gg() {
|
|
5222
5222
|
let e = [];
|
|
5223
|
-
for (let n =
|
|
5224
|
-
e.forEach((e) =>
|
|
5223
|
+
for (let n = Z; n !== q; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5224
|
+
e.forEach((e) => Q.openNode(e));
|
|
5225
5225
|
}
|
|
5226
|
-
let
|
|
5227
|
-
function
|
|
5226
|
+
let G = {};
|
|
5227
|
+
function K(n, i) {
|
|
5228
5228
|
let o = i && i[0];
|
|
5229
5229
|
if ($ += n, o == null) return v(), 0;
|
|
5230
|
-
if (
|
|
5230
|
+
if (G.type === "begin" && i.type === "end" && G.index === i.index && o === "") {
|
|
5231
5231
|
if ($ += r.slice(i.index, i.index + 1), !s) {
|
|
5232
5232
|
let n = /* @__PURE__ */ Error(`0 width match regex (${e})`);
|
|
5233
|
-
throw n.languageName = e, n.badRule =
|
|
5233
|
+
throw n.languageName = e, n.badRule = G.rule, n;
|
|
5234
5234
|
}
|
|
5235
5235
|
return 1;
|
|
5236
5236
|
}
|
|
5237
|
-
if (
|
|
5237
|
+
if (G = i, i.type === "begin") return L(i);
|
|
5238
5238
|
if (i.type === "illegal" && !a) {
|
|
5239
|
-
let e = /* @__PURE__ */ Error("Illegal lexeme \"" + o + "\" for mode \"" + (
|
|
5240
|
-
throw e.mode =
|
|
5239
|
+
let e = /* @__PURE__ */ Error("Illegal lexeme \"" + o + "\" for mode \"" + (Z.scope || "<unnamed>") + "\"");
|
|
5240
|
+
throw e.mode = Z, e;
|
|
5241
5241
|
} else if (i.type === "end") {
|
|
5242
5242
|
let e = H(i);
|
|
5243
|
-
if (e !==
|
|
5243
|
+
if (e !== c_) return e;
|
|
5244
5244
|
}
|
|
5245
5245
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5246
|
-
if (
|
|
5246
|
+
if (Sg > 1e5 && Sg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5247
5247
|
return $ += o, o.length;
|
|
5248
5248
|
}
|
|
5249
|
-
let
|
|
5250
|
-
if (!
|
|
5251
|
-
let
|
|
5252
|
-
|
|
5253
|
-
let $ = "",
|
|
5249
|
+
let q = yg(e);
|
|
5250
|
+
if (!q) throw Kg(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5251
|
+
let _g = t_(q), J = "", Z = o || _g, vg = {}, Q = new d.__emitter(d);
|
|
5252
|
+
gg();
|
|
5253
|
+
let $ = "", bg = 0, xg = 0, Sg = 0, Cg = !1;
|
|
5254
5254
|
try {
|
|
5255
|
-
if (
|
|
5255
|
+
if (q.__emitTokens) q.__emitTokens(r, Q);
|
|
5256
5256
|
else {
|
|
5257
|
-
for (
|
|
5258
|
-
|
|
5259
|
-
let e =
|
|
5257
|
+
for (Z.matcher.considerAll();;) {
|
|
5258
|
+
Sg++, Cg ? Cg = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = xg;
|
|
5259
|
+
let e = Z.matcher.exec(r);
|
|
5260
5260
|
if (!e) break;
|
|
5261
|
-
let n =
|
|
5262
|
-
|
|
5261
|
+
let n = K(r.substring(xg, e.index), e);
|
|
5262
|
+
xg = e.index + n;
|
|
5263
5263
|
}
|
|
5264
|
-
|
|
5264
|
+
K(r.substring(xg));
|
|
5265
5265
|
}
|
|
5266
|
-
return
|
|
5266
|
+
return Q.finalize(), J = Q.toHTML(), {
|
|
5267
5267
|
language: e,
|
|
5268
|
-
value:
|
|
5269
|
-
relevance:
|
|
5268
|
+
value: J,
|
|
5269
|
+
relevance: bg,
|
|
5270
5270
|
illegal: !1,
|
|
5271
|
-
_emitter:
|
|
5272
|
-
_top:
|
|
5271
|
+
_emitter: Q,
|
|
5272
|
+
_top: Z
|
|
5273
5273
|
};
|
|
5274
5274
|
} catch (n) {
|
|
5275
5275
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5276
5276
|
language: e,
|
|
5277
|
-
value:
|
|
5277
|
+
value: o_(r),
|
|
5278
5278
|
illegal: !0,
|
|
5279
5279
|
relevance: 0,
|
|
5280
5280
|
_illegalBy: {
|
|
5281
5281
|
message: n.message,
|
|
5282
|
-
index:
|
|
5283
|
-
context: r.slice(
|
|
5282
|
+
index: xg,
|
|
5283
|
+
context: r.slice(xg - 100, xg + 100),
|
|
5284
5284
|
mode: n.mode,
|
|
5285
|
-
resultSoFar:
|
|
5285
|
+
resultSoFar: J
|
|
5286
5286
|
},
|
|
5287
|
-
_emitter:
|
|
5287
|
+
_emitter: Q
|
|
5288
5288
|
};
|
|
5289
5289
|
if (s) return {
|
|
5290
5290
|
language: e,
|
|
5291
|
-
value:
|
|
5291
|
+
value: o_(r),
|
|
5292
5292
|
illegal: !1,
|
|
5293
5293
|
relevance: 0,
|
|
5294
5294
|
errorRaised: n,
|
|
5295
|
-
_emitter:
|
|
5296
|
-
_top:
|
|
5295
|
+
_emitter: Q,
|
|
5296
|
+
_top: Z
|
|
5297
5297
|
};
|
|
5298
5298
|
throw n;
|
|
5299
5299
|
}
|
|
5300
5300
|
}
|
|
5301
5301
|
function L(e) {
|
|
5302
5302
|
let n = {
|
|
5303
|
-
value:
|
|
5303
|
+
value: o_(e),
|
|
5304
5304
|
illegal: !1,
|
|
5305
5305
|
relevance: 0,
|
|
5306
5306
|
_top: u,
|
|
@@ -5310,13 +5310,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5310
5310
|
}
|
|
5311
5311
|
function B(e, r) {
|
|
5312
5312
|
r = r || d.languages || Object.keys(n);
|
|
5313
|
-
let i = L(e), a = r.filter(
|
|
5313
|
+
let i = L(e), a = r.filter(yg).filter(bg).map((n) => j(n, e, !1));
|
|
5314
5314
|
a.unshift(i);
|
|
5315
5315
|
let [o, s] = a.sort((e, n) => {
|
|
5316
5316
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5317
5317
|
if (e.language && n.language) {
|
|
5318
|
-
if (
|
|
5319
|
-
if (
|
|
5318
|
+
if (yg(e.language).supersetOf === n.language) return 1;
|
|
5319
|
+
if (yg(n.language).supersetOf === e.language) return -1;
|
|
5320
5320
|
}
|
|
5321
5321
|
return 0;
|
|
5322
5322
|
}), l = o;
|
|
@@ -5326,17 +5326,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5326
5326
|
let i = n && a[n] || r;
|
|
5327
5327
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5328
5328
|
}
|
|
5329
|
-
function
|
|
5329
|
+
function gg(e) {
|
|
5330
5330
|
let n = null, r = g(e);
|
|
5331
5331
|
if (m(r)) return;
|
|
5332
|
-
if (
|
|
5332
|
+
if (wg("before:highlightElement", {
|
|
5333
5333
|
el: e,
|
|
5334
5334
|
language: r
|
|
5335
5335
|
}), e.dataset.highlighted) {
|
|
5336
5336
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5337
5337
|
return;
|
|
5338
5338
|
}
|
|
5339
|
-
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
|
|
5339
|
+
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 a_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5340
5340
|
n = e;
|
|
5341
5341
|
let i = n.textContent, a = r ? v(i, {
|
|
5342
5342
|
language: r,
|
|
@@ -5349,51 +5349,51 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5349
5349
|
}, a.secondBest && (e.secondBest = {
|
|
5350
5350
|
language: a.secondBest.language,
|
|
5351
5351
|
relevance: a.secondBest.relevance
|
|
5352
|
-
}),
|
|
5352
|
+
}), wg("after:highlightElement", {
|
|
5353
5353
|
el: e,
|
|
5354
5354
|
result: a,
|
|
5355
5355
|
text: i
|
|
5356
5356
|
});
|
|
5357
5357
|
}
|
|
5358
|
-
function
|
|
5359
|
-
d =
|
|
5358
|
+
function G(e) {
|
|
5359
|
+
d = s_(d, e);
|
|
5360
5360
|
}
|
|
5361
|
-
let
|
|
5362
|
-
|
|
5361
|
+
let K = () => {
|
|
5362
|
+
J(), Jg("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5363
5363
|
};
|
|
5364
|
-
function
|
|
5365
|
-
|
|
5364
|
+
function q() {
|
|
5365
|
+
J(), Jg("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5366
5366
|
}
|
|
5367
|
-
let
|
|
5368
|
-
function
|
|
5367
|
+
let _g = !1;
|
|
5368
|
+
function J() {
|
|
5369
5369
|
function e() {
|
|
5370
|
-
|
|
5370
|
+
J();
|
|
5371
5371
|
}
|
|
5372
5372
|
if (document.readyState === "loading") {
|
|
5373
|
-
|
|
5373
|
+
_g || window.addEventListener("DOMContentLoaded", e, !1), _g = !0;
|
|
5374
5374
|
return;
|
|
5375
5375
|
}
|
|
5376
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5376
|
+
document.querySelectorAll(d.cssSelector).forEach(gg);
|
|
5377
5377
|
}
|
|
5378
|
-
function
|
|
5378
|
+
function Z(r, i) {
|
|
5379
5379
|
let a = null;
|
|
5380
5380
|
try {
|
|
5381
5381
|
a = i(e);
|
|
5382
5382
|
} catch (e) {
|
|
5383
|
-
if (
|
|
5383
|
+
if (Kg("Language definition for '{}' could not be registered.".replace("{}", r)), s) Kg(e);
|
|
5384
5384
|
else throw e;
|
|
5385
5385
|
a = u;
|
|
5386
5386
|
}
|
|
5387
5387
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5388
5388
|
}
|
|
5389
|
-
function
|
|
5389
|
+
function vg(e) {
|
|
5390
5390
|
delete n[e];
|
|
5391
5391
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5392
5392
|
}
|
|
5393
|
-
function
|
|
5393
|
+
function Q() {
|
|
5394
5394
|
return Object.keys(n);
|
|
5395
5395
|
}
|
|
5396
|
-
function
|
|
5396
|
+
function yg(e) {
|
|
5397
5397
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5398
5398
|
}
|
|
5399
5399
|
function $(e, { languageName: n }) {
|
|
@@ -5401,65 +5401,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5401
5401
|
a[e.toLowerCase()] = n;
|
|
5402
5402
|
});
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5405
|
-
let n =
|
|
5404
|
+
function bg(e) {
|
|
5405
|
+
let n = yg(e);
|
|
5406
5406
|
return n && !n.disableAutodetect;
|
|
5407
5407
|
}
|
|
5408
|
-
function
|
|
5408
|
+
function xg(e) {
|
|
5409
5409
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5410
5410
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5411
5411
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5412
5412
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5413
5413
|
});
|
|
5414
5414
|
}
|
|
5415
|
-
function
|
|
5416
|
-
|
|
5415
|
+
function Sg(e) {
|
|
5416
|
+
xg(e), o.push(e);
|
|
5417
5417
|
}
|
|
5418
|
-
function
|
|
5418
|
+
function Cg(e) {
|
|
5419
5419
|
let n = o.indexOf(e);
|
|
5420
5420
|
n !== -1 && o.splice(n, 1);
|
|
5421
5421
|
}
|
|
5422
|
-
function
|
|
5422
|
+
function wg(e, n) {
|
|
5423
5423
|
let r = e;
|
|
5424
5424
|
o.forEach(function(e) {
|
|
5425
5425
|
e[r] && e[r](n);
|
|
5426
5426
|
});
|
|
5427
5427
|
}
|
|
5428
|
-
function
|
|
5429
|
-
return
|
|
5428
|
+
function Tg(e) {
|
|
5429
|
+
return Jg("10.7.0", "highlightBlock will be removed entirely in v12.0"), Jg("10.7.0", "Please use highlightElement now."), gg(e);
|
|
5430
5430
|
}
|
|
5431
5431
|
for (let n in Object.assign(e, {
|
|
5432
5432
|
highlight: v,
|
|
5433
5433
|
highlightAuto: B,
|
|
5434
|
-
highlightAll:
|
|
5435
|
-
highlightElement:
|
|
5436
|
-
highlightBlock:
|
|
5437
|
-
configure:
|
|
5438
|
-
initHighlighting:
|
|
5439
|
-
initHighlightingOnLoad:
|
|
5440
|
-
registerLanguage:
|
|
5441
|
-
unregisterLanguage:
|
|
5442
|
-
listLanguages:
|
|
5443
|
-
getLanguage:
|
|
5434
|
+
highlightAll: J,
|
|
5435
|
+
highlightElement: gg,
|
|
5436
|
+
highlightBlock: Tg,
|
|
5437
|
+
configure: G,
|
|
5438
|
+
initHighlighting: K,
|
|
5439
|
+
initHighlightingOnLoad: q,
|
|
5440
|
+
registerLanguage: Z,
|
|
5441
|
+
unregisterLanguage: vg,
|
|
5442
|
+
listLanguages: Q,
|
|
5443
|
+
getLanguage: yg,
|
|
5444
5444
|
registerAliases: $,
|
|
5445
|
-
autoDetection:
|
|
5446
|
-
inherit:
|
|
5447
|
-
addPlugin:
|
|
5448
|
-
removePlugin:
|
|
5445
|
+
autoDetection: bg,
|
|
5446
|
+
inherit: s_,
|
|
5447
|
+
addPlugin: Sg,
|
|
5448
|
+
removePlugin: Cg
|
|
5449
5449
|
}), e.debugMode = function() {
|
|
5450
5450
|
s = !1;
|
|
5451
5451
|
}, e.safeMode = function() {
|
|
5452
5452
|
s = !0;
|
|
5453
|
-
}, e.versionString =
|
|
5453
|
+
}, e.versionString = i_, e.regex = {
|
|
5454
5454
|
concat: k,
|
|
5455
5455
|
lookahead: T,
|
|
5456
5456
|
either: I,
|
|
5457
5457
|
optional: O,
|
|
5458
5458
|
anyNumberOfTimes: E
|
|
5459
|
-
},
|
|
5460
|
-
return Object.assign(e,
|
|
5461
|
-
},
|
|
5462
|
-
|
|
5459
|
+
}, Mg) typeof Mg[n] == "object" && r(Mg[n]);
|
|
5460
|
+
return Object.assign(e, Mg), e;
|
|
5461
|
+
}, d_ = u_({});
|
|
5462
|
+
d_.newInstance = () => u_({}), n.exports = d_, d_.HighlightJS = d_, d_.default = d_;
|
|
5463
5463
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5464
5464
|
function r(e) {
|
|
5465
5465
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11565,10 +11565,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11565
11565
|
},
|
|
11566
11566
|
z
|
|
11567
11567
|
]
|
|
11568
|
-
},
|
|
11568
|
+
}, gg = {
|
|
11569
11569
|
scope: "computation-expression",
|
|
11570
11570
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11571
|
-
},
|
|
11571
|
+
}, G = {
|
|
11572
11572
|
begin: [
|
|
11573
11573
|
/^\s*/,
|
|
11574
11574
|
o(/#/, l(...s)),
|
|
@@ -11576,27 +11576,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11576
11576
|
],
|
|
11577
11577
|
beginScope: { 2: "meta" },
|
|
11578
11578
|
end: a(/\s|$/)
|
|
11579
|
-
},
|
|
11579
|
+
}, K = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, q = {
|
|
11580
11580
|
scope: "string",
|
|
11581
11581
|
begin: /"/,
|
|
11582
11582
|
end: /"/,
|
|
11583
11583
|
contains: [e.BACKSLASH_ESCAPE]
|
|
11584
|
-
},
|
|
11584
|
+
}, _g = {
|
|
11585
11585
|
scope: "string",
|
|
11586
11586
|
begin: /@"/,
|
|
11587
11587
|
end: /"/,
|
|
11588
11588
|
contains: [{ match: /""/ }, e.BACKSLASH_ESCAPE]
|
|
11589
|
-
},
|
|
11589
|
+
}, J = {
|
|
11590
11590
|
scope: "string",
|
|
11591
11591
|
begin: /"""/,
|
|
11592
11592
|
end: /"""/,
|
|
11593
11593
|
relevance: 2
|
|
11594
|
-
},
|
|
11594
|
+
}, Z = {
|
|
11595
11595
|
scope: "subst",
|
|
11596
11596
|
begin: /\{/,
|
|
11597
11597
|
end: /\}/,
|
|
11598
11598
|
keywords: g
|
|
11599
|
-
},
|
|
11599
|
+
}, vg = {
|
|
11600
11600
|
scope: "string",
|
|
11601
11601
|
begin: /\$"/,
|
|
11602
11602
|
end: /"/,
|
|
@@ -11604,9 +11604,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11604
11604
|
{ match: /\{\{/ },
|
|
11605
11605
|
{ match: /\}\}/ },
|
|
11606
11606
|
e.BACKSLASH_ESCAPE,
|
|
11607
|
-
|
|
11607
|
+
Z
|
|
11608
11608
|
]
|
|
11609
|
-
},
|
|
11609
|
+
}, Q = {
|
|
11610
11610
|
scope: "string",
|
|
11611
11611
|
begin: /(\$@|@\$)"/,
|
|
11612
11612
|
end: /"/,
|
|
@@ -11615,45 +11615,45 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11615
11615
|
{ match: /\}\}/ },
|
|
11616
11616
|
{ match: /""/ },
|
|
11617
11617
|
e.BACKSLASH_ESCAPE,
|
|
11618
|
-
|
|
11618
|
+
Z
|
|
11619
11619
|
]
|
|
11620
|
-
},
|
|
11620
|
+
}, yg = {
|
|
11621
11621
|
scope: "string",
|
|
11622
11622
|
begin: /\$"""/,
|
|
11623
11623
|
end: /"""/,
|
|
11624
11624
|
contains: [
|
|
11625
11625
|
{ match: /\{\{/ },
|
|
11626
11626
|
{ match: /\}\}/ },
|
|
11627
|
-
|
|
11627
|
+
Z
|
|
11628
11628
|
],
|
|
11629
11629
|
relevance: 2
|
|
11630
11630
|
}, $ = {
|
|
11631
11631
|
scope: "string",
|
|
11632
11632
|
match: o(/'/, l(/[^\\']/, /\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/), /'/)
|
|
11633
11633
|
};
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11634
|
+
Z.contains = [
|
|
11635
|
+
Q,
|
|
11636
|
+
vg,
|
|
11637
|
+
_g,
|
|
11638
|
+
q,
|
|
11639
11639
|
$,
|
|
11640
11640
|
i,
|
|
11641
11641
|
_,
|
|
11642
11642
|
T,
|
|
11643
11643
|
z,
|
|
11644
|
+
gg,
|
|
11644
11645
|
G,
|
|
11645
11646
|
K,
|
|
11646
|
-
q,
|
|
11647
11647
|
O,
|
|
11648
11648
|
j
|
|
11649
11649
|
];
|
|
11650
|
-
let
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
Z,
|
|
11655
|
-
ug,
|
|
11650
|
+
let bg = { variants: [
|
|
11651
|
+
yg,
|
|
11652
|
+
Q,
|
|
11653
|
+
vg,
|
|
11656
11654
|
J,
|
|
11655
|
+
_g,
|
|
11656
|
+
q,
|
|
11657
11657
|
$
|
|
11658
11658
|
] };
|
|
11659
11659
|
return {
|
|
@@ -11664,7 +11664,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11664
11664
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11665
11665
|
contains: [
|
|
11666
11666
|
i,
|
|
11667
|
-
|
|
11667
|
+
bg,
|
|
11668
11668
|
_,
|
|
11669
11669
|
T,
|
|
11670
11670
|
H,
|
|
@@ -11675,18 +11675,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11675
11675
|
relevance: 2,
|
|
11676
11676
|
contains: [
|
|
11677
11677
|
T,
|
|
11678
|
-
Z,
|
|
11679
|
-
ug,
|
|
11680
11678
|
J,
|
|
11679
|
+
_g,
|
|
11680
|
+
q,
|
|
11681
11681
|
$,
|
|
11682
|
-
|
|
11682
|
+
K
|
|
11683
11683
|
]
|
|
11684
11684
|
},
|
|
11685
11685
|
B,
|
|
11686
11686
|
z,
|
|
11687
|
+
gg,
|
|
11687
11688
|
G,
|
|
11688
11689
|
K,
|
|
11689
|
-
q,
|
|
11690
11690
|
O,
|
|
11691
11691
|
j
|
|
11692
11692
|
]
|
|
@@ -13800,12 +13800,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13800
13800
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13801
13801
|
subLanguage: "graphql"
|
|
13802
13802
|
}
|
|
13803
|
-
},
|
|
13803
|
+
}, gg = {
|
|
13804
13804
|
className: "string",
|
|
13805
13805
|
begin: "`",
|
|
13806
13806
|
end: "`",
|
|
13807
13807
|
contains: [e.BACKSLASH_ESCAPE, L]
|
|
13808
|
-
},
|
|
13808
|
+
}, G = {
|
|
13809
13809
|
className: "comment",
|
|
13810
13810
|
variants: [
|
|
13811
13811
|
e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
|
|
@@ -13842,36 +13842,36 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13842
13842
|
e.C_BLOCK_COMMENT_MODE,
|
|
13843
13843
|
e.C_LINE_COMMENT_MODE
|
|
13844
13844
|
]
|
|
13845
|
-
},
|
|
13845
|
+
}, K = [
|
|
13846
13846
|
e.APOS_STRING_MODE,
|
|
13847
13847
|
e.QUOTE_STRING_MODE,
|
|
13848
13848
|
z,
|
|
13849
13849
|
B,
|
|
13850
13850
|
H,
|
|
13851
|
-
|
|
13851
|
+
gg,
|
|
13852
13852
|
{ match: /\$\d+/ },
|
|
13853
13853
|
I
|
|
13854
13854
|
];
|
|
13855
|
-
L.contains =
|
|
13855
|
+
L.contains = K.concat({
|
|
13856
13856
|
begin: /\{/,
|
|
13857
13857
|
end: /\}/,
|
|
13858
13858
|
keywords: E,
|
|
13859
|
-
contains: ["self"].concat(
|
|
13859
|
+
contains: ["self"].concat(K)
|
|
13860
13860
|
});
|
|
13861
|
-
let
|
|
13861
|
+
let q = [].concat(G, L.contains), _g = q.concat([{
|
|
13862
13862
|
begin: /(\s*)\(/,
|
|
13863
13863
|
end: /\)/,
|
|
13864
13864
|
keywords: E,
|
|
13865
|
-
contains: ["self"].concat(
|
|
13866
|
-
}]),
|
|
13865
|
+
contains: ["self"].concat(q)
|
|
13866
|
+
}]), J = {
|
|
13867
13867
|
className: "params",
|
|
13868
13868
|
begin: /(\s*)\(/,
|
|
13869
13869
|
end: /\)/,
|
|
13870
13870
|
excludeBegin: !0,
|
|
13871
13871
|
excludeEnd: !0,
|
|
13872
13872
|
keywords: E,
|
|
13873
|
-
contains:
|
|
13874
|
-
},
|
|
13873
|
+
contains: _g
|
|
13874
|
+
}, Z = { variants: [{
|
|
13875
13875
|
match: [
|
|
13876
13876
|
/class/,
|
|
13877
13877
|
/\s+/,
|
|
@@ -13897,17 +13897,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13897
13897
|
1: "keyword",
|
|
13898
13898
|
3: "title.class"
|
|
13899
13899
|
}
|
|
13900
|
-
}] },
|
|
13900
|
+
}] }, vg = {
|
|
13901
13901
|
relevance: 0,
|
|
13902
13902
|
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]*)*/),
|
|
13903
13903
|
className: "title.class",
|
|
13904
13904
|
keywords: { _: [...o, ...s] }
|
|
13905
|
-
},
|
|
13905
|
+
}, Q = {
|
|
13906
13906
|
label: "use_strict",
|
|
13907
13907
|
className: "meta",
|
|
13908
13908
|
relevance: 10,
|
|
13909
13909
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13910
|
-
},
|
|
13910
|
+
}, yg = {
|
|
13911
13911
|
variants: [{ match: [
|
|
13912
13912
|
/function/,
|
|
13913
13913
|
/\s+/,
|
|
@@ -13919,32 +13919,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13919
13919
|
3: "title.function"
|
|
13920
13920
|
},
|
|
13921
13921
|
label: "func.def",
|
|
13922
|
-
contains: [
|
|
13922
|
+
contains: [J],
|
|
13923
13923
|
illegal: /%/
|
|
13924
13924
|
}, $ = {
|
|
13925
13925
|
relevance: 0,
|
|
13926
13926
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13927
13927
|
className: "variable.constant"
|
|
13928
13928
|
};
|
|
13929
|
-
function
|
|
13929
|
+
function bg(e) {
|
|
13930
13930
|
return n.concat("(?!", e.join("|"), ")");
|
|
13931
13931
|
}
|
|
13932
|
-
let
|
|
13933
|
-
match: n.concat(/\b/,
|
|
13932
|
+
let xg = {
|
|
13933
|
+
match: n.concat(/\b/, bg([
|
|
13934
13934
|
...l,
|
|
13935
13935
|
"super",
|
|
13936
13936
|
"import"
|
|
13937
13937
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13938
13938
|
className: "title.function",
|
|
13939
13939
|
relevance: 0
|
|
13940
|
-
},
|
|
13940
|
+
}, Sg = {
|
|
13941
13941
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13942
13942
|
end: g,
|
|
13943
13943
|
excludeBegin: !0,
|
|
13944
13944
|
keywords: "prototype",
|
|
13945
13945
|
className: "property",
|
|
13946
13946
|
relevance: 0
|
|
13947
|
-
},
|
|
13947
|
+
}, Cg = {
|
|
13948
13948
|
match: [
|
|
13949
13949
|
/get|set/,
|
|
13950
13950
|
/\s+/,
|
|
@@ -13955,8 +13955,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13955
13955
|
1: "keyword",
|
|
13956
13956
|
3: "title.function"
|
|
13957
13957
|
},
|
|
13958
|
-
contains: [{ begin: /\(\)/ },
|
|
13959
|
-
},
|
|
13958
|
+
contains: [{ begin: /\(\)/ }, J]
|
|
13959
|
+
}, wg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Tg = {
|
|
13960
13960
|
match: [
|
|
13961
13961
|
/const|var|let/,
|
|
13962
13962
|
/\s+/,
|
|
@@ -13964,14 +13964,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13964
13964
|
/\s*/,
|
|
13965
13965
|
/=\s*/,
|
|
13966
13966
|
/(async\s*)?/,
|
|
13967
|
-
n.lookahead(
|
|
13967
|
+
n.lookahead(wg)
|
|
13968
13968
|
],
|
|
13969
13969
|
keywords: "async",
|
|
13970
13970
|
className: {
|
|
13971
13971
|
1: "keyword",
|
|
13972
13972
|
3: "title.function"
|
|
13973
13973
|
},
|
|
13974
|
-
contains: [
|
|
13974
|
+
contains: [J]
|
|
13975
13975
|
};
|
|
13976
13976
|
return {
|
|
13977
13977
|
name: "JavaScript",
|
|
@@ -13983,8 +13983,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13983
13983
|
],
|
|
13984
13984
|
keywords: E,
|
|
13985
13985
|
exports: {
|
|
13986
|
-
PARAMS_CONTAINS:
|
|
13987
|
-
CLASS_REFERENCE:
|
|
13986
|
+
PARAMS_CONTAINS: _g,
|
|
13987
|
+
CLASS_REFERENCE: vg
|
|
13988
13988
|
},
|
|
13989
13989
|
illegal: /#(?![$_A-z])/,
|
|
13990
13990
|
contains: [
|
|
@@ -13993,33 +13993,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13993
13993
|
binary: "node",
|
|
13994
13994
|
relevance: 5
|
|
13995
13995
|
}),
|
|
13996
|
-
|
|
13996
|
+
Q,
|
|
13997
13997
|
e.APOS_STRING_MODE,
|
|
13998
13998
|
e.QUOTE_STRING_MODE,
|
|
13999
13999
|
z,
|
|
14000
14000
|
B,
|
|
14001
14001
|
H,
|
|
14002
|
+
gg,
|
|
14002
14003
|
G,
|
|
14003
|
-
K,
|
|
14004
14004
|
{ match: /\$\d+/ },
|
|
14005
14005
|
I,
|
|
14006
|
-
|
|
14006
|
+
vg,
|
|
14007
14007
|
{
|
|
14008
14008
|
scope: "attr",
|
|
14009
14009
|
match: g + n.lookahead(":"),
|
|
14010
14010
|
relevance: 0
|
|
14011
14011
|
},
|
|
14012
|
-
|
|
14012
|
+
Tg,
|
|
14013
14013
|
{
|
|
14014
14014
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14015
14015
|
keywords: "return throw case",
|
|
14016
14016
|
relevance: 0,
|
|
14017
14017
|
contains: [
|
|
14018
|
-
|
|
14018
|
+
G,
|
|
14019
14019
|
e.REGEXP_MODE,
|
|
14020
14020
|
{
|
|
14021
14021
|
className: "function",
|
|
14022
|
-
begin:
|
|
14022
|
+
begin: wg,
|
|
14023
14023
|
returnBegin: !0,
|
|
14024
14024
|
end: "\\s*=>",
|
|
14025
14025
|
contains: [{
|
|
@@ -14040,7 +14040,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14040
14040
|
excludeBegin: !0,
|
|
14041
14041
|
excludeEnd: !0,
|
|
14042
14042
|
keywords: E,
|
|
14043
|
-
contains:
|
|
14043
|
+
contains: _g
|
|
14044
14044
|
}
|
|
14045
14045
|
]
|
|
14046
14046
|
}]
|
|
@@ -14076,13 +14076,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14076
14076
|
}
|
|
14077
14077
|
]
|
|
14078
14078
|
},
|
|
14079
|
-
|
|
14079
|
+
yg,
|
|
14080
14080
|
{ beginKeywords: "while if switch catch for" },
|
|
14081
14081
|
{
|
|
14082
14082
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
14083
14083
|
returnBegin: !0,
|
|
14084
14084
|
label: "func.def",
|
|
14085
|
-
contains: [
|
|
14085
|
+
contains: [J, e.inherit(e.TITLE_MODE, {
|
|
14086
14086
|
begin: g,
|
|
14087
14087
|
className: "title.function"
|
|
14088
14088
|
})]
|
|
@@ -14091,7 +14091,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14091
14091
|
match: /\.\.\./,
|
|
14092
14092
|
relevance: 0
|
|
14093
14093
|
},
|
|
14094
|
-
|
|
14094
|
+
Sg,
|
|
14095
14095
|
{
|
|
14096
14096
|
match: "\\$" + g,
|
|
14097
14097
|
relevance: 0
|
|
@@ -14099,12 +14099,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14099
14099
|
{
|
|
14100
14100
|
match: [/\bconstructor(?=\s*\()/],
|
|
14101
14101
|
className: { 1: "title.function" },
|
|
14102
|
-
contains: [
|
|
14102
|
+
contains: [J]
|
|
14103
14103
|
},
|
|
14104
|
-
|
|
14104
|
+
xg,
|
|
14105
14105
|
$,
|
|
14106
|
-
|
|
14107
|
-
|
|
14106
|
+
Z,
|
|
14107
|
+
Cg,
|
|
14108
14108
|
{ match: /\$[(.]/ }
|
|
14109
14109
|
]
|
|
14110
14110
|
};
|
|
@@ -15058,12 +15058,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15058
15058
|
{ begin: "!important" },
|
|
15059
15059
|
n.FUNCTION_DISPATCH
|
|
15060
15060
|
]
|
|
15061
|
-
},
|
|
15061
|
+
}, gg = {
|
|
15062
15062
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15063
15063
|
returnBegin: !0,
|
|
15064
15064
|
contains: [H]
|
|
15065
15065
|
};
|
|
15066
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15066
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, gg, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15067
15067
|
name: "Less",
|
|
15068
15068
|
case_insensitive: !0,
|
|
15069
15069
|
illegal: "[=>'/<($\"]",
|
|
@@ -17589,16 +17589,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17589
17589
|
3: "variable.language"
|
|
17590
17590
|
}
|
|
17591
17591
|
}
|
|
17592
|
-
] },
|
|
17592
|
+
] }, gg = {
|
|
17593
17593
|
scope: "attr",
|
|
17594
17594
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17595
|
-
},
|
|
17595
|
+
}, G = {
|
|
17596
17596
|
relevance: 0,
|
|
17597
17597
|
begin: /\(/,
|
|
17598
17598
|
end: /\)/,
|
|
17599
17599
|
keywords: I,
|
|
17600
17600
|
contains: [
|
|
17601
|
-
|
|
17601
|
+
gg,
|
|
17602
17602
|
s,
|
|
17603
17603
|
H,
|
|
17604
17604
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17606,7 +17606,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17606
17606
|
E,
|
|
17607
17607
|
z
|
|
17608
17608
|
]
|
|
17609
|
-
},
|
|
17609
|
+
}, K = {
|
|
17610
17610
|
relevance: 0,
|
|
17611
17611
|
match: [
|
|
17612
17612
|
/\b/,
|
|
@@ -17616,17 +17616,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17616
17616
|
n.lookahead(/(?=\()/)
|
|
17617
17617
|
],
|
|
17618
17618
|
scope: { 3: "title.function.invoke" },
|
|
17619
|
-
contains: [
|
|
17619
|
+
contains: [G]
|
|
17620
17620
|
};
|
|
17621
|
-
|
|
17622
|
-
let
|
|
17623
|
-
|
|
17621
|
+
G.contains.push(K);
|
|
17622
|
+
let q = [
|
|
17623
|
+
gg,
|
|
17624
17624
|
H,
|
|
17625
17625
|
e.C_BLOCK_COMMENT_MODE,
|
|
17626
17626
|
T,
|
|
17627
17627
|
E,
|
|
17628
17628
|
z
|
|
17629
|
-
],
|
|
17629
|
+
], _g = {
|
|
17630
17630
|
begin: n.concat(/#\[\s*\\?/, n.either(a, o)),
|
|
17631
17631
|
beginScope: "meta",
|
|
17632
17632
|
end: /]/,
|
|
@@ -17643,9 +17643,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17643
17643
|
literal: O,
|
|
17644
17644
|
keyword: ["new", "array"]
|
|
17645
17645
|
},
|
|
17646
|
-
contains: ["self", ...
|
|
17646
|
+
contains: ["self", ...q]
|
|
17647
17647
|
},
|
|
17648
|
-
...
|
|
17648
|
+
...q,
|
|
17649
17649
|
{
|
|
17650
17650
|
scope: "meta",
|
|
17651
17651
|
variants: [{ match: a }, { match: o }]
|
|
@@ -17656,7 +17656,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17656
17656
|
case_insensitive: !1,
|
|
17657
17657
|
keywords: I,
|
|
17658
17658
|
contains: [
|
|
17659
|
-
|
|
17659
|
+
_g,
|
|
17660
17660
|
e.HASH_COMMENT_MODE,
|
|
17661
17661
|
e.COMMENT("//", "$"),
|
|
17662
17662
|
e.COMMENT("/\\*", "\\*/", { contains: [{
|
|
@@ -17682,7 +17682,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17682
17682
|
match: /\$this\b/
|
|
17683
17683
|
},
|
|
17684
17684
|
s,
|
|
17685
|
-
|
|
17685
|
+
K,
|
|
17686
17686
|
H,
|
|
17687
17687
|
{
|
|
17688
17688
|
match: [
|
|
@@ -17719,7 +17719,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17719
17719
|
keywords: I,
|
|
17720
17720
|
contains: [
|
|
17721
17721
|
"self",
|
|
17722
|
-
|
|
17722
|
+
_g,
|
|
17723
17723
|
s,
|
|
17724
17724
|
H,
|
|
17725
17725
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -21038,7 +21038,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21038
21038
|
"unknown",
|
|
21039
21039
|
"usableFromInline",
|
|
21040
21040
|
"warn_unqualified_access"
|
|
21041
|
-
],
|
|
21041
|
+
], gg = [
|
|
21042
21042
|
"iOS",
|
|
21043
21043
|
"iOSApplicationExtension",
|
|
21044
21044
|
"macOS",
|
|
@@ -21051,7 +21051,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21051
21051
|
"tvOSApplicationExtension",
|
|
21052
21052
|
"swift"
|
|
21053
21053
|
];
|
|
21054
|
-
function
|
|
21054
|
+
function G(e) {
|
|
21055
21055
|
let n = {
|
|
21056
21056
|
match: /\s+/,
|
|
21057
21057
|
relevance: 0
|
|
@@ -21061,104 +21061,104 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21061
21061
|
}, I = {
|
|
21062
21062
|
match: a(/\./, s(...g)),
|
|
21063
21063
|
relevance: 0
|
|
21064
|
-
},
|
|
21064
|
+
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]), K = { variants: [{
|
|
21065
21065
|
className: "keyword",
|
|
21066
21066
|
match: s(...g.filter((e) => typeof e != "string").concat(m).map(l), ...d)
|
|
21067
|
-
}] },
|
|
21067
|
+
}] }, q = {
|
|
21068
21068
|
$pattern: s(/\b\w+/, /#\w+/),
|
|
21069
|
-
keyword:
|
|
21069
|
+
keyword: G.concat(T),
|
|
21070
21070
|
literal: _
|
|
21071
|
-
},
|
|
21071
|
+
}, _g = [
|
|
21072
21072
|
O,
|
|
21073
21073
|
I,
|
|
21074
|
-
|
|
21075
|
-
],
|
|
21074
|
+
K
|
|
21075
|
+
], J = [{
|
|
21076
21076
|
match: a(/\./, s(...E)),
|
|
21077
21077
|
relevance: 0
|
|
21078
21078
|
}, {
|
|
21079
21079
|
className: "built_in",
|
|
21080
21080
|
match: a(/\b/, s(...E), /(?=\()/)
|
|
21081
|
-
}],
|
|
21081
|
+
}], Z = {
|
|
21082
21082
|
match: /->/,
|
|
21083
21083
|
relevance: 0
|
|
21084
|
-
},
|
|
21084
|
+
}, vg = [Z, {
|
|
21085
21085
|
className: "operator",
|
|
21086
21086
|
relevance: 0,
|
|
21087
21087
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21088
|
-
}],
|
|
21088
|
+
}], Q = "([0-9]_*)+", yg = "([0-9a-fA-F]_*)+", $ = {
|
|
21089
21089
|
className: "number",
|
|
21090
21090
|
relevance: 0,
|
|
21091
21091
|
variants: [
|
|
21092
|
-
{ match: `\\b(${
|
|
21093
|
-
{ match: `\\b0x(${
|
|
21092
|
+
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21093
|
+
{ match: `\\b0x(${yg})(\\.(${yg}))?([pP][+-]?(${Q}))?\\b` },
|
|
21094
21094
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21095
21095
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21096
21096
|
]
|
|
21097
|
-
},
|
|
21097
|
+
}, bg = (e = "") => ({
|
|
21098
21098
|
className: "subst",
|
|
21099
21099
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21100
|
-
}),
|
|
21100
|
+
}), xg = (e = "") => ({
|
|
21101
21101
|
className: "subst",
|
|
21102
21102
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21103
|
-
}),
|
|
21103
|
+
}), Sg = (e = "") => ({
|
|
21104
21104
|
className: "subst",
|
|
21105
21105
|
label: "interpol",
|
|
21106
21106
|
begin: a(/\\/, e, /\(/),
|
|
21107
21107
|
end: /\)/
|
|
21108
|
-
}),
|
|
21108
|
+
}), Cg = (e = "") => ({
|
|
21109
21109
|
begin: a(e, /"""/),
|
|
21110
21110
|
end: a(/"""/, e),
|
|
21111
21111
|
contains: [
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21112
|
+
bg(e),
|
|
21113
|
+
xg(e),
|
|
21114
|
+
Sg(e)
|
|
21115
21115
|
]
|
|
21116
|
-
}),
|
|
21116
|
+
}), wg = (e = "") => ({
|
|
21117
21117
|
begin: a(e, /"/),
|
|
21118
21118
|
end: a(/"/, e),
|
|
21119
|
-
contains: [
|
|
21120
|
-
}),
|
|
21119
|
+
contains: [bg(e), Sg(e)]
|
|
21120
|
+
}), Tg = {
|
|
21121
21121
|
className: "string",
|
|
21122
21122
|
variants: [
|
|
21123
|
-
|
|
21124
|
-
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21123
|
+
Cg(),
|
|
21124
|
+
Cg("#"),
|
|
21125
|
+
Cg("##"),
|
|
21126
|
+
Cg("###"),
|
|
21127
|
+
wg(),
|
|
21128
|
+
wg("#"),
|
|
21129
|
+
wg("##"),
|
|
21130
|
+
wg("###")
|
|
21131
21131
|
]
|
|
21132
|
-
},
|
|
21132
|
+
}, Eg = [e.BACKSLASH_ESCAPE, {
|
|
21133
21133
|
begin: /\[/,
|
|
21134
21134
|
end: /\]/,
|
|
21135
21135
|
relevance: 0,
|
|
21136
21136
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21137
|
-
}],
|
|
21137
|
+
}], Dg = {
|
|
21138
21138
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21139
21139
|
end: /\//,
|
|
21140
|
-
contains:
|
|
21141
|
-
},
|
|
21140
|
+
contains: Eg
|
|
21141
|
+
}, Og = (e) => {
|
|
21142
21142
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21143
21143
|
return {
|
|
21144
21144
|
begin: n,
|
|
21145
21145
|
end: r,
|
|
21146
|
-
contains: [...
|
|
21146
|
+
contains: [...Eg, {
|
|
21147
21147
|
scope: "comment",
|
|
21148
21148
|
begin: `#(?!.*${r})`,
|
|
21149
21149
|
end: /$/
|
|
21150
21150
|
}]
|
|
21151
21151
|
};
|
|
21152
|
-
},
|
|
21152
|
+
}, kg = {
|
|
21153
21153
|
scope: "regexp",
|
|
21154
21154
|
variants: [
|
|
21155
|
-
|
|
21156
|
-
|
|
21157
|
-
|
|
21158
|
-
|
|
21155
|
+
Og("###"),
|
|
21156
|
+
Og("##"),
|
|
21157
|
+
Og("#"),
|
|
21158
|
+
Dg
|
|
21159
21159
|
]
|
|
21160
|
-
},
|
|
21161
|
-
|
|
21160
|
+
}, Ag = { match: a(/`/, z, /`/) }, jg = [
|
|
21161
|
+
Ag,
|
|
21162
21162
|
{
|
|
21163
21163
|
className: "variable",
|
|
21164
21164
|
match: /\$\d+/
|
|
@@ -21167,18 +21167,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21167
21167
|
className: "variable",
|
|
21168
21168
|
match: `\\$${L}+`
|
|
21169
21169
|
}
|
|
21170
|
-
],
|
|
21170
|
+
], Mg = [
|
|
21171
21171
|
{
|
|
21172
21172
|
match: /(@|#(un)?)available/,
|
|
21173
21173
|
scope: "keyword",
|
|
21174
21174
|
starts: { contains: [{
|
|
21175
21175
|
begin: /\(/,
|
|
21176
21176
|
end: /\)/,
|
|
21177
|
-
keywords:
|
|
21177
|
+
keywords: gg,
|
|
21178
21178
|
contains: [
|
|
21179
|
-
...
|
|
21179
|
+
...vg,
|
|
21180
21180
|
$,
|
|
21181
|
-
|
|
21181
|
+
Tg
|
|
21182
21182
|
]
|
|
21183
21183
|
}] }
|
|
21184
21184
|
},
|
|
@@ -21190,7 +21190,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21190
21190
|
scope: "meta",
|
|
21191
21191
|
match: a(/@/, z)
|
|
21192
21192
|
}
|
|
21193
|
-
],
|
|
21193
|
+
], Ng = {
|
|
21194
21194
|
match: i(/\b[A-Z]/),
|
|
21195
21195
|
relevance: 0,
|
|
21196
21196
|
contains: [
|
|
@@ -21216,24 +21216,24 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21216
21216
|
relevance: 0
|
|
21217
21217
|
}
|
|
21218
21218
|
]
|
|
21219
|
-
},
|
|
21219
|
+
}, Pg = {
|
|
21220
21220
|
begin: /</,
|
|
21221
21221
|
end: />/,
|
|
21222
|
-
keywords:
|
|
21222
|
+
keywords: q,
|
|
21223
21223
|
contains: [
|
|
21224
21224
|
...o,
|
|
21225
|
-
...
|
|
21226
|
-
...
|
|
21227
|
-
|
|
21228
|
-
|
|
21225
|
+
..._g,
|
|
21226
|
+
...Mg,
|
|
21227
|
+
Z,
|
|
21228
|
+
Ng
|
|
21229
21229
|
]
|
|
21230
21230
|
};
|
|
21231
|
-
|
|
21232
|
-
let
|
|
21231
|
+
Ng.contains.push(Pg);
|
|
21232
|
+
let Fg = {
|
|
21233
21233
|
begin: /\(/,
|
|
21234
21234
|
end: /\)/,
|
|
21235
21235
|
relevance: 0,
|
|
21236
|
-
keywords:
|
|
21236
|
+
keywords: q,
|
|
21237
21237
|
contains: [
|
|
21238
21238
|
"self",
|
|
21239
21239
|
{
|
|
@@ -21242,25 +21242,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21242
21242
|
relevance: 0
|
|
21243
21243
|
},
|
|
21244
21244
|
...o,
|
|
21245
|
-
|
|
21246
|
-
...
|
|
21247
|
-
...
|
|
21248
|
-
...
|
|
21245
|
+
kg,
|
|
21246
|
+
..._g,
|
|
21247
|
+
...J,
|
|
21248
|
+
...vg,
|
|
21249
21249
|
$,
|
|
21250
|
-
|
|
21251
|
-
...
|
|
21252
|
-
...
|
|
21253
|
-
|
|
21250
|
+
Tg,
|
|
21251
|
+
...jg,
|
|
21252
|
+
...Mg,
|
|
21253
|
+
Ng
|
|
21254
21254
|
]
|
|
21255
|
-
},
|
|
21255
|
+
}, Ig = {
|
|
21256
21256
|
begin: /</,
|
|
21257
21257
|
end: />/,
|
|
21258
21258
|
keywords: "repeat each",
|
|
21259
|
-
contains: [...o,
|
|
21260
|
-
},
|
|
21259
|
+
contains: [...o, Ng]
|
|
21260
|
+
}, Lg = {
|
|
21261
21261
|
begin: /\(/,
|
|
21262
21262
|
end: /\)/,
|
|
21263
|
-
keywords:
|
|
21263
|
+
keywords: q,
|
|
21264
21264
|
contains: [
|
|
21265
21265
|
{
|
|
21266
21266
|
begin: s(i(a(z, /\s*:/)), i(a(z, /\s+/, z, /\s*:/))),
|
|
@@ -21275,42 +21275,42 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21275
21275
|
}]
|
|
21276
21276
|
},
|
|
21277
21277
|
...o,
|
|
21278
|
-
...
|
|
21279
|
-
...
|
|
21278
|
+
..._g,
|
|
21279
|
+
...vg,
|
|
21280
21280
|
$,
|
|
21281
|
-
|
|
21282
|
-
...
|
|
21283
|
-
|
|
21284
|
-
|
|
21281
|
+
Tg,
|
|
21282
|
+
...Mg,
|
|
21283
|
+
Ng,
|
|
21284
|
+
Fg
|
|
21285
21285
|
],
|
|
21286
21286
|
endsParent: !0,
|
|
21287
21287
|
illegal: /["']/
|
|
21288
|
-
},
|
|
21288
|
+
}, Rg = {
|
|
21289
21289
|
match: [
|
|
21290
21290
|
/(func|macro)/,
|
|
21291
21291
|
/\s+/,
|
|
21292
|
-
s(
|
|
21292
|
+
s(Ag.match, z, j)
|
|
21293
21293
|
],
|
|
21294
21294
|
className: {
|
|
21295
21295
|
1: "keyword",
|
|
21296
21296
|
3: "title.function"
|
|
21297
21297
|
},
|
|
21298
21298
|
contains: [
|
|
21299
|
-
|
|
21300
|
-
|
|
21299
|
+
Ig,
|
|
21300
|
+
Lg,
|
|
21301
21301
|
n
|
|
21302
21302
|
],
|
|
21303
21303
|
illegal: [/\[/, /%/]
|
|
21304
|
-
},
|
|
21304
|
+
}, zg = {
|
|
21305
21305
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21306
21306
|
className: { 1: "keyword" },
|
|
21307
21307
|
contains: [
|
|
21308
|
-
|
|
21309
|
-
|
|
21308
|
+
Ig,
|
|
21309
|
+
Lg,
|
|
21310
21310
|
n
|
|
21311
21311
|
],
|
|
21312
21312
|
illegal: /\[|%/
|
|
21313
|
-
},
|
|
21313
|
+
}, Bg = {
|
|
21314
21314
|
match: [
|
|
21315
21315
|
/operator/,
|
|
21316
21316
|
/\s+/,
|
|
@@ -21320,7 +21320,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21320
21320
|
1: "keyword",
|
|
21321
21321
|
3: "title"
|
|
21322
21322
|
}
|
|
21323
|
-
},
|
|
21323
|
+
}, Vg = {
|
|
21324
21324
|
begin: [
|
|
21325
21325
|
/precedencegroup/,
|
|
21326
21326
|
/\s+/,
|
|
@@ -21330,10 +21330,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21330
21330
|
1: "keyword",
|
|
21331
21331
|
3: "title"
|
|
21332
21332
|
},
|
|
21333
|
-
contains: [
|
|
21333
|
+
contains: [Ng],
|
|
21334
21334
|
keywords: [...v, ..._],
|
|
21335
21335
|
end: /}/
|
|
21336
|
-
},
|
|
21336
|
+
}, Hg = {
|
|
21337
21337
|
match: [
|
|
21338
21338
|
/class\b/,
|
|
21339
21339
|
/\s+/,
|
|
@@ -21346,7 +21346,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21346
21346
|
3: "keyword",
|
|
21347
21347
|
5: "title.function"
|
|
21348
21348
|
}
|
|
21349
|
-
},
|
|
21349
|
+
}, Ug = {
|
|
21350
21350
|
match: [
|
|
21351
21351
|
/class\b/,
|
|
21352
21352
|
/\s+/,
|
|
@@ -21356,7 +21356,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21356
21356
|
1: "keyword",
|
|
21357
21357
|
3: "keyword"
|
|
21358
21358
|
}
|
|
21359
|
-
},
|
|
21359
|
+
}, Wg = {
|
|
21360
21360
|
begin: [
|
|
21361
21361
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21362
21362
|
/\s+/,
|
|
@@ -21367,32 +21367,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21367
21367
|
1: "keyword",
|
|
21368
21368
|
3: "title.class"
|
|
21369
21369
|
},
|
|
21370
|
-
keywords:
|
|
21370
|
+
keywords: q,
|
|
21371
21371
|
contains: [
|
|
21372
|
-
|
|
21373
|
-
...
|
|
21372
|
+
Ig,
|
|
21373
|
+
..._g,
|
|
21374
21374
|
{
|
|
21375
21375
|
begin: /:/,
|
|
21376
21376
|
end: /\{/,
|
|
21377
|
-
keywords:
|
|
21377
|
+
keywords: q,
|
|
21378
21378
|
contains: [{
|
|
21379
21379
|
scope: "title.class.inherited",
|
|
21380
21380
|
match: B
|
|
21381
|
-
}, ...
|
|
21381
|
+
}, ..._g],
|
|
21382
21382
|
relevance: 0
|
|
21383
21383
|
}
|
|
21384
21384
|
]
|
|
21385
21385
|
};
|
|
21386
|
-
for (let e of
|
|
21386
|
+
for (let e of Tg.variants) {
|
|
21387
21387
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21388
|
-
n.keywords =
|
|
21388
|
+
n.keywords = q;
|
|
21389
21389
|
let r = [
|
|
21390
|
-
...
|
|
21391
|
-
...
|
|
21392
|
-
...
|
|
21390
|
+
..._g,
|
|
21391
|
+
...J,
|
|
21392
|
+
...vg,
|
|
21393
21393
|
$,
|
|
21394
|
-
|
|
21395
|
-
...
|
|
21394
|
+
Tg,
|
|
21395
|
+
...jg
|
|
21396
21396
|
];
|
|
21397
21397
|
n.contains = [...r, {
|
|
21398
21398
|
begin: /\(/,
|
|
@@ -21402,36 +21402,36 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21402
21402
|
}
|
|
21403
21403
|
return {
|
|
21404
21404
|
name: "Swift",
|
|
21405
|
-
keywords:
|
|
21405
|
+
keywords: q,
|
|
21406
21406
|
contains: [
|
|
21407
21407
|
...o,
|
|
21408
|
-
Mg,
|
|
21409
|
-
Ng,
|
|
21410
|
-
Ig,
|
|
21411
|
-
Lg,
|
|
21412
21408
|
Rg,
|
|
21413
|
-
|
|
21414
|
-
|
|
21409
|
+
zg,
|
|
21410
|
+
Hg,
|
|
21411
|
+
Ug,
|
|
21412
|
+
Wg,
|
|
21413
|
+
Bg,
|
|
21414
|
+
Vg,
|
|
21415
21415
|
{
|
|
21416
21416
|
beginKeywords: "import",
|
|
21417
21417
|
end: /$/,
|
|
21418
21418
|
contains: [...o],
|
|
21419
21419
|
relevance: 0
|
|
21420
21420
|
},
|
|
21421
|
-
|
|
21422
|
-
...
|
|
21423
|
-
...
|
|
21424
|
-
...
|
|
21421
|
+
kg,
|
|
21422
|
+
..._g,
|
|
21423
|
+
...J,
|
|
21424
|
+
...vg,
|
|
21425
21425
|
$,
|
|
21426
|
-
|
|
21427
|
-
...
|
|
21428
|
-
...
|
|
21429
|
-
|
|
21430
|
-
|
|
21426
|
+
Tg,
|
|
21427
|
+
...jg,
|
|
21428
|
+
...Mg,
|
|
21429
|
+
Ng,
|
|
21430
|
+
Fg
|
|
21431
21431
|
]
|
|
21432
21432
|
};
|
|
21433
21433
|
}
|
|
21434
|
-
n.exports =
|
|
21434
|
+
n.exports = G;
|
|
21435
21435
|
})), require_taggerscript = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
21436
21436
|
function r(e) {
|
|
21437
21437
|
return {
|
|
@@ -22037,12 +22037,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22037
22037
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22038
22038
|
subLanguage: "graphql"
|
|
22039
22039
|
}
|
|
22040
|
-
},
|
|
22040
|
+
}, gg = {
|
|
22041
22041
|
className: "string",
|
|
22042
22042
|
begin: "`",
|
|
22043
22043
|
end: "`",
|
|
22044
22044
|
contains: [e.BACKSLASH_ESCAPE, L]
|
|
22045
|
-
},
|
|
22045
|
+
}, G = {
|
|
22046
22046
|
className: "comment",
|
|
22047
22047
|
variants: [
|
|
22048
22048
|
e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
|
|
@@ -22079,36 +22079,36 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22079
22079
|
e.C_BLOCK_COMMENT_MODE,
|
|
22080
22080
|
e.C_LINE_COMMENT_MODE
|
|
22081
22081
|
]
|
|
22082
|
-
},
|
|
22082
|
+
}, K = [
|
|
22083
22083
|
e.APOS_STRING_MODE,
|
|
22084
22084
|
e.QUOTE_STRING_MODE,
|
|
22085
22085
|
z,
|
|
22086
22086
|
B,
|
|
22087
22087
|
H,
|
|
22088
|
-
|
|
22088
|
+
gg,
|
|
22089
22089
|
{ match: /\$\d+/ },
|
|
22090
22090
|
I
|
|
22091
22091
|
];
|
|
22092
|
-
L.contains =
|
|
22092
|
+
L.contains = K.concat({
|
|
22093
22093
|
begin: /\{/,
|
|
22094
22094
|
end: /\}/,
|
|
22095
22095
|
keywords: E,
|
|
22096
|
-
contains: ["self"].concat(
|
|
22096
|
+
contains: ["self"].concat(K)
|
|
22097
22097
|
});
|
|
22098
|
-
let
|
|
22098
|
+
let q = [].concat(G, L.contains), _g = q.concat([{
|
|
22099
22099
|
begin: /(\s*)\(/,
|
|
22100
22100
|
end: /\)/,
|
|
22101
22101
|
keywords: E,
|
|
22102
|
-
contains: ["self"].concat(
|
|
22103
|
-
}]),
|
|
22102
|
+
contains: ["self"].concat(q)
|
|
22103
|
+
}]), J = {
|
|
22104
22104
|
className: "params",
|
|
22105
22105
|
begin: /(\s*)\(/,
|
|
22106
22106
|
end: /\)/,
|
|
22107
22107
|
excludeBegin: !0,
|
|
22108
22108
|
excludeEnd: !0,
|
|
22109
22109
|
keywords: E,
|
|
22110
|
-
contains:
|
|
22111
|
-
},
|
|
22110
|
+
contains: _g
|
|
22111
|
+
}, Z = { variants: [{
|
|
22112
22112
|
match: [
|
|
22113
22113
|
/class/,
|
|
22114
22114
|
/\s+/,
|
|
@@ -22134,17 +22134,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22134
22134
|
1: "keyword",
|
|
22135
22135
|
3: "title.class"
|
|
22136
22136
|
}
|
|
22137
|
-
}] },
|
|
22137
|
+
}] }, vg = {
|
|
22138
22138
|
relevance: 0,
|
|
22139
22139
|
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]*)*/),
|
|
22140
22140
|
className: "title.class",
|
|
22141
22141
|
keywords: { _: [...o, ...s] }
|
|
22142
|
-
},
|
|
22142
|
+
}, Q = {
|
|
22143
22143
|
label: "use_strict",
|
|
22144
22144
|
className: "meta",
|
|
22145
22145
|
relevance: 10,
|
|
22146
22146
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22147
|
-
},
|
|
22147
|
+
}, yg = {
|
|
22148
22148
|
variants: [{ match: [
|
|
22149
22149
|
/function/,
|
|
22150
22150
|
/\s+/,
|
|
@@ -22156,32 +22156,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22156
22156
|
3: "title.function"
|
|
22157
22157
|
},
|
|
22158
22158
|
label: "func.def",
|
|
22159
|
-
contains: [
|
|
22159
|
+
contains: [J],
|
|
22160
22160
|
illegal: /%/
|
|
22161
22161
|
}, $ = {
|
|
22162
22162
|
relevance: 0,
|
|
22163
22163
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22164
22164
|
className: "variable.constant"
|
|
22165
22165
|
};
|
|
22166
|
-
function
|
|
22166
|
+
function bg(e) {
|
|
22167
22167
|
return n.concat("(?!", e.join("|"), ")");
|
|
22168
22168
|
}
|
|
22169
|
-
let
|
|
22170
|
-
match: n.concat(/\b/,
|
|
22169
|
+
let xg = {
|
|
22170
|
+
match: n.concat(/\b/, bg([
|
|
22171
22171
|
...l,
|
|
22172
22172
|
"super",
|
|
22173
22173
|
"import"
|
|
22174
22174
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22175
22175
|
className: "title.function",
|
|
22176
22176
|
relevance: 0
|
|
22177
|
-
},
|
|
22177
|
+
}, Sg = {
|
|
22178
22178
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22179
22179
|
end: g,
|
|
22180
22180
|
excludeBegin: !0,
|
|
22181
22181
|
keywords: "prototype",
|
|
22182
22182
|
className: "property",
|
|
22183
22183
|
relevance: 0
|
|
22184
|
-
},
|
|
22184
|
+
}, Cg = {
|
|
22185
22185
|
match: [
|
|
22186
22186
|
/get|set/,
|
|
22187
22187
|
/\s+/,
|
|
@@ -22192,8 +22192,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22192
22192
|
1: "keyword",
|
|
22193
22193
|
3: "title.function"
|
|
22194
22194
|
},
|
|
22195
|
-
contains: [{ begin: /\(\)/ },
|
|
22196
|
-
},
|
|
22195
|
+
contains: [{ begin: /\(\)/ }, J]
|
|
22196
|
+
}, wg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Tg = {
|
|
22197
22197
|
match: [
|
|
22198
22198
|
/const|var|let/,
|
|
22199
22199
|
/\s+/,
|
|
@@ -22201,14 +22201,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22201
22201
|
/\s*/,
|
|
22202
22202
|
/=\s*/,
|
|
22203
22203
|
/(async\s*)?/,
|
|
22204
|
-
n.lookahead(
|
|
22204
|
+
n.lookahead(wg)
|
|
22205
22205
|
],
|
|
22206
22206
|
keywords: "async",
|
|
22207
22207
|
className: {
|
|
22208
22208
|
1: "keyword",
|
|
22209
22209
|
3: "title.function"
|
|
22210
22210
|
},
|
|
22211
|
-
contains: [
|
|
22211
|
+
contains: [J]
|
|
22212
22212
|
};
|
|
22213
22213
|
return {
|
|
22214
22214
|
name: "JavaScript",
|
|
@@ -22220,8 +22220,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22220
22220
|
],
|
|
22221
22221
|
keywords: E,
|
|
22222
22222
|
exports: {
|
|
22223
|
-
PARAMS_CONTAINS:
|
|
22224
|
-
CLASS_REFERENCE:
|
|
22223
|
+
PARAMS_CONTAINS: _g,
|
|
22224
|
+
CLASS_REFERENCE: vg
|
|
22225
22225
|
},
|
|
22226
22226
|
illegal: /#(?![$_A-z])/,
|
|
22227
22227
|
contains: [
|
|
@@ -22230,33 +22230,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22230
22230
|
binary: "node",
|
|
22231
22231
|
relevance: 5
|
|
22232
22232
|
}),
|
|
22233
|
-
|
|
22233
|
+
Q,
|
|
22234
22234
|
e.APOS_STRING_MODE,
|
|
22235
22235
|
e.QUOTE_STRING_MODE,
|
|
22236
22236
|
z,
|
|
22237
22237
|
B,
|
|
22238
22238
|
H,
|
|
22239
|
+
gg,
|
|
22239
22240
|
G,
|
|
22240
|
-
K,
|
|
22241
22241
|
{ match: /\$\d+/ },
|
|
22242
22242
|
I,
|
|
22243
|
-
|
|
22243
|
+
vg,
|
|
22244
22244
|
{
|
|
22245
22245
|
scope: "attr",
|
|
22246
22246
|
match: g + n.lookahead(":"),
|
|
22247
22247
|
relevance: 0
|
|
22248
22248
|
},
|
|
22249
|
-
|
|
22249
|
+
Tg,
|
|
22250
22250
|
{
|
|
22251
22251
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22252
22252
|
keywords: "return throw case",
|
|
22253
22253
|
relevance: 0,
|
|
22254
22254
|
contains: [
|
|
22255
|
-
|
|
22255
|
+
G,
|
|
22256
22256
|
e.REGEXP_MODE,
|
|
22257
22257
|
{
|
|
22258
22258
|
className: "function",
|
|
22259
|
-
begin:
|
|
22259
|
+
begin: wg,
|
|
22260
22260
|
returnBegin: !0,
|
|
22261
22261
|
end: "\\s*=>",
|
|
22262
22262
|
contains: [{
|
|
@@ -22277,7 +22277,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22277
22277
|
excludeBegin: !0,
|
|
22278
22278
|
excludeEnd: !0,
|
|
22279
22279
|
keywords: E,
|
|
22280
|
-
contains:
|
|
22280
|
+
contains: _g
|
|
22281
22281
|
}
|
|
22282
22282
|
]
|
|
22283
22283
|
}]
|
|
@@ -22313,13 +22313,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22313
22313
|
}
|
|
22314
22314
|
]
|
|
22315
22315
|
},
|
|
22316
|
-
|
|
22316
|
+
yg,
|
|
22317
22317
|
{ beginKeywords: "while if switch catch for" },
|
|
22318
22318
|
{
|
|
22319
22319
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
22320
22320
|
returnBegin: !0,
|
|
22321
22321
|
label: "func.def",
|
|
22322
|
-
contains: [
|
|
22322
|
+
contains: [J, e.inherit(e.TITLE_MODE, {
|
|
22323
22323
|
begin: g,
|
|
22324
22324
|
className: "title.function"
|
|
22325
22325
|
})]
|
|
@@ -22328,7 +22328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22328
22328
|
match: /\.\.\./,
|
|
22329
22329
|
relevance: 0
|
|
22330
22330
|
},
|
|
22331
|
-
|
|
22331
|
+
Sg,
|
|
22332
22332
|
{
|
|
22333
22333
|
match: "\\$" + g,
|
|
22334
22334
|
relevance: 0
|
|
@@ -22336,12 +22336,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22336
22336
|
{
|
|
22337
22337
|
match: [/\bconstructor(?=\s*\()/],
|
|
22338
22338
|
className: { 1: "title.function" },
|
|
22339
|
-
contains: [
|
|
22339
|
+
contains: [J]
|
|
22340
22340
|
},
|
|
22341
|
-
|
|
22341
|
+
xg,
|
|
22342
22342
|
$,
|
|
22343
|
-
|
|
22344
|
-
|
|
22343
|
+
Z,
|
|
22344
|
+
Cg,
|
|
22345
22345
|
{ match: /\$[(.]/ }
|
|
22346
22346
|
]
|
|
22347
22347
|
};
|
|
@@ -24482,97 +24482,97 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24482
24482
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24483
24483
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24484
24484
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24485
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24486
|
-
_document:
|
|
24485
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, gg = !1, G = getCurrentDocument(r), K = {
|
|
24486
|
+
_document: G,
|
|
24487
24487
|
_isBlock: s
|
|
24488
24488
|
};
|
|
24489
24489
|
g = () => {
|
|
24490
24490
|
r.contentEditable = m ? "false" : "true", r.ariaReadOnly = m ? "true" : null;
|
|
24491
24491
|
}, g();
|
|
24492
|
-
let
|
|
24493
|
-
H && setSelectionToDOM(
|
|
24494
|
-
}),
|
|
24495
|
-
d = takeSelectionSnapshot(r,
|
|
24496
|
-
},
|
|
24497
|
-
let e =
|
|
24498
|
-
if (
|
|
24492
|
+
let q = createMutationObserver(r, () => {
|
|
24493
|
+
H && setSelectionToDOM(G, r, d, K);
|
|
24494
|
+
}), _g = () => {
|
|
24495
|
+
d = takeSelectionSnapshot(r, K);
|
|
24496
|
+
}, J = () => {
|
|
24497
|
+
let e = q._flush();
|
|
24498
|
+
if (q._record(!1), e.length) {
|
|
24499
24499
|
let n;
|
|
24500
24500
|
for (; n = e.pop();) if (n.type === "childList") {
|
|
24501
24501
|
let { target: e, removedNodes: r, addedNodes: i, nextSibling: a } = n;
|
|
24502
24502
|
for (let n = r.length - 1; n >= 0; n--) e.insertBefore(r[n], a);
|
|
24503
24503
|
for (let n = i.length - 1; n >= 0; n--) e.removeChild(i[n]);
|
|
24504
24504
|
} else n.target.nodeValue = n.oldValue;
|
|
24505
|
-
|
|
24505
|
+
q._flush(), L = setSelectionToDOM(G, r, d, K);
|
|
24506
24506
|
}
|
|
24507
24507
|
E(z), B = !1, z = null;
|
|
24508
|
-
},
|
|
24508
|
+
}, Z = (e) => {
|
|
24509
24509
|
if (!B) {
|
|
24510
24510
|
if (u?.(e)) {
|
|
24511
24511
|
e.preventDefault();
|
|
24512
24512
|
return;
|
|
24513
24513
|
}
|
|
24514
|
-
if ((e.metaKey || e.ctrlKey) && !e.altKey && e.code === "KeyZ" && (e.preventDefault(),
|
|
24514
|
+
if ((e.metaKey || e.ctrlKey) && !e.altKey && e.code === "KeyZ" && (e.preventDefault(), q._record(!1), !m)) {
|
|
24515
24515
|
let r = e.shiftKey ? v.redo() : v.undo();
|
|
24516
24516
|
r && (l(n(r[0])), d = r[1]);
|
|
24517
24517
|
}
|
|
24518
24518
|
}
|
|
24519
|
-
},
|
|
24520
|
-
B ||
|
|
24521
|
-
},
|
|
24519
|
+
}, vg = () => {
|
|
24520
|
+
B || J();
|
|
24521
|
+
}, Q = (e) => {
|
|
24522
24522
|
e.preventDefault();
|
|
24523
24523
|
let n = e.inputType;
|
|
24524
24524
|
if (n.startsWith("format") || n === "historyUndo" || n === "historyRedo") return;
|
|
24525
|
-
B ?
|
|
24525
|
+
B ? q._record(!0) : _g();
|
|
24526
24526
|
let i = e.getTargetRanges()[0];
|
|
24527
24527
|
if (i) {
|
|
24528
|
-
let a = serializeRange(r,
|
|
24528
|
+
let a = serializeRange(r, K, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
24529
24529
|
if (o == null) {
|
|
24530
24530
|
let n = e.dataTransfer;
|
|
24531
24531
|
n && (o = n.getData("text/plain"));
|
|
24532
24532
|
}
|
|
24533
24533
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24534
24534
|
}
|
|
24535
|
-
B ||
|
|
24536
|
-
},
|
|
24537
|
-
B ||
|
|
24535
|
+
B || J();
|
|
24536
|
+
}, yg = () => {
|
|
24537
|
+
B || _g(), B = !0;
|
|
24538
24538
|
}, $ = () => {
|
|
24539
|
-
|
|
24540
|
-
},
|
|
24541
|
-
H = !0,
|
|
24542
|
-
},
|
|
24539
|
+
J();
|
|
24540
|
+
}, bg = () => {
|
|
24541
|
+
H = !0, _g();
|
|
24542
|
+
}, xg = () => {
|
|
24543
24543
|
H = !1;
|
|
24544
|
-
},
|
|
24544
|
+
}, Sg = () => {
|
|
24545
24545
|
if (L) {
|
|
24546
24546
|
L = !1;
|
|
24547
24547
|
return;
|
|
24548
24548
|
}
|
|
24549
|
-
H && !B && !
|
|
24550
|
-
},
|
|
24551
|
-
|
|
24552
|
-
},
|
|
24553
|
-
e.preventDefault(),
|
|
24554
|
-
},
|
|
24555
|
-
e.preventDefault(), m || (
|
|
24556
|
-
},
|
|
24549
|
+
H && !B && !gg && _g();
|
|
24550
|
+
}, Cg = (e) => {
|
|
24551
|
+
_g(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24552
|
+
}, wg = (e) => {
|
|
24553
|
+
e.preventDefault(), Cg(e.clipboardData);
|
|
24554
|
+
}, Tg = (e) => {
|
|
24555
|
+
e.preventDefault(), m || (Cg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24556
|
+
}, Eg = (e) => {
|
|
24557
24557
|
e.preventDefault();
|
|
24558
24558
|
let [n, r] = range(d);
|
|
24559
|
-
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData,
|
|
24560
|
-
},
|
|
24559
|
+
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, K)));
|
|
24560
|
+
}, Dg = (e) => {
|
|
24561
24561
|
e.preventDefault();
|
|
24562
|
-
let n = e.dataTransfer, i = getPointedCaretPosition(
|
|
24562
|
+
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, K);
|
|
24563
24563
|
if (n && i) {
|
|
24564
24564
|
let e = new Transaction();
|
|
24565
|
-
|
|
24565
|
+
gg && e.delete(...range(d));
|
|
24566
24566
|
let o = e.transform(i);
|
|
24567
|
-
e.select(o, o).insert(o, a(n,
|
|
24567
|
+
e.select(o, o).insert(o, a(n, K)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24568
24568
|
}
|
|
24569
|
-
},
|
|
24570
|
-
|
|
24571
|
-
},
|
|
24572
|
-
|
|
24569
|
+
}, Og = (e) => {
|
|
24570
|
+
gg = !0, Cg(e.dataTransfer);
|
|
24571
|
+
}, kg = () => {
|
|
24572
|
+
gg = !1;
|
|
24573
24573
|
};
|
|
24574
|
-
return
|
|
24575
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j,
|
|
24574
|
+
return G.addEventListener("selectionchange", Sg), r.addEventListener("keydown", Z), r.addEventListener("input", vg), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", yg), r.addEventListener("compositionend", $), r.addEventListener("focus", bg), r.addEventListener("blur", xg), r.addEventListener("copy", wg), r.addEventListener("cut", Tg), r.addEventListener("paste", Eg), r.addEventListener("drop", Dg), r.addEventListener("dragstart", Og), r.addEventListener("dragend", kg), () => {
|
|
24575
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, q._dispose(), G.removeEventListener("selectionchange", Sg), r.removeEventListener("keydown", Z), r.removeEventListener("input", vg), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", yg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", bg), r.removeEventListener("blur", xg), r.removeEventListener("copy", wg), r.removeEventListener("cut", Tg), r.removeEventListener("paste", Eg), r.removeEventListener("drop", Dg), r.removeEventListener("dragstart", Og), r.removeEventListener("dragend", kg));
|
|
24576
24576
|
};
|
|
24577
24577
|
},
|
|
24578
24578
|
command: (e, ...n) => {
|
|
@@ -24915,9 +24915,9 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24915
24915
|
set(e) {
|
|
24916
24916
|
l.value = e, n();
|
|
24917
24917
|
}
|
|
24918
|
-
})), m = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H,
|
|
24918
|
+
})), m = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, gg = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
|
|
24919
24919
|
setTimeout(() => {
|
|
24920
|
-
let e =
|
|
24920
|
+
let e = vg();
|
|
24921
24921
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
24922
24922
|
left: e.coordinates?.left || 0,
|
|
24923
24923
|
top: e.coordinates?.top || 0,
|
|
@@ -24925,12 +24925,12 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24925
24925
|
height: 0
|
|
24926
24926
|
}) }), a.value?.show()) : a.value?.hide();
|
|
24927
24927
|
}, 16);
|
|
24928
|
-
},
|
|
24928
|
+
}, J = (e) => {
|
|
24929
24929
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
24930
|
-
e.key === "@" && (m.value = "slash",
|
|
24931
|
-
},
|
|
24930
|
+
e.key === "@" && (m.value = "slash", q()), e.key === "/" && (m.value = "prompt", q());
|
|
24931
|
+
}, Z = () => {
|
|
24932
24932
|
j.value = "";
|
|
24933
|
-
},
|
|
24933
|
+
}, vg = () => {
|
|
24934
24934
|
let e = {
|
|
24935
24935
|
isActive: !1,
|
|
24936
24936
|
query: "",
|
|
@@ -24960,27 +24960,27 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24960
24960
|
} catch {
|
|
24961
24961
|
return e;
|
|
24962
24962
|
}
|
|
24963
|
-
},
|
|
24964
|
-
z.value.push(e), B.command(
|
|
24965
|
-
let { column: n, line: r } =
|
|
24966
|
-
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(),
|
|
24967
|
-
},
|
|
24963
|
+
}, yg = (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), xg = (e) => {
|
|
24964
|
+
z.value.push(e), B.command(K);
|
|
24965
|
+
let { column: n, line: r } = G.value;
|
|
24966
|
+
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(), Sg();
|
|
24967
|
+
}, Sg = () => {
|
|
24968
24968
|
setTimeout(() => {
|
|
24969
24969
|
let e = window.getSelection(), n = document.createRange();
|
|
24970
24970
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
24971
24971
|
}, 100);
|
|
24972
|
-
},
|
|
24973
|
-
B.command(ReplaceAll, e),
|
|
24972
|
+
}, Cg = (e) => {
|
|
24973
|
+
B.command(ReplaceAll, e), Sg();
|
|
24974
24974
|
};
|
|
24975
24975
|
watchEffect(() => {
|
|
24976
24976
|
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();
|
|
24977
24977
|
});
|
|
24978
|
-
let
|
|
24978
|
+
let wg = (e, n, r, i) => {
|
|
24979
24979
|
if (n.type === "tag") {
|
|
24980
|
-
let n =
|
|
24980
|
+
let n = yg(e, r);
|
|
24981
24981
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
24982
24982
|
}
|
|
24983
|
-
},
|
|
24983
|
+
}, Eg = (e) => {
|
|
24984
24984
|
let n = e.clipboardData?.items;
|
|
24985
24985
|
if (!n) return;
|
|
24986
24986
|
let r = [];
|
|
@@ -24989,25 +24989,25 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
24989
24989
|
n && r.push(n);
|
|
24990
24990
|
}
|
|
24991
24991
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
24992
|
-
},
|
|
24992
|
+
}, Dg = () => {
|
|
24993
24993
|
H?.(), B = createEditor({
|
|
24994
24994
|
doc: d.value,
|
|
24995
24995
|
schema: tagSchema,
|
|
24996
24996
|
onChange: async (e) => {
|
|
24997
|
-
d.value = e,
|
|
24997
|
+
d.value = e, q();
|
|
24998
24998
|
},
|
|
24999
|
-
onKeyDown: (e) =>
|
|
24999
|
+
onKeyDown: (e) => J(e)
|
|
25000
25000
|
}), H = B.input(i.value);
|
|
25001
|
-
},
|
|
25001
|
+
}, Ag = () => m.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
25002
25002
|
return onMounted(() => {
|
|
25003
|
-
|
|
25003
|
+
Dg(), i.value?.addEventListener("paste", Eg);
|
|
25004
25004
|
}), onUnmounted(() => {
|
|
25005
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
25005
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Eg);
|
|
25006
25006
|
}), n({
|
|
25007
25007
|
cleanup: () => {
|
|
25008
25008
|
B.command(ReplaceAll, "");
|
|
25009
25009
|
},
|
|
25010
|
-
focus:
|
|
25010
|
+
focus: Sg
|
|
25011
25011
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createElementVNode("div", {
|
|
25012
25012
|
ref_key: "editorRef",
|
|
25013
25013
|
ref: i,
|
|
@@ -25021,11 +25021,11 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25021
25021
|
"data-tag-type": r.data.type
|
|
25022
25022
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25023
25023
|
class: "mention-tag-remove-icon",
|
|
25024
|
-
onClick: (a) =>
|
|
25024
|
+
onClick: (a) => wg(e, r, i, n)
|
|
25025
25025
|
}, 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), {
|
|
25026
25026
|
ref_key: "tippyRef",
|
|
25027
25027
|
ref: a,
|
|
25028
|
-
"append-to": unref(
|
|
25028
|
+
"append-to": unref(gg),
|
|
25029
25029
|
arrow: !1,
|
|
25030
25030
|
"hide-on-click": !0,
|
|
25031
25031
|
interactive: !0,
|
|
@@ -25035,16 +25035,16 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25035
25035
|
trigger: "manual",
|
|
25036
25036
|
"trigger-target": i.value,
|
|
25037
25037
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25038
|
-
onHidden:
|
|
25039
|
-
onShow:
|
|
25038
|
+
onHidden: Z,
|
|
25039
|
+
onShow: Ag
|
|
25040
25040
|
}, {
|
|
25041
25041
|
content: withCtx(() => [m.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25042
25042
|
key: 0,
|
|
25043
|
-
"on-select":
|
|
25043
|
+
"on-select": xg,
|
|
25044
25044
|
"resource-list": I.value
|
|
25045
25045
|
}, null, 8, ["resource-list"])) : m.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25046
25046
|
key: 1,
|
|
25047
|
-
"on-select":
|
|
25047
|
+
"on-select": Cg,
|
|
25048
25048
|
prompts: L.value
|
|
25049
25049
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25050
25050
|
_: 1
|
|
@@ -25145,13 +25145,13 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25145
25145
|
} catch (e) {
|
|
25146
25146
|
console.error(e);
|
|
25147
25147
|
}
|
|
25148
|
-
},
|
|
25148
|
+
}, gg = () => {
|
|
25149
25149
|
s.value = "";
|
|
25150
|
-
},
|
|
25150
|
+
}, G = (e) => {
|
|
25151
25151
|
m("selectShortcut", e);
|
|
25152
|
-
},
|
|
25152
|
+
}, K = () => {
|
|
25153
25153
|
m("deleteShortcut");
|
|
25154
|
-
},
|
|
25154
|
+
}, q = async (e) => {
|
|
25155
25155
|
if (L.value) for (let n of e) {
|
|
25156
25156
|
if (E.value.find((e) => e.file?.name === n.name)) continue;
|
|
25157
25157
|
let e = {
|
|
@@ -25164,7 +25164,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25164
25164
|
e.status = UploadStatus.Error;
|
|
25165
25165
|
});
|
|
25166
25166
|
}
|
|
25167
|
-
},
|
|
25167
|
+
}, _g = (e) => {
|
|
25168
25168
|
E.value = E.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
|
|
25169
25169
|
};
|
|
25170
25170
|
return n({
|
|
@@ -25180,7 +25180,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25180
25180
|
key: 0,
|
|
25181
25181
|
class: "chat-input-cite",
|
|
25182
25182
|
content: s.value,
|
|
25183
|
-
onClose:
|
|
25183
|
+
onClose: gg
|
|
25184
25184
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25185
25185
|
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: E.value })), () => [E.value.length ? (openBlock(), createElementBlock("div", {
|
|
25186
25186
|
key: 0,
|
|
@@ -25189,7 +25189,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25189
25189
|
class: "chat-input-files"
|
|
25190
25190
|
}, [createVNode(file_content_default, {
|
|
25191
25191
|
files: E.value,
|
|
25192
|
-
onDeleteFile:
|
|
25192
|
+
onDeleteFile: _g
|
|
25193
25193
|
}, null, 8, ["files"])], 512)) : createCommentVNode("v-if", !0)]),
|
|
25194
25194
|
createVNode(ai_slash_input_default, {
|
|
25195
25195
|
ref_key: "aiSlashInputRef",
|
|
@@ -25200,7 +25200,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25200
25200
|
prompts: e.prompts,
|
|
25201
25201
|
resources: e.resources,
|
|
25202
25202
|
onKeydown: B,
|
|
25203
|
-
onUpload:
|
|
25203
|
+
onUpload: q
|
|
25204
25204
|
}, null, 8, [
|
|
25205
25205
|
"modelValue",
|
|
25206
25206
|
"placeholder",
|
|
@@ -25215,19 +25215,19 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25215
25215
|
default: withCtx(() => [
|
|
25216
25216
|
L.value ? (openBlock(), createBlock(file_upload_btn_default, {
|
|
25217
25217
|
key: 0,
|
|
25218
|
-
onUpload:
|
|
25218
|
+
onUpload: q
|
|
25219
25219
|
})) : createCommentVNode("v-if", !0),
|
|
25220
25220
|
L.value && (e.shortcuts?.length || k.value) ? (openBlock(), createElementBlock("span", _hoisted_2$17)) : createCommentVNode("v-if", !0),
|
|
25221
25221
|
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !k.value ? (openBlock(), createBlock(shortcut_btns_default, {
|
|
25222
25222
|
key: 0,
|
|
25223
25223
|
shortcuts: e.shortcuts,
|
|
25224
|
-
onSelectShortcut:
|
|
25224
|
+
onSelectShortcut: G
|
|
25225
25225
|
}, null, 8, ["shortcuts"])) : createCommentVNode("v-if", !0), k.value ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
25226
25226
|
key: 1,
|
|
25227
25227
|
class: "selected-shortcut-btn",
|
|
25228
25228
|
shortcut: k.value
|
|
25229
25229
|
}, {
|
|
25230
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25230
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: K })]),
|
|
25231
25231
|
_: 1
|
|
25232
25232
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25233
25233
|
]),
|
|
@@ -25361,10 +25361,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25361
25361
|
theme: "ai-chat-box-light light",
|
|
25362
25362
|
trigger: "click",
|
|
25363
25363
|
appendTo: () => document.body,
|
|
25364
|
-
...r.tippyOptions || {}
|
|
25365
|
-
onShow: () => {
|
|
25366
|
-
if (r.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
|
|
25367
|
-
}
|
|
25364
|
+
...r.tippyOptions || {}
|
|
25368
25365
|
})), E = async (e) => {
|
|
25369
25366
|
if (e.id === "like" || e.id === "unlike") {
|
|
25370
25367
|
try {
|
|
@@ -25380,6 +25377,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25380
25377
|
}, j = (e) => u.value ? u.value === "like" && e === "like" ? "activeLike" : u.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, I = (e, n, r) => {
|
|
25381
25378
|
k(), u.value === e.id ? u.value = null : u.value = e.id, i("feedback", e, n, r);
|
|
25382
25379
|
}, L = (e) => {
|
|
25380
|
+
if (r.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
|
|
25383
25381
|
if (u.value && u.value === e) return u.value = null, !1;
|
|
25384
25382
|
};
|
|
25385
25383
|
return onUnmounted(() => {
|
|
@@ -25755,7 +25753,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25755
25753
|
i.value = !1;
|
|
25756
25754
|
}, H = async (e) => {
|
|
25757
25755
|
n.onShortcutConfirm?.(e), i.value = !1;
|
|
25758
|
-
},
|
|
25756
|
+
}, gg = async (e, r) => {
|
|
25759
25757
|
n.onInputConfirm?.(e, r), i.value = !1;
|
|
25760
25758
|
};
|
|
25761
25759
|
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
@@ -25777,7 +25775,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
|
|
|
25777
25775
|
"onUpdate:modelValue": r[0] ||= (e) => a.value = e,
|
|
25778
25776
|
class: "user-edit-input",
|
|
25779
25777
|
"default-upload-files": k.value,
|
|
25780
|
-
"on-send-message":
|
|
25778
|
+
"on-send-message": gg
|
|
25781
25779
|
}, {
|
|
25782
25780
|
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_3$6, [createVNode(unref(Button), {
|
|
25783
25781
|
size: "small",
|
|
@@ -26026,6 +26024,20 @@ const normalizeUrl = (e) => {
|
|
|
26026
26024
|
return console.warn("Failed to normalize URL:", n), ensureTrailingSlash(e);
|
|
26027
26025
|
}
|
|
26028
26026
|
};
|
|
26027
|
+
async function copyToClipboard(e) {
|
|
26028
|
+
if (typeof navigator < "u" && "clipboard" in navigator) try {
|
|
26029
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
26030
|
+
} catch {}
|
|
26031
|
+
let n = document.createElement("textarea");
|
|
26032
|
+
n.value = e, n.style.position = "fixed", n.style.left = "-9999px", n.style.top = "-9999px", n.style.opacity = "0", document.body.appendChild(n), n.focus(), n.select();
|
|
26033
|
+
try {
|
|
26034
|
+
return document.execCommand("copy");
|
|
26035
|
+
} catch {
|
|
26036
|
+
return !1;
|
|
26037
|
+
} finally {
|
|
26038
|
+
document.body.removeChild(n);
|
|
26039
|
+
}
|
|
26040
|
+
}
|
|
26029
26041
|
function getPlatform() {
|
|
26030
26042
|
let e = window.navigator.userAgent.toLowerCase(), n = window.navigator.platform.toLowerCase();
|
|
26031
26043
|
return n.includes("mac") || e.includes("mac") ? "mac" : n.includes("win") || e.includes("win") ? "windows" : n.includes("linux") || e.includes("linux") ? "linux" : "unknown";
|
|
@@ -26468,7 +26480,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26468
26480
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
26469
26481
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
26470
26482
|
}));
|
|
26471
|
-
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")),
|
|
26483
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), gg = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), q = (e) => K.value ? e : t("暂无使用权限"), J = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), yg = computed(() => {
|
|
26472
26484
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
26473
26485
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
26474
26486
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -26500,18 +26512,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26500
26512
|
});
|
|
26501
26513
|
}
|
|
26502
26514
|
a("new-chat");
|
|
26503
|
-
},
|
|
26515
|
+
}, xg = (e) => {
|
|
26504
26516
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26505
|
-
},
|
|
26517
|
+
}, Sg = () => {
|
|
26506
26518
|
a("help-click");
|
|
26507
|
-
},
|
|
26519
|
+
}, wg = (e) => {
|
|
26508
26520
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26509
|
-
},
|
|
26521
|
+
}, Tg = (e) => {
|
|
26510
26522
|
e.stopPropagation(), e.preventDefault();
|
|
26511
26523
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26512
26524
|
if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
|
|
26513
26525
|
case "rename":
|
|
26514
|
-
|
|
26526
|
+
Eg();
|
|
26515
26527
|
break;
|
|
26516
26528
|
case "auto-generate":
|
|
26517
26529
|
a("auto-generate-name");
|
|
@@ -26520,9 +26532,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26520
26532
|
a("share");
|
|
26521
26533
|
break;
|
|
26522
26534
|
}
|
|
26523
|
-
},
|
|
26524
|
-
document.removeEventListener("click",
|
|
26525
|
-
document.addEventListener("click",
|
|
26535
|
+
}, Eg = () => {
|
|
26536
|
+
document.removeEventListener("click", Mg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26537
|
+
document.addEventListener("click", Mg);
|
|
26526
26538
|
}, 100), setTimeout(() => {
|
|
26527
26539
|
if (I.value) try {
|
|
26528
26540
|
let e = I.value;
|
|
@@ -26533,26 +26545,26 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26533
26545
|
console.warn("Failed to focus rename input:", e);
|
|
26534
26546
|
}
|
|
26535
26547
|
}, 100);
|
|
26536
|
-
},
|
|
26548
|
+
}, Dg = () => {
|
|
26537
26549
|
let e = j.value.trim();
|
|
26538
26550
|
if (!e) {
|
|
26539
|
-
|
|
26551
|
+
Og();
|
|
26540
26552
|
return;
|
|
26541
26553
|
}
|
|
26542
26554
|
a("rename", e), k.value = !1, j.value = "";
|
|
26543
|
-
},
|
|
26555
|
+
}, Og = () => {
|
|
26544
26556
|
k.value = !1, j.value = "";
|
|
26545
|
-
},
|
|
26546
|
-
j.value = e, n.key === "Enter" ?
|
|
26547
|
-
},
|
|
26557
|
+
}, Ag = (e, n) => {
|
|
26558
|
+
j.value = e, n.key === "Enter" ? Dg() : n.key === "Escape" && Og();
|
|
26559
|
+
}, Mg = (e) => {
|
|
26548
26560
|
if (!k.value) return;
|
|
26549
26561
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26550
|
-
r && !r.contains(n) &&
|
|
26551
|
-
},
|
|
26562
|
+
r && !r.contains(n) && Og();
|
|
26563
|
+
}, Ng = async () => {
|
|
26552
26564
|
if (!u.value) return;
|
|
26553
26565
|
let e = (await import("tippy.js")).default;
|
|
26554
26566
|
L &&= (L.destroy(), null), L = e(u.value, {
|
|
26555
|
-
content:
|
|
26567
|
+
content: yg.value,
|
|
26556
26568
|
theme: "ai-blueking-light more-menu-light light",
|
|
26557
26569
|
placement: "bottom-start",
|
|
26558
26570
|
trigger: "manual",
|
|
@@ -26564,23 +26576,23 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26564
26576
|
onShow: () => {
|
|
26565
26577
|
setTimeout(() => {
|
|
26566
26578
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26567
|
-
e.addEventListener("click",
|
|
26579
|
+
e.addEventListener("click", Tg);
|
|
26568
26580
|
});
|
|
26569
26581
|
}, 0);
|
|
26570
26582
|
},
|
|
26571
26583
|
onHide: () => {
|
|
26572
26584
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26573
|
-
e.removeEventListener("click",
|
|
26585
|
+
e.removeEventListener("click", Tg);
|
|
26574
26586
|
});
|
|
26575
26587
|
}
|
|
26576
26588
|
});
|
|
26577
26589
|
};
|
|
26578
26590
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26579
|
-
L && L.setContent(
|
|
26591
|
+
L && L.setContent(yg.value);
|
|
26580
26592
|
}), onMounted(() => {
|
|
26581
|
-
|
|
26593
|
+
Ng(), i.sessionBusinessManager && B(), document.addEventListener("click", Mg);
|
|
26582
26594
|
}), onBeforeUnmount(() => {
|
|
26583
|
-
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click",
|
|
26595
|
+
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Mg);
|
|
26584
26596
|
}), n({
|
|
26585
26597
|
headerRef: s,
|
|
26586
26598
|
historyIconRef: l
|
|
@@ -26603,21 +26615,21 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26603
26615
|
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
26604
26616
|
class: "rename-input",
|
|
26605
26617
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26606
|
-
onKeyup:
|
|
26618
|
+
onKeyup: Ag
|
|
26607
26619
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26608
26620
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26609
|
-
onClick:
|
|
26621
|
+
onClick: Dg
|
|
26610
26622
|
}), createElementVNode("i", {
|
|
26611
26623
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26612
|
-
onClick:
|
|
26624
|
+
onClick: Og
|
|
26613
26625
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26614
26626
|
], 2),
|
|
26615
|
-
i.showMoreIcon &&
|
|
26627
|
+
i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
|
|
26616
26628
|
key: 0,
|
|
26617
26629
|
ref_key: "moreIconRef",
|
|
26618
26630
|
ref: u,
|
|
26619
26631
|
class: "bkai-icon bkai-more",
|
|
26620
|
-
onClick:
|
|
26632
|
+
onClick: wg
|
|
26621
26633
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26622
26634
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26623
26635
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26626,12 +26638,12 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26626
26638
|
class: normalizeClass([
|
|
26627
26639
|
"bkai-icon",
|
|
26628
26640
|
"bkai-xinzengliaotian",
|
|
26629
|
-
{ disabled: !
|
|
26641
|
+
{ disabled: !K.value }
|
|
26630
26642
|
]),
|
|
26631
|
-
style: normalizeStyle(
|
|
26632
|
-
onClick: r[1] ||= (e) =>
|
|
26643
|
+
style: normalizeStyle(J()),
|
|
26644
|
+
onClick: r[1] ||= (e) => K.value ? $() : void 0
|
|
26633
26645
|
}, null, 6)), [[unref(o), {
|
|
26634
|
-
content:
|
|
26646
|
+
content: q(unref(t)("新增会话")),
|
|
26635
26647
|
boundary: "parent"
|
|
26636
26648
|
}]]) : createCommentVNode("v-if", !0),
|
|
26637
26649
|
createCommentVNode(" 历史会话按钮 "),
|
|
@@ -26642,18 +26654,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26642
26654
|
class: normalizeClass([
|
|
26643
26655
|
"bkai-icon",
|
|
26644
26656
|
"bkai-history",
|
|
26645
|
-
{ disabled: !
|
|
26657
|
+
{ disabled: !K.value }
|
|
26646
26658
|
]),
|
|
26647
|
-
style: normalizeStyle(
|
|
26648
|
-
onClick: r[2] ||= (e) =>
|
|
26659
|
+
style: normalizeStyle(J()),
|
|
26660
|
+
onClick: r[2] ||= (e) => K.value ? xg(e) : void 0
|
|
26649
26661
|
}, null, 6)), [[unref(o), {
|
|
26650
|
-
content:
|
|
26662
|
+
content: q(unref(t)("历史会话")),
|
|
26651
26663
|
boundary: "parent"
|
|
26652
26664
|
}]]) : createCommentVNode("v-if", !0),
|
|
26653
26665
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26654
26666
|
key: 2,
|
|
26655
26667
|
class: "bkai-icon bkai-zhushou",
|
|
26656
|
-
onClick:
|
|
26668
|
+
onClick: Sg
|
|
26657
26669
|
}, null, 512)), [[unref(o), {
|
|
26658
26670
|
content: unref(t)("转人工"),
|
|
26659
26671
|
boundary: "parent"
|
|
@@ -26662,10 +26674,10 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26662
26674
|
key: 3,
|
|
26663
26675
|
ref_key: "compressionRef",
|
|
26664
26676
|
ref: m,
|
|
26665
|
-
class: normalizeClass(["bkai-icon",
|
|
26677
|
+
class: normalizeClass(["bkai-icon", gg.value]),
|
|
26666
26678
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
26667
26679
|
}, null, 2)), [[unref(o), {
|
|
26668
|
-
content:
|
|
26680
|
+
content: G.value,
|
|
26669
26681
|
boundary: "parent"
|
|
26670
26682
|
}]]) : createCommentVNode("v-if", !0),
|
|
26671
26683
|
withDirectives(createElementVNode("i", {
|
|
@@ -26964,6 +26976,23 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26964
26976
|
}), e;
|
|
26965
26977
|
}
|
|
26966
26978
|
}
|
|
26979
|
+
}, ShareBusinessManager = class {
|
|
26980
|
+
messageModule;
|
|
26981
|
+
sessionModule;
|
|
26982
|
+
constructor(e, n) {
|
|
26983
|
+
this.messageModule = e, this.sessionModule = n;
|
|
26984
|
+
}
|
|
26985
|
+
async shareMessages(e) {
|
|
26986
|
+
if (e.length === 0) throw Error("No messages to share");
|
|
26987
|
+
let n = this.sessionModule.current?.value?.sessionCode;
|
|
26988
|
+
if (!n) throw Error("No active session");
|
|
26989
|
+
let r = await this.messageModule.shareMessages(n, e);
|
|
26990
|
+
if (!r) throw Error("Share failed: no result returned");
|
|
26991
|
+
return {
|
|
26992
|
+
shareUrl: `${r.share_page}share-page/${r.share_token}`,
|
|
26993
|
+
userMessageIds: e.filter((e) => e.role === "user").map((e) => String(e.id))
|
|
26994
|
+
};
|
|
26995
|
+
}
|
|
26967
26996
|
}, ShortcutManager = class {
|
|
26968
26997
|
_agentShortcuts;
|
|
26969
26998
|
_effectiveShortcuts;
|
|
@@ -27445,7 +27474,6 @@ var UIStateManager = class {
|
|
|
27445
27474
|
height: {},
|
|
27446
27475
|
helloText: {},
|
|
27447
27476
|
maxWidth: {},
|
|
27448
|
-
messageTools: { default: void 0 },
|
|
27449
27477
|
placeholder: {},
|
|
27450
27478
|
prompts: {},
|
|
27451
27479
|
requestOptions: {},
|
|
@@ -27456,16 +27484,7 @@ var UIStateManager = class {
|
|
|
27456
27484
|
},
|
|
27457
27485
|
shortcutLimit: { default: 10 },
|
|
27458
27486
|
shortcuts: { default: () => [] },
|
|
27459
|
-
|
|
27460
|
-
type: Boolean,
|
|
27461
|
-
default: !0
|
|
27462
|
-
},
|
|
27463
|
-
updateTools: { default: void 0 },
|
|
27464
|
-
url: { default: "" },
|
|
27465
|
-
onToolAction: {
|
|
27466
|
-
type: Function,
|
|
27467
|
-
default: void 0
|
|
27468
|
-
}
|
|
27487
|
+
url: { default: "" }
|
|
27469
27488
|
},
|
|
27470
27489
|
emits: [
|
|
27471
27490
|
"agent-info-loaded",
|
|
@@ -27478,53 +27497,54 @@ var UIStateManager = class {
|
|
|
27478
27497
|
"receive-text",
|
|
27479
27498
|
"request-share",
|
|
27480
27499
|
"send-message",
|
|
27481
|
-
"session-deleted",
|
|
27482
27500
|
"session-switched",
|
|
27483
27501
|
"shortcut-click",
|
|
27484
|
-
"stop"
|
|
27485
|
-
"tool-action"
|
|
27502
|
+
"stop"
|
|
27486
27503
|
],
|
|
27487
27504
|
setup(e, { expose: n, emit: r }) {
|
|
27488
|
-
let i = e, a = r, s = ref(), l = ref(), u = ref(null), m = shallowRef([]), E = ref(!1), k = ref(null), j =
|
|
27489
|
-
onStart: () => {
|
|
27490
|
-
a("receive-start");
|
|
27491
|
-
},
|
|
27492
|
-
onMessage: (e) => {
|
|
27493
|
-
a("receive-text");
|
|
27494
|
-
},
|
|
27495
|
-
onDone: () => {
|
|
27496
|
-
a("receive-end"), Ug();
|
|
27497
|
-
},
|
|
27498
|
-
onError: (e) => {
|
|
27499
|
-
a("error", e);
|
|
27500
|
-
}
|
|
27501
|
-
}), I = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
|
|
27505
|
+
let i = e, a = r, s = ref(), l = ref(), u = ref(null), m = shallowRef([]), E = ref(!1), k = ref(null), j = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
|
|
27502
27506
|
valid: !1,
|
|
27503
27507
|
error: "[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)"
|
|
27504
27508
|
} : { valid: !0 } : i.url ? { valid: !0 } : {
|
|
27505
27509
|
valid: !1,
|
|
27506
27510
|
error: "[ChatBot] Neither chatHelper nor url provided. Component requires at least one."
|
|
27507
|
-
},
|
|
27508
|
-
let e =
|
|
27509
|
-
|
|
27511
|
+
}, I = (() => {
|
|
27512
|
+
let e = j();
|
|
27513
|
+
if (!e.valid) return console.error(e.error), k.value = Error(e.error), null;
|
|
27514
|
+
if (i.chatHelper) return i.chatHelper;
|
|
27515
|
+
let n = new AGUIProtocol({
|
|
27516
|
+
onStart: () => {
|
|
27517
|
+
a("receive-start");
|
|
27518
|
+
},
|
|
27519
|
+
onMessage: (e) => {
|
|
27520
|
+
a("receive-text");
|
|
27521
|
+
},
|
|
27522
|
+
onDone: () => {
|
|
27523
|
+
a("receive-end"), Jg();
|
|
27524
|
+
},
|
|
27525
|
+
onError: (e) => {
|
|
27526
|
+
a("error", e);
|
|
27527
|
+
}
|
|
27528
|
+
}), r = useChatHelper({
|
|
27510
27529
|
requestData: {
|
|
27511
27530
|
urlPrefix: normalizeUrl(i.url),
|
|
27512
27531
|
headers: i.requestOptions?.headers,
|
|
27513
27532
|
data: i.requestOptions?.data
|
|
27514
27533
|
},
|
|
27515
|
-
protocol:
|
|
27516
|
-
})
|
|
27517
|
-
|
|
27534
|
+
protocol: n
|
|
27535
|
+
});
|
|
27536
|
+
return n.injectMessageModule(r.message), r;
|
|
27537
|
+
})(), L = computed(() => ((i.chatHelper || I)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), z = computed(() => L.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), B = async (e, n) => {
|
|
27518
27538
|
if (e.id === "cite") {
|
|
27519
|
-
|
|
27539
|
+
Pg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), o_();
|
|
27520
27540
|
return;
|
|
27521
27541
|
}
|
|
27522
27542
|
if (e.id === "rebuild") {
|
|
27523
|
-
await
|
|
27543
|
+
await G(n);
|
|
27524
27544
|
return;
|
|
27525
27545
|
}
|
|
27526
27546
|
if (e.id === "delete") {
|
|
27527
|
-
await
|
|
27547
|
+
await gg(n);
|
|
27528
27548
|
return;
|
|
27529
27549
|
}
|
|
27530
27550
|
if (e.id === "share") {
|
|
@@ -27534,30 +27554,30 @@ var UIStateManager = class {
|
|
|
27534
27554
|
if (e.id === "like" || e.id === "unlike") {
|
|
27535
27555
|
let n = e.id === "like" ? 5 : 0;
|
|
27536
27556
|
try {
|
|
27537
|
-
return await
|
|
27557
|
+
return await I?.session.getSessionFeedbackReasons(n) || [];
|
|
27538
27558
|
} catch (e) {
|
|
27539
27559
|
return console.error("[ChatBot] Failed to get feedback reasons:", e), [];
|
|
27540
27560
|
}
|
|
27541
27561
|
}
|
|
27542
27562
|
console.log("handleAgentAction", e, n);
|
|
27543
|
-
},
|
|
27544
|
-
if (!
|
|
27563
|
+
}, H = async (e, n, r, i) => {
|
|
27564
|
+
if (!I) {
|
|
27545
27565
|
console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
|
|
27546
27566
|
return;
|
|
27547
27567
|
}
|
|
27548
|
-
let o =
|
|
27568
|
+
let o = I.session.current?.value?.sessionCode;
|
|
27549
27569
|
if (!o) {
|
|
27550
27570
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27551
27571
|
return;
|
|
27552
27572
|
}
|
|
27553
|
-
let s = findLastUserMessageIdBefore(
|
|
27573
|
+
let s = findLastUserMessageIdBefore(Ag?.messages.value || [], n[0]);
|
|
27554
27574
|
if (s === void 0) {
|
|
27555
27575
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27556
27576
|
return;
|
|
27557
27577
|
}
|
|
27558
27578
|
let l = e.id === "like" ? 5 : 0;
|
|
27559
27579
|
try {
|
|
27560
|
-
await
|
|
27580
|
+
await I.session.postSessionFeedback({
|
|
27561
27581
|
sessionCode: o,
|
|
27562
27582
|
sessionContentIds: [s],
|
|
27563
27583
|
rate: l,
|
|
@@ -27567,53 +27587,53 @@ var UIStateManager = class {
|
|
|
27567
27587
|
} catch (e) {
|
|
27568
27588
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27569
27589
|
}
|
|
27570
|
-
},
|
|
27571
|
-
if (!
|
|
27590
|
+
}, gg = async (e) => {
|
|
27591
|
+
if (!Ag || !I) {
|
|
27572
27592
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27573
27593
|
return;
|
|
27574
27594
|
}
|
|
27575
27595
|
try {
|
|
27576
|
-
let n =
|
|
27596
|
+
let n = Ag.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27577
27597
|
if (!r) {
|
|
27578
27598
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27579
27599
|
return;
|
|
27580
27600
|
}
|
|
27581
27601
|
let i = [r, ...e];
|
|
27582
|
-
await
|
|
27602
|
+
await I.message.deleteMessages(i);
|
|
27583
27603
|
} catch (e) {
|
|
27584
27604
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27585
27605
|
}
|
|
27586
|
-
},
|
|
27587
|
-
if (!
|
|
27606
|
+
}, G = async (e) => {
|
|
27607
|
+
if (!Ag || !I) {
|
|
27588
27608
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27589
27609
|
return;
|
|
27590
27610
|
}
|
|
27591
|
-
let n =
|
|
27611
|
+
let n = I.session.current?.value?.sessionCode;
|
|
27592
27612
|
if (!n) {
|
|
27593
27613
|
console.error("[ChatBot] Cannot regenerate: no active session");
|
|
27594
27614
|
return;
|
|
27595
27615
|
}
|
|
27596
27616
|
try {
|
|
27597
|
-
await
|
|
27617
|
+
await Ag.regenerateFromAIMessages(e, n), Jg();
|
|
27598
27618
|
} catch (e) {
|
|
27599
27619
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27600
27620
|
}
|
|
27601
|
-
},
|
|
27621
|
+
}, J = async (e, n) => {
|
|
27602
27622
|
if (e.id === "delete") {
|
|
27603
|
-
await
|
|
27623
|
+
await Sg(n);
|
|
27604
27624
|
return;
|
|
27605
27625
|
}
|
|
27606
27626
|
if (e.id === "cite") {
|
|
27607
|
-
|
|
27627
|
+
Pg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), o_();
|
|
27608
27628
|
return;
|
|
27609
27629
|
}
|
|
27610
27630
|
console.log("handleUserAction", e, n);
|
|
27611
|
-
},
|
|
27612
|
-
if (!
|
|
27631
|
+
}, yg = async (e, n, r) => {
|
|
27632
|
+
if (!I) {
|
|
27613
27633
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27614
27634
|
return;
|
|
27615
27635
|
}
|
|
27616
|
-
let i =
|
|
27636
|
+
let i = I.session.current?.value?.sessionCode;
|
|
27617
27637
|
if (!i) {
|
|
27618
27638
|
console.error("[ChatBot] Cannot edit message: no active session");
|
|
27619
27639
|
return;
|
|
@@ -27631,16 +27651,16 @@ var UIStateManager = class {
|
|
|
27631
27651
|
console.error("[ChatBot] Cannot edit message: invalid content type");
|
|
27632
27652
|
return;
|
|
27633
27653
|
}
|
|
27634
|
-
await
|
|
27654
|
+
await I.agent.resendMessage(String(o), i, e), Jg();
|
|
27635
27655
|
} catch (e) {
|
|
27636
27656
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27637
27657
|
}
|
|
27638
|
-
},
|
|
27639
|
-
if (!
|
|
27658
|
+
}, $ = async (e, n) => {
|
|
27659
|
+
if (!Ag || !I) {
|
|
27640
27660
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27641
27661
|
return;
|
|
27642
27662
|
}
|
|
27643
|
-
let r =
|
|
27663
|
+
let r = I.session.current?.value?.sessionCode;
|
|
27644
27664
|
if (!r) {
|
|
27645
27665
|
console.error("[ChatBot] Cannot edit shortcut message: no active session");
|
|
27646
27666
|
return;
|
|
@@ -27651,26 +27671,26 @@ var UIStateManager = class {
|
|
|
27651
27671
|
return;
|
|
27652
27672
|
}
|
|
27653
27673
|
try {
|
|
27654
|
-
let a =
|
|
27674
|
+
let a = xg(e);
|
|
27655
27675
|
if (!a) {
|
|
27656
27676
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27657
27677
|
return;
|
|
27658
27678
|
}
|
|
27659
|
-
let o =
|
|
27660
|
-
await
|
|
27679
|
+
let o = t_(a, n), s = String(n.input ?? "");
|
|
27680
|
+
await Ag.resendMessageWithProperty(String(i), r, s, o), Jg();
|
|
27661
27681
|
} catch (e) {
|
|
27662
27682
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27663
27683
|
}
|
|
27664
|
-
},
|
|
27684
|
+
}, xg = (e) => {
|
|
27665
27685
|
let n = e.property?.extra;
|
|
27666
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27667
|
-
},
|
|
27668
|
-
if (!
|
|
27686
|
+
return n?.shortcut ? n.shortcut : n?.command ? qg.value.find((e) => e.id === n.command) ?? null : null;
|
|
27687
|
+
}, Sg = async (e) => {
|
|
27688
|
+
if (!Ag || !I) {
|
|
27669
27689
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27670
27690
|
return;
|
|
27671
27691
|
}
|
|
27672
27692
|
try {
|
|
27673
|
-
let n =
|
|
27693
|
+
let n = Ag.messages.value, r = n.findIndex((n) => n === e);
|
|
27674
27694
|
if (r === -1) {
|
|
27675
27695
|
console.error("[ChatBot] User message not found in messages list");
|
|
27676
27696
|
return;
|
|
@@ -27682,63 +27702,61 @@ var UIStateManager = class {
|
|
|
27682
27702
|
i.push(r);
|
|
27683
27703
|
}
|
|
27684
27704
|
let a = [e, ...i];
|
|
27685
|
-
await
|
|
27705
|
+
await I.message.deleteMessages(a);
|
|
27686
27706
|
} catch (e) {
|
|
27687
27707
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27688
27708
|
}
|
|
27689
|
-
},
|
|
27690
|
-
((i.chatHelper ||
|
|
27691
|
-
},
|
|
27692
|
-
xg && L && j.injectMessageModule(L.message);
|
|
27693
|
-
let wg = L ? new SessionBusinessManager(L.session, L.message, null, {
|
|
27709
|
+
}, wg = async () => {
|
|
27710
|
+
((i.chatHelper || I)?.agent)?.stopChat?.();
|
|
27711
|
+
}, Tg = !i.chatHelper, Dg = I ? new SessionBusinessManager(I.session, I.message, null, {
|
|
27694
27712
|
enableChatSession: !0,
|
|
27695
27713
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27696
27714
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27697
27715
|
initialSessionCode: i.sessionCode
|
|
27698
|
-
}) : null,
|
|
27716
|
+
}) : null, Ag = I ? new ChatBusinessManager(I.agent, I.message, I.session, null, {
|
|
27699
27717
|
openingRemark: i.helloText,
|
|
27700
27718
|
predefinedQuestions: i.prompts,
|
|
27701
27719
|
placeholder: i.placeholder
|
|
27702
|
-
}) : null,
|
|
27720
|
+
}) : null, Mg = new ShortcutManager(null, i.shortcuts || []), Ng = shallowRef([[]]), Pg = ref(""), Fg = computed(() => Ag?.messages.value ?? []), Ig = computed(() => Ag?.isMessagesLoading.value ?? !1), Rg = computed(() => Ag?.isGenerating.value ?? !1), zg = computed(() => Dg?.currentSession.value ?? null), Bg = computed(() => !Ig.value && Fg.value.length === 0), Vg = computed(() => I?.agent.info.value?.conversationSettings?.openingRemark || ""), Hg = computed(() => ({
|
|
27703
27721
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27704
27722
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27705
|
-
})),
|
|
27706
|
-
let e =
|
|
27723
|
+
})), Ug = computed(() => {
|
|
27724
|
+
let e = Mg.shortcuts.value;
|
|
27707
27725
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27708
|
-
}),
|
|
27726
|
+
}), Wg = () => {
|
|
27709
27727
|
m.value = [], a("cancel-share");
|
|
27710
|
-
},
|
|
27728
|
+
}, Gg = () => {
|
|
27711
27729
|
a("confirm-share", m.value);
|
|
27712
|
-
},
|
|
27713
|
-
e ? m.value =
|
|
27714
|
-
},
|
|
27730
|
+
}, Kg = (e) => {
|
|
27731
|
+
e ? m.value = Fg.value : m.value = [];
|
|
27732
|
+
}, qg = Mg.effectiveShortcuts;
|
|
27715
27733
|
watch(() => i.shortcuts, (e) => {
|
|
27716
|
-
|
|
27717
|
-
}, { immediate: !0 }), watch(() =>
|
|
27718
|
-
e &&
|
|
27734
|
+
Mg.setShortcuts(e || []);
|
|
27735
|
+
}, { immediate: !0 }), watch(() => I?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27736
|
+
e && Mg.setAgentShortcuts(e);
|
|
27719
27737
|
}, { immediate: !0 });
|
|
27720
|
-
let
|
|
27738
|
+
let Jg = async () => {
|
|
27721
27739
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27722
|
-
},
|
|
27723
|
-
if (!
|
|
27724
|
-
let r =
|
|
27740
|
+
}, Yg = async (e, n = {}) => {
|
|
27741
|
+
if (!Ag || !I) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
27742
|
+
let r = I.session.current?.value.sessionCode;
|
|
27725
27743
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
27726
|
-
|
|
27727
|
-
},
|
|
27744
|
+
Ng.value = [[]], Pg.value = "", a("send-message", e), await Ag.sendMessage(e, r, n);
|
|
27745
|
+
}, Xg = async (e, n) => {
|
|
27728
27746
|
try {
|
|
27729
|
-
let n =
|
|
27730
|
-
typeof e == "string" && await
|
|
27747
|
+
let n = Pg.value ? { property: { extra: { cite: Pg.value } } } : {};
|
|
27748
|
+
typeof e == "string" && await Yg(e, n);
|
|
27731
27749
|
} catch (e) {
|
|
27732
27750
|
console.error("Failed to send message:", e), a("error", e);
|
|
27733
27751
|
}
|
|
27734
|
-
},
|
|
27735
|
-
|
|
27736
|
-
},
|
|
27737
|
-
|
|
27752
|
+
}, Zg = async () => {
|
|
27753
|
+
r_();
|
|
27754
|
+
}, Qg = (e, n) => {
|
|
27755
|
+
$g(e, n), a("shortcut-click", {
|
|
27738
27756
|
shortcut: e,
|
|
27739
27757
|
source: "main"
|
|
27740
27758
|
});
|
|
27741
|
-
},
|
|
27759
|
+
}, $g = (e, n) => {
|
|
27742
27760
|
let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
|
|
27743
27761
|
u.value = {
|
|
27744
27762
|
...r,
|
|
@@ -27747,9 +27765,9 @@ var UIStateManager = class {
|
|
|
27747
27765
|
[i]: n || ""
|
|
27748
27766
|
}
|
|
27749
27767
|
};
|
|
27750
|
-
},
|
|
27768
|
+
}, e_ = () => {
|
|
27751
27769
|
u.value = null;
|
|
27752
|
-
},
|
|
27770
|
+
}, t_ = (e, n) => {
|
|
27753
27771
|
let r = e.components || [];
|
|
27754
27772
|
return { extra: {
|
|
27755
27773
|
cite: {
|
|
@@ -27769,94 +27787,95 @@ var UIStateManager = class {
|
|
|
27769
27787
|
__value: n[e.key]
|
|
27770
27788
|
}))
|
|
27771
27789
|
} };
|
|
27772
|
-
},
|
|
27790
|
+
}, n_ = async (e) => {
|
|
27791
|
+
if (!u.value) {
|
|
27792
|
+
console.error("[ChatBot] No selected shortcut");
|
|
27793
|
+
return;
|
|
27794
|
+
}
|
|
27795
|
+
let n = t_(u.value, e), r = u.value.name, i = u.value;
|
|
27796
|
+
e_();
|
|
27773
27797
|
try {
|
|
27774
|
-
|
|
27775
|
-
console.error("[ChatBot] No selected shortcut");
|
|
27776
|
-
return;
|
|
27777
|
-
}
|
|
27778
|
-
let n = Xg(u.value, e);
|
|
27779
|
-
await Wg(String(e.input ?? ""), { property: n }), Yg();
|
|
27798
|
+
await Yg(r, { property: n });
|
|
27780
27799
|
} catch (e) {
|
|
27781
|
-
console.error("Failed to submit shortcut:", e), a("error", e);
|
|
27800
|
+
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
27782
27801
|
}
|
|
27783
|
-
},
|
|
27784
|
-
if (!
|
|
27802
|
+
}, r_ = () => {
|
|
27803
|
+
if (!Ag) {
|
|
27785
27804
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27786
27805
|
return;
|
|
27787
27806
|
}
|
|
27788
|
-
|
|
27789
|
-
},
|
|
27790
|
-
if (!
|
|
27807
|
+
Ag.stopGeneration(), a("stop");
|
|
27808
|
+
}, i_ = async (e) => {
|
|
27809
|
+
if (!Dg) {
|
|
27791
27810
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27792
27811
|
return;
|
|
27793
27812
|
}
|
|
27794
27813
|
try {
|
|
27795
|
-
await
|
|
27814
|
+
await Dg.switchSession(e), a("session-switched", Dg.currentSession.value);
|
|
27796
27815
|
} catch (e) {
|
|
27797
27816
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27798
27817
|
}
|
|
27799
|
-
},
|
|
27800
|
-
|
|
27801
|
-
},
|
|
27818
|
+
}, a_ = (e) => {
|
|
27819
|
+
Pg.value = e;
|
|
27820
|
+
}, o_ = () => {
|
|
27802
27821
|
l.value?.focus?.();
|
|
27803
27822
|
};
|
|
27804
27823
|
return onMounted(async () => {
|
|
27805
|
-
if (!(!
|
|
27806
|
-
if (
|
|
27807
|
-
if (await
|
|
27808
|
-
else if (
|
|
27809
|
-
let e =
|
|
27810
|
-
await
|
|
27824
|
+
if (!(!I || k.value)) try {
|
|
27825
|
+
if (Tg) {
|
|
27826
|
+
if (await I.agent.getAgentInfo(), await I.session.getSessions(), i.sessionCode) await I.session.chooseSession(i.sessionCode);
|
|
27827
|
+
else if (I.session.list.value.length > 0) {
|
|
27828
|
+
let e = I.session.list.value[0];
|
|
27829
|
+
await I.session.chooseSession(e.sessionCode);
|
|
27811
27830
|
}
|
|
27812
27831
|
E.value = !0;
|
|
27813
27832
|
} else E.value = !0;
|
|
27814
|
-
a("agent-info-loaded",
|
|
27833
|
+
a("agent-info-loaded", I);
|
|
27815
27834
|
} catch (e) {
|
|
27816
27835
|
console.error("Failed to initialize ChatBot:", e), k.value = e, a("error", e);
|
|
27817
27836
|
}
|
|
27818
27837
|
}), onBeforeUnmount(() => {
|
|
27819
|
-
|
|
27838
|
+
Tg && I && I.agent.stopChat();
|
|
27820
27839
|
}), n({
|
|
27821
|
-
sendMessage: (e) =>
|
|
27822
|
-
stopGeneration:
|
|
27823
|
-
switchSession:
|
|
27824
|
-
messages:
|
|
27825
|
-
currentSession:
|
|
27826
|
-
isGenerating:
|
|
27827
|
-
getChatHelper: () =>
|
|
27828
|
-
setCiteText:
|
|
27829
|
-
focusInput:
|
|
27840
|
+
sendMessage: (e) => Xg(e, [[]]),
|
|
27841
|
+
stopGeneration: r_,
|
|
27842
|
+
switchSession: i_,
|
|
27843
|
+
messages: Fg,
|
|
27844
|
+
currentSession: zg,
|
|
27845
|
+
isGenerating: Rg,
|
|
27846
|
+
getChatHelper: () => I,
|
|
27847
|
+
setCiteText: a_,
|
|
27848
|
+
focusInput: o_,
|
|
27830
27849
|
selectShortcut: (e, n) => {
|
|
27831
|
-
|
|
27850
|
+
$g(e, n);
|
|
27832
27851
|
}
|
|
27833
27852
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
27834
27853
|
class: normalizeClass([
|
|
27835
27854
|
"ai-chatbot",
|
|
27836
27855
|
i.extCls,
|
|
27837
|
-
{ "welcome-state":
|
|
27856
|
+
{ "welcome-state": Bg.value }
|
|
27838
27857
|
]),
|
|
27839
|
-
style: normalizeStyle(
|
|
27858
|
+
style: normalizeStyle(Hg.value)
|
|
27840
27859
|
}, [createCommentVNode(" 初始化错误提示 "), k.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(k.value.message), 1)])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
27841
27860
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
27842
|
-
|
|
27861
|
+
Bg.value ? (openBlock(), createElementBlock("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), Vg.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(content_render_default), { content: Vg.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
27843
27862
|
ref_key: "messagesContainerRef",
|
|
27844
27863
|
ref: s,
|
|
27845
27864
|
class: "chatbot-messages"
|
|
27846
|
-
}, [
|
|
27865
|
+
}, [Ig.value ? (openBlock(), createElementBlock("div", _hoisted_5, " 加载中... ")) : (openBlock(), createBlock(unref(message_container_default), {
|
|
27847
27866
|
key: 1,
|
|
27848
27867
|
"selected-messages": m.value,
|
|
27849
27868
|
"onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
|
|
27850
27869
|
"enable-selection": i.enableSelection,
|
|
27851
|
-
"message-status":
|
|
27852
|
-
"message-tools-status":
|
|
27853
|
-
messages:
|
|
27854
|
-
"on-agent-action":
|
|
27855
|
-
"on-agent-feedback":
|
|
27856
|
-
"on-user-action":
|
|
27857
|
-
"on-user-input-confirm":
|
|
27858
|
-
"on-user-shortcut-confirm":
|
|
27859
|
-
onStopStreaming:
|
|
27870
|
+
"message-status": L.value,
|
|
27871
|
+
"message-tools-status": z.value,
|
|
27872
|
+
messages: Fg.value,
|
|
27873
|
+
"on-agent-action": B,
|
|
27874
|
+
"on-agent-feedback": H,
|
|
27875
|
+
"on-user-action": J,
|
|
27876
|
+
"on-user-input-confirm": yg,
|
|
27877
|
+
"on-user-shortcut-confirm": $,
|
|
27878
|
+
onStopStreaming: wg
|
|
27860
27879
|
}, null, 8, [
|
|
27861
27880
|
"selected-messages",
|
|
27862
27881
|
"enable-selection",
|
|
@@ -27865,35 +27884,35 @@ var UIStateManager = class {
|
|
|
27865
27884
|
"messages"
|
|
27866
27885
|
]))], 512)], 2112)),
|
|
27867
27886
|
createCommentVNode(" 统一底部区域 "),
|
|
27868
|
-
!
|
|
27887
|
+
!Bg.value && i.enableSelection ? (openBlock(), createBlock(selection_footer_default, {
|
|
27869
27888
|
key: 2,
|
|
27870
|
-
"is-all-selected": m.value.length ===
|
|
27889
|
+
"is-all-selected": m.value.length === Fg.value.length,
|
|
27871
27890
|
loading: i.shareLoading,
|
|
27872
27891
|
"selected-count": m.value.length,
|
|
27873
|
-
onCancel:
|
|
27874
|
-
onConfirm:
|
|
27875
|
-
onToggleAll:
|
|
27892
|
+
onCancel: Wg,
|
|
27893
|
+
onConfirm: Gg,
|
|
27894
|
+
onToggleAll: Kg
|
|
27876
27895
|
}, null, 8, [
|
|
27877
27896
|
"is-all-selected",
|
|
27878
27897
|
"loading",
|
|
27879
27898
|
"selected-count"
|
|
27880
27899
|
])) : (openBlock(), createElementBlock("div", _hoisted_6, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
27881
|
-
onClose:
|
|
27882
|
-
onSubmit:
|
|
27900
|
+
onClose: e_,
|
|
27901
|
+
onSubmit: n_
|
|
27883
27902
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
27884
27903
|
ref_key: "chatInputRef",
|
|
27885
27904
|
ref: l,
|
|
27886
|
-
modelValue:
|
|
27887
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
27888
|
-
cite:
|
|
27889
|
-
"onUpdate:cite": n[2] ||= (e) =>
|
|
27890
|
-
"message-status":
|
|
27891
|
-
"on-send-message":
|
|
27892
|
-
"on-stop-sending":
|
|
27905
|
+
modelValue: Ng.value,
|
|
27906
|
+
"onUpdate:modelValue": n[1] ||= (e) => Ng.value = e,
|
|
27907
|
+
cite: Pg.value,
|
|
27908
|
+
"onUpdate:cite": n[2] ||= (e) => Pg.value = e,
|
|
27909
|
+
"message-status": L.value,
|
|
27910
|
+
"on-send-message": Xg,
|
|
27911
|
+
"on-stop-sending": Zg,
|
|
27893
27912
|
placeholder: i.placeholder,
|
|
27894
27913
|
"shortcut-id": u.value?.id,
|
|
27895
|
-
shortcuts:
|
|
27896
|
-
onSelectShortcut:
|
|
27914
|
+
shortcuts: Ug.value,
|
|
27915
|
+
onSelectShortcut: Qg
|
|
27897
27916
|
}, null, 8, [
|
|
27898
27917
|
"modelValue",
|
|
27899
27918
|
"cite",
|
|
@@ -28675,7 +28694,7 @@ function useDraggable(e = {}, n) {
|
|
|
28675
28694
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
28676
28695
|
}, H = (e, r, i, a) => {
|
|
28677
28696
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
28678
|
-
},
|
|
28697
|
+
}, gg = () => {
|
|
28679
28698
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
28680
28699
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
28681
28700
|
else {
|
|
@@ -28686,19 +28705,19 @@ function useDraggable(e = {}, n) {
|
|
|
28686
28705
|
}
|
|
28687
28706
|
T.value > O.value && (T.value = O.value);
|
|
28688
28707
|
});
|
|
28689
|
-
},
|
|
28708
|
+
}, G = () => {
|
|
28690
28709
|
k.value ? (_.value = d.value, nextTick(() => {
|
|
28691
28710
|
E.value = m.value, v.value = u.value, T.value = g.value;
|
|
28692
28711
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
28693
|
-
},
|
|
28712
|
+
}, K = (e, n) => {
|
|
28694
28713
|
v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
|
|
28695
|
-
},
|
|
28714
|
+
}, _g = (e, n) => {
|
|
28696
28715
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28697
28716
|
};
|
|
28698
28717
|
return onMounted(() => {
|
|
28699
|
-
window.addEventListener("resize",
|
|
28718
|
+
window.addEventListener("resize", gg);
|
|
28700
28719
|
}), onBeforeUnmount(() => {
|
|
28701
|
-
window.removeEventListener("resize",
|
|
28720
|
+
window.removeEventListener("resize", gg);
|
|
28702
28721
|
}), {
|
|
28703
28722
|
minWidth: i,
|
|
28704
28723
|
minHeight: a,
|
|
@@ -28712,11 +28731,11 @@ function useDraggable(e = {}, n) {
|
|
|
28712
28731
|
handleResizing: z,
|
|
28713
28732
|
handleDragStop: B,
|
|
28714
28733
|
handleResizeStop: H,
|
|
28715
|
-
toggleCompression:
|
|
28716
|
-
updatePosition:
|
|
28717
|
-
updateSize:
|
|
28734
|
+
toggleCompression: G,
|
|
28735
|
+
updatePosition: K,
|
|
28736
|
+
updateSize: _g,
|
|
28718
28737
|
updatePositionAndSize: (e, n, r, i) => {
|
|
28719
|
-
|
|
28738
|
+
K(e, n), _g(r, i);
|
|
28720
28739
|
}
|
|
28721
28740
|
};
|
|
28722
28741
|
}
|
|
@@ -28757,7 +28776,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28757
28776
|
"compression-change"
|
|
28758
28777
|
],
|
|
28759
28778
|
setup(e, { expose: n, emit: r }) {
|
|
28760
|
-
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: m, left: _, width: v, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize:
|
|
28779
|
+
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: m, left: _, width: v, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: gg } = useDraggable({
|
|
28761
28780
|
initWidth: i.defaultWidth,
|
|
28762
28781
|
minWidth: i.minWidth,
|
|
28763
28782
|
minHeight: i.minHeight,
|
|
@@ -28772,44 +28791,44 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28772
28791
|
onResizeStop: (e) => a("resize-stop", e),
|
|
28773
28792
|
onDragging: (e) => a("dragging", e),
|
|
28774
28793
|
onResizing: (e) => a("resizing", e)
|
|
28775
|
-
}),
|
|
28794
|
+
}), G = computed(() => {
|
|
28776
28795
|
let e = typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth ?? `${u.value}px`;
|
|
28777
28796
|
return { "--draggable-max-width": e };
|
|
28778
|
-
}),
|
|
28797
|
+
}), K = computed(() => ({
|
|
28779
28798
|
x: _.value,
|
|
28780
28799
|
y: m.value,
|
|
28781
28800
|
width: v.value,
|
|
28782
28801
|
height: E.value
|
|
28783
|
-
})),
|
|
28802
|
+
})), q = () => {
|
|
28784
28803
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
28785
28804
|
e.style.pointerEvents = "none";
|
|
28786
28805
|
});
|
|
28787
|
-
},
|
|
28806
|
+
}, J = () => {
|
|
28788
28807
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
28789
28808
|
e.style.pointerEvents = "";
|
|
28790
28809
|
});
|
|
28791
|
-
},
|
|
28792
|
-
o.value || (o.value = !0,
|
|
28793
|
-
},
|
|
28794
|
-
o.value || (o.value = !0,
|
|
28795
|
-
},
|
|
28796
|
-
I(e, n), o.value = !1,
|
|
28810
|
+
}, vg = (e, n) => {
|
|
28811
|
+
o.value || (o.value = !0, q()), k(e, n);
|
|
28812
|
+
}, Q = (e, n, r, i) => {
|
|
28813
|
+
o.value || (o.value = !0, q()), j(e, n, r, i);
|
|
28814
|
+
}, yg = (e, n) => {
|
|
28815
|
+
I(e, n), o.value = !1, J();
|
|
28797
28816
|
}, $ = (e, n, r, i) => {
|
|
28798
|
-
L(e, n, r, i), o.value = !1,
|
|
28817
|
+
L(e, n, r, i), o.value = !1, J();
|
|
28799
28818
|
};
|
|
28800
28819
|
return watch(O, (e) => {
|
|
28801
28820
|
a("compression-change", e);
|
|
28802
28821
|
}), n({
|
|
28803
28822
|
updatePosition: B,
|
|
28804
28823
|
updateSize: H,
|
|
28805
|
-
updatePositionAndSize:
|
|
28824
|
+
updatePositionAndSize: gg,
|
|
28806
28825
|
toggleCompression: z,
|
|
28807
|
-
positionAndSize:
|
|
28826
|
+
positionAndSize: K,
|
|
28808
28827
|
isCompressed: O
|
|
28809
28828
|
}), (e, n) => withDirectives((openBlock(), createBlock(unref(U), {
|
|
28810
28829
|
ref: "draggableRef",
|
|
28811
28830
|
class: normalizeClass(["draggable-container-wrapper", i.className]),
|
|
28812
|
-
style: normalizeStyle(
|
|
28831
|
+
style: normalizeStyle(G.value),
|
|
28813
28832
|
active: i.visible,
|
|
28814
28833
|
draggable: i.draggable,
|
|
28815
28834
|
resizable: i.resizable,
|
|
@@ -28824,9 +28843,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28824
28843
|
"prevent-deactivation": !0,
|
|
28825
28844
|
"drag-handle": i.dragHandle,
|
|
28826
28845
|
"class-name": "draggable-container-inner",
|
|
28827
|
-
onDragging:
|
|
28828
|
-
onResizing:
|
|
28829
|
-
onDragStop:
|
|
28846
|
+
onDragging: vg,
|
|
28847
|
+
onResizing: Q,
|
|
28848
|
+
onDragStop: yg,
|
|
28830
28849
|
onResizeStop: $
|
|
28831
28850
|
}, {
|
|
28832
28851
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
@@ -28910,23 +28929,23 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28910
28929
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
28911
28930
|
theme: "ai-blueking",
|
|
28912
28931
|
delay: [0, 0]
|
|
28913
|
-
}),
|
|
28932
|
+
}), gg = () => {
|
|
28914
28933
|
nextTick(() => {
|
|
28915
|
-
|
|
28934
|
+
G();
|
|
28916
28935
|
});
|
|
28917
|
-
},
|
|
28936
|
+
}, G = () => {
|
|
28918
28937
|
H(), s.value && !_.value && B(s.value, getTogglePanelShortcut(), { placement: "left" }), l.value && B(l.value, z.value, { placement: "top" });
|
|
28919
28938
|
};
|
|
28920
28939
|
return watch(() => _.value, () => {
|
|
28921
28940
|
nextTick(() => {
|
|
28922
|
-
|
|
28941
|
+
G();
|
|
28923
28942
|
});
|
|
28924
28943
|
}), onMounted(() => {
|
|
28925
28944
|
nextTick(() => {
|
|
28926
|
-
|
|
28927
|
-
}), window.addEventListener("resize",
|
|
28945
|
+
G();
|
|
28946
|
+
}), window.addEventListener("resize", gg);
|
|
28928
28947
|
}), onBeforeUnmount(() => {
|
|
28929
|
-
window.removeEventListener("resize",
|
|
28948
|
+
window.removeEventListener("resize", gg);
|
|
28930
28949
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
28931
28950
|
active: !e.isPanelShow,
|
|
28932
28951
|
axis: "y",
|
|
@@ -29034,9 +29053,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29034
29053
|
"share"
|
|
29035
29054
|
],
|
|
29036
29055
|
setup(e, { expose: n, emit: r }) {
|
|
29037
|
-
let i = e, a = r, o = ref(), l = ref(), u = computed(() => normalizeUrl(i.url))
|
|
29038
|
-
o.value;
|
|
29039
|
-
let m = createComponentManager({
|
|
29056
|
+
let i = e, a = r, o = ref(), l = ref(), u = computed(() => normalizeUrl(i.url)), m = createComponentManager({
|
|
29040
29057
|
initialPanelVisible: !1,
|
|
29041
29058
|
initialNimbusMinimized: i.defaultMinimize,
|
|
29042
29059
|
enablePopup: i.enablePopup,
|
|
@@ -29045,7 +29062,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29045
29062
|
}), v = m.panelVisible, E = m.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29046
29063
|
componentManager: m,
|
|
29047
29064
|
emit: a
|
|
29048
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: B, currentSession:
|
|
29065
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: B, currentSession: gg } = useChatBootstrap({
|
|
29049
29066
|
url: u,
|
|
29050
29067
|
requestOptions: i.requestOptions,
|
|
29051
29068
|
autoInit: !0,
|
|
@@ -29068,12 +29085,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29068
29085
|
});
|
|
29069
29086
|
}
|
|
29070
29087
|
}
|
|
29071
|
-
}),
|
|
29088
|
+
}), G = I, K = new SessionBusinessManager(G.session, G.message, null, {
|
|
29072
29089
|
enableChatSession: i.enableChatSession,
|
|
29073
29090
|
initialSessionCode: i.initialSessionCode
|
|
29074
|
-
}), J = new UIStateManager(), Z = computed(() => J.isSelectionMode.value),
|
|
29091
|
+
}), q = new ShareBusinessManager(G.message, G.session), J = new UIStateManager(), Z = computed(() => J.isSelectionMode.value), yg = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), xg = ref(!1), Sg = ref(""), wg = computed(() => m.isCompressed.value), Tg = computed(() => B.value), Eg = ref(""), Dg = ref(!0), Og = ref(!1), kg = computed(() => {
|
|
29075
29092
|
let e = $.effectiveShortcuts.value;
|
|
29076
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29093
|
+
return typeof i.shortcutFilter == "function" && Sg.value ? e.filter((e) => i.shortcutFilter?.(e, Sg.value)) : e;
|
|
29077
29094
|
});
|
|
29078
29095
|
watch(() => L.value, async (e) => {
|
|
29079
29096
|
if (e && z.value) {
|
|
@@ -29085,197 +29102,168 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29085
29102
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29086
29103
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29087
29104
|
}), e.conversationSettings.commands && $.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29088
|
-
await
|
|
29105
|
+
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29089
29106
|
} catch (e) {
|
|
29090
29107
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29091
29108
|
}
|
|
29092
29109
|
}
|
|
29093
29110
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29094
29111
|
$.setShortcuts(e || []);
|
|
29095
|
-
}, { immediate: !0 }), watch(() =>
|
|
29096
|
-
e && (
|
|
29097
|
-
}, { immediate: !0 }), watch(() =>
|
|
29098
|
-
e > 0 && (
|
|
29112
|
+
}, { immediate: !0 }), watch(() => gg.value, (e) => {
|
|
29113
|
+
e && (Eg.value = e.sessionName || "", Og.value = (e.sessionContentCount ?? 0) > 0);
|
|
29114
|
+
}, { immediate: !0 }), watch(() => G.message.list.value.length, (e) => {
|
|
29115
|
+
e > 0 && (Og.value = !0);
|
|
29099
29116
|
});
|
|
29100
|
-
let
|
|
29101
|
-
if (e?.agent?.info?.value) {
|
|
29102
|
-
let n = e.agent.info.value;
|
|
29103
|
-
n.conversationSettings && k("session-initialized", {
|
|
29104
|
-
openingRemark: n.conversationSettings.openingRemark || "",
|
|
29105
|
-
predefinedQuestions: n.conversationSettings.predefinedQuestions || []
|
|
29106
|
-
});
|
|
29107
|
-
}
|
|
29108
|
-
}, Dg = async (e) => {
|
|
29117
|
+
let Ag = async (e) => {
|
|
29109
29118
|
m.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29110
|
-
},
|
|
29119
|
+
}, Mg = () => {
|
|
29111
29120
|
m.hidePanel();
|
|
29112
|
-
},
|
|
29113
|
-
|
|
29114
|
-
},
|
|
29121
|
+
}, Ng = () => {
|
|
29122
|
+
Mg();
|
|
29123
|
+
}, Pg = () => {
|
|
29115
29124
|
m.handleNimbusClick();
|
|
29116
|
-
},
|
|
29117
|
-
|
|
29118
|
-
},
|
|
29119
|
-
|
|
29125
|
+
}, Fg = (e) => {
|
|
29126
|
+
Sg.value = e;
|
|
29127
|
+
}, Ig = async (e, n) => {
|
|
29128
|
+
xg.value = !1, await Ag(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29120
29129
|
shortcut: e,
|
|
29121
29130
|
source: "popup"
|
|
29122
29131
|
});
|
|
29123
|
-
},
|
|
29132
|
+
}, Rg = (e) => {
|
|
29124
29133
|
k("shortcut-click", e);
|
|
29125
|
-
},
|
|
29134
|
+
}, zg = (e) => {
|
|
29126
29135
|
m.handleDragging(e);
|
|
29127
|
-
},
|
|
29136
|
+
}, Vg = (e) => {
|
|
29128
29137
|
m.handleResizing(e);
|
|
29129
|
-
},
|
|
29138
|
+
}, Hg = (e) => {
|
|
29130
29139
|
m.handleDragStop(e);
|
|
29131
|
-
},
|
|
29140
|
+
}, Ug = (e) => {
|
|
29132
29141
|
m.handleResizeStop(e);
|
|
29133
|
-
},
|
|
29142
|
+
}, Wg = () => {
|
|
29134
29143
|
m.container.toggleCompression();
|
|
29135
|
-
},
|
|
29144
|
+
}, Gg = (e) => {
|
|
29136
29145
|
m.setCompressed(e);
|
|
29137
|
-
},
|
|
29146
|
+
}, Kg = async () => {
|
|
29138
29147
|
j.newChat();
|
|
29139
|
-
}, Ug = (e) => {
|
|
29140
|
-
j.historyClick(e);
|
|
29141
|
-
}, Wg = async (e) => {
|
|
29142
|
-
await q.switchSession(e);
|
|
29143
|
-
}, Gg = async (e) => {
|
|
29144
|
-
await q.deleteSession(e);
|
|
29145
29148
|
}, qg = (e) => {
|
|
29146
|
-
|
|
29147
|
-
}, Jg = async (e
|
|
29148
|
-
await
|
|
29149
|
-
}, Yg = async () => {
|
|
29150
|
-
|
|
29149
|
+
j.historyClick(e);
|
|
29150
|
+
}, Jg = async (e) => {
|
|
29151
|
+
await K.switchSession(e);
|
|
29152
|
+
}, Yg = async (e) => {
|
|
29153
|
+
await K.deleteSession(e);
|
|
29154
|
+
}, Xg = async (e, n) => {
|
|
29155
|
+
await K.updateSessionName(e, n);
|
|
29156
|
+
}, Zg = async () => {
|
|
29157
|
+
let e = G.session.current?.value?.sessionCode;
|
|
29151
29158
|
if (!e) {
|
|
29152
29159
|
console.error("[AIBlueking] Cannot auto-generate name: no active session");
|
|
29153
29160
|
return;
|
|
29154
29161
|
}
|
|
29155
29162
|
try {
|
|
29156
|
-
await
|
|
29157
|
-
let n =
|
|
29158
|
-
n && (
|
|
29163
|
+
await G.session.renameSession(e);
|
|
29164
|
+
let n = G.session.list.value.find((n) => n.sessionCode === e);
|
|
29165
|
+
n && (Eg.value = n.sessionName || "");
|
|
29159
29166
|
} catch (e) {
|
|
29160
|
-
console.error("[AIBlueking] Failed to auto-generate session name:", e),
|
|
29167
|
+
console.error("[AIBlueking] Failed to auto-generate session name:", e), h_(e);
|
|
29161
29168
|
}
|
|
29162
29169
|
j.autoGenerateName();
|
|
29163
|
-
},
|
|
29170
|
+
}, $g = () => {
|
|
29164
29171
|
j.helpClick();
|
|
29165
|
-
},
|
|
29166
|
-
let n =
|
|
29172
|
+
}, e_ = async (e) => {
|
|
29173
|
+
let n = G.session.current?.value;
|
|
29167
29174
|
if (!n) {
|
|
29168
29175
|
console.error("[AIBlueking] Cannot rename: no active session");
|
|
29169
29176
|
return;
|
|
29170
29177
|
}
|
|
29171
29178
|
try {
|
|
29172
|
-
await
|
|
29179
|
+
await G.session.updateSession({
|
|
29173
29180
|
...n,
|
|
29174
29181
|
sessionName: e
|
|
29175
|
-
}),
|
|
29182
|
+
}), Eg.value = e;
|
|
29176
29183
|
} catch (e) {
|
|
29177
|
-
console.error("[AIBlueking] Failed to rename session:", e),
|
|
29184
|
+
console.error("[AIBlueking] Failed to rename session:", e), h_(e);
|
|
29178
29185
|
}
|
|
29179
29186
|
j.rename(e);
|
|
29180
|
-
},
|
|
29187
|
+
}, t_ = () => {
|
|
29181
29188
|
J.enableSelectionMode(), j.share();
|
|
29182
|
-
},
|
|
29183
|
-
J.disableSelectionMode()
|
|
29184
|
-
},
|
|
29185
|
-
|
|
29186
|
-
return await navigator.clipboard.writeText(e), !0;
|
|
29187
|
-
} catch {}
|
|
29188
|
-
let n = document.createElement("textarea");
|
|
29189
|
-
n.value = e, n.style.position = "fixed", n.style.left = "-9999px", n.style.top = "-9999px", n.style.opacity = "0", document.body.appendChild(n), n.focus(), n.select();
|
|
29190
|
-
try {
|
|
29191
|
-
return document.execCommand("copy");
|
|
29192
|
-
} catch {
|
|
29193
|
-
return !1;
|
|
29194
|
-
} finally {
|
|
29195
|
-
document.body.removeChild(n);
|
|
29196
|
-
}
|
|
29197
|
-
}, t_ = async (e) => {
|
|
29198
|
-
if (pg.value = !0, e.length === 0) {
|
|
29199
|
-
pg.value = !1;
|
|
29200
|
-
return;
|
|
29201
|
-
}
|
|
29202
|
-
let n = K.session.current?.value?.sessionCode;
|
|
29203
|
-
if (!n) {
|
|
29204
|
-
console.error("[AIBlueking] Cannot share: no active session"), pg.value = !1;
|
|
29205
|
-
return;
|
|
29206
|
-
}
|
|
29189
|
+
}, n_ = () => {
|
|
29190
|
+
J.disableSelectionMode();
|
|
29191
|
+
}, r_ = async (e) => {
|
|
29192
|
+
yg.value = !0;
|
|
29207
29193
|
try {
|
|
29208
|
-
let r = await
|
|
29209
|
-
|
|
29194
|
+
let { shareUrl: n, userMessageIds: r } = await q.shareMessages(e);
|
|
29195
|
+
await copyToClipboard(n), Message({
|
|
29210
29196
|
message: t("分享链接已复制到剪贴板"),
|
|
29211
29197
|
theme: "success"
|
|
29212
|
-
}));
|
|
29213
|
-
let i = e.filter((e) => e.role === "user").map((e) => String(e.id));
|
|
29214
|
-
J.disableSelectionMode(), Q.value = [], j.shareMessages(i);
|
|
29198
|
+
}), J.disableSelectionMode(), j.shareMessages(r);
|
|
29215
29199
|
} catch (e) {
|
|
29216
|
-
console.error("[AIBlueking] Failed to share messages:", e),
|
|
29200
|
+
console.error("[AIBlueking] Failed to share messages:", e), h_(e);
|
|
29217
29201
|
} finally {
|
|
29218
|
-
|
|
29202
|
+
yg.value = !1;
|
|
29219
29203
|
}
|
|
29220
|
-
},
|
|
29204
|
+
}, i_ = async (e) => {
|
|
29221
29205
|
l.value && await l.value.sendMessage(e);
|
|
29222
|
-
},
|
|
29223
|
-
|
|
29224
|
-
},
|
|
29206
|
+
}, a_ = (e) => {
|
|
29207
|
+
Og.value = !0, j.sendMessage(e);
|
|
29208
|
+
}, o_ = () => {
|
|
29225
29209
|
j.receiveStart();
|
|
29226
|
-
},
|
|
29210
|
+
}, s_ = () => {
|
|
29227
29211
|
j.receiveText();
|
|
29228
|
-
},
|
|
29212
|
+
}, c_ = () => {
|
|
29229
29213
|
j.receiveEnd();
|
|
29230
|
-
},
|
|
29214
|
+
}, l_ = () => {
|
|
29231
29215
|
j.stop();
|
|
29232
|
-
},
|
|
29216
|
+
}, u_ = () => {
|
|
29233
29217
|
l.value && l.value.stopGeneration();
|
|
29234
|
-
},
|
|
29235
|
-
await
|
|
29236
|
-
},
|
|
29218
|
+
}, d_ = async (e) => {
|
|
29219
|
+
e ? await K.createSession({ sessionCode: e }) : await K.createNewSession();
|
|
29220
|
+
}, f_ = async (e) => {
|
|
29237
29221
|
l.value && await l.value.switchSession(e);
|
|
29238
|
-
},
|
|
29239
|
-
|
|
29240
|
-
|
|
29241
|
-
|
|
29242
|
-
|
|
29222
|
+
}, p_ = async (e, n) => {
|
|
29223
|
+
try {
|
|
29224
|
+
await K.updateSessionName(e, n), Eg.value = n;
|
|
29225
|
+
} catch (e) {
|
|
29226
|
+
console.error("[AIBlueking] Failed to update session name:", e), h_(e);
|
|
29227
|
+
}
|
|
29228
|
+
}, m_ = (e) => {
|
|
29229
|
+
e && (Eg.value = e.sessionName || "", Og.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
|
|
29230
|
+
}, h_ = (e) => {
|
|
29243
29231
|
console.error("ChatBot error:", e), m.emitInternal("sdk-error", {
|
|
29244
29232
|
apiName: "chat",
|
|
29245
29233
|
code: -1,
|
|
29246
29234
|
message: e.message,
|
|
29247
29235
|
data: e
|
|
29248
29236
|
});
|
|
29249
|
-
},
|
|
29237
|
+
}, g_ = (e, n) => {
|
|
29250
29238
|
m.container.updatePosition(e, n);
|
|
29251
|
-
},
|
|
29239
|
+
}, __ = (e, n) => {
|
|
29252
29240
|
m.container.updateSize(e, n);
|
|
29253
|
-
},
|
|
29241
|
+
}, v_ = (e, n, r, i) => {
|
|
29254
29242
|
m.container.updatePositionAndSize(e, n, r, i);
|
|
29255
|
-
},
|
|
29243
|
+
}, y_ = (e) => {
|
|
29256
29244
|
l.value && l.value.setCiteText(e);
|
|
29257
|
-
},
|
|
29245
|
+
}, b_ = () => {
|
|
29258
29246
|
l.value && l.value.focusInput();
|
|
29259
|
-
},
|
|
29260
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ?
|
|
29247
|
+
}, x_ = (e) => {
|
|
29248
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? Mg() : Ag());
|
|
29261
29249
|
};
|
|
29262
29250
|
return onMounted(async () => {
|
|
29263
|
-
o.value && m.setContainerRef(o.value), window.addEventListener("keydown",
|
|
29251
|
+
o.value && m.setContainerRef(o.value), window.addEventListener("keydown", x_);
|
|
29264
29252
|
}), onBeforeUnmount(() => {
|
|
29265
|
-
window.removeEventListener("keydown",
|
|
29253
|
+
window.removeEventListener("keydown", x_), m.destroy();
|
|
29266
29254
|
}), n({
|
|
29267
|
-
show:
|
|
29268
|
-
hide:
|
|
29269
|
-
sendMessage:
|
|
29270
|
-
stopGeneration:
|
|
29271
|
-
addNewSession:
|
|
29272
|
-
switchToSession:
|
|
29273
|
-
updateSessionName:
|
|
29274
|
-
updatePosition:
|
|
29275
|
-
updateSize:
|
|
29276
|
-
updatePositionAndSize:
|
|
29277
|
-
setCiteText:
|
|
29278
|
-
focusInput:
|
|
29255
|
+
show: Ag,
|
|
29256
|
+
hide: Mg,
|
|
29257
|
+
sendMessage: i_,
|
|
29258
|
+
stopGeneration: u_,
|
|
29259
|
+
addNewSession: d_,
|
|
29260
|
+
switchToSession: f_,
|
|
29261
|
+
updateSessionName: p_,
|
|
29262
|
+
updatePosition: g_,
|
|
29263
|
+
updateSize: __,
|
|
29264
|
+
updatePositionAndSize: v_,
|
|
29265
|
+
setCiteText: y_,
|
|
29266
|
+
focusInput: b_
|
|
29279
29267
|
}), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
|
|
29280
29268
|
createCommentVNode(" 可拖拽容器 "),
|
|
29281
29269
|
createVNode(unref(draggable_container_default), {
|
|
@@ -29291,42 +29279,42 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29291
29279
|
"max-width": i.maxWidth,
|
|
29292
29280
|
"max-width-percent": 80,
|
|
29293
29281
|
visible: unref(v),
|
|
29294
|
-
onCompressionChange:
|
|
29295
|
-
onDragStop:
|
|
29296
|
-
onDragging:
|
|
29297
|
-
onResizeStop:
|
|
29298
|
-
onResizing:
|
|
29282
|
+
onCompressionChange: Gg,
|
|
29283
|
+
onDragStop: Hg,
|
|
29284
|
+
onDragging: zg,
|
|
29285
|
+
onResizeStop: Ug,
|
|
29286
|
+
onResizing: Vg
|
|
29299
29287
|
}, {
|
|
29300
29288
|
default: withCtx(() => [createElementVNode("div", _hoisted_1, [
|
|
29301
29289
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29302
29290
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29303
29291
|
key: 0,
|
|
29304
|
-
"agent-name":
|
|
29305
|
-
"chat-helper": unref(
|
|
29292
|
+
"agent-name": Tg.value,
|
|
29293
|
+
"chat-helper": unref(G),
|
|
29306
29294
|
draggable: i.draggable,
|
|
29307
29295
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29308
29296
|
"enable-chat-session": i.enableChatSession,
|
|
29309
|
-
"has-permission":
|
|
29310
|
-
"has-session-contents":
|
|
29311
|
-
"is-compression-height":
|
|
29312
|
-
"session-business-manager": unref(
|
|
29313
|
-
"session-name":
|
|
29297
|
+
"has-permission": Dg.value,
|
|
29298
|
+
"has-session-contents": Og.value,
|
|
29299
|
+
"is-compression-height": wg.value,
|
|
29300
|
+
"session-business-manager": unref(K),
|
|
29301
|
+
"session-name": Eg.value,
|
|
29314
29302
|
"show-compression-icon": i.showCompressionIcon,
|
|
29315
29303
|
"show-history-icon": i.showHistoryIcon,
|
|
29316
29304
|
"show-more-icon": i.showMoreIcon,
|
|
29317
29305
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29318
29306
|
title: i.title,
|
|
29319
|
-
onAutoGenerateName:
|
|
29320
|
-
onClose:
|
|
29321
|
-
onHelpClick:
|
|
29322
|
-
onHistoryClick:
|
|
29323
|
-
onHistorySessionDelete:
|
|
29324
|
-
onHistorySessionRename:
|
|
29325
|
-
onHistorySessionSwitch:
|
|
29326
|
-
onNewChat:
|
|
29327
|
-
onRename:
|
|
29328
|
-
onShare:
|
|
29329
|
-
onToggleCompression:
|
|
29307
|
+
onAutoGenerateName: Zg,
|
|
29308
|
+
onClose: Ng,
|
|
29309
|
+
onHelpClick: $g,
|
|
29310
|
+
onHistoryClick: qg,
|
|
29311
|
+
onHistorySessionDelete: Yg,
|
|
29312
|
+
onHistorySessionRename: Xg,
|
|
29313
|
+
onHistorySessionSwitch: Jg,
|
|
29314
|
+
onNewChat: Kg,
|
|
29315
|
+
onRename: e_,
|
|
29316
|
+
onShare: t_,
|
|
29317
|
+
onToggleCompression: Wg
|
|
29330
29318
|
}, null, 8, [
|
|
29331
29319
|
"agent-name",
|
|
29332
29320
|
"chat-helper",
|
|
@@ -29349,30 +29337,28 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29349
29337
|
ref_key: "chatBotRef",
|
|
29350
29338
|
ref: l,
|
|
29351
29339
|
"auto-load": i.loadRecentSessionOnMount,
|
|
29352
|
-
"chat-helper": unref(
|
|
29340
|
+
"chat-helper": unref(G),
|
|
29353
29341
|
"enable-selection": Z.value,
|
|
29354
29342
|
"hello-text": i.helloText,
|
|
29355
29343
|
placeholder: i.placeholder,
|
|
29356
29344
|
prompts: i.prompts,
|
|
29357
29345
|
"request-options": i.requestOptions,
|
|
29358
29346
|
"session-code": i.initialSessionCode,
|
|
29359
|
-
"share-loading":
|
|
29347
|
+
"share-loading": yg.value,
|
|
29360
29348
|
"shortcut-limit": i.shortcutLimit,
|
|
29361
29349
|
shortcuts: i.shortcuts,
|
|
29362
29350
|
url: u.value,
|
|
29363
|
-
|
|
29364
|
-
|
|
29365
|
-
|
|
29366
|
-
|
|
29367
|
-
|
|
29368
|
-
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29372
|
-
|
|
29373
|
-
|
|
29374
|
-
onShortcutClick: n[6] ||= (e) => Fg(e),
|
|
29375
|
-
onStop: s_
|
|
29351
|
+
onCancelShare: n_,
|
|
29352
|
+
onConfirmShare: n[0] ||= (e) => r_(e),
|
|
29353
|
+
onError: n[1] ||= (e) => h_(e),
|
|
29354
|
+
onReceiveEnd: c_,
|
|
29355
|
+
onReceiveStart: o_,
|
|
29356
|
+
onReceiveText: s_,
|
|
29357
|
+
onRequestShare: t_,
|
|
29358
|
+
onSendMessage: n[2] ||= (e) => a_(e),
|
|
29359
|
+
onSessionSwitched: n[3] ||= (e) => m_(e),
|
|
29360
|
+
onShortcutClick: n[4] ||= (e) => Rg(e),
|
|
29361
|
+
onStop: l_
|
|
29376
29362
|
}, null, 8, [
|
|
29377
29363
|
"auto-load",
|
|
29378
29364
|
"chat-helper",
|
|
@@ -29403,12 +29389,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29403
29389
|
i.hideNimbus ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(nimbus_default, {
|
|
29404
29390
|
key: 0,
|
|
29405
29391
|
"is-minimize": unref(E),
|
|
29406
|
-
"onUpdate:isMinimize": n[
|
|
29392
|
+
"onUpdate:isMinimize": n[5] ||= (e) => isRef(E) ? E.value = e : null,
|
|
29407
29393
|
"is-panel-show": unref(v),
|
|
29408
|
-
"onUpdate:isPanelShow": n[
|
|
29394
|
+
"onUpdate:isPanelShow": n[6] ||= (e) => isRef(v) ? v.value = e : null,
|
|
29409
29395
|
"default-minimize": i.defaultMinimize,
|
|
29410
29396
|
size: i.nimbusSize,
|
|
29411
|
-
onClick:
|
|
29397
|
+
onClick: Pg
|
|
29412
29398
|
}, null, 8, [
|
|
29413
29399
|
"is-minimize",
|
|
29414
29400
|
"is-panel-show",
|
|
@@ -29418,12 +29404,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29418
29404
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29419
29405
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29420
29406
|
key: 1,
|
|
29421
|
-
visible:
|
|
29422
|
-
"onUpdate:visible": n[
|
|
29407
|
+
visible: xg.value,
|
|
29408
|
+
"onUpdate:visible": n[7] ||= (e) => xg.value = e,
|
|
29423
29409
|
"max-shortcut-count": i.shortcutLimit,
|
|
29424
|
-
shortcuts:
|
|
29425
|
-
onSelectShortcut:
|
|
29426
|
-
onSelectionChange:
|
|
29410
|
+
shortcuts: kg.value,
|
|
29411
|
+
onSelectShortcut: Ig,
|
|
29412
|
+
onSelectionChange: Fg
|
|
29427
29413
|
}, null, 8, [
|
|
29428
29414
|
"visible",
|
|
29429
29415
|
"max-shortcut-count",
|
|
@@ -29431,7 +29417,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29431
29417
|
])) : createCommentVNode("v-if", !0)
|
|
29432
29418
|
], 2)], 8, ["to"]));
|
|
29433
29419
|
}
|
|
29434
|
-
}), [["__scopeId", "data-v-
|
|
29420
|
+
}), [["__scopeId", "data-v-25c583ac"]]), vue2_default = {
|
|
29435
29421
|
name: "AIBluekingV2",
|
|
29436
29422
|
render(e) {
|
|
29437
29423
|
return e("div", { style: {
|