tsviewer 1.0.29 → 1.0.30

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,5 +1,5 @@
1
1
  import { createElementBlock as t, openBlock as s, normalizeClass as i, createCommentVNode as n, renderSlot as a, Fragment as f, createTextVNode as r, toDisplayString as d } from "vue";
2
- import { g as l } from "./index-B7dOp-ew.mjs";
2
+ import { g as l } from "./index-knEI45_O.mjs";
3
3
  const c = {
4
4
  name: "BfButton",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as o, openBlock as h, createElementVNode as n } from "vue";
2
- import { g as r } from "./index-B7dOp-ew.mjs";
2
+ import { g as r } from "./index-knEI45_O.mjs";
3
3
  const i = {
4
4
  name: "IconSelection",
5
5
  props: {
@@ -1,8 +1,8 @@
1
1
  import { ref as C, computed as W, watch as ee, onMounted as te, createElementBlock as ne, openBlock as oe, normalizeStyle as ae, unref as q, nextTick as ie } from "vue";
2
- import { o as re, m as se, u as _, p as V, h as N, j as H, i as P, g as le } from "./index-B7dOp-ew.mjs";
2
+ import { o as re, m as se, u as _, p as V, h as N, j as H, i as P, g as le } from "./index-knEI45_O.mjs";
3
3
  import { storeToRefs as x } from "pinia";
4
- import { f as ce, h as ue } from "./TSViewerCanvas-B-p1oLEz.mjs";
5
- import { p as z } from "./pathOr-S0xL-Shs.mjs";
4
+ import { f as ce, h as ue } from "./TSViewerCanvas-bkWRtQiL.mjs";
5
+ import { p as z } from "./pathOr-DBQF4FRd.mjs";
6
6
  import { g as de } from "./_commonjsHelpers-DaMA6jEr.mjs";
7
7
  const I = (t, u) => {
8
8
  let c;
@@ -3,9 +3,9 @@ import { E as yn } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { u as Ha, h as bn, i as gn, c as kn, j as wn, k as za, d as ja, l as Sn, e as qa, m as Dn, o as Cn, E as Mn, g as rt, n as $n, p as Pn, q as Vn, r as _n, T as Tn, C as ca, s as On, t as Yn, f as In, a as Rn, b as xn } from "./el-input-DNjlHApm.mjs";
4
4
  import { a as Zt } from "./el-button-B2d_HO4x.mjs";
5
5
  import { defineComponent as $e, ref as X, createElementBlock as Q, openBlock as I, normalizeStyle as Gt, normalizeClass as $, unref as e, renderSlot as me, createElementVNode as j, mergeProps as Jt, useAttrs as ha, inject as Re, computed as K, watch as De, nextTick as Ie, onBeforeUnmount as Za, provide as Nt, createBlock as ce, withCtx as le, withModifiers as He, createCommentVNode as se, resolveDynamicComponent as Qe, toDisplayString as fe, onMounted as Ga, Fragment as we, renderList as Pe, createTextVNode as Ge, withDirectives as Ye, createVNode as Z, Transition as An, withKeys as ze, useSlots as ya, toRef as je, vShow as Ze, getCurrentInstance as Ja, reactive as Nn, defineAsyncComponent as Fn } from "vue";
6
- import { g as En, u as Ln, p as Pa } from "./index-B7dOp-ew.mjs";
6
+ import { g as En, u as Ln, p as Pa } from "./index-knEI45_O.mjs";
7
7
  import { storeToRefs as Bn } from "pinia";
8
- import { I as Un } from "./IconSelection-DQZLRwZa.mjs";
8
+ import { I as Un } from "./IconSelection-CFPXCYRf.mjs";
9
9
  import { g as Xe } from "./_commonjsHelpers-DaMA6jEr.mjs";
10
10
  import { v as Va } from "./index-ClxLs_jS.mjs";
11
11
  var Ft = { exports: {} }, Kn = Ft.exports, _a;
@@ -4242,7 +4242,7 @@ const Tl = Wa(_l), Ol = { slot: "body" }, Yl = { class: "select-wrapper" }, Il =
4242
4242
  },
4243
4243
  emits: ["closeWindow", "createUpdateAnnotation"],
4244
4244
  setup(n, { emit: l }) {
4245
- const a = Fn(() => import("./BFButton-DpIwbJXR.mjs")), t = n, d = X(!1);
4245
+ const a = Fn(() => import("./BFButton-CI70UW6L.mjs")), t = n, d = X(!1);
4246
4246
  De(() => t.visible, (_) => {
4247
4247
  if (d.value = _, !_) return;
4248
4248
  const M = u.value.start / 1e3, O = u.value.end / 1e3;
@@ -1,14 +1,14 @@
1
1
  import "./base-CIy5gWpu.mjs";
2
2
  import { E as F } from "./el-overlay-_Fd7WVZL.mjs";
3
- import { I as g } from "./IconSelection-DQZLRwZa.mjs";
3
+ import { I as g } from "./IconSelection-CFPXCYRf.mjs";
4
4
  import { a as y, b as k } from "./el-input-DNjlHApm.mjs";
5
5
  import { E as S } from "./el-input-number-CAzspsnM.mjs";
6
6
  import { resolveComponent as P, createBlock as u, openBlock as o, withCtx as i, createElementVNode as s, createVNode as r, createElementBlock as a, toDisplayString as c, createTextVNode as d, createCommentVNode as p, Fragment as _, renderList as v } from "vue";
7
- import { g as N } from "./index-B7dOp-ew.mjs";
7
+ import { g as N } from "./index-knEI45_O.mjs";
8
8
  const H = {
9
9
  name: "TimeseriesFilterModal",
10
10
  components: {
11
- "bf-button": () => import("./BFButton-DpIwbJXR.mjs"),
11
+ "bf-button": () => import("./BFButton-CI70UW6L.mjs"),
12
12
  IconSelection: g
13
13
  },
14
14
  mixins: [],
@@ -1,5 +1,5 @@
1
1
  import { ref as v, computed as N, watch as U, nextTick as E, onMounted as Ne, createElementBlock as Ie, openBlock as $e, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
2
- import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-B7dOp-ew.mjs";
2
+ import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-knEI45_O.mjs";
3
3
  function me(g, c, l) {
4
4
  return function() {
5
5
  for (var t = [], p = 0, u = g, k = 0; k < c.length || p < arguments.length; ) {
@@ -1,6 +1,6 @@
1
1
  import { ref, onUnmounted, readonly, reactive, computed, watch, onMounted, createElementBlock, openBlock, createElementVNode, renderSlot, normalizeStyle, defineAsyncComponent, nextTick, createVNode, withCtx, unref } from "vue";
2
2
  import { storeToRefs } from "pinia";
3
- import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-B7dOp-ew.mjs";
3
+ import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-knEI45_O.mjs";
4
4
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers-DaMA6jEr.mjs";
5
5
  var head = /* @__PURE__ */ nth(0), XFind = /* @__PURE__ */ function() {
6
6
  function f(c, v) {
@@ -5228,7 +5228,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
5228
5228
  ],
5229
5229
  setup(f, { expose: c, emit: v }) {
5230
5230
  const u = defineAsyncComponent(
5231
- () => import("./TSAnnotationCanvas-EAjgK8cT.mjs")
5231
+ () => import("./TSAnnotationCanvas-CvgQNy_8.mjs")
5232
5232
  ), o = f, i = v, e = useViewerStore(), { viewerChannels: r, viewerAnnotations: t, viewerActiveTool: n, viewerSelectedChannels: d } = storeToRefs(e), s = ref(null), l = ref(null), a = ref(null), h = ref(null), m = ref(null), R = ref(null);
5233
5233
  reactive({});
5234
5234
  const g = ref(0), y = ref(0), O = ref(0), w = ref(1), k = ref(!1), I = ref(!1), F = ref("pointer");
@@ -2,8 +2,8 @@ import "./base-CIy5gWpu.mjs";
2
2
  import { E as _ } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { g as f, a as y, b as h } from "./el-input-DNjlHApm.mjs";
4
4
  import { createElementBlock as F, openBlock as s, renderSlot as S, resolveComponent as A, createBlock as u, withCtx as t, createElementVNode as l, createVNode as r, createTextVNode as i, Fragment as E, renderList as k, normalizeStyle as D, toDisplayString as V } from "vue";
5
- import { g as C } from "./index-B7dOp-ew.mjs";
6
- import w from "./BFButton-DpIwbJXR.mjs";
5
+ import { g as C } from "./index-knEI45_O.mjs";
6
+ import w from "./BFButton-CI70UW6L.mjs";
7
7
  const L = {
8
8
  name: "CircleIcon",
9
9
  props: {
@@ -3,7 +3,7 @@ import { E as j, a as G, b as X } from "./el-input-DNjlHApm.mjs";
3
3
  import { E as J, a as K } from "./el-button-B2d_HO4x.mjs";
4
4
  import { E as Q } from "./el-input-number-CAzspsnM.mjs";
5
5
  import { createElementBlock as g, openBlock as r, createElementVNode as t, ref as h, computed as k, onMounted as W, createVNode as l, createBlock as w, createCommentVNode as y, withCtx as u, resolveDynamicComponent as Y, Fragment as tt, renderList as et } from "vue";
6
- import { g as m } from "./index-B7dOp-ew.mjs";
6
+ import { g as m } from "./index-knEI45_O.mjs";
7
7
  const nt = {
8
8
  name: "IconPreviousPage",
9
9
  props: {
@@ -1,9 +1,9 @@
1
1
  import "./base-CIy5gWpu.mjs";
2
2
  import { E as k } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { createElementBlock as a, openBlock as i, normalizeClass as T, createCommentVNode as f, createElementVNode as s, renderSlot as d, toDisplayString as u, resolveComponent as B, createBlock as A, withCtx as c, createVNode as r, Fragment as x, createTextVNode as h } from "vue";
4
- import { g as m, p as V } from "./index-B7dOp-ew.mjs";
5
- import N from "./BFButton-DpIwbJXR.mjs";
6
- import { p as C } from "./pathOr-S0xL-Shs.mjs";
4
+ import { g as m, p as V } from "./index-knEI45_O.mjs";
5
+ import N from "./BFButton-CI70UW6L.mjs";
6
+ import { p as C } from "./pathOr-DBQF4FRd.mjs";
7
7
  const U = {
8
8
  name: "DialogBody",
9
9
  setup(e, { slots: t }) {
@@ -489,6 +489,46 @@ async function fe() {
489
489
  console.error(t);
490
490
  }
491
491
  }
492
+ function Tn(t) {
493
+ if (useRoute().name === "docs-login")
494
+ return;
495
+ pe(!1, Y("shouldShowToast", t));
496
+ const n = pe(!1, Y("shouldRedirect", t));
497
+ this.clearState(), n && this.$route.fullPath;
498
+ }
499
+ const In = (t) => Object.prototype.toString.call(t) === "[object String]", Sn = (t) => {
500
+ Object.keys(t).forEach((e) => {
501
+ In(t[e]) && (t[e] = t[e].trim());
502
+ });
503
+ };
504
+ function _n(t, e) {
505
+ if (!t)
506
+ return Promise.reject({ status: 400, message: "Url is missing!" });
507
+ const n = he("GET", "method", e), o = he({}, "header", e), i = Object.assign({}, { "Content-type": "application/json" }, o), u = Y("body", e);
508
+ let h = { headers: i, method: n };
509
+ if (u) {
510
+ typeof u == "object" && Sn(u);
511
+ const w = JSON.stringify(u);
512
+ h = Object.assign({}, h, { body: w });
513
+ }
514
+ return fetch(t, h).then((w) => w.status >= 400 ? Promise.reject(w) : w.json().catch(() => w));
515
+ }
516
+ function be(t) {
517
+ const e = Y("status", t);
518
+ let n;
519
+ if (e === void 0) {
520
+ console.log(t);
521
+ return;
522
+ } else
523
+ n = t.status;
524
+ if (n === 400 && t.body)
525
+ t.body.getReader().read().then(({ done: o, value: i }) => {
526
+ const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
527
+ Be(pe(u), mn(Be(Y("message"), JSON.parse), (h, w) => w))(u);
528
+ });
529
+ else if (n === 401)
530
+ return Tn();
531
+ }
492
532
  const nt = Ft("tsviewer", () => {
493
533
  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
534
  const a = l.value.find((c) => c.selected);
@@ -513,7 +553,7 @@ const nt = Ft("tsviewer", () => {
513
553
  }, O = (a) => {
514
554
  h.value = a;
515
555
  }, 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);
556
+ const c = a.packageId, v = await fe(), D = `https://api.pennsieve.net/packages/${c}?api_key=${v}`, ee = await _n(D);
517
557
  if (z())
518
558
  return E(ee), Promise.resolve(ee);
519
559
  throw new Error("Timeseries viewer is not available, since the file is not processed");
@@ -659,47 +699,7 @@ const nt = Ft("tsviewer", () => {
659
699
  setActiveViewer: E
660
700
  };
661
701
  });
662
- function Tn(t) {
663
- if (useRoute().name === "docs-login")
664
- return;
665
- pe(!1, Y("shouldShowToast", t));
666
- const n = pe(!1, Y("shouldRedirect", t));
667
- this.clearState(), n && this.$route.fullPath;
668
- }
669
- const In = (t) => Object.prototype.toString.call(t) === "[object String]", Sn = (t) => {
670
- Object.keys(t).forEach((e) => {
671
- In(t[e]) && (t[e] = t[e].trim());
672
- });
673
- };
674
- function jn(t, e) {
675
- if (!t)
676
- return Promise.reject({ status: 400, message: "Url is missing!" });
677
- 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 };
679
- if (u) {
680
- typeof u == "object" && Sn(u);
681
- const w = JSON.stringify(u);
682
- h = Object.assign({}, h, { body: w });
683
- }
684
- return fetch(t, h).then((w) => w.status >= 400 ? Promise.reject(w) : w.json().catch(() => w));
685
- }
686
- function be(t) {
687
- const e = Y("status", t);
688
- let n;
689
- if (e === void 0) {
690
- console.log(t);
691
- return;
692
- } else
693
- n = t.status;
694
- if (n === 400 && t.body)
695
- t.body.getReader().read().then(({ done: o, value: i }) => {
696
- 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);
698
- });
699
- else if (n === 401)
700
- return Tn();
701
- }
702
- function _n() {
702
+ function bn() {
703
703
  const t = nt(), { viewerChannels: e, viewerAnnotations: n } = He(t), o = (l) => l.id || "", i = (l) => {
704
704
  l.sort(function(A, m) {
705
705
  return A.start < m.start ? -1 : A.start > m.start ? 1 : 0;
@@ -878,12 +878,12 @@ function _n() {
878
878
  getChannelId: o
879
879
  };
880
880
  }
881
- const bn = (t, e) => {
881
+ const Cn = (t, e) => {
882
882
  const n = t.__vccOpts || t;
883
883
  for (const [o, i] of e)
884
884
  n[o] = i;
885
885
  return n;
886
- }, Cn = { id: "channelCanvas" }, En = ["data-id"], On = ["hidden"], Pn = ["hidden"], Ln = {
886
+ }, En = { id: "channelCanvas" }, On = ["data-id"], Pn = ["hidden"], Ln = ["hidden"], kn = {
887
887
  __name: "TSViewer",
888
888
  props: {
889
889
  pkg: {
@@ -901,7 +901,7 @@ const bn = (t, e) => {
901
901
  }
902
902
  },
903
903
  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 = {
904
+ const n = Z(() => import("./TSScrubber-BHyiFEEN.mjs")), o = Z(() => import("./TSViewerCanvas-bkWRtQiL.mjs").then((r) => r.T)), i = Z(() => import("./TSViewerToolbar-Difc8d0T.mjs")), u = Z(() => import("./TSFilterModal-CJH8zXyp.mjs")), h = Z(() => import("./TSAnnotationModal-EjnPa9Zo.mjs")), w = Z(() => import("./TsAnnotationDeleteDialog-DxKI_m1a.mjs")), l = Z(() => import("./TSViewerLayerWindow-BQ94kN9H.mjs")), s = {
905
905
  TIMEUNIT: "microSeconds",
906
906
  // Basis for time
907
907
  XOFFSET: 0,
@@ -942,7 +942,7 @@ const bn = (t, e) => {
942
942
  addAnnotation: R,
943
943
  updateAnnotation: _,
944
944
  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) => ({
945
+ } = bn(), 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) => ({
946
946
  ...r,
947
947
  selected: !!r.selected
948
948
  }))), we = B(() => Oe.value.filter((r) => r.visible)), Ae = B(() => {
@@ -1183,7 +1183,7 @@ const bn = (t, e) => {
1183
1183
  "active-viewer": le.value,
1184
1184
  onSetStart: te
1185
1185
  }, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
1186
- ce("div", Cn, [
1186
+ ce("div", En, [
1187
1187
  ce("div", {
1188
1188
  id: "channelLabels",
1189
1189
  ref_key: "channelLabels",
@@ -1205,9 +1205,9 @@ const bn = (t, e) => {
1205
1205
  ce("div", {
1206
1206
  class: "chLabelInd",
1207
1207
  hidden: Ae.value
1208
- }, je(Ct(d, W.value, d.rowScale)), 9, Pn)
1209
- ], 10, On)
1210
- ], 40, En))), 128))
1208
+ }, je(Ct(d, W.value, d.rowScale)), 9, Ln)
1209
+ ], 10, Pn)
1210
+ ], 40, On))), 128))
1211
1211
  ], 512),
1212
1212
  re(J(o), {
1213
1213
  ref_key: "viewerCanvas",
@@ -1277,13 +1277,13 @@ const bn = (t, e) => {
1277
1277
  }, null, 8, ["visible"])
1278
1278
  ], 2));
1279
1279
  }
1280
- }, kn = /* @__PURE__ */ bn(Ln, [["__scopeId", "data-v-dfcd02cc"]]), Rn = {
1280
+ }, Dn = /* @__PURE__ */ Cn(kn, [["__scopeId", "data-v-dfcd02cc"]]), Rn = {
1281
1281
  install(t) {
1282
- t.component("TSViewer", kn);
1282
+ t.component("TSViewer", Dn);
1283
1283
  }
1284
1284
  };
1285
1285
  export {
1286
- kn as T,
1286
+ Dn as T,
1287
1287
  T as _,
1288
1288
  Ce as a,
1289
1289
  N as b,
@@ -1291,9 +1291,9 @@ export {
1291
1291
  Xt as d,
1292
1292
  Bt as e,
1293
1293
  Kt as f,
1294
- bn as g,
1294
+ Cn as g,
1295
1295
  fe as h,
1296
- jn as i,
1296
+ _n as i,
1297
1297
  be as j,
1298
1298
  We as k,
1299
1299
  zt as l,
@@ -1,4 +1,4 @@
1
- import { b as i, n as o, q as h, r as s, o as f } from "./index-B7dOp-ew.mjs";
1
+ import { b as i, n as o, q as h, r as s, o as f } from "./index-knEI45_O.mjs";
2
2
  var v = /* @__PURE__ */ i(function(r, a) {
3
3
  return r.map(function(n) {
4
4
  for (var t = a, e = 0, u; e < n.length; ) {
@@ -1,4 +1,4 @@
1
- import { T as s, s as a, u as o } from "./index-B7dOp-ew.mjs";
1
+ import { T as s, s as a, u as o } from "./index-knEI45_O.mjs";
2
2
  export {
3
3
  s as TSViewer,
4
4
  a as default,