@camstack/addon-training 0.1.15 → 0.1.17

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,7 +1,7 @@
1
1
  import { S as e, _ as t, c as n, g as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
2
- import { c as o, d as s, m as ee, u as te } from "./responsive-Dy5RAD1s.mjs";
3
- import { r as c, t as l } from "./player-overlays-BmIRDhL0.mjs";
4
- import { t as ne } from "./grid-2x2-Bl3xw1w7.mjs";
2
+ import { f as o, h as s, m as ee, v as te } from "./responsive-emJo3EdF.mjs";
3
+ import { r as c, t as l } from "./player-overlays-BR2_H0wZ.mjs";
4
+ import { t as ne } from "./grid-2x2-D9syAI6z.mjs";
5
5
  import { n as u, r as d, t as f } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
6
6
  import { MaskShapeCanvas as p } from "./MaskShapeCanvas-Kfg9dl6B.mjs";
7
7
  //#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
@@ -44,7 +44,7 @@ function E(e, t, n, r) {
44
44
  return o;
45
45
  }
46
46
  function D({ deviceId: e }) {
47
- let w = s(ee().trpcClient, e), [D, O] = t(null), [k, A] = t(!1), [j, M] = t(null), [N, P] = t(null), [F, I] = t(v), [L, R] = t(!1), [z, B] = t(!1), V = r(!1);
47
+ let w = s(te().trpcClient, e), [D, O] = t(null), [k, A] = t(!1), [j, M] = t(null), [N, P] = t(null), [F, I] = t(v), [L, R] = t(!1), [z, B] = t(!1), V = r(!1);
48
48
  a(() => {
49
49
  if (!w) return;
50
50
  let e = !1;
@@ -62,7 +62,7 @@ function D({ deviceId: e }) {
62
62
  P(i), M(T(i, t.grid.width, t.grid.height, v));
63
63
  } catch (t) {
64
64
  if (e) return;
65
- te(t) ? A(!0) : console.error("Motion Zones load failed", t);
65
+ ee(t) ? A(!0) : console.error("Motion Zones load failed", t);
66
66
  }
67
67
  })(), () => {
68
68
  e = !0;
@@ -1,11 +1,11 @@
1
1
  import { S as e, _ as t, c as n, g as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
2
- import { c as o, d as ee, g as s, m as te, u as ne } from "./responsive-Dy5RAD1s.mjs";
3
- import { r as re, t as ie } from "./player-overlays-BmIRDhL0.mjs";
4
- import { i as ae, n as oe, r as se, t as c } from "./square-DoPBhbZN.mjs";
5
- import { t as ce } from "./trash-2-BwunNgLf.mjs";
2
+ import { b as o, f as s, h as ee, m as te, v as ne } from "./responsive-emJo3EdF.mjs";
3
+ import { r as re, t as ie } from "./player-overlays-BR2_H0wZ.mjs";
4
+ import { i as ae, n as oe, r as se, t as c } from "./square-CErp1WgN.mjs";
5
+ import { t as ce } from "./trash-2-Drz0fMgI.mjs";
6
6
  import { n as l, r as u, t as le } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
7
7
  import { MaskShapeCanvas as ue } from "./MaskShapeCanvas-Kfg9dl6B.mjs";
8
- var de = s("hexagon", [["path", {
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: e }) {
46
- let s = ee(te().trpcClient, e), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = r(!1);
46
+ let o = ee(ne().trpcClient, e), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = r(!1);
47
47
  a(() => {
48
- if (!s) return;
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 s.privacyMask?.getOptions({});
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 s.privacyMask?.getStatus({});
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: e }) {
68
68
  T(r), C(r), P(n.audioEnabled);
69
69
  } catch (t) {
70
70
  if (e) return;
71
- ne(t) ? y(!0) : console.error("Privacy Mask load failed", t);
71
+ te(t) ? y(!0) : console.error("Privacy Mask load failed", t);
72
72
  }
73
73
  })(), () => {
74
74
  e = !0;
75
75
  };
76
- }, [s]);
76
+ }, [o]);
77
77
  let B = i(() => 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 = r(0);
78
78
  a(() => {
79
79
  U.current = H;
@@ -130,14 +130,14 @@ function v({ deviceId: e }) {
130
130
  regions: w.regions
131
131
  });
132
132
  }, [w]), be = n(async () => {
133
- if (!(!s || !S)) {
133
+ if (!(!o || !S)) {
134
134
  D(!0);
135
135
  try {
136
- await s.privacyMask?.setMask({ patch: {
136
+ await o.privacyMask?.setMask({ patch: {
137
137
  enabled: S.enabled,
138
138
  regions: [...S.regions]
139
139
  } });
140
- let e = await s.privacyMask?.getStatus({});
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: e }) {
151
151
  D(!1);
152
152
  }
153
153
  }
154
- }, [s, S]), Z = p({
154
+ }, [o, S]), Z = p({
155
155
  supportsAudioMute: d === null ? null : d.supportsAudioMute,
156
156
  audioEnabled: ge,
157
157
  pendingOn: F
158
158
  }), xe = n(async () => {
159
159
  let e = m(Z);
160
- if (!(!s || e === null)) {
160
+ if (!(!o || e === null)) {
161
161
  I(e.enabled), R(null);
162
162
  try {
163
- await s.privacyMask?.setAudioEnabled(e);
164
- let t = await s.privacyMask?.getStatus({});
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: e }) {
169
169
  I(null);
170
170
  }
171
171
  }
172
- }, [s, Z]), Se = n(() => {
172
+ }, [o, Z]), Se = n(() => {
173
173
  k((e) => (e && (N(null), j(null)), !e));
174
174
  }, []), Q = d?.supportedShapes ?? [];
175
175
  ie(i(() => O && !v && d && S ? {
@@ -200,20 +200,20 @@ function v({ deviceId: e }) {
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 s ? /* @__PURE__ */ l(re, {
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: `${o} leading-relaxed`,
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: `${o} leading-relaxed`,
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: `${o} leading-relaxed`,
216
+ className: `${s} leading-relaxed`,
217
217
  children: [
218
218
  "Toggle ",
219
219
  /* @__PURE__ */ l("strong", {
@@ -266,7 +266,7 @@ function v({ deviceId: e }) {
266
266
  children: "+ Polygon"
267
267
  }),
268
268
  /* @__PURE__ */ u("span", {
269
- className: `${o} ml-1 tabular-nums`,
269
+ className: `${s} ml-1 tabular-nums`,
270
270
  children: [
271
271
  V,
272
272
  " / ",
@@ -323,7 +323,7 @@ function v({ deviceId: e }) {
323
323
  })
324
324
  }) : null
325
325
  ] }) : /* @__PURE__ */ l("p", {
326
- className: `${o} leading-relaxed`,
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",
@@ -1,10 +1,10 @@
1
1
  import { S as e, _ as t, c as n, g as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
2
- import { c as o, d as s, g as c, m as l, p as u, u as d } from "./responsive-Dy5RAD1s.mjs";
3
- import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./scene-monitor-copy-7HImRbA5.mjs";
4
- import { t as C } from "./trash-2-BwunNgLf.mjs";
2
+ import { _ as o, b as s, f as c, h as l, m as u, v as d } from "./responsive-emJo3EdF.mjs";
3
+ import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./scene-monitor-copy-CcQxbRXa.mjs";
4
+ import { t as C } from "./trash-2-Drz0fMgI.mjs";
5
5
  import { n as w, r as T, t as E } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
6
6
  import { MaskShapeCanvas as D } from "./MaskShapeCanvas-Kfg9dl6B.mjs";
7
- var O = c("settings-2", [
7
+ var O = s("settings-2", [
8
8
  ["path", {
9
9
  d: "M14 17H5",
10
10
  key: "gfn3mx"
@@ -53,9 +53,9 @@ function M(e) {
53
53
  }
54
54
  var N = "rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors";
55
55
  function ee({ monitor: e, disabled: n, onDelete: r }) {
56
- let i = j(e), a = M(e), [s, c] = t(null);
56
+ let i = j(e), a = M(e), [o, s] = t(null);
57
57
  return i.length === 0 ? /* @__PURE__ */ w("p", {
58
- className: `${o} leading-relaxed`,
58
+ className: `${c} leading-relaxed`,
59
59
  children: "No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against."
60
60
  }) : /* @__PURE__ */ w("div", {
61
61
  className: "flex flex-col gap-2",
@@ -71,13 +71,13 @@ function ee({ monitor: e, disabled: n, onDelete: r }) {
71
71
  }), /* @__PURE__ */ w("ul", {
72
72
  className: "flex flex-wrap gap-1.5",
73
73
  children: e.tiles.map((t) => {
74
- let i = `${t.stateId}:${String(t.index)}`, l = a === 1, u = s === i;
74
+ let i = `${t.stateId}:${String(t.index)}`, l = a === 1, u = o === i;
75
75
  return /* @__PURE__ */ T("li", {
76
76
  className: "flex w-24 flex-col gap-1 rounded-md border border-border p-1",
77
77
  children: [
78
78
  /* @__PURE__ */ w(P, { reference: t.reference }),
79
79
  /* @__PURE__ */ w("span", {
80
- className: `${o} tabular-nums`,
80
+ className: `${c} tabular-nums`,
81
81
  children: F(t.reference.capturedAt)
82
82
  }),
83
83
  /* @__PURE__ */ T("button", {
@@ -87,10 +87,10 @@ function ee({ monitor: e, disabled: n, onDelete: r }) {
87
87
  "aria-label": `Delete the ${v(e.condition).toLowerCase()} photograph from ${F(t.reference.capturedAt)}`,
88
88
  onClick: () => {
89
89
  if (l && !u) {
90
- c(i);
90
+ s(i);
91
91
  return;
92
92
  }
93
- c(null), r({
93
+ s(null), r({
94
94
  stateId: t.stateId,
95
95
  index: t.index
96
96
  });
@@ -155,10 +155,10 @@ function W(e) {
155
155
  };
156
156
  }
157
157
  function G({ monitor: e, disabled: n, onPatch: r }) {
158
- let [i, s] = t(() => W(e)), [c, l] = t(!1);
158
+ let [i, o] = t(() => W(e)), [s, l] = t(!1);
159
159
  a(() => {
160
- c || s(W(e));
161
- }, [e, c]);
160
+ s || o(W(e));
161
+ }, [e, s]);
162
162
  let u = (e) => {
163
163
  l(!1), r(e);
164
164
  }, d = (t) => e.check.mode === "similarity" ? {
@@ -190,7 +190,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
190
190
  disabled: n,
191
191
  className: I,
192
192
  onFocus: () => l(!0),
193
- onChange: (e) => s((t) => ({
193
+ onChange: (e) => o((t) => ({
194
194
  ...t,
195
195
  label: e.target.value
196
196
  })),
@@ -213,7 +213,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
213
213
  })]
214
214
  }),
215
215
  /* @__PURE__ */ w("p", {
216
- className: o,
216
+ className: c,
217
217
  children: "Turned off, the scene keeps its region, its references and its flag — it simply stops checking. Nothing is lost by pausing one for a while."
218
218
  }),
219
219
  /* @__PURE__ */ T("label", {
@@ -246,7 +246,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
246
246
  })]
247
247
  }),
248
248
  /* @__PURE__ */ w("p", {
249
- className: o,
249
+ className: c,
250
250
  children: H[e.triggerMode]
251
251
  }),
252
252
  /* @__PURE__ */ T("label", {
@@ -262,7 +262,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
262
262
  disabled: n,
263
263
  className: I,
264
264
  onFocus: () => l(!0),
265
- onChange: (e) => s((t) => ({
265
+ onChange: (e) => o((t) => ({
266
266
  ...t,
267
267
  checkIntervalSec: Number(e.target.value) || 0
268
268
  })),
@@ -273,7 +273,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
273
273
  })]
274
274
  }),
275
275
  /* @__PURE__ */ w("p", {
276
- className: o,
276
+ className: c,
277
277
  children: "60 s suits “is the bin still out”. Every check costs one photograph and one encode, so going below about 30 s buys latency you almost never need and multiplies the cost by the number of scenes you own."
278
278
  })
279
279
  ]
@@ -301,7 +301,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
301
301
  value: i.threshold,
302
302
  disabled: n,
303
303
  onFocus: () => l(!0),
304
- onChange: (e) => s((t) => ({
304
+ onChange: (e) => o((t) => ({
305
305
  ...t,
306
306
  threshold: Number(e.target.value)
307
307
  })),
@@ -329,7 +329,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
329
329
  disabled: n,
330
330
  className: I,
331
331
  onFocus: () => l(!0),
332
- onChange: (e) => s((t) => ({
332
+ onChange: (e) => o((t) => ({
333
333
  ...t,
334
334
  hysteresisCount: Number(e.target.value) || 1
335
335
  })),
@@ -340,7 +340,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
340
340
  })]
341
341
  }),
342
342
  /* @__PURE__ */ w("p", {
343
- className: o,
343
+ className: c,
344
344
  children: "One bad photograph must never be able to flip a scene. 3 agreeing checks at 60 s is about four minutes of latency and is what makes the answer trustworthy — leaving a state costs exactly the same as entering one."
345
345
  }),
346
346
  /* @__PURE__ */ T("label", {
@@ -356,7 +356,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
356
356
  disabled: n,
357
357
  className: I,
358
358
  onFocus: () => l(!0),
359
- onChange: (e) => s((t) => ({
359
+ onChange: (e) => o((t) => ({
360
360
  ...t,
361
361
  quietSeconds: Number(e.target.value) || 0
362
362
  })),
@@ -367,7 +367,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
367
367
  })]
368
368
  }),
369
369
  /* @__PURE__ */ w("p", {
370
- className: o,
370
+ className: c,
371
371
  children: "A check taken while something is moving is a photograph of the van parked in front of the bin, so it is discarded rather than merely delayed. 0 disables the gate."
372
372
  }),
373
373
  /* @__PURE__ */ T("label", {
@@ -383,7 +383,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
383
383
  disabled: n,
384
384
  className: I,
385
385
  onFocus: () => l(!0),
386
- onChange: (e) => s((t) => ({
386
+ onChange: (e) => o((t) => ({
387
387
  ...t,
388
388
  minObservationSpacingSec: Number(e.target.value) || 0
389
389
  })),
@@ -394,7 +394,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
394
394
  })]
395
395
  }),
396
396
  /* @__PURE__ */ w("p", {
397
- className: o,
397
+ className: c,
398
398
  children: "Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions."
399
399
  })
400
400
  ]
@@ -429,7 +429,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
429
429
  })]
430
430
  }),
431
431
  /* @__PURE__ */ w("p", {
432
- className: o,
432
+ className: c,
433
433
  children: U[e.onUncoveredCondition]
434
434
  })
435
435
  ]
@@ -464,7 +464,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
464
464
  })]
465
465
  }),
466
466
  /* @__PURE__ */ w("p", {
467
- className: o,
467
+ className: c,
468
468
  children: "“Is the bin gone” is a flag: you want to be told once and still see it later. “Is the gate open” is a live state."
469
469
  }),
470
470
  /* @__PURE__ */ T("label", {
@@ -480,7 +480,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
480
480
  })]
481
481
  }),
482
482
  /* @__PURE__ */ w("p", {
483
- className: o,
483
+ className: c,
484
484
  children: "Off by default, so an alarm never silently clears itself. The “back to normal” moment is recorded either way, so an automation can still react to it."
485
485
  })
486
486
  ]
@@ -519,7 +519,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
519
519
  disabled: n,
520
520
  className: I,
521
521
  onFocus: () => l(!0),
522
- onChange: (e) => s((t) => ({
522
+ onChange: (e) => o((t) => ({
523
523
  ...t,
524
524
  confirmPrompt: e.target.value
525
525
  })),
@@ -533,7 +533,7 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
533
533
  })]
534
534
  }),
535
535
  /* @__PURE__ */ T("p", {
536
- className: o,
536
+ className: c,
537
537
  children: [
538
538
  "The model is asked ",
539
539
  /* @__PURE__ */ w("strong", { children: "only" }),
@@ -566,20 +566,20 @@ var J = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-m
566
566
  unknown: "border-border bg-surface text-foreground-subtle"
567
567
  }, re = .8, ie = 3;
568
568
  function X({ deviceId: e }) {
569
- let c = s(l().trpcClient, e), p = u(c?.state.sceneMonitor), S = b(e, { width: 640 }), [k, A] = t(null), [j, M] = t(!1), [N, P] = t(null), [F, I] = t(null), [L, R] = t(null), [z, B] = t(null), [V, H] = t(!1), [U, W] = t(null), [K, q] = t(""), X = r(!0);
569
+ let s = l(d().trpcClient, e), p = o(s?.state.sceneMonitor), S = b(e, { width: 640 }), [k, A] = t(null), [j, M] = t(!1), [N, P] = t(null), [F, I] = t(null), [L, R] = t(null), [z, B] = t(null), [V, H] = t(!1), [U, W] = t(null), [K, q] = t(""), X = r(!0);
570
570
  a(() => (X.current = !0, () => {
571
571
  X.current = !1;
572
572
  }), []);
573
573
  let Z = n(async () => {
574
- if (c) try {
575
- let e = await c.sceneMonitor?.listScenes({});
574
+ if (s) try {
575
+ let e = await s.sceneMonitor?.listScenes({});
576
576
  if (!X.current) return;
577
577
  e && A(e);
578
578
  } catch (e) {
579
579
  if (!X.current) return;
580
- d(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
580
+ u(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
581
581
  }
582
- }, [c]);
582
+ }, [s]);
583
583
  a(() => {
584
584
  A(null), M(!1), I(null), Z();
585
585
  }, [Z]);
@@ -610,16 +610,16 @@ function X({ deviceId: e }) {
610
610
  W(t);
611
611
  return;
612
612
  }
613
- $(`roi-${String(e)}`, async () => c?.sceneMonitor?.updateScene({
613
+ $(`roi-${String(e)}`, async () => s?.sceneMonitor?.updateScene({
614
614
  monitorId: String(e),
615
615
  patch: { roi: t }
616
616
  }));
617
617
  }
618
- }, [c, $]), ce = n((e) => {
618
+ }, [s, $]), ce = n((e) => {
619
619
  e.kind === "rect" && W(e);
620
620
  }, []), le = n(async () => {
621
621
  U === null || K.trim().length === 0 || (await $("create", async () => {
622
- await c?.sceneMonitor?.createScene({
622
+ await s?.sceneMonitor?.createScene({
623
623
  label: K.trim(),
624
624
  roi: U,
625
625
  check: {
@@ -630,19 +630,19 @@ function X({ deviceId: e }) {
630
630
  });
631
631
  }), W(null), q(""), H(!1));
632
632
  }, [
633
- c,
633
+ s,
634
634
  U,
635
635
  K,
636
636
  $
637
637
  ]);
638
- return c ? /* @__PURE__ */ w("div", {
638
+ return s ? /* @__PURE__ */ w("div", {
639
639
  className: "flex flex-col gap-3",
640
640
  children: j ? /* @__PURE__ */ w("p", {
641
- className: `${o} leading-relaxed`,
641
+ className: `${c} leading-relaxed`,
642
642
  children: "Scene monitoring is not available for this camera."
643
643
  }) : /* @__PURE__ */ T(E, { children: [
644
644
  /* @__PURE__ */ w("p", {
645
- className: `${o} leading-relaxed`,
645
+ className: `${c} leading-relaxed`,
646
646
  children: "A scene watches one region of this camera and tells you when it stops looking like the picture you captured. Draw a box around the thing you care about — a wheelie bin, a gate, a parking space — then capture what “normal” looks like. Daylight is enough to start: the night reference is optional, and without it the scene simply sits the infrared hours out instead of reporting a problem."
647
647
  }),
648
648
  /* @__PURE__ */ w("div", {
@@ -716,7 +716,7 @@ function X({ deviceId: e }) {
716
716
  children: F
717
717
  }),
718
718
  Q.length === 0 ? /* @__PURE__ */ w("p", {
719
- className: `${o} leading-relaxed`,
719
+ className: `${c} leading-relaxed`,
720
720
  children: "No scenes on this camera yet."
721
721
  }) : /* @__PURE__ */ w("ul", {
722
722
  className: "flex flex-col gap-2",
@@ -738,17 +738,17 @@ function X({ deviceId: e }) {
738
738
  })]
739
739
  }),
740
740
  /* @__PURE__ */ w("p", {
741
- className: `${o} leading-relaxed`,
741
+ className: `${c} leading-relaxed`,
742
742
  children: f(e, ae)
743
743
  }),
744
744
  /* @__PURE__ */ w("p", {
745
- className: `${o} tabular-nums`,
745
+ className: `${c} tabular-nums`,
746
746
  children: y(e)
747
747
  }),
748
748
  /* @__PURE__ */ w(ee, {
749
749
  monitor: e,
750
750
  disabled: N !== null,
751
- onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => c.sceneMonitor?.deleteReference({
751
+ onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => s.sceneMonitor?.deleteReference({
752
752
  monitorId: e.id,
753
753
  stateId: t,
754
754
  index: n
@@ -764,7 +764,7 @@ function X({ deviceId: e }) {
764
764
  className: J,
765
765
  disabled: N !== null,
766
766
  title: n ? "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken." : `Take a fresh photo now and store it as the ${v(t).toLowerCase()} reference`,
767
- onClick: () => void $(`cap-${e.id}-${t}`, async () => c.sceneMonitor?.captureReference({
767
+ onClick: () => void $(`cap-${e.id}-${t}`, async () => s.sceneMonitor?.captureReference({
768
768
  monitorId: e.id,
769
769
  condition: t
770
770
  })),
@@ -784,14 +784,14 @@ function X({ deviceId: e }) {
784
784
  className: Y,
785
785
  disabled: N !== null || e.states.length === 0,
786
786
  title: "Clear the flag and re-photograph what normal looks like right now",
787
- onClick: () => void $(`reset-${e.id}`, async () => c.sceneMonitor?.resetScene({ monitorId: e.id })),
787
+ onClick: () => void $(`reset-${e.id}`, async () => s.sceneMonitor?.resetScene({ monitorId: e.id })),
788
788
  children: [/* @__PURE__ */ w(g, { className: "mr-1 inline h-3 w-3" }), "Reset"]
789
789
  }),
790
790
  /* @__PURE__ */ w("button", {
791
791
  type: "button",
792
792
  className: J,
793
793
  disabled: N !== null,
794
- onClick: () => void $(`check-${e.id}`, async () => c.sceneMonitor?.recheckNow({ monitorId: e.id })),
794
+ onClick: () => void $(`check-${e.id}`, async () => s.sceneMonitor?.recheckNow({ monitorId: e.id })),
795
795
  children: "Check now"
796
796
  }),
797
797
  /* @__PURE__ */ T("button", {
@@ -807,7 +807,7 @@ function X({ deviceId: e }) {
807
807
  type: "button",
808
808
  className: te,
809
809
  disabled: N !== null,
810
- onClick: () => void $(`del-${e.id}`, async () => c.sceneMonitor?.deleteScene({ monitorId: e.id })),
810
+ onClick: () => void $(`del-${e.id}`, async () => s.sceneMonitor?.deleteScene({ monitorId: e.id })),
811
811
  children: /* @__PURE__ */ w(C, { className: "h-3 w-3" })
812
812
  })
813
813
  ]
@@ -815,7 +815,7 @@ function X({ deviceId: e }) {
815
815
  z === e.id && /* @__PURE__ */ w(G, {
816
816
  monitor: e,
817
817
  disabled: N !== null,
818
- onPatch: (t) => void $(`tune-${e.id}`, async () => c.sceneMonitor?.updateScene({
818
+ onPatch: (t) => void $(`tune-${e.id}`, async () => s.sceneMonitor?.updateScene({
819
819
  monitorId: e.id,
820
820
  patch: t
821
821
  }))