tsviewer 1.0.29 → 1.0.31

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.
@@ -1,12 +1,12 @@
1
- import { ref as g, computed as B, defineAsyncComponent as Z, watch as Te, nextTick as ne, onMounted as Ut, onBeforeUnmount as jt, createElementBlock as Ie, openBlock as de, normalizeClass as Se, createVNode as re, createElementVNode as ce, createBlock as Rt, createCommentVNode as Mt, unref as J, Fragment as Vt, renderList as $t, toDisplayString as je } from "vue";
2
- import { defineStore as Ft, storeToRefs as He } from "pinia";
1
+ import { ref as y, computed as z, defineAsyncComponent as Z, watch as Te, nextTick as ne, onMounted as Rt, onBeforeUnmount as jt, createElementBlock as Ie, openBlock as de, normalizeClass as _e, createVNode as re, createElementVNode as ue, createBlock as Mt, createCommentVNode as Vt, unref as J, Fragment as Wt, renderList as $t, toDisplayString as je } from "vue";
2
+ import { defineStore as Ft, storeToRefs as Ze } from "pinia";
3
3
  import { fetchAuthSession as xt } from "aws-amplify/auth";
4
- function T(t) {
4
+ function S(t) {
5
5
  return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
6
6
  }
7
- function L(t) {
7
+ function k(t) {
8
8
  return function e(n) {
9
- return arguments.length === 0 || T(n) ? e : t.apply(this, arguments);
9
+ return arguments.length === 0 || S(n) ? e : t.apply(this, arguments);
10
10
  };
11
11
  }
12
12
  function N(t) {
@@ -15,19 +15,19 @@ function N(t) {
15
15
  case 0:
16
16
  return e;
17
17
  case 1:
18
- return T(n) ? e : L(function(i) {
18
+ return S(n) ? e : k(function(i) {
19
19
  return t(n, i);
20
20
  });
21
21
  default:
22
- return T(n) && T(o) ? e : T(n) ? L(function(i) {
22
+ return S(n) && S(o) ? e : S(n) ? k(function(i) {
23
23
  return t(i, o);
24
- }) : T(o) ? L(function(i) {
24
+ }) : S(o) ? k(function(i) {
25
25
  return t(n, i);
26
26
  }) : t(n, o);
27
27
  }
28
28
  };
29
29
  }
30
- function Wt(t, e) {
30
+ function qt(t, e) {
31
31
  t = t || [], e = e || [];
32
32
  var n, o = t.length, i = e.length, u = [];
33
33
  for (n = 0; n < o; )
@@ -36,7 +36,7 @@ function Wt(t, e) {
36
36
  u[u.length] = e[n], n += 1;
37
37
  return u;
38
38
  }
39
- function Ce(t, e) {
39
+ function Ee(t, e) {
40
40
  switch (t) {
41
41
  case 0:
42
42
  return function() {
@@ -59,27 +59,27 @@ function Ce(t, e) {
59
59
  return e.apply(this, arguments);
60
60
  };
61
61
  case 5:
62
- return function(n, o, i, u, h) {
62
+ return function(n, o, i, u, g) {
63
63
  return e.apply(this, arguments);
64
64
  };
65
65
  case 6:
66
- return function(n, o, i, u, h, w) {
66
+ return function(n, o, i, u, g, A) {
67
67
  return e.apply(this, arguments);
68
68
  };
69
69
  case 7:
70
- return function(n, o, i, u, h, w, l) {
70
+ return function(n, o, i, u, g, A, l) {
71
71
  return e.apply(this, arguments);
72
72
  };
73
73
  case 8:
74
- return function(n, o, i, u, h, w, l, s) {
74
+ return function(n, o, i, u, g, A, l, s) {
75
75
  return e.apply(this, arguments);
76
76
  };
77
77
  case 9:
78
- return function(n, o, i, u, h, w, l, s, A) {
78
+ return function(n, o, i, u, g, A, l, s, m) {
79
79
  return e.apply(this, arguments);
80
80
  };
81
81
  case 10:
82
- return function(n, o, i, u, h, w, l, s, A, m) {
82
+ return function(n, o, i, u, g, A, l, s, m, h) {
83
83
  return e.apply(this, arguments);
84
84
  };
85
85
  default:
@@ -92,29 +92,29 @@ function ge(t) {
92
92
  case 0:
93
93
  return e;
94
94
  case 1:
95
- return T(n) ? e : N(function(u, h) {
96
- return t(n, u, h);
95
+ return S(n) ? e : N(function(u, g) {
96
+ return t(n, u, g);
97
97
  });
98
98
  case 2:
99
- return T(n) && T(o) ? e : T(n) ? N(function(u, h) {
100
- return t(u, o, h);
101
- }) : T(o) ? N(function(u, h) {
102
- return t(n, u, h);
103
- }) : L(function(u) {
99
+ return S(n) && S(o) ? e : S(n) ? N(function(u, g) {
100
+ return t(u, o, g);
101
+ }) : S(o) ? N(function(u, g) {
102
+ return t(n, u, g);
103
+ }) : k(function(u) {
104
104
  return t(n, o, u);
105
105
  });
106
106
  default:
107
- return T(n) && T(o) && T(i) ? e : T(n) && T(o) ? N(function(u, h) {
108
- return t(u, h, i);
109
- }) : T(n) && T(i) ? N(function(u, h) {
110
- return t(u, o, h);
111
- }) : T(o) && T(i) ? N(function(u, h) {
112
- return t(n, u, h);
113
- }) : T(n) ? L(function(u) {
107
+ return S(n) && S(o) && S(i) ? e : S(n) && S(o) ? N(function(u, g) {
108
+ return t(u, g, i);
109
+ }) : S(n) && S(i) ? N(function(u, g) {
110
+ return t(u, o, g);
111
+ }) : S(o) && S(i) ? N(function(u, g) {
112
+ return t(n, u, g);
113
+ }) : S(n) ? k(function(u) {
114
114
  return t(u, o, i);
115
- }) : T(o) ? L(function(u) {
115
+ }) : S(o) ? k(function(u) {
116
116
  return t(n, u, i);
117
- }) : T(i) ? L(function(u) {
117
+ }) : S(i) ? k(function(u) {
118
118
  return t(n, o, u);
119
119
  }) : t(n, o, i);
120
120
  }
@@ -123,10 +123,10 @@ function ge(t) {
123
123
  const ye = Array.isArray || function(e) {
124
124
  return e != null && e.length >= 0 && Object.prototype.toString.call(e) === "[object Array]";
125
125
  };
126
- function qt(t) {
126
+ function Bt(t) {
127
127
  return t != null && typeof t["@@transducer/step"] == "function";
128
128
  }
129
- function Bt(t, e, n) {
129
+ function zt(t, e, n) {
130
130
  return function() {
131
131
  if (arguments.length === 0)
132
132
  return n();
@@ -137,7 +137,7 @@ function Bt(t, e, n) {
137
137
  return o[t[i]].apply(o, Array.prototype.slice.call(arguments, 0, -1));
138
138
  i += 1;
139
139
  }
140
- if (qt(o)) {
140
+ if (Bt(o)) {
141
141
  var u = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
142
142
  return u(o);
143
143
  }
@@ -145,13 +145,13 @@ function Bt(t, e, n) {
145
145
  return n.apply(this, arguments);
146
146
  };
147
147
  }
148
- function zt(t) {
148
+ function Xt(t) {
149
149
  return t && t["@@transducer/reduced"] ? t : {
150
150
  "@@transducer/value": t,
151
151
  "@@transducer/reduced": !0
152
152
  };
153
153
  }
154
- const Xt = {
154
+ const Gt = {
155
155
  init: function() {
156
156
  return this.xf["@@transducer/init"]();
157
157
  },
@@ -162,9 +162,9 @@ const Xt = {
162
162
  function me(t) {
163
163
  return Object.prototype.toString.call(t) === "[object String]";
164
164
  }
165
- var Gt = /* @__PURE__ */ L(function(e) {
165
+ var Ht = /* @__PURE__ */ k(function(e) {
166
166
  return ye(e) ? !0 : !e || typeof e != "object" || me(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
167
- }), Ht = /* @__PURE__ */ function() {
167
+ }), Zt = /* @__PURE__ */ function() {
168
168
  function t(e) {
169
169
  this.f = e;
170
170
  }
@@ -176,15 +176,15 @@ var Gt = /* @__PURE__ */ L(function(e) {
176
176
  return this.f(e, n);
177
177
  }, t;
178
178
  }();
179
- function Zt(t) {
180
- return new Ht(t);
179
+ function Jt(t) {
180
+ return new Zt(t);
181
181
  }
182
- var Jt = /* @__PURE__ */ N(function(e, n) {
183
- return Ce(e.length, function() {
182
+ var Yt = /* @__PURE__ */ N(function(e, n) {
183
+ return Ee(e.length, function() {
184
184
  return e.apply(n, arguments);
185
185
  });
186
186
  });
187
- function Yt(t, e, n) {
187
+ function Kt(t, e, n) {
188
188
  for (var o = 0, i = n.length; o < i; ) {
189
189
  if (e = t["@@transducer/step"](e, n[o]), e && e["@@transducer/reduced"]) {
190
190
  e = e["@@transducer/value"];
@@ -194,7 +194,7 @@ function Yt(t, e, n) {
194
194
  }
195
195
  return t["@@transducer/result"](e);
196
196
  }
197
- function Re(t, e, n) {
197
+ function Me(t, e, n) {
198
198
  for (var o = n.next(); !o.done; ) {
199
199
  if (e = t["@@transducer/step"](e, o.value), e && e["@@transducer/reduced"]) {
200
200
  e = e["@@transducer/value"];
@@ -204,74 +204,74 @@ function Re(t, e, n) {
204
204
  }
205
205
  return t["@@transducer/result"](e);
206
206
  }
207
- function Me(t, e, n, o) {
208
- return t["@@transducer/result"](n[o](Jt(t["@@transducer/step"], t), e));
207
+ function Ve(t, e, n, o) {
208
+ return t["@@transducer/result"](n[o](Yt(t["@@transducer/step"], t), e));
209
209
  }
210
- var Ve = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
211
- function Kt(t, e, n) {
212
- if (typeof t == "function" && (t = Zt(t)), Gt(n))
213
- return Yt(t, e, n);
210
+ var We = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
211
+ function Qt(t, e, n) {
212
+ if (typeof t == "function" && (t = Jt(t)), Ht(n))
213
+ return Kt(t, e, n);
214
214
  if (typeof n["fantasy-land/reduce"] == "function")
215
- return Me(t, e, n, "fantasy-land/reduce");
216
- if (n[Ve] != null)
217
- return Re(t, e, n[Ve]());
215
+ return Ve(t, e, n, "fantasy-land/reduce");
216
+ if (n[We] != null)
217
+ return Me(t, e, n[We]());
218
218
  if (typeof n.next == "function")
219
- return Re(t, e, n);
219
+ return Me(t, e, n);
220
220
  if (typeof n.reduce == "function")
221
- return Me(t, e, n, "reduce");
221
+ return Ve(t, e, n, "reduce");
222
222
  throw new TypeError("reduce: list must be array or iterable");
223
223
  }
224
224
  function ve(t, e) {
225
225
  return Object.prototype.hasOwnProperty.call(e, t);
226
226
  }
227
- var $e = Object.prototype.toString, Ze = /* @__PURE__ */ function() {
227
+ var $e = Object.prototype.toString, Je = /* @__PURE__ */ function() {
228
228
  return $e.call(arguments) === "[object Arguments]" ? function(e) {
229
229
  return $e.call(e) === "[object Arguments]";
230
230
  } : function(e) {
231
231
  return ve("callee", e);
232
232
  };
233
- }(), Qt = !/* @__PURE__ */ {
233
+ }(), en = !/* @__PURE__ */ {
234
234
  toString: null
235
235
  }.propertyIsEnumerable("toString"), Fe = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], xe = /* @__PURE__ */ function() {
236
236
  return arguments.propertyIsEnumerable("length");
237
- }(), en = function(e, n) {
237
+ }(), tn = function(e, n) {
238
238
  for (var o = 0; o < e.length; ) {
239
239
  if (e[o] === n)
240
240
  return !0;
241
241
  o += 1;
242
242
  }
243
243
  return !1;
244
- }, We = /* @__PURE__ */ L(typeof Object.keys == "function" && !xe ? function(e) {
244
+ }, qe = /* @__PURE__ */ k(typeof Object.keys == "function" && !xe ? function(e) {
245
245
  return Object(e) !== e ? [] : Object.keys(e);
246
246
  } : function(e) {
247
247
  if (Object(e) !== e)
248
248
  return [];
249
- var n, o, i = [], u = xe && Ze(e);
249
+ var n, o, i = [], u = xe && Je(e);
250
250
  for (n in e)
251
251
  ve(n, e) && (!u || n !== "length") && (i[i.length] = n);
252
- if (Qt)
252
+ if (en)
253
253
  for (o = Fe.length - 1; o >= 0; )
254
- n = Fe[o], ve(n, e) && !en(i, n) && (i[i.length] = n), o -= 1;
254
+ n = Fe[o], ve(n, e) && !tn(i, n) && (i[i.length] = n), o -= 1;
255
255
  return i;
256
256
  });
257
- const tn = Number.isInteger || function(e) {
257
+ const nn = Number.isInteger || function(e) {
258
258
  return e << 0 === e;
259
259
  };
260
- var nn = /* @__PURE__ */ N(function(e, n) {
260
+ var rn = /* @__PURE__ */ N(function(e, n) {
261
261
  var o = e < 0 ? n.length + e : e;
262
262
  return me(n) ? n.charAt(o) : n[o];
263
263
  }), Y = /* @__PURE__ */ N(function(e, n) {
264
264
  if (n != null)
265
- return tn(e) ? nn(e, n) : n[e];
266
- }), rn = /* @__PURE__ */ ge(Kt), qe = /* @__PURE__ */ L(function(e) {
265
+ return nn(e) ? rn(e, n) : n[e];
266
+ }), on = /* @__PURE__ */ ge(Qt), Be = /* @__PURE__ */ k(function(e) {
267
267
  return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
268
268
  });
269
- function on(t, e) {
269
+ function an(t, e) {
270
270
  return function() {
271
271
  return e.call(this, t.apply(this, arguments));
272
272
  };
273
273
  }
274
- function Je(t, e) {
274
+ function Ye(t, e) {
275
275
  return function() {
276
276
  var n = arguments.length;
277
277
  if (n === 0)
@@ -280,35 +280,35 @@ function Je(t, e) {
280
280
  return ye(o) || typeof o[t] != "function" ? e.apply(this, arguments) : o[t].apply(o, Array.prototype.slice.call(arguments, 0, n - 1));
281
281
  };
282
282
  }
283
- var an = /* @__PURE__ */ ge(
284
- /* @__PURE__ */ Je("slice", function(e, n, o) {
283
+ var sn = /* @__PURE__ */ ge(
284
+ /* @__PURE__ */ Ye("slice", function(e, n, o) {
285
285
  return Array.prototype.slice.call(o, e, n);
286
286
  })
287
- ), sn = /* @__PURE__ */ L(
288
- /* @__PURE__ */ Je(
287
+ ), ln = /* @__PURE__ */ k(
288
+ /* @__PURE__ */ Ye(
289
289
  "tail",
290
- /* @__PURE__ */ an(1, 1 / 0)
290
+ /* @__PURE__ */ sn(1, 1 / 0)
291
291
  )
292
292
  );
293
- function ln() {
293
+ function un() {
294
294
  if (arguments.length === 0)
295
295
  throw new Error("pipe requires at least one argument");
296
- return Ce(arguments[0].length, rn(on, arguments[0], sn(arguments)));
296
+ return Ee(arguments[0].length, on(an, arguments[0], ln(arguments)));
297
297
  }
298
- var un = /* @__PURE__ */ L(function(e) {
298
+ var cn = /* @__PURE__ */ k(function(e) {
299
299
  return me(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
300
300
  });
301
- function Be() {
301
+ function ze() {
302
302
  if (arguments.length === 0)
303
303
  throw new Error("compose requires at least one argument");
304
- return ln.apply(this, un(arguments));
304
+ return un.apply(this, cn(arguments));
305
305
  }
306
- function ze(t) {
306
+ function Xe(t) {
307
307
  for (var e = [], n; !(n = t.next()).done; )
308
308
  e.push(n.value);
309
309
  return e;
310
310
  }
311
- function Xe(t, e, n) {
311
+ function Ge(t, e, n) {
312
312
  for (var o = 0, i = n.length; o < i; ) {
313
313
  if (t(e, n[o]))
314
314
  return !0;
@@ -316,28 +316,28 @@ function Xe(t, e, n) {
316
316
  }
317
317
  return !1;
318
318
  }
319
- function cn(t) {
319
+ function dn(t) {
320
320
  var e = String(t).match(/^function (\w*)/);
321
321
  return e == null ? "" : e[1];
322
322
  }
323
- function dn(t, e) {
323
+ function fn(t, e) {
324
324
  return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
325
325
  }
326
- const _e = typeof Object.is == "function" ? Object.is : dn;
327
- function Ge(t, e, n, o) {
328
- var i = ze(t), u = ze(e);
329
- function h(w, l) {
330
- return Ee(w, l, n.slice(), o.slice());
326
+ const be = typeof Object.is == "function" ? Object.is : fn;
327
+ function He(t, e, n, o) {
328
+ var i = Xe(t), u = Xe(e);
329
+ function g(A, l) {
330
+ return Oe(A, l, n.slice(), o.slice());
331
331
  }
332
- return !Xe(function(w, l) {
333
- return !Xe(h, l, w);
332
+ return !Ge(function(A, l) {
333
+ return !Ge(g, l, A);
334
334
  }, u, i);
335
335
  }
336
- function Ee(t, e, n, o) {
337
- if (_e(t, e))
336
+ function Oe(t, e, n, o) {
337
+ if (be(t, e))
338
338
  return !0;
339
- var i = qe(t);
340
- if (i !== qe(e))
339
+ var i = Be(t);
340
+ if (i !== Be(e))
341
341
  return !1;
342
342
  if (typeof t["fantasy-land/equals"] == "function" || typeof e["fantasy-land/equals"] == "function")
343
343
  return typeof t["fantasy-land/equals"] == "function" && t["fantasy-land/equals"](e) && typeof e["fantasy-land/equals"] == "function" && e["fantasy-land/equals"](t);
@@ -347,17 +347,17 @@ function Ee(t, e, n, o) {
347
347
  case "Arguments":
348
348
  case "Array":
349
349
  case "Object":
350
- if (typeof t.constructor == "function" && cn(t.constructor) === "Promise")
350
+ if (typeof t.constructor == "function" && dn(t.constructor) === "Promise")
351
351
  return t === e;
352
352
  break;
353
353
  case "Boolean":
354
354
  case "Number":
355
355
  case "String":
356
- if (!(typeof t == typeof e && _e(t.valueOf(), e.valueOf())))
356
+ if (!(typeof t == typeof e && be(t.valueOf(), e.valueOf())))
357
357
  return !1;
358
358
  break;
359
359
  case "Date":
360
- if (!_e(t.valueOf(), e.valueOf()))
360
+ if (!be(t.valueOf(), e.valueOf()))
361
361
  return !1;
362
362
  break;
363
363
  case "Error":
@@ -374,9 +374,9 @@ function Ee(t, e, n, o) {
374
374
  }
375
375
  switch (i) {
376
376
  case "Map":
377
- return t.size !== e.size ? !1 : Ge(t.entries(), e.entries(), n.concat([t]), o.concat([e]));
377
+ return t.size !== e.size ? !1 : He(t.entries(), e.entries(), n.concat([t]), o.concat([e]));
378
378
  case "Set":
379
- return t.size !== e.size ? !1 : Ge(t.values(), e.values(), n.concat([t]), o.concat([e]));
379
+ return t.size !== e.size ? !1 : He(t.values(), e.values(), n.concat([t]), o.concat([e]));
380
380
  case "Arguments":
381
381
  case "Array":
382
382
  case "Object":
@@ -400,48 +400,48 @@ function Ee(t, e, n, o) {
400
400
  default:
401
401
  return !1;
402
402
  }
403
- var h = We(t);
404
- if (h.length !== We(e).length)
403
+ var g = qe(t);
404
+ if (g.length !== qe(e).length)
405
405
  return !1;
406
- var w = n.concat([t]), l = o.concat([e]);
407
- for (u = h.length - 1; u >= 0; ) {
408
- var s = h[u];
409
- if (!(ve(s, e) && Ee(e[s], t[s], w, l)))
406
+ var A = n.concat([t]), l = o.concat([e]);
407
+ for (u = g.length - 1; u >= 0; ) {
408
+ var s = g[u];
409
+ if (!(ve(s, e) && Oe(e[s], t[s], A, l)))
410
410
  return !1;
411
411
  u -= 1;
412
412
  }
413
413
  return !0;
414
414
  }
415
- var Ye = /* @__PURE__ */ N(function(e, n) {
416
- return Ee(e, n, [], []);
415
+ var Ke = /* @__PURE__ */ N(function(e, n) {
416
+ return Oe(e, n, [], []);
417
417
  });
418
- function fn(t) {
418
+ function vn(t) {
419
419
  return Object.prototype.toString.call(t) === "[object Object]";
420
420
  }
421
421
  var pe = /* @__PURE__ */ N(function(e, n) {
422
422
  return n == null || n !== n ? e : n;
423
423
  });
424
- function vn(t) {
424
+ function pn(t) {
425
425
  var e = Object.prototype.toString.call(t);
426
426
  return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
427
427
  }
428
- var pn = /* @__PURE__ */ L(function(e) {
429
- return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : ye(e) ? [] : me(e) ? "" : fn(e) ? {} : Ze(e) ? /* @__PURE__ */ function() {
428
+ var hn = /* @__PURE__ */ k(function(e) {
429
+ return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : ye(e) ? [] : me(e) ? "" : vn(e) ? {} : Je(e) ? /* @__PURE__ */ function() {
430
430
  return arguments;
431
- }() : vn(e) ? e.constructor.from("") : void 0;
432
- }), hn = /* @__PURE__ */ function() {
431
+ }() : pn(e) ? e.constructor.from("") : void 0;
432
+ }), gn = /* @__PURE__ */ function() {
433
433
  function t(e, n) {
434
434
  this.xf = n, this.f = e, this.idx = -1, this.found = !1;
435
435
  }
436
- return t.prototype["@@transducer/init"] = Xt.init, t.prototype["@@transducer/result"] = function(e) {
436
+ return t.prototype["@@transducer/init"] = Gt.init, t.prototype["@@transducer/result"] = function(e) {
437
437
  return this.found || (e = this.xf["@@transducer/step"](e, -1)), this.xf["@@transducer/result"](e);
438
438
  }, t.prototype["@@transducer/step"] = function(e, n) {
439
- return this.idx += 1, this.f(n) && (this.found = !0, e = zt(this.xf["@@transducer/step"](e, this.idx))), e;
439
+ return this.idx += 1, this.f(n) && (this.found = !0, e = Xt(this.xf["@@transducer/step"](e, this.idx))), e;
440
440
  }, t;
441
- }(), gn = /* @__PURE__ */ N(function(e, n) {
442
- return new hn(e, n);
443
- }), F = /* @__PURE__ */ N(
444
- /* @__PURE__ */ Bt([], gn, function(e, n) {
441
+ }(), yn = /* @__PURE__ */ N(function(e, n) {
442
+ return new gn(e, n);
443
+ }), $ = /* @__PURE__ */ N(
444
+ /* @__PURE__ */ zt([], yn, function(e, n) {
445
445
  for (var o = 0, i = n.length; o < i; ) {
446
446
  if (e(n[o]))
447
447
  return o;
@@ -449,33 +449,35 @@ var pn = /* @__PURE__ */ L(function(e) {
449
449
  }
450
450
  return -1;
451
451
  })
452
- ), yn = /* @__PURE__ */ L(function(e) {
453
- return e != null && Ye(e, pn(e));
454
- }), x = /* @__PURE__ */ ge(function(e, n, o) {
455
- return Ye(n, Y(e, o));
452
+ ), mn = /* @__PURE__ */ k(function(e) {
453
+ return e != null && Ke(e, hn(e));
454
+ }), F = /* @__PURE__ */ ge(function(e, n, o) {
455
+ return Ke(n, Y(e, o));
456
456
  }), he = /* @__PURE__ */ ge(function(e, n, o) {
457
457
  return pe(e, Y(n, o));
458
- }), mn = /* @__PURE__ */ N(function(e, n) {
459
- return Ce(e.length, function() {
458
+ }), wn = /* @__PURE__ */ N(function(e, n) {
459
+ return Ee(e.length, function() {
460
460
  try {
461
461
  return e.apply(this, arguments);
462
462
  } catch (o) {
463
- return n.apply(this, Wt([o], arguments));
463
+ return n.apply(this, qt([o], arguments));
464
464
  }
465
465
  });
466
466
  });
467
- const Ke = "https://api.pennsieve.net", Qe = "https://api2.pennsieve.net", et = "wss://api.pennsieve.net/streaming/ts/query", tt = "https://api.pennsieve.net/streaming", wn = {
468
- apiUrl: Ke,
469
- api2Url: Qe,
470
- timeSeriesUrl: et,
471
- timeSeriesApi: tt
472
- }, An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
467
+ const Qe = "https://api.pennsieve.net", et = "https://api2.pennsieve.net", tt = "wss://api.pennsieve.net/streaming/discover/ts/query", nt = "wss://api.pennsieve.net/streaming/discover/ts/query", rt = "https://api.pennsieve.net/streaming", An = {
468
+ apiUrl: Qe,
469
+ api2Url: et,
470
+ timeSeriesUrl: tt,
471
+ timeSeriesPublicUrl: nt,
472
+ timeSeriesApi: rt
473
+ }, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
473
474
  __proto__: null,
474
- api2Url: Qe,
475
- apiUrl: Ke,
476
- default: wn,
477
- timeSeriesApi: tt,
478
- timeSeriesUrl: et
475
+ api2Url: et,
476
+ apiUrl: Qe,
477
+ default: An,
478
+ timeSeriesApi: rt,
479
+ timeSeriesPublicUrl: nt,
480
+ timeSeriesUrl: tt
479
481
  }, Symbol.toStringTag, { value: "Module" }));
480
482
  async function fe() {
481
483
  try {
@@ -489,65 +491,82 @@ async function fe() {
489
491
  console.error(t);
490
492
  }
491
493
  }
492
- const nt = Ft("tsviewer", () => {
493
- const t = An, e = g([]), n = g("NOT_MONTAGED"), o = g({}), i = g([]), u = g(null), h = g(null), w = g({}), l = g([]), s = g({}), A = g({}), m = g("POINTER"), b = B(() => (a) => i.value.find((c) => c.name === a)), M = B(() => e.value.filter((a) => a.selected)), R = B(() => () => {
494
+ const Tn = () => ({
495
+ openConnection: async (e, n, o) => await new Promise((g, A) => {
496
+ const l = e + "?session=" + o + "&package=" + n;
497
+ console.log("Opening WebSocket connection to:", l);
498
+ let s = null;
499
+ const m = new WebSocket(l);
500
+ m.onopen = () => {
501
+ console.log("🔗 WebSocket opened for package:", n);
502
+ const h = { montage: "NOT_MONTAGED", packageId: n };
503
+ console.log("🎛️ Sending message payload"), m.send(JSON.stringify(h));
504
+ }, m.onclose = () => {
505
+ console.log("🔌 WebSocket closed for package:", n), s && s.channelDetails ? (console.log("Channel details received:", s.channelDetails), g({ res: s.channelDetails, status: "websocket closed" })) : (console.warn("No channel details received"), g({ res: null, status: "websocket closed without data" }));
506
+ }, m.onmessage = (h) => {
507
+ console.log("WebSocket message received:", h.data), s = JSON.parse(h.data), m.close();
508
+ }, m.onerror = (h) => {
509
+ console.error("WebSocket error:", h), A(h);
510
+ };
511
+ })
512
+ }), ot = Ft("tsviewer", () => {
513
+ const t = Sn, e = y([]), n = y("NOT_MONTAGED"), o = y({}), i = y([]), u = y(null), g = y(null), A = y({}), l = y([]), s = y({}), m = y({}), h = y("POINTER"), { openConnection: b } = Tn(), M = z(() => (a) => i.value.find((c) => c.name === a)), R = z(() => e.value.filter((a) => a.selected)), _ = z(() => () => {
494
514
  const a = l.value.find((c) => c.selected);
495
515
  return a || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
496
- }), _ = () => {
516
+ }), V = () => {
497
517
  let a = !1;
498
- return l.value.forEach((c, v) => {
499
- !c.id && c.id !== 0 && (console.error(`Layer at index ${v} missing ID:`, c), a = !0), c.annotations || (console.warn(`Layer at index ${v} missing annotations array:`, c), c.annotations = []);
518
+ return l.value.forEach((c, p) => {
519
+ !c.id && c.id !== 0 && (console.error(`Layer at index ${p} missing ID:`, c), a = !0), c.annotations || (console.warn(`Layer at index ${p} missing annotations array:`, c), c.annotations = []);
500
520
  }), a && console.error("Annotation layer validation failed. Layers:", l.value), !a;
501
- }, V = B(() => (a) => l.value.flatMap((v) => v.annotations || []).find((v) => v.id === a)), E = (a) => {
502
- w.value = a;
503
- }, P = (a) => {
521
+ }, P = z(() => (a) => l.value.flatMap((p) => p.annotations || []).find((p) => p.id === a)), E = (a) => {
522
+ A.value = a;
523
+ }, I = (a) => {
504
524
  e.value = a;
505
- }, S = (a) => {
525
+ }, v = (a) => {
506
526
  n.value = a;
507
- }, p = (a) => {
527
+ }, T = (a) => {
508
528
  o.value = a;
509
- }, I = (a) => {
529
+ }, W = (a) => {
510
530
  i.value = a;
511
- }, $ = (a) => {
512
- u.value = a;
513
531
  }, O = (a) => {
514
- h.value = a;
515
- }, C = async (a) => {
516
- const c = a.packageId, v = await fe(), D = `https://api.pennsieve.net/packages/${c}?api_key=${v}`, ee = await useSendXhr(D);
517
- if (z())
518
- return E(ee), Promise.resolve(ee);
519
- throw new Error("Timeseries viewer is not available, since the file is not processed");
520
- }, z = () => (a) => {
521
- var v;
522
- return ((v = a == null ? void 0 : a.content) == null ? void 0 : v.state) === "READY";
523
- }, X = (a) => {
524
- const c = a.map((v) => (!v.id && v.id !== 0 && (console.warn("Annotation layer missing ID:", v), v.id = Math.random().toString(36).substr(2, 9)), v.annotations || (v.annotations = []), v.name || (v.name = `Layer ${v.id}`), v));
532
+ u.value = a;
533
+ }, C = (a) => {
534
+ g.value = a;
535
+ }, G = async (a) => {
536
+ const c = a.packageId, p = await fe();
537
+ let L = t.timeSeriesPublicUrl, ee = null;
538
+ ee = await b(L, c, p), E({ channels: ee.res, content: { id: c } });
539
+ }, H = () => (a) => {
540
+ var p;
541
+ return ((p = a == null ? void 0 : a.content) == null ? void 0 : p.state) === "READY";
542
+ }, D = (a) => {
543
+ const c = a.map((p) => (!p.id && p.id !== 0 && (console.warn("Annotation layer missing ID:", p), p.id = Math.random().toString(36).substr(2, 9)), p.annotations || (p.annotations = []), p.name || (p.name = `Layer ${p.id}`), p));
525
544
  l.value = c, console.log("Set annotations with validated structure:", c);
526
- }, k = (a) => {
545
+ }, j = (a) => {
527
546
  if (!a && a !== 0) {
528
547
  console.error("setActiveAnnotationLayer called with invalid layerId:", a);
529
548
  return;
530
549
  }
531
- s.value = a, l.value.forEach((v) => v.selected = !1);
532
- const c = F(x("id", a), l.value);
550
+ s.value = a, l.value.forEach((p) => p.selected = !1);
551
+ const c = $(F("id", a), l.value);
533
552
  c >= 0 ? (l.value[c].selected = !0, console.log("Successfully set active layer:", l.value[c])) : console.error("Layer with ID not found:", a, "Available layers:", l.value);
534
- }, U = (a) => {
553
+ }, X = (a) => {
535
554
  if (l.value.forEach(
536
555
  (c) => {
537
- var v;
538
- return (v = c.annotations) == null ? void 0 : v.forEach((D) => D.selected = !1);
556
+ var p;
557
+ return (p = c.annotations) == null ? void 0 : p.forEach((L) => L.selected = !1);
539
558
  }
540
559
  ), a.id) {
541
- const c = F(x("id", a.layer_id), l.value);
560
+ const c = $(F("id", a.layer_id), l.value);
542
561
  if (c >= 0) {
543
- const v = F(x("id", a.id), l.value[c].annotations);
544
- v >= 0 && (l.value[c].annotations[v].selected = !0);
562
+ const p = $(F("id", a.id), l.value[c].annotations);
563
+ p >= 0 && (l.value[c].annotations[p].selected = !0);
545
564
  }
546
565
  }
547
- A.value = a;
548
- }, G = (a) => {
549
566
  m.value = a;
550
567
  }, K = (a) => {
568
+ h.value = a;
569
+ }, oe = (a) => {
551
570
  if (!a.id && a.id !== 0) {
552
571
  console.error("Cannot create layer without ID:", a);
553
572
  return;
@@ -568,33 +587,33 @@ const nt = Ft("tsviewer", () => {
568
587
  // Spread any additional properties
569
588
  };
570
589
  l.value.push(c), console.log("Created layer with validated structure:", c);
571
- }, oe = (a) => {
572
- const c = F(x("id", a.id), l.value);
590
+ }, x = (a) => {
591
+ const c = $(F("id", a.id), l.value);
573
592
  if (c >= 0) {
574
- const v = Object.assign(l.value[c], a);
575
- l.value[c] = v;
593
+ const p = Object.assign(l.value[c], a);
594
+ l.value[c] = p;
576
595
  }
577
- }, W = (a) => {
578
- const c = F(x("id", a.id), l.value);
579
- c >= 0 && l.value.splice(c, 1);
580
596
  }, Q = (a) => {
581
- const c = F(x("id", a.layer_id), l.value);
582
- c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a), U(a));
597
+ const c = $(F("id", a.id), l.value);
598
+ c >= 0 && l.value.splice(c, 1);
583
599
  }, q = (a) => {
584
- const c = F(x("id", a.layer_id), l.value);
600
+ const c = $(F("id", a.layer_id), l.value);
601
+ c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a), X(a));
602
+ }, ae = (a) => {
603
+ const c = $(F("id", a.layer_id), l.value);
585
604
  if (c >= 0) {
586
- const v = l.value[c].annotations, D = F(x("id", a.id), v);
587
- D >= 0 && (v[D] = a);
605
+ const p = l.value[c].annotations, L = $(F("id", a.id), p);
606
+ L >= 0 && (p[L] = a);
588
607
  }
589
- }, ae = (a) => {
590
- const c = F(x("id", a.layer_id), l.value);
608
+ }, ce = (a) => {
609
+ const c = $(F("id", a.layer_id), l.value);
591
610
  if (c >= 0) {
592
- const v = l.value[c].annotations, D = F(x("id", a.id), v);
593
- D >= 0 && v.splice(D, 1);
611
+ const p = l.value[c].annotations, L = $(F("id", a.id), p);
612
+ L >= 0 && p.splice(L, 1);
594
613
  }
595
- }, H = (a, c, v) => {
596
- const D = e.value.find((ee) => ee.id === a);
597
- D && (D[c] = v);
614
+ }, B = (a, c, p) => {
615
+ const L = e.value.find((ee) => ee.id === a);
616
+ L && (L[c] = p);
598
617
  };
599
618
  return {
600
619
  // State
@@ -603,87 +622,87 @@ const nt = Ft("tsviewer", () => {
603
622
  customMontageMap: o,
604
623
  workspaceMontages: i,
605
624
  viewerErrors: u,
606
- needsRerender: h,
625
+ needsRerender: g,
607
626
  viewerAnnotations: l,
608
627
  activeAnnotationLayer: s,
609
- activeAnnotation: A,
610
- activeViewer: w,
611
- viewerActiveTool: m,
628
+ activeAnnotation: m,
629
+ activeViewer: A,
630
+ viewerActiveTool: h,
612
631
  config: t,
613
632
  // Getters
614
- getMontageMessageByName: b,
615
- viewerSelectedChannels: M,
616
- getViewerActiveLayer: R,
617
- getAnnotationById: V,
633
+ getMontageMessageByName: M,
634
+ viewerSelectedChannels: R,
635
+ getViewerActiveLayer: _,
636
+ getAnnotationById: P,
618
637
  // Actions
619
- setChannels: P,
620
- setViewerMontageScheme: S,
621
- setCustomMontageMap: p,
622
- setWorkspaceMontages: I,
623
- setViewerErrors: $,
624
- setAnnotations: X,
625
- setActiveAnnotationLayer: k,
626
- setActiveAnnotation: U,
627
- setActiveTool: G,
628
- createLayer: K,
629
- updateLayer: oe,
630
- deleteLayer: W,
631
- createAnnotation: Q,
632
- updateAnnotation: q,
633
- deleteAnnotation: ae,
634
- updateChannelProperty: H,
638
+ setChannels: I,
639
+ setViewerMontageScheme: v,
640
+ setCustomMontageMap: T,
641
+ setWorkspaceMontages: W,
642
+ setViewerErrors: O,
643
+ setAnnotations: D,
644
+ setActiveAnnotationLayer: j,
645
+ setActiveAnnotation: X,
646
+ setActiveTool: K,
647
+ createLayer: oe,
648
+ updateLayer: x,
649
+ deleteLayer: Q,
650
+ createAnnotation: q,
651
+ updateAnnotation: ae,
652
+ deleteAnnotation: ce,
653
+ updateChannelProperty: B,
635
654
  updateChannelVisibility: (a, c) => {
636
- H(a, "visible", c);
655
+ B(a, "visible", c);
637
656
  },
638
657
  updateChannelSelection: (a, c) => {
639
- H(a, "selected", c);
658
+ B(a, "selected", c);
640
659
  },
641
660
  updateChannelFilter: (a, c) => {
642
- H(a, "filter", c);
661
+ B(a, "filter", c);
643
662
  },
644
- validateAnnotationLayers: _,
663
+ validateAnnotationLayers: V,
645
664
  resetViewer: () => {
646
- e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {}, A.value = {}, m.value = "POINTER", w.value = {};
665
+ e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {}, m.value = {}, h.value = "POINTER", A.value = {};
647
666
  },
648
667
  triggerRerender: (a) => {
649
- O({
668
+ C({
650
669
  timestamp: Date.now(),
651
670
  cause: a
652
671
  });
653
672
  },
654
673
  resetRerenderTrigger: () => {
655
- h.value = null;
674
+ g.value = null;
656
675
  },
657
- isTSFileProcessed: z,
658
- fetchAndSetActiveViewer: C,
676
+ isTSFileProcessed: H,
677
+ fetchAndSetActiveViewer: G,
659
678
  setActiveViewer: E
660
679
  };
661
680
  });
662
- function Tn(t) {
681
+ function In(t) {
663
682
  if (useRoute().name === "docs-login")
664
683
  return;
665
684
  pe(!1, Y("shouldShowToast", t));
666
685
  const n = pe(!1, Y("shouldRedirect", t));
667
686
  this.clearState(), n && this.$route.fullPath;
668
687
  }
669
- const In = (t) => Object.prototype.toString.call(t) === "[object String]", Sn = (t) => {
688
+ const _n = (t) => Object.prototype.toString.call(t) === "[object String]", bn = (t) => {
670
689
  Object.keys(t).forEach((e) => {
671
- In(t[e]) && (t[e] = t[e].trim());
690
+ _n(t[e]) && (t[e] = t[e].trim());
672
691
  });
673
692
  };
674
- function jn(t, e) {
693
+ function Mn(t, e) {
675
694
  if (!t)
676
695
  return Promise.reject({ status: 400, message: "Url is missing!" });
677
696
  const n = he("GET", "method", e), o = he({}, "header", e), i = Object.assign({}, { "Content-type": "application/json" }, o), u = Y("body", e);
678
- let h = { headers: i, method: n };
697
+ let g = { headers: i, method: n };
679
698
  if (u) {
680
- typeof u == "object" && Sn(u);
681
- const w = JSON.stringify(u);
682
- h = Object.assign({}, h, { body: w });
699
+ typeof u == "object" && bn(u);
700
+ const A = JSON.stringify(u);
701
+ g = Object.assign({}, g, { body: A });
683
702
  }
684
- return fetch(t, h).then((w) => w.status >= 400 ? Promise.reject(w) : w.json().catch(() => w));
703
+ return fetch(t, g).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
685
704
  }
686
- function be(t) {
705
+ function Ce(t) {
687
706
  const e = Y("status", t);
688
707
  let n;
689
708
  if (e === void 0) {
@@ -694,15 +713,15 @@ function be(t) {
694
713
  if (n === 400 && t.body)
695
714
  t.body.getReader().read().then(({ done: o, value: i }) => {
696
715
  const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
697
- Be(pe(u), mn(Be(Y("message"), JSON.parse), (h, w) => w))(u);
716
+ ze(pe(u), wn(ze(Y("message"), JSON.parse), (g, A) => A))(u);
698
717
  });
699
718
  else if (n === 401)
700
- return Tn();
719
+ return In();
701
720
  }
702
- function _n() {
703
- const t = nt(), { viewerChannels: e, viewerAnnotations: n } = He(t), o = (l) => l.id || "", i = (l) => {
704
- l.sort(function(A, m) {
705
- return A.start < m.start ? -1 : A.start > m.start ? 1 : 0;
721
+ function Cn() {
722
+ const t = ot(), { viewerChannels: e, viewerAnnotations: n } = Ze(t), o = (l) => l.id || "", i = (l) => {
723
+ l.sort(function(m, h) {
724
+ return m.start < h.start ? -1 : m.start > h.start ? 1 : 0;
706
725
  });
707
726
  };
708
727
  return {
@@ -718,13 +737,13 @@ function _n() {
718
737
  throw new TypeError("Missing annotation data or layer_id", s);
719
738
  if (s.id)
720
739
  throw new TypeError("Trying to create an annotation that already exists", s.id);
721
- let A = s.start, m = s.duration || s.end - s.start;
740
+ let m = s.start, h = s.duration || s.end - s.start;
722
741
  const b = s.label, M = s.description, R = s.layer_id;
723
742
  if (!b)
724
743
  throw new Error("Annotation label is required");
725
- if (A == null)
744
+ if (m == null)
726
745
  throw new Error("Annotation start time is required");
727
- m < 0 && (m = -m, A = A - m);
746
+ h < 0 && (h = -h, m = m - h);
728
747
  let _ = [];
729
748
  if (console.log("🔧 useTsAnnotation: Processing channelIds...", {
730
749
  hasChannelIds: s.channelIds && Array.isArray(s.channelIds),
@@ -734,20 +753,20 @@ function _n() {
734
753
  // Now from Pinia
735
754
  }), s.allChannels) {
736
755
  console.log("🔧 useTsAnnotation: allChannels=true, adding all visible channels");
737
- const S = t.activeViewer.value.channels;
738
- for (let p = 0; p < S.length; p++) {
739
- const $ = S[p].content.id;
740
- _.push($), console.log("🔧 useTsAnnotation: Added channel ID:", $);
756
+ const I = t.activeViewer.value.channels;
757
+ for (let v = 0; v < I.length; v++) {
758
+ const W = I[v].content.id;
759
+ _.push(W), console.log("🔧 useTsAnnotation: Added channel ID:", W);
741
760
  }
742
761
  } else if (s.channelIds && Array.isArray(s.channelIds) && s.channelIds.length > 0)
743
762
  _ = s.channelIds, console.log("🔧 useTsAnnotation: Using provided channelIds:", _);
744
763
  else {
745
764
  console.log("🔧 useTsAnnotation: Computing from selected channels");
746
- for (let S = 0; S < e.value.length; S++) {
747
- const p = e.value[S];
748
- if (p.selected && p.visible) {
749
- const I = o(p);
750
- _.push(I), console.log("🔧 useTsAnnotation: Added selected channel ID:", I);
765
+ for (let I = 0; I < e.value.length; I++) {
766
+ const v = e.value[I];
767
+ if (v.selected && v.visible) {
768
+ const T = o(v);
769
+ _.push(T), console.log("🔧 useTsAnnotation: Added selected channel ID:", T);
751
770
  }
752
771
  }
753
772
  }
@@ -756,15 +775,15 @@ function _n() {
756
775
  label: b,
757
776
  name: b,
758
777
  description: M || "",
759
- start: Math.floor(A),
760
- end: Math.floor(A + m),
778
+ start: Math.floor(m),
779
+ end: Math.floor(m + h),
761
780
  channelIds: _
762
781
  };
763
782
  console.log("🔧 useTsAnnotation: API payload:", V);
764
- const E = t.activeViewer.value.content.id, P = `${t.config.apiUrl}/timeseries/${E}/layers/${R}/annotations`;
765
- console.log("🔧 useTsAnnotation: API URL:", P);
783
+ const P = t.activeViewer.value.content.id, E = `${t.config.apiUrl}/timeseries/${P}/layers/${R}/annotations`;
784
+ console.log("🔧 useTsAnnotation: API URL:", E);
766
785
  try {
767
- const S = await fe(), p = await fetch(`${P}?api_key=${S}`, {
786
+ const I = await fe(), v = await fetch(`${E}?api_key=${I}`, {
768
787
  method: "POST",
769
788
  headers: {
770
789
  "Content-Type": "application/json",
@@ -772,39 +791,39 @@ function _n() {
772
791
  },
773
792
  body: JSON.stringify(V)
774
793
  });
775
- if (!p.ok) {
776
- const C = await p.text();
777
- throw new Error(`HTTP ${p.status}: ${C}`);
794
+ if (!v.ok) {
795
+ const C = await v.text();
796
+ throw new Error(`HTTP ${v.status}: ${C}`);
778
797
  }
779
- const I = await p.json();
780
- console.log("🔧 useTsAnnotation: API success:", I);
781
- const $ = {
798
+ const T = await v.json();
799
+ console.log("🔧 useTsAnnotation: API success:", T);
800
+ const W = {
782
801
  name: "",
783
- id: I.id,
784
- label: I.label,
785
- description: I.description,
786
- start: I.start,
787
- duration: I.end - I.start,
788
- end: I.end,
802
+ id: T.id,
803
+ label: T.label,
804
+ description: T.description,
805
+ start: T.start,
806
+ duration: T.end - T.start,
807
+ end: T.end,
789
808
  cStart: null,
790
809
  cEnd: null,
791
810
  selected: !0,
792
- channelIds: I.channelIds || _,
811
+ channelIds: T.channelIds || _,
793
812
  allChannels: _.length === 0 || _.length >= e.value.length,
794
813
  // Use Pinia
795
814
  layer_id: R,
796
- userId: I.userId
815
+ userId: T.userId
797
816
  };
798
- I.linkedPackage && ($.linkedPackage = I.linkedPackage);
817
+ T.linkedPackage && (W.linkedPackage = T.linkedPackage);
799
818
  let O = 0;
800
819
  for (let C = 0; C < n.value.length; C++)
801
820
  if (n.value[C].id === R) {
802
821
  O = C;
803
822
  break;
804
823
  }
805
- return t.createAnnotation($), n.value[O] && n.value[O].annotations && i(n.value[O].annotations), $;
806
- } catch (S) {
807
- throw console.error("🔧 useTsAnnotation: Error creating annotation:", S), be(S), S;
824
+ return t.createAnnotation(W), n.value[O] && n.value[O].annotations && i(n.value[O].annotations), W;
825
+ } catch (I) {
826
+ throw console.error("🔧 useTsAnnotation: Error creating annotation:", I), Ce(I), I;
808
827
  }
809
828
  },
810
829
  updateAnnotation: async (l = null) => {
@@ -813,13 +832,13 @@ function _n() {
813
832
  throw new TypeError("Trying to update an annotation that doesn't exist on server", s.id);
814
833
  if (!s.layer_id)
815
834
  throw new TypeError("Missing layer_id for annotation update", s);
816
- let A = s.start, m = s.duration || s.end - s.start;
817
- m < 0 && (m = -m, A = A - m);
835
+ let m = s.start, h = s.duration || s.end - s.start;
836
+ h < 0 && (h = -h, m = m - h);
818
837
  const b = {
819
838
  label: s.label,
820
839
  description: s.description || "",
821
- start: Math.floor(A),
822
- end: Math.floor(A + m),
840
+ start: Math.floor(m),
841
+ end: Math.floor(m + h),
823
842
  channelIds: s.channelIds || []
824
843
  };
825
844
  console.log("🔧 useTsAnnotation: Update API payload:", b);
@@ -835,19 +854,19 @@ function _n() {
835
854
  body: JSON.stringify(b)
836
855
  });
837
856
  if (!V.ok) {
838
- const S = await V.text();
839
- throw new Error(`HTTP ${V.status}: ${S}`);
857
+ const I = await V.text();
858
+ throw new Error(`HTTP ${V.status}: ${I}`);
840
859
  }
841
- const E = await V.json();
842
- console.log("🔧 useTsAnnotation: Update API success:", E);
843
- const P = {
860
+ const P = await V.json();
861
+ console.log("🔧 useTsAnnotation: Update API success:", P);
862
+ const E = {
844
863
  ...s,
845
- ...E,
846
- duration: E.end - E.start
864
+ ...P,
865
+ duration: P.end - P.start
847
866
  };
848
- return t.updateAnnotation(P), E;
867
+ return t.updateAnnotation(E), P;
849
868
  } catch (_) {
850
- throw console.error("🔧 useTsAnnotation: Error updating annotation:", _), be(_), _;
869
+ throw console.error("🔧 useTsAnnotation: Error updating annotation:", _), Ce(_), _;
851
870
  }
852
871
  },
853
872
  removeAnnotation: async (l) => {
@@ -856,10 +875,10 @@ function _n() {
856
875
  let s = "";
857
876
  if (l.layer ? s = l.layer.id : s = l.layer_id, !s)
858
877
  throw new TypeError("Missing layer_id for annotation deletion", l);
859
- const A = t.activeViewer.value.content.id, m = `${t.config.apiUrl}/timeseries/${A}/layers/${s}/annotations/${l.id}`;
860
- console.log("🔧 useTsAnnotation: Delete API URL:", m);
878
+ const m = t.activeViewer.value.content.id, h = `${t.config.apiUrl}/timeseries/${m}/layers/${s}/annotations/${l.id}`;
879
+ console.log("🔧 useTsAnnotation: Delete API URL:", h);
861
880
  try {
862
- const b = await fe(), M = await fetch(`${m}?api_key=${b}`, {
881
+ const b = await fe(), M = await fetch(`${h}?api_key=${b}`, {
863
882
  method: "DELETE",
864
883
  headers: {
865
884
  Accept: "application/json"
@@ -871,19 +890,19 @@ function _n() {
871
890
  }
872
891
  return console.log("🔧 useTsAnnotation: Delete API success"), t.deleteAnnotation(l), !0;
873
892
  } catch (b) {
874
- throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b), be(b), b;
893
+ throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b), Ce(b), b;
875
894
  }
876
895
  },
877
896
  sortAnns: i,
878
897
  getChannelId: o
879
898
  };
880
899
  }
881
- const bn = (t, e) => {
900
+ const En = (t, e) => {
882
901
  const n = t.__vccOpts || t;
883
902
  for (const [o, i] of e)
884
903
  n[o] = i;
885
904
  return n;
886
- }, Cn = { id: "channelCanvas" }, En = ["data-id"], On = ["hidden"], Pn = ["hidden"], Ln = {
905
+ }, On = { id: "channelCanvas" }, Pn = ["data-id"], kn = ["hidden"], Dn = ["hidden"], Ln = {
887
906
  __name: "TSViewer",
888
907
  props: {
889
908
  pkg: {
@@ -901,7 +920,7 @@ const bn = (t, e) => {
901
920
  }
902
921
  },
903
922
  setup(t, { expose: e }) {
904
- const n = Z(() => import("./TSScrubber-DV_zbLFM.mjs")), o = Z(() => import("./TSViewerCanvas-B-p1oLEz.mjs").then((r) => r.T)), i = Z(() => import("./TSViewerToolbar-CCQsR6PP.mjs")), u = Z(() => import("./TSFilterModal-D_p4VsMp.mjs")), h = Z(() => import("./TSAnnotationModal-CTcapLT8.mjs")), w = Z(() => import("./TsAnnotationDeleteDialog-DXn1tyay.mjs")), l = Z(() => import("./TSViewerLayerWindow-MwCEfh1O.mjs")), s = {
923
+ const n = Z(() => import("./TSScrubber-D04stxRB.mjs")), o = Z(() => import("./TSViewerCanvas-7tyEpUbF.mjs").then((r) => r.T)), i = Z(() => import("./TSViewerToolbar-BHvdhd1h.mjs")), u = Z(() => import("./TSFilterModal-BiX6ocf2.mjs")), g = Z(() => import("./TSAnnotationModal-CboTV3Bd.mjs")), A = Z(() => import("./TsAnnotationDeleteDialog-D4aggIW6.mjs")), l = Z(() => import("./TSViewerLayerWindow-ChwzPfuz.mjs")), s = {
905
924
  TIMEUNIT: "microSeconds",
906
925
  // Basis for time
907
926
  XOFFSET: 0,
@@ -938,39 +957,39 @@ const bn = (t, e) => {
938
957
  // Maximum duration window (5min)
939
958
  INITDURATION: 15e6
940
959
  // Initial duration window (15sec)
941
- }, A = t, m = nt(), { viewerChannels: b, needsRerender: M } = He(m), {
960
+ }, m = t, h = ot(), { viewerChannels: b, needsRerender: M } = Ze(h), {
942
961
  addAnnotation: R,
943
962
  updateAnnotation: _,
944
963
  removeAnnotation: V
945
- } = _n(), E = g(null), P = g(null), S = g(null), p = g(null), I = g(null), $ = g(null), O = g(null), C = g(null), z = g(0), X = g(0), k = g(0), U = g(0), G = g(0), K = g(0), oe = g(0), W = g(1), Q = g(1 / 10), q = g(!1), ae = g(!1), H = g(null), ie = g(!1), se = g(!1), le = B(() => m.activeViewer), Oe = B(() => b.value.map((r) => ({
964
+ } = Cn(), P = y(null), E = y(null), I = y(null), v = y(null), T = y(null), W = y(null), O = y(null), C = y(null), G = y(0), H = y(0), D = y(0), j = y(0), X = y(0), K = y(0), oe = y(0), x = y(1), Q = y(1 / 10), q = y(!1), ae = y(!1), ce = y(null), B = y(!1), se = y(!1), ie = z(() => h.activeViewer), Pe = z(() => b.value.map((r) => ({
946
965
  ...r,
947
966
  selected: !!r.selected
948
- }))), we = B(() => Oe.value.filter((r) => r.visible)), Ae = B(() => {
967
+ }))), we = z(() => Pe.value.filter((r) => r.visible)), Ae = z(() => {
949
968
  let r = !1;
950
- return K.value / a.value < 30 && (r = !0), r;
951
- }), a = B(() => we.value.length), c = async () => {
952
- if (console.log("onresize..."), !E.value)
969
+ return K.value / Se.value < 30 && (r = !0), r;
970
+ }), Se = z(() => we.value.length), a = async () => {
971
+ if (console.log("onresize..."), !P.value)
953
972
  return;
954
973
  const r = document.getElementById("ts_viewer");
955
974
  if (!r)
956
975
  return;
957
- const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")), y = A.isPreview ? 0 : 100;
958
- z.value = d - y, await ne(), X.value = E.value.offsetWidth;
959
- const j = S.value;
960
- j && (oe.value = j.clientWidth, G.value = X.value - j.clientWidth - 16, K.value = z.value - 40);
976
+ const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
977
+ G.value = d - w, await ne(), H.value = P.value.offsetWidth;
978
+ const U = I.value;
979
+ U && (oe.value = U.clientWidth, X.value = H.value - U.clientWidth - 16, K.value = G.value - 40);
961
980
  };
962
- Te(() => le.value, async (r, f) => {
963
- var d, y, j;
964
- (d = P.value) != null && d.resetComponentState && P.value.resetComponentState(), r && r.channels && r.channels.length > 0 && De(), Ne(), await ne(), (y = P.value) != null && y.initSegmentSpans && P.value.initSegmentSpans(), (j = P.value) != null && j.getAnnotations && P.value.getAnnotations();
965
- }, { immediate: !1, deep: !0 }), Te(a, (r, f) => {
981
+ Te(() => ie.value, async (r, f) => {
982
+ var d, w, U;
983
+ (d = E.value) != null && d.resetComponentState && E.value.resetComponentState(), r && r.channels && r.channels.length > 0 && Ne(), Ue(), await ne(), (w = E.value) != null && w.initSegmentSpans && E.value.initSegmentSpans(), (U = E.value) != null && U.getAnnotations && E.value.getAnnotations();
984
+ }, { immediate: !1, deep: !0 }), Te(Se, (r, f) => {
966
985
  f !== void 0 && r !== f && (console.log(`Number of visible channels changed from ${f} to ${r}`), setTimeout(() => {
967
986
  var d;
968
- c(), (d = p.value) != null && d.renderAll && p.value.renderAll();
987
+ a(), (d = v.value) != null && d.renderAll && v.value.renderAll();
969
988
  }, 20));
970
989
  });
971
- const v = (r) => {
990
+ const c = (r) => {
972
991
  store.dispatch("viewerModule/setActiveAnnotation", r).then(() => {
973
- p.value.renderAnnotationCanvas(), q.value = !0;
992
+ v.value.renderAnnotationCanvas(), q.value = !0;
974
993
  });
975
994
  };
976
995
  Te(M, (r) => {
@@ -978,13 +997,13 @@ const bn = (t, e) => {
978
997
  var f;
979
998
  r.cause === "channel-visibility" ? setTimeout(() => {
980
999
  var d;
981
- c(), (d = p.value) != null && d.renderAll && p.value.renderAll();
982
- }, 10) : (f = p.value) != null && f.renderAll && p.value.renderAll();
983
- }), m.resetRerenderTrigger(null));
1000
+ a(), (d = v.value) != null && d.renderAll && v.value.renderAll();
1001
+ }, 10) : (f = v.value) != null && f.renderAll && v.value.renderAll();
1002
+ }), h.resetRerenderTrigger(null));
984
1003
  }, { deep: !0 });
985
- const D = (r) => {
986
- v(r);
987
- }, ee = async (r) => {
1004
+ const p = (r) => {
1005
+ c(r);
1006
+ }, L = async (r) => {
988
1007
  if (console.log("📍 TSViewer: onCreateUpdateAnnotation received:", r), !r || Object.keys(r).length === 0) {
989
1008
  console.error("🚨 TSViewer: Received empty annotation!");
990
1009
  return;
@@ -995,314 +1014,314 @@ const bn = (t, e) => {
995
1014
  }
996
1015
  q.value = !1;
997
1016
  try {
998
- r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await _(r), rt()) : (console.log("📍 TSViewer: Creating annotation via composable"), await R(r), lt()), console.log("📍 TSViewer: Annotation operation completed successfully");
1017
+ r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await _(r), ee()) : (console.log("📍 TSViewer: Creating annotation via composable"), await R(r), ut()), console.log("📍 TSViewer: Annotation operation completed successfully");
999
1018
  } catch (f) {
1000
1019
  console.error("📍 TSViewer: Error creating/updating annotation:", f), q.value = !0;
1001
1020
  }
1002
- }, rt = () => {
1003
- p.value.renderAnnotationCanvas();
1004
- }, ot = (r) => {
1005
- H.value = r, ie.value = !0;
1006
- }, at = async (r) => {
1007
- ie.value = !1;
1021
+ }, ee = () => {
1022
+ v.value.renderAnnotationCanvas();
1023
+ }, at = (r) => {
1024
+ ce.value = r, B.value = !0;
1025
+ }, st = async (r) => {
1026
+ B.value = !1;
1008
1027
  try {
1009
1028
  await V(r), it(), console.log("📍 TSViewer: Annotation deleted successfully");
1010
1029
  } catch (f) {
1011
1030
  console.error("📍 TSViewer: Error deleting annotation:", f);
1012
1031
  }
1013
1032
  }, it = () => {
1014
- p.value.renderAnnotationCanvas();
1015
- }, st = (r, f, d, y, j, ue) => {
1033
+ v.value.renderAnnotationCanvas();
1034
+ }, lt = (r, f, d, w, U, le) => {
1016
1035
  if (console.log("📍 TSViewer: onAddAnnotation called with:", {
1017
1036
  startTime: r,
1018
1037
  duration: f,
1019
1038
  allChannels: d,
1020
- label: y,
1021
- description: j,
1022
- layer: ue
1023
- }), !ue || !ue.id) {
1024
- console.error("Invalid layer provided to onAddAnnotation:", ue);
1039
+ label: w,
1040
+ description: U,
1041
+ layer: le
1042
+ }), !le || !le.id) {
1043
+ console.error("Invalid layer provided to onAddAnnotation:", le);
1025
1044
  return;
1026
1045
  }
1027
- const kt = m.viewerSelectedChannels || [], Dt = d ? [] : kt.map((Nt) => Nt.id), Ue = {
1046
+ const Lt = h.viewerSelectedChannels || [], Nt = d ? [] : Lt.map((Ut) => Ut.id), Re = {
1028
1047
  id: null,
1029
- label: y || "Event",
1030
- description: j || "",
1048
+ label: w || "Event",
1049
+ description: U || "",
1031
1050
  start: Math.floor(r),
1032
1051
  end: Math.floor(r + f),
1033
1052
  duration: Math.floor(f),
1034
- channelIds: Dt,
1053
+ channelIds: Nt,
1035
1054
  allChannels: d,
1036
- layer_id: ue.id,
1055
+ layer_id: le.id,
1037
1056
  selected: !0,
1038
1057
  userId: null
1039
1058
  };
1040
- console.log("📍 TSViewer: Created annotation object:", Ue), m.setActiveAnnotation(Ue), console.log("📍 TSViewer: Store now contains:", m.activeAnnotation), q.value = !0, console.log("📍 TSViewer: Modal opened with annotation data");
1041
- }, lt = () => {
1042
- p.value.renderAnnotationCanvas();
1043
- }, ut = (r) => {
1044
- p.value.createAnnotationLayer(r);
1045
- }, Pe = () => {
1059
+ console.log("📍 TSViewer: Created annotation object:", Re), h.setActiveAnnotation(Re), console.log("📍 TSViewer: Store now contains:", h.activeAnnotation), q.value = !0, console.log("📍 TSViewer: Modal opened with annotation data");
1060
+ }, ut = () => {
1061
+ v.value.renderAnnotationCanvas();
1062
+ }, ct = (r) => {
1063
+ v.value.createAnnotationLayer(r);
1064
+ }, ke = () => {
1046
1065
  ae.value = !1;
1047
- }, ct = () => {
1048
- p.value.resetFocusedAnnotation(), p.value.renderAnnotationCanvas(), q.value = !1;
1049
1066
  }, dt = () => {
1067
+ v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
1068
+ }, ft = () => {
1050
1069
  se.value = !1;
1051
- }, ft = (r) => {
1070
+ }, vt = (r) => {
1052
1071
  r.stopPropagation(), r.preventDefault();
1053
1072
  const f = r.detail.sourceEvent.metaKey;
1054
- Le({ channelId: r.currentTarget.dataset.id, append: f }), p.value.renderAll();
1055
- }, vt = () => {
1056
- k.value = p.value.getNextAnnotation();
1073
+ De({ channelId: r.currentTarget.dataset.id, append: f }), v.value.renderAll();
1057
1074
  }, pt = () => {
1058
- k.value = p.value.getPreviousAnnotation();
1059
- }, ht = (r) => {
1060
- ke(r * 1e6);
1061
- }, gt = () => {
1062
- W.value = W.value * 1.25;
1075
+ D.value = v.value.getNextAnnotation();
1076
+ }, ht = () => {
1077
+ D.value = v.value.getPreviousAnnotation();
1078
+ }, gt = (r) => {
1079
+ Le(r * 1e6);
1063
1080
  }, yt = () => {
1064
- W.value = W.value * 0.8;
1081
+ x.value = x.value * 1.25;
1065
1082
  }, mt = () => {
1066
- P.value.getAnnotations();
1083
+ x.value = x.value * 0.8;
1067
1084
  }, wt = () => {
1085
+ E.value.getAnnotations();
1068
1086
  }, At = () => {
1087
+ }, St = () => {
1069
1088
  console.log("Page forward triggered from toolbar");
1070
1089
  const r = Math.max(
1071
- k.value - 3 / 4 * U.value,
1090
+ D.value - 3 / 4 * j.value,
1072
1091
  O.value
1073
1092
  );
1074
1093
  te(r), ne(() => {
1075
1094
  var f;
1076
- (f = p.value) == null || f.renderAll();
1095
+ (f = v.value) == null || f.renderAll();
1077
1096
  });
1078
1097
  }, Tt = () => {
1079
1098
  console.log("Page forward triggered from toolbar");
1080
1099
  const r = Math.min(
1081
- k.value + 3 / 4 * U.value,
1082
- C.value - U.value
1100
+ D.value + 3 / 4 * j.value,
1101
+ C.value - j.value
1083
1102
  );
1084
- console.log(`Moving from ${k.value} to ${r}`), te(r), ne(() => {
1103
+ console.log(`Moving from ${D.value} to ${r}`), te(r), ne(() => {
1085
1104
  var f, d;
1086
- (f = p.value) != null && f.invalidate && p.value.invalidate(), (d = p.value) != null && d.renderAll && p.value.renderAll();
1105
+ (f = v.value) != null && f.invalidate && v.value.invalidate(), (d = v.value) != null && d.renderAll && v.value.renderAll();
1087
1106
  });
1088
1107
  }, It = (r) => {
1089
- let f = p.value.rsPeriod;
1090
- te(r.annotation.start - (Q.value * G.value - s.CURSOROFFSET) * f), ne(() => {
1108
+ let f = v.value.rsPeriod;
1109
+ te(r.annotation.start - (Q.value * X.value - s.CURSOROFFSET) * f), ne(() => {
1091
1110
  var d;
1092
- (d = p.value) == null || d.renderAll();
1111
+ (d = v.value) == null || d.renderAll();
1093
1112
  });
1094
- }, Le = (r) => {
1113
+ }, De = (r) => {
1095
1114
  const f = b.value.map((d) => {
1096
- const y = d.selected;
1097
- return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !y), d;
1115
+ const w = d.selected;
1116
+ return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !w), d;
1098
1117
  });
1099
- m.setChannels(f);
1100
- }, St = (r, f) => {
1101
- const d = b.value.map((y) => (f === !1 && (y.selected = !1), y.id in r && (y.selected = !0), y));
1102
- m.setChannels(d);
1118
+ h.setChannels(f);
1119
+ }, _t = (r, f) => {
1120
+ const d = b.value.map((w) => (f === !1 && (w.selected = !1), w.id in r && (w.selected = !0), w));
1121
+ h.setChannels(d);
1103
1122
  }, te = (r) => {
1104
- k.value = r;
1105
- }, _t = (r) => {
1106
- Q.value = r;
1123
+ D.value = r;
1107
1124
  }, bt = (r) => {
1108
- W.value = r;
1109
- }, ke = (r) => {
1110
- r > s.MAXDURATION ? U.value = s.MAXDURATION : U.value = r;
1111
- }, Ct = (r, f, d) => (s.DEFAULTDPI * window.devicePixelRatio / (f * d) / 25.4).toFixed(1) + " " + r.unit + "/mm", De = () => {
1125
+ Q.value = r;
1126
+ }, Ct = (r) => {
1127
+ x.value = r;
1128
+ }, Le = (r) => {
1129
+ r > s.MAXDURATION ? j.value = s.MAXDURATION : j.value = r;
1130
+ }, Et = (r, f, d) => (s.DEFAULTDPI * window.devicePixelRatio / (f * d) / 25.4).toFixed(1) + " " + r.unit + "/mm", Ne = () => {
1112
1131
  var f;
1113
- const r = (f = le.value) == null ? void 0 : f.channels;
1132
+ const r = (f = ie.value) == null ? void 0 : f.channels;
1114
1133
  if (console.log("🔄 initTimeRange called with channels:", (r == null ? void 0 : r.length) || 0), r && r.length > 0) {
1115
- O.value = r[0].content.start, C.value = r[0].content.end;
1116
- for (let y = 1; y < r.length; y++)
1117
- r[y].content.start < O.value && (O.value = r[y].content.start), r[y].content.end > C.value && (C.value = r[y].content.end);
1118
- const d = k.value;
1119
- k.value = O.value, console.log("📅 Time range initialized:", {
1134
+ O.value = r[0].start, C.value = r[0].end;
1135
+ for (let w = 1; w < r.length; w++)
1136
+ r[w].start < O.value && (O.value = r[w].start), r[w].end > C.value && (C.value = r[w].end);
1137
+ const d = D.value;
1138
+ D.value = O.value, console.log("📅 Time range initialized:", {
1120
1139
  ts_start: O.value,
1121
1140
  ts_end: C.value,
1122
1141
  oldStart: d,
1123
- newStart: k.value,
1124
- duration: U.value,
1142
+ newStart: D.value,
1143
+ duration: j.value,
1125
1144
  startDate: new Date(O.value / 1e3).toISOString(),
1126
1145
  endDate: new Date(C.value / 1e3).toISOString()
1127
1146
  });
1128
1147
  } else
1129
1148
  console.warn("⚠️ initTimeRange: No channels found in activeViewer");
1130
- }, Et = () => {
1131
- De();
1132
- }, Ot = (r) => {
1133
- ae.value = !0;
1149
+ }, Ot = () => {
1150
+ Ne();
1134
1151
  }, Pt = (r) => {
1135
- const f = he([], "channels", r), d = he("", "filter", r), y = I.value;
1136
- y.onChannels = f, yn(d) ? (y.input0 = NaN, y.input1 = NaN, y.selectedFilter = null, y.selectedNotch = null) : (y.input0 = d.input0, y.input1 = d.input1), se.value = !0;
1137
- }, Lt = (r) => {
1138
- p.value.setFilters(r);
1139
- }, Ne = () => {
1152
+ ae.value = !0;
1153
+ }, kt = (r) => {
1154
+ const f = he([], "channels", r), d = he("", "filter", r), w = T.value;
1155
+ w.onChannels = f, mn(d) ? (w.input0 = NaN, w.input1 = NaN, w.selectedFilter = null, w.selectedNotch = null) : (w.input0 = d.input0, w.input1 = d.input1), se.value = !0;
1156
+ }, Dt = (r) => {
1157
+ v.value.setFilters(r);
1158
+ }, Ue = () => {
1140
1159
  var r, f;
1141
- (r = p.value) == null || r.initViewerCanvas(), (f = p.value) == null || f.renderAll();
1160
+ (r = v.value) == null || r.initViewerCanvas(), (f = v.value) == null || f.renderAll();
1142
1161
  };
1143
- return Ut(() => {
1144
- Et();
1162
+ return Rt(() => {
1163
+ Ot();
1145
1164
  const r = document.getElementById("ts_viewer");
1146
1165
  if (!r) {
1147
1166
  console.warn("ts_viewer element not found");
1148
1167
  return;
1149
1168
  }
1150
1169
  var f = window.getComputedStyle(r, null);
1151
- const d = parseInt(f.getPropertyValue("height")), y = A.isPreview ? 0 : 100;
1152
- z.value = d - y, E.value && (X.value = E.value.offsetWidth), window.addEventListener("resize", c);
1153
- const j = S.value;
1154
- j && (oe.value = j.clientWidth, G.value = X.value - j.clientWidth - 5 - 10, K.value = z.value - 88), U.value = s.INITDURATION, Ne();
1170
+ const d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
1171
+ G.value = d - w, P.value && (H.value = P.value.offsetWidth), window.addEventListener("resize", a);
1172
+ const U = I.value;
1173
+ U && (oe.value = U.clientWidth, X.value = H.value - U.clientWidth - 5 - 10, K.value = G.value - 88), j.value = s.INITDURATION, Ue();
1155
1174
  }), jt(() => {
1156
- window.removeEventListener("resize", c);
1175
+ window.removeEventListener("resize", a);
1157
1176
  }), e({
1158
- openEditAnnotationDialog: v,
1159
- confirmDeleteAnnotation: ot,
1177
+ openEditAnnotationDialog: c,
1178
+ confirmDeleteAnnotation: at,
1160
1179
  selectAnnotation: It,
1161
- selectChannel: Le,
1162
- selectChannels: St,
1163
- openLayerWindow: Ot,
1164
- openFilterWindow: Pt,
1165
- setTimeseriesFilters: Lt
1180
+ selectChannel: De,
1181
+ selectChannels: _t,
1182
+ openLayerWindow: Pt,
1183
+ openFilterWindow: kt,
1184
+ setTimeseriesFilters: Dt
1166
1185
  }), (r, f) => (de(), Ie("div", {
1167
1186
  id: "ts_viewer",
1168
1187
  ref_key: "ts_viewer",
1169
- ref: E,
1170
- class: Se([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
1188
+ ref: P,
1189
+ class: _e([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
1171
1190
  }, [
1172
1191
  re(J(n), {
1173
1192
  ref_key: "scrubber",
1174
- ref: P,
1193
+ ref: E,
1175
1194
  ts_start: O.value,
1176
1195
  ts_end: C.value,
1177
- "c-width": G.value,
1196
+ "c-width": X.value,
1178
1197
  "label-width": oe.value,
1179
1198
  "cursor-loc": Q.value,
1180
- start: k.value,
1181
- duration: U.value,
1199
+ start: D.value,
1200
+ duration: j.value,
1182
1201
  constants: s,
1183
- "active-viewer": le.value,
1202
+ "active-viewer": ie.value,
1184
1203
  onSetStart: te
1185
1204
  }, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
1186
- ce("div", Cn, [
1187
- ce("div", {
1205
+ ue("div", On, [
1206
+ ue("div", {
1188
1207
  id: "channelLabels",
1189
1208
  ref_key: "channelLabels",
1190
- ref: S
1209
+ ref: I
1191
1210
  }, [
1192
- (de(!0), Ie(Vt, null, $t(we.value, (d) => (de(), Ie("div", {
1211
+ (de(!0), Ie(Wt, null, $t(we.value, (d) => (de(), Ie("div", {
1193
1212
  key: d.displayName,
1194
1213
  class: "chLabelWrap",
1195
1214
  "data-id": d.id,
1196
- onTap: ft
1215
+ onTap: vt
1197
1216
  }, [
1198
- ce("div", {
1199
- class: Se([d.selected ? "labelDiv selected" : "labelDiv"])
1217
+ ue("div", {
1218
+ class: _e([d.selected ? "labelDiv selected" : "labelDiv"])
1200
1219
  }, je(d.displayName), 3),
1201
- ce("div", {
1202
- class: Se(["chLabelIndWrap", [d.selected ? "selected" : ""]]),
1220
+ ue("div", {
1221
+ class: _e(["chLabelIndWrap", [d.selected ? "selected" : ""]]),
1203
1222
  hidden: Ae.value
1204
1223
  }, [
1205
- ce("div", {
1224
+ ue("div", {
1206
1225
  class: "chLabelInd",
1207
1226
  hidden: Ae.value
1208
- }, je(Ct(d, W.value, d.rowScale)), 9, Pn)
1209
- ], 10, On)
1210
- ], 40, En))), 128))
1227
+ }, je(Et(d, x.value, d.rowScale)), 9, Dn)
1228
+ ], 10, kn)
1229
+ ], 40, Pn))), 128))
1211
1230
  ], 512),
1212
1231
  re(J(o), {
1213
1232
  ref_key: "viewerCanvas",
1214
- ref: p,
1215
- window_height: z.value,
1216
- window_width: X.value,
1217
- duration: U.value,
1218
- start: k.value,
1219
- "c-width": G.value,
1233
+ ref: v,
1234
+ window_height: G.value,
1235
+ window_width: H.value,
1236
+ duration: j.value,
1237
+ start: D.value,
1238
+ "c-width": X.value,
1220
1239
  "c-height": K.value,
1221
1240
  constants: s,
1222
1241
  "ts-start": O.value,
1223
1242
  "ts-end": C.value,
1224
1243
  "cursor-loc": Q.value,
1225
- "global-zoom-mult": W.value,
1226
- "active-viewer": le.value,
1244
+ "global-zoom-mult": x.value,
1245
+ "active-viewer": ie.value,
1227
1246
  onSetStart: te,
1228
- onSetCursor: _t,
1229
- onSetGlobalZoom: bt,
1230
- onSetDuration: ke,
1231
- onChannelsInitialized: wt,
1232
- onAnnLayersInitialized: mt,
1233
- onCloseAnnotationLayerWindow: Pe,
1234
- onAddAnnotation: st,
1235
- onUpdateAnnotation: D
1247
+ onSetCursor: bt,
1248
+ onSetGlobalZoom: Ct,
1249
+ onSetDuration: Le,
1250
+ onChannelsInitialized: At,
1251
+ onAnnLayersInitialized: wt,
1252
+ onCloseAnnotationLayerWindow: ke,
1253
+ onAddAnnotation: lt,
1254
+ onUpdateAnnotation: p
1236
1255
  }, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])
1237
1256
  ]),
1238
- t.isPreview ? Mt("", !0) : (de(), Rt(J(i), {
1257
+ t.isPreview ? Vt("", !0) : (de(), Mt(J(i), {
1239
1258
  key: 0,
1240
1259
  constants: s,
1241
- duration: U.value,
1242
- start: k.value,
1243
- onPageBack: At,
1260
+ duration: j.value,
1261
+ start: D.value,
1262
+ onPageBack: St,
1244
1263
  onPageForward: Tt,
1245
- onIncrementZoom: gt,
1246
- onDecrementZoom: yt,
1247
- onUpdateDuration: ht,
1248
- onNextAnnotation: vt,
1249
- onPreviousAnnotation: pt,
1264
+ onIncrementZoom: yt,
1265
+ onDecrementZoom: mt,
1266
+ onUpdateDuration: gt,
1267
+ onNextAnnotation: pt,
1268
+ onPreviousAnnotation: ht,
1250
1269
  onSetStart: te
1251
1270
  }, null, 8, ["duration", "start"])),
1252
1271
  re(J(u), {
1253
1272
  ref_key: "filterWindow",
1254
- ref: I,
1273
+ ref: T,
1255
1274
  visible: se.value,
1256
1275
  "onUpdate:visible": f[0] || (f[0] = (d) => se.value = d),
1257
- onCloseWindow: dt
1276
+ onCloseWindow: ft
1258
1277
  }, null, 8, ["visible"]),
1259
- re(J(h), {
1278
+ re(J(g), {
1260
1279
  ref_key: "annotationModal",
1261
- ref: $,
1280
+ ref: W,
1262
1281
  visible: q.value,
1263
1282
  "onUpdate:visible": f[1] || (f[1] = (d) => q.value = d),
1264
- onCloseWindow: ct,
1265
- onCreateUpdateAnnotation: ee
1283
+ onCloseWindow: dt,
1284
+ onCreateUpdateAnnotation: L
1266
1285
  }, null, 8, ["visible"]),
1267
- re(J(w), {
1268
- visible: ie.value,
1269
- "delete-annotation": H.value,
1270
- "onUpdate:visible": f[2] || (f[2] = (d) => ie.value = d),
1271
- onDelete: at
1286
+ re(J(A), {
1287
+ visible: B.value,
1288
+ "delete-annotation": ce.value,
1289
+ "onUpdate:visible": f[2] || (f[2] = (d) => B.value = d),
1290
+ onDelete: st
1272
1291
  }, null, 8, ["visible", "delete-annotation"]),
1273
1292
  re(J(l), {
1274
1293
  visible: ae.value,
1275
- onCloseWindow: Pe,
1276
- onCreateLayer: ut
1294
+ onCloseWindow: ke,
1295
+ onCreateLayer: ct
1277
1296
  }, null, 8, ["visible"])
1278
1297
  ], 2));
1279
1298
  }
1280
- }, kn = /* @__PURE__ */ bn(Ln, [["__scopeId", "data-v-dfcd02cc"]]), Rn = {
1299
+ }, Nn = /* @__PURE__ */ En(Ln, [["__scopeId", "data-v-d5eda6cd"]]), Vn = {
1281
1300
  install(t) {
1282
- t.component("TSViewer", kn);
1301
+ t.component("TSViewer", Nn);
1283
1302
  }
1284
1303
  };
1285
1304
  export {
1286
- kn as T,
1287
- T as _,
1288
- Ce as a,
1305
+ Nn as T,
1306
+ S as _,
1307
+ Ee as a,
1289
1308
  N as b,
1290
- L as c,
1291
- Xt as d,
1292
- Bt as e,
1293
- Kt as f,
1294
- bn as g,
1309
+ k as c,
1310
+ Gt as d,
1311
+ zt as e,
1312
+ Qt as f,
1313
+ En as g,
1295
1314
  fe as h,
1296
- jn as i,
1297
- be as j,
1298
- We as k,
1299
- zt as l,
1300
- x as m,
1301
- nn as n,
1315
+ Mn as i,
1316
+ Ce as j,
1317
+ qe as k,
1318
+ Xt as l,
1319
+ F as m,
1320
+ rn as n,
1302
1321
  pe as o,
1303
1322
  he as p,
1304
- tn as q,
1323
+ nn as q,
1305
1324
  ge as r,
1306
- Rn as s,
1307
- nt as u
1325
+ Vn as s,
1326
+ ot as u
1308
1327
  };