tsviewer 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,9 +3,9 @@ import { E as yn } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { u as Ha, h as bn, i as gn, c as kn, j as wn, k as za, d as ja, l as Sn, e as qa, m as Dn, o as Cn, E as Mn, g as rt, n as $n, p as Pn, q as Vn, r as _n, T as Tn, C as ca, s as On, t as Yn, f as In, a as Rn, b as xn } from "./el-input-DNjlHApm.mjs";
4
4
  import { a as Zt } from "./el-button-B2d_HO4x.mjs";
5
5
  import { defineComponent as $e, ref as X, createElementBlock as Q, openBlock as I, normalizeStyle as Gt, normalizeClass as $, unref as e, renderSlot as me, createElementVNode as j, mergeProps as Jt, useAttrs as ha, inject as Re, computed as K, watch as De, nextTick as Ie, onBeforeUnmount as Za, provide as Nt, createBlock as ce, withCtx as le, withModifiers as He, createCommentVNode as se, resolveDynamicComponent as Qe, toDisplayString as fe, onMounted as Ga, Fragment as we, renderList as Pe, createTextVNode as Ge, withDirectives as Ye, createVNode as Z, Transition as An, withKeys as ze, useSlots as ya, toRef as je, vShow as Ze, getCurrentInstance as Ja, reactive as Nn, defineAsyncComponent as Fn } from "vue";
6
- import { e as En, u as Ln, p as Pa } from "./index-BtnXpu3W.mjs";
6
+ import { g as En, u as Ln, p as Pa } from "./index-B7dOp-ew.mjs";
7
7
  import { storeToRefs as Bn } from "pinia";
8
- import { I as Un } from "./IconSelection-BGj1-2Pf.mjs";
8
+ import { I as Un } from "./IconSelection-DQZLRwZa.mjs";
9
9
  import { g as Xe } from "./_commonjsHelpers-DaMA6jEr.mjs";
10
10
  import { v as Va } from "./index-ClxLs_jS.mjs";
11
11
  var Ft = { exports: {} }, Kn = Ft.exports, _a;
@@ -4242,7 +4242,7 @@ const Tl = Wa(_l), Ol = { slot: "body" }, Yl = { class: "select-wrapper" }, Il =
4242
4242
  },
4243
4243
  emits: ["closeWindow", "createUpdateAnnotation"],
4244
4244
  setup(n, { emit: l }) {
4245
- const a = Fn(() => import("./BFButton-V2zgKAQA.mjs")), t = n, d = X(!1);
4245
+ const a = Fn(() => import("./BFButton-DpIwbJXR.mjs")), t = n, d = X(!1);
4246
4246
  De(() => t.visible, (_) => {
4247
4247
  if (d.value = _, !_) return;
4248
4248
  const M = u.value.start / 1e3, O = u.value.end / 1e3;
@@ -1,14 +1,14 @@
1
1
  import "./base-CIy5gWpu.mjs";
2
2
  import { E as F } from "./el-overlay-_Fd7WVZL.mjs";
3
- import { I as g } from "./IconSelection-BGj1-2Pf.mjs";
3
+ import { I as g } from "./IconSelection-DQZLRwZa.mjs";
4
4
  import { a as y, b as k } from "./el-input-DNjlHApm.mjs";
5
5
  import { E as S } from "./el-input-number-CAzspsnM.mjs";
6
6
  import { resolveComponent as P, createBlock as u, openBlock as o, withCtx as i, createElementVNode as s, createVNode as r, createElementBlock as a, toDisplayString as c, createTextVNode as d, createCommentVNode as p, Fragment as _, renderList as v } from "vue";
7
- import { e as N } from "./index-BtnXpu3W.mjs";
7
+ import { g as N } from "./index-B7dOp-ew.mjs";
8
8
  const H = {
9
9
  name: "TimeseriesFilterModal",
10
10
  components: {
11
- "bf-button": () => import("./BFButton-V2zgKAQA.mjs"),
11
+ "bf-button": () => import("./BFButton-DpIwbJXR.mjs"),
12
12
  IconSelection: g
13
13
  },
14
14
  mixins: [],
@@ -1,18 +1,16 @@
1
- import { ref as u, computed as N, watch as U, nextTick as E, onMounted as Ne, createElementBlock as Ie, openBlock as $e, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
2
- import { _ as ve, a as Y, b as Ue, c as ge, d as Ve, k as Oe, e as Le, u as Xe } from "./index-BtnXpu3W.mjs";
3
- import { u as de } from "./useToken-CJWB6KGF.mjs";
4
- import { _ as me, a as je, u as fe, b as he } from "./request_composable-DV-ftNZG.mjs";
5
- function Se(g, c, l) {
1
+ import { ref as v, computed as N, watch as U, nextTick as E, onMounted as Ne, createElementBlock as Ie, openBlock as $e, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
2
+ import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-B7dOp-ew.mjs";
3
+ function me(g, c, l) {
6
4
  return function() {
7
- for (var t = [], p = 0, v = g, k = 0; k < c.length || p < arguments.length; ) {
5
+ for (var t = [], p = 0, u = g, k = 0; k < c.length || p < arguments.length; ) {
8
6
  var W;
9
- k < c.length && (!ve(c[k]) || p >= arguments.length) ? W = c[k] : (W = arguments[p], p += 1), t[k] = W, ve(W) || (v -= 1), k += 1;
7
+ k < c.length && (!ve(c[k]) || p >= arguments.length) ? W = c[k] : (W = arguments[p], p += 1), t[k] = W, ve(W) || (u -= 1), k += 1;
10
8
  }
11
- return v <= 0 ? l.apply(this, t) : me(v, Se(g, t, l));
9
+ return u <= 0 ? l.apply(this, t) : Se(u, me(g, t, l));
12
10
  };
13
11
  }
14
12
  var ze = /* @__PURE__ */ Y(function(c, l) {
15
- return c === 1 ? Ue(l) : me(c, Se(c, [], l));
13
+ return c === 1 ? Ue(l) : Se(c, me(c, [], l));
16
14
  });
17
15
  function Be(g, c) {
18
16
  for (var l = 0, t = c.length, p = Array(t); l < t; )
@@ -36,9 +34,9 @@ var He = /* @__PURE__ */ function() {
36
34
  return c.call(this, l.apply(this, arguments));
37
35
  });
38
36
  case "[object Object]":
39
- return je(function(t, p) {
37
+ return Oe(function(t, p) {
40
38
  return t[p] = c(l[p]), t;
41
- }, {}, Oe(l));
39
+ }, {}, Le(l));
42
40
  default:
43
41
  return Be(c, l);
44
42
  }
@@ -58,12 +56,11 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
58
56
  duration: Number,
59
57
  cursorLoc: Number,
60
58
  labelWidth: Number,
61
- config: Object,
62
59
  activeViewer: Object
63
60
  },
64
61
  emits: ["setStart"],
65
62
  setup(g, { expose: c, emit: l }) {
66
- const t = g, p = l, v = Xe(), k = u(null), W = u(null), H = u(null), T = u(null), f = u(1), Z = u(28), C = u(30), V = u(!1), I = u(""), O = u("point"), ee = u(null), D = u([]), w = u([]), y = u([]), L = u(!1), te = u(0), ne = u(0), R = u(0), X = u(0), pe = N(() => oe(t.ts_start)), be = N(() => oe(t.ts_end)), _e = N(() => {
63
+ const t = g, p = l, u = je(), k = v(null), W = v(null), H = v(null), T = v(null), f = v(1), Z = v(28), C = v(30), V = v(!1), I = v(""), O = v("point"), ee = v(null), D = v([]), w = v([]), y = v([]), L = v(!1), te = v(0), ne = v(0), R = v(0), X = v(0), pe = N(() => oe(t.ts_start)), be = N(() => oe(t.ts_end)), _e = N(() => {
67
64
  if (I.value !== "")
68
65
  return I.value;
69
66
  if (t.start > 0) {
@@ -89,12 +86,12 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
89
86
  n && n !== e && (console.log("TSScrubber: ActiveViewer changed, resetting component state"), L.value = !0, se(), (a = n.content) != null && a.id ? E(() => {
90
87
  B(), L.value = !1;
91
88
  }) : L.value = !1);
92
- }, { deep: !0 }), U(() => v.viewerChannels, (n, e) => {
89
+ }, { deep: !0 }), U(() => u.viewerChannels, (n, e) => {
93
90
  var a, s;
94
91
  n && n.length > 0 && !L.value && (!e || n.length !== e.length || ((a = n[0]) == null ? void 0 : a.id) !== ((s = e[0]) == null ? void 0 : s.id)) && (console.log("TSScrubber: Viewer channels changed, re-initializing segments"), z(), E(() => {
95
92
  ie();
96
93
  }));
97
- }, { deep: !0 }), U(() => v.viewerAnnotations, (n, e) => {
94
+ }, { deep: !0 }), U(() => u.viewerAnnotations, (n, e) => {
98
95
  var a, s;
99
96
  n && n !== e && !L.value ? (console.log("TSScrubber: Viewer annotations changed independently, re-fetching annotations"), E(() => {
100
97
  B();
@@ -130,8 +127,8 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
130
127
  } else {
131
128
  const e = T.value.getBoundingClientRect(), a = n.clientX - e.left, s = R.value + X.value, r = O.value;
132
129
  a > R.value - 10 && a < s + 10 ? (O.value = "drag", T.value.setAttribute("dragme", !0), T.value.removeAttribute("resizeme")) : (O.value = "point", T.value.removeAttribute("dragme"), T.value.removeAttribute("resizeme"));
133
- const o = a / t.cWidth * (t.ts_end - t.ts_start) + t.ts_start, m = new Date(o / 1e3).toUTCString();
134
- I.value = m.substring(0, m.length - 3), r !== O.value && A();
130
+ const o = a / t.cWidth * (t.ts_end - t.ts_start) + t.ts_start, S = new Date(o / 1e3).toUTCString();
131
+ I.value = S.substring(0, S.length - 3), r !== O.value && A();
135
132
  }
136
133
  }, ke = () => {
137
134
  V.value = !1;
@@ -147,7 +144,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
147
144
  I.value = "";
148
145
  }, ie = () => {
149
146
  var a;
150
- if (!v.viewerChannels || v.viewerChannels.length === 0) {
147
+ if (!u.viewerChannels || u.viewerChannels.length === 0) {
151
148
  console.warn("TSScrubber: Cannot init segment spans - no viewer channels available");
152
149
  return;
153
150
  }
@@ -155,18 +152,18 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
155
152
  console.warn("TSScrubber: Cannot init segment spans - invalid time range");
156
153
  return;
157
154
  }
158
- if (!((a = t.config) != null && a.timeSeriesApi)) {
155
+ if (!((a = u.config) != null && a.timeSeriesApi)) {
159
156
  console.warn("TSScrubber: Cannot init segment spans - no timeSeriesApi configured");
160
157
  return;
161
158
  }
162
- console.log(`TSScrubber: Initializing segment spans for ${v.viewerChannels.length} channels`), z();
163
- const n = Math.min(t.constants.SEGMENTSPAN, t.ts_end - t.ts_start), e = v.viewerChannels;
159
+ console.log(`TSScrubber: Initializing segment spans for ${u.viewerChannels.length} channels`), z();
160
+ const n = Math.min(t.constants.SEGMENTSPAN, t.ts_end - t.ts_start), e = u.viewerChannels;
164
161
  for (let s = 0; s < e.length; s++)
165
162
  le(e[s].id, s, t.ts_start, t.ts_start + n, 0);
166
163
  }, le = async (n, e, a, s, r) => {
167
164
  var o;
168
165
  const i = t.constants.MAXRECURSION;
169
- if (!((o = t.config) != null && o.timeSeriesApi)) {
166
+ if (!((o = u.config) != null && o.timeSeriesApi)) {
170
167
  console.warn("TSScrubber: Cannot request segment span - no timeSeriesApi configured");
171
168
  return;
172
169
  }
@@ -175,10 +172,10 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
175
172
  return;
176
173
  }
177
174
  try {
178
- const m = await de(), _ = `${t.config.timeSeriesApi}/ts/retrieve/segments?session=${m}&channel=${n}&start=${a}&end=${s}`;
175
+ const S = await de(), _ = `${u.config.timeSeriesApi}/ts/retrieve/segments?session=${S}&channel=${n}&start=${a}&end=${s}`;
179
176
  console.log(`TSScrubber: Fetching segments for channel ${n} (${e})`);
180
177
  const b = await fe(_);
181
- if (!v.viewerChannels[e] || v.viewerChannels[e].id !== n) {
178
+ if (!u.viewerChannels[e] || u.viewerChannels[e].id !== n) {
182
179
  console.warn("TSScrubber: Channel mismatch detected, ignoring segment response (likely package switched)");
183
180
  return;
184
181
  }
@@ -188,25 +185,25 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
188
185
  const J = Math.floor((b[M][0] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3), De = Math.ceil((b[M][1] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3);
189
186
  y.value.fill(1, J, De);
190
187
  }
191
- let S = 0, j = !1, G = 0;
192
- for (w.value = []; S < y.value.length - 1; ) {
193
- if (!y.value[S] && !j) {
194
- S++;
188
+ let m = 0, j = !1, G = 0;
189
+ for (w.value = []; m < y.value.length - 1; ) {
190
+ if (!y.value[m] && !j) {
191
+ m++;
195
192
  continue;
196
- } else y.value[S] ? j || (G = S, j = !0) : (w.value = w.value.concat([G, S]), j = !1);
197
- S++;
193
+ } else y.value[m] ? j || (G = m, j = !0) : (w.value = w.value.concat([G, m]), j = !1);
194
+ m++;
198
195
  }
199
- j && (w.value = w.value.concat([G, S])), w.value = w.value.concat([5e3]);
200
- let Ee = h[0], P = v.viewerChannels[e];
196
+ j && (w.value = w.value.concat([G, m])), w.value = w.value.concat([5e3]);
197
+ let Ee = h[0], P = u.viewerChannels[e];
201
198
  if (!P || P.id !== n) {
202
199
  console.warn("TSScrubber: Channel configuration mismatch, skipping update");
203
200
  return;
204
201
  }
205
- Ee < P.dataSegments[P.dataSegments.length - 1] && (h.shift(), h.shift()), P.dataSegments = P.dataSegments.concat(h.sort((M, J) => M - J)), v.updateChannelProperty(P.id, "dataSegments", P.dataSegments);
202
+ Ee < P.dataSegments[P.dataSegments.length - 1] && (h.shift(), h.shift()), P.dataSegments = P.dataSegments.concat(h.sort((M, J) => M - J)), u.updateChannelProperty(P.id, "dataSegments", P.dataSegments);
206
203
  let ue = s - a;
207
204
  a + ue < t.ts_end && r < i ? le(n, e, s, s + ue, r + 1) : F();
208
- } catch (m) {
209
- console.error(`TSScrubber: Error fetching segments for channel ${n}:`, m), he(m);
205
+ } catch (S) {
206
+ console.error(`TSScrubber: Error fetching segments for channel ${n}:`, S), he(S);
210
207
  }
211
208
  }, B = async () => {
212
209
  var e, a, s, r, i;
@@ -215,19 +212,19 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
215
212
  console.warn("TSScrubber: Cannot get annotations - no active viewer ID"), D.value = [];
216
213
  return;
217
214
  }
218
- if (!((s = t.config) != null && s.apiUrl)) {
215
+ if (!((s = u.config) != null && s.apiUrl)) {
219
216
  console.warn("TSScrubber: Cannot get annotations - no API URL configured"), D.value = [];
220
217
  return;
221
218
  }
222
- if (!v.viewerAnnotations || v.viewerAnnotations.length === 0) {
219
+ if (!u.viewerAnnotations || u.viewerAnnotations.length === 0) {
223
220
  console.log("TSScrubber: No annotation layers available, skipping annotation fetch"), D.value = [], A();
224
221
  return;
225
222
  }
226
223
  try {
227
- const o = await de(), m = Fe((S) => S.id, v.viewerAnnotations), _ = t.ts_end;
228
- let h = `${t.config.apiUrl}/timeseries/${n}/annotations/window` + `?api_key=${o}&aggregation=count&start=${t.ts_start}&end=${t.ts_end}&period=${Ce.value}&mergePeriods=true`;
229
- for (let S in m)
230
- h = h + `&layerIds=${m[S]}`;
224
+ const o = await de(), S = Fe((m) => m.id, u.viewerAnnotations), _ = t.ts_end;
225
+ let h = `${u.config.apiUrl}/timeseries/${n}/annotations/window` + `?api_key=${o}&aggregation=count&start=${t.ts_start}&end=${t.ts_end}&period=${Ce.value}&mergePeriods=true`;
226
+ for (let m in S)
227
+ h = h + `&layerIds=${S[m]}`;
231
228
  console.log(`TSScrubber: Fetching annotations for viewer ${n}`);
232
229
  const d = await fe(h);
233
230
  ((i = (r = t.activeViewer) == null ? void 0 : r.content) == null ? void 0 : i.id) === n ? (D.value = d, A()) : console.log("TSScrubber: Ignoring annotation response - viewer changed during fetch");
@@ -284,7 +281,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
284
281
  e.setTransform(f.value, 0, 0, f.value, 0, 0), e.clearRect(0, 0, t.cWidth, Z.value);
285
282
  const a = t.ts_start, s = t.ts_end, r = D.value;
286
283
  let i = 0;
287
- const o = 0, m = Math.floor((Z.value - 2) / Object.keys(r).length - o), _ = v.viewerAnnotations;
284
+ const o = 0, S = Math.floor((Z.value - 2) / Object.keys(r).length - o), _ = u.viewerAnnotations;
288
285
  let b = "rgb(0,0,0)";
289
286
  for (const h in r)
290
287
  if (r.hasOwnProperty(h)) {
@@ -293,18 +290,18 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
293
290
  i = d, b = _[d].color;
294
291
  break;
295
292
  }
296
- Pe(e, a, s, o, m, r[h], i, b);
293
+ Pe(e, a, s, o, S, r[h], i, b);
297
294
  }
298
- }, Pe = (n, e, a, s, r, i, o, m) => {
295
+ }, Pe = (n, e, a, s, r, i, o, S) => {
299
296
  E(() => {
300
- n.setTransform(f.value, 0, 0, f.value, 0, 0), n.fillStyle = m;
297
+ n.setTransform(f.value, 0, 0, f.value, 0, 0), n.fillStyle = S;
301
298
  for (let _ = 0; _ < i.length; _++)
302
299
  if (i[_].value > 0) {
303
300
  const b = (i[_].start - e) / (a - e) * t.cWidth;
304
301
  let d = (i[_].end - e) / (a - e) * t.cWidth - b;
305
302
  d < 1 && (d = 1);
306
- const S = 1 + o * (r - 1 + s) + o;
307
- n.fillRect(b, S, d, r);
303
+ const m = 1 + o * (r - 1 + s) + o;
304
+ n.fillRect(b, m, d, r);
308
305
  }
309
306
  });
310
307
  }, Me = () => {
@@ -374,7 +371,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
374
371
  ])
375
372
  ]));
376
373
  }
377
- }, ot = /* @__PURE__ */ Le(tt, [["__scopeId", "data-v-4f7f1867"]]);
374
+ }, st = /* @__PURE__ */ Xe(tt, [["__scopeId", "data-v-881659ce"]]);
378
375
  export {
379
- ot as default
376
+ st as default
380
377
  };