@camstack/addon-osd-manager 0.1.206 → 0.1.207
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.
- package/dist/{MotionZonesSettings-DAz0zsa2.mjs → MotionZonesSettings-BEKlAp3j.mjs} +19 -19
- package/dist/{PrivacyMaskSettings-DBRcmqYu.mjs → PrivacyMaskSettings-CfwBKEUj.mjs} +25 -25
- package/dist/{SceneMonitorEditor-p1bF1btk.mjs → SceneMonitorEditor-oMhhrxG4.mjs} +57 -57
- package/dist/_stub.js +4462 -3997
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DN7-J_1s.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-Ch0cYVKr.mjs} +2 -2
- package/dist/addon-osd-manager.css +1 -1
- package/dist/{hostInit-C8d8Ormp.mjs → hostInit-duEWFSiz.mjs} +1 -1
- package/dist/{player-overlays-2hRBqn9k.mjs → player-overlays-ClSUtI17.mjs} +5 -5
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BCF-RTGy.mjs → responsive-O5wfBz1Z.mjs} +2 -2
- package/dist/{scene-monitor-copy-M5yqaBpP.mjs → scene-monitor-copy-DUa3J0e0.mjs} +1 -1
- package/dist/{square-CLL05HzW.mjs → square-D5EA42_L.mjs} +1 -1
- package/dist/{trash-2-BECtJsvm.mjs → trash-2-C6XCyR8J.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-BXwkZeCl.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DEotH7ig.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as e, c as t, g as n, h as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-D7xZfSHZ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as d, t as f } from "./player-overlays-
|
|
2
|
+
import { c as o, f as s, l as c, m as l, s as u } from "./responsive-O5wfBz1Z.mjs";
|
|
3
|
+
import { n as d, t as f } from "./player-overlays-ClSUtI17.mjs";
|
|
4
4
|
import { n as p, r as m, t as ee } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
5
5
|
import { MaskShapeCanvas as h } from "./MaskShapeCanvas-mrxtKs_l.mjs";
|
|
6
|
-
var g =
|
|
6
|
+
var g = l("grid-2x2", [
|
|
7
7
|
["path", {
|
|
8
8
|
d: "M12 3v18",
|
|
9
9
|
key: "108xh3"
|
|
@@ -62,17 +62,17 @@ function k(e, t, n, r) {
|
|
|
62
62
|
return o;
|
|
63
63
|
}
|
|
64
64
|
function A({ deviceId: a }) {
|
|
65
|
-
let
|
|
65
|
+
let l = c(s().trpcClient, a), [D, A] = e(null), [j, M] = e(!1), [N, P] = e(null), [F, I] = e(null), [L, R] = e(x), [z, B] = e(!1), [V, H] = e(!1), U = n(!1);
|
|
66
66
|
i(() => {
|
|
67
|
-
if (!
|
|
67
|
+
if (!l) return;
|
|
68
68
|
let e = !1;
|
|
69
69
|
return U.current = !1, A(null), M(!1), P(null), I(null), R(x), H(!1), (async () => {
|
|
70
70
|
try {
|
|
71
|
-
let t = await
|
|
71
|
+
let t = await l.motionZones?.getOptions({});
|
|
72
72
|
if (e) return;
|
|
73
73
|
if (!t) throw Error("device proxy not ready");
|
|
74
74
|
if (A(t), U.current) return;
|
|
75
|
-
let n = await
|
|
75
|
+
let n = await l.motionZones?.getStatus({});
|
|
76
76
|
if (e) return;
|
|
77
77
|
if (!n) throw Error("device proxy not ready");
|
|
78
78
|
U.current = !0;
|
|
@@ -80,12 +80,12 @@ function A({ deviceId: a }) {
|
|
|
80
80
|
I(i), P(O(i, t.grid.width, t.grid.height, x));
|
|
81
81
|
} catch (t) {
|
|
82
82
|
if (e) return;
|
|
83
|
-
|
|
83
|
+
o(t) ? M(!0) : console.error("Motion Zones load failed", t);
|
|
84
84
|
}
|
|
85
85
|
})(), () => {
|
|
86
86
|
e = !0;
|
|
87
87
|
};
|
|
88
|
-
}, [
|
|
88
|
+
}, [l]);
|
|
89
89
|
let W = D ? D.grid.width : 0, G = D ? D.grid.height : 0, K = E(W, L), q = E(G, L), J = r(() => N && D ? k(N, W, G, L) : null, [
|
|
90
90
|
N,
|
|
91
91
|
D,
|
|
@@ -131,7 +131,7 @@ function A({ deviceId: a }) {
|
|
|
131
131
|
]), $ = t((e, t) => {
|
|
132
132
|
t.kind === "grid" && P(t.cells);
|
|
133
133
|
}, []), oe = t(async () => {
|
|
134
|
-
if (!(!
|
|
134
|
+
if (!(!l || !N || !D)) {
|
|
135
135
|
B(!0);
|
|
136
136
|
try {
|
|
137
137
|
let e = k(N, D.grid.width, D.grid.height, L), t = {
|
|
@@ -140,12 +140,12 @@ function A({ deviceId: a }) {
|
|
|
140
140
|
gridHeight: D.grid.height,
|
|
141
141
|
cells: e
|
|
142
142
|
};
|
|
143
|
-
await
|
|
143
|
+
await l.motionZones?.setZone({ patch: { regions: [{
|
|
144
144
|
id: y,
|
|
145
145
|
enabled: !0,
|
|
146
146
|
shape: t
|
|
147
147
|
}] } });
|
|
148
|
-
let n = await
|
|
148
|
+
let n = await l.motionZones?.getStatus({});
|
|
149
149
|
if (n) {
|
|
150
150
|
let e = n.regions.find((e) => e.shape.kind === "grid"), t = w(e ? e.shape.cells : [], D.grid.width, D.grid.height);
|
|
151
151
|
I(t), P(O(t, D.grid.width, D.grid.height, L));
|
|
@@ -157,7 +157,7 @@ function A({ deviceId: a }) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}, [
|
|
160
|
-
|
|
160
|
+
l,
|
|
161
161
|
N,
|
|
162
162
|
D,
|
|
163
163
|
L
|
|
@@ -188,16 +188,16 @@ function A({ deviceId: a }) {
|
|
|
188
188
|
$,
|
|
189
189
|
K,
|
|
190
190
|
q
|
|
191
|
-
])),
|
|
191
|
+
])), l ? /* @__PURE__ */ p(d, {
|
|
192
192
|
title: "Motion Zones",
|
|
193
193
|
icon: /* @__PURE__ */ p(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
194
194
|
children: /* @__PURE__ */ p("div", {
|
|
195
195
|
className: "flex flex-col gap-3",
|
|
196
196
|
children: j ? /* @__PURE__ */ p("p", {
|
|
197
|
-
className: `${
|
|
197
|
+
className: `${u} leading-relaxed`,
|
|
198
198
|
children: "This camera doesn't expose an on-board motion zones grid."
|
|
199
199
|
}) : !j && D !== null && N !== null ? /* @__PURE__ */ m(ee, { children: [/* @__PURE__ */ m("p", {
|
|
200
|
-
className: `${
|
|
200
|
+
className: `${u} leading-relaxed`,
|
|
201
201
|
children: [
|
|
202
202
|
"Toggle ",
|
|
203
203
|
/* @__PURE__ */ p("strong", {
|
|
@@ -258,7 +258,7 @@ function A({ deviceId: a }) {
|
|
|
258
258
|
role: "group",
|
|
259
259
|
"aria-label": "Cell size",
|
|
260
260
|
children: [/* @__PURE__ */ p("span", {
|
|
261
|
-
className: `${
|
|
261
|
+
className: `${u} mr-0.5`,
|
|
262
262
|
children: "Cell size"
|
|
263
263
|
}), b.map((e) => /* @__PURE__ */ m("button", {
|
|
264
264
|
type: "button",
|
|
@@ -271,7 +271,7 @@ function A({ deviceId: a }) {
|
|
|
271
271
|
}, e))]
|
|
272
272
|
}),
|
|
273
273
|
/* @__PURE__ */ m("span", {
|
|
274
|
-
className: `${
|
|
274
|
+
className: `${u} ml-1 tabular-nums`,
|
|
275
275
|
children: [
|
|
276
276
|
te,
|
|
277
277
|
" / ",
|
|
@@ -300,7 +300,7 @@ function A({ deviceId: a }) {
|
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
302
|
})] }) : /* @__PURE__ */ p("p", {
|
|
303
|
-
className: `${
|
|
303
|
+
className: `${u} leading-relaxed`,
|
|
304
304
|
children: "Loading the camera's grid…"
|
|
305
305
|
})
|
|
306
306
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { _ as e, c as t, g as n, h as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-D7xZfSHZ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as re, t as ie } from "./player-overlays-
|
|
4
|
-
import { i as ae, n as oe, r as se, t as c } from "./square-
|
|
5
|
-
import { t as ce } from "./trash-2-
|
|
2
|
+
import { c as ee, f as te, l as ne, m as o, s } from "./responsive-O5wfBz1Z.mjs";
|
|
3
|
+
import { n as re, t as ie } from "./player-overlays-ClSUtI17.mjs";
|
|
4
|
+
import { i as ae, n as oe, r as se, t as c } from "./square-D5EA42_L.mjs";
|
|
5
|
+
import { t as ce } from "./trash-2-C6XCyR8J.mjs";
|
|
6
6
|
import { n as l, r as u, t as le } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
7
7
|
import { MaskShapeCanvas as ue } from "./MaskShapeCanvas-mrxtKs_l.mjs";
|
|
8
|
-
var de =
|
|
8
|
+
var de = o("hexagon", [["path", {
|
|
9
9
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",
|
|
10
10
|
key: "yt0hxn"
|
|
11
11
|
}]]);
|
|
@@ -43,17 +43,17 @@ function he(e, t) {
|
|
|
43
43
|
return !0;
|
|
44
44
|
}
|
|
45
45
|
function v({ deviceId: a }) {
|
|
46
|
-
let
|
|
46
|
+
let o = ne(te().trpcClient, a), [d, f] = e(null), [v, y] = e(!1), [b, x] = e(!1), [S, C] = e(null), [w, T] = e(null), [E, D] = e(!1), [O, k] = e(!1), [A, j] = e(null), [M, N] = e(null), [ge, P] = e(null), [F, I] = e(null), [L, R] = e(null), z = n(!1);
|
|
47
47
|
i(() => {
|
|
48
|
-
if (!
|
|
48
|
+
if (!o) return;
|
|
49
49
|
let e = !1;
|
|
50
50
|
return z.current = !1, f(null), y(!1), x(!1), C(null), T(null), k(!1), j(null), N(null), P(null), I(null), R(null), (async () => {
|
|
51
51
|
try {
|
|
52
|
-
let t = await
|
|
52
|
+
let t = await o.privacyMask?.getOptions({});
|
|
53
53
|
if (e) return;
|
|
54
54
|
if (!t) throw Error("device proxy not ready");
|
|
55
55
|
if (f(t), z.current) return;
|
|
56
|
-
let n = await
|
|
56
|
+
let n = await o.privacyMask?.getStatus({});
|
|
57
57
|
if (e) return;
|
|
58
58
|
if (!n) throw Error("device proxy not ready");
|
|
59
59
|
if (n.regions === null) {
|
|
@@ -68,12 +68,12 @@ function v({ deviceId: a }) {
|
|
|
68
68
|
T(r), C(r), P(n.audioEnabled);
|
|
69
69
|
} catch (t) {
|
|
70
70
|
if (e) return;
|
|
71
|
-
|
|
71
|
+
ee(t) ? y(!0) : console.error("Privacy Mask load failed", t);
|
|
72
72
|
}
|
|
73
73
|
})(), () => {
|
|
74
74
|
e = !0;
|
|
75
75
|
};
|
|
76
|
-
}, [
|
|
76
|
+
}, [o]);
|
|
77
77
|
let B = r(() => S !== null && w !== null && (S.enabled !== w.enabled || !he(S.regions, w.regions)), [S, w]), V = S ? S.regions.length : 0, H = d ? d.maxRegions : 0, U = n(0);
|
|
78
78
|
i(() => {
|
|
79
79
|
U.current = H;
|
|
@@ -130,14 +130,14 @@ function v({ deviceId: a }) {
|
|
|
130
130
|
regions: w.regions
|
|
131
131
|
});
|
|
132
132
|
}, [w]), be = t(async () => {
|
|
133
|
-
if (!(!
|
|
133
|
+
if (!(!o || !S)) {
|
|
134
134
|
D(!0);
|
|
135
135
|
try {
|
|
136
|
-
await
|
|
136
|
+
await o.privacyMask?.setMask({ patch: {
|
|
137
137
|
enabled: S.enabled,
|
|
138
138
|
regions: [...S.regions]
|
|
139
139
|
} });
|
|
140
|
-
let e = await
|
|
140
|
+
let e = await o.privacyMask?.getStatus({});
|
|
141
141
|
if (e && e.regions !== null) {
|
|
142
142
|
let t = {
|
|
143
143
|
enabled: e.enabled,
|
|
@@ -151,17 +151,17 @@ function v({ deviceId: a }) {
|
|
|
151
151
|
D(!1);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
}, [
|
|
154
|
+
}, [o, S]), Z = p({
|
|
155
155
|
supportsAudioMute: d === null ? null : d.supportsAudioMute,
|
|
156
156
|
audioEnabled: ge,
|
|
157
157
|
pendingOn: F
|
|
158
158
|
}), xe = t(async () => {
|
|
159
159
|
let e = m(Z);
|
|
160
|
-
if (!(!
|
|
160
|
+
if (!(!o || e === null)) {
|
|
161
161
|
I(e.enabled), R(null);
|
|
162
162
|
try {
|
|
163
|
-
await
|
|
164
|
-
let t = await
|
|
163
|
+
await o.privacyMask?.setAudioEnabled(e);
|
|
164
|
+
let t = await o.privacyMask?.getStatus({});
|
|
165
165
|
t && P(t.audioEnabled);
|
|
166
166
|
} catch (e) {
|
|
167
167
|
console.error("Privacy microphone write failed — reverting", e), R(e instanceof Error ? e.message : String(e));
|
|
@@ -169,7 +169,7 @@ function v({ deviceId: a }) {
|
|
|
169
169
|
I(null);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
}, [
|
|
172
|
+
}, [o, Z]), Se = t(() => {
|
|
173
173
|
k((e) => (e && (N(null), j(null)), !e));
|
|
174
174
|
}, []), Q = d?.supportedShapes ?? [];
|
|
175
175
|
ie(r(() => O && !v && d && S ? {
|
|
@@ -200,20 +200,20 @@ function v({ deviceId: a }) {
|
|
|
200
200
|
M
|
|
201
201
|
]));
|
|
202
202
|
let Ce = d?.supportedShapes.includes("rect") ?? !1, we = d?.supportedShapes.includes("polygon") ?? !1, $ = d !== null && (d.maxRegions <= 0 || d.supportedShapes.length === 0);
|
|
203
|
-
return
|
|
203
|
+
return o ? /* @__PURE__ */ l(re, {
|
|
204
204
|
title: "Privacy Mask",
|
|
205
205
|
icon: /* @__PURE__ */ l(ae, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
206
206
|
children: /* @__PURE__ */ u("div", {
|
|
207
207
|
className: "flex flex-col gap-3",
|
|
208
208
|
children: [v || $ ? /* @__PURE__ */ l("p", {
|
|
209
|
-
className: `${
|
|
209
|
+
className: `${s} leading-relaxed`,
|
|
210
210
|
children: "This camera doesn't support an on-board privacy mask."
|
|
211
211
|
}) : b ? /* @__PURE__ */ l("p", {
|
|
212
|
-
className: `${
|
|
212
|
+
className: `${s} leading-relaxed`,
|
|
213
213
|
children: "This camera hasn't answered, so what it currently masks is unknown — the editor stays closed rather than showing an empty frame you could save over. A battery camera answers once it wakes; otherwise check that it is reachable."
|
|
214
214
|
}) : !v && !$ && !b && d !== null && S !== null ? /* @__PURE__ */ u(le, { children: [
|
|
215
215
|
/* @__PURE__ */ u("p", {
|
|
216
|
-
className: `${
|
|
216
|
+
className: `${s} leading-relaxed`,
|
|
217
217
|
children: [
|
|
218
218
|
"Toggle ",
|
|
219
219
|
/* @__PURE__ */ l("strong", {
|
|
@@ -266,7 +266,7 @@ function v({ deviceId: a }) {
|
|
|
266
266
|
children: "+ Polygon"
|
|
267
267
|
}),
|
|
268
268
|
/* @__PURE__ */ u("span", {
|
|
269
|
-
className: `${
|
|
269
|
+
className: `${s} ml-1 tabular-nums`,
|
|
270
270
|
children: [
|
|
271
271
|
V,
|
|
272
272
|
" / ",
|
|
@@ -323,7 +323,7 @@ function v({ deviceId: a }) {
|
|
|
323
323
|
})
|
|
324
324
|
}) : null
|
|
325
325
|
] }) : /* @__PURE__ */ l("p", {
|
|
326
|
-
className: `${
|
|
326
|
+
className: `${s} leading-relaxed`,
|
|
327
327
|
children: "Loading the camera's privacy mask…"
|
|
328
328
|
}), Z.supported && /* @__PURE__ */ u("div", {
|
|
329
329
|
className: "flex items-start gap-3 rounded-md border border-border bg-surface px-2 py-2",
|