@pennsieve-viz/tsviewer 1.1.13 → 1.1.15
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/{BFLibraryButton-B_TaDdTw.cjs → BFLibraryButton-CejyiXuM.cjs} +1 -1
- package/dist/{BFLibraryButton-DTcYY6VD.js → BFLibraryButton-DZ2vSCxe.js} +1 -1
- package/dist/{IconSelection-BocyglLO.js → IconSelection-BzYwshr4.js} +1 -1
- package/dist/{IconSelection-BPTLv8Go.cjs → IconSelection-cSMnGinu.cjs} +1 -1
- package/dist/{TSAnnotationCanvas-DaDdtIB4.cjs → TSAnnotationCanvas-4SmGl8c3.cjs} +1 -1
- package/dist/{TSAnnotationCanvas-DErBDH0Y.js → TSAnnotationCanvas-CbokCIrw.js} +2 -2
- package/dist/{TSAnnotationModal-DevUUWys.cjs → TSAnnotationModal-D0b8AU9O.cjs} +1 -1
- package/dist/{TSAnnotationModal-B3OSl05U.js → TSAnnotationModal-TeSqIo0K.js} +3 -3
- package/dist/{TSFilterModal-DHBpbDNp.js → TSFilterModal-2CfPJASx.js} +3 -3
- package/dist/{TSFilterModal-DoqvKSUT.cjs → TSFilterModal-fnGuCvzM.cjs} +1 -1
- package/dist/{TSScrubber-hN5JY-DA.js → TSScrubber-AOeCfSLx.js} +1 -1
- package/dist/{TSScrubber-E03DDcMn.cjs → TSScrubber-Du6rn9S7.cjs} +1 -1
- package/dist/{TSViewerCanvas-Dc5cwQzK.cjs → TSViewerCanvas-BQj5a8IV.cjs} +9 -9
- package/dist/{TSViewerCanvas-2Jz9ZgqW.js → TSViewerCanvas-ljR2hT4f.js} +995 -990
- package/dist/{TSViewerLayerWindow-PAfR31ZO.cjs → TSViewerLayerWindow-IT8yWMkx.cjs} +1 -1
- package/dist/{TSViewerLayerWindow-CalBmhT6.js → TSViewerLayerWindow-gUCLKeIc.js} +2 -2
- package/dist/{TSViewerToolbar-DL9XKYbV.js → TSViewerToolbar-CCrVE8tX.js} +1 -1
- package/dist/{TSViewerToolbar-C1wTQDPC.cjs → TSViewerToolbar-FIV2vK54.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-Cv3z3dFh.cjs → TsAnnotationDeleteDialog-B-NbfFR2.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-DXgN07Wj.js → TsAnnotationDeleteDialog-gCd7BJPS.js} +2 -2
- package/dist/index-Bu7yyQ4J.cjs +1 -0
- package/dist/{index-BsH36ax4.js → index-DdLtKk-t.js} +132 -130
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-yiwCKzNX.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onUnmounted, readonly, reactive, computed, watch, inject, onMounted, createElementBlock, openBlock, createElementVNode, renderSlot, normalizeStyle, defineAsyncComponent, nextTick, createVNode, withCtx, unref } from "vue";
|
|
2
2
|
import { storeToRefs } from "pinia";
|
|
3
|
-
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, m as commonjsGlobal, o as getDefaultExportFromCjs, u as useToken, p as propOr, g as _export_sfc, h as createViewerStore, q as propEq } from "./index-
|
|
3
|
+
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, m as commonjsGlobal, o as getDefaultExportFromCjs, u as useToken, p as propOr, g as _export_sfc, h as createViewerStore, q as propEq } from "./index-DdLtKk-t.js";
|
|
4
4
|
var head = /* @__PURE__ */ nth(0), XFind = /* @__PURE__ */ (function() {
|
|
5
5
|
function f(c, v) {
|
|
6
6
|
this.xf = v, this.f = c, this.found = !1;
|
|
@@ -1953,75 +1953,75 @@ function requireRoot() {
|
|
|
1953
1953
|
if (!m)
|
|
1954
1954
|
return a.asPromise(u, R, o, h);
|
|
1955
1955
|
var y = m === n;
|
|
1956
|
-
function g(
|
|
1956
|
+
function g(D, L) {
|
|
1957
1957
|
if (m) {
|
|
1958
1958
|
if (y)
|
|
1959
|
-
throw
|
|
1960
|
-
|
|
1959
|
+
throw D;
|
|
1960
|
+
L && L.resolveAll();
|
|
1961
1961
|
var b = m;
|
|
1962
|
-
m = null, b(
|
|
1962
|
+
m = null, b(D, L);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
|
-
function S(
|
|
1966
|
-
var
|
|
1967
|
-
if (
|
|
1968
|
-
var b =
|
|
1965
|
+
function S(D) {
|
|
1966
|
+
var L = D.lastIndexOf("google/protobuf/");
|
|
1967
|
+
if (L > -1) {
|
|
1968
|
+
var b = D.substring(L);
|
|
1969
1969
|
if (b in t) return b;
|
|
1970
1970
|
}
|
|
1971
1971
|
return null;
|
|
1972
1972
|
}
|
|
1973
|
-
function x(
|
|
1973
|
+
function x(D, L) {
|
|
1974
1974
|
try {
|
|
1975
|
-
if (a.isString(
|
|
1976
|
-
R.setOptions(
|
|
1975
|
+
if (a.isString(L) && L.charAt(0) === "{" && (L = JSON.parse(L)), !a.isString(L))
|
|
1976
|
+
R.setOptions(L.options).addJSON(L.nested);
|
|
1977
1977
|
else {
|
|
1978
|
-
e.filename =
|
|
1979
|
-
var b = e(
|
|
1978
|
+
e.filename = D;
|
|
1979
|
+
var b = e(L, R, h), q, E = 0;
|
|
1980
1980
|
if (b.imports)
|
|
1981
|
-
for (;
|
|
1982
|
-
(q = S(b.imports[
|
|
1981
|
+
for (; E < b.imports.length; ++E)
|
|
1982
|
+
(q = S(b.imports[E]) || R.resolvePath(D, b.imports[E])) && _(q);
|
|
1983
1983
|
if (b.weakImports)
|
|
1984
|
-
for (
|
|
1985
|
-
(q = S(b.weakImports[
|
|
1984
|
+
for (E = 0; E < b.weakImports.length; ++E)
|
|
1985
|
+
(q = S(b.weakImports[E]) || R.resolvePath(D, b.weakImports[E])) && _(q, !0);
|
|
1986
1986
|
}
|
|
1987
1987
|
} catch (T) {
|
|
1988
1988
|
g(T);
|
|
1989
1989
|
}
|
|
1990
1990
|
!y && !N && g(null, R);
|
|
1991
1991
|
}
|
|
1992
|
-
function _(
|
|
1993
|
-
if (
|
|
1994
|
-
if (R.files.push(
|
|
1995
|
-
y ? x(
|
|
1996
|
-
--N, x(
|
|
1992
|
+
function _(D, L) {
|
|
1993
|
+
if (D = S(D) || D, !(R.files.indexOf(D) > -1)) {
|
|
1994
|
+
if (R.files.push(D), D in t) {
|
|
1995
|
+
y ? x(D, t[D]) : (++N, setTimeout(function() {
|
|
1996
|
+
--N, x(D, t[D]);
|
|
1997
1997
|
}));
|
|
1998
1998
|
return;
|
|
1999
1999
|
}
|
|
2000
2000
|
if (y) {
|
|
2001
2001
|
var b;
|
|
2002
2002
|
try {
|
|
2003
|
-
b = a.fs.readFileSync(
|
|
2003
|
+
b = a.fs.readFileSync(D).toString("utf8");
|
|
2004
2004
|
} catch (q) {
|
|
2005
|
-
|
|
2005
|
+
L || g(q);
|
|
2006
2006
|
return;
|
|
2007
2007
|
}
|
|
2008
|
-
x(
|
|
2008
|
+
x(D, b);
|
|
2009
2009
|
} else
|
|
2010
|
-
++N, R.fetch(
|
|
2010
|
+
++N, R.fetch(D, function(q, E) {
|
|
2011
2011
|
if (--N, !!m) {
|
|
2012
2012
|
if (q) {
|
|
2013
|
-
|
|
2013
|
+
L ? N || g(null, R) : g(q);
|
|
2014
2014
|
return;
|
|
2015
2015
|
}
|
|
2016
|
-
x(
|
|
2016
|
+
x(D, E);
|
|
2017
2017
|
}
|
|
2018
2018
|
});
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
2021
|
var N = 0;
|
|
2022
2022
|
a.isString(o) && (o = [o]);
|
|
2023
|
-
for (var z = 0,
|
|
2024
|
-
(
|
|
2023
|
+
for (var z = 0, $; z < o.length; ++z)
|
|
2024
|
+
($ = R.resolvePath("", o[z])) && _($);
|
|
2025
2025
|
return y ? (R.resolveAll(), R) : (N || g(null, R), R);
|
|
2026
2026
|
}, r.prototype.loadSync = function(o, h) {
|
|
2027
2027
|
if (!a.isNode)
|
|
@@ -2761,129 +2761,129 @@ function requireTokenize() {
|
|
|
2761
2761
|
function _() {
|
|
2762
2762
|
var A = S === "'" ? v : c;
|
|
2763
2763
|
A.lastIndex = o - 1;
|
|
2764
|
-
var
|
|
2765
|
-
if (!
|
|
2764
|
+
var V = A.exec(s);
|
|
2765
|
+
if (!V)
|
|
2766
2766
|
throw x("string");
|
|
2767
|
-
return o = A.lastIndex, b(S), S = null, n(
|
|
2767
|
+
return o = A.lastIndex, b(S), S = null, n(V[1]);
|
|
2768
2768
|
}
|
|
2769
2769
|
function N(A) {
|
|
2770
2770
|
return s.charAt(A);
|
|
2771
2771
|
}
|
|
2772
|
-
function z(A,
|
|
2773
|
-
var
|
|
2772
|
+
function z(A, V, k) {
|
|
2773
|
+
var W = {
|
|
2774
2774
|
type: s.charAt(A++),
|
|
2775
2775
|
lineEmpty: !1,
|
|
2776
|
-
leading:
|
|
2777
|
-
},
|
|
2778
|
-
u ?
|
|
2779
|
-
var
|
|
2776
|
+
leading: k
|
|
2777
|
+
}, M;
|
|
2778
|
+
u ? M = 2 : M = 3;
|
|
2779
|
+
var H = A - M, G;
|
|
2780
2780
|
do
|
|
2781
|
-
if (--
|
|
2781
|
+
if (--H < 0 || (G = s.charAt(H)) === `
|
|
2782
2782
|
`) {
|
|
2783
|
-
|
|
2783
|
+
W.lineEmpty = !0;
|
|
2784
2784
|
break;
|
|
2785
2785
|
}
|
|
2786
|
-
while (
|
|
2787
|
-
for (var
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
`).trim(), y[m] =
|
|
2791
|
-
}
|
|
2792
|
-
function
|
|
2793
|
-
var
|
|
2794
|
-
return
|
|
2795
|
-
}
|
|
2796
|
-
function
|
|
2797
|
-
for (var
|
|
2786
|
+
while (G === " " || G === " ");
|
|
2787
|
+
for (var j = s.substring(A, V).split(i), Z = 0; Z < j.length; ++Z)
|
|
2788
|
+
j[Z] = j[Z].replace(u ? a : l, "").trim();
|
|
2789
|
+
W.text = j.join(`
|
|
2790
|
+
`).trim(), y[m] = W, R = m;
|
|
2791
|
+
}
|
|
2792
|
+
function $(A) {
|
|
2793
|
+
var V = D(A), k = s.substring(A, V), W = /^\s*\/\//.test(k);
|
|
2794
|
+
return W;
|
|
2795
|
+
}
|
|
2796
|
+
function D(A) {
|
|
2797
|
+
for (var V = A; V < h && N(V) !== `
|
|
2798
2798
|
`; )
|
|
2799
|
-
|
|
2800
|
-
return
|
|
2799
|
+
V++;
|
|
2800
|
+
return V;
|
|
2801
2801
|
}
|
|
2802
|
-
function
|
|
2802
|
+
function L() {
|
|
2803
2803
|
if (g.length > 0)
|
|
2804
2804
|
return g.shift();
|
|
2805
2805
|
if (S)
|
|
2806
2806
|
return _();
|
|
2807
|
-
var A,
|
|
2807
|
+
var A, V, k, W, M, H = o === 0;
|
|
2808
2808
|
do {
|
|
2809
2809
|
if (o === h)
|
|
2810
2810
|
return null;
|
|
2811
|
-
for (A = !1; e.test(
|
|
2812
|
-
if (
|
|
2813
|
-
` && (
|
|
2811
|
+
for (A = !1; e.test(k = N(o)); )
|
|
2812
|
+
if (k === `
|
|
2813
|
+
` && (H = !0, ++m), ++o === h)
|
|
2814
2814
|
return null;
|
|
2815
2815
|
if (N(o) === "/") {
|
|
2816
2816
|
if (++o === h)
|
|
2817
2817
|
throw x("comment");
|
|
2818
2818
|
if (N(o) === "/")
|
|
2819
2819
|
if (u) {
|
|
2820
|
-
if (
|
|
2821
|
-
|
|
2820
|
+
if (W = o, M = !1, $(o - 1)) {
|
|
2821
|
+
M = !0;
|
|
2822
2822
|
do
|
|
2823
|
-
if (o =
|
|
2823
|
+
if (o = D(o), o === h || (o++, !H))
|
|
2824
2824
|
break;
|
|
2825
|
-
while (
|
|
2825
|
+
while ($(o));
|
|
2826
2826
|
} else
|
|
2827
|
-
o = Math.min(h,
|
|
2828
|
-
|
|
2827
|
+
o = Math.min(h, D(o) + 1);
|
|
2828
|
+
M && (z(W, o, H), H = !0), m++, A = !0;
|
|
2829
2829
|
} else {
|
|
2830
|
-
for (
|
|
2830
|
+
for (M = N(W = o + 1) === "/"; N(++o) !== `
|
|
2831
2831
|
`; )
|
|
2832
2832
|
if (o === h)
|
|
2833
2833
|
return null;
|
|
2834
|
-
++o,
|
|
2834
|
+
++o, M && (z(W, o - 1, H), H = !0), ++m, A = !0;
|
|
2835
2835
|
}
|
|
2836
|
-
else if ((
|
|
2837
|
-
|
|
2836
|
+
else if ((k = N(o)) === "*") {
|
|
2837
|
+
W = o + 1, M = u || N(W) === "*";
|
|
2838
2838
|
do {
|
|
2839
|
-
if (
|
|
2839
|
+
if (k === `
|
|
2840
2840
|
` && ++m, ++o === h)
|
|
2841
2841
|
throw x("comment");
|
|
2842
|
-
|
|
2843
|
-
} while (
|
|
2844
|
-
++o,
|
|
2842
|
+
V = k, k = N(o);
|
|
2843
|
+
} while (V !== "*" || k !== "/");
|
|
2844
|
+
++o, M && (z(W, o - 2, H), H = !0), A = !0;
|
|
2845
2845
|
} else
|
|
2846
2846
|
return "/";
|
|
2847
2847
|
}
|
|
2848
2848
|
} while (A);
|
|
2849
|
-
var
|
|
2849
|
+
var G = o;
|
|
2850
2850
|
f.lastIndex = 0;
|
|
2851
|
-
var
|
|
2852
|
-
if (!
|
|
2853
|
-
for (;
|
|
2854
|
-
|
|
2855
|
-
var
|
|
2856
|
-
return (
|
|
2851
|
+
var j = f.test(N(G++));
|
|
2852
|
+
if (!j)
|
|
2853
|
+
for (; G < h && !f.test(N(G)); )
|
|
2854
|
+
++G;
|
|
2855
|
+
var Z = s.substring(o, o = G);
|
|
2856
|
+
return (Z === '"' || Z === "'") && (S = Z), Z;
|
|
2857
2857
|
}
|
|
2858
2858
|
function b(A) {
|
|
2859
2859
|
g.push(A);
|
|
2860
2860
|
}
|
|
2861
2861
|
function q() {
|
|
2862
2862
|
if (!g.length) {
|
|
2863
|
-
var A =
|
|
2863
|
+
var A = L();
|
|
2864
2864
|
if (A === null)
|
|
2865
2865
|
return null;
|
|
2866
2866
|
b(A);
|
|
2867
2867
|
}
|
|
2868
2868
|
return g[0];
|
|
2869
2869
|
}
|
|
2870
|
-
function
|
|
2871
|
-
var
|
|
2872
|
-
if (
|
|
2873
|
-
return
|
|
2874
|
-
if (!
|
|
2875
|
-
throw x("token '" +
|
|
2870
|
+
function E(A, V) {
|
|
2871
|
+
var k = q(), W = k === A;
|
|
2872
|
+
if (W)
|
|
2873
|
+
return L(), !0;
|
|
2874
|
+
if (!V)
|
|
2875
|
+
throw x("token '" + k + "', '" + A + "' expected");
|
|
2876
2876
|
return !1;
|
|
2877
2877
|
}
|
|
2878
2878
|
function T(A) {
|
|
2879
|
-
var
|
|
2880
|
-
return A === void 0 ? (
|
|
2879
|
+
var V = null, k;
|
|
2880
|
+
return A === void 0 ? (k = y[m - 1], delete y[m - 1], k && (u || k.type === "*" || k.lineEmpty) && (V = k.leading ? k.text : null)) : (R < A && q(), k = y[A], delete y[A], k && !k.lineEmpty && (u || k.type === "/") && (V = k.leading ? null : k.text)), V;
|
|
2881
2881
|
}
|
|
2882
2882
|
return Object.defineProperty({
|
|
2883
|
-
next:
|
|
2883
|
+
next: L,
|
|
2884
2884
|
peek: q,
|
|
2885
2885
|
push: b,
|
|
2886
|
-
skip:
|
|
2886
|
+
skip: E,
|
|
2887
2887
|
cmnt: T
|
|
2888
2888
|
}, "line", {
|
|
2889
2889
|
get: function() {
|
|
@@ -2898,32 +2898,32 @@ function requireParse() {
|
|
|
2898
2898
|
if (hasRequiredParse) return parse_1;
|
|
2899
2899
|
hasRequiredParse = 1, parse_1 = _, _.filename = null, _.defaults = { keepCase: !1 };
|
|
2900
2900
|
var f = requireTokenize(), c = requireRoot(), v = requireType(), l = requireField(), a = requireMapfield(), i = requireOneof(), e = require_enum(), t = requireService(), r = requireMethod(), n = requireObject(), d = requireTypes(), s = requireUtil(), u = /^[1-9][0-9]*$/, o = /^-?[1-9][0-9]*$/, h = /^0[x][0-9a-fA-F]+$/, m = /^-?0[x][0-9a-fA-F]+$/, R = /^0[0-7]+$/, y = /^-?0[0-7]+$/, g = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, S = /^[a-zA-Z_][a-zA-Z_0-9]*$/, x = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
|
|
2901
|
-
function _(N, z,
|
|
2902
|
-
z instanceof c || (
|
|
2903
|
-
var
|
|
2901
|
+
function _(N, z, $) {
|
|
2902
|
+
z instanceof c || ($ = z, z = new c()), $ || ($ = _.defaults);
|
|
2903
|
+
var D = $.preferTrailingComment || !1, L = f(N, $.alternateCommentMode || !1), b = L.next, q = L.push, E = L.peek, T = L.skip, A = L.cmnt, V = !0, k, W, M, H = "proto2", G = z, j = [], Z = {}, U = $.keepCase ? function(P) {
|
|
2904
2904
|
return P;
|
|
2905
2905
|
} : s.camelCase;
|
|
2906
|
-
function
|
|
2907
|
-
|
|
2908
|
-
P._edition =
|
|
2909
|
-
P.getOption(C) === void 0 && P.setOption(C,
|
|
2906
|
+
function ne() {
|
|
2907
|
+
j.forEach((P) => {
|
|
2908
|
+
P._edition = H, Object.keys(Z).forEach((C) => {
|
|
2909
|
+
P.getOption(C) === void 0 && P.setOption(C, Z[C], !0);
|
|
2910
2910
|
});
|
|
2911
2911
|
});
|
|
2912
2912
|
}
|
|
2913
|
-
function
|
|
2913
|
+
function B(P, C, p) {
|
|
2914
2914
|
var w = _.filename;
|
|
2915
|
-
return p || (_.filename = null), Error("illegal " + (C || "token") + " '" + P + "' (" + (w ? w + ", " : "") + "line " +
|
|
2915
|
+
return p || (_.filename = null), Error("illegal " + (C || "token") + " '" + P + "' (" + (w ? w + ", " : "") + "line " + L.line + ")");
|
|
2916
2916
|
}
|
|
2917
2917
|
function re() {
|
|
2918
2918
|
var P = [], C;
|
|
2919
2919
|
do {
|
|
2920
2920
|
if ((C = b()) !== '"' && C !== "'")
|
|
2921
|
-
throw
|
|
2922
|
-
P.push(b()), T(C), C =
|
|
2921
|
+
throw B(C);
|
|
2922
|
+
P.push(b()), T(C), C = E();
|
|
2923
2923
|
} while (C === '"' || C === "'");
|
|
2924
2924
|
return P.join("");
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function ue(P) {
|
|
2927
2927
|
var C = b();
|
|
2928
2928
|
switch (C) {
|
|
2929
2929
|
case "'":
|
|
@@ -2937,7 +2937,7 @@ function requireParse() {
|
|
|
2937
2937
|
return !1;
|
|
2938
2938
|
}
|
|
2939
2939
|
try {
|
|
2940
|
-
return
|
|
2940
|
+
return ce(
|
|
2941
2941
|
C,
|
|
2942
2942
|
/* insideTryCatch */
|
|
2943
2943
|
!0
|
|
@@ -2945,43 +2945,43 @@ function requireParse() {
|
|
|
2945
2945
|
} catch {
|
|
2946
2946
|
if (x.test(C))
|
|
2947
2947
|
return C;
|
|
2948
|
-
throw
|
|
2948
|
+
throw B(C, "value");
|
|
2949
2949
|
}
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function se(P, C) {
|
|
2952
2952
|
var p, w;
|
|
2953
2953
|
do
|
|
2954
|
-
if (C && ((p =
|
|
2954
|
+
if (C && ((p = E()) === '"' || p === "'")) {
|
|
2955
2955
|
var O = re();
|
|
2956
|
-
if (P.push(O),
|
|
2957
|
-
throw
|
|
2956
|
+
if (P.push(O), H >= 2023)
|
|
2957
|
+
throw B(O, "id");
|
|
2958
2958
|
} else
|
|
2959
2959
|
try {
|
|
2960
|
-
P.push([w =
|
|
2961
|
-
} catch (
|
|
2962
|
-
if (C && x.test(p) &&
|
|
2960
|
+
P.push([w = ve(b()), T("to", !0) ? ve(b()) : w]);
|
|
2961
|
+
} catch (I) {
|
|
2962
|
+
if (C && x.test(p) && H >= 2023)
|
|
2963
2963
|
P.push(p);
|
|
2964
2964
|
else
|
|
2965
|
-
throw
|
|
2965
|
+
throw I;
|
|
2966
2966
|
}
|
|
2967
2967
|
while (T(",", !0));
|
|
2968
|
-
var
|
|
2969
|
-
|
|
2970
|
-
this.options === void 0 && (this.options = {}), this.options[
|
|
2971
|
-
},
|
|
2972
|
-
|
|
2973
|
-
function(
|
|
2974
|
-
if (
|
|
2975
|
-
|
|
2968
|
+
var F = { options: void 0 };
|
|
2969
|
+
F.setOption = function(I, X) {
|
|
2970
|
+
this.options === void 0 && (this.options = {}), this.options[I] = X;
|
|
2971
|
+
}, he(
|
|
2972
|
+
F,
|
|
2973
|
+
function(X) {
|
|
2974
|
+
if (X === "option")
|
|
2975
|
+
me(F, X), T(";");
|
|
2976
2976
|
else
|
|
2977
|
-
throw
|
|
2977
|
+
throw B(X);
|
|
2978
2978
|
},
|
|
2979
2979
|
function() {
|
|
2980
|
-
|
|
2980
|
+
we(F);
|
|
2981
2981
|
}
|
|
2982
2982
|
);
|
|
2983
2983
|
}
|
|
2984
|
-
function
|
|
2984
|
+
function ce(P, C) {
|
|
2985
2985
|
var p = 1;
|
|
2986
2986
|
switch (P.charAt(0) === "-" && (p = -1, P = P.substring(1)), P) {
|
|
2987
2987
|
case "inf":
|
|
@@ -3004,9 +3004,9 @@ function requireParse() {
|
|
|
3004
3004
|
return p * parseInt(P, 8);
|
|
3005
3005
|
if (g.test(P))
|
|
3006
3006
|
return p * parseFloat(P);
|
|
3007
|
-
throw
|
|
3007
|
+
throw B(P, "number", C);
|
|
3008
3008
|
}
|
|
3009
|
-
function
|
|
3009
|
+
function ve(P, C) {
|
|
3010
3010
|
switch (P) {
|
|
3011
3011
|
case "max":
|
|
3012
3012
|
case "MAX":
|
|
@@ -3016,55 +3016,55 @@ function requireParse() {
|
|
|
3016
3016
|
return 0;
|
|
3017
3017
|
}
|
|
3018
3018
|
if (!C && P.charAt(0) === "-")
|
|
3019
|
-
throw
|
|
3019
|
+
throw B(P, "id");
|
|
3020
3020
|
if (o.test(P))
|
|
3021
3021
|
return parseInt(P, 10);
|
|
3022
3022
|
if (m.test(P))
|
|
3023
3023
|
return parseInt(P, 16);
|
|
3024
3024
|
if (y.test(P))
|
|
3025
3025
|
return parseInt(P, 8);
|
|
3026
|
-
throw
|
|
3026
|
+
throw B(P, "id");
|
|
3027
3027
|
}
|
|
3028
3028
|
function Re() {
|
|
3029
|
-
if (
|
|
3030
|
-
throw
|
|
3031
|
-
if (
|
|
3032
|
-
throw
|
|
3033
|
-
|
|
3034
|
-
}
|
|
3035
|
-
function
|
|
3036
|
-
var P =
|
|
3029
|
+
if (k !== void 0)
|
|
3030
|
+
throw B("package");
|
|
3031
|
+
if (k = b(), !x.test(k))
|
|
3032
|
+
throw B(k, "name");
|
|
3033
|
+
G = G.define(k), T(";");
|
|
3034
|
+
}
|
|
3035
|
+
function _e() {
|
|
3036
|
+
var P = E(), C;
|
|
3037
3037
|
switch (P) {
|
|
3038
3038
|
case "weak":
|
|
3039
|
-
C =
|
|
3039
|
+
C = M || (M = []), b();
|
|
3040
3040
|
break;
|
|
3041
3041
|
case "public":
|
|
3042
3042
|
b();
|
|
3043
3043
|
// eslint-disable-next-line no-fallthrough
|
|
3044
3044
|
default:
|
|
3045
|
-
C =
|
|
3045
|
+
C = W || (W = []);
|
|
3046
3046
|
break;
|
|
3047
3047
|
}
|
|
3048
3048
|
P = re(), T(";"), C.push(P);
|
|
3049
3049
|
}
|
|
3050
|
-
function
|
|
3051
|
-
if (T("="),
|
|
3052
|
-
throw
|
|
3050
|
+
function fe() {
|
|
3051
|
+
if (T("="), H = re(), H < 2023)
|
|
3052
|
+
throw B(H, "syntax");
|
|
3053
3053
|
T(";");
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3056
|
-
if (T("="),
|
|
3057
|
-
throw
|
|
3055
|
+
function de() {
|
|
3056
|
+
if (T("="), H = re(), !["2023"].includes(H))
|
|
3057
|
+
throw B(H, "edition");
|
|
3058
3058
|
T(";");
|
|
3059
3059
|
}
|
|
3060
3060
|
function ge(P, C) {
|
|
3061
3061
|
switch (C) {
|
|
3062
3062
|
case "option":
|
|
3063
|
-
return
|
|
3063
|
+
return me(P, C), T(";"), !0;
|
|
3064
3064
|
case "message":
|
|
3065
3065
|
return ke(P, C), !0;
|
|
3066
3066
|
case "enum":
|
|
3067
|
-
return
|
|
3067
|
+
return oe(P, C), !0;
|
|
3068
3068
|
case "service":
|
|
3069
3069
|
return Ee(P, C), !0;
|
|
3070
3070
|
case "extend":
|
|
@@ -3072,206 +3072,206 @@ function requireParse() {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
return !1;
|
|
3074
3074
|
}
|
|
3075
|
-
function
|
|
3076
|
-
var w =
|
|
3075
|
+
function he(P, C, p) {
|
|
3076
|
+
var w = L.line;
|
|
3077
3077
|
if (P && (typeof P.comment != "string" && (P.comment = A()), P.filename = _.filename), T("{", !0)) {
|
|
3078
3078
|
for (var O; (O = b()) !== "}"; )
|
|
3079
3079
|
C(O);
|
|
3080
3080
|
T(";", !0);
|
|
3081
3081
|
} else
|
|
3082
|
-
p && p(), T(";"), P && (typeof P.comment != "string" ||
|
|
3082
|
+
p && p(), T(";"), P && (typeof P.comment != "string" || D) && (P.comment = A(w) || P.comment);
|
|
3083
3083
|
}
|
|
3084
3084
|
function ke(P, C) {
|
|
3085
3085
|
if (!S.test(C = b()))
|
|
3086
|
-
throw
|
|
3086
|
+
throw B(C, "type name");
|
|
3087
3087
|
var p = new v(C);
|
|
3088
|
-
|
|
3088
|
+
he(p, function(O) {
|
|
3089
3089
|
if (!ge(p, O))
|
|
3090
3090
|
switch (O) {
|
|
3091
3091
|
case "map":
|
|
3092
3092
|
Oe(p);
|
|
3093
3093
|
break;
|
|
3094
3094
|
case "required":
|
|
3095
|
-
if (
|
|
3096
|
-
throw
|
|
3095
|
+
if (H !== "proto2")
|
|
3096
|
+
throw B(O);
|
|
3097
3097
|
/* eslint-disable no-fallthrough */
|
|
3098
3098
|
case "repeated":
|
|
3099
|
-
|
|
3099
|
+
pe(p, O);
|
|
3100
3100
|
break;
|
|
3101
3101
|
case "optional":
|
|
3102
|
-
if (
|
|
3103
|
-
|
|
3102
|
+
if (H === "proto3")
|
|
3103
|
+
pe(p, "proto3_optional");
|
|
3104
3104
|
else {
|
|
3105
|
-
if (
|
|
3106
|
-
throw
|
|
3107
|
-
|
|
3105
|
+
if (H !== "proto2")
|
|
3106
|
+
throw B(O);
|
|
3107
|
+
pe(p, "optional");
|
|
3108
3108
|
}
|
|
3109
3109
|
break;
|
|
3110
3110
|
case "oneof":
|
|
3111
3111
|
Te(p, O);
|
|
3112
3112
|
break;
|
|
3113
3113
|
case "extensions":
|
|
3114
|
-
|
|
3114
|
+
se(p.extensions || (p.extensions = []));
|
|
3115
3115
|
break;
|
|
3116
3116
|
case "reserved":
|
|
3117
|
-
|
|
3117
|
+
se(p.reserved || (p.reserved = []), !0);
|
|
3118
3118
|
break;
|
|
3119
3119
|
default:
|
|
3120
|
-
if (
|
|
3121
|
-
throw
|
|
3122
|
-
q(O),
|
|
3120
|
+
if (H === "proto2" || !x.test(O))
|
|
3121
|
+
throw B(O);
|
|
3122
|
+
q(O), pe(p, "optional");
|
|
3123
3123
|
break;
|
|
3124
3124
|
}
|
|
3125
|
-
}), P.add(p), P ===
|
|
3125
|
+
}), P.add(p), P === G && j.push(p);
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function pe(P, C, p) {
|
|
3128
3128
|
var w = b();
|
|
3129
3129
|
if (w === "group") {
|
|
3130
3130
|
Se(P, C);
|
|
3131
3131
|
return;
|
|
3132
3132
|
}
|
|
3133
|
-
for (; w.endsWith(".") ||
|
|
3133
|
+
for (; w.endsWith(".") || E().startsWith("."); )
|
|
3134
3134
|
w += b();
|
|
3135
3135
|
if (!x.test(w))
|
|
3136
|
-
throw
|
|
3136
|
+
throw B(w, "type");
|
|
3137
3137
|
var O = b();
|
|
3138
3138
|
if (!S.test(O))
|
|
3139
|
-
throw
|
|
3139
|
+
throw B(O, "name");
|
|
3140
3140
|
O = U(O), T("=");
|
|
3141
|
-
var
|
|
3142
|
-
if (
|
|
3143
|
-
if (
|
|
3144
|
-
|
|
3141
|
+
var F = new l(O, ve(b()), w, C, p);
|
|
3142
|
+
if (he(F, function(Y) {
|
|
3143
|
+
if (Y === "option")
|
|
3144
|
+
me(F, Y), T(";");
|
|
3145
3145
|
else
|
|
3146
|
-
throw
|
|
3146
|
+
throw B(Y);
|
|
3147
3147
|
}, function() {
|
|
3148
|
-
|
|
3148
|
+
we(F);
|
|
3149
3149
|
}), C === "proto3_optional") {
|
|
3150
|
-
var
|
|
3151
|
-
|
|
3150
|
+
var I = new i("_" + O);
|
|
3151
|
+
F.setOption("proto3_optional", !0), I.add(F), P.add(I);
|
|
3152
3152
|
} else
|
|
3153
|
-
P.add(
|
|
3154
|
-
P ===
|
|
3153
|
+
P.add(F);
|
|
3154
|
+
P === G && j.push(F);
|
|
3155
3155
|
}
|
|
3156
3156
|
function Se(P, C) {
|
|
3157
|
-
if (
|
|
3158
|
-
throw
|
|
3157
|
+
if (H >= 2023)
|
|
3158
|
+
throw B("group");
|
|
3159
3159
|
var p = b();
|
|
3160
3160
|
if (!S.test(p))
|
|
3161
|
-
throw
|
|
3161
|
+
throw B(p, "name");
|
|
3162
3162
|
var w = s.lcFirst(p);
|
|
3163
3163
|
p === w && (p = s.ucFirst(p)), T("=");
|
|
3164
|
-
var O =
|
|
3165
|
-
|
|
3166
|
-
var
|
|
3167
|
-
|
|
3168
|
-
switch (
|
|
3164
|
+
var O = ve(b()), F = new v(p);
|
|
3165
|
+
F.group = !0;
|
|
3166
|
+
var I = new l(w, O, p, C);
|
|
3167
|
+
I.filename = _.filename, he(F, function(Y) {
|
|
3168
|
+
switch (Y) {
|
|
3169
3169
|
case "option":
|
|
3170
|
-
|
|
3170
|
+
me(F, Y), T(";");
|
|
3171
3171
|
break;
|
|
3172
3172
|
case "required":
|
|
3173
3173
|
case "repeated":
|
|
3174
|
-
|
|
3174
|
+
pe(F, Y);
|
|
3175
3175
|
break;
|
|
3176
3176
|
case "optional":
|
|
3177
|
-
|
|
3177
|
+
H === "proto3" ? pe(F, "proto3_optional") : pe(F, "optional");
|
|
3178
3178
|
break;
|
|
3179
3179
|
case "message":
|
|
3180
|
-
ke(
|
|
3180
|
+
ke(F, Y);
|
|
3181
3181
|
break;
|
|
3182
3182
|
case "enum":
|
|
3183
|
-
|
|
3183
|
+
oe(F, Y);
|
|
3184
3184
|
break;
|
|
3185
3185
|
case "reserved":
|
|
3186
|
-
|
|
3186
|
+
se(F.reserved || (F.reserved = []), !0);
|
|
3187
3187
|
break;
|
|
3188
3188
|
/* istanbul ignore next */
|
|
3189
3189
|
default:
|
|
3190
|
-
throw
|
|
3190
|
+
throw B(Y);
|
|
3191
3191
|
}
|
|
3192
|
-
}), P.add(
|
|
3192
|
+
}), P.add(F).add(I);
|
|
3193
3193
|
}
|
|
3194
3194
|
function Oe(P) {
|
|
3195
3195
|
T("<");
|
|
3196
3196
|
var C = b();
|
|
3197
3197
|
if (d.mapKey[C] === void 0)
|
|
3198
|
-
throw
|
|
3198
|
+
throw B(C, "type");
|
|
3199
3199
|
T(",");
|
|
3200
3200
|
var p = b();
|
|
3201
3201
|
if (!x.test(p))
|
|
3202
|
-
throw
|
|
3202
|
+
throw B(p, "type");
|
|
3203
3203
|
T(">");
|
|
3204
3204
|
var w = b();
|
|
3205
3205
|
if (!S.test(w))
|
|
3206
|
-
throw
|
|
3206
|
+
throw B(w, "name");
|
|
3207
3207
|
T("=");
|
|
3208
|
-
var O = new a(U(w),
|
|
3209
|
-
|
|
3210
|
-
if (
|
|
3211
|
-
|
|
3208
|
+
var O = new a(U(w), ve(b()), C, p);
|
|
3209
|
+
he(O, function(I) {
|
|
3210
|
+
if (I === "option")
|
|
3211
|
+
me(O, I), T(";");
|
|
3212
3212
|
else
|
|
3213
|
-
throw
|
|
3213
|
+
throw B(I);
|
|
3214
3214
|
}, function() {
|
|
3215
|
-
|
|
3215
|
+
we(O);
|
|
3216
3216
|
}), P.add(O);
|
|
3217
3217
|
}
|
|
3218
3218
|
function Te(P, C) {
|
|
3219
3219
|
if (!S.test(C = b()))
|
|
3220
|
-
throw
|
|
3220
|
+
throw B(C, "name");
|
|
3221
3221
|
var p = new i(U(C));
|
|
3222
|
-
|
|
3223
|
-
O === "option" ? (
|
|
3222
|
+
he(p, function(O) {
|
|
3223
|
+
O === "option" ? (me(p, O), T(";")) : (q(O), pe(p, "optional"));
|
|
3224
3224
|
}), P.add(p);
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function oe(P, C) {
|
|
3227
3227
|
if (!S.test(C = b()))
|
|
3228
|
-
throw
|
|
3228
|
+
throw B(C, "name");
|
|
3229
3229
|
var p = new e(C);
|
|
3230
|
-
|
|
3230
|
+
he(p, function(O) {
|
|
3231
3231
|
switch (O) {
|
|
3232
3232
|
case "option":
|
|
3233
|
-
|
|
3233
|
+
me(p, O), T(";");
|
|
3234
3234
|
break;
|
|
3235
3235
|
case "reserved":
|
|
3236
|
-
|
|
3236
|
+
se(p.reserved || (p.reserved = []), !0), p.reserved === void 0 && (p.reserved = []);
|
|
3237
3237
|
break;
|
|
3238
3238
|
default:
|
|
3239
3239
|
be(p, O);
|
|
3240
3240
|
}
|
|
3241
|
-
}), P.add(p), P ===
|
|
3241
|
+
}), P.add(p), P === G && j.push(p);
|
|
3242
3242
|
}
|
|
3243
3243
|
function be(P, C) {
|
|
3244
3244
|
if (!S.test(C))
|
|
3245
|
-
throw
|
|
3245
|
+
throw B(C, "name");
|
|
3246
3246
|
T("=");
|
|
3247
|
-
var p =
|
|
3247
|
+
var p = ve(b(), !0), w = {
|
|
3248
3248
|
options: void 0
|
|
3249
3249
|
};
|
|
3250
3250
|
w.getOption = function(O) {
|
|
3251
3251
|
return this.options[O];
|
|
3252
|
-
}, w.setOption = function(O,
|
|
3253
|
-
n.prototype.setOption.call(w, O,
|
|
3252
|
+
}, w.setOption = function(O, F) {
|
|
3253
|
+
n.prototype.setOption.call(w, O, F);
|
|
3254
3254
|
}, w.setParsedOption = function() {
|
|
3255
|
-
},
|
|
3256
|
-
if (
|
|
3257
|
-
|
|
3255
|
+
}, he(w, function(F) {
|
|
3256
|
+
if (F === "option")
|
|
3257
|
+
me(w, F), T(";");
|
|
3258
3258
|
else
|
|
3259
|
-
throw
|
|
3259
|
+
throw B(F);
|
|
3260
3260
|
}, function() {
|
|
3261
|
-
|
|
3261
|
+
we(w);
|
|
3262
3262
|
}), P.add(C, p, w.comment, w.parsedOptions || w.options);
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function me(P, C) {
|
|
3265
3265
|
var p, w, O = !0;
|
|
3266
3266
|
for (C === "option" && (C = b()); C !== "="; ) {
|
|
3267
3267
|
if (C === "(") {
|
|
3268
|
-
var
|
|
3269
|
-
T(")"), C = "(" +
|
|
3268
|
+
var F = b();
|
|
3269
|
+
T(")"), C = "(" + F + ")";
|
|
3270
3270
|
}
|
|
3271
3271
|
if (O) {
|
|
3272
3272
|
if (O = !1, C.includes(".") && !C.includes("(")) {
|
|
3273
|
-
var
|
|
3274
|
-
p =
|
|
3273
|
+
var I = C.split(".");
|
|
3274
|
+
p = I[0] + ".", C = I[1];
|
|
3275
3275
|
continue;
|
|
3276
3276
|
}
|
|
3277
3277
|
p = C;
|
|
@@ -3279,52 +3279,52 @@ function requireParse() {
|
|
|
3279
3279
|
w = w ? w += C : C;
|
|
3280
3280
|
C = b();
|
|
3281
3281
|
}
|
|
3282
|
-
var
|
|
3283
|
-
w = w && w[0] === "." ? w.slice(1) : w, p = p && p[p.length - 1] === "." ? p.slice(0, -1) : p,
|
|
3282
|
+
var X = w ? p.concat(w) : p, Y = qe(P, X);
|
|
3283
|
+
w = w && w[0] === "." ? w.slice(1) : w, p = p && p[p.length - 1] === "." ? p.slice(0, -1) : p, ye(P, p, Y, w);
|
|
3284
3284
|
}
|
|
3285
3285
|
function qe(P, C) {
|
|
3286
3286
|
if (T("{", !0)) {
|
|
3287
3287
|
for (var p = {}; !T("}", !0); ) {
|
|
3288
|
-
if (!S.test(
|
|
3289
|
-
throw
|
|
3290
|
-
if (
|
|
3291
|
-
throw
|
|
3292
|
-
var w, O =
|
|
3293
|
-
if (T(":", !0),
|
|
3294
|
-
w = qe(P, C + "." +
|
|
3295
|
-
else if (
|
|
3288
|
+
if (!S.test(ae = b()))
|
|
3289
|
+
throw B(ae, "name");
|
|
3290
|
+
if (ae === null)
|
|
3291
|
+
throw B(ae, "end of input");
|
|
3292
|
+
var w, O = ae;
|
|
3293
|
+
if (T(":", !0), E() === "{")
|
|
3294
|
+
w = qe(P, C + "." + ae);
|
|
3295
|
+
else if (E() === "[") {
|
|
3296
3296
|
w = [];
|
|
3297
|
-
var
|
|
3297
|
+
var F;
|
|
3298
3298
|
if (T("[", !0)) {
|
|
3299
3299
|
do
|
|
3300
|
-
|
|
3300
|
+
F = ue(), w.push(F);
|
|
3301
3301
|
while (T(",", !0));
|
|
3302
|
-
T("]"), typeof
|
|
3302
|
+
T("]"), typeof F < "u" && Ae(P, C + "." + ae, F);
|
|
3303
3303
|
}
|
|
3304
3304
|
} else
|
|
3305
|
-
w =
|
|
3306
|
-
var
|
|
3307
|
-
|
|
3305
|
+
w = ue(), Ae(P, C + "." + ae, w);
|
|
3306
|
+
var I = p[O];
|
|
3307
|
+
I && (w = [].concat(I).concat(w)), p[O] = w, T(",", !0), T(";", !0);
|
|
3308
3308
|
}
|
|
3309
3309
|
return p;
|
|
3310
3310
|
}
|
|
3311
|
-
var
|
|
3312
|
-
return Ae(P, C,
|
|
3311
|
+
var X = ue();
|
|
3312
|
+
return Ae(P, C, X), X;
|
|
3313
3313
|
}
|
|
3314
3314
|
function Ae(P, C, p) {
|
|
3315
|
-
if (
|
|
3316
|
-
|
|
3315
|
+
if (G === P && /^features\./.test(C)) {
|
|
3316
|
+
Z[C] = p;
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
3319
|
P.setOption && P.setOption(C, p);
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function ye(P, C, p, w) {
|
|
3322
3322
|
P.setParsedOption && P.setParsedOption(C, p, w);
|
|
3323
3323
|
}
|
|
3324
|
-
function
|
|
3324
|
+
function we(P) {
|
|
3325
3325
|
if (T("[", !0)) {
|
|
3326
3326
|
do
|
|
3327
|
-
|
|
3327
|
+
me(P, "option");
|
|
3328
3328
|
while (T(",", !0));
|
|
3329
3329
|
T("]");
|
|
3330
3330
|
}
|
|
@@ -3332,89 +3332,89 @@ function requireParse() {
|
|
|
3332
3332
|
}
|
|
3333
3333
|
function Ee(P, C) {
|
|
3334
3334
|
if (!S.test(C = b()))
|
|
3335
|
-
throw
|
|
3335
|
+
throw B(C, "service name");
|
|
3336
3336
|
var p = new t(C);
|
|
3337
|
-
|
|
3337
|
+
he(p, function(O) {
|
|
3338
3338
|
if (!ge(p, O))
|
|
3339
3339
|
if (O === "rpc")
|
|
3340
3340
|
xe(p, O);
|
|
3341
3341
|
else
|
|
3342
|
-
throw
|
|
3343
|
-
}), P.add(p), P ===
|
|
3342
|
+
throw B(O);
|
|
3343
|
+
}), P.add(p), P === G && j.push(p);
|
|
3344
3344
|
}
|
|
3345
3345
|
function xe(P, C) {
|
|
3346
3346
|
var p = A(), w = C;
|
|
3347
3347
|
if (!S.test(C = b()))
|
|
3348
|
-
throw
|
|
3349
|
-
var O = C,
|
|
3350
|
-
if (T("("), T("stream", !0) && (
|
|
3351
|
-
throw
|
|
3352
|
-
|
|
3353
|
-
var Q = new r(O, w,
|
|
3354
|
-
Q.comment = p,
|
|
3348
|
+
throw B(C, "name");
|
|
3349
|
+
var O = C, F, I, X, Y;
|
|
3350
|
+
if (T("("), T("stream", !0) && (I = !0), !x.test(C = b()) || (F = C, T(")"), T("returns"), T("("), T("stream", !0) && (Y = !0), !x.test(C = b())))
|
|
3351
|
+
throw B(C);
|
|
3352
|
+
X = C, T(")");
|
|
3353
|
+
var Q = new r(O, w, F, X, I, Y);
|
|
3354
|
+
Q.comment = p, he(Q, function(K) {
|
|
3355
3355
|
if (K === "option")
|
|
3356
|
-
|
|
3356
|
+
me(Q, K), T(";");
|
|
3357
3357
|
else
|
|
3358
|
-
throw
|
|
3358
|
+
throw B(K);
|
|
3359
3359
|
}), P.add(Q);
|
|
3360
3360
|
}
|
|
3361
3361
|
function Ce(P, C) {
|
|
3362
3362
|
if (!x.test(C = b()))
|
|
3363
|
-
throw
|
|
3363
|
+
throw B(C, "reference");
|
|
3364
3364
|
var p = C;
|
|
3365
|
-
|
|
3365
|
+
he(null, function(O) {
|
|
3366
3366
|
switch (O) {
|
|
3367
3367
|
case "required":
|
|
3368
3368
|
case "repeated":
|
|
3369
|
-
|
|
3369
|
+
pe(P, O, p);
|
|
3370
3370
|
break;
|
|
3371
3371
|
case "optional":
|
|
3372
|
-
|
|
3372
|
+
H === "proto3" ? pe(P, "proto3_optional", p) : pe(P, "optional", p);
|
|
3373
3373
|
break;
|
|
3374
3374
|
default:
|
|
3375
|
-
if (
|
|
3376
|
-
throw
|
|
3377
|
-
q(O),
|
|
3375
|
+
if (H === "proto2" || !x.test(O))
|
|
3376
|
+
throw B(O);
|
|
3377
|
+
q(O), pe(P, "optional", p);
|
|
3378
3378
|
break;
|
|
3379
3379
|
}
|
|
3380
3380
|
});
|
|
3381
3381
|
}
|
|
3382
|
-
for (var
|
|
3383
|
-
switch (
|
|
3382
|
+
for (var ae; (ae = b()) !== null; )
|
|
3383
|
+
switch (ae) {
|
|
3384
3384
|
case "package":
|
|
3385
|
-
if (!
|
|
3386
|
-
throw
|
|
3385
|
+
if (!V)
|
|
3386
|
+
throw B(ae);
|
|
3387
3387
|
Re();
|
|
3388
3388
|
break;
|
|
3389
3389
|
case "import":
|
|
3390
|
-
if (!
|
|
3391
|
-
throw
|
|
3392
|
-
|
|
3390
|
+
if (!V)
|
|
3391
|
+
throw B(ae);
|
|
3392
|
+
_e();
|
|
3393
3393
|
break;
|
|
3394
3394
|
case "syntax":
|
|
3395
|
-
if (!
|
|
3396
|
-
throw
|
|
3397
|
-
|
|
3395
|
+
if (!V)
|
|
3396
|
+
throw B(ae);
|
|
3397
|
+
fe();
|
|
3398
3398
|
break;
|
|
3399
3399
|
case "edition":
|
|
3400
|
-
if (!
|
|
3401
|
-
throw
|
|
3402
|
-
|
|
3400
|
+
if (!V)
|
|
3401
|
+
throw B(ae);
|
|
3402
|
+
de();
|
|
3403
3403
|
break;
|
|
3404
3404
|
case "option":
|
|
3405
|
-
|
|
3405
|
+
me(G, ae), T(";", !0);
|
|
3406
3406
|
break;
|
|
3407
3407
|
default:
|
|
3408
|
-
if (ge(
|
|
3409
|
-
|
|
3408
|
+
if (ge(G, ae)) {
|
|
3409
|
+
V = !1;
|
|
3410
3410
|
continue;
|
|
3411
3411
|
}
|
|
3412
|
-
throw
|
|
3412
|
+
throw B(ae);
|
|
3413
3413
|
}
|
|
3414
|
-
return
|
|
3415
|
-
package:
|
|
3416
|
-
imports:
|
|
3417
|
-
weakImports:
|
|
3414
|
+
return ne(), _.filename = null, {
|
|
3415
|
+
package: k,
|
|
3416
|
+
imports: W,
|
|
3417
|
+
weakImports: M,
|
|
3418
3418
|
root: z
|
|
3419
3419
|
};
|
|
3420
3420
|
}
|
|
@@ -3811,217 +3811,220 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
3813
3813
|
}, i = protobuf.Root.fromJSON(l).TimeSeriesMessage;
|
|
3814
|
-
let e = null, t = null, r = null, n = null, d = null, s = null, u = "viewerAsset",
|
|
3815
|
-
const
|
|
3816
|
-
if (!
|
|
3817
|
-
|
|
3814
|
+
let e = null, t = null, r = null, n = null, d = null, s = null, u = null, o = "viewerAsset", h = !1, m = null;
|
|
3815
|
+
const R = (k, W = 2e3) => new Promise((M) => {
|
|
3816
|
+
if (!k || k.readyState === WebSocket.CLOSED) {
|
|
3817
|
+
M();
|
|
3818
3818
|
return;
|
|
3819
3819
|
}
|
|
3820
|
-
const
|
|
3821
|
-
|
|
3820
|
+
const H = Date.now(), G = () => {
|
|
3821
|
+
k.readyState === WebSocket.CLOSED || Date.now() - H > W ? M() : setTimeout(G, 50);
|
|
3822
3822
|
};
|
|
3823
|
-
|
|
3824
|
-
}),
|
|
3823
|
+
G();
|
|
3824
|
+
}), y = async () => {
|
|
3825
3825
|
if (f.value) {
|
|
3826
|
-
const
|
|
3827
|
-
f.value = null, c.value = "disconnected", (
|
|
3826
|
+
const k = f.value;
|
|
3827
|
+
f.value = null, c.value = "disconnected", (k.readyState === WebSocket.OPEN || k.readyState === WebSocket.CONNECTING) && (k.close(), await R(k));
|
|
3828
3828
|
}
|
|
3829
|
-
|
|
3830
|
-
},
|
|
3831
|
-
if (
|
|
3832
|
-
const
|
|
3833
|
-
(
|
|
3829
|
+
m = null;
|
|
3830
|
+
}, g = async (k, W, M, H = "viewerAsset", G = null) => {
|
|
3831
|
+
if (m && await m, f.value) {
|
|
3832
|
+
const j = f.value.readyState;
|
|
3833
|
+
(j === WebSocket.CONNECTING || j === WebSocket.OPEN || j === WebSocket.CLOSING) && (await y(), await new Promise((Z) => setTimeout(Z, 100)));
|
|
3834
3834
|
}
|
|
3835
|
-
s =
|
|
3835
|
+
s = W, u = G, o = H, v.value = !0, m = new Promise(async (j, Z) => {
|
|
3836
3836
|
try {
|
|
3837
|
-
const
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3837
|
+
const U = M || await useToken();
|
|
3838
|
+
let ne = k + "?session=" + U + "&" + o + "=" + s;
|
|
3839
|
+
u && o !== "package" && (ne += "&package=" + u);
|
|
3840
|
+
const B = new WebSocket(ne);
|
|
3841
|
+
f.value = B, B.onopen = () => {
|
|
3842
|
+
S(), j(B);
|
|
3843
|
+
}, B.onclose = () => {
|
|
3844
|
+
x(), j(null);
|
|
3845
|
+
}, B.onmessage = _, B.onerror = (re) => {
|
|
3846
|
+
console.error("WebSocket error:", re), c.value = "disconnected", Z(re);
|
|
3844
3847
|
}, setTimeout(() => {
|
|
3845
|
-
|
|
3848
|
+
B.readyState === WebSocket.CONNECTING && (B.close(), Z(new Error("WebSocket connection timeout")));
|
|
3846
3849
|
}, 1e4);
|
|
3847
|
-
} catch (
|
|
3848
|
-
console.error("Failed to create WebSocket:",
|
|
3850
|
+
} catch (U) {
|
|
3851
|
+
console.error("Failed to create WebSocket:", U), Z(U);
|
|
3849
3852
|
}
|
|
3850
3853
|
});
|
|
3851
3854
|
try {
|
|
3852
|
-
await
|
|
3853
|
-
} catch (
|
|
3854
|
-
console.error("WebSocket connection failed:",
|
|
3855
|
+
await m;
|
|
3856
|
+
} catch (j) {
|
|
3857
|
+
console.error("WebSocket connection failed:", j), m = null;
|
|
3855
3858
|
}
|
|
3856
|
-
},
|
|
3859
|
+
}, S = () => {
|
|
3857
3860
|
if (c.value = "connected", v.value) {
|
|
3858
3861
|
if (d && d(), s) {
|
|
3859
|
-
const
|
|
3860
|
-
f.value.send(JSON.stringify(
|
|
3862
|
+
const k = { montage: "NOT_MONTAGED", packageId: u || s };
|
|
3863
|
+
f.value.send(JSON.stringify(k));
|
|
3861
3864
|
}
|
|
3862
3865
|
v.value = !1;
|
|
3863
3866
|
}
|
|
3864
|
-
},
|
|
3867
|
+
}, x = () => {
|
|
3865
3868
|
c.value = "disconnected";
|
|
3866
|
-
},
|
|
3867
|
-
if (typeof
|
|
3868
|
-
let
|
|
3869
|
+
}, _ = (k) => {
|
|
3870
|
+
if (typeof k.data == "string") {
|
|
3871
|
+
let M = {};
|
|
3869
3872
|
try {
|
|
3870
|
-
|
|
3873
|
+
M = JSON.parse(k.data);
|
|
3871
3874
|
} catch {
|
|
3872
3875
|
n == null || n({ error: "JSON Parse Error" });
|
|
3873
3876
|
return;
|
|
3874
3877
|
}
|
|
3875
|
-
|
|
3878
|
+
M.channelDetails ? r == null || r(M.channelDetails) : M.error && (n == null || n(M));
|
|
3876
3879
|
return;
|
|
3877
3880
|
}
|
|
3878
|
-
const
|
|
3879
|
-
|
|
3880
|
-
const
|
|
3881
|
-
if (
|
|
3882
|
-
const
|
|
3883
|
-
let
|
|
3884
|
-
for (let
|
|
3885
|
-
|
|
3886
|
-
let
|
|
3881
|
+
const W = new FileReader();
|
|
3882
|
+
W.addEventListener("loadend", function(M) {
|
|
3883
|
+
const H = M.target.result, G = new Uint8Array(H), j = i.decode(G), Z = j.segment;
|
|
3884
|
+
if (j.event && j.event.length > 0 && j.event[0].pageStart) {
|
|
3885
|
+
const U = j.event[0], ne = [[], []], B = U.times.length / 2;
|
|
3886
|
+
let re = 0;
|
|
3887
|
+
for (let ve = 0; ve < B; ve++)
|
|
3888
|
+
ne[0].push(U.times[re]), ne[1].push(U.times[re + 1]), re += 2;
|
|
3889
|
+
let ue = new Array(3), se = 0;
|
|
3887
3890
|
for (; se < 3; )
|
|
3888
|
-
|
|
3889
|
-
const
|
|
3890
|
-
chId:
|
|
3891
|
+
ue[se] = new Float32Array(ne[0].length), se++;
|
|
3892
|
+
const ce = {
|
|
3893
|
+
chId: U.source,
|
|
3891
3894
|
lastUsed: 0,
|
|
3892
3895
|
unit: "uV",
|
|
3893
|
-
samplePeriod:
|
|
3894
|
-
pageStart:
|
|
3895
|
-
pageEnd:
|
|
3896
|
-
startTs:
|
|
3897
|
-
isMinMax:
|
|
3896
|
+
samplePeriod: U.samplePeriod,
|
|
3897
|
+
pageStart: U.pageStart,
|
|
3898
|
+
pageEnd: U.pageEnd,
|
|
3899
|
+
startTs: U.pageStart,
|
|
3900
|
+
isMinMax: U.isResampled,
|
|
3898
3901
|
unitM: 1,
|
|
3899
3902
|
type: "Neural",
|
|
3900
|
-
nrPoints:
|
|
3901
|
-
parsedData:
|
|
3902
|
-
cData:
|
|
3903
|
+
nrPoints: B,
|
|
3904
|
+
parsedData: ne,
|
|
3905
|
+
cData: ue
|
|
3903
3906
|
};
|
|
3904
3907
|
t == null || t({
|
|
3905
|
-
pageStart:
|
|
3906
|
-
data:
|
|
3908
|
+
pageStart: U.pageStart,
|
|
3909
|
+
data: ce,
|
|
3907
3910
|
type: "Neural",
|
|
3908
|
-
nrResponses:
|
|
3911
|
+
nrResponses: j.totalResponses
|
|
3909
3912
|
});
|
|
3910
3913
|
}
|
|
3911
|
-
if (
|
|
3912
|
-
let
|
|
3913
|
-
|
|
3914
|
-
const
|
|
3915
|
-
let
|
|
3914
|
+
if (Z !== null) {
|
|
3915
|
+
let U = null;
|
|
3916
|
+
Z.isMinMax ? U = Z.data.length / 2 : U = Z.data.length;
|
|
3917
|
+
const ne = new Array(3), B = Z.startTs;
|
|
3918
|
+
let re = 0, ue = 0, se = 0;
|
|
3916
3919
|
for (; se < 3; )
|
|
3917
|
-
|
|
3918
|
-
if (
|
|
3919
|
-
let
|
|
3920
|
-
for (let
|
|
3921
|
-
let
|
|
3922
|
-
|
|
3920
|
+
ne[se] = new Float64Array(U), se++;
|
|
3921
|
+
if (Z.isMinMax) {
|
|
3922
|
+
let fe = 0;
|
|
3923
|
+
for (let de = 0; de < U; de++) {
|
|
3924
|
+
let ge = -Z.data[fe], he = -Z.data[fe + 1];
|
|
3925
|
+
ne[0][de] = B + de * Z.samplePeriod, ne[1][de] = ge, ne[2][de] = he, isNaN(ge) || (ue++, re += ge + (he - ge) / 2), fe += 2;
|
|
3923
3926
|
}
|
|
3924
3927
|
} else
|
|
3925
|
-
for (let
|
|
3926
|
-
let
|
|
3927
|
-
|
|
3928
|
+
for (let fe = 0; fe < U; fe++) {
|
|
3929
|
+
let de = -Z.data[fe];
|
|
3930
|
+
ne[0][fe] = B + fe * Z.samplePeriod, ne[1][fe] = de, isNaN(de) || (ue++, re += de);
|
|
3928
3931
|
}
|
|
3929
|
-
let
|
|
3930
|
-
if (
|
|
3931
|
-
const
|
|
3932
|
-
|
|
3932
|
+
let ce = 0;
|
|
3933
|
+
if (h) {
|
|
3934
|
+
const fe = Array.prototype.slice.call(ne[1]).sort();
|
|
3935
|
+
ce = fe[Math.round(fe.length / 2)];
|
|
3933
3936
|
}
|
|
3934
|
-
let
|
|
3935
|
-
for (;
|
|
3936
|
-
|
|
3937
|
-
const
|
|
3938
|
-
chId:
|
|
3939
|
-
lastUsed:
|
|
3940
|
-
unit:
|
|
3941
|
-
samplePeriod:
|
|
3942
|
-
pageStart:
|
|
3943
|
-
pageEnd:
|
|
3944
|
-
startTs:
|
|
3945
|
-
isMinMax:
|
|
3946
|
-
unitM:
|
|
3947
|
-
type:
|
|
3948
|
-
nrPoints:
|
|
3949
|
-
cData:
|
|
3950
|
-
parsedData:
|
|
3951
|
-
median:
|
|
3952
|
-
sumElem:
|
|
3953
|
-
nrValidPoints:
|
|
3954
|
-
name:
|
|
3955
|
-
label:
|
|
3937
|
+
let ve = new Array(3), Re = 0;
|
|
3938
|
+
for (; Re < 3; )
|
|
3939
|
+
ve[Re] = new Float32Array(ne[0].length), Re++;
|
|
3940
|
+
const _e = {
|
|
3941
|
+
chId: Z.source,
|
|
3942
|
+
lastUsed: Z.lastUsed,
|
|
3943
|
+
unit: Z.unit,
|
|
3944
|
+
samplePeriod: Z.samplePeriod,
|
|
3945
|
+
pageStart: Z.pageStart,
|
|
3946
|
+
pageEnd: Z.pageEnd,
|
|
3947
|
+
startTs: B,
|
|
3948
|
+
isMinMax: Z.isMinMax,
|
|
3949
|
+
unitM: Z.unitM,
|
|
3950
|
+
type: Z.segmentType,
|
|
3951
|
+
nrPoints: U,
|
|
3952
|
+
cData: ve,
|
|
3953
|
+
parsedData: ne,
|
|
3954
|
+
median: ce,
|
|
3955
|
+
sumElem: re,
|
|
3956
|
+
nrValidPoints: ue,
|
|
3957
|
+
name: Z.channelName,
|
|
3958
|
+
label: Z.channelName
|
|
3956
3959
|
};
|
|
3957
|
-
|
|
3958
|
-
pageStart:
|
|
3959
|
-
data:
|
|
3960
|
-
type:
|
|
3961
|
-
nrResponses:
|
|
3960
|
+
_e.nrPoints > 0 ? e == null || e({
|
|
3961
|
+
pageStart: Z.pageStart,
|
|
3962
|
+
data: _e,
|
|
3963
|
+
type: Z.segmentType,
|
|
3964
|
+
nrResponses: j.totalResponses
|
|
3962
3965
|
}) : e == null || e({
|
|
3963
|
-
pageStart:
|
|
3964
|
-
data:
|
|
3965
|
-
nrResponses:
|
|
3966
|
+
pageStart: Z.pageStart,
|
|
3967
|
+
data: _e,
|
|
3968
|
+
nrResponses: j.totalResponses,
|
|
3966
3969
|
type: "gap"
|
|
3967
3970
|
});
|
|
3968
3971
|
}
|
|
3969
|
-
}),
|
|
3970
|
-
},
|
|
3971
|
-
let
|
|
3972
|
-
switch (
|
|
3972
|
+
}), W.readAsArrayBuffer(k.data);
|
|
3973
|
+
}, N = (k) => f.value && f.value.readyState === 1 ? (f.value.send(JSON.stringify(k)), !0) : !1, z = (k) => {
|
|
3974
|
+
let W;
|
|
3975
|
+
switch (k) {
|
|
3973
3976
|
case "NOT_MONTAGED":
|
|
3974
|
-
|
|
3977
|
+
W = { montage: "NOT_MONTAGED", packageId: u || s };
|
|
3975
3978
|
break;
|
|
3976
3979
|
default:
|
|
3977
|
-
|
|
3980
|
+
W = { montage: "CUSTOM_MONTAGE", packageId: u || s, montageMap: k };
|
|
3978
3981
|
}
|
|
3979
|
-
|
|
3980
|
-
},
|
|
3981
|
-
f.value && f.value.readyState === 1 ? f.value.send(JSON.stringify(
|
|
3982
|
-
},
|
|
3982
|
+
N(W);
|
|
3983
|
+
}, $ = (k) => {
|
|
3984
|
+
f.value && f.value.readyState === 1 ? f.value.send(JSON.stringify(k)) : setTimeout(() => $(k), 200);
|
|
3985
|
+
}, D = () => {
|
|
3983
3986
|
if (f.value && f.value.readyState === 1) {
|
|
3984
|
-
const
|
|
3987
|
+
const k = {
|
|
3985
3988
|
requestType: "DumpBufferRequest"
|
|
3986
3989
|
};
|
|
3987
|
-
return f.value.send(JSON.stringify(
|
|
3990
|
+
return f.value.send(JSON.stringify(k)), !0;
|
|
3988
3991
|
}
|
|
3989
3992
|
return console.warn("⚠️ Cannot send dump buffer request - WebSocket not connected"), !1;
|
|
3990
|
-
},
|
|
3991
|
-
e =
|
|
3992
|
-
},
|
|
3993
|
-
t =
|
|
3994
|
-
},
|
|
3995
|
-
r =
|
|
3996
|
-
},
|
|
3997
|
-
n =
|
|
3993
|
+
}, L = (k) => {
|
|
3994
|
+
e = k;
|
|
3995
|
+
}, b = (k) => {
|
|
3996
|
+
t = k;
|
|
3997
|
+
}, q = (k) => {
|
|
3998
|
+
r = k;
|
|
3999
|
+
}, E = (k) => {
|
|
4000
|
+
n = k;
|
|
3998
4001
|
};
|
|
3999
4002
|
onUnmounted(async () => {
|
|
4000
|
-
await
|
|
4003
|
+
await y();
|
|
4001
4004
|
});
|
|
4002
|
-
const
|
|
4003
|
-
d =
|
|
4004
|
-
},
|
|
4005
|
-
s =
|
|
4006
|
-
},
|
|
4007
|
-
|
|
4005
|
+
const T = (k) => {
|
|
4006
|
+
d = k;
|
|
4007
|
+
}, A = (k) => {
|
|
4008
|
+
s = k;
|
|
4009
|
+
}, V = (k) => {
|
|
4010
|
+
h = k;
|
|
4008
4011
|
};
|
|
4009
4012
|
return {
|
|
4010
4013
|
websocket: readonly(f),
|
|
4011
4014
|
connectionStatus: readonly(c),
|
|
4012
|
-
openWebsocket:
|
|
4013
|
-
send:
|
|
4014
|
-
sendMontageMessage:
|
|
4015
|
-
sendFilterMessage:
|
|
4016
|
-
sendDumpBufferRequest:
|
|
4017
|
-
disconnect:
|
|
4018
|
-
setClearChannelsCallback:
|
|
4019
|
-
setActiveId:
|
|
4020
|
-
setUseMedian:
|
|
4021
|
-
onSegment:
|
|
4022
|
-
onEvent:
|
|
4023
|
-
onChannelDetails:
|
|
4024
|
-
onError:
|
|
4015
|
+
openWebsocket: g,
|
|
4016
|
+
send: N,
|
|
4017
|
+
sendMontageMessage: z,
|
|
4018
|
+
sendFilterMessage: $,
|
|
4019
|
+
sendDumpBufferRequest: D,
|
|
4020
|
+
disconnect: y,
|
|
4021
|
+
setClearChannelsCallback: T,
|
|
4022
|
+
setActiveId: A,
|
|
4023
|
+
setUseMedian: V,
|
|
4024
|
+
onSegment: L,
|
|
4025
|
+
onEvent: b,
|
|
4026
|
+
onChannelDetails: q,
|
|
4027
|
+
onError: E
|
|
4025
4028
|
};
|
|
4026
4029
|
}, useCanvasRenderer = () => {
|
|
4027
4030
|
const f = ref(null), c = ref(null), v = (t, r, n) => r * (t + n), l = (t = 1) => t, a = (t, r, n, d, s, u, o = !1) => {
|
|
@@ -4055,65 +4058,65 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4055
4058
|
let _ = null;
|
|
4056
4059
|
if (_ = r.find((A) => A.id === x.id), !_ || !_.visible)
|
|
4057
4060
|
continue;
|
|
4058
|
-
const N = d.start, z = d.rsPeriod,
|
|
4061
|
+
const N = d.start, z = d.rsPeriod, $ = n.XOFFSET, D = Math.min(Math.round(d.cHeight / t.channels.length - 2), 10);
|
|
4059
4062
|
for (let A = 0; A < _.dataSegments.length; A += 2) {
|
|
4060
4063
|
if (_.dataSegments[A + 1] < N)
|
|
4061
4064
|
continue;
|
|
4062
4065
|
if (_.dataSegments[A] > N + d.duration)
|
|
4063
4066
|
break;
|
|
4064
|
-
let
|
|
4065
|
-
m.fillRect(
|
|
4067
|
+
let V = Math.floor($ + (_.dataSegments[A] - N) / z), k = Math.floor($ + (_.dataSegments[A + 1] - N) / z), W = Math.floor(_.rowBaseline - D / 2);
|
|
4068
|
+
m.fillRect(V, W, k - V, D);
|
|
4066
4069
|
}
|
|
4067
4070
|
e(_, x, d, n, s, o);
|
|
4068
|
-
const
|
|
4071
|
+
const L = x.blocks.length;
|
|
4069
4072
|
let b = "Continuous";
|
|
4070
|
-
|
|
4071
|
-
let q = null,
|
|
4072
|
-
for (let A = 0; A <
|
|
4073
|
-
const
|
|
4074
|
-
if (
|
|
4073
|
+
L && (b = x.blocks[0].type), _.hover ? _.selected ? (y.strokeStyle = "rgba(39,96,255,0.70)", y.fillStyle = "rgba(39,96,255,0.70)") : (y.strokeStyle = "rgba(39,96,255,0.60)", y.fillStyle = "rgba(39,96,255,0.60)") : _.selected ? (y.strokeStyle = "rgb(249,162,58)", y.fillStyle = "rgb(3249,162,58)") : b === "Neural" ? y.strokeStyle = "rgb(249,162,58)" : (y.strokeStyle = "black", y.fillStyle = "black");
|
|
4074
|
+
let q = null, E = !0, T = 1e6 * (1 / _.sf);
|
|
4075
|
+
for (let A = 0; A < L; A++) {
|
|
4076
|
+
const V = x.blocks[A];
|
|
4077
|
+
if (V.nrPoints === 0)
|
|
4075
4078
|
continue;
|
|
4076
|
-
const
|
|
4077
|
-
let
|
|
4078
|
-
switch (m.clearRect(Math.floor(
|
|
4079
|
+
const k = V.cData, W = V.nrPoints, M = k[0], H = k[1], G = k[2];
|
|
4080
|
+
let j = V.renderStartIndex, Z = V.renderEndIndex;
|
|
4081
|
+
switch (m.clearRect(Math.floor(M[j]), Math.floor(_.rowBaseline - D / 2), Math.ceil(M[Z] - M[j] + 2), D + 1), V.type) {
|
|
4079
4082
|
case "Continuous":
|
|
4080
4083
|
case "realtime":
|
|
4081
|
-
if (
|
|
4082
|
-
if (
|
|
4083
|
-
y.beginPath(), A > 0 &&
|
|
4084
|
-
for (let U =
|
|
4085
|
-
y.lineTo(
|
|
4086
|
-
for (let U =
|
|
4087
|
-
y.lineTo(
|
|
4088
|
-
A > 0 &&
|
|
4084
|
+
if (V.isMinMax) {
|
|
4085
|
+
if (V.samplePeriod / T < 3 && (E = !1), E) {
|
|
4086
|
+
y.beginPath(), A > 0 && M[j] < q.x + 3 ? y.moveTo(q.x, q.y) : y.moveTo(M[j], H[j]);
|
|
4087
|
+
for (let U = j; U < Z + 1; U++)
|
|
4088
|
+
y.lineTo(M[U], H[U]);
|
|
4089
|
+
for (let U = Z - 1; U >= j; U--)
|
|
4090
|
+
y.lineTo(M[U], G[U]);
|
|
4091
|
+
A > 0 && M[j] < q.x + 3 && y.lineTo(q.x, q.y2), y.closePath(), y.fill();
|
|
4089
4092
|
} else {
|
|
4090
4093
|
y.beginPath();
|
|
4091
|
-
for (let U =
|
|
4092
|
-
y.lineTo(
|
|
4094
|
+
for (let U = j; U < Z + 1; U++)
|
|
4095
|
+
y.lineTo(M[U], H[U]), y.lineTo(M[U], G[U]), y.moveTo(M[U], H[U]);
|
|
4093
4096
|
y.stroke();
|
|
4094
4097
|
}
|
|
4095
|
-
y.beginPath(), y.moveTo(
|
|
4096
|
-
for (let U =
|
|
4097
|
-
y.lineTo(
|
|
4098
|
+
y.beginPath(), y.moveTo(M[j], H[j]);
|
|
4099
|
+
for (let U = j; U < Z + 1; U++)
|
|
4100
|
+
y.lineTo(M[U], H[U]);
|
|
4098
4101
|
y.stroke();
|
|
4099
4102
|
} else {
|
|
4100
|
-
A === 0 ? (y.beginPath(), y.moveTo(
|
|
4101
|
-
for (let U =
|
|
4102
|
-
y.lineTo(
|
|
4103
|
-
A ===
|
|
4103
|
+
A === 0 ? (y.beginPath(), y.moveTo(M[j], H[j])) : M[j] > q.x + 2 && y.moveTo(M[j], H[j]);
|
|
4104
|
+
for (let U = j; U < Z + 1; U++)
|
|
4105
|
+
y.lineTo(M[U], H[U]);
|
|
4106
|
+
A === L - 1 && y.stroke();
|
|
4104
4107
|
}
|
|
4105
4108
|
break;
|
|
4106
4109
|
case "Neural":
|
|
4107
4110
|
y.beginPath();
|
|
4108
|
-
for (let U = 0; U <
|
|
4109
|
-
y.moveTo(
|
|
4111
|
+
for (let U = 0; U < W; U++)
|
|
4112
|
+
y.moveTo(M[U], H[U]), y.lineTo(M[U], G[U]);
|
|
4110
4113
|
y.stroke();
|
|
4111
4114
|
break;
|
|
4112
4115
|
}
|
|
4113
4116
|
q = {
|
|
4114
|
-
x: W
|
|
4115
|
-
y:
|
|
4116
|
-
y2:
|
|
4117
|
+
x: M[W - 1],
|
|
4118
|
+
y: H[W - 1],
|
|
4119
|
+
y2: G[W - 1]
|
|
4117
4120
|
};
|
|
4118
4121
|
}
|
|
4119
4122
|
}
|
|
@@ -4139,9 +4142,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4139
4142
|
case "UNIT":
|
|
4140
4143
|
if (!u)
|
|
4141
4144
|
for (let m = 0; m < o; m++) {
|
|
4142
|
-
const R = r.blocks[m], y = R.cData, g = R.parsedData, S = d.XOFFSET, x = R.parsedData[0].length, _ = y[0], N = y[1], z = y[2],
|
|
4143
|
-
for (let
|
|
4144
|
-
_[
|
|
4145
|
+
const R = r.blocks[m], y = R.cData, g = R.parsedData, S = d.XOFFSET, x = R.parsedData[0].length, _ = y[0], N = y[1], z = y[2], $ = g[0], D = t.rowBaseline | 0, L = n.start, b = n.rsPeriod, q = n.cHeight / (2 * (n.nrVisibleChannels + 1)) | 0;
|
|
4146
|
+
for (let E = 0; E < x; E++)
|
|
4147
|
+
_[E] = S + ($[E] - L) / b, N[E] = D - q, z[E] = D + q;
|
|
4145
4148
|
}
|
|
4146
4149
|
break;
|
|
4147
4150
|
case "CONTINUOUS":
|
|
@@ -4159,12 +4162,12 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4159
4162
|
R.renderStartIndex = y > 0 ? y : 0;
|
|
4160
4163
|
let g = Math.floor((n.start + n.duration - (R.startTs + R.nrPoints * R.samplePeriod)) / R.samplePeriod);
|
|
4161
4164
|
R.renderEndIndex = g >= 0 ? R.nrPoints - 1 : R.nrPoints + g;
|
|
4162
|
-
const S = R.cData, x = R.parsedData, _ = s * t.rowScale, N = d.XOFFSET, z = R.parsedData[0].length,
|
|
4165
|
+
const S = R.cData, x = R.parsedData, _ = s * t.rowScale, N = d.XOFFSET, z = R.parsedData[0].length, $ = S[0], D = S[1], L = S[2], b = x[0], q = x[1], E = x[2], T = t.rowBaseline;
|
|
4163
4166
|
let A = 0;
|
|
4164
4167
|
d.USEMEDIAN ? A = r.median : A = r.mean;
|
|
4165
|
-
const
|
|
4166
|
-
for (let
|
|
4167
|
-
|
|
4168
|
+
const V = n.rsPeriod, k = n.start;
|
|
4169
|
+
for (let W = 0; W < z; W++)
|
|
4170
|
+
$[W] = N + (b[W] - k) / V, D[W] = T - (q[W] - A) * _, R.isMinMax && (q[W] === E[W] ? L[W] = D[W] + 1 : L[W] = T - (E[W] - A) * _);
|
|
4168
4171
|
}
|
|
4169
4172
|
break;
|
|
4170
4173
|
}
|
|
@@ -4183,28 +4186,28 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4183
4186
|
start: 0,
|
|
4184
4187
|
duration: 0,
|
|
4185
4188
|
channels: []
|
|
4186
|
-
}), l = ref(!1), a = ref(0), i = ref(null), e = ref(1), t = ref(!1), r = 15e6, n = 3, d = (_, N, z,
|
|
4187
|
-
|
|
4188
|
-
let
|
|
4189
|
-
return
|
|
4190
|
-
}, s = (_, N, z,
|
|
4191
|
-
if (
|
|
4189
|
+
}), l = ref(!1), a = ref(0), i = ref(null), e = ref(1), t = ref(!1), r = 15e6, n = 3, d = (_, N, z, $) => {
|
|
4190
|
+
$ || ($ = 0);
|
|
4191
|
+
let D = s(_, N, $, _.length - 1, z);
|
|
4192
|
+
return D === -1 ? D = 0 : D < 0 && (D = -D - 2), D;
|
|
4193
|
+
}, s = (_, N, z, $, D) => {
|
|
4194
|
+
if ($ < z) {
|
|
4192
4195
|
let b;
|
|
4193
|
-
if (
|
|
4196
|
+
if ($ >= 0 ? b = $ : b = -$ - 2, b === -1)
|
|
4194
4197
|
return b;
|
|
4195
4198
|
const q = _[b].pageStart;
|
|
4196
4199
|
for (; b >= 0 && _[b].pageStart === q; )
|
|
4197
4200
|
b--;
|
|
4198
4201
|
return b++, -b - 2;
|
|
4199
4202
|
}
|
|
4200
|
-
const
|
|
4201
|
-
if (_[
|
|
4202
|
-
return s(_, N, z,
|
|
4203
|
-
if (_[
|
|
4204
|
-
return s(_, N,
|
|
4203
|
+
const L = parseInt((z + $) / 2);
|
|
4204
|
+
if (_[L].pageStart > N)
|
|
4205
|
+
return s(_, N, z, L - 1, D);
|
|
4206
|
+
if (_[L].pageStart < N)
|
|
4207
|
+
return s(_, N, L + 1, $, D);
|
|
4205
4208
|
{
|
|
4206
|
-
let b =
|
|
4207
|
-
if (
|
|
4209
|
+
let b = L;
|
|
4210
|
+
if (D) {
|
|
4208
4211
|
for (; b >= 0 && _[b].pageStart === N; )
|
|
4209
4212
|
b--;
|
|
4210
4213
|
b++;
|
|
@@ -4218,11 +4221,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4218
4221
|
}, u = (_, N, z) => {
|
|
4219
4222
|
if (!_)
|
|
4220
4223
|
return Promise.resolve();
|
|
4221
|
-
const
|
|
4224
|
+
const $ = [];
|
|
4222
4225
|
if (_.length > 0) {
|
|
4223
|
-
const
|
|
4224
|
-
for (let
|
|
4225
|
-
const b = _[
|
|
4226
|
+
const D = [];
|
|
4227
|
+
for (let L = 0; L < _.length; L++) {
|
|
4228
|
+
const b = _[L].content, E = {
|
|
4226
4229
|
id: z ? z(b) : b.id,
|
|
4227
4230
|
serverId: b.serverId,
|
|
4228
4231
|
label: b.name,
|
|
@@ -4235,19 +4238,19 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4235
4238
|
unit: b.unit,
|
|
4236
4239
|
gaps: [],
|
|
4237
4240
|
dataSegments: []
|
|
4238
|
-
}, T =
|
|
4239
|
-
let
|
|
4240
|
-
|
|
4241
|
-
id:
|
|
4242
|
-
serverId:
|
|
4243
|
-
type:
|
|
4244
|
-
label:
|
|
4245
|
-
displayName:
|
|
4241
|
+
}, T = E.label.split("<->", 3), A = T[0];
|
|
4242
|
+
let V = T.length > 1 ? parseFloat(T[1]) : 0;
|
|
4243
|
+
V = isNaN(V) ? T[1] : V, D.push({
|
|
4244
|
+
id: E.id,
|
|
4245
|
+
serverId: E.serverId,
|
|
4246
|
+
type: E.type,
|
|
4247
|
+
label: E.label,
|
|
4248
|
+
displayName: E.displayName,
|
|
4246
4249
|
label_split: T,
|
|
4247
4250
|
label_prefix: A,
|
|
4248
|
-
label_value:
|
|
4251
|
+
label_value: V,
|
|
4249
4252
|
dataSegments: [],
|
|
4250
|
-
rank:
|
|
4253
|
+
rank: L,
|
|
4251
4254
|
visible: !0,
|
|
4252
4255
|
plotAgainst: null,
|
|
4253
4256
|
rowBaseline: null,
|
|
@@ -4260,11 +4263,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4260
4263
|
filter: {},
|
|
4261
4264
|
hideFilter: !0,
|
|
4262
4265
|
isEditing: !1
|
|
4263
|
-
}),
|
|
4266
|
+
}), $.push(E);
|
|
4264
4267
|
}
|
|
4265
|
-
N && N.setChannels(
|
|
4268
|
+
N && N.setChannels(D);
|
|
4266
4269
|
}
|
|
4267
|
-
return o(
|
|
4270
|
+
return o($), f.value = $, a.value = _.length, l.value = !0, Promise.resolve();
|
|
4268
4271
|
}, o = (_) => {
|
|
4269
4272
|
var N, z;
|
|
4270
4273
|
if (_.length === 0) {
|
|
@@ -4276,20 +4279,20 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4276
4279
|
if (t.value)
|
|
4277
4280
|
return;
|
|
4278
4281
|
let N = null;
|
|
4279
|
-
const z = _.data.chId || _.data.source,
|
|
4282
|
+
const z = _.data.chId || _.data.source, $ = _.data.label || _.data.name;
|
|
4280
4283
|
if (N = f.value.find(
|
|
4281
|
-
(
|
|
4284
|
+
(D) => D.serverId === z && D.label === $
|
|
4282
4285
|
), !!N)
|
|
4283
4286
|
switch (_.type) {
|
|
4284
4287
|
case "gap":
|
|
4285
4288
|
case "Neural":
|
|
4286
4289
|
case "Continuous":
|
|
4287
|
-
let
|
|
4288
|
-
if (
|
|
4289
|
-
let q = d(
|
|
4290
|
-
for (;
|
|
4291
|
-
if (
|
|
4292
|
-
|
|
4290
|
+
let D = !1, L = N && N.segments;
|
|
4291
|
+
if (L && _.type !== "gap" && (D = !0, L.length > 0)) {
|
|
4292
|
+
let q = d(L, _.data.startTs, !0, 0);
|
|
4293
|
+
for (; L[q] && L[q].pageStart === _.data.pageStart; ) {
|
|
4294
|
+
if (L[q].startTs === _.data.startTs) {
|
|
4295
|
+
D = !1;
|
|
4293
4296
|
break;
|
|
4294
4297
|
}
|
|
4295
4298
|
q++;
|
|
@@ -4299,16 +4302,16 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4299
4302
|
if (b) {
|
|
4300
4303
|
let q = b.counter.get(N.id);
|
|
4301
4304
|
if (isNaN(q) && (q = _.nrResponses !== void 0 ? _.nrResponses : 1, b.counter.set(N.id, q)), q > 0 && (q = q - 1, b.counter.set(N.id, q)), q === 0) {
|
|
4302
|
-
let
|
|
4305
|
+
let E = !0;
|
|
4303
4306
|
for (let [T, A] of b.counter.entries())
|
|
4304
4307
|
if (A > 0 || isNaN(A)) {
|
|
4305
|
-
|
|
4308
|
+
E = !1;
|
|
4306
4309
|
break;
|
|
4307
4310
|
}
|
|
4308
|
-
|
|
4311
|
+
E && c.value.delete(_.data.pageStart);
|
|
4309
4312
|
}
|
|
4310
4313
|
}
|
|
4311
|
-
|
|
4314
|
+
D && (L.push(_.data), L.sort((q, E) => q.startTs < E.startTs ? -1 : q.startTs > E.startTs ? 1 : 0));
|
|
4312
4315
|
break;
|
|
4313
4316
|
}
|
|
4314
4317
|
}, m = () => {
|
|
@@ -4318,22 +4321,22 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4318
4321
|
for (let _ = 0; _ < v.channels.length; _++)
|
|
4319
4322
|
v.channels[_].blocks = [];
|
|
4320
4323
|
}, R = (_) => {
|
|
4321
|
-
let N = 0, z = 0,
|
|
4322
|
-
for (let
|
|
4323
|
-
let b =
|
|
4324
|
+
let N = 0, z = 0, $ = v.channels;
|
|
4325
|
+
for (let L = 0; L < $.length; L++) {
|
|
4326
|
+
let b = $[L].blocks;
|
|
4324
4327
|
for (let q = 0; q < b.length; q++)
|
|
4325
4328
|
b[q].type === "Continuous" && (N += y(b[q].parsedData[1]), z++);
|
|
4326
4329
|
}
|
|
4327
|
-
const
|
|
4328
|
-
return !isNaN(
|
|
4330
|
+
const D = N / z;
|
|
4331
|
+
return !isNaN(D) && _ ? _ / $.length / (2 * D) : 1;
|
|
4329
4332
|
}, y = (_) => {
|
|
4330
|
-
const N = g(_), z = _.map(function(
|
|
4331
|
-
const b =
|
|
4333
|
+
const N = g(_), z = _.map(function(L) {
|
|
4334
|
+
const b = L - N;
|
|
4332
4335
|
return b * b;
|
|
4333
|
-
}),
|
|
4334
|
-
return Math.sqrt(
|
|
4335
|
-
}, g = (_) => _.reduce(function(
|
|
4336
|
-
return
|
|
4336
|
+
}), $ = g(z);
|
|
4337
|
+
return Math.sqrt($);
|
|
4338
|
+
}, g = (_) => _.reduce(function($, D) {
|
|
4339
|
+
return $ + D;
|
|
4337
4340
|
}, 0) / _.length;
|
|
4338
4341
|
return {
|
|
4339
4342
|
// State
|
|
@@ -4371,15 +4374,15 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4371
4374
|
var _;
|
|
4372
4375
|
c.value.length > 0 ? (((_ = S.value) == null ? void 0 : _.size) || 0) < 5 && (g([c.value[0]]) ? c.value.splice(0, 1) : (console.warn("❌ Prefetch request failed"), clearInterval(v.value), l.value = !1)) : (clearInterval(v.value), l.value = !1);
|
|
4373
4376
|
};
|
|
4374
|
-
}, n = (g, S, x, _, N, z,
|
|
4377
|
+
}, n = (g, S, x, _, N, z, $, D, L, b) => {
|
|
4375
4378
|
_.start = S, _.duration = x;
|
|
4376
4379
|
const q = [];
|
|
4377
|
-
for (let
|
|
4378
|
-
const T = b ? b(_.channels[
|
|
4380
|
+
for (let E = 0; E < _.channels.length; E++) {
|
|
4381
|
+
const T = b ? b(_.channels[E]) : _.channels[E].id;
|
|
4379
4382
|
q.push(T);
|
|
4380
4383
|
}
|
|
4381
|
-
for (let
|
|
4382
|
-
const T = g[
|
|
4384
|
+
for (let E = 0; E < g.length; E++) {
|
|
4385
|
+
const T = g[E], A = b ? b(T) : T.id;
|
|
4383
4386
|
q.indexOf(A) < 0 && _.channels.push({
|
|
4384
4387
|
id: A,
|
|
4385
4388
|
mean: null,
|
|
@@ -4388,154 +4391,154 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4388
4391
|
blocks: []
|
|
4389
4392
|
});
|
|
4390
4393
|
}
|
|
4391
|
-
return d(g, S, x, _, N, z,
|
|
4392
|
-
}, d = (g, S, x, _, N, z,
|
|
4394
|
+
return d(g, S, x, _, N, z, $, D, L, b);
|
|
4395
|
+
}, d = (g, S, x, _, N, z, $, D, L, b) => {
|
|
4393
4396
|
f.value = [];
|
|
4394
|
-
let
|
|
4395
|
-
(i.value !== S || e.value !== x) && (c.value = [],
|
|
4397
|
+
let E = !1;
|
|
4398
|
+
(i.value !== S || e.value !== x) && (c.value = [], E = !0), i.value = S, e.value = x;
|
|
4396
4399
|
const T = [];
|
|
4397
4400
|
for (let A = 0; A < _.channels.length; A++)
|
|
4398
4401
|
T.push(_.channels[A]);
|
|
4399
4402
|
for (let A = 0; A < g.length; A++) {
|
|
4400
|
-
let
|
|
4401
|
-
const
|
|
4402
|
-
if (
|
|
4403
|
+
let V = !1;
|
|
4404
|
+
const k = g[A], W = k.segments, M = b ? b(k) : k.id, H = T.findIndex((re) => (b ? b(re) : re.id) === M);
|
|
4405
|
+
if (H === -1)
|
|
4403
4406
|
continue;
|
|
4404
|
-
const
|
|
4405
|
-
if (
|
|
4407
|
+
const G = _.channels[H];
|
|
4408
|
+
if (!G)
|
|
4406
4409
|
continue;
|
|
4407
|
-
|
|
4408
|
-
let
|
|
4409
|
-
|
|
4410
|
-
let
|
|
4411
|
-
|
|
4412
|
-
let
|
|
4413
|
-
|
|
4414
|
-
let
|
|
4415
|
-
for (
|
|
4416
|
-
|
|
4410
|
+
G.blocks = [];
|
|
4411
|
+
let j = Math.floor(S / 15e6) * 15e6;
|
|
4412
|
+
j < 0 && (j = 0);
|
|
4413
|
+
let Z = 0, U = 0;
|
|
4414
|
+
W.length > 0 && (Z = L(W, j, !0, 0));
|
|
4415
|
+
let ne = S + x + z.PREFETCHPAGES * 15e6;
|
|
4416
|
+
ne > D && (ne = D);
|
|
4417
|
+
let B;
|
|
4418
|
+
for (W.length > 0 && (B = W[Z]); j < ne || V; ) {
|
|
4419
|
+
V = !1;
|
|
4417
4420
|
let re = !1;
|
|
4418
|
-
if (
|
|
4419
|
-
const
|
|
4420
|
-
for (;
|
|
4421
|
-
|
|
4422
|
-
|
|
4421
|
+
if (B && (re = j >= B.pageStart && j <= B.pageEnd), re) {
|
|
4422
|
+
const ue = B.pageStart;
|
|
4423
|
+
for (; B && B.pageStart === ue; )
|
|
4424
|
+
B.startTs < S + x && G.blocks.push(B), U += 1, B = W[Z + U];
|
|
4425
|
+
j += 15e6, B && B.pageStart === ue && (V = !0);
|
|
4423
4426
|
} else {
|
|
4424
|
-
if (N.get(
|
|
4425
|
-
if (
|
|
4426
|
-
for (;
|
|
4427
|
+
if (N.get(j)) {
|
|
4428
|
+
if (j += 15e6, B && j >= B.pageEnd)
|
|
4429
|
+
for (; B && B.pageEnd < j && (U += 1, B = W[Z + U], !!B); )
|
|
4427
4430
|
;
|
|
4428
4431
|
continue;
|
|
4429
4432
|
}
|
|
4430
|
-
if (
|
|
4431
|
-
|
|
4433
|
+
if (j >= D) {
|
|
4434
|
+
j += 15e6;
|
|
4432
4435
|
continue;
|
|
4433
4436
|
}
|
|
4434
|
-
let
|
|
4435
|
-
if (
|
|
4436
|
-
for (let
|
|
4437
|
-
if (c.value[
|
|
4438
|
-
c.value.splice(
|
|
4437
|
+
let ue = j < S + x, se = !1;
|
|
4438
|
+
if (ue) {
|
|
4439
|
+
for (let ce in c.value)
|
|
4440
|
+
if (c.value[ce].start === j) {
|
|
4441
|
+
c.value.splice(ce, 1);
|
|
4439
4442
|
break;
|
|
4440
4443
|
}
|
|
4441
|
-
for (let
|
|
4442
|
-
f.value[
|
|
4443
|
-
|
|
4444
|
-
channels: [
|
|
4445
|
-
start:
|
|
4444
|
+
for (let ce in f.value)
|
|
4445
|
+
f.value[ce].start === j && (f.value[ce].channels.push(k), se = !0);
|
|
4446
|
+
se || f.value.push({
|
|
4447
|
+
channels: [k],
|
|
4448
|
+
start: j,
|
|
4446
4449
|
duration: 15e6,
|
|
4447
4450
|
isInViewport: !0,
|
|
4448
|
-
pixelWidth: Math.ceil(
|
|
4451
|
+
pixelWidth: Math.ceil($)
|
|
4449
4452
|
});
|
|
4450
|
-
} else if (
|
|
4451
|
-
for (let
|
|
4452
|
-
c.value[
|
|
4453
|
-
|
|
4454
|
-
channels: [
|
|
4455
|
-
start:
|
|
4453
|
+
} else if (E) {
|
|
4454
|
+
for (let ce in c.value)
|
|
4455
|
+
c.value[ce].start === j && (c.value[ce].channels.push(k), se = !0);
|
|
4456
|
+
se || c.value.push({
|
|
4457
|
+
channels: [k],
|
|
4458
|
+
start: j,
|
|
4456
4459
|
duration: 15e6,
|
|
4457
4460
|
isInViewport: !1,
|
|
4458
|
-
pixelWidth: Math.ceil(
|
|
4461
|
+
pixelWidth: Math.ceil($)
|
|
4459
4462
|
});
|
|
4460
4463
|
}
|
|
4461
|
-
if (
|
|
4462
|
-
for (;
|
|
4464
|
+
if (j += 15e6, B && j >= B.pageEnd)
|
|
4465
|
+
for (; B && B.pageEnd < j && (U += 1, B = W[Z + U], !!B); )
|
|
4463
4466
|
;
|
|
4464
4467
|
}
|
|
4465
4468
|
}
|
|
4466
|
-
|
|
4469
|
+
G.blocks.sort(s);
|
|
4467
4470
|
}
|
|
4468
4471
|
return {
|
|
4469
4472
|
asyncRequests: f.value,
|
|
4470
4473
|
asyncPreRequests: c.value
|
|
4471
4474
|
};
|
|
4472
|
-
}, s = (g, S) => g.startTs < S.startTs ? -1 : g.startTs > S.startTs ? 1 : 0, u = (g, S = 0, x, _, N, z,
|
|
4475
|
+
}, s = (g, S) => g.startTs < S.startTs ? -1 : g.startTs > S.startTs ? 1 : 0, u = (g, S = 0, x, _, N, z, $, D) => {
|
|
4473
4476
|
if (g.length === 0)
|
|
4474
4477
|
return !1;
|
|
4475
|
-
const
|
|
4478
|
+
const L = D;
|
|
4476
4479
|
for (let b = 0; b < g.length; b++) {
|
|
4477
4480
|
let q;
|
|
4478
4481
|
b === 0 ? q = g[S] : b === S ? q = g[0] : q = g[b];
|
|
4479
|
-
let
|
|
4480
|
-
if (q.start >=
|
|
4482
|
+
let E = q.start + q.duration;
|
|
4483
|
+
if (q.start >= L && console.error("❌ Request start time is beyond dataset end!", {
|
|
4481
4484
|
requestStart: q.start,
|
|
4482
4485
|
requestDuration: q.duration,
|
|
4483
|
-
calculatedEndTime:
|
|
4484
|
-
datasetEndTime:
|
|
4485
|
-
isStartAfterEnd: q.start >=
|
|
4486
|
-
}),
|
|
4487
|
-
original:
|
|
4488
|
-
clamped:
|
|
4486
|
+
calculatedEndTime: E,
|
|
4487
|
+
datasetEndTime: L,
|
|
4488
|
+
isStartAfterEnd: q.start >= L
|
|
4489
|
+
}), E > L && (console.warn("📊 Clamping request end time to dataset boundary:", {
|
|
4490
|
+
original: E,
|
|
4491
|
+
clamped: L,
|
|
4489
4492
|
requestStart: q.start,
|
|
4490
4493
|
duration: q.duration
|
|
4491
|
-
}),
|
|
4494
|
+
}), E = L), E <= q.start) {
|
|
4492
4495
|
console.error("🚨 CRITICAL: Invalid request detected - endTime <= startTime! Skipping request.", {
|
|
4493
4496
|
startTime: q.start,
|
|
4494
|
-
endTime:
|
|
4497
|
+
endTime: E,
|
|
4495
4498
|
duration: q.duration,
|
|
4496
|
-
datasetEndTime:
|
|
4499
|
+
datasetEndTime: L,
|
|
4497
4500
|
originalEndTime: q.start + q.duration
|
|
4498
4501
|
});
|
|
4499
4502
|
continue;
|
|
4500
4503
|
}
|
|
4501
4504
|
const T = x;
|
|
4502
4505
|
if (T && T.readyState === 1) {
|
|
4503
|
-
const A = q.channels.map((
|
|
4504
|
-
const
|
|
4506
|
+
const A = q.channels.map((G) => {
|
|
4507
|
+
const j = G.serverId || G.id, Z = G.label || G.name;
|
|
4505
4508
|
return {
|
|
4506
|
-
id:
|
|
4509
|
+
id: j,
|
|
4507
4510
|
// Server expects serverId
|
|
4508
|
-
name:
|
|
4511
|
+
name: Z
|
|
4509
4512
|
};
|
|
4510
|
-
}),
|
|
4513
|
+
}), V = {
|
|
4511
4514
|
session: _,
|
|
4512
4515
|
minMax: !0,
|
|
4513
4516
|
startTime: q.start,
|
|
4514
|
-
endTime:
|
|
4517
|
+
endTime: E,
|
|
4515
4518
|
packageId: N.content.id,
|
|
4516
4519
|
pixelWidth: q.pixelWidth,
|
|
4517
4520
|
virtualChannels: A
|
|
4518
|
-
},
|
|
4519
|
-
T.send(
|
|
4520
|
-
const
|
|
4521
|
-
for (let
|
|
4522
|
-
const
|
|
4523
|
-
|
|
4521
|
+
}, k = JSON.stringify(V);
|
|
4522
|
+
T.send(k);
|
|
4523
|
+
const W = q.channels.length, M = /* @__PURE__ */ new Map();
|
|
4524
|
+
for (let G = 0; G < W; G++) {
|
|
4525
|
+
const j = q.channels[G].id;
|
|
4526
|
+
M.set(j, NaN);
|
|
4524
4527
|
}
|
|
4525
|
-
const
|
|
4526
|
-
count:
|
|
4527
|
-
counter:
|
|
4528
|
+
const H = {
|
|
4529
|
+
count: W,
|
|
4530
|
+
counter: M,
|
|
4528
4531
|
subPageCount: NaN,
|
|
4529
4532
|
ts: Date.now(),
|
|
4530
4533
|
inViewport: q.isInViewport,
|
|
4531
4534
|
// Add debug info
|
|
4532
|
-
channels: q.channels.map((
|
|
4533
|
-
id:
|
|
4534
|
-
serverId:
|
|
4535
|
-
label:
|
|
4535
|
+
channels: q.channels.map((G) => ({
|
|
4536
|
+
id: G.id,
|
|
4537
|
+
serverId: G.serverId,
|
|
4538
|
+
label: G.label
|
|
4536
4539
|
}))
|
|
4537
4540
|
};
|
|
4538
|
-
|
|
4541
|
+
$.set(q.start, H);
|
|
4539
4542
|
} else
|
|
4540
4543
|
return console.error("❌ WebSocket not ready for sending requests:", {
|
|
4541
4544
|
readyState: T == null ? void 0 : T.readyState,
|
|
@@ -4556,11 +4559,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4556
4559
|
const _ = [];
|
|
4557
4560
|
return g.forEach(function(N, z) {
|
|
4558
4561
|
if (!isNaN(N.subPageCount)) {
|
|
4559
|
-
const
|
|
4560
|
-
N.counter.forEach(function(
|
|
4561
|
-
!isNaN(
|
|
4562
|
-
}),
|
|
4563
|
-
channels:
|
|
4562
|
+
const $ = [];
|
|
4563
|
+
N.counter.forEach(function(D, L) {
|
|
4564
|
+
!isNaN(D) && D > 0 && $.push(L);
|
|
4565
|
+
}), $.length > 0 && _.push({
|
|
4566
|
+
channels: $,
|
|
4564
4567
|
start: z,
|
|
4565
4568
|
duration: S,
|
|
4566
4569
|
isInViewport: !0,
|
|
@@ -4608,109 +4611,109 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4608
4611
|
if (!b) return "";
|
|
4609
4612
|
let q = propOr("", "id", b);
|
|
4610
4613
|
if (t.value && typeof q == "string") {
|
|
4611
|
-
const
|
|
4612
|
-
q =
|
|
4614
|
+
const E = q.split("_");
|
|
4615
|
+
q = E.length > 1 ? head(E) : q;
|
|
4613
4616
|
}
|
|
4614
4617
|
return q;
|
|
4615
|
-
}, h = (b, q,
|
|
4616
|
-
var
|
|
4617
|
-
const T =
|
|
4618
|
+
}, h = (b, q, E = null) => {
|
|
4619
|
+
var k, W;
|
|
4620
|
+
const T = E || c.value, A = `${b}_${q}_${T}`;
|
|
4618
4621
|
if (e.value.has(A))
|
|
4619
4622
|
return e.value.get(A);
|
|
4620
|
-
let
|
|
4623
|
+
let V = `${b}-${q}`;
|
|
4621
4624
|
if (T !== "NOT_MONTAGED") {
|
|
4622
|
-
const
|
|
4623
|
-
if (
|
|
4624
|
-
for (const
|
|
4625
|
-
const
|
|
4626
|
-
if (((
|
|
4627
|
-
|
|
4625
|
+
const M = (k = v.value) == null ? void 0 : k.find((H) => H.name === T);
|
|
4626
|
+
if (M != null && M.channelPairs)
|
|
4627
|
+
for (const H of Object.keys(M.channelPairs)) {
|
|
4628
|
+
const G = M.channelPairs[H];
|
|
4629
|
+
if (((W = G.channels) == null ? void 0 : W.length) === 2 && G.channels[0] === b && G.channels[1] === q) {
|
|
4630
|
+
V = G.name || V;
|
|
4628
4631
|
break;
|
|
4629
4632
|
}
|
|
4630
4633
|
}
|
|
4631
4634
|
}
|
|
4632
|
-
return e.value.set(A,
|
|
4635
|
+
return e.value.set(A, V), V;
|
|
4633
4636
|
}, m = (b) => {
|
|
4634
4637
|
if (!Array.isArray(b))
|
|
4635
4638
|
return console.warn("Invalid channel details provided:", b), [];
|
|
4636
4639
|
const q = performance.now();
|
|
4637
4640
|
a.totalChannels = b.length, a.processedChannels = 0, a.errors = 0;
|
|
4638
|
-
const
|
|
4639
|
-
var
|
|
4641
|
+
const E = b.map(({ id: T, name: A }) => {
|
|
4642
|
+
var V;
|
|
4640
4643
|
try {
|
|
4641
|
-
const
|
|
4642
|
-
if (!
|
|
4644
|
+
const k = R(T);
|
|
4645
|
+
if (!k)
|
|
4643
4646
|
return console.warn(
|
|
4644
4647
|
`❌ Base channel not found for ID: ${T}, available base channels:`,
|
|
4645
|
-
((
|
|
4648
|
+
((V = f.value) == null ? void 0 : V.map((M) => ({ id: M == null ? void 0 : M.id, name: M == null ? void 0 : M.name }))) || []
|
|
4646
4649
|
), a.errors++, null;
|
|
4647
|
-
const
|
|
4648
|
-
return a.processedChannels++, t.value && a.montageChannels++,
|
|
4649
|
-
} catch (
|
|
4650
|
-
return console.error(`❌ Error processing channel ${T}:`,
|
|
4650
|
+
const W = y(T, A, k);
|
|
4651
|
+
return a.processedChannels++, t.value && a.montageChannels++, W;
|
|
4652
|
+
} catch (k) {
|
|
4653
|
+
return console.error(`❌ Error processing channel ${T}:`, k), a.errors++, null;
|
|
4651
4654
|
}
|
|
4652
4655
|
}).filter(Boolean);
|
|
4653
|
-
return a.lastProcessingTime = performance.now() - q,
|
|
4656
|
+
return a.lastProcessingTime = performance.now() - q, E;
|
|
4654
4657
|
}, R = (b) => {
|
|
4655
|
-
var
|
|
4658
|
+
var E;
|
|
4656
4659
|
if (i.value.has(b))
|
|
4657
4660
|
return i.value.get(b);
|
|
4658
|
-
const q = (
|
|
4661
|
+
const q = (E = f.value) == null ? void 0 : E.find((T) => (T == null ? void 0 : T.id) === b);
|
|
4659
4662
|
return q && i.value.set(b, q), q;
|
|
4660
|
-
}, y = (b, q,
|
|
4663
|
+
}, y = (b, q, E) => {
|
|
4661
4664
|
let T = q;
|
|
4662
4665
|
const A = b;
|
|
4663
|
-
let
|
|
4666
|
+
let V = b;
|
|
4664
4667
|
if (t.value) {
|
|
4665
|
-
|
|
4666
|
-
const
|
|
4667
|
-
|
|
4668
|
+
V = `${b}_${q}`;
|
|
4669
|
+
const W = q.split("<->", 2);
|
|
4670
|
+
W.length === 2 && (T = h(W[0], W[1]));
|
|
4668
4671
|
}
|
|
4669
4672
|
return {
|
|
4670
4673
|
content: {
|
|
4671
|
-
id:
|
|
4674
|
+
id: V,
|
|
4672
4675
|
// ✅ Unique for client-side operations
|
|
4673
4676
|
serverId: A,
|
|
4674
4677
|
// ✅ What server provided/expects
|
|
4675
4678
|
name: q,
|
|
4676
|
-
channelType:
|
|
4679
|
+
channelType: E.channelType,
|
|
4677
4680
|
label: q,
|
|
4678
4681
|
displayName: T,
|
|
4679
|
-
unit:
|
|
4680
|
-
rate:
|
|
4681
|
-
start:
|
|
4682
|
-
end:
|
|
4682
|
+
unit: E.unit,
|
|
4683
|
+
rate: E.rate,
|
|
4684
|
+
start: E.start,
|
|
4685
|
+
end: E.end,
|
|
4683
4686
|
// Additional metadata
|
|
4684
4687
|
montageScheme: t.value ? c.value : "NOT_MONTAGED",
|
|
4685
4688
|
isMontaged: t.value,
|
|
4686
4689
|
baseChannelId: b
|
|
4687
4690
|
// Keep reference for debugging
|
|
4688
4691
|
},
|
|
4689
|
-
properties:
|
|
4692
|
+
properties: E.properties || []
|
|
4690
4693
|
};
|
|
4691
4694
|
}, g = (b) => {
|
|
4692
|
-
var T, A,
|
|
4695
|
+
var T, A, V;
|
|
4693
4696
|
if (b === "NOT_MONTAGED")
|
|
4694
4697
|
return {
|
|
4695
4698
|
montage: "NOT_MONTAGED",
|
|
4696
4699
|
packageId: (A = (T = l.value) == null ? void 0 : T.content) == null ? void 0 : A.id,
|
|
4697
4700
|
montageMap: []
|
|
4698
4701
|
};
|
|
4699
|
-
const q = v.value.find((
|
|
4702
|
+
const q = v.value.find((k) => k.name === b);
|
|
4700
4703
|
if (!q)
|
|
4701
4704
|
return console.warn("Montage not found:", b), null;
|
|
4702
|
-
const
|
|
4705
|
+
const E = q.channelPairs.map((k) => k.channels);
|
|
4703
4706
|
return {
|
|
4704
4707
|
montage: "CUSTOM_MONTAGE",
|
|
4705
|
-
packageId: (
|
|
4706
|
-
montageMap:
|
|
4708
|
+
packageId: (V = l.value) == null ? void 0 : V.content.id,
|
|
4709
|
+
montageMap: E
|
|
4707
4710
|
};
|
|
4708
4711
|
}, S = (b) => {
|
|
4709
4712
|
const q = [];
|
|
4710
4713
|
if (!b)
|
|
4711
4714
|
return q.push("Channel configuration is null or undefined"), { isValid: !1, errors: q };
|
|
4712
|
-
const
|
|
4713
|
-
for (const A of
|
|
4715
|
+
const E = ["id", "label", "type", "unit", "rate"];
|
|
4716
|
+
for (const A of E)
|
|
4714
4717
|
b[A] || q.push(`Missing required field: ${A}`);
|
|
4715
4718
|
b.rate && (typeof b.rate != "number" || b.rate <= 0) && q.push("Sample rate must be a positive number"), b.start && b.end && b.start >= b.end && q.push("Channel start time must be less than end time");
|
|
4716
4719
|
const T = ["CONTINUOUS", "UNIT", "Neural"];
|
|
@@ -4718,27 +4721,27 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4718
4721
|
isValid: q.length === 0,
|
|
4719
4722
|
errors: q
|
|
4720
4723
|
};
|
|
4721
|
-
}, x = (b) => b.sort((q,
|
|
4722
|
-
const T = q.label || "", A =
|
|
4723
|
-
if (
|
|
4724
|
+
}, x = (b) => b.sort((q, E) => {
|
|
4725
|
+
const T = q.label || "", A = E.label || "", V = T.split("<->", 3), k = A.split("<->", 3);
|
|
4726
|
+
if (V.length > 2 || k.length > 2)
|
|
4724
4727
|
return T.localeCompare(A);
|
|
4725
|
-
const
|
|
4726
|
-
if (
|
|
4727
|
-
const
|
|
4728
|
-
return !isNaN(
|
|
4728
|
+
const W = V[0] || "", M = k[0] || "";
|
|
4729
|
+
if (W === M && V.length > 1 && k.length > 1) {
|
|
4730
|
+
const H = parseFloat(V[1]), G = parseFloat(k[1]);
|
|
4731
|
+
return !isNaN(H) && !isNaN(G) ? H - G : V[1].localeCompare(k[1]);
|
|
4729
4732
|
}
|
|
4730
|
-
return
|
|
4733
|
+
return W.localeCompare(M);
|
|
4731
4734
|
}), _ = (b, q = 0) => {
|
|
4732
|
-
const
|
|
4735
|
+
const E = b.content, T = E.label.split("<->", 3), A = T[0] || "", V = T.length > 1 ? isNaN(parseFloat(T[1])) ? T[1] : parseFloat(T[1]) : 0;
|
|
4733
4736
|
return {
|
|
4734
|
-
id:
|
|
4735
|
-
serverId:
|
|
4736
|
-
type:
|
|
4737
|
-
label:
|
|
4738
|
-
displayName:
|
|
4737
|
+
id: E.id,
|
|
4738
|
+
serverId: E.serverId,
|
|
4739
|
+
type: E.channelType,
|
|
4740
|
+
label: E.label,
|
|
4741
|
+
displayName: E.displayName,
|
|
4739
4742
|
labelParts: T,
|
|
4740
4743
|
labelPrefix: A,
|
|
4741
|
-
labelValue:
|
|
4744
|
+
labelValue: V,
|
|
4742
4745
|
dataSegments: [],
|
|
4743
4746
|
rank: q,
|
|
4744
4747
|
visible: !0,
|
|
@@ -4748,27 +4751,27 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4748
4751
|
rowAdjust: 0,
|
|
4749
4752
|
selected: !1,
|
|
4750
4753
|
hover: !1,
|
|
4751
|
-
unit:
|
|
4752
|
-
sf:
|
|
4754
|
+
unit: E.unit,
|
|
4755
|
+
sf: E.rate,
|
|
4753
4756
|
filter: {},
|
|
4754
4757
|
hideFilter: !0,
|
|
4755
4758
|
isEditing: !1,
|
|
4756
|
-
montageScheme:
|
|
4757
|
-
isMontaged:
|
|
4758
|
-
baseChannelId:
|
|
4759
|
+
montageScheme: E.montageScheme || "NOT_MONTAGED",
|
|
4760
|
+
isMontaged: E.isMontaged || !1,
|
|
4761
|
+
baseChannelId: E.baseChannelId
|
|
4759
4762
|
// For debugging/reference
|
|
4760
4763
|
};
|
|
4761
4764
|
}, N = (b, q = {}) => {
|
|
4762
4765
|
const {
|
|
4763
|
-
channelType:
|
|
4766
|
+
channelType: E = null,
|
|
4764
4767
|
visible: T = null,
|
|
4765
4768
|
montageScheme: A = null,
|
|
4766
|
-
labelPattern:
|
|
4767
|
-
sampleRate:
|
|
4769
|
+
labelPattern: V = null,
|
|
4770
|
+
sampleRate: k = null
|
|
4768
4771
|
} = q;
|
|
4769
|
-
return b.filter((
|
|
4772
|
+
return b.filter((W) => !(E && W.type !== E || T !== null && W.visible !== T || A && W.montageScheme !== A || V && !new RegExp(V, "i").test(W.label) || k && W.sf !== k));
|
|
4770
4773
|
}, z = (b, q = "type") => {
|
|
4771
|
-
const
|
|
4774
|
+
const E = {};
|
|
4772
4775
|
return b.forEach((T) => {
|
|
4773
4776
|
let A;
|
|
4774
4777
|
switch (q) {
|
|
@@ -4790,9 +4793,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4790
4793
|
default:
|
|
4791
4794
|
A = "all";
|
|
4792
4795
|
}
|
|
4793
|
-
|
|
4794
|
-
}),
|
|
4795
|
-
},
|
|
4796
|
+
E[A] || (E[A] = []), E[A].push(T);
|
|
4797
|
+
}), E;
|
|
4798
|
+
}, $ = () => {
|
|
4796
4799
|
var b;
|
|
4797
4800
|
return {
|
|
4798
4801
|
...a,
|
|
@@ -4802,7 +4805,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4802
4805
|
currentMontageScheme: c.value,
|
|
4803
4806
|
availableMontages: ((b = v.value) == null ? void 0 : b.map((q) => q.name)) || []
|
|
4804
4807
|
};
|
|
4805
|
-
},
|
|
4808
|
+
}, D = () => {
|
|
4806
4809
|
i.value.clear(), e.value.clear(), Object.assign(a, {
|
|
4807
4810
|
totalChannels: 0,
|
|
4808
4811
|
processedChannels: 0,
|
|
@@ -4810,11 +4813,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4810
4813
|
errors: 0,
|
|
4811
4814
|
lastProcessingTime: 0
|
|
4812
4815
|
});
|
|
4813
|
-
},
|
|
4816
|
+
}, L = async (b) => {
|
|
4814
4817
|
const q = [];
|
|
4815
|
-
for (const
|
|
4818
|
+
for (const E of b)
|
|
4816
4819
|
try {
|
|
4817
|
-
const T = await
|
|
4820
|
+
const T = await E();
|
|
4818
4821
|
q.push({ success: !0, result: T });
|
|
4819
4822
|
} catch (T) {
|
|
4820
4823
|
q.push({ success: !1, error: T.message }), a.errors++;
|
|
@@ -4845,9 +4848,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4845
4848
|
findBaseChannel: R,
|
|
4846
4849
|
createVirtualChannel: y,
|
|
4847
4850
|
// Management
|
|
4848
|
-
getProcessingStats:
|
|
4849
|
-
clearCaches:
|
|
4850
|
-
batchProcessChannels:
|
|
4851
|
+
getProcessingStats: $,
|
|
4852
|
+
clearCaches: D,
|
|
4853
|
+
batchProcessChannels: L
|
|
4851
4854
|
};
|
|
4852
4855
|
};
|
|
4853
4856
|
function createThrottle(f, c, v = {}) {
|
|
@@ -4881,8 +4884,8 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4881
4884
|
emits: ["channelsInitialized", "setGlobalZoom"],
|
|
4882
4885
|
setup(f, { expose: c, emit: v }) {
|
|
4883
4886
|
const l = f, a = v, i = computed(() => l.activeViewer || {}), e = computed(() => {
|
|
4884
|
-
var
|
|
4885
|
-
return ((
|
|
4887
|
+
var I;
|
|
4888
|
+
return ((I = i.value) == null ? void 0 : I.channels) || [];
|
|
4886
4889
|
}), t = inject("viewerStore", () => createViewerStore("default"), !0), {
|
|
4887
4890
|
viewerChannels: r,
|
|
4888
4891
|
viewerMontageScheme: n,
|
|
@@ -4902,39 +4905,39 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4902
4905
|
onError: N
|
|
4903
4906
|
} = useWebSocket(), {
|
|
4904
4907
|
plotCanvasRef: z,
|
|
4905
|
-
blurCanvasRef:
|
|
4906
|
-
initializeCanvases:
|
|
4907
|
-
renderData:
|
|
4908
|
+
blurCanvasRef: $,
|
|
4909
|
+
initializeCanvases: D,
|
|
4910
|
+
renderData: L,
|
|
4908
4911
|
cpCanvasScaler: b
|
|
4909
|
-
} = useCanvasRenderer(), q = ref(1),
|
|
4912
|
+
} = useCanvasRenderer(), q = ref(1), E = ref(!1), {
|
|
4910
4913
|
chData: T,
|
|
4911
4914
|
requestedPages: A,
|
|
4912
|
-
viewData:
|
|
4913
|
-
channelsReady:
|
|
4914
|
-
autoScale:
|
|
4915
|
-
initChannels:
|
|
4916
|
-
dataCallback:
|
|
4917
|
-
invalidate:
|
|
4918
|
-
autoScaleViewData:
|
|
4919
|
-
segmIndexOf:
|
|
4915
|
+
viewData: V,
|
|
4916
|
+
channelsReady: k,
|
|
4917
|
+
autoScale: W,
|
|
4918
|
+
initChannels: M,
|
|
4919
|
+
dataCallback: H,
|
|
4920
|
+
invalidate: G,
|
|
4921
|
+
autoScaleViewData: j,
|
|
4922
|
+
segmIndexOf: Z,
|
|
4920
4923
|
updateCurrentRequestedSamplePeriod: U,
|
|
4921
|
-
currentRequestedSamplePeriod:
|
|
4922
|
-
isDataCurrentForViewport:
|
|
4924
|
+
currentRequestedSamplePeriod: ne,
|
|
4925
|
+
isDataCurrentForViewport: B,
|
|
4923
4926
|
isSwitchingMontage: re
|
|
4924
4927
|
} = useTimeSeriesData(), {
|
|
4925
|
-
aSyncRequests:
|
|
4926
|
-
aSyncPreRequests:
|
|
4927
|
-
isPrefetching:
|
|
4928
|
-
initializePrefetch:
|
|
4928
|
+
aSyncRequests: ue,
|
|
4929
|
+
aSyncPreRequests: se,
|
|
4930
|
+
isPrefetching: ce,
|
|
4931
|
+
initializePrefetch: ve,
|
|
4929
4932
|
generatePoints: Re,
|
|
4930
|
-
requestDataFromServer:
|
|
4931
|
-
startPrefetching:
|
|
4932
|
-
clearRequests:
|
|
4933
|
+
requestDataFromServer: _e,
|
|
4934
|
+
startPrefetching: fe,
|
|
4935
|
+
clearRequests: de
|
|
4933
4936
|
} = useDataRequests(), {
|
|
4934
4937
|
getChannelId: ge,
|
|
4935
|
-
processChannelData:
|
|
4938
|
+
processChannelData: he,
|
|
4936
4939
|
createMontagePayload: ke
|
|
4937
|
-
} = useChannelProcessing(e, n, d, i),
|
|
4940
|
+
} = useChannelProcessing(e, n, d, i), pe = ref({
|
|
4938
4941
|
totalRequests: 0,
|
|
4939
4942
|
successfulRequests: 0,
|
|
4940
4943
|
failedRequests: 0,
|
|
@@ -4942,10 +4945,10 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4942
4945
|
singleChannelRequests: 0,
|
|
4943
4946
|
lastPrefetchTime: null,
|
|
4944
4947
|
averageResponseTime: 0
|
|
4945
|
-
}), Se = ref(null), Oe = ref(null), Te = ref(null),
|
|
4948
|
+
}), Se = ref(null), Oe = ref(null), Te = ref(null), oe = ref(0), be = computed(() => q.value * l.cWidth), me = computed(() => b(l.cHeight, q.value, 0)), qe = computed(() => l.cHeight - 20), Ae = computed(() => ({
|
|
4946
4949
|
width: l.cWidth + "px",
|
|
4947
4950
|
height: qe.value + "px"
|
|
4948
|
-
})),
|
|
4951
|
+
})), ye = reactive({
|
|
4949
4952
|
start: l.start,
|
|
4950
4953
|
duration: l.duration,
|
|
4951
4954
|
cWidth: l.cWidth,
|
|
@@ -4953,46 +4956,46 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4953
4956
|
pHeight: qe.value,
|
|
4954
4957
|
rsPeriod: l.rsPeriod,
|
|
4955
4958
|
nrVisibleChannels: 0
|
|
4956
|
-
}),
|
|
4957
|
-
watch(
|
|
4958
|
-
|
|
4959
|
+
}), we = computed(() => l.rsPeriod > 0 ? l.rsPeriod : ye.duration > 0 && ye.cWidth > 0 ? ye.duration / ye.cWidth : (console.warn("⚠️ Using fallback rsPeriod = 1"), 1));
|
|
4960
|
+
watch(we, (I) => {
|
|
4961
|
+
I > 0 && U(I);
|
|
4959
4962
|
}, { immediate: !0 });
|
|
4960
4963
|
const Ee = () => {
|
|
4961
|
-
var
|
|
4964
|
+
var I;
|
|
4962
4965
|
try {
|
|
4963
|
-
if (!
|
|
4966
|
+
if (!k.value)
|
|
4964
4967
|
return;
|
|
4965
|
-
|
|
4966
|
-
let
|
|
4967
|
-
if (
|
|
4968
|
+
ye.nrVisibleChannels = ((I = r.value) == null ? void 0 : I.reduce((Q, J) => J.visible ? Q + 1 : Q, 0)) || 0;
|
|
4969
|
+
let X = 0, Y = 0;
|
|
4970
|
+
if (V.channels.forEach((Q, J) => {
|
|
4968
4971
|
const K = Q.blocks || [], te = K.reduce((ee, le) => ee + (le.nrPoints || 0), 0);
|
|
4969
|
-
K.length > 0 && (
|
|
4970
|
-
}),
|
|
4972
|
+
K.length > 0 && (Y++, X += K.length);
|
|
4973
|
+
}), Y === 0)
|
|
4971
4974
|
return;
|
|
4972
|
-
|
|
4973
|
-
|
|
4975
|
+
L(
|
|
4976
|
+
V,
|
|
4974
4977
|
r.value || [],
|
|
4975
4978
|
l.constants,
|
|
4976
|
-
|
|
4979
|
+
ye,
|
|
4977
4980
|
l.globalZoomMult,
|
|
4978
4981
|
q.value
|
|
4979
4982
|
);
|
|
4980
|
-
} catch (
|
|
4981
|
-
console.error("💥 ERROR in renderDataInternal:",
|
|
4983
|
+
} catch (X) {
|
|
4984
|
+
console.error("💥 ERROR in renderDataInternal:", X), console.error("💥 Stack trace:", X.stack);
|
|
4982
4985
|
}
|
|
4983
4986
|
}, xe = ref(), Ce = () => {
|
|
4984
4987
|
xe.value = setInterval(() => {
|
|
4985
|
-
var Q,
|
|
4986
|
-
if (!
|
|
4987
|
-
const
|
|
4988
|
+
var Q, J;
|
|
4989
|
+
if (!k.value) return;
|
|
4990
|
+
const I = {
|
|
4988
4991
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4989
4992
|
requestedPagesSize: A.value.size,
|
|
4990
|
-
isPrefetching:
|
|
4991
|
-
pendingAsyncRequests:
|
|
4992
|
-
pendingPreRequests:
|
|
4993
|
+
isPrefetching: ce.value,
|
|
4994
|
+
pendingAsyncRequests: ue.value.length,
|
|
4995
|
+
pendingPreRequests: se.value.length,
|
|
4993
4996
|
currentMontage: n.value,
|
|
4994
4997
|
channelCount: ((Q = r.value) == null ? void 0 : Q.length) || 0,
|
|
4995
|
-
visibleChannelCount: ((
|
|
4998
|
+
visibleChannelCount: ((J = r.value) == null ? void 0 : J.filter((K) => K.visible).length) || 0,
|
|
4996
4999
|
connectionStatus: u.value,
|
|
4997
5000
|
requestedPages: Array.from(A.value.entries()).map(([K, te]) => {
|
|
4998
5001
|
var ee;
|
|
@@ -5004,134 +5007,134 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5004
5007
|
channels: ((ee = te.channels) == null ? void 0 : ee.map((le) => le.id)) || Array.from(te.counter.keys())
|
|
5005
5008
|
};
|
|
5006
5009
|
})
|
|
5007
|
-
},
|
|
5008
|
-
|
|
5010
|
+
}, X = 1e4, Y = I.requestedPages.filter((K) => K.age > X);
|
|
5011
|
+
Y.length > 0 && (console.warn("⚠️ Detected stuck requests, cleaning up:", Y.map((K) => ({
|
|
5009
5012
|
pageStart: K.pageStart,
|
|
5010
5013
|
age: Math.round(K.age / 1e3) + "s",
|
|
5011
5014
|
channels: K.channels
|
|
5012
|
-
}))),
|
|
5015
|
+
}))), Y.forEach((K) => {
|
|
5013
5016
|
A.value.delete(K.pageStart);
|
|
5014
|
-
}),
|
|
5015
|
-
pendingPreRequests:
|
|
5016
|
-
requestedPagesSize:
|
|
5017
|
+
}), oe.value > 0 && (oe.value = Math.max(0, oe.value - 1))), I.pendingPreRequests > 0 && !I.isPrefetching && console.warn("⚠️ Prefetch is blocked with pending requests:", {
|
|
5018
|
+
pendingPreRequests: I.pendingPreRequests,
|
|
5019
|
+
requestedPagesSize: I.requestedPagesSize
|
|
5017
5020
|
});
|
|
5018
5021
|
}, 5e3);
|
|
5019
|
-
},
|
|
5022
|
+
}, ae = async () => {
|
|
5020
5023
|
if (!r.value)
|
|
5021
5024
|
return;
|
|
5022
|
-
const
|
|
5025
|
+
const I = T.value.filter((ee) => {
|
|
5023
5026
|
const le = r.value.find(
|
|
5024
|
-
(
|
|
5027
|
+
(ie) => ie.id === ee.id
|
|
5025
5028
|
// Direct id comparison (both are unique)
|
|
5026
5029
|
);
|
|
5027
5030
|
return le && le.visible;
|
|
5028
|
-
}),
|
|
5029
|
-
|
|
5031
|
+
}), X = we.value, Y = Re(
|
|
5032
|
+
I,
|
|
5030
5033
|
l.start,
|
|
5031
5034
|
l.duration,
|
|
5032
|
-
|
|
5035
|
+
V,
|
|
5033
5036
|
A.value,
|
|
5034
5037
|
l.constants,
|
|
5035
|
-
|
|
5038
|
+
X,
|
|
5036
5039
|
l.ts_end,
|
|
5037
|
-
|
|
5040
|
+
Z,
|
|
5038
5041
|
ge
|
|
5039
|
-
), Q = Math.ceil(
|
|
5040
|
-
let
|
|
5041
|
-
if (Se.value !== null && Q !== Se.value && (
|
|
5042
|
+
), Q = Math.ceil(X);
|
|
5043
|
+
let J = !1;
|
|
5044
|
+
if (Se.value !== null && Q !== Se.value && (J = !0, `${Se.value}${Q}`), Oe.value !== null) {
|
|
5042
5045
|
const ee = Math.abs(l.start - Oe.value), le = Math.max(l.duration, Te.value || l.duration);
|
|
5043
|
-
ee > le * 2 && (
|
|
5046
|
+
ee > le * 2 && (J = !0, `${ee}`, le * 2, `${(ee / le).toFixed(1)}`);
|
|
5044
5047
|
}
|
|
5045
5048
|
const K = 15;
|
|
5046
|
-
if (A.value.size > K && (
|
|
5047
|
-
|
|
5049
|
+
if (A.value.size > K && (J = !0, `${A.value.size}${K}`), oe.value >= 5 && (J = !0, `${oe.value}`), J && !E.value) {
|
|
5050
|
+
E.value = !0;
|
|
5048
5051
|
try {
|
|
5049
|
-
R() && (A.value.clear(),
|
|
5052
|
+
R() && (A.value.clear(), de(), oe.value = 0, await new Promise((ee) => setTimeout(ee, 50)));
|
|
5050
5053
|
} finally {
|
|
5051
|
-
|
|
5054
|
+
E.value = !1;
|
|
5052
5055
|
}
|
|
5053
|
-
} else if (
|
|
5056
|
+
} else if (J && E.value)
|
|
5054
5057
|
return;
|
|
5055
5058
|
Se.value = Q, Oe.value = l.start, Te.value = l.duration;
|
|
5056
5059
|
const te = await useToken();
|
|
5057
|
-
|
|
5058
|
-
|
|
5060
|
+
Y.asyncRequests.length > 0 && _e(
|
|
5061
|
+
Y.asyncRequests,
|
|
5059
5062
|
0,
|
|
5060
5063
|
s.value,
|
|
5061
5064
|
te,
|
|
5062
5065
|
i.value,
|
|
5063
|
-
|
|
5066
|
+
X,
|
|
5064
5067
|
A.value,
|
|
5065
5068
|
l.ts_end
|
|
5066
|
-
),
|
|
5069
|
+
), Y.asyncPreRequests.length > 0 && fe();
|
|
5067
5070
|
}, P = () => {
|
|
5068
|
-
|
|
5071
|
+
ae(), Ee();
|
|
5069
5072
|
}, C = () => {
|
|
5070
|
-
|
|
5073
|
+
ae(), W.value === 0 ? (W.value--, p()) : Ee();
|
|
5071
5074
|
}, p = () => {
|
|
5072
|
-
const
|
|
5073
|
-
|
|
5075
|
+
const I = j(l.cHeight);
|
|
5076
|
+
I && !isNaN(I) && a("setGlobalZoom", I), Ee();
|
|
5074
5077
|
}, w = createThrottle(C, 250, { leading: !1 }), O = createThrottle(() => P(), 50);
|
|
5075
|
-
watch(() => l.rsPeriod, (
|
|
5076
|
-
|
|
5077
|
-
}), watch(() => l.duration, (
|
|
5078
|
-
|
|
5079
|
-
}), watch(() => n.value, (
|
|
5078
|
+
watch(() => l.rsPeriod, (I, X) => {
|
|
5079
|
+
I > 0 && U(I), G(), A.value.clear();
|
|
5080
|
+
}), watch(() => l.duration, (I, X) => {
|
|
5081
|
+
G();
|
|
5082
|
+
}), watch(() => n.value, (I) => {
|
|
5080
5083
|
if (!s.value || s.value.readyState !== 1) {
|
|
5081
5084
|
console.warn("Cannot switch montage — WebSocket not connected");
|
|
5082
5085
|
return;
|
|
5083
5086
|
}
|
|
5084
|
-
re.value = !0, A.value.clear(),
|
|
5085
|
-
const
|
|
5086
|
-
|
|
5087
|
+
re.value = !0, A.value.clear(), de(), G(), oe.value = 0, Se.value = null, Oe.value = null, Te.value = null, k.value = !1;
|
|
5088
|
+
const X = ke(I);
|
|
5089
|
+
X ? h(X) : (console.warn("Montage definition not found for:", I), re.value = !1);
|
|
5087
5090
|
}), watch(() => [l.start, l.duration, l.cWidth, l.cHeight, l.rsPeriod], () => {
|
|
5088
|
-
|
|
5089
|
-
}), S((
|
|
5090
|
-
|
|
5091
|
-
}), x((
|
|
5092
|
-
if (!
|
|
5093
|
-
|
|
5091
|
+
ye.start = l.start, ye.duration = l.duration, ye.cWidth = l.cWidth, ye.cHeight = l.cHeight, ye.pHeight = qe.value, ye.rsPeriod = l.rsPeriod;
|
|
5092
|
+
}), S((I) => {
|
|
5093
|
+
I.pageStart >= l.start + l.duration && (pe.value.totalRequests++, n.value !== "NOT_MONTAGED" ? pe.value.montageRequests++ : pe.value.singleChannelRequests++), H(I), I.pageStart < l.start + l.duration && w();
|
|
5094
|
+
}), x((I) => {
|
|
5095
|
+
if (!B(I.data)) {
|
|
5096
|
+
oe.value++;
|
|
5094
5097
|
return;
|
|
5095
5098
|
}
|
|
5096
|
-
|
|
5097
|
-
}), _((
|
|
5099
|
+
oe.value = 0, H(I), I.pageStart < l.start + l.duration && w();
|
|
5100
|
+
}), _((I) => {
|
|
5098
5101
|
re.value = !1;
|
|
5099
5102
|
try {
|
|
5100
|
-
const
|
|
5101
|
-
if (!
|
|
5103
|
+
const X = he(I);
|
|
5104
|
+
if (!X || X.length === 0) {
|
|
5102
5105
|
console.warn("No valid channels after processing channel details");
|
|
5103
5106
|
return;
|
|
5104
5107
|
}
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
}).catch((
|
|
5108
|
-
console.error("Failed to initialize channels:",
|
|
5108
|
+
M(X, t, ge).then(() => {
|
|
5109
|
+
G(), P(), a("channelsInitialized");
|
|
5110
|
+
}).catch((Y) => {
|
|
5111
|
+
console.error("Failed to initialize channels:", Y), t.setViewerErrors({ error: "Failed to initialize channels after montage switch" });
|
|
5109
5112
|
});
|
|
5110
|
-
} catch (
|
|
5111
|
-
console.error("Error processing channel details:",
|
|
5113
|
+
} catch (X) {
|
|
5114
|
+
console.error("Error processing channel details:", X), t.setViewerErrors({ error: "Error processing channel details" });
|
|
5112
5115
|
}
|
|
5113
|
-
}), N((
|
|
5114
|
-
t.setViewerErrors(
|
|
5116
|
+
}), N((I) => {
|
|
5117
|
+
t.setViewerErrors(I);
|
|
5115
5118
|
});
|
|
5116
|
-
const
|
|
5117
|
-
var
|
|
5118
|
-
const
|
|
5119
|
-
U(
|
|
5120
|
-
var
|
|
5121
|
-
if ((
|
|
5119
|
+
const F = async () => {
|
|
5120
|
+
var Y, Q;
|
|
5121
|
+
const I = we.value;
|
|
5122
|
+
U(I), g(() => {
|
|
5123
|
+
var J;
|
|
5124
|
+
if ((J = r.value) != null && J.length) {
|
|
5122
5125
|
const te = { channelFiltersToClear: r.value.map((ee) => ee.id) };
|
|
5123
5126
|
m(te);
|
|
5124
5127
|
}
|
|
5125
5128
|
});
|
|
5126
|
-
const
|
|
5127
|
-
if (
|
|
5128
|
-
(
|
|
5129
|
-
const K =
|
|
5130
|
-
return
|
|
5131
|
-
|
|
5129
|
+
const X = await useToken();
|
|
5130
|
+
if (ve(
|
|
5131
|
+
(J) => {
|
|
5132
|
+
const K = we.value;
|
|
5133
|
+
return _e(
|
|
5134
|
+
J,
|
|
5132
5135
|
0,
|
|
5133
5136
|
s.value,
|
|
5134
|
-
|
|
5137
|
+
X,
|
|
5135
5138
|
i.value,
|
|
5136
5139
|
K,
|
|
5137
5140
|
A.value,
|
|
@@ -5139,56 +5142,58 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5139
5142
|
);
|
|
5140
5143
|
},
|
|
5141
5144
|
A
|
|
5142
|
-
), (Q = (
|
|
5145
|
+
), (Q = (Y = i.value) == null ? void 0 : Y.content) != null && Q.id)
|
|
5143
5146
|
try {
|
|
5147
|
+
const J = i.value.content.viewerAssetId || i.value.content.id, K = i.value.content.viewerAssetId ? "viewerAsset" : i.value.content.idType || "viewerAsset", te = i.value.content.viewerAssetId ? i.value.content.id : null;
|
|
5144
5148
|
await o(
|
|
5145
5149
|
t.config.timeseriesDiscoverApi,
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5150
|
+
J,
|
|
5151
|
+
X,
|
|
5152
|
+
K,
|
|
5153
|
+
te
|
|
5149
5154
|
), Ce();
|
|
5150
|
-
} catch (
|
|
5151
|
-
console.error("Failed to establish WebSocket connection:",
|
|
5155
|
+
} catch (J) {
|
|
5156
|
+
console.error("Failed to establish WebSocket connection:", J);
|
|
5152
5157
|
return;
|
|
5153
5158
|
}
|
|
5154
5159
|
};
|
|
5155
5160
|
return onMounted(async () => {
|
|
5156
|
-
q.value = 1,
|
|
5161
|
+
q.value = 1, D(q.value), F();
|
|
5157
5162
|
}), onUnmounted(() => {
|
|
5158
|
-
clearInterval(xe.value), A.value.size > 0 && R(), t.resetViewer(),
|
|
5163
|
+
clearInterval(xe.value), A.value.size > 0 && R(), t.resetViewer(), de(), y(), w.cancel && w.cancel(), O.cancel && O.cancel();
|
|
5159
5164
|
}), c({
|
|
5160
5165
|
renderAll: P,
|
|
5161
|
-
invalidate:
|
|
5166
|
+
invalidate: G,
|
|
5162
5167
|
throttledDataRender: O,
|
|
5163
5168
|
sendFilterMessage: m,
|
|
5164
|
-
viewData:
|
|
5169
|
+
viewData: V,
|
|
5165
5170
|
requestedPages: A,
|
|
5166
5171
|
chData: T,
|
|
5167
5172
|
viewerChannels: r,
|
|
5168
|
-
currentRequestedSamplePeriod:
|
|
5169
|
-
initPlotCanvas:
|
|
5170
|
-
}), (
|
|
5173
|
+
currentRequestedSamplePeriod: ne,
|
|
5174
|
+
initPlotCanvas: F
|
|
5175
|
+
}), (I, X) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
5171
5176
|
createElementVNode("canvas", {
|
|
5172
5177
|
ref_key: "blurCanvasRef",
|
|
5173
|
-
ref:
|
|
5178
|
+
ref: $,
|
|
5174
5179
|
class: "canvas",
|
|
5175
5180
|
width: be.value,
|
|
5176
|
-
height:
|
|
5181
|
+
height: me.value,
|
|
5177
5182
|
style: normalizeStyle(Ae.value)
|
|
5178
5183
|
}, null, 12, _hoisted_2$1),
|
|
5179
|
-
renderSlot(
|
|
5180
|
-
renderSlot(
|
|
5184
|
+
renderSlot(I.$slots, "axisCanvas", {}, void 0, !0),
|
|
5185
|
+
renderSlot(I.$slots, "annCanvas", {}, void 0, !0),
|
|
5181
5186
|
createElementVNode("canvas", {
|
|
5182
5187
|
ref_key: "plotCanvasRef",
|
|
5183
5188
|
ref: z,
|
|
5184
5189
|
class: "canvas",
|
|
5185
5190
|
width: be.value,
|
|
5186
|
-
height:
|
|
5191
|
+
height: me.value,
|
|
5187
5192
|
style: normalizeStyle(Ae.value)
|
|
5188
5193
|
}, null, 12, _hoisted_3$1)
|
|
5189
5194
|
]));
|
|
5190
5195
|
}
|
|
5191
|
-
}, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5196
|
+
}, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1549be92"]]), _hoisted_1 = { class: "timeseries-viewer-canvas" }, _hoisted_2 = { id: "canvasWrapper" }, _hoisted_3 = ["width", "height"], _hoisted_4 = ["width", "height"], _hoisted_5 = ["width", "height"], _hoisted_6 = ["width", "height"], _sfc_main = {
|
|
5192
5197
|
__name: "TSViewerCanvas",
|
|
5193
5198
|
props: {
|
|
5194
5199
|
windowHeight: Number,
|
|
@@ -5216,12 +5221,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5216
5221
|
],
|
|
5217
5222
|
setup(f, { expose: c, emit: v }) {
|
|
5218
5223
|
const l = defineAsyncComponent(
|
|
5219
|
-
() => import("./TSAnnotationCanvas-
|
|
5224
|
+
() => import("./TSAnnotationCanvas-CbokCIrw.js")
|
|
5220
5225
|
), a = f, i = v, e = inject("viewerStore", () => createViewerStore("default"), !0), { viewerChannels: t, viewerAnnotations: r, viewerActiveTool: n, viewerSelectedChannels: d } = storeToRefs(e), s = ref(null), u = ref(null), o = ref(null), h = ref(null), m = ref(null), R = ref(null);
|
|
5221
5226
|
reactive({});
|
|
5222
5227
|
const y = ref(0), g = ref(0), S = ref(0), x = ref(1), _ = ref(!1), N = ref(!1), z = ref("pointer");
|
|
5223
5228
|
ref(!1);
|
|
5224
|
-
const
|
|
5229
|
+
const $ = reactive({ x: 0, y: 0 }), D = ref(0), L = ref(["Event", "Artifact", "Seizure", "Mark", "Stim On", "Stim Off", "Start", "Stop"]), b = ref(0), q = ref(null), E = ref(0), T = ref(!0), A = () => {
|
|
5225
5230
|
if (r.value.length > 0) {
|
|
5226
5231
|
if (!r.value.some((w) => w.selected)) {
|
|
5227
5232
|
const w = r.value[0];
|
|
@@ -5231,12 +5236,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5231
5236
|
setTimeout(() => {
|
|
5232
5237
|
r.value.length > 0 && A();
|
|
5233
5238
|
}, 500);
|
|
5234
|
-
},
|
|
5239
|
+
}, V = (p) => {
|
|
5235
5240
|
if (p) {
|
|
5236
|
-
const w = "set" + p.charAt(0).toUpperCase() + p.slice(1), O =
|
|
5241
|
+
const w = "set" + p.charAt(0).toUpperCase() + p.slice(1), O = k[w];
|
|
5237
5242
|
typeof O == "function" && O();
|
|
5238
5243
|
}
|
|
5239
|
-
},
|
|
5244
|
+
}, k = {
|
|
5240
5245
|
setPan: () => {
|
|
5241
5246
|
},
|
|
5242
5247
|
setPointer: () => {
|
|
@@ -5244,16 +5249,16 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5244
5249
|
setAnnotate: () => {
|
|
5245
5250
|
A();
|
|
5246
5251
|
}
|
|
5247
|
-
},
|
|
5252
|
+
}, W = computed(() => t.value.filter((p) => p.visible).length), M = computed(() => a.cHeight - 20), H = computed(() => a.cWidth + a.constants.CURSOROFFSET);
|
|
5248
5253
|
computed(() => u.value);
|
|
5249
|
-
const
|
|
5254
|
+
const G = computed(() => ({
|
|
5250
5255
|
width: a.cWidth + "px",
|
|
5251
5256
|
height: a.cHeight + "px"
|
|
5252
|
-
})),
|
|
5257
|
+
})), j = computed(() => ({
|
|
5253
5258
|
width: a.cWidth + "px",
|
|
5254
|
-
height:
|
|
5255
|
-
})),
|
|
5256
|
-
width:
|
|
5259
|
+
height: M.value + "px"
|
|
5260
|
+
})), Z = computed(() => ({
|
|
5261
|
+
width: H.value + "px",
|
|
5257
5262
|
height: a.cHeight + "px"
|
|
5258
5263
|
}));
|
|
5259
5264
|
watch(() => a.cHeight, () => {
|
|
@@ -5271,7 +5276,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5271
5276
|
(p = s.value) == null || p.throttledDataRender();
|
|
5272
5277
|
});
|
|
5273
5278
|
}), watch(n, (p) => {
|
|
5274
|
-
p && (
|
|
5279
|
+
p && (V(p), !_.value && !["annResize-left", "annResize-right", "annSelect"].includes(z.value) && (z.value = p));
|
|
5275
5280
|
}, { immediate: !0 }), watch(r, (p) => {
|
|
5276
5281
|
p.length > 0 && n.value === "annotate" && A();
|
|
5277
5282
|
}, { immediate: !0 }), watch(z, () => {
|
|
@@ -5307,10 +5312,10 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5307
5312
|
const U = () => {
|
|
5308
5313
|
var p;
|
|
5309
5314
|
(p = m.value) == null || p.resetFocusedAnnotation();
|
|
5310
|
-
},
|
|
5315
|
+
}, ne = (p) => {
|
|
5311
5316
|
var w;
|
|
5312
5317
|
(w = m.value) == null || w.createAnnotationLayer(p);
|
|
5313
|
-
},
|
|
5318
|
+
}, B = () => {
|
|
5314
5319
|
var O;
|
|
5315
5320
|
let p = (a.cursorLoc * a.cWidth - a.constants.CURSOROFFSET) * y.value;
|
|
5316
5321
|
return ((O = m.value) == null ? void 0 : O.findNextAnnotation(a.start + p)).start - p;
|
|
@@ -5318,51 +5323,51 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5318
5323
|
var O;
|
|
5319
5324
|
let p = (a.cursorLoc * a.cWidth - a.constants.CURSOROFFSET) * y.value;
|
|
5320
5325
|
return ((O = m.value) == null ? void 0 : O.findPreviousAnnotation(a.start + p)).start - p;
|
|
5321
|
-
},
|
|
5326
|
+
}, ue = (p) => {
|
|
5322
5327
|
i("updateAnnotation", p);
|
|
5323
|
-
},
|
|
5328
|
+
}, se = () => {
|
|
5324
5329
|
i("closeAnnotationLayerWindow");
|
|
5325
|
-
},
|
|
5330
|
+
}, ce = () => {
|
|
5326
5331
|
be(100);
|
|
5327
|
-
},
|
|
5332
|
+
}, ve = () => {
|
|
5328
5333
|
n.value === "annotate" && A(), i("annLayersInitialized");
|
|
5329
5334
|
}, Re = (p) => {
|
|
5330
5335
|
i("setGlobalZoom", p);
|
|
5331
|
-
},
|
|
5336
|
+
}, _e = () => {
|
|
5332
5337
|
i("channelsInitialized");
|
|
5333
|
-
},
|
|
5338
|
+
}, fe = (p) => {
|
|
5334
5339
|
p.stopPropagation(), p.preventDefault(), p.shiftKey ? Math.abs(p.deltaY) > Math.abs(p.deltaX) && (p.deltaY > 0 ? i("setDuration", a.duration * 1.1) : i("setDuration", a.duration / 1.1)) : Math.abs(p.deltaY) > Math.abs(p.deltaX) && (p.deltaY > 0 ? i("setGlobalZoom", a.globalZoomMult * 1.2) : i("setGlobalZoom", a.globalZoomMult / 1.2));
|
|
5335
|
-
},
|
|
5340
|
+
}, de = (p) => {
|
|
5336
5341
|
var w, O;
|
|
5337
5342
|
switch (N.value = !1, _.value = !1, z.value) {
|
|
5338
5343
|
case "pointer":
|
|
5339
5344
|
ge();
|
|
5340
|
-
const
|
|
5341
|
-
e.setChannels(
|
|
5345
|
+
const F = p.metaKey, I = p.clientY - R.value.getBoundingClientRect().top, X = $.y - R.value.getBoundingClientRect().top, Y = t.value.map((ie) => (F === !1 && (ie.selected = !1), (ie.rowBaseline > X && ie.rowBaseline < I || ie.rowBaseline < X && ie.rowBaseline > I) && (ie.selected = !0), ie));
|
|
5346
|
+
e.setChannels(Y), be();
|
|
5342
5347
|
break;
|
|
5343
5348
|
case "annSelect":
|
|
5344
5349
|
ge(), (w = m.value) == null || w.selectFocusedAnn();
|
|
5345
5350
|
break;
|
|
5346
5351
|
case "annotate":
|
|
5347
5352
|
A();
|
|
5348
|
-
let Q = null,
|
|
5349
|
-
for (let
|
|
5350
|
-
if (r.value[
|
|
5351
|
-
Q =
|
|
5353
|
+
let Q = null, J = null;
|
|
5354
|
+
for (let ie = 0; ie < r.value.length; ie++)
|
|
5355
|
+
if (r.value[ie].selected) {
|
|
5356
|
+
Q = ie, J = r.value[ie];
|
|
5352
5357
|
break;
|
|
5353
5358
|
}
|
|
5354
|
-
if (Q === null || !
|
|
5359
|
+
if (Q === null || !J || !J.id)
|
|
5355
5360
|
if (r.value.length > 0 && r.value[0].id)
|
|
5356
|
-
e.setActiveAnnotationLayer(r.value[0].id),
|
|
5361
|
+
e.setActiveAnnotationLayer(r.value[0].id), J = r.value[0], Q = 0;
|
|
5357
5362
|
else
|
|
5358
5363
|
return;
|
|
5359
5364
|
const K = d.value, te = K.length === t.value.length || K.length === 0;
|
|
5360
|
-
let ee = (p.clientX -
|
|
5365
|
+
let ee = (p.clientX - $.x) * y.value, le = D.value + ($.x - R.value.getBoundingClientRect().left) * y.value;
|
|
5361
5366
|
if (ee < 0 && (le = le + ee, ee = -ee), ee > 1e3) {
|
|
5362
|
-
const
|
|
5367
|
+
const ie = {
|
|
5363
5368
|
name: "",
|
|
5364
5369
|
id: null,
|
|
5365
|
-
label:
|
|
5370
|
+
label: L.value[b.value],
|
|
5366
5371
|
description: "",
|
|
5367
5372
|
start: le,
|
|
5368
5373
|
duration: ee,
|
|
@@ -5372,11 +5377,11 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5372
5377
|
selected: !0,
|
|
5373
5378
|
channelIds: K.map((Ne) => Ne.id),
|
|
5374
5379
|
allChannels: te,
|
|
5375
|
-
layer_id:
|
|
5380
|
+
layer_id: J.id,
|
|
5376
5381
|
// FIX: Use the validated layer ID
|
|
5377
5382
|
userId: null
|
|
5378
5383
|
};
|
|
5379
|
-
e.setActiveAnnotation(
|
|
5384
|
+
e.setActiveAnnotation(ie), i("addAnnotation", le, ee, te, ie.label, ie.description, J);
|
|
5380
5385
|
break;
|
|
5381
5386
|
}
|
|
5382
5387
|
break;
|
|
@@ -5387,11 +5392,11 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5387
5392
|
}
|
|
5388
5393
|
}, ge = () => {
|
|
5389
5394
|
R.value.getContext("2d").clearRect(0, 0, a.cWidth, a.cHeight);
|
|
5390
|
-
},
|
|
5395
|
+
}, he = (p) => {
|
|
5391
5396
|
var O;
|
|
5392
|
-
_.value = !0,
|
|
5397
|
+
_.value = !0, D.value = a.start;
|
|
5393
5398
|
const w = R.value.getBoundingClientRect();
|
|
5394
|
-
switch (
|
|
5399
|
+
switch ($.x = p.clientX, $.y = p.clientY, n.value === "annotate" && !["annResize-left", "annResize-right", "annSelect"].includes(z.value) && (z.value = "annotate"), z.value) {
|
|
5395
5400
|
case "annResize-left":
|
|
5396
5401
|
case "annResize-right":
|
|
5397
5402
|
N.value = !0, (O = m.value) == null || O.onMouseDown(p.clientX - w.left, p.clientY - w.top);
|
|
@@ -5399,59 +5404,59 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5399
5404
|
}
|
|
5400
5405
|
}, ke = () => {
|
|
5401
5406
|
_.value = !1;
|
|
5402
|
-
},
|
|
5407
|
+
}, pe = (p) => {
|
|
5403
5408
|
p.buttons === 1 ? _.value = !0 : _.value = !1;
|
|
5404
5409
|
}, Se = (p) => {
|
|
5405
|
-
var
|
|
5410
|
+
var I, X, Y, Q;
|
|
5406
5411
|
p.preventDefault(), p.stopPropagation();
|
|
5407
|
-
const w = R.value.getBoundingClientRect(), O = p.clientY - w.top,
|
|
5412
|
+
const w = R.value.getBoundingClientRect(), O = p.clientY - w.top, F = p.clientX - w.left;
|
|
5408
5413
|
switch (n.value) {
|
|
5409
5414
|
case "pan":
|
|
5410
5415
|
if (_.value) {
|
|
5411
|
-
const
|
|
5412
|
-
i("setStart",
|
|
5416
|
+
const J = D.value - (p.clientX - $.x) * y.value;
|
|
5417
|
+
i("setStart", J);
|
|
5413
5418
|
} else {
|
|
5414
|
-
const
|
|
5415
|
-
z.value =
|
|
5419
|
+
const J = (I = m.value) == null ? void 0 : I.onMouseMove(F, O, z.value, _.value);
|
|
5420
|
+
z.value = J || "pan";
|
|
5416
5421
|
}
|
|
5417
5422
|
break;
|
|
5418
5423
|
case "pointer":
|
|
5419
5424
|
if (_.value)
|
|
5420
|
-
|
|
5425
|
+
we(p.clientX, p.clientY);
|
|
5421
5426
|
else {
|
|
5422
|
-
const
|
|
5423
|
-
z.value =
|
|
5427
|
+
const J = (X = m.value) == null ? void 0 : X.onMouseMove(F, O, z.value, _.value);
|
|
5428
|
+
z.value = J || "pointer";
|
|
5424
5429
|
}
|
|
5425
5430
|
break;
|
|
5426
5431
|
case "annotate":
|
|
5427
5432
|
if (_.value && z.value === "annotate")
|
|
5428
5433
|
xe(p.clientX);
|
|
5429
5434
|
else if (_.value && ["annResize-left", "annResize-right"].includes(z.value)) {
|
|
5430
|
-
const
|
|
5431
|
-
z.value =
|
|
5435
|
+
const J = (Y = m.value) == null ? void 0 : Y.onMouseMove(F, O, z.value, _.value);
|
|
5436
|
+
z.value = J || z.value, be();
|
|
5432
5437
|
} else {
|
|
5433
|
-
const
|
|
5434
|
-
|
|
5438
|
+
const J = (Q = m.value) == null ? void 0 : Q.onMouseMove(F, O, z.value, _.value);
|
|
5439
|
+
J ? z.value = J : z.value = "annotate";
|
|
5435
5440
|
}
|
|
5436
5441
|
break;
|
|
5437
5442
|
}
|
|
5438
5443
|
}, Oe = () => {
|
|
5439
5444
|
Te(a.cWidth, a.duration), be(25);
|
|
5440
5445
|
}, Te = (p, w) => {
|
|
5441
|
-
const O = y.value,
|
|
5442
|
-
|
|
5443
|
-
},
|
|
5444
|
-
(!q.value || p !==
|
|
5445
|
-
},
|
|
5446
|
-
let
|
|
5447
|
-
const
|
|
5448
|
-
Q = O.leading === !1 ? 0 : Date.now(),
|
|
5446
|
+
const O = y.value, F = w / p;
|
|
5447
|
+
F !== O && (S.value = Date.now(), y.value = F, g.value = Math.floor(w / a.constants.PAGESIZEDIVIDER));
|
|
5448
|
+
}, oe = (p, w, O) => w * (p + O), be = (p = 0, w = !0) => {
|
|
5449
|
+
(!q.value || p !== E.value || T.value !== w) && (q.value = me(Ae, p, { leading: w }), E.value = p, T.value = w), q.value();
|
|
5450
|
+
}, me = (p, w, O = {}) => {
|
|
5451
|
+
let F, I, X, Y = null, Q = 0;
|
|
5452
|
+
const J = function() {
|
|
5453
|
+
Q = O.leading === !1 ? 0 : Date.now(), Y = null, X = p.apply(F, I), Y || (F = I = null);
|
|
5449
5454
|
};
|
|
5450
5455
|
return function() {
|
|
5451
5456
|
const K = Date.now();
|
|
5452
5457
|
!Q && O.leading === !1 && (Q = K);
|
|
5453
5458
|
const te = w - (K - Q);
|
|
5454
|
-
return
|
|
5459
|
+
return F = this, I = arguments, te <= 0 || te > w ? (Y && (clearTimeout(Y), Y = null), Q = K, X = p.apply(F, I), Y || (F = I = null)) : !Y && O.trailing !== !1 && (Y = setTimeout(J, te)), X;
|
|
5455
5460
|
};
|
|
5456
5461
|
}, qe = () => {
|
|
5457
5462
|
var p;
|
|
@@ -5459,145 +5464,145 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5459
5464
|
}, Ae = () => {
|
|
5460
5465
|
nextTick(() => {
|
|
5461
5466
|
var p, w;
|
|
5462
|
-
|
|
5467
|
+
ye(), Ee(), (p = s.value) == null || p.renderAll(), (w = m.value) == null || w.render();
|
|
5463
5468
|
});
|
|
5464
|
-
},
|
|
5469
|
+
}, ye = () => {
|
|
5465
5470
|
const w = u.value.getContext("2d");
|
|
5466
|
-
w.setTransform(x.value, 0, 0, x.value, 0, 0), w.clearRect(0, 0, a.cWidth, a.cHeight), w.stroke(), w.beginPath(), w.lineWidth = 1, w.moveTo(a.constants.XOFFSET + 0.5, 0.5), w.lineTo(a.constants.XOFFSET + 0.5,
|
|
5467
|
-
let O =
|
|
5471
|
+
w.setTransform(x.value, 0, 0, x.value, 0, 0), w.clearRect(0, 0, a.cWidth, a.cHeight), w.stroke(), w.beginPath(), w.lineWidth = 1, w.moveTo(a.constants.XOFFSET + 0.5, 0.5), w.lineTo(a.constants.XOFFSET + 0.5, M.value + 0.5), w.lineTo(a.cWidth + 0.5, M.value + 0.5), w.stroke();
|
|
5472
|
+
let O = M.value / (2 * W.value) + 0.5 << 1 >> 1;
|
|
5468
5473
|
w.lineWidth = 0.5;
|
|
5469
|
-
for (let Q = 0; Q <
|
|
5470
|
-
w.beginPath(), w.moveTo(a.constants.XOFFSET - 2, O), w.lineTo(a.constants.XOFFSET + 2, O), w.stroke(), O +=
|
|
5471
|
-
const
|
|
5472
|
-
for (let Q = 0; Q <
|
|
5473
|
-
let
|
|
5474
|
-
if (
|
|
5474
|
+
for (let Q = 0; Q < W.value; Q++)
|
|
5475
|
+
w.beginPath(), w.moveTo(a.constants.XOFFSET - 2, O), w.lineTo(a.constants.XOFFSET + 2, O), w.stroke(), O += M.value / W.value;
|
|
5476
|
+
const F = a.constants.XGRIDSPACING * Math.ceil(a.duration / 1e8), I = Math.ceil(a.duration / F) + 1, X = Math.ceil(a.constants.NRPXPERLABEL / (F / y.value)), Y = (F - a.start % F) % F;
|
|
5477
|
+
for (let Q = 0; Q < I; Q++) {
|
|
5478
|
+
let J = a.start + Y + Q * F;
|
|
5479
|
+
if (J > a.tsEnd)
|
|
5475
5480
|
break;
|
|
5476
|
-
const K =
|
|
5477
|
-
if (ee > 1 && (w.save(), w.beginPath(), w.lineWidth = 0.5, w.strokeStyle = "rgb(235,235,235)", w.moveTo(ee + 0.5, 0.5), w.lineTo(ee + 0.5,
|
|
5478
|
-
w.beginPath(), w.lineWidth = 1, w.moveTo(ee + 0.5,
|
|
5479
|
-
const
|
|
5480
|
-
w.font = "12px sans-serif", w.fillStyle = "rgb(150,150,150)", w.fillText(P(
|
|
5481
|
+
const K = J - a.start, te = a.constants.XOFFSET + K / y.value, ee = Math.round(te);
|
|
5482
|
+
if (ee > 1 && (w.save(), w.beginPath(), w.lineWidth = 0.5, w.strokeStyle = "rgb(235,235,235)", w.moveTo(ee + 0.5, 0.5), w.lineTo(ee + 0.5, M.value - 0.5), w.stroke(), w.restore(), ((J / F + F / 10) % X | 0) === 1 || X === 1)) {
|
|
5483
|
+
w.beginPath(), w.lineWidth = 1, w.moveTo(ee + 0.5, M.value - 3), w.lineTo(ee + 0.5, M.value + 3), w.stroke();
|
|
5484
|
+
const ie = new Date(J / 1e3);
|
|
5485
|
+
w.font = "12px sans-serif", w.fillStyle = "rgb(150,150,150)", w.fillText(P(ie), ee - 20.5, a.cHeight - 0.2);
|
|
5481
5486
|
}
|
|
5482
5487
|
}
|
|
5483
|
-
},
|
|
5484
|
-
const O = R.value,
|
|
5485
|
-
|
|
5486
|
-
const
|
|
5487
|
-
|
|
5488
|
+
}, we = (p, w) => {
|
|
5489
|
+
const O = R.value, F = O.getContext("2d");
|
|
5490
|
+
F.setTransform(x.value, 0, 0, x.value, 0, 0), F.clearRect(0, 0, a.cWidth, a.cHeight), F.beginPath(), F.lineWidth = 2, F.strokeStyle = "#295eff", F.setLineDash([5, 5, 15, 5]);
|
|
5491
|
+
const I = p - O.getBoundingClientRect().left, X = w - O.getBoundingClientRect().top;
|
|
5492
|
+
F.rect(I, X, -p + $.x, -w + $.y), F.stroke();
|
|
5488
5493
|
}, Ee = () => {
|
|
5489
5494
|
const w = h.value.getContext("2d");
|
|
5490
5495
|
w.setTransform(x.value, 0, 0, x.value, 0, 0), w.clearRect(0, 0, a.cWidth + a.constants.CURSOROFFSET, a.cHeight), w.save(), w.beginPath(), w.fillStyle = "red";
|
|
5491
5496
|
const O = a.cursorLoc * a.cWidth;
|
|
5492
|
-
O > a.constants.CURSOROFFSET ? (w.strokeStyle = "red", w.moveTo(O, 0), w.lineTo(O,
|
|
5497
|
+
O > a.constants.CURSOROFFSET ? (w.strokeStyle = "red", w.moveTo(O, 0), w.lineTo(O, M.value), w.stroke()) : w.moveTo(O, M.value), w.beginPath(), w.lineTo(O - 5, M.value + 8), w.lineTo(O + 5, M.value + 8), w.lineTo(O, M.value), w.fill(), w.restore();
|
|
5493
5498
|
}, xe = (p) => {
|
|
5494
5499
|
const w = R.value, O = w.getContext("2d");
|
|
5495
5500
|
O.setTransform(x.value, 0, 0, x.value, 0, 0);
|
|
5496
|
-
const
|
|
5497
|
-
let
|
|
5501
|
+
const F = a.constants.ANNOTATIONLABELHEIGHT, I = F / 2 | 0;
|
|
5502
|
+
let X = null;
|
|
5498
5503
|
for (let te = 0; te < r.value.length; te++)
|
|
5499
5504
|
if (r.value[te].selected) {
|
|
5500
|
-
|
|
5505
|
+
X = te;
|
|
5501
5506
|
break;
|
|
5502
5507
|
}
|
|
5503
|
-
if (
|
|
5508
|
+
if (X === null)
|
|
5504
5509
|
return;
|
|
5505
5510
|
O.save(), O.clearRect(0, 0, a.cWidth, a.cHeight), O.lineWidth = 1;
|
|
5506
|
-
const
|
|
5511
|
+
const Y = d.value, Q = Y.length === t.value.length || Y.length === 0, J = p - w.getBoundingClientRect().left, K = -p + $.x;
|
|
5507
5512
|
if (Q) {
|
|
5508
|
-
O.fillStyle = "rgba(0,0,0,0.1)", O.fillRect(
|
|
5509
|
-
let te =
|
|
5510
|
-
K < 0 && (te =
|
|
5513
|
+
O.fillStyle = "rgba(0,0,0,0.1)", O.fillRect(J, 0, K, M.value), O.fillStyle = r.value[X].color, O.strokeStyle = O.fillStyle;
|
|
5514
|
+
let te = J - 1, ee = K + 2;
|
|
5515
|
+
K < 0 && (te = J + 1, ee = K - 2), O.fillRect(te, 0, ee, F), O.setLineDash([5, 5, 5, 5]), O.beginPath(), O.moveTo(J, F), O.lineTo(J, M.value), O.stroke(), O.beginPath(), O.moveTo(J + K, F), O.lineTo(J + K, M.value), O.stroke();
|
|
5511
5516
|
} else {
|
|
5512
5517
|
let te = a.cHeight | 0, ee = 0;
|
|
5513
5518
|
const le = t.value;
|
|
5514
|
-
O.fillStyle = r.value[
|
|
5515
|
-
let
|
|
5516
|
-
K < 0 && (
|
|
5517
|
-
for (let
|
|
5518
|
-
const
|
|
5519
|
-
if (
|
|
5520
|
-
const Pe =
|
|
5521
|
-
Pe < te && (te = Pe), Pe > ee && (ee = Pe), O.fillRect(
|
|
5519
|
+
O.fillStyle = r.value[X].color, O.strokeStyle = O.fillStyle;
|
|
5520
|
+
let ie = J - 1, Ne = K + 2;
|
|
5521
|
+
K < 0 && (ie = J + 1, Ne = K - 2);
|
|
5522
|
+
for (let Ie = 0; Ie < le.length; Ie++) {
|
|
5523
|
+
const Fe = le[Ie];
|
|
5524
|
+
if (Fe.selected && Fe.visible) {
|
|
5525
|
+
const Pe = Fe.rowBaseline | 0;
|
|
5526
|
+
Pe < te && (te = Pe), Pe > ee && (ee = Pe), O.fillRect(ie, Pe - I, Ne, F);
|
|
5522
5527
|
}
|
|
5523
5528
|
}
|
|
5524
5529
|
O.fillStyle = "rgba(0,0,0,0.1)", O.setLineDash([5, 5, 5, 5]), O.fillRect(
|
|
5525
|
-
|
|
5526
|
-
te +
|
|
5530
|
+
J - 1,
|
|
5531
|
+
te + I,
|
|
5527
5532
|
K + 2,
|
|
5528
|
-
ee - te -
|
|
5529
|
-
), O.beginPath(), O.moveTo(
|
|
5533
|
+
ee - te - F
|
|
5534
|
+
), O.beginPath(), O.moveTo(J, te + I), O.lineTo(J, ee - I), O.moveTo(J + K, te + I), O.lineTo(J + K, ee - I), O.stroke();
|
|
5530
5535
|
}
|
|
5531
5536
|
O.restore();
|
|
5532
5537
|
}, Ce = () => {
|
|
5533
5538
|
var p;
|
|
5534
5539
|
(p = s.value) == null || p.initPlotCanvas();
|
|
5535
|
-
},
|
|
5540
|
+
}, ae = () => {
|
|
5536
5541
|
let p = R.value.getContext("2d"), w = window.devicePixelRatio || 1, O = p.webkitBackingStorePixelRatio || p.mozBackingStorePixelRatio || p.msBackingStorePixelRatio || p.oBackingStorePixelRatio || p.backingStorePixelRatio || 1;
|
|
5537
5542
|
return w / O;
|
|
5538
5543
|
}, P = (p) => ("0" + p.getUTCHours()).slice(-2) + ":" + ("0" + p.getUTCMinutes()).slice(-2) + ":" + ("0" + p.getUTCSeconds()).slice(-2), C = (p) => {
|
|
5539
|
-
var
|
|
5540
|
-
let w = parseFloat(p.input0), O = parseFloat(p.input1),
|
|
5544
|
+
var I, X;
|
|
5545
|
+
let w = parseFloat(p.input0), O = parseFloat(p.input1), F = {};
|
|
5541
5546
|
switch (p.filterType) {
|
|
5542
5547
|
case "clear":
|
|
5543
|
-
|
|
5548
|
+
F = { channelFiltersToClear: p.selChannels };
|
|
5544
5549
|
break;
|
|
5545
5550
|
case "bandpass":
|
|
5546
|
-
let
|
|
5547
|
-
|
|
5551
|
+
let Y = (w + O) / 2, Q = Math.abs((O - w) / 2);
|
|
5552
|
+
F = {
|
|
5548
5553
|
filter: p.filterType,
|
|
5549
|
-
filterParameters: [4,
|
|
5554
|
+
filterParameters: [4, Y, Q],
|
|
5550
5555
|
channels: p.selChannels
|
|
5551
5556
|
};
|
|
5552
5557
|
break;
|
|
5553
5558
|
case "highpass":
|
|
5554
|
-
|
|
5559
|
+
F = {
|
|
5555
5560
|
filter: p.filterType,
|
|
5556
5561
|
filterParameters: [4, w],
|
|
5557
5562
|
channels: p.selChannels
|
|
5558
5563
|
};
|
|
5559
5564
|
break;
|
|
5560
5565
|
case "lowpass":
|
|
5561
|
-
|
|
5566
|
+
F = {
|
|
5562
5567
|
filter: p.filterType,
|
|
5563
5568
|
filterParameters: [4, w],
|
|
5564
5569
|
channels: p.selChannels
|
|
5565
5570
|
};
|
|
5566
5571
|
break;
|
|
5567
5572
|
case "bandstop":
|
|
5568
|
-
let
|
|
5573
|
+
let J = 10;
|
|
5569
5574
|
const K = p.notchFreq;
|
|
5570
|
-
|
|
5575
|
+
F = {
|
|
5571
5576
|
filter: p.filterType,
|
|
5572
|
-
filterParameters: [4, K,
|
|
5577
|
+
filterParameters: [4, K, J],
|
|
5573
5578
|
channels: p.selChannels
|
|
5574
5579
|
};
|
|
5575
5580
|
break;
|
|
5576
5581
|
default:
|
|
5577
5582
|
return;
|
|
5578
5583
|
}
|
|
5579
|
-
(
|
|
5580
|
-
for (let
|
|
5581
|
-
let Q = p.selChannels[
|
|
5582
|
-
p.filterType === "clear" ?
|
|
5584
|
+
(I = s.value) == null || I.sendFilterMessage(F);
|
|
5585
|
+
for (let Y = 0; Y < p.selChannels.length; Y++) {
|
|
5586
|
+
let Q = p.selChannels[Y], J = find(propEq("id", Q), t.value);
|
|
5587
|
+
p.filterType === "clear" ? J.filter = {} : J.filter = {
|
|
5583
5588
|
type: p.filterType,
|
|
5584
5589
|
input0: w,
|
|
5585
5590
|
input1: O,
|
|
5586
5591
|
notchFreq: p.notchFreq
|
|
5587
5592
|
};
|
|
5588
5593
|
}
|
|
5589
|
-
(
|
|
5594
|
+
(X = s.value) == null || X.invalidate(), be();
|
|
5590
5595
|
};
|
|
5591
5596
|
return onMounted(() => {
|
|
5592
|
-
x.value =
|
|
5597
|
+
x.value = ae();
|
|
5593
5598
|
}), c({
|
|
5594
5599
|
rsPeriod: y,
|
|
5595
5600
|
resetFocusedAnnotation: U,
|
|
5596
|
-
createAnnotationLayer:
|
|
5597
|
-
getNextAnnotation:
|
|
5601
|
+
createAnnotationLayer: ne,
|
|
5602
|
+
getNextAnnotation: B,
|
|
5598
5603
|
getPreviousAnnotation: re,
|
|
5599
5604
|
setFilters: C,
|
|
5600
|
-
setActiveTool:
|
|
5605
|
+
setActiveTool: V,
|
|
5601
5606
|
renderAll: be,
|
|
5602
5607
|
renderAnnotationCanvas: qe,
|
|
5603
5608
|
initViewerCanvas: Ce
|
|
@@ -5616,7 +5621,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5616
5621
|
"rs-period": y.value,
|
|
5617
5622
|
"global-zoom-mult": f.globalZoomMult,
|
|
5618
5623
|
"active-viewer": f.activeViewer,
|
|
5619
|
-
onChannelsInitialized:
|
|
5624
|
+
onChannelsInitialized: _e,
|
|
5620
5625
|
onSetGlobalZoom: Re
|
|
5621
5626
|
}, {
|
|
5622
5627
|
axisCanvas: withCtx(() => [
|
|
@@ -5625,9 +5630,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5625
5630
|
ref_key: "axisArea",
|
|
5626
5631
|
ref: u,
|
|
5627
5632
|
class: "canvas",
|
|
5628
|
-
width:
|
|
5629
|
-
height:
|
|
5630
|
-
style: normalizeStyle(
|
|
5633
|
+
width: oe(f.cWidth, x.value, 0),
|
|
5634
|
+
height: oe(f.cHeight, x.value, 0),
|
|
5635
|
+
style: normalizeStyle(G.value)
|
|
5631
5636
|
}, null, 12, _hoisted_3)
|
|
5632
5637
|
]),
|
|
5633
5638
|
annCanvas: withCtx(() => [
|
|
@@ -5636,9 +5641,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5636
5641
|
ref_key: "annArea",
|
|
5637
5642
|
ref: o,
|
|
5638
5643
|
class: "canvas",
|
|
5639
|
-
width:
|
|
5640
|
-
height:
|
|
5641
|
-
style: normalizeStyle(
|
|
5644
|
+
width: oe(f.cWidth, x.value, 0),
|
|
5645
|
+
height: oe(M.value, x.value, 0),
|
|
5646
|
+
style: normalizeStyle(j.value)
|
|
5642
5647
|
}, null, 12, _hoisted_4)
|
|
5643
5648
|
]),
|
|
5644
5649
|
_: 1
|
|
@@ -5648,9 +5653,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5648
5653
|
ref_key: "cursorArea",
|
|
5649
5654
|
ref: h,
|
|
5650
5655
|
class: "canvas",
|
|
5651
|
-
width:
|
|
5652
|
-
height:
|
|
5653
|
-
style: normalizeStyle(
|
|
5656
|
+
width: oe(f.cWidth + 5, x.value, 0),
|
|
5657
|
+
height: oe(f.cHeight, x.value, 0),
|
|
5658
|
+
style: normalizeStyle(Z.value)
|
|
5654
5659
|
}, null, 12, _hoisted_5),
|
|
5655
5660
|
createVNode(unref(l), {
|
|
5656
5661
|
ref_key: "annCanvas",
|
|
@@ -5667,26 +5672,26 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5667
5672
|
"pointer-mode": z.value,
|
|
5668
5673
|
"viewer-active-tool": unref(n),
|
|
5669
5674
|
"active-viewer": f.activeViewer,
|
|
5670
|
-
onAnnLayersInitialized:
|
|
5671
|
-
onAnnotationsReceived:
|
|
5672
|
-
onCloseAnnotationLayerWindow:
|
|
5673
|
-
onUpdateAnnotation:
|
|
5675
|
+
onAnnLayersInitialized: ve,
|
|
5676
|
+
onAnnotationsReceived: ce,
|
|
5677
|
+
onCloseAnnotationLayerWindow: se,
|
|
5678
|
+
onUpdateAnnotation: ue
|
|
5674
5679
|
}, null, 8, ["c-width", "c-height", "constants", "annotations-canvas", "pixel-ratio", "rs-period", "start", "duration", "ts-end", "pointer-mode", "viewer-active-tool", "active-viewer"]),
|
|
5675
5680
|
createElementVNode("canvas", {
|
|
5676
5681
|
id: "iArea",
|
|
5677
5682
|
ref_key: "iArea",
|
|
5678
5683
|
ref: R,
|
|
5679
5684
|
class: "canvas",
|
|
5680
|
-
width:
|
|
5681
|
-
height:
|
|
5682
|
-
style: normalizeStyle(
|
|
5685
|
+
width: oe(f.cWidth, x.value, 0),
|
|
5686
|
+
height: oe(f.cHeight, x.value, 0),
|
|
5687
|
+
style: normalizeStyle(G.value),
|
|
5683
5688
|
tabindex: "-1",
|
|
5684
|
-
onWheel:
|
|
5689
|
+
onWheel: fe,
|
|
5685
5690
|
onMousemove: Se,
|
|
5686
|
-
onMousedown:
|
|
5687
|
-
onMouseup:
|
|
5691
|
+
onMousedown: he,
|
|
5692
|
+
onMouseup: de,
|
|
5688
5693
|
onMouseout: ke,
|
|
5689
|
-
onMouseenter:
|
|
5694
|
+
onMouseenter: pe
|
|
5690
5695
|
}, null, 44, _hoisted_6)
|
|
5691
5696
|
])
|
|
5692
5697
|
]));
|