@camstack/addon-osd-manager 0.1.124 → 0.1.126

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 (20) hide show
  1. package/dist/MotionZonesSettings-k6Zzbfy9.mjs +310 -0
  2. package/dist/{PrivacyMaskSettings-9rCXAZlR.mjs → PrivacyMaskSettings-DwhFoc16.mjs} +26 -26
  3. package/dist/{SceneMonitorEditor-D2ATIIZD.mjs → SceneMonitorEditor-DAqbVCgr.mjs} +295 -295
  4. package/dist/_stub.js +354 -354
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-B2cBM7jE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-Dy_PTg0V.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ds-WCEP6.mjs +26 -0
  7. package/dist/addon-osd-manager.css +1 -1
  8. package/dist/{responsive-CC0j2h-d.mjs → cap-error-hton7JwR.mjs} +8 -8
  9. package/dist/{hostInit-Du2Me1GR.mjs → hostInit-D_FWYfaI.mjs} +2 -2
  10. package/dist/index.js +133 -85
  11. package/dist/index.mjs +133 -85
  12. package/dist/{player-overlays-CMeXfcep.mjs → player-overlays-CEidmNyu.mjs} +1 -1
  13. package/dist/remoteEntry.js +1 -1
  14. package/dist/{scene-monitor-copy-CjiHJ4pT.mjs → scene-monitor-copy-CLKtgPk1.mjs} +1 -1
  15. package/dist/{square-hvOcBhdH.mjs → square-Dq8X76sM.mjs} +1 -1
  16. package/dist/{trash-2-rb-x3jwf.mjs → trash-2-BYTSgKQu.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-D8j_yb3G.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-B9gGFib0.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/MotionZonesSettings-DOFOB5MX.mjs +0 -310
  20. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BK-eslgm.mjs +0 -26
@@ -1,10 +1,10 @@
1
1
  import { c as e, h as t, m as n, p as r, u as i, y as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
2
- import { a as o, i as s, n as c, r as l, s as u, t as d } from "./responsive-CC0j2h-d.mjs";
3
- import { a as f, c as p, d as ee, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./scene-monitor-copy-CjiHJ4pT.mjs";
4
- import { t as S } from "./trash-2-rb-x3jwf.mjs";
5
- import { n as C, r as w, t as T } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
6
- import { MaskShapeCanvas as E } from "./MaskShapeCanvas-BEVxAjNq.mjs";
7
- var D = u("settings-2", [
2
+ import { a as o, i as s, n as c, r as l, s as u, t as d } from "./cap-error-hton7JwR.mjs";
3
+ import { a as f, c as p, d as ee, i as m, l as h, n as g, o as _, r as te, s as ne, t as re, u as v } from "./scene-monitor-copy-CLKtgPk1.mjs";
4
+ import { t as y } from "./trash-2-BYTSgKQu.mjs";
5
+ import { n as b, r as x, t as S } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
6
+ import { MaskShapeCanvas as C } from "./MaskShapeCanvas-BEVxAjNq.mjs";
7
+ var ie = u("settings-2", [
8
8
  ["path", {
9
9
  d: "M14 17H5",
10
10
  key: "gfn3mx"
@@ -29,11 +29,11 @@ var D = u("settings-2", [
29
29
  //#endregion
30
30
  //#region ../ui-library/src/composites/cap-settings/SceneReferenceGallery.tsx
31
31
  a();
32
- var O = p("/addon/pipeline-analytics/event-media");
33
- function k(e) {
34
- return `${O}/m/${e}`;
32
+ var w = p("/addon/pipeline-analytics/event-media");
33
+ function T(e) {
34
+ return `${w}/m/${e}`;
35
35
  }
36
- function A(e) {
36
+ function E(e) {
37
37
  let t = /* @__PURE__ */ new Map();
38
38
  for (let n of e.states) n.references.forEach((e, r) => {
39
39
  let i = t.get(e.condition) ?? [];
@@ -48,45 +48,45 @@ function A(e) {
48
48
  tiles: [...t].sort((e, t) => t.reference.capturedAt - e.reference.capturedAt)
49
49
  })).sort((e, t) => e.condition.localeCompare(t.condition));
50
50
  }
51
- function j(e) {
51
+ function D(e) {
52
52
  return e.states.reduce((e, t) => e + t.references.length, 0);
53
53
  }
54
- var M = "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
- function te({ monitor: e, disabled: n, onDelete: r }) {
56
- let i = A(e), a = j(e), [o, s] = t(null);
57
- return i.length === 0 ? /* @__PURE__ */ C("p", {
58
- className: `${d} leading-relaxed`,
54
+ var O = "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
+ function k({ monitor: e, disabled: n, onDelete: r }) {
56
+ let i = E(e), a = D(e), [o, s] = t(null);
57
+ return i.length === 0 ? /* @__PURE__ */ b("p", {
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
- }) : /* @__PURE__ */ C("div", {
60
+ }) : /* @__PURE__ */ b("div", {
61
61
  className: "flex flex-col gap-2",
62
- children: i.map((e) => /* @__PURE__ */ w("div", {
62
+ children: i.map((e) => /* @__PURE__ */ x("div", {
63
63
  className: "flex flex-col gap-1",
64
- children: [/* @__PURE__ */ w("p", {
64
+ children: [/* @__PURE__ */ x("p", {
65
65
  className: "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle",
66
66
  children: [
67
67
  _(e.condition),
68
68
  " · ",
69
69
  e.tiles.length
70
70
  ]
71
- }), /* @__PURE__ */ C("ul", {
71
+ }), /* @__PURE__ */ b("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)}`, c = a === 1, l = o === i;
75
- return /* @__PURE__ */ w("li", {
74
+ let i = `${t.stateId}:${String(t.index)}`, l = a === 1, u = o === i;
75
+ return /* @__PURE__ */ x("li", {
76
76
  className: "flex w-24 flex-col gap-1 rounded-md border border-border p-1",
77
77
  children: [
78
- /* @__PURE__ */ C(N, { reference: t.reference }),
79
- /* @__PURE__ */ C("span", {
80
- className: `${d} tabular-nums`,
81
- children: P(t.reference.capturedAt)
78
+ /* @__PURE__ */ b(A, { reference: t.reference }),
79
+ /* @__PURE__ */ b("span", {
80
+ className: `${c} tabular-nums`,
81
+ children: j(t.reference.capturedAt)
82
82
  }),
83
- /* @__PURE__ */ w("button", {
83
+ /* @__PURE__ */ x("button", {
84
84
  type: "button",
85
- className: M,
85
+ className: O,
86
86
  disabled: n,
87
- "aria-label": `Delete the ${_(e.condition).toLowerCase()} photograph from ${P(t.reference.capturedAt)}`,
87
+ "aria-label": `Delete the ${_(e.condition).toLowerCase()} photograph from ${j(t.reference.capturedAt)}`,
88
88
  onClick: () => {
89
- if (c && !l) {
89
+ if (l && !u) {
90
90
  s(i);
91
91
  return;
92
92
  }
@@ -95,9 +95,9 @@ function te({ monitor: e, disabled: n, onDelete: r }) {
95
95
  index: t.index
96
96
  });
97
97
  },
98
- children: [/* @__PURE__ */ C(S, { className: "mr-1 inline h-3 w-3" }), l ? "Confirm" : "Delete"]
98
+ children: [/* @__PURE__ */ b(y, { className: "mr-1 inline h-3 w-3" }), u ? "Confirm" : "Delete"]
99
99
  }),
100
- l && /* @__PURE__ */ C("p", {
100
+ u && /* @__PURE__ */ b("p", {
101
101
  className: "text-[10px] leading-snug text-warning",
102
102
  children: "This is the only photograph this scene has. Delete it and the scene no longer knows what normal looks like — it stops judging until you capture again."
103
103
  })
@@ -108,24 +108,24 @@ function te({ monitor: e, disabled: n, onDelete: r }) {
108
108
  }, e.condition))
109
109
  });
110
110
  }
111
- function N({ reference: e }) {
111
+ function A({ reference: e }) {
112
112
  let [n, r] = t(!1), i = e.thumbnailMediaId;
113
- return i === void 0 || n ? /* @__PURE__ */ w("div", {
113
+ return i === void 0 || n ? /* @__PURE__ */ x("div", {
114
114
  className: "flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle",
115
115
  title: "The picture for this reference is no longer stored. The reference itself is intact and still being scored against.",
116
- children: [/* @__PURE__ */ C(x, { className: "h-4 w-4" }), /* @__PURE__ */ C("span", {
116
+ children: [/* @__PURE__ */ b(v, { className: "h-4 w-4" }), /* @__PURE__ */ b("span", {
117
117
  className: "text-[9px]",
118
118
  children: "no picture"
119
119
  })]
120
- }) : /* @__PURE__ */ C("img", {
121
- src: k(i),
120
+ }) : /* @__PURE__ */ b("img", {
121
+ src: T(i),
122
122
  alt: "",
123
123
  loading: "lazy",
124
124
  className: "h-16 w-full rounded object-cover",
125
125
  onError: () => r(!0)
126
126
  });
127
127
  }
128
- function P(e) {
128
+ function j(e) {
129
129
  let t = new Date(e);
130
130
  return `${t.toLocaleDateString()} ${t.toLocaleTimeString([], {
131
131
  hour: "2-digit",
@@ -135,15 +135,15 @@ function P(e) {
135
135
  //#endregion
136
136
  //#region ../ui-library/src/composites/cap-settings/SceneSettingsForm.tsx
137
137
  a();
138
- var F = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50", I = "text-[10px] font-medium text-foreground-subtle", L = "flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2", R = "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle", z = 5, B = 3600, V = {
138
+ var M = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50", N = "text-[10px] font-medium text-foreground-subtle", P = "flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2", F = "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle", I = 5, L = 3600, R = {
139
139
  periodic: "Only on the clock. Predictable, and it notices a change even on a camera nothing ever moves in front of.",
140
140
  "on-motion": "Only after the camera has been still again for the quiet window below. Cheapest, but a change nobody walks past is never seen.",
141
141
  both: "Both — the clock is the safety net that lets the motion path miss. This is the right answer for almost every scene."
142
- }, H = {
142
+ }, z = {
143
143
  skip: "Sit that light out. No verdict, no alarm, no flag touched — it picks itself back up when a light it knows returns. This is why the night capture is optional.",
144
144
  "judge-anyway": "Compare against the references you do have. Only correct when the two lights genuinely look alike (a floodlit driveway, an indoor lamp) — against a real infrared frame it will report a change that did not happen."
145
145
  };
146
- function U(e) {
146
+ function B(e) {
147
147
  return {
148
148
  label: e.label,
149
149
  checkIntervalSec: e.checkIntervalSec ?? 60,
@@ -154,14 +154,14 @@ function U(e) {
154
154
  confirmPrompt: e.confirm?.prompt ?? ""
155
155
  };
156
156
  }
157
- function W({ monitor: e, disabled: n, onPatch: r }) {
158
- let [a, o] = t(() => U(e)), [s, c] = t(!1);
157
+ function V({ monitor: e, disabled: n, onPatch: r }) {
158
+ let [a, o] = t(() => B(e)), [s, l] = t(!1);
159
159
  i(() => {
160
- s || o(U(e));
160
+ s || o(B(e));
161
161
  }, [e, s]);
162
- let l = (e) => {
163
- c(!1), r(e);
164
- }, u = (t) => e.check.mode === "similarity" ? {
162
+ let u = (e) => {
163
+ l(!1), r(e);
164
+ }, d = (t) => e.check.mode === "similarity" ? {
165
165
  mode: "similarity",
166
166
  threshold: t.threshold ?? e.check.threshold,
167
167
  hysteresisCount: t.hysteresisCount ?? e.check.hysteresisCount
@@ -169,374 +169,374 @@ function W({ monitor: e, disabled: n, onPatch: r }) {
169
169
  ...e.check,
170
170
  hysteresisCount: t.hysteresisCount ?? e.check.hysteresisCount
171
171
  }, f = e.confirm?.enabled === !0, p = e.check.mode === "similarity" ? e.check.threshold : null;
172
- return /* @__PURE__ */ w("div", {
172
+ return /* @__PURE__ */ x("div", {
173
173
  className: "flex flex-col gap-2",
174
174
  children: [
175
- /* @__PURE__ */ w("div", {
176
- className: L,
175
+ /* @__PURE__ */ x("div", {
176
+ className: P,
177
177
  children: [
178
- /* @__PURE__ */ C("p", {
179
- className: R,
178
+ /* @__PURE__ */ b("p", {
179
+ className: F,
180
180
  children: "What it watches"
181
181
  }),
182
- /* @__PURE__ */ w("label", {
182
+ /* @__PURE__ */ x("label", {
183
183
  className: "flex flex-col gap-1",
184
- children: [/* @__PURE__ */ C("span", {
185
- className: I,
184
+ children: [/* @__PURE__ */ b("span", {
185
+ className: N,
186
186
  children: "Name"
187
- }), /* @__PURE__ */ C("input", {
187
+ }), /* @__PURE__ */ b("input", {
188
188
  type: "text",
189
189
  value: a.label,
190
190
  disabled: n,
191
- className: F,
192
- onFocus: () => c(!0),
191
+ className: M,
192
+ onFocus: () => l(!0),
193
193
  onChange: (e) => o((t) => ({
194
194
  ...t,
195
195
  label: e.target.value
196
196
  })),
197
197
  onBlur: () => {
198
198
  let t = a.label.trim();
199
- t.length > 0 && t !== e.label ? l({ label: t }) : c(!1);
199
+ t.length > 0 && t !== e.label ? u({ label: t }) : l(!1);
200
200
  }
201
201
  })]
202
202
  }),
203
- /* @__PURE__ */ w("label", {
203
+ /* @__PURE__ */ x("label", {
204
204
  className: "flex items-center gap-2",
205
- children: [/* @__PURE__ */ C("input", {
205
+ children: [/* @__PURE__ */ b("input", {
206
206
  type: "checkbox",
207
207
  checked: e.enabled,
208
208
  disabled: n,
209
- onChange: (e) => l({ enabled: e.target.checked })
210
- }), /* @__PURE__ */ C("span", {
211
- className: I,
209
+ onChange: (e) => u({ enabled: e.target.checked })
210
+ }), /* @__PURE__ */ b("span", {
211
+ className: N,
212
212
  children: "Watching"
213
213
  })]
214
214
  }),
215
- /* @__PURE__ */ C("p", {
216
- className: d,
215
+ /* @__PURE__ */ b("p", {
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
- /* @__PURE__ */ w("label", {
219
+ /* @__PURE__ */ x("label", {
220
220
  className: "flex flex-col gap-1",
221
- children: [/* @__PURE__ */ C("span", {
222
- className: I,
221
+ children: [/* @__PURE__ */ b("span", {
222
+ className: N,
223
223
  children: "When to look"
224
- }), /* @__PURE__ */ w("select", {
224
+ }), /* @__PURE__ */ x("select", {
225
225
  value: e.triggerMode,
226
226
  disabled: n,
227
- className: F,
227
+ className: M,
228
228
  onChange: (e) => {
229
229
  let t = e.target.value;
230
- (t === "periodic" || t === "on-motion" || t === "both") && l({ triggerMode: t });
230
+ (t === "periodic" || t === "on-motion" || t === "both") && u({ triggerMode: t });
231
231
  },
232
232
  children: [
233
- /* @__PURE__ */ C("option", {
233
+ /* @__PURE__ */ b("option", {
234
234
  value: "both",
235
235
  children: "On the clock and after motion settles"
236
236
  }),
237
- /* @__PURE__ */ C("option", {
237
+ /* @__PURE__ */ b("option", {
238
238
  value: "periodic",
239
239
  children: "On the clock only"
240
240
  }),
241
- /* @__PURE__ */ C("option", {
241
+ /* @__PURE__ */ b("option", {
242
242
  value: "on-motion",
243
243
  children: "After motion settles only"
244
244
  })
245
245
  ]
246
246
  })]
247
247
  }),
248
- /* @__PURE__ */ C("p", {
249
- className: d,
250
- children: V[e.triggerMode]
248
+ /* @__PURE__ */ b("p", {
249
+ className: c,
250
+ children: R[e.triggerMode]
251
251
  }),
252
- /* @__PURE__ */ w("label", {
252
+ /* @__PURE__ */ x("label", {
253
253
  className: "flex flex-col gap-1",
254
- children: [/* @__PURE__ */ C("span", {
255
- className: I,
254
+ children: [/* @__PURE__ */ b("span", {
255
+ className: N,
256
256
  children: "Check every (seconds)"
257
- }), /* @__PURE__ */ C("input", {
257
+ }), /* @__PURE__ */ b("input", {
258
258
  type: "number",
259
- min: z,
260
- max: B,
259
+ min: I,
260
+ max: L,
261
261
  value: a.checkIntervalSec,
262
262
  disabled: n,
263
- className: F,
264
- onFocus: () => c(!0),
263
+ className: M,
264
+ onFocus: () => l(!0),
265
265
  onChange: (e) => o((t) => ({
266
266
  ...t,
267
267
  checkIntervalSec: Number(e.target.value) || 0
268
268
  })),
269
269
  onBlur: () => {
270
- let t = G(a.checkIntervalSec, z, B);
271
- t === e.checkIntervalSec ? c(!1) : l({ checkIntervalSec: t });
270
+ let t = H(a.checkIntervalSec, I, L);
271
+ t === e.checkIntervalSec ? l(!1) : u({ checkIntervalSec: t });
272
272
  }
273
273
  })]
274
274
  }),
275
- /* @__PURE__ */ C("p", {
276
- className: d,
275
+ /* @__PURE__ */ b("p", {
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
  ]
280
280
  }),
281
- /* @__PURE__ */ w("div", {
282
- className: L,
281
+ /* @__PURE__ */ x("div", {
282
+ className: P,
283
283
  children: [
284
- /* @__PURE__ */ C("p", {
285
- className: R,
284
+ /* @__PURE__ */ b("p", {
285
+ className: F,
286
286
  children: "How sure it has to be"
287
287
  }),
288
- e.check.mode === "similarity" && /* @__PURE__ */ w(T, { children: [/* @__PURE__ */ w("label", {
288
+ e.check.mode === "similarity" && /* @__PURE__ */ x(S, { children: [/* @__PURE__ */ x("label", {
289
289
  className: "flex flex-col gap-1",
290
- children: [/* @__PURE__ */ w("span", {
291
- className: I,
292
- children: ["Match threshold — ", /* @__PURE__ */ C("span", {
290
+ children: [/* @__PURE__ */ x("span", {
291
+ className: N,
292
+ children: ["Match threshold — ", /* @__PURE__ */ b("span", {
293
293
  className: "tabular-nums",
294
294
  children: a.threshold.toFixed(2)
295
295
  })]
296
- }), /* @__PURE__ */ C("input", {
296
+ }), /* @__PURE__ */ b("input", {
297
297
  type: "range",
298
298
  min: .3,
299
299
  max: .99,
300
300
  step: .01,
301
301
  value: a.threshold,
302
302
  disabled: n,
303
- onFocus: () => c(!0),
303
+ onFocus: () => l(!0),
304
304
  onChange: (e) => o((t) => ({
305
305
  ...t,
306
306
  threshold: Number(e.target.value)
307
307
  })),
308
308
  onMouseUp: () => {
309
- a.threshold === p ? c(!1) : l({ check: u({ threshold: a.threshold }) });
309
+ a.threshold === p ? l(!1) : u({ check: d({ threshold: a.threshold }) });
310
310
  },
311
311
  onBlur: () => {
312
- a.threshold === p ? c(!1) : l({ check: u({ threshold: a.threshold }) });
312
+ a.threshold === p ? l(!1) : u({ check: d({ threshold: a.threshold }) });
313
313
  }
314
314
  })]
315
- }), /* @__PURE__ */ C("p", {
315
+ }), /* @__PURE__ */ b("p", {
316
316
  className: "text-[10px] text-foreground-subtle",
317
317
  children: "How closely the region still has to resemble the photograph to count as unchanged. Higher means fussier: at 0.95 a passing cloud can read as a change; at 0.60 the bin can be taken and the scene will shrug. 0.80 is a sensible start — if it cries wolf, lower it; if it misses the thing you care about, raise it."
318
318
  })] }),
319
- /* @__PURE__ */ w("label", {
319
+ /* @__PURE__ */ x("label", {
320
320
  className: "flex flex-col gap-1",
321
- children: [/* @__PURE__ */ C("span", {
322
- className: I,
321
+ children: [/* @__PURE__ */ b("span", {
322
+ className: N,
323
323
  children: "Agreeing checks before it changes its mind"
324
- }), /* @__PURE__ */ C("input", {
324
+ }), /* @__PURE__ */ b("input", {
325
325
  type: "number",
326
326
  min: 1,
327
327
  max: 10,
328
328
  value: a.hysteresisCount,
329
329
  disabled: n,
330
- className: F,
331
- onFocus: () => c(!0),
330
+ className: M,
331
+ onFocus: () => l(!0),
332
332
  onChange: (e) => o((t) => ({
333
333
  ...t,
334
334
  hysteresisCount: Number(e.target.value) || 1
335
335
  })),
336
336
  onBlur: () => {
337
- let t = G(a.hysteresisCount, 1, 10);
338
- t === e.check.hysteresisCount ? c(!1) : l({ check: u({ hysteresisCount: t }) });
337
+ let t = H(a.hysteresisCount, 1, 10);
338
+ t === e.check.hysteresisCount ? l(!1) : u({ check: d({ hysteresisCount: t }) });
339
339
  }
340
340
  })]
341
341
  }),
342
- /* @__PURE__ */ C("p", {
343
- className: d,
342
+ /* @__PURE__ */ b("p", {
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
- /* @__PURE__ */ w("label", {
346
+ /* @__PURE__ */ x("label", {
347
347
  className: "flex flex-col gap-1",
348
- children: [/* @__PURE__ */ C("span", {
349
- className: I,
348
+ children: [/* @__PURE__ */ b("span", {
349
+ className: N,
350
350
  children: "Quiet for (seconds) before a check counts"
351
- }), /* @__PURE__ */ C("input", {
351
+ }), /* @__PURE__ */ b("input", {
352
352
  type: "number",
353
353
  min: 0,
354
354
  max: 3600,
355
355
  value: a.quietSeconds,
356
356
  disabled: n,
357
- className: F,
358
- onFocus: () => c(!0),
357
+ className: M,
358
+ onFocus: () => l(!0),
359
359
  onChange: (e) => o((t) => ({
360
360
  ...t,
361
361
  quietSeconds: Number(e.target.value) || 0
362
362
  })),
363
363
  onBlur: () => {
364
- let t = G(a.quietSeconds, 0, 3600);
365
- t === e.quietSeconds ? c(!1) : l({ quietSeconds: t });
364
+ let t = H(a.quietSeconds, 0, 3600);
365
+ t === e.quietSeconds ? l(!1) : u({ quietSeconds: t });
366
366
  }
367
367
  })]
368
368
  }),
369
- /* @__PURE__ */ C("p", {
370
- className: d,
369
+ /* @__PURE__ */ b("p", {
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
- /* @__PURE__ */ w("label", {
373
+ /* @__PURE__ */ x("label", {
374
374
  className: "flex flex-col gap-1",
375
- children: [/* @__PURE__ */ C("span", {
376
- className: I,
375
+ children: [/* @__PURE__ */ b("span", {
376
+ className: N,
377
377
  children: "Minimum gap between counted checks (seconds)"
378
- }), /* @__PURE__ */ C("input", {
378
+ }), /* @__PURE__ */ b("input", {
379
379
  type: "number",
380
380
  min: 0,
381
381
  max: 3600,
382
382
  value: a.minObservationSpacingSec,
383
383
  disabled: n,
384
- className: F,
385
- onFocus: () => c(!0),
384
+ className: M,
385
+ onFocus: () => l(!0),
386
386
  onChange: (e) => o((t) => ({
387
387
  ...t,
388
388
  minObservationSpacingSec: Number(e.target.value) || 0
389
389
  })),
390
390
  onBlur: () => {
391
- let t = G(a.minObservationSpacingSec, 0, 3600);
392
- t === e.minObservationSpacingSec ? c(!1) : l({ minObservationSpacingSec: t });
391
+ let t = H(a.minObservationSpacingSec, 0, 3600);
392
+ t === e.minObservationSpacingSec ? l(!1) : u({ minObservationSpacingSec: t });
393
393
  }
394
394
  })]
395
395
  }),
396
- /* @__PURE__ */ C("p", {
397
- className: d,
396
+ /* @__PURE__ */ b("p", {
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
  ]
401
401
  }),
402
- /* @__PURE__ */ w("div", {
403
- className: L,
402
+ /* @__PURE__ */ x("div", {
403
+ className: P,
404
404
  children: [
405
- /* @__PURE__ */ C("p", {
406
- className: R,
405
+ /* @__PURE__ */ b("p", {
406
+ className: F,
407
407
  children: "Lighting"
408
408
  }),
409
- /* @__PURE__ */ w("label", {
409
+ /* @__PURE__ */ x("label", {
410
410
  className: "flex flex-col gap-1",
411
- children: [/* @__PURE__ */ C("span", {
412
- className: I,
411
+ children: [/* @__PURE__ */ b("span", {
412
+ className: N,
413
413
  children: "When a light has no reference of its own"
414
- }), /* @__PURE__ */ w("select", {
414
+ }), /* @__PURE__ */ x("select", {
415
415
  value: e.onUncoveredCondition,
416
416
  disabled: n,
417
- className: F,
417
+ className: M,
418
418
  onChange: (e) => {
419
419
  let t = e.target.value;
420
- (t === "skip" || t === "judge-anyway") && l({ onUncoveredCondition: t });
420
+ (t === "skip" || t === "judge-anyway") && u({ onUncoveredCondition: t });
421
421
  },
422
- children: [/* @__PURE__ */ C("option", {
422
+ children: [/* @__PURE__ */ b("option", {
423
423
  value: "skip",
424
424
  children: "Skip the check (recommended)"
425
- }), /* @__PURE__ */ C("option", {
425
+ }), /* @__PURE__ */ b("option", {
426
426
  value: "judge-anyway",
427
427
  children: "Judge against the other light anyway"
428
428
  })]
429
429
  })]
430
430
  }),
431
- /* @__PURE__ */ C("p", {
432
- className: d,
433
- children: H[e.onUncoveredCondition]
431
+ /* @__PURE__ */ b("p", {
432
+ className: c,
433
+ children: z[e.onUncoveredCondition]
434
434
  })
435
435
  ]
436
436
  }),
437
- /* @__PURE__ */ w("div", {
438
- className: L,
437
+ /* @__PURE__ */ x("div", {
438
+ className: P,
439
439
  children: [
440
- /* @__PURE__ */ C("p", {
441
- className: R,
440
+ /* @__PURE__ */ b("p", {
441
+ className: F,
442
442
  children: "What you get told"
443
443
  }),
444
- /* @__PURE__ */ w("label", {
444
+ /* @__PURE__ */ x("label", {
445
445
  className: "flex flex-col gap-1",
446
- children: [/* @__PURE__ */ C("span", {
447
- className: I,
446
+ children: [/* @__PURE__ */ b("span", {
447
+ className: N,
448
448
  children: "Notifications follow"
449
- }), /* @__PURE__ */ w("select", {
449
+ }), /* @__PURE__ */ x("select", {
450
450
  value: e.emit,
451
451
  disabled: n,
452
- className: F,
452
+ className: M,
453
453
  onChange: (e) => {
454
454
  let t = e.target.value;
455
- (t === "latched" || t === "live") && l({ emit: t });
455
+ (t === "latched" || t === "live") && u({ emit: t });
456
456
  },
457
- children: [/* @__PURE__ */ C("option", {
457
+ children: [/* @__PURE__ */ b("option", {
458
458
  value: "latched",
459
459
  children: "The flag — told once, still visible at breakfast"
460
- }), /* @__PURE__ */ C("option", {
460
+ }), /* @__PURE__ */ b("option", {
461
461
  value: "live",
462
462
  children: "The live state — follows the region as it changes"
463
463
  })]
464
464
  })]
465
465
  }),
466
- /* @__PURE__ */ C("p", {
467
- className: d,
466
+ /* @__PURE__ */ b("p", {
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
- /* @__PURE__ */ w("label", {
470
+ /* @__PURE__ */ x("label", {
471
471
  className: "flex items-center gap-2",
472
- children: [/* @__PURE__ */ C("input", {
472
+ children: [/* @__PURE__ */ b("input", {
473
473
  type: "checkbox",
474
474
  checked: e.autoRestore,
475
475
  disabled: n,
476
- onChange: (e) => l({ autoRestore: e.target.checked })
477
- }), /* @__PURE__ */ C("span", {
478
- className: I,
476
+ onChange: (e) => u({ autoRestore: e.target.checked })
477
+ }), /* @__PURE__ */ b("span", {
478
+ className: N,
479
479
  children: "Clear the flag by itself when things look normal again"
480
480
  })]
481
481
  }),
482
- /* @__PURE__ */ C("p", {
483
- className: d,
482
+ /* @__PURE__ */ b("p", {
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
  ]
487
487
  }),
488
- /* @__PURE__ */ w("div", {
489
- className: L,
488
+ /* @__PURE__ */ x("div", {
489
+ className: P,
490
490
  children: [
491
- /* @__PURE__ */ C("p", {
492
- className: R,
491
+ /* @__PURE__ */ b("p", {
492
+ className: F,
493
493
  children: "AI double-check"
494
494
  }),
495
- /* @__PURE__ */ w("label", {
495
+ /* @__PURE__ */ x("label", {
496
496
  className: "flex items-center gap-2",
497
- children: [/* @__PURE__ */ C("input", {
497
+ children: [/* @__PURE__ */ b("input", {
498
498
  type: "checkbox",
499
499
  checked: f,
500
500
  disabled: n || a.confirmPrompt.trim().length === 0,
501
- onChange: (e) => l(e.target.checked ? { confirm: {
502
- ...K(a.confirmPrompt.trim()),
501
+ onChange: (e) => u(e.target.checked ? { confirm: {
502
+ ...U(a.confirmPrompt.trim()),
503
503
  enabled: !0
504
504
  } } : { confirm: null })
505
- }), /* @__PURE__ */ C("span", {
506
- className: I,
505
+ }), /* @__PURE__ */ b("span", {
506
+ className: N,
507
507
  children: "Ask a vision model before changing the answer"
508
508
  })]
509
509
  }),
510
- /* @__PURE__ */ w("label", {
510
+ /* @__PURE__ */ x("label", {
511
511
  className: "flex flex-col gap-1",
512
- children: [/* @__PURE__ */ C("span", {
513
- className: I,
512
+ children: [/* @__PURE__ */ b("span", {
513
+ className: N,
514
514
  children: "The question to ask"
515
- }), /* @__PURE__ */ C("input", {
515
+ }), /* @__PURE__ */ b("input", {
516
516
  type: "text",
517
517
  value: a.confirmPrompt,
518
518
  placeholder: "e.g. Is the wheelie bin still there?",
519
519
  disabled: n,
520
- className: F,
521
- onFocus: () => c(!0),
520
+ className: M,
521
+ onFocus: () => l(!0),
522
522
  onChange: (e) => o((t) => ({
523
523
  ...t,
524
524
  confirmPrompt: e.target.value
525
525
  })),
526
526
  onBlur: () => {
527
527
  let t = a.confirmPrompt.trim();
528
- t.length > 0 && t !== e.confirm?.prompt ? l({ confirm: {
529
- ...K(t),
528
+ t.length > 0 && t !== e.confirm?.prompt ? u({ confirm: {
529
+ ...U(t),
530
530
  enabled: f
531
- } }) : c(!1);
531
+ } }) : l(!1);
532
532
  }
533
533
  })]
534
534
  }),
535
- /* @__PURE__ */ w("p", {
536
- className: d,
535
+ /* @__PURE__ */ x("p", {
536
+ className: c,
537
537
  children: [
538
538
  "The model is asked ",
539
- /* @__PURE__ */ C("strong", { children: "only" }),
539
+ /* @__PURE__ */ b("strong", { children: "only" }),
540
540
  " when the region has already changed enough to flip the answer — roughly twice a week for a bin, not once a minute. It reasons about the object rather than the pixels, so rain, shadows and a repositioned bin stop counting as the thing being taken. If it cannot be reached, the change is held rather than announced."
541
541
  ]
542
542
  })
@@ -545,10 +545,10 @@ function W({ monitor: e, disabled: n, onPatch: r }) {
545
545
  ]
546
546
  });
547
547
  }
548
- function G(e, t, n) {
548
+ function H(e, t, n) {
549
549
  return Math.min(n, Math.max(t, e));
550
550
  }
551
- function K(e) {
551
+ function U(e) {
552
552
  return {
553
553
  enabled: !1,
554
554
  prompt: e,
@@ -560,13 +560,13 @@ function K(e) {
560
560
  //#endregion
561
561
  //#region ../ui-library/src/composites/cap-settings/SceneMonitorEditor.tsx
562
562
  a();
563
- var q = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", J = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors", Y = "rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors", ne = {
563
+ var W = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", G = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors", K = "rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors", q = {
564
564
  alarm: "border-danger/50 bg-danger/15 text-danger",
565
565
  ok: "border-success/50 bg-success/15 text-success",
566
566
  unknown: "border-border bg-surface text-foreground-subtle"
567
- }, re = .8, ie = 3;
567
+ }, J = .8, Y = 3;
568
568
  function X({ deviceId: a }) {
569
- let u = l(o().trpcClient, a), p = s(u?.state.sceneMonitor), x = y(a, { width: 640 }), [O, k] = t(null), [A, j] = t(!1), [M, N] = t(null), [P, F] = t(null), [I, L] = t(null), [R, z] = t(null), [B, V] = t(!1), [H, U] = t(null), [G, K] = t(""), X = n(!0);
569
+ let u = l(o().trpcClient, a), p = s(u?.state.sceneMonitor), v = ne(a, { width: 640 }), [w, T] = t(null), [E, D] = t(!1), [O, A] = t(null), [j, M] = t(null), [N, P] = t(null), [F, I] = t(null), [L, R] = t(!1), [z, B] = t(null), [H, U] = t(""), X = n(!0);
570
570
  i(() => (X.current = !0, () => {
571
571
  X.current = !1;
572
572
  }), []);
@@ -574,23 +574,23 @@ function X({ deviceId: a }) {
574
574
  if (u) try {
575
575
  let e = await u.sceneMonitor?.listScenes({});
576
576
  if (!X.current) return;
577
- e && k(e);
577
+ e && T(e);
578
578
  } catch (e) {
579
579
  if (!X.current) return;
580
- c(e) ? j(!0) : F(e instanceof Error ? e.message : String(e));
580
+ d(e) ? D(!0) : M(e instanceof Error ? e.message : String(e));
581
581
  }
582
582
  }, [u]);
583
583
  i(() => {
584
- k(null), j(!1), F(null), Z();
584
+ T(null), D(!1), M(null), Z();
585
585
  }, [Z]);
586
- let Q = p?.monitors ?? O?.monitors ?? [], ae = Date.now(), $ = e(async (e, t) => {
587
- N(e), F(null);
586
+ let Q = p?.monitors ?? w?.monitors ?? [], ae = Date.now(), $ = e(async (e, t) => {
587
+ A(e), M(null);
588
588
  try {
589
589
  await t(), await Z();
590
590
  } catch (e) {
591
- X.current && F(e instanceof Error ? e.message : String(e));
591
+ X.current && M(e instanceof Error ? e.message : String(e));
592
592
  } finally {
593
- X.current && N(null);
593
+ X.current && A(null);
594
594
  }
595
595
  }, [Z]), oe = r(() => {
596
596
  let e = Q.map((e) => ({
@@ -599,15 +599,15 @@ function X({ deviceId: a }) {
599
599
  label: e.label,
600
600
  enabled: e.enabled
601
601
  }));
602
- return H === null ? e : [...e, {
602
+ return z === null ? e : [...e, {
603
603
  id: "__draft__",
604
- shape: H,
604
+ shape: z,
605
605
  label: "New scene"
606
606
  }];
607
- }, [Q, H]), se = e((e, t) => {
607
+ }, [Q, z]), se = e((e, t) => {
608
608
  if (t.kind === "rect") {
609
609
  if (e === "__draft__") {
610
- U(t);
610
+ B(t);
611
611
  return;
612
612
  }
613
613
  $(`roi-${String(e)}`, async () => u?.sceneMonitor?.updateScene({
@@ -616,205 +616,205 @@ function X({ deviceId: a }) {
616
616
  }));
617
617
  }
618
618
  }, [u, $]), ce = e((e) => {
619
- e.kind === "rect" && U(e);
619
+ e.kind === "rect" && B(e);
620
620
  }, []), le = e(async () => {
621
- H === null || G.trim().length === 0 || (await $("create", async () => {
621
+ z === null || H.trim().length === 0 || (await $("create", async () => {
622
622
  await u?.sceneMonitor?.createScene({
623
- label: G.trim(),
624
- roi: H,
623
+ label: H.trim(),
624
+ roi: z,
625
625
  check: {
626
626
  mode: "similarity",
627
- threshold: re,
628
- hysteresisCount: ie
627
+ threshold: J,
628
+ hysteresisCount: Y
629
629
  }
630
630
  });
631
- }), U(null), K(""), V(!1));
631
+ }), B(null), U(""), R(!1));
632
632
  }, [
633
633
  u,
634
+ z,
634
635
  H,
635
- G,
636
636
  $
637
637
  ]);
638
- return u ? /* @__PURE__ */ C("div", {
638
+ return u ? /* @__PURE__ */ b("div", {
639
639
  className: "flex flex-col gap-3",
640
- children: A ? /* @__PURE__ */ C("p", {
641
- className: `${d} leading-relaxed`,
640
+ children: E ? /* @__PURE__ */ b("p", {
641
+ className: `${c} leading-relaxed`,
642
642
  children: "Scene monitoring is not available for this camera."
643
- }) : /* @__PURE__ */ w(T, { children: [
644
- /* @__PURE__ */ C("p", {
645
- className: `${d} leading-relaxed`,
643
+ }) : /* @__PURE__ */ x(S, { children: [
644
+ /* @__PURE__ */ b("p", {
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
- /* @__PURE__ */ C("div", {
648
+ /* @__PURE__ */ b("div", {
649
649
  className: "relative overflow-hidden rounded-md border border-border",
650
- children: /* @__PURE__ */ C(E, {
650
+ children: /* @__PURE__ */ b(C, {
651
651
  items: oe,
652
652
  supportedShapes: ["rect"],
653
- selectedId: I ?? (H === null ? null : "__draft__"),
654
- onSelect: (e) => L(e === null ? null : String(e)),
653
+ selectedId: N ?? (z === null ? null : "__draft__"),
654
+ onSelect: (e) => P(e === null ? null : String(e)),
655
655
  onShapeChange: se,
656
656
  onDrawComplete: ce,
657
- drawingKind: B && H === null ? "rect" : null,
658
- backdrop: x.src === null ? null : /* @__PURE__ */ C("img", {
659
- src: x.src,
657
+ drawingKind: L && z === null ? "rect" : null,
658
+ backdrop: v.src === null ? null : /* @__PURE__ */ b("img", {
659
+ src: v.src,
660
660
  alt: "",
661
661
  className: "h-full w-full object-contain",
662
662
  draggable: !1
663
663
  })
664
664
  })
665
665
  }),
666
- /* @__PURE__ */ w("div", {
666
+ /* @__PURE__ */ x("div", {
667
667
  className: "flex flex-wrap items-center gap-2",
668
- children: [/* @__PURE__ */ C("button", {
668
+ children: [/* @__PURE__ */ b("button", {
669
669
  type: "button",
670
- className: B ? J : q,
671
- "aria-pressed": B,
670
+ className: L ? G : W,
671
+ "aria-pressed": L,
672
672
  onClick: () => {
673
- V((e) => !e), U(null);
673
+ R((e) => !e), B(null);
674
674
  },
675
- disabled: M !== null,
676
- children: B ? "Cancel" : "+ New scene"
677
- }), /* @__PURE__ */ C("button", {
675
+ disabled: O !== null,
676
+ children: L ? "Cancel" : "+ New scene"
677
+ }), /* @__PURE__ */ b("button", {
678
678
  type: "button",
679
- className: q,
680
- onClick: x.refresh,
681
- disabled: M !== null,
679
+ className: W,
680
+ onClick: v.refresh,
681
+ disabled: O !== null,
682
682
  children: "Refresh frame"
683
683
  })]
684
684
  }),
685
- B && /* @__PURE__ */ w("div", {
685
+ L && /* @__PURE__ */ x("div", {
686
686
  className: "flex flex-col gap-2 rounded-md border border-border bg-surface p-2",
687
687
  children: [
688
- /* @__PURE__ */ C("p", {
688
+ /* @__PURE__ */ b("p", {
689
689
  className: "text-[10px] text-foreground-subtle",
690
- children: H === null ? "Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched." : "Name it, then create. You capture what “normal” looks like next."
690
+ children: z === null ? "Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched." : "Name it, then create. You capture what “normal” looks like next."
691
691
  }),
692
- H !== null && m(H) && /* @__PURE__ */ C("p", {
692
+ z !== null && m(z) && /* @__PURE__ */ b("p", {
693
693
  className: "text-[11px] leading-relaxed text-warning",
694
694
  children: "That box covers most of the frame. A scene that big is dominated by the weather, the sky and passing cars — it will quietly stop noticing the thing you actually care about. Draw it tighter."
695
695
  }),
696
- /* @__PURE__ */ w("div", {
696
+ /* @__PURE__ */ x("div", {
697
697
  className: "flex items-center gap-2",
698
- children: [/* @__PURE__ */ C("input", {
698
+ children: [/* @__PURE__ */ b("input", {
699
699
  type: "text",
700
- value: G,
701
- onChange: (e) => K(e.target.value),
700
+ value: H,
701
+ onChange: (e) => U(e.target.value),
702
702
  placeholder: "e.g. Immondizia prelevata",
703
703
  className: "flex-1 rounded-md border border-border bg-surface px-2 py-1 text-[12px] text-foreground"
704
- }), /* @__PURE__ */ C("button", {
704
+ }), /* @__PURE__ */ b("button", {
705
705
  type: "button",
706
- className: J,
706
+ className: G,
707
707
  onClick: () => void le(),
708
- disabled: H === null || G.trim().length === 0 || M !== null,
708
+ disabled: z === null || H.trim().length === 0 || O !== null,
709
709
  children: "Create"
710
710
  })]
711
711
  })
712
712
  ]
713
713
  }),
714
- P !== null && /* @__PURE__ */ C("p", {
714
+ j !== null && /* @__PURE__ */ b("p", {
715
715
  className: "text-[11px] leading-relaxed text-danger",
716
- children: P
716
+ children: j
717
717
  }),
718
- Q.length === 0 ? /* @__PURE__ */ C("p", {
719
- className: `${d} leading-relaxed`,
718
+ Q.length === 0 ? /* @__PURE__ */ b("p", {
719
+ className: `${c} leading-relaxed`,
720
720
  children: "No scenes on this camera yet."
721
- }) : /* @__PURE__ */ C("ul", {
721
+ }) : /* @__PURE__ */ b("ul", {
722
722
  className: "flex flex-col gap-2",
723
723
  children: Q.map((e) => {
724
724
  let t = g(e);
725
- return /* @__PURE__ */ w("li", {
726
- className: `flex flex-col gap-1.5 rounded-md border p-2 ${I === e.id ? "border-primary/50" : "border-border"}`,
725
+ return /* @__PURE__ */ x("li", {
726
+ className: `flex flex-col gap-1.5 rounded-md border p-2 ${N === e.id ? "border-primary/50" : "border-border"}`,
727
727
  children: [
728
- /* @__PURE__ */ w("div", {
728
+ /* @__PURE__ */ x("div", {
729
729
  className: "flex items-center gap-2",
730
- children: [/* @__PURE__ */ C("button", {
730
+ children: [/* @__PURE__ */ b("button", {
731
731
  type: "button",
732
732
  className: "flex-1 text-left text-[12px] font-medium text-foreground",
733
- onClick: () => L(e.id),
733
+ onClick: () => P(e.id),
734
734
  children: e.label
735
- }), /* @__PURE__ */ C("span", {
736
- className: `rounded border px-1.5 py-0.5 text-[10px] font-medium ${ne[t.tone]}`,
735
+ }), /* @__PURE__ */ b("span", {
736
+ className: `rounded border px-1.5 py-0.5 text-[10px] font-medium ${q[t.tone]}`,
737
737
  children: t.text
738
738
  })]
739
739
  }),
740
- /* @__PURE__ */ C("p", {
741
- className: `${d} leading-relaxed`,
740
+ /* @__PURE__ */ b("p", {
741
+ className: `${c} leading-relaxed`,
742
742
  children: f(e, ae)
743
743
  }),
744
- /* @__PURE__ */ C("p", {
745
- className: `${d} tabular-nums`,
746
- children: v(e)
744
+ /* @__PURE__ */ b("p", {
745
+ className: `${c} tabular-nums`,
746
+ children: te(e)
747
747
  }),
748
- /* @__PURE__ */ C(te, {
748
+ /* @__PURE__ */ b(k, {
749
749
  monitor: e,
750
- disabled: M !== null,
750
+ disabled: O !== null,
751
751
  onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => u.sceneMonitor?.deleteReference({
752
752
  monitorId: e.id,
753
753
  stateId: t,
754
754
  index: n
755
755
  }))
756
756
  }),
757
- /* @__PURE__ */ w("div", {
757
+ /* @__PURE__ */ x("div", {
758
758
  className: "flex flex-wrap items-center gap-1.5",
759
759
  children: [
760
- b.map((t) => {
760
+ re.map((t) => {
761
761
  let n = t === "ir";
762
- return /* @__PURE__ */ w("button", {
762
+ return /* @__PURE__ */ x("button", {
763
763
  type: "button",
764
- className: q,
765
- disabled: M !== null,
764
+ className: W,
765
+ disabled: O !== 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 ${_(t).toLowerCase()} reference`,
767
767
  onClick: () => void $(`cap-${e.id}-${t}`, async () => u.sceneMonitor?.captureReference({
768
768
  monitorId: e.id,
769
769
  condition: t
770
770
  })),
771
771
  children: [
772
- /* @__PURE__ */ C(ee, { className: "mr-1 inline h-3 w-3" }),
772
+ /* @__PURE__ */ b(ee, { className: "mr-1 inline h-3 w-3" }),
773
773
  "Capture ",
774
774
  _(t).toLowerCase(),
775
- n && /* @__PURE__ */ C("span", {
775
+ n && /* @__PURE__ */ b("span", {
776
776
  className: "ml-1 text-foreground-subtle/70",
777
777
  children: "(optional)"
778
778
  })
779
779
  ]
780
780
  }, t);
781
781
  }),
782
- /* @__PURE__ */ w("button", {
782
+ /* @__PURE__ */ x("button", {
783
783
  type: "button",
784
- className: J,
785
- disabled: M !== null || e.states.length === 0,
784
+ className: G,
785
+ disabled: O !== null || e.states.length === 0,
786
786
  title: "Clear the flag and re-photograph what normal looks like right now",
787
787
  onClick: () => void $(`reset-${e.id}`, async () => u.sceneMonitor?.resetScene({ monitorId: e.id })),
788
- children: [/* @__PURE__ */ C(h, { className: "mr-1 inline h-3 w-3" }), "Reset"]
788
+ children: [/* @__PURE__ */ b(h, { className: "mr-1 inline h-3 w-3" }), "Reset"]
789
789
  }),
790
- /* @__PURE__ */ C("button", {
790
+ /* @__PURE__ */ b("button", {
791
791
  type: "button",
792
- className: q,
793
- disabled: M !== null,
792
+ className: W,
793
+ disabled: O !== null,
794
794
  onClick: () => void $(`check-${e.id}`, async () => u.sceneMonitor?.recheckNow({ monitorId: e.id })),
795
795
  children: "Check now"
796
796
  }),
797
- /* @__PURE__ */ w("button", {
797
+ /* @__PURE__ */ x("button", {
798
798
  type: "button",
799
- className: R === e.id ? J : q,
800
- "aria-pressed": R === e.id,
799
+ className: F === e.id ? G : W,
800
+ "aria-pressed": F === e.id,
801
801
  "aria-label": `Settings for ${e.label}`,
802
- disabled: M !== null,
803
- onClick: () => z((t) => t === e.id ? null : e.id),
804
- children: [/* @__PURE__ */ C(D, { className: "mr-1 inline h-3 w-3" }), "Settings"]
802
+ disabled: O !== null,
803
+ onClick: () => I((t) => t === e.id ? null : e.id),
804
+ children: [/* @__PURE__ */ b(ie, { className: "mr-1 inline h-3 w-3" }), "Settings"]
805
805
  }),
806
- /* @__PURE__ */ C("button", {
806
+ /* @__PURE__ */ b("button", {
807
807
  type: "button",
808
- className: Y,
809
- disabled: M !== null,
808
+ className: K,
809
+ disabled: O !== null,
810
810
  onClick: () => void $(`del-${e.id}`, async () => u.sceneMonitor?.deleteScene({ monitorId: e.id })),
811
- children: /* @__PURE__ */ C(S, { className: "h-3 w-3" })
811
+ children: /* @__PURE__ */ b(y, { className: "h-3 w-3" })
812
812
  })
813
813
  ]
814
814
  }),
815
- R === e.id && /* @__PURE__ */ C(W, {
815
+ F === e.id && /* @__PURE__ */ b(V, {
816
816
  monitor: e,
817
- disabled: M !== null,
817
+ disabled: O !== null,
818
818
  onPatch: (t) => void $(`tune-${e.id}`, async () => u.sceneMonitor?.updateScene({
819
819
  monitorId: e.id,
820
820
  patch: t