@langsword/trace 0.1.28 → 0.1.29
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/trace.css +1 -1
- package/dist/trace.es.js +749 -725
- package/dist/trace.umd.js +30 -30
- package/package.json +1 -1
package/dist/trace.es.js
CHANGED
|
@@ -9,15 +9,15 @@ var ga = (l, n, r) => (Jd(l, n, "access private method"), r);
|
|
|
9
9
|
import { defineStore as Yd } from "pinia";
|
|
10
10
|
import Qd from "axios";
|
|
11
11
|
import Zd from "vue";
|
|
12
|
-
var ac = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
12
|
+
var ac = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, As = { exports: {} }, lu;
|
|
13
13
|
function Vt() {
|
|
14
14
|
return lu || (lu = 1, function(l, n) {
|
|
15
15
|
(function(r, o) {
|
|
16
16
|
l.exports = o();
|
|
17
17
|
})(ac, function() {
|
|
18
|
-
var r = navigator.userAgent, o = navigator.platform, u = /gecko\/\d/i.test(r), f = /MSIE \d/.test(r), h = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r), y = /Edge\/(\d+)/.exec(r), m = f || h || y, k = m && (f ? document.documentMode || 6 : +(y || h)[1]), S = !y && /WebKit\//.test(r),
|
|
18
|
+
var r = navigator.userAgent, o = navigator.platform, u = /gecko\/\d/i.test(r), f = /MSIE \d/.test(r), h = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r), y = /Edge\/(\d+)/.exec(r), m = f || h || y, k = m && (f ? document.documentMode || 6 : +(y || h)[1]), S = !y && /WebKit\//.test(r), F = S && /Qt\/\d+\.\d+/.test(r), L = !y && /Chrome\/(\d+)/.exec(r), W = L && +L[1], z = /Opera\//.test(r), A = /Apple Computer/.test(navigator.vendor), $ = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r), I = /PhantomJS/.test(r), N = A && (/Mobile\/\w+/.test(r) || navigator.maxTouchPoints > 2), H = /Android/.test(r), V = N || H || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r), ne = N || /Mac/.test(o), ue = /\bCrOS\b/.test(r), se = /win/i.test(o), de = z && r.match(/Version\/(\d*\.\d*)/);
|
|
19
19
|
de && (de = Number(de[1])), de && de >= 15 && (z = !1, S = !0);
|
|
20
|
-
var
|
|
20
|
+
var Ae = ne && (F || z && (de == null || de < 12.11)), Fe = u || m && k >= 9;
|
|
21
21
|
function ie(e) {
|
|
22
22
|
return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
|
|
23
23
|
}
|
|
@@ -62,7 +62,7 @@ function Vt() {
|
|
|
62
62
|
}
|
|
63
63
|
return i.collapse(!0), i.moveEnd("character", a), i.moveStart("character", t), i;
|
|
64
64
|
};
|
|
65
|
-
function
|
|
65
|
+
function D(e, t) {
|
|
66
66
|
if (t.nodeType == 3 && (t = t.parentNode), e.contains)
|
|
67
67
|
return e.contains(t);
|
|
68
68
|
do
|
|
@@ -221,7 +221,7 @@ function Vt() {
|
|
|
221
221
|
e(c) ? a = c : t = c + i;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Dn(e, t, a, i) {
|
|
225
225
|
if (!e)
|
|
226
226
|
return i(t, a, "ltr", 0);
|
|
227
227
|
for (var s = !1, c = 0; c < e.length; ++c) {
|
|
@@ -231,7 +231,7 @@ function Vt() {
|
|
|
231
231
|
s || i(t, a, "ltr");
|
|
232
232
|
}
|
|
233
233
|
var Gn = null;
|
|
234
|
-
function
|
|
234
|
+
function An(e, t, a) {
|
|
235
235
|
var i;
|
|
236
236
|
Gn = null;
|
|
237
237
|
for (var s = 0; s < e.length; ++s) {
|
|
@@ -255,55 +255,55 @@ function Vt() {
|
|
|
255
255
|
var _ = C == "ltr" ? "L" : "R";
|
|
256
256
|
if (v.length == 0 || C == "ltr" && !i.test(v))
|
|
257
257
|
return !1;
|
|
258
|
-
for (var
|
|
258
|
+
for (var R = v.length, O = [], B = 0; B < R; ++B)
|
|
259
259
|
O.push(a(v.charCodeAt(B)));
|
|
260
|
-
for (var U = 0, J = _; U <
|
|
260
|
+
for (var U = 0, J = _; U < R; ++U) {
|
|
261
261
|
var ee = O[U];
|
|
262
262
|
ee == "m" ? O[U] = J : J = ee;
|
|
263
263
|
}
|
|
264
|
-
for (var ae = 0, te = _; ae <
|
|
264
|
+
for (var ae = 0, te = _; ae < R; ++ae) {
|
|
265
265
|
var le = O[ae];
|
|
266
266
|
le == "1" && te == "r" ? O[ae] = "n" : c.test(le) && (te = le, le == "r" && (O[ae] = "R"));
|
|
267
267
|
}
|
|
268
|
-
for (var ve = 1, ge = O[0]; ve <
|
|
269
|
-
var
|
|
270
|
-
|
|
268
|
+
for (var ve = 1, ge = O[0]; ve < R - 1; ++ve) {
|
|
269
|
+
var De = O[ve];
|
|
270
|
+
De == "+" && ge == "1" && O[ve + 1] == "1" ? O[ve] = "1" : De == "," && ge == O[ve + 1] && (ge == "1" || ge == "n") && (O[ve] = ge), ge = De;
|
|
271
271
|
}
|
|
272
|
-
for (var We = 0; We <
|
|
272
|
+
for (var We = 0; We < R; ++We) {
|
|
273
273
|
var yt = O[We];
|
|
274
274
|
if (yt == ",")
|
|
275
275
|
O[We] = "N";
|
|
276
276
|
else if (yt == "%") {
|
|
277
277
|
var Ye = void 0;
|
|
278
|
-
for (Ye = We + 1; Ye <
|
|
278
|
+
for (Ye = We + 1; Ye < R && O[Ye] == "%"; ++Ye)
|
|
279
279
|
;
|
|
280
|
-
for (var Bt = We && O[We - 1] == "!" || Ye <
|
|
280
|
+
for (var Bt = We && O[We - 1] == "!" || Ye < R && O[Ye] == "1" ? "1" : "N", Nt = We; Nt < Ye; ++Nt)
|
|
281
281
|
O[Nt] = Bt;
|
|
282
282
|
We = Ye - 1;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
for (var at = 0, Ft = _; at <
|
|
285
|
+
for (var at = 0, Ft = _; at < R; ++at) {
|
|
286
286
|
var wt = O[at];
|
|
287
287
|
Ft == "L" && wt == "1" ? O[at] = "L" : c.test(wt) && (Ft = wt);
|
|
288
288
|
}
|
|
289
|
-
for (var dt = 0; dt <
|
|
289
|
+
for (var dt = 0; dt < R; ++dt)
|
|
290
290
|
if (s.test(O[dt])) {
|
|
291
291
|
var st = void 0;
|
|
292
|
-
for (st = dt + 1; st <
|
|
292
|
+
for (st = dt + 1; st < R && s.test(O[st]); ++st)
|
|
293
293
|
;
|
|
294
|
-
for (var tt = (dt ? O[dt - 1] : _) == "L", Rt = (st <
|
|
294
|
+
for (var tt = (dt ? O[dt - 1] : _) == "L", Rt = (st < R ? O[st] : _) == "L", Rr = tt == Rt ? tt ? "L" : "R" : _, qn = dt; qn < st; ++qn)
|
|
295
295
|
O[qn] = Rr;
|
|
296
296
|
dt = st - 1;
|
|
297
297
|
}
|
|
298
|
-
for (var Tt = [], mn, bt = 0; bt <
|
|
298
|
+
for (var Tt = [], mn, bt = 0; bt < R; )
|
|
299
299
|
if (d.test(O[bt])) {
|
|
300
300
|
var Is = bt;
|
|
301
|
-
for (++bt; bt <
|
|
301
|
+
for (++bt; bt < R && d.test(O[bt]); ++bt)
|
|
302
302
|
;
|
|
303
303
|
Tt.push(new g(0, Is, bt));
|
|
304
304
|
} else {
|
|
305
305
|
var Ln = bt, nr = Tt.length, rr = C == "rtl" ? 1 : 0;
|
|
306
|
-
for (++bt; bt <
|
|
306
|
+
for (++bt; bt < R && O[bt] != "L"; ++bt)
|
|
307
307
|
;
|
|
308
308
|
for (var Et = Ln; Et < bt; )
|
|
309
309
|
if (p.test(O[Et])) {
|
|
@@ -316,7 +316,7 @@ function Vt() {
|
|
|
316
316
|
++Et;
|
|
317
317
|
Ln < bt && Tt.splice(nr, 0, new g(1, Ln, bt));
|
|
318
318
|
}
|
|
319
|
-
return C == "ltr" && (Tt[0].level == 1 && (mn = v.match(/^\s+/)) && (Tt[0].from = mn[0].length, Tt.unshift(new g(0, 0, mn[0].length))), be(Tt).level == 1 && (mn = v.match(/\s+$/)) && (be(Tt).to -= mn[0].length, Tt.push(new g(0,
|
|
319
|
+
return C == "ltr" && (Tt[0].level == 1 && (mn = v.match(/^\s+/)) && (Tt[0].from = mn[0].length, Tt.unshift(new g(0, 0, mn[0].length))), be(Tt).level == 1 && (mn = v.match(/\s+$/)) && (be(Tt).to -= mn[0].length, Tt.push(new g(0, R - mn[0].length, R)))), C == "rtl" ? Tt.reverse() : Tt;
|
|
320
320
|
};
|
|
321
321
|
}();
|
|
322
322
|
function Me(e, t) {
|
|
@@ -659,7 +659,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
659
659
|
function pt(e) {
|
|
660
660
|
return P(e.line, e.ch);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Dt(e, t) {
|
|
663
663
|
return re(e, t) < 0 ? t : e;
|
|
664
664
|
}
|
|
665
665
|
function vr(e, t) {
|
|
@@ -724,11 +724,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
724
724
|
);
|
|
725
725
|
for (var d = a.state, p = function(v) {
|
|
726
726
|
a.baseTokens = s;
|
|
727
|
-
var C = e.state.overlays[v], _ = 1,
|
|
727
|
+
var C = e.state.overlays[v], _ = 1, R = 0;
|
|
728
728
|
a.state = !0, go(e, t.text, C.mode, a, function(O, B) {
|
|
729
|
-
for (var U = _;
|
|
729
|
+
for (var U = _; R < O; ) {
|
|
730
730
|
var J = s[_];
|
|
731
|
-
J > O && s.splice(_, 1, O, s[_ + 1], J), _ += 2,
|
|
731
|
+
J > O && s.splice(_, 1, O, s[_ + 1], J), _ += 2, R = Math.min(O, J);
|
|
732
732
|
}
|
|
733
733
|
if (B)
|
|
734
734
|
if (C.opaque)
|
|
@@ -809,10 +809,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
809
809
|
function go(e, t, a, i, s, c, d) {
|
|
810
810
|
var p = a.flattenSpans;
|
|
811
811
|
p == null && (p = e.options.flattenSpans);
|
|
812
|
-
var g = 0, v = null, C = new et(t, e.options.tabSize, i), _,
|
|
812
|
+
var g = 0, v = null, C = new et(t, e.options.tabSize, i), _, R = e.options.addModeClass && [null];
|
|
813
813
|
for (t == "" && po(co(a, i.state), c); !C.eol(); ) {
|
|
814
|
-
if (C.pos > e.options.maxHighlightLength ? (p = !1, d && Pa(e, t, i, C.pos), C.pos = t.length, _ = null) : _ = po(za(a, C, i.state,
|
|
815
|
-
var O =
|
|
814
|
+
if (C.pos > e.options.maxHighlightLength ? (p = !1, d && Pa(e, t, i, C.pos), C.pos = t.length, _ = null) : _ = po(za(a, C, i.state, R), c), R) {
|
|
815
|
+
var O = R[0].name;
|
|
816
816
|
O && (_ = "m-" + (_ ? O + " " + _ : O));
|
|
817
817
|
}
|
|
818
818
|
if (!p || v != _) {
|
|
@@ -915,10 +915,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
915
915
|
var s = t.from.ch, c = t.to.ch, d = re(t.from, t.to) == 0, p = tf(a, s, d), g = nf(i, c, d), v = t.text.length == 1, C = be(t.text).length + (v ? s : 0);
|
|
916
916
|
if (p)
|
|
917
917
|
for (var _ = 0; _ < p.length; ++_) {
|
|
918
|
-
var
|
|
919
|
-
if (
|
|
920
|
-
var O = Yr(g,
|
|
921
|
-
O ? v && (
|
|
918
|
+
var R = p[_];
|
|
919
|
+
if (R.to == null) {
|
|
920
|
+
var O = Yr(g, R.marker);
|
|
921
|
+
O ? v && (R.to = O.to == null ? null : O.to + C) : R.to = s;
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
if (g)
|
|
@@ -964,8 +964,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
964
964
|
for (var d = i[c], p = d.find(0), g = 0; g < s.length; ++g) {
|
|
965
965
|
var v = s[g];
|
|
966
966
|
if (!(re(v.to, p.from) < 0 || re(v.from, p.to) > 0)) {
|
|
967
|
-
var C = [g, 1], _ = re(v.from, p.from),
|
|
968
|
-
(_ < 0 || !d.inclusiveLeft && !_) && C.push({ from: v.from, to: p.from }), (
|
|
967
|
+
var C = [g, 1], _ = re(v.from, p.from), R = re(v.to, p.to);
|
|
968
|
+
(_ < 0 || !d.inclusiveLeft && !_) && C.push({ from: v.from, to: p.from }), (R > 0 || !d.inclusiveRight && !R) && C.push({ from: p.to, to: v.to }), s.splice.apply(s, C), g += C.length - 3;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
return s;
|
|
@@ -1181,20 +1181,20 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1181
1181
|
C = document.createDocumentFragment();
|
|
1182
1182
|
for (var _ = 0; ; ) {
|
|
1183
1183
|
g.lastIndex = _;
|
|
1184
|
-
var
|
|
1184
|
+
var R = g.exec(t), O = R ? R.index - _ : t.length - _;
|
|
1185
1185
|
if (O) {
|
|
1186
1186
|
var B = document.createTextNode(p.slice(_, _ + O));
|
|
1187
1187
|
m && k < 9 ? C.appendChild(w("span", [B])) : C.appendChild(B), e.map.push(e.pos, e.pos + O, B), e.col += O, e.pos += O;
|
|
1188
1188
|
}
|
|
1189
|
-
if (!
|
|
1189
|
+
if (!R)
|
|
1190
1190
|
break;
|
|
1191
1191
|
_ += O + 1;
|
|
1192
1192
|
var U = void 0;
|
|
1193
|
-
if (
|
|
1193
|
+
if (R[0] == " ") {
|
|
1194
1194
|
var J = e.cm.options.tabSize, ee = J - e.col % J;
|
|
1195
1195
|
U = C.appendChild(w("span", Ht(ee), "cm-tab")), U.setAttribute("role", "presentation"), U.setAttribute("cm-text", " "), e.col += ee;
|
|
1196
|
-
} else
|
|
1197
|
-
` ? (U = C.appendChild(w("span",
|
|
1196
|
+
} else R[0] == "\r" || R[0] == `
|
|
1197
|
+
` ? (U = C.appendChild(w("span", R[0] == "\r" ? "␍" : "", "cm-invalidchar")), U.setAttribute("cm-text", R[0]), e.col += 1) : (U = e.cm.options.specialCharPlaceholder(R[0]), U.setAttribute("cm-text", R[0]), m && k < 9 ? C.appendChild(w("span", [U])) : C.appendChild(U), e.col += 1);
|
|
1198
1198
|
e.map.push(e.pos, e.pos + 1, U), e.pos++;
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
@@ -1223,7 +1223,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1223
1223
|
return function(a, i, s, c, d, p, g) {
|
|
1224
1224
|
s = s ? s + " cm-force-border" : "cm-force-border";
|
|
1225
1225
|
for (var v = a.pos, C = v + i.length; ; ) {
|
|
1226
|
-
for (var _ = void 0,
|
|
1226
|
+
for (var _ = void 0, R = 0; R < t.length && (_ = t[R], !(_.to > v && _.from <= v)); R++)
|
|
1227
1227
|
;
|
|
1228
1228
|
if (_.to >= C)
|
|
1229
1229
|
return e(a, i, s, c, d, p, g);
|
|
@@ -1242,18 +1242,18 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1242
1242
|
t.addToken(t, s.slice(c, c = a[d]), Co(a[d + 1], t.cm.options));
|
|
1243
1243
|
return;
|
|
1244
1244
|
}
|
|
1245
|
-
for (var p = s.length, g = 0, v = 1, C = "", _,
|
|
1245
|
+
for (var p = s.length, g = 0, v = 1, C = "", _, R, O = 0, B, U, J, ee, ae; ; ) {
|
|
1246
1246
|
if (O == g) {
|
|
1247
|
-
B = U = J =
|
|
1247
|
+
B = U = J = R = "", ae = null, ee = null, O = 1 / 0;
|
|
1248
1248
|
for (var te = [], le = void 0, ve = 0; ve < i.length; ++ve) {
|
|
1249
|
-
var ge = i[ve],
|
|
1250
|
-
if (
|
|
1251
|
-
te.push(
|
|
1252
|
-
else if (ge.from <= g && (ge.to == null || ge.to > g ||
|
|
1253
|
-
if (ge.to != null && ge.to != g && O > ge.to && (O = ge.to, U = ""),
|
|
1254
|
-
for (var We in
|
|
1255
|
-
(ae || (ae = {}))[We] =
|
|
1256
|
-
|
|
1249
|
+
var ge = i[ve], De = ge.marker;
|
|
1250
|
+
if (De.type == "bookmark" && ge.from == g && De.widgetNode)
|
|
1251
|
+
te.push(De);
|
|
1252
|
+
else if (ge.from <= g && (ge.to == null || ge.to > g || De.collapsed && ge.to == g && ge.from == g)) {
|
|
1253
|
+
if (ge.to != null && ge.to != g && O > ge.to && (O = ge.to, U = ""), De.className && (B += " " + De.className), De.css && (R = (R ? R + ";" : "") + De.css), De.startStyle && ge.from == g && (J += " " + De.startStyle), De.endStyle && ge.to == O && (le || (le = [])).push(De.endStyle, ge.to), De.title && ((ae || (ae = {})).title = De.title), De.attributes)
|
|
1254
|
+
for (var We in De.attributes)
|
|
1255
|
+
(ae || (ae = {}))[We] = De.attributes[We];
|
|
1256
|
+
De.collapsed && (!ee || Ha(ee.marker, De) < 0) && (ee = ge);
|
|
1257
1257
|
} else ge.from > g && O > ge.from && (O = ge.from);
|
|
1258
1258
|
}
|
|
1259
1259
|
if (le)
|
|
@@ -1286,7 +1286,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1286
1286
|
_ ? _ + B : B,
|
|
1287
1287
|
J,
|
|
1288
1288
|
g + at.length == O ? U : "",
|
|
1289
|
-
|
|
1289
|
+
R,
|
|
1290
1290
|
ae
|
|
1291
1291
|
);
|
|
1292
1292
|
}
|
|
@@ -1362,7 +1362,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1362
1362
|
function Eo(e, t, a, i) {
|
|
1363
1363
|
for (var s = 0; s < t.changes.length; s++) {
|
|
1364
1364
|
var c = t.changes[s];
|
|
1365
|
-
c == "text" ? kf(e, t) : c == "gutter" ?
|
|
1365
|
+
c == "text" ? kf(e, t) : c == "gutter" ? Do(e, t, a, i) : c == "class" ? Ua(e, t) : c == "widget" && Sf(e, t, i);
|
|
1366
1366
|
}
|
|
1367
1367
|
t.changes = null;
|
|
1368
1368
|
}
|
|
@@ -1391,7 +1391,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1391
1391
|
var a = t.textClass ? t.textClass + " " + (t.line.textClass || "") : t.line.textClass;
|
|
1392
1392
|
t.text.className = a || "";
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function Do(e, t, a, i) {
|
|
1395
1395
|
if (t.gutter && (t.node.removeChild(t.gutter), t.gutter = null), t.gutterBackground && (t.node.removeChild(t.gutterBackground), t.gutterBackground = null), t.line.gutterClass) {
|
|
1396
1396
|
var s = Zr(t);
|
|
1397
1397
|
t.gutterBackground = w(
|
|
@@ -1427,13 +1427,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1427
1427
|
t.alignable && (t.alignable = null);
|
|
1428
1428
|
for (var i = ie("CodeMirror-linewidget"), s = t.node.firstChild, c = void 0; s; s = c)
|
|
1429
1429
|
c = s.nextSibling, i.test(s.className) && t.node.removeChild(s);
|
|
1430
|
-
|
|
1430
|
+
Ao(e, t, a);
|
|
1431
1431
|
}
|
|
1432
1432
|
function Cf(e, t, a, i) {
|
|
1433
1433
|
var s = Io(e, t);
|
|
1434
|
-
return t.text = t.node = s.pre, s.bgClass && (t.bgClass = s.bgClass), s.textClass && (t.textClass = s.textClass), Ua(e, t),
|
|
1434
|
+
return t.text = t.node = s.pre, s.bgClass && (t.bgClass = s.bgClass), s.textClass && (t.textClass = s.textClass), Ua(e, t), Do(e, t, a, i), Ao(e, t, i), t.node;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function Ao(e, t, a) {
|
|
1437
1437
|
if (Oo(e, t.line, t, a, !0), t.rest)
|
|
1438
1438
|
for (var i = 0; i < t.rest.length; i++)
|
|
1439
1439
|
Oo(e, t.rest[i], t, a, !1);
|
|
@@ -1459,7 +1459,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1459
1459
|
var t = e.doc.cm;
|
|
1460
1460
|
if (!t)
|
|
1461
1461
|
return 0;
|
|
1462
|
-
if (!
|
|
1462
|
+
if (!D(document.body, e.node)) {
|
|
1463
1463
|
var a = "position: relative;";
|
|
1464
1464
|
e.coverGutter && (a += "margin-left: -" + t.display.gutters.offsetWidth + "px;"), e.noHScroll && (a += "width: " + t.display.wrapper.clientWidth + "px;"), Q(t.display.measure, w("div", [e.node], null, a));
|
|
1465
1465
|
}
|
|
@@ -1594,15 +1594,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1594
1594
|
break;
|
|
1595
1595
|
p = d, d = d - 1, g = "right";
|
|
1596
1596
|
}
|
|
1597
|
-
m && k < 11 && (v =
|
|
1597
|
+
m && k < 11 && (v = Df(e.display.measure, v));
|
|
1598
1598
|
} else {
|
|
1599
1599
|
d > 0 && (g = i = "right");
|
|
1600
1600
|
var _;
|
|
1601
1601
|
e.options.lineWrapping && (_ = c.getClientRects()).length > 1 ? v = _[i == "right" ? _.length - 1 : 0] : v = c.getBoundingClientRect();
|
|
1602
1602
|
}
|
|
1603
1603
|
if (m && k < 9 && !d && (!v || !v.left && !v.right)) {
|
|
1604
|
-
var
|
|
1605
|
-
|
|
1604
|
+
var R = c.parentNode.getClientRects()[0];
|
|
1605
|
+
R ? v = { left: R.left, right: R.left + kr(e.display), top: R.top, bottom: R.bottom } : v = Mo;
|
|
1606
1606
|
}
|
|
1607
1607
|
for (var O = v.top - t.rect.top, B = v.bottom - t.rect.top, U = (O + B) / 2, J = t.view.measure.heights, ee = 0; ee < J.length - 1 && !(U < J[ee]); ee++)
|
|
1608
1608
|
;
|
|
@@ -1614,7 +1614,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1614
1614
|
};
|
|
1615
1615
|
return !v.left && !v.right && (le.bogus = !0), e.options.singleCursorHeightPerLine || (le.rtop = O, le.rbottom = B), le;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function Df(e, t) {
|
|
1618
1618
|
if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !$a(e))
|
|
1619
1619
|
return t;
|
|
1620
1620
|
var a = screen.logicalXDPI / screen.deviceXDPI, i = screen.logicalYDPI / screen.deviceYDPI;
|
|
@@ -1697,8 +1697,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1697
1697
|
var ee = p[U], ae = ee.level == 1;
|
|
1698
1698
|
return d(J ? B - 1 : B, ae != J);
|
|
1699
1699
|
}
|
|
1700
|
-
var _ =
|
|
1701
|
-
return
|
|
1700
|
+
var _ = An(p, g, v), R = Gn, O = C(g, _, v == "before");
|
|
1701
|
+
return R != null && (O.other = C(g, R, v != "before")), O;
|
|
1702
1702
|
}
|
|
1703
1703
|
function jo(e, t) {
|
|
1704
1704
|
var a = 0;
|
|
@@ -1719,7 +1719,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1719
1719
|
return Ja(i.first + i.size - 1, ce(i, c).text.length, null, 1, 1);
|
|
1720
1720
|
t < 0 && (t = 0);
|
|
1721
1721
|
for (var d = ce(i, s); ; ) {
|
|
1722
|
-
var p =
|
|
1722
|
+
var p = Af(e, d, s, t, a), g = af(d, p.ch + (p.xRel > 0 || p.outside > 0 ? 1 : 0));
|
|
1723
1723
|
if (!g)
|
|
1724
1724
|
return p;
|
|
1725
1725
|
var v = g.find(1);
|
|
@@ -1745,20 +1745,20 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1745
1745
|
function Qa(e, t, a, i) {
|
|
1746
1746
|
return e.bottom <= a ? !1 : e.top > a ? !0 : (i ? e.left : e.right) > t;
|
|
1747
1747
|
}
|
|
1748
|
-
function
|
|
1748
|
+
function Af(e, t, a, i, s) {
|
|
1749
1749
|
s -= Sn(t);
|
|
1750
1750
|
var c = xr(e, t), d = Xa(t), p = 0, g = t.text.length, v = !0, C = Me(t, e.doc.direction);
|
|
1751
1751
|
if (C) {
|
|
1752
1752
|
var _ = (e.options.lineWrapping ? Nf : Of)(e, t, a, c, C, i, s);
|
|
1753
1753
|
v = _.level != 1, p = v ? _.from : _.to - 1, g = v ? _.to : _.from - 1;
|
|
1754
1754
|
}
|
|
1755
|
-
var
|
|
1755
|
+
var R = null, O = null, B = Xt(function(ve) {
|
|
1756
1756
|
var ge = gn(e, c, ve);
|
|
1757
|
-
return ge.top += d, ge.bottom += d, Qa(ge, i, s, !1) ? (ge.top <= s && ge.left <= i && (
|
|
1757
|
+
return ge.top += d, ge.bottom += d, Qa(ge, i, s, !1) ? (ge.top <= s && ge.left <= i && (R = ve, O = ge), !0) : !1;
|
|
1758
1758
|
}, p, g), U, J, ee = !1;
|
|
1759
1759
|
if (O) {
|
|
1760
1760
|
var ae = i - O.left < O.right - i, te = ae == v;
|
|
1761
|
-
B =
|
|
1761
|
+
B = R + (te ? 0 : 1), J = te ? "after" : "before", U = ae ? O.left : O.right;
|
|
1762
1762
|
} else {
|
|
1763
1763
|
!v && (B == g || B == p) && B++, J = B == 0 ? "after" : B == t.text.length ? "before" : gn(e, c, B - (v ? 1 : 0)).bottom + d <= s == v ? "after" : "before";
|
|
1764
1764
|
var le = on(e, P(a, B, J), "line", t, c);
|
|
@@ -1768,10 +1768,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
function Of(e, t, a, i, s, c, d) {
|
|
1770
1770
|
var p = Xt(function(_) {
|
|
1771
|
-
var
|
|
1771
|
+
var R = s[_], O = R.level != 1;
|
|
1772
1772
|
return Qa(on(
|
|
1773
1773
|
e,
|
|
1774
|
-
P(a, O ?
|
|
1774
|
+
P(a, O ? R.to : R.from, O ? "before" : "after"),
|
|
1775
1775
|
"line",
|
|
1776
1776
|
t,
|
|
1777
1777
|
i
|
|
@@ -1792,8 +1792,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1792
1792
|
function Nf(e, t, a, i, s, c, d) {
|
|
1793
1793
|
var p = qo(e, t, i, d), g = p.begin, v = p.end;
|
|
1794
1794
|
/\s/.test(t.text.charAt(v - 1)) && v--;
|
|
1795
|
-
for (var C = null, _ = null,
|
|
1796
|
-
var O = s[
|
|
1795
|
+
for (var C = null, _ = null, R = 0; R < s.length; R++) {
|
|
1796
|
+
var O = s[R];
|
|
1797
1797
|
if (!(O.from >= v || O.to <= g)) {
|
|
1798
1798
|
var B = O.level != 1, U = gn(e, i, B ? Math.min(v, O.to) - 1 : Math.max(g, O.from)).right, J = U < c ? c - U + 1e9 : U - c;
|
|
1799
1799
|
(!C || _ > J) && (C = O, _ = J);
|
|
@@ -1882,7 +1882,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1882
1882
|
if (t -= a[i].size, t < 0)
|
|
1883
1883
|
return i;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function At(e, t, a, i) {
|
|
1886
1886
|
t == null && (t = e.doc.first), a == null && (a = e.doc.first + e.doc.size), i || (i = 0);
|
|
1887
1887
|
var s = e.display;
|
|
1888
1888
|
if (i && a < s.viewTo && (s.updateLineNumbers == null || s.updateLineNumbers > t) && (s.updateLineNumbers = t), e.curOp.viewChanged = !0, t >= s.viewTo)
|
|
@@ -1994,7 +1994,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1994
1994
|
height: ` + (ge - le) + "px"));
|
|
1995
1995
|
}
|
|
1996
1996
|
function _(te, le, ve) {
|
|
1997
|
-
var ge = ce(s, te),
|
|
1997
|
+
var ge = ce(s, te), De = ge.text.length, We, yt;
|
|
1998
1998
|
function Ye(at, Ft) {
|
|
1999
1999
|
return Vi(e, P(te, at), "div", ge, Ft);
|
|
2000
2000
|
}
|
|
@@ -2003,23 +2003,23 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2003
2003
|
return Ye(tt, st)[st];
|
|
2004
2004
|
}
|
|
2005
2005
|
var Nt = Me(ge, s.direction);
|
|
2006
|
-
return
|
|
2007
|
-
var st = wt == "ltr", tt = Ye(at, st ? "left" : "right"), Rt = Ye(Ft - 1, st ? "right" : "left"), Rr = le == null && at == 0, qn = ve == null && Ft ==
|
|
2006
|
+
return Dn(Nt, le || 0, ve ?? De, function(at, Ft, wt, dt) {
|
|
2007
|
+
var st = wt == "ltr", tt = Ye(at, st ? "left" : "right"), Rt = Ye(Ft - 1, st ? "right" : "left"), Rr = le == null && at == 0, qn = ve == null && Ft == De, Tt = dt == 0, mn = !Nt || dt == Nt.length - 1;
|
|
2008
2008
|
if (Rt.top - tt.top <= 3) {
|
|
2009
2009
|
var bt = (v ? Rr : qn) && Tt, Is = (v ? qn : Rr) && mn, Ln = bt ? p : (st ? tt : Rt).left, nr = Is ? g : (st ? Rt : tt).right;
|
|
2010
2010
|
C(Ln, tt.top, nr - Ln, tt.bottom);
|
|
2011
2011
|
} else {
|
|
2012
|
-
var rr, Et, Mr,
|
|
2013
|
-
st ? (rr = v && Rr && Tt ? p : tt.left, Et = v ? g : Bt(at, wt, "before"), Mr = v ? p : Bt(Ft, wt, "after"),
|
|
2012
|
+
var rr, Et, Mr, Ds;
|
|
2013
|
+
st ? (rr = v && Rr && Tt ? p : tt.left, Et = v ? g : Bt(at, wt, "before"), Mr = v ? p : Bt(Ft, wt, "after"), Ds = v && qn && mn ? g : Rt.right) : (rr = v ? Bt(at, wt, "before") : p, Et = !v && Rr && Tt ? g : tt.right, Mr = !v && qn && mn ? p : Rt.left, Ds = v ? Bt(Ft, wt, "after") : g), C(rr, tt.top, Et - rr, tt.bottom), tt.bottom < Rt.top && C(p, tt.bottom, null, Rt.top), C(Mr, Rt.top, Ds - Mr, Rt.bottom);
|
|
2014
2014
|
}
|
|
2015
2015
|
(!We || Ji(tt, We) < 0) && (We = tt), Ji(Rt, We) < 0 && (We = Rt), (!yt || Ji(tt, yt) < 0) && (yt = tt), Ji(Rt, yt) < 0 && (yt = Rt);
|
|
2016
2016
|
}), { start: We, end: yt };
|
|
2017
2017
|
}
|
|
2018
|
-
var
|
|
2019
|
-
if (
|
|
2020
|
-
_(
|
|
2018
|
+
var R = t.from(), O = t.to();
|
|
2019
|
+
if (R.line == O.line)
|
|
2020
|
+
_(R.line, R.ch, O.ch);
|
|
2021
2021
|
else {
|
|
2022
|
-
var B = ce(s,
|
|
2022
|
+
var B = ce(s, R.line), U = ce(s, O.line), J = sn(B) == sn(U), ee = _(R.line, R.ch, J ? B.text.length + 1 : null).end, ae = _(O.line, J ? 0 : null, O.ch).start;
|
|
2023
2023
|
J && (ee.top < ae.top - 2 ? (C(ee.right, ee.top, null, ee.bottom), C(p, ae.top, ae.left, ae.bottom)) : C(ee.right, ee.top, ae.left - ee.right, ee.bottom)), ee.bottom < ae.top && C(p, ee.bottom, null, ae.top);
|
|
2024
2024
|
}
|
|
2025
2025
|
a.appendChild(c);
|
|
@@ -2060,8 +2060,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2060
2060
|
var _ = p.node.offsetTop + p.node.offsetHeight;
|
|
2061
2061
|
v = _ - a, a = _;
|
|
2062
2062
|
} else {
|
|
2063
|
-
var
|
|
2064
|
-
v =
|
|
2063
|
+
var R = p.node.getBoundingClientRect();
|
|
2064
|
+
v = R.bottom - R.top, !g && p.text.firstChild && (C = p.text.firstChild.getBoundingClientRect().right - R.left - 1);
|
|
2065
2065
|
}
|
|
2066
2066
|
var O = p.line.height - v;
|
|
2067
2067
|
if ((O > 5e-3 || O < -5e-3) && (s < i && (c -= O), jt(p.line, v), Jo(p.line), p.rest))
|
|
@@ -2138,8 +2138,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2138
2138
|
var C = Math.min(t.top, (v ? p : t.bottom) - c);
|
|
2139
2139
|
C != s && (d.scrollTop = C);
|
|
2140
2140
|
}
|
|
2141
|
-
var _ = e.options.fixedGutter ? 0 : a.gutters.offsetWidth,
|
|
2142
|
-
return B && (t.right = t.left + O), t.left < 10 ? d.scrollLeft = 0 : t.left <
|
|
2141
|
+
var _ = e.options.fixedGutter ? 0 : a.gutters.offsetWidth, R = e.curOp && e.curOp.scrollLeft != null ? e.curOp.scrollLeft : a.scroller.scrollLeft - _, O = Vn(e) - a.gutters.offsetWidth, B = t.right - t.left > O;
|
|
2142
|
+
return B && (t.right = t.left + O), t.left < 10 ? d.scrollLeft = 0 : t.left < R ? d.scrollLeft = Math.max(0, t.left + _ - (B ? 0 : 10)) : t.right > O + R - 3 && (d.scrollLeft = t.right + (B ? 0 : 10) - O), d;
|
|
2143
2143
|
}
|
|
2144
2144
|
function os(e, t) {
|
|
2145
2145
|
t != null && (Zi(e), e.curOp.scrollTop = (e.curOp.scrollTop == null ? e.doc.scrollTop : e.curOp.scrollTop) + t);
|
|
@@ -2422,8 +2422,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2422
2422
|
p && (i.state = p), c.styles = g.styles;
|
|
2423
2423
|
var v = c.styleClasses, C = g.classes;
|
|
2424
2424
|
C ? c.styleClasses = C : v && (c.styleClasses = null);
|
|
2425
|
-
for (var _ = !d || d.length != c.styles.length || v != C && (!v || !C || v.bgClass != C.bgClass || v.textClass != C.textClass),
|
|
2426
|
-
_ = d[
|
|
2425
|
+
for (var _ = !d || d.length != c.styles.length || v != C && (!v || !C || v.bgClass != C.bgClass || v.textClass != C.textClass), R = 0; !_ && R < d.length; ++R)
|
|
2426
|
+
_ = d[R] != c.styles[R];
|
|
2427
2427
|
_ && s.push(i.line), c.stateAfter = i.save(), i.nextLine();
|
|
2428
2428
|
} else
|
|
2429
2429
|
c.text.length <= e.options.maxHighlightLength && Pa(e, c.text, i), c.stateAfter = i.line % 5 == 0 ? i.save() : null, i.nextLine();
|
|
@@ -2453,17 +2453,17 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2453
2453
|
if (e.hasFocus())
|
|
2454
2454
|
return null;
|
|
2455
2455
|
var t = M(oe(e));
|
|
2456
|
-
if (!t || !
|
|
2456
|
+
if (!t || !D(e.display.lineDiv, t))
|
|
2457
2457
|
return null;
|
|
2458
2458
|
var a = { activeElt: t };
|
|
2459
2459
|
if (window.getSelection) {
|
|
2460
2460
|
var i = Z(e).getSelection();
|
|
2461
|
-
i.anchorNode && i.extend &&
|
|
2461
|
+
i.anchorNode && i.extend && D(e.display.lineDiv, i.anchorNode) && (a.anchorNode = i.anchorNode, a.anchorOffset = i.anchorOffset, a.focusNode = i.focusNode, a.focusOffset = i.focusOffset);
|
|
2462
2462
|
}
|
|
2463
2463
|
return a;
|
|
2464
2464
|
}
|
|
2465
2465
|
function Jf(e) {
|
|
2466
|
-
if (!(!e || !e.activeElt || e.activeElt == M(Te(e.activeElt))) && (e.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e.anchorNode &&
|
|
2466
|
+
if (!(!e || !e.activeElt || e.activeElt == M(Te(e.activeElt))) && (e.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e.anchorNode && D(document.body, e.anchorNode) && D(document.body, e.focusNode))) {
|
|
2467
2467
|
var t = e.activeElt.ownerDocument, a = t.defaultView.getSelection(), i = t.createRange();
|
|
2468
2468
|
i.setEnd(e.anchorNode, e.anchorOffset), i.collapse(!1), a.removeAllRanges(), a.addRange(i), a.extend(e.focusNode, e.focusOffset);
|
|
2469
2469
|
}
|
|
@@ -2516,8 +2516,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2516
2516
|
for (var g = i.view, v = i.viewFrom, C = 0; C < g.length; C++) {
|
|
2517
2517
|
var _ = g[C];
|
|
2518
2518
|
if (!_.hidden) if (!_.node || _.node.parentNode != c) {
|
|
2519
|
-
var
|
|
2520
|
-
c.insertBefore(
|
|
2519
|
+
var R = Cf(e, _, v, a);
|
|
2520
|
+
c.insertBefore(R, d);
|
|
2521
2521
|
} else {
|
|
2522
2522
|
for (; d != _.node; )
|
|
2523
2523
|
d = p(d);
|
|
@@ -2586,7 +2586,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2586
2586
|
t.style.display = a.length ? "" : "none", cs(e);
|
|
2587
2587
|
}
|
|
2588
2588
|
function li(e) {
|
|
2589
|
-
al(e.display),
|
|
2589
|
+
al(e.display), At(e), rl(e);
|
|
2590
2590
|
}
|
|
2591
2591
|
function Qf(e, t, a, i) {
|
|
2592
2592
|
var s = this;
|
|
@@ -2600,7 +2600,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2600
2600
|
s.mover = w("div", [c], null, "position: relative"), s.sizer = w("div", [s.mover], "CodeMirror-sizer"), s.sizerWidth = null, s.heightForcer = w("div", null, null, "position: absolute; height: " + Oe + "px; width: 1px;"), s.gutters = w("div", null, "CodeMirror-gutters"), s.lineGutter = null, s.scroller = w("div", [s.sizer, s.heightForcer, s.gutters], "CodeMirror-scroll"), s.scroller.setAttribute("tabIndex", "-1"), s.wrapper = w("div", [s.scrollbarFiller, s.gutterFiller, s.scroller], "CodeMirror"), L && W === 105 && (s.wrapper.style.clipPath = "inset(0px)"), s.wrapper.setAttribute("translate", "no"), m && k < 8 && (s.gutters.style.zIndex = -1, s.scroller.style.paddingRight = 0), !S && !(u && V) && (s.scroller.draggable = !0), e && (e.appendChild ? e.appendChild(s.wrapper) : e(s.wrapper)), s.viewFrom = s.viewTo = t.first, s.reportedViewFrom = s.reportedViewTo = t.first, s.view = [], s.renderedView = null, s.externalMeasured = null, s.viewOffset = 0, s.lastWrapHeight = s.lastWrapWidth = 0, s.updateLineNumbers = null, s.nativeBarWidth = s.barHeight = s.barWidth = 0, s.scrollbarsClipped = !1, s.lineNumWidth = s.lineNumInnerWidth = s.lineNumChars = null, s.alignWidgets = !1, s.cachedCharWidth = s.cachedTextHeight = s.cachedPaddingH = null, s.maxLine = null, s.maxLineLength = 0, s.maxLineChanged = !1, s.wheelDX = s.wheelDY = s.wheelStartX = s.wheelStartY = null, s.shift = !1, s.selForContextMenu = null, s.activeTouch = null, s.gutterSpecs = ds(i.gutters, i.lineNumbers), al(s), a.init(s);
|
|
2601
2601
|
}
|
|
2602
2602
|
var ta = 0, Tn = null;
|
|
2603
|
-
m ? Tn = -0.53 : u ? Tn = 15 : L ? Tn = -0.7 :
|
|
2603
|
+
m ? Tn = -0.53 : u ? Tn = 15 : L ? Tn = -0.7 : A && (Tn = -1 / 3);
|
|
2604
2604
|
function sl(e) {
|
|
2605
2605
|
var t = e.wheelDeltaX, a = e.wheelDeltaY;
|
|
2606
2606
|
return t == null && e.detail && e.axis == e.HORIZONTAL_AXIS && (t = e.detail), a == null && e.detail && e.axis == e.VERTICAL_AXIS ? a = e.detail : a == null && (a = e.wheelDelta), { x: t, y: a };
|
|
@@ -2619,8 +2619,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2619
2619
|
if (i && g || s && v) {
|
|
2620
2620
|
if (s && ne && S) {
|
|
2621
2621
|
e: for (var C = t.target, _ = d.view; C != p; C = C.parentNode)
|
|
2622
|
-
for (var
|
|
2623
|
-
if (_[
|
|
2622
|
+
for (var R = 0; R < _.length; R++)
|
|
2623
|
+
if (_[R].node == C) {
|
|
2624
2624
|
e.display.currentWheelTarget = C;
|
|
2625
2625
|
break e;
|
|
2626
2626
|
}
|
|
@@ -2681,19 +2681,19 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2681
2681
|
ze.prototype.from = function() {
|
|
2682
2682
|
return vr(this.anchor, this.head);
|
|
2683
2683
|
}, ze.prototype.to = function() {
|
|
2684
|
-
return
|
|
2684
|
+
return Dt(this.anchor, this.head);
|
|
2685
2685
|
}, ze.prototype.empty = function() {
|
|
2686
2686
|
return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
|
|
2687
2687
|
};
|
|
2688
2688
|
function ln(e, t, a) {
|
|
2689
2689
|
var i = e && e.options.selectionsMayTouch, s = t[a];
|
|
2690
|
-
t.sort(function(
|
|
2691
|
-
return re(
|
|
2690
|
+
t.sort(function(R, O) {
|
|
2691
|
+
return re(R.from(), O.from());
|
|
2692
2692
|
}), a = we(t, s);
|
|
2693
2693
|
for (var c = 1; c < t.length; c++) {
|
|
2694
2694
|
var d = t[c], p = t[c - 1], g = re(p.to(), d.from());
|
|
2695
2695
|
if (i && !d.empty() ? g > 0 : g >= 0) {
|
|
2696
|
-
var v = vr(p.from(), d.from()), C =
|
|
2696
|
+
var v = vr(p.from(), d.from()), C = Dt(p.to(), d.to()), _ = p.empty() ? d.from() == d.head : p.from() == p.head;
|
|
2697
2697
|
c <= a && --a, t.splice(--c, 2, new ze(_ ? C : v, _ ? v : C));
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
@@ -2746,7 +2746,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2746
2746
|
function ui(e) {
|
|
2747
2747
|
e.doc.iter(function(t) {
|
|
2748
2748
|
t.stateAfter && (t.stateAfter = null), t.styles && (t.styles = null);
|
|
2749
|
-
}), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, oi(e, 100), e.state.modeGen++, e.curOp &&
|
|
2749
|
+
}), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, oi(e, 100), e.state.modeGen++, e.curOp && At(e);
|
|
2750
2750
|
}
|
|
2751
2751
|
function cl(e, t) {
|
|
2752
2752
|
return t.from.ch == 0 && t.to.ch == 0 && be(t.text) == "" && (!e.cm || e.cm.options.wholeLineUpdateBefore);
|
|
@@ -2763,7 +2763,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2763
2763
|
le.push(new yr(v[ve], s(ve), i));
|
|
2764
2764
|
return le;
|
|
2765
2765
|
}
|
|
2766
|
-
var p = t.from, g = t.to, v = t.text, C = ce(e, p.line), _ = ce(e, g.line),
|
|
2766
|
+
var p = t.from, g = t.to, v = t.text, C = ce(e, p.line), _ = ce(e, g.line), R = be(v), O = s(v.length - 1), B = g.line - p.line;
|
|
2767
2767
|
if (t.full)
|
|
2768
2768
|
e.insert(0, d(0, v.length)), e.remove(v.length, e.size - v.length);
|
|
2769
2769
|
else if (cl(e, t)) {
|
|
@@ -2771,15 +2771,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2771
2771
|
c(_, _.text, O), B && e.remove(p.line, B), U.length && e.insert(p.line, U);
|
|
2772
2772
|
} else if (C == _)
|
|
2773
2773
|
if (v.length == 1)
|
|
2774
|
-
c(C, C.text.slice(0, p.ch) +
|
|
2774
|
+
c(C, C.text.slice(0, p.ch) + R + C.text.slice(g.ch), O);
|
|
2775
2775
|
else {
|
|
2776
2776
|
var J = d(1, v.length - 1);
|
|
2777
|
-
J.push(new yr(
|
|
2777
|
+
J.push(new yr(R + C.text.slice(g.ch), O, i)), c(C, C.text.slice(0, p.ch) + v[0], s(0)), e.insert(p.line + 1, J);
|
|
2778
2778
|
}
|
|
2779
2779
|
else if (v.length == 1)
|
|
2780
2780
|
c(C, C.text.slice(0, p.ch) + v[0] + _.text.slice(g.ch), s(0)), e.remove(p.line + 1, B);
|
|
2781
2781
|
else {
|
|
2782
|
-
c(C, C.text.slice(0, p.ch) + v[0], s(0)), c(_,
|
|
2782
|
+
c(C, C.text.slice(0, p.ch) + v[0], s(0)), c(_, R + _.text.slice(g.ch), O);
|
|
2783
2783
|
var ee = d(1, v.length - 1);
|
|
2784
2784
|
B > 1 && e.remove(p.line + 1, B - 1), e.insert(p.line + 1, ee);
|
|
2785
2785
|
}
|
|
@@ -2801,14 +2801,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2801
2801
|
function fl(e, t) {
|
|
2802
2802
|
if (t.cm)
|
|
2803
2803
|
throw new Error("This document is already in use.");
|
|
2804
|
-
e.doc = t, t.cm = e, ts(e), ps(e), dl(e), e.options.direction = t.direction, e.options.lineWrapping || qa(e), e.options.mode = t.modeOption,
|
|
2804
|
+
e.doc = t, t.cm = e, ts(e), ps(e), dl(e), e.options.direction = t.direction, e.options.lineWrapping || qa(e), e.options.mode = t.modeOption, At(e);
|
|
2805
2805
|
}
|
|
2806
2806
|
function dl(e) {
|
|
2807
2807
|
(e.doc.direction == "rtl" ? K : $e)(e.display.lineDiv, "CodeMirror-rtl");
|
|
2808
2808
|
}
|
|
2809
2809
|
function td(e) {
|
|
2810
2810
|
zt(e, function() {
|
|
2811
|
-
dl(e),
|
|
2811
|
+
dl(e), At(e);
|
|
2812
2812
|
});
|
|
2813
2813
|
}
|
|
2814
2814
|
function na(e) {
|
|
@@ -3005,8 +3005,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3005
3005
|
if (!g.atomic)
|
|
3006
3006
|
continue;
|
|
3007
3007
|
if (a) {
|
|
3008
|
-
var _ = g.find(i < 0 ? 1 : -1),
|
|
3009
|
-
if ((i < 0 ? C : v) && (_ = Sl(e, _, -i, _ && _.line == t.line ? c : null)), _ && _.line == t.line && (
|
|
3008
|
+
var _ = g.find(i < 0 ? 1 : -1), R = void 0;
|
|
3009
|
+
if ((i < 0 ? C : v) && (_ = Sl(e, _, -i, _ && _.line == t.line ? c : null)), _ && _.line == t.line && (R = re(_, a)) && (i < 0 ? R < 0 : R > 0))
|
|
3010
3010
|
return Lr(e, _, t, i, s);
|
|
3011
3011
|
}
|
|
3012
3012
|
var O = g.find(i < 0 ? -1 : 1);
|
|
@@ -3062,7 +3062,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3062
3062
|
pl(e, t, a, e.cm ? e.cm.curOp.id : NaN), ci(e, t, a, Ba(e, t));
|
|
3063
3063
|
var i = [];
|
|
3064
3064
|
Hn(e, function(s, c) {
|
|
3065
|
-
!c && we(i, s.history) == -1 && (
|
|
3065
|
+
!c && we(i, s.history) == -1 && (Dl(s.history, t), i.push(s.history)), ci(s, t, null, Ba(s, t));
|
|
3066
3066
|
});
|
|
3067
3067
|
}
|
|
3068
3068
|
}
|
|
@@ -3086,7 +3086,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3086
3086
|
break;
|
|
3087
3087
|
var C = [];
|
|
3088
3088
|
ra(d, g), g.push({ changes: C, generation: s.generation }), s.generation = c.generation || ++s.maxGeneration;
|
|
3089
|
-
for (var _ = Pt(e, "beforeChange") || e.cm && Pt(e.cm, "beforeChange"),
|
|
3089
|
+
for (var _ = Pt(e, "beforeChange") || e.cm && Pt(e.cm, "beforeChange"), R = function(U) {
|
|
3090
3090
|
var J = c.changes[U];
|
|
3091
3091
|
if (J.origin = t, _ && !Tl(e, J, !1))
|
|
3092
3092
|
return p.length = 0, {};
|
|
@@ -3095,10 +3095,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3095
3095
|
ci(e, J, ee, ml(e, J)), !U && e.cm && e.cm.scrollIntoView({ from: J.from, to: Bn(J) });
|
|
3096
3096
|
var ae = [];
|
|
3097
3097
|
Hn(e, function(te, le) {
|
|
3098
|
-
!le && we(ae, te.history) == -1 && (
|
|
3098
|
+
!le && we(ae, te.history) == -1 && (Dl(te.history, J), ae.push(te.history)), ci(te, J, null, ml(te, J));
|
|
3099
3099
|
});
|
|
3100
3100
|
}, O = c.changes.length - 1; O >= 0; --O) {
|
|
3101
|
-
var B =
|
|
3101
|
+
var B = R(O);
|
|
3102
3102
|
if (B) return B.v;
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
@@ -3111,7 +3111,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3111
3111
|
P(s.head.line + t, s.head.ch)
|
|
3112
3112
|
);
|
|
3113
3113
|
}), e.sel.primIndex), e.cm)) {
|
|
3114
|
-
|
|
3114
|
+
At(e.cm, e.first, e.first - t, t);
|
|
3115
3115
|
for (var a = e.cm.display, i = a.viewFrom; i < a.viewTo; i++)
|
|
3116
3116
|
$n(e.cm, i, "gutter");
|
|
3117
3117
|
}
|
|
@@ -3152,17 +3152,17 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3152
3152
|
B > s.maxLineLength && (s.maxLine = O, s.maxLineLength = B, s.maxLineChanged = !0, p = !1);
|
|
3153
3153
|
}), p && (e.curOp.updateMaxLine = !0)), Jc(i, c.line), oi(e, 400);
|
|
3154
3154
|
var v = t.text.length - (d.line - c.line) - 1;
|
|
3155
|
-
t.full ?
|
|
3155
|
+
t.full ? At(e) : c.line == d.line && t.text.length == 1 && !cl(e.doc, t) ? $n(e, c.line, "text") : At(e, c.line, d.line + 1, v);
|
|
3156
3156
|
var C = Pt(e, "changes"), _ = Pt(e, "change");
|
|
3157
3157
|
if (_ || C) {
|
|
3158
|
-
var
|
|
3158
|
+
var R = {
|
|
3159
3159
|
from: c,
|
|
3160
3160
|
to: d,
|
|
3161
3161
|
text: t.text,
|
|
3162
3162
|
removed: t.removed,
|
|
3163
3163
|
origin: t.origin
|
|
3164
3164
|
};
|
|
3165
|
-
_ && gt(e, "change", e,
|
|
3165
|
+
_ && gt(e, "change", e, R), C && (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(R);
|
|
3166
3166
|
}
|
|
3167
3167
|
e.display.selForContextMenu = null;
|
|
3168
3168
|
}
|
|
@@ -3194,7 +3194,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3194
3194
|
d || (e.splice(0, s + 1), s = 0);
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
|
-
function
|
|
3197
|
+
function Dl(e, t) {
|
|
3198
3198
|
var a = t.from.line, i = t.to.line, s = t.text.length - (i - a) - 1;
|
|
3199
3199
|
Il(e.done, a, i, s), Il(e.undone, a, i, s);
|
|
3200
3200
|
}
|
|
@@ -3336,7 +3336,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3336
3336
|
t.length || (a.widgets = null);
|
|
3337
3337
|
var c = ei(this);
|
|
3338
3338
|
jt(a, Math.max(0, a.height - c)), e && (zt(e, function() {
|
|
3339
|
-
|
|
3339
|
+
Al(e, a, -c), $n(e, i, "widget");
|
|
3340
3340
|
}), gt(e, "lineWidgetCleared", e, this, i));
|
|
3341
3341
|
}
|
|
3342
3342
|
}, pi.prototype.changed = function() {
|
|
@@ -3344,10 +3344,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3344
3344
|
this.height = null;
|
|
3345
3345
|
var s = ei(this) - t;
|
|
3346
3346
|
s && (Mn(this.doc, i) || jt(i, i.height + s), a && zt(a, function() {
|
|
3347
|
-
a.curOp.forceUpdate = !0,
|
|
3347
|
+
a.curOp.forceUpdate = !0, Al(a, i, s), gt(a, "lineWidgetChanged", a, e, b(i));
|
|
3348
3348
|
}));
|
|
3349
3349
|
}, en(pi);
|
|
3350
|
-
function
|
|
3350
|
+
function Al(e, t, a) {
|
|
3351
3351
|
Sn(t) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && os(e, a);
|
|
3352
3352
|
}
|
|
3353
3353
|
function ud(e, t, a, i) {
|
|
@@ -3380,7 +3380,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3380
3380
|
var v = sn(this.lines[g]), C = qi(v);
|
|
3381
3381
|
C > e.display.maxLineLength && (e.display.maxLine = v, e.display.maxLineLength = C, e.display.maxLineChanged = !0);
|
|
3382
3382
|
}
|
|
3383
|
-
i != null && e && this.collapsed &&
|
|
3383
|
+
i != null && e && this.collapsed && At(e, i, s + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, e && wl(e.doc)), e && gt(e, "markerCleared", e, this, i, s), t && tr(e), this.parent && this.parent.clear();
|
|
3384
3384
|
}
|
|
3385
3385
|
}, Wn.prototype.find = function(e, t) {
|
|
3386
3386
|
e == null && this.type == "bookmark" && (e = 1);
|
|
@@ -3416,11 +3416,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3416
3416
|
(t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this);
|
|
3417
3417
|
}
|
|
3418
3418
|
}, en(Wn);
|
|
3419
|
-
function
|
|
3419
|
+
function Dr(e, t, a, i, s) {
|
|
3420
3420
|
if (i && i.shared)
|
|
3421
3421
|
return cd(e, t, a, i, s);
|
|
3422
3422
|
if (e.cm && !e.cm.curOp)
|
|
3423
|
-
return mt(e.cm,
|
|
3423
|
+
return mt(e.cm, Dr)(e, t, a, i, s);
|
|
3424
3424
|
var c = new Wn(e, s), d = re(t, a);
|
|
3425
3425
|
if (i && ke(i, c, !1), d > 0 || d == 0 && c.clearWhenEmpty !== !1)
|
|
3426
3426
|
return c;
|
|
@@ -3443,7 +3443,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3443
3443
|
return c.clear();
|
|
3444
3444
|
}), c.readOnly && (Yc(), (e.history.done.length || e.history.undone.length) && e.clearHistory()), c.collapsed && (c.id = ++Ol, c.atomic = !0), g) {
|
|
3445
3445
|
if (v && (g.curOp.updateMaxLine = !0), c.collapsed)
|
|
3446
|
-
|
|
3446
|
+
At(g, t.line, a.line + 1);
|
|
3447
3447
|
else if (c.className || c.startStyle || c.endStyle || c.css || c.attributes || c.title)
|
|
3448
3448
|
for (var C = t.line; C <= a.line; C++)
|
|
3449
3449
|
$n(g, C, "text");
|
|
@@ -3468,9 +3468,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3468
3468
|
}, en(gi);
|
|
3469
3469
|
function cd(e, t, a, i, s) {
|
|
3470
3470
|
i = ke(i), i.shared = !1;
|
|
3471
|
-
var c = [
|
|
3471
|
+
var c = [Dr(e, t, a, i, s)], d = c[0], p = i.widgetNode;
|
|
3472
3472
|
return Hn(e, function(g) {
|
|
3473
|
-
p && (i.widgetNode = p.cloneNode(!0)), c.push(
|
|
3473
|
+
p && (i.widgetNode = p.cloneNode(!0)), c.push(Dr(g, Ce(g, t), Ce(g, a), i, s));
|
|
3474
3474
|
for (var v = 0; v < g.linked.length; ++v)
|
|
3475
3475
|
if (g.linked[v].isParent)
|
|
3476
3476
|
return;
|
|
@@ -3486,7 +3486,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3486
3486
|
for (var a = 0; a < t.length; a++) {
|
|
3487
3487
|
var i = t[a], s = i.find(), c = e.clipPos(s.from), d = e.clipPos(s.to);
|
|
3488
3488
|
if (re(c, d)) {
|
|
3489
|
-
var p =
|
|
3489
|
+
var p = Dr(e, c, d, i.primary, i.primary.type);
|
|
3490
3490
|
i.markers.push(p), p.parent = i;
|
|
3491
3491
|
}
|
|
3492
3492
|
}
|
|
@@ -3764,7 +3764,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3764
3764
|
e.clear();
|
|
3765
3765
|
},
|
|
3766
3766
|
markText: function(e, t, a) {
|
|
3767
|
-
return
|
|
3767
|
+
return Dr(this, Ce(this, e), Ce(this, t), a, a && a.type || "range");
|
|
3768
3768
|
},
|
|
3769
3769
|
setBookmark: function(e, t) {
|
|
3770
3770
|
var a = {
|
|
@@ -3774,7 +3774,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3774
3774
|
shared: t && t.shared,
|
|
3775
3775
|
handleMouseEvents: t && t.handleMouseEvents
|
|
3776
3776
|
};
|
|
3777
|
-
return e = Ce(this, e),
|
|
3777
|
+
return e = Ce(this, e), Dr(this, e, e, a, "bookmark");
|
|
3778
3778
|
},
|
|
3779
3779
|
findMarksAt: function(e) {
|
|
3780
3780
|
e = Ce(this, e);
|
|
@@ -3935,8 +3935,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3935
3935
|
if (C) {
|
|
3936
3936
|
var _;
|
|
3937
3937
|
if (t.state.draggingText && !t.state.draggingText.copy && (_ = t.listSelections()), aa(t.doc, zn(a, a)), _)
|
|
3938
|
-
for (var
|
|
3939
|
-
Ir(t.doc, "", _[
|
|
3938
|
+
for (var R = 0; R < _.length; ++R)
|
|
3939
|
+
Ir(t.doc, "", _[R].anchor, _[R].head, "drag");
|
|
3940
3940
|
t.replaceSelection(C, "around", "paste"), t.display.input.focus();
|
|
3941
3941
|
}
|
|
3942
3942
|
} catch {
|
|
@@ -3949,7 +3949,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3949
3949
|
On(t);
|
|
3950
3950
|
return;
|
|
3951
3951
|
}
|
|
3952
|
-
if (!(Ze(e, t) || Cn(e.display, t)) && (t.dataTransfer.setData("Text", e.getSelection()), t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setDragImage && !
|
|
3952
|
+
if (!(Ze(e, t) || Cn(e.display, t)) && (t.dataTransfer.setData("Text", e.getSelection()), t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setDragImage && !A)) {
|
|
3953
3953
|
var a = w("img", null, null, "position: fixed; left: 0; top: 0;");
|
|
3954
3954
|
a.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", z && (a.width = a.height = 1, e.display.wrapper.appendChild(a), a._top = a.offsetTop), t.dataTransfer.setDragImage(a, 0, 0), z && a.parentNode.removeChild(a);
|
|
3955
3955
|
}
|
|
@@ -4195,7 +4195,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4195
4195
|
e[v] = t[v];
|
|
4196
4196
|
return e;
|
|
4197
4197
|
}
|
|
4198
|
-
function
|
|
4198
|
+
function Ar(e, t, a, i) {
|
|
4199
4199
|
t = ua(t);
|
|
4200
4200
|
var s = t.call ? t.call(e, i) : t[e];
|
|
4201
4201
|
if (s === !1)
|
|
@@ -4206,9 +4206,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4206
4206
|
return "handled";
|
|
4207
4207
|
if (t.fallthrough) {
|
|
4208
4208
|
if (Object.prototype.toString.call(t.fallthrough) != "[object Array]")
|
|
4209
|
-
return
|
|
4209
|
+
return Ar(e, t.fallthrough, a, i);
|
|
4210
4210
|
for (var c = 0; c < t.fallthrough.length; c++) {
|
|
4211
|
-
var d =
|
|
4211
|
+
var d = Ar(e, t.fallthrough[c], a, i);
|
|
4212
4212
|
if (d)
|
|
4213
4213
|
return d;
|
|
4214
4214
|
}
|
|
@@ -4220,7 +4220,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4220
4220
|
}
|
|
4221
4221
|
function zl(e, t, a) {
|
|
4222
4222
|
var i = e;
|
|
4223
|
-
return t.altKey && i != "Alt" && (e = "Alt-" + e), (
|
|
4223
|
+
return t.altKey && i != "Alt" && (e = "Alt-" + e), (Ae ? t.metaKey : t.ctrlKey) && i != "Ctrl" && (e = "Ctrl-" + e), (Ae ? t.ctrlKey : t.metaKey) && i != "Mod" && (e = "Cmd-" + e), !a && t.shiftKey && i != "Shift" && (e = "Shift-" + e), e;
|
|
4224
4224
|
}
|
|
4225
4225
|
function Bl(e, t) {
|
|
4226
4226
|
if (z && e.keyCode == 34 && e.char)
|
|
@@ -4266,8 +4266,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4266
4266
|
var C = xr(t, a);
|
|
4267
4267
|
v = s < 0 ? a.text.length - 1 : 0;
|
|
4268
4268
|
var _ = gn(t, C, v).top;
|
|
4269
|
-
v = Xt(function(
|
|
4270
|
-
return gn(t, C,
|
|
4269
|
+
v = Xt(function(R) {
|
|
4270
|
+
return gn(t, C, R).top == _;
|
|
4271
4271
|
}, s < 0 == (d.level == 1) ? d.from : d.to - 1, v), g == "before" && (v = bs(a, v, 1));
|
|
4272
4272
|
} else
|
|
4273
4273
|
v = s < 0 ? d.to : d.from;
|
|
@@ -4281,7 +4281,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4281
4281
|
if (!s)
|
|
4282
4282
|
return xs(t, a, i);
|
|
4283
4283
|
a.ch >= t.text.length ? (a.ch = t.text.length, a.sticky = "before") : a.ch <= 0 && (a.ch = 0, a.sticky = "after");
|
|
4284
|
-
var c =
|
|
4284
|
+
var c = An(s, a.ch, a.sticky), d = s[c];
|
|
4285
4285
|
if (e.doc.direction == "ltr" && d.level % 2 == 0 && (i > 0 ? d.to > a.ch : d.from < a.ch))
|
|
4286
4286
|
return xs(t, a, i);
|
|
4287
4287
|
var p = function(ee, ae) {
|
|
@@ -4290,19 +4290,19 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4290
4290
|
return e.options.lineWrapping ? (g = g || xr(e, t), Uo(e, t, g, ee)) : { begin: 0, end: t.text.length };
|
|
4291
4291
|
}, C = v(a.sticky == "before" ? p(a, -1) : a.ch);
|
|
4292
4292
|
if (e.doc.direction == "rtl" || d.level == 1) {
|
|
4293
|
-
var _ = d.level == 1 == i < 0,
|
|
4294
|
-
if (
|
|
4293
|
+
var _ = d.level == 1 == i < 0, R = p(a, _ ? 1 : -1);
|
|
4294
|
+
if (R != null && (_ ? R <= d.to && R <= C.end : R >= d.from && R >= C.begin)) {
|
|
4295
4295
|
var O = _ ? "before" : "after";
|
|
4296
|
-
return new P(a.line,
|
|
4296
|
+
return new P(a.line, R, O);
|
|
4297
4297
|
}
|
|
4298
4298
|
}
|
|
4299
4299
|
var B = function(ee, ae, te) {
|
|
4300
4300
|
for (var le = function(We, yt) {
|
|
4301
4301
|
return yt ? new P(a.line, p(We, 1), "before") : new P(a.line, We, "after");
|
|
4302
4302
|
}; ee >= 0 && ee < s.length; ee += ae) {
|
|
4303
|
-
var ve = s[ee], ge = ae > 0 == (ve.level != 1),
|
|
4304
|
-
if (ve.from <=
|
|
4305
|
-
return le(
|
|
4303
|
+
var ve = s[ee], ge = ae > 0 == (ve.level != 1), De = ge ? te.begin : p(te.end, -1);
|
|
4304
|
+
if (ve.from <= De && De < ve.to || (De = ge ? ve.from : p(ve.to, -1), te.begin <= De && De < te.end))
|
|
4305
|
+
return le(De, ge);
|
|
4306
4306
|
}
|
|
4307
4307
|
}, U = B(c + i, i, C);
|
|
4308
4308
|
if (U)
|
|
@@ -4571,11 +4571,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4571
4571
|
}
|
|
4572
4572
|
function Cd(e, t, a) {
|
|
4573
4573
|
for (var i = 0; i < e.state.keyMaps.length; i++) {
|
|
4574
|
-
var s =
|
|
4574
|
+
var s = Ar(t, e.state.keyMaps[i], a, e);
|
|
4575
4575
|
if (s)
|
|
4576
4576
|
return s;
|
|
4577
4577
|
}
|
|
4578
|
-
return e.options.extraKeys &&
|
|
4578
|
+
return e.options.extraKeys && Ar(t, e.options.extraKeys, a, e) || Ar(t, e.options.keyMap, a, e);
|
|
4579
4579
|
}
|
|
4580
4580
|
var Td = new lt();
|
|
4581
4581
|
function bi(e, t, a, i) {
|
|
@@ -4668,13 +4668,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4668
4668
|
}
|
|
4669
4669
|
if (!Cs(t, e)) {
|
|
4670
4670
|
var i = Jn(t, e), s = tn(e), c = i ? Id(i, s) : "single";
|
|
4671
|
-
Z(t).focus(), s == 1 && t.state.selectingText && t.state.selectingText(e), !(i &&
|
|
4671
|
+
Z(t).focus(), s == 1 && t.state.selectingText && t.state.selectingText(e), !(i && Dd(t, s, i, c, e)) && (s == 1 ? i ? Od(t, i, c, e) : Gr(e) == a.scroller && St(e) : s == 2 ? (i && ia(t.doc, i), setTimeout(function() {
|
|
4672
4672
|
return a.input.focus();
|
|
4673
4673
|
}, 20)) : s == 3 && (Fe ? t.display.input.onContextMenu(e) : is(t)));
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
}
|
|
4677
|
-
function
|
|
4677
|
+
function Dd(e, t, a, i, s) {
|
|
4678
4678
|
var c = "Click";
|
|
4679
4679
|
return i == "double" ? c = "Double" + c : i == "triple" && (c = "Triple" + c), c = (t == 1 ? "Left" : t == 2 ? "Middle" : "Right") + c, bi(e, zl(c, s), s, function(d) {
|
|
4680
4680
|
if (typeof d == "string" && (d = yi[d]), !d)
|
|
@@ -4688,7 +4688,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4688
4688
|
return p;
|
|
4689
4689
|
});
|
|
4690
4690
|
}
|
|
4691
|
-
function
|
|
4691
|
+
function Ad(e, t, a) {
|
|
4692
4692
|
var i = e.getOption("configureMouse"), s = i ? i(e, t, a) : {};
|
|
4693
4693
|
if (s.unit == null) {
|
|
4694
4694
|
var c = ue ? a.shiftKey && a.metaKey : a.altKey;
|
|
@@ -4698,12 +4698,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4698
4698
|
}
|
|
4699
4699
|
function Od(e, t, a, i) {
|
|
4700
4700
|
m ? setTimeout(fe(Xo, e), 0) : e.curOp.focus = M(oe(e));
|
|
4701
|
-
var s =
|
|
4701
|
+
var s = Ad(e, a, i), c = e.doc.sel, d;
|
|
4702
4702
|
e.options.dragDrop && Ma && !e.isReadOnly() && a == "single" && (d = c.contains(t)) > -1 && (re((d = c.ranges[d]).from(), t) < 0 || t.xRel > 0) && (re(d.to(), t) > 0 || t.xRel < 0) ? Nd(e, i, t, s) : Fd(e, i, t, s);
|
|
4703
4703
|
}
|
|
4704
4704
|
function Nd(e, t, a, i) {
|
|
4705
4705
|
var s = e.display, c = !1, d = mt(e, function(v) {
|
|
4706
|
-
S && (s.scroller.draggable = !1), e.state.draggingText = !1, e.state.delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = !1 : is(e)), kt(s.wrapper.ownerDocument, "mouseup", d), kt(s.wrapper.ownerDocument, "mousemove", p), kt(s.scroller, "dragstart", g), kt(s.scroller, "drop", d), c || (St(v), i.addNew || ia(e.doc, a, null, null, i.extend), S && !
|
|
4706
|
+
S && (s.scroller.draggable = !1), e.state.draggingText = !1, e.state.delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = !1 : is(e)), kt(s.wrapper.ownerDocument, "mouseup", d), kt(s.wrapper.ownerDocument, "mousemove", p), kt(s.scroller, "dragstart", g), kt(s.scroller, "drop", d), c || (St(v), i.addNew || ia(e.doc, a, null, null, i.extend), S && !A || m && k == 9 ? setTimeout(function() {
|
|
4707
4707
|
s.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), s.input.focus();
|
|
4708
4708
|
}, 20) : s.input.focus());
|
|
4709
4709
|
}), p = function(v) {
|
|
@@ -4746,10 +4746,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4746
4746
|
{ scroll: !1, origin: "*mouse" }
|
|
4747
4747
|
), g = c.sel) : ys(c, p, d, Mt) : (p = 0, Ct(c, new qt([d], 0), Mt), g = c.sel);
|
|
4748
4748
|
var _ = a;
|
|
4749
|
-
function
|
|
4749
|
+
function R(te) {
|
|
4750
4750
|
if (re(_, te) != 0)
|
|
4751
4751
|
if (_ = te, i.unit == "rectangle") {
|
|
4752
|
-
for (var le = [], ve = e.options.tabSize, ge = _e(ce(c, a.line).text, a.ch, ve),
|
|
4752
|
+
for (var le = [], ve = e.options.tabSize, ge = _e(ce(c, a.line).text, a.ch, ve), De = _e(ce(c, te.line).text, te.ch, ve), We = Math.min(ge, De), yt = Math.max(ge, De), Ye = Math.min(a.line, te.line), Bt = Math.min(e.lastLine(), Math.max(a.line, te.line)); Ye <= Bt; Ye++) {
|
|
4753
4753
|
var Nt = ce(c, Ye).text, at = ft(Nt, We, ve);
|
|
4754
4754
|
We == yt ? le.push(new ze(P(Ye, at), P(Ye, at))) : Nt.length > at && le.push(new ze(P(Ye, at), P(Ye, ft(Nt, yt, ve))));
|
|
4755
4755
|
}
|
|
@@ -4760,7 +4760,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4760
4760
|
), e.scrollIntoView(te);
|
|
4761
4761
|
} else {
|
|
4762
4762
|
var Ft = d, wt = Xl(e, te, i.unit), dt = Ft.anchor, st;
|
|
4763
|
-
re(wt.anchor, dt) > 0 ? (st = wt.head, dt = vr(Ft.from(), wt.anchor)) : (st = wt.anchor, dt =
|
|
4763
|
+
re(wt.anchor, dt) > 0 ? (st = wt.head, dt = vr(Ft.from(), wt.anchor)) : (st = wt.anchor, dt = Dt(Ft.to(), wt.head));
|
|
4764
4764
|
var tt = g.ranges.slice(0);
|
|
4765
4765
|
tt[p] = Rd(e, new ze(Ce(c, dt), st)), Ct(c, ln(e, tt, p), Mt);
|
|
4766
4766
|
}
|
|
@@ -4770,15 +4770,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4770
4770
|
var le = ++B, ve = Jn(e, te, !0, i.unit == "rectangle");
|
|
4771
4771
|
if (ve)
|
|
4772
4772
|
if (re(ve, _) != 0) {
|
|
4773
|
-
e.curOp.focus = M(oe(e)),
|
|
4773
|
+
e.curOp.focus = M(oe(e)), R(ve);
|
|
4774
4774
|
var ge = Qi(s, c);
|
|
4775
4775
|
(ve.line >= ge.to || ve.line < ge.from) && setTimeout(mt(e, function() {
|
|
4776
4776
|
B == le && U(te);
|
|
4777
4777
|
}), 150);
|
|
4778
4778
|
} else {
|
|
4779
|
-
var
|
|
4780
|
-
|
|
4781
|
-
B == le && (s.scroller.scrollTop +=
|
|
4779
|
+
var De = te.clientY < O.top ? -20 : te.clientY > O.bottom ? 20 : 0;
|
|
4780
|
+
De && setTimeout(mt(e, function() {
|
|
4781
|
+
B == le && (s.scroller.scrollTop += De, U(te));
|
|
4782
4782
|
}), 50);
|
|
4783
4783
|
}
|
|
4784
4784
|
}
|
|
@@ -4797,7 +4797,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4797
4797
|
var c = Me(s);
|
|
4798
4798
|
if (!c)
|
|
4799
4799
|
return t;
|
|
4800
|
-
var d =
|
|
4800
|
+
var d = An(c, a.ch, a.sticky), p = c[d];
|
|
4801
4801
|
if (p.from != a.ch && p.to != a.ch)
|
|
4802
4802
|
return t;
|
|
4803
4803
|
var g = d + (p.from == a.ch == (p.level != 1) ? 0 : 1);
|
|
@@ -4807,10 +4807,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4807
4807
|
if (i.line != a.line)
|
|
4808
4808
|
v = (i.line - a.line) * (e.doc.direction == "ltr" ? 1 : -1) > 0;
|
|
4809
4809
|
else {
|
|
4810
|
-
var C =
|
|
4810
|
+
var C = An(c, i.ch, i.sticky), _ = C - d || (i.ch - a.ch) * (p.level == 1 ? -1 : 1);
|
|
4811
4811
|
C == g - 1 || C == g ? v = _ < 0 : v = _ > 0;
|
|
4812
4812
|
}
|
|
4813
|
-
var
|
|
4813
|
+
var R = c[g + (v ? -1 : 0)], O = v == (R.level == 1), B = O ? R.from : R.to, U = O ? "after" : "before";
|
|
4814
4814
|
return a.ch == B && a.sticky == U ? t : new ze(new P(a.line, B, U), i);
|
|
4815
4815
|
}
|
|
4816
4816
|
function Jl(e, t, a, i) {
|
|
@@ -4865,7 +4865,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4865
4865
|
}, !0), a("mode", null, function(i, s) {
|
|
4866
4866
|
i.doc.modeOption = s, ps(i);
|
|
4867
4867
|
}, !0), a("indentUnit", 2, ps, !0), a("indentWithTabs", !1), a("smartIndent", !0), a("tabSize", 4, function(i) {
|
|
4868
|
-
ui(i), ti(i),
|
|
4868
|
+
ui(i), ti(i), At(i);
|
|
4869
4869
|
}, !0), a("lineSeparator", null, function(i, s) {
|
|
4870
4870
|
if (i.doc.lineSep = s, !!s) {
|
|
4871
4871
|
var c = [], d = i.doc.first;
|
|
@@ -4936,7 +4936,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4936
4936
|
}
|
|
4937
4937
|
}
|
|
4938
4938
|
function zd(e) {
|
|
4939
|
-
e.options.lineWrapping ? (K(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer.style.minWidth = "", e.display.sizerWidth = null) : ($e(e.display.wrapper, "CodeMirror-wrap"), qa(e)), ts(e),
|
|
4939
|
+
e.options.lineWrapping ? (K(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer.style.minWidth = "", e.display.sizerWidth = null) : ($e(e.display.wrapper, "CodeMirror-wrap"), qa(e)), ts(e), At(e), ti(e), setTimeout(function() {
|
|
4940
4940
|
return Tr(e);
|
|
4941
4941
|
}, 100);
|
|
4942
4942
|
}
|
|
@@ -5088,11 +5088,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5088
5088
|
a = "prev";
|
|
5089
5089
|
}
|
|
5090
5090
|
a == "prev" ? t > s.first ? C = _e(ce(s, t - 1).text, null, d) : C = 0 : a == "add" ? C = g + e.options.indentUnit : a == "subtract" ? C = g - e.options.indentUnit : typeof a == "number" && (C = g + a), C = Math.max(0, C);
|
|
5091
|
-
var _ = "",
|
|
5091
|
+
var _ = "", R = 0;
|
|
5092
5092
|
if (e.options.indentWithTabs)
|
|
5093
5093
|
for (var O = Math.floor(C / d); O; --O)
|
|
5094
|
-
|
|
5095
|
-
if (
|
|
5094
|
+
R += d, _ += " ";
|
|
5095
|
+
if (R < C && (_ += Ht(C - R)), _ != v)
|
|
5096
5096
|
return Ir(s, _, P(t, 0), P(t, v.length), "+input"), p.stateAfter = null, !0;
|
|
5097
5097
|
for (var B = 0; B < s.sel.ranges.length; B++) {
|
|
5098
5098
|
var U = s.sel.ranges[B];
|
|
@@ -5122,15 +5122,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5122
5122
|
} else g.length == i.ranges.length && e.options.pasteLinesPerSelection && (v = xt(g, function(ee) {
|
|
5123
5123
|
return [ee];
|
|
5124
5124
|
}));
|
|
5125
|
-
for (var _ = e.curOp.updateInput,
|
|
5126
|
-
var O = i.ranges[
|
|
5125
|
+
for (var _ = e.curOp.updateInput, R = i.ranges.length - 1; R >= 0; R--) {
|
|
5126
|
+
var O = i.ranges[R], B = O.from(), U = O.to();
|
|
5127
5127
|
O.empty() && (a && a > 0 ? B = P(B.line, B.ch - a) : e.state.overwrite && !p ? U = P(U.line, Math.min(ce(c, U.line).text.length, U.ch + be(g).length)) : p && un && un.lineWise && un.text.join(`
|
|
5128
5128
|
`) == g.join(`
|
|
5129
5129
|
`) && (B = U = P(B.line, 0)));
|
|
5130
5130
|
var J = {
|
|
5131
5131
|
from: B,
|
|
5132
5132
|
to: U,
|
|
5133
|
-
text: v ? v[
|
|
5133
|
+
text: v ? v[R % v.length] : g,
|
|
5134
5134
|
origin: s || (p ? "paste" : e.state.cutIncoming > d ? "cut" : "+input")
|
|
5135
5135
|
};
|
|
5136
5136
|
Er(e.doc, J), gt(e, "inputRead", e, J);
|
|
@@ -5215,13 +5215,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5215
5215
|
function(d) {
|
|
5216
5216
|
return d.priority;
|
|
5217
5217
|
}
|
|
5218
|
-
), this.state.modeGen++,
|
|
5218
|
+
), this.state.modeGen++, At(this);
|
|
5219
5219
|
}),
|
|
5220
5220
|
removeOverlay: Lt(function(i) {
|
|
5221
5221
|
for (var s = this.state.overlays, c = 0; c < s.length; ++c) {
|
|
5222
5222
|
var d = s[c].modeSpec;
|
|
5223
5223
|
if (d == i || typeof i == "string" && d.name == i) {
|
|
5224
|
-
s.splice(c, 1), this.state.modeGen++,
|
|
5224
|
+
s.splice(c, 1), this.state.modeGen++, At(this);
|
|
5225
5225
|
return;
|
|
5226
5226
|
}
|
|
5227
5227
|
}
|
|
@@ -5239,8 +5239,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5239
5239
|
c = Math.min(this.lastLine(), v.line - (v.ch ? 0 : 1)) + 1;
|
|
5240
5240
|
for (var _ = C; _ < c; ++_)
|
|
5241
5241
|
ki(this, _, i);
|
|
5242
|
-
var
|
|
5243
|
-
g.ch == 0 && s.length ==
|
|
5242
|
+
var R = this.doc.sel.ranges;
|
|
5243
|
+
g.ch == 0 && s.length == R.length && R[d].from().ch > 0 && ys(this.doc, d, new ze(g, R[d].to()), ut);
|
|
5244
5244
|
}
|
|
5245
5245
|
}
|
|
5246
5246
|
}),
|
|
@@ -5340,8 +5340,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5340
5340
|
if (s.style.position = "absolute", s.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(s), g.sizer.appendChild(s), d == "over")
|
|
5341
5341
|
v = i.top;
|
|
5342
5342
|
else if (d == "above" || d == "near") {
|
|
5343
|
-
var _ = Math.max(g.wrapper.clientHeight, this.doc.height),
|
|
5344
|
-
(d == "above" || i.bottom + s.offsetHeight > _) && i.top > s.offsetHeight ? v = i.top - s.offsetHeight : i.bottom + s.offsetHeight <= _ && (v = i.bottom), C + s.offsetWidth >
|
|
5343
|
+
var _ = Math.max(g.wrapper.clientHeight, this.doc.height), R = Math.max(g.sizer.clientWidth, g.lineSpace.clientWidth);
|
|
5344
|
+
(d == "above" || i.bottom + s.offsetHeight > _) && i.top > s.offsetHeight ? v = i.top - s.offsetHeight : i.bottom + s.offsetHeight <= _ && (v = i.bottom), C + s.offsetWidth > R && (C = R - s.offsetWidth);
|
|
5345
5345
|
}
|
|
5346
5346
|
s.style.top = v + "px", s.style.left = s.style.right = "", p == "right" ? (C = g.sizer.clientWidth - s.offsetWidth, s.style.right = "0px") : (p == "left" ? C = 0 : p == "middle" && (C = (g.sizer.clientWidth - s.offsetWidth) / 2), s.style.left = C + "px"), c && Pf(this, { left: C, top: v, right: C + s.offsetWidth, bottom: v + s.offsetHeight });
|
|
5347
5347
|
},
|
|
@@ -5393,8 +5393,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5393
5393
|
return i < 0 ? C.from() : C.to();
|
|
5394
5394
|
var _ = on(c, C.head, "div");
|
|
5395
5395
|
C.goalColumn != null && (_.left = C.goalColumn), p.push(_.left);
|
|
5396
|
-
var
|
|
5397
|
-
return s == "page" && C == d.sel.primary() && os(c, Vi(c,
|
|
5396
|
+
var R = iu(c, _, i, s);
|
|
5397
|
+
return s == "page" && C == d.sel.primary() && os(c, Vi(c, R, "div").top - _.top), R;
|
|
5398
5398
|
}, ct), p.length)
|
|
5399
5399
|
for (var v = 0; v < d.sel.ranges.length; v++)
|
|
5400
5400
|
d.sel.ranges[v].goalColumn = p[v];
|
|
@@ -5472,7 +5472,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5472
5472
|
},
|
|
5473
5473
|
refresh: Lt(function() {
|
|
5474
5474
|
var i = this.display.cachedTextHeight;
|
|
5475
|
-
|
|
5475
|
+
At(this), this.curOp.forceUpdate = !0, ti(this), ri(this, this.doc.scrollLeft, this.doc.scrollTop), cs(this.display), (i == null || Math.abs(i - wr(this.display)) > 0.5 || this.options.lineWrapping) && ts(this), Qe(this, "refresh", this);
|
|
5476
5476
|
}),
|
|
5477
5477
|
swapDoc: Lt(function(i) {
|
|
5478
5478
|
var s = this.doc;
|
|
@@ -5531,11 +5531,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5531
5531
|
else if (i == "column")
|
|
5532
5532
|
C(!0);
|
|
5533
5533
|
else if (i == "word" || i == "group")
|
|
5534
|
-
for (var _ = null,
|
|
5534
|
+
for (var _ = null, R = i == "group", O = e.cm && e.cm.getHelper(t, "wordChars"), B = !0; !(a < 0 && !C(!B)); B = !1) {
|
|
5535
5535
|
var U = p.text.charAt(t.ch) || `
|
|
5536
|
-
`, J = xe(U, O) ? "w" :
|
|
5537
|
-
` ? "n" : !
|
|
5538
|
-
if (
|
|
5536
|
+
`, J = xe(U, O) ? "w" : R && U == `
|
|
5537
|
+
` ? "n" : !R || /\s/.test(U) ? null : "p";
|
|
5538
|
+
if (R && !B && !J && (J = "s"), _ && _ != J) {
|
|
5539
5539
|
a < 0 && (a = 1, C(), t.sticky = "after");
|
|
5540
5540
|
break;
|
|
5541
5541
|
}
|
|
@@ -5613,9 +5613,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5613
5613
|
var C = ru(), _ = C.firstChild;
|
|
5614
5614
|
Ls(_), i.display.lineSpace.insertBefore(C, i.display.lineSpace.firstChild), _.value = un.text.join(`
|
|
5615
5615
|
`);
|
|
5616
|
-
var
|
|
5616
|
+
var R = M(Te(s));
|
|
5617
5617
|
E(_), setTimeout(function() {
|
|
5618
|
-
i.display.lineSpace.removeChild(C),
|
|
5618
|
+
i.display.lineSpace.removeChild(C), R.focus(), R == s && a.showPrimarySelection();
|
|
5619
5619
|
}, 50);
|
|
5620
5620
|
}
|
|
5621
5621
|
}
|
|
@@ -5636,7 +5636,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5636
5636
|
return;
|
|
5637
5637
|
}
|
|
5638
5638
|
var c = ha(t, e.anchorNode, e.anchorOffset), d = ha(t, e.focusNode, e.focusOffset);
|
|
5639
|
-
if (!(c && !c.bad && d && !d.bad && re(vr(c, d), i) == 0 && re(
|
|
5639
|
+
if (!(c && !c.bad && d && !d.bad && re(vr(c, d), i) == 0 && re(Dt(c, d), s) == 0)) {
|
|
5640
5640
|
var p = t.display.view, g = i.line >= t.display.viewFrom && au(t, i) || { node: p[0].measure.map[2], offset: 0 }, v = s.line < t.display.viewTo && au(t, s);
|
|
5641
5641
|
if (!v) {
|
|
5642
5642
|
var C = p[p.length - 1].measure, _ = C.maps ? C.maps[C.maps.length - 1] : C.map;
|
|
@@ -5646,12 +5646,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5646
5646
|
e.removeAllRanges();
|
|
5647
5647
|
return;
|
|
5648
5648
|
}
|
|
5649
|
-
var
|
|
5649
|
+
var R = e.rangeCount && e.getRangeAt(0), O;
|
|
5650
5650
|
try {
|
|
5651
5651
|
O = G(g.node, g.offset, v.offset, v.node);
|
|
5652
5652
|
} catch {
|
|
5653
5653
|
}
|
|
5654
|
-
O && (!u && t.state.focused ? (e.collapse(g.node, g.offset), O.collapsed || (e.removeAllRanges(), e.addRange(O))) : (e.removeAllRanges(), e.addRange(O)),
|
|
5654
|
+
O && (!u && t.state.focused ? (e.collapse(g.node, g.offset), O.collapsed || (e.removeAllRanges(), e.addRange(O))) : (e.removeAllRanges(), e.addRange(O)), R && e.anchorNode == null ? e.addRange(R) : u && this.startGracePeriod()), this.rememberSelection();
|
|
5655
5655
|
}
|
|
5656
5656
|
}, He.prototype.startGracePeriod = function() {
|
|
5657
5657
|
var e = this;
|
|
@@ -5670,7 +5670,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5670
5670
|
if (!e.rangeCount)
|
|
5671
5671
|
return !1;
|
|
5672
5672
|
var t = e.getRangeAt(0).commonAncestorContainer;
|
|
5673
|
-
return
|
|
5673
|
+
return D(this.div, t);
|
|
5674
5674
|
}, He.prototype.focus = function() {
|
|
5675
5675
|
this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || M(Te(this.div)) != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus());
|
|
5676
5676
|
}, He.prototype.blur = function() {
|
|
@@ -5718,25 +5718,25 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5718
5718
|
var g = Yn(e, s.line), v, C;
|
|
5719
5719
|
if (g == t.view.length - 1 ? (v = t.viewTo - 1, C = t.lineDiv.lastChild) : (v = b(t.view[g + 1].line) - 1, C = t.view[g + 1].node.previousSibling), !p)
|
|
5720
5720
|
return !1;
|
|
5721
|
-
for (var _ = e.doc.splitLines(jd(e, p, C, d, v)),
|
|
5722
|
-
if (be(_) == be(
|
|
5723
|
-
_.pop(),
|
|
5724
|
-
else if (_[0] ==
|
|
5725
|
-
_.shift(),
|
|
5721
|
+
for (var _ = e.doc.splitLines(jd(e, p, C, d, v)), R = wn(e.doc, P(d, 0), P(v, ce(e.doc, v).text.length)); _.length > 1 && R.length > 1; )
|
|
5722
|
+
if (be(_) == be(R))
|
|
5723
|
+
_.pop(), R.pop(), v--;
|
|
5724
|
+
else if (_[0] == R[0])
|
|
5725
|
+
_.shift(), R.shift(), d++;
|
|
5726
5726
|
else
|
|
5727
5727
|
break;
|
|
5728
|
-
for (var O = 0, B = 0, U = _[0], J =
|
|
5728
|
+
for (var O = 0, B = 0, U = _[0], J = R[0], ee = Math.min(U.length, J.length); O < ee && U.charCodeAt(O) == J.charCodeAt(O); )
|
|
5729
5729
|
++O;
|
|
5730
|
-
for (var ae = be(_), te = be(
|
|
5730
|
+
for (var ae = be(_), te = be(R), le = Math.min(
|
|
5731
5731
|
ae.length - (_.length == 1 ? O : 0),
|
|
5732
|
-
te.length - (
|
|
5732
|
+
te.length - (R.length == 1 ? O : 0)
|
|
5733
5733
|
); B < le && ae.charCodeAt(ae.length - B - 1) == te.charCodeAt(te.length - B - 1); )
|
|
5734
5734
|
++B;
|
|
5735
|
-
if (_.length == 1 &&
|
|
5735
|
+
if (_.length == 1 && R.length == 1 && d == i.line)
|
|
5736
5736
|
for (; O && O > i.ch && ae.charCodeAt(ae.length - B - 1) == te.charCodeAt(te.length - B - 1); )
|
|
5737
5737
|
O--, B++;
|
|
5738
5738
|
_[_.length - 1] = ae.slice(0, ae.length - B).replace(/^\u200b+/, ""), _[0] = _[0].slice(O).replace(/\u200b+$/, "");
|
|
5739
|
-
var ve = P(d, O), ge = P(v,
|
|
5739
|
+
var ve = P(d, O), ge = P(v, R.length ? be(R).length - B : 0);
|
|
5740
5740
|
if (_.length > 1 || _[0] || re(ve, ge))
|
|
5741
5741
|
return Ir(e.doc, _, ve, ge, "+input"), !0;
|
|
5742
5742
|
}, He.prototype.ensurePolled = function() {
|
|
@@ -5758,7 +5758,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5758
5758
|
}, He.prototype.updateFromDOM = function() {
|
|
5759
5759
|
var e = this;
|
|
5760
5760
|
(this.cm.isReadOnly() || !this.pollContent()) && zt(this.cm, function() {
|
|
5761
|
-
return
|
|
5761
|
+
return At(e.cm);
|
|
5762
5762
|
});
|
|
5763
5763
|
}, He.prototype.setUneditable = function(e) {
|
|
5764
5764
|
e.contentEditable = "false";
|
|
@@ -5775,7 +5775,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5775
5775
|
return null;
|
|
5776
5776
|
var i = ce(e.doc, t.line), s = Fo(a, i, t.line), c = Me(i, e.doc.direction), d = "left";
|
|
5777
5777
|
if (c) {
|
|
5778
|
-
var p =
|
|
5778
|
+
var p = An(c, t.ch);
|
|
5779
5779
|
d = p % 2 ? "right" : "left";
|
|
5780
5780
|
}
|
|
5781
5781
|
var g = $o(s.map, t.ch, d);
|
|
@@ -5803,7 +5803,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5803
5803
|
function _(O) {
|
|
5804
5804
|
O && (C(), c += O);
|
|
5805
5805
|
}
|
|
5806
|
-
function
|
|
5806
|
+
function R(O) {
|
|
5807
5807
|
if (O.nodeType == 1) {
|
|
5808
5808
|
var B = O.getAttribute("cm-text");
|
|
5809
5809
|
if (B) {
|
|
@@ -5823,11 +5823,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5823
5823
|
return;
|
|
5824
5824
|
ae && C();
|
|
5825
5825
|
for (var te = 0; te < O.childNodes.length; te++)
|
|
5826
|
-
|
|
5826
|
+
R(O.childNodes[te]);
|
|
5827
5827
|
/^(pre|p)$/i.test(O.nodeName) && (g = !0), ae && (d = !0);
|
|
5828
5828
|
} else O.nodeType == 3 && _(O.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
|
|
5829
5829
|
}
|
|
5830
|
-
for (;
|
|
5830
|
+
for (; R(t), t != a; )
|
|
5831
5831
|
t = t.nextSibling, g = !1;
|
|
5832
5832
|
return c;
|
|
5833
5833
|
}
|
|
@@ -5852,7 +5852,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5852
5852
|
}
|
|
5853
5853
|
function qd(e, t, a) {
|
|
5854
5854
|
var i = e.text.firstChild, s = !1;
|
|
5855
|
-
if (!t || !
|
|
5855
|
+
if (!t || !D(i, t))
|
|
5856
5856
|
return Fr(P(b(e.line), 0), !0);
|
|
5857
5857
|
if (t == i && (s = !0, t = i.childNodes[a], a = 0, !t)) {
|
|
5858
5858
|
var c = e.rest ? be(e.rest) : e.line;
|
|
@@ -5867,18 +5867,18 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5867
5867
|
for (var le = te < 0 ? g.map : v[te], ve = 0; ve < le.length; ve += 3) {
|
|
5868
5868
|
var ge = le[ve + 2];
|
|
5869
5869
|
if (ge == J || ge == ee) {
|
|
5870
|
-
var
|
|
5871
|
-
return (ae < 0 || ge != J) && (We = le[ve + (ae ? 1 : 0)]), P(
|
|
5870
|
+
var De = b(te < 0 ? e.line : e.rest[te]), We = le[ve] + ae;
|
|
5871
|
+
return (ae < 0 || ge != J) && (We = le[ve + (ae ? 1 : 0)]), P(De, We);
|
|
5872
5872
|
}
|
|
5873
5873
|
}
|
|
5874
5874
|
}
|
|
5875
5875
|
var _ = C(d, p, a);
|
|
5876
5876
|
if (_)
|
|
5877
5877
|
return Fr(_, s);
|
|
5878
|
-
for (var
|
|
5879
|
-
if (_ = C(
|
|
5878
|
+
for (var R = p.nextSibling, O = d ? d.nodeValue.length - a : 0; R; R = R.nextSibling) {
|
|
5879
|
+
if (_ = C(R, R.firstChild, 0), _)
|
|
5880
5880
|
return Fr(P(_.line, _.ch - O), s);
|
|
5881
|
-
O +=
|
|
5881
|
+
O += R.textContent.length;
|
|
5882
5882
|
}
|
|
5883
5883
|
for (var B = p.previousSibling, U = a; B; B = B.previousSibling) {
|
|
5884
5884
|
if (_ = C(B, B.firstChild, -1), _)
|
|
@@ -6041,7 +6041,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6041
6041
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;
|
|
6042
6042
|
var _;
|
|
6043
6043
|
S && (_ = s.ownerDocument.defaultView.scrollY), i.input.focus(), S && s.ownerDocument.defaultView.scrollTo(null, _), i.input.reset(), a.somethingSelected() || (s.value = t.prevInput = " "), t.contextMenuPending = O, i.selForContextMenu = a.doc.sel, clearTimeout(i.detectingSelectAll);
|
|
6044
|
-
function
|
|
6044
|
+
function R() {
|
|
6045
6045
|
if (s.selectionStart != null) {
|
|
6046
6046
|
var U = a.somethingSelected(), J = "" + (U ? s.value : "");
|
|
6047
6047
|
s.value = "⇚", s.value = J, t.prevInput = U ? "" : "", s.selectionStart = 1, s.selectionEnd = J.length, i.selForContextMenu = a.doc.sel;
|
|
@@ -6049,14 +6049,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6049
6049
|
}
|
|
6050
6050
|
function O() {
|
|
6051
6051
|
if (t.contextMenuPending == O && (t.contextMenuPending = !1, t.wrapper.style.cssText = v, s.style.cssText = g, m && k < 9 && i.scrollbars.setScrollTop(i.scroller.scrollTop = d), s.selectionStart != null)) {
|
|
6052
|
-
(!m || m && k < 9) &&
|
|
6052
|
+
(!m || m && k < 9) && R();
|
|
6053
6053
|
var U = 0, J = function() {
|
|
6054
6054
|
i.selForContextMenu == a.doc.sel && s.selectionStart == 0 && s.selectionEnd > 0 && t.prevInput == "" ? mt(a, Cl)(a) : U++ < 10 ? i.detectingSelectAll = setTimeout(J, 500) : (i.selForContextMenu = null, i.input.reset());
|
|
6055
6055
|
};
|
|
6056
6056
|
i.detectingSelectAll = setTimeout(J, 200);
|
|
6057
6057
|
}
|
|
6058
6058
|
}
|
|
6059
|
-
if (m && k >= 9 &&
|
|
6059
|
+
if (m && k >= 9 && R(), Fe) {
|
|
6060
6060
|
On(e);
|
|
6061
6061
|
var B = function() {
|
|
6062
6062
|
kt(window, "mouseup", B), setTimeout(O, 20);
|
|
@@ -6103,7 +6103,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6103
6103
|
return p;
|
|
6104
6104
|
}
|
|
6105
6105
|
function Gd(e) {
|
|
6106
|
-
e.off = kt, e.on = me, e.wheelEventPixels = Zf, e.Doc = Ot, e.splitLines = Yt, e.countColumn = _e, e.findColumn = ft, e.isWordChar = ye, e.Pass = qe, e.signal = Qe, e.Line = yr, e.changeEnd = Bn, e.scrollbarModel = el, e.Pos = P, e.cmpPos = re, e.modes = dr, e.mimeModes = rn, e.resolveMode = hr, e.getMode = pr, e.modeExtensions = Rn, e.extendMode = gr, e.copyState = dn, e.startState = mr, e.innerMode = Vr, e.commands = yi, e.keyMap = _n, e.keyName = Bl, e.isModifierKey = Pl, e.lookupKey =
|
|
6106
|
+
e.off = kt, e.on = me, e.wheelEventPixels = Zf, e.Doc = Ot, e.splitLines = Yt, e.countColumn = _e, e.findColumn = ft, e.isWordChar = ye, e.Pass = qe, e.signal = Qe, e.Line = yr, e.changeEnd = Bn, e.scrollbarModel = el, e.Pos = P, e.cmpPos = re, e.modes = dr, e.mimeModes = rn, e.resolveMode = hr, e.getMode = pr, e.modeExtensions = Rn, e.extendMode = gr, e.copyState = dn, e.startState = mr, e.innerMode = Vr, e.commands = yi, e.keyMap = _n, e.keyName = Bl, e.isModifierKey = Pl, e.lookupKey = Ar, e.normalizeKeyMap = wd, e.StringStream = et, e.SharedTextMarker = gi, e.TextMarker = Wn, e.LineWidget = pi, e.e_preventDefault = St, e.e_stopPropagation = cr, e.e_stop = On, e.addClass = K, e.contains = D, e.rmClass = $e, e.keyNames = jn;
|
|
6107
6107
|
}
|
|
6108
6108
|
$d(Ve), Hd(Ve);
|
|
6109
6109
|
var Kd = "iter insert remove copy getEditor constructor".split(" ");
|
|
@@ -6125,14 +6125,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6125
6125
|
Ot.prototype[e] = t;
|
|
6126
6126
|
}, Ve.fromTextArea = Ud, Gd(Ve), Ve.version = "5.65.20", Ve;
|
|
6127
6127
|
});
|
|
6128
|
-
}(
|
|
6128
|
+
}(As)), As.exports;
|
|
6129
6129
|
}
|
|
6130
6130
|
(function(l, n) {
|
|
6131
6131
|
(function(r) {
|
|
6132
6132
|
r(Vt());
|
|
6133
6133
|
})(function(r) {
|
|
6134
6134
|
r.defineMode("javascript", function(o, u) {
|
|
6135
|
-
var f = o.indentUnit, h = u.statementIndent, y = u.jsonld, m = u.json || y, k = u.trackScope !== !1, S = u.typescript,
|
|
6135
|
+
var f = o.indentUnit, h = u.statementIndent, y = u.jsonld, m = u.json || y, k = u.trackScope !== !1, S = u.typescript, F = u.wordCharacters || /[\w$\xa1-\uffff]/, L = function() {
|
|
6136
6136
|
function b(pt) {
|
|
6137
6137
|
return { type: pt, style: "keyword" };
|
|
6138
6138
|
}
|
|
@@ -6181,7 +6181,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6181
6181
|
await: X
|
|
6182
6182
|
};
|
|
6183
6183
|
}(), W = /[+\-*&%=<>!?|~^@]/, z = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
|
|
6184
|
-
function
|
|
6184
|
+
function A(b) {
|
|
6185
6185
|
for (var T = !1, q, X = !1; (q = b.next()) != null; ) {
|
|
6186
6186
|
if (!T) {
|
|
6187
6187
|
if (q == "/" && !X) return;
|
|
@@ -6211,19 +6211,19 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6211
6211
|
if (/\d/.test(q))
|
|
6212
6212
|
return b.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), N("number", "number");
|
|
6213
6213
|
if (q == "/")
|
|
6214
|
-
return b.eat("*") ? (T.tokenize = ne, ne(b, T)) : b.eat("/") ? (b.skipToEnd(), N("comment", "comment")) : jt(b, T, 1) ? (
|
|
6214
|
+
return b.eat("*") ? (T.tokenize = ne, ne(b, T)) : b.eat("/") ? (b.skipToEnd(), N("comment", "comment")) : jt(b, T, 1) ? (A(b), b.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), N("regexp", "string-2")) : (b.eat("="), N("operator", "operator", b.current()));
|
|
6215
6215
|
if (q == "`")
|
|
6216
6216
|
return T.tokenize = ue, ue(b, T);
|
|
6217
6217
|
if (q == "#" && b.peek() == "!")
|
|
6218
6218
|
return b.skipToEnd(), N("meta", "meta");
|
|
6219
|
-
if (q == "#" && b.eatWhile(
|
|
6219
|
+
if (q == "#" && b.eatWhile(F))
|
|
6220
6220
|
return N("variable", "property");
|
|
6221
6221
|
if (q == "<" && b.match("!--") || q == "-" && b.match("->") && !/\S/.test(b.string.slice(0, b.start)))
|
|
6222
6222
|
return b.skipToEnd(), N("comment", "comment");
|
|
6223
6223
|
if (W.test(q))
|
|
6224
6224
|
return (q != ">" || !T.lexical || T.lexical.type != ">") && (b.eat("=") ? (q == "!" || q == "=") && b.eat("=") : /[<>*+\-|&?]/.test(q) && (b.eat(q), q == ">" && b.eat(q))), q == "?" && b.eat(".") ? N(".") : N("operator", "operator", b.current());
|
|
6225
|
-
if (
|
|
6226
|
-
b.eatWhile(
|
|
6225
|
+
if (F.test(q)) {
|
|
6226
|
+
b.eatWhile(F);
|
|
6227
6227
|
var X = b.current();
|
|
6228
6228
|
if (T.lastType != ".") {
|
|
6229
6229
|
if (L.propertyIsEnumerable(X)) {
|
|
@@ -6276,8 +6276,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6276
6276
|
X && (q = X.index);
|
|
6277
6277
|
}
|
|
6278
6278
|
for (var P = 0, re = !1, Pe = q - 1; Pe >= 0; --Pe) {
|
|
6279
|
-
var pt = b.string.charAt(Pe),
|
|
6280
|
-
if (
|
|
6279
|
+
var pt = b.string.charAt(Pe), Dt = se.indexOf(pt);
|
|
6280
|
+
if (Dt >= 0 && Dt < 3) {
|
|
6281
6281
|
if (!P) {
|
|
6282
6282
|
++Pe;
|
|
6283
6283
|
break;
|
|
@@ -6286,9 +6286,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6286
6286
|
pt == "(" && (re = !0);
|
|
6287
6287
|
break;
|
|
6288
6288
|
}
|
|
6289
|
-
} else if (
|
|
6289
|
+
} else if (Dt >= 3 && Dt < 6)
|
|
6290
6290
|
++P;
|
|
6291
|
-
else if (
|
|
6291
|
+
else if (F.test(pt))
|
|
6292
6292
|
re = !0;
|
|
6293
6293
|
else if (/["'\/`]/.test(pt))
|
|
6294
6294
|
for (; ; --Pe) {
|
|
@@ -6307,7 +6307,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6307
6307
|
re && !P && (T.fatArrowAt = Pe);
|
|
6308
6308
|
}
|
|
6309
6309
|
}
|
|
6310
|
-
var
|
|
6310
|
+
var Ae = {
|
|
6311
6311
|
atom: !0,
|
|
6312
6312
|
number: !0,
|
|
6313
6313
|
variable: !0,
|
|
@@ -6355,7 +6355,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6355
6355
|
if (j.marked = "def", !!k) {
|
|
6356
6356
|
if (T.context) {
|
|
6357
6357
|
if (T.lexical.info == "var" && T.context && T.context.block) {
|
|
6358
|
-
var q =
|
|
6358
|
+
var q = D(b, T.context);
|
|
6359
6359
|
if (q != null) {
|
|
6360
6360
|
T.context = q;
|
|
6361
6361
|
return;
|
|
@@ -6368,10 +6368,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6368
6368
|
u.globalVars && !Y(b, T.globalVars) && (T.globalVars = new he(b, T.globalVars));
|
|
6369
6369
|
}
|
|
6370
6370
|
}
|
|
6371
|
-
function
|
|
6371
|
+
function D(b, T) {
|
|
6372
6372
|
if (T)
|
|
6373
6373
|
if (T.block) {
|
|
6374
|
-
var q =
|
|
6374
|
+
var q = D(b, T.prev);
|
|
6375
6375
|
return q ? q == T.prev ? T : new K(q, T.vars, !0) : null;
|
|
6376
6376
|
} else return Y(b, T.vars) ? T : new K(T.prev, new he(b, T.vars), !1);
|
|
6377
6377
|
else return null;
|
|
@@ -6450,7 +6450,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6450
6450
|
if (b == "variable") return Q(x, It, ke("=>"), X, Te);
|
|
6451
6451
|
}
|
|
6452
6452
|
var P = q ? ft : ct;
|
|
6453
|
-
return
|
|
6453
|
+
return Ae.hasOwnProperty(b) ? w(P) : b == "function" ? w(Yt, P) : b == "class" || S && T == "interface" ? (j.marked = "keyword", w(Z("form"), $a, fe)) : b == "keyword c" || b == "async" ? w(q ? Oe : we) : b == "(" ? w(Z(")"), Mt, ke(")"), fe, P) : b == "operator" || b == "spread" ? w(q ? Oe : we) : b == "[" ? w(Z("]"), et, fe, P) : b == "{" ? $t(xe, "}", null, P) : b == "quasi" ? Q(ht, P) : b == "new" ? w(Wt(q)) : w();
|
|
6454
6454
|
}
|
|
6455
6455
|
function Mt(b) {
|
|
6456
6456
|
return b.match(/[;\}\)\],]/) ? Q() : Q(we);
|
|
@@ -6523,7 +6523,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6523
6523
|
if (S && M(T))
|
|
6524
6524
|
return j.marked = "keyword", w(xe);
|
|
6525
6525
|
if (b == "[")
|
|
6526
|
-
return w(we,
|
|
6526
|
+
return w(we, Dn, ke("]"), Re);
|
|
6527
6527
|
if (b == "spread")
|
|
6528
6528
|
return w(Oe, Re);
|
|
6529
6529
|
if (T == "*")
|
|
@@ -6543,8 +6543,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6543
6543
|
function X(P, re) {
|
|
6544
6544
|
if (q ? q.indexOf(P) > -1 : P == ",") {
|
|
6545
6545
|
var Pe = j.state.lexical;
|
|
6546
|
-
return Pe.info == "call" && (Pe.pos = (Pe.pos || 0) + 1), w(function(pt,
|
|
6547
|
-
return pt == T ||
|
|
6546
|
+
return Pe.info == "call" && (Pe.pos = (Pe.pos || 0) + 1), w(function(pt, Dt) {
|
|
6547
|
+
return pt == T || Dt == T ? Q() : Q(b);
|
|
6548
6548
|
}, X);
|
|
6549
6549
|
}
|
|
6550
6550
|
return P == T || re == T ? w() : q && q.indexOf(";") > -1 ? Q(b) : w(ke(T));
|
|
@@ -6561,16 +6561,16 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6561
6561
|
function Xt(b) {
|
|
6562
6562
|
return b == "}" ? w() : Q(_e, Xt);
|
|
6563
6563
|
}
|
|
6564
|
-
function
|
|
6564
|
+
function Dn(b, T) {
|
|
6565
6565
|
if (S) {
|
|
6566
6566
|
if (b == ":") return w(Me);
|
|
6567
|
-
if (T == "?") return w(
|
|
6567
|
+
if (T == "?") return w(Dn);
|
|
6568
6568
|
}
|
|
6569
6569
|
}
|
|
6570
6570
|
function Gn(b, T) {
|
|
6571
6571
|
if (S && (b == ":" || T == "in")) return w(Me);
|
|
6572
6572
|
}
|
|
6573
|
-
function
|
|
6573
|
+
function An(b) {
|
|
6574
6574
|
if (S && b == ":")
|
|
6575
6575
|
return j.stream.match(/^\s*\w+\s+is\b/, !1) ? w(we, Ra, Me) : w(Me);
|
|
6576
6576
|
}
|
|
@@ -6640,7 +6640,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6640
6640
|
if (T == "=") return w(Me);
|
|
6641
6641
|
}
|
|
6642
6642
|
function cr(b, T) {
|
|
6643
|
-
return T == "enum" ? (j.marked = "keyword", w(ce)) : Q(It,
|
|
6643
|
+
return T == "enum" ? (j.marked = "keyword", w(ce)) : Q(It, Dn, tn, Ma);
|
|
6644
6644
|
}
|
|
6645
6645
|
function It(b, T) {
|
|
6646
6646
|
if (S && M(T))
|
|
@@ -6681,7 +6681,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6681
6681
|
return j.marked = "keyword", w(Yt);
|
|
6682
6682
|
if (b == "variable")
|
|
6683
6683
|
return G(T), w(Yt);
|
|
6684
|
-
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe,
|
|
6684
|
+
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe, An, _e, Te);
|
|
6685
6685
|
if (S && T == "<") return w(Z(">"), Ie(en, ">"), fe, Yt);
|
|
6686
6686
|
}
|
|
6687
6687
|
function Fn(b, T) {
|
|
@@ -6689,7 +6689,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6689
6689
|
return j.marked = "keyword", w(Fn);
|
|
6690
6690
|
if (b == "variable")
|
|
6691
6691
|
return G(T), w(Fn);
|
|
6692
|
-
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe,
|
|
6692
|
+
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe, An, Te);
|
|
6693
6693
|
if (S && T == "<") return w(Z(">"), Ie(en, ">"), fe, Fn);
|
|
6694
6694
|
}
|
|
6695
6695
|
function Pi(b, T) {
|
|
@@ -6699,7 +6699,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6699
6699
|
return w(Z(">"), Ie(en, ">"), fe);
|
|
6700
6700
|
}
|
|
6701
6701
|
function nn(b, T) {
|
|
6702
|
-
return T == "@" && w(we, nn), b == "spread" ? w(nn) : S && M(T) ? (j.marked = "keyword", w(nn)) : S && b == "this" ? w(
|
|
6702
|
+
return T == "@" && w(we, nn), b == "spread" ? w(nn) : S && M(T) ? (j.marked = "keyword", w(nn)) : S && b == "this" ? w(Dn, tn) : Q(It, Dn, tn);
|
|
6703
6703
|
}
|
|
6704
6704
|
function $a(b, T) {
|
|
6705
6705
|
return b == "variable" ? dr(b, T) : rn(b, T);
|
|
@@ -6721,7 +6721,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6721
6721
|
return j.marked = "property", w(Kn, an);
|
|
6722
6722
|
if (b == "number" || b == "string") return w(Kn, an);
|
|
6723
6723
|
if (b == "[")
|
|
6724
|
-
return w(we,
|
|
6724
|
+
return w(we, Dn, ke("]"), Kn, an);
|
|
6725
6725
|
if (T == "*")
|
|
6726
6726
|
return j.marked = "keyword", w(an);
|
|
6727
6727
|
if (S && b == "(") return Q(Fn, an);
|
|
@@ -6806,8 +6806,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6806
6806
|
for (; (X.type == "stat" || X.type == "form") && (q == "}" || (P = b.cc[b.cc.length - 1]) && (P == ct || P == ft) && !/^[,\.=+\-*:?[\(]/.test(T)); )
|
|
6807
6807
|
X = X.prev;
|
|
6808
6808
|
h && X.type == ")" && X.prev.type == "stat" && (X = X.prev);
|
|
6809
|
-
var pt = X.type,
|
|
6810
|
-
return pt == "vardef" ? X.indented + (b.lastType == "operator" || b.lastType == "," ? X.info.length + 1 : 0) : pt == "form" && q == "{" ? X.indented : pt == "form" ? X.indented + f : pt == "stat" ? X.indented + (Xr(b, T) ? h || f : 0) : X.info == "switch" && !
|
|
6809
|
+
var pt = X.type, Dt = q == pt;
|
|
6810
|
+
return pt == "vardef" ? X.indented + (b.lastType == "operator" || b.lastType == "," ? X.info.length + 1 : 0) : pt == "form" && q == "{" ? X.indented : pt == "form" ? X.indented + f : pt == "stat" ? X.indented + (Xr(b, T) ? h || f : 0) : X.info == "switch" && !Dt && u.doubleIndentSwitch != !1 ? X.indented + (/^(?:case|default)\b/.test(T) ? f : 2 * f) : X.align ? X.column + (Dt ? 0 : 1) : X.indented + (Dt ? 0 : f);
|
|
6811
6811
|
},
|
|
6812
6812
|
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
|
6813
6813
|
blockCommentStart: m ? null : "/*",
|
|
@@ -6843,7 +6843,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6843
6843
|
function f(I, N) {
|
|
6844
6844
|
return N == "pairs" && typeof I == "string" ? I : typeof I == "object" && I[N] != null ? I[N] : o[N];
|
|
6845
6845
|
}
|
|
6846
|
-
var h = { Backspace: S, Enter:
|
|
6846
|
+
var h = { Backspace: S, Enter: F };
|
|
6847
6847
|
function y(I) {
|
|
6848
6848
|
for (var N = 0; N < I.length; N++) {
|
|
6849
6849
|
var H = I.charAt(N), V = "'" + H + "'";
|
|
@@ -6867,7 +6867,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6867
6867
|
if (!N || I.getOption("disableInput")) return r.Pass;
|
|
6868
6868
|
for (var H = f(N, "pairs"), V = I.listSelections(), ne = 0; ne < V.length; ne++) {
|
|
6869
6869
|
if (!V[ne].empty()) return r.Pass;
|
|
6870
|
-
var ue =
|
|
6870
|
+
var ue = A(I, V[ne].head);
|
|
6871
6871
|
if (!ue || H.indexOf(ue) % 2 != 0) return r.Pass;
|
|
6872
6872
|
}
|
|
6873
6873
|
for (var ne = V.length - 1; ne >= 0; ne--) {
|
|
@@ -6875,12 +6875,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6875
6875
|
I.replaceRange("", u(se.line, se.ch - 1), u(se.line, se.ch + 1), "+delete");
|
|
6876
6876
|
}
|
|
6877
6877
|
}
|
|
6878
|
-
function
|
|
6878
|
+
function F(I) {
|
|
6879
6879
|
var N = k(I), H = N && f(N, "explode");
|
|
6880
6880
|
if (!H || I.getOption("disableInput")) return r.Pass;
|
|
6881
6881
|
for (var V = I.listSelections(), ne = 0; ne < V.length; ne++) {
|
|
6882
6882
|
if (!V[ne].empty()) return r.Pass;
|
|
6883
|
-
var ue =
|
|
6883
|
+
var ue = A(I, V[ne].head);
|
|
6884
6884
|
if (!ue || H.indexOf(ue) % 2 != 0) return r.Pass;
|
|
6885
6885
|
}
|
|
6886
6886
|
I.operation(function() {
|
|
@@ -6888,8 +6888,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6888
6888
|
`;
|
|
6889
6889
|
I.replaceSelection(se + se, null), L(I, -1), V = I.listSelections();
|
|
6890
6890
|
for (var de = 0; de < V.length; de++) {
|
|
6891
|
-
var
|
|
6892
|
-
I.indentLine(
|
|
6891
|
+
var Ae = V[de].head.line;
|
|
6892
|
+
I.indentLine(Ae, null, !0), I.indentLine(Ae + 1, null, !0);
|
|
6893
6893
|
}
|
|
6894
6894
|
});
|
|
6895
6895
|
}
|
|
@@ -6914,8 +6914,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6914
6914
|
if (!H || I.getOption("disableInput")) return r.Pass;
|
|
6915
6915
|
var V = f(H, "pairs"), ne = V.indexOf(N);
|
|
6916
6916
|
if (ne == -1) return r.Pass;
|
|
6917
|
-
for (var ue = f(H, "closeBefore"), se = f(H, "triples"), de = V.charAt(ne + 1) == N,
|
|
6918
|
-
var j =
|
|
6917
|
+
for (var ue = f(H, "closeBefore"), se = f(H, "triples"), de = V.charAt(ne + 1) == N, Ae = I.listSelections(), Fe = ne % 2 == 0, ie, $e = 0; $e < Ae.length; $e++) {
|
|
6918
|
+
var j = Ae[$e], Q = j.head, w, Y = I.getRange(Q, u(Q.line, Q.ch + 1));
|
|
6919
6919
|
if (Fe && !j.empty())
|
|
6920
6920
|
w = "surround";
|
|
6921
6921
|
else if ((de || !Fe) && Y == N)
|
|
@@ -6934,7 +6934,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6934
6934
|
if (!ie) ie = w;
|
|
6935
6935
|
else if (ie != w) return r.Pass;
|
|
6936
6936
|
}
|
|
6937
|
-
var
|
|
6937
|
+
var D = ne % 2 ? V.charAt(ne - 1) : N, M = ne % 2 ? N : V.charAt(ne + 1);
|
|
6938
6938
|
I.operation(function() {
|
|
6939
6939
|
if (ie == "skip")
|
|
6940
6940
|
L(I, 1);
|
|
@@ -6942,15 +6942,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6942
6942
|
L(I, 3);
|
|
6943
6943
|
else if (ie == "surround") {
|
|
6944
6944
|
for (var K = I.getSelections(), he = 0; he < K.length; he++)
|
|
6945
|
-
K[he] =
|
|
6945
|
+
K[he] = D + K[he] + M;
|
|
6946
6946
|
I.replaceSelections(K, "around"), K = I.listSelections().slice();
|
|
6947
6947
|
for (var he = 0; he < K.length; he++)
|
|
6948
6948
|
K[he] = W(K[he]);
|
|
6949
6949
|
I.setSelections(K);
|
|
6950
|
-
} else ie == "both" ? (I.replaceSelection(
|
|
6950
|
+
} else ie == "both" ? (I.replaceSelection(D + M, null), I.triggerElectric(D + M), L(I, -1)) : ie == "addFour" && (I.replaceSelection(D + D + D + D, "before"), L(I, 1));
|
|
6951
6951
|
});
|
|
6952
6952
|
}
|
|
6953
|
-
function
|
|
6953
|
+
function A(I, N) {
|
|
6954
6954
|
var H = I.getRange(
|
|
6955
6955
|
u(N.line, N.ch - 1),
|
|
6956
6956
|
u(N.line, N.ch + 1)
|
|
@@ -6972,9 +6972,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6972
6972
|
return L && L.bracketRegex || /[(){}[\]]/;
|
|
6973
6973
|
}
|
|
6974
6974
|
function y(L, W, z) {
|
|
6975
|
-
var
|
|
6975
|
+
var A = L.getLineHandle(W.line), $ = W.ch - 1, I = z && z.afterCursor;
|
|
6976
6976
|
I == null && (I = /(^| )cm-fat-cursor($| )/.test(L.getWrapperElement().className));
|
|
6977
|
-
var N = h(z), H = !I && $ >= 0 && N.test(
|
|
6977
|
+
var N = h(z), H = !I && $ >= 0 && N.test(A.text.charAt($)) && f[A.text.charAt($)] || N.test(A.text.charAt($ + 1)) && f[A.text.charAt(++$)];
|
|
6978
6978
|
if (!H) return null;
|
|
6979
6979
|
var V = H.charAt(1) == ">" ? 1 : -1;
|
|
6980
6980
|
if (z && z.strict && V > 0 != ($ == W.ch)) return null;
|
|
@@ -6986,15 +6986,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6986
6986
|
forward: V > 0
|
|
6987
6987
|
};
|
|
6988
6988
|
}
|
|
6989
|
-
function m(L, W, z,
|
|
6989
|
+
function m(L, W, z, A, $) {
|
|
6990
6990
|
for (var I = $ && $.maxScanLineLength || 1e4, N = $ && $.maxScanLines || 1e3, H = [], V = h($), ne = z > 0 ? Math.min(W.line + N, L.lastLine() + 1) : Math.max(L.firstLine() - 1, W.line - N), ue = W.line; ue != ne; ue += z) {
|
|
6991
6991
|
var se = L.getLine(ue);
|
|
6992
6992
|
if (se) {
|
|
6993
|
-
var de = z > 0 ? 0 : se.length - 1,
|
|
6993
|
+
var de = z > 0 ? 0 : se.length - 1, Ae = z > 0 ? se.length : -1;
|
|
6994
6994
|
if (!(se.length > I))
|
|
6995
|
-
for (ue == W.line && (de = W.ch - (z < 0 ? 1 : 0)); de !=
|
|
6995
|
+
for (ue == W.line && (de = W.ch - (z < 0 ? 1 : 0)); de != Ae; de += z) {
|
|
6996
6996
|
var Fe = se.charAt(de);
|
|
6997
|
-
if (V.test(Fe) && (
|
|
6997
|
+
if (V.test(Fe) && (A === void 0 || (L.getTokenTypeAt(u(ue, de + 1)) || "") == (A || ""))) {
|
|
6998
6998
|
var ie = f[Fe];
|
|
6999
6999
|
if (ie && ie.charAt(1) == ">" == z > 0) H.push(Fe);
|
|
7000
7000
|
else if (H.length) H.pop();
|
|
@@ -7006,11 +7006,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
7006
7006
|
return ue - z == (z > 0 ? L.lastLine() : L.firstLine()) ? !1 : null;
|
|
7007
7007
|
}
|
|
7008
7008
|
function k(L, W, z) {
|
|
7009
|
-
for (var
|
|
7009
|
+
for (var A = L.state.matchBrackets.maxHighlightLineLength || 1e3, $ = z && z.highlightNonMatching, I = [], N = L.listSelections(), H = 0; H < N.length; H++) {
|
|
7010
7010
|
var V = N[H].empty() && y(L, N[H].head, z);
|
|
7011
|
-
if (V && (V.match || $ !== !1) && L.getLine(V.from.line).length <=
|
|
7011
|
+
if (V && (V.match || $ !== !1) && L.getLine(V.from.line).length <= A) {
|
|
7012
7012
|
var ne = V.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
|
|
7013
|
-
I.push(L.markText(V.from, u(V.from.line, V.from.ch + 1), { className: ne })), V.to && L.getLine(V.to.line).length <=
|
|
7013
|
+
I.push(L.markText(V.from, u(V.from.line, V.from.ch + 1), { className: ne })), V.to && L.getLine(V.to.line).length <= A && I.push(L.markText(V.to, u(V.to.line, V.to.ch + 1), { className: ne }));
|
|
7014
7014
|
}
|
|
7015
7015
|
}
|
|
7016
7016
|
if (I.length) {
|
|
@@ -7029,17 +7029,17 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
7029
7029
|
L.state.matchBrackets.currentlyHighlighted && (L.state.matchBrackets.currentlyHighlighted(), L.state.matchBrackets.currentlyHighlighted = null), L.state.matchBrackets.currentlyHighlighted = k(L, !1, L.state.matchBrackets);
|
|
7030
7030
|
});
|
|
7031
7031
|
}
|
|
7032
|
-
function
|
|
7032
|
+
function F(L) {
|
|
7033
7033
|
L.state.matchBrackets && L.state.matchBrackets.currentlyHighlighted && (L.state.matchBrackets.currentlyHighlighted(), L.state.matchBrackets.currentlyHighlighted = null);
|
|
7034
7034
|
}
|
|
7035
7035
|
r.defineOption("matchBrackets", !1, function(L, W, z) {
|
|
7036
|
-
z && z != r.Init && (L.off("cursorActivity", S), L.off("focus", S), L.off("blur",
|
|
7036
|
+
z && z != r.Init && (L.off("cursorActivity", S), L.off("focus", S), L.off("blur", F), F(L)), W && (L.state.matchBrackets = typeof W == "object" ? W : {}, L.on("cursorActivity", S), L.on("focus", S), L.on("blur", F));
|
|
7037
7037
|
}), r.defineExtension("matchBrackets", function() {
|
|
7038
7038
|
k(this, !0);
|
|
7039
7039
|
}), r.defineExtension("findMatchingBracket", function(L, W, z) {
|
|
7040
7040
|
return (z || typeof W == "boolean") && (z ? (z.strict = W, W = z) : W = W ? { strict: !0 } : null), y(this, L, W);
|
|
7041
|
-
}), r.defineExtension("scanForBracket", function(L, W, z,
|
|
7042
|
-
return m(this, L, W, z,
|
|
7041
|
+
}), r.defineExtension("scanForBracket", function(L, W, z, A) {
|
|
7042
|
+
return m(this, L, W, z, A);
|
|
7043
7043
|
});
|
|
7044
7044
|
});
|
|
7045
7045
|
})();
|
|
@@ -7051,14 +7051,14 @@ function sc() {
|
|
|
7051
7051
|
})(function(r) {
|
|
7052
7052
|
function o(y, m, k, S) {
|
|
7053
7053
|
if (k && k.call) {
|
|
7054
|
-
var
|
|
7054
|
+
var F = k;
|
|
7055
7055
|
k = null;
|
|
7056
7056
|
} else
|
|
7057
|
-
var
|
|
7057
|
+
var F = h(y, k, "rangeFinder");
|
|
7058
7058
|
typeof m == "number" && (m = r.Pos(m, 0));
|
|
7059
7059
|
var L = h(y, k, "minFoldSize");
|
|
7060
7060
|
function W(I) {
|
|
7061
|
-
var N =
|
|
7061
|
+
var N = F(y, m);
|
|
7062
7062
|
if (!N || N.to.line - N.from.line < L) return null;
|
|
7063
7063
|
if (S === "fold") return N;
|
|
7064
7064
|
for (var H = y.findMarksAt(N.from), V = 0; V < H.length; ++V)
|
|
@@ -7072,12 +7072,12 @@ function sc() {
|
|
|
7072
7072
|
if (h(y, k, "scanUp")) for (; !z && m.line > y.firstLine(); )
|
|
7073
7073
|
m = r.Pos(m.line - 1, 0), z = W(!1);
|
|
7074
7074
|
if (!(!z || z.cleared || S === "unfold")) {
|
|
7075
|
-
var
|
|
7076
|
-
r.on(
|
|
7075
|
+
var A = u(y, k, z);
|
|
7076
|
+
r.on(A, "mousedown", function(I) {
|
|
7077
7077
|
$.clear(), r.e_preventDefault(I);
|
|
7078
7078
|
});
|
|
7079
7079
|
var $ = y.markText(z.from, z.to, {
|
|
7080
|
-
replacedWith:
|
|
7080
|
+
replacedWith: A,
|
|
7081
7081
|
clearOnEnter: h(y, k, "clearOnEnter"),
|
|
7082
7082
|
__isFold: !0
|
|
7083
7083
|
});
|
|
@@ -7089,8 +7089,8 @@ function sc() {
|
|
|
7089
7089
|
function u(y, m, k) {
|
|
7090
7090
|
var S = h(y, m, "widget");
|
|
7091
7091
|
if (typeof S == "function" && (S = S(k.from, k.to)), typeof S == "string") {
|
|
7092
|
-
var
|
|
7093
|
-
S = document.createElement("span"), S.appendChild(
|
|
7092
|
+
var F = document.createTextNode(S);
|
|
7093
|
+
S = document.createElement("span"), S.appendChild(F), S.className = "CodeMirror-foldmarker";
|
|
7094
7094
|
} else S && (S = S.cloneNode(!0));
|
|
7095
7095
|
return S;
|
|
7096
7096
|
}
|
|
@@ -7123,14 +7123,14 @@ function sc() {
|
|
|
7123
7123
|
var y = Array.prototype.slice.call(arguments, 0);
|
|
7124
7124
|
return function(m, k) {
|
|
7125
7125
|
for (var S = 0; S < y.length; ++S) {
|
|
7126
|
-
var
|
|
7127
|
-
if (
|
|
7126
|
+
var F = y[S](m, k);
|
|
7127
|
+
if (F) return F;
|
|
7128
7128
|
}
|
|
7129
7129
|
};
|
|
7130
7130
|
}), r.registerHelper("fold", "auto", function(y, m) {
|
|
7131
7131
|
for (var k = y.getHelpers(m, "fold"), S = 0; S < k.length; S++) {
|
|
7132
|
-
var
|
|
7133
|
-
if (
|
|
7132
|
+
var F = k[S](y, m);
|
|
7133
|
+
if (F) return F;
|
|
7134
7134
|
}
|
|
7135
7135
|
});
|
|
7136
7136
|
var f = {
|
|
@@ -7159,7 +7159,7 @@ sc();
|
|
|
7159
7159
|
r(Vt(), sc());
|
|
7160
7160
|
})(function(r) {
|
|
7161
7161
|
r.defineOption("foldGutter", !1, function($, I, N) {
|
|
7162
|
-
N && N != r.Init && ($.clearGutter($.state.foldGutter.options.gutter), $.state.foldGutter = null, $.off("gutterClick",
|
|
7162
|
+
N && N != r.Init && ($.clearGutter($.state.foldGutter.options.gutter), $.state.foldGutter = null, $.off("gutterClick", F), $.off("changes", W), $.off("viewportChange", z), $.off("fold", A), $.off("unfold", A), $.off("swapDoc", W), $.off("optionChange", L)), I && ($.state.foldGutter = new u(f(I)), S($), $.on("gutterClick", F), $.on("changes", W), $.on("viewportChange", z), $.on("fold", A), $.on("unfold", A), $.on("swapDoc", W), $.on("optionChange", L));
|
|
7163
7163
|
});
|
|
7164
7164
|
var o = r.Pos;
|
|
7165
7165
|
function u($) {
|
|
@@ -7185,9 +7185,9 @@ sc();
|
|
|
7185
7185
|
}
|
|
7186
7186
|
function m($, I, N) {
|
|
7187
7187
|
var H = $.state.foldGutter.options, V = I - 1, ne = $.foldOption(H, "minFoldSize"), ue = $.foldOption(H, "rangeFinder"), se = typeof H.indicatorFolded == "string" && k(H.indicatorFolded), de = typeof H.indicatorOpen == "string" && k(H.indicatorOpen);
|
|
7188
|
-
$.eachLine(I, N, function(
|
|
7188
|
+
$.eachLine(I, N, function(Ae) {
|
|
7189
7189
|
++V;
|
|
7190
|
-
var Fe = null, ie =
|
|
7190
|
+
var Fe = null, ie = Ae.gutterMarkers;
|
|
7191
7191
|
if (ie && (ie = ie[H.gutter]), h($, V)) {
|
|
7192
7192
|
if (se && ie && se.test(ie.className)) return;
|
|
7193
7193
|
Fe = y(H.indicatorFolded);
|
|
@@ -7198,7 +7198,7 @@ sc();
|
|
|
7198
7198
|
Fe = y(H.indicatorOpen);
|
|
7199
7199
|
}
|
|
7200
7200
|
}
|
|
7201
|
-
!Fe && !ie || $.setGutterMarker(
|
|
7201
|
+
!Fe && !ie || $.setGutterMarker(Ae, H.gutter, Fe);
|
|
7202
7202
|
});
|
|
7203
7203
|
}
|
|
7204
7204
|
function k($) {
|
|
@@ -7210,7 +7210,7 @@ sc();
|
|
|
7210
7210
|
m($, I.from, I.to);
|
|
7211
7211
|
}), N.from = I.from, N.to = I.to);
|
|
7212
7212
|
}
|
|
7213
|
-
function
|
|
7213
|
+
function F($, I, N) {
|
|
7214
7214
|
var H = $.state.foldGutter;
|
|
7215
7215
|
if (H) {
|
|
7216
7216
|
var V = H.options;
|
|
@@ -7244,7 +7244,7 @@ sc();
|
|
|
7244
7244
|
}, N.updateViewportTimeSpan || 400);
|
|
7245
7245
|
}
|
|
7246
7246
|
}
|
|
7247
|
-
function
|
|
7247
|
+
function A($, I) {
|
|
7248
7248
|
var N = $.state.foldGutter;
|
|
7249
7249
|
if (N) {
|
|
7250
7250
|
var H = I.line;
|
|
@@ -7260,26 +7260,26 @@ sc();
|
|
|
7260
7260
|
function o(u) {
|
|
7261
7261
|
return function(f, h) {
|
|
7262
7262
|
var y = h.line, m = f.getLine(y);
|
|
7263
|
-
function k(
|
|
7263
|
+
function k(A) {
|
|
7264
7264
|
for (var $, I = h.ch, N = 0; ; ) {
|
|
7265
|
-
var H = I <= 0 ? -1 : m.lastIndexOf(
|
|
7265
|
+
var H = I <= 0 ? -1 : m.lastIndexOf(A[0], I - 1);
|
|
7266
7266
|
if (H == -1) {
|
|
7267
7267
|
if (N == 1) break;
|
|
7268
7268
|
N = 1, I = m.length;
|
|
7269
7269
|
continue;
|
|
7270
7270
|
}
|
|
7271
7271
|
if (N == 1 && H < h.ch) break;
|
|
7272
|
-
if ($ = f.getTokenTypeAt(r.Pos(y, H + 1)), !/^(comment|string)/.test($)) return { ch: H + 1, tokenType: $, pair:
|
|
7272
|
+
if ($ = f.getTokenTypeAt(r.Pos(y, H + 1)), !/^(comment|string)/.test($)) return { ch: H + 1, tokenType: $, pair: A };
|
|
7273
7273
|
I = H - 1;
|
|
7274
7274
|
}
|
|
7275
7275
|
}
|
|
7276
|
-
function S(
|
|
7277
|
-
var $ = 1, I = f.lastLine(), N, H =
|
|
7276
|
+
function S(A) {
|
|
7277
|
+
var $ = 1, I = f.lastLine(), N, H = A.ch, V;
|
|
7278
7278
|
e: for (var ne = y; ne <= I; ++ne)
|
|
7279
7279
|
for (var ue = f.getLine(ne), se = ne == y ? H : 0; ; ) {
|
|
7280
|
-
var de = ue.indexOf(
|
|
7281
|
-
if (de < 0 && (de = ue.length),
|
|
7282
|
-
if (f.getTokenTypeAt(r.Pos(ne, se + 1)) ==
|
|
7280
|
+
var de = ue.indexOf(A.pair[0], se), Ae = ue.indexOf(A.pair[1], se);
|
|
7281
|
+
if (de < 0 && (de = ue.length), Ae < 0 && (Ae = ue.length), se = Math.min(de, Ae), se == ue.length) break;
|
|
7282
|
+
if (f.getTokenTypeAt(r.Pos(ne, se + 1)) == A.tokenType) {
|
|
7283
7283
|
if (se == de) ++$;
|
|
7284
7284
|
else if (!--$) {
|
|
7285
7285
|
N = ne, V = se;
|
|
@@ -7293,15 +7293,15 @@ sc();
|
|
|
7293
7293
|
to: r.Pos(N, V)
|
|
7294
7294
|
};
|
|
7295
7295
|
}
|
|
7296
|
-
for (var
|
|
7296
|
+
for (var F = [], L = 0; L < u.length; L++) {
|
|
7297
7297
|
var W = k(u[L]);
|
|
7298
|
-
W &&
|
|
7298
|
+
W && F.push(W);
|
|
7299
7299
|
}
|
|
7300
|
-
|
|
7301
|
-
return
|
|
7300
|
+
F.sort(function(A, $) {
|
|
7301
|
+
return A.ch - $.ch;
|
|
7302
7302
|
});
|
|
7303
|
-
for (var L = 0; L <
|
|
7304
|
-
var z = S(
|
|
7303
|
+
for (var L = 0; L < F.length; L++) {
|
|
7304
|
+
var z = S(F[L]);
|
|
7305
7305
|
if (z) return z;
|
|
7306
7306
|
}
|
|
7307
7307
|
return null;
|
|
@@ -7312,7 +7312,7 @@ sc();
|
|
|
7312
7312
|
if (L < u.firstLine() || L > u.lastLine()) return null;
|
|
7313
7313
|
var W = u.getTokenAt(r.Pos(L, 1));
|
|
7314
7314
|
if (/\S/.test(W.string) || (W = u.getTokenAt(r.Pos(L, W.end + 1))), W.type != "keyword" || W.string != "import") return null;
|
|
7315
|
-
for (var z = L,
|
|
7315
|
+
for (var z = L, A = Math.min(u.lastLine(), L + 10); z <= A; ++z) {
|
|
7316
7316
|
var $ = u.getLine(z), I = $.indexOf(";");
|
|
7317
7317
|
if (I != -1) return { startCh: W.end, end: r.Pos(z, I) };
|
|
7318
7318
|
}
|
|
@@ -7321,16 +7321,16 @@ sc();
|
|
|
7321
7321
|
if (!m || h(y - 1) || (k = h(y - 2)) && k.end.line == y - 1)
|
|
7322
7322
|
return null;
|
|
7323
7323
|
for (var S = m.end; ; ) {
|
|
7324
|
-
var
|
|
7325
|
-
if (
|
|
7326
|
-
S =
|
|
7324
|
+
var F = h(S.line + 1);
|
|
7325
|
+
if (F == null) break;
|
|
7326
|
+
S = F.end;
|
|
7327
7327
|
}
|
|
7328
7328
|
return { from: u.clipPos(r.Pos(y, m.startCh + 1)), to: S };
|
|
7329
7329
|
}), r.registerHelper("fold", "include", function(u, f) {
|
|
7330
|
-
function h(
|
|
7331
|
-
if (
|
|
7332
|
-
var L = u.getTokenAt(r.Pos(
|
|
7333
|
-
if (/\S/.test(L.string) || (L = u.getTokenAt(r.Pos(
|
|
7330
|
+
function h(F) {
|
|
7331
|
+
if (F < u.firstLine() || F > u.lastLine()) return null;
|
|
7332
|
+
var L = u.getTokenAt(r.Pos(F, 1));
|
|
7333
|
+
if (/\S/.test(L.string) || (L = u.getTokenAt(r.Pos(F, L.end + 1))), L.type == "meta" && L.string.slice(0, 8) == "#include") return L.start + 8;
|
|
7334
7334
|
}
|
|
7335
7335
|
var y = f.line, m = h(y);
|
|
7336
7336
|
if (m == null || h(y - 1) != null) return null;
|
|
@@ -7568,11 +7568,11 @@ var hc = { exports: {} };
|
|
|
7568
7568
|
}(h), m = window.CodeMirror || y.default;
|
|
7569
7569
|
typeof Object.assign != "function" && Object.defineProperty(Object, "assign", { value: function(k, S) {
|
|
7570
7570
|
if (k == null) throw new TypeError("Cannot convert undefined or null to object");
|
|
7571
|
-
for (var
|
|
7571
|
+
for (var F = Object(k), L = 1; L < arguments.length; L++) {
|
|
7572
7572
|
var W = arguments[L];
|
|
7573
|
-
if (W != null) for (var z in W) Object.prototype.hasOwnProperty.call(W, z) && (
|
|
7573
|
+
if (W != null) for (var z in W) Object.prototype.hasOwnProperty.call(W, z) && (F[z] = W[z]);
|
|
7574
7574
|
}
|
|
7575
|
-
return
|
|
7575
|
+
return F;
|
|
7576
7576
|
}, writable: !0, configurable: !0 }), u.default = { name: "codemirror", data: function() {
|
|
7577
7577
|
return { content: "", codemirror: null, cminstance: null };
|
|
7578
7578
|
}, props: { code: String, value: String, marker: Function, unseenLines: Array, name: { type: String, default: "codemirror" }, placeholder: { type: String, default: "" }, merge: { type: Boolean, default: !1 }, options: { type: Object, default: function() {
|
|
@@ -7596,12 +7596,12 @@ var hc = { exports: {} };
|
|
|
7596
7596
|
this.merge ? (this.codemirror = m.MergeView(this.$refs.mergeview, S), this.cminstance = this.codemirror.edit) : (this.codemirror = m.fromTextArea(this.$refs.textarea, S), this.cminstance = this.codemirror, this.cminstance.setValue(this.code || this.value || this.content)), this.cminstance.on("change", function(L) {
|
|
7597
7597
|
k.content = L.getValue(), k.$emit && k.$emit("input", k.content);
|
|
7598
7598
|
});
|
|
7599
|
-
var
|
|
7599
|
+
var F = {};
|
|
7600
7600
|
["scroll", "changes", "beforeChange", "cursorActivity", "keyHandled", "inputRead", "electricInput", "beforeSelectionChange", "viewportChange", "swapDoc", "gutterClick", "gutterContextMenu", "focus", "blur", "refresh", "optionChange", "scrollCursorIntoView", "update"].concat(this.events).concat(this.globalEvents).filter(function(L) {
|
|
7601
|
-
return !
|
|
7601
|
+
return !F[L] && (F[L] = !0);
|
|
7602
7602
|
}).forEach(function(L) {
|
|
7603
7603
|
k.cminstance.on(L, function() {
|
|
7604
|
-
for (var W = arguments.length, z = Array(W),
|
|
7604
|
+
for (var W = arguments.length, z = Array(W), A = 0; A < W; A++) z[A] = arguments[A];
|
|
7605
7605
|
k.$emit.apply(k, [L].concat(z));
|
|
7606
7606
|
var $ = L.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
7607
7607
|
$ !== L && k.$emit.apply(k, [$].concat(z));
|
|
@@ -7624,8 +7624,8 @@ var hc = { exports: {} };
|
|
|
7624
7624
|
}, unseenLineMarkers: function() {
|
|
7625
7625
|
var k = this;
|
|
7626
7626
|
this.unseenLines !== void 0 && this.marker !== void 0 && this.unseenLines.forEach(function(S) {
|
|
7627
|
-
var
|
|
7628
|
-
k.cminstance.setGutterMarker(S, "breakpoints",
|
|
7627
|
+
var F = k.cminstance.lineInfo(S);
|
|
7628
|
+
k.cminstance.setGutterMarker(S, "breakpoints", F.gutterMarkers ? null : k.marker());
|
|
7629
7629
|
});
|
|
7630
7630
|
}, switchMerge: function() {
|
|
7631
7631
|
var k = this.cminstance.doc.history, S = this.cminstance.doc.cleanGeneration;
|
|
@@ -7643,42 +7643,42 @@ var hc = { exports: {} };
|
|
|
7643
7643
|
return h[L];
|
|
7644
7644
|
});
|
|
7645
7645
|
}(m);
|
|
7646
|
-
var k = f(5), S = f(4),
|
|
7647
|
-
u.default =
|
|
7646
|
+
var k = f(5), S = f(4), F = S(y.a, k.a, !1, null, null, null);
|
|
7647
|
+
u.default = F.exports;
|
|
7648
7648
|
}, function(o, u, f) {
|
|
7649
7649
|
function h(z) {
|
|
7650
7650
|
return z && z.__esModule ? z : { default: z };
|
|
7651
7651
|
}
|
|
7652
7652
|
Object.defineProperty(u, "__esModule", { value: !0 }), u.install = u.codemirror = u.CodeMirror = void 0;
|
|
7653
|
-
var y = f(0), m = h(y), k = f(2), S = h(k),
|
|
7654
|
-
|
|
7655
|
-
return
|
|
7656
|
-
}),
|
|
7657
|
-
return
|
|
7653
|
+
var y = f(0), m = h(y), k = f(2), S = h(k), F = window.CodeMirror || m.default, L = function(z, A) {
|
|
7654
|
+
A && (A.options && (S.default.props.globalOptions.default = function() {
|
|
7655
|
+
return A.options;
|
|
7656
|
+
}), A.events && (S.default.props.globalEvents.default = function() {
|
|
7657
|
+
return A.events;
|
|
7658
7658
|
})), z.component(S.default.name, S.default);
|
|
7659
|
-
}, W = { CodeMirror:
|
|
7660
|
-
u.default = W, u.CodeMirror =
|
|
7659
|
+
}, W = { CodeMirror: F, codemirror: S.default, install: L };
|
|
7660
|
+
u.default = W, u.CodeMirror = F, u.codemirror = S.default, u.install = L;
|
|
7661
7661
|
}, function(o, u) {
|
|
7662
7662
|
o.exports = function(f, h, y, m, k, S) {
|
|
7663
|
-
var
|
|
7664
|
-
W !== "object" && W !== "function" || (
|
|
7663
|
+
var F, L = f = f || {}, W = typeof f.default;
|
|
7664
|
+
W !== "object" && W !== "function" || (F = f, L = f.default);
|
|
7665
7665
|
var z = typeof L == "function" ? L.options : L;
|
|
7666
7666
|
h && (z.render = h.render, z.staticRenderFns = h.staticRenderFns, z._compiled = !0), y && (z.functional = !0), k && (z._scopeId = k);
|
|
7667
|
-
var
|
|
7668
|
-
if (S ? (
|
|
7667
|
+
var A;
|
|
7668
|
+
if (S ? (A = function(N) {
|
|
7669
7669
|
N = N || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, N || typeof __VUE_SSR_CONTEXT__ > "u" || (N = __VUE_SSR_CONTEXT__), m && m.call(this, N), N && N._registeredComponents && N._registeredComponents.add(S);
|
|
7670
|
-
}, z._ssrRegister =
|
|
7670
|
+
}, z._ssrRegister = A) : m && (A = m), A) {
|
|
7671
7671
|
var $ = z.functional, I = $ ? z.render : z.beforeCreate;
|
|
7672
|
-
$ ? (z._injectStyles =
|
|
7673
|
-
return
|
|
7674
|
-
}) : z.beforeCreate = I ? [].concat(I,
|
|
7672
|
+
$ ? (z._injectStyles = A, z.render = function(N, H) {
|
|
7673
|
+
return A.call(H), I(N, H);
|
|
7674
|
+
}) : z.beforeCreate = I ? [].concat(I, A) : [A];
|
|
7675
7675
|
}
|
|
7676
|
-
return { esModule:
|
|
7676
|
+
return { esModule: F, exports: L, options: z };
|
|
7677
7677
|
};
|
|
7678
7678
|
}, function(o, u, f) {
|
|
7679
7679
|
var h = function() {
|
|
7680
|
-
var k = this, S = k.$createElement,
|
|
7681
|
-
return
|
|
7680
|
+
var k = this, S = k.$createElement, F = k._self._c || S;
|
|
7681
|
+
return F("div", { staticClass: "vue-codemirror", class: { merge: k.merge } }, [k.merge ? F("div", { ref: "mergeview" }) : F("textarea", { ref: "textarea", attrs: { name: k.name, placeholder: k.placeholder } })]);
|
|
7682
7682
|
}, y = [], m = { render: h, staticRenderFns: y };
|
|
7683
7683
|
u.a = m;
|
|
7684
7684
|
}]);
|
|
@@ -7923,12 +7923,12 @@ class La {
|
|
|
7923
7923
|
if (!(r = h.exec(n)) || this.rules.block.hr.test(n))
|
|
7924
7924
|
break;
|
|
7925
7925
|
y = r[0], n = n.substring(y.length);
|
|
7926
|
-
let
|
|
7926
|
+
let F = r[2].split(`
|
|
7927
7927
|
`, 1)[0].replace(/^\t+/, (I) => " ".repeat(3 * I.length)), L = n.split(`
|
|
7928
7928
|
`, 1)[0], W = 0;
|
|
7929
|
-
this.options.pedantic ? (W = 2, m =
|
|
7929
|
+
this.options.pedantic ? (W = 2, m = F.trimStart()) : (W = r[2].search(/[^ ]/), W = W > 4 ? 1 : W, m = F.slice(W), W += r[1].length);
|
|
7930
7930
|
let z = !1;
|
|
7931
|
-
if (!
|
|
7931
|
+
if (!F && /^ *$/.test(L) && (y += L + `
|
|
7932
7932
|
`, n = n.substring(L.length + 1), S = !0), !S) {
|
|
7933
7933
|
const I = new RegExp(`^ {0,${Math.min(3, W - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), N = new RegExp(`^ {0,${Math.min(3, W - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), H = new RegExp(`^ {0,${Math.min(3, W - 1)}}(?:\`\`\`|~~~)`), V = new RegExp(`^ {0,${Math.min(3, W - 1)}}#`);
|
|
7934
7934
|
for (; n; ) {
|
|
@@ -7940,21 +7940,21 @@ class La {
|
|
|
7940
7940
|
m += `
|
|
7941
7941
|
` + L.slice(W);
|
|
7942
7942
|
else {
|
|
7943
|
-
if (z ||
|
|
7943
|
+
if (z || F.search(/[^ ]/) >= 4 || H.test(F) || V.test(F) || N.test(F))
|
|
7944
7944
|
break;
|
|
7945
7945
|
m += `
|
|
7946
7946
|
` + L;
|
|
7947
7947
|
}
|
|
7948
7948
|
!z && !L.trim() && (z = !0), y += ne + `
|
|
7949
|
-
`, n = n.substring(ne.length + 1),
|
|
7949
|
+
`, n = n.substring(ne.length + 1), F = L.slice(W);
|
|
7950
7950
|
}
|
|
7951
7951
|
}
|
|
7952
7952
|
f.loose || (k ? f.loose = !0 : /\n *\n *$/.test(y) && (k = !0));
|
|
7953
|
-
let
|
|
7954
|
-
this.options.gfm && (
|
|
7953
|
+
let A = null, $;
|
|
7954
|
+
this.options.gfm && (A = /^\[[ xX]\] /.exec(m), A && ($ = A[0] !== "[ ] ", m = m.replace(/^\[[ xX]\] +/, ""))), f.items.push({
|
|
7955
7955
|
type: "list_item",
|
|
7956
7956
|
raw: y,
|
|
7957
|
-
task: !!
|
|
7957
|
+
task: !!A,
|
|
7958
7958
|
checked: $,
|
|
7959
7959
|
loose: !1,
|
|
7960
7960
|
text: m,
|
|
@@ -7964,7 +7964,7 @@ class La {
|
|
|
7964
7964
|
f.items[f.items.length - 1].raw = y.trimEnd(), f.items[f.items.length - 1].text = m.trimEnd(), f.raw = f.raw.trimEnd();
|
|
7965
7965
|
for (let S = 0; S < f.items.length; S++)
|
|
7966
7966
|
if (this.lexer.state.top = !1, f.items[S].tokens = this.lexer.blockTokens(f.items[S].text, []), !f.loose) {
|
|
7967
|
-
const
|
|
7967
|
+
const F = f.items[S].tokens.filter((W) => W.type === "space"), L = F.length > 0 && F.some((W) => /\n.*\n/.test(W.raw));
|
|
7968
7968
|
f.loose = L;
|
|
7969
7969
|
}
|
|
7970
7970
|
if (f.loose)
|
|
@@ -8131,8 +8131,8 @@ class La {
|
|
|
8131
8131
|
if (!(u[1] || u[2] || "") || !o || this.rules.inline.punctuation.exec(o)) {
|
|
8132
8132
|
const h = [...u[0]].length - 1;
|
|
8133
8133
|
let y, m, k = h, S = 0;
|
|
8134
|
-
const
|
|
8135
|
-
for (
|
|
8134
|
+
const F = u[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
8135
|
+
for (F.lastIndex = 0, r = r.slice(-1 * n.length + h); (u = F.exec(r)) != null; ) {
|
|
8136
8136
|
if (y = u[1] || u[2] || u[3] || u[4] || u[5] || u[6], !y)
|
|
8137
8137
|
continue;
|
|
8138
8138
|
if (m = [...y].length, u[3] || u[4]) {
|
|
@@ -8147,12 +8147,12 @@ class La {
|
|
|
8147
8147
|
m = Math.min(m, m + k + S);
|
|
8148
8148
|
const L = [...u[0]][0].length, W = n.slice(0, h + u.index + L + m);
|
|
8149
8149
|
if (Math.min(h, m) % 2) {
|
|
8150
|
-
const
|
|
8150
|
+
const A = W.slice(1, -1);
|
|
8151
8151
|
return {
|
|
8152
8152
|
type: "em",
|
|
8153
8153
|
raw: W,
|
|
8154
|
-
text:
|
|
8155
|
-
tokens: this.lexer.inlineTokens(
|
|
8154
|
+
text: A,
|
|
8155
|
+
tokens: this.lexer.inlineTokens(A)
|
|
8156
8156
|
};
|
|
8157
8157
|
}
|
|
8158
8158
|
const z = W.slice(2, -2);
|
|
@@ -8283,11 +8283,11 @@ const fh = /^(?: *(?:\n|$))+/, dh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, hh =
|
|
|
8283
8283
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
8284
8284
|
paragraph: je(qs).replace("hr", Fi).replace("heading", ` *#{1,6} *[^
|
|
8285
8285
|
]`).replace("lheading", yc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
8286
|
-
}, xc = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, wc = /^( {2,}|\\)\n(?!\s*$)/, Sh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ri = "\\p{P}$+<=>`^|~", Ch = je(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ri).getRegex(), Th = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, _h = je(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ri).getRegex(), Lh = je("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ri).getRegex(), Eh = je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ri).getRegex(), Ih = je(/\\([punct])/, "gu").replace(/punct/g, Ri).getRegex(),
|
|
8286
|
+
}, xc = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, wc = /^( {2,}|\\)\n(?!\s*$)/, Sh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ri = "\\p{P}$+<=>`^|~", Ch = je(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ri).getRegex(), Th = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, _h = je(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ri).getRegex(), Lh = je("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ri).getRegex(), Eh = je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ri).getRegex(), Ih = je(/\\([punct])/, "gu").replace(/punct/g, Ri).getRegex(), Dh = je(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ah = je(Gs).replace("(?:-->|$)", "-->").getRegex(), Oh = je("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ah).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ea = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Nh = je(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ea).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), kc = je(/^!?\[(label)\]\[(ref)\]/).replace("label", Ea).replace("ref", Us).getRegex(), Sc = je(/^!?\[(ref)\](?:\[\])?/).replace("ref", Us).getRegex(), Fh = je("reflink|nolink(?!\\()", "g").replace("reflink", kc).replace("nolink", Sc).getRegex(), Vs = {
|
|
8287
8287
|
_backpedal: Li,
|
|
8288
8288
|
// only used for GFM url
|
|
8289
8289
|
anyPunctuation: Ih,
|
|
8290
|
-
autolink:
|
|
8290
|
+
autolink: Dh,
|
|
8291
8291
|
blockSkip: Th,
|
|
8292
8292
|
br: wc,
|
|
8293
8293
|
code: kh,
|
|
@@ -8530,10 +8530,10 @@ class vn {
|
|
|
8530
8530
|
}
|
|
8531
8531
|
if (f = n, this.options.extensions && this.options.extensions.startInline) {
|
|
8532
8532
|
let S = 1 / 0;
|
|
8533
|
-
const
|
|
8533
|
+
const F = n.slice(1);
|
|
8534
8534
|
let L;
|
|
8535
8535
|
this.options.extensions.startInline.forEach((W) => {
|
|
8536
|
-
L = W.call({ lexer: this },
|
|
8536
|
+
L = W.call({ lexer: this }, F), typeof L == "number" && L >= 0 && (S = Math.min(S, L));
|
|
8537
8537
|
}), S < 1 / 0 && S >= 0 && (f = n.substring(0, S + 1));
|
|
8538
8538
|
}
|
|
8539
8539
|
if (o = this.tokenizer.inlineText(f)) {
|
|
@@ -8741,10 +8741,10 @@ class yn {
|
|
|
8741
8741
|
y += this.renderer.tablerow(m);
|
|
8742
8742
|
let k = "";
|
|
8743
8743
|
for (let S = 0; S < h.rows.length; S++) {
|
|
8744
|
-
const
|
|
8744
|
+
const F = h.rows[S];
|
|
8745
8745
|
m = "";
|
|
8746
|
-
for (let L = 0; L <
|
|
8747
|
-
m += this.renderer.tablecell(this.parseInline(
|
|
8746
|
+
for (let L = 0; L < F.length; L++)
|
|
8747
|
+
m += this.renderer.tablecell(this.parseInline(F[L].tokens), { header: !1, align: h.align[L] });
|
|
8748
8748
|
k += this.renderer.tablerow(m);
|
|
8749
8749
|
}
|
|
8750
8750
|
o += this.renderer.table(y, k);
|
|
@@ -8758,17 +8758,17 @@ class yn {
|
|
|
8758
8758
|
case "list": {
|
|
8759
8759
|
const h = f, y = h.ordered, m = h.start, k = h.loose;
|
|
8760
8760
|
let S = "";
|
|
8761
|
-
for (let
|
|
8762
|
-
const L = h.items[
|
|
8763
|
-
let
|
|
8761
|
+
for (let F = 0; F < h.items.length; F++) {
|
|
8762
|
+
const L = h.items[F], W = L.checked, z = L.task;
|
|
8763
|
+
let A = "";
|
|
8764
8764
|
if (L.task) {
|
|
8765
8765
|
const $ = this.renderer.checkbox(!!W);
|
|
8766
8766
|
k ? L.tokens.length > 0 && L.tokens[0].type === "paragraph" ? (L.tokens[0].text = $ + " " + L.tokens[0].text, L.tokens[0].tokens && L.tokens[0].tokens.length > 0 && L.tokens[0].tokens[0].type === "text" && (L.tokens[0].tokens[0].text = $ + " " + L.tokens[0].tokens[0].text)) : L.tokens.unshift({
|
|
8767
8767
|
type: "text",
|
|
8768
8768
|
text: $ + " "
|
|
8769
|
-
}) :
|
|
8769
|
+
}) : A += $ + " ";
|
|
8770
8770
|
}
|
|
8771
|
-
|
|
8771
|
+
A += this.parse(L.tokens, k), S += this.renderer.listitem(A, z, !!W);
|
|
8772
8772
|
}
|
|
8773
8773
|
o += this.renderer.list(S, y, m);
|
|
8774
8774
|
continue;
|
|
@@ -8984,8 +8984,8 @@ class $h {
|
|
|
8984
8984
|
continue;
|
|
8985
8985
|
const y = h, m = o.renderer[y], k = f[y];
|
|
8986
8986
|
f[y] = (...S) => {
|
|
8987
|
-
let
|
|
8988
|
-
return
|
|
8987
|
+
let F = m.apply(f, S);
|
|
8988
|
+
return F === !1 && (F = k.apply(f, S)), F || "";
|
|
8989
8989
|
};
|
|
8990
8990
|
}
|
|
8991
8991
|
u.renderer = f;
|
|
@@ -8999,8 +8999,8 @@ class $h {
|
|
|
8999
8999
|
continue;
|
|
9000
9000
|
const y = h, m = o.tokenizer[y], k = f[y];
|
|
9001
9001
|
f[y] = (...S) => {
|
|
9002
|
-
let
|
|
9003
|
-
return
|
|
9002
|
+
let F = m.apply(f, S);
|
|
9003
|
+
return F === !1 && (F = k.apply(f, S)), F;
|
|
9004
9004
|
};
|
|
9005
9005
|
}
|
|
9006
9006
|
u.tokenizer = f;
|
|
@@ -9016,11 +9016,11 @@ class $h {
|
|
|
9016
9016
|
Ei.passThroughHooks.has(h) ? f[y] = (S) => {
|
|
9017
9017
|
if (this.defaults.async)
|
|
9018
9018
|
return Promise.resolve(m.call(f, S)).then((L) => k.call(f, L));
|
|
9019
|
-
const
|
|
9020
|
-
return k.call(f,
|
|
9019
|
+
const F = m.call(f, S);
|
|
9020
|
+
return k.call(f, F);
|
|
9021
9021
|
} : f[y] = (...S) => {
|
|
9022
|
-
let
|
|
9023
|
-
return
|
|
9022
|
+
let F = m.apply(f, S);
|
|
9023
|
+
return F === !1 && (F = k.apply(f, S)), F;
|
|
9024
9024
|
};
|
|
9025
9025
|
}
|
|
9026
9026
|
u.hooks = f;
|
|
@@ -9922,7 +9922,7 @@ var bu = {
|
|
|
9922
9922
|
zoomed: null,
|
|
9923
9923
|
play: null,
|
|
9924
9924
|
stop: null
|
|
9925
|
-
}, mp = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', Fa = typeof window < "u" && typeof window.document < "u", En = Fa ? window : {}, Wr = Fa && En.document.documentElement ? "ontouchstart" in En.document.documentElement : !1, Qs = Fa ? "PointerEvent" in En : !1, Ne = "viewer", ka = "move", Ec = "switch", Ti = "zoom", ya = "".concat(Ne, "-active"), vp = "".concat(Ne, "-close"), Sa = "".concat(Ne, "-fade"), zs = "".concat(Ne, "-fixed"), yp = "".concat(Ne, "-fullscreen"), xu = "".concat(Ne, "-fullscreen-exit"), ir = "".concat(Ne, "-hide"), bp = "".concat(Ne, "-hide-md-down"), xp = "".concat(Ne, "-hide-sm-down"), wp = "".concat(Ne, "-hide-xs-down"), Qt = "".concat(Ne, "-in"), Ii = "".concat(Ne, "-invisible"), jr = "".concat(Ne, "-loading"), kp = "".concat(Ne, "-move"), wu = "".concat(Ne, "-open"), $r = "".concat(Ne, "-show"), it = "".concat(Ne, "-transition"), qr = "click", Bs = "dblclick", ku = "dragstart", Su = "focusin", Cu = "keydown", Zt = "load", ar = "error", Sp = Wr ? "touchend touchcancel" : "mouseup", Cp = Wr ? "touchmove" : "mousemove", Tp = Wr ? "touchstart" : "mousedown", Tu = Qs ? "pointerdown" : Tp, _u = Qs ? "pointermove" : Cp, Lu = Qs ? "pointerup pointercancel" : Sp, Eu = "resize", cn = "transitionend", Iu = "wheel",
|
|
9925
|
+
}, mp = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', Fa = typeof window < "u" && typeof window.document < "u", En = Fa ? window : {}, Wr = Fa && En.document.documentElement ? "ontouchstart" in En.document.documentElement : !1, Qs = Fa ? "PointerEvent" in En : !1, Ne = "viewer", ka = "move", Ec = "switch", Ti = "zoom", ya = "".concat(Ne, "-active"), vp = "".concat(Ne, "-close"), Sa = "".concat(Ne, "-fade"), zs = "".concat(Ne, "-fixed"), yp = "".concat(Ne, "-fullscreen"), xu = "".concat(Ne, "-fullscreen-exit"), ir = "".concat(Ne, "-hide"), bp = "".concat(Ne, "-hide-md-down"), xp = "".concat(Ne, "-hide-sm-down"), wp = "".concat(Ne, "-hide-xs-down"), Qt = "".concat(Ne, "-in"), Ii = "".concat(Ne, "-invisible"), jr = "".concat(Ne, "-loading"), kp = "".concat(Ne, "-move"), wu = "".concat(Ne, "-open"), $r = "".concat(Ne, "-show"), it = "".concat(Ne, "-transition"), qr = "click", Bs = "dblclick", ku = "dragstart", Su = "focusin", Cu = "keydown", Zt = "load", ar = "error", Sp = Wr ? "touchend touchcancel" : "mouseup", Cp = Wr ? "touchmove" : "mousemove", Tp = Wr ? "touchstart" : "mousedown", Tu = Qs ? "pointerdown" : Tp, _u = Qs ? "pointermove" : Cp, Lu = Qs ? "pointerup pointercancel" : Sp, Eu = "resize", cn = "transitionend", Iu = "wheel", Du = "ready", Au = "show", Ou = "shown", Nu = "hide", Fu = "hidden", Ru = "view", Ai = "viewed", Mu = "move", $u = "moved", Pu = "rotate", zu = "rotated", Bu = "scale", Hu = "scaled", Wu = "zoom", ju = "zoomed", qu = "play", Uu = "stop", Da = "".concat(Ne, "Action"), Zs = /\s\s*/, ba = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
9926
9926
|
function Oi(l) {
|
|
9927
9927
|
return typeof l == "string";
|
|
9928
9928
|
}
|
|
@@ -10024,9 +10024,9 @@ function Ni(l, n, r) {
|
|
|
10024
10024
|
r ? Le(l, n) : Be(l, n);
|
|
10025
10025
|
}
|
|
10026
10026
|
}
|
|
10027
|
-
var
|
|
10027
|
+
var Dp = /([a-z\d])([A-Z])/g;
|
|
10028
10028
|
function eo(l) {
|
|
10029
|
-
return l.replace(
|
|
10029
|
+
return l.replace(Dp, "$1-$2").toLowerCase();
|
|
10030
10030
|
}
|
|
10031
10031
|
function Hr(l, n) {
|
|
10032
10032
|
return Ur(l[n]) ? l[n] : l.dataset ? l.dataset[n] : l.getAttribute("data-".concat(eo(n)));
|
|
@@ -10072,8 +10072,8 @@ function Ee(l, n, r) {
|
|
|
10072
10072
|
var h = l.listeners, y = h === void 0 ? {} : h;
|
|
10073
10073
|
u = function() {
|
|
10074
10074
|
delete y[f][r], l.removeEventListener(f, u, o);
|
|
10075
|
-
for (var k = arguments.length, S = new Array(k),
|
|
10076
|
-
S[
|
|
10075
|
+
for (var k = arguments.length, S = new Array(k), F = 0; F < k; F++)
|
|
10076
|
+
S[F] = arguments[F];
|
|
10077
10077
|
r.apply(l, S);
|
|
10078
10078
|
}, y[f] || (y[f] = {}), y[f][r] && l.removeEventListener(f, y[f][r], o), y[f][r] = u, l.listeners = y;
|
|
10079
10079
|
}
|
|
@@ -10088,7 +10088,7 @@ function ot(l, n, r, o) {
|
|
|
10088
10088
|
detail: r
|
|
10089
10089
|
}, o)) : (u = document.createEvent("CustomEvent"), u.initCustomEvent(n, !0, !0, r)), l.dispatchEvent(u);
|
|
10090
10090
|
}
|
|
10091
|
-
function
|
|
10091
|
+
function Ap(l) {
|
|
10092
10092
|
var n = l.getBoundingClientRect();
|
|
10093
10093
|
return {
|
|
10094
10094
|
left: n.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
@@ -10109,7 +10109,7 @@ function Op(l) {
|
|
|
10109
10109
|
return Oi(l) ? decodeURIComponent(l.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
|
|
10110
10110
|
}
|
|
10111
10111
|
var Os = En.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test(En.navigator.userAgent);
|
|
10112
|
-
function
|
|
10112
|
+
function Dc(l, n, r) {
|
|
10113
10113
|
var o = document.createElement("img");
|
|
10114
10114
|
if (l.naturalWidth && !Os)
|
|
10115
10115
|
return r(l.naturalWidth, l.naturalHeight), o;
|
|
@@ -10137,7 +10137,7 @@ function Np(l) {
|
|
|
10137
10137
|
var n = Ys({}, l), r = [];
|
|
10138
10138
|
return Ke(l, function(o, u) {
|
|
10139
10139
|
delete n[u], Ke(n, function(f) {
|
|
10140
|
-
var h = Math.abs(o.startX - f.startX), y = Math.abs(o.startY - f.startY), m = Math.abs(o.endX - f.endX), k = Math.abs(o.endY - f.endY), S = Math.sqrt(h * h + y * y),
|
|
10140
|
+
var h = Math.abs(o.startX - f.startX), y = Math.abs(o.startY - f.startY), m = Math.abs(o.endX - f.endX), k = Math.abs(o.endY - f.endY), S = Math.sqrt(h * h + y * y), F = Math.sqrt(m * m + k * k), L = (F - S) / S;
|
|
10141
10141
|
r.push(L);
|
|
10142
10142
|
});
|
|
10143
10143
|
}), r.sort(function(o, u) {
|
|
@@ -10194,16 +10194,16 @@ var Rp = {
|
|
|
10194
10194
|
u.innerHTML = "", Ke(this.images, function(h, y) {
|
|
10195
10195
|
var m = h.src, k = h.alt || Op(m), S = n.getImageURL(h);
|
|
10196
10196
|
if (m || S) {
|
|
10197
|
-
var
|
|
10197
|
+
var F = document.createElement("li"), L = document.createElement("img");
|
|
10198
10198
|
Ke(o.inheritedAttributes, function(W) {
|
|
10199
10199
|
var z = h.getAttribute(W);
|
|
10200
10200
|
z !== null && L.setAttribute(W, z);
|
|
10201
|
-
}), o.navbar && (L.src = m || S), L.alt = k, L.setAttribute("data-original-url", S || m),
|
|
10201
|
+
}), o.navbar && (L.src = m || S), L.alt = k, L.setAttribute("data-original-url", S || m), F.setAttribute("data-index", y), F.setAttribute("data-viewer-action", "view"), F.setAttribute("role", "button"), o.keyboard && F.setAttribute("tabindex", 0), F.appendChild(L), u.appendChild(F), f.push(F);
|
|
10202
10202
|
}
|
|
10203
10203
|
}), this.items = f, Ke(f, function(h) {
|
|
10204
10204
|
var y = h.firstElementChild, m, k;
|
|
10205
|
-
Hs(y, "filled", !0), o.loading && Le(h, jr), Ee(y, Zt, m = function(
|
|
10206
|
-
Ge(y, ar, k), o.loading && Be(h, jr), n.loadImage(
|
|
10205
|
+
Hs(y, "filled", !0), o.loading && Le(h, jr), Ee(y, Zt, m = function(F) {
|
|
10206
|
+
Ge(y, ar, k), o.loading && Be(h, jr), n.loadImage(F);
|
|
10207
10207
|
}, {
|
|
10208
10208
|
once: !0
|
|
10209
10209
|
}), Ee(y, ar, k = function() {
|
|
@@ -10211,7 +10211,7 @@ var Rp = {
|
|
|
10211
10211
|
}, {
|
|
10212
10212
|
once: !0
|
|
10213
10213
|
});
|
|
10214
|
-
}), o.transition && Ee(r,
|
|
10214
|
+
}), o.transition && Ee(r, Ai, function() {
|
|
10215
10215
|
Le(u, it);
|
|
10216
10216
|
}, {
|
|
10217
10217
|
once: !0
|
|
@@ -10240,20 +10240,20 @@ var Rp = {
|
|
|
10240
10240
|
abort: function() {
|
|
10241
10241
|
S.onload = null;
|
|
10242
10242
|
}
|
|
10243
|
-
}, S =
|
|
10244
|
-
var W =
|
|
10245
|
-
r.imageInitializing = !1, m * W > y ? $ = y / W :
|
|
10246
|
-
var I = (y -
|
|
10243
|
+
}, S = Dc(u, o, function(F, L) {
|
|
10244
|
+
var W = F / L, z = Math.max(0, Math.min(1, o.initialCoverage)), A = y, $ = m;
|
|
10245
|
+
r.imageInitializing = !1, m * W > y ? $ = y / W : A = m * W, z = nt(z) ? z : 0.9, A = Math.min(A * z, F), $ = Math.min($ * z, L);
|
|
10246
|
+
var I = (y - A) / 2, N = (m - $) / 2, H = {
|
|
10247
10247
|
left: I,
|
|
10248
10248
|
top: N,
|
|
10249
10249
|
x: I,
|
|
10250
10250
|
y: N,
|
|
10251
|
-
width:
|
|
10251
|
+
width: A,
|
|
10252
10252
|
height: $,
|
|
10253
10253
|
oldRatio: 1,
|
|
10254
|
-
ratio:
|
|
10254
|
+
ratio: A / F,
|
|
10255
10255
|
aspectRatio: W,
|
|
10256
|
-
naturalWidth:
|
|
10256
|
+
naturalWidth: F,
|
|
10257
10257
|
naturalHeight: L
|
|
10258
10258
|
}, V = Kt({}, H);
|
|
10259
10259
|
o.rotatable && (H.rotate = k.rotate || 0, V.rotate = 0), o.scalable && (H.scaleX = k.scaleX || 1, H.scaleY = k.scaleY || 1, V.scaleX = 1, V.scaleY = 1), r.imageData = H, r.initialImageData = V, n && n();
|
|
@@ -10303,8 +10303,8 @@ var Rp = {
|
|
|
10303
10303
|
}
|
|
10304
10304
|
}, $p = {
|
|
10305
10305
|
click: function(n) {
|
|
10306
|
-
var r = this.options, o = this.imageData, u = n.target, f = Hr(u,
|
|
10307
|
-
switch (!f && u.localName === "img" && u.parentElement.localName === "li" && (u = u.parentElement, f = Hr(u,
|
|
10306
|
+
var r = this.options, o = this.imageData, u = n.target, f = Hr(u, Da);
|
|
10307
|
+
switch (!f && u.localName === "img" && u.parentElement.localName === "li" && (u = u.parentElement, f = Hr(u, Da)), Wr && n.isTrusted && u === this.canvas && clearTimeout(this.clickCanvasTimeout), f) {
|
|
10308
10308
|
case "mix":
|
|
10309
10309
|
this.played ? this.stop() : r.inline ? this.fulled ? this.exit() : this.full() : this.hide();
|
|
10310
10310
|
break;
|
|
@@ -10360,9 +10360,9 @@ var Rp = {
|
|
|
10360
10360
|
var r = this.element, o = this.options, u = this.image, f = this.index, h = this.viewerData;
|
|
10361
10361
|
Be(u, Ii), o.loading && Be(this.canvas, jr), u.style.cssText = "height:0;" + "margin-left:".concat(h.width / 2, "px;") + "margin-top:".concat(h.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function() {
|
|
10362
10362
|
Ni(u, kp, o.movable), Ni(u, it, o.transition), n.renderImage(function() {
|
|
10363
|
-
n.viewed = !0, n.viewing = !1, Ue(o.viewed) && Ee(r,
|
|
10363
|
+
n.viewed = !0, n.viewing = !1, Ue(o.viewed) && Ee(r, Ai, o.viewed, {
|
|
10364
10364
|
once: !0
|
|
10365
|
-
}), ot(r,
|
|
10365
|
+
}), ot(r, Ai, {
|
|
10366
10366
|
originalImage: n.images[f],
|
|
10367
10367
|
index: f,
|
|
10368
10368
|
image: u
|
|
@@ -10374,14 +10374,14 @@ var Rp = {
|
|
|
10374
10374
|
},
|
|
10375
10375
|
loadImage: function(n) {
|
|
10376
10376
|
var r = n.target, o = r.parentNode, u = o.offsetWidth || 30, f = o.offsetHeight || 50, h = !!Hr(r, "filled");
|
|
10377
|
-
|
|
10378
|
-
var k = y / m, S = u,
|
|
10379
|
-
f * k > u ? h ? S = f * k :
|
|
10377
|
+
Dc(r, this.options, function(y, m) {
|
|
10378
|
+
var k = y / m, S = u, F = f;
|
|
10379
|
+
f * k > u ? h ? S = f * k : F = u / k : h ? F = u / k : S = f * k, fn(r, Kt({
|
|
10380
10380
|
width: S,
|
|
10381
|
-
height:
|
|
10381
|
+
height: F
|
|
10382
10382
|
}, Ca({
|
|
10383
10383
|
translateX: (u - S) / 2,
|
|
10384
|
-
translateY: (f -
|
|
10384
|
+
translateY: (f - F) / 2
|
|
10385
10385
|
})));
|
|
10386
10386
|
});
|
|
10387
10387
|
},
|
|
@@ -10494,9 +10494,9 @@ var Rp = {
|
|
|
10494
10494
|
return this;
|
|
10495
10495
|
if (!this.ready)
|
|
10496
10496
|
return this.build(), this.ready && this.show(n), this;
|
|
10497
|
-
if (Ue(o.show) && Ee(r,
|
|
10497
|
+
if (Ue(o.show) && Ee(r, Au, o.show, {
|
|
10498
10498
|
once: !0
|
|
10499
|
-
}), ot(r,
|
|
10499
|
+
}), ot(r, Au) === !1 || !this.ready)
|
|
10500
10500
|
return this;
|
|
10501
10501
|
this.hiding && this.transitioning.abort(), this.showing = !0, this.open();
|
|
10502
10502
|
var u = this.viewer;
|
|
@@ -10531,8 +10531,8 @@ var Rp = {
|
|
|
10531
10531
|
Be(f, Qt), n.hidden();
|
|
10532
10532
|
};
|
|
10533
10533
|
if (u.transition && !r) {
|
|
10534
|
-
var m = function(
|
|
10535
|
-
|
|
10534
|
+
var m = function(F) {
|
|
10535
|
+
F && F.target === f && (Ge(f, cn, m), n.hidden());
|
|
10536
10536
|
}, k = function() {
|
|
10537
10537
|
Pr(f, it) ? (Ee(f, cn, m), Be(f, Qt)) : y();
|
|
10538
10538
|
};
|
|
@@ -10559,40 +10559,40 @@ var Rp = {
|
|
|
10559
10559
|
if (!this.isShown)
|
|
10560
10560
|
return this.index = r, this.show();
|
|
10561
10561
|
this.viewing && this.viewing.abort();
|
|
10562
|
-
var o = this.element, u = this.options, f = this.title, h = this.canvas, y = this.items[r], m = y.querySelector("img"), k = Hr(m, "originalUrl"), S = m.getAttribute("alt"),
|
|
10562
|
+
var o = this.element, u = this.options, f = this.title, h = this.canvas, y = this.items[r], m = y.querySelector("img"), k = Hr(m, "originalUrl"), S = m.getAttribute("alt"), F = document.createElement("img");
|
|
10563
10563
|
if (Ke(u.inheritedAttributes, function($) {
|
|
10564
10564
|
var I = m.getAttribute($);
|
|
10565
|
-
I !== null &&
|
|
10566
|
-
}),
|
|
10565
|
+
I !== null && F.setAttribute($, I);
|
|
10566
|
+
}), F.src = k, F.alt = S, Ue(u.view) && Ee(o, Ru, u.view, {
|
|
10567
10567
|
once: !0
|
|
10568
10568
|
}), ot(o, Ru, {
|
|
10569
10569
|
originalImage: this.images[r],
|
|
10570
10570
|
index: r,
|
|
10571
|
-
image:
|
|
10571
|
+
image: F
|
|
10572
10572
|
}) === !1 || !this.isShown || this.hiding || this.played)
|
|
10573
10573
|
return this;
|
|
10574
10574
|
var L = this.items[this.index];
|
|
10575
|
-
L && (Be(L, ya), L.removeAttribute("aria-selected")), Le(y, ya), y.setAttribute("aria-selected", !0), u.focus && y.focus(), this.image =
|
|
10575
|
+
L && (Be(L, ya), L.removeAttribute("aria-selected")), Le(y, ya), y.setAttribute("aria-selected", !0), u.focus && y.focus(), this.image = F, this.viewed = !1, this.index = r, this.imageData = {}, Le(F, Ii), u.loading && Le(h, jr), h.innerHTML = "", h.appendChild(F), this.renderList(), f.innerHTML = "";
|
|
10576
10576
|
var W = function() {
|
|
10577
10577
|
var I = n.imageData, N = Array.isArray(u.title) ? u.title[1] : u.title;
|
|
10578
|
-
f.innerHTML = Ip(Ue(N) ? N.call(n,
|
|
10579
|
-
}, z,
|
|
10580
|
-
return Ee(o,
|
|
10578
|
+
f.innerHTML = Ip(Ue(N) ? N.call(n, F, I) : "".concat(S, " (").concat(I.naturalWidth, " × ").concat(I.naturalHeight, ")"));
|
|
10579
|
+
}, z, A;
|
|
10580
|
+
return Ee(o, Ai, W, {
|
|
10581
10581
|
once: !0
|
|
10582
10582
|
}), this.viewing = {
|
|
10583
10583
|
abort: function() {
|
|
10584
|
-
Ge(o,
|
|
10584
|
+
Ge(o, Ai, W), F.complete ? n.imageRendering ? n.imageRendering.abort() : n.imageInitializing && n.imageInitializing.abort() : (F.src = "", Ge(F, Zt, z), n.timeout && clearTimeout(n.timeout));
|
|
10585
10585
|
}
|
|
10586
|
-
},
|
|
10587
|
-
Ge(
|
|
10586
|
+
}, F.complete ? this.load() : (Ee(F, Zt, z = function() {
|
|
10587
|
+
Ge(F, ar, A), n.load();
|
|
10588
10588
|
}, {
|
|
10589
10589
|
once: !0
|
|
10590
|
-
}), Ee(
|
|
10591
|
-
Ge(
|
|
10590
|
+
}), Ee(F, ar, A = function() {
|
|
10591
|
+
Ge(F, Zt, z), n.timeout && (clearTimeout(n.timeout), n.timeout = !1), Be(F, Ii), u.loading && Be(n.canvas, jr);
|
|
10592
10592
|
}, {
|
|
10593
10593
|
once: !0
|
|
10594
10594
|
}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
|
|
10595
|
-
Be(
|
|
10595
|
+
Be(F, Ii), n.timeout = !1;
|
|
10596
10596
|
}, 1e3)), this;
|
|
10597
10597
|
},
|
|
10598
10598
|
/**
|
|
@@ -10775,7 +10775,7 @@ var Rp = {
|
|
|
10775
10775
|
* @returns {Viewer} this
|
|
10776
10776
|
*/
|
|
10777
10777
|
zoomTo: function(n) {
|
|
10778
|
-
var r = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, h = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, y = this.element, m = this.options, k = this.pointers, S = this.imageData,
|
|
10778
|
+
var r = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, h = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, y = this.element, m = this.options, k = this.pointers, S = this.imageData, F = S.x, L = S.y, W = S.width, z = S.height, A = S.naturalWidth, $ = S.naturalHeight;
|
|
10779
10779
|
if (n = Math.max(0, n), nt(n) && this.viewed && !this.played && (h || m.zoomable)) {
|
|
10780
10780
|
if (!h) {
|
|
10781
10781
|
var I = Math.max(0.01, m.minZoomRatio), N = Math.min(100, m.maxZoomRatio);
|
|
@@ -10792,7 +10792,7 @@ var Rp = {
|
|
|
10792
10792
|
n > 0.99 && n < 1.01 && (n = 1);
|
|
10793
10793
|
break;
|
|
10794
10794
|
}
|
|
10795
|
-
var H =
|
|
10795
|
+
var H = A * n, V = $ * n, ne = H - W, ue = V - z, se = S.ratio;
|
|
10796
10796
|
if (Ue(m.zoom) && Ee(y, Wu, m.zoom, {
|
|
10797
10797
|
once: !0
|
|
10798
10798
|
}), ot(y, Wu, {
|
|
@@ -10802,12 +10802,12 @@ var Rp = {
|
|
|
10802
10802
|
}) === !1)
|
|
10803
10803
|
return this;
|
|
10804
10804
|
if (this.zooming = !0, f) {
|
|
10805
|
-
var de =
|
|
10805
|
+
var de = Ap(this.viewer), Ae = k && Object.keys(k).length > 0 ? Fp(k) : {
|
|
10806
10806
|
pageX: f.pageX,
|
|
10807
10807
|
pageY: f.pageY
|
|
10808
10808
|
};
|
|
10809
|
-
S.x -= ne * ((
|
|
10810
|
-
} else Br(u) && nt(u.x) && nt(u.y) ? (S.x -= ne * ((u.x -
|
|
10809
|
+
S.x -= ne * ((Ae.pageX - de.left - F) / W), S.y -= ue * ((Ae.pageY - de.top - L) / z);
|
|
10810
|
+
} else Br(u) && nt(u.x) && nt(u.y) ? (S.x -= ne * ((u.x - F) / W), S.y -= ue * ((u.y - L) / z)) : (S.x -= ne / 2, S.y -= ue / 2);
|
|
10811
10811
|
S.left = S.x, S.top = S.y, S.width = H, S.height = V, S.oldRatio = se, S.ratio = n, this.renderImage(function() {
|
|
10812
10812
|
r.zooming = !1, Ue(m.zoomed) && Ee(y, ju, m.zoomed, {
|
|
10813
10813
|
once: !0
|
|
@@ -10838,20 +10838,20 @@ var Rp = {
|
|
|
10838
10838
|
return this;
|
|
10839
10839
|
var f = this.player, h = this.loadImage.bind(this), y = [], m = 0, k = 0;
|
|
10840
10840
|
if (this.played = !0, this.onLoadWhenPlay = h, r && this.requestFullscreen(r), Le(f, $r), Ke(this.items, function(L, W) {
|
|
10841
|
-
var z = L.querySelector("img"),
|
|
10842
|
-
|
|
10841
|
+
var z = L.querySelector("img"), A = document.createElement("img");
|
|
10842
|
+
A.src = Hr(z, "originalUrl"), A.alt = z.getAttribute("alt"), A.referrerPolicy = z.referrerPolicy, m += 1, Le(A, Sa), Ni(A, it, u.transition), Pr(L, ya) && (Le(A, Qt), k = W), y.push(A), Ee(A, Zt, h, {
|
|
10843
10843
|
once: !0
|
|
10844
|
-
}), f.appendChild(
|
|
10844
|
+
}), f.appendChild(A);
|
|
10845
10845
|
}), nt(u.interval) && u.interval > 0) {
|
|
10846
10846
|
var S = function() {
|
|
10847
10847
|
clearTimeout(n.playing.timeout), Be(y[k], Qt), k -= 1, k = k >= 0 ? k : m - 1, Le(y[k], Qt), n.playing.timeout = setTimeout(S, u.interval);
|
|
10848
|
-
},
|
|
10849
|
-
clearTimeout(n.playing.timeout), Be(y[k], Qt), k += 1, k = k < m ? k : 0, Le(y[k], Qt), n.playing.timeout = setTimeout(
|
|
10848
|
+
}, F = function() {
|
|
10849
|
+
clearTimeout(n.playing.timeout), Be(y[k], Qt), k += 1, k = k < m ? k : 0, Le(y[k], Qt), n.playing.timeout = setTimeout(F, u.interval);
|
|
10850
10850
|
};
|
|
10851
10851
|
m > 1 && (this.playing = {
|
|
10852
10852
|
prev: S,
|
|
10853
|
-
next:
|
|
10854
|
-
timeout: setTimeout(
|
|
10853
|
+
next: F,
|
|
10854
|
+
timeout: setTimeout(F, u.interval)
|
|
10855
10855
|
});
|
|
10856
10856
|
}
|
|
10857
10857
|
return this;
|
|
@@ -10934,8 +10934,8 @@ var Rp = {
|
|
|
10934
10934
|
if (this.images = f, this.length = f.length, this.ready) {
|
|
10935
10935
|
var h = [];
|
|
10936
10936
|
if (Ke(this.items, function(k, S) {
|
|
10937
|
-
var
|
|
10938
|
-
L &&
|
|
10937
|
+
var F = k.querySelector("img"), L = f[S];
|
|
10938
|
+
L && F ? (L.src !== F.src || L.alt !== F.alt) && h.push(S) : h.push(S);
|
|
10939
10939
|
}), fn(this.list, {
|
|
10940
10940
|
width: "auto"
|
|
10941
10941
|
}), this.initList(), this.isShown)
|
|
@@ -11046,7 +11046,7 @@ var Rp = {
|
|
|
11046
11046
|
return function() {
|
|
11047
11047
|
return l += 1, l;
|
|
11048
11048
|
};
|
|
11049
|
-
}(-1),
|
|
11049
|
+
}(-1), Ac = /* @__PURE__ */ function() {
|
|
11050
11050
|
function l(n) {
|
|
11051
11051
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11052
11052
|
if (dp(this, l), !n || n.nodeType !== 1)
|
|
@@ -11085,12 +11085,12 @@ var Rp = {
|
|
|
11085
11085
|
if (k.complete)
|
|
11086
11086
|
m();
|
|
11087
11087
|
else {
|
|
11088
|
-
var S,
|
|
11088
|
+
var S, F;
|
|
11089
11089
|
Ee(k, Zt, S = function() {
|
|
11090
|
-
Ge(k, ar,
|
|
11090
|
+
Ge(k, ar, F), m();
|
|
11091
11091
|
}, {
|
|
11092
11092
|
once: !0
|
|
11093
|
-
}), Ee(k, ar,
|
|
11093
|
+
}), Ee(k, ar, F = function() {
|
|
11094
11094
|
Ge(k, Zt, S), m();
|
|
11095
11095
|
}, {
|
|
11096
11096
|
once: !0
|
|
@@ -11110,16 +11110,16 @@ var Rp = {
|
|
|
11110
11110
|
if (!this.ready) {
|
|
11111
11111
|
var r = this.element, o = this.options, u = r.parentNode, f = document.createElement("div");
|
|
11112
11112
|
f.innerHTML = mp;
|
|
11113
|
-
var h = f.querySelector(".".concat(Ne, "-container")), y = h.querySelector(".".concat(Ne, "-title")), m = h.querySelector(".".concat(Ne, "-toolbar")), k = h.querySelector(".".concat(Ne, "-navbar")), S = h.querySelector(".".concat(Ne, "-button")),
|
|
11114
|
-
if (this.parent = u, this.viewer = h, this.title = y, this.toolbar = m, this.navbar = k, this.button = S, this.canvas =
|
|
11113
|
+
var h = f.querySelector(".".concat(Ne, "-container")), y = h.querySelector(".".concat(Ne, "-title")), m = h.querySelector(".".concat(Ne, "-toolbar")), k = h.querySelector(".".concat(Ne, "-navbar")), S = h.querySelector(".".concat(Ne, "-button")), F = h.querySelector(".".concat(Ne, "-canvas"));
|
|
11114
|
+
if (this.parent = u, this.viewer = h, this.title = y, this.toolbar = m, this.navbar = k, this.button = S, this.canvas = F, this.footer = h.querySelector(".".concat(Ne, "-footer")), this.tooltipBox = h.querySelector(".".concat(Ne, "-tooltip")), this.player = h.querySelector(".".concat(Ne, "-player")), this.list = h.querySelector(".".concat(Ne, "-list")), h.id = "".concat(Ne).concat(this.id), y.id = "".concat(Ne, "Title").concat(this.id), Le(y, o.title ? xa(Array.isArray(o.title) ? o.title[0] : o.title) : ir), Le(k, o.navbar ? xa(o.navbar) : ir), Ni(S, ir, !o.button), o.keyboard && S.setAttribute("tabindex", 0), o.backdrop && (Le(h, "".concat(Ne, "-backdrop")), !o.inline && o.backdrop !== "static" && Hs(F, Da, "hide")), Oi(o.className) && o.className && o.className.split(Zs).forEach(function(H) {
|
|
11115
11115
|
Le(h, H);
|
|
11116
11116
|
}), o.toolbar) {
|
|
11117
|
-
var L = document.createElement("ul"), W = Br(o.toolbar), z = ba.slice(0, 3),
|
|
11117
|
+
var L = document.createElement("ul"), W = Br(o.toolbar), z = ba.slice(0, 3), A = ba.slice(7, 9), $ = ba.slice(9);
|
|
11118
11118
|
W || Le(m, xa(o.toolbar)), Ke(W ? o.toolbar : ba, function(H, V) {
|
|
11119
11119
|
var ne = W && Br(H), ue = W ? eo(V) : H, se = ne && !zr(H.show) ? H.show : H;
|
|
11120
|
-
if (!(!se || !o.zoomable && z.indexOf(ue) !== -1 || !o.rotatable &&
|
|
11121
|
-
var de = ne && !zr(H.size) ? H.size : H,
|
|
11122
|
-
o.keyboard && Fe.setAttribute("tabindex", 0), Fe.setAttribute("role", "button"), Le(Fe, "".concat(Ne, "-").concat(ue)), Ue(
|
|
11120
|
+
if (!(!se || !o.zoomable && z.indexOf(ue) !== -1 || !o.rotatable && A.indexOf(ue) !== -1 || !o.scalable && $.indexOf(ue) !== -1)) {
|
|
11121
|
+
var de = ne && !zr(H.size) ? H.size : H, Ae = ne && !zr(H.click) ? H.click : H, Fe = document.createElement("li");
|
|
11122
|
+
o.keyboard && Fe.setAttribute("tabindex", 0), Fe.setAttribute("role", "button"), Le(Fe, "".concat(Ne, "-").concat(ue)), Ue(Ae) || Hs(Fe, Da, ue), nt(se) && Le(Fe, xa(se)), ["small", "large"].indexOf(de) !== -1 ? Le(Fe, "".concat(Ne, "-").concat(de)) : ue === "play" && Le(Fe, "".concat(Ne, "-large")), Ue(Ae) && Ee(Fe, qr, Ae), L.appendChild(Fe);
|
|
11123
11123
|
}
|
|
11124
11124
|
}), m.appendChild(L);
|
|
11125
11125
|
} else
|
|
@@ -11143,9 +11143,9 @@ var Rp = {
|
|
|
11143
11143
|
var N = o.container;
|
|
11144
11144
|
Oi(N) && (N = r.ownerDocument.querySelector(N)), N || (N = this.body), N.appendChild(h);
|
|
11145
11145
|
}
|
|
11146
|
-
if (o.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, Ue(o.ready) && Ee(r,
|
|
11146
|
+
if (o.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, Ue(o.ready) && Ee(r, Du, o.ready, {
|
|
11147
11147
|
once: !0
|
|
11148
|
-
}), ot(r,
|
|
11148
|
+
}), ot(r, Du) === !1) {
|
|
11149
11149
|
this.ready = !1;
|
|
11150
11150
|
return;
|
|
11151
11151
|
}
|
|
@@ -11172,8 +11172,8 @@ var Rp = {
|
|
|
11172
11172
|
}
|
|
11173
11173
|
}]);
|
|
11174
11174
|
}();
|
|
11175
|
-
Kt(
|
|
11176
|
-
var Wp = typeof global == "object" && global && global.Object === Object && global, Oc = Wp, jp = typeof self == "object" && self && self.Object === Object && self, qp = Oc || jp || Function("return this")(), to = qp, Up = to.Symbol,
|
|
11175
|
+
Kt(Ac.prototype, Rp, Mp, $p, Pp, zp);
|
|
11176
|
+
var Wp = typeof global == "object" && global && global.Object === Object && global, Oc = Wp, jp = typeof self == "object" && self && self.Object === Object && self, qp = Oc || jp || Function("return this")(), to = qp, Up = to.Symbol, Aa = Up, Nc = Object.prototype, Gp = Nc.hasOwnProperty, Kp = Nc.toString, Ci = Aa ? Aa.toStringTag : void 0;
|
|
11177
11177
|
function Vp(l) {
|
|
11178
11178
|
var n = Gp.call(l, Ci), r = l[Ci];
|
|
11179
11179
|
try {
|
|
@@ -11188,7 +11188,7 @@ var Xp = Object.prototype, Jp = Xp.toString;
|
|
|
11188
11188
|
function Yp(l) {
|
|
11189
11189
|
return Jp.call(l);
|
|
11190
11190
|
}
|
|
11191
|
-
var Qp = "[object Null]", Zp = "[object Undefined]", Gu =
|
|
11191
|
+
var Qp = "[object Null]", Zp = "[object Undefined]", Gu = Aa ? Aa.toStringTag : void 0;
|
|
11192
11192
|
function no(l) {
|
|
11193
11193
|
return l == null ? l === void 0 ? Zp : Qp : Gu && Gu in Object(l) ? Vp(l) : Yp(l);
|
|
11194
11194
|
}
|
|
@@ -11291,7 +11291,7 @@ var Lg = function() {
|
|
|
11291
11291
|
value: _g(n),
|
|
11292
11292
|
writable: !0
|
|
11293
11293
|
});
|
|
11294
|
-
} : Fc, Ig = Eg,
|
|
11294
|
+
} : Fc, Ig = Eg, Dg = Tg(Ig), Ag = Dg, Og = 9007199254740991, Ng = /^(?:0|[1-9]\d*)$/;
|
|
11295
11295
|
function Mc(l, n) {
|
|
11296
11296
|
var r = typeof l;
|
|
11297
11297
|
return n = n ?? Og, !!n && (r == "number" || r != "symbol" && Ng.test(l)) && l > -1 && l % 1 == 0 && l < n;
|
|
@@ -11333,7 +11333,7 @@ function $g(l, n, r) {
|
|
|
11333
11333
|
};
|
|
11334
11334
|
}
|
|
11335
11335
|
function Pg(l, n) {
|
|
11336
|
-
return
|
|
11336
|
+
return Ag($g(l, n, Fc), l + "");
|
|
11337
11337
|
}
|
|
11338
11338
|
var zg = 9007199254740991;
|
|
11339
11339
|
function Bc(l) {
|
|
@@ -11391,17 +11391,17 @@ function Tm(l) {
|
|
|
11391
11391
|
return l(n);
|
|
11392
11392
|
};
|
|
11393
11393
|
}
|
|
11394
|
-
var qc = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
11394
|
+
var qc = typeof exports == "object" && exports && !exports.nodeType && exports, Di = qc && typeof module == "object" && module && !module.nodeType && module, _m = Di && Di.exports === qc, Fs = _m && Oc.process, Lm = function() {
|
|
11395
11395
|
try {
|
|
11396
|
-
var l =
|
|
11396
|
+
var l = Di && Di.require && Di.require("util").types;
|
|
11397
11397
|
return l || Fs && Fs.binding && Fs.binding("util");
|
|
11398
11398
|
} catch {
|
|
11399
11399
|
}
|
|
11400
|
-
}(), Qu = Lm, Zu = Qu && Qu.isTypedArray, Em = Zu ? Tm(Zu) : Cm, Im = Em,
|
|
11400
|
+
}(), Qu = Lm, Zu = Qu && Qu.isTypedArray, Em = Zu ? Tm(Zu) : Cm, Im = Em, Dm = Object.prototype, Am = Dm.hasOwnProperty;
|
|
11401
11401
|
function Om(l, n) {
|
|
11402
11402
|
var r = tg(l), o = !r && Vg(l), u = !r && !o && Zg(l), f = !r && !o && !u && Im(l), h = r || o || u || f, y = h ? jg(l.length, String) : [], m = y.length;
|
|
11403
11403
|
for (var k in l)
|
|
11404
|
-
|
|
11404
|
+
Am.call(l, k) && !(h && (k == "length" || u && (k == "offset" || k == "parent") || f && (k == "buffer" || k == "byteLength" || k == "byteOffset") || Mc(k, m))) && y.push(k);
|
|
11405
11405
|
return y;
|
|
11406
11406
|
}
|
|
11407
11407
|
function Nm(l, n) {
|
|
@@ -11453,7 +11453,7 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11453
11453
|
}
|
|
11454
11454
|
}), o = new r();
|
|
11455
11455
|
o.$mount(), document.body.appendChild(o.$el);
|
|
11456
|
-
const u = new
|
|
11456
|
+
const u = new Ac(o.$el, n), f = u.destroy.bind(u);
|
|
11457
11457
|
return u.destroy = function() {
|
|
11458
11458
|
return f(), o.$destroy(), document.body.removeChild(o.$el), u;
|
|
11459
11459
|
}, u.show(), o.$el.addEventListener("hidden", function() {
|
|
@@ -11464,29 +11464,29 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11464
11464
|
(function(r) {
|
|
11465
11465
|
r(Vt());
|
|
11466
11466
|
})(function(r) {
|
|
11467
|
-
function o(
|
|
11468
|
-
this.indented =
|
|
11467
|
+
function o(D, M, K, he, E, x) {
|
|
11468
|
+
this.indented = D, this.column = M, this.type = K, this.info = he, this.align = E, this.prev = x;
|
|
11469
11469
|
}
|
|
11470
|
-
function u(
|
|
11471
|
-
var E =
|
|
11472
|
-
return
|
|
11470
|
+
function u(D, M, K, he) {
|
|
11471
|
+
var E = D.indented;
|
|
11472
|
+
return D.context && D.context.type == "statement" && K != "statement" && (E = D.context.indented), D.context = new o(E, M, K, he, null, D.context);
|
|
11473
11473
|
}
|
|
11474
|
-
function f(
|
|
11475
|
-
var M =
|
|
11476
|
-
return (M == ")" || M == "]" || M == "}") && (
|
|
11474
|
+
function f(D) {
|
|
11475
|
+
var M = D.context.type;
|
|
11476
|
+
return (M == ")" || M == "]" || M == "}") && (D.indented = D.context.indented), D.context = D.context.prev;
|
|
11477
11477
|
}
|
|
11478
|
-
function h(
|
|
11479
|
-
if (M.prevToken == "variable" || M.prevToken == "type" || /\S(?:[^- ]>|[*\]])\s*$|\*$/.test(
|
|
11478
|
+
function h(D, M, K) {
|
|
11479
|
+
if (M.prevToken == "variable" || M.prevToken == "type" || /\S(?:[^- ]>|[*\]])\s*$|\*$/.test(D.string.slice(0, K)) || M.typeAtEndOfLine && D.column() == D.indentation()) return !0;
|
|
11480
11480
|
}
|
|
11481
|
-
function y(
|
|
11481
|
+
function y(D) {
|
|
11482
11482
|
for (; ; ) {
|
|
11483
|
-
if (!
|
|
11484
|
-
if (
|
|
11485
|
-
|
|
11483
|
+
if (!D || D.type == "top") return !0;
|
|
11484
|
+
if (D.type == "}" && D.prev.info != "namespace") return !1;
|
|
11485
|
+
D = D.prev;
|
|
11486
11486
|
}
|
|
11487
11487
|
}
|
|
11488
|
-
r.defineMode("clike", function(
|
|
11489
|
-
var K =
|
|
11488
|
+
r.defineMode("clike", function(D, M) {
|
|
11489
|
+
var K = D.indentUnit, he = M.statementIndentUnit || K, E = M.dontAlignCalls, x = M.keywords || {}, oe = M.types || {}, Te = M.builtin || {}, Z = M.blockKeywords || {}, fe = M.defKeywords || {}, ke = M.atoms || {}, _e = M.hooks || {}, lt = M.multiLineStrings, we = M.indentStatements !== !1, Oe = M.indentSwitch !== !1, qe = M.namespaceSeparator, ut = M.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, Mt = M.numberStart || /[\d\.]/, ct = M.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, ft = M.isOperatorChar || /[+\-*&%=<>!?|\/]/, ht = M.isIdentifierChar || /[\w\$_\xa1-\uffff]/, Ht = M.isReservedIdentifier || !1, be, xt;
|
|
11490
11490
|
function Wt(ye, xe) {
|
|
11491
11491
|
var pe = ye.next();
|
|
11492
11492
|
if (_e[pe]) {
|
|
@@ -11600,78 +11600,78 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11600
11600
|
fold: "brace"
|
|
11601
11601
|
};
|
|
11602
11602
|
});
|
|
11603
|
-
function m(
|
|
11604
|
-
for (var M = {}, K =
|
|
11603
|
+
function m(D) {
|
|
11604
|
+
for (var M = {}, K = D.split(" "), he = 0; he < K.length; ++he) M[K[he]] = !0;
|
|
11605
11605
|
return M;
|
|
11606
11606
|
}
|
|
11607
|
-
function k(
|
|
11608
|
-
return typeof
|
|
11607
|
+
function k(D, M) {
|
|
11608
|
+
return typeof D == "function" ? D(M) : D.propertyIsEnumerable(M);
|
|
11609
11609
|
}
|
|
11610
|
-
var S = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",
|
|
11611
|
-
function $(
|
|
11612
|
-
return k(z,
|
|
11610
|
+
var S = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran", F = "alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq", L = "bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available", W = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT", z = m("int long char short double float unsigned signed void bool"), A = m("SEL instancetype id Class Protocol BOOL");
|
|
11611
|
+
function $(D) {
|
|
11612
|
+
return k(z, D) || /.+_t$/.test(D);
|
|
11613
11613
|
}
|
|
11614
|
-
function I(
|
|
11615
|
-
return $(
|
|
11614
|
+
function I(D) {
|
|
11615
|
+
return $(D) || k(A, D);
|
|
11616
11616
|
}
|
|
11617
11617
|
var N = "case do else for if switch while struct enum union", H = "struct enum union";
|
|
11618
|
-
function V(
|
|
11618
|
+
function V(D, M) {
|
|
11619
11619
|
if (!M.startOfLine) return !1;
|
|
11620
|
-
for (var K, he = null; K =
|
|
11621
|
-
if (K == "\\" &&
|
|
11620
|
+
for (var K, he = null; K = D.peek(); ) {
|
|
11621
|
+
if (K == "\\" && D.match(/^.$/)) {
|
|
11622
11622
|
he = V;
|
|
11623
11623
|
break;
|
|
11624
|
-
} else if (K == "/" &&
|
|
11624
|
+
} else if (K == "/" && D.match(/^\/[\/\*]/, !1))
|
|
11625
11625
|
break;
|
|
11626
|
-
|
|
11626
|
+
D.next();
|
|
11627
11627
|
}
|
|
11628
11628
|
return M.tokenize = he, "meta";
|
|
11629
11629
|
}
|
|
11630
|
-
function ne(
|
|
11630
|
+
function ne(D, M) {
|
|
11631
11631
|
return M.prevToken == "type" ? "type" : !1;
|
|
11632
11632
|
}
|
|
11633
|
-
function ue(
|
|
11634
|
-
return !
|
|
11633
|
+
function ue(D) {
|
|
11634
|
+
return !D || D.length < 2 || D[0] != "_" ? !1 : D[1] == "_" || D[1] !== D[1].toLowerCase();
|
|
11635
11635
|
}
|
|
11636
|
-
function se(
|
|
11637
|
-
return
|
|
11636
|
+
function se(D) {
|
|
11637
|
+
return D.eatWhile(/[\w\.']/), "number";
|
|
11638
11638
|
}
|
|
11639
|
-
function de(
|
|
11640
|
-
if (
|
|
11641
|
-
var K =
|
|
11642
|
-
return K ? (M.cpp11RawStringDelim = K[1], M.tokenize = ie, ie(
|
|
11639
|
+
function de(D, M) {
|
|
11640
|
+
if (D.backUp(1), D.match(/^(?:R|u8R|uR|UR|LR)/)) {
|
|
11641
|
+
var K = D.match(/^"([^\s\\()]{0,16})\(/);
|
|
11642
|
+
return K ? (M.cpp11RawStringDelim = K[1], M.tokenize = ie, ie(D, M)) : !1;
|
|
11643
11643
|
}
|
|
11644
|
-
return
|
|
11644
|
+
return D.match(/^(?:u8|u|U|L)/) ? D.match(
|
|
11645
11645
|
/^["']/,
|
|
11646
11646
|
/* eat */
|
|
11647
11647
|
!1
|
|
11648
|
-
) ? "string" : !1 : (
|
|
11648
|
+
) ? "string" : !1 : (D.next(), !1);
|
|
11649
11649
|
}
|
|
11650
|
-
function
|
|
11651
|
-
var M = /(\w+)::~?(\w+)$/.exec(
|
|
11650
|
+
function Ae(D) {
|
|
11651
|
+
var M = /(\w+)::~?(\w+)$/.exec(D);
|
|
11652
11652
|
return M && M[1] == M[2];
|
|
11653
11653
|
}
|
|
11654
|
-
function Fe(
|
|
11655
|
-
for (var K; (K =
|
|
11656
|
-
if (K == '"' && !
|
|
11654
|
+
function Fe(D, M) {
|
|
11655
|
+
for (var K; (K = D.next()) != null; )
|
|
11656
|
+
if (K == '"' && !D.eat('"')) {
|
|
11657
11657
|
M.tokenize = null;
|
|
11658
11658
|
break;
|
|
11659
11659
|
}
|
|
11660
11660
|
return "string";
|
|
11661
11661
|
}
|
|
11662
|
-
function ie(
|
|
11663
|
-
var K = M.cpp11RawStringDelim.replace(/[^\w\s]/g, "\\$&"), he =
|
|
11664
|
-
return he ? M.tokenize = null :
|
|
11662
|
+
function ie(D, M) {
|
|
11663
|
+
var K = M.cpp11RawStringDelim.replace(/[^\w\s]/g, "\\$&"), he = D.match(new RegExp(".*?\\)" + K + '"'));
|
|
11664
|
+
return he ? M.tokenize = null : D.skipToEnd(), "string";
|
|
11665
11665
|
}
|
|
11666
|
-
function $e(
|
|
11667
|
-
typeof
|
|
11666
|
+
function $e(D, M) {
|
|
11667
|
+
typeof D == "string" && (D = [D]);
|
|
11668
11668
|
var K = [];
|
|
11669
11669
|
function he(x) {
|
|
11670
11670
|
if (x) for (var oe in x) x.hasOwnProperty(oe) && K.push(oe);
|
|
11671
11671
|
}
|
|
11672
|
-
he(M.keywords), he(M.types), he(M.builtin), he(M.atoms), K.length && (M.helperType =
|
|
11673
|
-
for (var E = 0; E <
|
|
11674
|
-
r.defineMIME(
|
|
11672
|
+
he(M.keywords), he(M.types), he(M.builtin), he(M.atoms), K.length && (M.helperType = D[0], r.registerHelper("hintWords", D[0], K));
|
|
11673
|
+
for (var E = 0; E < D.length; ++E)
|
|
11674
|
+
r.defineMIME(D[E], M);
|
|
11675
11675
|
}
|
|
11676
11676
|
$e(["text/x-csrc", "text/x-c", "text/x-chdr"], {
|
|
11677
11677
|
name: "clike",
|
|
@@ -11689,7 +11689,7 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11689
11689
|
modeProps: { fold: ["brace", "include"] }
|
|
11690
11690
|
}), $e(["text/x-c++src", "text/x-c++hdr"], {
|
|
11691
11691
|
name: "clike",
|
|
11692
|
-
keywords: m(S + " " +
|
|
11692
|
+
keywords: m(S + " " + F),
|
|
11693
11693
|
types: $,
|
|
11694
11694
|
blockKeywords: m(N + " class try catch"),
|
|
11695
11695
|
defKeywords: m(H + " class namespace"),
|
|
@@ -11715,8 +11715,8 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11715
11715
|
7: se,
|
|
11716
11716
|
8: se,
|
|
11717
11717
|
9: se,
|
|
11718
|
-
token: function(
|
|
11719
|
-
if (K == "variable" &&
|
|
11718
|
+
token: function(D, M, K) {
|
|
11719
|
+
if (K == "variable" && D.peek() == "(" && (M.prevToken == ";" || M.prevToken == null || M.prevToken == "}") && Ae(D.current()))
|
|
11720
11720
|
return "def";
|
|
11721
11721
|
}
|
|
11722
11722
|
},
|
|
@@ -11732,11 +11732,11 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11732
11732
|
atoms: m("true false null"),
|
|
11733
11733
|
number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
|
|
11734
11734
|
hooks: {
|
|
11735
|
-
"@": function(
|
|
11736
|
-
return
|
|
11735
|
+
"@": function(D) {
|
|
11736
|
+
return D.match("interface", !1) ? !1 : (D.eatWhile(/[\w\$_]/), "meta");
|
|
11737
11737
|
},
|
|
11738
|
-
'"': function(
|
|
11739
|
-
return
|
|
11738
|
+
'"': function(D, M) {
|
|
11739
|
+
return D.match(/""$/) ? (M.tokenize = j, M.tokenize(D, M)) : !1;
|
|
11740
11740
|
}
|
|
11741
11741
|
},
|
|
11742
11742
|
modeProps: { fold: ["brace", "import"] }
|
|
@@ -11749,32 +11749,32 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11749
11749
|
typeFirstDefinitions: !0,
|
|
11750
11750
|
atoms: m("true false null"),
|
|
11751
11751
|
hooks: {
|
|
11752
|
-
"@": function(
|
|
11753
|
-
return
|
|
11752
|
+
"@": function(D, M) {
|
|
11753
|
+
return D.eat('"') ? (M.tokenize = Fe, Fe(D, M)) : (D.eatWhile(/[\w\$_]/), "meta");
|
|
11754
11754
|
}
|
|
11755
11755
|
}
|
|
11756
11756
|
});
|
|
11757
|
-
function j(
|
|
11758
|
-
for (var K = !1; !
|
|
11759
|
-
if (!K &&
|
|
11757
|
+
function j(D, M) {
|
|
11758
|
+
for (var K = !1; !D.eol(); ) {
|
|
11759
|
+
if (!K && D.match('"""')) {
|
|
11760
11760
|
M.tokenize = null;
|
|
11761
11761
|
break;
|
|
11762
11762
|
}
|
|
11763
|
-
K =
|
|
11763
|
+
K = D.next() == "\\" && !K;
|
|
11764
11764
|
}
|
|
11765
11765
|
return "string";
|
|
11766
11766
|
}
|
|
11767
|
-
function Q(
|
|
11767
|
+
function Q(D) {
|
|
11768
11768
|
return function(M, K) {
|
|
11769
11769
|
for (var he; he = M.next(); )
|
|
11770
11770
|
if (he == "*" && M.eat("/"))
|
|
11771
|
-
if (
|
|
11771
|
+
if (D == 1) {
|
|
11772
11772
|
K.tokenize = null;
|
|
11773
11773
|
break;
|
|
11774
11774
|
} else
|
|
11775
|
-
return K.tokenize = Q(
|
|
11775
|
+
return K.tokenize = Q(D - 1), K.tokenize(M, K);
|
|
11776
11776
|
else if (he == "/" && M.eat("*"))
|
|
11777
|
-
return K.tokenize = Q(
|
|
11777
|
+
return K.tokenize = Q(D + 1), K.tokenize(M, K);
|
|
11778
11778
|
return "comment";
|
|
11779
11779
|
};
|
|
11780
11780
|
}
|
|
@@ -11795,39 +11795,39 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11795
11795
|
indentSwitch: !1,
|
|
11796
11796
|
isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
|
|
11797
11797
|
hooks: {
|
|
11798
|
-
"@": function(
|
|
11799
|
-
return
|
|
11798
|
+
"@": function(D) {
|
|
11799
|
+
return D.eatWhile(/[\w\$_]/), "meta";
|
|
11800
11800
|
},
|
|
11801
|
-
'"': function(
|
|
11802
|
-
return
|
|
11801
|
+
'"': function(D, M) {
|
|
11802
|
+
return D.match('""') ? (M.tokenize = j, M.tokenize(D, M)) : !1;
|
|
11803
11803
|
},
|
|
11804
|
-
"'": function(
|
|
11805
|
-
return
|
|
11804
|
+
"'": function(D) {
|
|
11805
|
+
return D.match(/^(\\[^'\s]+|[^\\'])'/) ? "string-2" : (D.eatWhile(/[\w\$_\xa1-\uffff]/), "atom");
|
|
11806
11806
|
},
|
|
11807
|
-
"=": function(
|
|
11807
|
+
"=": function(D, M) {
|
|
11808
11808
|
var K = M.context;
|
|
11809
|
-
return K.type == "}" && K.align &&
|
|
11809
|
+
return K.type == "}" && K.align && D.eat(">") ? (M.context = new o(K.indented, K.column, K.type, K.info, null, K.prev), "operator") : !1;
|
|
11810
11810
|
},
|
|
11811
|
-
"/": function(
|
|
11812
|
-
return
|
|
11811
|
+
"/": function(D, M) {
|
|
11812
|
+
return D.eat("*") ? (M.tokenize = Q(1), M.tokenize(D, M)) : !1;
|
|
11813
11813
|
}
|
|
11814
11814
|
},
|
|
11815
11815
|
modeProps: { closeBrackets: { pairs: '()[]{}""', triples: '"' } }
|
|
11816
11816
|
});
|
|
11817
|
-
function w(
|
|
11817
|
+
function w(D) {
|
|
11818
11818
|
return function(M, K) {
|
|
11819
11819
|
for (var he = !1, E, x = !1; !M.eol(); ) {
|
|
11820
|
-
if (!
|
|
11820
|
+
if (!D && !he && M.match('"')) {
|
|
11821
11821
|
x = !0;
|
|
11822
11822
|
break;
|
|
11823
11823
|
}
|
|
11824
|
-
if (
|
|
11824
|
+
if (D && M.match('"""')) {
|
|
11825
11825
|
x = !0;
|
|
11826
11826
|
break;
|
|
11827
11827
|
}
|
|
11828
|
-
E = M.next(), !he && E == "$" && M.match("{") && M.skipTo("}"), he = !he && E == "\\" && !
|
|
11828
|
+
E = M.next(), !he && E == "$" && M.match("{") && M.skipTo("}"), he = !he && E == "\\" && !D;
|
|
11829
11829
|
}
|
|
11830
|
-
return (x || !
|
|
11830
|
+
return (x || !D) && (K.tokenize = null), "string";
|
|
11831
11831
|
};
|
|
11832
11832
|
}
|
|
11833
11833
|
$e("text/x-kotlin", {
|
|
@@ -11848,26 +11848,26 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11848
11848
|
defKeywords: m("class val var object interface fun"),
|
|
11849
11849
|
atoms: m("true false null this"),
|
|
11850
11850
|
hooks: {
|
|
11851
|
-
"@": function(
|
|
11852
|
-
return
|
|
11851
|
+
"@": function(D) {
|
|
11852
|
+
return D.eatWhile(/[\w\$_]/), "meta";
|
|
11853
11853
|
},
|
|
11854
|
-
"*": function(
|
|
11854
|
+
"*": function(D, M) {
|
|
11855
11855
|
return M.prevToken == "." ? "variable" : "operator";
|
|
11856
11856
|
},
|
|
11857
|
-
'"': function(
|
|
11858
|
-
return M.tokenize = w(
|
|
11857
|
+
'"': function(D, M) {
|
|
11858
|
+
return M.tokenize = w(D.match('""')), M.tokenize(D, M);
|
|
11859
11859
|
},
|
|
11860
|
-
"/": function(
|
|
11861
|
-
return
|
|
11860
|
+
"/": function(D, M) {
|
|
11861
|
+
return D.eat("*") ? (M.tokenize = Q(1), M.tokenize(D, M)) : !1;
|
|
11862
11862
|
},
|
|
11863
|
-
indent: function(
|
|
11863
|
+
indent: function(D, M, K, he) {
|
|
11864
11864
|
var E = K && K.charAt(0);
|
|
11865
|
-
if ((
|
|
11866
|
-
return
|
|
11867
|
-
if (
|
|
11865
|
+
if ((D.prevToken == "}" || D.prevToken == ")") && K == "")
|
|
11866
|
+
return D.indented;
|
|
11867
|
+
if (D.prevToken == "operator" && K != "}" && D.context.type != "}" || D.prevToken == "variable" && E == "." || (D.prevToken == "}" || D.prevToken == ")") && E == ".")
|
|
11868
11868
|
return he * 2 + M.indented;
|
|
11869
11869
|
if (M.align && M.type == "}")
|
|
11870
|
-
return M.indented + (
|
|
11870
|
+
return M.indented + (D.context.type == (K || "").charAt(0) ? 0 : he);
|
|
11871
11871
|
}
|
|
11872
11872
|
},
|
|
11873
11873
|
modeProps: { closeBrackets: { triples: '"' } }
|
|
@@ -11907,7 +11907,7 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11907
11907
|
modeProps: { fold: ["brace", "include"] }
|
|
11908
11908
|
}), $e("text/x-objectivec++", {
|
|
11909
11909
|
name: "clike",
|
|
11910
|
-
keywords: m(S + " " + L + " " +
|
|
11910
|
+
keywords: m(S + " " + L + " " + F),
|
|
11911
11911
|
types: I,
|
|
11912
11912
|
builtin: m(W),
|
|
11913
11913
|
blockKeywords: m(N + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
|
|
@@ -11933,8 +11933,8 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11933
11933
|
7: se,
|
|
11934
11934
|
8: se,
|
|
11935
11935
|
9: se,
|
|
11936
|
-
token: function(
|
|
11937
|
-
if (K == "variable" &&
|
|
11936
|
+
token: function(D, M, K) {
|
|
11937
|
+
if (K == "variable" && D.peek() == "(" && (M.prevToken == ";" || M.prevToken == null || M.prevToken == "}") && Ae(D.current()))
|
|
11938
11938
|
return "def";
|
|
11939
11939
|
}
|
|
11940
11940
|
},
|
|
@@ -11952,18 +11952,18 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11952
11952
|
modeProps: { fold: ["brace", "include"] }
|
|
11953
11953
|
});
|
|
11954
11954
|
var Y = null;
|
|
11955
|
-
function G(
|
|
11955
|
+
function G(D) {
|
|
11956
11956
|
return function(M, K) {
|
|
11957
11957
|
for (var he = !1, E, x = !1; !M.eol(); ) {
|
|
11958
|
-
if (!he && M.match('"') && (
|
|
11958
|
+
if (!he && M.match('"') && (D == "single" || M.match('""'))) {
|
|
11959
11959
|
x = !0;
|
|
11960
11960
|
break;
|
|
11961
11961
|
}
|
|
11962
11962
|
if (!he && M.match("``")) {
|
|
11963
|
-
Y = G(
|
|
11963
|
+
Y = G(D), x = !0;
|
|
11964
11964
|
break;
|
|
11965
11965
|
}
|
|
11966
|
-
E = M.next(), he =
|
|
11966
|
+
E = M.next(), he = D == "single" && !he && E == "\\";
|
|
11967
11967
|
}
|
|
11968
11968
|
return x && (K.tokenize = null), "string";
|
|
11969
11969
|
};
|
|
@@ -11971,8 +11971,8 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11971
11971
|
$e("text/x-ceylon", {
|
|
11972
11972
|
name: "clike",
|
|
11973
11973
|
keywords: m("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),
|
|
11974
|
-
types: function(
|
|
11975
|
-
var M =
|
|
11974
|
+
types: function(D) {
|
|
11975
|
+
var M = D.charAt(0);
|
|
11976
11976
|
return M === M.toUpperCase() && M !== M.toLowerCase();
|
|
11977
11977
|
},
|
|
11978
11978
|
blockKeywords: m("case catch class dynamic else finally for function if interface module new object switch try while"),
|
|
@@ -11988,19 +11988,19 @@ const Uc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11988
11988
|
indentSwitch: !1,
|
|
11989
11989
|
styleDefs: !1,
|
|
11990
11990
|
hooks: {
|
|
11991
|
-
"@": function(
|
|
11992
|
-
return
|
|
11991
|
+
"@": function(D) {
|
|
11992
|
+
return D.eatWhile(/[\w\$_]/), "meta";
|
|
11993
11993
|
},
|
|
11994
|
-
'"': function(
|
|
11995
|
-
return M.tokenize = G(
|
|
11994
|
+
'"': function(D, M) {
|
|
11995
|
+
return M.tokenize = G(D.match('""') ? "triple" : "single"), M.tokenize(D, M);
|
|
11996
11996
|
},
|
|
11997
|
-
"`": function(
|
|
11998
|
-
return !Y || !
|
|
11997
|
+
"`": function(D, M) {
|
|
11998
|
+
return !Y || !D.match("`") ? !1 : (M.tokenize = Y, Y = null, M.tokenize(D, M));
|
|
11999
11999
|
},
|
|
12000
|
-
"'": function(
|
|
12001
|
-
return
|
|
12000
|
+
"'": function(D) {
|
|
12001
|
+
return D.eatWhile(/[\w\$_\xa1-\uffff]/), "atom";
|
|
12002
12002
|
},
|
|
12003
|
-
token: function(
|
|
12003
|
+
token: function(D, M, K) {
|
|
12004
12004
|
if ((K == "variable" || K == "type") && M.prevToken == ".")
|
|
12005
12005
|
return "variable-2";
|
|
12006
12006
|
}
|
|
@@ -12127,6 +12127,16 @@ const qm = {
|
|
|
12127
12127
|
}
|
|
12128
12128
|
return JSON.stringify(l, null, 4);
|
|
12129
12129
|
},
|
|
12130
|
+
prettyFormatJsonCodeBlocks(l) {
|
|
12131
|
+
return typeof l != "string" || !l.trim() ? l : l.replace(/```json\s*([\s\S]*?)\s*```/gi, (n, r) => {
|
|
12132
|
+
try {
|
|
12133
|
+
const o = JSON.parse(r);
|
|
12134
|
+
return "```json\n" + JSON.stringify(o, null, 4) + "\n```";
|
|
12135
|
+
} catch {
|
|
12136
|
+
return n;
|
|
12137
|
+
}
|
|
12138
|
+
});
|
|
12139
|
+
},
|
|
12130
12140
|
getErrorMessage(l) {
|
|
12131
12141
|
return !l || typeof l != "object" ? String(l ?? "") : l.error && typeof l.error == "object" && l.error.message ? l.error.message : l.message ? l.message : l._status !== void 0 ? `${l._status} ${l._statusText || ""}`.trim() : l._raw !== void 0 ? String(l._raw) : JSON.stringify(l);
|
|
12132
12142
|
},
|
|
@@ -12151,7 +12161,7 @@ const qm = {
|
|
|
12151
12161
|
return !!(o.some((f) => u.some((h) => h.test(f))) || /\[[^\]]+\]\([^)]+\)/.test(r) || /!\[[^\]]*\]\([^)]+\)/.test(r) || /\|.*\|/.test(r) && o.length >= 2);
|
|
12152
12162
|
},
|
|
12153
12163
|
renderMarkdown(l) {
|
|
12154
|
-
return l ? Se(String(l)) : "";
|
|
12164
|
+
return l ? Se(this.prettyFormatJsonCodeBlocks(String(l))) : "";
|
|
12155
12165
|
},
|
|
12156
12166
|
getMessageRoleLabel(l) {
|
|
12157
12167
|
const n = {
|
|
@@ -12260,11 +12270,12 @@ const qm = {
|
|
|
12260
12270
|
let u = l;
|
|
12261
12271
|
if ((o.startsWith("{") || o.startsWith("[")) && o.length > 1)
|
|
12262
12272
|
try {
|
|
12263
|
-
const
|
|
12264
|
-
u = "```json\n" + JSON.stringify(
|
|
12273
|
+
const h = JSON.parse(l);
|
|
12274
|
+
u = "```json\n" + JSON.stringify(h, null, 4) + "\n```";
|
|
12265
12275
|
} catch {
|
|
12266
12276
|
}
|
|
12267
|
-
|
|
12277
|
+
const f = this.prettyFormatJsonCodeBlocks(u);
|
|
12278
|
+
r.push({ type: "markdown", content: Se(f), key: "text-0" });
|
|
12268
12279
|
}
|
|
12269
12280
|
} else if (typeof l == "object")
|
|
12270
12281
|
if (l.data && Array.isArray(l.data.result)) {
|
|
@@ -12364,7 +12375,7 @@ var Um = function() {
|
|
|
12364
12375
|
Gm,
|
|
12365
12376
|
!1,
|
|
12366
12377
|
null,
|
|
12367
|
-
"
|
|
12378
|
+
"889b8c5a"
|
|
12368
12379
|
);
|
|
12369
12380
|
const Gc = Km.exports;
|
|
12370
12381
|
var ec = { exports: {} }, tc;
|
|
@@ -12470,15 +12481,15 @@ function Vm() {
|
|
|
12470
12481
|
var y = f.indentUnit, m = {}, k = h.htmlMode ? o : u;
|
|
12471
12482
|
for (var S in k) m[S] = k[S];
|
|
12472
12483
|
for (var S in h) m[S] = h[S];
|
|
12473
|
-
var
|
|
12484
|
+
var F, L;
|
|
12474
12485
|
function W(w, Y) {
|
|
12475
12486
|
function G(K) {
|
|
12476
12487
|
return Y.tokenize = K, K(w, Y);
|
|
12477
12488
|
}
|
|
12478
|
-
var
|
|
12479
|
-
if (
|
|
12480
|
-
return w.eat("!") ? w.eat("[") ? w.match("CDATA[") ? G($("atom", "]]>")) : null : w.match("--") ? G($("comment", "-->")) : w.match("DOCTYPE", !0, !0) ? (w.eatWhile(/[\w\._\-]/), G(I(1))) : null : w.eat("?") ? (w.eatWhile(/[\w\._\-]/), Y.tokenize = $("meta", "?>"), "meta") : (
|
|
12481
|
-
if (
|
|
12489
|
+
var D = w.next();
|
|
12490
|
+
if (D == "<")
|
|
12491
|
+
return w.eat("!") ? w.eat("[") ? w.match("CDATA[") ? G($("atom", "]]>")) : null : w.match("--") ? G($("comment", "-->")) : w.match("DOCTYPE", !0, !0) ? (w.eatWhile(/[\w\._\-]/), G(I(1))) : null : w.eat("?") ? (w.eatWhile(/[\w\._\-]/), Y.tokenize = $("meta", "?>"), "meta") : (F = w.eat("/") ? "closeTag" : "openTag", Y.tokenize = z, "tag bracket");
|
|
12492
|
+
if (D == "&") {
|
|
12482
12493
|
var M;
|
|
12483
12494
|
return w.eat("#") ? w.eat("x") ? M = w.eatWhile(/[a-fA-F\d]/) && w.eat(";") : M = w.eatWhile(/[\d]/) && w.eat(";") : M = w.eatWhile(/[\w\.\-:]/) && w.eat(";"), M ? "atom" : "error";
|
|
12484
12495
|
} else
|
|
@@ -12488,20 +12499,20 @@ function Vm() {
|
|
|
12488
12499
|
function z(w, Y) {
|
|
12489
12500
|
var G = w.next();
|
|
12490
12501
|
if (G == ">" || G == "/" && w.eat(">"))
|
|
12491
|
-
return Y.tokenize = W,
|
|
12502
|
+
return Y.tokenize = W, F = G == ">" ? "endTag" : "selfcloseTag", "tag bracket";
|
|
12492
12503
|
if (G == "=")
|
|
12493
|
-
return
|
|
12504
|
+
return F = "equals", null;
|
|
12494
12505
|
if (G == "<") {
|
|
12495
12506
|
Y.tokenize = W, Y.state = ue, Y.tagName = Y.tagStart = null;
|
|
12496
|
-
var
|
|
12497
|
-
return
|
|
12498
|
-
} else return /[\'\"]/.test(G) ? (Y.tokenize =
|
|
12507
|
+
var D = Y.tokenize(w, Y);
|
|
12508
|
+
return D ? D + " tag error" : "tag error";
|
|
12509
|
+
} else return /[\'\"]/.test(G) ? (Y.tokenize = A(G), Y.stringStartCol = w.column(), Y.tokenize(w, Y)) : (w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/), "word");
|
|
12499
12510
|
}
|
|
12500
|
-
function
|
|
12501
|
-
var Y = function(G,
|
|
12511
|
+
function A(w) {
|
|
12512
|
+
var Y = function(G, D) {
|
|
12502
12513
|
for (; !G.eol(); )
|
|
12503
12514
|
if (G.next() == w) {
|
|
12504
|
-
|
|
12515
|
+
D.tokenize = z;
|
|
12505
12516
|
break;
|
|
12506
12517
|
}
|
|
12507
12518
|
return "string";
|
|
@@ -12509,10 +12520,10 @@ function Vm() {
|
|
|
12509
12520
|
return Y.isInAttribute = !0, Y;
|
|
12510
12521
|
}
|
|
12511
12522
|
function $(w, Y) {
|
|
12512
|
-
return function(G,
|
|
12523
|
+
return function(G, D) {
|
|
12513
12524
|
for (; !G.eol(); ) {
|
|
12514
12525
|
if (G.match(Y)) {
|
|
12515
|
-
|
|
12526
|
+
D.tokenize = W;
|
|
12516
12527
|
break;
|
|
12517
12528
|
}
|
|
12518
12529
|
G.next();
|
|
@@ -12522,10 +12533,10 @@ function Vm() {
|
|
|
12522
12533
|
}
|
|
12523
12534
|
function I(w) {
|
|
12524
12535
|
return function(Y, G) {
|
|
12525
|
-
for (var
|
|
12526
|
-
if (
|
|
12536
|
+
for (var D; (D = Y.next()) != null; ) {
|
|
12537
|
+
if (D == "<")
|
|
12527
12538
|
return G.tokenize = I(w + 1), G.tokenize(Y, G);
|
|
12528
|
-
if (
|
|
12539
|
+
if (D == ">")
|
|
12529
12540
|
if (w == 1) {
|
|
12530
12541
|
G.tokenize = W;
|
|
12531
12542
|
break;
|
|
@@ -12559,22 +12570,22 @@ function Vm() {
|
|
|
12559
12570
|
}
|
|
12560
12571
|
function de(w, Y, G) {
|
|
12561
12572
|
if (w == "word") {
|
|
12562
|
-
var
|
|
12563
|
-
return G.context && G.context.tagName !=
|
|
12564
|
-
} else return m.allowMissingTagName && w == "endTag" ? (L = "tag bracket",
|
|
12573
|
+
var D = Y.current();
|
|
12574
|
+
return G.context && G.context.tagName != D && m.implicitlyClosed.hasOwnProperty(N(G.context.tagName)) && V(G), G.context && G.context.tagName == D || m.matchClosing === !1 ? (L = "tag", Ae) : (L = "tag error", Fe);
|
|
12575
|
+
} else return m.allowMissingTagName && w == "endTag" ? (L = "tag bracket", Ae(w, Y, G)) : (L = "error", Fe);
|
|
12565
12576
|
}
|
|
12566
|
-
function
|
|
12567
|
-
return w != "endTag" ? (L = "error",
|
|
12577
|
+
function Ae(w, Y, G) {
|
|
12578
|
+
return w != "endTag" ? (L = "error", Ae) : (V(G), ue);
|
|
12568
12579
|
}
|
|
12569
12580
|
function Fe(w, Y, G) {
|
|
12570
|
-
return L = "error",
|
|
12581
|
+
return L = "error", Ae(w, Y, G);
|
|
12571
12582
|
}
|
|
12572
12583
|
function ie(w, Y, G) {
|
|
12573
12584
|
if (w == "word")
|
|
12574
12585
|
return L = "attribute", $e;
|
|
12575
12586
|
if (w == "endTag" || w == "selfcloseTag") {
|
|
12576
|
-
var
|
|
12577
|
-
return G.tagName = G.tagStart = null, w == "selfcloseTag" || m.autoSelfClosers.hasOwnProperty(N(
|
|
12587
|
+
var D = G.tagName, M = G.tagStart;
|
|
12588
|
+
return G.tagName = G.tagStart = null, w == "selfcloseTag" || m.autoSelfClosers.hasOwnProperty(N(D)) ? ne(G, D) : (ne(G, D), G.context = new H(G, D, M == G.indented)), ue;
|
|
12578
12589
|
}
|
|
12579
12590
|
return L = "error", ie;
|
|
12580
12591
|
}
|
|
@@ -12601,15 +12612,15 @@ function Vm() {
|
|
|
12601
12612
|
},
|
|
12602
12613
|
token: function(w, Y) {
|
|
12603
12614
|
if (!Y.tagName && w.sol() && (Y.indented = w.indentation()), w.eatSpace()) return null;
|
|
12604
|
-
|
|
12615
|
+
F = null;
|
|
12605
12616
|
var G = Y.tokenize(w, Y);
|
|
12606
|
-
return (G ||
|
|
12617
|
+
return (G || F) && G != "comment" && (L = null, Y.state = Y.state(F || G, w, Y), L && (G = L == "error" ? G + " error" : L)), G;
|
|
12607
12618
|
},
|
|
12608
12619
|
indent: function(w, Y, G) {
|
|
12609
|
-
var
|
|
12620
|
+
var D = w.context;
|
|
12610
12621
|
if (w.tokenize.isInAttribute)
|
|
12611
12622
|
return w.tagStart == w.indented ? w.stringStartCol + 1 : w.indented + y;
|
|
12612
|
-
if (
|
|
12623
|
+
if (D && D.noIndent) return r.Pass;
|
|
12613
12624
|
if (w.tokenize != z && w.tokenize != W)
|
|
12614
12625
|
return G ? G.match(/^(\s*)/)[0].length : 0;
|
|
12615
12626
|
if (w.tagName)
|
|
@@ -12617,25 +12628,25 @@ function Vm() {
|
|
|
12617
12628
|
if (m.alignCDATA && /<!\[CDATA\[/.test(Y)) return 0;
|
|
12618
12629
|
var M = Y && /^<(\/)?([\w_:\.-]*)/.exec(Y);
|
|
12619
12630
|
if (M && M[1])
|
|
12620
|
-
for (;
|
|
12621
|
-
if (
|
|
12622
|
-
|
|
12631
|
+
for (; D; )
|
|
12632
|
+
if (D.tagName == M[2]) {
|
|
12633
|
+
D = D.prev;
|
|
12623
12634
|
break;
|
|
12624
|
-
} else if (m.implicitlyClosed.hasOwnProperty(N(
|
|
12625
|
-
|
|
12635
|
+
} else if (m.implicitlyClosed.hasOwnProperty(N(D.tagName)))
|
|
12636
|
+
D = D.prev;
|
|
12626
12637
|
else
|
|
12627
12638
|
break;
|
|
12628
12639
|
else if (M)
|
|
12629
|
-
for (;
|
|
12630
|
-
var K = m.contextGrabbers[N(
|
|
12640
|
+
for (; D; ) {
|
|
12641
|
+
var K = m.contextGrabbers[N(D.tagName)];
|
|
12631
12642
|
if (K && K.hasOwnProperty(N(M[2])))
|
|
12632
|
-
|
|
12643
|
+
D = D.prev;
|
|
12633
12644
|
else
|
|
12634
12645
|
break;
|
|
12635
12646
|
}
|
|
12636
|
-
for (;
|
|
12637
|
-
|
|
12638
|
-
return
|
|
12647
|
+
for (; D && D.prev && !D.startOfLine; )
|
|
12648
|
+
D = D.prev;
|
|
12649
|
+
return D ? D.indent + y : w.baseIndent || 0;
|
|
12639
12650
|
},
|
|
12640
12651
|
electricInput: /<\/[\s\w:]+>$/,
|
|
12641
12652
|
blockCommentStart: "<!--",
|
|
@@ -12918,7 +12929,7 @@ function Xm() {
|
|
|
12918
12929
|
};
|
|
12919
12930
|
for (var k in m)
|
|
12920
12931
|
m.hasOwnProperty(k) && u.tokenTypeOverrides[k] && (m[k] = u.tokenTypeOverrides[k]);
|
|
12921
|
-
var S = /^([*\-_])(?:\s*\1){2,}\s*$/,
|
|
12932
|
+
var S = /^([*\-_])(?:\s*\1){2,}\s*$/, F = /^(?:[*\-+]|^[0-9]+([.)]))\s+/, L = /^\[(x| )\](?=\s)/i, W = u.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/, z = /^ {0,3}(?:\={1,}|-{2,})\s*$/, A = /^[^#!\[\]*_\\<>` "'(~:]+/, $ = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/, I = /^\s*\[[^\]]+?\]:.*$/, N = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/, H = " ";
|
|
12922
12933
|
function V(E, x, oe) {
|
|
12923
12934
|
return x.f = x.inline = oe, oe(E, x);
|
|
12924
12935
|
}
|
|
@@ -12929,7 +12940,7 @@ function Xm() {
|
|
|
12929
12940
|
return !E || !/\S/.test(E.string);
|
|
12930
12941
|
}
|
|
12931
12942
|
function se(E) {
|
|
12932
|
-
if (E.linkTitle = !1, E.linkHref = !1, E.linkText = !1, E.em = !1, E.strong = !1, E.strikethrough = !1, E.quote = 0, E.indentedCode = !1, E.f ==
|
|
12943
|
+
if (E.linkTitle = !1, E.linkHref = !1, E.linkText = !1, E.em = !1, E.strong = !1, E.strikethrough = !1, E.quote = 0, E.indentedCode = !1, E.f == Ae) {
|
|
12933
12944
|
var x = h;
|
|
12934
12945
|
if (!x) {
|
|
12935
12946
|
var oe = r.innerMode(f, E.htmlState);
|
|
@@ -12957,7 +12968,7 @@ function Xm() {
|
|
|
12957
12968
|
return x.quote = 0, x.header = qe[1].length, x.thisLine.header = !0, u.highlightFormatting && (x.formatting = "header"), x.f = x.inline, ie(x);
|
|
12958
12969
|
if (x.indentation <= _e && E.eat(">"))
|
|
12959
12970
|
return x.quote = oe ? 1 : x.quote + 1, u.highlightFormatting && (x.formatting = "quote"), E.eatSpace(), ie(x);
|
|
12960
|
-
if (!Oe && !x.setext && oe && x.indentation <= _e && (qe = E.match(
|
|
12971
|
+
if (!Oe && !x.setext && oe && x.indentation <= _e && (qe = E.match(F))) {
|
|
12961
12972
|
var ut = qe[1] ? "ol" : "ul";
|
|
12962
12973
|
return x.indentation = lt + E.current().length, x.list = !0, x.quote = 0, x.listStack.push(x.indentation), x.em = !1, x.strong = !1, x.code = !1, x.strikethrough = !1, u.taskLists && E.match(L, !1) && (x.taskList = !0), x.f = x.inline, u.highlightFormatting && (x.formatting = ["list", "list-" + ut]), ie(x);
|
|
12963
12974
|
} else {
|
|
@@ -12972,11 +12983,11 @@ function Xm() {
|
|
|
12972
12983
|
if (Oe)
|
|
12973
12984
|
return E.skipToEnd(), x.hr = !0, x.thisLine.hr = !0, m.hr;
|
|
12974
12985
|
if (E.peek() === "[")
|
|
12975
|
-
return V(E, x,
|
|
12986
|
+
return V(E, x, D);
|
|
12976
12987
|
}
|
|
12977
12988
|
return V(E, x, x.inline);
|
|
12978
12989
|
}
|
|
12979
|
-
function
|
|
12990
|
+
function Ae(E, x) {
|
|
12980
12991
|
var oe = f.token(E, x.htmlState);
|
|
12981
12992
|
if (!h) {
|
|
12982
12993
|
var Te = r.innerMode(f, x.htmlState);
|
|
@@ -13010,7 +13021,7 @@ function Xm() {
|
|
|
13010
13021
|
return E.trailingSpaceNewLine ? x.push("trailing-space-new-line") : E.trailingSpace && x.push("trailing-space-" + (E.trailingSpace % 2 ? "a" : "b")), x.length ? x.join(" ") : null;
|
|
13011
13022
|
}
|
|
13012
13023
|
function $e(E, x) {
|
|
13013
|
-
if (E.match(
|
|
13024
|
+
if (E.match(A, !0))
|
|
13014
13025
|
return ie(x);
|
|
13015
13026
|
}
|
|
13016
13027
|
function j(E, x) {
|
|
@@ -13083,7 +13094,7 @@ function Xm() {
|
|
|
13083
13094
|
var Mt = E.string.substring(E.start, ut);
|
|
13084
13095
|
/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Mt) && (x.md_inside = !0);
|
|
13085
13096
|
}
|
|
13086
|
-
return E.backUp(1), x.htmlState = r.startState(f), ne(E, x,
|
|
13097
|
+
return E.backUp(1), x.htmlState = r.startState(f), ne(E, x, Ae);
|
|
13087
13098
|
}
|
|
13088
13099
|
if (u.xml && Z === "<" && E.match(/^\/\w*?>/))
|
|
13089
13100
|
return x.md_inside = !1, "tag";
|
|
@@ -13151,7 +13162,7 @@ function Xm() {
|
|
|
13151
13162
|
return x.match(Y[E]), oe.linkHref = !0, ie(oe);
|
|
13152
13163
|
};
|
|
13153
13164
|
}
|
|
13154
|
-
function
|
|
13165
|
+
function D(E, x) {
|
|
13155
13166
|
return E.match(/^([^\]\\]|\\.)*\]:/, !1) ? (x.f = M, E.next(), u.highlightFormatting && (x.formatting = "link"), x.linkText = !0, ie(x)) : V(E, x, j);
|
|
13156
13167
|
}
|
|
13157
13168
|
function M(E, x) {
|
|
@@ -13236,7 +13247,7 @@ function Xm() {
|
|
|
13236
13247
|
if (x.formatting = !1, E != x.thisLine.stream) {
|
|
13237
13248
|
if (x.header = 0, x.hr = !1, E.match(/^\s*$/, !0))
|
|
13238
13249
|
return se(x), null;
|
|
13239
|
-
if (x.prevLine = x.thisLine, x.thisLine = { stream: E }, x.taskList = !1, x.trailingSpace = 0, x.trailingSpaceNewLine = !1, !x.localState && (x.f = x.block, x.f !=
|
|
13250
|
+
if (x.prevLine = x.thisLine, x.thisLine = { stream: E }, x.taskList = !1, x.trailingSpace = 0, x.trailingSpaceNewLine = !1, !x.localState && (x.f = x.block, x.f != Ae)) {
|
|
13240
13251
|
var oe = E.match(/^\s*/, !0)[0].replace(/\t/g, H).length;
|
|
13241
13252
|
if (x.indentation = oe, x.indentationDiff = null, oe > 0) return null;
|
|
13242
13253
|
}
|
|
@@ -13244,10 +13255,10 @@ function Xm() {
|
|
|
13244
13255
|
return x.f(E, x);
|
|
13245
13256
|
},
|
|
13246
13257
|
innerMode: function(E) {
|
|
13247
|
-
return E.block ==
|
|
13258
|
+
return E.block == Ae ? { state: E.htmlState, mode: f } : E.localState ? { state: E.localState, mode: E.localMode } : { state: E, mode: he };
|
|
13248
13259
|
},
|
|
13249
13260
|
indent: function(E, x, oe) {
|
|
13250
|
-
return E.block ==
|
|
13261
|
+
return E.block == Ae && f.indent ? f.indent(E.htmlState, x, oe) : E.localState && E.localMode.indent ? E.localMode.indent(E.localState, x, oe) : r.Pass;
|
|
13251
13262
|
},
|
|
13252
13263
|
blankLine: se,
|
|
13253
13264
|
getType: ie,
|
|
@@ -13484,16 +13495,53 @@ const Jm = {
|
|
|
13484
13495
|
return !isNaN(n) && isFinite(n) ? n : l;
|
|
13485
13496
|
}
|
|
13486
13497
|
},
|
|
13498
|
+
collectDebugParams() {
|
|
13499
|
+
const l = {};
|
|
13500
|
+
return this.debugForm.params.forEach((n) => {
|
|
13501
|
+
if (n.key && n.key.trim()) {
|
|
13502
|
+
const r = n.value ? n.value.trim() : "";
|
|
13503
|
+
l[n.key.trim()] = this.parseParamValue(r);
|
|
13504
|
+
}
|
|
13505
|
+
}), l;
|
|
13506
|
+
},
|
|
13507
|
+
buildDebugMessages() {
|
|
13508
|
+
var l;
|
|
13509
|
+
return Array.isArray((l = this.originalInputs) == null ? void 0 : l.messages) ? this.originalInputs.messages.map((n) => {
|
|
13510
|
+
const r = n == null ? void 0 : n.role;
|
|
13511
|
+
if (Array.isArray(n == null ? void 0 : n.content) && n.content.some((f) => f && f.type !== "text")) {
|
|
13512
|
+
const f = JSON.parse(JSON.stringify(n));
|
|
13513
|
+
if (r === "user") {
|
|
13514
|
+
const h = [];
|
|
13515
|
+
f.content.forEach((y) => {
|
|
13516
|
+
!y || y.type === "text" || y.type === "image_url" && !this.submitImage || h.push(y);
|
|
13517
|
+
}), this.debugForm.userContent && this.debugForm.userContent.trim() && h.push({
|
|
13518
|
+
type: "text",
|
|
13519
|
+
text: this.debugForm.userContent
|
|
13520
|
+
}), f.content = h.length > 0 ? h : this.debugForm.userContent || "";
|
|
13521
|
+
} else r === "system" && (f.content = this.debugForm.systemContent || "");
|
|
13522
|
+
return f;
|
|
13523
|
+
}
|
|
13524
|
+
return r === "system" ? {
|
|
13525
|
+
...n,
|
|
13526
|
+
content: this.debugForm.systemContent || ""
|
|
13527
|
+
} : r === "user" ? {
|
|
13528
|
+
...n,
|
|
13529
|
+
content: this.debugForm.userContent || ""
|
|
13530
|
+
} : {
|
|
13531
|
+
...n
|
|
13532
|
+
};
|
|
13533
|
+
}) : [];
|
|
13534
|
+
},
|
|
13487
13535
|
buildRequestHeaders(l) {
|
|
13488
|
-
var f, h, y;
|
|
13536
|
+
var f, h, y, m, k, S;
|
|
13489
13537
|
const n = {};
|
|
13490
13538
|
let r = null;
|
|
13491
13539
|
const o = Object.keys(l).find(
|
|
13492
|
-
(
|
|
13540
|
+
(F) => F.toLowerCase() === "x-target-url"
|
|
13493
13541
|
);
|
|
13494
13542
|
o ? (r = l[o], delete l[o]) : this.targetUrl && (r = this.targetUrl), r && (n["X-Target-Url"] = r);
|
|
13495
|
-
|
|
13496
|
-
return u
|
|
13543
|
+
let u = (y = (h = (f = this.selectedSpan) == null ? void 0 : f.parsedContent) == null ? void 0 : h.attributes) == null ? void 0 : y["http.request.header.Authorization"];
|
|
13544
|
+
return u ? n.Authorization = String(u).trim() : (u = (S = (k = (m = this.selectedSpan) == null ? void 0 : m.parsedContent) == null ? void 0 : k.attributes) == null ? void 0 : S["http.request.header.authorization"], u && (n.Authorization = String(u).trim())), n;
|
|
13497
13545
|
},
|
|
13498
13546
|
handleDebugResponse(l) {
|
|
13499
13547
|
console.log("debug response:", l);
|
|
@@ -13560,14 +13608,11 @@ const Jm = {
|
|
|
13560
13608
|
this.debugSubmitting = !0;
|
|
13561
13609
|
try {
|
|
13562
13610
|
const l = {};
|
|
13563
|
-
this.sendFile && this.originalInputs && Object.keys(this.originalInputs).forEach((
|
|
13564
|
-
|
|
13565
|
-
})
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
l[n.key] = this.parseParamValue(r);
|
|
13569
|
-
}
|
|
13570
|
-
}), await this.submitDebugRequest(l);
|
|
13611
|
+
this.sendFile && this.originalInputs && Object.keys(this.originalInputs).forEach((r) => {
|
|
13612
|
+
r.startsWith("__file__") && this.originalInputs[r] && (l[r] = this.originalInputs[r]);
|
|
13613
|
+
});
|
|
13614
|
+
const n = this.collectDebugParams();
|
|
13615
|
+
Object.assign(l, n), await this.submitDebugRequest(l);
|
|
13571
13616
|
} catch (l) {
|
|
13572
13617
|
this.handleDebugError(l);
|
|
13573
13618
|
} finally {
|
|
@@ -13579,31 +13624,10 @@ const Jm = {
|
|
|
13579
13624
|
if (!(!this.selectedSpan || !this.originalInputs)) {
|
|
13580
13625
|
this.debugSubmitting = !0;
|
|
13581
13626
|
try {
|
|
13582
|
-
const l =
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
l[n.key] = this.parseParamValue(r);
|
|
13587
|
-
}
|
|
13588
|
-
}), l.messages && Array.isArray(l.messages)) {
|
|
13589
|
-
const n = l.messages.find((o) => o.role === "system");
|
|
13590
|
-
n && (n.content = this.debugForm.systemContent || "");
|
|
13591
|
-
const r = l.messages.find((o) => o.role === "user");
|
|
13592
|
-
if (r) {
|
|
13593
|
-
const o = this.originalInputs.messages.find((f) => f.role === "user");
|
|
13594
|
-
if (o && Array.isArray(o.content)) {
|
|
13595
|
-
const f = [];
|
|
13596
|
-
this.submitImage && Array.isArray(r.content) && r.content.forEach((h) => {
|
|
13597
|
-
h.type === "image_url" && f.push(h);
|
|
13598
|
-
}), this.debugForm.userContent && this.debugForm.userContent.trim() && f.push({
|
|
13599
|
-
type: "text",
|
|
13600
|
-
text: this.debugForm.userContent
|
|
13601
|
-
}), r.content = f.length > 0 ? f : this.debugForm.userContent || "";
|
|
13602
|
-
} else
|
|
13603
|
-
r.content = this.debugForm.userContent || "";
|
|
13604
|
-
}
|
|
13605
|
-
}
|
|
13606
|
-
await this.submitDebugRequest(l);
|
|
13627
|
+
const l = {};
|
|
13628
|
+
l.messages = this.buildDebugMessages();
|
|
13629
|
+
const n = this.collectDebugParams();
|
|
13630
|
+
Object.assign(l, n), await this.submitDebugRequest(l);
|
|
13607
13631
|
} catch (l) {
|
|
13608
13632
|
this.handleDebugError(l);
|
|
13609
13633
|
} finally {
|
|
@@ -13686,7 +13710,7 @@ var Ym = function() {
|
|
|
13686
13710
|
Qm,
|
|
13687
13711
|
!1,
|
|
13688
13712
|
null,
|
|
13689
|
-
"
|
|
13713
|
+
"131292bb"
|
|
13690
13714
|
);
|
|
13691
13715
|
const ev = Zm.exports;
|
|
13692
13716
|
Se.setOptions({
|
|
@@ -13853,12 +13877,12 @@ const tv = {
|
|
|
13853
13877
|
return l != null && String(l).trim() !== "" ? !0 : ((u = (o = this.selectedSpan) == null ? void 0 : o.parsedContent) == null ? void 0 : u.outputs) !== void 0;
|
|
13854
13878
|
},
|
|
13855
13879
|
showIOTab() {
|
|
13856
|
-
var k, S,
|
|
13880
|
+
var k, S, F, L, W, z, A, $, I, N;
|
|
13857
13881
|
if (!this.selectedSpan) return !1;
|
|
13858
|
-
const l = (S = (k = this.selectedSpan) == null ? void 0 : k.parsedContent) == null ? void 0 : S.request_preview, n = (L = (
|
|
13882
|
+
const l = (S = (k = this.selectedSpan) == null ? void 0 : k.parsedContent) == null ? void 0 : S.request_preview, n = (L = (F = this.selectedSpan) == null ? void 0 : F.parsedContent) == null ? void 0 : L.response_preview, r = l != null && String(l).trim() !== "", o = n != null && String(n).trim() !== "";
|
|
13859
13883
|
if (r || o) return !0;
|
|
13860
13884
|
if (!(this.selectedSpan.type === "CLIENT" || this.selectedSpan.type === "EMBEDDING" || this.selectedSpan.type === "CHAT_MODEL")) return !1;
|
|
13861
|
-
const f = (
|
|
13885
|
+
const f = (A = (z = (W = this.selectedSpan) == null ? void 0 : W.parsedContent) == null ? void 0 : z.attributes) == null ? void 0 : A["langsword.spanInputs"], h = (N = (I = ($ = this.selectedSpan) == null ? void 0 : $.parsedContent) == null ? void 0 : I.attributes) == null ? void 0 : N["langsword.spanOutputs"], y = f != null && f !== "", m = h != null && h !== "";
|
|
13862
13886
|
return y || m;
|
|
13863
13887
|
},
|
|
13864
13888
|
attributesData() {
|
|
@@ -14339,70 +14363,70 @@ const tv = {
|
|
|
14339
14363
|
}
|
|
14340
14364
|
};
|
|
14341
14365
|
var nv = function() {
|
|
14342
|
-
var o, u, f, h, y, m, k, S,
|
|
14366
|
+
var o, u, f, h, y, m, k, S, F, L, W, z;
|
|
14343
14367
|
var n = this, r = n._self._c;
|
|
14344
|
-
return r("el-drawer", { attrs: { visible: n.localVisible, "with-header": !0, title: n.drawerTitle, size: "90%", direction: "rtl", "before-close": n.handleClose }, on: { "update:visible": function(
|
|
14345
|
-
n.localVisible =
|
|
14346
|
-
} } }, [n.currentTraceId ? r("div", { directives: [{ name: "loading", rawName: "v-loading", value: n.loading, expression: "loading" }], staticClass: "trace-detail-content", attrs: { "element-loading-text": "加载中..." } }, [r("div", { staticClass: "trace-info-section" }, [r("el-descriptions", { attrs: { column: 3, border: "" } }, [r("el-descriptions-item", { attrs: { label: n.$t("trace.traceId") } }, [n._v(n._s(n.traceInfo.trace_id))]), r("el-descriptions-item", { attrs: { label: n.$t("trace.status") } }, [r("el-tag", { attrs: { type: n.getStatusType(n.traceInfo.status), size: "mini" } }, [n._v(" " + n._s(n.getStatusLabel(n.traceInfo.status)) + " ")])], 1), r("el-descriptions-item", { attrs: { label: n.$t("trace.executionTime") } }, [n._v(" " + n._s(n.formatNanoDuration(n.traceInfo.execution_time_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.timeCreated") } }, [n._v(" " + n._s(n.formatTimestamp(n.traceInfo.timestamp_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.timeEnded") } }, [n._v(" " + n._s(n.formatTimestamp(n.traceInfo.end_time_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.experimentName") } }, [n._v(n._s(n.traceInfo.experiment_name))]), r("el-descriptions-item", { attrs: { label: n.$t("trace.traceType") } }, [r("el-tag", { attrs: { size: "mini", type: "info" } }, [n._v(n._s(n.getTraceSpanTypeLabel(n.traceInfo.trace_type)))])], 1), r("el-descriptions-item", { attrs: { label: n.$t("trace.traceName"), span: 2 } }, [n._v(" " + n._s(n.traceInfo.trace_name || "-") + " ")])], 1)], 1), r("el-divider"), r("el-row", { attrs: { gutter: 20 } }, [r("el-col", { staticClass: "span-tree-col", attrs: { span: 8 } }, [r("el-card", [r("div", { staticClass: "span-search-header", attrs: { slot: "header" }, slot: "header" }, [r("el-input", { staticClass: "span-search-input", attrs: { placeholder: n.$t("span.searchTree"), "prefix-icon": "el-icon-search", size: "small", clearable: "" }, on: { input: n.handleSpanSearch }, model: { value: n.spanSearchQuery, callback: function(
|
|
14347
|
-
n.spanSearchQuery =
|
|
14348
|
-
}, expression: "spanSearchQuery" } }), r("el-select", { staticClass: "span-type-select", attrs: { value: n.spanTypeFilter, size: "small", clearable: "", placeholder: n.$t("trace.traceType") }, on: { input: n.handleSpanTypeFilterChange } }, n._l(n.traceSpanTypeList, function(
|
|
14349
|
-
return r("el-option", { key:
|
|
14350
|
-
}), 1), r("el-checkbox", { attrs: { value: !!n.spanHasEvents, size: "small" }, on: { change: n.handleHasEventsChange } }, [n._v(" " + n._s(n.$t("span.hasEvents")) + " ")]), r("el-checkbox", { attrs: { value: !!n.spanOnlyFailed, size: "small" }, on: { change: n.handleOnlyFailedChange } }, [n._v(" " + n._s(n.$t("span.onlyFailed")) + " ")])], 1), r("TraceSpanTree", { attrs: { spans: n.filteredSpans, "selected-span-id": n.selectedSpanId, "trace-start-time": n.traceStartTime, "trace-end-time": n.traceEndTime, "span-type-list": n.traceSpanTypeList }, on: { "span-select": n.handleSpanSelect } }), n.spanHasNextPage ? r("div", { staticClass: "span-load-more" }, [r("el-button", { attrs: { type: "primary", size: "mini", loading: n.spanLoadMoreLoading }, on: { click: function(
|
|
14368
|
+
return r("el-drawer", { attrs: { visible: n.localVisible, "with-header": !0, title: n.drawerTitle, size: "90%", direction: "rtl", "before-close": n.handleClose }, on: { "update:visible": function(A) {
|
|
14369
|
+
n.localVisible = A;
|
|
14370
|
+
} } }, [n.currentTraceId ? r("div", { directives: [{ name: "loading", rawName: "v-loading", value: n.loading, expression: "loading" }], staticClass: "trace-detail-content", attrs: { "element-loading-text": "加载中..." } }, [r("div", { staticClass: "trace-info-section" }, [r("el-descriptions", { attrs: { column: 3, border: "" } }, [r("el-descriptions-item", { attrs: { label: n.$t("trace.traceId") } }, [n._v(n._s(n.traceInfo.trace_id))]), r("el-descriptions-item", { attrs: { label: n.$t("trace.status") } }, [r("el-tag", { attrs: { type: n.getStatusType(n.traceInfo.status), size: "mini" } }, [n._v(" " + n._s(n.getStatusLabel(n.traceInfo.status)) + " ")])], 1), r("el-descriptions-item", { attrs: { label: n.$t("trace.executionTime") } }, [n._v(" " + n._s(n.formatNanoDuration(n.traceInfo.execution_time_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.timeCreated") } }, [n._v(" " + n._s(n.formatTimestamp(n.traceInfo.timestamp_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.timeEnded") } }, [n._v(" " + n._s(n.formatTimestamp(n.traceInfo.end_time_ms)) + " ")]), r("el-descriptions-item", { attrs: { label: n.$t("trace.experimentName") } }, [n._v(n._s(n.traceInfo.experiment_name))]), r("el-descriptions-item", { attrs: { label: n.$t("trace.traceType") } }, [r("el-tag", { attrs: { size: "mini", type: "info" } }, [n._v(n._s(n.getTraceSpanTypeLabel(n.traceInfo.trace_type)))])], 1), r("el-descriptions-item", { attrs: { label: n.$t("trace.traceName"), span: 2 } }, [n._v(" " + n._s(n.traceInfo.trace_name || "-") + " ")])], 1)], 1), r("el-divider"), r("el-row", { attrs: { gutter: 20 } }, [r("el-col", { staticClass: "span-tree-col", attrs: { span: 8 } }, [r("el-card", [r("div", { staticClass: "span-search-header", attrs: { slot: "header" }, slot: "header" }, [r("el-input", { staticClass: "span-search-input", attrs: { placeholder: n.$t("span.searchTree"), "prefix-icon": "el-icon-search", size: "small", clearable: "" }, on: { input: n.handleSpanSearch }, model: { value: n.spanSearchQuery, callback: function(A) {
|
|
14371
|
+
n.spanSearchQuery = A;
|
|
14372
|
+
}, expression: "spanSearchQuery" } }), r("el-select", { staticClass: "span-type-select", attrs: { value: n.spanTypeFilter, size: "small", clearable: "", placeholder: n.$t("trace.traceType") }, on: { input: n.handleSpanTypeFilterChange } }, n._l(n.traceSpanTypeList, function(A) {
|
|
14373
|
+
return r("el-option", { key: A.value, attrs: { label: A.label, value: A.value } });
|
|
14374
|
+
}), 1), r("el-checkbox", { attrs: { value: !!n.spanHasEvents, size: "small" }, on: { change: n.handleHasEventsChange } }, [n._v(" " + n._s(n.$t("span.hasEvents")) + " ")]), r("el-checkbox", { attrs: { value: !!n.spanOnlyFailed, size: "small" }, on: { change: n.handleOnlyFailedChange } }, [n._v(" " + n._s(n.$t("span.onlyFailed")) + " ")])], 1), r("TraceSpanTree", { attrs: { spans: n.filteredSpans, "selected-span-id": n.selectedSpanId, "trace-start-time": n.traceStartTime, "trace-end-time": n.traceEndTime, "span-type-list": n.traceSpanTypeList }, on: { "span-select": n.handleSpanSelect } }), n.spanHasNextPage ? r("div", { staticClass: "span-load-more" }, [r("el-button", { attrs: { type: "primary", size: "mini", loading: n.spanLoadMoreLoading }, on: { click: function(A) {
|
|
14351
14375
|
return n.$emit("span-load-more");
|
|
14352
|
-
} } }, [n._v(" 加载更多 ")]), r("el-select", { staticClass: "span-page-size-select", attrs: { value: n.spanPageSize, size: "mini" }, on: { input: function(
|
|
14353
|
-
return n.$emit("update:span-page-size",
|
|
14354
|
-
} } }, [r("el-option", { attrs: { label: 1e3, value: 1e3 } }), r("el-option", { attrs: { label: 2e3, value: 2e3 } }), r("el-option", { attrs: { label: 5e3, value: 5e3 } }), r("el-option", { attrs: { label: 1e4, value: 1e4 } })], 1)], 1) : n._e()], 1)], 1), r("el-col", { staticClass: "span-detail-col", attrs: { span: 16 } }, [r("el-card", [n.selectedSpan ? r("div", { staticClass: "span-detail-content" }, [r("el-tabs", { key: `tabs-${n.selectedSpanId}`, model: { value: n.activeTab, callback: function(
|
|
14355
|
-
n.activeTab =
|
|
14356
|
-
}, expression: "activeTab" } }, [n.showIOTab ? r("el-tab-pane", { attrs: { label: `${n.$t("trace.inputs")} / ${n.$t("trace.outputs")}`, name: "io" } }, [r("div", { staticClass: "io-content" }, [n.hasInputs ? r("div", { staticClass: "io-section" }, [r("el-collapse", { model: { value: n.activeCollapse, callback: function(
|
|
14357
|
-
n.activeCollapse =
|
|
14358
|
-
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "inputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.inputs")))]), (o = n.selectedSpan.parsedContent) != null && o.request_preview || !((f = (u = n.selectedSpan.parsedContent) == null ? void 0 : u.inputs) != null && f.messages) ? r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(
|
|
14376
|
+
} } }, [n._v(" 加载更多 ")]), r("el-select", { staticClass: "span-page-size-select", attrs: { value: n.spanPageSize, size: "mini" }, on: { input: function(A) {
|
|
14377
|
+
return n.$emit("update:span-page-size", A);
|
|
14378
|
+
} } }, [r("el-option", { attrs: { label: 1e3, value: 1e3 } }), r("el-option", { attrs: { label: 2e3, value: 2e3 } }), r("el-option", { attrs: { label: 5e3, value: 5e3 } }), r("el-option", { attrs: { label: 1e4, value: 1e4 } })], 1)], 1) : n._e()], 1)], 1), r("el-col", { staticClass: "span-detail-col", attrs: { span: 16 } }, [r("el-card", [n.selectedSpan ? r("div", { staticClass: "span-detail-content" }, [r("el-tabs", { key: `tabs-${n.selectedSpanId}`, model: { value: n.activeTab, callback: function(A) {
|
|
14379
|
+
n.activeTab = A;
|
|
14380
|
+
}, expression: "activeTab" } }, [n.showIOTab ? r("el-tab-pane", { attrs: { label: `${n.$t("trace.inputs")} / ${n.$t("trace.outputs")}`, name: "io" } }, [r("div", { staticClass: "io-content" }, [n.hasInputs ? r("div", { staticClass: "io-section" }, [r("el-collapse", { model: { value: n.activeCollapse, callback: function(A) {
|
|
14381
|
+
n.activeCollapse = A;
|
|
14382
|
+
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "inputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.inputs")))]), (o = n.selectedSpan.parsedContent) != null && o.request_preview || !((f = (u = n.selectedSpan.parsedContent) == null ? void 0 : u.inputs) != null && f.messages) ? r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(A) {
|
|
14359
14383
|
var $;
|
|
14360
|
-
|
|
14361
|
-
} } })], 1) : n._e()], 1), (h = n.selectedSpan.parsedContent) != null && h.request_preview ? r("div", { staticClass: "structured-content preview-content" }, [r("div", { staticClass: "content-element" }, [r("div", { staticClass: "markdown-content", domProps: { innerHTML: n._s(n.renderMarkdown(n.selectedSpan.parsedContent.request_preview)) } })])]) : n.clientInputsFileOnly ? r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(n.selectedSpan.parsedContent.inputs, !0), function(
|
|
14362
|
-
return r("div", { key:
|
|
14363
|
-
return n.handleImageClick(
|
|
14364
|
-
} } })]) :
|
|
14365
|
-
return n.handleImageClick(
|
|
14366
|
-
} } })]) :
|
|
14367
|
-
}), 0) : (m = (y = n.selectedSpan.parsedContent) == null ? void 0 : y.inputs) != null && m.messages ? r("div", { staticClass: "messages-section" }, n._l(n.selectedSpan.parsedContent.inputs.messages, function(
|
|
14384
|
+
A.stopPropagation(), n.copyToClipboard(($ = n.selectedSpan.parsedContent) != null && $.request_preview ? n.selectedSpan.parsedContent.request_preview : n.formatRawJson(n.selectedSpan.parsedContent.inputs));
|
|
14385
|
+
} } })], 1) : n._e()], 1), (h = n.selectedSpan.parsedContent) != null && h.request_preview ? r("div", { staticClass: "structured-content preview-content" }, [r("div", { staticClass: "content-element" }, [r("div", { staticClass: "markdown-content", domProps: { innerHTML: n._s(n.renderMarkdown(n.selectedSpan.parsedContent.request_preview)) } })])]) : n.clientInputsFileOnly ? r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(n.selectedSpan.parsedContent.inputs, !0), function(A) {
|
|
14386
|
+
return r("div", { key: A.key, staticClass: "content-element" }, [A.type === "markdown" ? r("div", { staticClass: "markdown-content", domProps: { innerHTML: n._s(A.content) } }) : A.type === "image" ? r("div", { staticClass: "image-content" }, [A.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(A.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: A.url, alt: "content image" }, on: { click: function($) {
|
|
14387
|
+
return n.handleImageClick(A.url);
|
|
14388
|
+
} } })]) : A.type === "file-image" ? r("div", { staticClass: "image-content" }, [A.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(A.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: A.downloadUrl, alt: "content image" }, on: { click: function($) {
|
|
14389
|
+
return n.handleImageClick(A.downloadUrl);
|
|
14390
|
+
} } })]) : A.type === "file-pdf" ? r("div", [r("FilePdfViewer", { attrs: { element: A } })], 1) : A.type === "file-download" ? r("div", { staticClass: "file-download-content" }, [r("a", { staticClass: "file-download-link", attrs: { href: A.downloadUrl, target: "_blank", rel: "noopener noreferrer" } }, [n._v(n._s(A.filename))]), r("span", { staticClass: "file-download-hint" }, [n._v(n._s(n.$t("trace.clickToDownload")))])]) : n._e()]);
|
|
14391
|
+
}), 0) : (m = (y = n.selectedSpan.parsedContent) == null ? void 0 : y.inputs) != null && m.messages ? r("div", { staticClass: "messages-section" }, n._l(n.selectedSpan.parsedContent.inputs.messages, function(A, $) {
|
|
14368
14392
|
return r("div", { key: $, staticClass: "message-item" }, [r("el-collapse", { model: { value: n.messageCollapse, callback: function(I) {
|
|
14369
14393
|
n.messageCollapse = I;
|
|
14370
|
-
}, expression: "messageCollapse" } }, [r("el-collapse-item", { attrs: { name: `message-${$}` } }, [r("template", { slot: "title" }, [r("i", { staticClass: "message-icon", class: n.getMessageIcon(
|
|
14371
|
-
return I.stopPropagation(), n.copyMessageContent(
|
|
14372
|
-
} } })], 1)], 1), r("div", { staticClass: "message-content" }, [r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(
|
|
14394
|
+
}, expression: "messageCollapse" } }, [r("el-collapse-item", { attrs: { name: `message-${$}` } }, [r("template", { slot: "title" }, [r("i", { staticClass: "message-icon", class: n.getMessageIcon(A.role) }), r("span", { staticClass: "message-role" }, [n._v(n._s(n.getMessageRoleLabel(A.role)))]), r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(I) {
|
|
14395
|
+
return I.stopPropagation(), n.copyMessageContent(A.content);
|
|
14396
|
+
} } })], 1)], 1), r("div", { staticClass: "message-content" }, [r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(A.content), function(I) {
|
|
14373
14397
|
return r("div", { key: I.key, staticClass: "content-element" }, [I.type === "markdown" ? r("div", { staticClass: "markdown-content", domProps: { innerHTML: n._s(I.content) } }) : I.type === "image" ? r("div", { staticClass: "image-content" }, [I.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(I.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: I.url, alt: "content image" }, on: { click: function(N) {
|
|
14374
14398
|
return n.handleImageClick(I.url);
|
|
14375
14399
|
} } })]) : I.type === "file-image" ? r("div", { staticClass: "image-content" }, [I.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(I.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: I.downloadUrl, alt: "content image" }, on: { click: function(N) {
|
|
14376
14400
|
return n.handleImageClick(I.downloadUrl);
|
|
14377
14401
|
} } })]) : I.type === "file-pdf" ? r("div", [r("FilePdfViewer", { attrs: { element: I } })], 1) : I.type === "file-download" ? r("div", { staticClass: "file-download-content" }, [r("a", { staticClass: "file-download-link", attrs: { href: I.downloadUrl, target: "_blank", rel: "noopener noreferrer" } }, [n._v(n._s(I.filename))]), r("span", { staticClass: "file-download-hint" }, [n._v(n._s(n.$t("trace.clickToDownload")))])]) : n._e()]);
|
|
14378
14402
|
}), 0)])], 2)], 1)], 1);
|
|
14379
|
-
}), 0) : (k = n.selectedSpan.parsedContent) != null && k.inputs ? r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(n.selectedSpan.parsedContent.inputs), function(
|
|
14380
|
-
return r("div", { key:
|
|
14381
|
-
return n.handleImageClick(
|
|
14382
|
-
} } })]) :
|
|
14383
|
-
return n.handleImageClick(
|
|
14384
|
-
} } })]) :
|
|
14385
|
-
}), 0) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noInputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), n.hasOutputs ? r("div", { staticClass: "io-section" }, [r("el-collapse", { model: { value: n.activeCollapse, callback: function(
|
|
14386
|
-
n.activeCollapse =
|
|
14387
|
-
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "outputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.outputs")))]), (S = n.selectedSpan.parsedContent) != null && S.response_preview || !((L = (
|
|
14403
|
+
}), 0) : (k = n.selectedSpan.parsedContent) != null && k.inputs ? r("div", { staticClass: "structured-content" }, n._l(n.renderStructuredContent(n.selectedSpan.parsedContent.inputs), function(A) {
|
|
14404
|
+
return r("div", { key: A.key, staticClass: "content-element" }, [A.type === "markdown" ? r("div", { staticClass: "markdown-content", domProps: { innerHTML: n._s(A.content) } }) : A.type === "image" ? r("div", { staticClass: "image-content" }, [A.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(A.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: A.url, alt: "content image" }, on: { click: function($) {
|
|
14405
|
+
return n.handleImageClick(A.url);
|
|
14406
|
+
} } })]) : A.type === "file-image" ? r("div", { staticClass: "image-content" }, [A.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(A.label))]) : n._e(), r("img", { staticClass: "content-image", attrs: { src: A.downloadUrl, alt: "content image" }, on: { click: function($) {
|
|
14407
|
+
return n.handleImageClick(A.downloadUrl);
|
|
14408
|
+
} } })]) : A.type === "file-pdf" ? r("div", [r("FilePdfViewer", { attrs: { element: A } })], 1) : A.type === "file-download" ? r("div", { staticClass: "file-download-content" }, [r("a", { staticClass: "file-download-link", attrs: { href: A.downloadUrl, target: "_blank", rel: "noopener noreferrer" } }, [n._v(n._s(A.filename))]), r("span", { staticClass: "file-download-hint" }, [n._v(n._s(n.$t("trace.clickToDownload")))])]) : n._e()]);
|
|
14409
|
+
}), 0) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noInputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), n.hasOutputs ? r("div", { staticClass: "io-section" }, [r("el-collapse", { model: { value: n.activeCollapse, callback: function(A) {
|
|
14410
|
+
n.activeCollapse = A;
|
|
14411
|
+
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "outputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.outputs")))]), (S = n.selectedSpan.parsedContent) != null && S.response_preview || !((L = (F = n.selectedSpan.parsedContent) == null ? void 0 : F.outputs) != null && L.choices) ? r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(A) {
|
|
14388
14412
|
var $;
|
|
14389
|
-
|
|
14390
|
-
} } })], 1) : n._e()], 1), ((W = n.selectedSpan.parsedContent) == null ? void 0 : W.outputs) !== void 0 ? r("OutputViewer", { attrs: { value: n.selectedSpan.parsedContent.outputs, "preview-markdown": (z = n.selectedSpan.parsedContent) == null ? void 0 : z.response_preview, "file-only": n.clientOutputsFileOnly, "support-file-elements": !0, "show-raw-toggle": !1, "content-key": n.selectedSpanId }, on: { copy: n.copyToClipboard } }) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noOutputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), !n.hasInputs && !n.hasOutputs ? r("div", { staticClass: "empty-io" }, [r("el-empty", { attrs: { description: n.$t("trace.noIoData") } })], 1) : n._e()])]) : n._e(), r("el-tab-pane", { attrs: { label: n.$t("trace.attributes"), name: "attributes" } }, [r("el-table", { staticClass: "attributes-table", attrs: { data: n.attributesData, border: "", stripe: "" } }, [r("el-table-column", { attrs: { prop: "key", label: n.$t("trace.key"), width: "250" }, scopedSlots: n._u([{ key: "default", fn: function(
|
|
14391
|
-
return [r("el-tooltip", { attrs: { content:
|
|
14392
|
-
} }], null, !1, 688878823) }), r("el-table-column", { attrs: { prop: "value", label: n.$t("trace.value") }, scopedSlots: n._u([{ key: "default", fn: function(
|
|
14393
|
-
return [r("el-tooltip", { attrs: { placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [r("div", { staticClass: "attribute-tooltip-content", attrs: { slot: "content" }, slot: "content" }, [n._v(n._s(
|
|
14394
|
-
} }], null, !1, 4281519148) })], 1)], 1), n.showIOTab ? r("el-tab-pane", { attrs: { label: n.$t("trace.rawInputsOutputs"), name: "raw" } }, [n.activeTab === "raw" ? r("div", { staticClass: "raw-io-content" }, [n.rawInputs ? r("div", { staticClass: "raw-io-section" }, [r("el-collapse", { model: { value: n.rawIoCollapse, callback: function(
|
|
14395
|
-
n.rawIoCollapse =
|
|
14396
|
-
}, expression: "rawIoCollapse" } }, [r("el-collapse-item", { attrs: { name: "rawInputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.rawInputs")))]), r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(
|
|
14397
|
-
|
|
14398
|
-
} } })], 1)], 1), r("codemirror", { key: `raw-inputs-${n.selectedSpanId}-${n.rawInputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: n.formatRawJson(n.rawInputs), options: n.cmOptions } })], 2)], 1)], 1) : n._e(), n.rawOutputs ? r("div", { staticClass: "raw-io-section" }, [r("el-collapse", { model: { value: n.rawIoCollapse, callback: function(
|
|
14399
|
-
n.rawIoCollapse =
|
|
14400
|
-
}, expression: "rawIoCollapse" } }, [r("el-collapse-item", { attrs: { name: "rawOutputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.rawOutputs")))]), r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(
|
|
14401
|
-
|
|
14402
|
-
} } })], 1)], 1), r("codemirror", { key: `raw-outputs-${n.selectedSpanId}-${n.rawOutputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: n.formatRawJson(n.rawOutputs), options: n.cmOptions } })], 2)], 1)], 1) : n._e(), !n.rawInputs && !n.rawOutputs ? r("div", { staticClass: "empty-raw-io" }, [r("el-empty", { attrs: { description: n.$t("trace.noIoData") } })], 1) : n._e()]) : n._e()]) : n._e(), n.showDebugTab ? r("el-tab-pane", { attrs: { label: "快速调试", name: "debug" } }, [r("DebugTab", { directives: [{ name: "show", rawName: "v-show", value: n.activeTab === "debug", expression: "activeTab === 'debug'" }], attrs: { "selected-span": n.selectedSpan, "selected-span-id": n.selectedSpanId } })], 1) : n._e(), n.hasEvents ? r("el-tab-pane", { attrs: { label: n.$t("trace.events"), name: "events" } }, [n.activeTab === "events" ? r("div", { staticClass: "events-content" }, [r("el-collapse", { model: { value: n.eventsCollapse, callback: function(
|
|
14403
|
-
n.eventsCollapse =
|
|
14404
|
-
}, expression: "eventsCollapse" } }, n._l(n.spanEvents, function(
|
|
14405
|
-
return r("el-collapse-item", { key: `event-${$}`, attrs: { name: `event-${$}` } }, [r("template", { slot: "title" }, [r("div", { staticClass: "event-header" }, [r("el-tag", { staticClass: "event-name-tag", attrs: { type:
|
|
14413
|
+
A.stopPropagation(), n.copyToClipboard(($ = n.selectedSpan.parsedContent) != null && $.response_preview ? n.selectedSpan.parsedContent.response_preview : n.formatRawJson(n.selectedSpan.parsedContent.outputs));
|
|
14414
|
+
} } })], 1) : n._e()], 1), ((W = n.selectedSpan.parsedContent) == null ? void 0 : W.outputs) !== void 0 ? r("OutputViewer", { attrs: { value: n.selectedSpan.parsedContent.outputs, "preview-markdown": (z = n.selectedSpan.parsedContent) == null ? void 0 : z.response_preview, "file-only": n.clientOutputsFileOnly, "support-file-elements": !0, "show-raw-toggle": !1, "content-key": n.selectedSpanId }, on: { copy: n.copyToClipboard } }) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noOutputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), !n.hasInputs && !n.hasOutputs ? r("div", { staticClass: "empty-io" }, [r("el-empty", { attrs: { description: n.$t("trace.noIoData") } })], 1) : n._e()])]) : n._e(), r("el-tab-pane", { attrs: { label: n.$t("trace.attributes"), name: "attributes" } }, [r("el-table", { staticClass: "attributes-table", attrs: { data: n.attributesData, border: "", stripe: "" } }, [r("el-table-column", { attrs: { prop: "key", label: n.$t("trace.key"), width: "250" }, scopedSlots: n._u([{ key: "default", fn: function(A) {
|
|
14415
|
+
return [r("el-tooltip", { attrs: { content: A.row.key, placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [r("span", { staticClass: "attribute-key" }, [n._v(n._s(A.row.key))])])];
|
|
14416
|
+
} }], null, !1, 688878823) }), r("el-table-column", { attrs: { prop: "value", label: n.$t("trace.value") }, scopedSlots: n._u([{ key: "default", fn: function(A) {
|
|
14417
|
+
return [r("el-tooltip", { attrs: { placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [r("div", { staticClass: "attribute-tooltip-content", attrs: { slot: "content" }, slot: "content" }, [n._v(n._s(A.row.value))]), r("div", { staticClass: "attribute-value" }, [n._v(n._s(A.row.value))])])];
|
|
14418
|
+
} }], null, !1, 4281519148) })], 1)], 1), n.showIOTab ? r("el-tab-pane", { attrs: { label: n.$t("trace.rawInputsOutputs"), name: "raw" } }, [n.activeTab === "raw" ? r("div", { staticClass: "raw-io-content" }, [n.rawInputs ? r("div", { staticClass: "raw-io-section" }, [r("el-collapse", { model: { value: n.rawIoCollapse, callback: function(A) {
|
|
14419
|
+
n.rawIoCollapse = A;
|
|
14420
|
+
}, expression: "rawIoCollapse" } }, [r("el-collapse-item", { attrs: { name: "rawInputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.rawInputs")))]), r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(A) {
|
|
14421
|
+
A.stopPropagation(), n.copyToClipboard(n.formatRawJson(n.rawInputs));
|
|
14422
|
+
} } })], 1)], 1), r("codemirror", { key: `raw-inputs-${n.selectedSpanId}-${n.rawInputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: n.formatRawJson(n.rawInputs), options: n.cmOptions } })], 2)], 1)], 1) : n._e(), n.rawOutputs ? r("div", { staticClass: "raw-io-section" }, [r("el-collapse", { model: { value: n.rawIoCollapse, callback: function(A) {
|
|
14423
|
+
n.rawIoCollapse = A;
|
|
14424
|
+
}, expression: "rawIoCollapse" } }, [r("el-collapse-item", { attrs: { name: "rawOutputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.rawOutputs")))]), r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(A) {
|
|
14425
|
+
A.stopPropagation(), n.copyToClipboard(n.formatRawJson(n.rawOutputs));
|
|
14426
|
+
} } })], 1)], 1), r("codemirror", { key: `raw-outputs-${n.selectedSpanId}-${n.rawOutputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: n.formatRawJson(n.rawOutputs), options: n.cmOptions } })], 2)], 1)], 1) : n._e(), !n.rawInputs && !n.rawOutputs ? r("div", { staticClass: "empty-raw-io" }, [r("el-empty", { attrs: { description: n.$t("trace.noIoData") } })], 1) : n._e()]) : n._e()]) : n._e(), n.showDebugTab ? r("el-tab-pane", { attrs: { label: "快速调试", name: "debug" } }, [r("DebugTab", { directives: [{ name: "show", rawName: "v-show", value: n.activeTab === "debug", expression: "activeTab === 'debug'" }], attrs: { "selected-span": n.selectedSpan, "selected-span-id": n.selectedSpanId } })], 1) : n._e(), n.hasEvents ? r("el-tab-pane", { attrs: { label: n.$t("trace.events"), name: "events" } }, [n.activeTab === "events" ? r("div", { staticClass: "events-content" }, [r("el-collapse", { model: { value: n.eventsCollapse, callback: function(A) {
|
|
14427
|
+
n.eventsCollapse = A;
|
|
14428
|
+
}, expression: "eventsCollapse" } }, n._l(n.spanEvents, function(A, $) {
|
|
14429
|
+
return r("el-collapse-item", { key: `event-${$}`, attrs: { name: `event-${$}` } }, [r("template", { slot: "title" }, [r("div", { staticClass: "event-header" }, [r("el-tag", { staticClass: "event-name-tag", attrs: { type: A.name === "exception" ? "danger" : "info", size: "mini" } }, [n._v(" " + n._s(A.name) + " ")]), r("span", { staticClass: "event-time" }, [n._v(n._s(n.formatEventTimestamp(A.timestamp)))])], 1)]), r("div", { staticClass: "event-detail" }, [A.name === "exception" ? r("div", { staticClass: "exception-content" }, [A.attributes["exception.type"] ? r("div", { staticClass: "exception-field" }, [r("div", { staticClass: "field-label" }, [n._v(n._s(n.$t("trace.exceptionType")))]), r("div", { staticClass: "field-value exception-type" }, [n._v(n._s(A.attributes["exception.type"]))])]) : n._e(), A.attributes["exception.message"] ? r("div", { staticClass: "exception-field" }, [r("div", { staticClass: "field-label" }, [n._v(n._s(n.$t("trace.exceptionMessage")))]), r("div", { staticClass: "field-value exception-message" }, [n._v(n._s(A.attributes["exception.message"]))])]) : n._e(), A.attributes["exception.stacktrace"] ? r("div", { staticClass: "exception-field" }, [r("div", { staticClass: "field-label" }, [n._v(n._s(n.$t("trace.exceptionStacktrace")))]), r("codemirror", { key: `stacktrace-${n.selectedSpanId}-${$}-${n.eventsKey}`, staticClass: "code-editor-wrapper stacktrace-editor", attrs: { value: A.attributes["exception.stacktrace"], options: n.cmOptionsJava } })], 1) : n._e(), n.getOtherEventAttributes(A).length > 0 ? r("div", { staticClass: "exception-field" }, [r("div", { staticClass: "field-label" }, [n._v(n._s(n.$t("trace.otherAttributes")))]), r("el-table", { attrs: { data: n.getOtherEventAttributes(A), border: "", stripe: "", size: "mini" } }, [r("el-table-column", { attrs: { prop: "key", label: n.$t("trace.key"), width: "200" } }), r("el-table-column", { attrs: { prop: "value", label: n.$t("trace.value") } })], 1)], 1) : n._e()]) : r("div", { staticClass: "general-event-content" }, [r("el-table", { attrs: { data: n.getEventAttributesData(A), border: "", stripe: "", size: "mini" } }, [r("el-table-column", { attrs: { prop: "key", label: n.$t("trace.key"), width: "200" }, scopedSlots: n._u([{ key: "default", fn: function(I) {
|
|
14406
14430
|
return [r("el-tooltip", { attrs: { content: I.row.key, placement: "top", "open-delay": 500 } }, [r("span", { staticClass: "attribute-key" }, [n._v(n._s(I.row.key))])])];
|
|
14407
14431
|
} }], null, !0) }), r("el-table-column", { attrs: { prop: "value", label: n.$t("trace.value") }, scopedSlots: n._u([{ key: "default", fn: function(I) {
|
|
14408
14432
|
return [r("el-tooltip", { attrs: { placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [r("div", { staticClass: "attribute-tooltip-content", attrs: { slot: "content" }, slot: "content" }, [n._v(n._s(I.row.value))]), r("div", { staticClass: "attribute-value" }, [n._v(n._s(I.row.value))])])];
|
|
@@ -14585,9 +14609,9 @@ const av = iv.exports, sv = {
|
|
|
14585
14609
|
const h = this.spans[0].type === "CLIENT" || this.spans[0].type === "EMBEDDING" || this.spans[0].type === "CHAT_MODEL", y = !!this.selectedSpan.has_events, m = [];
|
|
14586
14610
|
h && m.push("io", "raw"), m.push("attributes"), y && m.push("events");
|
|
14587
14611
|
let k = "attributes";
|
|
14588
|
-
h && (k = "io"), m.includes(k) ? this.activeTab = k : this.activeTab = "attributes", (r = (n = this.selectedSpan.parsedContent) == null ? void 0 : n.inputs) != null && r.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((
|
|
14612
|
+
h && (k = "io"), m.includes(k) ? this.activeTab = k : this.activeTab = "attributes", (r = (n = this.selectedSpan.parsedContent) == null ? void 0 : n.inputs) != null && r.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((F, L) => `message-${L}`) : this.messageCollapse = [];
|
|
14589
14613
|
const S = (o = this.selectedSpan.parsedContent) == null ? void 0 : o.events;
|
|
14590
|
-
S && Array.isArray(S) && S.length > 0 ? this.eventsCollapse = S.map((
|
|
14614
|
+
S && Array.isArray(S) && S.length > 0 ? this.eventsCollapse = S.map((F, L) => `event-${L}`) : this.eventsCollapse = [];
|
|
14591
14615
|
}
|
|
14592
14616
|
} catch (u) {
|
|
14593
14617
|
console.error("Failed to load trace spans:", u), this.$message.error("加载 span 列表失败"), this.spans = [], this.filteredSpans = [], this.spanHasNextPage = !1;
|