@camstack/addon-benchmark 1.2.79 → 1.2.81

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,9 +1,9 @@
1
- import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CkASLgv5.mjs";
1
+ import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-BRgs2E5Q.mjs";
2
2
  //#region \0virtual:mf-localSharedImportMap:__mfe_internal__addon_benchmark_page
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.76",
6
+ version: "1.2.77",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_benchmark_page",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.156",
21
+ version: "1.2.157",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_benchmark_page",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.123",
36
+ version: "1.2.125",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_benchmark_page",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.156",
39
+ version: "1.2.157",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.76",
48
+ version: "1.2.77",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.123",
84
+ version: "1.2.125",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CkASLgv5.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-BRgs2E5Q.mjs";
2
2
  export { t as get, e as init };
@@ -48,46 +48,88 @@ var a = i("camera", [["path", {
48
48
  }], ["path", {
49
49
  d: "M3 3v5h5",
50
50
  key: "1xhq8a"
51
- }]]), c = ["day", "ir"], l = {
51
+ }]]);
52
+ //#endregion
53
+ //#region ../ui-library/src/lib/hub-mount.ts
54
+ r();
55
+ var c = "camstack-mount", l = /^\/(?:[A-Za-z0-9_\-.]+\/)*$/, u = null;
56
+ function d(e) {
57
+ if (e == null || e === "") return null;
58
+ let t = e.endsWith("/") ? e : `${e}/`;
59
+ return !l.test(t) || t.includes("/../") || t.includes("/./") ? null : t;
60
+ }
61
+ function f() {
62
+ if (typeof document > "u") return "/";
63
+ let e = d(document.querySelector(`meta[name="${c}"]`)?.getAttribute("content"));
64
+ if (e !== null) return e;
65
+ if (document.querySelector("base[href]") !== null) try {
66
+ let e = new URL(document.baseURI);
67
+ if (e.origin === window.location.origin) {
68
+ let t = d(e.pathname);
69
+ if (t !== null) return t;
70
+ }
71
+ } catch {}
72
+ return "/";
73
+ }
74
+ function p() {
75
+ return u === null && (u = f()), u;
76
+ }
77
+ function m() {
78
+ return p().replace(/\/$/, "");
79
+ }
80
+ function h(e) {
81
+ return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//");
82
+ }
83
+ function g(e) {
84
+ if (h(e)) return e;
85
+ let t = p(), n = e.replace(/^\/+/, "");
86
+ return t !== "/" && (e === m() || e.startsWith(t)) ? e : `${t}${n}`;
87
+ }
88
+ function _() {
89
+ return `${typeof window < "u" ? window.location.origin : ""}${m()}`;
90
+ }
91
+ //#endregion
92
+ //#region ../ui-library/src/composites/cap-settings/scene-monitor-copy.ts
93
+ var v = ["day", "ir"], y = {
52
94
  day: "Daylight",
53
95
  ir: "Night (IR)",
54
96
  night: "Night",
55
97
  dawn: "Dawn",
56
98
  dusk: "Dusk"
57
99
  };
58
- function u(e) {
59
- return l[e] ?? e;
100
+ function b(e) {
101
+ return y[e] ?? e;
60
102
  }
61
- function d(e) {
62
- let t = new Set(e.coveredConditions), n = c.map((e) => `${u(e)} ${t.has(e) ? "✓" : "✗"}`), r = [...t].filter((e) => !c.some((t) => t === e));
63
- for (let e of r) n.push(`${u(e)} ✓`);
64
- let i = c.filter((e) => !t.has(e));
103
+ function x(e) {
104
+ let t = new Set(e.coveredConditions), n = v.map((e) => `${b(e)} ${t.has(e) ? "✓" : "✗"}`), r = [...t].filter((e) => !v.some((t) => t === e));
105
+ for (let e of r) n.push(`${b(e)} ✓`);
106
+ let i = v.filter((e) => !t.has(e));
65
107
  if (i.length === 0) return n.join(" · ");
66
108
  if (t.size === 0) return `${n.join(" · ")} — nothing captured yet, so this scene is not watching.`;
67
- let a = i.map((e) => u(e).toLowerCase()).join(" and ");
109
+ let a = i.map((e) => b(e).toLowerCase()).join(" and ");
68
110
  return e.onUncoveredCondition === "judge-anyway" ? `${n.join(" · ")} — ${a} judged against the references you do have.` : `${n.join(" · ")} — optional; checks in ${a} are skipped.`;
69
111
  }
70
- function f(e) {
112
+ function S(e) {
71
113
  if (e.suspendedCondition === null) return null;
72
- let t = u(e.suspendedCondition).toLowerCase();
114
+ let t = b(e.suspendedCondition).toLowerCase();
73
115
  return `Paused — nothing was captured in ${t}, so checks are on hold until the light changes back. Capture ${t} if you want it watched around the clock.`;
74
116
  }
75
- var p = {
117
+ var C = {
76
118
  "no-reference-for-condition": "can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like.",
77
119
  "view-shifted": "can’t tell — the camera view has moved since the reference was captured. Re-capture it.",
78
120
  "no-vision-profile": "can’t tell — the vision model is unreachable, so the change is on hold.",
79
121
  "encoder-model-changed": "can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.",
80
122
  "no-snapshot": "can’t tell — this camera did not return a frame."
81
123
  };
82
- function m(e, t) {
124
+ function w(e, t) {
83
125
  if (e.states.length === 0) return "Not armed yet — capture the initial state to start watching.";
84
- if (e.verdict === "unknown") return e.unavailable === null ? "can’t tell right now." : p[e.unavailable];
85
- let n = e.verdict === "diverged" ? e.divergedAt : e.armedAt, r = n === null ? "" : ` for ${v(Math.max(0, t - n))}`;
126
+ if (e.verdict === "unknown") return e.unavailable === null ? "can’t tell right now." : C[e.unavailable];
127
+ let n = e.verdict === "diverged" ? e.divergedAt : e.armedAt, r = n === null ? "" : ` for ${O(Math.max(0, t - n))}`;
86
128
  if (e.latched) return e.verdict === "diverged" ? `CHANGED${r} — press Reset when you have dealt with it.` : `Back to normal, but still flagged as changed${r}. Press Reset to clear it.`;
87
- let i = f(e);
129
+ let i = S(e);
88
130
  return i === null ? e.verdict === "diverged" ? `CHANGED${r}` : `Normal${r}` : i;
89
131
  }
90
- function h(e) {
132
+ function T(e) {
91
133
  return e.states.length === 0 ? {
92
134
  text: "Not armed",
93
135
  tone: "unknown"
@@ -108,11 +150,11 @@ function h(e) {
108
150
  tone: "unknown"
109
151
  };
110
152
  }
111
- var g = .4;
112
- function _(e) {
113
- return e.width * e.height > g;
153
+ var E = .4;
154
+ function D(e) {
155
+ return e.width * e.height > E;
114
156
  }
115
- function v(e) {
157
+ function O(e) {
116
158
  let t = Math.floor(e / 1e3);
117
159
  if (t < 60) return `${t}s`;
118
160
  let n = Math.floor(t / 60);
@@ -122,17 +164,16 @@ function v(e) {
122
164
  }
123
165
  //#endregion
124
166
  //#region ../ui-library/src/hooks/use-device-snapshot.ts
125
- r();
126
- var y = "/addon/snapshot/media";
127
- function b(r, i = {}) {
167
+ var k = "/addon/snapshot/media";
168
+ function A(r, i = {}) {
128
169
  let { width: a, baseUrl: o } = i, [s, c] = t(0);
129
170
  return {
130
171
  src: n(() => {
131
172
  if (r === null || r <= 0) return null;
132
- let e = o === void 0 ? "" : o.replace(/\/+$/, ""), t = new URLSearchParams();
173
+ let e = o === void 0 ? m() : o.replace(/\/+$/, ""), t = new URLSearchParams();
133
174
  a !== void 0 && Number.isInteger(a) && a > 0 && t.set("w", String(a)), s > 0 && (t.set("force", "1"), t.set("r", String(s)));
134
175
  let n = t.toString();
135
- return `${e}${y}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
176
+ return `${e}${k}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
136
177
  }, [
137
178
  r,
138
179
  a,
@@ -146,4 +187,4 @@ function b(r, i = {}) {
146
187
  };
147
188
  }
148
189
  //#endregion
149
- export { _ as a, s as c, d as i, o as l, c as n, m as o, h as r, u as s, b as t, a as u };
190
+ export { D as a, _ as c, o as d, a as f, x as i, g as l, v as n, w as o, T as r, b as s, A as t, s as u };
@@ -2762,7 +2762,7 @@ async function or(e) {
2762
2762
  }
2763
2763
  }
2764
2764
  async function sr() {
2765
- return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-CysJCjwd.mjs")).catch((e) => {
2765
+ return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-rMfi4OYH.mjs")).catch((e) => {
2766
2766
  throw ir = void 0, e;
2767
2767
  }), ir;
2768
2768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-benchmark",
3
- "version": "1.2.79",
3
+ "version": "1.2.81",
4
4
  "description": "Detection addon benchmarking with reference images, accuracy metrics, and distributed execution",
5
5
  "keywords": [
6
6
  "camstack",