@camstack/addon-pipeline-orchestrator 0.1.27 → 0.2.0

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 (72) hide show
  1. package/dist/_stub.js +982 -1057
  2. package/dist/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BujnAycE.mjs +186 -0
  3. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DTMQMZQR.mjs +26 -0
  4. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CnELcfi3.mjs +26 -0
  5. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BiLBDmU5.mjs +26 -0
  6. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.js-CBokMOYQ.mjs +26 -0
  7. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-yD-rMaFX.mjs +26 -0
  8. package/dist/dist-CYZr2fwk.mjs +2726 -0
  9. package/dist/hostInit-DQm6ksLo.mjs +147 -0
  10. package/dist/index.js +25596 -18552
  11. package/dist/index.mjs +25592 -18556
  12. package/dist/remoteEntry.js +134 -2973
  13. package/dist/remoteEntry.ssr.js +33 -0
  14. package/dist/virtualExposes-Bv3e5bey.mjs +27 -0
  15. package/dist/virtual_mf-exposes-ssr___mfe_internal__addon_pipeline_orchestrator_widgets__remoteEntry_js-DGpOm1yU.mjs +10 -0
  16. package/package.json +8 -9
  17. package/dist/@mf-types/compiled-types/widgets/PipelineQuickStats.d.ts +0 -3
  18. package/dist/@mf-types/compiled-types/widgets/PipelineQuickStats.d.ts.map +0 -1
  19. package/dist/@mf-types/compiled-types/widgets/ZoneEditor.d.ts +0 -17
  20. package/dist/@mf-types/compiled-types/widgets/ZoneEditor.d.ts.map +0 -1
  21. package/dist/@mf-types/compiled-types/widgets/ZonesTab.d.ts +0 -7
  22. package/dist/@mf-types/compiled-types/widgets/ZonesTab.d.ts.map +0 -1
  23. package/dist/@mf-types/compiled-types/widgets/index.d.ts +0 -13
  24. package/dist/@mf-types/compiled-types/widgets/index.d.ts.map +0 -1
  25. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneForm.d.ts +0 -23
  26. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneForm.d.ts.map +0 -1
  27. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneList.d.ts +0 -15
  28. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneList.d.ts.map +0 -1
  29. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneOverlay.d.ts +0 -19
  30. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneOverlay.d.ts.map +0 -1
  31. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneRulesEditor.d.ts +0 -9
  32. package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneRulesEditor.d.ts.map +0 -1
  33. package/dist/@mf-types/compiled-types/widgets/zone-editor/types.d.ts +0 -33
  34. package/dist/@mf-types/compiled-types/widgets/zone-editor/types.d.ts.map +0 -1
  35. package/dist/@mf-types/widgets.d.ts +0 -2
  36. package/dist/@mf-types.d.ts +0 -3
  37. package/dist/@mf-types.zip +0 -0
  38. package/dist/ReactKonva-BpqYt5jc.mjs +0 -7267
  39. package/dist/_CoreInternals-B7PHssO3.mjs +0 -3808
  40. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs +0 -12
  41. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-CP1zJ0aB.mjs +0 -20
  42. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-B1VWqPID.mjs +0 -35
  43. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-DoWbefqS.mjs +0 -104
  44. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-D4eEXltm.mjs +0 -85
  45. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-CVrnrGED.mjs +0 -62
  46. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__konva__loadShare__.mjs-C4PYo-VP.mjs +0 -30
  47. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.mjs-ZXZUECVq.mjs +0 -88
  48. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-WhBt7NtJ.mjs +0 -29
  49. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-Cg6QsnjR.mjs +0 -36
  50. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom__loadShare__.mjs-Dp8hqYOB.mjs +0 -45
  51. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-DF7SvkCe.mjs +0 -6
  52. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BBmNf5hf.mjs +0 -34
  53. package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_konva__loadShare__.mjs-BjxkVuVo.mjs +0 -65
  54. package/dist/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-zq9nTFza.mjs +0 -186
  55. package/dist/client-BOhSywdX.mjs +0 -9836
  56. package/dist/getErrorShape-BPSzUA7W-TlK8ipWe.mjs +0 -211
  57. package/dist/hostInit-Cn3hiNRr.mjs +0 -196
  58. package/dist/index-3tmcVweY.mjs +0 -435
  59. package/dist/index-Bx39JFVr.mjs +0 -2603
  60. package/dist/index-C52WDzRJ.mjs +0 -3842
  61. package/dist/index-CWkKuNLr.mjs +0 -232
  62. package/dist/index-C_khSbT0.mjs +0 -1655
  63. package/dist/index-D4m79gq7.mjs +0 -185
  64. package/dist/index-D_QOQy3W.mjs +0 -22990
  65. package/dist/index-Dy2V7VOm.mjs +0 -14379
  66. package/dist/index-kp_mtnZv.mjs +0 -725
  67. package/dist/index-xncRG7-x.mjs +0 -2713
  68. package/dist/index.js.map +0 -1
  69. package/dist/index.mjs.map +0 -1
  70. package/dist/jsx-runtime-ChcQDQxt.mjs +0 -55
  71. package/dist/schemas-ClCuS4qa.mjs +0 -3594
  72. package/dist/virtualExposes-8FzWTdq3.mjs +0 -42
package/dist/_stub.js CHANGED
@@ -1,1080 +1,1005 @@
1
- import { _ as t, a as i, b as X } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-Cg6QsnjR.mjs";
2
- import { _ as B } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-DoWbefqS.mjs";
3
- import { _ as V, a as re, b as oe, c as O, d as q, e as ae, f as U, g as P, h as se, i as z, j as J, k as ie, l as le, m as A, n as F, o as T, p as ce, q as de, r as ue, s as pe, t as me, u as fe, v as he, w as ge } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-B1VWqPID.mjs";
4
- import { a as Y, b as K, c as Z, d as R, e as be, f as xe, g as w } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.mjs-ZXZUECVq.mjs";
5
- import { _ as ye } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-CP1zJ0aB.mjs";
6
- /**
7
- * @license lucide-react v0.511.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */
12
- const _e = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ve = (e) => e.replace(
13
- /^([A-Z])|[\s-_]+(\w)/g,
14
- (o, n, p) => p ? p.toUpperCase() : n.toLowerCase()
15
- ), Q = (e) => {
16
- const o = ve(e);
17
- return o.charAt(0).toUpperCase() + o.slice(1);
18
- }, ee = (...e) => e.filter((o, n, p) => !!o && o.trim() !== "" && p.indexOf(o) === n).join(" ").trim(), ke = (e) => {
19
- for (const o in e)
20
- if (o.startsWith("aria-") || o === "role" || o === "title")
21
- return !0;
22
- };
23
- /**
24
- * @license lucide-react v0.511.0 - ISC
25
- *
26
- * This source code is licensed under the ISC license.
27
- * See the LICENSE file in the root directory of this source tree.
28
- */
29
- var we = {
30
- xmlns: "http://www.w3.org/2000/svg",
31
- width: 24,
32
- height: 24,
33
- viewBox: "0 0 24 24",
34
- fill: "none",
35
- stroke: "currentColor",
36
- strokeWidth: 2,
37
- strokeLinecap: "round",
38
- strokeLinejoin: "round"
39
- };
40
- /**
41
- * @license lucide-react v0.511.0 - ISC
42
- *
43
- * This source code is licensed under the ISC license.
44
- * See the LICENSE file in the root directory of this source tree.
45
- */
46
- const Ne = Y(
47
- ({
48
- color: e = "currentColor",
49
- size: o = 24,
50
- strokeWidth: n = 2,
51
- absoluteStrokeWidth: p,
52
- className: m = "",
53
- children: a,
54
- iconNode: s,
55
- ...r
56
- }, f) => K(
57
- "svg",
58
- {
59
- ref: f,
60
- ...we,
61
- width: o,
62
- height: o,
63
- stroke: e,
64
- strokeWidth: p ? Number(n) * 24 / Number(o) : n,
65
- className: ee("lucide", m),
66
- ...!a && !ke(r) && { "aria-hidden": "true" },
67
- ...r
68
- },
69
- [
70
- ...s.map(([l, k]) => K(l, k)),
71
- ...Array.isArray(a) ? a : [a]
72
- ]
73
- )
74
- );
75
- /**
76
- * @license lucide-react v0.511.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */
81
- const v = (e, o) => {
82
- const n = Y(
83
- ({ className: p, ...m }, a) => K(Ne, {
84
- ref: a,
85
- iconNode: o,
86
- className: ee(
87
- `lucide-${_e(Q(e))}`,
88
- `lucide-${e}`,
89
- p
90
- ),
91
- ...m
92
- })
93
- );
94
- return n.displayName = Q(e), n;
95
- };
96
- /**
97
- * @license lucide-react v0.511.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */
102
- const Ce = [
103
- [
104
- "path",
105
- {
106
- d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
107
- key: "169zse"
108
- }
109
- ]
110
- ], De = v("activity", Ce);
111
- /**
112
- * @license lucide-react v0.511.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */
117
- const Se = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Ze = v("check", Se);
118
- /**
119
- * @license lucide-react v0.511.0 - ISC
120
- *
121
- * This source code is licensed under the ISC license.
122
- * See the LICENSE file in the root directory of this source tree.
123
- */
124
- const $e = [
125
- ["path", { d: "M12 20v2", key: "1lh1kg" }],
126
- ["path", { d: "M12 2v2", key: "tus03m" }],
127
- ["path", { d: "M17 20v2", key: "1rnc9c" }],
128
- ["path", { d: "M17 2v2", key: "11trls" }],
129
- ["path", { d: "M2 12h2", key: "1t8f8n" }],
130
- ["path", { d: "M2 17h2", key: "7oei6x" }],
131
- ["path", { d: "M2 7h2", key: "asdhe0" }],
132
- ["path", { d: "M20 12h2", key: "1q8mjw" }],
133
- ["path", { d: "M20 17h2", key: "1fpfkl" }],
134
- ["path", { d: "M20 7h2", key: "1o8tra" }],
135
- ["path", { d: "M7 20v2", key: "4gnj0m" }],
136
- ["path", { d: "M7 2v2", key: "1i4yhu" }],
137
- ["rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", key: "1vbyd7" }],
138
- ["rect", { x: "8", y: "8", width: "8", height: "8", rx: "1", key: "z9xiuo" }]
139
- ], Ie = v("cpu", $e);
140
- /**
141
- * @license lucide-react v0.511.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */
146
- const Me = [
147
- [
148
- "path",
149
- {
150
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
151
- key: "1nclc0"
152
- }
153
- ],
154
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
155
- ], Ae = v("eye", Me);
156
- /**
157
- * @license lucide-react v0.511.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */
162
- const Fe = [
163
- ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
164
- ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
165
- ], Te = v("gauge", Fe);
166
- /**
167
- * @license lucide-react v0.511.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */
172
- const Re = [
173
- [
174
- "path",
175
- {
176
- 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",
177
- key: "yt0hxn"
178
- }
179
- ]
180
- ], Ee = v("hexagon", Re);
181
- /**
182
- * @license lucide-react v0.511.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */
187
- const je = [["path", { d: "M5 12h14", key: "1ays0h" }]], Le = v("minus", je);
188
- /**
189
- * @license lucide-react v0.511.0 - ISC
190
- *
191
- * This source code is licensed under the ISC license.
192
- * See the LICENSE file in the root directory of this source tree.
193
- */
194
- const Pe = [
195
- ["path", { d: "M5 12h14", key: "1ays0h" }],
196
- ["path", { d: "M12 5v14", key: "s699le" }]
197
- ], Ke = v("plus", Pe);
198
- /**
199
- * @license lucide-react v0.511.0 - ISC
200
- *
201
- * This source code is licensed under the ISC license.
202
- * See the LICENSE file in the root directory of this source tree.
203
- */
204
- const Oe = [
205
- [
206
- "path",
207
- {
208
- d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
209
- key: "1c8476"
210
- }
211
- ],
212
- ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
213
- ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
214
- ], qe = v("save", Oe);
215
- /**
216
- * @license lucide-react v0.511.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */
221
- const Ue = [
222
- ["path", { d: "M3 6h18", key: "d0wm0j" }],
223
- ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
224
- ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
225
- ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
226
- ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
227
- ], H = v("trash-2", Ue);
228
- /**
229
- * @license lucide-react v0.511.0 - ISC
230
- *
231
- * This source code is licensed under the ISC license.
232
- * See the LICENSE file in the root directory of this source tree.
233
- */
234
- const ze = [
235
- [
236
- "path",
237
- {
238
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
239
- key: "uqj9uw"
240
- }
241
- ],
242
- ["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
243
- ["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
244
- ], He = v("volume-2", ze);
245
- /**
246
- * @license lucide-react v0.511.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */
251
- const Be = [
252
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
253
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
254
- ], te = v("x", Be);
255
- function Ve(e) {
256
- return e.deviceId === void 0 ? /* @__PURE__ */ t("div", { className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning", children: "PipelineQuickStats requires a deviceId" }) : /* @__PURE__ */ t(Qe, { deviceId: e.deviceId });
1
+ import { t as e } from "./_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BiLBDmU5.mjs";
2
+ import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.js-CBokMOYQ.mjs";
3
+ import { C as c, S as l, _ as u, a as d, b as f, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as D, v as O, w as k, x as A, y as j } from "./_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CnELcfi3.mjs";
4
+ import { n as M, r as N, t as P } from "./_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-yD-rMaFX.mjs";
5
+ import { t as F } from "./_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DTMQMZQR.mjs";
6
+ //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
7
+ var I = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ee = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), L = (e) => {
8
+ let t = ee(e);
9
+ return t.charAt(0).toUpperCase() + t.slice(1);
10
+ }, R = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), z = (e) => {
11
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
12
+ }, te = {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 24,
15
+ height: 24,
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ stroke: "currentColor",
19
+ strokeWidth: 2,
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round"
22
+ }, ne = r(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...c }, l) => s("svg", {
23
+ ref: l,
24
+ ...te,
25
+ width: t,
26
+ height: t,
27
+ stroke: e,
28
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
29
+ className: R("lucide", i),
30
+ ...!a && !z(c) && { "aria-hidden": "true" },
31
+ ...c
32
+ }, [...o.map(([e, t]) => s(e, t)), ...Array.isArray(a) ? a : [a]])), B = (e, t) => {
33
+ let n = r(({ className: n, ...r }, i) => s(ne, {
34
+ ref: i,
35
+ iconNode: t,
36
+ className: R(`lucide-${I(L(e))}`, `lucide-${e}`, n),
37
+ ...r
38
+ }));
39
+ return n.displayName = L(e), n;
40
+ }, re = B("activity", [["path", {
41
+ d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
42
+ key: "169zse"
43
+ }]]), ie = B("check", [["path", {
44
+ d: "M20 6 9 17l-5-5",
45
+ key: "1gmf2c"
46
+ }]]), ae = B("cpu", [
47
+ ["path", {
48
+ d: "M12 20v2",
49
+ key: "1lh1kg"
50
+ }],
51
+ ["path", {
52
+ d: "M12 2v2",
53
+ key: "tus03m"
54
+ }],
55
+ ["path", {
56
+ d: "M17 20v2",
57
+ key: "1rnc9c"
58
+ }],
59
+ ["path", {
60
+ d: "M17 2v2",
61
+ key: "11trls"
62
+ }],
63
+ ["path", {
64
+ d: "M2 12h2",
65
+ key: "1t8f8n"
66
+ }],
67
+ ["path", {
68
+ d: "M2 17h2",
69
+ key: "7oei6x"
70
+ }],
71
+ ["path", {
72
+ d: "M2 7h2",
73
+ key: "asdhe0"
74
+ }],
75
+ ["path", {
76
+ d: "M20 12h2",
77
+ key: "1q8mjw"
78
+ }],
79
+ ["path", {
80
+ d: "M20 17h2",
81
+ key: "1fpfkl"
82
+ }],
83
+ ["path", {
84
+ d: "M20 7h2",
85
+ key: "1o8tra"
86
+ }],
87
+ ["path", {
88
+ d: "M7 20v2",
89
+ key: "4gnj0m"
90
+ }],
91
+ ["path", {
92
+ d: "M7 2v2",
93
+ key: "1i4yhu"
94
+ }],
95
+ ["rect", {
96
+ x: "4",
97
+ y: "4",
98
+ width: "16",
99
+ height: "16",
100
+ rx: "2",
101
+ key: "1vbyd7"
102
+ }],
103
+ ["rect", {
104
+ x: "8",
105
+ y: "8",
106
+ width: "8",
107
+ height: "8",
108
+ rx: "1",
109
+ key: "z9xiuo"
110
+ }]
111
+ ]), oe = B("eye", [["path", {
112
+ d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
113
+ key: "1nclc0"
114
+ }], ["circle", {
115
+ cx: "12",
116
+ cy: "12",
117
+ r: "3",
118
+ key: "1v7zrd"
119
+ }]]), V = B("gauge", [["path", {
120
+ d: "m12 14 4-4",
121
+ key: "9kzdfg"
122
+ }], ["path", {
123
+ d: "M3.34 19a10 10 0 1 1 17.32 0",
124
+ key: "19p75a"
125
+ }]]), H = B("hexagon", [["path", {
126
+ 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",
127
+ key: "yt0hxn"
128
+ }]]), U = B("minus", [["path", {
129
+ d: "M5 12h14",
130
+ key: "1ays0h"
131
+ }]]), W = B("plus", [["path", {
132
+ d: "M5 12h14",
133
+ key: "1ays0h"
134
+ }], ["path", {
135
+ d: "M12 5v14",
136
+ key: "s699le"
137
+ }]]), G = B("save", [
138
+ ["path", {
139
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
140
+ key: "1c8476"
141
+ }],
142
+ ["path", {
143
+ d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",
144
+ key: "1ydtos"
145
+ }],
146
+ ["path", {
147
+ d: "M7 3v4a1 1 0 0 0 1 1h7",
148
+ key: "t51u73"
149
+ }]
150
+ ]), K = B("trash-2", [
151
+ ["path", {
152
+ d: "M3 6h18",
153
+ key: "d0wm0j"
154
+ }],
155
+ ["path", {
156
+ d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",
157
+ key: "4alrt4"
158
+ }],
159
+ ["path", {
160
+ d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",
161
+ key: "v07s0e"
162
+ }],
163
+ ["line", {
164
+ x1: "10",
165
+ x2: "10",
166
+ y1: "11",
167
+ y2: "17",
168
+ key: "1uufr5"
169
+ }],
170
+ ["line", {
171
+ x1: "14",
172
+ x2: "14",
173
+ y1: "11",
174
+ y2: "17",
175
+ key: "xtxkd"
176
+ }]
177
+ ]), q = B("video", [["path", {
178
+ d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
179
+ key: "ftymec"
180
+ }], ["rect", {
181
+ x: "2",
182
+ y: "6",
183
+ width: "14",
184
+ height: "12",
185
+ rx: "2",
186
+ key: "158x01"
187
+ }]]), se = B("volume-2", [
188
+ ["path", {
189
+ d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
190
+ key: "uqj9uw"
191
+ }],
192
+ ["path", {
193
+ d: "M16 9a5 5 0 0 1 0 6",
194
+ key: "1q6k2b"
195
+ }],
196
+ ["path", {
197
+ d: "M19.364 18.364a9 9 0 0 0 0-12.728",
198
+ key: "ijwkga"
199
+ }]
200
+ ]), J = B("x", [["path", {
201
+ d: "M18 6 6 18",
202
+ key: "1bl5f8"
203
+ }], ["path", {
204
+ d: "m6 6 12 12",
205
+ key: "d8bk6v"
206
+ }]]);
207
+ //#endregion
208
+ //#region src/widgets/PipelineQuickStats.tsx
209
+ function ce(e) {
210
+ return e.deviceId === void 0 ? /* @__PURE__ */ M("div", {
211
+ className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
212
+ children: "PipelineQuickStats requires a deviceId"
213
+ }) : /* @__PURE__ */ M(le, { deviceId: e.deviceId });
257
214
  }
258
- function Qe({ deviceId: e }) {
259
- V(
260
- ["pipelineOrchestrator", "getPipelineAssignment"],
261
- ["pipeline.camera-assigned", "pipeline.camera-unassigned", "pipeline.camera-updated"]
262
- ), V(
263
- ["pipelineRunner", "getCameraMetrics"],
264
- ["pipeline.camera-metrics-snapshot"]
265
- );
266
- const { data: o } = re(
267
- { deviceId: e },
268
- { staleTime: 3e4 }
269
- ), n = o?.agentNodeId ?? null, m = typeof n == "string" && n.length > 0 && !n.startsWith("addon:") ? n : void 0, { data: a } = oe(
270
- {
271
- deviceId: e,
272
- ...m ? { nodeId: m } : {}
273
- },
274
- { staleTime: 2e3, retry: !1 }
275
- ), s = O(), r = q(s.trpcClient, e), { data: f } = B({
276
- queryKey: ["device", e, "pipelineAnalytics.getActiveTracks"],
277
- queryFn: () => r?.pipelineAnalytics?.getActiveTracks({}) ?? [],
278
- enabled: !!r,
279
- refetchInterval: 5e3,
280
- retry: !1
281
- }), { data: l } = B({
282
- queryKey: ["device", e, "audioMetrics.getCurrentSnapshot"],
283
- queryFn: () => r?.audioMetrics?.getCurrentSnapshot({}) ?? null,
284
- enabled: !!r,
285
- refetchInterval: 2e3,
286
- retry: !1
287
- }), k = a?.phase ?? null, D = a?.detectionMode ?? null, N = Number(a?.actualFps ?? 0), C = Number(a?.configuredFps ?? 0), S = Number(a?.avgInferenceTimeMs ?? 0), c = Number(a?.queueDepth ?? 0), g = Number(a?.droppedFrames ?? 0), _ = ae(k ?? "watching"), u = f?.length ?? 0, h = l?.level.dbfs ?? null, $ = typeof h == "number" ? `${h.toFixed(1)} dBFS` : "—";
288
- return /* @__PURE__ */ i("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3", children: [
289
- /* @__PURE__ */ t(
290
- M,
291
- {
292
- icon: De,
293
- label: "Phase",
294
- value: _.label,
295
- color: _.textColor,
296
- subtext: D ?? void 0
297
- }
298
- ),
299
- /* @__PURE__ */ t(
300
- M,
301
- {
302
- icon: Te,
303
- label: "Detection FPS",
304
- value: `${N.toFixed(1)}`,
305
- subtext: C > 0 ? `target: ${C}` : void 0
306
- }
307
- ),
308
- /* @__PURE__ */ t(
309
- M,
310
- {
311
- icon: Ie,
312
- label: "Inference",
313
- value: `${S.toFixed(1)} ms`,
314
- subtext: c > 0 ? `queue: ${c}` : void 0
315
- }
316
- ),
317
- /* @__PURE__ */ t(
318
- M,
319
- {
320
- icon: Ae,
321
- label: "Active Tracks",
322
- value: String(u),
323
- subtext: g > 0 ? `dropped: ${g}` : void 0
324
- }
325
- ),
326
- /* @__PURE__ */ t(
327
- M,
328
- {
329
- icon: He,
330
- label: "Current dB",
331
- value: $
332
- }
333
- )
334
- ] });
215
+ function le({ deviceId: t }) {
216
+ f(["pipelineOrchestrator", "getPipelineAssignment"], [
217
+ "pipeline.camera-assigned",
218
+ "pipeline.camera-unassigned",
219
+ "pipeline.camera-updated"
220
+ ]), f(["pipelineRunner", "getCameraMetrics"], ["pipeline.camera-metrics-snapshot"]);
221
+ let { data: n } = A({ deviceId: t }, { staleTime: 3e4 }), r = n?.agentNodeId ?? null, i = typeof r == "string" && r.length > 0 && !r.startsWith("addon:") ? r : void 0, { data: a } = l({
222
+ deviceId: t,
223
+ ...i ? { nodeId: i } : {}
224
+ }, {
225
+ staleTime: 2e3,
226
+ retry: !1
227
+ }), o = k(), s = O(o.trpcClient, t), { data: c } = e({
228
+ queryKey: [
229
+ "device",
230
+ t,
231
+ "pipelineAnalytics.getActiveTracks"
232
+ ],
233
+ queryFn: () => s?.pipelineAnalytics?.getActiveTracks({}) ?? [],
234
+ enabled: !!s,
235
+ refetchInterval: 5e3,
236
+ retry: !1
237
+ }), { data: d } = e({
238
+ queryKey: [
239
+ "device",
240
+ t,
241
+ "audioMetrics.getCurrentSnapshot"
242
+ ],
243
+ queryFn: () => s?.audioMetrics?.getCurrentSnapshot({}) ?? null,
244
+ enabled: !!s,
245
+ refetchInterval: 2e3,
246
+ retry: !1
247
+ }), { data: p } = e({
248
+ queryKey: ["recording.getStatus", t],
249
+ queryFn: async () => await o.trpcClient.recording.getStatus.query({ deviceId: t }),
250
+ refetchInterval: 5e3,
251
+ retry: !1
252
+ }), { data: m } = e({
253
+ queryKey: ["recording.getDeviceConfig", t],
254
+ queryFn: async () => await o.trpcClient.recording.getDeviceConfig.query({ deviceId: t }),
255
+ staleTime: 3e4,
256
+ retry: !1
257
+ }), h = a?.phase ?? null, g = a?.detectionMode ?? null, _ = Number(a?.actualFps ?? 0), v = Number(a?.configuredFps ?? 0), y = Number(a?.avgInferenceTimeMs ?? 0), b = Number(a?.queueDepth ?? 0), x = Number(a?.droppedFrames ?? 0), S = u(h ?? "watching"), C = c?.length ?? 0, w = d?.level.dbfs ?? null, T = typeof w == "number" ? `${w.toFixed(1)} dBFS` : "—", E = p?.enabled ?? !1, D = p?.activeMode ?? "off", j = E && D !== "off", P = E ? D === "off" ? "Idle" : D === "continuous" ? "Continuous" : D === "onMotion" ? "On motion" : D === "onAudioThreshold" ? "On audio" : D : "Disabled", F = (m?.profiles ?? []).join(", "), I = p ? `${ue(p.storageBytes ?? 0)}${F ? ` · ${F}` : ""}` : void 0;
258
+ return /* @__PURE__ */ N("div", {
259
+ className: "grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3",
260
+ children: [
261
+ /* @__PURE__ */ M(Y, {
262
+ icon: re,
263
+ label: "Phase",
264
+ value: S.label,
265
+ color: S.textColor,
266
+ subtext: g ?? void 0
267
+ }),
268
+ /* @__PURE__ */ M(Y, {
269
+ icon: V,
270
+ label: "Detection FPS",
271
+ value: `${_.toFixed(1)}`,
272
+ subtext: v > 0 ? `target: ${v}` : void 0
273
+ }),
274
+ /* @__PURE__ */ M(Y, {
275
+ icon: ae,
276
+ label: "Inference",
277
+ value: `${y.toFixed(1)} ms`,
278
+ subtext: b > 0 ? `queue: ${b}` : void 0
279
+ }),
280
+ /* @__PURE__ */ M(Y, {
281
+ icon: oe,
282
+ label: "Active Tracks",
283
+ value: String(C),
284
+ subtext: x > 0 ? `dropped: ${x}` : void 0
285
+ }),
286
+ /* @__PURE__ */ M(Y, {
287
+ icon: se,
288
+ label: "Current dB",
289
+ value: T
290
+ }),
291
+ /* @__PURE__ */ M(Y, {
292
+ icon: q,
293
+ label: "Recording",
294
+ value: P,
295
+ color: j ? "text-success" : void 0,
296
+ subtext: I
297
+ })
298
+ ]
299
+ });
335
300
  }
336
- function M({ icon: e, label: o, value: n, subtext: p, color: m }) {
337
- return /* @__PURE__ */ i("div", { className: "rounded-lg border border-border bg-surface p-3 min-w-0", children: [
338
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 mb-1 min-w-0", children: [
339
- /* @__PURE__ */ t(e, { className: "h-3.5 w-3.5 text-foreground-subtle flex-shrink-0" }),
340
- /* @__PURE__ */ t(
341
- "span",
342
- {
343
- className: "text-[10px] text-foreground-subtle uppercase tracking-wider truncate",
344
- title: o,
345
- children: o
346
- }
347
- )
348
- ] }),
349
- /* @__PURE__ */ t(
350
- "p",
351
- {
352
- className: `text-lg font-semibold leading-tight truncate ${m ?? "text-foreground"}`,
353
- title: n,
354
- children: n
355
- }
356
- ),
357
- p && /* @__PURE__ */ t("p", { className: "text-[10px] text-foreground-subtle mt-0.5 truncate", title: p, children: p })
358
- ] });
301
+ function ue(e) {
302
+ if (!Number.isFinite(e) || e <= 0) return "0 B";
303
+ let t = [
304
+ "B",
305
+ "KB",
306
+ "MB",
307
+ "GB",
308
+ "TB"
309
+ ], n = Math.min(t.length - 1, Math.floor(Math.log(e) / Math.log(1024))), r = e / 1024 ** n;
310
+ return `${n === 0 ? Math.round(r) : r.toFixed(1)} ${t[n]}`;
359
311
  }
360
- const We = {
361
- polygon: "Polygon",
362
- tripwire: "Tripwire"
363
- }, Ge = {
364
- polygon: "bg-info/10 text-info",
365
- tripwire: "bg-warning/10 text-warning"
312
+ function Y({ icon: e, label: t, value: n, subtext: r, color: i }) {
313
+ return /* @__PURE__ */ N("div", {
314
+ className: "rounded-lg border border-border bg-surface p-3 min-w-0",
315
+ children: [
316
+ /* @__PURE__ */ N("div", {
317
+ className: "flex items-center gap-1.5 mb-1 min-w-0",
318
+ children: [/* @__PURE__ */ M(e, { className: "h-3.5 w-3.5 text-foreground-subtle flex-shrink-0" }), /* @__PURE__ */ M("span", {
319
+ className: "text-[10px] text-foreground-subtle uppercase tracking-wider truncate",
320
+ title: t,
321
+ children: t
322
+ })]
323
+ }),
324
+ /* @__PURE__ */ M("p", {
325
+ className: `text-lg font-semibold leading-tight truncate ${i ?? "text-foreground"}`,
326
+ title: n,
327
+ children: n
328
+ }),
329
+ r && /* @__PURE__ */ M("p", {
330
+ className: "text-[10px] text-foreground-subtle mt-0.5 truncate",
331
+ title: r,
332
+ children: r
333
+ })
334
+ ]
335
+ });
336
+ }
337
+ //#endregion
338
+ //#region src/widgets/zone-editor/ZoneList.tsx
339
+ var de = {
340
+ polygon: "Polygon",
341
+ tripwire: "Tripwire"
342
+ }, fe = {
343
+ polygon: "bg-info/10 text-info",
344
+ tripwire: "bg-warning/10 text-warning"
366
345
  };
367
- function Xe({
368
- zones: e,
369
- selectedZoneId: o,
370
- drawingKind: n,
371
- onSelectZone: p,
372
- onDeleteZone: m,
373
- onStartDraw: a,
374
- onCancelDraw: s
375
- }) {
376
- return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
377
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: n ? /* @__PURE__ */ i(
378
- "button",
379
- {
380
- type: "button",
381
- onClick: s,
382
- className: "inline-flex items-center justify-center gap-1 rounded border border-amber-500/30 bg-amber-500/10 text-amber-400 hover:bg-amber-500/20 transition-colors h-8 px-3 text-[11px] font-medium",
383
- title: "Cancel drawing",
384
- children: [
385
- /* @__PURE__ */ t(te, { className: "h-3.5 w-3.5" }),
386
- /* @__PURE__ */ t("span", { children: "Cancel" })
387
- ]
388
- }
389
- ) : /* @__PURE__ */ i(X, { children: [
390
- /* @__PURE__ */ t(
391
- "button",
392
- {
393
- type: "button",
394
- onClick: () => a("polygon"),
395
- className: "inline-flex items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors h-8 w-8",
396
- title: "Add polygon zone",
397
- "aria-label": "Add polygon zone",
398
- children: /* @__PURE__ */ t(Ee, { className: "h-4 w-4" })
399
- }
400
- ),
401
- /* @__PURE__ */ t(
402
- "button",
403
- {
404
- type: "button",
405
- onClick: () => a("tripwire"),
406
- className: "inline-flex items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors h-8 w-8",
407
- title: "Add tripwire",
408
- "aria-label": "Add tripwire",
409
- children: /* @__PURE__ */ t(Le, { className: "h-5 w-5 stroke-[2.5]" })
410
- }
411
- )
412
- ] }) }),
413
- e.length === 0 ? /* @__PURE__ */ t("p", { className: "text-center text-[10px] text-foreground-subtle py-3 leading-tight", children: 'No zones yet — pick "Zone" or "Tripwire" to draw.' }) : /* @__PURE__ */ t("div", { className: "flex flex-col gap-1", children: e.map((r) => {
414
- const f = r.id === o;
415
- return /* @__PURE__ */ i(
416
- "div",
417
- {
418
- className: [
419
- "flex items-center gap-1.5 rounded border px-1.5 py-1 cursor-pointer transition-colors",
420
- f ? "border-primary/50 bg-primary/10" : "border-border bg-surface hover:bg-surface-hover"
421
- ].join(" "),
422
- onClick: () => p(f ? null : r.id),
423
- children: [
424
- /* @__PURE__ */ t(
425
- "div",
426
- {
427
- className: "h-2.5 w-2.5 rounded-sm flex-shrink-0",
428
- style: { backgroundColor: r.color }
429
- }
430
- ),
431
- /* @__PURE__ */ t("span", { className: "flex-1 truncate text-[11px] font-medium text-foreground", children: r.name }),
432
- /* @__PURE__ */ t(
433
- "span",
434
- {
435
- className: `inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-medium flex-shrink-0 ${Ge[r.kind]}`,
436
- children: We[r.kind]
437
- }
438
- ),
439
- /* @__PURE__ */ t(
440
- "button",
441
- {
442
- type: "button",
443
- title: "Delete zone",
444
- className: "p-0.5 text-foreground-subtle hover:text-danger rounded transition-colors flex-shrink-0",
445
- onClick: (l) => {
446
- l.stopPropagation(), m(r.id);
447
- },
448
- children: /* @__PURE__ */ t(H, { className: "h-3 w-3" })
449
- }
450
- )
451
- ]
452
- },
453
- r.id
454
- );
455
- }) })
456
- ] });
346
+ function pe({ zones: e, selectedZoneId: t, drawingKind: n, onSelectZone: r, onDeleteZone: i, onStartDraw: a, onCancelDraw: o }) {
347
+ return /* @__PURE__ */ N("div", {
348
+ className: "flex flex-col gap-2",
349
+ children: [/* @__PURE__ */ M("div", {
350
+ className: "flex items-center gap-1",
351
+ children: n ? /* @__PURE__ */ N("button", {
352
+ type: "button",
353
+ onClick: o,
354
+ className: "inline-flex items-center justify-center gap-1 rounded border border-amber-500/30 bg-amber-500/10 text-amber-400 hover:bg-amber-500/20 transition-colors h-8 px-3 text-[11px] font-medium",
355
+ title: "Cancel drawing",
356
+ children: [/* @__PURE__ */ M(J, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ M("span", { children: "Cancel" })]
357
+ }) : /* @__PURE__ */ N(P, { children: [/* @__PURE__ */ M("button", {
358
+ type: "button",
359
+ onClick: () => a("polygon"),
360
+ className: "inline-flex items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors h-8 w-8",
361
+ title: "Add polygon zone",
362
+ "aria-label": "Add polygon zone",
363
+ children: /* @__PURE__ */ M(H, { className: "h-4 w-4" })
364
+ }), /* @__PURE__ */ M("button", {
365
+ type: "button",
366
+ onClick: () => a("tripwire"),
367
+ className: "inline-flex items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors h-8 w-8",
368
+ title: "Add tripwire",
369
+ "aria-label": "Add tripwire",
370
+ children: /* @__PURE__ */ M(U, { className: "h-5 w-5 stroke-[2.5]" })
371
+ })] })
372
+ }), e.length === 0 ? /* @__PURE__ */ M("p", {
373
+ className: "text-center text-[10px] text-foreground-subtle py-3 leading-tight",
374
+ children: "No zones yet pick \"Zone\" or \"Tripwire\" to draw."
375
+ }) : /* @__PURE__ */ M("div", {
376
+ className: "flex flex-col gap-1",
377
+ children: e.map((e) => {
378
+ let n = e.id === t;
379
+ return /* @__PURE__ */ N("div", {
380
+ className: ["flex items-center gap-1.5 rounded border px-1.5 py-1 cursor-pointer transition-colors", n ? "border-primary/50 bg-primary/10" : "border-border bg-surface hover:bg-surface-hover"].join(" "),
381
+ onClick: () => r(n ? null : e.id),
382
+ children: [
383
+ /* @__PURE__ */ M("div", {
384
+ className: "h-2.5 w-2.5 rounded-sm flex-shrink-0",
385
+ style: { backgroundColor: e.color }
386
+ }),
387
+ /* @__PURE__ */ M("span", {
388
+ className: "flex-1 truncate text-[11px] font-medium text-foreground",
389
+ children: e.name
390
+ }),
391
+ /* @__PURE__ */ M("span", {
392
+ className: `inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-medium flex-shrink-0 ${fe[e.kind]}`,
393
+ children: de[e.kind]
394
+ }),
395
+ /* @__PURE__ */ M("button", {
396
+ type: "button",
397
+ title: "Delete zone",
398
+ className: "p-0.5 text-foreground-subtle hover:text-danger rounded transition-colors flex-shrink-0",
399
+ onClick: (t) => {
400
+ t.stopPropagation(), i(e.id);
401
+ },
402
+ children: /* @__PURE__ */ M(K, { className: "h-3 w-3" })
403
+ })
404
+ ]
405
+ }, e.id);
406
+ })
407
+ })]
408
+ });
457
409
  }
458
- const Je = [
459
- "#3b82f6",
460
- // blue
461
- "#10b981",
462
- // green
463
- "#f59e0b",
464
- // amber
465
- "#ef4444",
466
- // red
467
- "#8b5cf6",
468
- // purple
469
- "#06b6d4",
470
- // cyan
471
- "#f97316",
472
- // orange
473
- "#ec4899"
474
- // pink
410
+ //#endregion
411
+ //#region src/widgets/zone-editor/ZoneForm.tsx
412
+ var me = [
413
+ "#3b82f6",
414
+ "#10b981",
415
+ "#f59e0b",
416
+ "#ef4444",
417
+ "#8b5cf6",
418
+ "#06b6d4",
419
+ "#f97316",
420
+ "#ec4899"
475
421
  ];
476
- function Ye({ zone: e, onSave: o, onDiscard: n, onDelete: p }) {
477
- const m = U(), a = (r) => m?.updateDraft({ name: r }), s = (r) => m?.updateDraft({ color: r });
478
- return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
479
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
480
- /* @__PURE__ */ t("h3", { className: "text-[10px] font-semibold text-foreground-subtle uppercase tracking-wider", children: "Editing" }),
481
- /* @__PURE__ */ t("span", { className: "inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-medium bg-surface border border-border text-foreground-subtle", children: e.kind === "tripwire" ? "Tripwire" : "Polygon" })
482
- ] }),
483
- /* @__PURE__ */ t(
484
- "input",
485
- {
486
- type: "text",
487
- className: P,
488
- value: e.name,
489
- autoFocus: !0,
490
- onChange: (r) => a(r.target.value),
491
- onKeyDown: (r) => {
492
- r.key === "Enter" ? (r.preventDefault(), o()) : r.key === "Escape" && (r.preventDefault(), n());
493
- },
494
- placeholder: "Zone name"
495
- }
496
- ),
497
- /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: Je.map((r) => /* @__PURE__ */ t(
498
- "button",
499
- {
500
- type: "button",
501
- title: r,
502
- className: [
503
- "h-4 w-4 rounded border-2 cursor-pointer transition-transform hover:scale-110",
504
- e.color === r ? "border-white scale-110" : "border-transparent"
505
- ].join(" "),
506
- style: { backgroundColor: r },
507
- onClick: () => s(r)
508
- },
509
- r
510
- )) }),
511
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
512
- /* @__PURE__ */ t(
513
- "input",
514
- {
515
- type: "color",
516
- className: "h-6 w-6 rounded border border-border bg-background cursor-pointer p-0.5",
517
- value: e.color,
518
- onChange: (r) => s(r.target.value)
519
- }
520
- ),
521
- /* @__PURE__ */ t(
522
- "input",
523
- {
524
- type: "text",
525
- className: `${P} font-mono`,
526
- value: e.color,
527
- placeholder: "#000000",
528
- onChange: (r) => s(r.target.value)
529
- }
530
- )
531
- ] }),
532
- /* @__PURE__ */ i("p", { className: "text-[9px] text-foreground-subtle leading-tight", children: [
533
- e.kind === "tripwire" ? "2 points" : `${e.points.length} pts`,
534
- e.points.length > 0 && " · drag handles to reshape"
535
- ] }),
536
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
537
- /* @__PURE__ */ i(
538
- "button",
539
- {
540
- type: "button",
541
- onClick: o,
542
- className: "inline-flex items-center justify-center gap-1 rounded border border-primary/40 bg-primary/10 text-primary hover:bg-primary/20 transition-colors h-7 flex-1 text-[11px] font-medium",
543
- title: "Save changes (Enter)",
544
- children: [
545
- /* @__PURE__ */ t(Ze, { className: "h-3 w-3" }),
546
- "Save"
547
- ]
548
- }
549
- ),
550
- /* @__PURE__ */ i(
551
- "button",
552
- {
553
- type: "button",
554
- onClick: n,
555
- className: "inline-flex items-center justify-center gap-1 rounded border border-border bg-surface text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors h-7 px-3 text-[11px] font-medium",
556
- title: "Discard changes (Esc)",
557
- children: [
558
- /* @__PURE__ */ t(te, { className: "h-3 w-3" }),
559
- "Discard"
560
- ]
561
- }
562
- )
563
- ] }),
564
- /* @__PURE__ */ i(
565
- "button",
566
- {
567
- type: "button",
568
- onClick: p,
569
- className: `${se} w-full`,
570
- children: [
571
- /* @__PURE__ */ t(H, { className: "h-3 w-3" }),
572
- "Delete"
573
- ]
574
- }
575
- )
576
- ] });
422
+ function he({ zone: e, onSave: t, onDiscard: n, onDelete: r }) {
423
+ let i = w(), a = (e) => i?.updateDraft({ name: e }), o = (e) => i?.updateDraft({ color: e });
424
+ return /* @__PURE__ */ N("div", {
425
+ className: "flex flex-col gap-2",
426
+ children: [
427
+ /* @__PURE__ */ N("div", {
428
+ className: "flex items-center justify-between",
429
+ children: [/* @__PURE__ */ M("h3", {
430
+ className: "text-[10px] font-semibold text-foreground-subtle uppercase tracking-wider",
431
+ children: "Editing"
432
+ }), /* @__PURE__ */ M("span", {
433
+ className: "inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-medium bg-surface border border-border text-foreground-subtle",
434
+ children: e.kind === "tripwire" ? "Tripwire" : "Polygon"
435
+ })]
436
+ }),
437
+ /* @__PURE__ */ M("input", {
438
+ type: "text",
439
+ className: d,
440
+ value: e.name,
441
+ autoFocus: !0,
442
+ onChange: (e) => a(e.target.value),
443
+ onKeyDown: (e) => {
444
+ e.key === "Enter" ? (e.preventDefault(), t()) : e.key === "Escape" && (e.preventDefault(), n());
445
+ },
446
+ placeholder: "Zone name"
447
+ }),
448
+ /* @__PURE__ */ M("div", {
449
+ className: "flex flex-wrap gap-1",
450
+ children: me.map((t) => /* @__PURE__ */ M("button", {
451
+ type: "button",
452
+ title: t,
453
+ className: ["h-4 w-4 rounded border-2 cursor-pointer transition-transform hover:scale-110", e.color === t ? "border-white scale-110" : "border-transparent"].join(" "),
454
+ style: { backgroundColor: t },
455
+ onClick: () => o(t)
456
+ }, t))
457
+ }),
458
+ /* @__PURE__ */ N("div", {
459
+ className: "flex items-center gap-1.5",
460
+ children: [/* @__PURE__ */ M("input", {
461
+ type: "color",
462
+ className: "h-6 w-6 rounded border border-border bg-background cursor-pointer p-0.5",
463
+ value: e.color,
464
+ onChange: (e) => o(e.target.value)
465
+ }), /* @__PURE__ */ M("input", {
466
+ type: "text",
467
+ className: `${d} font-mono`,
468
+ value: e.color,
469
+ placeholder: "#000000",
470
+ onChange: (e) => o(e.target.value)
471
+ })]
472
+ }),
473
+ /* @__PURE__ */ N("p", {
474
+ className: "text-[9px] text-foreground-subtle leading-tight",
475
+ children: [e.kind === "tripwire" ? "2 points" : `${e.points.length} pts`, e.points.length > 0 && " · drag handles to reshape"]
476
+ }),
477
+ /* @__PURE__ */ N("div", {
478
+ className: "flex items-center gap-1.5",
479
+ children: [/* @__PURE__ */ N("button", {
480
+ type: "button",
481
+ onClick: t,
482
+ className: "inline-flex items-center justify-center gap-1 rounded border border-primary/40 bg-primary/10 text-primary hover:bg-primary/20 transition-colors h-7 flex-1 text-[11px] font-medium",
483
+ title: "Save changes (Enter)",
484
+ children: [/* @__PURE__ */ M(ie, { className: "h-3 w-3" }), "Save"]
485
+ }), /* @__PURE__ */ N("button", {
486
+ type: "button",
487
+ onClick: n,
488
+ className: "inline-flex items-center justify-center gap-1 rounded border border-border bg-surface text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors h-7 px-3 text-[11px] font-medium",
489
+ title: "Discard changes (Esc)",
490
+ children: [/* @__PURE__ */ M(J, { className: "h-3 w-3" }), "Discard"]
491
+ })]
492
+ }),
493
+ /* @__PURE__ */ N("button", {
494
+ type: "button",
495
+ onClick: r,
496
+ className: `${v} w-full`,
497
+ children: [/* @__PURE__ */ M(K, { className: "h-3 w-3" }), "Delete"]
498
+ })
499
+ ]
500
+ });
577
501
  }
578
- const et = ye.map(
579
- (e) => ({ id: e.id, label: e.name })
580
- );
581
- function tt(e) {
582
- return {
583
- id: e.id,
584
- name: e.name ?? "",
585
- zoneIds: e.zoneIds,
586
- mode: e.mode,
587
- classFilter: e.classFilter ?? [],
588
- enabled: e.enabled !== !1
589
- };
502
+ //#endregion
503
+ //#region src/widgets/zone-editor/ZoneRulesEditor.tsx
504
+ var ge = F.map((e) => ({
505
+ id: e.id,
506
+ label: e.name
507
+ }));
508
+ function _e(e) {
509
+ return {
510
+ id: e.id,
511
+ name: e.name ?? "",
512
+ zoneIds: e.zoneIds,
513
+ mode: e.mode,
514
+ classFilter: e.classFilter ?? [],
515
+ enabled: e.enabled !== !1
516
+ };
590
517
  }
591
- function nt(e) {
592
- const o = {
593
- id: e.id,
594
- zoneIds: e.zoneIds,
595
- mode: e.mode,
596
- enabled: e.enabled
597
- };
598
- return e.name && (o.name = e.name), e.classFilter.length > 0 && (o.classFilter = e.classFilter), o;
518
+ function ve(e) {
519
+ let t = {
520
+ id: e.id,
521
+ zoneIds: e.zoneIds,
522
+ mode: e.mode,
523
+ enabled: e.enabled
524
+ };
525
+ return e.name && (t.name = e.name), e.classFilter.length > 0 && (t.classFilter = e.classFilter), t;
599
526
  }
600
- function W({ dev: e, stage: o, zones: n, title: p }) {
601
- const m = z(e?.state.zoneRules), a = Z(
602
- () => m?.[o] ?? [],
603
- [m, o]
604
- ), [s, r] = R([]), [f, l] = R(!1), [k, D] = R(!1), [N, C] = R(null);
605
- be(() => {
606
- f || r(a.map(tt));
607
- }, [a, f]);
608
- const S = () => {
609
- r((d) => [
610
- ...d,
611
- {
612
- id: crypto.randomUUID(),
613
- name: "",
614
- zoneIds: n[0] ? [n[0].id] : [],
615
- mode: "exclude",
616
- classFilter: [],
617
- enabled: !0
618
- }
619
- ]), l(!0);
620
- }, c = (d, y) => {
621
- r(
622
- (b) => b.map((x, I) => {
623
- if (I !== d) return x;
624
- const E = x.classFilter.includes(y) ? x.classFilter.filter((j) => j !== y) : [...x.classFilter, y];
625
- return { ...x, classFilter: E };
626
- })
627
- ), l(!0);
628
- }, g = (d, y) => {
629
- r(
630
- (b) => b.map((x, I) => {
631
- if (I !== d) return x;
632
- const E = x.zoneIds.includes(y) ? x.zoneIds.filter((j) => j !== y) : [...x.zoneIds, y];
633
- return { ...x, zoneIds: E };
634
- })
635
- ), l(!0);
636
- }, _ = (d) => {
637
- r((y) => y.filter((b, x) => x !== d)), l(!0);
638
- }, u = (d, y) => {
639
- r((b) => b.map((x, I) => I === d ? { ...x, ...y } : x)), l(!0);
640
- }, h = async () => {
641
- if (e?.zoneRules) {
642
- D(!0), C(null);
643
- try {
644
- await e.zoneRules.setRules({ stage: o, rules: s.map(nt) }), l(!1);
645
- } catch (d) {
646
- C(d instanceof Error ? d.message : String(d));
647
- } finally {
648
- D(!1);
649
- }
650
- }
651
- }, $ = f && !!e?.zoneRules && !k;
652
- return /* @__PURE__ */ i("div", { className: "rounded-md border border-border bg-surface/40 p-2.5", children: [
653
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
654
- /* @__PURE__ */ t("h3", { className: `${J} truncate`, children: p ?? `${o === "motion" ? "Motion" : "Detection"} Rules` }),
655
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
656
- /* @__PURE__ */ i(
657
- "button",
658
- {
659
- type: "button",
660
- onClick: S,
661
- disabled: n.length === 0 || !e,
662
- className: ie,
663
- title: "Add rule",
664
- children: [
665
- /* @__PURE__ */ t(Ke, { className: "h-2.5 w-2.5" }),
666
- " Add"
667
- ]
668
- }
669
- ),
670
- /* @__PURE__ */ i(
671
- "button",
672
- {
673
- type: "button",
674
- onClick: () => {
675
- h();
676
- },
677
- disabled: !$,
678
- className: le,
679
- children: [
680
- /* @__PURE__ */ t(qe, { className: "h-2.5 w-2.5" }),
681
- k ? "…" : "Save"
682
- ]
683
- }
684
- )
685
- ] })
686
- ] }),
687
- s.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[10px] text-foreground-subtle italic px-1 py-1.5 leading-tight", children: n.length === 0 ? "Define a zone first — rules reference zone ids." : "No rules — every detection at this stage passes through." }) : /* @__PURE__ */ t("div", { className: "flex flex-col gap-1.5", children: s.map((d, y) => /* @__PURE__ */ i(
688
- "div",
689
- {
690
- className: "rounded border border-border/50 bg-background/40 px-2 py-1.5 flex flex-col gap-1.5 overflow-hidden",
691
- children: [
692
- /* @__PURE__ */ i("div", { className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5", children: [
693
- /* @__PURE__ */ t(
694
- "button",
695
- {
696
- type: "button",
697
- role: "switch",
698
- "aria-checked": d.enabled,
699
- "aria-label": d.enabled ? "Disable rule" : "Enable rule",
700
- title: d.enabled ? "Rule is active click to disable" : "Rule is disabled click to enable",
701
- onClick: () => u(y, { enabled: !d.enabled }),
702
- className: [
703
- "inline-flex items-center justify-center h-5 w-9 rounded-full border transition-colors flex-shrink-0",
704
- d.enabled ? "border-primary/50 bg-primary/20 text-primary" : "border-border bg-surface text-foreground-subtle"
705
- ].join(" "),
706
- children: /* @__PURE__ */ t(
707
- "span",
708
- {
709
- className: [
710
- "h-3 w-3 rounded-full transition-transform",
711
- d.enabled ? "translate-x-1.5 bg-primary" : "-translate-x-1.5 bg-foreground-subtle"
712
- ].join(" ")
713
- }
714
- )
715
- }
716
- ),
717
- /* @__PURE__ */ t(
718
- "input",
719
- {
720
- className: `${P} min-w-0`,
721
- placeholder: "Rule name (optional)",
722
- value: d.name,
723
- onChange: (b) => u(y, { name: b.target.value })
724
- }
725
- ),
726
- /* @__PURE__ */ t(
727
- "button",
728
- {
729
- type: "button",
730
- title: "Remove rule",
731
- "aria-label": "Remove rule",
732
- onClick: () => _(y),
733
- className: "flex items-center justify-center h-6 w-6 rounded text-foreground-subtle hover:text-danger hover:bg-danger/10 transition-colors flex-shrink-0",
734
- children: /* @__PURE__ */ t(H, { className: "h-3.5 w-3.5" })
735
- }
736
- )
737
- ] }),
738
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
739
- /* @__PURE__ */ t("span", { className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0", children: "Mode" }),
740
- /* @__PURE__ */ t(
741
- "button",
742
- {
743
- type: "button",
744
- onClick: () => u(y, { mode: "include" }),
745
- className: `${A} ${d.mode === "include" ? F : T}`,
746
- children: "Include"
747
- }
748
- ),
749
- /* @__PURE__ */ t(
750
- "button",
751
- {
752
- type: "button",
753
- onClick: () => u(y, { mode: "exclude" }),
754
- className: `${A} ${d.mode === "exclude" ? F : T}`,
755
- children: "Exclude"
756
- }
757
- )
758
- ] }),
759
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
760
- /* @__PURE__ */ t("span", { className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0", children: "Zones" }),
761
- n.length === 0 ? /* @__PURE__ */ t("span", { className: "text-[10px] text-foreground-subtle italic", children: "none" }) : n.map((b) => {
762
- const x = d.zoneIds.includes(b.id);
763
- return /* @__PURE__ */ i(
764
- "button",
765
- {
766
- type: "button",
767
- onClick: () => g(y, b.id),
768
- className: `${A} ${x ? F : T}`,
769
- children: [
770
- /* @__PURE__ */ t(
771
- "span",
772
- {
773
- className: "h-2 w-2 rounded-sm",
774
- style: { backgroundColor: b.color || "#3b82f6" }
775
- }
776
- ),
777
- /* @__PURE__ */ t("span", { className: "truncate max-w-[7rem]", children: b.name || b.id })
778
- ]
779
- },
780
- b.id
781
- );
782
- })
783
- ] }),
784
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
785
- /* @__PURE__ */ t("span", { className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0", children: "Class" }),
786
- et.map((b) => {
787
- const x = d.classFilter.includes(b.id);
788
- return /* @__PURE__ */ t(
789
- "button",
790
- {
791
- type: "button",
792
- onClick: () => c(y, b.id),
793
- className: `${A} ${x ? F : T}`,
794
- children: b.label
795
- },
796
- b.id
797
- );
798
- }),
799
- d.classFilter.length === 0 && /* @__PURE__ */ t("span", { className: "text-[10px] text-foreground-subtle italic ml-1", children: "any" })
800
- ] })
801
- ]
802
- },
803
- d.id
804
- )) }),
805
- N && /* @__PURE__ */ t("p", { className: "mt-2 text-[10px] text-danger", children: N })
806
- ] });
527
+ function X({ dev: e, stage: n, zones: r, title: a }) {
528
+ let s = j(e?.state.zoneRules), c = i(() => s?.[n] ?? [], [s, n]), [l, u] = o([]), [f, p] = o(!1), [m, h] = o(!1), [v, y] = o(null);
529
+ t(() => {
530
+ f || u(c.map(_e));
531
+ }, [c, f]);
532
+ let x = () => {
533
+ u((e) => [...e, {
534
+ id: crypto.randomUUID(),
535
+ name: "",
536
+ zoneIds: r[0] ? [r[0].id] : [],
537
+ mode: "exclude",
538
+ classFilter: [],
539
+ enabled: !0
540
+ }]), p(!0);
541
+ }, w = (e, t) => {
542
+ u((n) => n.map((n, r) => {
543
+ if (r !== e) return n;
544
+ let i = n.classFilter.includes(t) ? n.classFilter.filter((e) => e !== t) : [...n.classFilter, t];
545
+ return {
546
+ ...n,
547
+ classFilter: i
548
+ };
549
+ })), p(!0);
550
+ }, T = (e, t) => {
551
+ u((n) => n.map((n, r) => {
552
+ if (r !== e) return n;
553
+ let i = n.zoneIds.includes(t) ? n.zoneIds.filter((e) => e !== t) : [...n.zoneIds, t];
554
+ return {
555
+ ...n,
556
+ zoneIds: i
557
+ };
558
+ })), p(!0);
559
+ }, D = (e) => {
560
+ u((t) => t.filter((t, n) => n !== e)), p(!0);
561
+ }, O = (e, t) => {
562
+ u((n) => n.map((n, r) => r === e ? {
563
+ ...n,
564
+ ...t
565
+ } : n)), p(!0);
566
+ }, k = async () => {
567
+ if (e?.zoneRules) {
568
+ h(!0), y(null);
569
+ try {
570
+ await e.zoneRules.setRules({
571
+ stage: n,
572
+ rules: l.map(ve)
573
+ }), p(!1);
574
+ } catch (e) {
575
+ y(e instanceof Error ? e.message : String(e));
576
+ } finally {
577
+ h(!1);
578
+ }
579
+ }
580
+ }, A = f && !!e?.zoneRules && !m;
581
+ return /* @__PURE__ */ N("div", {
582
+ className: "rounded-md border border-border bg-surface/40 p-2.5",
583
+ children: [
584
+ /* @__PURE__ */ N("div", {
585
+ className: "flex items-center justify-between mb-2 gap-2",
586
+ children: [/* @__PURE__ */ M("h3", {
587
+ className: `${C} truncate`,
588
+ children: a ?? `${n === "motion" ? "Motion" : "Detection"} Rules`
589
+ }), /* @__PURE__ */ N("div", {
590
+ className: "flex items-center gap-1 flex-shrink-0",
591
+ children: [/* @__PURE__ */ N("button", {
592
+ type: "button",
593
+ onClick: x,
594
+ disabled: r.length === 0 || !e,
595
+ className: E,
596
+ title: "Add rule",
597
+ children: [/* @__PURE__ */ M(W, { className: "h-2.5 w-2.5" }), " Add"]
598
+ }), /* @__PURE__ */ N("button", {
599
+ type: "button",
600
+ onClick: () => {
601
+ k();
602
+ },
603
+ disabled: !A,
604
+ className: S,
605
+ children: [/* @__PURE__ */ M(G, { className: "h-2.5 w-2.5" }), m ? "…" : "Save"]
606
+ })]
607
+ })]
608
+ }),
609
+ l.length === 0 ? /* @__PURE__ */ M("p", {
610
+ className: "text-[10px] text-foreground-subtle italic px-1 py-1.5 leading-tight",
611
+ children: r.length === 0 ? "Define a zone first — rules reference zone ids." : "No rules — every detection at this stage passes through."
612
+ }) : /* @__PURE__ */ M("div", {
613
+ className: "flex flex-col gap-1.5",
614
+ children: l.map((e, t) => /* @__PURE__ */ N("div", {
615
+ className: "rounded border border-border/50 bg-background/40 px-2 py-1.5 flex flex-col gap-1.5 overflow-hidden",
616
+ children: [
617
+ /* @__PURE__ */ N("div", {
618
+ className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5",
619
+ children: [
620
+ /* @__PURE__ */ M("button", {
621
+ type: "button",
622
+ role: "switch",
623
+ "aria-checked": e.enabled,
624
+ "aria-label": e.enabled ? "Disable rule" : "Enable rule",
625
+ title: e.enabled ? "Rule is active — click to disable" : "Rule is disabled — click to enable",
626
+ onClick: () => O(t, { enabled: !e.enabled }),
627
+ className: ["inline-flex items-center justify-center h-5 w-9 rounded-full border transition-colors flex-shrink-0", e.enabled ? "border-primary/50 bg-primary/20 text-primary" : "border-border bg-surface text-foreground-subtle"].join(" "),
628
+ children: /* @__PURE__ */ M("span", { className: ["h-3 w-3 rounded-full transition-transform", e.enabled ? "translate-x-1.5 bg-primary" : "-translate-x-1.5 bg-foreground-subtle"].join(" ") })
629
+ }),
630
+ /* @__PURE__ */ M("input", {
631
+ className: `${d} min-w-0`,
632
+ placeholder: "Rule name (optional)",
633
+ value: e.name,
634
+ onChange: (e) => O(t, { name: e.target.value })
635
+ }),
636
+ /* @__PURE__ */ M("button", {
637
+ type: "button",
638
+ title: "Remove rule",
639
+ "aria-label": "Remove rule",
640
+ onClick: () => D(t),
641
+ className: "flex items-center justify-center h-6 w-6 rounded text-foreground-subtle hover:text-danger hover:bg-danger/10 transition-colors flex-shrink-0",
642
+ children: /* @__PURE__ */ M(K, { className: "h-3.5 w-3.5" })
643
+ })
644
+ ]
645
+ }),
646
+ /* @__PURE__ */ N("div", {
647
+ className: "flex items-center gap-1.5 flex-wrap",
648
+ children: [
649
+ /* @__PURE__ */ M("span", {
650
+ className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0",
651
+ children: "Mode"
652
+ }),
653
+ /* @__PURE__ */ M("button", {
654
+ type: "button",
655
+ onClick: () => O(t, { mode: "include" }),
656
+ className: `${_} ${e.mode === "include" ? b : g}`,
657
+ children: "Include"
658
+ }),
659
+ /* @__PURE__ */ M("button", {
660
+ type: "button",
661
+ onClick: () => O(t, { mode: "exclude" }),
662
+ className: `${_} ${e.mode === "exclude" ? b : g}`,
663
+ children: "Exclude"
664
+ })
665
+ ]
666
+ }),
667
+ /* @__PURE__ */ N("div", {
668
+ className: "flex items-center gap-1.5 flex-wrap",
669
+ children: [/* @__PURE__ */ M("span", {
670
+ className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0",
671
+ children: "Zones"
672
+ }), r.length === 0 ? /* @__PURE__ */ M("span", {
673
+ className: "text-[10px] text-foreground-subtle italic",
674
+ children: "none"
675
+ }) : r.map((n) => /* @__PURE__ */ N("button", {
676
+ type: "button",
677
+ onClick: () => T(t, n.id),
678
+ className: `${_} ${e.zoneIds.includes(n.id) ? b : g}`,
679
+ children: [/* @__PURE__ */ M("span", {
680
+ className: "h-2 w-2 rounded-sm",
681
+ style: { backgroundColor: n.color || "#3b82f6" }
682
+ }), /* @__PURE__ */ M("span", {
683
+ className: "truncate max-w-[7rem]",
684
+ children: n.name || n.id
685
+ })]
686
+ }, n.id))]
687
+ }),
688
+ /* @__PURE__ */ N("div", {
689
+ className: "flex items-center gap-1.5 flex-wrap",
690
+ children: [
691
+ /* @__PURE__ */ M("span", {
692
+ className: "text-[9px] uppercase tracking-wider text-foreground-subtle w-12 sm:w-14 flex-shrink-0",
693
+ children: "Class"
694
+ }),
695
+ ge.map((n) => /* @__PURE__ */ M("button", {
696
+ type: "button",
697
+ onClick: () => w(t, n.id),
698
+ className: `${_} ${e.classFilter.includes(n.id) ? b : g}`,
699
+ children: n.label
700
+ }, n.id)),
701
+ e.classFilter.length === 0 && /* @__PURE__ */ M("span", {
702
+ className: "text-[10px] text-foreground-subtle italic ml-1",
703
+ children: "any"
704
+ })
705
+ ]
706
+ })
707
+ ]
708
+ }, e.id))
709
+ }),
710
+ v && /* @__PURE__ */ M("p", {
711
+ className: "mt-2 text-[10px] text-danger",
712
+ children: v
713
+ })
714
+ ]
715
+ });
807
716
  }
808
- function rt(e) {
809
- const o = e.kind === "tripwire" ? { kind: "line", points: e.points } : { kind: "polygon", points: e.points };
810
- return { id: e.id, label: e.name, color: e.color, shape: o };
717
+ //#endregion
718
+ //#region src/widgets/zone-editor/types.ts
719
+ function ye(e) {
720
+ let t = e.kind === "tripwire" ? {
721
+ kind: "line",
722
+ points: e.points
723
+ } : {
724
+ kind: "polygon",
725
+ points: e.points
726
+ };
727
+ return {
728
+ id: e.id,
729
+ label: e.name,
730
+ color: e.color,
731
+ shape: t
732
+ };
811
733
  }
812
- function ot(e) {
813
- return e === "line" ? "tripwire" : "polygon";
734
+ function be(e) {
735
+ return e === "line" ? "tripwire" : "polygon";
814
736
  }
815
- function at(e) {
816
- return e === "tripwire" ? "line" : "polygon";
737
+ function xe(e) {
738
+ return e === "tripwire" ? "line" : "polygon";
817
739
  }
818
- const st = "#3b82f6", it = ["polygon", "line"], L = [
819
- "#3b82f6",
820
- "#10b981",
821
- "#f59e0b",
822
- "#ec4899",
823
- "#a855f7",
824
- "#06b6d4",
825
- "#f43f5e",
826
- "#84cc16",
827
- "#8b5cf6",
828
- "#14b8a6"
740
+ //#endregion
741
+ //#region src/widgets/zone-editor/ZoneOverlay.tsx
742
+ var Se = "#3b82f6", Z = ["polygon", "line"], Q = [
743
+ "#3b82f6",
744
+ "#10b981",
745
+ "#f59e0b",
746
+ "#ec4899",
747
+ "#a855f7",
748
+ "#06b6d4",
749
+ "#f43f5e",
750
+ "#84cc16",
751
+ "#8b5cf6",
752
+ "#14b8a6"
829
753
  ];
830
- function lt(e) {
831
- const o = new Set(e.map((n) => (n.color ?? "").toLowerCase()));
832
- for (const n of L)
833
- if (!o.has(n.toLowerCase())) return n;
834
- return L[e.length % L.length];
754
+ function Ce(e) {
755
+ let t = new Set(e.map((e) => (e.color ?? "").toLowerCase()));
756
+ for (let e of Q) if (!t.has(e.toLowerCase())) return e;
757
+ return Q[e.length % Q.length];
835
758
  }
836
- function ct(e) {
837
- return {
838
- id: e.id,
839
- name: e.name,
840
- kind: e.kind,
841
- color: e.color || st,
842
- points: [...e.polygon]
843
- };
759
+ function we(e) {
760
+ return {
761
+ id: e.id,
762
+ name: e.name,
763
+ kind: e.kind,
764
+ color: e.color || Se,
765
+ points: [...e.polygon]
766
+ };
844
767
  }
845
- function G(e) {
846
- return {
847
- id: e.id,
848
- name: e.name,
849
- kind: e.kind,
850
- polygon: e.points,
851
- color: e.color
852
- };
768
+ function $(e) {
769
+ return {
770
+ id: e.id,
771
+ name: e.name,
772
+ kind: e.kind,
773
+ polygon: e.points,
774
+ color: e.color
775
+ };
853
776
  }
854
- function dt({ deviceId: e }) {
855
- const o = O(), n = q(o.trpcClient, e), p = z(n?.state.zones), m = Z(() => p?.zones ?? [], [p]), a = U(), s = a?.drawingKind ?? null, r = a?.selectedZoneId ?? null, f = a?.editingDraft ?? null, l = Z(() => m.map((c) => f && f.id === c.id ? {
856
- id: f.id,
857
- name: f.name,
858
- kind: f.kind,
859
- color: f.color,
860
- points: [...f.points]
861
- } : ct(c)), [m, f]), k = Z(() => l.map(rt), [l]), D = w(
862
- async (c) => {
863
- if (c.kind !== "polygon" && c.kind !== "line") return;
864
- const g = {
865
- id: crypto.randomUUID(),
866
- name: "",
867
- kind: ot(c.kind),
868
- color: lt(l),
869
- points: [...c.points]
870
- };
871
- try {
872
- await n?.zones?.addZone({ zone: G(g) });
873
- } catch (_) {
874
- console.error("zones.addZone failed", _);
875
- }
876
- a?.setSelectedZoneId(g.id), a?.setDrawingKind(null);
877
- },
878
- [n, l, a]
879
- ), N = w(
880
- async (c, g) => {
881
- const _ = g.map((h) => ({ x: h.x, y: h.y }));
882
- if (f && f.id === c) {
883
- a?.updateDraft({ points: _ });
884
- return;
885
- }
886
- const u = l.find((h) => h.id === c);
887
- if (u)
888
- try {
889
- await n?.zones?.updateZone({ zone: G({ ...u, points: _ }) });
890
- } catch (h) {
891
- console.error("zones.updateZone failed", h);
892
- }
893
- },
894
- [n, l, f, a]
895
- ), C = w(
896
- (c, g) => {
897
- typeof c == "string" && (g.kind !== "polygon" && g.kind !== "line" || N(c, g.points));
898
- },
899
- [N]
900
- ), S = w(
901
- (c) => {
902
- if (c === null) {
903
- a?.discardDraft(), a?.setSelectedZoneId(null);
904
- return;
905
- }
906
- if (typeof c != "string") return;
907
- const g = l.find((_) => _.id === c);
908
- if (!g) {
909
- a?.setSelectedZoneId(c);
910
- return;
911
- }
912
- a?.enterDraft({
913
- id: g.id,
914
- kind: g.kind,
915
- name: g.name,
916
- color: g.color,
917
- points: g.points
918
- });
919
- },
920
- [l, a]
921
- );
922
- return l.length === 0 && s === null ? null : /* @__PURE__ */ t(
923
- ce,
924
- {
925
- transparent: !0,
926
- items: k,
927
- supportedShapes: it,
928
- selectedId: r,
929
- onSelect: S,
930
- onShapeChange: C,
931
- onDrawComplete: (c) => {
932
- D(c);
933
- },
934
- drawingKind: s === null ? null : at(s)
935
- }
936
- );
777
+ function Te({ deviceId: e }) {
778
+ let t = O(k().trpcClient, e), r = j(t?.state.zones), a = i(() => r?.zones ?? [], [r]), o = w(), s = o?.drawingKind ?? null, c = o?.selectedZoneId ?? null, l = o?.editingDraft ?? null, u = i(() => a.map((e) => l && l.id === e.id ? {
779
+ id: l.id,
780
+ name: l.name,
781
+ kind: l.kind,
782
+ color: l.color,
783
+ points: [...l.points]
784
+ } : we(e)), [a, l]), d = i(() => u.map(ye), [u]), f = n(async (e) => {
785
+ if (e.kind !== "polygon" && e.kind !== "line") return;
786
+ let n = {
787
+ id: crypto.randomUUID(),
788
+ name: "",
789
+ kind: be(e.kind),
790
+ color: Ce(u),
791
+ points: [...e.points]
792
+ };
793
+ try {
794
+ await t?.zones?.addZone({ zone: $(n) });
795
+ } catch (e) {
796
+ console.error("zones.addZone failed", e);
797
+ }
798
+ o?.setSelectedZoneId(n.id), o?.setDrawingKind(null);
799
+ }, [
800
+ t,
801
+ u,
802
+ o
803
+ ]), p = n(async (e, n) => {
804
+ let r = n.map((e) => ({
805
+ x: e.x,
806
+ y: e.y
807
+ }));
808
+ if (l && l.id === e) {
809
+ o?.updateDraft({ points: r });
810
+ return;
811
+ }
812
+ let i = u.find((t) => t.id === e);
813
+ if (i) try {
814
+ await t?.zones?.updateZone({ zone: $({
815
+ ...i,
816
+ points: r
817
+ }) });
818
+ } catch (e) {
819
+ console.error("zones.updateZone failed", e);
820
+ }
821
+ }, [
822
+ t,
823
+ u,
824
+ l,
825
+ o
826
+ ]), m = n((e, t) => {
827
+ typeof e == "string" && (t.kind !== "polygon" && t.kind !== "line" || p(e, t.points));
828
+ }, [p]), h = n((e) => {
829
+ if (e === null) {
830
+ o?.discardDraft(), o?.setSelectedZoneId(null);
831
+ return;
832
+ }
833
+ if (typeof e != "string") return;
834
+ let t = u.find((t) => t.id === e);
835
+ if (!t) {
836
+ o?.setSelectedZoneId(e);
837
+ return;
838
+ }
839
+ o?.enterDraft({
840
+ id: t.id,
841
+ kind: t.kind,
842
+ name: t.name,
843
+ color: t.color,
844
+ points: t.points
845
+ });
846
+ }, [u, o]);
847
+ return u.length === 0 && s === null ? null : /* @__PURE__ */ M(T, {
848
+ transparent: !0,
849
+ items: d,
850
+ supportedShapes: Z,
851
+ selectedId: c,
852
+ onSelect: h,
853
+ onShapeChange: m,
854
+ onDrawComplete: (e) => {
855
+ f(e);
856
+ },
857
+ drawingKind: s === null ? null : xe(s)
858
+ });
937
859
  }
938
- const ut = xe(dt), pt = "#3b82f6";
939
- function mt(e) {
940
- return {
941
- id: e.id,
942
- name: e.name,
943
- kind: e.kind,
944
- color: e.color || pt,
945
- points: [...e.polygon]
946
- };
860
+ var Ee = a(Te), De = "#3b82f6";
861
+ function Oe(e) {
862
+ return {
863
+ id: e.id,
864
+ name: e.name,
865
+ kind: e.kind,
866
+ color: e.color || De,
867
+ points: [...e.polygon]
868
+ };
947
869
  }
948
- function ft(e) {
949
- return {
950
- id: e.id,
951
- name: e.name,
952
- kind: e.kind,
953
- polygon: e.points,
954
- color: e.color
955
- };
870
+ function ke(e) {
871
+ return {
872
+ id: e.id,
873
+ name: e.name,
874
+ kind: e.kind,
875
+ polygon: e.points,
876
+ color: e.color
877
+ };
956
878
  }
957
- function ht({ deviceId: e }) {
958
- const o = O(), n = q(o.trpcClient, e), p = z(n?.state.zones), m = Z(() => p?.zones ?? [], [p]), a = Z(() => m.map(mt), [m]), s = U(), r = s?.drawingKind ?? null, f = s?.selectedZoneId ?? null, l = s?.editingDraft ?? null, k = Z(
959
- () => ({
960
- id: "zones",
961
- order: 100,
962
- // above PTZ overlay (order 0) so handles aren't occluded
963
- node: /* @__PURE__ */ t(ut, { deviceId: e })
964
- }),
965
- [e]
966
- );
967
- de(k);
968
- const D = w(
969
- (u) => {
970
- if (u === null) {
971
- s?.discardDraft(), s?.setSelectedZoneId(null);
972
- return;
973
- }
974
- const h = a.find(($) => $.id === u);
975
- h && s?.enterDraft({
976
- id: h.id,
977
- kind: h.kind,
978
- name: h.name,
979
- color: h.color,
980
- points: h.points
981
- });
982
- },
983
- [a, s]
984
- ), N = w(async () => {
985
- const u = s?.editingDraft;
986
- if (u) {
987
- try {
988
- await n?.zones?.updateZone({
989
- zone: ft({
990
- id: u.id,
991
- kind: u.kind,
992
- name: u.name,
993
- color: u.color,
994
- points: [...u.points]
995
- })
996
- });
997
- } catch (h) {
998
- console.error("zones.updateZone failed", h);
999
- }
1000
- s?.discardDraft(), s?.setSelectedZoneId(null);
1001
- }
1002
- }, [n, s]), C = w(() => {
1003
- s?.discardDraft(), s?.setSelectedZoneId(null);
1004
- }, [s]), S = w(
1005
- async (u) => {
1006
- try {
1007
- await n?.zones?.removeZone({ zoneId: u });
1008
- } catch (h) {
1009
- console.error("zones.removeZone failed", h);
1010
- }
1011
- s?.selectedZoneId === u && s.setSelectedZoneId(null), s?.editingDraft?.id === u && s.discardDraft();
1012
- },
1013
- [n, s]
1014
- ), c = w(
1015
- (u) => {
1016
- s?.startDrawing(u);
1017
- },
1018
- [s]
1019
- ), g = w(() => {
1020
- s?.setDrawingKind(null);
1021
- }, [s]), _ = Z(() => !l || !a.find((h) => h.id === l.id) ? null : {
1022
- id: l.id,
1023
- kind: l.kind,
1024
- name: l.name,
1025
- color: l.color,
1026
- points: [...l.points]
1027
- }, [a, l]);
1028
- return /* @__PURE__ */ i("div", { className: ue, children: [
1029
- /* @__PURE__ */ i("div", { className: pe, children: [
1030
- /* @__PURE__ */ t("div", { className: me, children: /* @__PURE__ */ i("div", { className: "min-w-0", children: [
1031
- /* @__PURE__ */ t("h2", { className: J, children: "Detection Zones" }),
1032
- /* @__PURE__ */ i("p", { className: `${fe} mt-0.5 leading-tight`, children: [
1033
- "Pick a shape below or use the ",
1034
- /* @__PURE__ */ t("strong", { className: "text-foreground", children: "Zones" }),
1035
- " button on the live frame to draw new polygons or tripwires. Behaviour is set per-stage in the rules editors below — a zone with no rule is observed by analytics but never filters."
1036
- ] })
1037
- ] }) }),
1038
- /* @__PURE__ */ i("div", { className: `${he} flex flex-col gap-3`, children: [
1039
- /* @__PURE__ */ t(
1040
- Xe,
1041
- {
1042
- zones: a,
1043
- selectedZoneId: f,
1044
- drawingKind: r,
1045
- onSelectZone: D,
1046
- onDeleteZone: S,
1047
- onStartDraw: c,
1048
- onCancelDraw: g
1049
- }
1050
- ),
1051
- _ && /* @__PURE__ */ i(X, { children: [
1052
- /* @__PURE__ */ t("div", { className: "border-t border-border" }),
1053
- /* @__PURE__ */ t(
1054
- Ye,
1055
- {
1056
- zone: _,
1057
- onSave: N,
1058
- onDiscard: C,
1059
- onDelete: () => S(_.id)
1060
- }
1061
- )
1062
- ] })
1063
- ] })
1064
- ] }),
1065
- /* @__PURE__ */ i("div", { className: `grid grid-cols-1 2xl:grid-cols-2 ${ge}`, children: [
1066
- /* @__PURE__ */ t(W, { dev: n, stage: "motion", zones: m }),
1067
- /* @__PURE__ */ t(W, { dev: n, stage: "detection", zones: m })
1068
- ] })
1069
- ] });
879
+ function Ae({ deviceId: e }) {
880
+ let t = O(k().trpcClient, e), r = j(t?.state.zones), a = i(() => r?.zones ?? [], [r]), o = i(() => a.map(Oe), [a]), s = w(), l = s?.drawingKind ?? null, u = s?.selectedZoneId ?? null, d = s?.editingDraft ?? null;
881
+ c(i(() => ({
882
+ id: "zones",
883
+ order: 100,
884
+ node: /* @__PURE__ */ M(Ee, { deviceId: e })
885
+ }), [e]));
886
+ let f = n((e) => {
887
+ if (e === null) {
888
+ s?.discardDraft(), s?.setSelectedZoneId(null);
889
+ return;
890
+ }
891
+ let t = o.find((t) => t.id === e);
892
+ t && s?.enterDraft({
893
+ id: t.id,
894
+ kind: t.kind,
895
+ name: t.name,
896
+ color: t.color,
897
+ points: t.points
898
+ });
899
+ }, [o, s]), g = n(async () => {
900
+ let e = s?.editingDraft;
901
+ if (e) {
902
+ try {
903
+ await t?.zones?.updateZone({ zone: ke({
904
+ id: e.id,
905
+ kind: e.kind,
906
+ name: e.name,
907
+ color: e.color,
908
+ points: [...e.points]
909
+ }) });
910
+ } catch (e) {
911
+ console.error("zones.updateZone failed", e);
912
+ }
913
+ s?.discardDraft(), s?.setSelectedZoneId(null);
914
+ }
915
+ }, [t, s]), _ = n(() => {
916
+ s?.discardDraft(), s?.setSelectedZoneId(null);
917
+ }, [s]), v = n(async (e) => {
918
+ try {
919
+ await t?.zones?.removeZone({ zoneId: e });
920
+ } catch (e) {
921
+ console.error("zones.removeZone failed", e);
922
+ }
923
+ s?.selectedZoneId === e && s.setSelectedZoneId(null), s?.editingDraft?.id === e && s.discardDraft();
924
+ }, [t, s]), b = n((e) => {
925
+ s?.startDrawing(e);
926
+ }, [s]), S = n(() => {
927
+ s?.setDrawingKind(null);
928
+ }, [s]), T = i(() => !d || !o.find((e) => e.id === d.id) ? null : {
929
+ id: d.id,
930
+ kind: d.kind,
931
+ name: d.name,
932
+ color: d.color,
933
+ points: [...d.points]
934
+ }, [o, d]);
935
+ return /* @__PURE__ */ N("div", {
936
+ className: m,
937
+ children: [/* @__PURE__ */ N("div", {
938
+ className: y,
939
+ children: [/* @__PURE__ */ M("div", {
940
+ className: D,
941
+ children: /* @__PURE__ */ N("div", {
942
+ className: "min-w-0",
943
+ children: [/* @__PURE__ */ M("h2", {
944
+ className: C,
945
+ children: "Detection Zones"
946
+ }), /* @__PURE__ */ N("p", {
947
+ className: `${h} mt-0.5 leading-tight`,
948
+ children: [
949
+ "Pick a shape below or use the ",
950
+ /* @__PURE__ */ M("strong", {
951
+ className: "text-foreground",
952
+ children: "Zones"
953
+ }),
954
+ " ",
955
+ "button on the live frame to draw new polygons or tripwires. Behaviour is set per-stage in the rules editors below — a zone with no rule is observed by analytics but never filters."
956
+ ]
957
+ })]
958
+ })
959
+ }), /* @__PURE__ */ N("div", {
960
+ className: `${p} flex flex-col gap-3`,
961
+ children: [/* @__PURE__ */ M(pe, {
962
+ zones: o,
963
+ selectedZoneId: u,
964
+ drawingKind: l,
965
+ onSelectZone: f,
966
+ onDeleteZone: v,
967
+ onStartDraw: b,
968
+ onCancelDraw: S
969
+ }), T && /* @__PURE__ */ N(P, { children: [/* @__PURE__ */ M("div", { className: "border-t border-border" }), /* @__PURE__ */ M(he, {
970
+ zone: T,
971
+ onSave: g,
972
+ onDiscard: _,
973
+ onDelete: () => v(T.id)
974
+ })] })]
975
+ })]
976
+ }), /* @__PURE__ */ N("div", {
977
+ className: `grid grid-cols-1 2xl:grid-cols-2 ${x}`,
978
+ children: [/* @__PURE__ */ M(X, {
979
+ dev: t,
980
+ stage: "motion",
981
+ zones: a
982
+ }), /* @__PURE__ */ M(X, {
983
+ dev: t,
984
+ stage: "detection",
985
+ zones: a
986
+ })]
987
+ })]
988
+ });
1070
989
  }
1071
- function gt(e) {
1072
- return e.deviceId === void 0 ? /* @__PURE__ */ t("div", { className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning", children: "ZoneEditor requires a deviceId" }) : /* @__PURE__ */ t(ht, { deviceId: e.deviceId });
990
+ //#endregion
991
+ //#region src/widgets/ZoneEditor.tsx
992
+ function je(e) {
993
+ return e.deviceId === void 0 ? /* @__PURE__ */ M("div", {
994
+ className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
995
+ children: "ZoneEditor requires a deviceId"
996
+ }) : /* @__PURE__ */ M(Ae, { deviceId: e.deviceId });
1073
997
  }
1074
- const kt = {
1075
- "pipeline-quick-stats": Ve,
1076
- "zone-editor": gt
1077
- };
1078
- export {
1079
- kt as default
998
+ //#endregion
999
+ //#region src/widgets/index.tsx
1000
+ var Me = {
1001
+ "pipeline-quick-stats": ce,
1002
+ "zone-editor": je
1080
1003
  };
1004
+ //#endregion
1005
+ export { Me as default };