@camstack/addon-post-analysis 1.2.617 → 1.2.619
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/THIRD_PARTY_MODELS.md +3 -1
- package/dist/{clip-model-registry-CYWuH4Rx.js → clip-model-registry-B4VtQ3mk.js} +232 -24
- package/dist/{clip-model-registry-D6yfX_Xq.mjs → clip-model-registry-Clb51mcj.mjs} +203 -19
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DiTZe8LM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BGo4IMTT.mjs} +3 -3
- package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CSQBGkvs.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BSMSev-b.mjs} +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-CssYIiFD.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-BXvwC4CQ.mjs → hostInit-p9APfKsm.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +146 -209
- package/dist/pipeline-analytics/index.mjs +146 -208
- 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-BB2kgLY1.mjs +0 -26
package/THIRD_PARTY_MODELS.md
CHANGED
|
@@ -32,6 +32,7 @@ under [Non-commercial models](#non-commercial-models).
|
|
|
32
32
|
|
|
33
33
|
- © Ultralytics, AGPL-3.0. Corresponding source: the upstream Ultralytics checkpoint and build-camstack-models.py (with convert_lib.py) published at https://huggingface.co/camstack/camstack-models/tree/main/source. https://github.com/ultralytics/ultralytics
|
|
34
34
|
- Coral Edge TPU models and AIY Vision Birds V1 © Google LLC, Apache-2.0. https://github.com/google-coral/test_data
|
|
35
|
+
- YOLOv9-s EdgeTPU weights © 2025 Dan Brown (fine-tuned to 17 COCO classes, INT8, compiled for the Edge TPU; https://github.com/dbro/frigate-detector-edgetpu-yolo9, repository MIT). Derived from the YOLOv9 code and yolov9-s checkpoint of Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao, GPL-3.0 (https://github.com/WongKinYiu/yolov9). Corresponding source: the fine-tuning checkpoint (yolov9-s-relu6-best.pt), the fine-tuning and conversion notebooks and the publisher LICENSE, mirrored at https://huggingface.co/camstack/camstack-models/tree/main/source/yolov9-edgetpu-dbro. https://github.com/dbro/frigate-detector-edgetpu-yolo9
|
|
35
36
|
- © Ultralytics, AGPL-3.0 (Ultralytics YOLOv9 weights). YOLOv9 architecture: Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao, GPL-3.0 (https://github.com/WongKinYiu/yolov9). Corresponding source: the upstream Ultralytics checkpoint and build-camstack-models.py (with convert_lib.py) published at https://huggingface.co/camstack/camstack-models/tree/main/source. https://github.com/ultralytics/ultralytics
|
|
36
37
|
- RF-DETR © Roboflow, Apache-2.0. https://github.com/roboflow/rf-detr
|
|
37
38
|
- YuNet weights Copyright (c) 2020 Shiqi Yu, MIT. Training code: ShiqiYu/libfacedetection.train, BSD-3-Clause. https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet
|
|
@@ -48,7 +49,7 @@ under [Non-commercial models](#non-commercial-models).
|
|
|
48
49
|
|
|
49
50
|
Training data under attribution terms:
|
|
50
51
|
|
|
51
|
-
- **COCO 2017** (training data of `yolo26n-seg` and
|
|
52
|
+
- **COCO 2017** (training data of `yolo26n-seg` and 52 more): annotations CC-BY-4.0; images under their Flickr owners' terms. https://cocodataset.org/#termsofuse
|
|
52
53
|
- **WIDER FACE** (training data of `yunet-2023mar`): research-oriented terms; images CC BY-NC-ND. http://shuoyang1213.me/WIDERFACE/
|
|
53
54
|
- **Open Images V7** (training data of `animal-classifier`): annotations CC-BY-4.0 (Google LLC); images listed as CC-BY-2.0, no warranty. https://storage.googleapis.com/openimages/web/factsfigures_v7.html
|
|
54
55
|
- **DrBimmer/vehicle-classification** (training data of `vehicle-type-v1`): CC-BY-NC-4.0 — treated as binding the trained weights (conservative reading). https://huggingface.co/datasets/DrBimmer/vehicle-classification
|
|
@@ -123,6 +124,7 @@ entry kept resolvable for a saved selection but no longer offered.
|
|
|
123
124
|
| `yolo26n-seg`, `yolo26s-seg`, `yolo26m-seg` | [Ultralytics](https://github.com/ultralytics/ultralytics) | AGPL-3.0 / AGPL-3.0 (`AGPL-3.0.txt`) | COCO 2017: annotations CC-BY-4.0; images under their Flickr owners' terms | exported to ONNX, OpenVINO IR and CoreML | mirror `segmentation/yolo26-seg` |
|
|
124
125
|
| `yolo26n` (default), `yolo26s`, `yolo26m`, `yolo26l`, `yolo26x` (hidden), `yolo26n-fp16` (hidden), `yolo26n-int8`, `yolo26s-fp16` (hidden), `yolo26s-int8`, `yolo26m-fp16` (hidden), `yolo26m-int8`, `yolo26l-fp16` (hidden), `yolo26l-int8`, `yolo26n-320`, `yolo26n-320-int8`, `yolo26n-256`, `yolo26n-256-int8`, `yolo26s-320`, `yolo26s-320-int8`, `yolo26s-256`, `yolo26s-256-int8`, `yolo26m-320`, `yolo26m-320-int8`, `yolo26m-256`, `yolo26m-256-int8`, `yolo26l-320`, `yolo26l-320-int8`, `yolo26l-256`, `yolo26l-256-int8`, `yolo26x-fp16` (hidden), `yolo26x-int8` (hidden) | [Ultralytics](https://github.com/ultralytics/ultralytics) | AGPL-3.0 / AGPL-3.0 (`AGPL-3.0.txt`) | COCO 2017: annotations CC-BY-4.0; images under their Flickr owners' terms | exported to ONNX, OpenVINO IR and CoreML (scripts/build-camstack-models.py); OpenVINO FP16 export; exported to OpenVINO IR, then OpenVINO NNCF INT8 post-training quantisation; re-exported at 320×320 to ONNX, OpenVINO IR and CoreML; re-exported at 320×320 to OpenVINO IR; OpenVINO NNCF INT8 post-training quantisation; re-exported at 256×256 to ONNX, OpenVINO IR and CoreML; re-exported at 256×256 to OpenVINO IR; OpenVINO NNCF INT8 post-training quantisation | mirror `objectDetection/yolo26` |
|
|
125
126
|
| `ssd-mobilenet-v2-coco-edgetpu` (default) | [Google Coral test_data](https://github.com/google-coral/test_data) | Apache-2.0 / Apache-2.0 (`Apache-2.0.txt`) | COCO 2017: annotations CC-BY-4.0; images under their Flickr owners' terms | none | https://github.com/google-coral/test_data |
|
|
127
|
+
| `yolov9s-320-edgetpu`, `yolov9s-512-edgetpu` | [YOLOv9-s EdgeTPU (Dan Brown)](https://github.com/dbro/frigate-detector-edgetpu-yolo9) | GPL-3.0 / GPL-3.0 (`GPL-3.0.txt`) | COCO 2017: annotations CC-BY-4.0; images under their Flickr owners' terms | none: the publisher release files are mirrored byte-identical | mirror `objectDetection/yolov9` |
|
|
126
128
|
| `yolov9t-320`, `yolov9t-320-int8`, `yolov9t-640`, `yolov9t-640-int8`, `yolov9s-320`, `yolov9s-320-int8`, `yolov9s-640`, `yolov9s-640-int8`, `yolov9m-320`, `yolov9m-320-int8`, `yolov9m-640`, `yolov9m-640-int8`, `yolov9c-320`, `yolov9c-320-int8`, `yolov9c-640`, `yolov9c-640-int8` | [Ultralytics](https://github.com/ultralytics/ultralytics) | AGPL-3.0 / AGPL-3.0 (`AGPL-3.0.txt`) | COCO 2017: annotations CC-BY-4.0; images under their Flickr owners' terms | exported at 320×320 to ONNX, OpenVINO IR FP16 and CoreML; exported at 320×320 to OpenVINO IR; OpenVINO NNCF INT8 post-training quantisation; exported at 640×640 to ONNX, OpenVINO IR FP16 and CoreML; exported at 640×640 to OpenVINO IR; OpenVINO NNCF INT8 post-training quantisation | mirror `objectDetection/yolov9` |
|
|
127
129
|
|
|
128
130
|
### Package detection
|
|
@@ -18349,15 +18349,6 @@ var StorageKindSchema = object({
|
|
|
18349
18349
|
declaration: RecordKindDeclarationSchema
|
|
18350
18350
|
});
|
|
18351
18351
|
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
18352
|
-
collection: string().min(1),
|
|
18353
|
-
expectRows: number().int().nonnegative()
|
|
18354
|
-
}), object({
|
|
18355
|
-
dropped: literal(true),
|
|
18356
|
-
rows: number().int().nonnegative()
|
|
18357
|
-
}), {
|
|
18358
|
-
kind: "mutation",
|
|
18359
|
-
auth: "admin"
|
|
18360
|
-
}), method(object({
|
|
18361
18352
|
owner: string().min(1).optional(),
|
|
18362
18353
|
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
18363
18354
|
counts: boolean().optional()
|
|
@@ -44924,6 +44915,15 @@ var NcMediaPolicySchema = object({
|
|
|
44924
44915
|
* Replaces `zoneCrop`.
|
|
44925
44916
|
*/
|
|
44926
44917
|
showTriggerZone: boolean().optional(),
|
|
44918
|
+
/**
|
|
44919
|
+
* Draw the SUBJECT'S PATH on the picture — a line in the subject's colour
|
|
44920
|
+
* through the track's positions up to the frame shown, the same path the
|
|
44921
|
+
* debug views draw (`buildSubjectPath`, D903). Every picture mode a subject
|
|
44922
|
+
* is drawn on: a `crop` maps the path into the crop and clips it. Valid only
|
|
44923
|
+
* on a rule whose subject is a tracked object (refused on a sound rule);
|
|
44924
|
+
* dropped on `image: 'none'`. Absent = off.
|
|
44925
|
+
*/
|
|
44926
|
+
showSubjectPath: boolean().optional(),
|
|
44927
44927
|
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
44928
44928
|
attach: _enum([
|
|
44929
44929
|
"best",
|
|
@@ -77621,12 +77621,6 @@ Object.freeze({
|
|
|
77621
77621
|
addonId: null,
|
|
77622
77622
|
access: "create"
|
|
77623
77623
|
},
|
|
77624
|
-
"storageAdmin.dropCollection": {
|
|
77625
|
-
capName: "storage-admin",
|
|
77626
|
-
capScope: "system",
|
|
77627
|
-
addonId: null,
|
|
77628
|
-
access: "delete"
|
|
77629
|
-
},
|
|
77630
77624
|
"storageAdmin.listKinds": {
|
|
77631
77625
|
capName: "storage-admin",
|
|
77632
77626
|
capScope: "system",
|
|
@@ -82687,22 +82681,35 @@ function resolveNcMediaImage(media, kind) {
|
|
|
82687
82681
|
}
|
|
82688
82682
|
/**
|
|
82689
82683
|
* The stored shape of a media policy: `image` set, the legacy triple gone.
|
|
82684
|
+
* `showSubjectPath` survives on a kind with a tracked subject and a picture.
|
|
82690
82685
|
* `showTriggerZone` survives only where it can be drawn — a zone trigger and a
|
|
82691
82686
|
* mode other than `crop`/`none`; a legacy `zoneCrop` on a zone rule becomes it.
|
|
82692
82687
|
* Every other field (gif, clip, rolls, speed, profile, linked cameras) is
|
|
82693
82688
|
* carried through untouched. Pure; never throws.
|
|
82694
82689
|
*/
|
|
82695
82690
|
function normalizeNcMediaPolicy(media, rule) {
|
|
82696
|
-
const
|
|
82697
|
-
const
|
|
82691
|
+
const kind = ruleKindOf(rule);
|
|
82692
|
+
const image = resolveNcMediaImage(media, kind);
|
|
82693
|
+
const { attach: _attach, frame: _frame, zoneCrop, showTriggerZone, showSubjectPath, image: _image, ...rest } = media;
|
|
82698
82694
|
const drawable = (showTriggerZone === true || media.image === void 0 && zoneCrop === true) && image !== "crop" && image !== "none" && ruleTriggerZoneIds(rule.conditions).length > 0;
|
|
82695
|
+
const pathDrawable = showSubjectPath === true && image !== "none" && subjectHasPath(kind);
|
|
82699
82696
|
return {
|
|
82700
82697
|
...rest,
|
|
82701
82698
|
image,
|
|
82702
|
-
...drawable ? { showTriggerZone: true } : {}
|
|
82699
|
+
...drawable ? { showTriggerZone: true } : {},
|
|
82700
|
+
...pathDrawable ? { showSubjectPath: true } : {}
|
|
82703
82701
|
};
|
|
82704
82702
|
}
|
|
82705
82703
|
/**
|
|
82704
|
+
* True when a rule of this kind has a TRACKED subject whose path can be drawn
|
|
82705
|
+
* (`showSubjectPath`): the kinds whose subject owns a region of the frame. A
|
|
82706
|
+
* sound owns none, and a kind that carries no media has no picture.
|
|
82707
|
+
*/
|
|
82708
|
+
function subjectHasPath(kind) {
|
|
82709
|
+
const spec = ruleKindSpec(kind);
|
|
82710
|
+
return spec.carriesMedia && spec.carriesSubjectCrop;
|
|
82711
|
+
}
|
|
82712
|
+
/**
|
|
82706
82713
|
* Why a media policy cannot be SAVED on this rule, or null. Server-side and
|
|
82707
82714
|
* editor alike: `showTriggerZone` on a rule whose trigger is not a zone, and a
|
|
82708
82715
|
* mode the rule's kind cannot honour.
|
|
@@ -82714,6 +82721,7 @@ function ncMediaPolicyError(media, rule) {
|
|
|
82714
82721
|
if (offered.length > 0 && !offered.includes(media.image)) return `media.image '${media.image}' is not available for a ${kind} rule (offered: ${offered.join(", ")})`;
|
|
82715
82722
|
}
|
|
82716
82723
|
if (media.showTriggerZone === true && ruleTriggerZoneIds(rule.conditions).length === 0) return "media.showTriggerZone needs a rule triggered by a zone (a zones condition or an occupancy zone)";
|
|
82724
|
+
if (media.showSubjectPath === true && !subjectHasPath(kind)) return `media.showSubjectPath needs a rule whose subject is a tracked object (not a ${kind} rule)`;
|
|
82717
82725
|
return null;
|
|
82718
82726
|
}
|
|
82719
82727
|
var WEEKDAY_TO_DAY = {
|
|
@@ -82796,6 +82804,182 @@ function isScheduleActive(schedule, atMs) {
|
|
|
82796
82804
|
}
|
|
82797
82805
|
return schedule.invert === true ? !inside : inside;
|
|
82798
82806
|
}
|
|
82807
|
+
var clamp01 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
|
|
82808
|
+
/** The sample of a normalised box: its centre, its extent. */
|
|
82809
|
+
function subjectPathSampleFromBox(bbox, timestamp) {
|
|
82810
|
+
return {
|
|
82811
|
+
x: bbox.x + bbox.w / 2,
|
|
82812
|
+
y: bbox.y + bbox.h / 2,
|
|
82813
|
+
w: bbox.w,
|
|
82814
|
+
h: bbox.h,
|
|
82815
|
+
...timestamp !== void 0 ? { timestamp } : {}
|
|
82816
|
+
};
|
|
82817
|
+
}
|
|
82818
|
+
function isPlaceholder(s) {
|
|
82819
|
+
return s.w !== void 0 && s.h !== void 0 && s.w >= .85 && s.h >= .85;
|
|
82820
|
+
}
|
|
82821
|
+
function downsample(xs, max) {
|
|
82822
|
+
if (xs.length <= max || max < 2) return xs;
|
|
82823
|
+
const step = (xs.length - 1) / (max - 1);
|
|
82824
|
+
const out = [];
|
|
82825
|
+
for (let i = 0; i < max - 1; i++) {
|
|
82826
|
+
const x = xs[Math.round(i * step)];
|
|
82827
|
+
if (x !== void 0) out.push(x);
|
|
82828
|
+
}
|
|
82829
|
+
const last = xs[xs.length - 1];
|
|
82830
|
+
if (last !== void 0) out.push(last);
|
|
82831
|
+
return out;
|
|
82832
|
+
}
|
|
82833
|
+
function isFiniteSample(s) {
|
|
82834
|
+
return Number.isFinite(s.x) && Number.isFinite(s.y);
|
|
82835
|
+
}
|
|
82836
|
+
/**
|
|
82837
|
+
* The path of one track from its samples (normalised, oldest → newest).
|
|
82838
|
+
* Pure; never throws; malformed samples are skipped.
|
|
82839
|
+
*/
|
|
82840
|
+
function buildSubjectPath(samples, opts) {
|
|
82841
|
+
const until = opts?.untilTimestamp;
|
|
82842
|
+
const nodes = [];
|
|
82843
|
+
let unlocalized = 0;
|
|
82844
|
+
let tail = null;
|
|
82845
|
+
for (let index = 0; index < samples.length; index++) {
|
|
82846
|
+
const s = samples[index];
|
|
82847
|
+
if (s === void 0 || !isFiniteSample(s)) continue;
|
|
82848
|
+
if (until !== void 0 && s.timestamp !== void 0 && s.timestamp > until) continue;
|
|
82849
|
+
if (isPlaceholder(s)) {
|
|
82850
|
+
unlocalized += 1;
|
|
82851
|
+
continue;
|
|
82852
|
+
}
|
|
82853
|
+
const ts = s.timestamp !== void 0 && Number.isFinite(s.timestamp) ? s.timestamp : index;
|
|
82854
|
+
const x = clamp01(s.x);
|
|
82855
|
+
const y = clamp01(s.y);
|
|
82856
|
+
const prev = nodes[nodes.length - 1];
|
|
82857
|
+
if (prev !== void 0 && Math.hypot(x - prev.x, y - prev.y) < .005) {
|
|
82858
|
+
nodes[nodes.length - 1] = {
|
|
82859
|
+
...prev,
|
|
82860
|
+
samples: prev.samples + 1,
|
|
82861
|
+
lastTs: Math.max(prev.lastTs, ts)
|
|
82862
|
+
};
|
|
82863
|
+
tail = {
|
|
82864
|
+
x,
|
|
82865
|
+
y,
|
|
82866
|
+
samples: 1,
|
|
82867
|
+
firstTs: ts,
|
|
82868
|
+
lastTs: ts
|
|
82869
|
+
};
|
|
82870
|
+
continue;
|
|
82871
|
+
}
|
|
82872
|
+
tail = null;
|
|
82873
|
+
nodes.push({
|
|
82874
|
+
x,
|
|
82875
|
+
y,
|
|
82876
|
+
samples: 1,
|
|
82877
|
+
firstTs: ts,
|
|
82878
|
+
lastTs: ts
|
|
82879
|
+
});
|
|
82880
|
+
}
|
|
82881
|
+
const end = nodes[nodes.length - 1];
|
|
82882
|
+
if (tail !== null && end !== void 0 && end.samples > 1 && (tail.x !== end.x || tail.y !== end.y)) {
|
|
82883
|
+
nodes[nodes.length - 1] = {
|
|
82884
|
+
...end,
|
|
82885
|
+
samples: end.samples - 1
|
|
82886
|
+
};
|
|
82887
|
+
nodes.push(tail);
|
|
82888
|
+
}
|
|
82889
|
+
return {
|
|
82890
|
+
nodes: downsample(nodes, opts?.maxPoints ?? 120),
|
|
82891
|
+
unlocalized
|
|
82892
|
+
};
|
|
82893
|
+
}
|
|
82894
|
+
/** True when the path has something to draw (two nodes or more). */
|
|
82895
|
+
function isDrawableSubjectPath(path) {
|
|
82896
|
+
return path.nodes.length >= 2;
|
|
82897
|
+
}
|
|
82898
|
+
function inside(p) {
|
|
82899
|
+
return p.x >= 0 && p.x <= 1 && p.y >= 0 && p.y <= 1;
|
|
82900
|
+
}
|
|
82901
|
+
/** Liang–Barsky: the part of segment a→b inside the unit square, or null. */
|
|
82902
|
+
function clipSegment(a, b) {
|
|
82903
|
+
const dx = b.x - a.x;
|
|
82904
|
+
const dy = b.y - a.y;
|
|
82905
|
+
let t0 = 0;
|
|
82906
|
+
let t1 = 1;
|
|
82907
|
+
const edges = [
|
|
82908
|
+
[-dx, a.x],
|
|
82909
|
+
[dx, 1 - a.x],
|
|
82910
|
+
[-dy, a.y],
|
|
82911
|
+
[dy, 1 - a.y]
|
|
82912
|
+
];
|
|
82913
|
+
for (const [p, q] of edges) {
|
|
82914
|
+
if (p === 0) {
|
|
82915
|
+
if (q < 0) return null;
|
|
82916
|
+
continue;
|
|
82917
|
+
}
|
|
82918
|
+
const r = q / p;
|
|
82919
|
+
if (p < 0) {
|
|
82920
|
+
if (r > t1) return null;
|
|
82921
|
+
if (r > t0) t0 = r;
|
|
82922
|
+
} else {
|
|
82923
|
+
if (r < t0) return null;
|
|
82924
|
+
if (r < t1) t1 = r;
|
|
82925
|
+
}
|
|
82926
|
+
}
|
|
82927
|
+
return [{
|
|
82928
|
+
x: a.x + t0 * dx,
|
|
82929
|
+
y: a.y + t0 * dy
|
|
82930
|
+
}, {
|
|
82931
|
+
x: a.x + t1 * dx,
|
|
82932
|
+
y: a.y + t1 * dy
|
|
82933
|
+
}];
|
|
82934
|
+
}
|
|
82935
|
+
function samePoint(a, b) {
|
|
82936
|
+
return Math.abs(a.x - b.x) < 1e-9 && Math.abs(a.y - b.y) < 1e-9;
|
|
82937
|
+
}
|
|
82938
|
+
/**
|
|
82939
|
+
* The path as seen through `view` — a normalised rectangle of the frame (the
|
|
82940
|
+
* whole frame `{0,0,1,1}`, or the rectangle a crop cut). Points are re-mapped
|
|
82941
|
+
* into the view's own 0..1 space and the line is CLIPPED to it: a path that
|
|
82942
|
+
* leaves the crop and comes back is two runs. Runs of fewer than two points
|
|
82943
|
+
* are dropped, so an empty result means "nothing to draw".
|
|
82944
|
+
*/
|
|
82945
|
+
function projectSubjectPath(points, view) {
|
|
82946
|
+
if (points.length < 2 || !(view.w > 0) || !(view.h > 0)) return [];
|
|
82947
|
+
const local = points.map((p) => ({
|
|
82948
|
+
x: (p.x - view.x) / view.w,
|
|
82949
|
+
y: (p.y - view.y) / view.h
|
|
82950
|
+
}));
|
|
82951
|
+
const runs = [];
|
|
82952
|
+
let run = [];
|
|
82953
|
+
for (let i = 1; i < local.length; i++) {
|
|
82954
|
+
const a = local[i - 1];
|
|
82955
|
+
const b = local[i];
|
|
82956
|
+
if (a === void 0 || b === void 0) continue;
|
|
82957
|
+
const seg = clipSegment(a, b);
|
|
82958
|
+
if (seg === null) {
|
|
82959
|
+
if (run.length >= 2) runs.push(run);
|
|
82960
|
+
run = [];
|
|
82961
|
+
continue;
|
|
82962
|
+
}
|
|
82963
|
+
const [from, to] = seg;
|
|
82964
|
+
const last = run[run.length - 1];
|
|
82965
|
+
if (last === void 0 || !samePoint(last, from)) {
|
|
82966
|
+
if (run.length >= 2) runs.push(run);
|
|
82967
|
+
run = [from];
|
|
82968
|
+
}
|
|
82969
|
+
run.push(to);
|
|
82970
|
+
if (!inside(b)) {
|
|
82971
|
+
if (run.length >= 2) runs.push(run);
|
|
82972
|
+
run = [];
|
|
82973
|
+
}
|
|
82974
|
+
}
|
|
82975
|
+
if (run.length >= 2) runs.push(run);
|
|
82976
|
+
return runs;
|
|
82977
|
+
}
|
|
82978
|
+
/** An SVG `points` attribute for a run in a `width` × `height` drawing ("x,y x,y …"). */
|
|
82979
|
+
function subjectPathSvgPoints(run, width, height) {
|
|
82980
|
+
const fmt = (v) => String(Math.round(v * 100) / 100);
|
|
82981
|
+
return run.map((p) => `${fmt(p.x * width)},${fmt(p.y * height)}`).join(" ");
|
|
82982
|
+
}
|
|
82799
82983
|
var ARMED_WORD_PREFIX = "armed_";
|
|
82800
82984
|
var ALARM_PANEL_CAP = "alarm-panel";
|
|
82801
82985
|
var ALARM_PANEL_TRIGGER_METHOD = "trigger";
|
|
@@ -87097,12 +87281,6 @@ Object.defineProperty(exports, "RebuildObjectEmbeddingsRefusalSchema", {
|
|
|
87097
87281
|
return RebuildObjectEmbeddingsRefusalSchema;
|
|
87098
87282
|
}
|
|
87099
87283
|
});
|
|
87100
|
-
Object.defineProperty(exports, "RecordsError", {
|
|
87101
|
-
enumerable: true,
|
|
87102
|
-
get: function() {
|
|
87103
|
-
return RecordsError;
|
|
87104
|
-
}
|
|
87105
|
-
});
|
|
87106
87284
|
Object.defineProperty(exports, "RetrainDismissedSchema", {
|
|
87107
87285
|
enumerable: true,
|
|
87108
87286
|
get: function() {
|
|
@@ -87391,6 +87569,12 @@ Object.defineProperty(exports, "buildEventKindDescriptor", {
|
|
|
87391
87569
|
return buildEventKindDescriptor;
|
|
87392
87570
|
}
|
|
87393
87571
|
});
|
|
87572
|
+
Object.defineProperty(exports, "buildSubjectPath", {
|
|
87573
|
+
enumerable: true,
|
|
87574
|
+
get: function() {
|
|
87575
|
+
return buildSubjectPath;
|
|
87576
|
+
}
|
|
87577
|
+
});
|
|
87394
87578
|
Object.defineProperty(exports, "buildViewerLink", {
|
|
87395
87579
|
enumerable: true,
|
|
87396
87580
|
get: function() {
|
|
@@ -87661,6 +87845,12 @@ Object.defineProperty(exports, "isDeviceScopedCap", {
|
|
|
87661
87845
|
return isDeviceScopedCap;
|
|
87662
87846
|
}
|
|
87663
87847
|
});
|
|
87848
|
+
Object.defineProperty(exports, "isDrawableSubjectPath", {
|
|
87849
|
+
enumerable: true,
|
|
87850
|
+
get: function() {
|
|
87851
|
+
return isDrawableSubjectPath;
|
|
87852
|
+
}
|
|
87853
|
+
});
|
|
87664
87854
|
Object.defineProperty(exports, "isEventKindLabelKey", {
|
|
87665
87855
|
enumerable: true,
|
|
87666
87856
|
get: function() {
|
|
@@ -87853,6 +88043,12 @@ Object.defineProperty(exports, "plateGalleryCapability", {
|
|
|
87853
88043
|
return plateGalleryCapability;
|
|
87854
88044
|
}
|
|
87855
88045
|
});
|
|
88046
|
+
Object.defineProperty(exports, "projectSubjectPath", {
|
|
88047
|
+
enumerable: true,
|
|
88048
|
+
get: function() {
|
|
88049
|
+
return projectSubjectPath;
|
|
88050
|
+
}
|
|
88051
|
+
});
|
|
87856
88052
|
Object.defineProperty(exports, "readClusterModelPinStrict", {
|
|
87857
88053
|
enumerable: true,
|
|
87858
88054
|
get: function() {
|
|
@@ -88033,6 +88229,18 @@ Object.defineProperty(exports, "subKindsOf", {
|
|
|
88033
88229
|
return subKindsOf;
|
|
88034
88230
|
}
|
|
88035
88231
|
});
|
|
88232
|
+
Object.defineProperty(exports, "subjectPathSampleFromBox", {
|
|
88233
|
+
enumerable: true,
|
|
88234
|
+
get: function() {
|
|
88235
|
+
return subjectPathSampleFromBox;
|
|
88236
|
+
}
|
|
88237
|
+
});
|
|
88238
|
+
Object.defineProperty(exports, "subjectPathSvgPoints", {
|
|
88239
|
+
enumerable: true,
|
|
88240
|
+
get: function() {
|
|
88241
|
+
return subjectPathSvgPoints;
|
|
88242
|
+
}
|
|
88243
|
+
});
|
|
88036
88244
|
Object.defineProperty(exports, "summarizeReview", {
|
|
88037
88245
|
enumerable: true,
|
|
88038
88246
|
get: function() {
|