@camstack/addon-pipeline 1.2.49 → 1.2.51
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/audio-analyzer/index.js +1 -1
- package/dist/audio-analyzer/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +2 -2
- package/dist/detection-pipeline/index.mjs +2 -2
- package/dist/{dist-J2DeRZAN.js → dist-BsBEe_rX.js} +67 -1
- package/dist/{dist-CLJKoYEP.mjs → dist-Dkvk5ykl.mjs} +62 -2
- package/dist/{event-loop-stall-monitor-B6dqQjiX.mjs → event-loop-stall-monitor-BvtjRcal.mjs} +1 -1
- package/dist/{event-loop-stall-monitor-Bkbiw20z.js → event-loop-stall-monitor-DqJXi0_B.js} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +127 -114
- package/dist/pipeline-runner/index.mjs +127 -114
- package/dist/recorder/index.js +91 -4
- package/dist/recorder/index.mjs +91 -4
- package/dist/session-decode/decode-worker-child.js +57 -13
- package/dist/session-decode/decode-worker-child.mjs +57 -13
- package/dist/stream-broker/_stub.js +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DZikMEgD.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CUZ0nS_r.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Mv3UeZUE.mjs +26 -0
- package/dist/stream-broker/{hostInit-i24FVz-3.mjs → hostInit-B8O23a6l.mjs} +2 -2
- package/dist/stream-broker/index.js +1 -1
- package/dist/stream-broker/index.mjs +1 -1
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-BxPNiino.mjs → worker-protocol-B0c3i2km.mjs} +1 -1
- package/dist/{worker-protocol-CNi5srgV.js → worker-protocol-CWhkLkHx.js} +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-m7YpaY98.js → MaskShapeCanvas-DI4BY7W2-kAtChdz2.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-619YTOjy.js → MotionZonesSettings-NcxxQN8r-DEwkvjzt.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-B-k8v0O5.js → PrivacyMaskSettings-APgPLF7p-Brv9VL0h.js} +1 -1
- package/embed-dist/assets/{index-CYO4OY8_.js → index-Dv7fSuDA.js} +12 -12
- package/embed-dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cj2xMupA.mjs +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as formatNativeLeaseKnobs, n as isWorkerRequest, o as resolveNativeLeaseKnobs, r as logLevelForLine } from "../worker-protocol-
|
|
1
|
+
import { i as formatNativeLeaseKnobs, n as isWorkerRequest, o as resolveNativeLeaseKnobs, r as logLevelForLine } from "../worker-protocol-B0c3i2km.mjs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -339,7 +339,7 @@ var LeaseActivityGate = class {
|
|
|
339
339
|
windowMs;
|
|
340
340
|
now;
|
|
341
341
|
armedUntil = 0;
|
|
342
|
-
|
|
342
|
+
disabledUntil = 0;
|
|
343
343
|
constructor(windowMs, now = Date.now) {
|
|
344
344
|
this.windowMs = windowMs;
|
|
345
345
|
this.now = now;
|
|
@@ -350,23 +350,44 @@ var LeaseActivityGate = class {
|
|
|
350
350
|
this.armedUntil = this.now() + this.windowMs;
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* Force the gate closed regardless of demand — for a
|
|
354
|
-
* PROVEN broken
|
|
355
|
-
* filtergraph per failing frame both leaks (node-av reclaims hw
|
|
356
|
-
* by process exit) and burns GPU churn, so a broken path
|
|
357
|
-
*
|
|
353
|
+
* Force the gate closed regardless of demand for `cooldownMs` — for a
|
|
354
|
+
* download path that has PROVEN broken (an add/receive failure). Rebuilding
|
|
355
|
+
* the vaapi filtergraph per failing frame both leaks (node-av reclaims hw
|
|
356
|
+
* pools only by process exit) and burns GPU churn, so a broken path must stay
|
|
357
|
+
* off. Overrides `windowMs: 0` too.
|
|
358
|
+
*
|
|
359
|
+
* ## Why this is a COOLDOWN and not a latch
|
|
360
|
+
*
|
|
361
|
+
* It was a latch (`disable()`), held until {@link reset} — i.e. until the next
|
|
362
|
+
* DIAL. On a continuously recording camera a dial lasts hours, so two EIO
|
|
363
|
+
* `hwdownload` failures killed the native lease for the whole session and
|
|
364
|
+
* every detail dispatch's rung-1 crop missed for as long as it ran. That is
|
|
365
|
+
* the 93-97% `nativeCropMisses` measured on 2026-08-08: dev 618 had 24 dials
|
|
366
|
+
* disabled in a single day, and dev 592 serviced ~15 crop requests/s for
|
|
367
|
+
* 500 s with a `leaseOffered` delta of exactly 0 — `arm()` firing constantly
|
|
368
|
+
* against a gate that could never reopen.
|
|
369
|
+
*
|
|
370
|
+
* The OOM guard the latch existed for is preserved by the cooldown's LENGTH,
|
|
371
|
+
* not by its permanence: one filtergraph rebuild per cooldown instead of one
|
|
372
|
+
* per frame. The caller escalates `cooldownMs` on repeated failures, so a
|
|
373
|
+
* genuinely broken dial converges on the old behaviour while a transient GPU
|
|
374
|
+
* fault recovers on its own.
|
|
375
|
+
*
|
|
376
|
+
* A later call always wins, even a shorter one: the caller escalates
|
|
377
|
+
* monotonically, and "the most recent failure decides" is the only rule that
|
|
378
|
+
* stays true if it ever stops.
|
|
358
379
|
*/
|
|
359
|
-
|
|
360
|
-
this.
|
|
380
|
+
disableFor(cooldownMs) {
|
|
381
|
+
this.disabledUntil = this.now() + cooldownMs;
|
|
361
382
|
}
|
|
362
|
-
/** New dial: clear the
|
|
383
|
+
/** New dial: clear the cooldown AND any stale demand (caller re-arms explicitly). */
|
|
363
384
|
reset() {
|
|
364
|
-
this.
|
|
385
|
+
this.disabledUntil = 0;
|
|
365
386
|
this.armedUntil = 0;
|
|
366
387
|
}
|
|
367
388
|
/** Whether lease capture should run for the current frame. */
|
|
368
389
|
get active() {
|
|
369
|
-
if (this.
|
|
390
|
+
if (this.now() < this.disabledUntil) return false;
|
|
370
391
|
if (this.windowMs === 0) return true;
|
|
371
392
|
return this.now() < this.armedUntil;
|
|
372
393
|
}
|
|
@@ -852,6 +873,25 @@ var NATIVE_LEASE_TTL_MS = NATIVE_LEASE_KNOBS.values.ttlMs;
|
|
|
852
873
|
*/
|
|
853
874
|
var NATIVE_LEASE_ACTIVITY_WINDOW_MS = NATIVE_LEASE_KNOBS.values.activityMs;
|
|
854
875
|
/**
|
|
876
|
+
* How long lease capture stays off after the download path proves broken, and
|
|
877
|
+
* the ceiling that backoff climbs to. Doubling from the base, so the Nth
|
|
878
|
+
* failure in a dial costs `base × 2^(N-2)` — 60 s, 120 s, 240 s … capped.
|
|
879
|
+
*
|
|
880
|
+
* These replace a latch that was held for the REST OF THE DIAL. On a
|
|
881
|
+
* continuously recording camera a dial is hours, and the 2026-08-08 harvest
|
|
882
|
+
* measured what that costs: dev 618 at 93% `nativeCropMisses` across 24
|
|
883
|
+
* disabled dials, dev 592 with a `leaseOffered` delta of 0 over 500 s while
|
|
884
|
+
* answering ~15 crop requests/s. Every one of those misses is a detail
|
|
885
|
+
* dispatch whose rung-1 native crop could never resolve.
|
|
886
|
+
*
|
|
887
|
+
* The bound that mattered is still bounded: the OOM the latch was written for
|
|
888
|
+
* came from rebuilding a vaapi filtergraph PER FAILING FRAME (~25/s), and one
|
|
889
|
+
* rebuild per cooldown is three orders of magnitude below that — while a
|
|
890
|
+
* transient GPU fault now recovers without waiting for a re-dial.
|
|
891
|
+
*/
|
|
892
|
+
var LEASE_DOWNLOAD_COOLDOWN_BASE_MS = 6e4;
|
|
893
|
+
var LEASE_DOWNLOAD_COOLDOWN_MAX_MS = 6e5;
|
|
894
|
+
/**
|
|
855
895
|
* `pinnedRgbCrop` — pinned-color RGB24 native-crop retention. DEFAULT **ON**
|
|
856
896
|
* (2026-07-20 rollout); set `CAMSTACK_SESSION_PINNED_RGB_CROP=0` to opt out.
|
|
857
897
|
*
|
|
@@ -1545,7 +1585,11 @@ var DecodeWorkerChild = class {
|
|
|
1545
1585
|
this.nativeLeaseDownloadFilter = null;
|
|
1546
1586
|
this.nativeLeaseDownloadFilterKey = "";
|
|
1547
1587
|
this.leaseDownloadFailuresThisDial++;
|
|
1548
|
-
if (this.leaseDownloadFailuresThisDial >= 2)
|
|
1588
|
+
if (this.leaseDownloadFailuresThisDial >= 2) {
|
|
1589
|
+
const cooldownMs = Math.min(LEASE_DOWNLOAD_COOLDOWN_MAX_MS, LEASE_DOWNLOAD_COOLDOWN_BASE_MS * 2 ** (this.leaseDownloadFailuresThisDial - 2));
|
|
1590
|
+
this.leaseGate.disableFor(cooldownMs);
|
|
1591
|
+
this.emitStderr(`decode-worker-child: native lease capture OFF for ${cooldownMs}ms — ${this.leaseDownloadFailuresThisDial} download failures this dial; native crops will MISS until it expires (detail dispatches fall back to the retained full frame)\n`);
|
|
1592
|
+
}
|
|
1549
1593
|
return null;
|
|
1550
1594
|
}
|
|
1551
1595
|
}
|
|
@@ -2,7 +2,7 @@ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as
|
|
|
2
2
|
import { a as d, i as f, n as p, o as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
3
|
import { n as _, r as v, t as y } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
4
|
import { n as b, t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
5
|
-
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
5
|
+
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Mv3UeZUE.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7
7
|
var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), T = (e) => {
|
|
8
8
|
let t = w(e);
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.50",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_stream_broker_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.36",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region \0virtual:mf:__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js
|
|
2
|
+
var e = "__mf_init__virtual:mf:__mfe_internal__addon_stream_broker_widgets__mf_v__runtimeInit__mf_v__.js__", t = globalThis[e];
|
|
3
|
+
if (!t) {
|
|
4
|
+
let n, r, i = new Promise((e, t) => {
|
|
5
|
+
n = e, r = t;
|
|
6
|
+
});
|
|
7
|
+
t = globalThis[e] = {
|
|
8
|
+
initPromise: i,
|
|
9
|
+
initResolve: n,
|
|
10
|
+
initReject: r
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var n = t.initPromise, r = "__mf_module_cache__";
|
|
14
|
+
globalThis[r] ||= {
|
|
15
|
+
share: {},
|
|
16
|
+
remote: {}
|
|
17
|
+
}, globalThis[r].share ||= {}, globalThis[r].remote ||= {};
|
|
18
|
+
var i = globalThis[r], a, o = (e) => {
|
|
19
|
+
e.ACCESSORY_LABEL, e.ALEXA_EGRESS_PROFILE, e.ALL_CAPABILITY_DEFINITIONS, e.APPLE_SA_TO_MACRO, e.AUDIO_ANALYSIS_CAP_NAME, e.AUDIO_BACKEND_CHOICES, e.AUDIO_MACRO_LABELS, e.AUDIO_PRESETS, e.AccessoriesStatusSchema, e.AccessoryKind, e.AddBrokerInputSchema, e.AddonAutoUpdateSchema, e.AddonListItemSchema, e.AddonPageDeclarationSchema, e.AddonPageInfoSchema, e.AdoptionAdoptInputSchema, e.AdoptionAdoptResultSchema, e.AdoptionFilterSchema, e.AdoptionGetCandidateInputSchema, e.AdoptionListCandidatesInputSchema, e.AdoptionListCandidatesOutputSchema, e.AdoptionReleaseInputSchema, e.AdoptionStatusSchema, e.AgentLoadSummarySchema, e.AirQualitySensorStatusSchema, e.AlarmArmModeSchema, e.AlarmPanelStatusSchema, e.AlarmStateSchema, e.AlertSchema, e.AlertSeveritySchema, e.AlertSourceSchema, e.AlertStatusSchema, e.AmbientLightSensorStatusSchema, e.ApiKeyRecordSchema, e.ApiKeySummarySchema, e.ArchiveEntrySchema, e.ArchiveManifestSchema, e.AttachmentMediaTypeSchema, e.AttachmentSchema, e.AudioAnalysisResultSchema, e.AudioAnalysisSettingsSchema, e.AudioChunkInputSchema, e.AudioClassSummarySchema, e.AudioClassificationLabelSchema, e.AudioClassificationResultSchema, e.AudioCodecInfoSchema, e.AudioDecodeSessionConfigSchema, e.AudioEncodeSchema, e.AudioEncodeSessionConfigSchema, e.AudioEncodedChunkSchema, e.AudioEventSchema, e.AudioLevelSchema, e.AudioMetricsHistoryPointSchema, e.AudioMetricsHistorySchema, e.AudioMetricsSnapshotSchema, e.AudioPcmChunkSchema, e.AuthResultSchema, e.AutoUpdateSettingsSchema, e.AutomationControlStatusSchema, e.AvailableIntegrationTypeSchema, e.BACKEND_TO_FORMAT, e.BASE_LIVE_EGRESS_PROFILE, e.BATTERY_DEVICE_PROFILE, e.BacklightModeSchema, e.BackupDestinationInfoSchema, e.BackupEntrySchema, e.BaseAddon, e.BaseDevice, e.BaseDeviceProvider, e.BatteryStatusSchema, e.BinaryStatusSchema, e.BoundingBoxSchema, e.BrightnessStatusSchema, e.BrokerAddInputSchema, e.BrokerAudioClientSchema, e.BrokerClientsSchema, e.BrokerConnectionDetailsSchema, e.BrokerConsumerAttributionSchema, e.BrokerConsumerKindSchema, e.BrokerDecodedClientSchema, e.BrokerEncodedClientSchema, e.BrokerGetStateInputSchema, e.BrokerInfoSchema, e.BrokerProviderInfoSchema, e.BrokerPublishInputSchema, e.BrokerRegistryStatusSchema, e.BrokerRtspClientSchema, e.BrokerStatsSchema, e.BrokerStatusEnum, e.BrokerStatusSchema, e.BrokerSubscribeInputSchema, e.BrokerSubscribeResultSchema, e.BrokerTestConnectionResultSchema, e.BrokerUnsubscribeInputSchema, e.CAMERA_SWITCH_CATALOG, e.CAMERA_SWITCH_ORDER, e.CAM_PROFILE_ORDER, e.CAPABILITY_NAMES, e.CAPABILITY_ROUTER_KEYS, e.CAP_NAMES_WITH_STATUS, e.CAP_NODE_PIN_CONTEXT_KEY, e.CAP_PROVIDER_KIND_MAP, e.COCO_80_LABELS, e.COCO_TO_MACRO, e.CORE_BLOCK_ADDON_PREFIX, e.CamProfileSchema, e.CamStreamDescriptorSchema, e.CamStreamKindSchema, e.CamStreamResolutionSchema, e.CameraAssignmentStatusSchema, e.CameraAudioStatusSchema, e.CameraBrokerProfileSchema, e.CameraBrokerStatusSchema, e.CameraCredentialsSchema, e.CameraCredentialsStatusSchema, e.CameraDecoderShmSchema, e.CameraDecoderStatusSchema, e.CameraDetectionPhaseSchema, e.CameraDetectionProvisioningSchema, e.CameraDetectionProvisioningStateSchema, e.CameraDetectionStatusSchema, e.CameraMetricsSchema, e.CameraMetricsWithDeviceIdSchema, e.CameraMotionStatusSchema, e.CameraRecordingModeSchema, e.CameraRecordingStatusSchema, e.CameraSourceStatusSchema, e.CameraSourceStreamSchema, e.CameraStatusDegradationReasonSchema, e.CameraStatusDegradationSchema, e.CameraStatusSchema, e.CameraStatusStageSchema, e.CameraStreamSchema, e.CameraSwitchAuthoritySchema, e.CameraSwitchGroupSchema, e.CameraSwitchIdSchema, e.CameraSwitchSchema, e.CameraSwitchUnavailableReasonSchema, e.CandidateQueryFilterSchema, e.CapScopeSchema, e.CapabilityBindingsSchema, e.CarbonMonoxideStatusSchema, e.ChargingStatus, e.ClientNetworkStatsSchema, e.ClimateControlStatusSchema, e.ClipPlaybackSchema, e.ClipSchema, e.ClusterAddonNodeDeploymentSchema, e.ClusterAddonStatusEntrySchema, e.CollectionColumnSchema, e.CollectionIndexSchema, e.ColorStatusSchema, e.ConfigEntrySchema, e.ConfigSectionWithValuesSchema, e.ConfigTabDeclarationSchema, e.ConnectivityStatusSchema, e.ConsumableItemSchema, e.ConsumablesStatusSchema, e.ContactStatusSchema, e.ControlKindSchema, e.ControlStatusSchema, e.ConvertArtifactSchema, e.ConvertResultSchema, e.ConvertTargetSchema, e.CoreBlockCompileResultSchema, e.CoreBlockInputSchema, e.CoreBlockPlacementSchema, e.CoreBlockSchema, e.CoreBlockStatusSchema, e.CoverStateSchema, e.CoverStatusSchema, e.CreateApiKeyInputSchema, e.CreateApiKeyResultSchema, e.CreateIntegrationInputSchema, e.CreateScopedTokenInputSchema, e.CreateScopedTokenResultSchema, e.CreateUserInputSchema, e.CustomActionInputSchema, e.CustomModelDescriptorSchema, e.DATAPLANE_SECRET_HEADER, e.DECLARED_DEVICE_SWEEP_LIMIT, e.DECLARED_INTEGRATION_FIXED_KEY, e.DEFAULT_ADDON_PLACEMENT, e.DEFAULT_AUDIO_ANALYZER_CONFIG, e.DEFAULT_DECODER_HWACCEL_CONFIG, e.DEFAULT_DETAIL_CROP_CONVENTION, e.DEFAULT_EVENTS_BAND_BUFFER_SEC, e.DEFAULT_EVENT_COLOR, e.DEFAULT_FEATURES, e.DEFAULT_NATIVE_LEASE_SETTINGS, e.DEFAULT_RETENTION, e.DEFAULT_SCRUB_THUMBNAIL_PRESET, e.DETAIL_CROP_PADDING_FIELD, e.DETAIL_CROP_PADDING_KEY, e.DETAIL_CROP_SECTION_ID, e.DETAIL_CROP_SQUARE_KEY, e.DETECTION_PIPELINE_CAP_NAME, e.DEVICE_BACKEND_TO_FORMAT, e.DEVICE_CAP_NAMES, e.DEVICE_PROFILES, e.DEVICE_SCOPED_CAPS, e.DEVICE_SETTINGS_CONTRIBUTION_METHODS, e.DEVICE_STATE_READERS, e.DEVICE_STATUS_METHOD, e.DEVICE_TYPE_CONTROL_KIND, e.DEVICE_TYPE_INFO, e.DataStoreEngineInfoSchema, e.DayNightModeSchema, e.DayNightOptionsSchema, e.DayNightSettingsPatchSchema, e.DayNightStatusSchema, e.DeclaredDevices, e.DecodedAudioChunkSchema, e.DecodedFrameSchema, e.DecoderSessionConfigSchema, e.DecoderStatsSchema, e.DeleteIntegrationResultSchema, e.DetailCropConventionSchema, e.DetectionSourceSchema, e.DeviceCodeSeveritySchema, e.DeviceConfig, e.DeviceDiscoveryStatusSchema, e.DeviceExportExposeInputSchema, e.DeviceExportStatusSchema, e.DeviceExportUnexposeInputSchema, e.DeviceFeature, e.DeviceInfoSchema, e.DeviceNetworkStatsSchema, e.DeviceRole, e.DeviceRuntimeState, e.DeviceStatusSchema, e.DeviceType, e.DiscoveredChildDeviceSchema, e.DiscoveredChildStatusSchema, e.DiscoveredDeviceSchema, e.DiscoveredTargetSchema, e.DisposerChain, e.DoorbellPressEventSchema, e.DoorbellStatusSchema, e.EVENTFUL_CAP_NAMES, e.EVENT_KIND_BY_CAP, e.EVENT_PAD_MS, e.EVENT_TAXONOMY, e.EXPRESSION_BUILTINS, e.EXPRESSION_BUILTIN_NAMES, e.EXPRESSION_COMPILE_CACHE_CAPACITY, e.EXPRESSION_IDENTIFIER_RE, e.EXPRESSION_INJECTED_NOW, e.EgressEncodeSchema, e.EgressRateControlSchema, e.EgressTranscodeRequestSchema, e.EgressTranscodeSchema, e.ElementConfigStore, e.EmbeddingInfoSchema, e.EmbeddingResultSchema, e.EncodeProfileSchema, e.EncodedPacketSchema, e.EnrichedWidgetMetadataSchema, e.EnumSensorDateTimeFormatSchema, e.EnumSensorStatusSchema, e.EventCategory, e.EventEmitterStatusSchema, e.EventFireSchema, e.EventItemSchema, e.EventKindCategorySchema, e.EventKindDescriptorSchema, e.EventKindIconSchema, e.EventKindSchema, e.EventKindsForDeviceSchema, e.EventMediaArtifactSchema, e.EventMediaCoverageSchema, e.EventMediaKindSchema, e.EventMediaProductionSchema, e.EventSourceType, e.ExportDownloadSchema, e.ExportOptionsSchema, e.ExportRecordSchema, e.ExportSetupFieldSchema, e.ExportSetupSchema, e.ExportSpeedSchema, e.ExportStateSchema, e.ExportTimelapseSchema, e.ExposedDeviceSchema, e.ExposureModeSchema, e.ExpressionBindingSourceSchema, e.ExpressionEvalError, e.ExpressionFieldBindingSchema, e.ExpressionGlobalBindingSchema, e.ExpressionLiteralBindingSchema, e.ExpressionParseError, e.ExpressionSourceSchema, e.FanControlStatusSchema, e.FanDirectionSchema, e.FeatureManifestSchema, e.FeatureProbeStatusSchema, e.FloodStatusSchema, e.Fmp4BoxSplitter, e.FrameHandleFormatSchema, e.FrameHandleSchema, e.FrameInputSchema, e.GasStatusSchema, e.GetStreamWithCodecInputSchema, e.GlobalMetricsSchema, e.HAP_AUDIO_BASE, e.HAP_AUDIO_BITRATE_KBPS, e.HAP_AUDIO_VBV_KBITS, e.HAP_KEYFRAME_INTERVAL_SEC, e.HF_BASE_URL, e.HF_REPO, e.HWACCEL_OPTIONS, e.HealthStatusSchema, e.HistoryPointSchema, e.HistoryResolutionEnum, e.HumidifierStatusSchema, e.HumiditySensorStatusSchema, e.HvacModeSchema, e.ImageContractSchema, e.ImageContractStateSchema, e.ImageRotateSchema, e.ImageSettingsOptionsSchema, e.ImageSettingsPatchSchema, e.ImageSettingsStatusSchema, e.ImageStatusSchema, e.IngestOwnerSchema, e.InstalledPackageSchema, e.IntegrationLiteSchema, e.IntegrationWithStateSchema, e.IntercomAbilitySchema, e.IntercomStatusSchema, e.KNOWN_CAP_NAMES, e.KeyEventSchema, e.LOG_LEVEL_RANK, e.LabelAttributionSchema, e.LabelDefinitionSchema, e.LabelTierSchema, e.LawnMowerActivitySchema, e.LawnMowerControlStatusSchema, e.LinkedDeviceSchema, e.LinkedDevicesModeSchema, e.LlmDefaultSchema, e.LlmDefaultSelectorSchema, e.LlmErrorCodeSchema, e.LlmGenerateBaseInputSchema, e.LlmGenerateErrSchema, e.LlmGenerateOkSchema, e.LlmGenerateResultSchema, e.LlmImageSchema, e.LlmNodeModelSchema, e.LlmProfileKindDescriptorSchema, e.LlmProfileKindSchema, e.LlmProfileSchema, e.LlmRuntimeCompleteInputSchema, e.LlmRuntimeDiskUsageSchema, e.LlmRuntimeNodeSchema, e.LlmRuntimeStatusSchema, e.LlmUsageRollupSchema, e.LlmUsageSchema, e.LocateSegmentResultSchema, e.LocationStatSchema, e.LockControlStatusSchema, e.LockStateSchema, e.LogEntrySchema, e.LogLevelSchema, e.LogStreamEntrySchema, e.LoginMethodContributionSchema, e.LoginStageEnum, e.MACRO_LABELS, e.MAX_EXPRESSION_AST_NODES, e.MAX_EXPRESSION_BINDINGS, e.MAX_EXPRESSION_CALL_ARGS, e.MAX_EXPRESSION_EVAL_STEPS, e.MAX_EXPRESSION_SOURCE_LENGTH, e.METHOD_ACCESS_MAP, e.MODEL_FORMATS, e.MOTION_TRIGGER_FEATURE, e.ManagedModelCatalogEntrySchema, e.ManagedModelRefSchema, e.ManagedRuntimeConfigSchema, e.MaskGridDimsSchema, e.MaskGridShapeSchema, e.MaskLineShapeSchema, e.MaskPointSchema, e.MaskPolygonShapeSchema, e.MaskPolygonVerticesSchema, e.MaskRectShapeSchema, e.MaskShapeKindSchema, e.MaskShapeSchema, e.MediaFileInfoSchema, e.MediaFileSchema, e.MediaPlayerRepeatSchema, e.MediaPlayerStateSchema, e.MediaPlayerStatusSchema, e.MeshPeerSchema, e.MeshStatusSchema, e.MethodAccessSchema, e.ModelCatalogEntrySchema, e.ModelConvertInputSchema, e.ModelConvertMetadataSchema, e.ModelDistributeInputSchema, e.ModelDistributeResultSchema, e.ModelExtraFileSchema, e.ModelFormatEntrySchema, e.ModelFormatsSchema, e.ModelSubstitutionSchema, e.ModelVariantGroupSchema, e.MotionAnalysisResultSchema, e.MotionEventSchema, e.MotionOnMotionChangedDataSchema, e.MotionRegionSchema, e.MotionSourceEnum, e.MotionSourcesSchema, e.MotionStatusSchema, e.MotionTriggerRuntimeStateSchema, e.MotionTriggerStatusSchema, e.MotionZoneOptionsSchema, e.MotionZonePatchSchema, e.MotionZoneRegionSchema, e.MotionZoneStatusSchema, e.MqttBrokerStatusSchema, e.MutationFilterSchema, e.NATIVE_LEASE_ACTIVITY_FIELD, e.NATIVE_LEASE_ACTIVITY_KEY, e.NATIVE_LEASE_ADMISSION_FIELD, e.NATIVE_LEASE_ADMISSION_KEY, e.NATIVE_LEASE_BUDGET_FIELD, e.NATIVE_LEASE_BUDGET_KEY, e.NATIVE_LEASE_SECTION_ID, e.NATIVE_LEASE_TTL_FIELD, e.NATIVE_LEASE_TTL_KEY, e.NC_BASE_CONDITION_KEYS, e.NC_CONDITION_CATALOG, e.NC_HISTORY_LIMIT_DEFAULT, e.NC_HISTORY_LIMIT_MAX, e.NC_MAX_PER_TRACK_IMMEDIATE, e.NC_SNOOZE_MAX_MINUTES, e.NC_TAXONOMY, e.NativeCropBboxSchema, e.NativeCropRefSchema, e.NativeCropResultSchema, e.NativeDetectionSchema, e.NativeLeaseAdmissionSchema, e.NativeLeaseSettingsSchema, e.NativeObjectClassEnum, e.NativeObjectDetectionRuntimeStateSchema, e.NativeObjectDetectionStatusSchema, e.NcAlarmConfigSchema, e.NcAlarmModeCoverageSchema, e.NcAlarmSettingsPatchSchema, e.NcAlarmSettingsSchema, e.NcConditionDescriptorSchema, e.NcConditionsSchema, e.NcCrossingSchema, e.NcDeliverySchema, e.NcDeviceStateConditionSchema, e.NcHistoryEntrySchema, e.NcHistoryFilterSchema, e.NcHistoryRecordKindSchema, e.NcHistoryStatusSchema, e.NcHistorySubjectSchema, e.NcMediaFrameSchema, e.NcMediaPolicySchema, e.NcOccupancyConditionSchema, e.NcPlateMatcherSchema, e.NcRuleActionSchema, e.NcRuleActionSequenceSchema, e.NcRuleActionsSchema, e.NcRuleInputSchema, e.NcRuleNotificationButtonSchema, e.NcRulePatchSchema, e.NcRuleSchema, e.NcRuleTargetSchema, e.NcScheduleSchema, e.NcScheduleWindowSchema, e.NcSnoozeInputSchema, e.NcSnoozeSchema, e.NcSnoozeScopeSchema, e.NcSnoozeSuppressedSchema, e.NcTaxonomyEntrySchema, e.NcTaxonomySchema, e.NcTestResultSchema, e.NcThrottleGranularitySchema, e.NcThrottleSchema, e.NcZoneConditionSchema, e.NetworkAccessStatusSchema, e.NetworkAddressSchema, e.NetworkEndpointSchema, e.NotificationActionIconSchema, e.NotificationActionSchema, e.NotificationFormatSchema, e.NotificationSchema, e.NotifierStatusSchema, e.NumericSensorStatusSchema, e.OPS_LOG_DEFAULT_LIMIT, e.OPS_LOG_RING_DEFAULT_MAX, e.OauthIntegrationDescriptorSchema, e.ObjectEventSchema, e.OpsLogDomainSchema, e.OpsLogEntrySchema, e.OpsLogOpSchema, e.OpsLogQueryInputSchema, e.OpsLogReasonSchema, e.OrchestratorMetricsSchema, e.OsdOverlayKindEnum, e.OsdOverlayPatchSchema, e.OsdOverlaySchema, e.OsdPositionEnum, e.OsdRenderOutcomeEnum, e.OsdRenderResultSchema, e.OsdSlotBindingSchema, e.OsdSlotViewSchema, e.OsdSourceOptionSchema, e.OsdSourceSchema, e.OsdSourceValueTypeEnum, e.OsdStatusSchema, e.PET_FEEDER_MANUAL_FEED_MAX, e.PET_FEEDER_MANUAL_FEED_MIN, e.PIPELINE_FLOW_CAPABILITY_NAMES, e.PIPELINE_OWNER_CAPABILITY_NAMES, e.PRIVACY_MASK_CAP_NAME, e.PROVIDER_KIND_CAP_NAMES, e.PYTHON_SCRIPT, e.PackageUpdateSchema, e.PackageVersionInfoSchema, e.PasskeyLoginMethodSchema, e.PasskeySummarySchema, e.PcmSampleFormatSchema, e.PerScopeBreakdownSchema, e.PetFeederStatusSchema, e.PickStreamPreferencesSchema, e.PickStreamRequirementsSchema, e.PickedCamStreamSchema, e.PipelineAssignmentSchema, e.PipelineDefaultStepSchema, e.PipelineEngineChoiceSchema, e.PipelineRunResultBridge, e.PipelineStepInputSchema, e.PipelineValidationIssueSchema, e.PipelineValidationResultSchema, e.PlaceholderReasonSchema, e.PolygonPointSchema, e.PowerMeterStatusSchema, e.PresenceStatusSchema, e.PressureSensorStatusSchema, e.PrivacyMaskOptionsSchema, e.PrivacyMaskPatchSchema, e.PrivacyMaskRegionSchema, e.PrivacyMaskShapeSchema, e.PrivacyMaskStatusSchema, e.ProfileRtspEntrySchema, e.ProfileSlotSchema, e.ProfileSlotStatusSchema, e.ProviderStatusSchema, e.PtzAutotrackRuntimeStateSchema, e.PtzAutotrackSettingsSchema, e.PtzAutotrackStatusSchema, e.PtzAutotrackTargetOptionSchema, e.PtzMoveCommandSchema, e.PtzOptionsSchema, e.PtzPositionSchema, e.PtzPresetSchema, e.PtzStatusSchema, e.QueryFilterSchema, e.RATE_CONTROL_RELAXED, e.RATE_CONTROL_TIGHT, e.REACHABILITY_FAILURES_TO_OFFLINE, e.REACHABILITY_POLL_INTERVAL_MS, e.REACHABILITY_PROBE_TIMEOUT_MS, e.RECOGNITION_TYPES, e.RESERVED_BINDING_NAMES, e.RUNTIME_DEFAULTS, e.RUNTIME_TO_FORMAT, e.RawStateResultSchema, e.ReadGopBytesResultSchema, e.ReadSegmentBytesResultSchema, e.ReadinessRegistry, e.ReadinessTimeoutError, e.RecentTracksPageSchema, e.RecentTracksQueryInput, e.RecordingAvailabilitySchema, e.RecordingBandModeSchema, e.RecordingBandSchema, e.RecordingBandTriggersSchema, e.RecordingConfigSchema, e.RecordingDaysSchema, e.RecordingDeviceUsageSchema, e.RecordingLocationUsageSchema, e.RecordingManifestSchema, e.RecordingRangeSchema, e.RecordingRetentionSchema, e.RecordingStatusSchema, e.RecordingStorageModeSchema, e.RecordingStorageUsageSchema, e.RecordingTriggersSchema, e.RecordingWeekdaySchema, e.RedirectLoginMethodSchema, e.RelocateFootageInputSchema, e.RelocateJobSchema, e.RelocateJobStateSchema, e.RelocateMediaInputSchema, e.RenderedAsSchema, e.ReportMotionInputSchema, e.RetrainAnnotationDraftSchema, e.RetrainAnnotationKindSchema, e.RetrainAnnotationSchema, e.RetrainAnnotationSourceSchema, e.RetrainAssistResultSchema, e.RetrainAssistSubjectSchema, e.RetrainCopyRefusalSchema, e.RetrainFrameCandidateSchema, e.RetrainFrameListSchema, e.RetrainFrameSchema, e.RetrainFrameSelectionSchema, e.RetrainMacroClassSchema, e.RetrainStatusSchema, e.RetrainTrackSchema, e.RetrainTransitionResultSchema, e.RingBuffer, e.RtpSourceSchema, e.RtspRestreamEntrySchema, e.RunnerCameraConfigSchema, e.RunnerCameraDeviceUIFields, e.RunnerFrameSourceSchema, e.RunnerInferenceDeviceSchema, e.RunnerLocalLoadSchema, e.RunnerLocalMetricsSchema, e.SCOPE_PRESETS, e.SCRUB_THUMBNAIL_PRESETS, e.SCRUB_THUMBNAIL_PRESET_LABELS, e.SCRUB_THUMBNAIL_PRESET_ORDER, e.SENSOR_FEATURES, e.SENSOR_MAP, e.SOURCE_INFO_METADATA_KEY, e.STREAM_PROFILE_META, e.STREAM_QUALITY_LABELS, e.SUB_DETECTION_TYPES, e.SYSTEM_CAP_NAMES, e.SceneCheckSchema, e.SceneConditionSchema, e.SceneMonitorSchema, e.SceneMonitorStateSchema, e.SceneMonitorStatusSchema, e.SceneReferenceSchema, e.ScopedTokenSchema, e.ScopedTokenSummarySchema, e.ScoredObjectEventSchema, e.ScriptRunnerStatusSchema, e.ScrubThumbnailPresetSchema, e.SearchResultSchema, e.SendEmailInputSchema, e.SendEmailResultSchema, e.SendResultSchema, e.SensorEventSchema, e.ServerBootModeSchema, e.ServerPackageStatusSchema, e.ServerRollbackInfoSchema, e.ServerUpdateActionResultSchema, e.ServerUpdateCheckResultSchema, e.ServerUpdateStateSchema, e.SettingsPatchSchema, e.SettingsRecordSchema, e.SettingsSchemaWithValuesSchema, e.SettingsUpdateResultSchema, e.ShmRingStatsSchema, e.SmokeStatusSchema, e.SmtpStatusSchema, e.SnapshotImageSchema, e.SourceInfoSchema, e.SpatialDetectionSchema, e.SsoBridgeClaimsSchema, e.StartEmbeddedInputSchema, e.StationaryObjectSchema, e.StorageAbortUploadInputSchema, e.StorageBeginDownloadInputSchema, e.StorageBeginDownloadResultSchema, e.StorageBeginUploadInputSchema, e.StorageBeginUploadResultSchema, e.StorageEndDownloadInputSchema, e.StorageFinalizeUploadInputSchema, e.StorageLocationDeclarationSchema, e.StorageLocationRefSchema, e.StorageLocationSchema, e.StorageLocationTypeSchema, e.StorageProviderInfoSchema, e.StorageReadChunkInputSchema, e.StorageTestLocationResultSchema, e.StorageWriteChunkInputSchema, e.StreamCodecSchema, e.StreamFormatSchema, e.StreamNetworkStatsSchema, e.StreamParamsOptionsSchema, e.StreamParamsStatusSchema, e.StreamProfileConfigSchema, e.StreamProfileOptionsSchema, e.StreamProfilePatchSchema, e.StreamProfileSchema, e.StreamSourceEntrySchema, e.StreamSourceSchema, e.SubscribeAudioChunksInputSchema, e.SubscribeAudioChunksResultSchema, e.SubscribeFramesInputSchema, e.SubscribeFramesResultSchema, e.SwitchStatusSchema, e.SystemMetricsSchema, e.SystemMirror, e.TAXONOMY_COLORS, e.TIMEZONES, e.TRANSCODE_DOWN_MAX_BITRATE_KBPS, e.TRANSCODE_DOWN_MAX_HEIGHT, e.TamperStatusSchema, e.TankStatusSchema, e.TargetKindCapsSchema, e.TargetKindLevelSchema, e.TargetKindSchema, e.TargetSchema, e.TemperatureSensorStatusSchema, e.TerminalProfileInfoSchema, e.TerminalSessionInfoSchema, e.TestConnectionResultSchema, e.TestResultSchema, e.TimelapseRuleInputSchema, e.TimelapseRulePatchSchema, e.TimelapseRuleSchema, e.TimelapseTemplateSchema, e.ToastSchema, e.TokenScopeSchema, e.TopologyNodeSchema, e.TopologyProcessSchema, e.TopologyServiceSchema, e.TrackCascadeCountsSchema, e.TrackEnvelopeSchema, e.TrackFlagsPatchSchema, e.TrackFlagsSchema, e.TrackProjectionSchema, e.TrackSchema, e.TrackSourceSchema, e.TrackStateSchema, e.TrackZoneFilterSchema, e.TrackedDetectionSchema, e.TrainingExportDeviceTotalsSchema, e.TrainingExportSummarySchema, e.TurnServerSchema, e.UNIT_TABLE, e.UnifiedBrokerInfoSchema, e.UnitConversionError, e.UpdateIntegrationInputSchema, e.UpdateStatusSchema, e.UpdateUserInputSchema, e.UserRecordSchema, e.UserSummarySchema, e.VacuumControlStatusSchema, e.VacuumStateSchema, e.ValveStateSchema, e.ValveStatusSchema, e.VectorDeclareIndexInputSchema, e.VectorDeleteByFilterInputSchema, e.VectorDeleteInputSchema, e.VectorDeleteResultSchema, e.VectorFilterSchema, e.VectorGetInputSchema, e.VectorGetResultSchema, e.VectorItemSchema, e.VectorMatchSchema, e.VectorMetadataSchema, e.VectorMetricSchema, e.VectorQueryInputSchema, e.VectorQueryResultSchema, e.VectorStatsInputSchema, e.VectorStatsResultSchema, e.VectorUpsertInputSchema, e.VectorUpsertResultSchema, e.VibrationStatusSchema, e.VideoEncodeSchema, e.WEBRTC_EGRESS_PROFILE, e.WELL_KNOWN_TABS, e.WELL_KNOWN_TAB_MAP, e.WaterHeaterStatusSchema, e.WeatherStatusSchema, e.WebrtcStreamChoiceSchema, e.WebrtcStreamTargetSchema, e.WhiteBalanceModeSchema, e.WidgetHostEnum, e.WidgetLoginMethodSchema, e.WidgetMetadataSchema, e.WidgetRemoteSchema, e.WidgetSizeEnum, e.YAMNET_TO_MACRO, e.ZoneCrossingDirectionSchema, e.ZoneCrossingSchema, e.ZoneKindEnum, e.ZoneRuleModeEnum, e.ZoneRuleSchema, e.ZoneRuleStageEnum, e.ZoneRulesArraySchema, e.ZoneSchema, e.ZoneScopeBreakdownSchema, e.accessoriesCapability, e.accessoryStableId, e.addonPagesCapability, e.addonPagesSourceCapability, e.addonRoutesCapability, e.addonSettingsCapability, e.addonWidgetsCapability, e.addonWidgetsSourceCapability, e.addonsCapability, e.adminUiCapability, e.airQualitySensorCapability, e.alarmPanelCapability, e.alertsCapability, e.ambientLightSensorCapability, e.asBoolean, e.asJsonArray, e.asJsonObject, e.asNumber, e.asString, e.audioAnalysisCapability, e.audioAnalyzerCapability, e.audioCodecCapability, e.audioMetricsCapability, e.audioPlanFromEncodeProfile, e.authProviderCapability, e.autoAssignProfiles, e.automationControlCapability, e.backupCapability, e.bareAddonId, e.batteryCapability, e.bestLocationMatch, e.binaryCapability, e.bindAddonActions, e.brightnessCapability, e.brokerCapability, e.buildAddonRouteProvider, e.buildAudioArgs, e.buildEventKindDescriptor, e.buildFfmpegArgs, e.buildInputArgs, e.buildModelVariantGroups, e.buildNcTaxonomy, e.buildStreamParamsConfigSchema, e.buildVideoArgs, e.buttonCapability, e.cameraCredentialsCapability, e.cameraPipelineConfigCapability, e.cameraStreamsCapability, e.canConvertUnit, e.canonicalEgressPlan, e.carbonMonoxideCapability, e.cellsToRects, e.classifyStream, e.classifyStreams, e.climateControlCapability, e.collectHydratedFieldEntries, e.collectHydratedFieldValues, e.colorCapability, e.colorForKind, e.compileExpression, e.compileExpressionSafe, e.connectivityCapability, e.consumablesCapability, e.contactCapability, e.controlCapability, e.convertUnit, e.coreBlockAddonId, e.coreBlockIdFromAddonId, e.coreBlocksCapability, e.cosineSimilarity, e.coverCapability, e.createDeviceProxy, e.createDurableState, e.createEvent, e.createExpressionScope, e.createHwAccelCache, e.createLazyTrpcSource, e.createMirrorSource, e.createRuntimeStateBridge, e.createSliceHandle, e.createSystemProxy, e.customAction, e.customModelRegistryCapability, e.dataStoreProviderCapability, e.dayNightCapability, e.declarationOwnerNodeId, e.decodeVectorBase64, e.decoderCapability, e.defaultDeviceFor, e.defineCustomActions, e.deriveCameraSwitches, e.deriveDetailCropRect, e.deriveRecordingMode, e.describeModelVariant, e.detectionPipelineCapability, e.deviceAdoptionCapability, e.deviceBackendToFormat, e.deviceCustomAction, e.deviceDiscoveryCapability, e.deviceExportCapability, e.deviceManagerCapability, e.deviceMatchesProfile, e.deviceOpsCapability, e.deviceProviderCapability, e.deviceStateCapability, e.deviceStatusCapability, e.doorbellCapability, e.egressTranscodeSharingKey, e.egressTransportFromRequest, e.embeddingEncoderCapability, e.emitDownForOwnedCaps, e.emitReadiness, e.encodeProfileFromStreamShape, e.encodeVectorBase64, e.enumSensorCapability, e.enumerateInferenceDevices, e.enumerateItemArrayFields, e.enumerateSchemaFields, e.errMsg, e.evaluateAst, e.evaluateExpressionSource, e.evaluateZoneRules, e.event, e.eventEmitterCapability, e.eventsCapability, e.expandCapMethods, e.extractNestedAddonId, e.extractSourceInfoFromMetadata, e.faceGalleryCapability, e.fanControlCapability, e.featureProbeCapability, e.filesystemBrowseCapability, e.findTimezone, e.floodCapability, e.formatForBackend, e.formatForRuntime, e.gasCapability, e.getAudioMacroClassIds, e.getByPath, e.getCapsByProviderKind, e.getTaxonomyEntry, e.hasMotionTrigger, e.hfModelUrl, e.htmlToText, e.humidifierCapability, e.humiditySensorCapability, e.hydrateSchema, e.imageCapability, e.imageSettingsCapability, e.integrationsCapability, e.intercomCapability, e.invocationFromEncodeProfile, e.isAgentOnlyPlacement, e.isArrayOutputSchema, e.isBaseConditionKey, e.isCollectionArrayMethod, e.isDeployableToAgent, e.isDeviceConfigCap, e.isDeviceScopedCap, e.isEvent, e.isNode, e.isObjectInput, e.isSameAddonId, e.isScheduleActive, e.isSoftwareDecode, e.isVoidInput, e.jobKindSchema, e.kebabToCamel, e.knownValues, e.lawnMowerControlCapability, e.lifecycleJobSchema, e.lifecycleJobScopeSchema, e.lifecycleJobStateSchema, e.lifecycleTaskSchema, e.llmCapability, e.llmRuntimeCapability, e.localNetworkCapability, e.locationSimilarity, e.lockControlCapability, e.logBannerArgs, e.logDestinationCapability, e.logLevelAtMost, e.loginMethodCapability, e.looseSchema, e.makeProfileBrokerId, a = e.makeSourceBrokerId, e.mapAudioLabelToMacro, e.markdownToHtmlLite, e.markdownToText, e.maskUrlCredentials, e.mediaPlayerCapability, e.mergeSourceInfo, e.meshNetworkCapability, e.method, e.metricsProviderCapability, e.modelConvertCapability, e.modelDistributorCapability, e.modelFormatForRuntime, e.motionCapability, e.motionDetectionCapability, e.motionTriggerCapability, e.motionZonesCapability, e.mqttBrokerCapability, e.nativeObjectDetectionCapability, e.networkAccessCapability, e.networkQualityCapability, e.nodePin, e.nodesCapability, e.normalizeAddonInitResult, e.normalizeUnit, e.notificationOutputCapability, e.notificationRulesCapability, e.notifierCapability, e.numericSensorCapability, e.oauthIntegrationCapability, e.objectInputDeclaresAddonId, e.osdCapability, e.osdManagerCapability, e.parseCameraStreamConfig, e.parseExpression, e.parseJsonArray, e.parseJsonObject, e.parseJsonUnknown, e.parseProfileBrokerId, e.parseStreamParamsFormPatch, e.petFeederCapability, e.pickAccessoryControl, e.pickDetailCropConvention, e.pickNativeLeaseOverride, e.pickPreferredRtspEntry, e.pickVideoEncoder, e.pickerForCondition, e.pipelineAnalyticsCapability, e.pipelineExecutorCapability, e.pipelineOrchestratorCapability, e.pipelineRunnerCapability, e.plateGalleryCapability, e.platformProbeCapability, e.powerMeterCapability, e.prepareNotification, e.presenceCapability, e.pressureSensorCapability, e.privacyMaskCapability, e.procedureAuthKey, e.ptzAutotrackCapability, e.ptzCapability, e.pythonScriptForBackend, e.readDetailCropConvention, e.readDeviceStateFrom, e.readNativeLeaseOverride, e.readNodePin, e.readinessKey, e.rebootCapability, e.recordingCapability, e.recordingExportCapability, e.rectsToCells, e.requiresPython, e.resolveAddonExecution, e.resolveAddonGroup, e.resolveAddonPlacement, e.resolveAddonRuntime, e.resolveCapMount, e.resolveDetectionRuntime, e.resolveDeviceControlKind, e.resolveDeviceProfile, e.resolveEgressDecodeHwAccel, e.resolveFormat, e.resolveHydratedFieldValue, e.resolveModelFormat, e.resolveMutate, e.resolveRunnerId, e.resolveScrubThumbnailGeometry, e.resolveVariantModelId, e.runInferenceStep, e.runtimeDevices, e.sceneMonitorCapability, e.scopeKey, e.scoreRuntimes, e.scriptRunnerCapability, e.selectAssignedProfileSlots, e.serverManagementCapability, e.setByPath, e.settingsStoreCapability, e.sleep, e.sleepCancellable, e.smokeCapability, e.smtpProviderCapability, e.snapshotCapability, e.ssoBridgeCapability, e.startReachabilityPoll, e.stateVocabularyFor, e.storageCapability, e.storageEvictableCapability, e.storageProviderCapability, e.streamBrokerCapability, e.streamCatalogCapability, e.streamParamsCapability, e.streamPixels, e.streamQualityLabel, e.subKindsOf, e.summarisePrivacyAudio, e.supportedRuntimes, e.switchCapability, e.switchedOffIds, e.synthesizeSourceInfo, e.systemCapability, e.tamperCapability, e.taskLogEntrySchema, e.taskPhaseSchema, e.taskTargetSchema, e.temperatureSensorCapability, e.terminalSessionCapability, e.textToHtml, e.toDeviceSummary, e.toExpressionValue, e.toNodeId, e.toStreamSourceEntry, e.toastCapability, e.tokenize, e.transcodeBody, e.tryConvertUnit, e.turnProviderCapability, e.unitDimension, e.unitsForDimension, e.updateCapability, e.userManagementCapability, e.userPasskeysCapability, e.vacuumControlCapability, e.validateExpressionSource, e.valveCapability, e.vectorDimFromBase64, e.vectorStoreCapability, e.vibrationCapability, e.videoclipsCapability, e.viewerUiCapability, e.waterHeaterCapability, e.weatherCapability, e.webrtcClientHintsSchema, e.webrtcSessionCapability, e.wiringAddonHealthSchema, e.wiringHealthSnapshotSchema, e.wiringNodeHealthSchema, e.wiringProbeKindSchema, e.wiringProbeResultSchema, e.zodEntriesToConfigUI, e.zoneAnalyticsCapability, e.zoneRulesCapability, e.zonesCapability, e.default;
|
|
20
|
+
}, s = i.share["default:@camstack/types"];
|
|
21
|
+
s === void 0 ? n.then(() => {
|
|
22
|
+
if (s = i.share["default:@camstack/types"], s === void 0) throw Error("[Module Federation] Shared module @camstack/types was imported before federation bootstrap finished.");
|
|
23
|
+
o(s);
|
|
24
|
+
}) : o(s);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as t };
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.50",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.36",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-BsBEe_rX.js");
|
|
7
7
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
8
8
|
const require_addon_utils = require("../addon-utils-DveoBR6G.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as webrtcSessionCapability, At as union, B as maskUrlCredentials, C as addonWidgetsSourceCapability, Ct as discriminatedUnion, D as createHwAccelCache, Dt as object, E as cameraStreamsCapability, Et as number, F as egressTransportFromRequest, J as resolveEgressDecodeHwAccel, Ot as record, P as egressTranscodeSharingKey, St as boolean, Tt as literal, Z as streamBrokerCapability, _t as parseProfileBrokerId, at as isSoftwareDecode, bt as _enum, ct as DeviceFeature, et as errMsg, f as EncodeProfileSchema, ft as isEvent, ht as nodePin, it as invocationFromEncodeProfile, jt as EventCategory, kt as string, lt as DeviceType, mt as makeSourceBrokerId, nt as Fmp4BoxSplitter, ot as BaseAddon, pt as makeProfileBrokerId, rt as buildFfmpegArgs$1, st as CAM_PROFILE_ORDER, tt as AUDIO_PRESETS, ut as createEvent, v as RATE_CONTROL_RELAXED, x as RingBuffer, xt as array, y as RATE_CONTROL_TIGHT } from "../dist-Dkvk5ykl.mjs";
|
|
3
3
|
import { n as profileForStreamId } from "../remote-restream-BeHi78PZ.mjs";
|
|
4
4
|
import { n as createFileDataPlaneHandler } from "../addon-utils-QuxtOdK1.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CUZ0nS_r.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as NativeLeaseSettingsSchema, h as NativeLeaseAdmissionSchema, l as DEFAULT_NATIVE_LEASE_SETTINGS } from "./dist-Dkvk5ykl.mjs";
|
|
2
2
|
//#region src/session-decode/native-lease-config.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolution of the native-frame lease knobs for one decode worker.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,f as t,g as n,h as r,m as i,p as a}from"./index-
|
|
1
|
+
import{d as e,f as t,g as n,h as r,m as i,p as a}from"./index-Dv7fSuDA.js";var o=n(t()),s=n(e(),1),c=Math.PI/180;function l(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var u=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},d={_global:u,version:`10.3.0`,isBrowser:l(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return d.angleDeg?e*c:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:`web`,legacyTextRendering:!1,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return d.DD.isDragging},isTransforming(){return d.Transformer?.isTransforming()??!1},isDragReady(){return!!d.DD.node},releaseCanvasOnDestroy:!0,document:u.document,_injectGlobal(e){u.Konva!==void 0&&console.error(`Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment.`),u.Konva=e}},f=e=>{d[e.prototype.getClassName()]=e};d._injectGlobal(d);var p=`Konva.js unsupported environment.
|
|
2
2
|
|
|
3
3
|
Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,g as i,l as a,o,r as s,s as c,u as l}from"./index-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,g as i,l as a,o,r as s,s as c,u as l}from"./index-Dv7fSuDA.js";import{MaskShapeCanvas as u}from"./MaskShapeCanvas-DI4BY7W2-kAtChdz2.js";var d=i(r(),1),f=i(n(),1),p=o(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),m=110,h=`motion-zones`,g=0,_=[1,2,3],v=1,y=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,b=`rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors`;function x(e,t,n){let r=t*n,i=Array.from({length:r});for(let t=0;t<r;t+=1)i[t]=e[t]===!0;return i}function S(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function C(e,t){return Math.ceil(e/t)}function w(e,t,n){return Math.min(n-1,Math.floor((e+.5)/t*n))}function T(e,t,n,r){let i=C(t,r),a=C(n,r),o=Array.from({length:i*a},()=>!1);for(let r=0;r<n;r+=1){let s=w(r,n,a);for(let n=0;n<t;n+=1)e[r*t+n]===!0&&(o[s*i+w(n,t,i)]=!0)}return o}function E(e,t,n,r){let i=C(t,r),a=C(n,r),o=Array.from({length:t*n},()=>!1);for(let r=0;r<n;r+=1){let s=w(r,n,a);for(let n=0;n<t;n+=1)o[r*t+n]=e[s*i+w(n,t,i)]===!0}return o}function D({deviceId:n}){let r=t(l().trpcClient,n),[i,o]=(0,d.useState)(null),[w,D]=(0,d.useState)(!1),[O,k]=(0,d.useState)(null),[A,j]=(0,d.useState)(null),[M,N]=(0,d.useState)(v),[P,F]=(0,d.useState)(!1),[I,L]=(0,d.useState)(!1),R=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!r)return;let e=!1;return R.current=!1,o(null),D(!1),k(null),j(null),N(v),L(!1),(async()=>{try{let t=await r.motionZones?.getOptions({});if(e)return;if(!t)throw Error(`device proxy not ready`);if(o(t),R.current)return;let n=await r.motionZones?.getStatus({});if(e)return;if(!n)throw Error(`device proxy not ready`);R.current=!0;let i=n.regions.find(e=>e.shape.kind===`grid`),a=x(i?i.shape.cells:[],t.grid.width,t.grid.height);j(a),k(T(a,t.grid.width,t.grid.height,v))}catch(t){if(e)return;c(t)?D(!0):console.error(`Motion Zones load failed`,t)}})(),()=>{e=!0}},[r]);let z=i?i.grid.width:0,B=i?i.grid.height:0,V=C(z,M),H=C(B,M),U=(0,d.useMemo)(()=>O&&i?E(O,z,B,M):null,[O,i,z,B,M]),W=(0,d.useMemo)(()=>U!==null&&A!==null&&!S(U,A),[U,A]),G=(0,d.useMemo)(()=>U?U.reduce((e,t)=>t?e+1:e,0):0,[U]),K=z*B,q=V*H,J=(0,d.useCallback)(e=>{q>0&&k(Array.from({length:q},()=>e))},[q]),Y=(0,d.useCallback)(()=>{k(e=>e&&e.map(e=>!e))},[]),X=(0,d.useCallback)(()=>{A&&i&&k(T(A,z,B,M))},[A,i,z,B,M]),Z=(0,d.useCallback)(e=>{e===M||!i||k(t=>{if(!t)return N(e),t;let n=T(E(t,z,B,M),z,B,e);return N(e),n})},[M,i,z,B]),Q=(0,d.useMemo)(()=>i&&O?[{id:g,shape:{kind:`grid`,gridWidth:V,gridHeight:H,cells:[...O]}}]:[],[i,O,V,H]),$=(0,d.useCallback)((e,t)=>{t.kind===`grid`&&k(t.cells)},[]),ee=(0,d.useCallback)(async()=>{if(!(!r||!O||!i)){F(!0);try{let e=E(O,i.grid.width,i.grid.height,M),t={kind:`grid`,gridWidth:i.grid.width,gridHeight:i.grid.height,cells:e};await r.motionZones?.setZone({patch:{regions:[{id:g,enabled:!0,shape:t}]}});let n=await r.motionZones?.getStatus({});if(n){let e=n.regions.find(e=>e.shape.kind===`grid`),t=x(e?e.shape.cells:[],i.grid.width,i.grid.height);j(t),k(T(t,i.grid.width,i.grid.height,M))}}catch(e){console.error(`Motion Zones save failed`,e)}finally{F(!1)}}},[r,O,i,M]);a((0,d.useMemo)(()=>I&&!w&&i&&O?{id:h,order:m,node:(0,f.jsx)(u,{transparent:!0,items:Q,supportedShapes:[`grid`],grid:{width:V,height:H},selectedId:g,onSelect:()=>{},onShapeChange:$,onDrawComplete:()=>{},drawingKind:null})}:null,[I,w,i,O,Q,$,V,H]));let te=!w&&i!==null&&O!==null;return r?(0,f.jsx)(e,{title:`Motion Zones`,icon:(0,f.jsx)(p,{className:`h-3.5 w-3.5 text-foreground-subtle`}),children:(0,f.jsx)(`div`,{className:`flex flex-col gap-3`,children:w?(0,f.jsx)(`p`,{className:`${s} leading-relaxed`,children:`This camera doesn't expose an on-board motion zones grid.`}):te?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`p`,{className:`${s} leading-relaxed`,children:[`Toggle `,(0,f.jsx)(`strong`,{className:`text-foreground`,children:`Edit grid`}),` to paint the region directly on the live frame, then `,(0,f.jsx)(`strong`,{className:`text-foreground`,children:`Save`}),` to push the mask to the camera. Pick a bigger`,` `,(0,f.jsx)(`strong`,{className:`text-foreground`,children:`Cell size`}),` for quicker, broad-stroke painting — it's resampled to the camera's native `,i.grid.width,`×`,i.grid.height,` grid on save (×1 is the finest).`]}),(0,f.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,f.jsx)(`button`,{type:`button`,onClick:()=>L(e=>!e),disabled:P,"aria-pressed":I,className:I?b:y,children:I?`Done editing`:`Edit grid`}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>J(!0),disabled:P,className:y,children:`All on`}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>J(!1),disabled:P,className:y,children:`All off`}),(0,f.jsx)(`button`,{type:`button`,onClick:Y,disabled:P,className:y,children:`Invert`}),(0,f.jsxs)(`div`,{className:`flex items-center gap-1 ml-1`,role:`group`,"aria-label":`Cell size`,children:[(0,f.jsx)(`span`,{className:`${s} mr-0.5`,children:`Cell size`}),_.map(e=>(0,f.jsxs)(`button`,{type:`button`,onClick:()=>Z(e),disabled:P,"aria-pressed":M===e,title:e===1?`Camera grid ${z}×${B} (finest)`:`${C(z,e)}×${C(B,e)} painting grid · cells ×${e} bigger`,className:M===e?b:y,children:[`×`,e]},e))]}),(0,f.jsxs)(`span`,{className:`${s} ml-1 tabular-nums`,children:[G,` / `,K,` cells · `,i.grid.width,`×`,i.grid.height,M===1?``:` · paint ${V}×${H}`]}),(0,f.jsx)(`span`,{className:`flex-1`}),(0,f.jsx)(`button`,{type:`button`,onClick:X,disabled:P||!W,className:`rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,children:`Revert`}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>void ee(),disabled:P||!W,className:b,children:P?`Saving…`:`Save`})]})]}):(0,f.jsx)(`p`,{className:`${s} leading-relaxed`,children:`Loading the camera's grid…`})})}):null}export{D as MotionZonesSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,g as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d,u as ee}from"./index-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,g as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d,u as ee}from"./index-Dv7fSuDA.js";import{MaskShapeCanvas as te}from"./MaskShapeCanvas-DI4BY7W2-kAtChdz2.js";var f=i(r(),1),p=i(n(),1),m=c(`hexagon`,[[`path`,{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`,key:`yt0hxn`}]]),h=120,g=`privacy-mask`,_=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,v=`rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors`;function y(e){return e.kind===`rect`||e.kind===`polygon`?e:null}function b(e){let t=new Set(e.map(e=>e.id)),n=0;for(;t.has(n);)n+=1;return n}function x(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(JSON.stringify(e[n])!==JSON.stringify(t[n]))return!1;return!0}function S({deviceId:n}){let r=t(ee().trpcClient,n),[i,c]=(0,f.useState)(null),[S,C]=(0,f.useState)(!1),[w,T]=(0,f.useState)(null),[E,D]=(0,f.useState)(null),[O,k]=(0,f.useState)(!1),[A,j]=(0,f.useState)(!1),[M,N]=(0,f.useState)(null),[P,F]=(0,f.useState)(null),I=(0,f.useRef)(!1);(0,f.useEffect)(()=>{if(!r)return;let e=!1;return I.current=!1,c(null),C(!1),T(null),D(null),j(!1),N(null),F(null),(async()=>{try{let t=await r.privacyMask?.getOptions({});if(e)return;if(!t)throw Error(`device proxy not ready`);if(c(t),I.current)return;let n=await r.privacyMask?.getStatus({});if(e)return;if(!n)throw Error(`device proxy not ready`);I.current=!0;let i={enabled:n.enabled,regions:n.regions};D(i),T(i)}catch(t){if(e)return;u(t)?C(!0):console.error(`Privacy Mask load failed`,t)}})(),()=>{e=!0}},[r]);let L=(0,f.useMemo)(()=>w!==null&&E!==null&&(w.enabled!==E.enabled||!x(w.regions,E.regions)),[w,E]),R=w?w.regions.length:0,z=i?i.maxRegions:0,B=(0,f.useRef)(0);(0,f.useEffect)(()=>{B.current=z},[z]);let V=z>0&&R>=z,H=(0,f.useCallback)(()=>{T(e=>e&&{...e,enabled:!e.enabled})},[]),U=(0,f.useCallback)(e=>{N(typeof e==`number`?e:null)},[]),W=(0,f.useMemo)(()=>w?w.regions.map(e=>({id:e.id,shape:e.shape,enabled:e.enabled,label:`Zone ${String(e.id)}`})):[],[w]),G=(0,f.useCallback)((e,t)=>{let n=y(t);n&&T(t=>t&&{...t,regions:t.regions.map(t=>t.id===e?{...t,shape:n}:t)})},[]),K=(0,f.useCallback)(e=>{let t=y(e);t&&(F(null),T(e=>{if(!e)return e;let n=B.current;if(n>0&&e.regions.length>=n)return e;let r=b(e.regions),i={id:r,enabled:!0,shape:t};return N(r),{...e,regions:[...e.regions,i]}}))},[]),q=(0,f.useCallback)(e=>{j(!0),N(null),F(e)},[]),J=(0,f.useCallback)(e=>{j(!0),F(null),N(e)},[]),Y=(0,f.useCallback)(e=>{N(t=>t===e?null:t),T(t=>t&&{...t,regions:t.regions.filter(t=>t.id!==e)})},[]),X=(0,f.useCallback)(()=>{F(null),N(null),E&&T({enabled:E.enabled,regions:E.regions})},[E]),Z=(0,f.useCallback)(async()=>{if(!(!r||!w)){k(!0);try{await r.privacyMask?.setMask({patch:{enabled:w.enabled,regions:[...w.regions]}});let e=await r.privacyMask?.getStatus({});if(e){let t={enabled:e.enabled,regions:e.regions};D(t),T(t)}}catch(e){console.error(`Privacy Mask save failed`,e)}finally{k(!1)}}},[r,w]),ne=(0,f.useCallback)(()=>{j(e=>(e&&(F(null),N(null)),!e))},[]),Q=i?.supportedShapes??[];o((0,f.useMemo)(()=>A&&!S&&i&&w?{id:g,order:h,node:(0,p.jsx)(te,{transparent:!0,items:W,supportedShapes:Q,polygonVertices:i.polygonVertices,selectedId:M,onSelect:U,onShapeChange:G,onDrawComplete:K,drawingKind:P})}:null,[A,S,i,w,W,Q,M,U,G,K,P]));let re=i?.supportedShapes.includes(`rect`)??!1,ie=i?.supportedShapes.includes(`polygon`)??!1,$=i!==null&&(i.maxRegions<=0||i.supportedShapes.length===0),ae=!S&&!$&&i!==null&&w!==null;return r?(0,p.jsx)(e,{title:`Privacy Mask`,icon:(0,p.jsx)(d,{className:`h-3.5 w-3.5 text-foreground-subtle`}),children:(0,p.jsx)(`div`,{className:`flex flex-col gap-3`,children:S||$?(0,p.jsx)(`p`,{className:`${l} leading-relaxed`,children:`This camera doesn't support an on-board privacy mask.`}):ae?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`p`,{className:`${l} leading-relaxed`,children:[`Toggle `,(0,p.jsx)(`strong`,{className:`text-foreground`,children:`Edit mask`}),` to draw blanked-out zones on the live frame, then `,(0,p.jsx)(`strong`,{className:`text-foreground`,children:`Save`}),` to push them to the camera. Drag a rectangle to move, its corner to resize; drag polygon vertices, click an edge midpoint to add one, or right-click a vertex to remove it.`]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,p.jsx)(`button`,{type:`button`,onClick:ne,disabled:O,"aria-pressed":A,className:A?v:_,children:A?`Done editing`:`Edit mask`}),(0,p.jsx)(`button`,{type:`button`,onClick:H,disabled:O,"aria-pressed":w.enabled,className:w.enabled?v:_,children:w.enabled?`Mask on`:`Mask off`}),re&&(0,p.jsx)(`button`,{type:`button`,onClick:()=>q(`rect`),disabled:O||V,"aria-pressed":P===`rect`,className:P===`rect`?v:_,title:V?`Maximum zones reached`:`Add a rectangle zone`,children:`+ Rect`}),ie&&(0,p.jsx)(`button`,{type:`button`,onClick:()=>q(`polygon`),disabled:O||V,"aria-pressed":P===`polygon`,className:P===`polygon`?v:_,title:V?`Maximum zones reached`:`Add a polygon zone`,children:`+ Polygon`}),(0,p.jsxs)(`span`,{className:`${l} ml-1 tabular-nums`,children:[R,` / `,z,` zones`]}),(0,p.jsx)(`span`,{className:`flex-1`}),(0,p.jsx)(`button`,{type:`button`,onClick:X,disabled:O||!L,className:`rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,children:`Revert`}),(0,p.jsx)(`button`,{type:`button`,onClick:()=>void Z(),disabled:O||!L,className:v,children:O?`Saving…`:`Save`})]}),R>0?(0,p.jsx)(`div`,{className:`flex flex-col gap-1`,children:w.regions.map(e=>{let t=M===e.id,n=e.shape.kind===`polygon`?m:s;return(0,p.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border px-2 py-1 transition-colors ${t?`border-primary/50 bg-primary/10`:`border-border bg-surface`}`,children:[(0,p.jsxs)(`button`,{type:`button`,onClick:()=>J(e.id),disabled:O,className:`flex flex-1 items-center gap-2 text-left text-[11px] font-medium text-foreground-subtle hover:text-foreground disabled:opacity-40 transition-colors`,children:[(0,p.jsx)(n,{className:`h-3.5 w-3.5 shrink-0`}),(0,p.jsxs)(`span`,{children:[`Zone `,e.id]}),(0,p.jsx)(`span`,{className:`text-foreground-faint capitalize`,children:e.shape.kind})]}),(0,p.jsx)(`button`,{type:`button`,onClick:()=>Y(e.id),disabled:O,"aria-label":`Delete zone ${String(e.id)}`,title:`Delete zone`,className:`inline-flex h-6 w-6 items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:border-red-400/40 hover:bg-red-500/10 hover:text-red-400 disabled:opacity-40 transition-colors`,children:(0,p.jsx)(a,{className:`h-3.5 w-3.5`})})]},e.id)})}):null]}):(0,p.jsx)(`p`,{className:`${l} leading-relaxed`,children:`Loading the camera's privacy mask…`})})}):null}export{S as PrivacyMaskSettings};
|