@langsword/trace 0.0.4 → 0.0.6
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 +653 -649
- package/dist/trace.umd.js +26 -26
- package/package.json +1 -1
package/dist/trace.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Eh = Object.defineProperty;
|
|
2
2
|
var tu = (f) => {
|
|
3
3
|
throw TypeError(f);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var De = (f, a, s) =>
|
|
5
|
+
var Dh = (f, a, s) => a in f ? Eh(f, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : f[a] = s;
|
|
6
|
+
var De = (f, a, s) => Dh(f, typeof a != "symbol" ? a + "" : a, s), Ih = (f, a, s) => a.has(f) || tu("Cannot " + s);
|
|
7
7
|
var ru = (f, a, s) => a.has(f) ? tu("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(f) : a.set(f, s);
|
|
8
|
-
var ca = (f, a, s) => (
|
|
9
|
-
import { defineStore as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
var
|
|
8
|
+
var ca = (f, a, s) => (Ih(f, a, "access private method"), s);
|
|
9
|
+
import { defineStore as Nh } from "pinia";
|
|
10
|
+
import Mh from "axios";
|
|
11
|
+
import Rh from "vue";
|
|
12
|
+
var Yu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, As = { exports: {} }, nu;
|
|
13
13
|
function Nr() {
|
|
14
14
|
return nu || (nu = 1, function(f, a) {
|
|
15
15
|
(function(s, l) {
|
|
16
16
|
f.exports = l();
|
|
17
|
-
})(
|
|
17
|
+
})(Yu, function() {
|
|
18
18
|
var s = navigator.userAgent, l = navigator.platform, h = /gecko\/\d/i.test(s), g = /MSIE \d/.test(s), p = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(s), y = /Edge\/(\d+)/.exec(s), w = g || p || y, b = w && (g ? document.documentMode || 6 : +(y || p)[1]), k = !y && /WebKit\//.test(s), A = k && /Qt\/\d+\.\d+/.test(s), L = !y && /Chrome\/(\d+)/.exec(s), H = L && +L[1], P = /Opera\//.test(s), $ = /Apple Computer/.test(navigator.vendor), N = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(s), E = /PhantomJS/.test(s), D = $ && (/Mobile\/\w+/.test(s) || navigator.maxTouchPoints > 2), R = /Android/.test(s), q = D || R || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(s), Z = D || /Mac/.test(l), ee = /\bCrOS\b/.test(s), ne = /win/i.test(l), le = P && s.match(/Version\/(\d*\.\d*)/);
|
|
19
19
|
le && (le = Number(le[1])), le && le >= 15 && (P = !1, k = !0);
|
|
20
20
|
var Ae = Z && (A || P && (le == null || le < 12.11)), xe = h || w && b >= 9;
|
|
@@ -672,9 +672,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
672
672
|
if (t.line < e.first)
|
|
673
673
|
return I(e.first, 0);
|
|
674
674
|
var n = e.first + e.size - 1;
|
|
675
|
-
return t.line > n ? I(n, V(e, n).text.length) :
|
|
675
|
+
return t.line > n ? I(n, V(e, n).text.length) : Df(t, V(e, t.line).text.length);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Df(e, t) {
|
|
678
678
|
var n = e.ch;
|
|
679
679
|
return n == null || n > t ? I(e.line, t) : n < 0 ? I(e.line, 0) : e;
|
|
680
680
|
}
|
|
@@ -753,7 +753,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
753
753
|
var r = e.doc, i = e.display;
|
|
754
754
|
if (!r.mode.startState)
|
|
755
755
|
return new Vt(r, !0, t);
|
|
756
|
-
var o =
|
|
756
|
+
var o = If(e, t, n), u = o > r.first && V(r, o - 1).stateAfter, c = u ? Vt.fromSaved(r, u, o) : new Vt(r, sn(r.mode), o);
|
|
757
757
|
return r.iter(o, t, function(d) {
|
|
758
758
|
Ra(e, d.text, c);
|
|
759
759
|
var v = c.line;
|
|
@@ -827,7 +827,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
827
827
|
i(M, v), d = M;
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function If(e, t, n) {
|
|
831
831
|
for (var r, i, o = e.doc, u = n ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), c = t; c > u; --c) {
|
|
832
832
|
if (c <= o.first)
|
|
833
833
|
return o.first;
|
|
@@ -839,7 +839,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
839
839
|
}
|
|
840
840
|
return i;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Nf(e, t) {
|
|
843
843
|
if (e.modeFrontier = Math.min(e.modeFrontier, t), !(e.highlightFrontier < t - 10)) {
|
|
844
844
|
for (var n = e.first, r = t - 1; r > n; r--) {
|
|
845
845
|
var i = V(e, r).stateAfter;
|
|
@@ -852,10 +852,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
var fo = !1, ur = !1;
|
|
855
|
-
function
|
|
855
|
+
function Mf() {
|
|
856
856
|
fo = !0;
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Rf() {
|
|
859
859
|
ur = !0;
|
|
860
860
|
}
|
|
861
861
|
function zi(e, t, n) {
|
|
@@ -869,16 +869,16 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
869
869
|
return r;
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function zf(e, t) {
|
|
873
873
|
for (var n, r = 0; r < e.length; ++r)
|
|
874
874
|
e[r] != t && (n || (n = [])).push(e[r]);
|
|
875
875
|
return n;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function Pf(e, t, n) {
|
|
878
878
|
var r = n && window.WeakSet && (n.markedSpans || (n.markedSpans = /* @__PURE__ */ new WeakSet()));
|
|
879
879
|
r && e.markedSpans && r.has(e.markedSpans) ? e.markedSpans.push(t) : (e.markedSpans = e.markedSpans ? e.markedSpans.concat([t]) : [t], r && r.add(e.markedSpans)), t.marker.attachLine(e);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function Ff(e, t, n) {
|
|
882
882
|
var r;
|
|
883
883
|
if (e)
|
|
884
884
|
for (var i = 0; i < e.length; ++i) {
|
|
@@ -890,7 +890,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
890
890
|
}
|
|
891
891
|
return r;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Hf(e, t, n) {
|
|
894
894
|
var r;
|
|
895
895
|
if (e)
|
|
896
896
|
for (var i = 0; i < e.length; ++i) {
|
|
@@ -912,7 +912,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
912
912
|
var n = z(e, t.from.line) && V(e, t.from.line).markedSpans, r = z(e, t.to.line) && V(e, t.to.line).markedSpans;
|
|
913
913
|
if (!n && !r)
|
|
914
914
|
return null;
|
|
915
|
-
var i = t.from.ch, o = t.to.ch, u = X(t.from, t.to) == 0, c =
|
|
915
|
+
var i = t.from.ch, o = t.to.ch, u = X(t.from, t.to) == 0, c = Ff(n, i, u), d = Hf(r, o, u), v = t.text.length == 1, x = ve(t.text).length + (v ? i : 0);
|
|
916
916
|
if (c)
|
|
917
917
|
for (var C = 0; C < c.length; ++C) {
|
|
918
918
|
var O = c[C];
|
|
@@ -950,7 +950,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
950
950
|
}
|
|
951
951
|
return e.length ? e : null;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Wf(e, t, n) {
|
|
954
954
|
var r = null;
|
|
955
955
|
if (e.iter(t.line, n.line + 1, function(_) {
|
|
956
956
|
if (_.markedSpans)
|
|
@@ -1014,7 +1014,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1014
1014
|
function Hi(e) {
|
|
1015
1015
|
return go(e, !1);
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function Bf(e, t) {
|
|
1018
1018
|
var n = ur && e.markedSpans, r;
|
|
1019
1019
|
if (n)
|
|
1020
1020
|
for (var i = 0; i < n.length; ++i) {
|
|
@@ -1040,12 +1040,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1040
1040
|
e = t.find(-1, !0).line;
|
|
1041
1041
|
return e;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function $f(e) {
|
|
1044
1044
|
for (var t; t = Hi(e); )
|
|
1045
1045
|
e = t.find(1, !0).line;
|
|
1046
1046
|
return e;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function Uf(e) {
|
|
1049
1049
|
for (var t, n; t = Hi(e); )
|
|
1050
1050
|
e = t.find(1, !0).line, (n || (n = [])).push(e);
|
|
1051
1051
|
return n;
|
|
@@ -1130,19 +1130,19 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1130
1130
|
ln.prototype.lineNo = function() {
|
|
1131
1131
|
return m(this);
|
|
1132
1132
|
}, zt(ln);
|
|
1133
|
-
function
|
|
1133
|
+
function jf(e, t, n, r) {
|
|
1134
1134
|
e.text = t, e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), e.order != null && (e.order = null), ho(e), po(e, n);
|
|
1135
1135
|
var i = r ? r(e) : 1;
|
|
1136
1136
|
i != e.height && _t(e, i);
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function Gf(e) {
|
|
1139
1139
|
e.parent = null, ho(e);
|
|
1140
1140
|
}
|
|
1141
|
-
var
|
|
1141
|
+
var qf = {}, Xf = {};
|
|
1142
1142
|
function bo(e, t) {
|
|
1143
1143
|
if (!e || /^\s*$/.test(e))
|
|
1144
1144
|
return null;
|
|
1145
|
-
var n = t.addModeClass ?
|
|
1145
|
+
var n = t.addModeClass ? Xf : qf;
|
|
1146
1146
|
return n[e] || (n[e] = e.replace(/\S+/g, "cm-$&"));
|
|
1147
1147
|
}
|
|
1148
1148
|
function wo(e, t) {
|
|
@@ -1158,9 +1158,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1158
1158
|
t.measure = {};
|
|
1159
1159
|
for (var i = 0; i <= (t.rest ? t.rest.length : 0); i++) {
|
|
1160
1160
|
var o = i ? t.rest[i - 1] : t.line, u = void 0;
|
|
1161
|
-
r.pos = 0, r.addToken =
|
|
1161
|
+
r.pos = 0, r.addToken = Yf, xr(e.display.measure) && (u = pe(o, e.doc.direction)) && (r.addToken = Qf(r.addToken, u)), r.map = [];
|
|
1162
1162
|
var c = t != e.display.externalMeasured && m(o);
|
|
1163
|
-
|
|
1163
|
+
Vf(o, r, io(e, o, c)), o.styleClasses && (o.styleClasses.bgClass && (r.bgClass = Ye(o.styleClasses.bgClass, r.bgClass || "")), o.styleClasses.textClass && (r.textClass = Ye(o.styleClasses.textClass, r.textClass || ""))), r.map.length == 0 && r.map.push(0, 0, r.content.appendChild(Ni(e.display.measure))), i == 0 ? (t.measure.map = r.map, t.measure.cache = {}) : ((t.measure.maps || (t.measure.maps = [])).push(r.map), (t.measure.caches || (t.measure.caches = [])).push({}));
|
|
1164
1164
|
}
|
|
1165
1165
|
if (k) {
|
|
1166
1166
|
var d = r.content.lastChild;
|
|
@@ -1168,13 +1168,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
return Re(e, "renderLine", e, t.line, r.pre), r.pre.className && (r.textClass = Ye(r.pre.className, r.textClass || "")), r;
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function Kf(e) {
|
|
1172
1172
|
var t = T("span", "•", "cm-invalidchar");
|
|
1173
1173
|
return t.title = "\\u" + e.charCodeAt(0).toString(16), t.setAttribute("aria-label", t.title), t;
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function Yf(e, t, n, r, i, o, u) {
|
|
1176
1176
|
if (t) {
|
|
1177
|
-
var c = e.splitSpaces ?
|
|
1177
|
+
var c = e.splitSpaces ? Zf(t, e.trailingSpace) : t, d = e.cm.state.specialChars, v = !1, x;
|
|
1178
1178
|
if (!d.test(t))
|
|
1179
1179
|
e.col += t.length, x = document.createTextNode(c), e.map.push(e.pos, e.pos + t.length, x), w && b < 9 && (v = !0), e.pos += t.length;
|
|
1180
1180
|
else {
|
|
@@ -1210,7 +1210,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1210
1210
|
e.content.appendChild(x);
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Zf(e, t) {
|
|
1214
1214
|
if (e.length > 1 && !/ /.test(e))
|
|
1215
1215
|
return e;
|
|
1216
1216
|
for (var n = t, r = "", i = 0; i < e.length; i++) {
|
|
@@ -1219,7 +1219,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
return r;
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function Qf(e, t) {
|
|
1223
1223
|
return function(n, r, i, o, u, c, d) {
|
|
1224
1224
|
i = i ? i + " cm-force-border" : "cm-force-border";
|
|
1225
1225
|
for (var v = n.pos, x = v + r.length; ; ) {
|
|
@@ -1235,7 +1235,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1235
1235
|
var i = !r && n.widgetNode;
|
|
1236
1236
|
i && e.map.push(e.pos, e.pos + t, i), !r && e.cm.display.input.needsContentAttribute && (i || (i = e.content.appendChild(document.createElement("span"))), i.setAttribute("cm-marker", n.id)), i && (e.cm.display.input.setUneditable(i), e.content.appendChild(i)), e.pos += t, e.trailingSpace = !1;
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function Vf(e, t, n) {
|
|
1239
1239
|
var r = e.markedSpans, i = e.text, o = 0;
|
|
1240
1240
|
if (!r) {
|
|
1241
1241
|
for (var u = 1; u < n.length; u += 2)
|
|
@@ -1301,7 +1301,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
1303
|
function ko(e, t, n) {
|
|
1304
|
-
this.line = t, this.rest =
|
|
1304
|
+
this.line = t, this.rest = Uf(t), this.size = this.rest ? m(ve(this.rest)) - n + 1 : 1, this.node = this.text = null, this.hidden = Cr(e, t);
|
|
1305
1305
|
}
|
|
1306
1306
|
function Bi(e, t, n) {
|
|
1307
1307
|
for (var r = [], i, o = t; o < n; o = i) {
|
|
@@ -1311,13 +1311,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1311
1311
|
return r;
|
|
1312
1312
|
}
|
|
1313
1313
|
var un = null;
|
|
1314
|
-
function
|
|
1314
|
+
function Jf(e) {
|
|
1315
1315
|
un ? un.ops.push(e) : e.ownsGroup = un = {
|
|
1316
1316
|
ops: [e],
|
|
1317
1317
|
delayedCallbacks: []
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function ec(e) {
|
|
1321
1321
|
var t = e.delayedCallbacks, n = 0;
|
|
1322
1322
|
do {
|
|
1323
1323
|
for (; n < t.length; n++)
|
|
@@ -1330,11 +1330,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
} while (n < t.length);
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function tc(e, t) {
|
|
1334
1334
|
var n = e.ownsGroup;
|
|
1335
1335
|
if (n)
|
|
1336
1336
|
try {
|
|
1337
|
-
|
|
1337
|
+
ec(n);
|
|
1338
1338
|
} finally {
|
|
1339
1339
|
un = null, t(n);
|
|
1340
1340
|
}
|
|
@@ -1344,7 +1344,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1344
1344
|
var n = or(e, t);
|
|
1345
1345
|
if (n.length) {
|
|
1346
1346
|
var r = Array.prototype.slice.call(arguments, 2), i;
|
|
1347
|
-
un ? i = un.delayedCallbacks : jn ? i = jn : (i = jn = [], setTimeout(
|
|
1347
|
+
un ? i = un.delayedCallbacks : jn ? i = jn : (i = jn = [], setTimeout(rc, 0));
|
|
1348
1348
|
for (var o = function(c) {
|
|
1349
1349
|
i.push(function() {
|
|
1350
1350
|
return n[c].apply(null, r);
|
|
@@ -1353,7 +1353,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1353
1353
|
o(u);
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function rc() {
|
|
1357
1357
|
var e = jn;
|
|
1358
1358
|
jn = null;
|
|
1359
1359
|
for (var t = 0; t < e.length; ++t)
|
|
@@ -1362,14 +1362,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1362
1362
|
function So(e, t, n, r) {
|
|
1363
1363
|
for (var i = 0; i < t.changes.length; i++) {
|
|
1364
1364
|
var o = t.changes[i];
|
|
1365
|
-
o == "text" ?
|
|
1365
|
+
o == "text" ? ic(e, t) : o == "gutter" ? To(e, t, n, r) : o == "class" ? $a(e, t) : o == "widget" && ac(e, t, r);
|
|
1366
1366
|
}
|
|
1367
1367
|
t.changes = null;
|
|
1368
1368
|
}
|
|
1369
1369
|
function Gn(e) {
|
|
1370
1370
|
return e.node == e.text && (e.node = T("div", null, null, "position: relative"), e.text.parentNode && e.text.parentNode.replaceChild(e.node, e.text), e.node.appendChild(e.text), w && b < 8 && (e.node.style.zIndex = 2)), e.node;
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function nc(e, t) {
|
|
1373
1373
|
var n = t.bgClass ? t.bgClass + " " + (t.line.bgClass || "") : t.line.bgClass;
|
|
1374
1374
|
if (n && (n += " CodeMirror-linebackground"), t.background)
|
|
1375
1375
|
n ? t.background.className = n : (t.background.parentNode.removeChild(t.background), t.background = null);
|
|
@@ -1382,12 +1382,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1382
1382
|
var n = e.display.externalMeasured;
|
|
1383
1383
|
return n && n.line == t.line ? (e.display.externalMeasured = null, t.measure = n.measure, n.built) : wo(e, t);
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function ic(e, t) {
|
|
1386
1386
|
var n = t.text.className, r = Co(e, t);
|
|
1387
1387
|
t.text == t.node && (t.node = r.pre), t.text.parentNode.replaceChild(r.pre, t.text), t.text = r.pre, r.bgClass != t.bgClass || r.textClass != t.textClass ? (t.bgClass = r.bgClass, t.textClass = r.textClass, $a(e, t)) : n && (t.text.className = n);
|
|
1388
1388
|
}
|
|
1389
1389
|
function $a(e, t) {
|
|
1390
|
-
|
|
1390
|
+
nc(e, t), t.line.wrapClass ? Gn(t).className = t.line.wrapClass : t.node != t.text && (t.node.className = "");
|
|
1391
1391
|
var n = t.textClass ? t.textClass + " " + (t.line.textClass || "") : t.line.textClass;
|
|
1392
1392
|
t.text.className = n || "";
|
|
1393
1393
|
}
|
|
@@ -1423,13 +1423,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function ac(e, t, n) {
|
|
1427
1427
|
t.alignable && (t.alignable = null);
|
|
1428
1428
|
for (var r = Se("CodeMirror-linewidget"), i = t.node.firstChild, o = void 0; i; i = o)
|
|
1429
1429
|
o = i.nextSibling, r.test(i.className) && t.node.removeChild(i);
|
|
1430
1430
|
Lo(e, t, n);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function sc(e, t, n, r) {
|
|
1433
1433
|
var i = Co(e, t);
|
|
1434
1434
|
return t.text = t.node = i.pre, i.bgClass && (t.bgClass = i.bgClass), i.textClass && (t.textClass = i.textClass), $a(e, t), To(e, t, n, r), Lo(e, t, r), t.node;
|
|
1435
1435
|
}
|
|
@@ -1442,10 +1442,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1442
1442
|
if (t.widgets)
|
|
1443
1443
|
for (var o = Gn(n), u = 0, c = t.widgets; u < c.length; ++u) {
|
|
1444
1444
|
var d = c[u], v = T("div", [d.node], "CodeMirror-linewidget" + (d.className ? " " + d.className : ""));
|
|
1445
|
-
d.handleMouseEvents || v.setAttribute("cm-ignore-events", "true"),
|
|
1445
|
+
d.handleMouseEvents || v.setAttribute("cm-ignore-events", "true"), oc(d, v, n, r), e.display.input.setUneditable(v), i && d.above ? o.insertBefore(v, n.gutter || n.text) : o.appendChild(v), Ve(d, "redraw");
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function oc(e, t, n, r) {
|
|
1449
1449
|
if (e.noHScroll) {
|
|
1450
1450
|
(n.alignable || (n.alignable = [])).push(t);
|
|
1451
1451
|
var i = r.wrapperWidth;
|
|
@@ -1491,7 +1491,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1491
1491
|
function ja(e) {
|
|
1492
1492
|
return e.display.scroller.clientHeight - Jt(e) - e.display.barHeight;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function lc(e, t, n) {
|
|
1495
1495
|
var r = e.options.lineWrapping, i = r && Fr(e);
|
|
1496
1496
|
if (!t.measure.heights || r && t.measure.width != i) {
|
|
1497
1497
|
var o = t.measure.heights = [];
|
|
@@ -1517,7 +1517,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1517
1517
|
return { map: e.measure.maps[i], cache: e.measure.caches[i], before: !0 };
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function uc(e, t) {
|
|
1521
1521
|
t = Bt(t);
|
|
1522
1522
|
var n = m(t), r = e.display.externalMeasured = new ko(e.doc, t, n);
|
|
1523
1523
|
r.lineN = n;
|
|
@@ -1536,7 +1536,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
function fn(e, t) {
|
|
1538
1538
|
var n = m(t), r = Ga(e, n);
|
|
1539
|
-
r && !r.text ? r = null : r && r.changes && (So(e, r, n, Za(e)), e.curOp.forceUpdate = !0), r || (r =
|
|
1539
|
+
r && !r.text ? r = null : r && r.changes && (So(e, r, n, Za(e)), e.curOp.forceUpdate = !0), r || (r = uc(e, t));
|
|
1540
1540
|
var i = Oo(r, t, n);
|
|
1541
1541
|
return {
|
|
1542
1542
|
line: t,
|
|
@@ -1551,7 +1551,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1551
1551
|
function er(e, t, n, r, i) {
|
|
1552
1552
|
t.before && (n = -1);
|
|
1553
1553
|
var o = n + (r || ""), u;
|
|
1554
|
-
return t.cache.hasOwnProperty(o) ? u = t.cache[o] : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || (
|
|
1554
|
+
return t.cache.hasOwnProperty(o) ? u = t.cache[o] : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || (lc(e, t.view, t.rect), t.hasHeights = !0), u = cc(e, t, n, r), u.bogus || (t.cache[o] = u)), {
|
|
1555
1555
|
left: u.left,
|
|
1556
1556
|
right: u.right,
|
|
1557
1557
|
top: i ? u.rtop : u.top,
|
|
@@ -1572,7 +1572,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
return { node: r, start: i, end: o, collapse: u, coverStart: c, coverEnd: d };
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function fc(e, t) {
|
|
1576
1576
|
var n = Do;
|
|
1577
1577
|
if (t == "left")
|
|
1578
1578
|
for (var r = 0; r < e.length && (n = e[r]).left == n.right; r++)
|
|
@@ -1582,7 +1582,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1582
1582
|
;
|
|
1583
1583
|
return n;
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function cc(e, t, n, r) {
|
|
1586
1586
|
var i = Io(t.map, n, r), o = i.node, u = i.start, c = i.end, d = i.collapse, v;
|
|
1587
1587
|
if (o.nodeType == 3) {
|
|
1588
1588
|
for (var x = 0; x < 4; x++) {
|
|
@@ -1590,11 +1590,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1590
1590
|
--u;
|
|
1591
1591
|
for (; i.coverStart + c < i.coverEnd && Ue(t.line.text.charAt(i.coverStart + c)); )
|
|
1592
1592
|
++c;
|
|
1593
|
-
if (w && b < 9 && u == 0 && c == i.coverEnd - i.coverStart ? v = o.parentNode.getBoundingClientRect() : v =
|
|
1593
|
+
if (w && b < 9 && u == 0 && c == i.coverEnd - i.coverStart ? v = o.parentNode.getBoundingClientRect() : v = fc(it(o, u, c).getClientRects(), r), v.left || v.right || u == 0)
|
|
1594
1594
|
break;
|
|
1595
1595
|
c = u, u = u - 1, d = "right";
|
|
1596
1596
|
}
|
|
1597
|
-
w && b < 11 && (v =
|
|
1597
|
+
w && b < 11 && (v = hc(e.display.measure, v));
|
|
1598
1598
|
} else {
|
|
1599
1599
|
u > 0 && (d = r = "right");
|
|
1600
1600
|
var C;
|
|
@@ -1614,7 +1614,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1614
1614
|
};
|
|
1615
1615
|
return !v.left && !v.right && (Q.bogus = !0), e.options.singleCursorHeightPerLine || (Q.rtop = _, Q.rbottom = M), Q;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function hc(e, t) {
|
|
1618
1618
|
if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !Ma(e))
|
|
1619
1619
|
return t;
|
|
1620
1620
|
var n = screen.logicalXDPI / screen.deviceXDPI, r = screen.logicalYDPI / screen.deviceYDPI;
|
|
@@ -1719,7 +1719,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1719
1719
|
return Xa(r.first + r.size - 1, V(r, o).text.length, null, 1, 1);
|
|
1720
1720
|
t < 0 && (t = 0);
|
|
1721
1721
|
for (var u = V(r, i); ; ) {
|
|
1722
|
-
var c =
|
|
1722
|
+
var c = dc(e, u, i, t, n), d = Bf(u, c.ch + (c.xRel > 0 || c.outside > 0 ? 1 : 0));
|
|
1723
1723
|
if (!d)
|
|
1724
1724
|
return c;
|
|
1725
1725
|
var v = d.find(1);
|
|
@@ -1745,11 +1745,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1745
1745
|
function Ya(e, t, n, r) {
|
|
1746
1746
|
return e.bottom <= n ? !1 : e.top > n ? !0 : (r ? e.left : e.right) > t;
|
|
1747
1747
|
}
|
|
1748
|
-
function
|
|
1748
|
+
function dc(e, t, n, r, i) {
|
|
1749
1749
|
i -= fr(t);
|
|
1750
1750
|
var o = fn(e, t), u = qa(t), c = 0, d = t.text.length, v = !0, x = pe(t, e.doc.direction);
|
|
1751
1751
|
if (x) {
|
|
1752
|
-
var C = (e.options.lineWrapping ?
|
|
1752
|
+
var C = (e.options.lineWrapping ? gc : pc)(e, t, n, o, x, r, i);
|
|
1753
1753
|
v = C.level != 1, c = v ? C.from : C.to - 1, d = v ? C.to : C.from - 1;
|
|
1754
1754
|
}
|
|
1755
1755
|
var O = null, _ = null, M = Zt(function(re) {
|
|
@@ -1766,7 +1766,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
return M = mr(t.text, M, 1), Xa(n, M, U, j, r - F);
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function pc(e, t, n, r, i, o, u) {
|
|
1770
1770
|
var c = Zt(function(C) {
|
|
1771
1771
|
var O = i[C], _ = O.level != 1;
|
|
1772
1772
|
return Ya($t(
|
|
@@ -1789,7 +1789,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
return d;
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function gc(e, t, n, r, i, o, u) {
|
|
1793
1793
|
var c = Ho(e, t, r, u), d = c.begin, v = c.end;
|
|
1794
1794
|
/\s/.test(t.text.charAt(v - 1)) && v--;
|
|
1795
1795
|
for (var x = null, C = null, O = 0; O < i.length; O++) {
|
|
@@ -1940,7 +1940,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
return { index: i, lineN: n };
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function vc(e, t, n) {
|
|
1944
1944
|
var r = e.display, i = r.view;
|
|
1945
1945
|
i.length == 0 || t >= r.viewTo || n <= r.viewFrom ? (r.view = Bi(e, t, n), r.viewFrom = t) : (r.viewFrom > t ? r.view = Bi(e, t, r.viewFrom).concat(r.view) : r.viewFrom < t && (r.view = r.view.slice(Br(e, t))), r.viewFrom = t, r.viewTo < n ? r.view = r.view.concat(Bi(e, r.viewTo, n)) : r.viewTo > n && (r.view = r.view.slice(0, Br(e, n)))), r.viewTo = n;
|
|
1946
1946
|
}
|
|
@@ -1967,7 +1967,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1967
1967
|
var x = u(e, d);
|
|
1968
1968
|
x && Ja(e, x, i);
|
|
1969
1969
|
} else (v || e.options.showCursorWhenSelecting) && Ja(e, d.head, i);
|
|
1970
|
-
v ||
|
|
1970
|
+
v || mc(e, d, o);
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
1973
1973
|
return r;
|
|
@@ -1986,7 +1986,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1986
1986
|
function qi(e, t) {
|
|
1987
1987
|
return e.top - t.top || e.left - t.left;
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function mc(e, t, n) {
|
|
1990
1990
|
var r = e.display, i = e.doc, o = document.createDocumentFragment(), u = Ao(e.display), c = u.left, d = Math.max(r.sizerWidth, Fr(e) - r.sizer.offsetLeft) - u.right, v = i.direction == "ltr";
|
|
1991
1991
|
function x(G, Q, re, J) {
|
|
1992
1992
|
Q < 0 && (Q = 0), Q = Math.round(Q), J = Math.round(J), o.appendChild(T("div", null, "CodeMirror-selected", "position: absolute; left: " + G + `px;
|
|
@@ -2092,7 +2092,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
return { from: o, to: Math.max(u, o + 1) };
|
|
2094
2094
|
}
|
|
2095
|
-
function
|
|
2095
|
+
function yc(e, t) {
|
|
2096
2096
|
if (!ze(e, "scrollCursorIntoView")) {
|
|
2097
2097
|
var n = e.display, r = n.sizer.getBoundingClientRect(), i = null, o = n.wrapper.ownerDocument;
|
|
2098
2098
|
if (t.top + r.top < 0 ? i = !0 : t.bottom + r.top > (o.defaultView.innerHeight || o.documentElement.clientHeight) && (i = !1), i != null && !E) {
|
|
@@ -2104,7 +2104,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2107
|
+
function bc(e, t, n, r) {
|
|
2108
2108
|
r == null && (r = 0);
|
|
2109
2109
|
var i;
|
|
2110
2110
|
!e.options.lineWrapping && t == n && (n = t.sticky == "before" ? I(t.line, t.ch + 1, "before") : t, t = t.ch ? I(t.line, t.sticky == "before" ? t.ch - 1 : t.ch, "after") : t);
|
|
@@ -2122,7 +2122,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
return i;
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function wc(e, t) {
|
|
2126
2126
|
var n = ns(e, t);
|
|
2127
2127
|
n.scrollTop != null && Zn(e, n.scrollTop), n.scrollLeft != null && $r(e, n.scrollLeft);
|
|
2128
2128
|
}
|
|
@@ -2152,7 +2152,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2152
2152
|
function Yn(e, t, n) {
|
|
2153
2153
|
(t != null || n != null) && Yi(e), t != null && (e.curOp.scrollLeft = t), n != null && (e.curOp.scrollTop = n);
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2155
|
+
function xc(e, t) {
|
|
2156
2156
|
Yi(e), e.curOp.scrollToPos = t;
|
|
2157
2157
|
}
|
|
2158
2158
|
function Yi(e) {
|
|
@@ -2269,7 +2269,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2269
2269
|
n == "horizontal" ? $r(e, t) : Zn(e, t);
|
|
2270
2270
|
}, e), e.display.scrollbars.addClass && Me(e.display.wrapper, e.display.scrollbars.addClass);
|
|
2271
2271
|
}
|
|
2272
|
-
var
|
|
2272
|
+
var kc = 0;
|
|
2273
2273
|
function jr(e) {
|
|
2274
2274
|
e.curOp = {
|
|
2275
2275
|
cm: e,
|
|
@@ -2299,59 +2299,59 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2299
2299
|
scrollToPos: null,
|
|
2300
2300
|
// Used to scroll to a specific position
|
|
2301
2301
|
focus: !1,
|
|
2302
|
-
id: ++
|
|
2302
|
+
id: ++kc,
|
|
2303
2303
|
// Unique ID
|
|
2304
2304
|
markArrays: null
|
|
2305
2305
|
// Used by addMarkedSpan
|
|
2306
|
-
},
|
|
2306
|
+
}, Jf(e.curOp);
|
|
2307
2307
|
}
|
|
2308
2308
|
function Gr(e) {
|
|
2309
2309
|
var t = e.curOp;
|
|
2310
|
-
t &&
|
|
2310
|
+
t && tc(t, function(n) {
|
|
2311
2311
|
for (var r = 0; r < n.ops.length; r++)
|
|
2312
2312
|
n.ops[r].cm.curOp = null;
|
|
2313
|
-
|
|
2313
|
+
Sc(n);
|
|
2314
2314
|
});
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function Sc(e) {
|
|
2317
2317
|
for (var t = e.ops, n = 0; n < t.length; n++)
|
|
2318
|
-
|
|
2318
|
+
Cc(t[n]);
|
|
2319
2319
|
for (var r = 0; r < t.length; r++)
|
|
2320
|
-
|
|
2320
|
+
Tc(t[r]);
|
|
2321
2321
|
for (var i = 0; i < t.length; i++)
|
|
2322
|
-
|
|
2322
|
+
Lc(t[i]);
|
|
2323
2323
|
for (var o = 0; o < t.length; o++)
|
|
2324
|
-
|
|
2324
|
+
_c(t[o]);
|
|
2325
2325
|
for (var u = 0; u < t.length; u++)
|
|
2326
|
-
|
|
2326
|
+
Ac(t[u]);
|
|
2327
2327
|
}
|
|
2328
|
-
function
|
|
2328
|
+
function Cc(e) {
|
|
2329
2329
|
var t = e.cm, n = t.display;
|
|
2330
|
-
|
|
2330
|
+
Ec(t), e.updateMaxLine && Ba(t), e.mustUpdate = e.viewChanged || e.forceUpdate || e.scrollTop != null || e.scrollToPos && (e.scrollToPos.from.line < n.viewFrom || e.scrollToPos.to.line >= n.viewTo) || n.maxLineChanged && t.options.lineWrapping, e.update = e.mustUpdate && new Zi(t, e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos }, e.forceUpdate);
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2332
|
+
function Tc(e) {
|
|
2333
2333
|
e.updatedDisplay = e.mustUpdate && as(e.cm, e.update);
|
|
2334
2334
|
}
|
|
2335
|
-
function
|
|
2335
|
+
function Lc(e) {
|
|
2336
2336
|
var t = e.cm, n = t.display;
|
|
2337
2337
|
e.updatedDisplay && Xi(t), e.barMeasure = Qn(t), n.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo = Eo(t, n.maxLine, n.maxLine.text.length).left + 3, t.display.sizerWidth = e.adjustWidthTo, e.barMeasure.scrollWidth = Math.max(n.scroller.clientWidth, n.sizer.offsetLeft + e.adjustWidthTo + Jt(t) + t.display.barWidth), e.maxScrollLeft = Math.max(0, n.sizer.offsetLeft + e.adjustWidthTo - Fr(t))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = n.input.prepareSelection());
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function _c(e) {
|
|
2340
2340
|
var t = e.cm;
|
|
2341
2341
|
e.adjustWidthTo != null && (t.display.sizer.style.minWidth = e.adjustWidthTo + "px", e.maxScrollLeft < t.doc.scrollLeft && $r(t, Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), !0), t.display.maxLineChanged = !1);
|
|
2342
2342
|
var n = e.focus && e.focus == $e(Rt(t));
|
|
2343
2343
|
e.preparedSelection && t.display.input.showSelection(e.preparedSelection, n), (e.updatedDisplay || e.startHeight != t.doc.height) && gn(t, e.barMeasure), e.updatedDisplay && ls(t, e.barMeasure), e.selectionChanged && es(t), t.state.focused && e.updateInput && t.display.input.reset(e.typing), n && jo(e.cm);
|
|
2344
2344
|
}
|
|
2345
|
-
function
|
|
2345
|
+
function Ac(e) {
|
|
2346
2346
|
var t = e.cm, n = t.display, r = t.doc;
|
|
2347
2347
|
if (e.updatedDisplay && Qo(t, e.update), n.wheelStartX != null && (e.scrollTop != null || e.scrollLeft != null || e.scrollToPos) && (n.wheelStartX = n.wheelStartY = null), e.scrollTop != null && Xo(t, e.scrollTop, e.forceScroll), e.scrollLeft != null && $r(t, e.scrollLeft, !0, !0), e.scrollToPos) {
|
|
2348
|
-
var i =
|
|
2348
|
+
var i = bc(
|
|
2349
2349
|
t,
|
|
2350
2350
|
ae(r, e.scrollToPos.from),
|
|
2351
2351
|
ae(r, e.scrollToPos.to),
|
|
2352
2352
|
e.scrollToPos.margin
|
|
2353
2353
|
);
|
|
2354
|
-
|
|
2354
|
+
yc(t, i);
|
|
2355
2355
|
}
|
|
2356
2356
|
var o = e.maybeHiddenMarkers, u = e.maybeUnhiddenMarkers;
|
|
2357
2357
|
if (o)
|
|
@@ -2410,9 +2410,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2410
2410
|
};
|
|
2411
2411
|
}
|
|
2412
2412
|
function Jn(e, t) {
|
|
2413
|
-
e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(t, ie(
|
|
2413
|
+
e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(t, ie(Oc, e));
|
|
2414
2414
|
}
|
|
2415
|
-
function
|
|
2415
|
+
function Oc(e) {
|
|
2416
2416
|
var t = e.doc;
|
|
2417
2417
|
if (!(t.highlightFrontier >= e.display.viewTo)) {
|
|
2418
2418
|
var n = +/* @__PURE__ */ new Date() + e.options.workTime, r = $n(e, t.highlightFrontier), i = [];
|
|
@@ -2445,11 +2445,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2445
2445
|
for (var e = 0; e < this.events.length; e++)
|
|
2446
2446
|
Re.apply(null, this.events[e]);
|
|
2447
2447
|
};
|
|
2448
|
-
function
|
|
2448
|
+
function Ec(e) {
|
|
2449
2449
|
var t = e.display;
|
|
2450
2450
|
!t.scrollbarsClipped && t.scroller.offsetWidth && (t.nativeBarWidth = t.scroller.offsetWidth - t.scroller.clientWidth, t.heightForcer.style.height = Jt(e) + "px", t.sizer.style.marginBottom = -t.nativeBarWidth + "px", t.sizer.style.borderRightWidth = Jt(e) + "px", t.scrollbarsClipped = !0);
|
|
2451
2451
|
}
|
|
2452
|
-
function
|
|
2452
|
+
function Dc(e) {
|
|
2453
2453
|
if (e.hasFocus())
|
|
2454
2454
|
return null;
|
|
2455
2455
|
var t = $e(Rt(e));
|
|
@@ -2462,7 +2462,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
return n;
|
|
2464
2464
|
}
|
|
2465
|
-
function
|
|
2465
|
+
function Ic(e) {
|
|
2466
2466
|
if (!(!e || !e.activeElt || e.activeElt == $e(Ze(e.activeElt))) && (e.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e.anchorNode && Ke(document.body, e.anchorNode) && Ke(document.body, e.focusNode))) {
|
|
2467
2467
|
var t = e.activeElt.ownerDocument, n = t.defaultView.getSelection(), r = t.createRange();
|
|
2468
2468
|
r.setEnd(e.anchorNode, e.anchorOffset), r.collapse(!1), n.removeAllRanges(), n.addRange(r), n.extend(e.focusNode, e.focusOffset);
|
|
@@ -2478,12 +2478,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2478
2478
|
var i = r.first + r.size, o = Math.max(t.visible.from - e.options.viewportMargin, r.first), u = Math.min(i, t.visible.to + e.options.viewportMargin);
|
|
2479
2479
|
n.viewFrom < o && o - n.viewFrom < 20 && (o = Math.max(r.first, n.viewFrom)), n.viewTo > u && n.viewTo - u < 20 && (u = Math.min(i, n.viewTo)), ur && (o = Ha(e.doc, o), u = yo(e.doc, u));
|
|
2480
2480
|
var c = o != n.viewFrom || u != n.viewTo || n.lastWrapHeight != t.wrapperHeight || n.lastWrapWidth != t.wrapperWidth;
|
|
2481
|
-
|
|
2481
|
+
vc(e, o, u), n.viewOffset = fr(V(e.doc, n.viewFrom)), e.display.mover.style.top = n.viewOffset + "px";
|
|
2482
2482
|
var d = $o(e);
|
|
2483
2483
|
if (!c && d == 0 && !t.force && n.renderedView == n.view && (n.updateLineNumbers == null || n.updateLineNumbers >= n.viewTo))
|
|
2484
2484
|
return !1;
|
|
2485
|
-
var v =
|
|
2486
|
-
return d > 4 && (n.lineDiv.style.display = "none"),
|
|
2485
|
+
var v = Dc(e);
|
|
2486
|
+
return d > 4 && (n.lineDiv.style.display = "none"), Nc(e, n.updateLineNumbers, t.dims), d > 4 && (n.lineDiv.style.display = ""), n.renderedView = n.view, Ic(v), W(n.cursorDiv), W(n.selectionDiv), n.gutters.style.height = n.sizer.style.minHeight = 0, c && (n.lastWrapHeight = t.wrapperHeight, n.lastWrapWidth = t.wrapperWidth, Jn(e, 400)), n.updateLineNumbers = null, !0;
|
|
2487
2487
|
}
|
|
2488
2488
|
function Qo(e, t) {
|
|
2489
2489
|
for (var n = t.viewport, r = !0; ; r = !1) {
|
|
@@ -2507,7 +2507,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2507
2507
|
Kn(e), gn(e, r), ls(e, r), n.finish();
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2510
|
+
function Nc(e, t, n) {
|
|
2511
2511
|
var r = e.display, i = e.options.lineNumbers, o = r.lineDiv, u = o.firstChild;
|
|
2512
2512
|
function c(M) {
|
|
2513
2513
|
var F = M.nextSibling;
|
|
@@ -2516,7 +2516,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2516
2516
|
for (var d = r.view, v = r.viewFrom, x = 0; x < d.length; x++) {
|
|
2517
2517
|
var C = d[x];
|
|
2518
2518
|
if (!C.hidden) if (!C.node || C.node.parentNode != o) {
|
|
2519
|
-
var O =
|
|
2519
|
+
var O = sc(e, C, v, n);
|
|
2520
2520
|
o.insertBefore(O, u);
|
|
2521
2521
|
} else {
|
|
2522
2522
|
for (; u != C.node; )
|
|
@@ -2588,7 +2588,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2588
2588
|
function ei(e) {
|
|
2589
2589
|
el(e.display), vt(e), Vo(e);
|
|
2590
2590
|
}
|
|
2591
|
-
function
|
|
2591
|
+
function Mc(e, t, n, r) {
|
|
2592
2592
|
var i = this;
|
|
2593
2593
|
this.input = n, i.scrollbarFiller = T("div", null, "CodeMirror-scrollbar-filler"), i.scrollbarFiller.setAttribute("cm-not-content", "true"), i.gutterFiller = T("div", null, "CodeMirror-gutter-filler"), i.gutterFiller.setAttribute("cm-not-content", "true"), i.lineDiv = ft("div", null, "CodeMirror-code"), i.selectionDiv = T("div", null, null, "position: relative; z-index: 1"), i.cursorDiv = T("div", null, "CodeMirror-cursors"), i.measure = T("div", null, "CodeMirror-measure"), i.lineMeasure = T("div", null, "CodeMirror-measure"), i.lineSpace = ft(
|
|
2594
2594
|
"div",
|
|
@@ -2605,7 +2605,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2605
2605
|
var t = e.wheelDeltaX, n = e.wheelDeltaY;
|
|
2606
2606
|
return t == null && e.detail && e.axis == e.HORIZONTAL_AXIS && (t = e.detail), n == null && e.detail && e.axis == e.VERTICAL_AXIS ? n = e.detail : n == null && (n = e.wheelDelta), { x: t, y: n };
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2608
|
+
function Rc(e) {
|
|
2609
2609
|
var t = tl(e);
|
|
2610
2610
|
return t.x *= hr, t.y *= hr, t;
|
|
2611
2611
|
}
|
|
@@ -2729,7 +2729,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2729
2729
|
function il(e, t, n) {
|
|
2730
2730
|
return e.line == t.line ? I(n.line, e.ch - t.ch + n.ch) : I(n.line + (e.line - t.line), e.ch);
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function zc(e, t, n) {
|
|
2733
2733
|
for (var r = [], i = I(e.first, 0), o = i, u = 0; u < t.length; u++) {
|
|
2734
2734
|
var c = t[u], d = il(c.from, i, o), v = il(Ar(c), i, o);
|
|
2735
2735
|
if (i = c.to, o = v, n == "around") {
|
|
@@ -2756,7 +2756,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2756
2756
|
return n ? n[K] : null;
|
|
2757
2757
|
}
|
|
2758
2758
|
function o(K, G, Q) {
|
|
2759
|
-
|
|
2759
|
+
jf(K, G, Q, r), Ve(K, "change", K, t);
|
|
2760
2760
|
}
|
|
2761
2761
|
function u(K, G) {
|
|
2762
2762
|
for (var Q = [], re = K; re < G; ++re)
|
|
@@ -2806,7 +2806,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2806
2806
|
function ol(e) {
|
|
2807
2807
|
(e.doc.direction == "rtl" ? Me : ut)(e.display.lineDiv, "CodeMirror-rtl");
|
|
2808
2808
|
}
|
|
2809
|
-
function
|
|
2809
|
+
function Pc(e) {
|
|
2810
2810
|
kt(e, function() {
|
|
2811
2811
|
ol(e), vt(e);
|
|
2812
2812
|
});
|
|
@@ -2829,7 +2829,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2829
2829
|
break;
|
|
2830
2830
|
}
|
|
2831
2831
|
}
|
|
2832
|
-
function
|
|
2832
|
+
function Fc(e, t) {
|
|
2833
2833
|
if (t)
|
|
2834
2834
|
return ll(e.done), ve(e.done);
|
|
2835
2835
|
if (e.done.length && !ve(e.done).ranges)
|
|
@@ -2841,7 +2841,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2841
2841
|
var i = e.history;
|
|
2842
2842
|
i.undone.length = 0;
|
|
2843
2843
|
var o = +/* @__PURE__ */ new Date(), u, c;
|
|
2844
|
-
if ((i.lastOp == r || i.lastOrigin == t.origin && t.origin && (t.origin.charAt(0) == "+" && i.lastModTime > o - (e.cm ? e.cm.options.historyEventDelay : 500) || t.origin.charAt(0) == "*")) && (u =
|
|
2844
|
+
if ((i.lastOp == r || i.lastOrigin == t.origin && t.origin && (t.origin.charAt(0) == "+" && i.lastModTime > o - (e.cm ? e.cm.options.historyEventDelay : 500) || t.origin.charAt(0) == "*")) && (u = Fc(i, i.lastOp == r)))
|
|
2845
2845
|
c = ve(u.changes), X(t.from, t.to) == 0 && X(t.from, c.to) == 0 ? c.to = Ar(t) : u.changes.push(ds(e, t));
|
|
2846
2846
|
else {
|
|
2847
2847
|
var d = ve(i.done);
|
|
@@ -2853,13 +2853,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2853
2853
|
}
|
|
2854
2854
|
i.done.push(n), i.generation = ++i.maxGeneration, i.lastModTime = i.lastSelTime = o, i.lastOp = i.lastSelOp = r, i.lastOrigin = i.lastSelOrigin = t.origin, c || Re(e, "historyAdded");
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2856
|
+
function Hc(e, t, n, r) {
|
|
2857
2857
|
var i = t.charAt(0);
|
|
2858
2858
|
return i == "*" || i == "+" && n.ranges.length == r.ranges.length && n.somethingSelected() == r.somethingSelected() && /* @__PURE__ */ new Date() - e.history.lastSelTime <= (e.cm ? e.cm.options.historyEventDelay : 500);
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function Wc(e, t, n, r) {
|
|
2861
2861
|
var i = e.history, o = r && r.origin;
|
|
2862
|
-
n == i.lastSelOp || o && i.lastSelOrigin == o && (i.lastModTime == i.lastSelTime && i.lastOrigin == o ||
|
|
2862
|
+
n == i.lastSelOp || o && i.lastSelOrigin == o && (i.lastModTime == i.lastSelTime && i.lastOrigin == o || Hc(e, o, ve(i.done), t)) ? i.done[i.done.length - 1] = t : Ji(t, i.done), i.lastSelTime = +/* @__PURE__ */ new Date(), i.lastSelOrigin = o, i.lastSelOp = n, r && r.clearRedo !== !1 && ll(i.undone);
|
|
2863
2863
|
}
|
|
2864
2864
|
function Ji(e, t) {
|
|
2865
2865
|
var n = ve(t);
|
|
@@ -2871,23 +2871,23 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2871
2871
|
u.markedSpans && ((i || (i = t["spans_" + e.id] = {}))[o] = u.markedSpans), ++o;
|
|
2872
2872
|
});
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function Bc(e) {
|
|
2875
2875
|
if (!e)
|
|
2876
2876
|
return null;
|
|
2877
2877
|
for (var t, n = 0; n < e.length; ++n)
|
|
2878
2878
|
e[n].marker.explicitlyCleared ? t || (t = e.slice(0, n)) : t && t.push(e[n]);
|
|
2879
2879
|
return t ? t.length ? t : null : e;
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2881
|
+
function $c(e, t) {
|
|
2882
2882
|
var n = t["spans_" + e.id];
|
|
2883
2883
|
if (!n)
|
|
2884
2884
|
return null;
|
|
2885
2885
|
for (var r = [], i = 0; i < t.text.length; ++i)
|
|
2886
|
-
r.push(
|
|
2886
|
+
r.push(Bc(n[i]));
|
|
2887
2887
|
return r;
|
|
2888
2888
|
}
|
|
2889
2889
|
function cl(e, t) {
|
|
2890
|
-
var n =
|
|
2890
|
+
var n = $c(e, t), r = Pa(e, t);
|
|
2891
2891
|
if (!n)
|
|
2892
2892
|
return r;
|
|
2893
2893
|
if (!r)
|
|
@@ -2950,7 +2950,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2950
2950
|
function dl(e, t, n, r) {
|
|
2951
2951
|
ot(e, _r(t, n), r);
|
|
2952
2952
|
}
|
|
2953
|
-
function
|
|
2953
|
+
function Uc(e, t, n) {
|
|
2954
2954
|
var r = {
|
|
2955
2955
|
ranges: t.ranges,
|
|
2956
2956
|
update: function(i) {
|
|
@@ -2970,10 +2970,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2970
2970
|
i && i.ranges ? (r[r.length - 1] = t, ta(e, t, n)) : ot(e, t, n);
|
|
2971
2971
|
}
|
|
2972
2972
|
function ot(e, t, n) {
|
|
2973
|
-
ta(e, t, n),
|
|
2973
|
+
ta(e, t, n), Wc(e, e.sel, e.cm ? e.cm.curOp.id : NaN, n);
|
|
2974
2974
|
}
|
|
2975
2975
|
function ta(e, t, n) {
|
|
2976
|
-
(xt(e, "beforeSelectionChange") || e.cm && xt(e.cm, "beforeSelectionChange")) && (t =
|
|
2976
|
+
(xt(e, "beforeSelectionChange") || e.cm && xt(e.cm, "beforeSelectionChange")) && (t = Uc(e, t, n));
|
|
2977
2977
|
var r = n && n.bias || (X(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1);
|
|
2978
2978
|
gl(e, ml(e, t, r, !0)), !(n && n.scroll === !1) && e.cm && e.cm.getOption("readOnly") != "nocursor" && pn(e.cm);
|
|
2979
2979
|
}
|
|
@@ -3048,7 +3048,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3048
3048
|
return;
|
|
3049
3049
|
}
|
|
3050
3050
|
if (!((xt(e, "beforeChange") || e.cm && xt(e.cm, "beforeChange")) && (t = wl(e, t, !0), !t))) {
|
|
3051
|
-
var r = fo && !n &&
|
|
3051
|
+
var r = fo && !n && Wf(e, t.from, t.to);
|
|
3052
3052
|
if (r)
|
|
3053
3053
|
for (var i = r.length - 1; i >= 0; --i)
|
|
3054
3054
|
xl(e, { from: r[i].from, to: r[i].to, text: i ? [""] : t.text, origin: t.origin });
|
|
@@ -3139,10 +3139,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3139
3139
|
to: I(o, V(e, o).text.length),
|
|
3140
3140
|
text: [t.text[0]],
|
|
3141
3141
|
origin: t.origin
|
|
3142
|
-
}), t.removed = lr(e, t.from, t.to), n || (n = fs(e, t)), e.cm ?
|
|
3142
|
+
}), t.removed = lr(e, t.from, t.to), n || (n = fs(e, t)), e.cm ? jc(e.cm, t, r) : hs(e, t, r), ta(e, n, Tt), e.cantEdit && ra(e, I(e.firstLine(), 0)) && (e.cantEdit = !1);
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function jc(e, t, n) {
|
|
3146
3146
|
var r = e.doc, i = e.display, o = t.from, u = t.to, c = !1, d = o.line;
|
|
3147
3147
|
e.options.lineWrapping || (d = m(Bt(V(r, o.line))), r.iter(d, u.line + 1, function(_) {
|
|
3148
3148
|
if (_ == i.maxLine)
|
|
@@ -3150,7 +3150,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3150
3150
|
})), r.sel.contains(t.from, t.to) > -1 && Dt(e), hs(r, t, n, Bo(e)), e.options.lineWrapping || (r.iter(d, o.line + t.text.length, function(_) {
|
|
3151
3151
|
var M = Wi(_);
|
|
3152
3152
|
M > i.maxLineLength && (i.maxLine = _, i.maxLineLength = M, i.maxLineChanged = !0, c = !1);
|
|
3153
|
-
}), c && (e.curOp.updateMaxLine = !0)),
|
|
3153
|
+
}), c && (e.curOp.updateMaxLine = !0)), Nf(r, o.line), Jn(e, 400);
|
|
3154
3154
|
var v = t.text.length - (u.line - o.line) - 1;
|
|
3155
3155
|
t.full ? vt(e) : o.line == u.line && t.text.length == 1 && !al(e.doc, t) ? Tr(e, o.line, "text") : vt(e, o.line, u.line + 1, v);
|
|
3156
3156
|
var x = xt(e, "changes"), C = xt(e, "change");
|
|
@@ -3216,7 +3216,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3216
3216
|
removeInner: function(e, t) {
|
|
3217
3217
|
for (var n = e, r = e + t; n < r; ++n) {
|
|
3218
3218
|
var i = this.lines[n];
|
|
3219
|
-
this.height -= i.height,
|
|
3219
|
+
this.height -= i.height, Gf(i), Ve(i, "delete");
|
|
3220
3220
|
}
|
|
3221
3221
|
this.lines.splice(e, t);
|
|
3222
3222
|
},
|
|
@@ -3350,7 +3350,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3350
3350
|
function Ll(e, t, n) {
|
|
3351
3351
|
fr(t) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && is(e, n);
|
|
3352
3352
|
}
|
|
3353
|
-
function
|
|
3353
|
+
function Gc(e, t, n, r) {
|
|
3354
3354
|
var i = new si(e, n, r), o = e.cm;
|
|
3355
3355
|
return o && i.noHScroll && (o.display.alignWidgets = !0), ni(e, t, "widget", function(u) {
|
|
3356
3356
|
var c = u.widgets || (u.widgets = []);
|
|
@@ -3373,7 +3373,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3373
3373
|
}
|
|
3374
3374
|
for (var r = null, i = null, o = 0; o < this.lines.length; ++o) {
|
|
3375
3375
|
var u = this.lines[o], c = Un(u.markedSpans, this);
|
|
3376
|
-
e && !this.collapsed ? Tr(e, m(u), "text") : e && (c.to != null && (i = m(u)), c.from != null && (r = m(u))), u.markedSpans =
|
|
3376
|
+
e && !this.collapsed ? Tr(e, m(u), "text") : e && (c.to != null && (i = m(u)), c.from != null && (r = m(u))), u.markedSpans = zf(u.markedSpans, c), c.from == null && this.collapsed && !Cr(this.doc, u) && e && _t(u, cn(e.display));
|
|
3377
3377
|
}
|
|
3378
3378
|
if (e && this.collapsed && !e.options.lineWrapping)
|
|
3379
3379
|
for (var d = 0; d < this.lines.length; ++d) {
|
|
@@ -3418,7 +3418,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3418
3418
|
}, zt(Er);
|
|
3419
3419
|
function wn(e, t, n, r, i) {
|
|
3420
3420
|
if (r && r.shared)
|
|
3421
|
-
return
|
|
3421
|
+
return qc(e, t, n, r, i);
|
|
3422
3422
|
if (e.cm && !e.cm.curOp)
|
|
3423
3423
|
return Je(e.cm, wn)(e, t, n, r, i);
|
|
3424
3424
|
var o = new Er(e, i), u = X(t, n);
|
|
@@ -3427,12 +3427,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3427
3427
|
if (o.replacedWith && (o.collapsed = !0, o.widgetNode = ft("span", [o.replacedWith], "CodeMirror-widget"), r.handleMouseEvents || o.widgetNode.setAttribute("cm-ignore-events", "true"), r.insertLeft && (o.widgetNode.insertLeft = !0)), o.collapsed) {
|
|
3428
3428
|
if (mo(e, t.line, t, n, o) || t.line != n.line && mo(e, n.line, t, n, o))
|
|
3429
3429
|
throw new Error("Inserting collapsed marker partially overlapping an existing one");
|
|
3430
|
-
|
|
3430
|
+
Rf();
|
|
3431
3431
|
}
|
|
3432
3432
|
o.addToHistory && ul(e, { from: t, to: n, origin: "markText" }, e.sel, NaN);
|
|
3433
3433
|
var c = t.line, d = e.cm, v;
|
|
3434
3434
|
if (e.iter(c, n.line + 1, function(C) {
|
|
3435
|
-
d && o.collapsed && !d.options.lineWrapping && Bt(C) == d.display.maxLine && (v = !0), o.collapsed && c != t.line && _t(C, 0),
|
|
3435
|
+
d && o.collapsed && !d.options.lineWrapping && Bt(C) == d.display.maxLine && (v = !0), o.collapsed && c != t.line && _t(C, 0), Pf(C, new zi(
|
|
3436
3436
|
o,
|
|
3437
3437
|
c == t.line ? t.ch : null,
|
|
3438
3438
|
c == n.line ? n.ch : null
|
|
@@ -3441,7 +3441,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3441
3441
|
Cr(e, C) && _t(C, 0);
|
|
3442
3442
|
}), o.clearOnEnter && te(o, "beforeCursorEnter", function() {
|
|
3443
3443
|
return o.clear();
|
|
3444
|
-
}), o.readOnly && (
|
|
3444
|
+
}), o.readOnly && (Mf(), (e.history.done.length || e.history.undone.length) && e.clearHistory()), o.collapsed && (o.id = ++_l, o.atomic = !0), d) {
|
|
3445
3445
|
if (v && (d.curOp.updateMaxLine = !0), o.collapsed)
|
|
3446
3446
|
vt(d, t.line, n.line + 1);
|
|
3447
3447
|
else if (o.className || o.startStyle || o.endStyle || o.css || o.attributes || o.title)
|
|
@@ -3466,7 +3466,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3466
3466
|
}, oi.prototype.find = function(e, t) {
|
|
3467
3467
|
return this.primary.find(e, t);
|
|
3468
3468
|
}, zt(oi);
|
|
3469
|
-
function
|
|
3469
|
+
function qc(e, t, n, r, i) {
|
|
3470
3470
|
r = he(r), r.shared = !1;
|
|
3471
3471
|
var o = [wn(e, t, n, r, i)], u = o[0], c = r.widgetNode;
|
|
3472
3472
|
return Or(e, function(d) {
|
|
@@ -3482,7 +3482,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3482
3482
|
return t.parent;
|
|
3483
3483
|
});
|
|
3484
3484
|
}
|
|
3485
|
-
function
|
|
3485
|
+
function Xc(e, t) {
|
|
3486
3486
|
for (var n = 0; n < t.length; n++) {
|
|
3487
3487
|
var r = t[n], i = r.find(), o = e.clipPos(i.from), u = e.clipPos(i.to);
|
|
3488
3488
|
if (X(o, u)) {
|
|
@@ -3491,7 +3491,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
}
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3494
|
+
function Kc(e) {
|
|
3495
3495
|
for (var t = function(r) {
|
|
3496
3496
|
var i = e[r], o = [i.primary.doc];
|
|
3497
3497
|
Or(i.primary.doc, function(d) {
|
|
@@ -3503,12 +3503,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
}, n = 0; n < e.length; n++) t(n);
|
|
3505
3505
|
}
|
|
3506
|
-
var
|
|
3506
|
+
var Yc = 0, mt = function(e, t, n, r, i) {
|
|
3507
3507
|
if (!(this instanceof mt))
|
|
3508
3508
|
return new mt(e, t, n, r, i);
|
|
3509
3509
|
n == null && (n = 0), ai.call(this, [new ii([new ln("", null)])]), this.first = n, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = n;
|
|
3510
3510
|
var o = I(n, 0);
|
|
3511
|
-
this.sel = _r(o), this.history = new Vi(null), this.id = ++
|
|
3511
|
+
this.sel = _r(o), this.history = new Vi(null), this.id = ++Yc, this.modeOption = t, this.lineSep = r, this.direction = i == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof e == "string" && (e = this.splitLines(e)), hs(this, { from: o, to: o, text: e }), ot(this, _r(o), Tt);
|
|
3512
3512
|
};
|
|
3513
3513
|
mt.prototype = Ei(ai.prototype, {
|
|
3514
3514
|
constructor: mt,
|
|
@@ -3641,7 +3641,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3641
3641
|
var u = i.ranges[o];
|
|
3642
3642
|
r[o] = { from: u.from(), to: u.to(), text: this.splitLines(e[o]), origin: n };
|
|
3643
3643
|
}
|
|
3644
|
-
for (var c = t && t != "end" &&
|
|
3644
|
+
for (var c = t && t != "end" && zc(this, r, t), d = r.length - 1; d >= 0; d--)
|
|
3645
3645
|
yn(this, r[d]);
|
|
3646
3646
|
c ? pl(this, c) : this.cm && pn(this.cm);
|
|
3647
3647
|
}),
|
|
@@ -3758,7 +3758,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3758
3758
|
});
|
|
3759
3759
|
}),
|
|
3760
3760
|
addLineWidget: et(function(e, t, n) {
|
|
3761
|
-
return
|
|
3761
|
+
return Gc(this, e, t, n);
|
|
3762
3762
|
}),
|
|
3763
3763
|
removeLineWidget: function(e) {
|
|
3764
3764
|
e.clear();
|
|
@@ -3842,14 +3842,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3842
3842
|
var t = this.first, n = this.first + this.size;
|
|
3843
3843
|
e.from != null && e.from > t && (t = e.from), e.to != null && e.to < n && (n = e.to);
|
|
3844
3844
|
var r = new mt(Bn(this, t, n), e.mode || this.modeOption, t, this.lineSep, this.direction);
|
|
3845
|
-
return e.sharedHist && (r.history = this.history), (this.linked || (this.linked = [])).push({ doc: r, sharedHist: e.sharedHist }), r.linked = [{ doc: this, isParent: !0, sharedHist: e.sharedHist }],
|
|
3845
|
+
return e.sharedHist && (r.history = this.history), (this.linked || (this.linked = [])).push({ doc: r, sharedHist: e.sharedHist }), r.linked = [{ doc: this, isParent: !0, sharedHist: e.sharedHist }], Xc(r, Al(this)), r;
|
|
3846
3846
|
},
|
|
3847
3847
|
unlinkDoc: function(e) {
|
|
3848
3848
|
if (e instanceof Ee && (e = e.doc), this.linked)
|
|
3849
3849
|
for (var t = 0; t < this.linked.length; ++t) {
|
|
3850
3850
|
var n = this.linked[t];
|
|
3851
3851
|
if (n.doc == e) {
|
|
3852
|
-
this.linked.splice(t, 1), e.unlinkDoc(this),
|
|
3852
|
+
this.linked.splice(t, 1), e.unlinkDoc(this), Kc(Al(this));
|
|
3853
3853
|
break;
|
|
3854
3854
|
}
|
|
3855
3855
|
}
|
|
@@ -3879,11 +3879,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3879
3879
|
setDirection: et(function(e) {
|
|
3880
3880
|
e != "rtl" && (e = "ltr"), e != this.direction && (this.direction = e, this.iter(function(t) {
|
|
3881
3881
|
return t.order = null;
|
|
3882
|
-
}), this.cm &&
|
|
3882
|
+
}), this.cm && Pc(this.cm));
|
|
3883
3883
|
})
|
|
3884
3884
|
}), mt.prototype.eachLine = mt.prototype.iter;
|
|
3885
3885
|
var Ol = 0;
|
|
3886
|
-
function
|
|
3886
|
+
function Zc(e) {
|
|
3887
3887
|
var t = this;
|
|
3888
3888
|
if (El(t), !(ze(t, e) || cr(t.display, e))) {
|
|
3889
3889
|
st(e), w && (Ol = +/* @__PURE__ */ new Date());
|
|
@@ -3944,7 +3944,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
|
-
function
|
|
3947
|
+
function Qc(e, t) {
|
|
3948
3948
|
if (w && (!e.state.draggingText || +/* @__PURE__ */ new Date() - Ol < 100)) {
|
|
3949
3949
|
wr(t);
|
|
3950
3950
|
return;
|
|
@@ -3954,7 +3954,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3954
3954
|
n.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", P && (n.width = n.height = 1, e.display.wrapper.appendChild(n), n._top = n.offsetTop), t.dataTransfer.setDragImage(n, 0, 0), P && n.parentNode.removeChild(n);
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function Vc(e, t) {
|
|
3958
3958
|
var n = Wr(e, t);
|
|
3959
3959
|
if (n) {
|
|
3960
3960
|
var r = document.createDocumentFragment();
|
|
@@ -3977,20 +3977,20 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3977
3977
|
}
|
|
3978
3978
|
}
|
|
3979
3979
|
var Il = !1;
|
|
3980
|
-
function
|
|
3981
|
-
Il || (
|
|
3980
|
+
function Jc() {
|
|
3981
|
+
Il || (eh(), Il = !0);
|
|
3982
3982
|
}
|
|
3983
|
-
function
|
|
3983
|
+
function eh() {
|
|
3984
3984
|
var e;
|
|
3985
3985
|
te(window, "resize", function() {
|
|
3986
3986
|
e == null && (e = setTimeout(function() {
|
|
3987
|
-
e = null, Dl(
|
|
3987
|
+
e = null, Dl(th);
|
|
3988
3988
|
}, 100));
|
|
3989
3989
|
}), te(window, "blur", function() {
|
|
3990
3990
|
return Dl(dn);
|
|
3991
3991
|
});
|
|
3992
3992
|
}
|
|
3993
|
-
function
|
|
3993
|
+
function th(e) {
|
|
3994
3994
|
var t = e.display;
|
|
3995
3995
|
t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null, t.scrollbarsClipped = !1, e.setSize();
|
|
3996
3996
|
}
|
|
@@ -4151,7 +4151,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4151
4151
|
"Ctrl-Down": "goDocEnd",
|
|
4152
4152
|
fallthrough: ["basic", "emacsy"]
|
|
4153
4153
|
}, dr.default = Z ? dr.macDefault : dr.pcDefault;
|
|
4154
|
-
function
|
|
4154
|
+
function rh(e) {
|
|
4155
4155
|
var t = e.split(/-(?!$)/);
|
|
4156
4156
|
e = t[t.length - 1];
|
|
4157
4157
|
for (var n, r, i, o, u = 0; u < t.length - 1; u++) {
|
|
@@ -4169,7 +4169,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4169
4169
|
}
|
|
4170
4170
|
return n && (e = "Alt-" + e), r && (e = "Ctrl-" + e), o && (e = "Cmd-" + e), i && (e = "Shift-" + e), e;
|
|
4171
4171
|
}
|
|
4172
|
-
function
|
|
4172
|
+
function nh(e) {
|
|
4173
4173
|
var t = {};
|
|
4174
4174
|
for (var n in e)
|
|
4175
4175
|
if (e.hasOwnProperty(n)) {
|
|
@@ -4180,7 +4180,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4180
4180
|
delete e[n];
|
|
4181
4181
|
continue;
|
|
4182
4182
|
}
|
|
4183
|
-
for (var i = Rr(n.split(" "),
|
|
4183
|
+
for (var i = Rr(n.split(" "), rh), o = 0; o < i.length; o++) {
|
|
4184
4184
|
var u = void 0, c = void 0;
|
|
4185
4185
|
o == i.length - 1 ? (c = i.join(" "), u = r) : (c = i.slice(0, o + 1).join(" "), u = "...");
|
|
4186
4186
|
var d = t[c];
|
|
@@ -4276,7 +4276,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4276
4276
|
}
|
|
4277
4277
|
return new I(r, i < 0 ? n.text.length : 0, i < 0 ? "before" : "after");
|
|
4278
4278
|
}
|
|
4279
|
-
function
|
|
4279
|
+
function ih(e, t, n, r) {
|
|
4280
4280
|
var i = pe(t, e.doc.direction);
|
|
4281
4281
|
if (!i)
|
|
4282
4282
|
return ms(t, n, r);
|
|
@@ -4389,7 +4389,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4389
4389
|
goLineEnd: function(e) {
|
|
4390
4390
|
return e.extendSelectionsBy(
|
|
4391
4391
|
function(t) {
|
|
4392
|
-
return
|
|
4392
|
+
return ah(e, t.head.line);
|
|
4393
4393
|
},
|
|
4394
4394
|
{ origin: "+move", bias: -1 }
|
|
4395
4395
|
);
|
|
@@ -4545,8 +4545,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4545
4545
|
var n = V(e.doc, t), r = Bt(n);
|
|
4546
4546
|
return r != n && (t = m(r)), ys(!0, e, r, t, 1);
|
|
4547
4547
|
}
|
|
4548
|
-
function
|
|
4549
|
-
var n = V(e.doc, t), r =
|
|
4548
|
+
function ah(e, t) {
|
|
4549
|
+
var n = V(e.doc, t), r = $f(n);
|
|
4550
4550
|
return r != n && (t = m(r)), ys(!0, e, n, t, -1);
|
|
4551
4551
|
}
|
|
4552
4552
|
function Pl(e, t) {
|
|
@@ -4569,7 +4569,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4569
4569
|
}
|
|
4570
4570
|
return i;
|
|
4571
4571
|
}
|
|
4572
|
-
function
|
|
4572
|
+
function sh(e, t, n) {
|
|
4573
4573
|
for (var r = 0; r < e.state.keyMaps.length; r++) {
|
|
4574
4574
|
var i = xn(t, e.state.keyMaps[r], n, e);
|
|
4575
4575
|
if (i)
|
|
@@ -4577,13 +4577,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
return e.options.extraKeys && xn(t, e.options.extraKeys, n, e) || xn(t, e.options.keyMap, n, e);
|
|
4579
4579
|
}
|
|
4580
|
-
var
|
|
4580
|
+
var oh = new Xt();
|
|
4581
4581
|
function ci(e, t, n, r) {
|
|
4582
4582
|
var i = e.state.keySeq;
|
|
4583
4583
|
if (i) {
|
|
4584
4584
|
if (Nl(t))
|
|
4585
4585
|
return "handled";
|
|
4586
|
-
if (/\'$/.test(t) ? e.state.keySeq = null :
|
|
4586
|
+
if (/\'$/.test(t) ? e.state.keySeq = null : oh.set(50, function() {
|
|
4587
4587
|
e.state.keySeq == i && (e.state.keySeq = null, e.display.input.reset());
|
|
4588
4588
|
}), Fl(e, i + " " + t, n, r))
|
|
4589
4589
|
return !0;
|
|
@@ -4591,7 +4591,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4591
4591
|
return Fl(e, t, n, r);
|
|
4592
4592
|
}
|
|
4593
4593
|
function Fl(e, t, n, r) {
|
|
4594
|
-
var i =
|
|
4594
|
+
var i = sh(e, t, r);
|
|
4595
4595
|
return i == "multi" && (e.state.keySeq = t), i == "handled" && Ve(e, "keyHandled", e, t, n), (i == "handled" || i == "multi") && (st(n), es(e)), !!i;
|
|
4596
4596
|
}
|
|
4597
4597
|
function Hl(e, t) {
|
|
@@ -4605,7 +4605,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4605
4605
|
return sa(e, r);
|
|
4606
4606
|
}) : !1;
|
|
4607
4607
|
}
|
|
4608
|
-
function
|
|
4608
|
+
function lh(e, t, n) {
|
|
4609
4609
|
return ci(e, "'" + n + "'", t, function(r) {
|
|
4610
4610
|
return sa(e, r, !0);
|
|
4611
4611
|
});
|
|
@@ -4618,10 +4618,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4618
4618
|
var n = e.keyCode;
|
|
4619
4619
|
t.display.shift = n == 16 || e.shiftKey;
|
|
4620
4620
|
var r = Hl(t, e);
|
|
4621
|
-
P && (bs = r ? n : null, !r && n == 88 && !Mi && (Z ? e.metaKey : e.ctrlKey) && t.replaceSelection("", null, "cut")), h && !Z && !r && n == 46 && e.shiftKey && !e.ctrlKey && document.execCommand && document.execCommand("cut"), n == 18 && !/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) &&
|
|
4621
|
+
P && (bs = r ? n : null, !r && n == 88 && !Mi && (Z ? e.metaKey : e.ctrlKey) && t.replaceSelection("", null, "cut")), h && !Z && !r && n == 46 && e.shiftKey && !e.ctrlKey && document.execCommand && document.execCommand("cut"), n == 18 && !/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) && uh(t);
|
|
4622
4622
|
}
|
|
4623
4623
|
}
|
|
4624
|
-
function
|
|
4624
|
+
function uh(e) {
|
|
4625
4625
|
var t = e.display.lineDiv;
|
|
4626
4626
|
Me(t, "CodeMirror-crosshair");
|
|
4627
4627
|
function n(r) {
|
|
@@ -4642,18 +4642,18 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4642
4642
|
}
|
|
4643
4643
|
if (!(P && (!e.which || e.which < 10) && Hl(t, e))) {
|
|
4644
4644
|
var i = String.fromCharCode(r ?? n);
|
|
4645
|
-
i != "\b" && (
|
|
4645
|
+
i != "\b" && (lh(t, e, i) || t.display.input.onKeyPress(e));
|
|
4646
4646
|
}
|
|
4647
4647
|
}
|
|
4648
4648
|
}
|
|
4649
|
-
var
|
|
4649
|
+
var fh = 400, ws = function(e, t, n) {
|
|
4650
4650
|
this.time = e, this.pos = t, this.button = n;
|
|
4651
4651
|
};
|
|
4652
4652
|
ws.prototype.compare = function(e, t, n) {
|
|
4653
|
-
return this.time +
|
|
4653
|
+
return this.time + fh > e && X(t, this.pos) == 0 && n == this.button;
|
|
4654
4654
|
};
|
|
4655
4655
|
var hi, di;
|
|
4656
|
-
function
|
|
4656
|
+
function ch(e, t) {
|
|
4657
4657
|
var n = +/* @__PURE__ */ new Date();
|
|
4658
4658
|
return di && di.compare(n, e, t) ? (hi = di = null, "triple") : hi && hi.compare(n, e, t) ? (di = new ws(n, e, t), hi = null, "double") : (hi = new ws(n, e, t), di = null, "single");
|
|
4659
4659
|
}
|
|
@@ -4667,14 +4667,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4667
4667
|
return;
|
|
4668
4668
|
}
|
|
4669
4669
|
if (!xs(t, e)) {
|
|
4670
|
-
var r = Wr(t, e), i = Pt(e), o = r ?
|
|
4671
|
-
se(t).focus(), i == 1 && t.state.selectingText && t.state.selectingText(e), !(r &&
|
|
4670
|
+
var r = Wr(t, e), i = Pt(e), o = r ? ch(r, i) : "single";
|
|
4671
|
+
se(t).focus(), i == 1 && t.state.selectingText && t.state.selectingText(e), !(r && hh(t, i, r, o, e)) && (i == 1 ? r ? ph(t, r, o, e) : Fn(e) == n.scroller && st(e) : i == 2 ? (r && ea(t.doc, r), setTimeout(function() {
|
|
4672
4672
|
return n.input.focus();
|
|
4673
4673
|
}, 20)) : i == 3 && (xe ? t.display.input.onContextMenu(e) : ts(t)));
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
}
|
|
4677
|
-
function
|
|
4677
|
+
function hh(e, t, n, r, i) {
|
|
4678
4678
|
var o = "Click";
|
|
4679
4679
|
return r == "double" ? o = "Double" + o : r == "triple" && (o = "Triple" + o), o = (t == 1 ? "Left" : t == 2 ? "Middle" : "Right") + o, ci(e, Ml(o, i), i, function(u) {
|
|
4680
4680
|
if (typeof u == "string" && (u = fi[u]), !u)
|
|
@@ -4688,7 +4688,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4688
4688
|
return c;
|
|
4689
4689
|
});
|
|
4690
4690
|
}
|
|
4691
|
-
function
|
|
4691
|
+
function dh(e, t, n) {
|
|
4692
4692
|
var r = e.getOption("configureMouse"), i = r ? r(e, t, n) : {};
|
|
4693
4693
|
if (i.unit == null) {
|
|
4694
4694
|
var o = ee ? n.shiftKey && n.metaKey : n.altKey;
|
|
@@ -4696,12 +4696,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4696
4696
|
}
|
|
4697
4697
|
return (i.extend == null || e.doc.extend) && (i.extend = e.doc.extend || n.shiftKey), i.addNew == null && (i.addNew = Z ? n.metaKey : n.ctrlKey), i.moveOnDrag == null && (i.moveOnDrag = !(Z ? n.altKey : n.ctrlKey)), i;
|
|
4698
4698
|
}
|
|
4699
|
-
function
|
|
4699
|
+
function ph(e, t, n, r) {
|
|
4700
4700
|
w ? setTimeout(ie(jo, e), 0) : e.curOp.focus = $e(Rt(e));
|
|
4701
|
-
var i =
|
|
4702
|
-
e.options.dragDrop && Na && !e.isReadOnly() && n == "single" && (u = o.contains(t)) > -1 && (X((u = o.ranges[u]).from(), t) < 0 || t.xRel > 0) && (X(u.to(), t) > 0 || t.xRel < 0) ?
|
|
4701
|
+
var i = dh(e, n, r), o = e.doc.sel, u;
|
|
4702
|
+
e.options.dragDrop && Na && !e.isReadOnly() && n == "single" && (u = o.contains(t)) > -1 && (X((u = o.ranges[u]).from(), t) < 0 || t.xRel > 0) && (X(u.to(), t) > 0 || t.xRel < 0) ? gh(e, r, t, i) : vh(e, r, t, i);
|
|
4703
4703
|
}
|
|
4704
|
-
function
|
|
4704
|
+
function gh(e, t, n, r) {
|
|
4705
4705
|
var i = e.display, o = !1, u = Je(e, function(v) {
|
|
4706
4706
|
k && (i.scroller.draggable = !1), e.state.draggingText = !1, e.state.delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = !1 : ts(e)), at(i.wrapper.ownerDocument, "mouseup", u), at(i.wrapper.ownerDocument, "mousemove", c), at(i.scroller, "dragstart", d), at(i.scroller, "drop", u), o || (st(v), r.addNew || ea(e.doc, n, null, null, r.extend), k && !$ || w && b == 9 ? setTimeout(function() {
|
|
4707
4707
|
i.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), i.input.focus();
|
|
@@ -4725,7 +4725,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4725
4725
|
var r = n(e, t);
|
|
4726
4726
|
return new ye(r.from, r.to);
|
|
4727
4727
|
}
|
|
4728
|
-
function
|
|
4728
|
+
function vh(e, t, n, r) {
|
|
4729
4729
|
w && ts(e);
|
|
4730
4730
|
var i = e.display, o = e.doc;
|
|
4731
4731
|
st(t);
|
|
@@ -4762,7 +4762,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4762
4762
|
var bt = u, nt = jl(e, G, r.unit), Xe = bt.anchor, Ge;
|
|
4763
4763
|
X(nt.anchor, Xe) > 0 ? (Ge = nt.head, Xe = on(bt.from(), nt.anchor)) : (Ge = nt.anchor, Xe = gt(bt.to(), nt.head));
|
|
4764
4764
|
var Fe = d.ranges.slice(0);
|
|
4765
|
-
Fe[c] =
|
|
4765
|
+
Fe[c] = mh(e, new ye(ae(o, Xe), Ge)), ot(o, Ut(e, Fe, c), Kt);
|
|
4766
4766
|
}
|
|
4767
4767
|
}
|
|
4768
4768
|
var _ = i.wrapper.getBoundingClientRect(), M = 0;
|
|
@@ -4790,7 +4790,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4790
4790
|
}), K = Je(e, U);
|
|
4791
4791
|
e.state.selectingText = K, te(i.wrapper.ownerDocument, "mousemove", j), te(i.wrapper.ownerDocument, "mouseup", K);
|
|
4792
4792
|
}
|
|
4793
|
-
function
|
|
4793
|
+
function mh(e, t) {
|
|
4794
4794
|
var n = t.anchor, r = t.head, i = V(e.doc, n.line);
|
|
4795
4795
|
if (X(n, r) == 0 && n.sticky == r.sticky)
|
|
4796
4796
|
return t;
|
|
@@ -4842,9 +4842,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4842
4842
|
return Gl(e, t, "gutterClick", !0);
|
|
4843
4843
|
}
|
|
4844
4844
|
function ql(e, t) {
|
|
4845
|
-
cr(e.display, t) ||
|
|
4845
|
+
cr(e.display, t) || yh(e, t) || ze(e, t, "contextmenu") || xe || e.display.input.onContextMenu(t);
|
|
4846
4846
|
}
|
|
4847
|
-
function
|
|
4847
|
+
function yh(e, t) {
|
|
4848
4848
|
return xt(e, "gutterContextMenu") ? Gl(e, t, "gutterContextMenu", !1) : !1;
|
|
4849
4849
|
}
|
|
4850
4850
|
function Xl(e) {
|
|
@@ -4853,7 +4853,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4853
4853
|
var Sn = { toString: function() {
|
|
4854
4854
|
return "CodeMirror.Init";
|
|
4855
4855
|
} }, Kl = {}, oa = {};
|
|
4856
|
-
function
|
|
4856
|
+
function bh(e) {
|
|
4857
4857
|
var t = e.optionHandlers;
|
|
4858
4858
|
function n(r, i, o, u) {
|
|
4859
4859
|
e.defaults[r] = i, o && (t[r] = u ? function(c, d, v) {
|
|
@@ -4883,7 +4883,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4883
4883
|
}
|
|
4884
4884
|
}), n("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function(r, i, o) {
|
|
4885
4885
|
r.state.specialChars = new RegExp(i.source + (i.test(" ") ? "" : "| "), "g"), o != Sn && r.refresh();
|
|
4886
|
-
}), n("specialCharPlaceholder",
|
|
4886
|
+
}), n("specialCharPlaceholder", Kf, function(r) {
|
|
4887
4887
|
return r.refresh();
|
|
4888
4888
|
}, !0), n("electricChars", !0), n("inputStyle", q ? "contenteditable" : "textarea", function() {
|
|
4889
4889
|
throw new Error("inputStyle can not (yet) be changed in a running editor");
|
|
@@ -4898,7 +4898,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4898
4898
|
}, !0), n("keyMap", "default", function(r, i, o) {
|
|
4899
4899
|
var u = aa(i), c = o != Sn && aa(o);
|
|
4900
4900
|
c && c.detach && c.detach(r, u), u.attach && u.attach(r, c || null);
|
|
4901
|
-
}), n("extraKeys", null), n("configureMouse", null), n("lineWrapping", !1,
|
|
4901
|
+
}), n("extraKeys", null), n("configureMouse", null), n("lineWrapping", !1, xh, !0), n("gutters", [], function(r, i) {
|
|
4902
4902
|
r.display.gutterSpecs = us(i, r.options.lineNumbers), ei(r);
|
|
4903
4903
|
}, !0), n("fixedGutter", !0, function(r, i) {
|
|
4904
4904
|
r.display.gutters.style.left = i ? Qa(r.display) + "px" : "0", r.refresh();
|
|
@@ -4916,7 +4916,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4916
4916
|
i = i === "" ? null : i, r.display.input.screenReaderLabelChanged(i);
|
|
4917
4917
|
}), n("disableInput", !1, function(r, i) {
|
|
4918
4918
|
i || r.display.input.reset();
|
|
4919
|
-
}, !0), n("dragDrop", !0,
|
|
4919
|
+
}, !0), n("dragDrop", !0, wh), n("allowDropFileTypes", null), n("cursorBlinkRate", 530), n("cursorScrollMargin", 0), n("cursorHeight", 1, Kn, !0), n("singleCursorHeightPerLine", !0, Kn, !0), n("workTime", 100), n("workDelay", 100), n("flattenSpans", !0, ti, !0), n("addModeClass", !1, ti, !0), n("pollInterval", 100), n("undoDepth", 200, function(r, i) {
|
|
4920
4920
|
return r.doc.history.undoDepth = i;
|
|
4921
4921
|
}), n("historyEventDelay", 1250), n("viewportMargin", 10, function(r) {
|
|
4922
4922
|
return r.refresh();
|
|
@@ -4928,14 +4928,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4928
4928
|
return r.doc.setDirection(i);
|
|
4929
4929
|
}, !0), n("phrases", null);
|
|
4930
4930
|
}
|
|
4931
|
-
function
|
|
4931
|
+
function wh(e, t, n) {
|
|
4932
4932
|
var r = n && n != Sn;
|
|
4933
4933
|
if (!t != !r) {
|
|
4934
4934
|
var i = e.display.dragFunctions, o = t ? te : at;
|
|
4935
4935
|
o(e.display.scroller, "dragstart", i.start), o(e.display.scroller, "dragenter", i.enter), o(e.display.scroller, "dragover", i.over), o(e.display.scroller, "dragleave", i.leave), o(e.display.scroller, "drop", i.drop);
|
|
4936
4936
|
}
|
|
4937
4937
|
}
|
|
4938
|
-
function
|
|
4938
|
+
function xh(e) {
|
|
4939
4939
|
e.options.lineWrapping ? (Me(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer.style.minWidth = "", e.display.sizerWidth = null) : (ut(e.display.wrapper, "CodeMirror-wrap"), Ba(e)), Va(e), vt(e), Xn(e), setTimeout(function() {
|
|
4940
4940
|
return gn(e);
|
|
4941
4941
|
}, 100);
|
|
@@ -4947,7 +4947,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4947
4947
|
this.options = t = t ? he(t) : {}, he(Kl, t, !1);
|
|
4948
4948
|
var r = t.value;
|
|
4949
4949
|
typeof r == "string" ? r = new mt(r, t.mode, null, t.lineSeparator, t.direction) : t.mode && (r.modeOption = t.mode), this.doc = r;
|
|
4950
|
-
var i = new Ee.inputStyles[t.inputStyle](this), o = this.display = new
|
|
4950
|
+
var i = new Ee.inputStyles[t.inputStyle](this), o = this.display = new Mc(e, r, i, t);
|
|
4951
4951
|
o.wrapper.CodeMirror = this, Xl(this), t.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), Zo(this), this.state = {
|
|
4952
4952
|
keyMaps: [],
|
|
4953
4953
|
// stores maps added by addKeyMap
|
|
@@ -4972,7 +4972,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4972
4972
|
specialChars: null
|
|
4973
4973
|
}, t.autofocus && !q && o.input.focus(), w && b < 11 && setTimeout(function() {
|
|
4974
4974
|
return n.display.input.reset(!0);
|
|
4975
|
-
}, 20),
|
|
4975
|
+
}, 20), kh(this), Jc(), jr(this), this.curOp.forceUpdate = !0, sl(this, r), t.autofocus && !q || this.hasFocus() ? setTimeout(function() {
|
|
4976
4976
|
n.hasFocus() && !n.state.focused && rs(n);
|
|
4977
4977
|
}, 20) : dn(this);
|
|
4978
4978
|
for (var u in oa)
|
|
@@ -4983,7 +4983,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4983
4983
|
Gr(this), k && t.lineWrapping && getComputedStyle(o.lineDiv).textRendering == "optimizelegibility" && (o.lineDiv.style.textRendering = "auto");
|
|
4984
4984
|
}
|
|
4985
4985
|
Ee.defaults = Kl, Ee.optionHandlers = oa;
|
|
4986
|
-
function
|
|
4986
|
+
function kh(e) {
|
|
4987
4987
|
var t = e.display;
|
|
4988
4988
|
te(t.scroller, "mousedown", Je(e, Ul)), w && b < 11 ? te(t.scroller, "dblclick", Je(e, function(d) {
|
|
4989
4989
|
if (!ze(e, d)) {
|
|
@@ -5051,12 +5051,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5051
5051
|
ze(e, d) || wr(d);
|
|
5052
5052
|
},
|
|
5053
5053
|
over: function(d) {
|
|
5054
|
-
ze(e, d) || (
|
|
5054
|
+
ze(e, d) || (Vc(e, d), wr(d));
|
|
5055
5055
|
},
|
|
5056
5056
|
start: function(d) {
|
|
5057
|
-
return
|
|
5057
|
+
return Qc(e, d);
|
|
5058
5058
|
},
|
|
5059
|
-
drop: Je(e,
|
|
5059
|
+
drop: Je(e, Zc),
|
|
5060
5060
|
leave: function(d) {
|
|
5061
5061
|
ze(e, d) || El(e);
|
|
5062
5062
|
}
|
|
@@ -5175,7 +5175,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5175
5175
|
var e = T("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"), t = T("div", [e], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
|
5176
5176
|
return k ? e.style.width = "1000px" : e.setAttribute("wrap", "off"), D && (e.style.border = "1px solid black"), t;
|
|
5177
5177
|
}
|
|
5178
|
-
function
|
|
5178
|
+
function Sh(e) {
|
|
5179
5179
|
var t = e.optionHandlers, n = e.helpers = {};
|
|
5180
5180
|
e.prototype = {
|
|
5181
5181
|
constructor: e,
|
|
@@ -5343,7 +5343,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5343
5343
|
var C = Math.max(d.wrapper.clientHeight, this.doc.height), O = Math.max(d.sizer.clientWidth, d.lineSpace.clientWidth);
|
|
5344
5344
|
(u == "above" || r.bottom + i.offsetHeight > C) && r.top > i.offsetHeight ? v = r.top - i.offsetHeight : r.bottom + i.offsetHeight <= C && (v = r.bottom), x + i.offsetWidth > O && (x = O - i.offsetWidth);
|
|
5345
5345
|
}
|
|
5346
|
-
i.style.top = v + "px", i.style.left = i.style.right = "", c == "right" ? (x = d.sizer.clientWidth - i.offsetWidth, i.style.right = "0px") : (c == "left" ? x = 0 : c == "middle" && (x = (d.sizer.clientWidth - i.offsetWidth) / 2), i.style.left = x + "px"), o &&
|
|
5346
|
+
i.style.top = v + "px", i.style.left = i.style.right = "", c == "right" ? (x = d.sizer.clientWidth - i.offsetWidth, i.style.right = "0px") : (c == "left" ? x = 0 : c == "middle" && (x = (d.sizer.clientWidth - i.offsetWidth) / 2), i.style.left = x + "px"), o && wc(this, { left: x, top: v, right: x + i.offsetWidth, bottom: v + i.offsetHeight });
|
|
5347
5347
|
},
|
|
5348
5348
|
triggerOnKeyDown: ht(Wl),
|
|
5349
5349
|
triggerOnKeyPress: ht($l),
|
|
@@ -5442,7 +5442,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5442
5442
|
};
|
|
5443
5443
|
},
|
|
5444
5444
|
scrollIntoView: ht(function(r, i) {
|
|
5445
|
-
r == null ? (r = { from: this.doc.sel.primary().head, to: null }, i == null && (i = this.options.cursorScrollMargin)) : typeof r == "number" ? r = { from: I(r, 0), to: null } : r.from == null && (r = { from: r, to: null }), r.to || (r.to = r.from), r.margin = i || 0, r.from.line != null ?
|
|
5445
|
+
r == null ? (r = { from: this.doc.sel.primary().head, to: null }, i == null && (i = this.options.cursorScrollMargin)) : typeof r == "number" ? r = { from: I(r, 0), to: null } : r.from == null && (r = { from: r, to: null }), r.to || (r.to = r.from), r.margin = i || 0, r.from.line != null ? xc(this, r) : qo(this, r.from, r.to, r.margin);
|
|
5446
5446
|
}),
|
|
5447
5447
|
setSize: ht(function(r, i) {
|
|
5448
5448
|
var o = this, u = function(d) {
|
|
@@ -5516,7 +5516,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5516
5516
|
var re = n > 0 ? Q >= 55296 && Q < 56320 : Q >= 56320 && Q < 57343;
|
|
5517
5517
|
G = new I(t.line, Math.max(0, Math.min(c.text.length, t.ch + n * (re ? 2 : 1))), -n);
|
|
5518
5518
|
}
|
|
5519
|
-
} else i ? G =
|
|
5519
|
+
} else i ? G = ih(e.cm, c, t, n) : G = ms(c, t, n);
|
|
5520
5520
|
if (G == null)
|
|
5521
5521
|
if (!K && v())
|
|
5522
5522
|
t = ys(i, e.cm, c, t.line, d);
|
|
@@ -5696,7 +5696,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5696
5696
|
}, ke.prototype.pollSelection = function() {
|
|
5697
5697
|
if (!(this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged())) {
|
|
5698
5698
|
var e = this.getSelection(), t = this.cm;
|
|
5699
|
-
if (R && L && this.cm.display.gutterSpecs.length &&
|
|
5699
|
+
if (R && L && this.cm.display.gutterSpecs.length && Ch(e.anchorNode)) {
|
|
5700
5700
|
this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }), this.blur(), this.focus();
|
|
5701
5701
|
return;
|
|
5702
5702
|
}
|
|
@@ -5718,7 +5718,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5718
5718
|
var d = Br(e, i.line), v, x;
|
|
5719
5719
|
if (d == t.view.length - 1 ? (v = t.viewTo - 1, x = t.lineDiv.lastChild) : (v = m(t.view[d + 1].line) - 1, x = t.view[d + 1].node.previousSibling), !c)
|
|
5720
5720
|
return !1;
|
|
5721
|
-
for (var C = e.doc.splitLines(
|
|
5721
|
+
for (var C = e.doc.splitLines(Th(e, c, x, u, v)), O = lr(e.doc, I(u, 0), I(v, V(e.doc, v).text.length)); C.length > 1 && O.length > 1; )
|
|
5722
5722
|
if (ve(C) == ve(O))
|
|
5723
5723
|
C.pop(), O.pop(), v--;
|
|
5724
5724
|
else if (C[0] == O[0])
|
|
@@ -5781,7 +5781,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5781
5781
|
var d = Io(i.map, t.ch, u);
|
|
5782
5782
|
return d.offset = d.collapse == "right" ? d.end : d.start, d;
|
|
5783
5783
|
}
|
|
5784
|
-
function
|
|
5784
|
+
function Ch(e) {
|
|
5785
5785
|
for (var t = e; t; t = t.parentNode)
|
|
5786
5786
|
if (/CodeMirror-gutter-wrapper/.test(t.className))
|
|
5787
5787
|
return !0;
|
|
@@ -5790,7 +5790,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5790
5790
|
function Cn(e, t) {
|
|
5791
5791
|
return t && (e.bad = !0), e;
|
|
5792
5792
|
}
|
|
5793
|
-
function
|
|
5793
|
+
function Th(e, t, n, r, i) {
|
|
5794
5794
|
var o = "", u = !1, c = e.doc.lineSeparator(), d = !1;
|
|
5795
5795
|
function v(_) {
|
|
5796
5796
|
return function(M) {
|
|
@@ -5847,10 +5847,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5847
5847
|
for (var i = 0; i < e.display.view.length; i++) {
|
|
5848
5848
|
var o = e.display.view[i];
|
|
5849
5849
|
if (o.node == r)
|
|
5850
|
-
return
|
|
5850
|
+
return Lh(o, t, n);
|
|
5851
5851
|
}
|
|
5852
5852
|
}
|
|
5853
|
-
function
|
|
5853
|
+
function Lh(e, t, n) {
|
|
5854
5854
|
var r = e.text.firstChild, i = !1;
|
|
5855
5855
|
if (!t || !Ke(r, t))
|
|
5856
5856
|
return Cn(I(m(e.line), 0), !0);
|
|
@@ -6068,7 +6068,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6068
6068
|
e || this.reset(), this.textarea.disabled = e == "nocursor", this.textarea.readOnly = !!e;
|
|
6069
6069
|
}, We.prototype.setUneditable = function() {
|
|
6070
6070
|
}, We.prototype.needsContentAttribute = !1;
|
|
6071
|
-
function
|
|
6071
|
+
function _h(e, t) {
|
|
6072
6072
|
if (t = t ? he(t) : {}, t.value = e.value, !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex), !t.placeholder && e.placeholder && (t.placeholder = e.placeholder), t.autofocus == null) {
|
|
6073
6073
|
var n = $e(Ze(e));
|
|
6074
6074
|
t.autofocus = n == e || e.getAttribute("autofocus") != null && n == document.body;
|
|
@@ -6102,13 +6102,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6102
6102
|
);
|
|
6103
6103
|
return c;
|
|
6104
6104
|
}
|
|
6105
|
-
function
|
|
6106
|
-
e.off = at, e.on = te, e.wheelEventPixels =
|
|
6105
|
+
function Ah(e) {
|
|
6106
|
+
e.off = at, e.on = te, e.wheelEventPixels = Rc, e.Doc = mt, e.splitLines = It, e.countColumn = be, e.findColumn = Yt, e.isWordChar = Pn, e.Pass = vr, e.signal = Re, e.Line = ln, e.changeEnd = Ar, e.scrollbarModel = Yo, e.Pos = I, e.cmpPos = X, e.modes = tn, e.mimeModes = Ht, e.resolveMode = rn, e.getMode = nn, e.modeExtensions = Sr, e.extendMode = an, e.copyState = Qt, e.startState = sn, e.innerMode = Wn, e.commands = fi, e.keyMap = dr, e.keyName = Rl, e.isModifierKey = Nl, e.lookupKey = xn, e.normalizeKeyMap = nh, e.StringStream = Pe, e.SharedTextMarker = oi, e.TextMarker = Er, e.LineWidget = si, e.e_preventDefault = st, e.e_stopPropagation = Jr, e.e_stop = wr, e.addClass = Me, e.contains = Ke, e.rmClass = ut, e.keyNames = Dr;
|
|
6107
6107
|
}
|
|
6108
|
-
|
|
6109
|
-
var
|
|
6108
|
+
bh(Ee), Sh(Ee);
|
|
6109
|
+
var Oh = "iter insert remove copy getEditor constructor".split(" ");
|
|
6110
6110
|
for (var fa in mt.prototype)
|
|
6111
|
-
mt.prototype.hasOwnProperty(fa) && fe(
|
|
6111
|
+
mt.prototype.hasOwnProperty(fa) && fe(Oh, fa) < 0 && (Ee.prototype[fa] = /* @__PURE__ */ function(e) {
|
|
6112
6112
|
return function() {
|
|
6113
6113
|
return e.apply(this.doc, arguments);
|
|
6114
6114
|
};
|
|
@@ -6123,7 +6123,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6123
6123
|
Ee.prototype[e] = t;
|
|
6124
6124
|
}, Ee.defineDocExtension = function(e, t) {
|
|
6125
6125
|
mt.prototype[e] = t;
|
|
6126
|
-
}, Ee.fromTextArea =
|
|
6126
|
+
}, Ee.fromTextArea = _h, Ah(Ee), Ee.version = "5.65.20", Ee;
|
|
6127
6127
|
});
|
|
6128
6128
|
}(As)), As.exports;
|
|
6129
6129
|
}
|
|
@@ -7043,118 +7043,120 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
7043
7043
|
});
|
|
7044
7044
|
});
|
|
7045
7045
|
})();
|
|
7046
|
-
var
|
|
7047
|
-
|
|
7048
|
-
(function(
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
function
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
if (
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7046
|
+
var iu = { exports: {} }, au;
|
|
7047
|
+
function Zu() {
|
|
7048
|
+
return au || (au = 1, function(f, a) {
|
|
7049
|
+
(function(s) {
|
|
7050
|
+
s(Nr());
|
|
7051
|
+
})(function(s) {
|
|
7052
|
+
function l(y, w, b, k) {
|
|
7053
|
+
if (b && b.call) {
|
|
7054
|
+
var A = b;
|
|
7055
|
+
b = null;
|
|
7056
|
+
} else
|
|
7057
|
+
var A = p(y, b, "rangeFinder");
|
|
7058
|
+
typeof w == "number" && (w = s.Pos(w, 0));
|
|
7059
|
+
var L = p(y, b, "minFoldSize");
|
|
7060
|
+
function H(E) {
|
|
7061
|
+
var D = A(y, w);
|
|
7062
|
+
if (!D || D.to.line - D.from.line < L) return null;
|
|
7063
|
+
if (k === "fold") return D;
|
|
7064
|
+
for (var R = y.findMarksAt(D.from), q = 0; q < R.length; ++q)
|
|
7065
|
+
if (R[q].__isFold) {
|
|
7066
|
+
if (!E) return null;
|
|
7067
|
+
D.cleared = !0, R[q].clear();
|
|
7068
|
+
}
|
|
7069
|
+
return D;
|
|
7070
|
+
}
|
|
7071
|
+
var P = H(!0);
|
|
7072
|
+
if (p(y, b, "scanUp")) for (; !P && w.line > y.firstLine(); )
|
|
7073
|
+
w = s.Pos(w.line - 1, 0), P = H(!1);
|
|
7074
|
+
if (!(!P || P.cleared || k === "unfold")) {
|
|
7075
|
+
var $ = h(y, b, P);
|
|
7076
|
+
s.on($, "mousedown", function(E) {
|
|
7077
|
+
N.clear(), s.e_preventDefault(E);
|
|
7078
|
+
});
|
|
7079
|
+
var N = y.markText(P.from, P.to, {
|
|
7080
|
+
replacedWith: $,
|
|
7081
|
+
clearOnEnter: p(y, b, "clearOnEnter"),
|
|
7082
|
+
__isFold: !0
|
|
7083
|
+
});
|
|
7084
|
+
N.on("clear", function(E, D) {
|
|
7085
|
+
s.signal(y, "unfold", y, E, D);
|
|
7086
|
+
}), s.signal(y, "fold", y, P.from, P.to);
|
|
7087
|
+
}
|
|
7088
|
+
}
|
|
7089
|
+
function h(y, w, b) {
|
|
7090
|
+
var k = p(y, w, "widget");
|
|
7091
|
+
if (typeof k == "function" && (k = k(b.from, b.to)), typeof k == "string") {
|
|
7092
|
+
var A = document.createTextNode(k);
|
|
7093
|
+
k = document.createElement("span"), k.appendChild(A), k.className = "CodeMirror-foldmarker";
|
|
7094
|
+
} else k && (k = k.cloneNode(!0));
|
|
7095
|
+
return k;
|
|
7096
|
+
}
|
|
7097
|
+
s.newFoldFunction = function(y, w) {
|
|
7098
|
+
return function(b, k) {
|
|
7099
|
+
l(b, k, { rangeFinder: y, widget: w });
|
|
7100
|
+
};
|
|
7101
|
+
}, s.defineExtension("foldCode", function(y, w, b) {
|
|
7102
|
+
l(this, y, w, b);
|
|
7103
|
+
}), s.defineExtension("isFolded", function(y) {
|
|
7104
|
+
for (var w = this.findMarksAt(y), b = 0; b < w.length; ++b)
|
|
7105
|
+
if (w[b].__isFold) return !0;
|
|
7106
|
+
}), s.commands.toggleFold = function(y) {
|
|
7107
|
+
y.foldCode(y.getCursor());
|
|
7108
|
+
}, s.commands.fold = function(y) {
|
|
7109
|
+
y.foldCode(y.getCursor(), null, "fold");
|
|
7110
|
+
}, s.commands.unfold = function(y) {
|
|
7111
|
+
y.foldCode(y.getCursor(), { scanUp: !1 }, "unfold");
|
|
7112
|
+
}, s.commands.foldAll = function(y) {
|
|
7113
|
+
y.operation(function() {
|
|
7114
|
+
for (var w = y.firstLine(), b = y.lastLine(); w <= b; w++)
|
|
7115
|
+
y.foldCode(s.Pos(w, 0), { scanUp: !1 }, "fold");
|
|
7077
7116
|
});
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7117
|
+
}, s.commands.unfoldAll = function(y) {
|
|
7118
|
+
y.operation(function() {
|
|
7119
|
+
for (var w = y.firstLine(), b = y.lastLine(); w <= b; w++)
|
|
7120
|
+
y.foldCode(s.Pos(w, 0), { scanUp: !1 }, "unfold");
|
|
7082
7121
|
});
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
return k;
|
|
7095
|
-
}
|
|
7096
|
-
s.newFoldFunction = function(y, w) {
|
|
7097
|
-
return function(b, k) {
|
|
7098
|
-
l(b, k, { rangeFinder: y, widget: w });
|
|
7099
|
-
};
|
|
7100
|
-
}, s.defineExtension("foldCode", function(y, w, b) {
|
|
7101
|
-
l(this, y, w, b);
|
|
7102
|
-
}), s.defineExtension("isFolded", function(y) {
|
|
7103
|
-
for (var w = this.findMarksAt(y), b = 0; b < w.length; ++b)
|
|
7104
|
-
if (w[b].__isFold) return !0;
|
|
7105
|
-
}), s.commands.toggleFold = function(y) {
|
|
7106
|
-
y.foldCode(y.getCursor());
|
|
7107
|
-
}, s.commands.fold = function(y) {
|
|
7108
|
-
y.foldCode(y.getCursor(), null, "fold");
|
|
7109
|
-
}, s.commands.unfold = function(y) {
|
|
7110
|
-
y.foldCode(y.getCursor(), { scanUp: !1 }, "unfold");
|
|
7111
|
-
}, s.commands.foldAll = function(y) {
|
|
7112
|
-
y.operation(function() {
|
|
7113
|
-
for (var w = y.firstLine(), b = y.lastLine(); w <= b; w++)
|
|
7114
|
-
y.foldCode(s.Pos(w, 0), { scanUp: !1 }, "fold");
|
|
7115
|
-
});
|
|
7116
|
-
}, s.commands.unfoldAll = function(y) {
|
|
7117
|
-
y.operation(function() {
|
|
7118
|
-
for (var w = y.firstLine(), b = y.lastLine(); w <= b; w++)
|
|
7119
|
-
y.foldCode(s.Pos(w, 0), { scanUp: !1 }, "unfold");
|
|
7120
|
-
});
|
|
7121
|
-
}, s.registerHelper("fold", "combine", function() {
|
|
7122
|
-
var y = Array.prototype.slice.call(arguments, 0);
|
|
7123
|
-
return function(w, b) {
|
|
7124
|
-
for (var k = 0; k < y.length; ++k) {
|
|
7125
|
-
var A = y[k](w, b);
|
|
7122
|
+
}, s.registerHelper("fold", "combine", function() {
|
|
7123
|
+
var y = Array.prototype.slice.call(arguments, 0);
|
|
7124
|
+
return function(w, b) {
|
|
7125
|
+
for (var k = 0; k < y.length; ++k) {
|
|
7126
|
+
var A = y[k](w, b);
|
|
7127
|
+
if (A) return A;
|
|
7128
|
+
}
|
|
7129
|
+
};
|
|
7130
|
+
}), s.registerHelper("fold", "auto", function(y, w) {
|
|
7131
|
+
for (var b = y.getHelpers(w, "fold"), k = 0; k < b.length; k++) {
|
|
7132
|
+
var A = b[k](y, w);
|
|
7126
7133
|
if (A) return A;
|
|
7127
7134
|
}
|
|
7135
|
+
});
|
|
7136
|
+
var g = {
|
|
7137
|
+
rangeFinder: s.fold.auto,
|
|
7138
|
+
widget: "↔",
|
|
7139
|
+
minFoldSize: 0,
|
|
7140
|
+
scanUp: !1,
|
|
7141
|
+
clearOnEnter: !0
|
|
7128
7142
|
};
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
scanUp: !1,
|
|
7140
|
-
clearOnEnter: !0
|
|
7141
|
-
};
|
|
7142
|
-
s.defineOption("foldOptions", null);
|
|
7143
|
-
function p(y, w, b) {
|
|
7144
|
-
if (w && w[b] !== void 0)
|
|
7145
|
-
return w[b];
|
|
7146
|
-
var k = y.options.foldOptions;
|
|
7147
|
-
return k && k[b] !== void 0 ? k[b] : g[b];
|
|
7148
|
-
}
|
|
7149
|
-
s.defineExtension("foldOption", function(y, w) {
|
|
7150
|
-
return p(this, y, w);
|
|
7143
|
+
s.defineOption("foldOptions", null);
|
|
7144
|
+
function p(y, w, b) {
|
|
7145
|
+
if (w && w[b] !== void 0)
|
|
7146
|
+
return w[b];
|
|
7147
|
+
var k = y.options.foldOptions;
|
|
7148
|
+
return k && k[b] !== void 0 ? k[b] : g[b];
|
|
7149
|
+
}
|
|
7150
|
+
s.defineExtension("foldOption", function(y, w) {
|
|
7151
|
+
return p(this, y, w);
|
|
7152
|
+
});
|
|
7151
7153
|
});
|
|
7152
|
-
});
|
|
7153
|
-
}
|
|
7154
|
-
|
|
7154
|
+
}()), iu.exports;
|
|
7155
|
+
}
|
|
7156
|
+
Zu();
|
|
7155
7157
|
(function(f, a) {
|
|
7156
7158
|
(function(s) {
|
|
7157
|
-
s(Nr(),
|
|
7159
|
+
s(Nr(), Zu());
|
|
7158
7160
|
})(function(s) {
|
|
7159
7161
|
s.defineOption("foldGutter", !1, function(N, E, D) {
|
|
7160
7162
|
D && D != s.Init && (N.clearGutter(N.state.foldGutter.options.gutter), N.state.foldGutter = null, N.off("gutterClick", A), N.off("changes", H), N.off("viewportChange", P), N.off("fold", $), N.off("unfold", $), N.off("swapDoc", H), N.off("optionChange", L)), E && (N.state.foldGutter = new h(g(E)), k(N), N.on("gutterClick", A), N.on("changes", H), N.on("viewportChange", P), N.on("fold", $), N.on("unfold", $), N.on("swapDoc", H), N.on("optionChange", L));
|
|
@@ -7370,7 +7372,7 @@ var Mh = Nh.exports;
|
|
|
7370
7372
|
});
|
|
7371
7373
|
});
|
|
7372
7374
|
})();
|
|
7373
|
-
const
|
|
7375
|
+
const zh = Nh("trace", {
|
|
7374
7376
|
state: () => ({
|
|
7375
7377
|
traces: [],
|
|
7376
7378
|
currentTrace: null
|
|
@@ -7388,11 +7390,11 @@ const Rh = Eh("trace", {
|
|
|
7388
7390
|
}
|
|
7389
7391
|
}
|
|
7390
7392
|
});
|
|
7391
|
-
var
|
|
7393
|
+
var Qu = { exports: {} };
|
|
7392
7394
|
(function(f, a) {
|
|
7393
7395
|
(function(s, l) {
|
|
7394
7396
|
f.exports = l(Nr());
|
|
7395
|
-
})(
|
|
7397
|
+
})(Yu, function(s) {
|
|
7396
7398
|
return function(l) {
|
|
7397
7399
|
function h(p) {
|
|
7398
7400
|
if (g[p]) return g[p].exports;
|
|
@@ -7538,8 +7540,8 @@ var Ku = { exports: {} };
|
|
|
7538
7540
|
h.a = w;
|
|
7539
7541
|
}]);
|
|
7540
7542
|
});
|
|
7541
|
-
})(
|
|
7542
|
-
var
|
|
7543
|
+
})(Qu);
|
|
7544
|
+
var Ph = Qu.exports;
|
|
7543
7545
|
function Hs() {
|
|
7544
7546
|
return {
|
|
7545
7547
|
async: !1,
|
|
@@ -7555,42 +7557,42 @@ function Hs() {
|
|
|
7555
7557
|
};
|
|
7556
7558
|
}
|
|
7557
7559
|
let Vr = Hs();
|
|
7558
|
-
function
|
|
7560
|
+
function Vu(f) {
|
|
7559
7561
|
Vr = f;
|
|
7560
7562
|
}
|
|
7561
|
-
const
|
|
7563
|
+
const Ju = /[&<>"']/, Fh = new RegExp(Ju.source, "g"), ef = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Hh = new RegExp(ef.source, "g"), Wh = {
|
|
7562
7564
|
"&": "&",
|
|
7563
7565
|
"<": "<",
|
|
7564
7566
|
">": ">",
|
|
7565
7567
|
'"': """,
|
|
7566
7568
|
"'": "'"
|
|
7567
|
-
},
|
|
7569
|
+
}, su = (f) => Wh[f];
|
|
7568
7570
|
function Ot(f, a) {
|
|
7569
7571
|
if (a) {
|
|
7570
|
-
if (
|
|
7571
|
-
return f.replace(
|
|
7572
|
-
} else if (
|
|
7573
|
-
return f.replace(
|
|
7572
|
+
if (Ju.test(f))
|
|
7573
|
+
return f.replace(Fh, su);
|
|
7574
|
+
} else if (ef.test(f))
|
|
7575
|
+
return f.replace(Hh, su);
|
|
7574
7576
|
return f;
|
|
7575
7577
|
}
|
|
7576
|
-
const
|
|
7577
|
-
function
|
|
7578
|
-
return f.replace(
|
|
7578
|
+
const Bh = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
7579
|
+
function $h(f) {
|
|
7580
|
+
return f.replace(Bh, (a, s) => (s = s.toLowerCase(), s === "colon" ? ":" : s.charAt(0) === "#" ? s.charAt(1) === "x" ? String.fromCharCode(parseInt(s.substring(2), 16)) : String.fromCharCode(+s.substring(1)) : ""));
|
|
7579
7581
|
}
|
|
7580
|
-
const
|
|
7582
|
+
const Uh = /(^|[^\[])\^/g;
|
|
7581
7583
|
function Te(f, a) {
|
|
7582
7584
|
let s = typeof f == "string" ? f : f.source;
|
|
7583
7585
|
a = a || "";
|
|
7584
7586
|
const l = {
|
|
7585
7587
|
replace: (h, g) => {
|
|
7586
7588
|
let p = typeof g == "string" ? g : g.source;
|
|
7587
|
-
return p = p.replace(
|
|
7589
|
+
return p = p.replace(Uh, "$1"), s = s.replace(h, p), l;
|
|
7588
7590
|
},
|
|
7589
7591
|
getRegex: () => new RegExp(s, a)
|
|
7590
7592
|
};
|
|
7591
7593
|
return l;
|
|
7592
7594
|
}
|
|
7593
|
-
function
|
|
7595
|
+
function ou(f) {
|
|
7594
7596
|
try {
|
|
7595
7597
|
f = encodeURI(f).replace(/%25/g, "%");
|
|
7596
7598
|
} catch {
|
|
@@ -7599,7 +7601,7 @@ function au(f) {
|
|
|
7599
7601
|
return f;
|
|
7600
7602
|
}
|
|
7601
7603
|
const wi = { exec: () => null };
|
|
7602
|
-
function
|
|
7604
|
+
function lu(f, a) {
|
|
7603
7605
|
const s = f.replace(/\|/g, (g, p, y) => {
|
|
7604
7606
|
let w = !1, b = p;
|
|
7605
7607
|
for (; --b >= 0 && y[b] === "\\"; )
|
|
@@ -7626,7 +7628,7 @@ function ha(f, a, s) {
|
|
|
7626
7628
|
h++;
|
|
7627
7629
|
return f.slice(0, l - h);
|
|
7628
7630
|
}
|
|
7629
|
-
function
|
|
7631
|
+
function jh(f, a) {
|
|
7630
7632
|
if (f.indexOf(a[1]) === -1)
|
|
7631
7633
|
return -1;
|
|
7632
7634
|
let s = 0;
|
|
@@ -7639,7 +7641,7 @@ function Uh(f, a) {
|
|
|
7639
7641
|
return l;
|
|
7640
7642
|
return -1;
|
|
7641
7643
|
}
|
|
7642
|
-
function
|
|
7644
|
+
function uu(f, a, s, l) {
|
|
7643
7645
|
const h = a.href, g = a.title ? Ot(a.title) : null, p = f[1].replace(/\\([\[\]])/g, "$1");
|
|
7644
7646
|
if (f[0].charAt(0) !== "!") {
|
|
7645
7647
|
l.state.inLink = !0;
|
|
@@ -7661,7 +7663,7 @@ function ou(f, a, s, l) {
|
|
|
7661
7663
|
text: Ot(p)
|
|
7662
7664
|
};
|
|
7663
7665
|
}
|
|
7664
|
-
function
|
|
7666
|
+
function Gh(f, a) {
|
|
7665
7667
|
const s = f.match(/^(\s+)(?:```)/);
|
|
7666
7668
|
if (s === null)
|
|
7667
7669
|
return a;
|
|
@@ -7709,7 +7711,7 @@ class ka {
|
|
|
7709
7711
|
fences(a) {
|
|
7710
7712
|
const s = this.rules.block.fences.exec(a);
|
|
7711
7713
|
if (s) {
|
|
7712
|
-
const l = s[0], h =
|
|
7714
|
+
const l = s[0], h = Gh(l, s[3] || "");
|
|
7713
7715
|
return {
|
|
7714
7716
|
type: "code",
|
|
7715
7717
|
raw: l,
|
|
@@ -7856,7 +7858,7 @@ class ka {
|
|
|
7856
7858
|
const s = this.rules.block.table.exec(a);
|
|
7857
7859
|
if (!s || !/[:|]/.test(s[2]))
|
|
7858
7860
|
return;
|
|
7859
|
-
const l =
|
|
7861
|
+
const l = lu(s[1]), h = s[2].replace(/^\||\| *$/g, "").split("|"), g = s[3] && s[3].trim() ? s[3].replace(/\n[ \t]*$/, "").split(`
|
|
7860
7862
|
`) : [], p = {
|
|
7861
7863
|
type: "table",
|
|
7862
7864
|
raw: s[0],
|
|
@@ -7873,7 +7875,7 @@ class ka {
|
|
|
7873
7875
|
tokens: this.lexer.inline(y)
|
|
7874
7876
|
});
|
|
7875
7877
|
for (const y of g)
|
|
7876
|
-
p.rows.push(
|
|
7878
|
+
p.rows.push(lu(y, p.header.length).map((w) => ({
|
|
7877
7879
|
text: w,
|
|
7878
7880
|
tokens: this.lexer.inline(w)
|
|
7879
7881
|
})));
|
|
@@ -7946,7 +7948,7 @@ class ka {
|
|
|
7946
7948
|
if ((l.length - p.length) % 2 === 0)
|
|
7947
7949
|
return;
|
|
7948
7950
|
} else {
|
|
7949
|
-
const p =
|
|
7951
|
+
const p = jh(s[2], "()");
|
|
7950
7952
|
if (p > -1) {
|
|
7951
7953
|
const w = (s[0].indexOf("!") === 0 ? 5 : 4) + s[1].length + p;
|
|
7952
7954
|
s[2] = s[2].substring(0, p), s[0] = s[0].substring(0, w).trim(), s[3] = "";
|
|
@@ -7958,7 +7960,7 @@ class ka {
|
|
|
7958
7960
|
p && (h = p[1], g = p[3]);
|
|
7959
7961
|
} else
|
|
7960
7962
|
g = s[3] ? s[3].slice(1, -1) : "";
|
|
7961
|
-
return h = h.trim(), /^</.test(h) && (this.options.pedantic && !/>$/.test(l) ? h = h.slice(1) : h = h.slice(1, -1)),
|
|
7963
|
+
return h = h.trim(), /^</.test(h) && (this.options.pedantic && !/>$/.test(l) ? h = h.slice(1) : h = h.slice(1, -1)), uu(s, {
|
|
7962
7964
|
href: h && h.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
7963
7965
|
title: g && g.replace(this.rules.inline.anyPunctuation, "$1")
|
|
7964
7966
|
}, s[0], this.lexer);
|
|
@@ -7976,7 +7978,7 @@ class ka {
|
|
|
7976
7978
|
text: p
|
|
7977
7979
|
};
|
|
7978
7980
|
}
|
|
7979
|
-
return
|
|
7981
|
+
return uu(l, g, l[0], this.lexer);
|
|
7980
7982
|
}
|
|
7981
7983
|
}
|
|
7982
7984
|
emStrong(a, s, l = "") {
|
|
@@ -8110,25 +8112,25 @@ class ka {
|
|
|
8110
8112
|
}
|
|
8111
8113
|
}
|
|
8112
8114
|
}
|
|
8113
|
-
const
|
|
8114
|
-
blockquote:
|
|
8115
|
-
code:
|
|
8116
|
-
def:
|
|
8117
|
-
fences:
|
|
8118
|
-
heading:
|
|
8115
|
+
const qh = /^(?: *(?:\n|$))+/, Xh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Kh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, _i = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Yh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tf = /(?:[*+-]|\d{1,9}[.)])/, rf = Te(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, tf).getRegex(), Ws = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Zh = /^[^\n]+/, Bs = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Qh = Te(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Bs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Vh = Te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, tf).getRegex(), Aa = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", $s = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, Jh = Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", $s).replace("tag", Aa).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), nf = Te(Ws).replace("hr", _i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Aa).getRegex(), ed = Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", nf).getRegex(), Us = {
|
|
8116
|
+
blockquote: ed,
|
|
8117
|
+
code: Xh,
|
|
8118
|
+
def: Qh,
|
|
8119
|
+
fences: Kh,
|
|
8120
|
+
heading: Yh,
|
|
8119
8121
|
hr: _i,
|
|
8120
|
-
html:
|
|
8121
|
-
lheading:
|
|
8122
|
-
list:
|
|
8123
|
-
newline:
|
|
8124
|
-
paragraph:
|
|
8122
|
+
html: Jh,
|
|
8123
|
+
lheading: rf,
|
|
8124
|
+
list: Vh,
|
|
8125
|
+
newline: qh,
|
|
8126
|
+
paragraph: nf,
|
|
8125
8127
|
table: wi,
|
|
8126
|
-
text:
|
|
8127
|
-
},
|
|
8128
|
+
text: Zh
|
|
8129
|
+
}, fu = Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", _i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Aa).getRegex(), td = {
|
|
8128
8130
|
...Us,
|
|
8129
|
-
table:
|
|
8130
|
-
paragraph: Te(Ws).replace("hr", _i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table",
|
|
8131
|
-
},
|
|
8131
|
+
table: fu,
|
|
8132
|
+
paragraph: Te(Ws).replace("hr", _i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fu).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Aa).getRegex()
|
|
8133
|
+
}, rd = {
|
|
8132
8134
|
...Us,
|
|
8133
8135
|
html: Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", $s).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
8134
8136
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
@@ -8137,52 +8139,52 @@ const Gh = /^(?: *(?:\n|$))+/, qh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Xh =
|
|
|
8137
8139
|
// fences not supported
|
|
8138
8140
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
8139
8141
|
paragraph: Te(Ws).replace("hr", _i).replace("heading", ` *#{1,6} *[^
|
|
8140
|
-
]`).replace("lheading",
|
|
8141
|
-
},
|
|
8142
|
+
]`).replace("lheading", rf).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
8143
|
+
}, af = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, nd = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, sf = /^( {2,}|\\)\n(?!\s*$)/, id = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ai = "\\p{P}$+<=>`^|~", ad = Te(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ai).getRegex(), sd = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, od = Te(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ai).getRegex(), ld = Te("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ai).getRegex(), ud = Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ai).getRegex(), fd = Te(/\\([punct])/, "gu").replace(/punct/g, Ai).getRegex(), cd = Te(/^<(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(), hd = Te($s).replace("(?:-->|$)", "-->").getRegex(), dd = Te("^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", hd).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Sa = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, pd = Te(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Sa).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), of = Te(/^!?\[(label)\]\[(ref)\]/).replace("label", Sa).replace("ref", Bs).getRegex(), lf = Te(/^!?\[(ref)\](?:\[\])?/).replace("ref", Bs).getRegex(), gd = Te("reflink|nolink(?!\\()", "g").replace("reflink", of).replace("nolink", lf).getRegex(), js = {
|
|
8142
8144
|
_backpedal: wi,
|
|
8143
8145
|
// only used for GFM url
|
|
8144
|
-
anyPunctuation:
|
|
8145
|
-
autolink:
|
|
8146
|
-
blockSkip:
|
|
8147
|
-
br:
|
|
8148
|
-
code:
|
|
8146
|
+
anyPunctuation: fd,
|
|
8147
|
+
autolink: cd,
|
|
8148
|
+
blockSkip: sd,
|
|
8149
|
+
br: sf,
|
|
8150
|
+
code: nd,
|
|
8149
8151
|
del: wi,
|
|
8150
|
-
emStrongLDelim:
|
|
8151
|
-
emStrongRDelimAst:
|
|
8152
|
-
emStrongRDelimUnd:
|
|
8153
|
-
escape:
|
|
8154
|
-
link:
|
|
8155
|
-
nolink:
|
|
8156
|
-
punctuation:
|
|
8157
|
-
reflink:
|
|
8158
|
-
reflinkSearch:
|
|
8159
|
-
tag:
|
|
8160
|
-
text:
|
|
8152
|
+
emStrongLDelim: od,
|
|
8153
|
+
emStrongRDelimAst: ld,
|
|
8154
|
+
emStrongRDelimUnd: ud,
|
|
8155
|
+
escape: af,
|
|
8156
|
+
link: pd,
|
|
8157
|
+
nolink: lf,
|
|
8158
|
+
punctuation: ad,
|
|
8159
|
+
reflink: of,
|
|
8160
|
+
reflinkSearch: gd,
|
|
8161
|
+
tag: dd,
|
|
8162
|
+
text: id,
|
|
8161
8163
|
url: wi
|
|
8162
|
-
},
|
|
8164
|
+
}, vd = {
|
|
8163
8165
|
...js,
|
|
8164
8166
|
link: Te(/^!?\[(label)\]\((.*?)\)/).replace("label", Sa).getRegex(),
|
|
8165
8167
|
reflink: Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Sa).getRegex()
|
|
8166
8168
|
}, Ns = {
|
|
8167
8169
|
...js,
|
|
8168
|
-
escape: Te(
|
|
8170
|
+
escape: Te(af).replace("])", "~|])").getRegex(),
|
|
8169
8171
|
url: Te(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
8170
8172
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
8171
8173
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
8172
8174
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
8173
|
-
},
|
|
8175
|
+
}, md = {
|
|
8174
8176
|
...Ns,
|
|
8175
|
-
br: Te(
|
|
8177
|
+
br: Te(sf).replace("{2,}", "*").getRegex(),
|
|
8176
8178
|
text: Te(Ns.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
8177
8179
|
}, da = {
|
|
8178
8180
|
normal: Us,
|
|
8179
|
-
gfm:
|
|
8180
|
-
pedantic:
|
|
8181
|
+
gfm: td,
|
|
8182
|
+
pedantic: rd
|
|
8181
8183
|
}, gi = {
|
|
8182
8184
|
normal: js,
|
|
8183
8185
|
gfm: Ns,
|
|
8184
|
-
breaks:
|
|
8185
|
-
pedantic:
|
|
8186
|
+
breaks: md,
|
|
8187
|
+
pedantic: vd
|
|
8186
8188
|
};
|
|
8187
8189
|
class rr {
|
|
8188
8190
|
constructor(a) {
|
|
@@ -8489,7 +8491,7 @@ ${a}</tr>
|
|
|
8489
8491
|
return `<del>${a}</del>`;
|
|
8490
8492
|
}
|
|
8491
8493
|
link(a, s, l) {
|
|
8492
|
-
const h =
|
|
8494
|
+
const h = ou(a);
|
|
8493
8495
|
if (h === null)
|
|
8494
8496
|
return l;
|
|
8495
8497
|
a = h;
|
|
@@ -8497,7 +8499,7 @@ ${a}</tr>
|
|
|
8497
8499
|
return s && (g += ' title="' + s + '"'), g += ">" + l + "</a>", g;
|
|
8498
8500
|
}
|
|
8499
8501
|
image(a, s, l) {
|
|
8500
|
-
const h =
|
|
8502
|
+
const h = ou(a);
|
|
8501
8503
|
if (h === null)
|
|
8502
8504
|
return l;
|
|
8503
8505
|
a = h;
|
|
@@ -8580,7 +8582,7 @@ class nr {
|
|
|
8580
8582
|
}
|
|
8581
8583
|
case "heading": {
|
|
8582
8584
|
const p = g;
|
|
8583
|
-
l += this.renderer.heading(this.parseInline(p.tokens), p.depth,
|
|
8585
|
+
l += this.renderer.heading(this.parseInline(p.tokens), p.depth, $h(this.parseInline(p.tokens, this.textRenderer)));
|
|
8584
8586
|
continue;
|
|
8585
8587
|
}
|
|
8586
8588
|
case "code": {
|
|
@@ -8761,8 +8763,8 @@ De(xi, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
8761
8763
|
"postprocess",
|
|
8762
8764
|
"processAllTokens"
|
|
8763
8765
|
]));
|
|
8764
|
-
var Qr, Ms,
|
|
8765
|
-
class
|
|
8766
|
+
var Qr, Ms, uf;
|
|
8767
|
+
class yd {
|
|
8766
8768
|
constructor(...a) {
|
|
8767
8769
|
ru(this, Qr);
|
|
8768
8770
|
De(this, "defaults", Hs());
|
|
@@ -8904,7 +8906,7 @@ Qr = new WeakSet(), Ms = function(a, s) {
|
|
|
8904
8906
|
return (l, h) => {
|
|
8905
8907
|
const g = { ...h }, p = { ...this.defaults, ...g };
|
|
8906
8908
|
this.defaults.async === !0 && g.async === !1 && (p.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), p.async = !0);
|
|
8907
|
-
const y = ca(this, Qr,
|
|
8909
|
+
const y = ca(this, Qr, uf).call(this, !!p.silent, !!p.async);
|
|
8908
8910
|
if (typeof l > "u" || l === null)
|
|
8909
8911
|
return y(new Error("marked(): input parameter is undefined or null"));
|
|
8910
8912
|
if (typeof l != "string")
|
|
@@ -8921,7 +8923,7 @@ Qr = new WeakSet(), Ms = function(a, s) {
|
|
|
8921
8923
|
return y(w);
|
|
8922
8924
|
}
|
|
8923
8925
|
};
|
|
8924
|
-
},
|
|
8926
|
+
}, uf = function(a, s) {
|
|
8925
8927
|
return (l) => {
|
|
8926
8928
|
if (l.message += `
|
|
8927
8929
|
Please report this to https://github.com/markedjs/marked.`, a) {
|
|
@@ -8933,17 +8935,17 @@ Please report this to https://github.com/markedjs/marked.`, a) {
|
|
|
8933
8935
|
throw l;
|
|
8934
8936
|
};
|
|
8935
8937
|
};
|
|
8936
|
-
const Zr = new
|
|
8938
|
+
const Zr = new yd();
|
|
8937
8939
|
function ge(f, a) {
|
|
8938
8940
|
return Zr.parse(f, a);
|
|
8939
8941
|
}
|
|
8940
8942
|
ge.options = ge.setOptions = function(f) {
|
|
8941
|
-
return Zr.setOptions(f), ge.defaults = Zr.defaults,
|
|
8943
|
+
return Zr.setOptions(f), ge.defaults = Zr.defaults, Vu(ge.defaults), ge;
|
|
8942
8944
|
};
|
|
8943
8945
|
ge.getDefaults = Hs;
|
|
8944
8946
|
ge.defaults = Vr;
|
|
8945
8947
|
ge.use = function(...f) {
|
|
8946
|
-
return Zr.use(...f), ge.defaults = Zr.defaults,
|
|
8948
|
+
return Zr.use(...f), ge.defaults = Zr.defaults, Vu(ge.defaults), ge;
|
|
8947
8949
|
};
|
|
8948
8950
|
ge.walkTokens = function(f, a) {
|
|
8949
8951
|
return Zr.walkTokens(f, a);
|
|
@@ -8965,9 +8967,9 @@ ge.walkTokens;
|
|
|
8965
8967
|
ge.parseInline;
|
|
8966
8968
|
nr.parse;
|
|
8967
8969
|
rr.lex;
|
|
8968
|
-
const
|
|
8969
|
-
baseURL:
|
|
8970
|
-
timeout:
|
|
8970
|
+
const bd = () => typeof __TRACE_API_BASE_URL__ < "u" ? __TRACE_API_BASE_URL__ : typeof window < "u" && window.__TRACE_API_BASE_URL__ ? window.__TRACE_API_BASE_URL__ : typeof process < "u" && process.env && process.env.TRACE_API_BASE_URL ? process.env.TRACE_API_BASE_URL : "/tracing", pa = Mh.create({
|
|
8971
|
+
baseURL: bd(),
|
|
8972
|
+
timeout: 36e5
|
|
8971
8973
|
}), mi = {
|
|
8972
8974
|
getTraceList(f, a, s, l, h) {
|
|
8973
8975
|
const g = {};
|
|
@@ -8984,14 +8986,14 @@ const yd = () => typeof __TRACE_API_BASE_URL__ < "u" ? __TRACE_API_BASE_URL__ :
|
|
|
8984
8986
|
return f && (l.query = f), a && (l.startTime = a), s && (l.endTime = s), pa.delete("/v1/trace", { params: l }).then((h) => h.data);
|
|
8985
8987
|
}
|
|
8986
8988
|
};
|
|
8987
|
-
function
|
|
8989
|
+
function ff(f, a, s, l, h, g, p, y) {
|
|
8988
8990
|
var w = typeof f == "function" ? f.options : f;
|
|
8989
8991
|
return a && (w.render = a, w.staticRenderFns = s, w._compiled = !0), g && (w._scopeId = "data-v-" + g), {
|
|
8990
8992
|
exports: f,
|
|
8991
8993
|
options: w
|
|
8992
8994
|
};
|
|
8993
8995
|
}
|
|
8994
|
-
const
|
|
8996
|
+
const wd = {
|
|
8995
8997
|
name: "TraceSpanTree",
|
|
8996
8998
|
props: {
|
|
8997
8999
|
spans: {
|
|
@@ -9116,7 +9118,7 @@ const bd = {
|
|
|
9116
9118
|
}
|
|
9117
9119
|
}
|
|
9118
9120
|
};
|
|
9119
|
-
var
|
|
9121
|
+
var xd = function() {
|
|
9120
9122
|
var a = this, s = a._self._c;
|
|
9121
9123
|
return s("div", { staticClass: "span-tree-container" }, [a.treeData.length === 0 ? s("div", { staticClass: "empty-state" }, [s("el-empty", { attrs: { description: "暂无 Span 数据" } })], 1) : s("div", { staticClass: "timeline-wrapper" }, [s("div", { staticClass: "timeline-header" }, [s("div", { staticClass: "time-scale" }, [s("span", { staticClass: "time-start" }, [a._v(a._s(a.formatTime(a.traceStartTime)))]), s("span", { staticClass: "time-end" }, [a._v(a._s(a.formatTime(a.traceEndTime)))])])]), s("div", { ref: "timelineContent", staticClass: "timeline-content" }, a._l(a.treeData, function(l, h) {
|
|
9122
9124
|
return s("div", { key: l.span_id, staticClass: "timeline-node", class: { selected: a.selectedSpanId === l.span_id }, on: { click: function(g) {
|
|
@@ -9135,15 +9137,15 @@ var wd = function() {
|
|
|
9135
9137
|
}), 0) : a._e()]);
|
|
9136
9138
|
}), 0) : a._e()]);
|
|
9137
9139
|
}), 0)])]);
|
|
9138
|
-
},
|
|
9139
|
-
bd,
|
|
9140
|
+
}, kd = [], Sd = /* @__PURE__ */ ff(
|
|
9140
9141
|
wd,
|
|
9141
9142
|
xd,
|
|
9143
|
+
kd,
|
|
9142
9144
|
!1,
|
|
9143
9145
|
null,
|
|
9144
9146
|
"4f00ade1"
|
|
9145
9147
|
);
|
|
9146
|
-
const
|
|
9148
|
+
const cf = Sd.exports;
|
|
9147
9149
|
/*!
|
|
9148
9150
|
* Viewer.js v1.11.7
|
|
9149
9151
|
* https://fengyuanchen.github.io/viewerjs
|
|
@@ -9153,29 +9155,29 @@ const lf = kd.exports;
|
|
|
9153
9155
|
*
|
|
9154
9156
|
* Date: 2024-11-24T04:32:19.116Z
|
|
9155
9157
|
*/
|
|
9156
|
-
function
|
|
9158
|
+
function Cd(f, a) {
|
|
9157
9159
|
if (!(f instanceof a)) throw new TypeError("Cannot call a class as a function");
|
|
9158
9160
|
}
|
|
9159
|
-
function
|
|
9161
|
+
function cu(f, a) {
|
|
9160
9162
|
for (var s = 0; s < a.length; s++) {
|
|
9161
9163
|
var l = a[s];
|
|
9162
|
-
l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(f,
|
|
9164
|
+
l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(f, hf(l.key), l);
|
|
9163
9165
|
}
|
|
9164
9166
|
}
|
|
9165
|
-
function
|
|
9166
|
-
return a &&
|
|
9167
|
+
function Td(f, a, s) {
|
|
9168
|
+
return a && cu(f.prototype, a), s && cu(f, s), Object.defineProperty(f, "prototype", {
|
|
9167
9169
|
writable: !1
|
|
9168
9170
|
}), f;
|
|
9169
9171
|
}
|
|
9170
|
-
function
|
|
9171
|
-
return (a =
|
|
9172
|
+
function Ld(f, a, s) {
|
|
9173
|
+
return (a = hf(a)) in f ? Object.defineProperty(f, a, {
|
|
9172
9174
|
value: s,
|
|
9173
9175
|
enumerable: !0,
|
|
9174
9176
|
configurable: !0,
|
|
9175
9177
|
writable: !0
|
|
9176
9178
|
}) : f[a] = s, f;
|
|
9177
9179
|
}
|
|
9178
|
-
function
|
|
9180
|
+
function hu(f, a) {
|
|
9179
9181
|
var s = Object.keys(f);
|
|
9180
9182
|
if (Object.getOwnPropertySymbols) {
|
|
9181
9183
|
var l = Object.getOwnPropertySymbols(f);
|
|
@@ -9188,15 +9190,15 @@ function fu(f, a) {
|
|
|
9188
9190
|
function qs(f) {
|
|
9189
9191
|
for (var a = 1; a < arguments.length; a++) {
|
|
9190
9192
|
var s = arguments[a] != null ? arguments[a] : {};
|
|
9191
|
-
a % 2 ?
|
|
9192
|
-
|
|
9193
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(f, Object.getOwnPropertyDescriptors(s)) :
|
|
9193
|
+
a % 2 ? hu(Object(s), !0).forEach(function(l) {
|
|
9194
|
+
Ld(f, l, s[l]);
|
|
9195
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(f, Object.getOwnPropertyDescriptors(s)) : hu(Object(s)).forEach(function(l) {
|
|
9194
9196
|
Object.defineProperty(f, l, Object.getOwnPropertyDescriptor(s, l));
|
|
9195
9197
|
});
|
|
9196
9198
|
}
|
|
9197
9199
|
return f;
|
|
9198
9200
|
}
|
|
9199
|
-
function
|
|
9201
|
+
function _d(f, a) {
|
|
9200
9202
|
if (typeof f != "object" || !f) return f;
|
|
9201
9203
|
var s = f[Symbol.toPrimitive];
|
|
9202
9204
|
if (s !== void 0) {
|
|
@@ -9206,8 +9208,8 @@ function Ld(f, a) {
|
|
|
9206
9208
|
}
|
|
9207
9209
|
return String(f);
|
|
9208
9210
|
}
|
|
9209
|
-
function
|
|
9210
|
-
var a =
|
|
9211
|
+
function hf(f) {
|
|
9212
|
+
var a = _d(f, "string");
|
|
9211
9213
|
return typeof a == "symbol" ? a : a + "";
|
|
9212
9214
|
}
|
|
9213
9215
|
function Rs(f) {
|
|
@@ -9218,7 +9220,7 @@ function Rs(f) {
|
|
|
9218
9220
|
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
9219
9221
|
}, Rs(f);
|
|
9220
9222
|
}
|
|
9221
|
-
var
|
|
9223
|
+
var du = {
|
|
9222
9224
|
/**
|
|
9223
9225
|
* Enable a modal backdrop, specify `static` for a backdrop
|
|
9224
9226
|
* which doesn't close the modal on click.
|
|
@@ -9423,13 +9425,13 @@ var cu = {
|
|
|
9423
9425
|
zoomed: null,
|
|
9424
9426
|
play: null,
|
|
9425
9427
|
stop: null
|
|
9426
|
-
},
|
|
9428
|
+
}, Ad = '<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>', Oa = typeof window < "u" && typeof window.document < "u", gr = Oa ? window : {}, In = Oa && gr.document.documentElement ? "ontouchstart" in gr.document.documentElement : !1, Xs = Oa ? "PointerEvent" in gr : !1, de = "viewer", ba = "move", df = "switch", yi = "zoom", ga = "".concat(de, "-active"), Od = "".concat(de, "-close"), wa = "".concat(de, "-fade"), zs = "".concat(de, "-fixed"), Ed = "".concat(de, "-fullscreen"), pu = "".concat(de, "-fullscreen-exit"), Kr = "".concat(de, "-hide"), Dd = "".concat(de, "-hide-md-down"), Id = "".concat(de, "-hide-sm-down"), Nd = "".concat(de, "-hide-xs-down"), Nt = "".concat(de, "-in"), ki = "".concat(de, "-invisible"), Nn = "".concat(de, "-loading"), Md = "".concat(de, "-move"), gu = "".concat(de, "-open"), _n = "".concat(de, "-show"), Be = "".concat(de, "-transition"), Mn = "click", Ps = "dblclick", vu = "dragstart", mu = "focusin", yu = "keydown", Mt = "load", Yr = "error", Rd = In ? "touchend touchcancel" : "mouseup", zd = In ? "touchmove" : "mousemove", Pd = In ? "touchstart" : "mousedown", bu = Xs ? "pointerdown" : Pd, wu = Xs ? "pointermove" : zd, xu = Xs ? "pointerup pointercancel" : Rd, ku = "resize", Gt = "transitionend", Su = "wheel", Cu = "ready", Tu = "show", Lu = "shown", _u = "hide", Au = "hidden", Ou = "view", Ci = "viewed", Eu = "move", Du = "moved", Iu = "rotate", Nu = "rotated", Mu = "scale", Ru = "scaled", zu = "zoom", Pu = "zoomed", Fu = "play", Hu = "stop", Ta = "".concat(de, "Action"), Ks = /\s\s*/, va = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
9427
9429
|
function Ti(f) {
|
|
9428
9430
|
return typeof f == "string";
|
|
9429
9431
|
}
|
|
9430
|
-
var
|
|
9432
|
+
var Fd = Number.isNaN || gr.isNaN;
|
|
9431
9433
|
function He(f) {
|
|
9432
|
-
return typeof f == "number" && !
|
|
9434
|
+
return typeof f == "number" && !Fd(f);
|
|
9433
9435
|
}
|
|
9434
9436
|
function On(f) {
|
|
9435
9437
|
return typeof f > "u";
|
|
@@ -9437,13 +9439,13 @@ function On(f) {
|
|
|
9437
9439
|
function Rn(f) {
|
|
9438
9440
|
return Rs(f) === "object" && f !== null;
|
|
9439
9441
|
}
|
|
9440
|
-
var
|
|
9442
|
+
var Hd = Object.prototype.hasOwnProperty;
|
|
9441
9443
|
function En(f) {
|
|
9442
9444
|
if (!Rn(f))
|
|
9443
9445
|
return !1;
|
|
9444
9446
|
try {
|
|
9445
9447
|
var a = f.constructor, s = a.prototype;
|
|
9446
|
-
return a && s &&
|
|
9448
|
+
return a && s && Hd.call(s, "isPrototypeOf");
|
|
9447
9449
|
} catch {
|
|
9448
9450
|
return !1;
|
|
9449
9451
|
}
|
|
@@ -9470,14 +9472,14 @@ var Et = Object.assign || function(a) {
|
|
|
9470
9472
|
a[p] = g[p];
|
|
9471
9473
|
});
|
|
9472
9474
|
}), a;
|
|
9473
|
-
},
|
|
9475
|
+
}, Wd = /^(?:width|height|left|top|marginLeft|marginTop)$/;
|
|
9474
9476
|
function qt(f, a) {
|
|
9475
9477
|
var s = f.style;
|
|
9476
9478
|
Oe(a, function(l, h) {
|
|
9477
|
-
|
|
9479
|
+
Wd.test(h) && He(l) && (l += "px"), s[h] = l;
|
|
9478
9480
|
});
|
|
9479
9481
|
}
|
|
9480
|
-
function
|
|
9482
|
+
function Bd(f) {
|
|
9481
9483
|
return Ti(f) ? f.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">") : f;
|
|
9482
9484
|
}
|
|
9483
9485
|
function An(f, a) {
|
|
@@ -9525,9 +9527,9 @@ function Li(f, a, s) {
|
|
|
9525
9527
|
s ? oe(f, a) : we(f, a);
|
|
9526
9528
|
}
|
|
9527
9529
|
}
|
|
9528
|
-
var
|
|
9530
|
+
var $d = /([a-z\d])([A-Z])/g;
|
|
9529
9531
|
function Ys(f) {
|
|
9530
|
-
return f.replace(
|
|
9532
|
+
return f.replace($d, "$1-$2").toLowerCase();
|
|
9531
9533
|
}
|
|
9532
9534
|
function Dn(f, a) {
|
|
9533
9535
|
return Rn(f[a]) ? f[a] : f.dataset ? f.dataset[a] : f.getAttribute("data-".concat(Ys(a)));
|
|
@@ -9535,7 +9537,7 @@ function Dn(f, a) {
|
|
|
9535
9537
|
function Fs(f, a, s) {
|
|
9536
9538
|
Rn(s) ? f[a] = s : f.dataset ? f.dataset[a] = s : f.setAttribute("data-".concat(Ys(a)), s);
|
|
9537
9539
|
}
|
|
9538
|
-
var
|
|
9540
|
+
var pf = function() {
|
|
9539
9541
|
var f = !1;
|
|
9540
9542
|
if (Oa) {
|
|
9541
9543
|
var a = !1, s = function() {
|
|
@@ -9559,7 +9561,7 @@ var cf = function() {
|
|
|
9559
9561
|
function _e(f, a, s) {
|
|
9560
9562
|
var l = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, h = s;
|
|
9561
9563
|
a.trim().split(Ks).forEach(function(g) {
|
|
9562
|
-
if (!
|
|
9564
|
+
if (!pf) {
|
|
9563
9565
|
var p = f.listeners;
|
|
9564
9566
|
p && p[g] && p[g][s] && (h = p[g][s], delete p[g][s], Object.keys(p[g]).length === 0 && delete p[g], Object.keys(p).length === 0 && delete f.listeners);
|
|
9565
9567
|
}
|
|
@@ -9569,7 +9571,7 @@ function _e(f, a, s) {
|
|
|
9569
9571
|
function ue(f, a, s) {
|
|
9570
9572
|
var l = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, h = s;
|
|
9571
9573
|
a.trim().split(Ks).forEach(function(g) {
|
|
9572
|
-
if (l.once && !
|
|
9574
|
+
if (l.once && !pf) {
|
|
9573
9575
|
var p = f.listeners, y = p === void 0 ? {} : p;
|
|
9574
9576
|
h = function() {
|
|
9575
9577
|
delete y[g][s], f.removeEventListener(g, h, l);
|
|
@@ -9589,7 +9591,7 @@ function qe(f, a, s, l) {
|
|
|
9589
9591
|
detail: s
|
|
9590
9592
|
}, l)) : (h = document.createEvent("CustomEvent"), h.initCustomEvent(a, !0, !0, s)), f.dispatchEvent(h);
|
|
9591
9593
|
}
|
|
9592
|
-
function
|
|
9594
|
+
function Ud(f) {
|
|
9593
9595
|
var a = f.getBoundingClientRect();
|
|
9594
9596
|
return {
|
|
9595
9597
|
left: a.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
@@ -9606,11 +9608,11 @@ function xa(f) {
|
|
|
9606
9608
|
transform: y
|
|
9607
9609
|
};
|
|
9608
9610
|
}
|
|
9609
|
-
function
|
|
9611
|
+
function jd(f) {
|
|
9610
9612
|
return Ti(f) ? decodeURIComponent(f.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
|
|
9611
9613
|
}
|
|
9612
9614
|
var Os = gr.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test(gr.navigator.userAgent);
|
|
9613
|
-
function
|
|
9615
|
+
function gf(f, a, s) {
|
|
9614
9616
|
var l = document.createElement("img");
|
|
9615
9617
|
if (f.naturalWidth && !Os)
|
|
9616
9618
|
return s(f.naturalWidth, f.naturalHeight), l;
|
|
@@ -9625,16 +9627,16 @@ function hf(f, a, s) {
|
|
|
9625
9627
|
function ma(f) {
|
|
9626
9628
|
switch (f) {
|
|
9627
9629
|
case 2:
|
|
9628
|
-
return
|
|
9630
|
+
return Nd;
|
|
9629
9631
|
case 3:
|
|
9630
|
-
return
|
|
9632
|
+
return Id;
|
|
9631
9633
|
case 4:
|
|
9632
|
-
return
|
|
9634
|
+
return Dd;
|
|
9633
9635
|
default:
|
|
9634
9636
|
return "";
|
|
9635
9637
|
}
|
|
9636
9638
|
}
|
|
9637
|
-
function
|
|
9639
|
+
function Gd(f) {
|
|
9638
9640
|
var a = qs({}, f), s = [];
|
|
9639
9641
|
return Oe(f, function(l, h) {
|
|
9640
9642
|
delete a[h], Oe(a, function(g) {
|
|
@@ -9656,7 +9658,7 @@ function ya(f, a) {
|
|
|
9656
9658
|
startY: l
|
|
9657
9659
|
}, h);
|
|
9658
9660
|
}
|
|
9659
|
-
function
|
|
9661
|
+
function qd(f) {
|
|
9660
9662
|
var a = 0, s = 0, l = 0;
|
|
9661
9663
|
return Oe(f, function(h) {
|
|
9662
9664
|
var g = h.startX, p = h.startY;
|
|
@@ -9666,7 +9668,7 @@ function Gd(f) {
|
|
|
9666
9668
|
pageY: s
|
|
9667
9669
|
};
|
|
9668
9670
|
}
|
|
9669
|
-
var
|
|
9671
|
+
var Xd = {
|
|
9670
9672
|
render: function() {
|
|
9671
9673
|
this.initContainer(), this.initViewer(), this.initList(), this.renderViewer();
|
|
9672
9674
|
},
|
|
@@ -9693,7 +9695,7 @@ var qd = {
|
|
|
9693
9695
|
initList: function() {
|
|
9694
9696
|
var a = this, s = this.element, l = this.options, h = this.list, g = [];
|
|
9695
9697
|
h.innerHTML = "", Oe(this.images, function(p, y) {
|
|
9696
|
-
var w = p.src, b = p.alt ||
|
|
9698
|
+
var w = p.src, b = p.alt || jd(w), k = a.getImageURL(p);
|
|
9697
9699
|
if (w || k) {
|
|
9698
9700
|
var A = document.createElement("li"), L = document.createElement("img");
|
|
9699
9701
|
Oe(l.inheritedAttributes, function(H) {
|
|
@@ -9741,7 +9743,7 @@ var qd = {
|
|
|
9741
9743
|
abort: function() {
|
|
9742
9744
|
k.onload = null;
|
|
9743
9745
|
}
|
|
9744
|
-
}, k =
|
|
9746
|
+
}, k = gf(h, l, function(A, L) {
|
|
9745
9747
|
var H = A / L, P = Math.max(0, Math.min(1, l.initialCoverage)), $ = y, N = w;
|
|
9746
9748
|
s.imageInitializing = !1, w * H > y ? N = y / H : $ = w * H, P = He(P) ? P : 0.9, $ = Math.min($ * P, A), N = Math.min(N * P, L);
|
|
9747
9749
|
var E = (y - $) / 2, D = (w - N) / 2, R = {
|
|
@@ -9787,22 +9789,22 @@ var qd = {
|
|
|
9787
9789
|
var a = this.image;
|
|
9788
9790
|
a && (this.viewing && this.viewing.abort(), a.parentNode.removeChild(a), this.image = null, this.title.innerHTML = "");
|
|
9789
9791
|
}
|
|
9790
|
-
},
|
|
9792
|
+
}, Kd = {
|
|
9791
9793
|
bind: function() {
|
|
9792
9794
|
var a = this.options, s = this.viewer, l = this.canvas, h = this.element.ownerDocument;
|
|
9793
|
-
ue(s, Mn, this.onClick = this.click.bind(this)), ue(s,
|
|
9795
|
+
ue(s, Mn, this.onClick = this.click.bind(this)), ue(s, vu, this.onDragStart = this.dragstart.bind(this)), ue(l, bu, this.onPointerDown = this.pointerdown.bind(this)), ue(h, wu, this.onPointerMove = this.pointermove.bind(this)), ue(h, xu, this.onPointerUp = this.pointerup.bind(this)), ue(h, yu, this.onKeyDown = this.keydown.bind(this)), ue(window, ku, this.onResize = this.resize.bind(this)), a.zoomable && a.zoomOnWheel && ue(s, Su, this.onWheel = this.wheel.bind(this), {
|
|
9794
9796
|
passive: !1,
|
|
9795
9797
|
capture: !0
|
|
9796
9798
|
}), a.toggleOnDblclick && ue(l, Ps, this.onDblclick = this.dblclick.bind(this));
|
|
9797
9799
|
},
|
|
9798
9800
|
unbind: function() {
|
|
9799
9801
|
var a = this.options, s = this.viewer, l = this.canvas, h = this.element.ownerDocument;
|
|
9800
|
-
_e(s, Mn, this.onClick), _e(s,
|
|
9802
|
+
_e(s, Mn, this.onClick), _e(s, vu, this.onDragStart), _e(l, bu, this.onPointerDown), _e(h, wu, this.onPointerMove), _e(h, xu, this.onPointerUp), _e(h, yu, this.onKeyDown), _e(window, ku, this.onResize), a.zoomable && a.zoomOnWheel && _e(s, Su, this.onWheel, {
|
|
9801
9803
|
passive: !1,
|
|
9802
9804
|
capture: !0
|
|
9803
9805
|
}), a.toggleOnDblclick && _e(l, Ps, this.onDblclick);
|
|
9804
9806
|
}
|
|
9805
|
-
},
|
|
9807
|
+
}, Yd = {
|
|
9806
9808
|
click: function(a) {
|
|
9807
9809
|
var s = this.options, l = this.imageData, h = a.target, g = Dn(h, Ta);
|
|
9808
9810
|
switch (!g && h.localName === "img" && h.parentElement.localName === "li" && (h = h.parentElement, g = Dn(h, Ta)), In && a.isTrusted && h === this.canvas && clearTimeout(this.clickCanvasTimeout), g) {
|
|
@@ -9860,7 +9862,7 @@ var qd = {
|
|
|
9860
9862
|
this.timeout && (clearTimeout(this.timeout), this.timeout = !1);
|
|
9861
9863
|
var s = this.element, l = this.options, h = this.image, g = this.index, p = this.viewerData;
|
|
9862
9864
|
we(h, ki), l.loading && we(this.canvas, Nn), h.style.cssText = "height:0;" + "margin-left:".concat(p.width / 2, "px;") + "margin-top:".concat(p.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function() {
|
|
9863
|
-
Li(h,
|
|
9865
|
+
Li(h, Md, l.movable), Li(h, Be, l.transition), a.renderImage(function() {
|
|
9864
9866
|
a.viewed = !0, a.viewing = !1, Le(l.viewed) && ue(s, Ci, l.viewed, {
|
|
9865
9867
|
once: !0
|
|
9866
9868
|
}), qe(s, Ci, {
|
|
@@ -9875,7 +9877,7 @@ var qd = {
|
|
|
9875
9877
|
},
|
|
9876
9878
|
loadImage: function(a) {
|
|
9877
9879
|
var s = a.target, l = s.parentNode, h = l.offsetWidth || 30, g = l.offsetHeight || 50, p = !!Dn(s, "filled");
|
|
9878
|
-
|
|
9880
|
+
gf(s, this.options, function(y, w) {
|
|
9879
9881
|
var b = y / w, k = h, A = g;
|
|
9880
9882
|
g * b > h ? p ? k = g * b : A = h / b : p ? A = h / b : k = g * b, qt(s, Et({
|
|
9881
9883
|
width: k,
|
|
@@ -9933,7 +9935,7 @@ var qd = {
|
|
|
9933
9935
|
l[y.identifier] = ya(y);
|
|
9934
9936
|
}) : l[a.pointerId || 0] = ya(a);
|
|
9935
9937
|
var p = s.movable ? ba : !1;
|
|
9936
|
-
s.zoomOnTouch && s.zoomable && Object.keys(l).length > 1 ? p = yi : s.slideOnTouch && (a.pointerType === "touch" || a.type === "touchstart") && this.isSwitchable() && (p =
|
|
9938
|
+
s.zoomOnTouch && s.zoomable && Object.keys(l).length > 1 ? p = yi : s.slideOnTouch && (a.pointerType === "touch" || a.type === "touchstart") && this.isSwitchable() && (p = df), s.transition && (p === ba || p === yi) && we(this.image, Be), this.action = p;
|
|
9937
9939
|
}
|
|
9938
9940
|
},
|
|
9939
9941
|
pointermove: function(a) {
|
|
@@ -9984,7 +9986,7 @@ var qd = {
|
|
|
9984
9986
|
a.deltaY ? h = a.deltaY > 0 ? 1 : -1 : a.wheelDelta ? h = -a.wheelDelta / 120 : a.detail && (h = a.detail > 0 ? 1 : -1), this.zoom(-h * l, !0, null, a);
|
|
9985
9987
|
}
|
|
9986
9988
|
}
|
|
9987
|
-
},
|
|
9989
|
+
}, Zd = {
|
|
9988
9990
|
/** Show the viewer (only available in modal mode)
|
|
9989
9991
|
* @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
|
|
9990
9992
|
* @returns {Viewer} this
|
|
@@ -9995,9 +9997,9 @@ var qd = {
|
|
|
9995
9997
|
return this;
|
|
9996
9998
|
if (!this.ready)
|
|
9997
9999
|
return this.build(), this.ready && this.show(a), this;
|
|
9998
|
-
if (Le(l.show) && ue(s,
|
|
10000
|
+
if (Le(l.show) && ue(s, Tu, l.show, {
|
|
9999
10001
|
once: !0
|
|
10000
|
-
}), qe(s,
|
|
10002
|
+
}), qe(s, Tu) === !1 || !this.ready)
|
|
10001
10003
|
return this;
|
|
10002
10004
|
this.hiding && this.transitioning.abort(), this.showing = !0, this.open();
|
|
10003
10005
|
var h = this.viewer;
|
|
@@ -10023,9 +10025,9 @@ var qd = {
|
|
|
10023
10025
|
var a = this, s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, l = this.element, h = this.options;
|
|
10024
10026
|
if (h.inline || this.hiding || !(this.isShown || this.showing))
|
|
10025
10027
|
return this;
|
|
10026
|
-
if (Le(h.hide) && ue(l,
|
|
10028
|
+
if (Le(h.hide) && ue(l, _u, h.hide, {
|
|
10027
10029
|
once: !0
|
|
10028
|
-
}), qe(l,
|
|
10030
|
+
}), qe(l, _u) === !1)
|
|
10029
10031
|
return this;
|
|
10030
10032
|
this.showing && this.transitioning.abort(), this.hiding = !0, this.played ? this.stop() : this.viewing && this.viewing.abort();
|
|
10031
10033
|
var g = this.viewer, p = this.image, y = function() {
|
|
@@ -10064,9 +10066,9 @@ var qd = {
|
|
|
10064
10066
|
if (Oe(h.inheritedAttributes, function(N) {
|
|
10065
10067
|
var E = w.getAttribute(N);
|
|
10066
10068
|
E !== null && A.setAttribute(N, E);
|
|
10067
|
-
}), A.src = b, A.alt = k, Le(h.view) && ue(l,
|
|
10069
|
+
}), A.src = b, A.alt = k, Le(h.view) && ue(l, Ou, h.view, {
|
|
10068
10070
|
once: !0
|
|
10069
|
-
}), qe(l,
|
|
10071
|
+
}), qe(l, Ou, {
|
|
10070
10072
|
originalImage: this.images[s],
|
|
10071
10073
|
index: s,
|
|
10072
10074
|
image: A
|
|
@@ -10076,7 +10078,7 @@ var qd = {
|
|
|
10076
10078
|
L && (we(L, ga), L.removeAttribute("aria-selected")), oe(y, ga), y.setAttribute("aria-selected", !0), h.focus && y.focus(), this.image = A, this.viewed = !1, this.index = s, this.imageData = {}, oe(A, ki), h.loading && oe(p, Nn), p.innerHTML = "", p.appendChild(A), this.renderList(), g.innerHTML = "";
|
|
10077
10079
|
var H = function() {
|
|
10078
10080
|
var E = a.imageData, D = Array.isArray(h.title) ? h.title[1] : h.title;
|
|
10079
|
-
g.innerHTML =
|
|
10081
|
+
g.innerHTML = Bd(Le(D) ? D.call(a, A, E) : "".concat(k, " (").concat(E.naturalWidth, " × ").concat(E.naturalHeight, ")"));
|
|
10080
10082
|
}, P, $;
|
|
10081
10083
|
return ue(l, Ci, H, {
|
|
10082
10084
|
once: !0
|
|
@@ -10138,9 +10140,9 @@ var qd = {
|
|
|
10138
10140
|
if (a = Number(a), l = Number(l), this.viewed && !this.played && p.movable) {
|
|
10139
10141
|
var w = y.x, b = y.y, k = !1;
|
|
10140
10142
|
if (He(a) ? k = !0 : a = w, He(l) ? k = !0 : l = b, k) {
|
|
10141
|
-
if (Le(p.move) && ue(g,
|
|
10143
|
+
if (Le(p.move) && ue(g, Eu, p.move, {
|
|
10142
10144
|
once: !0
|
|
10143
|
-
}), qe(g,
|
|
10145
|
+
}), qe(g, Eu, {
|
|
10144
10146
|
x: a,
|
|
10145
10147
|
y: l,
|
|
10146
10148
|
oldX: w,
|
|
@@ -10149,9 +10151,9 @@ var qd = {
|
|
|
10149
10151
|
}) === !1)
|
|
10150
10152
|
return this;
|
|
10151
10153
|
y.x = a, y.y = l, y.left = a, y.top = l, this.moving = !0, this.renderImage(function() {
|
|
10152
|
-
s.moving = !1, Le(p.moved) && ue(g,
|
|
10154
|
+
s.moving = !1, Le(p.moved) && ue(g, Du, p.moved, {
|
|
10153
10155
|
once: !0
|
|
10154
|
-
}), qe(g,
|
|
10156
|
+
}), qe(g, Du, {
|
|
10155
10157
|
x: a,
|
|
10156
10158
|
y: l,
|
|
10157
10159
|
oldX: w,
|
|
@@ -10182,17 +10184,17 @@ var qd = {
|
|
|
10182
10184
|
var s = this, l = this.element, h = this.options, g = this.imageData;
|
|
10183
10185
|
if (a = Number(a), He(a) && this.viewed && !this.played && h.rotatable) {
|
|
10184
10186
|
var p = g.rotate;
|
|
10185
|
-
if (Le(h.rotate) && ue(l,
|
|
10187
|
+
if (Le(h.rotate) && ue(l, Iu, h.rotate, {
|
|
10186
10188
|
once: !0
|
|
10187
|
-
}), qe(l,
|
|
10189
|
+
}), qe(l, Iu, {
|
|
10188
10190
|
degree: a,
|
|
10189
10191
|
oldDegree: p
|
|
10190
10192
|
}) === !1)
|
|
10191
10193
|
return this;
|
|
10192
10194
|
g.rotate = a, this.rotating = !0, this.renderImage(function() {
|
|
10193
|
-
s.rotating = !1, Le(h.rotated) && ue(l,
|
|
10195
|
+
s.rotating = !1, Le(h.rotated) && ue(l, Nu, h.rotated, {
|
|
10194
10196
|
once: !0
|
|
10195
|
-
}), qe(l,
|
|
10197
|
+
}), qe(l, Nu, {
|
|
10196
10198
|
degree: a,
|
|
10197
10199
|
oldDegree: p
|
|
10198
10200
|
}, {
|
|
@@ -10229,9 +10231,9 @@ var qd = {
|
|
|
10229
10231
|
if (a = Number(a), l = Number(l), this.viewed && !this.played && g.scalable) {
|
|
10230
10232
|
var y = p.scaleX, w = p.scaleY, b = !1;
|
|
10231
10233
|
if (He(a) ? b = !0 : a = y, He(l) ? b = !0 : l = w, b) {
|
|
10232
|
-
if (Le(g.scale) && ue(h,
|
|
10234
|
+
if (Le(g.scale) && ue(h, Mu, g.scale, {
|
|
10233
10235
|
once: !0
|
|
10234
|
-
}), qe(h,
|
|
10236
|
+
}), qe(h, Mu, {
|
|
10235
10237
|
scaleX: a,
|
|
10236
10238
|
scaleY: l,
|
|
10237
10239
|
oldScaleX: y,
|
|
@@ -10239,9 +10241,9 @@ var qd = {
|
|
|
10239
10241
|
}) === !1)
|
|
10240
10242
|
return this;
|
|
10241
10243
|
p.scaleX = a, p.scaleY = l, this.scaling = !0, this.renderImage(function() {
|
|
10242
|
-
s.scaling = !1, Le(g.scaled) && ue(h,
|
|
10244
|
+
s.scaling = !1, Le(g.scaled) && ue(h, Ru, g.scaled, {
|
|
10243
10245
|
once: !0
|
|
10244
|
-
}), qe(h,
|
|
10246
|
+
}), qe(h, Ru, {
|
|
10245
10247
|
scaleX: a,
|
|
10246
10248
|
scaleY: l,
|
|
10247
10249
|
oldScaleX: y,
|
|
@@ -10294,25 +10296,25 @@ var qd = {
|
|
|
10294
10296
|
break;
|
|
10295
10297
|
}
|
|
10296
10298
|
var R = $ * a, q = N * a, Z = R - H, ee = q - P, ne = k.ratio;
|
|
10297
|
-
if (Le(w.zoom) && ue(y,
|
|
10299
|
+
if (Le(w.zoom) && ue(y, zu, w.zoom, {
|
|
10298
10300
|
once: !0
|
|
10299
|
-
}), qe(y,
|
|
10301
|
+
}), qe(y, zu, {
|
|
10300
10302
|
ratio: a,
|
|
10301
10303
|
oldRatio: ne,
|
|
10302
10304
|
originalEvent: g
|
|
10303
10305
|
}) === !1)
|
|
10304
10306
|
return this;
|
|
10305
10307
|
if (this.zooming = !0, g) {
|
|
10306
|
-
var le =
|
|
10308
|
+
var le = Ud(this.viewer), Ae = b && Object.keys(b).length > 0 ? qd(b) : {
|
|
10307
10309
|
pageX: g.pageX,
|
|
10308
10310
|
pageY: g.pageY
|
|
10309
10311
|
};
|
|
10310
10312
|
k.x -= Z * ((Ae.pageX - le.left - A) / H), k.y -= ee * ((Ae.pageY - le.top - L) / P);
|
|
10311
10313
|
} else En(h) && He(h.x) && He(h.y) ? (k.x -= Z * ((h.x - A) / H), k.y -= ee * ((h.y - L) / P)) : (k.x -= Z / 2, k.y -= ee / 2);
|
|
10312
10314
|
k.left = k.x, k.top = k.y, k.width = R, k.height = q, k.oldRatio = ne, k.ratio = a, this.renderImage(function() {
|
|
10313
|
-
s.zooming = !1, Le(w.zoomed) && ue(y,
|
|
10315
|
+
s.zooming = !1, Le(w.zoomed) && ue(y, Pu, w.zoomed, {
|
|
10314
10316
|
once: !0
|
|
10315
|
-
}), qe(y,
|
|
10317
|
+
}), qe(y, Pu, {
|
|
10316
10318
|
ratio: a,
|
|
10317
10319
|
oldRatio: ne,
|
|
10318
10320
|
originalEvent: g
|
|
@@ -10333,9 +10335,9 @@ var qd = {
|
|
|
10333
10335
|
if (!this.isShown || this.played)
|
|
10334
10336
|
return this;
|
|
10335
10337
|
var l = this.element, h = this.options;
|
|
10336
|
-
if (Le(h.play) && ue(l,
|
|
10338
|
+
if (Le(h.play) && ue(l, Fu, h.play, {
|
|
10337
10339
|
once: !0
|
|
10338
|
-
}), qe(l,
|
|
10340
|
+
}), qe(l, Fu) === !1)
|
|
10339
10341
|
return this;
|
|
10340
10342
|
var g = this.player, p = this.loadImage.bind(this), y = [], w = 0, b = 0;
|
|
10341
10343
|
if (this.played = !0, this.onLoadWhenPlay = p, s && this.requestFullscreen(s), oe(g, _n), Oe(this.items, function(L, H) {
|
|
@@ -10363,9 +10365,9 @@ var qd = {
|
|
|
10363
10365
|
if (!this.played)
|
|
10364
10366
|
return this;
|
|
10365
10367
|
var s = this.element, l = this.options;
|
|
10366
|
-
if (Le(l.stop) && ue(s,
|
|
10368
|
+
if (Le(l.stop) && ue(s, Hu, l.stop, {
|
|
10367
10369
|
once: !0
|
|
10368
|
-
}), qe(s,
|
|
10370
|
+
}), qe(s, Hu) === !1)
|
|
10369
10371
|
return this;
|
|
10370
10372
|
var h = this.player;
|
|
10371
10373
|
return clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1, Oe(h.getElementsByTagName("img"), function(g) {
|
|
@@ -10375,7 +10377,7 @@ var qd = {
|
|
|
10375
10377
|
// Enter modal mode (only available in inline mode)
|
|
10376
10378
|
full: function() {
|
|
10377
10379
|
var a = this, s = this.options, l = this.viewer, h = this.image, g = this.list;
|
|
10378
|
-
return !this.isShown || this.played || this.fulled || !s.inline ? this : (this.fulled = !0, this.open(), oe(this.button,
|
|
10380
|
+
return !this.isShown || this.played || this.fulled || !s.inline ? this : (this.fulled = !0, this.open(), oe(this.button, pu), s.transition && (we(g, Be), this.viewed && we(h, Be)), oe(l, zs), l.setAttribute("role", "dialog"), l.setAttribute("aria-labelledby", this.title.id), l.setAttribute("aria-modal", !0), l.removeAttribute("style"), qt(l, {
|
|
10379
10381
|
zIndex: s.zIndex
|
|
10380
10382
|
}), s.focus && this.enforceFocus(), this.initContainer(), this.viewerData = Et({}, this.containerData), this.renderList(), this.viewed && this.initImage(function() {
|
|
10381
10383
|
a.renderImage(function() {
|
|
@@ -10388,7 +10390,7 @@ var qd = {
|
|
|
10388
10390
|
// Exit modal mode (only available in inline mode)
|
|
10389
10391
|
exit: function() {
|
|
10390
10392
|
var a = this, s = this.options, l = this.viewer, h = this.image, g = this.list;
|
|
10391
|
-
return !this.isShown || this.played || !this.fulled || !s.inline ? this : (this.fulled = !1, this.close(), we(this.button,
|
|
10393
|
+
return !this.isShown || this.played || !this.fulled || !s.inline ? this : (this.fulled = !1, this.close(), we(this.button, pu), s.transition && (we(g, Be), this.viewed && we(h, Be)), s.focus && this.clearEnforceFocus(), l.removeAttribute("role"), l.removeAttribute("aria-labelledby"), l.removeAttribute("aria-modal"), we(l, zs), qt(l, {
|
|
10392
10394
|
zIndex: s.zIndexInline
|
|
10393
10395
|
}), this.viewerData = Et({}, this.parentData), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
|
|
10394
10396
|
a.renderImage(function() {
|
|
@@ -10461,14 +10463,14 @@ var qd = {
|
|
|
10461
10463
|
var a = this.element, s = this.options;
|
|
10462
10464
|
return a[de] ? (this.destroyed = !0, this.ready ? (this.played && this.stop(), s.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : s.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), s.inline || _e(a, Mn, this.onStart), a[de] = void 0, this) : this;
|
|
10463
10465
|
}
|
|
10464
|
-
},
|
|
10466
|
+
}, Qd = {
|
|
10465
10467
|
getImageURL: function(a) {
|
|
10466
10468
|
var s = this.options.url;
|
|
10467
10469
|
return Ti(s) ? s = a.getAttribute(s) : Le(s) ? s = s.call(this, a) : s = "", s;
|
|
10468
10470
|
},
|
|
10469
10471
|
enforceFocus: function() {
|
|
10470
10472
|
var a = this;
|
|
10471
|
-
this.clearEnforceFocus(), ue(document,
|
|
10473
|
+
this.clearEnforceFocus(), ue(document, mu, this.onFocusin = function(s) {
|
|
10472
10474
|
var l = a.viewer, h = s.target;
|
|
10473
10475
|
if (!(h === document || h === l || l.contains(h))) {
|
|
10474
10476
|
for (; h; ) {
|
|
@@ -10481,27 +10483,27 @@ var qd = {
|
|
|
10481
10483
|
});
|
|
10482
10484
|
},
|
|
10483
10485
|
clearEnforceFocus: function() {
|
|
10484
|
-
this.onFocusin && (_e(document,
|
|
10486
|
+
this.onFocusin && (_e(document, mu, this.onFocusin), this.onFocusin = null);
|
|
10485
10487
|
},
|
|
10486
10488
|
open: function() {
|
|
10487
10489
|
var a = this.body;
|
|
10488
|
-
oe(a,
|
|
10490
|
+
oe(a, gu), this.scrollbarWidth > 0 && (a.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px"));
|
|
10489
10491
|
},
|
|
10490
10492
|
close: function() {
|
|
10491
10493
|
var a = this.body;
|
|
10492
|
-
we(a,
|
|
10494
|
+
we(a, gu), this.scrollbarWidth > 0 && (a.style.paddingRight = this.initialBodyPaddingRight);
|
|
10493
10495
|
},
|
|
10494
10496
|
shown: function() {
|
|
10495
10497
|
var a = this.element, s = this.options, l = this.viewer;
|
|
10496
|
-
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, s.focus && (l.focus(), this.enforceFocus()), Le(s.shown) && ue(a,
|
|
10498
|
+
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, s.focus && (l.focus(), this.enforceFocus()), Le(s.shown) && ue(a, Lu, s.shown, {
|
|
10497
10499
|
once: !0
|
|
10498
|
-
}), qe(a,
|
|
10500
|
+
}), qe(a, Lu) !== !1 && this.ready && this.isShown && !this.hiding && this.view(this.index);
|
|
10499
10501
|
},
|
|
10500
10502
|
hidden: function() {
|
|
10501
10503
|
var a = this.element, s = this.options, l = this.viewer;
|
|
10502
|
-
s.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), oe(l, Kr), l.removeAttribute("role"), l.removeAttribute("aria-labelledby"), l.removeAttribute("aria-modal"), l.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.hiding = !1, this.destroyed || (Le(s.hidden) && ue(a,
|
|
10504
|
+
s.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), oe(l, Kr), l.removeAttribute("role"), l.removeAttribute("aria-labelledby"), l.removeAttribute("aria-modal"), l.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.hiding = !1, this.destroyed || (Le(s.hidden) && ue(a, Au, s.hidden, {
|
|
10503
10505
|
once: !0
|
|
10504
|
-
}), qe(a,
|
|
10506
|
+
}), qe(a, Au, null, {
|
|
10505
10507
|
cancelable: !1
|
|
10506
10508
|
}));
|
|
10507
10509
|
},
|
|
@@ -10525,9 +10527,9 @@ var qd = {
|
|
|
10525
10527
|
(g !== 0 || p !== 0) && (this.pointerMoved = !0, this.move(g, p, a));
|
|
10526
10528
|
break;
|
|
10527
10529
|
case yi:
|
|
10528
|
-
this.zoom(
|
|
10530
|
+
this.zoom(Gd(l), !1, null, a);
|
|
10529
10531
|
break;
|
|
10530
|
-
case
|
|
10532
|
+
case df: {
|
|
10531
10533
|
this.action = "switched";
|
|
10532
10534
|
var y = Math.abs(g);
|
|
10533
10535
|
y > 1 && y > Math.abs(p) && (this.pointers = {}, g > 1 ? this.prev(s.loop) : g < -1 && this.next(s.loop));
|
|
@@ -10543,18 +10545,18 @@ var qd = {
|
|
|
10543
10545
|
var a = this.imageData, s = this.viewerData;
|
|
10544
10546
|
return this.length > 1 && a.x >= 0 && a.y >= 0 && a.width <= s.width && a.height <= s.height;
|
|
10545
10547
|
}
|
|
10546
|
-
},
|
|
10548
|
+
}, Vd = gr.Viewer, Jd = /* @__PURE__ */ function(f) {
|
|
10547
10549
|
return function() {
|
|
10548
10550
|
return f += 1, f;
|
|
10549
10551
|
};
|
|
10550
|
-
}(-1),
|
|
10552
|
+
}(-1), vf = /* @__PURE__ */ function() {
|
|
10551
10553
|
function f(a) {
|
|
10552
10554
|
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
10553
|
-
if (
|
|
10555
|
+
if (Cd(this, f), !a || a.nodeType !== 1)
|
|
10554
10556
|
throw new Error("The first argument is required and must be an element.");
|
|
10555
|
-
this.element = a, this.options = Et({},
|
|
10557
|
+
this.element = a, this.options = Et({}, du, En(s) && s), this.action = !1, this.fading = !1, this.fulled = !1, this.hiding = !1, this.imageClicked = !1, this.imageData = {}, this.index = this.options.initialViewIndex, this.isImg = !1, this.isShown = !1, this.length = 0, this.moving = !1, this.played = !1, this.playing = !1, this.pointers = {}, this.ready = !1, this.rotating = !1, this.scaling = !1, this.showing = !1, this.timeout = !1, this.tooltipping = !1, this.viewed = !1, this.viewing = !1, this.wheeling = !1, this.zooming = !1, this.pointerMoved = !1, this.id = Jd(), this.init();
|
|
10556
10558
|
}
|
|
10557
|
-
return
|
|
10559
|
+
return Td(f, [{
|
|
10558
10560
|
key: "init",
|
|
10559
10561
|
value: function() {
|
|
10560
10562
|
var s = this, l = this.element, h = this.options;
|
|
@@ -10610,7 +10612,7 @@ var qd = {
|
|
|
10610
10612
|
value: function() {
|
|
10611
10613
|
if (!this.ready) {
|
|
10612
10614
|
var s = this.element, l = this.options, h = s.parentNode, g = document.createElement("div");
|
|
10613
|
-
g.innerHTML =
|
|
10615
|
+
g.innerHTML = Ad;
|
|
10614
10616
|
var p = g.querySelector(".".concat(de, "-container")), y = p.querySelector(".".concat(de, "-title")), w = p.querySelector(".".concat(de, "-toolbar")), b = p.querySelector(".".concat(de, "-navbar")), k = p.querySelector(".".concat(de, "-button")), A = p.querySelector(".".concat(de, "-canvas"));
|
|
10615
10617
|
if (this.parent = h, this.viewer = p, this.title = y, this.toolbar = w, this.navbar = b, this.button = k, this.canvas = A, this.footer = p.querySelector(".".concat(de, "-footer")), this.tooltipBox = p.querySelector(".".concat(de, "-tooltip")), this.player = p.querySelector(".".concat(de, "-player")), this.list = p.querySelector(".".concat(de, "-list")), p.id = "".concat(de).concat(this.id), y.id = "".concat(de, "Title").concat(this.id), oe(y, l.title ? ma(Array.isArray(l.title) ? l.title[0] : l.title) : Kr), oe(b, l.navbar ? ma(l.navbar) : Kr), Li(k, Kr, !l.button), l.keyboard && k.setAttribute("tabindex", 0), l.backdrop && (oe(p, "".concat(de, "-backdrop")), !l.inline && l.backdrop !== "static" && Fs(A, Ta, "hide")), Ti(l.className) && l.className && l.className.split(Ks).forEach(function(R) {
|
|
10616
10618
|
oe(p, R);
|
|
@@ -10632,21 +10634,21 @@ var qd = {
|
|
|
10632
10634
|
});
|
|
10633
10635
|
}
|
|
10634
10636
|
if (l.inline)
|
|
10635
|
-
oe(k,
|
|
10637
|
+
oe(k, Ed), qt(p, {
|
|
10636
10638
|
zIndex: l.zIndexInline
|
|
10637
10639
|
}), window.getComputedStyle(h).position === "static" && qt(h, {
|
|
10638
10640
|
position: "relative"
|
|
10639
10641
|
}), h.insertBefore(p, s.nextSibling);
|
|
10640
10642
|
else {
|
|
10641
|
-
oe(k,
|
|
10643
|
+
oe(k, Od), oe(p, zs), oe(p, wa), oe(p, Kr), qt(p, {
|
|
10642
10644
|
zIndex: l.zIndex
|
|
10643
10645
|
});
|
|
10644
10646
|
var D = l.container;
|
|
10645
10647
|
Ti(D) && (D = s.ownerDocument.querySelector(D)), D || (D = this.body), D.appendChild(p);
|
|
10646
10648
|
}
|
|
10647
|
-
if (l.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, Le(l.ready) && ue(s,
|
|
10649
|
+
if (l.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, Le(l.ready) && ue(s, Cu, l.ready, {
|
|
10648
10650
|
once: !0
|
|
10649
|
-
}), qe(s,
|
|
10651
|
+
}), qe(s, Cu) === !1) {
|
|
10650
10652
|
this.ready = !1;
|
|
10651
10653
|
return;
|
|
10652
10654
|
}
|
|
@@ -10660,7 +10662,7 @@ var qd = {
|
|
|
10660
10662
|
}], [{
|
|
10661
10663
|
key: "noConflict",
|
|
10662
10664
|
value: function() {
|
|
10663
|
-
return window.Viewer =
|
|
10665
|
+
return window.Viewer = Vd, f;
|
|
10664
10666
|
}
|
|
10665
10667
|
/**
|
|
10666
10668
|
* Change the default options.
|
|
@@ -10669,60 +10671,60 @@ var qd = {
|
|
|
10669
10671
|
}, {
|
|
10670
10672
|
key: "setDefaults",
|
|
10671
10673
|
value: function(s) {
|
|
10672
|
-
Et(
|
|
10674
|
+
Et(du, En(s) && s);
|
|
10673
10675
|
}
|
|
10674
10676
|
}]);
|
|
10675
10677
|
}();
|
|
10676
|
-
Et(
|
|
10677
|
-
var
|
|
10678
|
-
function
|
|
10679
|
-
var a =
|
|
10678
|
+
Et(vf.prototype, Xd, Kd, Yd, Zd, Qd);
|
|
10679
|
+
var ep = typeof global == "object" && global && global.Object === Object && global, mf = ep, tp = typeof self == "object" && self && self.Object === Object && self, rp = mf || tp || Function("return this")(), Zs = rp, np = Zs.Symbol, La = np, yf = Object.prototype, ip = yf.hasOwnProperty, ap = yf.toString, vi = La ? La.toStringTag : void 0;
|
|
10680
|
+
function sp(f) {
|
|
10681
|
+
var a = ip.call(f, vi), s = f[vi];
|
|
10680
10682
|
try {
|
|
10681
10683
|
f[vi] = void 0;
|
|
10682
10684
|
var l = !0;
|
|
10683
10685
|
} catch {
|
|
10684
10686
|
}
|
|
10685
|
-
var h =
|
|
10687
|
+
var h = ap.call(f);
|
|
10686
10688
|
return l && (a ? f[vi] = s : delete f[vi]), h;
|
|
10687
10689
|
}
|
|
10688
|
-
var
|
|
10689
|
-
function
|
|
10690
|
-
return
|
|
10690
|
+
var op = Object.prototype, lp = op.toString;
|
|
10691
|
+
function up(f) {
|
|
10692
|
+
return lp.call(f);
|
|
10691
10693
|
}
|
|
10692
|
-
var
|
|
10694
|
+
var fp = "[object Null]", cp = "[object Undefined]", Wu = La ? La.toStringTag : void 0;
|
|
10693
10695
|
function Qs(f) {
|
|
10694
|
-
return f == null ? f === void 0 ?
|
|
10696
|
+
return f == null ? f === void 0 ? cp : fp : Wu && Wu in Object(f) ? sp(f) : up(f);
|
|
10695
10697
|
}
|
|
10696
10698
|
function Vs(f) {
|
|
10697
10699
|
return f != null && typeof f == "object";
|
|
10698
10700
|
}
|
|
10699
|
-
var
|
|
10701
|
+
var hp = Array.isArray, dp = hp;
|
|
10700
10702
|
function Js(f) {
|
|
10701
10703
|
var a = typeof f;
|
|
10702
10704
|
return f != null && (a == "object" || a == "function");
|
|
10703
10705
|
}
|
|
10704
|
-
function
|
|
10706
|
+
function bf(f) {
|
|
10705
10707
|
return f;
|
|
10706
10708
|
}
|
|
10707
|
-
var
|
|
10708
|
-
function
|
|
10709
|
+
var pp = "[object AsyncFunction]", gp = "[object Function]", vp = "[object GeneratorFunction]", mp = "[object Proxy]";
|
|
10710
|
+
function wf(f) {
|
|
10709
10711
|
if (!Js(f))
|
|
10710
10712
|
return !1;
|
|
10711
10713
|
var a = Qs(f);
|
|
10712
|
-
return a ==
|
|
10714
|
+
return a == gp || a == vp || a == pp || a == mp;
|
|
10713
10715
|
}
|
|
10714
|
-
var
|
|
10716
|
+
var yp = Zs["__core-js_shared__"], Es = yp, Bu = function() {
|
|
10715
10717
|
var f = /[^.]+$/.exec(Es && Es.keys && Es.keys.IE_PROTO || "");
|
|
10716
10718
|
return f ? "Symbol(src)_1." + f : "";
|
|
10717
10719
|
}();
|
|
10718
|
-
function
|
|
10719
|
-
return !!
|
|
10720
|
+
function bp(f) {
|
|
10721
|
+
return !!Bu && Bu in f;
|
|
10720
10722
|
}
|
|
10721
|
-
var
|
|
10722
|
-
function
|
|
10723
|
+
var wp = Function.prototype, xp = wp.toString;
|
|
10724
|
+
function kp(f) {
|
|
10723
10725
|
if (f != null) {
|
|
10724
10726
|
try {
|
|
10725
|
-
return
|
|
10727
|
+
return xp.call(f);
|
|
10726
10728
|
} catch {
|
|
10727
10729
|
}
|
|
10728
10730
|
try {
|
|
@@ -10732,23 +10734,23 @@ function xp(f) {
|
|
|
10732
10734
|
}
|
|
10733
10735
|
return "";
|
|
10734
10736
|
}
|
|
10735
|
-
var
|
|
10736
|
-
"^" +
|
|
10737
|
+
var Sp = /[\\^$.*+?()[\]{}|]/g, Cp = /^\[object .+?Constructor\]$/, Tp = Function.prototype, Lp = Object.prototype, _p = Tp.toString, Ap = Lp.hasOwnProperty, Op = RegExp(
|
|
10738
|
+
"^" + _p.call(Ap).replace(Sp, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
10737
10739
|
);
|
|
10738
|
-
function
|
|
10739
|
-
if (!Js(f) ||
|
|
10740
|
+
function Ep(f) {
|
|
10741
|
+
if (!Js(f) || bp(f))
|
|
10740
10742
|
return !1;
|
|
10741
|
-
var a =
|
|
10742
|
-
return a.test(
|
|
10743
|
+
var a = wf(f) ? Op : Cp;
|
|
10744
|
+
return a.test(kp(f));
|
|
10743
10745
|
}
|
|
10744
|
-
function
|
|
10746
|
+
function Dp(f, a) {
|
|
10745
10747
|
return f == null ? void 0 : f[a];
|
|
10746
10748
|
}
|
|
10747
|
-
function
|
|
10748
|
-
var s =
|
|
10749
|
-
return
|
|
10749
|
+
function Ip(f, a) {
|
|
10750
|
+
var s = Dp(f, a);
|
|
10751
|
+
return Ep(s) ? s : void 0;
|
|
10750
10752
|
}
|
|
10751
|
-
function
|
|
10753
|
+
function Np(f, a, s) {
|
|
10752
10754
|
switch (s.length) {
|
|
10753
10755
|
case 0:
|
|
10754
10756
|
return f.call(a);
|
|
@@ -10761,43 +10763,43 @@ function Ip(f, a, s) {
|
|
|
10761
10763
|
}
|
|
10762
10764
|
return f.apply(a, s);
|
|
10763
10765
|
}
|
|
10764
|
-
var
|
|
10765
|
-
function
|
|
10766
|
+
var Mp = 800, Rp = 16, zp = Date.now;
|
|
10767
|
+
function Pp(f) {
|
|
10766
10768
|
var a = 0, s = 0;
|
|
10767
10769
|
return function() {
|
|
10768
|
-
var l =
|
|
10770
|
+
var l = zp(), h = Rp - (l - s);
|
|
10769
10771
|
if (s = l, h > 0) {
|
|
10770
|
-
if (++a >=
|
|
10772
|
+
if (++a >= Mp)
|
|
10771
10773
|
return arguments[0];
|
|
10772
10774
|
} else
|
|
10773
10775
|
a = 0;
|
|
10774
10776
|
return f.apply(void 0, arguments);
|
|
10775
10777
|
};
|
|
10776
10778
|
}
|
|
10777
|
-
function
|
|
10779
|
+
function Fp(f) {
|
|
10778
10780
|
return function() {
|
|
10779
10781
|
return f;
|
|
10780
10782
|
};
|
|
10781
10783
|
}
|
|
10782
|
-
var
|
|
10784
|
+
var Hp = function() {
|
|
10783
10785
|
try {
|
|
10784
|
-
var f =
|
|
10786
|
+
var f = Ip(Object, "defineProperty");
|
|
10785
10787
|
return f({}, "", {}), f;
|
|
10786
10788
|
} catch {
|
|
10787
10789
|
}
|
|
10788
|
-
}(), _a =
|
|
10790
|
+
}(), _a = Hp, Wp = _a ? function(f, a) {
|
|
10789
10791
|
return _a(f, "toString", {
|
|
10790
10792
|
configurable: !0,
|
|
10791
10793
|
enumerable: !1,
|
|
10792
|
-
value:
|
|
10794
|
+
value: Fp(a),
|
|
10793
10795
|
writable: !0
|
|
10794
10796
|
});
|
|
10795
|
-
} :
|
|
10796
|
-
function
|
|
10797
|
+
} : bf, Bp = Wp, $p = Pp(Bp), Up = $p, jp = 9007199254740991, Gp = /^(?:0|[1-9]\d*)$/;
|
|
10798
|
+
function xf(f, a) {
|
|
10797
10799
|
var s = typeof f;
|
|
10798
|
-
return a = a ??
|
|
10800
|
+
return a = a ?? jp, !!a && (s == "number" || s != "symbol" && Gp.test(f)) && f > -1 && f % 1 == 0 && f < a;
|
|
10799
10801
|
}
|
|
10800
|
-
function
|
|
10802
|
+
function kf(f, a, s) {
|
|
10801
10803
|
a == "__proto__" && _a ? _a(f, a, {
|
|
10802
10804
|
configurable: !0,
|
|
10803
10805
|
enumerable: !0,
|
|
@@ -10805,136 +10807,136 @@ function bf(f, a, s) {
|
|
|
10805
10807
|
writable: !0
|
|
10806
10808
|
}) : f[a] = s;
|
|
10807
10809
|
}
|
|
10808
|
-
function
|
|
10810
|
+
function Sf(f, a) {
|
|
10809
10811
|
return f === a || f !== f && a !== a;
|
|
10810
10812
|
}
|
|
10811
|
-
var
|
|
10812
|
-
function
|
|
10813
|
+
var qp = Object.prototype, Xp = qp.hasOwnProperty;
|
|
10814
|
+
function Cf(f, a, s) {
|
|
10813
10815
|
var l = f[a];
|
|
10814
|
-
(!(
|
|
10816
|
+
(!(Xp.call(f, a) && Sf(l, s)) || s === void 0 && !(a in f)) && kf(f, a, s);
|
|
10815
10817
|
}
|
|
10816
|
-
function
|
|
10818
|
+
function Kp(f, a, s, l) {
|
|
10817
10819
|
var h = !s;
|
|
10818
10820
|
s || (s = {});
|
|
10819
10821
|
for (var g = -1, p = a.length; ++g < p; ) {
|
|
10820
10822
|
var y = a[g], w = void 0;
|
|
10821
|
-
w === void 0 && (w = f[y]), h ?
|
|
10823
|
+
w === void 0 && (w = f[y]), h ? kf(s, y, w) : Cf(s, y, w);
|
|
10822
10824
|
}
|
|
10823
10825
|
return s;
|
|
10824
10826
|
}
|
|
10825
|
-
var
|
|
10826
|
-
function
|
|
10827
|
-
return a =
|
|
10828
|
-
for (var l = arguments, h = -1, g =
|
|
10827
|
+
var $u = Math.max;
|
|
10828
|
+
function Yp(f, a, s) {
|
|
10829
|
+
return a = $u(a === void 0 ? f.length - 1 : a, 0), function() {
|
|
10830
|
+
for (var l = arguments, h = -1, g = $u(l.length - a, 0), p = Array(g); ++h < g; )
|
|
10829
10831
|
p[h] = l[a + h];
|
|
10830
10832
|
h = -1;
|
|
10831
10833
|
for (var y = Array(a + 1); ++h < a; )
|
|
10832
10834
|
y[h] = l[h];
|
|
10833
|
-
return y[a] = s(p),
|
|
10835
|
+
return y[a] = s(p), Np(f, this, y);
|
|
10834
10836
|
};
|
|
10835
10837
|
}
|
|
10836
|
-
function
|
|
10837
|
-
return
|
|
10838
|
+
function Zp(f, a) {
|
|
10839
|
+
return Up(Yp(f, a, bf), f + "");
|
|
10838
10840
|
}
|
|
10839
|
-
var
|
|
10840
|
-
function
|
|
10841
|
-
return typeof f == "number" && f > -1 && f % 1 == 0 && f <=
|
|
10841
|
+
var Qp = 9007199254740991;
|
|
10842
|
+
function Tf(f) {
|
|
10843
|
+
return typeof f == "number" && f > -1 && f % 1 == 0 && f <= Qp;
|
|
10842
10844
|
}
|
|
10843
10845
|
function eo(f) {
|
|
10844
|
-
return f != null &&
|
|
10846
|
+
return f != null && Tf(f.length) && !wf(f);
|
|
10845
10847
|
}
|
|
10846
|
-
function
|
|
10848
|
+
function Vp(f, a, s) {
|
|
10847
10849
|
if (!Js(s))
|
|
10848
10850
|
return !1;
|
|
10849
10851
|
var l = typeof a;
|
|
10850
|
-
return (l == "number" ? eo(s) &&
|
|
10852
|
+
return (l == "number" ? eo(s) && xf(a, s.length) : l == "string" && a in s) ? Sf(s[a], f) : !1;
|
|
10851
10853
|
}
|
|
10852
|
-
function
|
|
10853
|
-
return
|
|
10854
|
+
function Jp(f) {
|
|
10855
|
+
return Zp(function(a, s) {
|
|
10854
10856
|
var l = -1, h = s.length, g = h > 1 ? s[h - 1] : void 0, p = h > 2 ? s[2] : void 0;
|
|
10855
|
-
for (g = f.length > 3 && typeof g == "function" ? (h--, g) : void 0, p &&
|
|
10857
|
+
for (g = f.length > 3 && typeof g == "function" ? (h--, g) : void 0, p && Vp(s[0], s[1], p) && (g = h < 3 ? void 0 : g, h = 1), a = Object(a); ++l < h; ) {
|
|
10856
10858
|
var y = s[l];
|
|
10857
10859
|
y && f(a, y, l, g);
|
|
10858
10860
|
}
|
|
10859
10861
|
return a;
|
|
10860
10862
|
});
|
|
10861
10863
|
}
|
|
10862
|
-
var
|
|
10863
|
-
function
|
|
10864
|
-
var a = f && f.constructor, s = typeof a == "function" && a.prototype ||
|
|
10864
|
+
var eg = Object.prototype;
|
|
10865
|
+
function Lf(f) {
|
|
10866
|
+
var a = f && f.constructor, s = typeof a == "function" && a.prototype || eg;
|
|
10865
10867
|
return f === s;
|
|
10866
10868
|
}
|
|
10867
|
-
function
|
|
10869
|
+
function tg(f, a) {
|
|
10868
10870
|
for (var s = -1, l = Array(f); ++s < f; )
|
|
10869
10871
|
l[s] = a(s);
|
|
10870
10872
|
return l;
|
|
10871
10873
|
}
|
|
10872
|
-
var
|
|
10873
|
-
function
|
|
10874
|
-
return Vs(f) && Qs(f) ==
|
|
10874
|
+
var rg = "[object Arguments]";
|
|
10875
|
+
function Uu(f) {
|
|
10876
|
+
return Vs(f) && Qs(f) == rg;
|
|
10875
10877
|
}
|
|
10876
|
-
var
|
|
10878
|
+
var _f = Object.prototype, ng = _f.hasOwnProperty, ig = _f.propertyIsEnumerable, ag = Uu(/* @__PURE__ */ function() {
|
|
10877
10879
|
return arguments;
|
|
10878
|
-
}()) ?
|
|
10879
|
-
return Vs(f) &&
|
|
10880
|
-
},
|
|
10881
|
-
function
|
|
10880
|
+
}()) ? Uu : function(f) {
|
|
10881
|
+
return Vs(f) && ng.call(f, "callee") && !ig.call(f, "callee");
|
|
10882
|
+
}, sg = ag;
|
|
10883
|
+
function og() {
|
|
10882
10884
|
return !1;
|
|
10883
10885
|
}
|
|
10884
|
-
var
|
|
10885
|
-
Ie[
|
|
10886
|
-
Ie[
|
|
10887
|
-
function Rg(f) {
|
|
10888
|
-
return Vs(f) && kf(f.length) && !!Ie[Qs(f)];
|
|
10889
|
-
}
|
|
10886
|
+
var Af = typeof exports == "object" && exports && !exports.nodeType && exports, ju = Af && typeof module == "object" && module && !module.nodeType && module, lg = ju && ju.exports === Af, Gu = lg ? Zs.Buffer : void 0, ug = Gu ? Gu.isBuffer : void 0, fg = ug || og, cg = fg, hg = "[object Arguments]", dg = "[object Array]", pg = "[object Boolean]", gg = "[object Date]", vg = "[object Error]", mg = "[object Function]", yg = "[object Map]", bg = "[object Number]", wg = "[object Object]", xg = "[object RegExp]", kg = "[object Set]", Sg = "[object String]", Cg = "[object WeakMap]", Tg = "[object ArrayBuffer]", Lg = "[object DataView]", _g = "[object Float32Array]", Ag = "[object Float64Array]", Og = "[object Int8Array]", Eg = "[object Int16Array]", Dg = "[object Int32Array]", Ig = "[object Uint8Array]", Ng = "[object Uint8ClampedArray]", Mg = "[object Uint16Array]", Rg = "[object Uint32Array]", Ie = {};
|
|
10887
|
+
Ie[_g] = Ie[Ag] = Ie[Og] = Ie[Eg] = Ie[Dg] = Ie[Ig] = Ie[Ng] = Ie[Mg] = Ie[Rg] = !0;
|
|
10888
|
+
Ie[hg] = Ie[dg] = Ie[Tg] = Ie[pg] = Ie[Lg] = Ie[gg] = Ie[vg] = Ie[mg] = Ie[yg] = Ie[bg] = Ie[wg] = Ie[xg] = Ie[kg] = Ie[Sg] = Ie[Cg] = !1;
|
|
10890
10889
|
function zg(f) {
|
|
10890
|
+
return Vs(f) && Tf(f.length) && !!Ie[Qs(f)];
|
|
10891
|
+
}
|
|
10892
|
+
function Pg(f) {
|
|
10891
10893
|
return function(a) {
|
|
10892
10894
|
return f(a);
|
|
10893
10895
|
};
|
|
10894
10896
|
}
|
|
10895
|
-
var
|
|
10897
|
+
var Of = typeof exports == "object" && exports && !exports.nodeType && exports, Si = Of && typeof module == "object" && module && !module.nodeType && module, Fg = Si && Si.exports === Of, Ds = Fg && mf.process, Hg = function() {
|
|
10896
10898
|
try {
|
|
10897
10899
|
var f = Si && Si.require && Si.require("util").types;
|
|
10898
10900
|
return f || Ds && Ds.binding && Ds.binding("util");
|
|
10899
10901
|
} catch {
|
|
10900
10902
|
}
|
|
10901
|
-
}(),
|
|
10902
|
-
function
|
|
10903
|
-
var s =
|
|
10903
|
+
}(), qu = Hg, Xu = qu && qu.isTypedArray, Wg = Xu ? Pg(Xu) : zg, Bg = Wg, $g = Object.prototype, Ug = $g.hasOwnProperty;
|
|
10904
|
+
function jg(f, a) {
|
|
10905
|
+
var s = dp(f), l = !s && sg(f), h = !s && !l && cg(f), g = !s && !l && !h && Bg(f), p = s || l || h || g, y = p ? tg(f.length, String) : [], w = y.length;
|
|
10904
10906
|
for (var b in f)
|
|
10905
|
-
|
|
10907
|
+
Ug.call(f, b) && !(p && (b == "length" || h && (b == "offset" || b == "parent") || g && (b == "buffer" || b == "byteLength" || b == "byteOffset") || xf(b, w))) && y.push(b);
|
|
10906
10908
|
return y;
|
|
10907
10909
|
}
|
|
10908
|
-
function
|
|
10910
|
+
function Gg(f, a) {
|
|
10909
10911
|
return function(s) {
|
|
10910
10912
|
return f(a(s));
|
|
10911
10913
|
};
|
|
10912
10914
|
}
|
|
10913
|
-
var
|
|
10914
|
-
function
|
|
10915
|
-
if (!
|
|
10916
|
-
return
|
|
10915
|
+
var qg = Gg(Object.keys, Object), Xg = qg, Kg = Object.prototype, Yg = Kg.hasOwnProperty;
|
|
10916
|
+
function Zg(f) {
|
|
10917
|
+
if (!Lf(f))
|
|
10918
|
+
return Xg(f);
|
|
10917
10919
|
var a = [];
|
|
10918
10920
|
for (var s in Object(f))
|
|
10919
|
-
|
|
10921
|
+
Yg.call(f, s) && s != "constructor" && a.push(s);
|
|
10920
10922
|
return a;
|
|
10921
10923
|
}
|
|
10922
|
-
function
|
|
10923
|
-
return eo(f) ?
|
|
10924
|
+
function Qg(f) {
|
|
10925
|
+
return eo(f) ? jg(f) : Zg(f);
|
|
10924
10926
|
}
|
|
10925
|
-
var
|
|
10926
|
-
if (
|
|
10927
|
-
|
|
10927
|
+
var Vg = Object.prototype, Jg = Vg.hasOwnProperty, ev = Jp(function(f, a) {
|
|
10928
|
+
if (Lf(a) || eo(a)) {
|
|
10929
|
+
Kp(a, Qg(a), f);
|
|
10928
10930
|
return;
|
|
10929
10931
|
}
|
|
10930
10932
|
for (var s in a)
|
|
10931
|
-
|
|
10932
|
-
}),
|
|
10933
|
-
const
|
|
10934
|
-
a =
|
|
10933
|
+
Jg.call(a, s) && Cf(f, s, a[s]);
|
|
10934
|
+
}), tv = ev;
|
|
10935
|
+
const rv = ({ images: f = [], options: a = {} } = {}) => {
|
|
10936
|
+
a = tv(a, {
|
|
10935
10937
|
inline: !1
|
|
10936
10938
|
});
|
|
10937
|
-
const s =
|
|
10939
|
+
const s = Rh.extend({
|
|
10938
10940
|
render(p) {
|
|
10939
10941
|
return p(
|
|
10940
10942
|
"div",
|
|
@@ -10954,17 +10956,17 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
10954
10956
|
}
|
|
10955
10957
|
}), l = new s();
|
|
10956
10958
|
l.$mount(), document.body.appendChild(l.$el);
|
|
10957
|
-
const h = new
|
|
10959
|
+
const h = new vf(l.$el, a), g = h.destroy.bind(h);
|
|
10958
10960
|
return h.destroy = function() {
|
|
10959
10961
|
return g(), l.$destroy(), document.body.removeChild(l.$el), h;
|
|
10960
10962
|
}, h.show(), l.$el.addEventListener("hidden", function() {
|
|
10961
10963
|
this.viewer === h && h.destroy();
|
|
10962
10964
|
}), h;
|
|
10963
|
-
},
|
|
10965
|
+
}, nv = {
|
|
10964
10966
|
name: "Trace",
|
|
10965
10967
|
components: {
|
|
10966
|
-
TraceSpanTree:
|
|
10967
|
-
codemirror:
|
|
10968
|
+
TraceSpanTree: cf,
|
|
10969
|
+
codemirror: Ph.codemirror
|
|
10968
10970
|
},
|
|
10969
10971
|
data() {
|
|
10970
10972
|
return {
|
|
@@ -11078,7 +11080,7 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
11078
11080
|
},
|
|
11079
11081
|
computed: {
|
|
11080
11082
|
drawerTitle() {
|
|
11081
|
-
return this.traceInfo.trace_id ? `${this.$t("trace.traceDetail")}: ${this.traceInfo.
|
|
11083
|
+
return this.traceInfo.trace_id ? `${this.$t("trace.traceDetail")}: ${this.traceInfo.trace_name}` : this.$t("trace.traceDetail");
|
|
11082
11084
|
},
|
|
11083
11085
|
traceStartTime() {
|
|
11084
11086
|
return this.spans.length === 0 ? 0 : Math.min(...this.spans.map((f) => f.start_time_unix_nano));
|
|
@@ -11195,7 +11197,7 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
11195
11197
|
...g,
|
|
11196
11198
|
parsedContent: p
|
|
11197
11199
|
};
|
|
11198
|
-
}), this.filteredSpans = this.spans, this.spans.length > 0 && (this.selectedSpanId = this.spans[0].span_id, this.selectedSpan = this.spans[0], (s = (a = this.selectedSpan.parsedContent) == null ? void 0 : a.inputs) != null && s.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((g, p) => `message-${p}`) : this.messageCollapse = []);
|
|
11200
|
+
}), this.filteredSpans = this.spans, this.spans.length > 0 && (this.selectedSpanId = this.spans[0].span_id, this.selectedSpan = this.spans[0], this.activeTab = this.spans[0].type === "CLIENT" || this.spans[0].type === "CHAT_MODEL" ? "io" : "attributes", (s = (a = this.selectedSpan.parsedContent) == null ? void 0 : a.inputs) != null && s.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((g, p) => `message-${p}`) : this.messageCollapse = []);
|
|
11199
11201
|
} catch (l) {
|
|
11200
11202
|
console.error("Failed to load trace detail:", l), this.$message.error("加载 trace 详情失败"), this.traceInfo = {}, this.spans = [], this.filteredSpans = [];
|
|
11201
11203
|
}
|
|
@@ -11210,7 +11212,7 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
11210
11212
|
},
|
|
11211
11213
|
handleSpanSelect(f) {
|
|
11212
11214
|
var a, s;
|
|
11213
|
-
this.selectedSpanId = f.span_id, this.selectedSpan = f, this.activeTab = "io", (s = (a = this.selectedSpan.parsedContent) == null ? void 0 : a.inputs) != null && s.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((l, h) => `message-${h}`) : this.messageCollapse = [];
|
|
11215
|
+
this.selectedSpanId = f.span_id, this.selectedSpan = f, this.activeTab = f.type === "CLIENT" || f.type === "CHAT_MODEL" ? "io" : "attributes", (s = (a = this.selectedSpan.parsedContent) == null ? void 0 : a.inputs) != null && s.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((l, h) => `message-${h}`) : this.messageCollapse = [];
|
|
11214
11216
|
},
|
|
11215
11217
|
handleDrawerClose(f) {
|
|
11216
11218
|
this.currentTraceId = null, this.traceInfo = {}, this.spans = [], this.filteredSpans = [], this.selectedSpanId = null, this.selectedSpan = null, this.spanSearchQuery = "", f();
|
|
@@ -11313,8 +11315,10 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
11313
11315
|
const s = new Date(a);
|
|
11314
11316
|
return isNaN(s.getTime()) ? "-" : s.toLocaleString("zh-CN");
|
|
11315
11317
|
},
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
+
formatNanoDuration(f) {
|
|
11319
|
+
if (!f) return "-";
|
|
11320
|
+
const a = f / 1e6;
|
|
11321
|
+
return a < 1e3 ? `${a.toFixed(2)}ms` : a < 6e4 ? `${(a / 1e3).toFixed(2)}s` : `${(a / 6e4).toFixed(2)}min`;
|
|
11318
11322
|
},
|
|
11319
11323
|
formatJson(f) {
|
|
11320
11324
|
return f ? JSON.stringify(f, null, 2) : "";
|
|
@@ -11463,14 +11467,14 @@ const tv = ({ images: f = [], options: a = {} } = {}) => {
|
|
|
11463
11467
|
return f ? f.startsWith("data:image") ? f : f.startsWith("/9j/") ? `data:image/jpeg;base64,${f}` : f.startsWith("iVBOR") ? `data:image/png;base64,${f}` : f.startsWith("R0lGOD") ? `data:image/gif;base64,${f}` : `data:image/jpeg;base64,${f}` : "";
|
|
11464
11468
|
},
|
|
11465
11469
|
handleImageClick(f) {
|
|
11466
|
-
|
|
11470
|
+
rv({
|
|
11467
11471
|
options: this.viewerOptions,
|
|
11468
11472
|
images: [f]
|
|
11469
11473
|
});
|
|
11470
11474
|
}
|
|
11471
11475
|
}
|
|
11472
11476
|
};
|
|
11473
|
-
var
|
|
11477
|
+
var iv = function() {
|
|
11474
11478
|
var l, h, g, p, y, w;
|
|
11475
11479
|
var a = this, s = a._self._c;
|
|
11476
11480
|
return s("div", { staticClass: "trace-list-container" }, [s("el-card", [s("div", { staticClass: "trace-content-wrapper" }, [s("div", { staticClass: "trace-toolbar" }, [s("el-input", { staticClass: "toolbar-input", attrs: { placeholder: a.$t("trace.searchPlaceholder"), "prefix-icon": "el-icon-search", clearable: "", size: "mini" }, on: { clear: a.handleSearchClear, input: a.handleSearch }, model: { value: a.searchQuery, callback: function(b) {
|
|
@@ -11488,8 +11492,8 @@ var nv = function() {
|
|
|
11488
11492
|
} }], null, !1, 3633653970) }) : a._e(), a.visibleColumns.trace_type ? s("el-table-column", { attrs: { prop: "trace_type", label: a.$t("trace.traceType"), width: "120" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11489
11493
|
return [s("el-tag", { attrs: { size: "mini", type: "info" } }, [a._v(a._s(b.row.trace_type || "-"))])];
|
|
11490
11494
|
} }], null, !1, 1175446173) }) : a._e(), a.visibleColumns.execution_time_ms ? s("el-table-column", { attrs: { prop: "execution_time_ms", label: a.$t("trace.executionTime"), width: "120" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11491
|
-
return [a._v(" " + a._s(a.
|
|
11492
|
-
} }], null, !1,
|
|
11495
|
+
return [a._v(" " + a._s(a.formatNanoDuration(b.row.execution_time_ms)) + " ")];
|
|
11496
|
+
} }], null, !1, 1733254102) }) : a._e(), a.visibleColumns.status ? s("el-table-column", { attrs: { prop: "status", label: a.$t("trace.status"), width: "100" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11493
11497
|
return [s("el-tag", { attrs: { type: a.getStatusType(b.row.status), size: "mini" } }, [b.row.status === "OK" ? s("i", { staticClass: "el-icon-success" }) : a._e(), a._v(" " + a._s(b.row.status) + " ")])];
|
|
11494
11498
|
} }], null, !1, 3672547022) }) : a._e(), a.visibleColumns.timestamp_ms ? s("el-table-column", { attrs: { prop: "timestamp_ms", label: a.$t("trace.timeCreated"), width: "180" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11495
11499
|
return [a._v(" " + a._s(a.formatDateTime(b.row.timestamp_ms)) + " ")];
|
|
@@ -11505,11 +11509,11 @@ var nv = function() {
|
|
|
11505
11509
|
a.showColumnDialog = !1;
|
|
11506
11510
|
} } }, [a._v(a._s(a.$t("common.cancel")))]), s("el-button", { attrs: { size: "mini", type: "primary" }, on: { click: a.applyColumns } }, [a._v(a._s(a.$t("common.confirm")))])], 1)], 1), s("el-drawer", { attrs: { visible: a.drawerVisible, "with-header": !0, title: a.drawerTitle, size: "90%", direction: "rtl", "before-close": a.handleDrawerClose }, on: { "update:visible": function(b) {
|
|
11507
11511
|
a.drawerVisible = b;
|
|
11508
|
-
} } }, [a.currentTraceId ? s("div", { staticClass: "trace-detail-content" }, [s("div", { staticClass: "trace-info-section" }, [s("el-descriptions", { attrs: { column: 3, border: "" } }, [s("el-descriptions-item", { attrs: { label: a.$t("trace.traceId") } }, [a._v(a._s(a.traceInfo.trace_id))]), s("el-descriptions-item", { attrs: { label: a.$t("trace.status") } }, [s("el-tag", { attrs: { type: a.getStatusType(a.traceInfo.status), size: "mini" } }, [a._v(" " + a._s(a.traceInfo.status) + " ")])], 1), s("el-descriptions-item", { attrs: { label: a.$t("trace.executionTime") } }, [a._v(" " + a._s(a.
|
|
11512
|
+
} } }, [a.currentTraceId ? s("div", { staticClass: "trace-detail-content" }, [s("div", { staticClass: "trace-info-section" }, [s("el-descriptions", { attrs: { column: 3, border: "" } }, [s("el-descriptions-item", { attrs: { label: a.$t("trace.traceId") } }, [a._v(a._s(a.traceInfo.trace_id))]), s("el-descriptions-item", { attrs: { label: a.$t("trace.status") } }, [s("el-tag", { attrs: { type: a.getStatusType(a.traceInfo.status), size: "mini" } }, [a._v(" " + a._s(a.traceInfo.status) + " ")])], 1), s("el-descriptions-item", { attrs: { label: a.$t("trace.executionTime") } }, [a._v(" " + a._s(a.formatNanoDuration(a.traceInfo.execution_time_ms)) + " ")]), s("el-descriptions-item", { attrs: { label: a.$t("trace.timeCreated") } }, [a._v(" " + a._s(a.formatTimestamp(a.traceInfo.timestamp_ms)) + " ")]), s("el-descriptions-item", { attrs: { label: a.$t("trace.experimentId") } }, [a._v(a._s(a.traceInfo.experiment_id))]), s("el-descriptions-item", { attrs: { label: a.$t("trace.traceType") } }, [s("el-tag", { attrs: { size: "mini", type: "info" } }, [a._v(a._s(a.traceInfo.trace_type || "-"))])], 1), s("el-descriptions-item", { attrs: { label: a.$t("trace.traceName"), span: 2 } }, [a._v(" " + a._s(a.traceInfo.trace_name || "-") + " ")])], 1)], 1), s("el-divider"), s("el-row", { attrs: { gutter: 20 } }, [s("el-col", { staticClass: "span-tree-col", attrs: { span: 8 } }, [s("el-card", [s("div", { attrs: { slot: "header" }, slot: "header" }, [s("el-input", { attrs: { placeholder: a.$t("span.searchTree"), "prefix-icon": "el-icon-search", size: "small", clearable: "" }, on: { input: a.handleSpanSearch }, model: { value: a.spanSearchQuery, callback: function(b) {
|
|
11509
11513
|
a.spanSearchQuery = b;
|
|
11510
11514
|
}, expression: "spanSearchQuery" } })], 1), s("TraceSpanTree", { attrs: { spans: a.filteredSpans, "selected-span-id": a.selectedSpanId, "trace-start-time": a.traceStartTime, "trace-end-time": a.traceEndTime }, on: { "span-select": a.handleSpanSelect } })], 1)], 1), s("el-col", { staticClass: "span-detail-col", attrs: { span: 16 } }, [s("el-card", [a.selectedSpan ? s("div", { staticClass: "span-detail-content" }, [s("el-tabs", { model: { value: a.activeTab, callback: function(b) {
|
|
11511
11515
|
a.activeTab = b;
|
|
11512
|
-
}, expression: "activeTab" } }, [s("el-tab-pane", { attrs: { label: `${a.$t("trace.inputs")} / ${a.$t("trace.outputs")}`, name: "io" } }, [s("div", { staticClass: "io-content" }, [a.hasInputs ? s("div", { staticClass: "io-section" }, [s("el-collapse", { model: { value: a.activeCollapse, callback: function(b) {
|
|
11516
|
+
}, expression: "activeTab" } }, [a.selectedSpan.type === "CLIENT" || a.selectedSpan.type === "CHAT_MODEL" ? s("el-tab-pane", { attrs: { label: `${a.$t("trace.inputs")} / ${a.$t("trace.outputs")}`, name: "io" } }, [s("div", { staticClass: "io-content" }, [a.hasInputs ? s("div", { staticClass: "io-section" }, [s("el-collapse", { model: { value: a.activeCollapse, callback: function(b) {
|
|
11513
11517
|
a.activeCollapse = b;
|
|
11514
11518
|
}, expression: "activeCollapse" } }, [s("el-collapse-item", { attrs: { title: a.$t("trace.inputs"), name: "inputs" } }, [(h = (l = a.selectedSpan.parsedContent) == null ? void 0 : l.inputs) != null && h.messages ? s("div", { staticClass: "messages-section" }, a._l(a.selectedSpan.parsedContent.inputs.messages, function(b, k) {
|
|
11515
11519
|
return s("div", { key: k, staticClass: "message-item" }, [s("el-collapse", { model: { value: a.messageCollapse, callback: function(A) {
|
|
@@ -11539,35 +11543,35 @@ var nv = function() {
|
|
|
11539
11543
|
return s("div", { key: b.key, staticClass: "content-element" }, [b.type === "markdown" ? s("div", { staticClass: "markdown-content", domProps: { innerHTML: a._s(b.content) } }) : b.type === "image" ? s("div", { staticClass: "image-content" }, [b.label ? s("div", { staticClass: "image-label" }, [a._v(a._s(b.label))]) : a._e(), s("img", { staticClass: "content-image", attrs: { src: b.url, alt: "content image" }, on: { click: function(k) {
|
|
11540
11544
|
return a.handleImageClick(b.url);
|
|
11541
11545
|
} } })]) : a._e()]);
|
|
11542
|
-
}), 0) : s("div", { staticClass: "empty-content" }, [s("el-empty", { attrs: { description: a.$t("trace.noOutputs"), "image-size": 80 } })], 1)])], 1)], 1) : a._e(), !a.hasInputs && !a.hasOutputs ? s("div", { staticClass: "empty-io" }, [s("el-empty", { attrs: { description: a.$t("trace.noIoData") } })], 1) : a._e()])]), s("el-tab-pane", { attrs: { label: a.$t("trace.attributes"), name: "attributes" } }, [s("el-table", { staticClass: "attributes-table", attrs: { data: a.attributesData, border: "", stripe: "" } }, [s("el-table-column", { attrs: { prop: "key", label: a.$t("trace.key"), width: "250" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11546
|
+
}), 0) : s("div", { staticClass: "empty-content" }, [s("el-empty", { attrs: { description: a.$t("trace.noOutputs"), "image-size": 80 } })], 1)])], 1)], 1) : a._e(), !a.hasInputs && !a.hasOutputs ? s("div", { staticClass: "empty-io" }, [s("el-empty", { attrs: { description: a.$t("trace.noIoData") } })], 1) : a._e()])]) : a._e(), s("el-tab-pane", { attrs: { label: a.$t("trace.attributes"), name: "attributes" } }, [s("el-table", { staticClass: "attributes-table", attrs: { data: a.attributesData, border: "", stripe: "" } }, [s("el-table-column", { attrs: { prop: "key", label: a.$t("trace.key"), width: "250" }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11543
11547
|
return [s("el-tooltip", { attrs: { content: b.row.key, placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [s("span", { staticClass: "attribute-key" }, [a._v(a._s(b.row.key))])])];
|
|
11544
11548
|
} }], null, !1, 688878823) }), s("el-table-column", { attrs: { prop: "value", label: a.$t("trace.value") }, scopedSlots: a._u([{ key: "default", fn: function(b) {
|
|
11545
11549
|
return [s("el-tooltip", { attrs: { placement: "top", "open-delay": 500, "popper-class": "attribute-tooltip" } }, [s("div", { staticClass: "attribute-tooltip-content", attrs: { slot: "content" }, slot: "content" }, [a._v(a._s(b.row.value))]), s("div", { staticClass: "attribute-value" }, [a._v(a._s(b.row.value))])])];
|
|
11546
|
-
} }], null, !1, 4281519148) })], 1)], 1), s("el-tab-pane", { attrs: { label: a.$t("trace.rawInputsOutputs"), name: "raw" } }, [a.activeTab === "raw" ? s("div", { staticClass: "raw-io-content" }, [a.rawInputs ? s("div", { staticClass: "raw-io-section" }, [s("el-collapse", { model: { value: a.rawIoCollapse, callback: function(b) {
|
|
11550
|
+
} }], null, !1, 4281519148) })], 1)], 1), a.selectedSpan.type === "CLIENT" || a.selectedSpan.type === "CHAT_MODEL" ? s("el-tab-pane", { attrs: { label: a.$t("trace.rawInputsOutputs"), name: "raw" } }, [a.activeTab === "raw" ? s("div", { staticClass: "raw-io-content" }, [a.rawInputs ? s("div", { staticClass: "raw-io-section" }, [s("el-collapse", { model: { value: a.rawIoCollapse, callback: function(b) {
|
|
11547
11551
|
a.rawIoCollapse = b;
|
|
11548
11552
|
}, expression: "rawIoCollapse" } }, [s("el-collapse-item", { attrs: { title: a.$t("trace.rawInputs"), name: "rawInputs" } }, [s("codemirror", { key: `raw-inputs-${a.selectedSpanId}-${a.rawInputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: a.formatRawJson(a.rawInputs), options: a.cmOptions } })], 1)], 1)], 1) : a._e(), a.rawOutputs ? s("div", { staticClass: "raw-io-section" }, [s("el-collapse", { model: { value: a.rawIoCollapse, callback: function(b) {
|
|
11549
11553
|
a.rawIoCollapse = b;
|
|
11550
|
-
}, expression: "rawIoCollapse" } }, [s("el-collapse-item", { attrs: { title: a.$t("trace.rawOutputs"), name: "rawOutputs" } }, [s("codemirror", { key: `raw-outputs-${a.selectedSpanId}-${a.rawOutputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: a.formatRawJson(a.rawOutputs), options: a.cmOptions } })], 1)], 1)], 1) : a._e(), !a.rawInputs && !a.rawOutputs ? s("div", { staticClass: "empty-raw-io" }, [s("el-empty", { attrs: { description: a.$t("trace.noIoData") } })], 1) : a._e()]) : a._e()])], 1)], 1) : s("el-empty", { attrs: { description: a.$t("trace.selectSpan") } })], 1)], 1)], 1)], 1) : a._e()])], 1);
|
|
11551
|
-
},
|
|
11552
|
-
rv,
|
|
11554
|
+
}, expression: "rawIoCollapse" } }, [s("el-collapse-item", { attrs: { title: a.$t("trace.rawOutputs"), name: "rawOutputs" } }, [s("codemirror", { key: `raw-outputs-${a.selectedSpanId}-${a.rawOutputsKey}`, staticClass: "code-editor-wrapper", attrs: { value: a.formatRawJson(a.rawOutputs), options: a.cmOptions } })], 1)], 1)], 1) : a._e(), !a.rawInputs && !a.rawOutputs ? s("div", { staticClass: "empty-raw-io" }, [s("el-empty", { attrs: { description: a.$t("trace.noIoData") } })], 1) : a._e()]) : a._e()]) : a._e()], 1)], 1) : s("el-empty", { attrs: { description: a.$t("trace.selectSpan") } })], 1)], 1)], 1)], 1) : a._e()])], 1);
|
|
11555
|
+
}, av = [], sv = /* @__PURE__ */ ff(
|
|
11553
11556
|
nv,
|
|
11554
11557
|
iv,
|
|
11558
|
+
av,
|
|
11555
11559
|
!1,
|
|
11556
11560
|
null,
|
|
11557
|
-
"
|
|
11561
|
+
"9de806ef"
|
|
11558
11562
|
);
|
|
11559
|
-
const
|
|
11563
|
+
const Ef = sv.exports, ov = {
|
|
11560
11564
|
routes: [
|
|
11561
11565
|
{
|
|
11562
11566
|
path: "/trace",
|
|
11563
11567
|
name: "trace",
|
|
11564
|
-
component:
|
|
11568
|
+
component: Ef
|
|
11565
11569
|
}
|
|
11566
11570
|
],
|
|
11567
11571
|
beforeEach: (f, a, s) => {
|
|
11568
11572
|
s();
|
|
11569
11573
|
}
|
|
11570
|
-
},
|
|
11574
|
+
}, lv = {
|
|
11571
11575
|
common: {
|
|
11572
11576
|
home: "首页",
|
|
11573
11577
|
todos: "待办事项",
|
|
@@ -11635,7 +11639,7 @@ const _f = av.exports, sv = {
|
|
|
11635
11639
|
deleteFailed: "删除失败",
|
|
11636
11640
|
unknownError: "未知错误"
|
|
11637
11641
|
}
|
|
11638
|
-
},
|
|
11642
|
+
}, uv = {
|
|
11639
11643
|
common: {
|
|
11640
11644
|
home: "Home",
|
|
11641
11645
|
todos: "Todos",
|
|
@@ -11704,37 +11708,37 @@ This operation cannot be undone. Are you sure you want to continue?`,
|
|
|
11704
11708
|
unknownError: "Unknown error"
|
|
11705
11709
|
}
|
|
11706
11710
|
}, bi = {
|
|
11707
|
-
"zh-CN":
|
|
11708
|
-
"en-US":
|
|
11711
|
+
"zh-CN": lv,
|
|
11712
|
+
"en-US": uv
|
|
11709
11713
|
};
|
|
11710
11714
|
let Is = !1;
|
|
11711
|
-
const
|
|
11715
|
+
const Ku = (f) => {
|
|
11712
11716
|
!f || Is || (f.mergeLocaleMessage ? (Object.keys(bi).forEach((a) => {
|
|
11713
11717
|
f.mergeLocaleMessage(a, bi[a]);
|
|
11714
11718
|
}), Is = !0) : f.messages && (Object.keys(bi).forEach((a) => {
|
|
11715
11719
|
f.messages[a] || (f.messages[a] = {}), Object.assign(f.messages[a], bi[a]);
|
|
11716
11720
|
}), Is = !0));
|
|
11717
|
-
},
|
|
11718
|
-
store:
|
|
11719
|
-
router:
|
|
11721
|
+
}, pv = {
|
|
11722
|
+
store: zh,
|
|
11723
|
+
router: ov,
|
|
11720
11724
|
components: {
|
|
11721
|
-
Trace:
|
|
11722
|
-
TraceSpanTree:
|
|
11725
|
+
Trace: Ef,
|
|
11726
|
+
TraceSpanTree: cf
|
|
11723
11727
|
},
|
|
11724
11728
|
api: mi,
|
|
11725
11729
|
locales: bi,
|
|
11726
11730
|
setI18n(f) {
|
|
11727
|
-
|
|
11731
|
+
Ku(f);
|
|
11728
11732
|
},
|
|
11729
|
-
registerLocales:
|
|
11733
|
+
registerLocales: Ku
|
|
11730
11734
|
};
|
|
11731
11735
|
export {
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
+
Ef as Trace,
|
|
11737
|
+
cf as TraceSpanTree,
|
|
11738
|
+
pv as default,
|
|
11739
|
+
uv as enUS,
|
|
11736
11740
|
mi as traceApi,
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11741
|
+
ov as traceRouter,
|
|
11742
|
+
zh as traceStore,
|
|
11743
|
+
lv as zhCN
|
|
11740
11744
|
};
|