@camstack/addon-post-analysis 1.1.34 → 1.1.36
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/{dist-B1EgWJrr.mjs → dist-8DTQLWKO.mjs} +421 -47
- package/dist/{dist-BeDNiKi6.js → dist-Bc4L7FGf.js} +444 -46
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/{node-DYa6O693.js → node-BRwocT7C.js} +1 -1
- package/dist/pipeline-analytics/_stub.js +1 -1
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BuAr2V3O.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CMH9Gs68.mjs} +3 -3
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DLzy78dH.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-DpLNAYiI.mjs → hostInit-Bhr2CNHt.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +231 -120
- package/dist/pipeline-analytics/index.mjs +230 -119
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C8Wc_rxx.mjs +0 -26
|
@@ -7726,6 +7726,178 @@ function cosineSimilarity(a, b) {
|
|
|
7726
7726
|
const denom = Math.sqrt(normA) * Math.sqrt(normB);
|
|
7727
7727
|
return denom === 0 ? 0 : dotProduct / denom;
|
|
7728
7728
|
}
|
|
7729
|
+
var MACRO_LABELS = [
|
|
7730
|
+
{
|
|
7731
|
+
id: "person",
|
|
7732
|
+
name: "Person"
|
|
7733
|
+
},
|
|
7734
|
+
{
|
|
7735
|
+
id: "vehicle",
|
|
7736
|
+
name: "Vehicle"
|
|
7737
|
+
},
|
|
7738
|
+
{
|
|
7739
|
+
id: "animal",
|
|
7740
|
+
name: "Animal"
|
|
7741
|
+
},
|
|
7742
|
+
{
|
|
7743
|
+
id: "package",
|
|
7744
|
+
name: "Package"
|
|
7745
|
+
}
|
|
7746
|
+
];
|
|
7747
|
+
var COCO_TO_MACRO = {
|
|
7748
|
+
mapping: {
|
|
7749
|
+
person: "person",
|
|
7750
|
+
bicycle: "vehicle",
|
|
7751
|
+
car: "vehicle",
|
|
7752
|
+
motorcycle: "vehicle",
|
|
7753
|
+
airplane: "vehicle",
|
|
7754
|
+
bus: "vehicle",
|
|
7755
|
+
train: "vehicle",
|
|
7756
|
+
truck: "vehicle",
|
|
7757
|
+
boat: "vehicle",
|
|
7758
|
+
bird: "animal",
|
|
7759
|
+
cat: "animal",
|
|
7760
|
+
dog: "animal",
|
|
7761
|
+
horse: "animal",
|
|
7762
|
+
sheep: "animal",
|
|
7763
|
+
cow: "animal",
|
|
7764
|
+
elephant: "animal",
|
|
7765
|
+
bear: "animal",
|
|
7766
|
+
zebra: "animal",
|
|
7767
|
+
giraffe: "animal",
|
|
7768
|
+
suitcase: "package",
|
|
7769
|
+
backpack: "package",
|
|
7770
|
+
handbag: "package"
|
|
7771
|
+
},
|
|
7772
|
+
preserveOriginal: false
|
|
7773
|
+
};
|
|
7774
|
+
var AUDIO_MACRO_LABELS = [
|
|
7775
|
+
{
|
|
7776
|
+
id: "speech",
|
|
7777
|
+
name: "Speech",
|
|
7778
|
+
icon: "🗣️"
|
|
7779
|
+
},
|
|
7780
|
+
{
|
|
7781
|
+
id: "scream",
|
|
7782
|
+
name: "Scream / Shout",
|
|
7783
|
+
icon: "😱"
|
|
7784
|
+
},
|
|
7785
|
+
{
|
|
7786
|
+
id: "crying",
|
|
7787
|
+
name: "Crying / Baby",
|
|
7788
|
+
icon: "😢"
|
|
7789
|
+
},
|
|
7790
|
+
{
|
|
7791
|
+
id: "laughter",
|
|
7792
|
+
name: "Laughter",
|
|
7793
|
+
icon: "😂"
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
id: "music",
|
|
7797
|
+
name: "Music",
|
|
7798
|
+
icon: "🎵"
|
|
7799
|
+
},
|
|
7800
|
+
{
|
|
7801
|
+
id: "dog",
|
|
7802
|
+
name: "Dog",
|
|
7803
|
+
icon: "🐕"
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
id: "cat",
|
|
7807
|
+
name: "Cat",
|
|
7808
|
+
icon: "🐈"
|
|
7809
|
+
},
|
|
7810
|
+
{
|
|
7811
|
+
id: "bird",
|
|
7812
|
+
name: "Bird",
|
|
7813
|
+
icon: "🐦"
|
|
7814
|
+
},
|
|
7815
|
+
{
|
|
7816
|
+
id: "animal",
|
|
7817
|
+
name: "Animal (other)",
|
|
7818
|
+
icon: "🐾"
|
|
7819
|
+
},
|
|
7820
|
+
{
|
|
7821
|
+
id: "alarm",
|
|
7822
|
+
name: "Alarm / Siren",
|
|
7823
|
+
icon: "🚨"
|
|
7824
|
+
},
|
|
7825
|
+
{
|
|
7826
|
+
id: "doorbell",
|
|
7827
|
+
name: "Doorbell / Knock",
|
|
7828
|
+
icon: "🔔"
|
|
7829
|
+
},
|
|
7830
|
+
{
|
|
7831
|
+
id: "glass_breaking",
|
|
7832
|
+
name: "Glass Breaking",
|
|
7833
|
+
icon: "💥"
|
|
7834
|
+
},
|
|
7835
|
+
{
|
|
7836
|
+
id: "gunshot",
|
|
7837
|
+
name: "Gunshot / Explosion",
|
|
7838
|
+
icon: "💣"
|
|
7839
|
+
},
|
|
7840
|
+
{
|
|
7841
|
+
id: "vehicle",
|
|
7842
|
+
name: "Vehicle",
|
|
7843
|
+
icon: "🚗"
|
|
7844
|
+
},
|
|
7845
|
+
{
|
|
7846
|
+
id: "siren",
|
|
7847
|
+
name: "Emergency Siren",
|
|
7848
|
+
icon: "🚑"
|
|
7849
|
+
},
|
|
7850
|
+
{
|
|
7851
|
+
id: "fire",
|
|
7852
|
+
name: "Fire / Smoke",
|
|
7853
|
+
icon: "🔥"
|
|
7854
|
+
},
|
|
7855
|
+
{
|
|
7856
|
+
id: "water",
|
|
7857
|
+
name: "Water",
|
|
7858
|
+
icon: "💧"
|
|
7859
|
+
},
|
|
7860
|
+
{
|
|
7861
|
+
id: "wind",
|
|
7862
|
+
name: "Wind / Weather",
|
|
7863
|
+
icon: "🌬️"
|
|
7864
|
+
},
|
|
7865
|
+
{
|
|
7866
|
+
id: "door",
|
|
7867
|
+
name: "Door",
|
|
7868
|
+
icon: "🚪"
|
|
7869
|
+
},
|
|
7870
|
+
{
|
|
7871
|
+
id: "footsteps",
|
|
7872
|
+
name: "Footsteps",
|
|
7873
|
+
icon: "👣"
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
id: "crowd",
|
|
7877
|
+
name: "Crowd / Chatter",
|
|
7878
|
+
icon: "👥"
|
|
7879
|
+
},
|
|
7880
|
+
{
|
|
7881
|
+
id: "telephone",
|
|
7882
|
+
name: "Telephone",
|
|
7883
|
+
icon: "📞"
|
|
7884
|
+
},
|
|
7885
|
+
{
|
|
7886
|
+
id: "engine",
|
|
7887
|
+
name: "Engine / Motor",
|
|
7888
|
+
icon: "⚙️"
|
|
7889
|
+
},
|
|
7890
|
+
{
|
|
7891
|
+
id: "tools",
|
|
7892
|
+
name: "Tools / Construction",
|
|
7893
|
+
icon: "🔨"
|
|
7894
|
+
},
|
|
7895
|
+
{
|
|
7896
|
+
id: "silence",
|
|
7897
|
+
name: "Silence",
|
|
7898
|
+
icon: "🤫"
|
|
7899
|
+
}
|
|
7900
|
+
];
|
|
7729
7901
|
var YAMNET_TO_MACRO = {
|
|
7730
7902
|
mapping: {
|
|
7731
7903
|
Speech: "speech",
|
|
@@ -7992,6 +8164,133 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
7992
8164
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7993
8165
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7994
8166
|
/**
|
|
8167
|
+
* Unified event-kind taxonomy — THE single source of truth for
|
|
8168
|
+
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
8169
|
+
* icon }`.
|
|
8170
|
+
*
|
|
8171
|
+
* This dictionary folds together what used to be scattered across four
|
|
8172
|
+
* copies:
|
|
8173
|
+
* - `capabilities/sensor-event-kinds.ts` (sensor cap colors)
|
|
8174
|
+
* - `addon-post-analysis/.../services/event-kinds.ts`
|
|
8175
|
+
* (MOTION/PERSON/VEHICLE… _COLOR constants)
|
|
8176
|
+
* - `ui-library/composites/detection-colors.ts` (CLASS_COLORS)
|
|
8177
|
+
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
8178
|
+
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
8179
|
+
*
|
|
8180
|
+
* The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
|
|
8181
|
+
* `@camstack/types`. The UI-side mapping `iconId → lucide component` and
|
|
8182
|
+
* `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
|
|
8183
|
+
* color or an icon: they read this dictionary (server descriptors carry the
|
|
8184
|
+
* fields inline; the client resolves color/icon/label from `iconId`/`kind`).
|
|
8185
|
+
*
|
|
8186
|
+
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
8187
|
+
*/
|
|
8188
|
+
var TAXONOMY_COLORS = {
|
|
8189
|
+
motion: "#f59e0b",
|
|
8190
|
+
audio: "#06b6d4",
|
|
8191
|
+
person: "#22c55e",
|
|
8192
|
+
vehicle: "#3b82f6",
|
|
8193
|
+
animal: "#f97316",
|
|
8194
|
+
package: "#a855f7",
|
|
8195
|
+
sensor: "#8b5cf6",
|
|
8196
|
+
control: "#10b981",
|
|
8197
|
+
genericDetection: "#64748b"
|
|
8198
|
+
};
|
|
8199
|
+
/** Global default color when a kind is unknown (matches legacy box-drawer). */
|
|
8200
|
+
var DEFAULT_EVENT_COLOR = "#22ff55";
|
|
8201
|
+
var DETECTION_SUB_COLORS = {
|
|
8202
|
+
car: "#f59e0b",
|
|
8203
|
+
truck: "#d97706",
|
|
8204
|
+
bus: "#b45309",
|
|
8205
|
+
motorcycle: "#eab308",
|
|
8206
|
+
bicycle: "#ca8a04",
|
|
8207
|
+
airplane: "#60a5fa",
|
|
8208
|
+
boat: "#2563eb",
|
|
8209
|
+
train: "#1d4ed8",
|
|
8210
|
+
bird: "#14b8a6",
|
|
8211
|
+
dog: "#84cc16",
|
|
8212
|
+
cat: "#f97316",
|
|
8213
|
+
horse: "#a16207",
|
|
8214
|
+
sheep: "#a3a3a3",
|
|
8215
|
+
cow: "#78716c",
|
|
8216
|
+
elephant: "#6b7280",
|
|
8217
|
+
bear: "#7c2d12",
|
|
8218
|
+
zebra: "#404040",
|
|
8219
|
+
giraffe: "#d4a373"
|
|
8220
|
+
};
|
|
8221
|
+
function titleCase(id) {
|
|
8222
|
+
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
8223
|
+
}
|
|
8224
|
+
var entries = /* @__PURE__ */ new Map();
|
|
8225
|
+
function macro(kind, category, color, iconId, label) {
|
|
8226
|
+
entries.set(kind, {
|
|
8227
|
+
kind,
|
|
8228
|
+
parentKind: null,
|
|
8229
|
+
level: "macro",
|
|
8230
|
+
category,
|
|
8231
|
+
color,
|
|
8232
|
+
iconId,
|
|
8233
|
+
labelKey: `eventKind.${kind}`,
|
|
8234
|
+
label
|
|
8235
|
+
});
|
|
8236
|
+
}
|
|
8237
|
+
function sub(kind, parentKind, category, color, iconId, label) {
|
|
8238
|
+
entries.set(kind, {
|
|
8239
|
+
kind,
|
|
8240
|
+
parentKind,
|
|
8241
|
+
level: "sub",
|
|
8242
|
+
category,
|
|
8243
|
+
color,
|
|
8244
|
+
iconId,
|
|
8245
|
+
labelKey: `eventKind.${kind}`,
|
|
8246
|
+
label
|
|
8247
|
+
});
|
|
8248
|
+
}
|
|
8249
|
+
macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
|
|
8250
|
+
macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
|
|
8251
|
+
macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
|
|
8252
|
+
macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
|
|
8253
|
+
macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
|
|
8254
|
+
macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
|
|
8255
|
+
macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
|
|
8256
|
+
macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
|
|
8257
|
+
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
8258
|
+
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
8259
|
+
if (entries.has(cocoClass)) continue;
|
|
8260
|
+
sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
|
|
8261
|
+
}
|
|
8262
|
+
sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
|
|
8263
|
+
sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
|
|
8264
|
+
sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
|
|
8265
|
+
sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
|
|
8266
|
+
sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
|
|
8267
|
+
sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
|
|
8268
|
+
sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
|
|
8269
|
+
sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
|
|
8270
|
+
sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
|
|
8271
|
+
sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
|
|
8272
|
+
sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
8273
|
+
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
8274
|
+
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
8275
|
+
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
8276
|
+
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
8277
|
+
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
8278
|
+
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
8279
|
+
sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
|
|
8280
|
+
for (const l of AUDIO_MACRO_LABELS) {
|
|
8281
|
+
const kind = `audio-${l.id}`;
|
|
8282
|
+
if (entries.has(kind)) continue;
|
|
8283
|
+
sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
|
|
8284
|
+
}
|
|
8285
|
+
/** The complete taxonomy dictionary, keyed by kind. */
|
|
8286
|
+
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
8287
|
+
/** The sub kinds whose `parentKind` is `macro` (empty for a leaf macro). */
|
|
8288
|
+
function subKindsOf(macro) {
|
|
8289
|
+
const out = [];
|
|
8290
|
+
for (const e of Object.values(EVENT_TAXONOMY)) if (e.parentKind === macro) out.push(e);
|
|
8291
|
+
return out;
|
|
8292
|
+
}
|
|
8293
|
+
/**
|
|
7995
8294
|
* Error types for the safe expression engine. Two distinct classes so callers
|
|
7996
8295
|
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
7997
8296
|
* failure — both are non-fatal to the host: read paths degrade to "skip link".
|
|
@@ -16035,17 +16334,30 @@ var EventKindCategorySchema = _enum([
|
|
|
16035
16334
|
"audio",
|
|
16036
16335
|
"detection",
|
|
16037
16336
|
"sensor",
|
|
16337
|
+
"control",
|
|
16038
16338
|
"custom",
|
|
16039
16339
|
"package"
|
|
16040
16340
|
]);
|
|
16341
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
16342
|
+
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
16041
16343
|
var EventKindDescriptorSchema = object({
|
|
16042
|
-
/** Stable kind id (e.g. 'motion', '
|
|
16344
|
+
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
16043
16345
|
kind: string(),
|
|
16346
|
+
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
16347
|
+
labelKey: string(),
|
|
16348
|
+
/** English fallback label (kept for clients that don't translate). */
|
|
16044
16349
|
label: string(),
|
|
16045
16350
|
/** Hex color for timeline/legend rendering. */
|
|
16046
16351
|
color: string(),
|
|
16352
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
16353
|
+
iconId: string(),
|
|
16354
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
16047
16355
|
icon: EventKindIconSchema,
|
|
16048
16356
|
category: EventKindCategorySchema,
|
|
16357
|
+
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
16358
|
+
parentKind: string().nullable(),
|
|
16359
|
+
/** Derived from `parentKind`, explicit for the client tree. */
|
|
16360
|
+
level: EventKindLevelSchema,
|
|
16049
16361
|
/** Which cap + device contributes this kind. For built-ins the camera
|
|
16050
16362
|
* itself; for sensor kinds the LINKED source device. */
|
|
16051
16363
|
source: object({
|
|
@@ -16118,11 +16430,21 @@ var TrackAudioLabelSchema = object({
|
|
|
16118
16430
|
firstAt: number(),
|
|
16119
16431
|
lastAt: number()
|
|
16120
16432
|
});
|
|
16433
|
+
/**
|
|
16434
|
+
* How a track was produced. `pipeline` (default / absent) = the spatial
|
|
16435
|
+
* detection+tracking pipeline. `sensor` = a SYNTHETIC track projected from a
|
|
16436
|
+
* linked sensor/control state change (no positions; carries a snapshot). The
|
|
16437
|
+
* spatial subsystems (tracker association, occupancy count, re-id/embedding,
|
|
16438
|
+
* resurrection) MUST skip `sensor` tracks — they have no bbox trajectory.
|
|
16439
|
+
*/
|
|
16440
|
+
var TrackSourceSchema = _enum(["pipeline", "sensor"]);
|
|
16121
16441
|
var TrackSchema = object({
|
|
16122
16442
|
trackId: string(),
|
|
16123
16443
|
deviceId: number(),
|
|
16124
16444
|
className: string(),
|
|
16125
16445
|
label: string().optional(),
|
|
16446
|
+
/** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
|
|
16447
|
+
source: TrackSourceSchema.optional(),
|
|
16126
16448
|
firstSeen: number(),
|
|
16127
16449
|
lastSeen: number(),
|
|
16128
16450
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
@@ -16651,53 +16973,105 @@ var pipelineAnalyticsCapability = {
|
|
|
16651
16973
|
}
|
|
16652
16974
|
};
|
|
16653
16975
|
/**
|
|
16654
|
-
*
|
|
16655
|
-
*
|
|
16976
|
+
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
16977
|
+
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
16978
|
+
* caps into per-camera event-kind descriptors.
|
|
16979
|
+
*
|
|
16980
|
+
* The descriptor DATA (color / iconId / labelKey / parentKind / category)
|
|
16981
|
+
* is NOT duplicated here — every entry is derived from the single
|
|
16982
|
+
* `EVENT_TAXONOMY` dictionary (`catalogs/event-taxonomy.ts`). This file owns
|
|
16983
|
+
* ONLY the cap-name → taxonomy-kind mapping. Adding a new eventful sensor /
|
|
16984
|
+
* control cap means adding one line here (and a taxonomy entry); the anti-
|
|
16985
|
+
* drift guard `scripts/check-event-kind-coverage.ts` fails the build if an
|
|
16986
|
+
* eventful cap is missing.
|
|
16656
16987
|
*/
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
"
|
|
16694
|
-
|
|
16695
|
-
|
|
16696
|
-
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16988
|
+
/** Map a taxonomy `iconId` onto the legacy closed `EventKindIcon` enum. */
|
|
16989
|
+
var LEGACY_ICON = {
|
|
16990
|
+
motion: "motion",
|
|
16991
|
+
audio: "audio",
|
|
16992
|
+
person: "person",
|
|
16993
|
+
vehicle: "vehicle",
|
|
16994
|
+
animal: "animal",
|
|
16995
|
+
package: "package",
|
|
16996
|
+
door: "door",
|
|
16997
|
+
pir: "pir",
|
|
16998
|
+
smoke: "smoke",
|
|
16999
|
+
water: "water",
|
|
17000
|
+
button: "button",
|
|
17001
|
+
generic: "generic",
|
|
17002
|
+
gas: "smoke",
|
|
17003
|
+
vibration: "generic",
|
|
17004
|
+
tamper: "generic",
|
|
17005
|
+
presence: "person",
|
|
17006
|
+
lock: "generic",
|
|
17007
|
+
siren: "generic",
|
|
17008
|
+
switch: "generic",
|
|
17009
|
+
doorbell: "button"
|
|
17010
|
+
};
|
|
17011
|
+
function legacyIcon(iconId) {
|
|
17012
|
+
return LEGACY_ICON[iconId] ?? "generic";
|
|
17013
|
+
}
|
|
17014
|
+
/**
|
|
17015
|
+
* Cap name → taxonomy kind id. Covers EVERY eventful sensor / control cap.
|
|
17016
|
+
* The anti-drift guard cross-checks this against the eventful caps declared
|
|
17017
|
+
* in `packages/types/src/capabilities/*.cap.ts`.
|
|
17018
|
+
*/
|
|
17019
|
+
var CAP_TO_KIND = {
|
|
17020
|
+
contact: "contact",
|
|
17021
|
+
motion: "motion-sensor",
|
|
17022
|
+
smoke: "smoke",
|
|
17023
|
+
flood: "flood",
|
|
17024
|
+
gas: "gas",
|
|
17025
|
+
"carbon-monoxide": "carbon-monoxide",
|
|
17026
|
+
vibration: "vibration",
|
|
17027
|
+
tamper: "tamper",
|
|
17028
|
+
presence: "presence",
|
|
17029
|
+
"enum-sensor": "enum-sensor",
|
|
17030
|
+
"event-emitter": "device-event",
|
|
17031
|
+
"lock-control": "lock",
|
|
17032
|
+
switch: "switch",
|
|
17033
|
+
button: "button",
|
|
17034
|
+
doorbell: "doorbell"
|
|
16700
17035
|
};
|
|
17036
|
+
function buildDescriptor(capName, kind) {
|
|
17037
|
+
const t = EVENT_TAXONOMY[kind];
|
|
17038
|
+
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
17039
|
+
return {
|
|
17040
|
+
...t,
|
|
17041
|
+
icon: legacyIcon(t.iconId)
|
|
17042
|
+
};
|
|
17043
|
+
}
|
|
17044
|
+
/**
|
|
17045
|
+
* Sensor / control cap name → static event-kind descriptor. A linked device
|
|
17046
|
+
* contributes one entry per bound cap present in this map.
|
|
17047
|
+
*/
|
|
17048
|
+
var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
17049
|
+
/**
|
|
17050
|
+
* Build a full `EventKindDescriptor` for a taxonomy `kind`, stamping the
|
|
17051
|
+
* per-device `source`. Returns null when `kind` is not in the taxonomy.
|
|
17052
|
+
* This is THE bridge from the serializable taxonomy dictionary to the cap
|
|
17053
|
+
* wire shape — every event-kind descriptor the server emits goes through it,
|
|
17054
|
+
* so color/iconId/labelKey are never re-declared at a call site.
|
|
17055
|
+
*/
|
|
17056
|
+
function buildEventKindDescriptor(kind, source) {
|
|
17057
|
+
const t = EVENT_TAXONOMY[kind];
|
|
17058
|
+
if (t === void 0) return null;
|
|
17059
|
+
return {
|
|
17060
|
+
kind: t.kind,
|
|
17061
|
+
labelKey: t.labelKey,
|
|
17062
|
+
label: t.label,
|
|
17063
|
+
color: t.color,
|
|
17064
|
+
iconId: t.iconId,
|
|
17065
|
+
icon: legacyIcon(t.iconId),
|
|
17066
|
+
category: t.category,
|
|
17067
|
+
parentKind: t.parentKind,
|
|
17068
|
+
level: t.level,
|
|
17069
|
+
source: {
|
|
17070
|
+
capName: source.capName,
|
|
17071
|
+
deviceId: source.deviceId
|
|
17072
|
+
}
|
|
17073
|
+
};
|
|
17074
|
+
}
|
|
16701
17075
|
var CameraPipelineConfigSchema = object({
|
|
16702
17076
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
16703
17077
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -25264,6 +25638,12 @@ Object.defineProperty(exports, "BaseAddon", {
|
|
|
25264
25638
|
return BaseAddon;
|
|
25265
25639
|
}
|
|
25266
25640
|
});
|
|
25641
|
+
Object.defineProperty(exports, "DEFAULT_EVENT_COLOR", {
|
|
25642
|
+
enumerable: true,
|
|
25643
|
+
get: function() {
|
|
25644
|
+
return DEFAULT_EVENT_COLOR;
|
|
25645
|
+
}
|
|
25646
|
+
});
|
|
25267
25647
|
Object.defineProperty(exports, "DeviceType", {
|
|
25268
25648
|
enumerable: true,
|
|
25269
25649
|
get: function() {
|
|
@@ -25288,6 +25668,12 @@ Object.defineProperty(exports, "EventCategory", {
|
|
|
25288
25668
|
return EventCategory;
|
|
25289
25669
|
}
|
|
25290
25670
|
});
|
|
25671
|
+
Object.defineProperty(exports, "MACRO_LABELS", {
|
|
25672
|
+
enumerable: true,
|
|
25673
|
+
get: function() {
|
|
25674
|
+
return MACRO_LABELS;
|
|
25675
|
+
}
|
|
25676
|
+
});
|
|
25291
25677
|
Object.defineProperty(exports, "OpsLogEntrySchema", {
|
|
25292
25678
|
enumerable: true,
|
|
25293
25679
|
get: function() {
|
|
@@ -25324,6 +25710,12 @@ Object.defineProperty(exports, "boolean", {
|
|
|
25324
25710
|
return boolean;
|
|
25325
25711
|
}
|
|
25326
25712
|
});
|
|
25713
|
+
Object.defineProperty(exports, "buildEventKindDescriptor", {
|
|
25714
|
+
enumerable: true,
|
|
25715
|
+
get: function() {
|
|
25716
|
+
return buildEventKindDescriptor;
|
|
25717
|
+
}
|
|
25718
|
+
});
|
|
25327
25719
|
Object.defineProperty(exports, "cosineSimilarity", {
|
|
25328
25720
|
enumerable: true,
|
|
25329
25721
|
get: function() {
|
|
@@ -25402,6 +25794,12 @@ Object.defineProperty(exports, "string", {
|
|
|
25402
25794
|
return string;
|
|
25403
25795
|
}
|
|
25404
25796
|
});
|
|
25797
|
+
Object.defineProperty(exports, "subKindsOf", {
|
|
25798
|
+
enumerable: true,
|
|
25799
|
+
get: function() {
|
|
25800
|
+
return subKindsOf;
|
|
25801
|
+
}
|
|
25802
|
+
});
|
|
25405
25803
|
Object.defineProperty(exports, "videoclipsCapability", {
|
|
25406
25804
|
enumerable: true,
|
|
25407
25805
|
get: function() {
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-Bc4L7FGf.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_fs$1 = require_dist.__toESM(node_fs, 1);
|
|
8
8
|
node_fs = require_dist.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as BaseAddon, f as hfModelUrl, u as embeddingEncoderCapability } from "../dist-8DTQLWKO.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
|
|
2
2
|
import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
|
|
3
|
-
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
3
|
+
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DLzy78dH.mjs";
|
|
4
4
|
import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
|
|
5
5
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
6
6
|
var _ = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), v = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), y = (e) => {
|
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.1.
|
|
6
|
+
version: "1.1.30",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.1.
|
|
21
|
+
version: "1.1.51",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.1.
|
|
36
|
+
version: "1.1.42",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_pipeline_analytics_widgets",
|