@l1yp/file-viewer 0.1.4 → 0.1.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/README.md +57 -6
- package/dist/assets/step.worker-CfDTYOf_.js.map +1 -0
- package/dist/components/AnsiText.d.ts +47 -0
- package/dist/components/AnsiText.js +41 -0
- package/dist/components/AnsiText.js.map +1 -0
- package/dist/components/CertViewer.js +1 -1
- package/dist/components/CertViewer.js.map +1 -1
- package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/CodeView.js +1 -1
- package/dist/components/CodeView.js.map +1 -1
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +80 -71
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/DocxEmbeddedFiles.js +9 -0
- package/dist/components/DocxEmbeddedFiles.js.map +1 -0
- package/dist/components/DocxEmbeddedFiles.vue.d.ts +15 -0
- package/dist/components/DocxEmbeddedFiles.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/DocxEmbeddedFiles.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/DocxNavigationPane.js +1 -1
- package/dist/components/DocxNavigationPane.js.map +1 -1
- package/dist/components/DocxNavigationPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/DocxViewer.js +1 -1
- package/dist/components/DocxViewer.js.map +1 -1
- package/dist/components/DocxViewer.vue.d.ts +1 -1
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +182 -50
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/EplViewer.js +1 -1
- package/dist/components/EplViewer.js.map +1 -1
- package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/FileViewerBody.js +1 -1
- package/dist/components/FileViewerBody.js.map +1 -1
- package/dist/components/FileViewerBody.vue.d.ts +1 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +292 -281
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/FileViewerPanel.js +1 -1
- package/dist/components/FileViewerPanel.js.map +1 -1
- package/dist/components/FileViewerPanel.vue.d.ts +6 -1
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +53 -51
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/HarViewer.js +1 -1
- package/dist/components/HarViewer.js.map +1 -1
- package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/JksViewer.js +1 -1
- package/dist/components/JksViewer.js.map +1 -1
- package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/LogViewer.js +1 -1
- package/dist/components/LogViewer.js.map +1 -1
- package/dist/components/LogViewer.vue.d.ts +3 -1
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +284 -280
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ModelViewModes.js +9 -0
- package/dist/components/ModelViewModes.js.map +1 -0
- package/dist/components/ModelViewModes.vue.d.ts +11 -0
- package/dist/components/ModelViewModes.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/ModelViewModes.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/ModelViewer.js +1 -1
- package/dist/components/ModelViewer.js.map +1 -1
- package/dist/components/ModelViewer.vue.d.ts +2 -1
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +183 -96
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/PdfNavigationPane.js +1 -1
- package/dist/components/PdfNavigationPane.js.map +1 -1
- package/dist/components/PdfNavigationPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/PdfViewer.js +1 -1
- package/dist/components/PdfViewer.js.map +1 -1
- package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/PptxNavigationPane.js +1 -1
- package/dist/components/PptxNavigationPane.js.map +1 -1
- package/dist/components/PptxNavigationPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/PsdViewer.js +1 -1
- package/dist/components/PsdViewer.js.map +1 -1
- package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/SqliteViewer.js +1 -1
- package/dist/components/SqliteViewer.js.map +1 -1
- package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ViewerLoadError.js +9 -0
- package/dist/components/ViewerLoadError.js.map +1 -0
- package/dist/components/ViewerLoadError.vue.d.ts +17 -0
- package/dist/components/ViewerLoadError.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/ViewerLoadError.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/XlsxChart.js +1 -1
- package/dist/components/XlsxChart.js.map +1 -1
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/XlsxImageLayer.js +9 -0
- package/dist/components/XlsxImageLayer.js.map +1 -0
- package/dist/components/XlsxImageLayer.vue.d.ts +9 -0
- package/dist/components/XlsxImageLayer.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/components/XlsxImageLayer.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/XlsxViewer.js +1 -1
- package/dist/components/XlsxViewer.js.map +1 -1
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +230 -216
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/epl/EplResource.js +1 -1
- package/dist/components/epl/EplResource.js.map +1 -1
- package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/optionalViewer.d.ts +3 -2
- package/dist/components/optionalViewer.js +6 -3
- package/dist/components/optionalViewer.js.map +1 -1
- package/dist/composables/useFileViewer.d.ts +11 -3
- package/dist/composables/useFileViewer.js.map +1 -1
- package/dist/composables/useTeleportTheme.d.ts +7 -0
- package/dist/composables/useTeleportTheme.js +42 -0
- package/dist/composables/useTeleportTheme.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -28
- package/dist/lib/ansi.d.ts +44 -0
- package/dist/lib/ansi.js +224 -0
- package/dist/lib/ansi.js.map +1 -0
- package/dist/lib/cfb.d.ts +37 -0
- package/dist/lib/cfb.js +112 -0
- package/dist/lib/cfb.js.map +1 -0
- package/dist/lib/docxEmbeddedDom.d.ts +22 -0
- package/dist/lib/docxEmbeddedDom.js +128 -0
- package/dist/lib/docxEmbeddedDom.js.map +1 -0
- package/dist/lib/docxEmbeddings.d.ts +41 -0
- package/dist/lib/docxEmbeddings.js +226 -0
- package/dist/lib/docxEmbeddings.js.map +1 -0
- package/dist/lib/docxTheme.d.ts +6 -0
- package/dist/lib/docxTheme.js +64 -0
- package/dist/lib/docxTheme.js.map +1 -0
- package/dist/lib/epl/code/structures.js +82 -0
- package/dist/lib/epl/code/structures.js.map +1 -0
- package/dist/lib/epl/code/variable.js +16 -0
- package/dist/lib/epl/code/variable.js.map +1 -0
- package/dist/lib/epl/eplDocument.js +28 -22
- package/dist/lib/epl/eplDocument.js.map +1 -1
- package/dist/lib/epl/index.d.ts +2 -1
- package/dist/lib/epl/index.js.map +1 -1
- package/dist/lib/epl/sections/code.js +37 -0
- package/dist/lib/epl/sections/code.js.map +1 -0
- package/dist/lib/epl/sections/esystemInfo.js +29 -0
- package/dist/lib/epl/sections/esystemInfo.js.map +1 -0
- package/dist/lib/epl/sections/losable.js +33 -0
- package/dist/lib/epl/sections/losable.js.map +1 -0
- package/dist/lib/epl/sections/projectConfig.js +39 -0
- package/dist/lib/epl/sections/projectConfig.js.map +1 -0
- package/dist/lib/epl/sections/resource.js +84 -0
- package/dist/lib/epl/sections/resource.js.map +1 -0
- package/dist/lib/fileType.d.ts +3 -1
- package/dist/lib/fileType.js +150 -137
- package/dist/lib/fileType.js.map +1 -1
- package/dist/lib/modelAppearance.d.ts +7 -0
- package/dist/lib/modelAppearance.js +41 -0
- package/dist/lib/modelAppearance.js.map +1 -0
- package/dist/lib/msi.js +62 -154
- package/dist/lib/msi.js.map +1 -1
- package/dist/lib/olePackage.d.ts +8 -0
- package/dist/lib/olePackage.js +37 -0
- package/dist/lib/olePackage.js.map +1 -0
- package/dist/lib/pptxFirstSlide.d.ts +11 -0
- package/dist/lib/pptxFirstSlide.js +34 -0
- package/dist/lib/pptxFirstSlide.js.map +1 -0
- package/dist/lib/step.d.ts +10 -0
- package/dist/lib/step.js +35 -0
- package/dist/lib/step.js.map +1 -0
- package/dist/lib/step.worker.d.ts +1 -0
- package/dist/lib/step.worker.js +18 -0
- package/dist/lib/step.worker.js.map +1 -0
- package/dist/lib/stepObject.d.ts +4 -0
- package/dist/lib/stepObject.js +52 -0
- package/dist/lib/stepObject.js.map +1 -0
- package/dist/lib/stepTypes.d.ts +60 -0
- package/dist/lib/viewerKind.js +10 -5
- package/dist/lib/viewerKind.js.map +1 -1
- package/dist/lib/xlsx.d.ts +1 -1
- package/dist/lib/xlsx.js +106 -89
- package/dist/lib/xlsx.js.map +1 -1
- package/dist/lib/xlsxCharts.js +71 -119
- package/dist/lib/xlsxCharts.js.map +1 -1
- package/dist/lib/xlsxImages.d.ts +43 -0
- package/dist/lib/xlsxImages.js +114 -0
- package/dist/lib/xlsxImages.js.map +1 -0
- package/dist/lib/xlsxParts.d.ts +17 -0
- package/dist/lib/xlsxParts.js +86 -0
- package/dist/lib/xlsxParts.js.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +8 -3
|
@@ -1,72 +1,74 @@
|
|
|
1
1
|
import { formatBytes as e } from "../lib/format.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { hasAnsiSequences as t, parseAnsi as n } from "../lib/ansi.js";
|
|
3
|
+
import r from "./icons/Icon.js";
|
|
4
|
+
import i from "./AnsiText.js";
|
|
5
|
+
import { useLogRules as a } from "../composables/useLogRules.js";
|
|
6
|
+
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as ee, openBlock as g, ref as _, renderList as te, shallowRef as ne, toDisplayString as v, unref as y, vModelCheckbox as b, vModelText as x, watch as S, withDirectives as C, withKeys as re, withModifiers as ie } from "vue";
|
|
5
7
|
//#region src/components/LogViewer.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
8
|
+
var ae = { class: "log" }, oe = {
|
|
7
9
|
key: 0,
|
|
8
10
|
class: "log__msg"
|
|
9
|
-
},
|
|
11
|
+
}, se = {
|
|
10
12
|
key: 1,
|
|
11
13
|
class: "log__msg log__gate"
|
|
12
|
-
},
|
|
14
|
+
}, ce = {
|
|
13
15
|
key: 2,
|
|
14
16
|
class: "log__msg log__msg--error"
|
|
15
|
-
},
|
|
17
|
+
}, le = { class: "log__bar" }, ue = { class: "log__searchwrap" }, de = {
|
|
16
18
|
key: 0,
|
|
17
19
|
class: "log__matches"
|
|
18
|
-
},
|
|
20
|
+
}, fe = ["disabled"], pe = ["disabled"], me = ["disabled"], he = ["title"], ge = { class: "log__total" }, _e = {
|
|
19
21
|
key: 0,
|
|
20
22
|
class: "log__rules-empty"
|
|
21
|
-
},
|
|
23
|
+
}, ve = ["onUpdate:modelValue"], ye = ["onUpdate:modelValue"], be = ["onClick"], xe = ["onClick"], Se = {
|
|
22
24
|
class: "log__rule-color",
|
|
23
25
|
title: "背景色"
|
|
24
|
-
},
|
|
26
|
+
}, Ce = ["onUpdate:modelValue"], we = ["onUpdate:modelValue", "disabled"], Te = {
|
|
25
27
|
class: "log__rule-color",
|
|
26
28
|
title: "字体色"
|
|
27
|
-
},
|
|
29
|
+
}, Ee = ["onUpdate:modelValue"], De = ["onUpdate:modelValue", "disabled"], Oe = ["disabled", "onClick"], ke = ["disabled", "onClick"], Ae = ["onClick"], je = ["title", "onClick"], Me = ["title", "onClick"], Ne = ["title", "onClick"], Pe = { class: "log__ln" }, Fe = {
|
|
28
30
|
key: 0,
|
|
29
31
|
class: "log__fold-cell"
|
|
30
|
-
},
|
|
32
|
+
}, Ie = ["title", "onClick"], Le = ["onClick"], Re = 64 * 1024 * 1024, w = 19, ze = 12, T = 10, Be = 2, Ve = /*@__PURE__*/ p({
|
|
31
33
|
__name: "LogViewer",
|
|
32
34
|
props: {
|
|
33
35
|
url: {},
|
|
34
36
|
name: {},
|
|
35
37
|
size: {}
|
|
36
38
|
},
|
|
37
|
-
setup(
|
|
38
|
-
let
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
setup(p, { expose: Ve }) {
|
|
40
|
+
let E = p, D = _("loading"), O = _(""), k = _([]), A = ne(null), j = _(null), M = _(0), N = _(400), P = null, He = /^[ \t]+at\s+\S+[.(]/, F = /^[ \t]+File\s["']/, Ue = /^[ \t]+from\s+\S+:\d+/, We = /^[ \t]*\.\.\.\s+\d+\s+more\b/, Ge = /^[ \t]+--- End of /;
|
|
41
|
+
function I(e) {
|
|
42
|
+
return He.test(e) || F.test(e) || Ue.test(e) || We.test(e) || Ge.test(e);
|
|
41
43
|
}
|
|
42
|
-
let
|
|
43
|
-
let e =
|
|
44
|
+
let L = s(() => {
|
|
45
|
+
let e = k.value, t = e.length, n = [], r = 0;
|
|
44
46
|
for (; r < t;) {
|
|
45
|
-
if (!
|
|
47
|
+
if (!I(e[r])) {
|
|
46
48
|
r++;
|
|
47
49
|
continue;
|
|
48
50
|
}
|
|
49
|
-
let i = r, a =
|
|
51
|
+
let i = r, a = F.test(e[r]);
|
|
50
52
|
for (r++; r < t;) {
|
|
51
53
|
let t = e[r];
|
|
52
|
-
if (
|
|
54
|
+
if (I(t)) a = F.test(t), r++;
|
|
53
55
|
else if (a && /^[ \t]+\S/.test(t)) a = !1, r++;
|
|
54
56
|
else break;
|
|
55
57
|
}
|
|
56
|
-
let o = r - 1, s = i - 1, c = s >= 0 && !
|
|
57
|
-
o - c + 1 >=
|
|
58
|
+
let o = r - 1, s = i - 1, c = s >= 0 && !I(e[s]) && e[s].trim() !== "" ? i : i + 1;
|
|
59
|
+
o - c + 1 >= Be && n.push({
|
|
58
60
|
header: c - 1,
|
|
59
61
|
frameStart: c,
|
|
60
62
|
frameEnd: o
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
return n;
|
|
64
|
-
}),
|
|
66
|
+
}), R = s(() => L.value.length > 0), Ke = s(() => {
|
|
65
67
|
let e = /* @__PURE__ */ new Map();
|
|
66
|
-
return
|
|
68
|
+
return L.value.forEach((t, n) => e.set(t.header, n)), e;
|
|
67
69
|
});
|
|
68
|
-
function
|
|
69
|
-
let t =
|
|
70
|
+
function z(e) {
|
|
71
|
+
let t = L.value, n = 0, r = t.length - 1;
|
|
70
72
|
for (; n <= r;) {
|
|
71
73
|
let i = n + r >> 1, a = t[i];
|
|
72
74
|
if (e < a.header) r = i - 1;
|
|
@@ -75,20 +77,20 @@ var re = { class: "log" }, ie = {
|
|
|
75
77
|
}
|
|
76
78
|
return -1;
|
|
77
79
|
}
|
|
78
|
-
let
|
|
79
|
-
function
|
|
80
|
-
let t = new Set(
|
|
81
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
80
|
+
let B = _(/* @__PURE__ */ new Set()), V = s(() => R.value && B.value.size === L.value.length);
|
|
81
|
+
function qe(e) {
|
|
82
|
+
let t = new Set(B.value);
|
|
83
|
+
t.has(e) ? t.delete(e) : t.add(e), B.value = t;
|
|
82
84
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function Je() {
|
|
86
|
+
B.value = V.value ? /* @__PURE__ */ new Set() : new Set(L.value.map((e, t) => t));
|
|
85
87
|
}
|
|
86
|
-
function
|
|
87
|
-
return !(
|
|
88
|
+
function Ye(e) {
|
|
89
|
+
return !(B.value.has(e) || G.value && it.value.has(e));
|
|
88
90
|
}
|
|
89
|
-
let { rules:
|
|
91
|
+
let { rules: H, add: Xe, remove: Ze, move: Qe } = a(), U = _(!1), $e = s(() => {
|
|
90
92
|
let e = [];
|
|
91
|
-
for (let t of
|
|
93
|
+
for (let t of H.value) {
|
|
92
94
|
if (!t.enabled || !t.pattern || !(t.bgOn || t.fgOn)) continue;
|
|
93
95
|
let n;
|
|
94
96
|
if (t.regex) try {
|
|
@@ -112,14 +114,14 @@ var re = { class: "log" }, ie = {
|
|
|
112
114
|
}
|
|
113
115
|
return e;
|
|
114
116
|
});
|
|
115
|
-
function
|
|
116
|
-
for (let t of
|
|
117
|
+
function et(e) {
|
|
118
|
+
for (let t of $e.value) if (t.test(e)) return {
|
|
117
119
|
bg: t.bg,
|
|
118
120
|
fg: t.fg
|
|
119
121
|
};
|
|
120
122
|
return null;
|
|
121
123
|
}
|
|
122
|
-
function
|
|
124
|
+
function tt(e) {
|
|
123
125
|
if (!e.regex || !e.pattern) return !1;
|
|
124
126
|
try {
|
|
125
127
|
return new RegExp(e.pattern), !1;
|
|
@@ -127,66 +129,66 @@ var re = { class: "log" }, ie = {
|
|
|
127
129
|
return !0;
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
clearTimeout(
|
|
133
|
-
|
|
132
|
+
let W = _(""), G = _(""), K;
|
|
133
|
+
S(W, (e) => {
|
|
134
|
+
clearTimeout(K), K = setTimeout(() => {
|
|
135
|
+
G.value = e, Y.value = 0, Z.value = /* @__PURE__ */ new Set();
|
|
134
136
|
}, 160);
|
|
135
137
|
});
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
+
function nt() {
|
|
139
|
+
W.value = "", clearTimeout(K), G.value = "", Y.value = 0, Z.value = /* @__PURE__ */ new Set();
|
|
138
140
|
}
|
|
139
|
-
let
|
|
140
|
-
let e =
|
|
141
|
+
let q = _(!1), J = _(!1), Y = _(0), X = s(() => {
|
|
142
|
+
let e = G.value.toLowerCase();
|
|
141
143
|
if (!e) return [];
|
|
142
|
-
let t = [], n =
|
|
144
|
+
let t = [], n = k.value;
|
|
143
145
|
for (let r = 0; r < n.length; r++) n[r].toLowerCase().includes(e) && t.push(r);
|
|
144
146
|
return t;
|
|
145
147
|
});
|
|
146
|
-
function
|
|
148
|
+
function rt(e, t) {
|
|
147
149
|
return t ? e.toLowerCase().includes(t.toLowerCase()) : !1;
|
|
148
150
|
}
|
|
149
|
-
let
|
|
151
|
+
let it = s(() => {
|
|
150
152
|
let e = /* @__PURE__ */ new Set();
|
|
151
|
-
if (!
|
|
152
|
-
for (let t of
|
|
153
|
-
let n =
|
|
153
|
+
if (!G.value) return e;
|
|
154
|
+
for (let t of X.value) {
|
|
155
|
+
let n = z(t);
|
|
154
156
|
n >= 0 && e.add(n);
|
|
155
157
|
}
|
|
156
158
|
return e;
|
|
157
|
-
}),
|
|
158
|
-
let e =
|
|
159
|
-
return e.length ? e[Math.min(
|
|
160
|
-
}),
|
|
161
|
-
if (!
|
|
162
|
-
let e =
|
|
163
|
-
for (let r = 0; r < e.length; r++) (t.has(r) ||
|
|
159
|
+
}), at = s(() => {
|
|
160
|
+
let e = X.value;
|
|
161
|
+
return e.length ? e[Math.min(Y.value, e.length - 1)] : -1;
|
|
162
|
+
}), ot = /\b(?:ERROR|FATAL|SEVERE|CRITICAL|PANIC|FAILED|FAILURE)\b|\b\w*(?:Exception|Error)\b|\bTraceback\b|\bCaused by\b|^\s*panic:/, st = s(() => {
|
|
163
|
+
if (!J.value) return [];
|
|
164
|
+
let e = k.value, t = Ke.value, n = [];
|
|
165
|
+
for (let r = 0; r < e.length; r++) (t.has(r) || ot.test(e[r])) && n.push(r);
|
|
164
166
|
return n;
|
|
165
|
-
}),
|
|
166
|
-
let e =
|
|
167
|
+
}), ct = s(() => new Set(st.value)), lt = s(() => q.value && G.value !== ""), ut = s(() => {
|
|
168
|
+
let e = lt.value, t = J.value;
|
|
167
169
|
if (!e && !t) return null;
|
|
168
170
|
if (e && t) {
|
|
169
|
-
let e =
|
|
170
|
-
return
|
|
171
|
+
let e = ct.value;
|
|
172
|
+
return X.value.filter((t) => e.has(t));
|
|
171
173
|
}
|
|
172
|
-
return t ?
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
return t ? st.value : X.value;
|
|
175
|
+
}), dt = s(() => lt.value), Z = _(/* @__PURE__ */ new Set());
|
|
176
|
+
S([J, q], () => {
|
|
177
|
+
Z.value = /* @__PURE__ */ new Set();
|
|
176
178
|
});
|
|
177
|
-
function
|
|
179
|
+
function ft(e, t, n) {
|
|
178
180
|
let r = e + 1, i = t - 1;
|
|
179
181
|
if (i < r) return;
|
|
180
182
|
let a = r, o = i;
|
|
181
|
-
n === "down" ? o = Math.min(i, r +
|
|
182
|
-
let s = new Set(
|
|
183
|
+
n === "down" ? o = Math.min(i, r + T - 1) : n === "up" && (a = Math.max(r, i - T + 1));
|
|
184
|
+
let s = new Set(Z.value);
|
|
183
185
|
for (let e = a; e <= o; e++) s.add(e);
|
|
184
|
-
|
|
186
|
+
Z.value = s;
|
|
185
187
|
}
|
|
186
|
-
let
|
|
187
|
-
let e =
|
|
188
|
+
let Q = s(() => {
|
|
189
|
+
let e = L.value, t = k.value.length, n = [], r = 0, i = 0;
|
|
188
190
|
for (let t = 0; t < e.length; t++) {
|
|
189
|
-
if (!
|
|
191
|
+
if (!Ye(t)) continue;
|
|
190
192
|
let a = e[t];
|
|
191
193
|
a.frameStart > i && (n.push({
|
|
192
194
|
o0: i,
|
|
@@ -202,14 +204,14 @@ var re = { class: "log" }, ie = {
|
|
|
202
204
|
runs: n,
|
|
203
205
|
total: r
|
|
204
206
|
};
|
|
205
|
-
}),
|
|
206
|
-
let e =
|
|
207
|
+
}), $ = s(() => {
|
|
208
|
+
let e = ut.value;
|
|
207
209
|
if (e === null) return null;
|
|
208
|
-
let t =
|
|
209
|
-
if (
|
|
210
|
+
let t = k.value.length, n = L.value, r = [];
|
|
211
|
+
if (dt.value) {
|
|
210
212
|
let t = /* @__PURE__ */ new Set();
|
|
211
213
|
for (let n of e) {
|
|
212
|
-
let e =
|
|
214
|
+
let e = z(n);
|
|
213
215
|
e >= 0 && t.add(e);
|
|
214
216
|
}
|
|
215
217
|
for (let e of t) r.push([n[e].header, n[e].frameEnd]);
|
|
@@ -226,7 +228,7 @@ var re = { class: "log" }, ie = {
|
|
|
226
228
|
return !1;
|
|
227
229
|
}, a = [];
|
|
228
230
|
for (let t of e) i(t) || a.push(t);
|
|
229
|
-
for (let e of
|
|
231
|
+
for (let e of Z.value) i(e) || a.push(e);
|
|
230
232
|
a.sort((e, t) => e - t);
|
|
231
233
|
let o = [], s = 0, c = 0, l = r.length ? r[0][0] : Infinity, u = -1;
|
|
232
234
|
for (; s < r.length || c < a.length;) {
|
|
@@ -252,21 +254,21 @@ var re = { class: "log" }, ie = {
|
|
|
252
254
|
items: d,
|
|
253
255
|
key: f
|
|
254
256
|
};
|
|
255
|
-
}),
|
|
256
|
-
function
|
|
257
|
-
let t =
|
|
257
|
+
}), pt = s(() => $.value !== null), mt = s(() => $.value ? $.value.items.length : Q.value.total);
|
|
258
|
+
function ht(e) {
|
|
259
|
+
let t = k.value[e] ?? "", n = Ke.value.get(e);
|
|
258
260
|
if (n !== void 0) {
|
|
259
|
-
let r =
|
|
261
|
+
let r = L.value[n];
|
|
260
262
|
return {
|
|
261
263
|
n: e + 1,
|
|
262
264
|
text: t,
|
|
263
265
|
kind: "header",
|
|
264
|
-
collapsed:
|
|
266
|
+
collapsed: $.value ? !1 : Ye(n),
|
|
265
267
|
count: r.frameEnd - r.frameStart + 1,
|
|
266
268
|
gid: n
|
|
267
269
|
};
|
|
268
270
|
}
|
|
269
|
-
let r =
|
|
271
|
+
let r = z(e), i = r >= 0 && e >= L.value[r].frameStart ? "frame" : "plain";
|
|
270
272
|
return {
|
|
271
273
|
n: e + 1,
|
|
272
274
|
text: t,
|
|
@@ -276,7 +278,7 @@ var re = { class: "log" }, ie = {
|
|
|
276
278
|
gid: -1
|
|
277
279
|
};
|
|
278
280
|
}
|
|
279
|
-
function
|
|
281
|
+
function gt(e, t) {
|
|
280
282
|
let n = 0, r = e.length - 1, i = 0;
|
|
281
283
|
for (; n <= r;) {
|
|
282
284
|
let a = n + r >> 1;
|
|
@@ -285,23 +287,23 @@ var re = { class: "log" }, ie = {
|
|
|
285
287
|
let a = e[i];
|
|
286
288
|
return a ? a.o0 + (t - a.d0) : t;
|
|
287
289
|
}
|
|
288
|
-
let
|
|
289
|
-
function
|
|
290
|
-
let n =
|
|
290
|
+
let _t = s(() => Math.max(0, Math.floor(M.value / w) - ze)), vt = s(() => Math.min(mt.value, Math.ceil((M.value + N.value) / w) + ze));
|
|
291
|
+
function yt(e, t) {
|
|
292
|
+
let n = ht(t);
|
|
291
293
|
return {
|
|
292
294
|
i: e,
|
|
293
295
|
isGap: !1,
|
|
294
296
|
...n,
|
|
295
|
-
style:
|
|
296
|
-
context:
|
|
297
|
+
style: et(n.text),
|
|
298
|
+
context: $.value !== null && Z.value.has(t) && !rt(n.text, G.value),
|
|
297
299
|
top: 0,
|
|
298
300
|
bottom: 0,
|
|
299
301
|
size: 0,
|
|
300
302
|
step: 0
|
|
301
303
|
};
|
|
302
304
|
}
|
|
303
|
-
let
|
|
304
|
-
let e = [], t =
|
|
305
|
+
let bt = s(() => {
|
|
306
|
+
let e = [], t = _t.value, n = vt.value, r = $.value;
|
|
305
307
|
if (r) for (let i = t; i < n; i++) {
|
|
306
308
|
let t = r.items[i];
|
|
307
309
|
t && (t.t === "gap" ? e.push({
|
|
@@ -318,31 +320,21 @@ var re = { class: "log" }, ie = {
|
|
|
318
320
|
top: t.top,
|
|
319
321
|
bottom: t.bottom,
|
|
320
322
|
size: t.size,
|
|
321
|
-
step: Math.min(
|
|
322
|
-
}) : e.push(
|
|
323
|
+
step: Math.min(T, t.size)
|
|
324
|
+
}) : e.push(yt(i, t.orig)));
|
|
323
325
|
}
|
|
324
326
|
else {
|
|
325
|
-
let r =
|
|
326
|
-
for (let i = t; i < n; i++) e.push(
|
|
327
|
+
let r = Q.value.runs;
|
|
328
|
+
for (let i = t; i < n; i++) e.push(yt(i, gt(r, i)));
|
|
327
329
|
}
|
|
328
330
|
return e;
|
|
329
331
|
});
|
|
330
|
-
function
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
function vt(e) {
|
|
334
|
-
let t = U.value;
|
|
335
|
-
if (!t) return Q(e);
|
|
336
|
-
let n = e.toLowerCase(), r = t.toLowerCase(), i = "", a = 0, o = n.indexOf(r, a);
|
|
337
|
-
for (; o !== -1;) i += Q(e.slice(a, o)), i += "<mark class=\"log__hit\">" + Q(e.slice(o, o + t.length)) + "</mark>", a = o + t.length, o = n.indexOf(r, a);
|
|
338
|
-
return i += Q(e.slice(a)), i;
|
|
339
|
-
}
|
|
340
|
-
function yt(e) {
|
|
341
|
-
let t = O.value;
|
|
342
|
-
t && (t.scrollTop = Math.max(0, e * S - A.value / 2 + S));
|
|
332
|
+
function xt(e) {
|
|
333
|
+
let t = j.value;
|
|
334
|
+
t && (t.scrollTop = Math.max(0, e * w - N.value / 2 + w));
|
|
343
335
|
}
|
|
344
|
-
function
|
|
345
|
-
let t =
|
|
336
|
+
function St(e) {
|
|
337
|
+
let t = $.value;
|
|
346
338
|
if (t) {
|
|
347
339
|
let n = t.key, r = 0, i = n.length - 1;
|
|
348
340
|
for (; r <= i;) {
|
|
@@ -352,9 +344,9 @@ var re = { class: "log" }, ie = {
|
|
|
352
344
|
}
|
|
353
345
|
return -1;
|
|
354
346
|
}
|
|
355
|
-
let n =
|
|
356
|
-
n >= 0 && e >=
|
|
357
|
-
let r =
|
|
347
|
+
let n = z(e);
|
|
348
|
+
n >= 0 && e >= L.value[n].frameStart && Ye(n) && (e = L.value[n].header);
|
|
349
|
+
let r = Q.value.runs, i = 0, a = r.length - 1;
|
|
358
350
|
for (; i <= a;) {
|
|
359
351
|
let t = i + a >> 1;
|
|
360
352
|
if (e < r[t].o0) a = t - 1;
|
|
@@ -363,310 +355,322 @@ var re = { class: "log" }, ie = {
|
|
|
363
355
|
}
|
|
364
356
|
return -1;
|
|
365
357
|
}
|
|
366
|
-
function
|
|
367
|
-
let t =
|
|
358
|
+
function Ct(e) {
|
|
359
|
+
let t = X.value;
|
|
368
360
|
if (!t.length) return;
|
|
369
|
-
|
|
370
|
-
let n =
|
|
371
|
-
n >= 0 &&
|
|
361
|
+
Y.value = (Y.value + e + t.length) % t.length;
|
|
362
|
+
let n = St(t[Y.value]);
|
|
363
|
+
n >= 0 && xt(n);
|
|
372
364
|
}
|
|
373
|
-
let
|
|
374
|
-
function
|
|
375
|
-
let e = parseInt(
|
|
365
|
+
let wt = _("");
|
|
366
|
+
function Tt() {
|
|
367
|
+
let e = parseInt(wt.value, 10);
|
|
376
368
|
if (!Number.isFinite(e)) return;
|
|
377
|
-
let t =
|
|
378
|
-
t >= 0 &&
|
|
369
|
+
let t = St(Math.max(0, Math.min(k.value.length - 1, e - 1)));
|
|
370
|
+
t >= 0 && xt(t);
|
|
379
371
|
}
|
|
380
|
-
function
|
|
381
|
-
|
|
372
|
+
function Et() {
|
|
373
|
+
j.value && (M.value = j.value.scrollTop);
|
|
382
374
|
}
|
|
383
|
-
async function
|
|
384
|
-
if (
|
|
385
|
-
|
|
375
|
+
async function Dt() {
|
|
376
|
+
if (E.url) {
|
|
377
|
+
D.value = "loading", O.value = "", A.value = null;
|
|
386
378
|
try {
|
|
387
|
-
let e = await fetch(
|
|
379
|
+
let e = await fetch(E.url);
|
|
388
380
|
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
389
|
-
|
|
381
|
+
let r = await e.text(), i = t(r) ? n(r) : null, a = i ? [...i.lines] : r.split("\n");
|
|
382
|
+
if (a.length > 1) {
|
|
383
|
+
let e = a[a.length - 1];
|
|
384
|
+
(typeof e == "string" ? e === "" : e.text === "") && a.pop();
|
|
385
|
+
}
|
|
386
|
+
i ? (A.value = {
|
|
387
|
+
...i,
|
|
388
|
+
lines: a,
|
|
389
|
+
text: a.map((e) => e.text).join("\n")
|
|
390
|
+
}, k.value = A.value.lines.map((e) => e.text)) : k.value = a, B.value = /* @__PURE__ */ new Set(), Z.value = /* @__PURE__ */ new Set(), M.value = 0, j.value && (j.value.scrollTop = 0), D.value = "ready";
|
|
390
391
|
} catch (e) {
|
|
391
|
-
|
|
392
|
+
O.value = e instanceof Error ? e.message : String(e), D.value = "error";
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
397
|
-
|
|
396
|
+
function Ot() {
|
|
397
|
+
if (k.value = [], A.value = null, E.size && E.size > Re) {
|
|
398
|
+
D.value = "gate";
|
|
398
399
|
return;
|
|
399
400
|
}
|
|
400
|
-
|
|
401
|
+
Dt();
|
|
401
402
|
}
|
|
402
|
-
return
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}),
|
|
406
|
-
}, { flush: "post" }),
|
|
407
|
-
clearTimeout(
|
|
408
|
-
}), (n,
|
|
403
|
+
return S(j, (e) => {
|
|
404
|
+
P?.disconnect(), e && typeof ResizeObserver < "u" && (P = new ResizeObserver(() => {
|
|
405
|
+
j.value && (N.value = j.value.clientHeight);
|
|
406
|
+
}), P.observe(e), N.value = e.clientHeight);
|
|
407
|
+
}, { flush: "post" }), S(() => E.url, Ot, { immediate: !0 }), ee(() => {
|
|
408
|
+
clearTimeout(K), P?.disconnect();
|
|
409
|
+
}), Ve({ copyText: () => k.value.join("\n") }), (t, n) => (g(), l("div", ae, [D.value === "loading" ? (g(), l("p", oe, "正在加载…")) : D.value === "gate" ? (g(), l("div", se, [u("p", null, "该文件较大(" + v(y(e)(E.size)) + "),将在浏览器内加载。是否继续?", 1), u("button", {
|
|
409
410
|
type: "button",
|
|
410
411
|
class: "log__btn",
|
|
411
|
-
onClick:
|
|
412
|
-
}, "加载并预览")])) :
|
|
412
|
+
onClick: Dt
|
|
413
|
+
}, "加载并预览")])) : D.value === "error" ? (g(), l("div", ce, [u("p", null, "加载失败:" + v(O.value), 1), u("button", {
|
|
413
414
|
type: "button",
|
|
414
415
|
class: "log__btn",
|
|
415
|
-
onClick:
|
|
416
|
-
}, "重试")])) : (
|
|
417
|
-
|
|
418
|
-
"onUpdate:modelValue":
|
|
416
|
+
onClick: Dt
|
|
417
|
+
}, "重试")])) : (g(), l(o, { key: 3 }, [u("div", le, [
|
|
418
|
+
u("div", ue, [C(u("input", {
|
|
419
|
+
"onUpdate:modelValue": n[0] ||= (e) => W.value = e,
|
|
419
420
|
class: "log__search",
|
|
420
421
|
type: "text",
|
|
421
422
|
placeholder: "搜索…",
|
|
422
423
|
"aria-label": "搜索",
|
|
423
|
-
onKeydown:
|
|
424
|
-
}, null, 544), [[
|
|
424
|
+
onKeydown: re(nt, ["esc"])
|
|
425
|
+
}, null, 544), [[x, W.value]]), W.value ? (g(), l("button", {
|
|
425
426
|
key: 0,
|
|
426
427
|
type: "button",
|
|
427
428
|
class: "log__clear",
|
|
428
429
|
title: "清空搜索",
|
|
429
430
|
"aria-label": "清空搜索",
|
|
430
|
-
onClick:
|
|
431
|
-
}, [
|
|
431
|
+
onClick: nt
|
|
432
|
+
}, [f(r, {
|
|
432
433
|
name: "close",
|
|
433
434
|
size: 12
|
|
434
|
-
})])) :
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
})])) : c("", !0)]),
|
|
436
|
+
G.value ? (g(), l("span", de, v(X.value.length ? Y.value + 1 : 0) + "/" + v(X.value.length), 1)) : c("", !0),
|
|
437
|
+
u("button", {
|
|
437
438
|
type: "button",
|
|
438
439
|
class: "log__nav",
|
|
439
440
|
title: "上一处",
|
|
440
|
-
disabled: !
|
|
441
|
-
onClick:
|
|
442
|
-
}, " ↑ ", 8,
|
|
443
|
-
|
|
441
|
+
disabled: !X.value.length,
|
|
442
|
+
onClick: n[1] ||= (e) => Ct(-1)
|
|
443
|
+
}, " ↑ ", 8, fe),
|
|
444
|
+
u("button", {
|
|
444
445
|
type: "button",
|
|
445
446
|
class: "log__nav",
|
|
446
447
|
title: "下一处",
|
|
447
|
-
disabled: !
|
|
448
|
-
onClick:
|
|
449
|
-
}, " ↓ ", 8,
|
|
450
|
-
|
|
448
|
+
disabled: !X.value.length,
|
|
449
|
+
onClick: n[2] ||= (e) => Ct(1)
|
|
450
|
+
}, " ↓ ", 8, pe),
|
|
451
|
+
u("button", {
|
|
451
452
|
type: "button",
|
|
452
|
-
class:
|
|
453
|
-
disabled: !
|
|
453
|
+
class: m(["log__nav log__nav--text", { "log__nav--on": q.value }]),
|
|
454
|
+
disabled: !G.value,
|
|
454
455
|
title: "只看匹配行(命中的堆栈整条保留,行间可展开上下文)",
|
|
455
|
-
onClick:
|
|
456
|
-
}, " 过滤 ", 10,
|
|
457
|
-
|
|
456
|
+
onClick: n[3] ||= (e) => q.value = !q.value
|
|
457
|
+
}, " 过滤 ", 10, me),
|
|
458
|
+
u("button", {
|
|
458
459
|
type: "button",
|
|
459
|
-
class:
|
|
460
|
+
class: m(["log__nav log__nav--text", { "log__nav--on": J.value }]),
|
|
460
461
|
title: "只显示异常/错误行(异常头、ERROR/FATAL、*Exception/*Error 等;可与搜索过滤叠加)",
|
|
461
|
-
onClick:
|
|
462
|
+
onClick: n[4] ||= (e) => J.value = !J.value
|
|
462
463
|
}, " 只看异常 ", 2),
|
|
463
|
-
|
|
464
|
+
R.value ? (g(), l("button", {
|
|
464
465
|
key: 1,
|
|
465
466
|
type: "button",
|
|
466
|
-
class:
|
|
467
|
-
title: `共 ${
|
|
468
|
-
onClick:
|
|
469
|
-
},
|
|
470
|
-
|
|
467
|
+
class: m(["log__nav log__nav--text", { "log__nav--on": V.value }]),
|
|
468
|
+
title: `共 ${L.value.length} 处调用堆栈,点击${V.value ? "折叠" : "展开"}全部`,
|
|
469
|
+
onClick: Je
|
|
470
|
+
}, v(V.value ? "折叠堆栈" : "展开堆栈"), 11, he)) : c("", !0),
|
|
471
|
+
u("button", {
|
|
471
472
|
type: "button",
|
|
472
|
-
class:
|
|
473
|
+
class: m(["log__nav log__nav--text", { "log__nav--on": U.value || $e.value.length > 0 }]),
|
|
473
474
|
title: "按规则给行上色",
|
|
474
|
-
onClick:
|
|
475
|
+
onClick: n[5] ||= (e) => U.value = !U.value
|
|
475
476
|
}, " 上色 ", 2),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
"onUpdate:modelValue":
|
|
477
|
+
n[15] ||= u("span", { class: "log__spacer" }, null, -1),
|
|
478
|
+
C(u("input", {
|
|
479
|
+
"onUpdate:modelValue": n[6] ||= (e) => wt.value = e,
|
|
479
480
|
class: "log__goto",
|
|
480
481
|
type: "text",
|
|
481
482
|
inputmode: "numeric",
|
|
482
483
|
placeholder: "行号",
|
|
483
484
|
"aria-label": "跳转到行",
|
|
484
|
-
onKeydown:
|
|
485
|
-
}, null, 544), [[
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
onKeydown: re(Tt, ["enter"])
|
|
486
|
+
}, null, 544), [[x, wt.value]]),
|
|
487
|
+
u("span", ge, [d(v(k.value.length) + " 行", 1), R.value ? (g(), l(o, { key: 0 }, [d(" · " + v(L.value.length) + " 堆栈", 1)], 64)) : c("", !0)]),
|
|
488
|
+
U.value ? (g(), l("div", {
|
|
488
489
|
key: 2,
|
|
489
490
|
class: "log__overlay",
|
|
490
|
-
onClick:
|
|
491
|
-
})) :
|
|
492
|
-
|
|
491
|
+
onClick: n[7] ||= (e) => U.value = !1
|
|
492
|
+
})) : c("", !0),
|
|
493
|
+
U.value ? (g(), l("div", {
|
|
493
494
|
key: 3,
|
|
494
495
|
class: "log__rules",
|
|
495
|
-
onClick:
|
|
496
|
+
onClick: n[9] ||= ie(() => {}, ["stop"])
|
|
496
497
|
}, [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
498
|
+
n[14] ||= u("div", { class: "log__rules-head" }, [u("span", { class: "log__rules-title" }, "行上色规则"), u("span", { class: "log__rules-hint" }, "从上到下,首个匹配生效")], -1),
|
|
499
|
+
y(H).length ? c("", !0) : (g(), l("p", _e, [...n[10] ||= [
|
|
500
|
+
d(" 还没有规则。添加一条,用关键字或正则给匹配行上色(如 ", -1),
|
|
501
|
+
u("code", null, "ERROR", -1),
|
|
502
|
+
d(" 标红)。 ", -1)
|
|
502
503
|
]])),
|
|
503
|
-
(
|
|
504
|
+
(g(!0), l(o, null, te(y(H), (e, t) => (g(), l("div", {
|
|
504
505
|
key: e.id,
|
|
505
506
|
class: "log__rule"
|
|
506
507
|
}, [
|
|
507
|
-
|
|
508
|
+
C(u("input", {
|
|
508
509
|
"onUpdate:modelValue": (t) => e.enabled = t,
|
|
509
510
|
type: "checkbox",
|
|
510
511
|
title: "启用该规则"
|
|
511
|
-
}, null, 8,
|
|
512
|
-
|
|
512
|
+
}, null, 8, ve), [[b, e.enabled]]),
|
|
513
|
+
C(u("input", {
|
|
513
514
|
"onUpdate:modelValue": (t) => e.pattern = t,
|
|
514
|
-
class:
|
|
515
|
+
class: m(["log__rule-pat", { "log__rule-pat--bad": tt(e) }]),
|
|
515
516
|
type: "text",
|
|
516
517
|
placeholder: "关键字或正则"
|
|
517
|
-
}, null, 10,
|
|
518
|
-
|
|
518
|
+
}, null, 10, ye), [[x, e.pattern]]),
|
|
519
|
+
u("button", {
|
|
519
520
|
type: "button",
|
|
520
|
-
class:
|
|
521
|
+
class: m(["log__rule-tog", { "log__rule-tog--on": e.regex }]),
|
|
521
522
|
title: "按正则匹配",
|
|
522
523
|
onClick: (t) => e.regex = !e.regex
|
|
523
|
-
}, " .* ", 10,
|
|
524
|
-
|
|
524
|
+
}, " .* ", 10, be),
|
|
525
|
+
u("button", {
|
|
525
526
|
type: "button",
|
|
526
|
-
class:
|
|
527
|
+
class: m(["log__rule-tog", { "log__rule-tog--on": e.caseSensitive }]),
|
|
527
528
|
title: "区分大小写",
|
|
528
529
|
onClick: (t) => e.caseSensitive = !e.caseSensitive
|
|
529
|
-
}, " Aa ", 10,
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
}, " Aa ", 10, xe),
|
|
531
|
+
u("label", Se, [
|
|
532
|
+
C(u("input", {
|
|
532
533
|
"onUpdate:modelValue": (t) => e.bgOn = t,
|
|
533
534
|
type: "checkbox"
|
|
534
|
-
}, null, 8,
|
|
535
|
-
|
|
535
|
+
}, null, 8, Ce), [[b, e.bgOn]]),
|
|
536
|
+
C(u("input", {
|
|
536
537
|
"onUpdate:modelValue": (t) => e.bg = t,
|
|
537
538
|
type: "color",
|
|
538
539
|
disabled: !e.bgOn
|
|
539
|
-
}, null, 8,
|
|
540
|
-
|
|
540
|
+
}, null, 8, we), [[x, e.bg]]),
|
|
541
|
+
n[11] ||= u("span", null, "底", -1)
|
|
541
542
|
]),
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
u("label", Te, [
|
|
544
|
+
C(u("input", {
|
|
544
545
|
"onUpdate:modelValue": (t) => e.fgOn = t,
|
|
545
546
|
type: "checkbox"
|
|
546
|
-
}, null, 8,
|
|
547
|
-
|
|
547
|
+
}, null, 8, Ee), [[b, e.fgOn]]),
|
|
548
|
+
C(u("input", {
|
|
548
549
|
"onUpdate:modelValue": (t) => e.fg = t,
|
|
549
550
|
type: "color",
|
|
550
551
|
disabled: !e.fgOn
|
|
551
|
-
}, null, 8,
|
|
552
|
-
|
|
552
|
+
}, null, 8, De), [[x, e.fg]]),
|
|
553
|
+
n[12] ||= u("span", null, "字", -1)
|
|
553
554
|
]),
|
|
554
|
-
|
|
555
|
+
u("button", {
|
|
555
556
|
type: "button",
|
|
556
557
|
class: "log__rule-ic",
|
|
557
558
|
title: "上移",
|
|
558
|
-
disabled:
|
|
559
|
-
onClick: (t) =>
|
|
560
|
-
}, [
|
|
559
|
+
disabled: t === 0,
|
|
560
|
+
onClick: (t) => y(Qe)(e.id, -1)
|
|
561
|
+
}, [f(r, {
|
|
561
562
|
name: "arrowUp",
|
|
562
563
|
size: 12
|
|
563
|
-
})], 8,
|
|
564
|
-
|
|
564
|
+
})], 8, Oe),
|
|
565
|
+
u("button", {
|
|
565
566
|
type: "button",
|
|
566
567
|
class: "log__rule-ic",
|
|
567
568
|
title: "下移",
|
|
568
|
-
disabled:
|
|
569
|
-
onClick: (t) =>
|
|
570
|
-
}, [
|
|
569
|
+
disabled: t === y(H).length - 1,
|
|
570
|
+
onClick: (t) => y(Qe)(e.id, 1)
|
|
571
|
+
}, [f(r, {
|
|
571
572
|
name: "arrowDown",
|
|
572
573
|
size: 12
|
|
573
|
-
})], 8,
|
|
574
|
-
|
|
574
|
+
})], 8, ke),
|
|
575
|
+
u("button", {
|
|
575
576
|
type: "button",
|
|
576
577
|
class: "log__rule-ic log__rule-del",
|
|
577
578
|
title: "删除",
|
|
578
|
-
onClick: (t) =>
|
|
579
|
-
}, [
|
|
579
|
+
onClick: (t) => y(Ze)(e.id)
|
|
580
|
+
}, [f(r, {
|
|
580
581
|
name: "trash",
|
|
581
582
|
size: 12
|
|
582
|
-
})], 8,
|
|
583
|
+
})], 8, Ae)
|
|
583
584
|
]))), 128)),
|
|
584
|
-
|
|
585
|
+
u("button", {
|
|
585
586
|
type: "button",
|
|
586
587
|
class: "log__rules-add",
|
|
587
|
-
onClick:
|
|
588
|
-
}, [
|
|
588
|
+
onClick: n[8] ||= (...e) => y(Xe) && y(Xe)(...e)
|
|
589
|
+
}, [f(r, {
|
|
589
590
|
name: "plus",
|
|
590
591
|
size: 12
|
|
591
|
-
}),
|
|
592
|
-
])) :
|
|
593
|
-
]),
|
|
592
|
+
}), n[13] ||= d(" 添加规则 ", -1)])
|
|
593
|
+
])) : c("", !0)
|
|
594
|
+
]), u("div", {
|
|
594
595
|
ref_key: "scrollEl",
|
|
595
|
-
ref:
|
|
596
|
+
ref: j,
|
|
596
597
|
class: "log__scroll",
|
|
597
|
-
onScroll:
|
|
598
|
-
}, [
|
|
598
|
+
onScroll: Et
|
|
599
|
+
}, [u("div", {
|
|
599
600
|
class: "log__sizer",
|
|
600
|
-
style:
|
|
601
|
-
}, [
|
|
601
|
+
style: h({ height: mt.value * w + "px" })
|
|
602
|
+
}, [u("div", {
|
|
602
603
|
class: "log__rows",
|
|
603
|
-
style:
|
|
604
|
-
}, [(
|
|
604
|
+
style: h({ paddingTop: _t.value * w + "px" })
|
|
605
|
+
}, [(g(!0), l(o, null, te(bt.value, (e) => (g(), l("div", {
|
|
605
606
|
key: e.i,
|
|
606
|
-
class:
|
|
607
|
+
class: m(["log__row", {
|
|
607
608
|
log__gaprow: e.isGap,
|
|
608
|
-
"log__row--active": !e.isGap && e.n - 1 ===
|
|
609
|
+
"log__row--active": !e.isGap && e.n - 1 === at.value,
|
|
609
610
|
"log__row--header": !e.isGap && e.kind === "header",
|
|
610
611
|
"log__row--frame": !e.isGap && e.kind === "frame",
|
|
611
612
|
"log__row--context": e.context
|
|
612
613
|
}]),
|
|
613
|
-
style:
|
|
614
|
-
}, [e.isGap ? (
|
|
615
|
-
e.size >
|
|
614
|
+
style: h(!e.isGap && e.style && e.style.bg ? { background: e.style.bg } : void 0)
|
|
615
|
+
}, [e.isGap ? (g(), l(o, { key: 0 }, [
|
|
616
|
+
e.size > T ? (g(), l("button", {
|
|
616
617
|
key: 0,
|
|
617
618
|
type: "button",
|
|
618
619
|
class: "log__gapbtn",
|
|
619
620
|
title: `向下展开 ${e.step} 行(上方匹配之后)`,
|
|
620
|
-
onClick: (t) =>
|
|
621
|
-
}, [
|
|
621
|
+
onClick: (t) => ft(e.top, e.bottom, "down")
|
|
622
|
+
}, [f(r, {
|
|
622
623
|
name: "chevronDown",
|
|
623
624
|
size: 12
|
|
624
|
-
})], 8,
|
|
625
|
-
|
|
625
|
+
})], 8, je)) : c("", !0),
|
|
626
|
+
u("button", {
|
|
626
627
|
type: "button",
|
|
627
628
|
class: "log__gapmain",
|
|
628
629
|
title: `展开全部 ${e.size} 行`,
|
|
629
|
-
onClick: (t) =>
|
|
630
|
-
}, " ⋯ " +
|
|
631
|
-
e.size >
|
|
630
|
+
onClick: (t) => ft(e.top, e.bottom, "all")
|
|
631
|
+
}, " ⋯ " + v(e.size) + " 行 ", 9, Me),
|
|
632
|
+
e.size > T ? (g(), l("button", {
|
|
632
633
|
key: 1,
|
|
633
634
|
type: "button",
|
|
634
635
|
class: "log__gapbtn log__gapbtn--up",
|
|
635
636
|
title: `向上展开 ${e.step} 行(下方匹配之前)`,
|
|
636
|
-
onClick: (t) =>
|
|
637
|
-
}, [
|
|
637
|
+
onClick: (t) => ft(e.top, e.bottom, "up")
|
|
638
|
+
}, [f(r, {
|
|
638
639
|
name: "chevronDown",
|
|
639
640
|
size: 12
|
|
640
|
-
})], 8,
|
|
641
|
-
], 64)) : (
|
|
642
|
-
|
|
643
|
-
|
|
641
|
+
})], 8, Ne)) : c("", !0)
|
|
642
|
+
], 64)) : (g(), l(o, { key: 1 }, [
|
|
643
|
+
u("span", Pe, v(e.n), 1),
|
|
644
|
+
R.value ? (g(), l("span", Fe, [e.kind === "header" && !pt.value ? (g(), l("button", {
|
|
644
645
|
key: 0,
|
|
645
646
|
type: "button",
|
|
646
647
|
class: "log__fold",
|
|
647
648
|
title: e.collapsed ? "展开堆栈" : "折叠堆栈",
|
|
648
|
-
onClick: (t) =>
|
|
649
|
-
}, [
|
|
649
|
+
onClick: (t) => qe(e.gid)
|
|
650
|
+
}, [f(r, {
|
|
650
651
|
name: "chevronRight",
|
|
651
652
|
size: 12,
|
|
652
|
-
class:
|
|
653
|
-
}, null, 8, ["class"])], 8,
|
|
654
|
-
|
|
653
|
+
class: m(["log__chev", { "log__chev--open": !e.collapsed }])
|
|
654
|
+
}, null, 8, ["class"])], 8, Ie)) : c("", !0)])) : c("", !0),
|
|
655
|
+
u("span", {
|
|
655
656
|
class: "log__tx",
|
|
656
|
-
style:
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
657
|
+
style: h(e.style && e.style.fg ? { color: e.style.fg } : void 0)
|
|
658
|
+
}, [f(y(i), {
|
|
659
|
+
line: A.value?.lines[e.n - 1] ?? e.text,
|
|
660
|
+
query: G.value,
|
|
661
|
+
"mark-class": "log__hit"
|
|
662
|
+
}, null, 8, ["line", "query"])], 4),
|
|
663
|
+
e.kind === "header" && e.collapsed && !pt.value ? (g(), l("button", {
|
|
660
664
|
key: 1,
|
|
661
665
|
type: "button",
|
|
662
666
|
class: "log__badge",
|
|
663
667
|
title: "展开堆栈",
|
|
664
|
-
onClick: (t) =>
|
|
665
|
-
}, " ⋯ " +
|
|
668
|
+
onClick: (t) => qe(e.gid)
|
|
669
|
+
}, " ⋯ " + v(e.count) + " 帧 ", 9, Le)) : c("", !0)
|
|
666
670
|
], 64))], 6))), 128))], 4)], 4)], 544)], 64))]));
|
|
667
671
|
}
|
|
668
672
|
});
|
|
669
673
|
//#endregion
|
|
670
|
-
export {
|
|
674
|
+
export { Ve as default };
|
|
671
675
|
|
|
672
676
|
//# sourceMappingURL=LogViewer.vue_vue_type_script_setup_true_lang.js.map
|