@camstack/addon-pipeline-orchestrator 0.1.28 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_stub.js +981 -1097
- package/dist/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-ptZ0g8RF.mjs +186 -0
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DTMQMZQR.mjs +26 -0
- 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
- 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
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.js-CBokMOYQ.mjs +26 -0
- 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
- package/dist/dist-CYZr2fwk.mjs +2726 -0
- package/dist/hostInit-Dj50hFGl.mjs +147 -0
- package/dist/index.js +25501 -21720
- package/dist/index.mjs +25497 -21724
- package/dist/remoteEntry.js +134 -2973
- package/dist/remoteEntry.ssr.js +33 -0
- package/dist/virtualExposes-Bv3e5bey.mjs +27 -0
- package/dist/virtual_mf-exposes-ssr___mfe_internal__addon_pipeline_orchestrator_widgets__remoteEntry_js-DGpOm1yU.mjs +10 -0
- package/package.json +8 -9
- package/dist/@mf-types/compiled-types/widgets/PipelineQuickStats.d.ts +0 -3
- package/dist/@mf-types/compiled-types/widgets/PipelineQuickStats.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/ZoneEditor.d.ts +0 -17
- package/dist/@mf-types/compiled-types/widgets/ZoneEditor.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/ZonesTab.d.ts +0 -7
- package/dist/@mf-types/compiled-types/widgets/ZonesTab.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/index.d.ts +0 -13
- package/dist/@mf-types/compiled-types/widgets/index.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneForm.d.ts +0 -23
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneForm.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneList.d.ts +0 -15
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneList.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneOverlay.d.ts +0 -19
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneOverlay.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneRulesEditor.d.ts +0 -9
- package/dist/@mf-types/compiled-types/widgets/zone-editor/ZoneRulesEditor.d.ts.map +0 -1
- package/dist/@mf-types/compiled-types/widgets/zone-editor/types.d.ts +0 -33
- package/dist/@mf-types/compiled-types/widgets/zone-editor/types.d.ts.map +0 -1
- package/dist/@mf-types/widgets.d.ts +0 -2
- package/dist/@mf-types.d.ts +0 -3
- package/dist/@mf-types.zip +0 -0
- package/dist/ReactKonva-Rg9MNR62.mjs +0 -7267
- package/dist/_CoreInternals-B7PHssO3.mjs +0 -3808
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-lantnv8e.mjs +0 -12
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-C507UJJC.mjs +0 -30
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-Bau3YeQq.mjs +0 -35
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-DoWbefqS.mjs +0 -104
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-D4eEXltm.mjs +0 -85
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-CVrnrGED.mjs +0 -62
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__konva__loadShare__.mjs-C4PYo-VP.mjs +0 -30
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.mjs-B9__gOco.mjs +0 -89
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-7px_s7lQ.mjs +0 -29
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-Cg6QsnjR.mjs +0 -36
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom__loadShare__.mjs-Dp8hqYOB.mjs +0 -45
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BP356DyI.mjs +0 -6
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BBmNf5hf.mjs +0 -34
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare__react_mf_2_konva__loadShare__.mjs-BjxkVuVo.mjs +0 -65
- package/dist/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-LTEdXGaz.mjs +0 -186
- package/dist/client-DRnvBKkB.mjs +0 -9836
- package/dist/getErrorShape-BPSzUA7W-TlK8ipWe.mjs +0 -211
- package/dist/hostInit-I-qi78F9.mjs +0 -196
- package/dist/index-B7LnRgSE.mjs +0 -725
- package/dist/index-BRAmQOXI.mjs +0 -1641
- package/dist/index-C52WDzRJ.mjs +0 -3842
- package/dist/index-CSDhxUNV.mjs +0 -435
- package/dist/index-CWkKuNLr.mjs +0 -232
- package/dist/index-Dhyr_mtg.mjs +0 -52894
- package/dist/index-DtOI1aTU.mjs +0 -18504
- package/dist/index-DujcNO2E.mjs +0 -185
- package/dist/index-LZ9uQOMe.mjs +0 -2603
- package/dist/index-xncRG7-x.mjs +0 -2713
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/jsx-runtime-C5ymGPwR.mjs +0 -55
- package/dist/schemas-B7L0qZtq.mjs +0 -3599
- package/dist/virtualExposes-8FzWTdq3.mjs +0 -42
package/dist/_stub.js
CHANGED
|
@@ -1,1121 +1,1005 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
],
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
], Oe = k("save", Ke);
|
|
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 Be = [
|
|
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 = k("trash-2", Be);
|
|
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 Ue = [
|
|
235
|
-
[
|
|
236
|
-
"path",
|
|
237
|
-
{
|
|
238
|
-
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
239
|
-
key: "ftymec"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
|
|
243
|
-
], ze = k("video", Ue);
|
|
244
|
-
/**
|
|
245
|
-
* @license lucide-react v0.511.0 - ISC
|
|
246
|
-
*
|
|
247
|
-
* This source code is licensed under the ISC license.
|
|
248
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/
|
|
250
|
-
const Ve = [
|
|
251
|
-
[
|
|
252
|
-
"path",
|
|
253
|
-
{
|
|
254
|
-
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",
|
|
255
|
-
key: "uqj9uw"
|
|
256
|
-
}
|
|
257
|
-
],
|
|
258
|
-
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
259
|
-
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
260
|
-
], He = k("volume-2", Ve);
|
|
261
|
-
/**
|
|
262
|
-
* @license lucide-react v0.511.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/
|
|
267
|
-
const Qe = [
|
|
268
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
269
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
270
|
-
], ne = k("x", Qe);
|
|
271
|
-
function We(e) {
|
|
272
|
-
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(Ge, { 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 });
|
|
273
214
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
),
|
|
360
|
-
/* @__PURE__ */ t(
|
|
361
|
-
I,
|
|
362
|
-
{
|
|
363
|
-
icon: ze,
|
|
364
|
-
label: "Recording",
|
|
365
|
-
value: P,
|
|
366
|
-
color: $ ? "text-success" : void 0,
|
|
367
|
-
subtext: F
|
|
368
|
-
}
|
|
369
|
-
)
|
|
370
|
-
] });
|
|
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
|
+
});
|
|
371
300
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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]}`;
|
|
376
311
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
+
});
|
|
400
336
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
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"
|
|
407
345
|
};
|
|
408
|
-
function
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
),
|
|
472
|
-
/* @__PURE__ */ t("span", { className: "flex-1 truncate text-[11px] font-medium text-foreground", children: r.name }),
|
|
473
|
-
/* @__PURE__ */ t(
|
|
474
|
-
"span",
|
|
475
|
-
{
|
|
476
|
-
className: `inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-medium flex-shrink-0 ${Ye[r.kind]}`,
|
|
477
|
-
children: Je[r.kind]
|
|
478
|
-
}
|
|
479
|
-
),
|
|
480
|
-
/* @__PURE__ */ t(
|
|
481
|
-
"button",
|
|
482
|
-
{
|
|
483
|
-
type: "button",
|
|
484
|
-
title: "Delete zone",
|
|
485
|
-
className: "p-0.5 text-foreground-subtle hover:text-danger rounded transition-colors flex-shrink-0",
|
|
486
|
-
onClick: (l) => {
|
|
487
|
-
l.stopPropagation(), f(r.id);
|
|
488
|
-
},
|
|
489
|
-
children: /* @__PURE__ */ t(H, { className: "h-3 w-3" })
|
|
490
|
-
}
|
|
491
|
-
)
|
|
492
|
-
]
|
|
493
|
-
},
|
|
494
|
-
r.id
|
|
495
|
-
);
|
|
496
|
-
}) })
|
|
497
|
-
] });
|
|
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
|
+
});
|
|
498
409
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
"#06b6d4",
|
|
511
|
-
// cyan
|
|
512
|
-
"#f97316",
|
|
513
|
-
// orange
|
|
514
|
-
"#ec4899"
|
|
515
|
-
// 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"
|
|
516
421
|
];
|
|
517
|
-
function
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
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",
|
|
597
|
-
title: "Discard changes (Esc)",
|
|
598
|
-
children: [
|
|
599
|
-
/* @__PURE__ */ t(ne, { className: "h-3 w-3" }),
|
|
600
|
-
"Discard"
|
|
601
|
-
]
|
|
602
|
-
}
|
|
603
|
-
)
|
|
604
|
-
] }),
|
|
605
|
-
/* @__PURE__ */ i(
|
|
606
|
-
"button",
|
|
607
|
-
{
|
|
608
|
-
type: "button",
|
|
609
|
-
onClick: d,
|
|
610
|
-
className: `${se} w-full`,
|
|
611
|
-
children: [
|
|
612
|
-
/* @__PURE__ */ t(H, { className: "h-3 w-3" }),
|
|
613
|
-
"Delete"
|
|
614
|
-
]
|
|
615
|
-
}
|
|
616
|
-
)
|
|
617
|
-
] });
|
|
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
|
+
});
|
|
618
501
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
)
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
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
|
+
};
|
|
631
517
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
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;
|
|
640
526
|
}
|
|
641
|
-
function
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
"button",
|
|
831
|
-
{
|
|
832
|
-
type: "button",
|
|
833
|
-
onClick: () => u(x, b.id),
|
|
834
|
-
className: `${R} ${m ? E : L}`,
|
|
835
|
-
children: b.label
|
|
836
|
-
},
|
|
837
|
-
b.id
|
|
838
|
-
);
|
|
839
|
-
}),
|
|
840
|
-
c.classFilter.length === 0 && /* @__PURE__ */ t("span", { className: "text-[10px] text-foreground-subtle italic ml-1", children: "any" })
|
|
841
|
-
] })
|
|
842
|
-
]
|
|
843
|
-
},
|
|
844
|
-
c.id
|
|
845
|
-
)) }),
|
|
846
|
-
N && /* @__PURE__ */ t("p", { className: "mt-2 text-[10px] text-danger", children: N })
|
|
847
|
-
] });
|
|
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
|
+
});
|
|
848
716
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
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
|
+
};
|
|
852
733
|
}
|
|
853
|
-
function
|
|
854
|
-
|
|
734
|
+
function be(e) {
|
|
735
|
+
return e === "line" ? "tripwire" : "polygon";
|
|
855
736
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
737
|
+
function xe(e) {
|
|
738
|
+
return e === "tripwire" ? "line" : "polygon";
|
|
858
739
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
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"
|
|
870
753
|
];
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
return q[e.length % q.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];
|
|
876
758
|
}
|
|
877
|
-
function
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
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
|
+
};
|
|
885
767
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
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
|
+
};
|
|
894
776
|
}
|
|
895
|
-
function
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
);
|
|
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
|
+
});
|
|
978
859
|
}
|
|
979
|
-
|
|
980
|
-
function
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
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
|
+
};
|
|
988
869
|
}
|
|
989
|
-
function
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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
|
+
};
|
|
997
878
|
}
|
|
998
|
-
function
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
/* @__PURE__ */ t(G, { dev: n, stage: "detection", zones: f })
|
|
1109
|
-
] })
|
|
1110
|
-
] });
|
|
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
|
+
});
|
|
1111
989
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
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 });
|
|
1114
997
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
Ct as default
|
|
998
|
+
//#endregion
|
|
999
|
+
//#region src/widgets/index.tsx
|
|
1000
|
+
var Me = {
|
|
1001
|
+
"pipeline-quick-stats": ce,
|
|
1002
|
+
"zone-editor": je
|
|
1121
1003
|
};
|
|
1004
|
+
//#endregion
|
|
1005
|
+
export { Me as default };
|