@camstack/addon-post-analysis 0.1.11 → 0.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 (34) hide show
  1. package/assets/icon.svg +7 -0
  2. package/dist/embedding-encoder/index.js +6 -6
  3. package/dist/embedding-encoder/index.mjs +1 -1
  4. package/dist/enrichment-engine/index.js +46 -47
  5. package/dist/enrichment-engine/index.js.map +1 -1
  6. package/dist/enrichment-engine/index.mjs +46 -47
  7. package/dist/enrichment-engine/index.mjs.map +1 -1
  8. package/dist/index-DjIIGJS2.js +13728 -0
  9. package/dist/index-DjIIGJS2.js.map +1 -0
  10. package/dist/index-DnAXaymw.mjs +13729 -0
  11. package/dist/index-DnAXaymw.mjs.map +1 -0
  12. package/dist/pipeline-analytics/@mf-types.zip +0 -0
  13. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-p-Z3JTk9.mjs +19 -0
  14. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-BfmtcT51.mjs +15 -0
  15. package/dist/pipeline-analytics/_stub.js +1 -1
  16. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-UzRdrF-t.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BDtqUbh1.mjs} +6 -6
  17. package/dist/pipeline-analytics/{hostInit-Bs26Ch2I.mjs → hostInit-CtfhvKwy.mjs} +6 -6
  18. package/dist/pipeline-analytics/{index-DyF0fAsr.mjs → index-BgDjUxfg.mjs} +67 -44
  19. package/dist/pipeline-analytics/index-COebxMhm.mjs +13398 -0
  20. package/dist/pipeline-analytics/{index-DkY0uSjx.mjs → index-CzwXKSYE.mjs} +7061 -5699
  21. package/dist/pipeline-analytics/index.js +21 -21
  22. package/dist/pipeline-analytics/index.mjs +1 -1
  23. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  24. package/dist/pipeline-analytics/schemas-ChN4Ih0h.mjs +3584 -0
  25. package/dist/recording/index.js +5 -5
  26. package/dist/recording/index.mjs +2 -2
  27. package/dist/{recording-coordinator-DuP3BUTV.mjs → recording-coordinator-CRJ4yA9t.mjs} +4 -4
  28. package/dist/{recording-coordinator-DuP3BUTV.mjs.map → recording-coordinator-CRJ4yA9t.mjs.map} +1 -1
  29. package/dist/{recording-coordinator-C2sATEhe.js → recording-coordinator-UGTDbTdE.js} +13 -13
  30. package/dist/{recording-coordinator-C2sATEhe.js.map → recording-coordinator-UGTDbTdE.js.map} +1 -1
  31. package/package.json +19 -10
  32. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-ChoHjdk6.mjs +0 -17
  33. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-DXo9zkw7.mjs +0 -15
  34. package/dist/pipeline-analytics/index-DUJwOcGq.mjs +0 -16616
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const types = require("@camstack/types");
2
+ const index = require("../index-DjIIGJS2.js");
3
3
  const node_crypto = require("node:crypto");
4
4
  function pointInPolygon(point, polygon) {
5
5
  if (polygon.length < 3) return false;
@@ -1714,7 +1714,7 @@ const TTL_SWEEP_INTERVAL_MS = 5e3;
1714
1714
  const RETENTION_SWEEP_INTERVAL_MS = 5 * 6e4;
1715
1715
  const AUDIO_EVENT_HEARTBEAT_MS = 5e3;
1716
1716
  const MOTION_EVENT_HEARTBEAT_MS = 5e3;
1717
- class PipelineAnalyticsAddon extends types.BaseAddon {
1717
+ class PipelineAnalyticsAddon extends index.BaseAddon {
1718
1718
  processors = /* @__PURE__ */ new Map();
1719
1719
  trackStore = null;
1720
1720
  mediaStore = null;
@@ -1792,19 +1792,19 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
1792
1792
  }
1793
1793
  });
1794
1794
  this.unsubInference = this.ctx.eventBus.subscribe(
1795
- { category: types.EventCategory.PipelineInferenceResult },
1795
+ { category: index.EventCategory.PipelineInferenceResult },
1796
1796
  (ev) => {
1797
1797
  void this.handleInferenceResult(ev.data);
1798
1798
  }
1799
1799
  );
1800
1800
  this.unsubAudio = this.ctx.eventBus.subscribe(
1801
- { category: types.EventCategory.PipelineAudioInferenceResult },
1801
+ { category: index.EventCategory.PipelineAudioInferenceResult },
1802
1802
  (ev) => {
1803
1803
  void this.handleAudioResult(ev.data);
1804
1804
  }
1805
1805
  );
1806
1806
  this.unsubMotion = this.ctx.eventBus.subscribe(
1807
- { category: types.EventCategory.MotionAnalysis },
1807
+ { category: index.EventCategory.MotionAnalysis },
1808
1808
  (ev) => {
1809
1809
  const src = ev.source;
1810
1810
  if (src?.type !== "device" || typeof src.deviceId !== "number") return;
@@ -1812,7 +1812,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
1812
1812
  }
1813
1813
  );
1814
1814
  this.unsubMotionOnboard = this.ctx.eventBus.subscribe(
1815
- { category: types.EventCategory.MotionOnMotionChanged },
1815
+ { category: index.EventCategory.MotionOnMotionChanged },
1816
1816
  (ev) => {
1817
1817
  const data = ev.data;
1818
1818
  if (data.source === "analyzer") return;
@@ -1821,7 +1821,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
1821
1821
  }
1822
1822
  );
1823
1823
  this.unsubBindings = this.ctx.eventBus.subscribe(
1824
- { category: types.EventCategory.DeviceBindingsChanged },
1824
+ { category: index.EventCategory.DeviceBindingsChanged },
1825
1825
  (ev) => {
1826
1826
  const data = ev.data;
1827
1827
  this.bindingCache?.onBindingsChanged(data);
@@ -1833,7 +1833,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
1833
1833
  }
1834
1834
  );
1835
1835
  this.unsubDeviceUnreg = this.ctx.eventBus.subscribe(
1836
- { category: types.EventCategory.DeviceUnregistered },
1836
+ { category: index.EventCategory.DeviceUnregistered },
1837
1837
  (ev) => {
1838
1838
  const { deviceId } = ev.data;
1839
1839
  this.trackStore?.clearDevice(deviceId);
@@ -1942,21 +1942,21 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
1942
1942
  };
1943
1943
  return [
1944
1944
  {
1945
- capability: types.pipelineAnalyticsCapability,
1945
+ capability: index.pipelineAnalyticsCapability,
1946
1946
  provider: this,
1947
1947
  kind: "wrapper",
1948
1948
  defaultActive: true
1949
1949
  },
1950
1950
  {
1951
- capability: types.zoneAnalyticsCapability,
1951
+ capability: index.zoneAnalyticsCapability,
1952
1952
  provider: this.zoneAnalytics
1953
1953
  },
1954
1954
  {
1955
- capability: types.audioMetricsCapability,
1955
+ capability: index.audioMetricsCapability,
1956
1956
  provider: this.audioMetrics
1957
1957
  },
1958
1958
  {
1959
- capability: types.addonWidgetsSourceCapability,
1959
+ capability: index.addonWidgetsSourceCapability,
1960
1960
  provider: widgetsProvider
1961
1961
  }
1962
1962
  ];
@@ -2045,7 +2045,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2045
2045
  id: `pa-${node_crypto.randomUUID()}`,
2046
2046
  timestamp: new Date(result.timestamp),
2047
2047
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2048
- category: types.EventCategory.PipelineAnalyticsTrackStarted,
2048
+ category: index.EventCategory.PipelineAnalyticsTrackStarted,
2049
2049
  data: { deviceId, trackId: id, className: t.className }
2050
2050
  });
2051
2051
  }
@@ -2058,7 +2058,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2058
2058
  id: `pa-${e.id}`,
2059
2059
  timestamp: new Date(e.timestamp),
2060
2060
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2061
- category: types.EventCategory.PipelineAnalyticsDetectionEvent,
2061
+ category: index.EventCategory.PipelineAnalyticsDetectionEvent,
2062
2062
  data: { deviceId, kind: "object", eventId: e.id, timestamp: e.timestamp }
2063
2063
  });
2064
2064
  }
@@ -2066,7 +2066,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2066
2066
  id: `pa-${node_crypto.randomUUID()}`,
2067
2067
  timestamp: new Date(result.timestamp),
2068
2068
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2069
- category: types.EventCategory.PipelineAnalyticsFrameTracked,
2069
+ category: index.EventCategory.PipelineAnalyticsFrameTracked,
2070
2070
  data: {
2071
2071
  deviceId,
2072
2072
  timestamp: result.timestamp,
@@ -2126,7 +2126,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2126
2126
  id: `pa-${ev.id}`,
2127
2127
  timestamp: new Date(ev.timestamp),
2128
2128
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2129
- category: types.EventCategory.PipelineAnalyticsDetectionEvent,
2129
+ category: index.EventCategory.PipelineAnalyticsDetectionEvent,
2130
2130
  data: { deviceId, kind: "audio", eventId: ev.id, timestamp: ev.timestamp }
2131
2131
  });
2132
2132
  }
@@ -2170,7 +2170,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2170
2170
  id: `pa-${ev.id}`,
2171
2171
  timestamp: new Date(ev.timestamp),
2172
2172
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2173
- category: types.EventCategory.PipelineAnalyticsDetectionEvent,
2173
+ category: index.EventCategory.PipelineAnalyticsDetectionEvent,
2174
2174
  data: { deviceId, kind: "motion", eventId: ev.id, timestamp: ev.timestamp }
2175
2175
  });
2176
2176
  }
@@ -2221,7 +2221,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2221
2221
  id: `pa-${ev.id}`,
2222
2222
  timestamp: new Date(ev.timestamp),
2223
2223
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2224
- category: types.EventCategory.PipelineAnalyticsDetectionEvent,
2224
+ category: index.EventCategory.PipelineAnalyticsDetectionEvent,
2225
2225
  data: { deviceId, kind: "motion", eventId: ev.id, timestamp: ev.timestamp }
2226
2226
  });
2227
2227
  }
@@ -2236,7 +2236,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2236
2236
  id: `pa-end-${t.trackId}`,
2237
2237
  timestamp: new Date(t.lastSeen),
2238
2238
  source: { type: "addon", id: "pipeline-analytics", addonId: "pipeline-analytics" },
2239
- category: types.EventCategory.PipelineAnalyticsTrackEnded,
2239
+ category: index.EventCategory.PipelineAnalyticsTrackEnded,
2240
2240
  data: {
2241
2241
  deviceId: t.deviceId,
2242
2242
  trackId: t.trackId,
@@ -2505,7 +2505,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2505
2505
  if (!await this.isCameraDevice(input.deviceId)) return null;
2506
2506
  const schema = this.globalSettingsSchema();
2507
2507
  const raw = await this.ctx?.settings?.readDeviceStore(input.deviceId) ?? {};
2508
- const baseSections = schema ? types.hydrateSchema(
2508
+ const baseSections = schema ? index.hydrateSchema(
2509
2509
  {
2510
2510
  ...schema,
2511
2511
  sections: schema.sections.map((s) => ({ ...s, tab: s.tab ?? "Analytics" }))
@@ -2553,7 +2553,7 @@ class PipelineAnalyticsAddon extends types.BaseAddon {
2553
2553
  try {
2554
2554
  const dev = await api.deviceManager.getDevice.query({ deviceId });
2555
2555
  if (!dev) return true;
2556
- return dev.type === types.DeviceType.Camera;
2556
+ return dev.type === index.DeviceType.Camera;
2557
2557
  } catch {
2558
2558
  return true;
2559
2559
  }
@@ -1,4 +1,4 @@
1
- import { BaseAddon, EventCategory, pipelineAnalyticsCapability, zoneAnalyticsCapability, audioMetricsCapability, addonWidgetsSourceCapability, hydrateSchema, DeviceType } from "@camstack/types";
1
+ import { B as BaseAddon, E as EventCategory, p as pipelineAnalyticsCapability, z as zoneAnalyticsCapability, h as audioMetricsCapability, i as addonWidgetsSourceCapability, j as hydrateSchema, D as DeviceType } from "../index-DnAXaymw.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  function pointInPolygon(point, polygon) {
4
4
  if (polygon.length < 3) return false;
@@ -2926,7 +2926,7 @@ async function wt(e) {
2926
2926
  }
2927
2927
  }
2928
2928
  async function ba() {
2929
- return Le || (Le = wt(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-UzRdrF-t.mjs")).catch((e) => {
2929
+ return Le || (Le = wt(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BDtqUbh1.mjs")).catch((e) => {
2930
2930
  throw Le = void 0, e;
2931
2931
  })), Le;
2932
2932
  }