@camstack/addon-model-studio 1.1.295 → 1.1.297

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 (18) hide show
  1. package/dist/{MotionZonesSettings-DOhuE4t6.mjs → MotionZonesSettings-D_HfgGVx.mjs} +21 -21
  2. package/dist/{PrivacyMaskSettings-BtQIysUm.mjs → PrivacyMaskSettings-lrZujhrs.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-B4cEP3UH.mjs → SceneMonitorEditor-D_k9w6y8.mjs} +71 -71
  4. package/dist/_stub.js +4254 -4181
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DNRDIeO2.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-U1Dq0t4d.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DX4Jz8LK.mjs +26 -0
  7. package/dist/{hostInit-DLBoEjee.mjs → hostInit-lgxajgO5.mjs} +3 -3
  8. package/dist/model-studio.addon.js +278 -422
  9. package/dist/model-studio.addon.mjs +278 -422
  10. package/dist/{player-overlays-BVHDRE8f.mjs → player-overlays-BErbmrZZ.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-CI-NtcQi.mjs → responsive-BaiZrRiv.mjs} +13 -10
  13. package/dist/{scene-monitor-copy-CvzuJJ8Z.mjs → scene-monitor-copy-DSS-RbWQ.mjs} +1 -1
  14. package/dist/{square-CsljmL2M.mjs → square-CjAc_uJa.mjs} +1 -1
  15. package/dist/{trash-2-DwX9K1LA.mjs → trash-2--He_-Iao.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Bu2vRo0B.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-ZIEWPFwu.mjs} +1 -1
  17. package/package.json +7 -2
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CDZyIXC0.mjs +0 -26
@@ -1,10 +1,10 @@
1
1
  import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs";
2
2
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
- import { r as l, t as ee } from "./ui-text-BqZa5BNK.mjs";
4
- import { d as u, f as d, g as f, l as p, m as te } from "./responsive-CI-NtcQi.mjs";
5
- import { n as ne, t as m } from "./player-overlays-BVHDRE8f.mjs";
3
+ import { r as ee, t as te } from "./ui-text-BqZa5BNK.mjs";
4
+ import { _ as l, d as u, f as d, h as f, l as p } from "./responsive-BaiZrRiv.mjs";
5
+ import { n as ne, t as m } from "./player-overlays-BErbmrZZ.mjs";
6
6
  import { MaskShapeCanvas as h } from "./MaskShapeCanvas-CrWutXSb.mjs";
7
- var g = f("grid-2x2", [
7
+ var g = l("grid-2x2", [
8
8
  ["path", {
9
9
  d: "M12 3v18",
10
10
  key: "108xh3"
@@ -63,7 +63,7 @@ function O(e, t, n, r) {
63
63
  return o;
64
64
  }
65
65
  function k({ deviceId: e }) {
66
- let f = l(), E = d(te().trpcClient, e), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(b), [z, B] = a(!1), [V, H] = a(!1), U = t(!1);
66
+ let l = ee(), E = d(f().trpcClient, e), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(b), [z, B] = a(!1), [V, H] = a(!1), U = t(!1);
67
67
  n(() => {
68
68
  if (!E) return;
69
69
  let e = !1;
@@ -192,16 +192,16 @@ function k({ deviceId: e }) {
192
192
  ]));
193
193
  let ue = !j && k !== null && N !== null;
194
194
  return E ? /* @__PURE__ */ o(ne, {
195
- title: f("uiLibrary.motionZones.title", "Motion Zones"),
195
+ title: l("uiLibrary.motionZones.title", "Motion Zones"),
196
196
  icon: /* @__PURE__ */ o(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
197
197
  children: /* @__PURE__ */ o("div", {
198
198
  className: "flex flex-col gap-3",
199
199
  children: j ? /* @__PURE__ */ o("p", {
200
200
  className: `${p} leading-relaxed`,
201
- children: f("uiLibrary.motionZones.unsupported", "This camera doesn't expose an on-board motion zones grid.")
201
+ children: l("uiLibrary.motionZones.unsupported", "This camera doesn't expose an on-board motion zones grid.")
202
202
  }) : ue ? /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o("p", {
203
203
  className: `${p} leading-relaxed`,
204
- children: /* @__PURE__ */ o(ee, {
204
+ children: /* @__PURE__ */ o(te, {
205
205
  uiKey: "uiLibrary.motionZones.intro",
206
206
  fallback: "Toggle <0>Edit grid</0> to paint the region directly on the live frame, then <1>Save</1> to push the mask to the camera. Pick a bigger <2>Cell size</2> for quicker, broad-stroke painting — it's resampled to the camera's native {{width}}×{{height}} grid on save (×1 is the finest).",
207
207
  components: [
@@ -223,45 +223,45 @@ function k({ deviceId: e }) {
223
223
  disabled: z,
224
224
  "aria-pressed": V,
225
225
  className: V ? S : x,
226
- children: V ? f("uiLibrary.motionZones.doneEditing", "Done editing") : f("uiLibrary.motionZones.editGrid", "Edit grid")
226
+ children: V ? l("uiLibrary.motionZones.doneEditing", "Done editing") : l("uiLibrary.motionZones.editGrid", "Edit grid")
227
227
  }),
228
228
  /* @__PURE__ */ o("button", {
229
229
  type: "button",
230
230
  onClick: () => Z(!0),
231
231
  disabled: z,
232
232
  className: x,
233
- children: f("uiLibrary.motionZones.allOn", "All on")
233
+ children: l("uiLibrary.motionZones.allOn", "All on")
234
234
  }),
235
235
  /* @__PURE__ */ o("button", {
236
236
  type: "button",
237
237
  onClick: () => Z(!1),
238
238
  disabled: z,
239
239
  className: x,
240
- children: f("uiLibrary.motionZones.allOff", "All off")
240
+ children: l("uiLibrary.motionZones.allOff", "All off")
241
241
  }),
242
242
  /* @__PURE__ */ o("button", {
243
243
  type: "button",
244
244
  onClick: oe,
245
245
  disabled: z,
246
246
  className: x,
247
- children: f("uiLibrary.motionZones.invert", "Invert")
247
+ children: l("uiLibrary.motionZones.invert", "Invert")
248
248
  }),
249
249
  /* @__PURE__ */ s("div", {
250
250
  className: "flex items-center gap-1 ml-1",
251
251
  role: "group",
252
- "aria-label": f("uiLibrary.motionZones.cellSize", "Cell size"),
252
+ "aria-label": l("uiLibrary.motionZones.cellSize", "Cell size"),
253
253
  children: [/* @__PURE__ */ o("span", {
254
254
  className: `${p} mr-0.5`,
255
- children: f("uiLibrary.motionZones.cellSize", "Cell size")
255
+ children: l("uiLibrary.motionZones.cellSize", "Cell size")
256
256
  }), re.map((e) => /* @__PURE__ */ s("button", {
257
257
  type: "button",
258
258
  onClick: () => ce(e),
259
259
  disabled: z,
260
260
  "aria-pressed": L === e,
261
- title: e === 1 ? f("uiLibrary.motionZones.cameraGrid", "Camera grid {{width}}×{{height}} (finest)", {
261
+ title: e === 1 ? l("uiLibrary.motionZones.cameraGrid", "Camera grid {{width}}×{{height}} (finest)", {
262
262
  width: W,
263
263
  height: G
264
- }) : f("uiLibrary.motionZones.paintingGrid", "{{width}}×{{height}} painting grid · cells ×{{factor}} bigger", {
264
+ }) : l("uiLibrary.motionZones.paintingGrid", "{{width}}×{{height}} painting grid · cells ×{{factor}} bigger", {
265
265
  width: T(W, e),
266
266
  height: T(G, e),
267
267
  factor: e
@@ -272,12 +272,12 @@ function k({ deviceId: e }) {
272
272
  }),
273
273
  /* @__PURE__ */ s("span", {
274
274
  className: `${p} ml-1 tabular-nums`,
275
- children: [f("uiLibrary.motionZones.cells", "{{active}} / {{total}} cells · {{width}}×{{height}}", {
275
+ children: [l("uiLibrary.motionZones.cells", "{{active}} / {{total}} cells · {{width}}×{{height}}", {
276
276
  active: ie,
277
277
  total: ae,
278
278
  width: k.grid.width,
279
279
  height: k.grid.height
280
- }), L === 1 ? "" : f("uiLibrary.motionZones.paintSuffix", " · paint {{width}}×{{height}}", {
280
+ }), L === 1 ? "" : l("uiLibrary.motionZones.paintSuffix", " · paint {{width}}×{{height}}", {
281
281
  width: K,
282
282
  height: q
283
283
  })]
@@ -288,19 +288,19 @@ function k({ deviceId: e }) {
288
288
  onClick: se,
289
289
  disabled: z || !Y,
290
290
  className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
291
- children: f("uiLibrary.motionZones.revert", "Revert")
291
+ children: l("uiLibrary.motionZones.revert", "Revert")
292
292
  }),
293
293
  /* @__PURE__ */ o("button", {
294
294
  type: "button",
295
295
  onClick: () => void le(),
296
296
  disabled: z || !Y,
297
297
  className: S,
298
- children: z ? f("uiLibrary.motionZones.saving", "Saving…") : f("uiLibrary.motionZones.save", "Save")
298
+ children: z ? l("uiLibrary.motionZones.saving", "Saving…") : l("uiLibrary.motionZones.save", "Save")
299
299
  })
300
300
  ]
301
301
  })] }) : /* @__PURE__ */ o("p", {
302
302
  className: `${p} leading-relaxed`,
303
- children: f("uiLibrary.motionZones.loading", "Loading the camera's grid…")
303
+ children: l("uiLibrary.motionZones.loading", "Loading the camera's grid…")
304
304
  })
305
305
  })
306
306
  }) : null;
@@ -1,10 +1,10 @@
1
1
  import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs";
2
2
  import { n as o, r as s, t as ee } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
3
  import { r as te, t as ne } from "./ui-text-BqZa5BNK.mjs";
4
- import { d as re, f as ie, g as c, l, m as ae } from "./responsive-CI-NtcQi.mjs";
5
- import { n as oe, t as se } from "./player-overlays-BVHDRE8f.mjs";
6
- import { n as ce, r as le, t as ue } from "./square-CsljmL2M.mjs";
7
- import { t as de } from "./trash-2-DwX9K1LA.mjs";
4
+ import { _ as c, d as re, f as ie, h as ae, l } from "./responsive-BaiZrRiv.mjs";
5
+ import { n as oe, t as se } from "./player-overlays-BErbmrZZ.mjs";
6
+ import { n as ce, r as le, t as ue } from "./square-CjAc_uJa.mjs";
7
+ import { t as de } from "./trash-2--He_-Iao.mjs";
8
8
  import { MaskShapeCanvas as fe } from "./MaskShapeCanvas-CrWutXSb.mjs";
9
9
  var pe = c("hexagon", [["path", {
10
10
  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",
@@ -1,11 +1,11 @@
1
1
  import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs";
2
2
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
3
  import { r as l, t as u } from "./ui-text-BqZa5BNK.mjs";
4
- import { d, f, g as p, l as m, m as h, p as g } from "./responsive-CI-NtcQi.mjs";
5
- import { a as _, c as v, d as y, i as ee, l as te, n as b, o as x, r as S, s as C, t as w, u as T } from "./scene-monitor-copy-CvzuJJ8Z.mjs";
6
- import { t as E } from "./trash-2-DwX9K1LA.mjs";
7
- import { MaskShapeCanvas as D } from "./MaskShapeCanvas-CrWutXSb.mjs";
8
- var O = p("settings-2", [
4
+ import { _ as d, d as f, f as p, h as m, l as h, p as g } from "./responsive-BaiZrRiv.mjs";
5
+ import { a as _, c as v, d as y, i as ee, l as b, n as x, o as S, r as C, s as w, t as T, u as E } from "./scene-monitor-copy-DSS-RbWQ.mjs";
6
+ import { t as D } from "./trash-2--He_-Iao.mjs";
7
+ import { MaskShapeCanvas as O } from "./MaskShapeCanvas-CrWutXSb.mjs";
8
+ var te = d("settings-2", [
9
9
  ["path", {
10
10
  d: "M14 17H5",
11
11
  key: "gfn3mx"
@@ -56,7 +56,7 @@ var N = "rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] fo
56
56
  function ne({ monitor: e, disabled: t, onDelete: n }) {
57
57
  let r = l(), i = j(e), c = M(e), [u, d] = a(null);
58
58
  return i.length === 0 ? /* @__PURE__ */ o("p", {
59
- className: `${m} leading-relaxed`,
59
+ className: `${h} leading-relaxed`,
60
60
  children: r("uiLibrary.sceneReferenceGallery.empty", "No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against.")
61
61
  }) : /* @__PURE__ */ o("div", {
62
62
  className: "flex flex-col gap-2",
@@ -65,7 +65,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
65
65
  children: [/* @__PURE__ */ s("p", {
66
66
  className: "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle",
67
67
  children: [
68
- x(e.condition, r),
68
+ S(e.condition, r),
69
69
  " · ",
70
70
  e.tiles.length
71
71
  ]
@@ -78,7 +78,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
78
78
  children: [
79
79
  /* @__PURE__ */ o(P, { reference: i.reference }),
80
80
  /* @__PURE__ */ o("span", {
81
- className: `${m} tabular-nums`,
81
+ className: `${h} tabular-nums`,
82
82
  children: F(i.reference.capturedAt)
83
83
  }),
84
84
  /* @__PURE__ */ s("button", {
@@ -86,7 +86,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
86
86
  className: N,
87
87
  disabled: t,
88
88
  "aria-label": r("uiLibrary.sceneReferenceGallery.deleteLabel", "Delete the {{variant}} photograph from {{date}}", {
89
- variant: x(e.condition, r).toLowerCase(),
89
+ variant: S(e.condition, r).toLowerCase(),
90
90
  date: F(i.reference.capturedAt)
91
91
  }),
92
92
  onClick: () => {
@@ -99,7 +99,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
99
99
  index: i.index
100
100
  });
101
101
  },
102
- children: [/* @__PURE__ */ o(E, { className: "mr-1 inline h-3 w-3" }), f ? r("uiLibrary.sceneReferenceGallery.confirm", "Confirm") : r("uiLibrary.sceneReferenceGallery.delete", "Delete")]
102
+ children: [/* @__PURE__ */ o(D, { className: "mr-1 inline h-3 w-3" }), f ? r("uiLibrary.sceneReferenceGallery.confirm", "Confirm") : r("uiLibrary.sceneReferenceGallery.delete", "Delete")]
103
103
  }),
104
104
  f && /* @__PURE__ */ o("p", {
105
105
  className: "text-[10px] leading-snug text-warning",
@@ -117,7 +117,7 @@ function P({ reference: e }) {
117
117
  return i === void 0 || n ? /* @__PURE__ */ s("div", {
118
118
  className: "flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle",
119
119
  title: t("uiLibrary.sceneReferenceGallery.missingPicture", "The picture for this reference is no longer stored. The reference itself is intact and still being scored against."),
120
- children: [/* @__PURE__ */ o(T, { className: "h-4 w-4" }), /* @__PURE__ */ o("span", {
120
+ children: [/* @__PURE__ */ o(E, { className: "h-4 w-4" }), /* @__PURE__ */ o("span", {
121
121
  className: "text-[9px]",
122
122
  children: t("uiLibrary.sceneReferenceGallery.noPicture", "no picture")
123
123
  })]
@@ -165,12 +165,12 @@ function W(e) {
165
165
  };
166
166
  }
167
167
  function G({ monitor: e, disabled: t, onPatch: r }) {
168
- let i = l(), [d, f] = a(() => W(e)), [p, h] = a(!1);
168
+ let i = l(), [d, f] = a(() => W(e)), [p, m] = a(!1);
169
169
  n(() => {
170
170
  p || f(W(e));
171
171
  }, [e, p]);
172
172
  let g = (e) => {
173
- h(!1), r(e);
173
+ m(!1), r(e);
174
174
  }, _ = (t) => e.check.mode === "similarity" ? {
175
175
  mode: "similarity",
176
176
  threshold: t.threshold ?? e.check.threshold,
@@ -199,14 +199,14 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
199
199
  value: d.label,
200
200
  disabled: t,
201
201
  className: I,
202
- onFocus: () => h(!0),
202
+ onFocus: () => m(!0),
203
203
  onChange: (e) => f((t) => ({
204
204
  ...t,
205
205
  label: e.target.value
206
206
  })),
207
207
  onBlur: () => {
208
208
  let t = d.label.trim();
209
- t.length > 0 && t !== e.label ? g({ label: t }) : h(!1);
209
+ t.length > 0 && t !== e.label ? g({ label: t }) : m(!1);
210
210
  }
211
211
  })]
212
212
  }),
@@ -223,7 +223,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
223
223
  })]
224
224
  }),
225
225
  /* @__PURE__ */ o("p", {
226
- className: m,
226
+ className: h,
227
227
  children: i("uiLibrary.sceneSettingsForm.watchingHint", "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.")
228
228
  }),
229
229
  /* @__PURE__ */ s("label", {
@@ -256,7 +256,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
256
256
  })]
257
257
  }),
258
258
  /* @__PURE__ */ o("p", {
259
- className: m,
259
+ className: h,
260
260
  children: H(e.triggerMode, i)
261
261
  }),
262
262
  /* @__PURE__ */ s("label", {
@@ -271,19 +271,19 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
271
271
  value: d.checkIntervalSec,
272
272
  disabled: t,
273
273
  className: I,
274
- onFocus: () => h(!0),
274
+ onFocus: () => m(!0),
275
275
  onChange: (e) => f((t) => ({
276
276
  ...t,
277
277
  checkIntervalSec: Number(e.target.value) || 0
278
278
  })),
279
279
  onBlur: () => {
280
280
  let t = K(d.checkIntervalSec, B, V);
281
- t === e.checkIntervalSec ? h(!1) : g({ checkIntervalSec: t });
281
+ t === e.checkIntervalSec ? m(!1) : g({ checkIntervalSec: t });
282
282
  }
283
283
  })]
284
284
  }),
285
285
  /* @__PURE__ */ o("p", {
286
- className: m,
286
+ className: h,
287
287
  children: i("uiLibrary.sceneSettingsForm.intervalHint", "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.")
288
288
  })
289
289
  ]
@@ -312,16 +312,16 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
312
312
  step: .01,
313
313
  value: d.threshold,
314
314
  disabled: t,
315
- onFocus: () => h(!0),
315
+ onFocus: () => m(!0),
316
316
  onChange: (e) => f((t) => ({
317
317
  ...t,
318
318
  threshold: Number(e.target.value)
319
319
  })),
320
320
  onMouseUp: () => {
321
- d.threshold === y ? h(!1) : g({ check: _({ threshold: d.threshold }) });
321
+ d.threshold === y ? m(!1) : g({ check: _({ threshold: d.threshold }) });
322
322
  },
323
323
  onBlur: () => {
324
- d.threshold === y ? h(!1) : g({ check: _({ threshold: d.threshold }) });
324
+ d.threshold === y ? m(!1) : g({ check: _({ threshold: d.threshold }) });
325
325
  }
326
326
  })]
327
327
  }), /* @__PURE__ */ o("p", {
@@ -340,19 +340,19 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
340
340
  value: d.hysteresisCount,
341
341
  disabled: t,
342
342
  className: I,
343
- onFocus: () => h(!0),
343
+ onFocus: () => m(!0),
344
344
  onChange: (e) => f((t) => ({
345
345
  ...t,
346
346
  hysteresisCount: Number(e.target.value) || 1
347
347
  })),
348
348
  onBlur: () => {
349
349
  let t = K(d.hysteresisCount, 1, 10);
350
- t === e.check.hysteresisCount ? h(!1) : g({ check: _({ hysteresisCount: t }) });
350
+ t === e.check.hysteresisCount ? m(!1) : g({ check: _({ hysteresisCount: t }) });
351
351
  }
352
352
  })]
353
353
  }),
354
354
  /* @__PURE__ */ o("p", {
355
- className: m,
355
+ className: h,
356
356
  children: i("uiLibrary.sceneSettingsForm.agreeingHint", "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.")
357
357
  }),
358
358
  /* @__PURE__ */ s("label", {
@@ -367,19 +367,19 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
367
367
  value: d.quietSeconds,
368
368
  disabled: t,
369
369
  className: I,
370
- onFocus: () => h(!0),
370
+ onFocus: () => m(!0),
371
371
  onChange: (e) => f((t) => ({
372
372
  ...t,
373
373
  quietSeconds: Number(e.target.value) || 0
374
374
  })),
375
375
  onBlur: () => {
376
376
  let t = K(d.quietSeconds, 0, 3600);
377
- t === e.quietSeconds ? h(!1) : g({ quietSeconds: t });
377
+ t === e.quietSeconds ? m(!1) : g({ quietSeconds: t });
378
378
  }
379
379
  })]
380
380
  }),
381
381
  /* @__PURE__ */ o("p", {
382
- className: m,
382
+ className: h,
383
383
  children: i("uiLibrary.sceneSettingsForm.quietHint", "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.")
384
384
  }),
385
385
  /* @__PURE__ */ s("label", {
@@ -394,19 +394,19 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
394
394
  value: d.minObservationSpacingSec,
395
395
  disabled: t,
396
396
  className: I,
397
- onFocus: () => h(!0),
397
+ onFocus: () => m(!0),
398
398
  onChange: (e) => f((t) => ({
399
399
  ...t,
400
400
  minObservationSpacingSec: Number(e.target.value) || 0
401
401
  })),
402
402
  onBlur: () => {
403
403
  let t = K(d.minObservationSpacingSec, 0, 3600);
404
- t === e.minObservationSpacingSec ? h(!1) : g({ minObservationSpacingSec: t });
404
+ t === e.minObservationSpacingSec ? m(!1) : g({ minObservationSpacingSec: t });
405
405
  }
406
406
  })]
407
407
  }),
408
408
  /* @__PURE__ */ o("p", {
409
- className: m,
409
+ className: h,
410
410
  children: i("uiLibrary.sceneSettingsForm.minGapHint", "Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions.")
411
411
  })
412
412
  ]
@@ -441,7 +441,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
441
441
  })]
442
442
  }),
443
443
  /* @__PURE__ */ o("p", {
444
- className: m,
444
+ className: h,
445
445
  children: U(e.onUncoveredCondition, i)
446
446
  })
447
447
  ]
@@ -476,7 +476,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
476
476
  })]
477
477
  }),
478
478
  /* @__PURE__ */ o("p", {
479
- className: m,
479
+ className: h,
480
480
  children: i("uiLibrary.sceneSettingsForm.emitHint", "“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.")
481
481
  }),
482
482
  /* @__PURE__ */ s("label", {
@@ -492,7 +492,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
492
492
  })]
493
493
  }),
494
494
  /* @__PURE__ */ o("p", {
495
- className: m,
495
+ className: h,
496
496
  children: i("uiLibrary.sceneSettingsForm.autoRestoreHint", "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.")
497
497
  })
498
498
  ]
@@ -530,7 +530,7 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
530
530
  placeholder: i("uiLibrary.sceneSettingsForm.questionPlaceholder", "e.g. Is the wheelie bin still there?"),
531
531
  disabled: t,
532
532
  className: I,
533
- onFocus: () => h(!0),
533
+ onFocus: () => m(!0),
534
534
  onChange: (e) => f((t) => ({
535
535
  ...t,
536
536
  confirmPrompt: e.target.value
@@ -540,12 +540,12 @@ function G({ monitor: e, disabled: t, onPatch: r }) {
540
540
  t.length > 0 && t !== e.confirm?.prompt ? g({ confirm: {
541
541
  ...q(t),
542
542
  enabled: v
543
- } }) : h(!1);
543
+ } }) : m(!1);
544
544
  }
545
545
  })]
546
546
  }),
547
547
  /* @__PURE__ */ o("p", {
548
- className: m,
548
+ className: h,
549
549
  children: /* @__PURE__ */ o(u, {
550
550
  uiKey: "uiLibrary.sceneSettingsForm.confirmHint",
551
551
  fallback: "The model is asked <0>only</0> 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.",
@@ -578,20 +578,20 @@ var J = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-m
578
578
  unknown: "border-border bg-surface text-foreground-subtle"
579
579
  }, ae = .8, oe = 3;
580
580
  function X({ deviceId: e }) {
581
- let u = l(), p = f(h().trpcClient, e), v = g(p?.state.sceneMonitor), T = C(e, { width: 640 }), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(null), [z, B] = a(null), [V, H] = a(!1), [U, W] = a(null), [K, q] = a(""), X = t(!0);
581
+ let u = l(), d = p(m().trpcClient, e), v = g(d?.state.sceneMonitor), E = w(e, { width: 640 }), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(null), [z, B] = a(null), [V, H] = a(!1), [U, W] = a(null), [K, q] = a(""), X = t(!0);
582
582
  n(() => (X.current = !0, () => {
583
583
  X.current = !1;
584
584
  }), []);
585
585
  let Z = i(async () => {
586
- if (p) try {
587
- let e = await p.sceneMonitor?.listScenes({});
586
+ if (d) try {
587
+ let e = await d.sceneMonitor?.listScenes({});
588
588
  if (!X.current) return;
589
589
  e && A(e);
590
590
  } catch (e) {
591
591
  if (!X.current) return;
592
- d(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
592
+ f(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
593
593
  }
594
- }, [p]);
594
+ }, [d]);
595
595
  n(() => {
596
596
  A(null), M(!1), I(null), Z();
597
597
  }, [Z]);
@@ -626,16 +626,16 @@ function X({ deviceId: e }) {
626
626
  W(t);
627
627
  return;
628
628
  }
629
- $(`roi-${String(e)}`, async () => p?.sceneMonitor?.updateScene({
629
+ $(`roi-${String(e)}`, async () => d?.sceneMonitor?.updateScene({
630
630
  monitorId: String(e),
631
631
  patch: { roi: t }
632
632
  }));
633
633
  }
634
- }, [p, $]), ue = i((e) => {
634
+ }, [d, $]), ue = i((e) => {
635
635
  e.kind === "rect" && W(e);
636
636
  }, []), de = i(async () => {
637
637
  U === null || K.trim().length === 0 || (await $("create", async () => {
638
- await p?.sceneMonitor?.createScene({
638
+ await d?.sceneMonitor?.createScene({
639
639
  label: K.trim(),
640
640
  roi: U,
641
641
  check: {
@@ -646,24 +646,24 @@ function X({ deviceId: e }) {
646
646
  });
647
647
  }), W(null), q(""), H(!1));
648
648
  }, [
649
- p,
649
+ d,
650
650
  U,
651
651
  K,
652
652
  $
653
653
  ]);
654
- return p ? /* @__PURE__ */ o("div", {
654
+ return d ? /* @__PURE__ */ o("div", {
655
655
  className: "flex flex-col gap-3",
656
656
  children: j ? /* @__PURE__ */ o("p", {
657
- className: `${m} leading-relaxed`,
657
+ className: `${h} leading-relaxed`,
658
658
  children: u("uiLibrary.sceneMonitor.unsupported", "Scene monitoring is not available for this camera.")
659
659
  }) : /* @__PURE__ */ s(c, { children: [
660
660
  /* @__PURE__ */ o("p", {
661
- className: `${m} leading-relaxed`,
661
+ className: `${h} leading-relaxed`,
662
662
  children: u("uiLibrary.sceneMonitor.intro", "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.")
663
663
  }),
664
664
  /* @__PURE__ */ o("div", {
665
665
  className: "relative overflow-hidden rounded-md border border-border",
666
- children: /* @__PURE__ */ o(D, {
666
+ children: /* @__PURE__ */ o(O, {
667
667
  items: ce,
668
668
  supportedShapes: ["rect"],
669
669
  selectedId: L ?? (U === null ? null : "__draft__"),
@@ -671,8 +671,8 @@ function X({ deviceId: e }) {
671
671
  onShapeChange: le,
672
672
  onDrawComplete: ue,
673
673
  drawingKind: V && U === null ? "rect" : null,
674
- backdrop: T.src === null ? null : /* @__PURE__ */ o("img", {
675
- src: T.src,
674
+ backdrop: E.src === null ? null : /* @__PURE__ */ o("img", {
675
+ src: E.src,
676
676
  alt: "",
677
677
  className: "h-full w-full object-contain",
678
678
  draggable: !1
@@ -693,7 +693,7 @@ function X({ deviceId: e }) {
693
693
  }), /* @__PURE__ */ o("button", {
694
694
  type: "button",
695
695
  className: J,
696
- onClick: T.refresh,
696
+ onClick: E.refresh,
697
697
  disabled: N !== null,
698
698
  children: u("uiLibrary.sceneMonitor.refresh", "Refresh frame")
699
699
  })]
@@ -732,12 +732,12 @@ function X({ deviceId: e }) {
732
732
  children: F
733
733
  }),
734
734
  Q.length === 0 ? /* @__PURE__ */ o("p", {
735
- className: `${m} leading-relaxed`,
735
+ className: `${h} leading-relaxed`,
736
736
  children: u("uiLibrary.sceneMonitor.empty", "No scenes on this camera yet.")
737
737
  }) : /* @__PURE__ */ o("ul", {
738
738
  className: "flex flex-col gap-2",
739
739
  children: Q.map((e) => {
740
- let t = b(e, u);
740
+ let t = x(e, u);
741
741
  return /* @__PURE__ */ s("li", {
742
742
  className: `flex flex-col gap-1.5 rounded-md border p-2 ${L === e.id ? "border-primary/50" : "border-border"}`,
743
743
  children: [
@@ -754,17 +754,17 @@ function X({ deviceId: e }) {
754
754
  })]
755
755
  }),
756
756
  /* @__PURE__ */ o("p", {
757
- className: `${m} leading-relaxed`,
757
+ className: `${h} leading-relaxed`,
758
758
  children: _(e, se, u)
759
759
  }),
760
760
  /* @__PURE__ */ o("p", {
761
- className: `${m} tabular-nums`,
762
- children: S(e, u)
761
+ className: `${h} tabular-nums`,
762
+ children: C(e, u)
763
763
  }),
764
764
  /* @__PURE__ */ o(ne, {
765
765
  monitor: e,
766
766
  disabled: N !== null,
767
- onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => p.sceneMonitor?.deleteReference({
767
+ onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => d.sceneMonitor?.deleteReference({
768
768
  monitorId: e.id,
769
769
  stateId: t,
770
770
  index: n
@@ -773,20 +773,20 @@ function X({ deviceId: e }) {
773
773
  /* @__PURE__ */ s("div", {
774
774
  className: "flex flex-wrap items-center gap-1.5",
775
775
  children: [
776
- w.map((t) => {
776
+ T.map((t) => {
777
777
  let n = t === "ir";
778
778
  return /* @__PURE__ */ s("button", {
779
779
  type: "button",
780
780
  className: J,
781
781
  disabled: N !== null,
782
- title: n ? u("uiLibrary.sceneMonitor.optionalTitle", "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.") : u("uiLibrary.sceneMonitor.captureTitle", "Take a fresh photo now and store it as the {{variant}} reference", { variant: x(t, u).toLowerCase() }),
783
- onClick: () => void $(`cap-${e.id}-${t}`, async () => p.sceneMonitor?.captureReference({
782
+ title: n ? u("uiLibrary.sceneMonitor.optionalTitle", "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.") : u("uiLibrary.sceneMonitor.captureTitle", "Take a fresh photo now and store it as the {{variant}} reference", { variant: S(t, u).toLowerCase() }),
783
+ onClick: () => void $(`cap-${e.id}-${t}`, async () => d.sceneMonitor?.captureReference({
784
784
  monitorId: e.id,
785
785
  condition: t
786
786
  })),
787
787
  children: [
788
788
  /* @__PURE__ */ o(y, { className: "mr-1 inline h-3 w-3" }),
789
- u("uiLibrary.sceneMonitor.capture", "Capture {{variant}}", { variant: x(t, u).toLowerCase() }),
789
+ u("uiLibrary.sceneMonitor.capture", "Capture {{variant}}", { variant: S(t, u).toLowerCase() }),
790
790
  n && /* @__PURE__ */ o("span", {
791
791
  className: "ml-1 text-foreground-subtle/70",
792
792
  children: u("uiLibrary.sceneMonitor.optional", "(optional)")
@@ -799,14 +799,14 @@ function X({ deviceId: e }) {
799
799
  className: Y,
800
800
  disabled: N !== null || e.states.length === 0,
801
801
  title: u("uiLibrary.sceneMonitor.resetTitle", "Clear the flag and re-photograph what normal looks like right now"),
802
- onClick: () => void $(`reset-${e.id}`, async () => p.sceneMonitor?.resetScene({ monitorId: e.id })),
803
- children: [/* @__PURE__ */ o(te, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.reset", "Reset")]
802
+ onClick: () => void $(`reset-${e.id}`, async () => d.sceneMonitor?.resetScene({ monitorId: e.id })),
803
+ children: [/* @__PURE__ */ o(b, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.reset", "Reset")]
804
804
  }),
805
805
  /* @__PURE__ */ o("button", {
806
806
  type: "button",
807
807
  className: J,
808
808
  disabled: N !== null,
809
- onClick: () => void $(`check-${e.id}`, async () => p.sceneMonitor?.recheckNow({ monitorId: e.id })),
809
+ onClick: () => void $(`check-${e.id}`, async () => d.sceneMonitor?.recheckNow({ monitorId: e.id })),
810
810
  children: u("uiLibrary.sceneMonitor.checkNow", "Check now")
811
811
  }),
812
812
  /* @__PURE__ */ s("button", {
@@ -816,21 +816,21 @@ function X({ deviceId: e }) {
816
816
  "aria-label": u("uiLibrary.sceneMonitor.settingsFor", "Settings for {{label}}", { label: e.label }),
817
817
  disabled: N !== null,
818
818
  onClick: () => B((t) => t === e.id ? null : e.id),
819
- children: [/* @__PURE__ */ o(O, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.settings", "Settings")]
819
+ children: [/* @__PURE__ */ o(te, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.settings", "Settings")]
820
820
  }),
821
821
  /* @__PURE__ */ o("button", {
822
822
  type: "button",
823
823
  className: re,
824
824
  disabled: N !== null,
825
- onClick: () => void $(`del-${e.id}`, async () => p.sceneMonitor?.deleteScene({ monitorId: e.id })),
826
- children: /* @__PURE__ */ o(E, { className: "h-3 w-3" })
825
+ onClick: () => void $(`del-${e.id}`, async () => d.sceneMonitor?.deleteScene({ monitorId: e.id })),
826
+ children: /* @__PURE__ */ o(D, { className: "h-3 w-3" })
827
827
  })
828
828
  ]
829
829
  }),
830
830
  z === e.id && /* @__PURE__ */ o(G, {
831
831
  monitor: e,
832
832
  disabled: N !== null,
833
- onPatch: (t) => void $(`tune-${e.id}`, async () => p.sceneMonitor?.updateScene({
833
+ onPatch: (t) => void $(`tune-${e.id}`, async () => d.sceneMonitor?.updateScene({
834
834
  monitorId: e.id,
835
835
  patch: t
836
836
  }))