@pennsieve-viz/tsviewer 1.1.12 → 1.1.13

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.
Files changed (26) hide show
  1. package/dist/{BFLibraryButton-Bw2bCACx.cjs → BFLibraryButton-B_TaDdTw.cjs} +1 -1
  2. package/dist/{BFLibraryButton-BJ7iV-SK.js → BFLibraryButton-DTcYY6VD.js} +1 -1
  3. package/dist/{IconSelection-DD-Nr7PN.cjs → IconSelection-BPTLv8Go.cjs} +1 -1
  4. package/dist/{IconSelection-DijIWZHa.js → IconSelection-BocyglLO.js} +1 -1
  5. package/dist/{TSAnnotationCanvas-UV4pQEcl.js → TSAnnotationCanvas-DErBDH0Y.js} +2 -2
  6. package/dist/{TSAnnotationCanvas-Cco4wSGV.cjs → TSAnnotationCanvas-DaDdtIB4.cjs} +1 -1
  7. package/dist/{TSAnnotationModal-CcWNjBv6.js → TSAnnotationModal-B3OSl05U.js} +3 -3
  8. package/dist/{TSAnnotationModal-5CjROnsz.cjs → TSAnnotationModal-DevUUWys.cjs} +1 -1
  9. package/dist/{TSFilterModal-B9JkIYGi.js → TSFilterModal-DHBpbDNp.js} +3 -3
  10. package/dist/{TSFilterModal-CvberIKd.cjs → TSFilterModal-DoqvKSUT.cjs} +1 -1
  11. package/dist/{TSScrubber-Dq0E_KWP.cjs → TSScrubber-E03DDcMn.cjs} +1 -1
  12. package/dist/{TSScrubber-Dajtd-ud.js → TSScrubber-hN5JY-DA.js} +1 -1
  13. package/dist/{TSViewerCanvas-XWBUIuF1.js → TSViewerCanvas-2Jz9ZgqW.js} +2 -2
  14. package/dist/{TSViewerCanvas-D-2XBXEV.cjs → TSViewerCanvas-Dc5cwQzK.cjs} +2 -2
  15. package/dist/{TSViewerLayerWindow-D6IXVgCL.js → TSViewerLayerWindow-CalBmhT6.js} +2 -2
  16. package/dist/{TSViewerLayerWindow-ChsFJLvq.cjs → TSViewerLayerWindow-PAfR31ZO.cjs} +1 -1
  17. package/dist/{TSViewerToolbar-fwS3Y99W.cjs → TSViewerToolbar-C1wTQDPC.cjs} +1 -1
  18. package/dist/{TSViewerToolbar-BvDdoOiz.js → TSViewerToolbar-DL9XKYbV.js} +1 -1
  19. package/dist/{TsAnnotationDeleteDialog-D19Ynkd4.cjs → TsAnnotationDeleteDialog-Cv3z3dFh.cjs} +1 -1
  20. package/dist/{TsAnnotationDeleteDialog-BnN0eMFf.js → TsAnnotationDeleteDialog-DXgN07Wj.js} +2 -2
  21. package/dist/{index-Ch_7-EbG.js → index-BsH36ax4.js} +291 -290
  22. package/dist/index-yiwCKzNX.cjs +1 -0
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +1 -1
  25. package/package.json +6 -6
  26. package/dist/index-DRsmx8uY.cjs +0 -1
@@ -2,12 +2,12 @@ import { reactive as Ht, ref as m, computed as H, inject as Zt, onMounted as yt,
2
2
  import { defineStore as Kt, storeToRefs as Fe } from "pinia";
3
3
  import { fetchAuthSession as Qt } from "aws-amplify/auth";
4
4
  import { ElMessage as en } from "element-plus";
5
- function T(t) {
5
+ function E(t) {
6
6
  return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
7
7
  }
8
8
  function R(t) {
9
9
  return function e(n) {
10
- return arguments.length === 0 || T(n) ? e : t.apply(this, arguments);
10
+ return arguments.length === 0 || E(n) ? e : t.apply(this, arguments);
11
11
  };
12
12
  }
13
13
  function D(t) {
@@ -16,13 +16,13 @@ function D(t) {
16
16
  case 0:
17
17
  return e;
18
18
  case 1:
19
- return T(n) ? e : R(function(a) {
19
+ return E(n) ? e : R(function(a) {
20
20
  return t(n, a);
21
21
  });
22
22
  default:
23
- return T(n) && T(r) ? e : T(n) ? R(function(a) {
23
+ return E(n) && E(r) ? e : E(n) ? R(function(a) {
24
24
  return t(a, r);
25
- }) : T(r) ? R(function(a) {
25
+ }) : E(r) ? R(function(a) {
26
26
  return t(n, a);
27
27
  }) : t(n, r);
28
28
  }
@@ -30,12 +30,12 @@ function D(t) {
30
30
  }
31
31
  function tn(t, e) {
32
32
  t = t || [], e = e || [];
33
- var n, r = t.length, a = e.length, l = [];
33
+ var n, r = t.length, a = e.length, s = [];
34
34
  for (n = 0; n < r; )
35
- l[l.length] = t[n], n += 1;
35
+ s[s.length] = t[n], n += 1;
36
36
  for (n = 0; n < a; )
37
- l[l.length] = e[n], n += 1;
38
- return l;
37
+ s[s.length] = e[n], n += 1;
38
+ return s;
39
39
  }
40
40
  function We(t, e) {
41
41
  switch (t) {
@@ -56,31 +56,31 @@ function We(t, e) {
56
56
  return e.apply(this, arguments);
57
57
  };
58
58
  case 4:
59
- return function(n, r, a, l) {
59
+ return function(n, r, a, s) {
60
60
  return e.apply(this, arguments);
61
61
  };
62
62
  case 5:
63
- return function(n, r, a, l, c) {
63
+ return function(n, r, a, s, c) {
64
64
  return e.apply(this, arguments);
65
65
  };
66
66
  case 6:
67
- return function(n, r, a, l, c, A) {
67
+ return function(n, r, a, s, c, A) {
68
68
  return e.apply(this, arguments);
69
69
  };
70
70
  case 7:
71
- return function(n, r, a, l, c, A, I) {
71
+ return function(n, r, a, s, c, A, I) {
72
72
  return e.apply(this, arguments);
73
73
  };
74
74
  case 8:
75
- return function(n, r, a, l, c, A, I, p) {
75
+ return function(n, r, a, s, c, A, I, h) {
76
76
  return e.apply(this, arguments);
77
77
  };
78
78
  case 9:
79
- return function(n, r, a, l, c, A, I, p, s) {
79
+ return function(n, r, a, s, c, A, I, h, l) {
80
80
  return e.apply(this, arguments);
81
81
  };
82
82
  case 10:
83
- return function(n, r, a, l, c, A, I, p, s, y) {
83
+ return function(n, r, a, s, c, A, I, h, l, g) {
84
84
  return e.apply(this, arguments);
85
85
  };
86
86
  default:
@@ -93,30 +93,30 @@ function Ae(t) {
93
93
  case 0:
94
94
  return e;
95
95
  case 1:
96
- return T(n) ? e : D(function(l, c) {
97
- return t(n, l, c);
96
+ return E(n) ? e : D(function(s, c) {
97
+ return t(n, s, c);
98
98
  });
99
99
  case 2:
100
- return T(n) && T(r) ? e : T(n) ? D(function(l, c) {
101
- return t(l, r, c);
102
- }) : T(r) ? D(function(l, c) {
103
- return t(n, l, c);
104
- }) : R(function(l) {
105
- return t(n, r, l);
100
+ return E(n) && E(r) ? e : E(n) ? D(function(s, c) {
101
+ return t(s, r, c);
102
+ }) : E(r) ? D(function(s, c) {
103
+ return t(n, s, c);
104
+ }) : R(function(s) {
105
+ return t(n, r, s);
106
106
  });
107
107
  default:
108
- return T(n) && T(r) && T(a) ? e : T(n) && T(r) ? D(function(l, c) {
109
- return t(l, c, a);
110
- }) : T(n) && T(a) ? D(function(l, c) {
111
- return t(l, r, c);
112
- }) : T(r) && T(a) ? D(function(l, c) {
113
- return t(n, l, c);
114
- }) : T(n) ? R(function(l) {
115
- return t(l, r, a);
116
- }) : T(r) ? R(function(l) {
117
- return t(n, l, a);
118
- }) : T(a) ? R(function(l) {
119
- return t(n, r, l);
108
+ return E(n) && E(r) && E(a) ? e : E(n) && E(r) ? D(function(s, c) {
109
+ return t(s, c, a);
110
+ }) : E(n) && E(a) ? D(function(s, c) {
111
+ return t(s, r, c);
112
+ }) : E(r) && E(a) ? D(function(s, c) {
113
+ return t(n, s, c);
114
+ }) : E(n) ? R(function(s) {
115
+ return t(s, r, a);
116
+ }) : E(r) ? R(function(s) {
117
+ return t(n, s, a);
118
+ }) : E(a) ? R(function(s) {
119
+ return t(n, r, s);
120
120
  }) : t(n, r, a);
121
121
  }
122
122
  };
@@ -139,8 +139,8 @@ function rn(t, e, n) {
139
139
  a += 1;
140
140
  }
141
141
  if (nn(r)) {
142
- var l = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
143
- return l(r);
142
+ var s = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
143
+ return s(r);
144
144
  }
145
145
  }
146
146
  return n.apply(this, arguments);
@@ -247,9 +247,9 @@ var rt = Object.prototype.toString, wt = /* @__PURE__ */ (function() {
247
247
  } : function(e) {
248
248
  if (Object(e) !== e)
249
249
  return [];
250
- var n, r, a = [], l = ot && wt(e);
250
+ var n, r, a = [], s = ot && wt(e);
251
251
  for (n in e)
252
- _e(n, e) && (!l || n !== "length") && (a[a.length] = n);
252
+ _e(n, e) && (!s || n !== "length") && (a[a.length] = n);
253
253
  if (vn)
254
254
  for (r = at.length - 1; r >= 0; )
255
255
  n = at[r], _e(n, e) && !pn(a, n) && (a[a.length] = n), r -= 1;
@@ -326,13 +326,13 @@ function Sn(t, e) {
326
326
  }
327
327
  const Ue = typeof Object.is == "function" ? Object.is : Sn;
328
328
  function dt(t, e, n, r) {
329
- var a = ut(t), l = ut(e);
329
+ var a = ut(t), s = ut(e);
330
330
  function c(A, I) {
331
331
  return qe(A, I, n.slice(), r.slice());
332
332
  }
333
333
  return !ct(function(A, I) {
334
334
  return !ct(c, I, A);
335
- }, l, a);
335
+ }, s, a);
336
336
  }
337
337
  function qe(t, e, n, r) {
338
338
  if (Ue(t, e))
@@ -368,10 +368,10 @@ function qe(t, e, n, r) {
368
368
  return !1;
369
369
  break;
370
370
  }
371
- for (var l = n.length - 1; l >= 0; ) {
372
- if (n[l] === t)
373
- return r[l] === e;
374
- l -= 1;
371
+ for (var s = n.length - 1; s >= 0; ) {
372
+ if (n[s] === t)
373
+ return r[s] === e;
374
+ s -= 1;
375
375
  }
376
376
  switch (a) {
377
377
  case "Map":
@@ -405,11 +405,11 @@ function qe(t, e, n, r) {
405
405
  if (c.length !== it(e).length)
406
406
  return !1;
407
407
  var A = n.concat([t]), I = r.concat([e]);
408
- for (l = c.length - 1; l >= 0; ) {
409
- var p = c[l];
410
- if (!(_e(p, e) && qe(e[p], t[p], A, I)))
408
+ for (s = c.length - 1; s >= 0; ) {
409
+ var h = c[s];
410
+ if (!(_e(h, e) && qe(e[h], t[h], A, I)))
411
411
  return !1;
412
- l -= 1;
412
+ s -= 1;
413
413
  }
414
414
  return !0;
415
415
  }
@@ -422,14 +422,14 @@ function bn(t) {
422
422
  var we = /* @__PURE__ */ D(function(e, n) {
423
423
  return n == null || n !== n ? e : n;
424
424
  });
425
- function In(t) {
425
+ function Tn(t) {
426
426
  var e = Object.prototype.toString.call(t);
427
427
  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]";
428
428
  }
429
- var Tn = /* @__PURE__ */ R(function(e) {
429
+ var In = /* @__PURE__ */ R(function(e) {
430
430
  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() : Oe(e) ? [] : Le(e) ? "" : bn(e) ? {} : wt(e) ? /* @__PURE__ */ (function() {
431
431
  return arguments;
432
- })() : In(e) ? e.constructor.from("") : void 0;
432
+ })() : Tn(e) ? e.constructor.from("") : void 0;
433
433
  }), En = /* @__PURE__ */ (function() {
434
434
  function t(e, n) {
435
435
  this.xf = n, this.f = e, this.idx = -1, this.found = !1;
@@ -451,13 +451,13 @@ var Tn = /* @__PURE__ */ R(function(e) {
451
451
  return -1;
452
452
  })
453
453
  ), On = /* @__PURE__ */ R(function(e) {
454
- return e != null && St(e, Tn(e));
454
+ return e != null && St(e, In(e));
455
455
  }), Ln = /* @__PURE__ */ D(function(e, n) {
456
456
  return e.map(function(r) {
457
- for (var a = n, l = 0, c; l < r.length; ) {
457
+ for (var a = n, s = 0, c; s < r.length; ) {
458
458
  if (a == null)
459
459
  return;
460
- c = r[l], a = mt(c) ? At(c, a) : a[c], l += 1;
460
+ c = r[s], a = mt(c) ? At(c, a) : a[c], s += 1;
461
461
  }
462
462
  return a;
463
463
  });
@@ -491,19 +491,20 @@ async function Ee() {
491
491
  }
492
492
  }
493
493
  const jn = () => ({
494
- openConnection: async (e, n, r, a = "viewerAsset") => await new Promise((A, I) => {
495
- const p = e + "?session=" + r + "&" + a + "=" + n;
496
- let s = null;
497
- const y = new WebSocket(p);
498
- y.onopen = () => {
499
- const w = { montage: "NOT_MONTAGED", packageId: n };
500
- y.send(JSON.stringify(w));
501
- }, y.onclose = () => {
502
- s && s.channelDetails ? A({ res: s.channelDetails, status: "websocket closed" }) : A({ res: null, status: "websocket closed without data" });
503
- }, y.onmessage = (w) => {
504
- s = JSON.parse(w.data), y.close();
505
- }, y.onerror = (w) => {
506
- console.error("WebSocket error:", w), I(w);
494
+ openConnection: async (e, n, r, a = "viewerAsset", s = null) => await new Promise((I, h) => {
495
+ let l = e + "?session=" + r + "&" + a + "=" + n;
496
+ s && a !== "package" && (l += "&package=" + s);
497
+ let g = null;
498
+ const w = new WebSocket(l);
499
+ w.onopen = () => {
500
+ const b = { montage: "NOT_MONTAGED", packageId: n };
501
+ w.send(JSON.stringify(b));
502
+ }, w.onclose = () => {
503
+ g && g.channelDetails ? I({ res: g.channelDetails, status: "websocket closed" }) : I({ res: null, status: "websocket closed without data" });
504
+ }, w.onmessage = (b) => {
505
+ g = JSON.parse(b.data), w.close();
506
+ }, w.onerror = (b) => {
507
+ console.error("WebSocket error:", b), h(b);
507
508
  };
508
509
  })
509
510
  }), K = /* @__PURE__ */ new Map();
@@ -514,22 +515,22 @@ function Ve(t = "default") {
514
515
  )), K.has(t))
515
516
  return K.get(t)();
516
517
  const e = Kt(`tsviewer-${t}`, () => {
517
- const n = Ht({}), r = m([]), a = m("NOT_MONTAGED"), l = m({}), c = m([]), A = m(null), I = m(null), p = m({}), s = m([]), y = m({}), w = m({}), _ = m("pointer"), { openConnection: U } = jn(), x = H(() => (o) => c.value.find((u) => u.name === o)), O = H(() => r.value.filter((o) => o.selected)), k = H(() => () => {
518
- const o = s.value.find((u) => u.selected);
519
- return o || (console.warn("No active layer found, available layers:", s.value), s.value.length > 0 ? s.value[0] : null);
518
+ const n = Ht({}), r = m([]), a = m("NOT_MONTAGED"), s = m({}), c = m([]), A = m(null), I = m(null), h = m({}), l = m([]), g = m({}), w = m({}), b = m("pointer"), { openConnection: U } = jn(), x = H(() => (o) => c.value.find((u) => u.name === o)), O = H(() => r.value.filter((o) => o.selected)), k = H(() => () => {
519
+ const o = l.value.find((u) => u.selected);
520
+ return o || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
520
521
  }), L = () => {
521
522
  let o = !1;
522
- return s.value.forEach((u, h) => {
523
- !u.id && u.id !== 0 && (console.error(`Layer at index ${h} missing ID:`, u), o = !0), u.annotations || (console.warn(`Layer at index ${h} missing annotations array:`, u), u.annotations = []);
524
- }), o && console.error("Annotation layer validation failed. Layers:", s.value), !o;
525
- }, q = H(() => (o) => s.value.flatMap((h) => h.annotations || []).find((h) => h.id === o)), f = (o) => {
526
- p.value = o;
523
+ return l.value.forEach((u, p) => {
524
+ !u.id && u.id !== 0 && (console.error(`Layer at index ${p} missing ID:`, u), o = !0), u.annotations || (console.warn(`Layer at index ${p} missing annotations array:`, u), u.annotations = []);
525
+ }), o && console.error("Annotation layer validation failed. Layers:", l.value), !o;
526
+ }, q = H(() => (o) => l.value.flatMap((p) => p.annotations || []).find((p) => p.id === o)), f = (o) => {
527
+ h.value = o;
527
528
  }, V = (o) => {
528
529
  r.value = o;
529
- }, E = (o) => {
530
+ }, _ = (o) => {
530
531
  a.value = o;
531
532
  }, j = (o) => {
532
- l.value = o;
533
+ s.value = o;
533
534
  }, N = (o) => {
534
535
  c.value = o;
535
536
  }, M = (o) => {
@@ -539,39 +540,39 @@ function Ve(t = "default") {
539
540
  }, F = (o) => {
540
541
  Object.assign(n, o);
541
542
  }, W = async (o) => {
542
- const u = o.viewerAssetId || null, h = o.packageId || null, P = u || h, ce = u ? "viewerAsset" : "package", De = await Ee();
543
+ const u = o.viewerAssetId || null, p = o.packageId || null, P = u || p, ce = u ? "viewerAsset" : "package", De = await Ee();
543
544
  let Me = n.timeseriesDiscoverApi, Ce = null;
544
- Ce = await U(Me, P, De, ce), f({ channels: Ce.res, content: { id: P, idType: ce } });
545
+ Ce = await U(Me, P, De, ce, u ? p : null), f({ channels: Ce.res, content: { id: P, idType: ce } });
545
546
  }, Y = () => (o) => {
546
- var h;
547
- return ((h = o == null ? void 0 : o.content) == null ? void 0 : h.state) === "READY";
547
+ var p;
548
+ return ((p = o == null ? void 0 : o.content) == null ? void 0 : p.state) === "READY";
548
549
  }, Q = (o) => {
549
- const u = o.map((h) => (!h.id && h.id !== 0 && (console.warn("Annotation layer missing ID:", h), h.id = Math.random().toString(36).substr(2, 9)), h.annotations || (h.annotations = []), h.name || (h.name = `Layer ${h.id}`), h));
550
- s.value = u;
550
+ const u = o.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));
551
+ l.value = u;
551
552
  }, le = (o) => {
552
553
  if (!o && o !== 0) {
553
554
  console.error("setActiveAnnotationLayer called with invalid layerId:", o);
554
555
  return;
555
556
  }
556
- y.value = o, s.value.forEach((h) => h.selected = !1);
557
- const u = G(z("id", o), s.value);
558
- u >= 0 ? s.value[u].selected = !0 : console.error("Layer with ID not found:", o, "Available layers:", s.value);
557
+ g.value = o, l.value.forEach((p) => p.selected = !1);
558
+ const u = G(z("id", o), l.value);
559
+ u >= 0 ? l.value[u].selected = !0 : console.error("Layer with ID not found:", o, "Available layers:", l.value);
559
560
  }, $ = (o) => {
560
- if (s.value.forEach(
561
+ if (l.value.forEach(
561
562
  (u) => {
562
- var h;
563
- return (h = u.annotations) == null ? void 0 : h.forEach((P) => P.selected = !1);
563
+ var p;
564
+ return (p = u.annotations) == null ? void 0 : p.forEach((P) => P.selected = !1);
564
565
  }
565
566
  ), o.id) {
566
- const u = G(z("id", o.layer_id), s.value);
567
+ const u = G(z("id", o.layer_id), l.value);
567
568
  if (u >= 0) {
568
- const h = G(z("id", o.id), s.value[u].annotations);
569
- h >= 0 && (s.value[u].annotations[h].selected = !0);
569
+ const p = G(z("id", o.id), l.value[u].annotations);
570
+ p >= 0 && (l.value[u].annotations[p].selected = !0);
570
571
  }
571
572
  }
572
573
  w.value = o;
573
574
  }, ee = (o) => {
574
- _.value = o;
575
+ b.value = o;
575
576
  }, B = (o) => {
576
577
  if (!o.id && o.id !== 0) {
577
578
  console.error("Cannot create layer without ID:", o);
@@ -592,48 +593,48 @@ function Ve(t = "default") {
592
593
  ...o
593
594
  // Spread any additional properties
594
595
  };
595
- s.value.push(u);
596
+ l.value.push(u);
596
597
  }, ue = (o) => {
597
- const u = G(z("id", o.id), s.value);
598
+ const u = G(z("id", o.id), l.value);
598
599
  if (u >= 0) {
599
- const h = Object.assign(s.value[u], o);
600
- s.value[u] = h;
600
+ const p = Object.assign(l.value[u], o);
601
+ l.value[u] = p;
601
602
  }
602
603
  }, ve = (o) => {
603
- const u = G(z("id", o.id), s.value);
604
- u >= 0 && s.value.splice(u, 1);
604
+ const u = G(z("id", o.id), l.value);
605
+ u >= 0 && l.value.splice(u, 1);
605
606
  }, te = (o) => {
606
- const u = G(z("id", o.layer_id), s.value);
607
- u >= 0 && (s.value[u].annotations || (s.value[u].annotations = []), s.value[u].annotations.push(o), $(o));
607
+ const u = G(z("id", o.layer_id), l.value);
608
+ u >= 0 && (l.value[u].annotations || (l.value[u].annotations = []), l.value[u].annotations.push(o), $(o));
608
609
  }, ne = (o) => {
609
- const u = G(z("id", o.layer_id), s.value);
610
+ const u = G(z("id", o.layer_id), l.value);
610
611
  if (u >= 0) {
611
- const h = s.value[u].annotations, P = G(z("id", o.id), h);
612
- P >= 0 && (h[P] = o);
612
+ const p = l.value[u].annotations, P = G(z("id", o.id), p);
613
+ P >= 0 && (p[P] = o);
613
614
  }
614
- }, g = (o) => {
615
- const u = G(z("id", o.layer_id), s.value);
615
+ }, y = (o) => {
616
+ const u = G(z("id", o.layer_id), l.value);
616
617
  if (u >= 0) {
617
- const h = s.value[u].annotations, P = G(z("id", o.id), h);
618
- P >= 0 && h.splice(P, 1);
618
+ const p = l.value[u].annotations, P = G(z("id", o.id), p);
619
+ P >= 0 && p.splice(P, 1);
619
620
  }
620
- }, b = (o, u, h) => {
621
+ }, T = (o, u, p) => {
621
622
  const P = r.value.find((ce) => ce.id === o);
622
- P && (P[u] = h);
623
+ P && (P[u] = p);
623
624
  };
624
625
  return {
625
626
  // State
626
627
  viewerChannels: r,
627
628
  viewerMontageScheme: a,
628
- customMontageMap: l,
629
+ customMontageMap: s,
629
630
  workspaceMontages: c,
630
631
  viewerErrors: A,
631
632
  needsRerender: I,
632
- viewerAnnotations: s,
633
- activeAnnotationLayer: y,
633
+ viewerAnnotations: l,
634
+ activeAnnotationLayer: g,
634
635
  activeAnnotation: w,
635
- activeViewer: p,
636
- viewerActiveTool: _,
636
+ activeViewer: h,
637
+ viewerActiveTool: b,
637
638
  config: n,
638
639
  // Getters
639
640
  getMontageMessageByName: x,
@@ -642,7 +643,7 @@ function Ve(t = "default") {
642
643
  getAnnotationById: q,
643
644
  // Actions
644
645
  setChannels: V,
645
- setViewerMontageScheme: E,
646
+ setViewerMontageScheme: _,
646
647
  setCustomMontageMap: j,
647
648
  setWorkspaceMontages: N,
648
649
  setViewerErrors: M,
@@ -655,20 +656,20 @@ function Ve(t = "default") {
655
656
  deleteLayer: ve,
656
657
  createAnnotation: te,
657
658
  updateAnnotation: ne,
658
- deleteAnnotation: g,
659
- updateChannelProperty: b,
659
+ deleteAnnotation: y,
660
+ updateChannelProperty: T,
660
661
  updateChannelVisibility: (o, u) => {
661
- b(o, "visible", u);
662
+ T(o, "visible", u);
662
663
  },
663
664
  updateChannelSelection: (o, u) => {
664
- b(o, "selected", u);
665
+ T(o, "selected", u);
665
666
  },
666
667
  updateChannelFilter: (o, u) => {
667
- b(o, "filter", u);
668
+ T(o, "filter", u);
668
669
  },
669
670
  validateAnnotationLayers: L,
670
671
  resetViewer: () => {
671
- r.value = [], a.value = "NOT_MONTAGED", l.value = {}, c.value = [], A.value = null, s.value = [], y.value = {}, w.value = {}, _.value = "pointer", p.value = {}, Object.keys(n).forEach((o) => {
672
+ r.value = [], a.value = "NOT_MONTAGED", s.value = {}, c.value = [], A.value = null, l.value = [], g.value = {}, w.value = {}, b.value = "pointer", h.value = {}, Object.keys(n).forEach((o) => {
672
673
  delete n[o];
673
674
  });
674
675
  },
@@ -713,9 +714,9 @@ var nr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
713
714
  function Pn(t) {
714
715
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
715
716
  }
716
- var Ie = { exports: {} }, pt;
717
+ var Te = { exports: {} }, pt;
717
718
  function Rn() {
718
- if (pt) return Ie.exports;
719
+ if (pt) return Te.exports;
719
720
  pt = 1;
720
721
  function t() {
721
722
  }
@@ -729,25 +730,25 @@ function Rn() {
729
730
  },
730
731
  once: function(e, n, r) {
731
732
  var a = this;
732
- function l() {
733
- a.off(e, l), n.apply(r, arguments);
733
+ function s() {
734
+ a.off(e, s), n.apply(r, arguments);
734
735
  }
735
- return l._ = n, this.on(e, l, r);
736
+ return s._ = n, this.on(e, s, r);
736
737
  },
737
738
  emit: function(e) {
738
- var n = [].slice.call(arguments, 1), r = ((this.e || (this.e = {}))[e] || []).slice(), a = 0, l = r.length;
739
- for (a; a < l; a++)
739
+ var n = [].slice.call(arguments, 1), r = ((this.e || (this.e = {}))[e] || []).slice(), a = 0, s = r.length;
740
+ for (a; a < s; a++)
740
741
  r[a].fn.apply(r[a].ctx, n);
741
742
  return this;
742
743
  },
743
744
  off: function(e, n) {
744
- var r = this.e || (this.e = {}), a = r[e], l = [];
745
+ var r = this.e || (this.e = {}), a = r[e], s = [];
745
746
  if (a && n)
746
747
  for (var c = 0, A = a.length; c < A; c++)
747
- a[c].fn !== n && a[c].fn._ !== n && l.push(a[c]);
748
- return l.length ? r[e] = l : delete r[e], this;
748
+ a[c].fn !== n && a[c].fn._ !== n && s.push(a[c]);
749
+ return s.length ? r[e] = s : delete r[e], this;
749
750
  }
750
- }, Ie.exports = t, Ie.exports.TinyEmitter = t, Ie.exports;
751
+ }, Te.exports = t, Te.exports.TinyEmitter = t, Te.exports;
751
752
  }
752
753
  var xe, ht;
753
754
  function Nn() {
@@ -757,11 +758,11 @@ function Nn() {
757
758
  return xe = new t(), xe;
758
759
  }
759
760
  var Un = Nn();
760
- const Te = /* @__PURE__ */ Pn(Un), ie = {
761
- $emit: (...t) => Te.emit(...t),
762
- $on: (...t) => Te.on(...t),
763
- $off: (...t) => Te.off(...t),
764
- $once: (...t) => Te.once(...t)
761
+ const Ie = /* @__PURE__ */ Pn(Un), ie = {
762
+ $emit: (...t) => Ie.emit(...t),
763
+ $on: (...t) => Ie.on(...t),
764
+ $off: (...t) => Ie.off(...t),
765
+ $once: (...t) => Ie.once(...t)
765
766
  }, xn = (t) => Object.prototype.toString.call(t) === "[object String]", $n = (t) => {
766
767
  Object.keys(t).forEach((e) => {
767
768
  xn(t[e]) && (t[e] = t[e].trim());
@@ -770,11 +771,11 @@ const Te = /* @__PURE__ */ Pn(Un), ie = {
770
771
  function rr(t, e) {
771
772
  if (!t)
772
773
  return Promise.reject({ status: 400, message: "Url is missing!" });
773
- const n = me("GET", "method", e), r = me({}, "header", e), a = Object.assign({}, { "Content-type": "application/json" }, r), l = se("body", e);
774
+ const n = me("GET", "method", e), r = me({}, "header", e), a = Object.assign({}, { "Content-type": "application/json" }, r), s = se("body", e);
774
775
  let c = { headers: a, method: n };
775
- if (l) {
776
- typeof l == "object" && $n(l);
777
- const A = JSON.stringify(l);
776
+ if (s) {
777
+ typeof s == "object" && $n(s);
778
+ const A = JSON.stringify(s);
778
779
  c = Object.assign({}, c, { body: A });
779
780
  }
780
781
  return fetch(t, c).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
@@ -789,7 +790,7 @@ function $e(t) {
789
790
  n = t.status;
790
791
  if (n === 400 && t.body)
791
792
  t.body.getReader().read().then(({ done: r, value: a }) => {
792
- const l = a instanceof Uint8Array ? String.fromCharCode.apply(null, a) : a, c = lt(we(l), kn(lt(se("message"), JSON.parse), (A, I) => I))(l);
793
+ const s = a instanceof Uint8Array ? String.fromCharCode.apply(null, a) : a, c = lt(we(s), kn(lt(se("message"), JSON.parse), (A, I) => I))(s);
793
794
  ie.$emit("ajaxError", {
794
795
  detail: {
795
796
  type: "error",
@@ -820,9 +821,9 @@ function $e(t) {
820
821
  }
821
822
  }
822
823
  function Fn(t = null) {
823
- const e = t || Zt("viewerStore", null) || Ve("default"), { viewerChannels: n, viewerAnnotations: r } = Fe(e), a = (p) => p.id || "", l = (p) => {
824
- p.sort(function(y, w) {
825
- return y.start < w.start ? -1 : y.start > w.start ? 1 : 0;
824
+ const e = t || Zt("viewerStore", null) || Ve("default"), { viewerChannels: n, viewerAnnotations: r } = Fe(e), a = (h) => h.id || "", s = (h) => {
825
+ h.sort(function(g, w) {
826
+ return g.start < w.start ? -1 : g.start > w.start ? 1 : 0;
826
827
  });
827
828
  };
828
829
  return {
@@ -832,42 +833,42 @@ function Fn(t = null) {
832
833
  viewerAnnotations: r,
833
834
  // Now from Pinia
834
835
  // Methods
835
- addAnnotation: async (p = null) => {
836
- const s = p || activeAnnotation.value;
837
- if (!s || !s.layer_id)
838
- throw new TypeError("Missing annotation data or layer_id", s);
839
- if (s.id)
840
- throw new TypeError("Trying to create an annotation that already exists", s.id);
841
- let y = s.start, w = s.duration || s.end - s.start;
842
- const _ = s.label, U = s.description, x = s.layer_id;
843
- if (!_)
836
+ addAnnotation: async (h = null) => {
837
+ const l = h || activeAnnotation.value;
838
+ if (!l || !l.layer_id)
839
+ throw new TypeError("Missing annotation data or layer_id", l);
840
+ if (l.id)
841
+ throw new TypeError("Trying to create an annotation that already exists", l.id);
842
+ let g = l.start, w = l.duration || l.end - l.start;
843
+ const b = l.label, U = l.description, x = l.layer_id;
844
+ if (!b)
844
845
  throw new Error("Annotation label is required");
845
- if (y == null)
846
+ if (g == null)
846
847
  throw new Error("Annotation start time is required");
847
- w < 0 && (w = -w, y = y - w);
848
+ w < 0 && (w = -w, g = g - w);
848
849
  let O = [];
849
- if (s.allChannels) {
850
+ if (l.allChannels) {
850
851
  const f = e.activeViewer.channels;
851
852
  for (let V = 0; V < f.length; V++) {
852
- const E = f[V], j = a(E);
853
+ const _ = f[V], j = a(_);
853
854
  O.push(j);
854
855
  }
855
- } else if (s.channelIds && Array.isArray(s.channelIds) && s.channelIds.length > 0)
856
- O = s.channelIds;
856
+ } else if (l.channelIds && Array.isArray(l.channelIds) && l.channelIds.length > 0)
857
+ O = l.channelIds;
857
858
  else
858
859
  for (let f = 0; f < n.value.length; f++) {
859
860
  const V = n.value[f];
860
861
  if (V.selected && V.visible) {
861
- const E = a(V);
862
- O.push(E);
862
+ const _ = a(V);
863
+ O.push(_);
863
864
  }
864
865
  }
865
866
  const k = {
866
- label: _,
867
- name: _,
867
+ label: b,
868
+ name: b,
868
869
  description: U || "",
869
- start: Math.floor(y),
870
- end: Math.floor(y + w),
870
+ start: Math.floor(g),
871
+ end: Math.floor(g + w),
871
872
  channelIds: O
872
873
  }, L = e.activeViewer.content.id, q = `${e.config.apiUrl}/timeseries/${L}/layers/${x}/annotations`;
873
874
  try {
@@ -883,51 +884,51 @@ function Fn(t = null) {
883
884
  const M = await V.text();
884
885
  throw new Error(`HTTP ${V.status}: ${M}`);
885
886
  }
886
- const E = await V.json(), j = {
887
+ const _ = await V.json(), j = {
887
888
  name: "",
888
- id: E.id,
889
- label: E.label,
890
- description: E.description,
891
- start: E.start,
892
- duration: E.end - E.start,
893
- end: E.end,
889
+ id: _.id,
890
+ label: _.label,
891
+ description: _.description,
892
+ start: _.start,
893
+ duration: _.end - _.start,
894
+ end: _.end,
894
895
  cStart: null,
895
896
  cEnd: null,
896
897
  selected: !0,
897
- channelIds: E.channelIds || O,
898
+ channelIds: _.channelIds || O,
898
899
  allChannels: O.length === 0 || O.length >= n.value.length,
899
900
  // Use Pinia
900
901
  layer_id: x,
901
- userId: E.userId
902
+ userId: _.userId
902
903
  };
903
- E.linkedPackage && (j.linkedPackage = E.linkedPackage);
904
+ _.linkedPackage && (j.linkedPackage = _.linkedPackage);
904
905
  let N = 0;
905
906
  for (let M = 0; M < r.value.length; M++)
906
907
  if (r.value[M].id === x) {
907
908
  N = M;
908
909
  break;
909
910
  }
910
- return e.createAnnotation(j), r.value[N] && r.value[N].annotations && l(r.value[N].annotations), j;
911
+ return e.createAnnotation(j), r.value[N] && r.value[N].annotations && s(r.value[N].annotations), j;
911
912
  } catch (f) {
912
913
  throw console.error("🔧 useTsAnnotation: Error creating annotation:", f), $e(f), f;
913
914
  }
914
915
  },
915
- updateAnnotation: async (p = null) => {
916
- const s = p || activeAnnotation.value;
917
- if (!s.id)
918
- throw new TypeError("Trying to update an annotation that doesn't exist on server", s.id);
919
- if (!s.layer_id)
920
- throw new TypeError("Missing layer_id for annotation update", s);
921
- let y = s.start, w = s.duration || s.end - s.start;
922
- w < 0 && (w = -w, y = y - w);
923
- const _ = {
924
- name: s.label,
925
- label: s.label,
926
- description: s.description || "",
927
- start: Math.floor(y),
928
- end: Math.floor(y + w),
929
- channelIds: s.channelIds || []
930
- }, U = e.activeViewer.content.id, x = `${e.config.apiUrl}/timeseries/${U}/layers/${s.layer_id}/annotations/${s.id}`;
916
+ updateAnnotation: async (h = null) => {
917
+ const l = h || activeAnnotation.value;
918
+ if (!l.id)
919
+ throw new TypeError("Trying to update an annotation that doesn't exist on server", l.id);
920
+ if (!l.layer_id)
921
+ throw new TypeError("Missing layer_id for annotation update", l);
922
+ let g = l.start, w = l.duration || l.end - l.start;
923
+ w < 0 && (w = -w, g = g - w);
924
+ const b = {
925
+ name: l.label,
926
+ label: l.label,
927
+ description: l.description || "",
928
+ start: Math.floor(g),
929
+ end: Math.floor(g + w),
930
+ channelIds: l.channelIds || []
931
+ }, U = e.activeViewer.content.id, x = `${e.config.apiUrl}/timeseries/${U}/layers/${l.layer_id}/annotations/${l.id}`;
931
932
  try {
932
933
  const O = await Ee(), k = await fetch(`${x}?api_key=${O}`, {
933
934
  method: "PUT",
@@ -935,14 +936,14 @@ function Fn(t = null) {
935
936
  "Content-Type": "application/json",
936
937
  Accept: "application/json"
937
938
  },
938
- body: JSON.stringify(_)
939
+ body: JSON.stringify(b)
939
940
  });
940
941
  if (!k.ok) {
941
942
  const f = await k.text();
942
943
  throw new Error(`HTTP ${k.status}: ${f}`);
943
944
  }
944
945
  const L = await k.json(), q = {
945
- ...s,
946
+ ...l,
946
947
  ...L,
947
948
  duration: L.end - L.start
948
949
  };
@@ -951,15 +952,15 @@ function Fn(t = null) {
951
952
  throw console.error("🔧 useTsAnnotation: Error updating annotation:", O), $e(O), O;
952
953
  }
953
954
  },
954
- removeAnnotation: async (p) => {
955
- if (!p || !p.id)
956
- throw new TypeError("Invalid annotation for deletion", p);
957
- let s = "";
958
- if (p.layer ? s = p.layer.id : s = p.layer_id, !s)
959
- throw new TypeError("Missing layer_id for annotation deletion", p);
960
- const y = e.activeViewer.content.id, w = `${e.config.apiUrl}/timeseries/${y}/layers/${s}/annotations/${p.id}`;
955
+ removeAnnotation: async (h) => {
956
+ if (!h || !h.id)
957
+ throw new TypeError("Invalid annotation for deletion", h);
958
+ let l = "";
959
+ if (h.layer ? l = h.layer.id : l = h.layer_id, !l)
960
+ throw new TypeError("Missing layer_id for annotation deletion", h);
961
+ const g = e.activeViewer.content.id, w = `${e.config.apiUrl}/timeseries/${g}/layers/${l}/annotations/${h.id}`;
961
962
  try {
962
- const _ = await Ee(), U = await fetch(`${w}?api_key=${_}`, {
963
+ const b = await Ee(), U = await fetch(`${w}?api_key=${b}`, {
963
964
  method: "DELETE",
964
965
  headers: {
965
966
  Accept: "application/json"
@@ -969,24 +970,24 @@ function Fn(t = null) {
969
970
  const x = await U.text();
970
971
  throw new Error(`HTTP ${U.status}: ${x}`);
971
972
  }
972
- return e.deleteAnnotation(p), !0;
973
- } catch (_) {
974
- throw console.error("🔧 useTsAnnotation: Error deleting annotation:", _), $e(_), _;
973
+ return e.deleteAnnotation(h), !0;
974
+ } catch (b) {
975
+ throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b), $e(b), b;
975
976
  }
976
977
  },
977
- sortAnns: l,
978
+ sortAnns: s,
978
979
  getChannelId: a
979
980
  };
980
981
  }
981
982
  function Wn() {
982
983
  const t = (e) => {
983
- const n = be("", ["detail", "msg"], e), r = me(n, "msg", e), a = be("info", ["detail", "type"], e).toLowerCase(), l = be(!1, ["detail", "showClose"], e), c = be(3e3, ["detail", "duration"], e);
984
+ const n = be("", ["detail", "msg"], e), r = me(n, "msg", e), a = be("info", ["detail", "type"], e).toLowerCase(), s = be(!1, ["detail", "showClose"], e), c = be(3e3, ["detail", "duration"], e);
984
985
  r && en({
985
986
  message: r,
986
987
  type: a,
987
988
  center: !0,
988
989
  duration: c,
989
- showClose: l,
990
+ showClose: s,
990
991
  dangerouslyUseHTMLString: !0
991
992
  });
992
993
  };
@@ -1028,7 +1029,7 @@ const qn = (t, e) => {
1028
1029
  }
1029
1030
  },
1030
1031
  setup(t, { expose: e }) {
1031
- const n = re(() => import("./TSScrubber-Dajtd-ud.js")), r = re(() => import("./TSViewerCanvas-XWBUIuF1.js").then((i) => i.T)), a = re(() => import("./TSViewerToolbar-BvDdoOiz.js")), l = re(() => import("./TSFilterModal-B9JkIYGi.js")), c = re(() => import("./TSAnnotationModal-CcWNjBv6.js")), A = re(() => import("./TsAnnotationDeleteDialog-BnN0eMFf.js")), I = re(() => import("./TSViewerLayerWindow-D6IXVgCL.js")), p = {
1032
+ const n = re(() => import("./TSScrubber-hN5JY-DA.js")), r = re(() => import("./TSViewerCanvas-2Jz9ZgqW.js").then((i) => i.T)), a = re(() => import("./TSViewerToolbar-DL9XKYbV.js")), s = re(() => import("./TSFilterModal-DHBpbDNp.js")), c = re(() => import("./TSAnnotationModal-B3OSl05U.js")), A = re(() => import("./TsAnnotationDeleteDialog-DXgN07Wj.js")), I = re(() => import("./TSViewerLayerWindow-CalBmhT6.js")), h = {
1032
1033
  TIMEUNIT: "microSeconds",
1033
1034
  // Basis for time
1034
1035
  XOFFSET: 0,
@@ -1065,16 +1066,16 @@ const qn = (t, e) => {
1065
1066
  // Maximum duration window (5min)
1066
1067
  INITDURATION: 15e6
1067
1068
  // Initial duration window (15sec)
1068
- }, s = t, y = Ve(s.instanceId), { viewerChannels: w, needsRerender: _ } = Fe(y);
1069
- Je("viewerStore", y), Je("viewerInstanceId", s.instanceId), Wn();
1069
+ }, l = t, g = Ve(l.instanceId), { viewerChannels: w, needsRerender: b } = Fe(g);
1070
+ Je("viewerStore", g), Je("viewerInstanceId", l.instanceId), Wn();
1070
1071
  const {
1071
1072
  addAnnotation: U,
1072
1073
  updateAnnotation: x,
1073
1074
  removeAnnotation: O
1074
- } = Fn(y), k = m(null), L = m(null), q = m(null), f = m(null), V = m(null), E = m(null), j = m(null), N = m(null), M = m(0), J = m(0), F = m(0), W = m(0), Y = m(0), Q = m(0), le = m(0), $ = m(1), ee = m(1 / 10), B = m(!1), ue = m(!1), ve = m(null), te = m(!1), ne = m(!1), g = H(() => y.activeViewer), b = H(() => w.value.map((i) => ({
1075
+ } = Fn(g), k = m(null), L = m(null), q = m(null), f = m(null), V = m(null), _ = m(null), j = m(null), N = m(null), M = m(0), J = m(0), F = m(0), W = m(0), Y = m(0), Q = m(0), le = m(0), $ = m(1), ee = m(1 / 10), B = m(!1), ue = m(!1), ve = m(null), te = m(!1), ne = m(!1), y = H(() => g.activeViewer), T = H(() => w.value.map((i) => ({
1075
1076
  ...i,
1076
1077
  selected: !!i.selected
1077
- }))), X = H(() => b.value.filter((i) => i.visible)), Z = H(() => {
1078
+ }))), X = H(() => T.value.filter((i) => i.visible)), Z = H(() => {
1078
1079
  let i = !1;
1079
1080
  return Q.value / ke.value < 30 && (i = !0), i;
1080
1081
  }), ke = H(() => X.value.length), pe = async () => {
@@ -1083,12 +1084,12 @@ const qn = (t, e) => {
1083
1084
  const i = document.getElementById("ts_viewer");
1084
1085
  if (!i)
1085
1086
  return;
1086
- const d = window.getComputedStyle(i, null), v = parseInt(d.getPropertyValue("height")), C = s.isPreview ? 0 : 100;
1087
+ const d = window.getComputedStyle(i, null), v = parseInt(d.getPropertyValue("height")), C = l.isPreview ? 0 : 100;
1087
1088
  M.value = v - C, await fe(), J.value = k.value.offsetWidth;
1088
1089
  const S = q.value;
1089
1090
  S && (le.value = S.clientWidth, Y.value = J.value - S.clientWidth - 16, Q.value = M.value - 40);
1090
1091
  };
1091
- Pe(() => g.value, async (i, d) => {
1092
+ Pe(() => y.value, async (i, d) => {
1092
1093
  var v, C, S;
1093
1094
  (v = L.value) != null && v.resetComponentState && L.value.resetComponentState(), i && i.channels && i.channels.length > 0 && He(), Ze(), await fe(), (C = L.value) != null && C.initSegmentSpans && L.value.initSegmentSpans(), (S = L.value) != null && S.getAnnotations && L.value.getAnnotations();
1094
1095
  }, { immediate: !1, deep: !0 }), Pe(ke, (i, d) => {
@@ -1098,16 +1099,16 @@ const qn = (t, e) => {
1098
1099
  }, 20);
1099
1100
  });
1100
1101
  const je = (i) => {
1101
- y.setActiveAnnotation(i), f.value.renderAnnotationCanvas(), B.value = !0;
1102
+ g.setActiveAnnotation(i), f.value.renderAnnotationCanvas(), B.value = !0;
1102
1103
  };
1103
- Pe(_, (i) => {
1104
+ Pe(b, (i) => {
1104
1105
  i && (fe(() => {
1105
1106
  var d;
1106
1107
  i.cause === "channel-visibility" ? setTimeout(() => {
1107
1108
  var v;
1108
1109
  pe(), (v = f.value) != null && v.renderAll && f.value.renderAll();
1109
1110
  }, 10) : (d = f.value) != null && d.renderAll && f.value.renderAll();
1110
- }), y.resetRerenderTrigger(null));
1111
+ }), g.resetRerenderTrigger(null));
1111
1112
  }, { deep: !0 });
1112
1113
  const Be = (i) => {
1113
1114
  je(i);
@@ -1128,7 +1129,7 @@ const qn = (t, e) => {
1128
1129
  }
1129
1130
  }, u = () => {
1130
1131
  f.value.renderAnnotationCanvas();
1131
- }, h = (i) => {
1132
+ }, p = (i) => {
1132
1133
  ve.value = i, te.value = !0;
1133
1134
  }, P = async (i) => {
1134
1135
  te.value = !1;
@@ -1144,7 +1145,7 @@ const qn = (t, e) => {
1144
1145
  console.error("Invalid layer provided to onAddAnnotation:", Se);
1145
1146
  return;
1146
1147
  }
1147
- const Bt = y.viewerSelectedChannels || [], Xt = v ? [] : Bt.map((zt) => zt.id), Gt = {
1148
+ const Bt = g.viewerSelectedChannels || [], Xt = v ? [] : Bt.map((zt) => zt.id), Gt = {
1148
1149
  id: null,
1149
1150
  label: C || "Event",
1150
1151
  description: S || "",
@@ -1157,7 +1158,7 @@ const qn = (t, e) => {
1157
1158
  selected: !0,
1158
1159
  userId: null
1159
1160
  };
1160
- y.setActiveAnnotation(Gt), B.value = !0;
1161
+ g.setActiveAnnotation(Gt), B.value = !0;
1161
1162
  }, Me = () => {
1162
1163
  f.value.renderAnnotationCanvas();
1163
1164
  }, Ce = (i) => {
@@ -1166,9 +1167,9 @@ const qn = (t, e) => {
1166
1167
  ue.value = !1;
1167
1168
  }, bt = () => {
1168
1169
  f.value.resetFocusedAnnotation(), f.value.renderAnnotationCanvas(), B.value = !1;
1169
- }, It = () => {
1170
+ }, Tt = () => {
1170
1171
  ne.value = !1;
1171
- }, Tt = (i) => {
1172
+ }, It = (i) => {
1172
1173
  i.stopPropagation(), i.preventDefault();
1173
1174
  const d = i.detail.sourceEvent.metaKey;
1174
1175
  Ge({ channelId: i.currentTarget.dataset.id, append: d }), f.value.renderAll();
@@ -1205,7 +1206,7 @@ const qn = (t, e) => {
1205
1206
  });
1206
1207
  }, Pt = (i) => {
1207
1208
  let d = f.value.rsPeriod;
1208
- de(i.annotation.start - (ee.value * Y.value - p.CURSOROFFSET) * d), fe(() => {
1209
+ de(i.annotation.start - (ee.value * Y.value - h.CURSOROFFSET) * d), fe(() => {
1209
1210
  var v;
1210
1211
  (v = f.value) == null || v.renderAll();
1211
1212
  });
@@ -1214,10 +1215,10 @@ const qn = (t, e) => {
1214
1215
  const C = v.selected;
1215
1216
  return i.append === !1 && (v.selected = !1), i.channelId === v.id && (v.selected = !C), v;
1216
1217
  });
1217
- y.setChannels(d);
1218
+ g.setChannels(d);
1218
1219
  }, Rt = (i, d) => {
1219
1220
  const v = w.value.map((C) => (d === !1 && (C.selected = !1), C.id in i && (C.selected = !0), C));
1220
- y.setChannels(v);
1221
+ g.setChannels(v);
1221
1222
  }, de = (i) => {
1222
1223
  F.value = i;
1223
1224
  }, Nt = (i) => {
@@ -1225,10 +1226,10 @@ const qn = (t, e) => {
1225
1226
  }, Ut = (i) => {
1226
1227
  $.value = i;
1227
1228
  }, ze = (i) => {
1228
- i > p.MAXDURATION ? W.value = p.MAXDURATION : W.value = i;
1229
- }, xt = (i, d, v) => (p.DEFAULTDPI * window.devicePixelRatio / (d * v) / 25.4).toFixed(1) + " " + i.unit + "/mm", He = () => {
1229
+ i > h.MAXDURATION ? W.value = h.MAXDURATION : W.value = i;
1230
+ }, xt = (i, d, v) => (h.DEFAULTDPI * window.devicePixelRatio / (d * v) / 25.4).toFixed(1) + " " + i.unit + "/mm", He = () => {
1230
1231
  var d;
1231
- const i = (d = g.value) == null ? void 0 : d.channels;
1232
+ const i = (d = y.value) == null ? void 0 : d.channels;
1232
1233
  if (i && i.length > 0) {
1233
1234
  j.value = i[0].start, N.value = i[0].end;
1234
1235
  for (let v = 1; v < i.length; v++)
@@ -1256,15 +1257,15 @@ const qn = (t, e) => {
1256
1257
  return;
1257
1258
  }
1258
1259
  var d = window.getComputedStyle(i, null);
1259
- const v = parseInt(d.getPropertyValue("height")), C = s.isPreview ? 0 : 100;
1260
+ const v = parseInt(d.getPropertyValue("height")), C = l.isPreview ? 0 : 100;
1260
1261
  M.value = v - C, k.value && (J.value = k.value.offsetWidth), window.addEventListener("resize", pe);
1261
1262
  const S = q.value;
1262
- S && (le.value = S.clientWidth, Y.value = J.value - S.clientWidth - 5 - 10, Q.value = M.value - 88), W.value = p.INITDURATION, Ze();
1263
+ S && (le.value = S.clientWidth, Y.value = J.value - S.clientWidth - 5 - 10, Q.value = M.value - 88), W.value = h.INITDURATION, Ze();
1263
1264
  }), gt(() => {
1264
- window.removeEventListener("resize", pe), Dn(s.instanceId);
1265
+ window.removeEventListener("resize", pe), Dn(l.instanceId);
1265
1266
  }), e({
1266
1267
  openEditAnnotationDialog: je,
1267
- confirmDeleteAnnotation: h,
1268
+ confirmDeleteAnnotation: p,
1268
1269
  selectAnnotation: Pt,
1269
1270
  selectChannel: Ge,
1270
1271
  selectChannels: Rt,
@@ -1289,8 +1290,8 @@ const qn = (t, e) => {
1289
1290
  "cursor-loc": ee.value,
1290
1291
  start: F.value,
1291
1292
  duration: W.value,
1292
- constants: p,
1293
- "active-viewer": g.value,
1293
+ constants: h,
1294
+ "active-viewer": y.value,
1294
1295
  onSetStart: de
1295
1296
  }, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
1296
1297
  ge("div", Bn, [
@@ -1303,7 +1304,7 @@ const qn = (t, e) => {
1303
1304
  key: S.displayName,
1304
1305
  class: "chLabelWrap",
1305
1306
  "data-id": S.id,
1306
- onTap: Tt
1307
+ onTap: It
1307
1308
  }, [
1308
1309
  ge("div", {
1309
1310
  class: Ne([S.selected ? "labelDiv selected" : "labelDiv"])
@@ -1319,7 +1320,7 @@ const qn = (t, e) => {
1319
1320
  ], 10, Gn)
1320
1321
  ], 40, Xn))), 128))
1321
1322
  ], 512),
1322
- (C = (v = g.value) == null ? void 0 : v.content) != null && C.id ? (he(), Ye(ae(r), {
1323
+ (C = (v = y.value) == null ? void 0 : v.content) != null && C.id ? (he(), Ye(ae(r), {
1323
1324
  key: 0,
1324
1325
  ref_key: "viewerCanvas",
1325
1326
  ref: f,
@@ -1329,12 +1330,12 @@ const qn = (t, e) => {
1329
1330
  start: F.value,
1330
1331
  "c-width": Y.value,
1331
1332
  "c-height": Q.value,
1332
- constants: p,
1333
+ constants: h,
1333
1334
  "ts-start": j.value,
1334
1335
  "ts-end": N.value,
1335
1336
  "cursor-loc": ee.value,
1336
1337
  "global-zoom-mult": $.value,
1337
- "active-viewer": g.value,
1338
+ "active-viewer": y.value,
1338
1339
  onSetStart: de,
1339
1340
  onSetCursor: Nt,
1340
1341
  onSetGlobalZoom: Ut,
@@ -1348,7 +1349,7 @@ const qn = (t, e) => {
1348
1349
  ]),
1349
1350
  t.isPreview ? Ke("", !0) : (he(), Ye(ae(a), {
1350
1351
  key: 0,
1351
- constants: p,
1352
+ constants: h,
1352
1353
  duration: W.value,
1353
1354
  start: F.value,
1354
1355
  globalZoomMult: $.value,
@@ -1362,16 +1363,16 @@ const qn = (t, e) => {
1362
1363
  onPreviousAnnotation: _t,
1363
1364
  onSetStart: de
1364
1365
  }, null, 8, ["duration", "start", "globalZoomMult"])),
1365
- ye(ae(l), {
1366
+ ye(ae(s), {
1366
1367
  ref_key: "filterWindow",
1367
1368
  ref: V,
1368
1369
  visible: ne.value,
1369
1370
  "onUpdate:visible": d[1] || (d[1] = (S) => ne.value = S),
1370
- onCloseWindow: It
1371
+ onCloseWindow: Tt
1371
1372
  }, null, 8, ["visible"]),
1372
1373
  ye(ae(c), {
1373
1374
  ref_key: "annotationModal",
1374
- ref: E,
1375
+ ref: _,
1375
1376
  visible: B.value,
1376
1377
  "onUpdate:visible": d[2] || (d[2] = (S) => B.value = S),
1377
1378
  onCloseWindow: bt,
@@ -1397,18 +1398,18 @@ function ar(t = "default") {
1397
1398
  viewerChannels: n,
1398
1399
  viewerAnnotations: r,
1399
1400
  viewerActiveTool: a,
1400
- viewerSelectedChannels: l,
1401
+ viewerSelectedChannels: s,
1401
1402
  activeAnnotation: c,
1402
1403
  activeAnnotationLayer: A,
1403
1404
  viewerMontageScheme: I,
1404
- viewerErrors: p,
1405
- config: s,
1406
- activeViewer: y
1407
- } = Fe(e), w = oe(n), _ = H(() => l.value), U = oe(r), x = oe(a), O = oe(I), k = oe(p), L = oe(s), q = oe(y);
1405
+ viewerErrors: h,
1406
+ config: l,
1407
+ activeViewer: g
1408
+ } = Fe(e), w = oe(n), b = H(() => s.value), U = oe(r), x = oe(a), O = oe(I), k = oe(h), L = oe(l), q = oe(g);
1408
1409
  return {
1409
1410
  // Readonly state
1410
1411
  channels: w,
1411
- selectedChannels: _,
1412
+ selectedChannels: b,
1412
1413
  annotations: U,
1413
1414
  activeTool: x,
1414
1415
  montageScheme: O,
@@ -1416,78 +1417,78 @@ function ar(t = "default") {
1416
1417
  viewerConfig: L,
1417
1418
  viewer: q,
1418
1419
  // State queries
1419
- getChannel: (g) => n.value.find((b) => b.id === g),
1420
- getAnnotation: (g) => e.getAnnotationById(g),
1420
+ getChannel: (y) => n.value.find((T) => T.id === y),
1421
+ getAnnotation: (y) => e.getAnnotationById(y),
1421
1422
  getActiveLayer: () => e.getViewerActiveLayer(),
1422
- getVisibleChannels: () => n.value.filter((g) => g.visible),
1423
+ getVisibleChannels: () => n.value.filter((y) => y.visible),
1423
1424
  getState: () => ({
1424
1425
  channels: n.value,
1425
- selectedChannels: l.value,
1426
+ selectedChannels: s.value,
1426
1427
  annotations: r.value,
1427
1428
  activeLayer: e.getViewerActiveLayer(),
1428
1429
  activeTool: a.value,
1429
1430
  montageScheme: I.value,
1430
- errors: p.value
1431
+ errors: h.value
1431
1432
  }),
1432
1433
  // Channel controls
1433
- selectChannels: (g, b = !1) => {
1434
+ selectChannels: (y, T = !1) => {
1434
1435
  const X = n.value.map((Z) => ({
1435
1436
  ...Z,
1436
- selected: b ? Z.selected : !1
1437
+ selected: T ? Z.selected : !1
1437
1438
  }));
1438
1439
  X.forEach((Z) => {
1439
- g.includes(Z.id) && (Z.selected = !0);
1440
+ y.includes(Z.id) && (Z.selected = !0);
1440
1441
  }), e.setChannels(X);
1441
1442
  },
1442
1443
  clearChannelSelection: () => {
1443
- const g = n.value.map((b) => ({
1444
- ...b,
1444
+ const y = n.value.map((T) => ({
1445
+ ...T,
1445
1446
  selected: !1
1446
1447
  }));
1447
- e.setChannels(g);
1448
+ e.setChannels(y);
1448
1449
  },
1449
- toggleChannelVisibility: (g) => {
1450
- const b = n.value.find((X) => X.id === g);
1451
- b && (e.updateChannelVisibility(g, !b.visible), e.triggerRerender("channel-visibility"));
1450
+ toggleChannelVisibility: (y) => {
1451
+ const T = n.value.find((X) => X.id === y);
1452
+ T && (e.updateChannelVisibility(y, !T.visible), e.triggerRerender("channel-visibility"));
1452
1453
  },
1453
- setChannelVisibility: (g, b) => {
1454
- e.updateChannelVisibility(g, b), e.triggerRerender("channel-visibility");
1454
+ setChannelVisibility: (y, T) => {
1455
+ e.updateChannelVisibility(y, T), e.triggerRerender("channel-visibility");
1455
1456
  },
1456
1457
  showAllChannels: () => {
1457
- n.value.forEach((g) => {
1458
- e.updateChannelVisibility(g.id, !0);
1458
+ n.value.forEach((y) => {
1459
+ e.updateChannelVisibility(y.id, !0);
1459
1460
  }), e.triggerRerender("channel-visibility");
1460
1461
  },
1461
1462
  hideAllChannels: () => {
1462
- n.value.forEach((g) => {
1463
- e.updateChannelVisibility(g.id, !1);
1463
+ n.value.forEach((y) => {
1464
+ e.updateChannelVisibility(y.id, !1);
1464
1465
  }), e.triggerRerender("channel-visibility");
1465
1466
  },
1466
1467
  // Annotation controls
1467
- selectAnnotation: (g) => {
1468
- const b = e.getAnnotationById(g);
1469
- b && e.setActiveAnnotation(b);
1468
+ selectAnnotation: (y) => {
1469
+ const T = e.getAnnotationById(y);
1470
+ T && e.setActiveAnnotation(T);
1470
1471
  },
1471
- setActiveLayer: (g) => {
1472
- e.setActiveAnnotationLayer(g);
1472
+ setActiveLayer: (y) => {
1473
+ e.setActiveAnnotationLayer(y);
1473
1474
  },
1474
- toggleLayerVisibility: (g) => {
1475
- const b = r.value.find((X) => X.id === g);
1476
- b && (b.visible = !b.visible, e.updateLayer(b), e.triggerRerender("layer-visibility"));
1475
+ toggleLayerVisibility: (y) => {
1476
+ const T = r.value.find((X) => X.id === y);
1477
+ T && (T.visible = !T.visible, e.updateLayer(T), e.triggerRerender("layer-visibility"));
1477
1478
  },
1478
1479
  // Tool controls
1479
- setActiveTool: (g) => {
1480
- e.setActiveTool(g);
1480
+ setActiveTool: (y) => {
1481
+ e.setActiveTool(y);
1481
1482
  },
1482
1483
  // Viewer controls
1483
- setConfig: (g) => {
1484
- e.setViewerConfig(g);
1484
+ setConfig: (y) => {
1485
+ e.setViewerConfig(y);
1485
1486
  },
1486
- setActiveViewer: (g) => {
1487
- e.setActiveViewer(g);
1487
+ setActiveViewer: (y) => {
1488
+ e.setActiveViewer(y);
1488
1489
  },
1489
- triggerRerender: (g = "external") => {
1490
- e.triggerRerender(g);
1490
+ triggerRerender: (y = "external") => {
1491
+ e.triggerRerender(y);
1491
1492
  },
1492
1493
  reset: () => {
1493
1494
  e.resetViewer();
@@ -1504,7 +1505,7 @@ const or = {
1504
1505
  export {
1505
1506
  ie as E,
1506
1507
  Zn as T,
1507
- T as _,
1508
+ E as _,
1508
1509
  We as a,
1509
1510
  D as b,
1510
1511
  R as c,