@camstack/addon-admin-ui 1.2.86 → 1.2.88
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/assets/{AddLocationWizard-CVvsaNYx.js → AddLocationWizard-BntkKU2V.js} +1 -1
- package/dist/assets/{AddonCollectionPage-JA8tzL7q.js → AddonCollectionPage-DfZQjIPJ.js} +1 -1
- package/dist/assets/Addons-Cof7W-Ym.js +1 -0
- package/dist/assets/{AdminTabs-B-UL_iuP.js → AdminTabs-FswV6m19.js} +1 -1
- package/dist/assets/{AiProfiles-DI31JvyZ.js → AiProfiles-Bol2xzPZ.js} +1 -1
- package/dist/assets/{BrokerForm-CFTyH54D.js → BrokerForm-rlgpgB9M.js} +1 -1
- package/dist/assets/{Build-BP0Mx9FT.js → Build--P11mU0s.js} +3 -3
- package/dist/assets/{Capabilities-BvxWbN6u.js → Capabilities-Di_wIznW.js} +1 -1
- package/dist/assets/CapabilityBadges-BOwdQNDH.js +1 -0
- package/dist/assets/{Cluster-CsEHMgVp.js → Cluster-B58mM4Kr.js} +1 -1
- package/dist/assets/{Data-Bt2o6J7H.js → Data-uwnl2ZR0.js} +1 -1
- package/dist/assets/{DetectionIntelligence-CeunXPtW.js → DetectionIntelligence-wpF45dZl.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-DLNzCtMs.js → DeviceAggregateSection-r5_ljoI1.js} +1 -1
- package/dist/assets/DeviceDetail-Bf3FJFNv.js +2 -0
- package/dist/assets/{Devices-fMM-N9UK.js → Devices-D3k50BRl.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-D8LRITOt.js → EmbedPlayerPage-C2EWx5XY.js} +1 -1
- package/dist/assets/Events-DuXVjBmB.js +1 -0
- package/dist/assets/{FormBuilder-ChyOUw_O.js → FormBuilder-QY4tah4S.js} +1 -1
- package/dist/assets/{Identity-kjnupMGz.js → Identity-BV8WXb2H.js} +1 -1
- package/dist/assets/{IntegrationDetail-683FxnPV.js → IntegrationDetail-ClwD7H7W.js} +1 -1
- package/dist/assets/{Integrations-BAa7Hx8I.js → Integrations-BGbVMFT4.js} +1 -1
- package/dist/assets/{Integrations-Bvz5KiZt.js → Integrations-Dy_WWWKK.js} +1 -1
- package/dist/assets/{Logs-CPMTc4WW.js → Logs-Dr2j0QZR.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DhO5kuER.js → MotionZonesSettings-Ds8nYWoN.js} +1 -1
- package/dist/assets/{MyAccess-C5kfikXk.js → MyAccess-Bsf24wbg.js} +1 -1
- package/dist/assets/Network-D_OMCOsR.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-BdP5wGIu.js → NodeAddonsSettingsPanel-B3-jgI6Y.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-CubcmlvI.js → NodeInferenceDevices-vixWXUkV.js} +1 -1
- package/dist/assets/Notifications-DbYpUqwt.js +1 -0
- package/dist/assets/Pipeline-m823fIKM.js +1 -0
- package/dist/assets/{Plates-DiVTWUKg.js → Plates-BIkYeFJp.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-zKU6VZ4G.js → PrivacyMaskSettings-C2nmPqsf.js} +1 -1
- package/dist/assets/{ProviderIcon-JxmOoO_O.js → ProviderIcon-yuhuUjyO.js} +1 -1
- package/dist/assets/Recordings-ChPRJj_w.js +1 -0
- package/dist/assets/{ScanNetworkModal-DkqUu2Xc.js → ScanNetworkModal-B6Dhtqhv.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-DZucoVrl.js → SceneMonitorEditor-CpU_-6iK.js} +1 -1
- package/dist/assets/{Scenes-DMSYbhd1.js → Scenes-Bp-HU3HC.js} +1 -1
- package/dist/assets/{Settings-olnTIAze.js → Settings-CxNCTStH.js} +1 -1
- package/dist/assets/{Showroom-CdPGD4R4.js → Showroom-BfQj_ruk.js} +1 -1
- package/dist/assets/{Terminal-Ck0I64eZ.js → Terminal-COkGK9Eu.js} +5 -3
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BpY1fOVD.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CtfWG-B0.js} +1 -1
- package/dist/assets/{bell-ring-BgQsFN7F.js → bell-ring-BIkgL1EI.js} +1 -1
- package/dist/assets/{boxes-BnOBLNz5.js → boxes-EqdcdFpg.js} +1 -1
- package/dist/assets/{build-cluster-graph-BwHdP82z.js → build-cluster-graph-C0MeCzJZ.js} +1 -1
- package/dist/assets/circle-check-big-DGl1OsLR.js +1 -0
- package/dist/assets/{circle-x-DAqnOyA6.js → circle-x-CBZPec7u.js} +1 -1
- package/dist/assets/clock-M4NiOyl_.js +1 -0
- package/dist/assets/{copy-Dl5E5of_.js → copy-BPgY4Eey.js} +1 -1
- package/dist/assets/{debounced-invalidate-BIRVvqvY.js → debounced-invalidate-B1bc5kFD.js} +1 -1
- package/dist/assets/{dist-CUfLXJC3.js → dist-DjbCvztb.js} +1 -1
- package/dist/assets/dist-IEXliP3K.js +349 -0
- package/dist/assets/{download-AfoMEWCf.js → download-Dq2bfdRX.js} +1 -1
- package/dist/assets/{face-bbox-BFT7iMc1.js → face-bbox-DUGyLE43.js} +1 -1
- package/dist/assets/{hard-drive-C9zTEogy.js → hard-drive-COdkuHqf.js} +1 -1
- package/dist/assets/{hostInit-Cw_l9Xfz.js → hostInit-BSakAGif.js} +1 -1
- package/dist/assets/index-LPwis6Rq.js +4 -0
- package/dist/assets/{key-round-sF-8oSo7.js → key-round-CfAFZkMw.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-8f39d7c2.js → mf-entry-bootstrap-0-e9ffa7b9.js} +2 -2
- package/dist/assets/{pencil-DsWgW1cM.js → pencil-CfoKCBNv.js} +1 -1
- package/dist/assets/play-CqrjGyv7.js +1 -0
- package/dist/assets/{player-overlays-BGbLKvcn.js → player-overlays-CBKaIBph.js} +1 -1
- package/dist/assets/plus-DHRgxEWi.js +1 -0
- package/dist/assets/power-DGhEdOiQ.js +1 -0
- package/dist/assets/{radio-CWn4dw9L.js → radio-BOUTlTbE.js} +1 -1
- package/dist/assets/{refresh-cw-Cly4MRhi.js → refresh-cw-CllqntzE.js} +1 -1
- package/dist/assets/remoteEntry-BsYVmvk8.js +1 -0
- package/dist/assets/rotate-ccw-CdTrnBTI.js +1 -0
- package/dist/assets/rotate-cw-Dre2EA6E.js +1 -0
- package/dist/assets/search-Dx_k5G37.js +1 -0
- package/dist/assets/{send-yaKZ1tHd.js → send-DcXtHjaz.js} +1 -1
- package/dist/assets/{server-CLOtA1S4.js → server-DbU7BgZv.js} +1 -1
- package/dist/assets/shield-BojVNBVL.js +1 -0
- package/dist/assets/square-DynbJcCj.js +1 -0
- package/dist/assets/{square-check-big-DsiPGDCA.js → square-check-big-Ch-X3CcM.js} +1 -1
- package/dist/assets/src-0pbBUmTo.js +349 -0
- package/dist/assets/src-BLHY9yig.js +67 -0
- package/dist/assets/{star-fUCw1hyi.js → star-BotqSaGv.js} +1 -1
- package/dist/assets/{undo-2-DXcExZt9.js → undo-2-CXIWJrgH.js} +1 -1
- package/dist/assets/{upload-CLT-rIe6.js → upload-CafOTsXz.js} +1 -1
- package/dist/assets/{use-scenes-feed-CvesyXw2.js → use-scenes-feed-DTuzztEP.js} +1 -1
- package/dist/assets/useEventInvalidation-BDOhX3vo.js +1 -0
- package/dist/assets/{video-CFtTGKiz.js → video-GQHe9bLG.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BwIIU_83.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-7s6IgvIP.js} +2 -2
- package/dist/assets/{wifi-Glpx3AkR.js → wifi-MOwlhPpo.js} +1 -1
- package/dist/assets/{zap-aTn3GS-l.js → zap-BiojyRpM.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +135 -7
- package/package.json +1 -1
- package/dist/assets/Addons-BOYMP0uf.js +0 -1
- package/dist/assets/CapabilityBadges-DjOvNnpp.js +0 -1
- package/dist/assets/DeviceDetail-DCh8ydpY.js +0 -2
- package/dist/assets/Events-Drj6ybP0.js +0 -1
- package/dist/assets/Network-DBtVDYGt.js +0 -1
- package/dist/assets/Notifications-DBH3QGle.js +0 -1
- package/dist/assets/Pipeline-DgZbCwcO.js +0 -1
- package/dist/assets/Recordings-DTGdM6Ip.js +0 -1
- package/dist/assets/circle-check-big-FvfSWrhR.js +0 -1
- package/dist/assets/clock-BpmU9WHJ.js +0 -1
- package/dist/assets/dist-C2l22cSJ.js +0 -349
- package/dist/assets/index-vZPXzSPK.js +0 -4
- package/dist/assets/play-BkPr3HPj.js +0 -1
- package/dist/assets/plus-zSkh3oEn.js +0 -1
- package/dist/assets/power-C4yi0usE.js +0 -1
- package/dist/assets/remoteEntry-BwhR6qpk.js +0 -1
- package/dist/assets/rotate-ccw-D0bM0VXI.js +0 -1
- package/dist/assets/rotate-cw-CNTEn7nJ.js +0 -1
- package/dist/assets/search-Bq3ZLayo.js +0 -1
- package/dist/assets/square-BlSn3fsr.js +0 -1
- package/dist/assets/src-Buv5KpAz.js +0 -67
- package/dist/assets/src-CQVcBp6b.js +0 -349
- package/dist/assets/useEventInvalidation-B-Cb5-ry.js +0 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-B6qJ4svC.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{t}from"./vite-preload-helper-zJ_50EbN.js";import{A as n,C as r,D as i,E as a,F as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,a as ee,b as m,c as te,d as ne,f as h,g as re,h as g,i as ie,j as _,k as ae,l as oe,m as se,n as ce,o as le,p as v,r as ue,s as de,t as fe,u as pe,v as y,w as b,x,y as S}from"./__vite-browser-external-B6qJ4svC.js";var me=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,e.SystemTlsCertChanged=`system.tls-cert-changed`,e.UpdateAvailable=`update.available`,e.SystemReadyState=`system.ready-state`,e.AddonStarted=`addon.started`,e.AddonStopped=`addon.stopped`,e.AddonRestarted=`addon.restarted`,e.AddonUpdated=`addon.updated`,e.AddonInstalled=`addon.installed`,e.AddonUninstalled=`addon.uninstalled`,e.AddonCrashed=`addon.crashed`,e.AddonRunnerFailed=`addon.runner-failed`,e.AddonError=`addon.error`,e.AddonPageReady=`addon.page-ready`,e.AddonWidgetReady=`addon.widget-ready`,e.AddonLoadFailed=`addon.load-failed`,e.AddonLoadRecovered=`addon.load-recovered`,e.AddonRetryScheduled=`addon.retry-scheduled`,e.SystemLivenessFailed=`system.liveness-failed`,e.SystemLivenessRecovered=`system.liveness-recovered`,e.AddonRetryAttempting=`addon.retry-attempting`,e.DeviceRegistered=`device.registered`,e.DeviceUnregistered=`device.unregistered`,e.DeviceEnabled=`device.enabled`,e.DeviceDisabled=`device.disabled`,e.DeviceSettingsUpdated=`device.settings-updated`,e.DeviceBindingsChanged=`device.bindings-changed`,e.DeviceMetaChanged=`device.meta-changed`,e.DeviceSourceInfoChanged=`device.source-info-changed`,e.DeviceStreamsRegistered=`device.streams-registered`,e.DeviceProvisioned=`device.provisioned`,e.DeviceReady=`device.ready`,e.IntegrationEnabled=`integration.enabled`,e.IntegrationDisabled=`integration.disabled`,e.IntegrationDeleted=`integration.deleted`,e.BrokerStatusChanged=`broker.status-changed`,e.BrokerMessage=`broker.message`,e.ProviderStarted=`provider.started`,e.ProviderStopped=`provider.stopped`,e.ProcessCrashed=`process.crashed`,e.ProcessRestartScheduled=`process.restart_scheduled`,e.ProcessRestarted=`process.restarted`,e.RecordingStarted=`recording.started`,e.RecordingStopped=`recording.stopped`,e.RecordingError=`recording.error`,e.RecordingHealthDegraded=`recording.health.degraded`,e.RecordingStorageCritical=`recording.storage.critical`,e.RecordingSegmentWritten=`recording.segment.written`,e.RecordingPolicyFallback=`recording.policy.fallback`,e.RecordingRetentionCompleted=`recording.retention.completed`,e.RecordingExportProgress=`recording.export.progress`,e.RecordingExportCompleted=`recording.export.completed`,e.RecordingExportFailed=`recording.export.failed`,e.DetectionEvent=`detection.event`,e.SessionTrackNew=`session.track.new`,e.SessionTrackExpired=`session.track.expired`,e.BenchmarkProgress=`benchmark.progress`,e.PlatformProbePhase=`platform-probe.phase`,e.PipelineProgress=`pipeline.progress`,e.PipelineTrace=`pipeline.trace`,e.PipelineInferenceResult=`pipeline.inference-result`,e.PipelineCameraAssigned=`pipeline.camera-assigned`,e.PipelineCameraUnassigned=`pipeline.camera-unassigned`,e.PipelineNodeInferenceUnavailable=`pipeline.node-inference-unavailable`,e.PipelineDetectionBlind=`pipeline.detection-blind`,e.PipelineCameraUpdated=`pipeline.camera-updated`,e.PipelineIngestOwnerChanged=`pipeline.ingest-owner-changed`,e.PipelineRunnerLoadSnapshot=`pipeline.runner-load-snapshot`,e.PipelineCameraMetricsSnapshot=`pipeline.camera-metrics-snapshot`,e.StreamBrokerMetricsSnapshot=`stream-broker.metrics-snapshot`,e.StreamBrokerOnCamStreamDemand=`stream-broker.onCamStreamDemand`,e.StreamBrokerOnCamStreamIdle=`stream-broker.onCamStreamIdle`,e.StreamBrokerOnRequestStreamSourceRefresh=`stream-broker.onRequestStreamSourceRefresh`,e.StreamParamsChanged=`stream-params.changed`,e.DeviceStateChanged=`device.state-changed`,e.ZoneAnalyticsOccupancyChanged=`zone-analytics.occupancy-changed`,e.BatteryOnStatusChanged=`battery.onStatusChanged`,e.BatteryOnWakeStarted=`battery.onWakeStarted`,e.DoorbellOnPressed=`doorbell.onPressed`,e.EventEmitted=`event-emitter.event`,e.PipelineEngineMetricsSnapshot=`pipeline.engine-metrics-snapshot`,e.PipelineEngineProvisioning=`pipeline.engine-provisioning`,e.ClusterTopologySnapshot=`cluster.topology-snapshot`,e.MetricsNodeResourcesSnapshot=`metrics.node-resources-snapshot`,e.MetricsNodeProcessesSnapshot=`metrics.node-processes-snapshot`,e.CapabilityBindingChanged=`capability.binding-changed`,e.ModelDownloadProgress=`model.download.progress`,e.AgentRegistered=`agent.registered`,e.AgentUnregistered=`agent.unregistered`,e.AgentOnline=`agent.online`,e.AgentOffline=`agent.offline`,e.WorkerOnline=`worker.online`,e.WorkerOffline=`worker.offline`,e.AgentTaskDispatched=`agent.task.dispatched`,e.AgentTaskAssigned=`agent.task.assigned`,e.AgentTrpcConnected=`agent.trpc.connected`,e.AgentWsConnected=`agent.ws.connected`,e.AgentWsDisconnected=`agent.ws.disconnected`,e.AgentBackupActivated=`agent.backup.activated`,e.OrchestrationSettingsUpdated=`orchestration.settings-updated`,e.PipelineAgentHwaccelChanged=`pipeline.agent-hwaccel-changed`,e.MotionAnalysis=`detection.motion-analysis`,e.MotionZonesRaw=`detection.motion-zones-raw`,e.MotionOnMotionChanged=`motion.on-motion-changed`,e.DetectionResult=`detection.result`,e.DetectionRaw=`detection.raw`,e.DetectionCameraNative=`detection.camera-native`,e.PipelineAudioInferenceResult=`pipeline.audio-inference-result`,e.DetectionPhaseTransition=`detection.phase-transition`,e.ProviderMotion=`provider.motion`,e.ProviderDetection=`provider.detection`,e.EnrichmentEmbeddingStored=`enrichment.embedding.stored`,e.EnrichmentSceneStateChanged=`enrichment.scene.state-changed`,e.EnrichmentActivitySummary=`enrichment.activity.summary`,e.PipelineAnalyticsTrackLifecycle=`pipeline-analytics.track-lifecycle`,e.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,e.PipelineAnalyticsStationaryChanged=`pipeline-analytics.stationary-changed`,e.PipelineAnalyticsPackageDelivered=`pipeline-analytics.package-delivered`,e.PipelineAnalyticsPackagePickedUp=`pipeline-analytics.package-picked-up`,e.PipelineAnalyticsFaceGalleryChanged=`pipeline-analytics.face-gallery-changed`,e.PipelineAnalyticsPlateGalleryChanged=`pipeline-analytics.plate-gallery-changed`,e.FrigateLiveEvent=`frigate.live-event`,e.CameraStreamsProfileSlotsChanged=`camera-streams.onProfileSlotsChanged`,e.StreamOnline=`stream.online`,e.StreamOffline=`stream.offline`,e.NetworkTunnelStarted=`network.tunnel.started`,e.NetworkTunnelStopped=`network.tunnel.stopped`,e.LocalNetworkChanged=`network.local.changed`,e.MeshNetworkChanged=`network.mesh.changed`,e.BackupCompleted=`backup.completed`,e.BackupRestored=`backup.restored`,e.NotificationDispatched=`notification.dispatched`,e.NotificationFailed=`notification.failed`,e.DeviceUpdated=`device.updated`,e.DeviceOnline=`device.online`,e.DeviceOffline=`device.offline`,e.DeviceAwake=`device.awake`,e.DeviceSleeping=`device.sleeping`,e.RetentionCleanup=`retention.cleanup`,e.AddonsBulkUpdateProgress=`addons.bulk-update-progress`,e.AddonsJobProgress=`addons.job-progress`,e.AddonsJobLog=`addons.job-log`,e.AccessoriesChildVisibilityChanged=`accessories.onChildVisibilityChanged`,e.AccessoriesChanged=`accessories.onAccessoriesChanged`,e.ModelConvertProgress=`model-convert.progress`,e}({}),he=[{id:`overview`,label:`Overview`,icon:`layout-dashboard`,order:-10},{id:`general`,label:`General`,icon:`settings`,order:0},{id:`image`,label:`Image`,icon:`image`,order:5},{id:`light`,label:`Light`,icon:`lightbulb`,order:7},{id:`motion`,label:`Motion`,icon:`activity`,order:10},{id:`audio`,label:`Audio`,icon:`mic`,order:12},{id:`alarms`,label:`Alarms`,icon:`bell-ring`,order:13},{id:`snapshot`,label:`Snapshot`,icon:`camera`,order:15},{id:`osd`,label:`OSD`,icon:`type`,order:18},{id:`stream-broker`,label:`Stream Broker`,icon:`radio`,order:20},{id:`streaming`,label:`Streaming`,icon:`video`,order:35},{id:`ptz`,label:`PTZ`,icon:`move`,order:40},{id:`consumables`,label:`Consumables`,icon:`recycle`,order:44},{id:`pipeline`,label:`Detection Pipeline`,icon:`cpu`,order:39},{id:`detection-pipeline`,label:`Detection pipeline`,icon:`cpu`,order:39},{id:`zones`,label:`Detection`,icon:`shapes`,order:38},{id:`analytics`,label:`Analytics`,icon:`activity`,order:37},{id:`live-stats`,label:`Live Stats`,icon:`activity`,order:39},{id:`recording`,label:`Recording`,icon:`circle-dot`,order:40},{id:`engine`,label:`Inference Engine`,icon:`zap`,order:41},{id:`scheduler`,label:`Scheduler`,icon:`list-checks`,order:42},{id:`decoder`,label:`Decoder`,icon:`film`,order:43},{id:`notifications`,label:`Notifications`,icon:`bell`,order:50},{id:`network`,label:`Network`,icon:`globe`,order:60},{id:`storage`,label:`Storage`,icon:`hard-drive`,order:70},{id:`advanced`,label:`Advanced`,icon:`wrench`,order:100}],ge=Object.fromEntries(he.map(e=>[e.id,e]));function _e(e){return e.type===`separator`||e.type===`info`||e.type===`qr-code`||e.type===`button`||e.type===`object-array`||e.type===`widget`||e.type===`addon-action-button`||e.type===`device-action-button`}function ve(e){let t=new Map;if(typeof e!=`object`||!e)return t;let n=e.sections;if(!Array.isArray(n))return t;for(let e of n)typeof e==`object`&&e&&ye(e.fields,t);return t}function ye(e,t){if(Array.isArray(e))for(let n of e){if(typeof n!=`object`||!n)continue;let e=n.type;if(e===`group`){ye(n.fields,t);continue}if(e===`sub-tabs`){let e=n.tabs;if(Array.isArray(e))for(let n of e)typeof n==`object`&&n&&ye(n.fields,t);continue}let r=n.key;typeof r!=`string`||r.length===0||`value`in n&&t.set(r,{value:n.value,default:n.default})}}function be(e){let t=new Map;for(let[n,r]of ve(e))t.set(n,r.value??r.default);return t}function xe(e,t){let n=ve(e).get(t);return n===void 0?void 0:n.value??n.default}function Se(e,t){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>Ce(e,t))}))}}function Ce(e,t){if(_e(e))return e;if(e.type===`group`){let n=e.fields.map(e=>Ce(e,t));return{...e,fields:n}}if(e.type===`sub-tabs`){let n=e.tabs.map(e=>({...e,fields:e.fields.map(e=>Ce(e,t))}));return{...e,tabs:n}}let n=e.key,r=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.default;if(e.multiple){let t=Array.isArray(r)?r:r==null?[]:[r],n=e.multiple.itemDefault===void 0?i===void 0?we(e)===`string`?``:null:i:e.multiple.itemDefault,a=Math.max(e.multiple.min,t.length),o=[];for(let e=0;e<a;e++)o.push(e<t.length?t[e]:n);return{...e,value:o}}let a=r===void 0?i===void 0?null:i:r,o=e.type===`textarea`&&e.isJson&&typeof a==`object`&&a?JSON.stringify(a,null,2):a;return{...e,value:o}}function we(e){switch(e.type){case`text`:case`textarea`:case`password`:case`color`:case`probe`:case`timezone`:case`datetime`:return`string`;case`number`:case`slider`:return`number`;case`boolean`:return`boolean`;default:return`other`}}function Te(e,t){return e.category===t}function Ee(e,t,n){return{id:typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:t,category:e,data:n}}function De(e,t){let n=t.ts??Date.now();e.emit(Ee(`system.ready-state`,{type:`capability`,id:t.capName,nodeId:t.sourceNodeId},{capName:t.capName,scope:t.scope,state:t.state,generation:t.generation,sourceNodeId:t.sourceNodeId,ts:n}))}function Oe(e){let t=async()=>{let t=(await e.read())[e.key];if(t===void 0)return e.fallback;let n=e.schema.safeParse(t);return n.success?n.data:(e.onParseError?.(e.key,n.error),e.fallback)},n=async t=>{let n=e.schema.parse(t);await e.write({[e.key]:n})};return{get:t,set:n,update:async e=>{await n(e(await t()))}}}function ke(e){if(e==null||e===``)return`hub`;let t=e.indexOf(`/`);if(t<0)return e;let n=e.slice(0,t);return n===``?`hub`:n}function Ae(e,t){return`${e}@${ke(t)}`}function je(e,t,n){return e[Ae(t,n)]}function Me(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[t.has(i)?Ae(i,n):i]=a;return r}function Ne(e,t,n){let r={};for(let[n,i]of Object.entries(e))n.includes(`@`)||t.has(n)||(r[n]=i);for(let i of t){let t=je(e,i,n);t!==void 0&&(r[i]=t)}return r}var Pe=class{_ctx=null;_config;_readinessGeneration=typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(e){this.defaults=e,this._config={...e}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(e){this._ctx=e,await this.resolveConfig();let t=await this.onInitialize();this.emitLifecycle(me.AddonStarted);let n=Ie(t),r=n&&`providers`in n&&n.providers?n.providers:[];return this._registeredCapNames=r.map(e=>e.capability.name),n}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders(`ready`)}async onHubReachable(){}async shutdown(){this.emitLifecycle(me.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders(`down`),await this.onShutdown();for(let e of this._subscriptions)e();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(e){return e}schema(e){return e}globalSettingsSchema(e){return null}deviceSettingsSchema(){return null}async getGlobalSettings(e,t,n){let r=this.globalSettingsSchema(t);if(!r)return{sections:[]};let i=await this.resolveGlobalStore(n,t);return Se(r,e?{...i,...e}:i)}async resolveGlobalStore(e,t){let n=await this._ctx?.settings?.readAddonStore()??{},r=this.perNodeKeys(t),i=ke(e??this._ctx?.kernel?.localNodeId);return r.size>0?Ne(n,r,i):n}async updateGlobalSettings(e,t){let n=this.perNodeKeys(),r=ke(this._ctx?.kernel?.localNodeId),i=ke(t??this._ctx?.kernel?.localNodeId),a=e,o=n.size>0?Me(a,n,i):a;await this._ctx?.settings?.writeAddonStore(o),i===r&&(await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(me.AddonUpdated,{level:`global`}),this.maybeAutoRestart(e,this.globalSettingsSchema()))}_perNodeKeysCache=new Map;perNodeKeys(e){let t=e??``,n=this._perNodeKeysCache.get(t);if(n)return n;let r=this.globalSettingsSchema(e),i=new Set(r?r.sections.flatMap(e=>Fe(e.fields)):[]);return this._perNodeKeysCache.set(t,i),i}maybeAutoRestart(e,t){if(!t)return;let n=new Set;for(let e of t.sections)for(let t of e.fields)t.type===`separator`||t.type===`info`||t.requiresRestart&&n.add(t.key);if(n.size===0||!Object.keys(e).some(e=>n.has(e)))return;let r=this._ctx;if(!r)return;let i=r.id;setImmediate(()=>{r.api.addons?.restartAddon?.mutate({addonId:i}).then(()=>{r.logger.info(`addon auto-restart triggered by restart-required setting change`,{meta:{changedFields:Object.keys(e).filter(e=>n.has(e))}})}).catch(e=>{r.logger.error(`addon auto-restart failed`,{meta:{error:e instanceof Error?e.message:String(e)}})})})}async getDeviceSettings(e){let t=this.deviceSettingsSchema();return t?Se(t,await this._ctx?.settings?.readDeviceStore(e)??{}):{sections:[]}}async updateDeviceSettings(e,t){await this._ctx?.settings?.writeDeviceStore(e,t)}_subscriptions=[];watchCapability(e,t){let n=new Set(Array.isArray(e)?e:[e]);this.subscribe({category:`system.ready-state`},e=>{let r=e.data;if(typeof r.capName!=`string`||!n.has(r.capName)||r.scope?.type!==`node`)return;let i=r.scope.nodeId;if(typeof i!=`string`||i.length===0)return;let a=r.capName;r.state===`down`?t.onDown?.(i,a):r.state===`ready`&&t.onReady?.(i,a)})}subscribe(e,t){let n=this.ctx.eventBus.subscribe(e,t);this._subscriptions.push(n)}emitLifecycle(e,t){try{let n=this._ctx;if(!n)return;n.eventBus.emit({id:`${n.id}-${Date.now()}`,timestamp:new Date,source:{type:`addon`,id:n.id,nodeId:n.kernel.localNodeId??`hub`},category:e,data:{addonId:n.id,...t}})}catch{}}emitReadinessForProviders(e){let t=this._ctx;if(!t||this._registeredCapNames.length===0)return;let n=t.kernel?.localNodeId??`hub`,r=n.includes(`/`)?n.split(`/`)[0]:n;for(let n of this._registeredCapNames)try{De(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:n}=await t(async()=>{let{join:t}=await import(`./__vite-browser-external-B6qJ4svC.js`).then(t=>e(t.t(),1));return{join:t}},__vite__mapDeps([0,1])),{promises:r}=await t(async()=>{let{promises:t}=await import(`./__vite-browser-external-B6qJ4svC.js`).then(t=>e(t.t(),1));return{promises:t}},__vite__mapDeps([0,1])),i=n(this.ctx.nodeDataDir,`models`);return await r.mkdir(i,{recursive:!0}),i}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){let e=await this.readAddonStoreWithRetry(),t=this.perNodeKeys(),n=ke(this._ctx?.kernel?.localNodeId),r={...this.defaults};for(let i of Object.keys(this.defaults)){let a=t.has(i)?je(e,i,n):e[i];if(a!=null){let e=typeof this.defaults[i];typeof a===e&&(r[i]=a)}}this._config=r}state(e,t,n){return Oe({key:e,schema:t,fallback:n,read:()=>this.readAddonStoreWithRetry(),write:async e=>{await this._ctx?.settings?.writeAddonStore(e)},onParseError:(e,t)=>this._ctx?.logger?.warn?.(`durable-state: stored "${e}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,key:e,error:String(t)}})})}deviceState(e,t,n,r){return Oe({key:t,schema:n,fallback:r,read:async()=>await this._ctx?.settings?.readDeviceStore(e)??{},write:async t=>{await this._ctx?.settings?.writeDeviceStore(e,t)},onParseError:(t,n)=>this._ctx?.logger?.warn?.(`durable-state: stored device ${e} "${t}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,deviceId:e,key:t,error:String(n)}})})}async readAddonStoreWithRetry(){let e=this._ctx?.settings;if(!e)return{};let t=[150,350,600,900],n;for(let r=0;r<=t.length;r++)try{return await e.readAddonStore()??{}}catch(e){n=e;let i=e instanceof Error?e.message:String(e);if(!(i.includes(`SqliteSettingsBackend not initialized`)||i.includes(`provider not available`)))throw e;if(r===t.length)break;await new Promise(e=>setTimeout(e,t[r]))}return this._ctx?.logger?.warn?.(`readAddonStore: settings-store unavailable after retries — using defaults`,{meta:{error:n instanceof Error?n.message:String(n)}}),{}}};function Fe(e){let t=[];for(let n of e){if(n.type===`group`){t.push(...Fe(n.fields));continue}if(n.type===`sub-tabs`){for(let e of n.tabs)t.push(...Fe(e.fields));continue}`perNode`in n&&n.perNode===!0&&t.push(n.key)}return t}function Ie(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}var Le=class{disposers=[];disposed=!1;onError;constructor(e={}){this.onError=e.onError??((e,t)=>{console.error(`[DisposerChain] disposer #${t} threw`,e)})}add(e){if(this.disposed){try{let t=e();t&&typeof t.then==`function`&&t.catch(e=>this.onError(e,-1))}catch(e){this.onError(e,-1)}return()=>void 0}return this.disposers.push(e),()=>{let t=this.disposers.indexOf(e);t>=0&&this.disposers.splice(t,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;let e=this.disposers.slice().toReversed();this.disposers=[];for(let t=0;t<e.length;t++){let n=e[t];try{let e=n();e&&typeof e.then==`function`&&await e}catch(n){this.onError(n,e.length-1-t)}}}},Re=`x-camstack-dataplane-secret`,C=h([`high`,`mid`,`low`]),ze=[`high`,`mid`,`low`],Be=h([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-flv`,`pull-rfc4571`,`push-annexb`,`derived`]),Ve=i({width:a().int().positive(),height:a().int().positive()}),He=i({camStreamId:_().min(1),deviceId:a().int().nonnegative(),kind:Be,url:_().optional(),codec:_().optional(),resolution:Ve.optional(),fps:a().positive().optional(),label:_().optional(),deviceFeatures:p(_()).optional(),autoEligible:y().optional(),metadata:n(_(),u()).optional()}),Ue=h([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),We=i({deviceId:a().int().nonnegative(),profile:C,brokerId:_(),sourceCamStreamId:_().nullable(),status:Ue,resolution:Ve.optional(),codec:_().optional(),preBufferSec:a().nonnegative().optional(),errorMessage:_().optional()});function Ge(e,t){return`${e}/${t}`}function Ke(e,t){return`${e}/${t}`}function qe(e){let t=e.indexOf(`/`);if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);if(!/^\d+$/.test(n))return null;let i=C.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function Je(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>ze.indexOf(e.profile)-ze.indexOf(t.profile)),r=new Set,i=[];for(let e of n){let t=e.sourceCamStreamId;t!==null&&(r.has(t)||(r.add(t),i.push(e)))}return i}var Ye=i({id:_(),label:_(),protocol:h([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:_().optional(),resolution:i({width:a(),height:a()}).readonly().optional(),fps:a().optional(),bitrate:a().optional(),codec:_().optional(),profileHint:C.optional()}),Xe=i({type:_(),url:_(),videoCodec:_().optional(),audioCodec:_().optional(),metadata:n(_(),u()).readonly().optional()}),Ze=i({type:h([`video`,`audio`]),data:v(Uint8Array),pts:a(),dts:a(),keyframe:y(),codec:_()}),Qe=i({data:v(Uint8Array),width:a(),height:a(),format:h([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),timestamp:a()}),w=i({shmId:_(),slot:a().int().nonnegative(),seq:a().int().nonnegative(),width:a().int().positive(),height:a().int().positive(),format:h([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:a(),byteLength:a().int().nonnegative(),nodeId:_(),slotCount:a().int().positive()}),$e=h([`rgb`,`bgr`,`yuv420`,`gray`]),et=i({brokerId:_(),format:$e,maxFps:a().positive().optional(),tag:_().optional()}),tt=i({subscriptionId:_(),maxFps:a().nonnegative()}),nt=i({data:v(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),timestamp:a()}),rt=i({brokerId:_(),tag:_().optional()}),it=i({subscriptionId:_()}),at=h([`idle`,`connecting`,`streaming`,`error`,`stopped`]),ot=i({status:at,inputFps:a(),decodeFps:a(),encodedSubscribers:a(),decodedSubscribers:a(),uptimeMs:a(),bitrateKbps:a(),idrIntervalMs:a(),codec:_().optional(),totalBytes:a(),packetCount:a(),rtspClients:a(),pipeClients:a(),preBufferSec:a(),preBufferMs:a(),preBufferPackets:a(),decoderNodeId:_().nullable(),audio:i({codec:_(),sampleRate:a(),channels:a(),supported:y()}).nullable().optional(),audioMuted:y().optional(),audioMutedDropped:a().optional()}),st=i({profile:C,brokerId:_(),url:_(),mutedUrl:_(),enabled:y(),codec:_().optional(),resolution:Ve.optional()}),ct=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${T(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function lt(e,t){return`${e}|${T(t)}`}function T(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function ut(e){switch(e){case`starting`:return 0;case`ready`:return 1;case`down`:return 2}}function dt(e,t){return e.type===t.type?e.type===`global`||t.type===`global`?!0:e.type===`node`&&t.type===`node`?e.nodeId===t.nodeId:e.type===`device`&&t.type===`device`?e.deviceId===t.deviceId:!1:!1}var ft=class{bus;sourceNodeId;logger;now;generation;verboseDeviceScopeLogs;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(e){if(this.bus=e.eventBus,this.sourceNodeId=e.sourceNodeId,this.logger=e.logger,this.now=e.now??(()=>Date.now()),this.generation=e.generation??pt(),this.verboseDeviceScopeLogs=e.verboseDeviceScopeLogs??!1,this.unsubscribeBus=this.bus.subscribe({category:`system.ready-state`},e=>this.ingest(e.data)),this.unsubscribeAgentOffline=this.bus.subscribe({category:`agent.offline`},e=>this.synthesizeDownForNode(e.data.agentId)),typeof this.bus.getRecent==`function`)try{let e=this.bus.getRecent({category:`system.ready-state`});for(let t of e)this.ingest(t.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(e,t){return this.snapshot.get(lt(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){let t=this.now(),n=0;for(let r of e){let e=lt(r.capName,r.scope),i=this.snapshot.get(e)??null,a,o;if(i!==null){if(this.isLocallyAuthoritative(i))continue;let e=i.generation===r.generation;if(e&&ut(r.state)<=ut(i.state))continue;a=!e&&r.state===`ready`?i.epoch+1:i.epoch,o=Math.max(0,t-i.lastChange)}else a=1,o=0;let s={capName:r.capName,scope:r.scope,state:r.state,generation:r.generation,epoch:a,lastChange:t,sourceNodeId:r.sourceNodeId};this.snapshot.set(e,s),n++,this.logPerRecord(r.scope,`readiness: ${r.capName} (${T(r.scope)}) → ${r.state} (hydrated${i===null?``:` update`}, gen=${r.generation.slice(0,6)})`);let c={capName:r.capName,scope:r.scope,state:r.state,epoch:a,generation:r.generation,sourceNodeId:`hydrated`,ts:t,durationInPrevState:o};for(let e of this.subscriptions)if(e.capName===r.capName&&dt(e.scope,r.scope))try{e.handler(c)}catch(e){this.logger?.warn(`readiness hydrate handler threw for ${r.capName}: ${e.message??String(e)}`)}}return n}logPerRecord(e,t){if(this.logger){if(e.type===`device`){if(!this.verboseDeviceScopeLogs)return;this.logger.debug(t,{tags:{deviceId:e.deviceId}});return}this.logger.debug(t)}}isLocallyAuthoritative(e){return e.scope.type===`node`?e.scope.nodeId===this.sourceNodeId:e.sourceNodeId===this.sourceNodeId}getAll(){return new Map(this.snapshot)}emitReady(e,t){this.emitTransition(e,t,`ready`)}emitStarting(e,t){this.emitTransition(e,t,`starting`)}emitDown(e,t){this.emitTransition(e,t,`down`)}awaitReady(e,t,n={}){let r=n.timeoutMs??1/0,i=this.now();return this.get(e,t)?.state===`ready`?Promise.resolve():n.signal?.aborted?Promise.reject(n.signal.reason??Error(`aborted`)):new Promise((a,o)=>{let s=!1,c=this.onReadyState(e,t,e=>{e.state===`ready`&&(s||(s=!0,f(),a()))}),l=Number.isFinite(r)?setTimeout(()=>{s||(s=!0,f(),o(new ct(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${T(t)}) after ${this.now()-i}ms`)},3e4);typeof u.unref==`function`&&u.unref();let d=()=>{s||(s=!0,f(),o(n.signal?.reason??Error(`aborted`)))};n.signal?.addEventListener(`abort`,d,{once:!0});function f(){c(),l!==null&&clearTimeout(l),clearInterval(u),n.signal?.removeEventListener(`abort`,d)}})}onReadyState(e,t,n){let r={capName:e,scope:t,handler:n};this.subscriptions.add(r);let i=this.get(e,t);return i!==null&&queueMicrotask(()=>{this.subscriptions.has(r)&&n({capName:e,scope:t,state:i.state,epoch:i.epoch,generation:i.generation,sourceNodeId:this.sourceNodeId,ts:i.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(r)}}emitTransition(e,t,n){let r=this.now();this.bus.emit(Ee(`system.ready-state`,{type:`capability`,id:e,nodeId:this.sourceNodeId},{capName:e,scope:t,state:n,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:r}))}ingest(e){if(typeof e?.capName!=`string`||e.state!==`ready`&&e.state!==`starting`&&e.state!==`down`||typeof e.generation!=`string`||e.scope?.type!==`global`&&e.scope?.type!==`node`&&e.scope?.type!==`device`)return;let t=lt(e.capName,e.scope),n=this.snapshot.get(t)??null,r=this.now(),i;if(i=n===null?+(e.state===`ready`):n.generation!==e.generation&&e.state===`ready`?n.epoch+1:n.epoch,n!==null&&n.generation===e.generation&&n.state===e.state)return;let a=n===null?0:Math.max(0,r-n.lastChange),o={capName:e.capName,scope:e.scope,state:e.state,generation:e.generation,epoch:i,lastChange:r,sourceNodeId:e.sourceNodeId};this.snapshot.set(t,o);let s={capName:e.capName,scope:e.scope,state:e.state,epoch:i,generation:e.generation,sourceNodeId:e.sourceNodeId,ts:e.ts,durationInPrevState:a};this.logPerRecord(e.scope,`readiness: ${e.capName} (${T(e.scope)}) → ${e.state} epoch=${i} gen=${e.generation.slice(0,6)} (prev ${a}ms)`);for(let t of this.subscriptions)if(t.capName===e.capName&&dt(t.scope,e.scope))try{t.handler(s)}catch(t){this.logger?.warn(`readiness handler threw for ${e.capName}: ${t.message??String(t)}`)}}synthesizeDownForNode(e){let t=this.now();for(let[n,r]of this.snapshot){if(r.state===`down`||!(r.scope.type===`node`&&r.scope.nodeId===e||r.scope.type===`device`&&r.sourceNodeId===e))continue;let i=Math.max(0,t-r.lastChange),a={...r,state:`down`,lastChange:t};this.snapshot.set(n,a);let o={capName:r.capName,scope:r.scope,state:`down`,epoch:r.epoch,generation:r.generation,sourceNodeId:this.sourceNodeId,ts:t,durationInPrevState:i};this.logPerRecord(r.scope,`readiness: ${r.capName} (${T(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&dt(e.scope,r.scope))try{e.handler(o)}catch(e){this.logger?.warn(`readiness handler threw during agent.offline demux for ${r.capName}: ${e.message??String(e)}`)}}}};function pt(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function mt(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}var ht=`__camstackNodePin`;function gt(e){return{context:{[ht]:_t(e)}}}function _t(e){let t=e.split(`/`)[0];return t===void 0||t.length===0?e:t}function vt(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,ht);return typeof t==`string`?t:void 0}var yt=`session`;function bt(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var xt=i({id:_(),title:_(),description:_().optional(),style:h([`card`,`accordion`]).optional(),defaultCollapsed:y().optional(),columns:c([b(1),b(2),b(3),b(4)]).optional(),tab:_().optional(),location:h([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(re())}),St=i({tabs:p(i({id:_(),label:_(),icon:_(),order:a().optional()})).optional(),sections:p(xt)}).nullable(),Ct={getDeviceSettingsContribution:{input:i({deviceId:a()}),output:St,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:i({deviceId:a()}),output:St,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:i({deviceId:a(),patch:n(_(),u())}),output:i({success:b(!0)}),kind:`mutation`,auth:`admin`}},wt={getStatus:{input:i({deviceId:a()}),output:u().nullable(),kind:`query`,auth:`protected`}};function Tt(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...Ct,...t}),e.status&&(t={...wt,...t}),t}function E(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},...n?.caller===void 0?{}:{caller:n.caller},timeoutMs:n?.timeoutMs}}function Et(e,t,n){return{...E(e,t,n),systemOnly:!0}}function D(e){return{data:e}}function Dt(e){return e?.deviceConfig!==void 0}var Ot=i({staticDir:_()}),kt=i({version:_()}),At={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:E(g(),Ot),getVersion:E(g(),kt)}},O=function(e){return e.Camera=`camera`,e.Hub=`hub`,e.Light=`light`,e.Siren=`siren`,e.Switch=`switch`,e.Sensor=`sensor`,e.Thermostat=`thermostat`,e.Climate=`climate`,e.Button=`button`,e.EventEmitter=`event-emitter`,e.Update=`update`,e.Generic=`generic`,e.Notifier=`notifier`,e.Script=`script`,e.Automation=`automation`,e.Lock=`lock`,e.Cover=`cover`,e.Valve=`valve`,e.Humidifier=`humidifier`,e.WaterHeater=`water-heater`,e.Fan=`fan`,e.MediaPlayer=`media-player`,e.AlarmPanel=`alarm-panel`,e.Control=`control`,e.Presence=`presence`,e.Weather=`weather`,e.Vacuum=`vacuum`,e.LawnMower=`lawn-mower`,e.Container=`container`,e.Image=`image`,e.PetFeeder=`pet-feeder`,e}({}),jt=function(e){return e.BatteryOperated=`battery-operated`,e.Rebootable=`rebootable`,e.Resyncable=`resyncable`,e.NativeSnapshot=`native-snapshot`,e.DoorbellButton=`doorbell-button`,e.TwoWayAudio=`two-way-audio`,e.PanTiltZoom=`pan-tilt-zoom`,e.PtzAutotrack=`ptz-autotrack`,e.MotionTrigger=`motion-trigger`,e.LightColorRgb=`light-color-rgb`,e.LightColorHsv=`light-color-hsv`,e.LightColorMired=`light-color-mired`,e.ClimateDualSetpoint=`climate-dual-setpoint`,e.ClimateHumidity=`climate-humidity`,e.ClimateFanMode=`climate-fan-mode`,e.ClimatePreset=`climate-preset`,e.ClimateSwingVertical=`climate-swing-vertical`,e.ClimateSwingHorizontal=`climate-swing-horizontal`,e.CoverPositionable=`cover-positionable`,e.CoverTilt=`cover-tilt`,e.ValvePositionable=`valve-positionable`,e.FanSpeed=`fan-speed`,e.FanPreset=`fan-preset`,e.FanDirection=`fan-direction`,e.FanOscillating=`fan-oscillating`,e.LockPinRequired=`lock-pin-required`,e.LockOpen=`lock-open`,e.MediaPlayerSeek=`media-player-seek`,e.MediaPlayerVolume=`media-player-volume`,e.MediaPlayerMute=`media-player-mute`,e.MediaPlayerShuffle=`media-player-shuffle`,e.MediaPlayerRepeat=`media-player-repeat`,e.MediaPlayerSelectSource=`media-player-select-source`,e.MediaPlayerPlayMedia=`media-player-play-media`,e.MediaPlayerNext=`media-player-next`,e.MediaPlayerPrevious=`media-player-previous`,e.MediaPlayerStop=`media-player-stop`,e.AlarmPinRequired=`alarm-pin-required`,e.PresenceGps=`presence-gps`,e.NotifierImage=`notifier-image`,e.NotifierPriority=`notifier-priority`,e.NotifierData=`notifier-data`,e.NotifierActions=`notifier-actions`,e.NotifierRecipients=`notifier-recipients`,e.ScriptVariables=`script-variables`,e.AutomationSkipCondition=`automation-skip-condition`,e.VacuumHasMap=`vacuum-has-map`,e.VacuumHasAi=`vacuum-has-ai`,e.MowerHasMap=`mower-has-map`,e.MowerHasTargetedMowing=`mower-has-targeted-mowing`,e}({}),Mt=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),k=function(e){return e.Siren=`siren`,e.Floodlight=`floodlight`,e.Spotlight=`spotlight`,e.PirSensor=`pir-sensor`,e.Chime=`chime`,e.Autotrack=`autotrack`,e.Nightvision=`nightvision`,e.PrivacyMask=`privacy-mask`,e.Doorbell=`doorbell`,e.BinaryHelper=`binary-helper`,e.MotionSensor=`motion-sensor`,e.ContactSensor=`contact-sensor`,e.LeakSensor=`leak-sensor`,e.SmokeSensor=`smoke-sensor`,e.COSensor=`co-sensor`,e.GasSensor=`gas-sensor`,e.TamperSensor=`tamper-sensor`,e.VibrationSensor=`vibration-sensor`,e.ConnectivitySensor=`connectivity-sensor`,e.SoundSensor=`sound-sensor`,e.BinarySensor=`binary-sensor`,e.TemperatureSensor=`temperature-sensor`,e.HumiditySensor=`humidity-sensor`,e.AmbientLightSensor=`ambient-light-sensor`,e.PressureSensor=`pressure-sensor`,e.WindSensor=`wind-sensor`,e.RainSensor=`rain-sensor`,e.UvSensor=`uv-sensor`,e.SolarRadiationSensor=`solar-radiation-sensor`,e.SoilMoistureSensor=`soil-moisture-sensor`,e.PowerSensor=`power-sensor`,e.EnergySensor=`energy-sensor`,e.VoltageSensor=`voltage-sensor`,e.CurrentSensor=`current-sensor`,e.AirQualitySensor=`air-quality-sensor`,e.BatterySensor=`battery-sensor`,e.NumericSensor=`numeric-sensor`,e.EnumSensor=`enum-sensor`,e.DateTimeSensor=`datetime-sensor`,e.GenericSensor=`generic-sensor`,e.NumericControl=`numeric-control`,e.SelectControl=`select-control`,e.TextControl=`text-control`,e.DateTimeControl=`datetime-control`,e.MobilePushNotifier=`mobile-push-notifier`,e.MessagingNotifier=`messaging-notifier`,e.EmailNotifier=`email-notifier`,e.GenericNotifier=`generic-notifier`,e}({}),Nt=i({staticDir:_()}),Pt=i({version:_()}),Ft={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:E(g(),Nt),getVersion:E(g(),Pt)}},It=i({id:_(),label:_(),protocol:h([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:_().optional(),resolution:i({width:a(),height:a()}).optional(),fps:a().optional(),bitrate:a().optional(),codec:_().optional(),profileHint:C.optional(),sdp:_().optional()}),Lt=i({key:_(),value:u()}),Rt=i({source:_(),data:n(_(),u())}),zt={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:E(i({deviceId:a()}),p(It)),getConfigEntries:E(i({deviceId:a()}),p(Lt)),setConfig:E(i({deviceId:a(),values:n(_(),u())}),g(),{kind:`mutation`}),runAction:E(i({deviceId:a(),action:_().min(1),input:u()}),u(),{kind:`mutation`}),removeDevice:E(i({deviceId:a()}),g(),{kind:`mutation`}),getSettingsSchema:E(i({deviceId:a()}),u().nullable()),getRawState:E(i({deviceId:a()}),Rt.nullable(),{auth:`protected`})}},Bt=`device.state-changed`;function Vt(e){let t=new Map,n=new Map,r=null,i=(e,t)=>`${e}:${t}`,a=()=>{r||e.live?.onEvent&&(r=e.live.onEvent.subscribe({category:Bt},{onData:e=>{let r=e.data;if(!r||typeof r.deviceId!=`number`||typeof r.capName!=`string`)return;let a=i(r.deviceId,r.capName);t.set(a,r.slice);let o=n.get(a);if(o)for(let e of o)try{e(r.slice)}catch{}}}))},o=()=>{r&&(n.size>0||(r.unsubscribe(),r=null))};return{read(e,n){return t.get(i(e,n))},async refresh(r,a){let o=await e.deviceState.getCapSlice.query({deviceId:r,capName:a}),s=i(r,a);t.set(s,o??void 0);let c=n.get(s);if(c)for(let e of c)try{e(o??void 0)}catch{}},watch(e,t,r){let s=i(e,t),c=n.get(s);return c||(c=new Set,n.set(s,c)),c.add(r),a(),()=>{c.delete(r),c.size===0&&n.delete(s),o()}},async write(t,n,r){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:n,slice:r})}}}function Ht(e,t,n){let r=(e,t)=>`${e}:${t}`;return{read(t,n){return e.get(t)?.get(n)},async refresh(){},watch(e,n,i){let a=r(e,n),o=t.get(a);return o||(o=new Set,t.set(a,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(a)}},async write(e,t,r){if(!n)throw Error(`createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source`);await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function A(e,t,n){let r=Ut(e)?e:Vt(e);return{get value(){return r.read(t,n)},refresh(){return r.refresh(t,n)},subscribe(e){let i=r.watch(t,n,t=>{try{e(t)}catch{}});try{e(r.read(t,n))}catch{}return r.read(t,n)===void 0&&r.refresh(t,n).catch(()=>void 0),i},async set(e){await r.write(t,n,e)},async patch(e){let i={...r.read(t,n),...e};await r.write(t,n,i)}}}function Ut(e){return typeof e.read==`function`&&typeof e.watch==`function`}function Wt(e,t,n){let r=e,i=n?.stateSource??Vt(e);function a(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function o(e,t,n,i,a){let o=r[e]?.[t];if(!o)throw Error(`DeviceProxy: api has no '${e}.${t}'`);let s=o;return n===`mutation`?s.mutate(i):n===`subscription`?s.subscribe(i,a):s.query(i)}function s(e,n,r,i,s,c){return o(n,r,i,a(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function c(e,t,n,r,i){return o(e,t,n,a(r,void 0),i)}return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:A(i,t.deviceId,`air-quality-sensor`),alarmPanel:A(i,t.deviceId,`alarm-panel`),ambientLightSensor:A(i,t.deviceId,`ambient-light-sensor`),audioMetrics:A(i,t.deviceId,`audio-metrics`),automationControl:A(i,t.deviceId,`automation-control`),battery:A(i,t.deviceId,`battery`),binary:A(i,t.deviceId,`binary`),brightness:A(i,t.deviceId,`brightness`),cameraStreams:A(i,t.deviceId,`camera-streams`),carbonMonoxide:A(i,t.deviceId,`carbon-monoxide`),climateControl:A(i,t.deviceId,`climate-control`),color:A(i,t.deviceId,`color`),connectivity:A(i,t.deviceId,`connectivity`),consumables:A(i,t.deviceId,`consumables`),contact:A(i,t.deviceId,`contact`),control:A(i,t.deviceId,`control`),cover:A(i,t.deviceId,`cover`),dayNight:A(i,t.deviceId,`day-night`),deviceDiscovery:A(i,t.deviceId,`device-discovery`),deviceStatus:A(i,t.deviceId,`device-status`),doorbell:A(i,t.deviceId,`doorbell`),enumSensor:A(i,t.deviceId,`enum-sensor`),eventEmitter:A(i,t.deviceId,`event-emitter`),fanControl:A(i,t.deviceId,`fan-control`),featureProbe:A(i,t.deviceId,`feature-probe`),flood:A(i,t.deviceId,`flood`),gas:A(i,t.deviceId,`gas`),humidifier:A(i,t.deviceId,`humidifier`),humiditySensor:A(i,t.deviceId,`humidity-sensor`),image:A(i,t.deviceId,`image`),imageSettings:A(i,t.deviceId,`image-settings`),intercom:A(i,t.deviceId,`intercom`),lawnMowerControl:A(i,t.deviceId,`lawn-mower-control`),lockControl:A(i,t.deviceId,`lock-control`),mediaPlayer:A(i,t.deviceId,`media-player`),motion:A(i,t.deviceId,`motion`),motionTrigger:A(i,t.deviceId,`motion-trigger`),motionZones:A(i,t.deviceId,`motion-zones`),nativeObjectDetection:A(i,t.deviceId,`native-object-detection`),notifier:A(i,t.deviceId,`notifier`),numericSensor:A(i,t.deviceId,`numeric-sensor`),petFeeder:A(i,t.deviceId,`pet-feeder`),powerMeter:A(i,t.deviceId,`power-meter`),presence:A(i,t.deviceId,`presence`),pressureSensor:A(i,t.deviceId,`pressure-sensor`),privacyMask:A(i,t.deviceId,`privacy-mask`),ptzAutotrack:A(i,t.deviceId,`ptz-autotrack`),sceneMonitor:A(i,t.deviceId,`scene-monitor`),scriptRunner:A(i,t.deviceId,`script-runner`),smoke:A(i,t.deviceId,`smoke`),streamCatalog:A(i,t.deviceId,`stream-catalog`),streamParams:A(i,t.deviceId,`stream-params`),switch:A(i,t.deviceId,`switch`),tamper:A(i,t.deviceId,`tamper`),temperatureSensor:A(i,t.deviceId,`temperature-sensor`),update:A(i,t.deviceId,`update`),vacuumControl:A(i,t.deviceId,`vacuum-control`),valve:A(i,t.deviceId,`valve`),vibration:A(i,t.deviceId,`vibration`),waterHeater:A(i,t.deviceId,`water-heater`),weather:A(i,t.deviceId,`weather`),zoneAnalytics:A(i,t.deviceId,`zone-analytics`),zoneRules:A(i,t.deviceId,`zone-rules`),zones:A(i,t.deviceId,`zones`)},accessories:{setChildHidden:e=>s(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>s(`accessories`,`accessories`,`getStatus`,`query`,e)},airQualitySensor:{getStatus:e=>s(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},alarmPanel:{arm:e=>s(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>s(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>s(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>s(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},ambientLightSensor:{getStatus:e=>s(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},audioAnalysis:{resolveDeviceSettings:e=>s(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},audioMetrics:{getCurrentSnapshot:e=>s(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>s(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},automationControl:{enable:e=>s(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>s(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>s(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>s(`automation-control`,`automationControl`,`getStatus`,`query`,e)},battery:{wakeForStream:e=>s(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>s(`battery`,`battery`,`getStatus`,`query`,e)},binary:{getStatus:e=>s(`binary`,`binary`,`getStatus`,`query`,e)},brightness:{setBrightness:e=>s(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>s(`brightness`,`brightness`,`getStatus`,`query`,e)},button:{press:e=>s(`button`,`button`,`press`,`mutation`,e)},cameraCredentials:{getCredentials:e=>s(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>s(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},cameraStreams:{getCameraStreams:e=>s(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>s(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>s(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},carbonMonoxide:{getStatus:e=>s(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},climateControl:{setMode:e=>s(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>s(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>s(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>s(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>s(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>s(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>s(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>s(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>s(`climate-control`,`climateControl`,`getStatus`,`query`,e)},color:{setColor:e=>s(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>s(`color`,`color`,`getStatus`,`query`,e)},connectivity:{getStatus:e=>s(`connectivity`,`connectivity`,`getStatus`,`query`,e)},consumables:{reset:e=>s(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>s(`consumables`,`consumables`,`getStatus`,`query`,e)},contact:{getStatus:e=>s(`contact`,`contact`,`getStatus`,`query`,e)},control:{setValue:e=>s(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>s(`control`,`control`,`getStatus`,`query`,e)},cover:{open:e=>s(`cover`,`cover`,`open`,`mutation`,e),close:e=>s(`cover`,`cover`,`close`,`mutation`,e),stop:e=>s(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>s(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>s(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>s(`cover`,`cover`,`getStatus`,`query`,e)},dayNight:{getOptions:e=>s(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>s(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>s(`day-night`,`dayNight`,`getStatus`,`query`,e)},detectionPipeline:{getDeviceSettingsContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceDiscovery:{listDiscovered:e=>s(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>s(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>s(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>s(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>s(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},deviceOps:{getStreamSources:e=>s(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>s(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>s(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>s(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>s(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>s(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>s(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},deviceStatus:{getStatus:e=>s(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},doorbell:{getStatus:e=>s(`doorbell`,`doorbell`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`doorbell`,`doorbell`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`doorbell`,`doorbell`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`doorbell`,`doorbell`,`applyDeviceSettingsPatch`,`mutation`,e)},enumSensor:{getStatus:e=>s(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},eventEmitter:{getStatus:e=>s(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},events:{getEvents:e=>s(`events`,`events`,`getEvents`,`query`,e),getEventThumbnail:e=>s(`events`,`events`,`getEventThumbnail`,`query`,e),getEventClipUrl:e=>s(`events`,`events`,`getEventClipUrl`,`query`,e)},fanControl:{setPercentage:e=>s(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>s(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>s(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>s(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>s(`fan-control`,`fanControl`,`getStatus`,`query`,e)},featureProbe:{getStatus:e=>s(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},flood:{getStatus:e=>s(`flood`,`flood`,`getStatus`,`query`,e)},gas:{getStatus:e=>s(`gas`,`gas`,`getStatus`,`query`,e)},humidifier:{setOn:e=>s(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>s(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>s(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>s(`humidifier`,`humidifier`,`getStatus`,`query`,e)},humiditySensor:{getStatus:e=>s(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},image:{getStatus:e=>s(`image`,`image`,`getStatus`,`query`,e)},imageSettings:{getOptions:e=>s(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>s(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>s(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},intercom:{startSession:e=>s(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>s(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>s(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>s(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>s(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>s(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>s(`intercom`,`intercom`,`getStatus`,`query`,e)},lawnMowerControl:{startMowing:e=>s(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>s(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>s(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>s(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},lockControl:{lock:e=>s(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>s(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>s(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>s(`lock-control`,`lockControl`,`getStatus`,`query`,e)},mediaPlayer:{play:e=>s(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>s(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>s(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>s(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>s(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>s(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>s(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>s(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>s(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>s(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>s(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>s(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>s(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},motion:{isDetected:e=>s(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>s(`motion`,`motion`,`getStatus`,`query`,e)},motionDetection:{analyze:e=>s(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>s(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>s(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},motionTrigger:{setMotionTrigger:e=>s(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>s(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},motionZones:{getOptions:e=>s(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>s(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>s(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},nativeObjectDetection:{setEnabled:e=>s(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>s(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},notificationRules:{listRules:e=>s(`notification-rules`,`notificationRules`,`listRules`,`query`,e),getRule:e=>s(`notification-rules`,`notificationRules`,`getRule`,`query`,e),createRule:e=>s(`notification-rules`,`notificationRules`,`createRule`,`mutation`,e),updateRule:e=>s(`notification-rules`,`notificationRules`,`updateRule`,`mutation`,e),deleteRule:e=>s(`notification-rules`,`notificationRules`,`deleteRule`,`mutation`,e),setRuleEnabled:e=>s(`notification-rules`,`notificationRules`,`setRuleEnabled`,`mutation`,e),listDeviceMutes:e=>s(`notification-rules`,`notificationRules`,`listDeviceMutes`,`query`,e),setDeviceMuted:e=>s(`notification-rules`,`notificationRules`,`setDeviceMuted`,`mutation`,e),testRule:e=>s(`notification-rules`,`notificationRules`,`testRule`,`mutation`,e),getConditionCatalog:e=>s(`notification-rules`,`notificationRules`,`getConditionCatalog`,`query`,e),getHistory:e=>s(`notification-rules`,`notificationRules`,`getHistory`,`query`,e),listSnoozes:e=>s(`notification-rules`,`notificationRules`,`listSnoozes`,`query`,e),createSnooze:e=>s(`notification-rules`,`notificationRules`,`createSnooze`,`mutation`,e),cancelSnooze:e=>s(`notification-rules`,`notificationRules`,`cancelSnooze`,`mutation`,e),getAlarmConfig:e=>s(`notification-rules`,`notificationRules`,`getAlarmConfig`,`query`,e),setAlarmConfig:e=>s(`notification-rules`,`notificationRules`,`setAlarmConfig`,`mutation`,e)},notifier:{send:e=>s(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>s(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>s(`notifier`,`notifier`,`getStatus`,`query`,e)},numericSensor:{getStatus:e=>s(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},osd:{setOverlay:e=>s(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>s(`osd`,`osd`,`getStatus`,`query`,e)},petFeeder:{feed:e=>s(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>s(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>s(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>s(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>s(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>s(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>s(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>s(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>s(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>s(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>s(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},pipelineAnalytics:{getActiveTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),listRecentTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRecentTracks`,`query`,e),clearTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),listEventKinds:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKinds`,`query`,e),listEventKindsBatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKindsBatch`,`query`,e),getSensorEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getSensorEvents`,`query`,e),getKeyEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEvents`,`query`,e),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),pruneTracksBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneTracksBefore`,`mutation`,e),wipeAllAnalytics:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeAllAnalytics`,`mutation`,e),reconcileFromDisk:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`reconcileFromDisk`,`mutation`,e),deleteTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteTracks`,`mutation`,e),setTrackFlags:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setTrackFlags`,`mutation`,e),getEventStoreFootprint:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventStoreFootprint`,`query`,e),pruneEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEvents`,`mutation`,e),deleteDeviceEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteDeviceEvents`,`mutation`,e),pauseForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`cancelStorageMigrationMove`,`mutation`,e),listOpsLog:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listOpsLog`,`query`,e),getTrainingExportSummary:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportSummary`,`query`,e),getTrainingExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportUrl`,`query`,e),listRetrainStaging:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainStaging`,`query`,e),listRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainFrames`,`query`,e),selectRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`selectRetrainFrames`,`mutation`,e),deselectRetrainFrame:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deselectRetrainFrame`,`mutation`,e),getRetrainFrameImage:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainFrameImage`,`query`,e),proposeRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotations`,`mutation`,e),listRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAnnotations`,`query`,e),saveRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`saveRetrainAnnotations`,`mutation`,e),completeRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`completeRetrainTrack`,`mutation`,e),restageRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`restageRetrainTrack`,`mutation`,e),getRetrainExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainExportUrl`,`query`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),listTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),wipeObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeObjectEmbeddings`,`mutation`,e),rebuildObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`rebuildObjectEmbeddings`,`mutation`,e),getObjectEmbeddingRebuildStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEmbeddingRebuildStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},powerMeter:{getStatus:e=>s(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},presence:{getStatus:e=>s(`presence`,`presence`,`getStatus`,`query`,e)},pressureSensor:{getStatus:e=>s(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},privacyMask:{getOptions:e=>s(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>s(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),setAudioEnabled:e=>s(`privacy-mask`,`privacyMask`,`setAudioEnabled`,`mutation`,e),getStatus:e=>s(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},ptz:{move:e=>s(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>s(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>s(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>s(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>s(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>s(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>s(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>s(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>s(`ptz`,`ptz`,`goHome`,`mutation`,e),getPosition:e=>s(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>s(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>s(`ptz`,`ptz`,`getStatus`,`query`,e)},ptzAutotrack:{getStatus:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},reboot:{reboot:e=>s(`reboot`,`reboot`,`reboot`,`mutation`,e)},sceneMonitor:{listScenes:e=>s(`scene-monitor`,`sceneMonitor`,`listScenes`,`query`,e),createScene:e=>s(`scene-monitor`,`sceneMonitor`,`createScene`,`mutation`,e),updateScene:e=>s(`scene-monitor`,`sceneMonitor`,`updateScene`,`mutation`,e),deleteScene:e=>s(`scene-monitor`,`sceneMonitor`,`deleteScene`,`mutation`,e),captureReference:e=>s(`scene-monitor`,`sceneMonitor`,`captureReference`,`mutation`,e),deleteReference:e=>s(`scene-monitor`,`sceneMonitor`,`deleteReference`,`mutation`,e),recheckNow:e=>s(`scene-monitor`,`sceneMonitor`,`recheckNow`,`mutation`,e),resetScene:e=>s(`scene-monitor`,`sceneMonitor`,`resetScene`,`mutation`,e),getStatus:e=>s(`scene-monitor`,`sceneMonitor`,`getStatus`,`query`,e)},scriptRunner:{run:e=>s(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>s(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>s(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},smoke:{getStatus:e=>s(`smoke`,`smoke`,`getStatus`,`query`,e)},snapshot:{getSnapshot:e=>s(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>s(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getSnapshotOverview:e=>s(`snapshot`,`snapshot`,`getSnapshotOverview`,`query`,e),getDebugState:e=>s(`snapshot`,`snapshot`,`getDebugState`,`query`,e),getSnapshotLinks:e=>s(`snapshot`,`snapshot`,`getSnapshotLinks`,`query`,e),getStatus:e=>s(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},streamCatalog:{getCatalog:e=>s(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},streamParams:{getOptions:e=>s(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>s(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>s(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>s(`stream-params`,`streamParams`,`getStatus`,`query`,e)},switch:{setState:e=>s(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>s(`switch`,`switch`,`getStatus`,`query`,e)},tamper:{getStatus:e=>s(`tamper`,`tamper`,`getStatus`,`query`,e)},temperatureSensor:{getStatus:e=>s(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},update:{installUpdate:e=>s(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>s(`update`,`update`,`getStatus`,`query`,e)},vacuumControl:{start:e=>s(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>s(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>s(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>s(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>s(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>s(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>s(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},valve:{open:e=>s(`valve`,`valve`,`open`,`mutation`,e),close:e=>s(`valve`,`valve`,`close`,`mutation`,e),stop:e=>s(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>s(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>s(`valve`,`valve`,`getStatus`,`query`,e)},vibration:{getStatus:e=>s(`vibration`,`vibration`,`getStatus`,`query`,e)},videoclips:{listClips:e=>s(`videoclips`,`videoclips`,`listClips`,`query`,e),getClipPlayback:e=>s(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e)},waterHeater:{setTargetTemp:e=>s(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>s(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>s(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>s(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},weather:{getStatus:e=>s(`weather`,`weather`,`getStatus`,`query`,e)},webrtcSession:{listStreams:e=>s(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>s(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>s(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>s(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>s(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>s(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>s(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>s(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>s(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e)},zoneAnalytics:{getCurrentSnapshot:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getZoneHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},zoneRules:{listRules:e=>s(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>s(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},zones:{listZones:e=>s(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>s(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>s(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>s(`zones`,`zones`,`updateZone`,`mutation`,e)},addonSettings:{getDeviceSettings:e=>c(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>c(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},cameraPipelineConfig:{getDeviceSettingsContribution:e=>c(`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceAdoption:{getStatus:e=>c(`deviceAdoption`,`getStatus`,`query`,e)},deviceExport:{getDeviceSettingsContribution:e=>c(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceManager:{loadConfig:e=>c(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>c(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>c(`deviceManager`,`loadMeta`,`query`,e),setName:e=>c(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>c(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>c(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>c(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>c(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>c(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>c(`deviceManager`,`setChildLayout`,`mutation`,e),setDisplay:e=>c(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>c(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>c(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>c(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>c(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>c(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>c(`deviceManager`,`getDevice`,`query`,e),getLinkedDevices:e=>c(`deviceManager`,`getLinkedDevices`,`query`,e),getStreamSources:e=>c(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>c(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>c(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>c(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>c(`deviceManager`,`enable`,`mutation`,e),disable:e=>c(`deviceManager`,`disable`,`mutation`,e),remove:e=>c(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>c(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>c(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>c(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>c(`deviceManager`,`getBindings`,`query`,e),getAllBindings:e=>c(`deviceManager`,`getAllBindings`,`query`,e),setWrapperActive:e=>c(`deviceManager`,`setWrapperActive`,`mutation`,e),getDeviceSettingsAggregate:e=>c(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>c(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>c(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>c(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>c(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>c(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>c(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>c(`deviceManager`,`getDeviceStatusAggregate`,`query`,e),getDeviceSettingsContribution:e=>c(`deviceManager`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceManager`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceManager`,`applyDeviceSettingsPatch`,`mutation`,e)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{listRecentFaces:e=>c(`faceGallery`,`listRecentFaces`,`query`,e),getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`mutation`,e)},osdManager:{getDeviceOsd:e=>c(`osdManager`,`getDeviceOsd`,`query`,e),getSourceCatalog:e=>c(`osdManager`,`getSourceCatalog`,`query`,e),setSlotBinding:e=>c(`osdManager`,`setSlotBinding`,`mutation`,e),clearSlotBinding:e=>c(`osdManager`,`clearSlotBinding`,`mutation`,e),previewSlot:e=>c(`osdManager`,`previewSlot`,`mutation`,e),renderDevice:e=>c(`osdManager`,`renderDevice`,`mutation`,e)},pipelineExecutor:{runPipeline:e=>c(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>c(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},pipelineOrchestrator:{assignPipeline:e=>c(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>c(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),setPipelineDevicePin:e=>c(`pipelineOrchestrator`,`setPipelineDevicePin`,`mutation`,e),getPipelineDevicePin:e=>c(`pipelineOrchestrator`,`getPipelineDevicePin`,`query`,e),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>c(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>c(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>c(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getAudioAssignments:e=>c(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getCameraSettings:e=>c(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>c(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraStepOverrides:e=>c(`pipelineOrchestrator`,`getCameraStepOverrides`,`query`,e),setCameraStepOverride:e=>c(`pipelineOrchestrator`,`setCameraStepOverride`,`mutation`,e),setCameraPipelineForAgent:e=>c(`pipelineOrchestrator`,`setCameraPipelineForAgent`,`mutation`,e),resolvePipeline:e=>c(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraSwitches:e=>c(`pipelineOrchestrator`,`getCameraSwitches`,`query`,e),setCameraSwitch:e=>c(`pipelineOrchestrator`,`setCameraSwitch`,`mutation`,e),getCameraStatus:e=>c(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},pipelineRunner:{detachCamera:e=>c(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>c(`pipelineRunner`,`getCameraMetrics`,`query`,e),runDetailSubtree:e=>c(`pipelineRunner`,`runDetailSubtree`,`mutation`,e)},plateGallery:{listPlates:e=>c(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>c(`plateGallery`,`getPlateByTrack`,`query`,e)},recording:{getAvailability:e=>c(`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>c(`recording`,`getDaysWithRecordings`,`query`,e),getPlaybackManifest:e=>c(`recording`,`getPlaybackManifest`,`query`,e),getDeviceConfig:e=>c(`recording`,`getDeviceConfig`,`query`,e),locateSegment:e=>c(`recording`,`locateSegment`,`query`,e),readSegmentBytes:e=>c(`recording`,`readSegmentBytes`,`query`,e),readGopBytes:e=>c(`recording`,`readGopBytes`,`query`,e),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`mutation`,e),deleteFootprint:e=>c(`recording`,`deleteFootprint`,`mutation`,e),renderGif:e=>c(`recording`,`renderGif`,`mutation`,e),renderClip:e=>c(`recording`,`renderClip`,`mutation`,e),getStatus:e=>c(`recording`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`recording`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`recording`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`recording`,`applyDeviceSettingsPatch`,`mutation`,e)},recordingExport:{listExports:e=>c(`recordingExport`,`listExports`,`query`,e)},streamBroker:{publishCameraStream:e=>c(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>c(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>c(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>c(`streamBroker`,`unassignProfile`,`mutation`,e),renderPreBufferClip:e=>c(`streamBroker`,`renderPreBufferClip`,`mutation`,e),produceEventMedia:e=>c(`streamBroker`,`produceEventMedia`,`mutation`,e),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceAudioMute:e=>c(`streamBroker`,`getDeviceAudioMute`,`query`,e),setDeviceAudioMute:e=>c(`streamBroker`,`setDeviceAudioMute`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}var Gt=new Set(`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.audio-analysis.audio-metrics.automation-control.battery.binary.brightness.button.camera-credentials.camera-pipeline-config.camera-streams.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.detection-pipeline.device-discovery.device-ops.device-status.doorbell.enum-sensor.event-emitter.events.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.numeric-sensor.osd.pet-feeder.pipeline-analytics.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.reboot.scene-monitor.script-runner.smoke.snapshot.stream-catalog.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.videoclips.water-heater.weather.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`));function Kt(e){return Gt.has(e)}var qt=[15e3,6e4,5*6e4,15*6e4,30*6e4,60*6e4,90*6e4];function Jt(e){return JSON.parse(e)}function Yt(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function Xt(e){return Array.isArray(e)?e:[]}function Zt(e,t=``){return typeof e==`string`?e:t}function Qt(e,t=0){return typeof e==`number`?e:t}function $t(e,t=!1){return typeof e==`boolean`?e:t}function en(e){try{return Yt(Jt(e))}catch{return null}}function tn(e){try{let t=Jt(e);return Array.isArray(t)?t:null}catch{return null}}function nn(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function rn(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},Math.max(0,e)),i=()=>{clearTimeout(r),t.removeEventListener(`abort`,i),n()};t.addEventListener(`abort`,i,{once:!0})})}var an=fe(),on={opus:`libopus`,aac:`aac`,pcmu:`pcm_mulaw`,pcma:`pcm_alaw`},sn={aac:{kind:`encode`,codec:`aac`,bitrateKbps:128,sampleRateHz:48e3,channels:1},opus:{kind:`encode`,codec:`opus`,bitrateKbps:64,sampleRateHz:48e3,channels:1},pcmu:{kind:`encode`,codec:`pcmu`,sampleRateHz:8e3,channels:1}};function cn(e){return[`-hide_banner`,`-loglevel`,e]}function ln(e){return!e||e===`none`||e===`copy`}function un(e,t){let n=[];if(ln(t)||n.push(`-hwaccel`,String(t)),e.extraArgs?.length&&n.push(...e.extraArgs),e.analyzeDurationUs!==void 0&&n.push(`-analyzeduration`,String(e.analyzeDurationUs)),e.probeSizeBytes!==void 0&&n.push(`-probesize`,String(e.probeSizeBytes)),e.fflags?.length)for(let t of e.fflags)n.push(`-fflags`,t);return e.rtspTransport&&n.push(`-rtsp_transport`,e.rtspTransport),n.push(`-i`,e.url),n}function dn(e,t){return!e||t.some(e=>e===`-vf`)?[]:e.mode===`exact`?[`-vf`,`scale=${e.width}:${e.height}`]:[`-vf`,`scale='min(${e.width},iw)':'min(${e.height},ih)':force_original_aspect_ratio=decrease:force_divisible_by=2`]}function fn(e){let t=e.bitrateKbps;if(t===void 0)return[];let n=e.rateControl??{kind:`cap`,vbvSeconds:2},r=Math.max(1,Math.round(t*n.vbvSeconds));return[...n.kind===`cbr`?[`-b:v`,`${t}k`]:[],`-maxrate`,`${t}k`,`-bufsize`,`${r}k`]}function pn(e,t){if(e.kind===`copy`)return[`-c:v`,`copy`,...e.bitstreamFilter?[`-bsf:v`,e.bitstreamFilter]:[]];let n=[...dn(e.scale,t),`-c:v`,e.encoder];return e.preset!==void 0&&n.push(`-preset`,e.preset),e.tune!==void 0&&n.push(`-tune`,e.tune),e.profile!==void 0&&n.push(`-profile:v`,e.profile),e.level!==void 0&&n.push(`-level`,e.level),e.pixelFormat!==void 0&&n.push(`-pix_fmt`,e.pixelFormat),e.fps!==void 0&&n.push(`-r`,String(e.fps)),e.gopFrames!==void 0&&n.push(`-g`,String(e.gopFrames)),e.forceKeyFramesSeconds!==void 0&&n.push(`-force_key_frames`,`expr:gte(t,n_forced*${e.forceKeyFramesSeconds})`),e.bf!==void 0&&n.push(`-bf`,String(e.bf)),n.push(...fn(e)),e.bitstreamFilter!==void 0&&n.push(`-bsf:v`,e.bitstreamFilter),n}function mn(e){if(e.kind===`none`)return[`-an`];if(e.kind===`copy`)return[`-c:a`,`copy`];let t=[];return e.filter!==void 0&&t.push(`-af`,e.filter),t.push(`-c:a`,on[e.codec]),e.application!==void 0&&t.push(`-application`,e.application),e.frameDurationMs!==void 0&&t.push(`-frame_duration`,String(e.frameDurationMs)),e.globalHeader===!0&&t.push(`-flags`,`+global_header`),e.sampleRateHz!==void 0&&t.push(`-ar`,String(e.sampleRateHz)),e.bitrateKbps!==void 0&&t.push(`-b:a`,`${e.bitrateKbps}k`),e.vbvBufferKbits!==void 0&&t.push(`-bufsize`,`${e.vbvBufferKbits}k`),e.channels!==void 0&&t.push(`-ac`,String(e.channels)),t}function hn(e){let t=[];return e.payloadType!==void 0&&t.push(`-payload_type`,String(e.payloadType)),e.ssrc!==void 0&&t.push(`-ssrc`,String(e.ssrc)),e.sdpFile!==void 0&&t.push(`-sdp_file`,e.sdpFile),t.push(`-f`,`rtp`,e.url),t}function gn(e){return e.kind===`stdout`&&(e.container===`h264`||e.container===`hevc`)}var _n=`+frag_keyframe+empty_moov+default_base_moof`;function vn(e){return e.kind===`rtsp-listen`?[`-f`,`rtsp`,`-rtsp_transport`,`tcp`,`-rtsp_flags`,`listen`,e.url]:e.kind===`rtp-outputs`?[]:e.container===`mp4`?bn(e):[`-f`,e.container,`pipe:1`]}var yn=.9;function bn(e){return[`-movflags`,_n,`-min_frag_duration`,String(Math.max(0,Math.round(e.fragmentMs*yn*1e3))),`-f`,`mp4`,`pipe:1`]}function xn(e){return[`-map`,`0:a:0?`,...mn(e.codec===`pcma`?{kind:`encode`,codec:`pcma`,sampleRateHz:8e3,channels:1}:sn[e.codec]),...hn({url:e.rtpUrl,sdpFile:e.sdpFile})]}function Sn(e){let t=[...cn(e.logLevel),...un(e.input,e.decodeHwAccel)],n=e.threadCount>0?[`-threads`,String(e.threadCount)]:[];if(e.sink.kind===`rtp-outputs`){let r=e.sink.video?[`-an`,`-map`,`0:v:0`,...pn(e.video,e.outputArgs),...n,...e.outputArgs,...hn(e.sink.video)]:[],i=e.sink.audio?[`-vn`,`-map`,`0:a:0?`,...mn(e.audio),...hn(e.sink.audio)]:[];return[...t,...r,...i]}let r=gn(e.sink)?[`-an`]:mn(e.audio),i=vn(e.sink);return[...t,...pn(e.video,e.outputArgs),...n,...r,...e.outputArgs,...i,...e.audioSidecar?xn(e.audioSidecar):[]]}var Cn={videotoolbox:{h264:`h264_videotoolbox`,h265:`hevc_videotoolbox`},vaapi:{h264:`h264_vaapi`,h265:`hevc_vaapi`},qsv:{h264:`h264_qsv`,h265:`hevc_qsv`},cuda:{h264:`h264_nvenc`,h265:`hevc_nvenc`},nvdec:{h264:`h264_nvenc`,h265:`hevc_nvenc`},amf:{h264:`h264_amf`,h265:`hevc_amf`}};function wn(e,t,n){let r=e===`h264`?`libx264`:`libx265`;if(!n||t===null||ln(t)||t===`auto`)return r;let i=Cn[t.toLowerCase()];return i?e===`h264`?i.h264:i.h265:r}function Tn(e){return e===`passthrough`?{kind:`none`}:e.codec===`copy`?{kind:`copy`}:{kind:`encode`,codec:e.codec,...e.bitrateKbps===void 0?{}:{bitrateKbps:e.bitrateKbps},...e.sampleRateHz===void 0?{}:{sampleRateHz:e.sampleRateHz},...e.channels===void 0?{}:{channels:e.channels}}}function En(e){let t=e.profile.video,n=t.codec===`copy`||e.forceReencode!==!0&&t.codec===e.sourceCodec,r=t.width!==void 0&&t.height!==void 0?{mode:`fit`,width:t.width,height:t.height}:null,i=t.codec===`h265`?`h265`:`h264`,a=n?{kind:`copy`,...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}}:{kind:`encode`,encoder:wn(i,e.decodeHwAccel,e.hardwareEncoders===!0),scale:r,...t.preset===void 0?{}:{preset:t.preset},...t.tune===void 0?{}:{tune:t.tune},...t.profile===void 0?{}:{profile:t.profile},...t.level===void 0?{}:{level:t.level},...e.pixelFormat===void 0?{}:{pixelFormat:e.pixelFormat},...t.fps===void 0?{}:{fps:t.fps},...t.gopFrames===void 0?{}:{gopFrames:t.gopFrames},...e.forceKeyFramesSeconds===void 0?{}:{forceKeyFramesSeconds:e.forceKeyFramesSeconds},...t.bf===void 0?{}:{bf:t.bf},...t.bitrateKbps===void 0?{}:{bitrateKbps:t.bitrateKbps},...e.rateControl===void 0?{}:{rateControl:e.rateControl},...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}};return{logLevel:e.logLevel??`error`,decodeHwAccel:e.decodeHwAccel,input:{url:e.sourceUrl,rtspTransport:`tcp`,fflags:[`+discardcorrupt`],...e.profile.inputArgs?.length?{extraArgs:e.profile.inputArgs}:{}},video:a,audio:Tn(e.profile.audio),threadCount:e.threadCount??0,outputArgs:e.profile.outputArgs??[],sink:e.sink,...e.audioSidecar===void 0?{}:{audioSidecar:e.audioSidecar}}}var Dn=16*1024*1024,On=8,kn=16,An=class{maxUnitBytes;buffer=new Uint8Array;unitStart=0;cursor=0;state=`init`;nextSequence=0;faultReason=null;interstitial=new Set;constructor(e={}){this.maxUnitBytes=e.maxUnitBytes??Dn}get fault(){return this.faultReason}get pendingBytes(){return this.buffer.length-this.unitStart}get discardedInterstitialTypes(){return[...this.interstitial]}push(e){return this.faultReason!==null||e.length===0?[]:(this.append(e),this.pendingBytes>this.maxUnitBytes?this.fail(`a single fMP4 unit exceeded ${this.maxUnitBytes} bytes — this stream is not fragmented`):this.drainBoxes())}append(e){if(this.buffer.length===0){this.buffer=e.slice();return}let t=new Uint8Array(this.buffer.length+e.length);t.set(this.buffer,0),t.set(e,this.buffer.length),this.buffer=t}drainBoxes(){let e=[];for(;;){let t=this.readHeader();if(this.faultReason!==null)return e;if(t===null||this.cursor+t.totalBytes>this.buffer.length)break;let n=this.cursor,r=n+t.totalBytes;this.cursor=r;let i=this.consumeBox(t.type,n,r);if(this.faultReason!==null)return e;i!==null&&e.push(i)}return this.compact(),e}consumeBox(e,t,n){if(this.state===`init`){if(e!==`moof`)return null;if(t===this.unitStart)return this.fail(`a moof arrived before any initialisation box — there is no ftyp/moov to send`),null;let n=this.emit(`init`,this.unitStart,t);return this.unitStart=t,this.state=`fragment`,n}if(this.state===`idle`)return e===`moof`?(this.unitStart=t,this.state=`fragment`,null):(this.interstitial.add(e),this.unitStart=n,null);if(e!==`mdat`)return null;let r=this.emit(`fragment`,this.unitStart,n);return this.unitStart=n,this.state=`idle`,r}readHeader(){let e=this.buffer.length-this.cursor;if(e<On)return null;let t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=t.getUint32(this.cursor),r=String.fromCharCode(this.buffer[this.cursor+4]??0,this.buffer[this.cursor+5]??0,this.buffer[this.cursor+6]??0,this.buffer[this.cursor+7]??0);if(n===0)return this.fail(`box "${r}" declares size 0 (to EOF) — an unbounded box cannot be fragmented`),null;if(n===1){if(e<kn)return null;let n=t.getBigUint64(this.cursor+On);return n>BigInt(this.maxUnitBytes)?(this.fail(`box "${r}" declares ${n} bytes, over the ${this.maxUnitBytes} byte bound`),null):{type:r,totalBytes:Number(n)}}return n<On?(this.fail(`box "${r}" declares an impossible size of ${n} bytes`),null):{type:r,totalBytes:n}}emit(e,t,n){let r=this.nextSequence;return this.nextSequence+=1,{kind:e,data:this.buffer.slice(t,n),sequence:r}}compact(){this.unitStart!==0&&(this.buffer=this.buffer.slice(this.unitStart),this.cursor-=this.unitStart,this.unitStart=0)}fail(e){return this.faultReason=e,this.buffer=new Uint8Array,this.unitStart=0,this.cursor=0,[]}};function jn(e){let t=JSON.stringify(e,Mn);return(0,an.createHash)(`sha256`).update(t??``).digest(`hex`)}function Mn(e,t){if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t,n={};for(let t of Object.keys(e).toSorted())n[t]=e[t];return n}return t}var Nn=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({});function Pn(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}function Fn(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=In(t,e.method,e.path);if(!n)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${e.method} ${e.path}`}};let r={status:200,headers:{},redirectUrl:null},i=Rn(r),a={params:{...e.params,...n.params},query:e.query,body:e.body,headers:e.headers,...e.user?{user:e.user}:{},...e.scopedToken===void 0?{}:{scopedToken:e.scopedToken}};return await n.route.handler(a,i),r}}}function In(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=Ln(t.path,n);if(e!==null)return{route:t,params:e}}return null}function Ln(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean);if(n.length!==r.length)return null;let i={};for(let e=0;e<n.length;e++){let t=n[e],a=r[e];if(t.startsWith(`:`))i[t.slice(1)]=a;else if(t!==a)return null}return i}function Rn(e){let t={status(n){return e.status=n,t},code(n){return e.status=n,t},send(t){e.body=t},redirect(t){e.redirectUrl=t,e.status===200&&(e.status=302)},header(n,r){return e.headers[n.toLowerCase()]=r,t},type(n){return e.contentType=n,t}};return t}var zn=i({codec:h([`h264`,`h265`,`copy`]),profile:h([`baseline`,`main`,`high`]).optional(),level:_().optional(),width:a().int().positive().optional(),height:a().int().positive().optional(),fps:a().positive().optional(),bitrateKbps:a().int().positive().optional(),gopFrames:a().int().positive().optional(),bf:a().int().min(0).optional(),preset:h([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:h([`zerolatency`,`film`,`animation`]).optional()}),Bn=c([b(`passthrough`),i({codec:h([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:a().int().positive().optional(),sampleRateHz:a().int().positive().optional(),channels:c([b(1),b(2)]).optional()})]),Vn=i({video:zn,audio:Bn,inputArgs:p(_()).optional(),outputArgs:p(_()).optional()});function Hn(e){let t=e.codec?.toLowerCase().replace(/[.\s-]/g,``),n={codec:t===`h265`||t===`hevc`?`h265`:`h264`,...e.resolution?.width===void 0?{}:{width:e.resolution.width},...e.resolution?.height===void 0?{}:{height:e.resolution.height},...e.fps===void 0?{}:{fps:e.fps}};if(!(n.width===void 0&&n.height===void 0&&n.fps===void 0))return{video:n,audio:`passthrough`}}var Un={video:{codec:`h264`,profile:`baseline`,level:`3.1`,width:1280,height:720,fps:25,bitrateKbps:2500,gopFrames:25,bf:0,preset:`veryfast`,tune:`zerolatency`},audio:`passthrough`},Wn={...Un,video:{...Un.video,bitrateKbps:3e3,gopFrames:30,preset:`ultrafast`},audio:`passthrough`},Gn={...Un,audio:{codec:`opus`}},Kn={kind:`cbr`,vbvSeconds:1},qn={kind:`cap`,vbvSeconds:2},Jn=360,Yn=400,Xn=24,Zn={kind:`encode`,codec:`opus`,bitrateKbps:24,channels:1,application:`lowdelay`,globalHeader:!0,filter:`aresample=async=1000:first_pts=0`},Qn=96,$n=4;function er(e){let t=e.now??(()=>Date.now()),n=null,r=-1/0;return{read(){return t()-r<e.ttlMs?n:void 0},write(e){n=e,r=t()}}}function tr(e){return!e||e===`none`||e===`copy`}async function nr(e){let t=e.override;if(t!=null&&t!==``)return tr(t)?null:t;let n=e.cache?.read();if(n!==void 0)return n;let r;try{r=await e.readDecoderBackend()}catch(t){let n=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unreadable`,kernelPreferred:n,error:t instanceof Error?t.message:String(t)}),e.cache?.write(null),null}if(r===``){let t=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unprobed`,kernelPreferred:t}),e.cache?.write(null),null}let i=tr(r)?null:r;return e.cache?.write(i),i}function rr(e){return{transport:e.publishLocally===!0?`push`:`dial`}}var ir=`\0unset`;function ar(e){return{codec:e.codec,profile:e.profile??ir,level:e.level??ir,width:e.width??-1,height:e.height??-1,fps:e.fps??-1,bitrateKbps:e.bitrateKbps??-1,gopFrames:e.gopFrames??-1,bf:e.bf??-1,preset:e.preset??ir,tune:e.tune??ir}}function or(e){return e===`passthrough`?{codec:`passthrough`}:{codec:e.codec,bitrateKbps:e.bitrateKbps??-1,sampleRateHz:e.sampleRateHz??-1,channels:e.channels??-1}}function sr(e,t=rr(e)){return{deviceId:e.deviceId,source:e.source.kind===`profile`?`profile:${e.source.profile}`:`cam-stream:${e.source.camStreamId}`,transport:t.transport,fragmentMs:t.fragmentMs??-1,video:ar(e.encode.video),audio:or(e.encode.audio),rateControl:e.rateControl??`relaxed`,bitstreamFilter:e.bitstreamFilter??ir,pixelFormat:e.pixelFormat??ir,decodeHwAccel:e.decodeHwAccel??ir}}function cr(e,t=rr(e)){return`egress:${jn(sr(e,t))}`}var lr=h([`singleton`,`device`,`widget`]),ur=i({capName:_(),kind:lr,deviceId:a().optional(),reachable:y(),latencyMs:a(),error:_().optional()}),dr=i({addonId:_(),caps:p(ur).readonly(),widgets:p(ur).readonly()}),fr=i({nodeId:_(),addons:p(dr).readonly()}),pr=i({ok:y(),degraded:y(),checkedAt:_(),nodes:p(fr).readonly(),summary:i({total:a(),reachable:a(),unreachable:a()})}),mr=`hub-only`;function hr(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function gr(e){let t=hr(e).placement;return t===`any-node`||t===`agent-only`}function _r(e){return hr(e).placement===`agent-only`}function vr(e){return hr(e).group}function yr(e,t){return e.execution?.group??t}function br(e){return hr(e).placement}function xr(e){return e.execution?.isolate===!0}var Sr=h([`running`,`done`,`failed`,`cancelled`]),Cr=h([`adopted`,`already-adopted`,`failed`,`cancelled`]),wr=i({childNativeId:_(),outcome:Cr,parentDeviceId:a().int().nonnegative().nullable(),accessoryCount:a().int().nonnegative(),error:_().nullable()}),Tr=i({jobId:_(),addonId:_(),integrationId:_(),state:Sr,total:a().int().nonnegative(),processed:a().int().nonnegative(),adopted:a().int().nonnegative(),alreadyAdopted:a().int().nonnegative(),failed:a().int().nonnegative(),accessoriesCreated:a().int().nonnegative(),currentChildNativeId:_().nullable(),results:p(wr).readonly(),startedAt:a(),finishedAt:a().nullable(),error:_().nullable()}),Er={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},Dr=h([`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`recording`,`notifications`]),Or=[`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`recording`,`notifications`],kr=x(`kind`,[i({kind:b(`device-disabled`)}),i({kind:b(`wrapper-binding`),capName:_()}),i({kind:b(`recording-config`)}),i({kind:b(`notification-mute`)}),i({kind:b(`camera-audio`),capName:_()}),i({kind:b(`camera-mask`),capName:_()}),i({kind:b(`broker-audio-mute`)})]),Ar=h([`no-provider`,`source-unreachable`,`not-configured`]),jr=i({id:Dr,label:_(),costWhenOff:_(),available:y(),unavailableReason:Ar.optional(),enabled:y(),authority:kr}),Mr=i({deviceId:a().int(),switches:p(jr).readonly(),fetchedAt:a()}),Nr=`detection-pipeline`,Pr=`audio-analysis`,Fr=`privacy-mask`,Ir={"stream-broker":{id:`stream-broker`,label:`Camera`,costWhenOff:`Off: the whole camera stops. No live view, no recording, no detection and no notifications — its streams are released and nothing dials it again until you turn it back on.`,authority:{kind:`device-disabled`},countsAsSwitchedOff:!0},"object-detection":{id:`object-detection`,label:`Object detection & tracking`,costWhenOff:`Off: nothing is detected or tracked on this camera, so it produces no events — and with no events there are no object notifications and no event-triggered recording. Live view and continuous recording are unaffected.`,authority:{kind:`wrapper-binding`,capName:Nr},countsAsSwitchedOff:!0},"privacy-mask":{id:`privacy-mask`,label:`Privacy mask`,costWhenOff:`On: the zones you drew on this camera are blacked out by the camera itself — live view, playback, exports and detection all see the black boxes, and nothing behind them was ever recorded. Off: the camera captures the whole frame, and your zones are kept for when you turn it back on.`,authority:{kind:`camera-mask`,capName:Fr},countsAsSwitchedOff:!1},"device-audio":{id:`device-audio`,label:`Camera microphone`,costWhenOff:`Off: the camera captures no sound at all. Live view and recordings become silent video, and audio detection and classification have nothing left to analyse — turning them back on will not recover it. The picture, motion and object detection are unaffected, and two-way talk still works. Applies at the camera, so every consumer sees the same silence.`,authority:{kind:`camera-audio`,capName:Fr},countsAsSwitchedOff:!0},"broker-audio":{id:`broker-audio`,label:`Audio distribution`,costWhenOff:`Off: this server distributes no sound for this camera — live view is silent and everything recorded while it is off is silent FOREVER, even after you turn it back on. Audio detection and classification also have nothing to analyse. The camera keeps capturing sound, so nothing about the camera changes and turning this back on is instant, with no interruption to the picture.`,authority:{kind:`broker-audio-mute`},countsAsSwitchedOff:!0},"audio-analysis":{id:`audio-analysis`,label:`Audio detection & classification`,costWhenOff:`Off: no audio is decoded or classified for this camera. Tracks carry no audio labels and no audio-triggered rule can fire. Audio recorded alongside video is unaffected.`,authority:{kind:`wrapper-binding`,capName:Pr},countsAsSwitchedOff:!0},recording:{id:`recording`,label:`Recording`,costWhenOff:`Off: nothing new is written to disk. Footage already recorded stays, but retention keeps deleting it — so this camera’s history shrinks and is not replaced. Your recording schedule is kept and resumes when you turn it back on.`,authority:{kind:`recording-config`},countsAsSwitchedOff:!0},notifications:{id:`notifications`,label:`Notifications`,costWhenOff:`Off: this camera never notifies anyone, on any rule, with no expiry. Detection, events and recording carry on exactly as before — you simply stop being told about them.`,authority:{kind:`notification-mute`},countsAsSwitchedOff:!0}};function Lr(e,t){switch(e.authority.kind){case`device-disabled`:return{available:!0,enabled:!t.deviceDisabled};case`wrapper-binding`:{let n=e.authority.capName;return t.bindableCapNames===null||t.activeWrapperCapNames===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:t.bindableCapNames.includes(n)?{available:!0,enabled:t.activeWrapperCapNames.includes(n)}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`recording-config`:return t.recordingEnabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:t.recordingEnabled};case`notification-mute`:return t.notificationsMuted===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!t.notificationsMuted};case`camera-audio`:{let e=t.deviceAudio;return e===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:e.supported?e.enabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`camera-mask`:{let e=t.privacyMask;return e===null?{available:!1,enabled:!1,unavailableReason:`source-unreachable`}:e.supported?e.configuredRegions===null||e.enabled===null?{available:!1,enabled:!1,unavailableReason:`source-unreachable`}:e.configuredRegions===0?{available:!1,enabled:!1,unavailableReason:`not-configured`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!1,unavailableReason:`no-provider`}}case`broker-audio-mute`:{let e=t.brokerAudio;return e===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!e.muted}}}}function Rr(e){return Or.map(t=>{let n=Ir[t],r=Lr(n,e);return{id:n.id,label:n.label,costWhenOff:n.costWhenOff,available:r.available,...r.unavailableReason===void 0?{}:{unavailableReason:r.unavailableReason},enabled:r.enabled,authority:n.authority}})}function zr(e){return e.filter(e=>Ir[e.id].countsAsSwitchedOff&&e.available&&!e.enabled).map(e=>e.id)}function Br(e){let t=[],n=[];for(let r of Or){let i=Ir[r];if(!i.countsAsSwitchedOff)continue;let a=Lr(i,e);a.unavailableReason===`source-unreachable`?n.push(r):a.available&&!a.enabled&&t.push(r)}return{switchedOff:t,unreadable:n}}var Vr={high:`High`,mid:`Mid`,low:`Low`};function Hr(e){return Vr[e]??e.charAt(0).toUpperCase()+e.slice(1)}function Ur(e){return(e.width??0)*(e.height??0)}function Wr(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:Ur(e.metadata??{})})).toSorted((e,t)=>t.px-e.px),n=Array.from({length:e.length});for(let e=0;e<t.length;e++){let{s:r,i}=t[e],a;a=e===0?`high`:e===t.length-1?`low`:`mid`,n[i]={...r,quality:a}}return n}function Gr(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function Kr(e){let t=e.protocols.find(e=>e.type===`rtsp`&&e.url)??e.protocols.find(e=>e.url),n=t?.type,r=n===`rtsp`?`rtsp`:n===`http`||n===`flv`?`http-mjpeg`:`custom`;return{id:e.id,label:e.label??e.id,protocol:r,url:t?.url,profileHint:e.quality}}function j(e){return typeof e==`string`}function qr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jr(e){return j(e)&&e.trim()?{url:e}:qr(e)&&j(e.url)&&e.url.trim()?{url:e.url,label:j(e.label)?e.label:void 0}:null}function Yr(e){let t=j(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=Jr(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=j(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:j(e.main_stream_name)?e.main_stream_name:void 0});let i=j(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:j(e.sub_stream_name)?e.sub_stream_name:void 0});let a=j(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:j(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function Xr(e){if(e.length===0)return{};let t=Wr(e),n={},r=t.find(e=>e.quality===`high`),i=t.find(e=>e.quality===`mid`),a=t.find(e=>e.quality===`low`);r&&(n.high=r.id),i&&(n.mid=i.id),a&&(n.low=a.id);let o=r??i??a??t[0];return o&&(n.high||=o.id,n.mid||=o.id,n.low||=o.id),n}var Zr={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},Qr={debug:0,info:1,warn:2,error:3};function $r(e,t){return Qr[e]<=Qr[t]}var ei=h([`recording`,`events`]),ti=h([`prune`,`manual-delete`,`rescan`,`retention-run`,`relocate`,`orphan-audit`]),ni=h([`retention`,`quota`,`manual`,`operator`,`maintenance`]),ri=i({id:_(),at:a(),domain:ei,op:ti,reason:ni,deviceId:a().nullable(),nodeId:_(),itemsAffected:a(),bytesReclaimed:a(),detail:_().nullable(),actor:_()}),ii=i({deviceId:a().optional(),limit:a().int().min(1).max(1e3).optional()}),ai=500,oi=200,si={preMs:5e3,postMs:1e4},ci=a().int().min(0).max(6),li=/^([01]\d|2[0-3]):[0-5]\d$/,ui=h([`off`,`events`,`continuous`]),di=i({motion:y().optional(),audioThresholdDbfs:a().optional()}),fi=h([`continuous`,`events`]),pi=di,mi=i({days:p(ci),start:_().regex(li),end:_().regex(li),mode:fi,triggers:pi.optional(),preBufferSec:a().min(0).optional(),postBufferSec:a().min(0).optional()}),hi={preBufferSec:15,postBufferSec:30},gi=hi.postBufferSec*1e3,_i=i({maxAgeDays:a().min(0).optional(),maxSizeGb:a().min(0).optional()}),vi=h([`minimal`,`low`,`standard`,`high`,`max`]),yi=`standard`,bi={minimal:{tileWidth:240,tileHeight:135,quality:55},low:{tileWidth:320,tileHeight:180,quality:60},standard:{tileWidth:480,tileHeight:270,quality:72},high:{tileWidth:640,tileHeight:360,quality:80},max:{tileWidth:960,tileHeight:540,quality:85}},xi={minimal:`Minimal (240p)`,low:`Low (320p)`,standard:`Standard (480p)`,high:`High (640p)`,max:`Max (960p)`},Si=[`minimal`,`low`,`standard`,`high`,`max`];function Ci(e){return bi[e??`standard`]}var wi=i({enabled:y(),mode:ui.optional(),profiles:p(C).optional(),segmentSeconds:a().int().positive().optional(),bands:p(mi).default([]),retention:_i.optional(),scrubThumbnails:vi.optional()}).strict();function Ti(e){return!e.enabled||e.bands.length===0?`off`:e.bands.some(e=>e.mode===`continuous`)?`continuous`:`events`}var Ei=[`high`,`low`];function Di(e,t){if(t!==void 0&&t.length>0){let n=e.filter(e=>t.includes(e));return n.length>0?n:[...e]}let n=e.filter(e=>Ei.includes(e));return n.length>0?n:[...e]}var Oi=h([`queued`,`running`,`done`,`failed`,`cancelled`]),ki=i({jobId:_(),state:Oi,fromLocationId:_(),toLocationId:_(),deviceId:a().nullable(),entities:p(_()),filesMoved:a().int(),bytesMoved:a().int(),filesTotal:a().int().nullable(),startedAt:a(),finishedAt:a().nullable(),error:_().nullable()}),Ai=h([`recordings`,`recordingsLow`]),ji=i({fromLocationId:_(),toLocationId:_(),entities:p(h([`segments`])).optional(),footageClass:Ai.optional(),deviceId:a().int().optional(),profiles:p(_()).optional(),throttleMbps:a().min(1).max(1e3).optional(),sinceMs:a().int().optional()}),M=i({leaseId:_().min(1)}),Mi=ji.extend({leaseId:_().min(1)}),Ni=i({toLocationId:_(),throttleMbps:a().min(1).max(1e3).optional()}),Pi=Ni.extend({leaseId:_().min(1)}),Fi=h([`recordings`,`recordingsLow`,`eventMedia`]),Ii=i({recordings:_().min(1).optional(),recordingsLow:_().min(1).optional(),eventMedia:_().min(1).optional()}).refine(e=>Object.keys(e).length>0,{message:`select at least one storage class`}),Li=i({destinations:Ii,throttleMbps:a().min(1).max(1e3).optional()}),Ri=h([`planning`,`pausing`,`moving`,`verifying`,`repointing`,`refreshing`,`resuming`,`done`,`failed`,`cancelled`]),zi=h([`pipeline`,`recorder`,`analytics`]),Bi=i({storageClass:Fi,fromLocationId:_(),toLocationId:_(),moverJobId:_().nullable(),state:Oi.nullable(),error:_().nullable()}),Vi=i({jobId:_(),phase:Ri,destinations:Ii,throttleMbps:a(),moves:p(Bi),pauseLeaseId:_().nullable(),pausedParticipants:p(zi),repointed:y(),cancelRequested:y(),startedAt:a(),updatedAt:a(),finishedAt:a().nullable(),error:_().nullable()}),Hi=i({destinations:Ii,moves:p(i({storageClass:Fi,fromLocationId:_(),toLocationId:_()}))}),Ui=[`face`,`plate`],Wi=[`face`,`plate`,`clip`,`custom`],Gi=_().regex(/^[a-z][a-zA-Z0-9-]*$/),N=i({id:_().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:_(),displayName:_().min(1),providerId:_().min(1),config:n(_(),u()),nodeId:_().optional(),isDefault:y().default(!1),isSystem:y().default(!1),enabled:y().optional(),capacity:i({totalBytes:a(),availableBytes:a()}).nullable().optional(),createdAt:a(),updatedAt:a()}),P=c([Gi,_().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),Ki=i({id:_().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:_().min(1,{message:`displayName must not be empty`}),description:_().optional(),cardinality:h([`single`,`multi`]),defaultsTo:_().optional(),defaultRoot:h([`data`,`media`,`backup`]).optional()}),qi=i({inputFps:a(),outputFps:a(),avgDecodeTimeMs:a(),droppedFrames:a(),lagMs:a().optional(),effectiveFps:a().optional(),adaptiveFps:a().optional()}),Ji=i({codec:_(),maxFps:a().default(0),outputFormat:h([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]).default(`jpeg`),scale:a().default(1),width:a().optional(),height:a().optional(),deviceId:a().int().nonnegative().optional(),tag:_().optional(),frameSink:h([`callback`,`shm`]).default(`callback`),debug:y().optional()}),Yi={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},Xi={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},Zi=[{id:`UTC`,label:`UTC (UTC+0)`,region:`Universal`,stdOffsetMinutes:0,dst:null},{id:`Europe/London`,label:`Europe/London (UTC+0 / BST)`,region:`Europe`,stdOffsetMinutes:0,dst:Yi},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Yi},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Yi},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Yi},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Yi},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Yi},{id:`Europe/Istanbul`,label:`Europe/Istanbul (UTC+3)`,region:`Europe`,stdOffsetMinutes:180,dst:null},{id:`America/New_York`,label:`America/New York (UTC−5 / EDT)`,region:`Americas`,stdOffsetMinutes:-300,dst:Xi},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:Xi},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:Xi},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:Xi},{id:`America/Sao_Paulo`,label:`America/Sao Paulo (UTC−3)`,region:`Americas`,stdOffsetMinutes:-180,dst:null},{id:`Asia/Dubai`,label:`Asia/Dubai (UTC+4)`,region:`Asia`,stdOffsetMinutes:240,dst:null},{id:`Asia/Kolkata`,label:`Asia/Kolkata (UTC+5:30)`,region:`Asia`,stdOffsetMinutes:330,dst:null},{id:`Asia/Singapore`,label:`Asia/Singapore (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Shanghai`,label:`Asia/Shanghai (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Tokyo`,label:`Asia/Tokyo (UTC+9)`,region:`Asia`,stdOffsetMinutes:540,dst:null},{id:`Australia/Sydney`,label:`Australia/Sydney (UTC+10 / AEDT)`,region:`Oceania`,stdOffsetMinutes:600,dst:{offsetHours:1,startMonth:10,startWeekIndex:1,startWeekday:`Sunday`,startHour:2,endMonth:4,endWeekIndex:1,endWeekday:`Sunday`,endHour:3}}];function Qi(e){return Zi.find(t=>t.id===e)}function $i(e,t,n,r={}){if(e.length===0)return null;let i=`${n}/`,a=e=>({brokerId:e.brokerId,profileId:e.brokerId.startsWith(i)?e.brokerId.slice(i.length):e.brokerId,url:e.url,mutedUrl:e.mutedUrl,enabled:e.enabled,...e.codec===void 0?{}:{codec:e.codec},...e.resolution===void 0?{}:{resolution:e.resolution}});if(t!==`auto`){let n=e.find(e=>e.enabled&&e.url.length>0&&(e.profile===t||e.brokerId===`${i}${t}`));if(n)return a(n)}let o=e.filter(e=>e.enabled&&e.url.length>0);if(o.length===0)return null;let s=r.targetResolution;if(s){let e=o.filter(e=>e.resolution!==void 0);if(e.length>0){let t=ea(e,s);if(t)return a(t)}}return a(o[0])}function ea(e,t){let n=t.width*t.height,r,i;for(let t of e){if(t.resolution===void 0)continue;let e=t.resolution.width*t.resolution.height;e>=n?(!r||e<r.pixels)&&(r={entry:t,pixels:e}):(!i||e>i.pixels)&&(i={entry:t,pixels:e})}return r?.entry??i?.entry}var ta=i({id:_(),name:_(),category:_().optional(),description:_().optional(),icon:_().optional()}),na=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],ra={yolo26:`YOLO26`,yolov9:`YOLOv9`};function ia(e){return ra[e]??e.toUpperCase()}var aa=/\s*@\s*\d+\s*(?:[x×]\s*\d+)?/gi;function oa(e,t){let n=ia(e),r=t.replace(RegExp(`^${n}\\s+`,`i`),``).replace(aa,``).trim();return r.length>0?r:t}function sa(e,t){let n=[];return t===`fast`&&n.push(`Fast`),n.push(e===`int8`?`Int8`:`Standard`),n.join(` · `)}function ca(e){return na.filter(t=>e.formats[t]!==void 0)}function la(e){let t=na.map(t=>e.formats[t]?.sizeMB).filter(e=>typeof e==`number`);return t.length>0?Math.min(...t):0}var ua=[`t`,`n`,`s`,`m`,`c`,`l`,`x`],da=[`fp32`,`int8`];function fa(e){let t=new Map;for(let n of e){if(n.legacy===!0||n.group===void 0)continue;let{family:e,tier:r}=n.group,i=t.get(e)??new Map,a=i.get(r)??[];a.push(n),i.set(r,a),t.set(e,i)}let n=[];for(let[e,r]of t){let t=[];for(let[n,i]of r){let r=i.map(e=>{let t=e.group?.precision??`fp32`,n=e.group?.optimization??`standard`;return{modelId:e.id,precision:t,optimization:n,resolution:e.group?.resolution,label:sa(t,n),formats:ca(e),sizeMB:la(e)}}).toSorted((e,t)=>e.resolution===t.resolution?e.optimization===t.optimization?da.indexOf(e.precision)-da.indexOf(t.precision):e.optimization===`fast`?1:-1:(t.resolution??1/0)-(e.resolution??1/0)),a=r.find(e=>e.precision===`fp32`&&e.optimization===`standard`)??r[0];if(a===void 0)continue;let o=i.find(e=>e.id===a.modelId);t.push({tier:n,label:o?oa(e,o.name):n.toUpperCase(),baseModelId:a.modelId,options:r})}t.sort((e,t)=>{let n=ua.indexOf(e.tier),r=ua.indexOf(t.tier);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.tier.localeCompare(t.tier):1:-1}),n.push({family:e,label:ia(e),tiers:t})}return n.sort((e,t)=>e.family.localeCompare(t.family)),n}function pa(e,t){let n=t.precision??`fp32`,r=t.optimization??`standard`,i=e.filter(e=>e.group!==void 0&&e.group.family===t.family&&e.group.tier===t.tier&&(e.group.precision??`fp32`)===n&&(e.group.optimization??`standard`)===r);return t.resolution===void 0?i.toSorted((e,t)=>(t.group?.resolution??1/0)-(e.group?.resolution??1/0))[0]?.id??null:i.find(e=>e.group?.resolution===t.resolution)?.id??null}function ma(e,t){let n=e.find(e=>e.id===t);return n?.group===void 0?null:{family:n.group.family,tier:n.group.tier,precision:n.group.precision??`fp32`,optimization:n.group.optimization??`standard`,resolution:n.group.resolution}}var ha=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`],F=i({url:_(),sizeMB:a(),isDirectory:y().optional(),files:p(_()).readonly().optional(),runtimes:p(h([`node`,`python`])).readonly().optional()}),ga=i({url:_(),filename:_(),sizeMB:a()}),_a=i({onnx:F.optional(),coreml:F.optional(),openvino:F.optional(),tflite:F.optional(),pt:F.optional(),gguf:F.optional()}),va=i({family:_(),tier:_(),precision:h([`fp32`,`int8`]).optional(),optimization:h([`standard`,`fast`]).optional(),resolution:a().int().positive().optional()}),ya=i({id:_(),name:_(),description:_(),formats:_a,inputSize:i({width:a(),height:a()}),inputChannels:a().int().positive().optional(),labels:p(ta).readonly(),inputLayout:h([`nchw`,`nhwc`]).optional(),inputNormalization:h([`zero-one`,`imagenet`,`none`]).optional(),outputProbabilities:y().optional(),preprocessMode:h([`letterbox`,`resize`]).optional(),postprocessor:S().optional(),faceAlignment:y().optional(),extraFiles:p(ga).readonly().optional(),legacy:y().optional(),metrics:i({map50:a().optional(),p95LatencyMs:n(_(),a()).optional()}).optional(),license:_().optional(),group:va.optional()}),ba=x(`format`,[i({format:b(`openvino`),precisions:p(h([`fp16`,`int8`])).min(1).readonly()}),i({format:b(`coreml`)})]),xa=i({id:_().regex(/^[a-zA-Z0-9._-]+$/),name:_(),labels:p(ta).readonly(),inputSize:i({width:a(),height:a()}),inputLayout:h([`nchw`,`nhwc`]).optional(),inputNormalization:h([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:h([`letterbox`,`resize`]).optional(),outputFormat:h([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:y().optional()}),Sa=i({format:h(ha),precision:h([`fp16`,`int8`]).optional(),sizeMB:a(),validated:y(),files:p(_()).readonly()}),Ca=i({entry:ya,artifacts:p(Sa).readonly()});function wa(e){switch(e.toUpperCase()){case`GET`:case`HEAD`:case`OPTIONS`:return`view`;case`POST`:case`PUT`:case`PATCH`:return`create`;default:return`delete`}}function Ta(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function Ea(e,t,n){return e.some(e=>e.type===`addon`&&e.target===t&&e.access.includes(n))}function Da(e){let t=e.kind;if(t===void 0)return{kind:`session`};if(t!==`sso-bridge`)return{kind:`not-a-credential`,reason:`bridge token kind=${String(t)}`};let n=e.provider;return n===`oauth-access`?{kind:`integration`,provider:`oauth-access`}:{kind:`not-a-credential`,reason:`bridge token provider=${String(n)}`}}function Oa(e){let{principal:t}=e;if(t.kind===`not-a-credential`)return{allowed:!1,reason:t.reason};if(t.kind===`session`)return{allowed:!0};let n=wa(e.method);return Ea(e.scopes,e.addonId,n)?{allowed:!0}:{allowed:!1,reason:`integration token holds no addon:${e.addonId}[${n}] grant`}}var I=class extends Error{position;constructor(e,t){super(e),this.name=`ExpressionParseError`,this.position=t}},L=class extends Error{constructor(e){super(e),this.name=`ExpressionEvalError`}};function R(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))throw new L(`${t}: argument ${n+1} must be a finite number`);return e}function ka(e,t,n){if(typeof e!=`string`)throw new L(`${t}: argument ${n+1} must be a string`);return e}function z(e,t){if(!Number.isFinite(e))throw new L(`${t}: produced a non-finite result`);return e}function Aa(e,t){return e.map((e,n)=>R(e,t,n))}var ja=1/0,Ma={min:{minArgs:1,maxArgs:ja,apply:e=>z(Math.min(...Aa(e,`min`)),`min`)},max:{minArgs:1,maxArgs:ja,apply:e=>z(Math.max(...Aa(e,`max`)),`max`)},abs:{minArgs:1,maxArgs:1,apply:e=>z(Math.abs(R(e[0],`abs`,0)),`abs`)},floor:{minArgs:1,maxArgs:1,apply:e=>z(Math.floor(R(e[0],`floor`,0)),`floor`)},ceil:{minArgs:1,maxArgs:1,apply:e=>z(Math.ceil(R(e[0],`ceil`,0)),`ceil`)},sqrt:{minArgs:1,maxArgs:1,apply:e=>z(Math.sqrt(R(e[0],`sqrt`,0)),`sqrt`)},round:{minArgs:1,maxArgs:2,apply:e=>{let t=R(e[0],`round`,0),n=e.length>1?Math.trunc(R(e[1],`round`,1)):0;if(n<0||n>100)throw new L(`round: digits must be between 0 and 100`);let r=10**n;return z(Math.round(t*r)/r,`round`)}},pow:{minArgs:2,maxArgs:2,apply:e=>z(R(e[0],`pow`,0)**R(e[1],`pow`,1),`pow`)},clamp:{minArgs:3,maxArgs:3,apply:e=>{let t=R(e[0],`clamp`,0),n=R(e[1],`clamp`,1),r=R(e[2],`clamp`,2);if(n>r)throw new L(`clamp: lower bound is greater than upper bound`);return z(Math.min(r,Math.max(n,t)),`clamp`)}},avg:{minArgs:1,maxArgs:ja,apply:e=>{let t=Aa(e,`avg`);return z(t.reduce((e,t)=>e+t,0)/t.length,`avg`)}},sum:{minArgs:1,maxArgs:ja,apply:e=>z(Aa(e,`sum`).reduce((e,t)=>e+t,0),`sum`)},coalesce:{minArgs:1,maxArgs:ja,apply:e=>{for(let t of e)if(t!==null)return t;return null}},age:{minArgs:2,maxArgs:2,apply:e=>z(R(e[0],`age`,0)-R(e[1],`age`,1),`age`)},convert:{minArgs:3,maxArgs:3,apply:(e,t)=>{let n=R(e[0],`convert`,0),r=ka(e[1],`convert`,1).trim(),i=ka(e[2],`convert`,2).trim();if(t.convert){let e=t.convert(n,r,i);if(e===null)throw new L(`convert: cannot convert '${r}' to '${i}'`);return z(e,`convert`)}if(r===i)return n;throw new L(`convert: unit conversion table not installed`)}}},Na=Object.freeze(Object.assign(Object.create(null),Ma)),Pa=new Set(Object.keys(Ma)),Fa=2048,Ia=256,La=4096,Ra=32,za=16,Ba=256,Va=/^[A-Za-z_][A-Za-z0-9_]*$/,Ha=new Set([`now`,`true`,`false`,`null`]),Ua=new Set([`true`,`false`,`null`]);function Wa(e){return e>=`0`&&e<=`9`}function Ga(e){return e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`||e===`_`}function Ka(e){return Ga(e)||Wa(e)}function qa(e){return e===` `||e===` `||e===`
|
|
3
|
+
`||e===`\r`||e===`\f`||e===`\v`}function Ja(e){if(e.length>2048)throw new I(`expression too long (${e.length} > ${Fa} chars)`,0);let t=[],n=0,r=e.length;for(;n<r;){let i=e[n];if(qa(i)){n+=1;continue}if(Wa(i)){let i=n;for(;n<r&&Wa(e[n]);)n+=1;if(n<r&&e[n]===`.`){if(n+1>=r||!Wa(e[n+1]))throw new I(`malformed number: decimal point needs a digit`,n);for(n+=1;n<r&&Wa(e[n]);)n+=1}let a=e.slice(i,n),o=Number(a);if(!Number.isFinite(o))throw new I(`malformed number: '${a}'`,i);t.push({type:`number`,value:o,pos:i});continue}if(i===`'`||i===`"`){let a=i,o=n;n+=1;let s=``,c=!1;for(;n<r;){let t=e[n];if(t===`\\`){let t=n+1<r?e[n+1]:``;if(t===`\\`||t===`'`||t===`"`){s+=t,n+=2;continue}throw new I(`invalid string escape: '\\${t}'`,n)}if(t===a){c=!0,n+=1;break}s+=t,n+=1}if(!c)throw new I(`unterminated string literal`,o);t.push({type:`string`,value:s,pos:o});continue}if(Ga(i)){let i=n;for(;n<r&&Ka(e[n]);)n+=1;let a=e.slice(i,n);Ua.has(a)?t.push({type:`keyword`,keyword:Ya(a),pos:i}):t.push({type:`identifier`,name:a,pos:i});continue}let a=n+1<r?e.slice(n,n+2):``;if(a===`<=`||a===`>=`||a===`==`||a===`!=`||a===`&&`||a===`||`){t.push({type:`punct`,punct:a,pos:n}),n+=2;continue}if(Xa(i)){t.push({type:`punct`,punct:i,pos:n}),n+=1;continue}throw new I(`unexpected character '${i}'`,n)}return t.push({type:`eof`,pos:r}),t}function Ya(e){return e===`true`?`true`:e===`false`?`false`:`null`}function Xa(e){return e===`(`||e===`)`||e===`,`||e===`?`||e===`:`||e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`!`||e===`<`||e===`>`}var Za={"||":1,"&&":2,"==":3,"!=":3,"<":4,"<=":4,">":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6};function Qa(e){return e===`&&`||e===`||`}function $a(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`==`||e===`!=`||e===`<`||e===`<=`||e===`>`||e===`>=`}var eo=class{tokens;pos=0;nodeCount=0;identifiers=new Set;callees=new Set;constructor(e){this.tokens=e}parse(){let e=this.parseTernary(),t=this.peek();if(t.type!==`eof`)throw new I(`unexpected trailing input`,t.pos);return{ast:e,identifiers:this.identifiers,callees:this.callees,nodeCount:this.nodeCount}}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}expectPunct(e){let t=this.peek();if(t.type!==`punct`||t.punct!==e)throw new I(`expected '${e}'`,t.pos);this.pos+=1}matchPunct(e){let t=this.peek();return t.type===`punct`&&t.punct===e?(this.pos+=1,!0):!1}countNode(){if(this.nodeCount+=1,this.nodeCount>256)throw new I(`expression too complex`,this.peek().pos)}parseTernary(){let e=this.parseBinary(1);if(this.matchPunct(`?`)){let t=this.parseTernary();this.expectPunct(`:`);let n=this.parseTernary();return this.countNode(),{kind:`conditional`,test:e,consequent:t,alternate:n}}return e}parseBinary(e){let t=this.parseUnary();for(;;){let n=this.peek();if(n.type!==`punct`)break;let r=Za[n.punct];if(r===void 0||r<e)break;let i=n.punct;this.pos+=1;let a=this.parseBinary(r+1);if(this.countNode(),Qa(i))t={kind:`logical`,op:i,left:t,right:a};else if($a(i))t={kind:`binary`,op:i,left:t,right:a};else throw new I(`unexpected operator '${i}'`,n.pos)}return t}parseUnary(){let e=this.peek();if(e.type===`punct`&&(e.punct===`!`||e.punct===`-`)){let t=e.punct;this.pos+=1;let n=this.parseUnary();return this.countNode(),{kind:`unary`,op:t,operand:n}}return this.parsePrimary()}parsePrimary(){let e=this.next();switch(e.type){case`number`:return this.countNode(),{kind:`literal`,value:e.value};case`string`:return this.countNode(),{kind:`literal`,value:e.value};case`keyword`:return this.countNode(),{kind:`literal`,value:e.keyword===`null`?null:e.keyword===`true`};case`identifier`:{let t=this.peek();return t.type===`punct`&&t.punct===`(`?this.parseCall(e.name,e.pos):(this.identifiers.add(e.name),this.countNode(),{kind:`identifier`,name:e.name})}case`punct`:if(e.punct===`(`){let e=this.parseTernary();return this.expectPunct(`)`),e}throw new I(`unexpected token '${e.punct}'`,e.pos);case`eof`:throw new I(`unexpected end of expression`,e.pos)}}parseCall(e,t){if(!Pa.has(e))throw new I(`unknown function '${e}'`,t);this.expectPunct(`(`);let n=[];if(!this.matchPunct(`)`))for(;;){if(n.push(this.parseTernary()),n.length>16)throw new I(`too many arguments to '${e}'`,t);if(!this.matchPunct(`,`)){this.expectPunct(`)`);break}}return this.callees.add(e),this.countNode(),{kind:`call`,callee:e,args:n}}};function to(e){return new eo(Ja(e)).parse()}var no=new Map;function ro(e){let t=no.get(e);if(t!==void 0)return no.delete(e),no.set(e,t),t;let n;try{n={ok:!0,parsed:to(e)}}catch(e){n={ok:!1,error:e instanceof I?e.message:String(e)}}if(no.set(e,n),no.size>256){let e=no.keys().next().value;e!==void 0&&no.delete(e)}return n}function io(e){let t=ro(e);if(t.ok)return t.parsed;throw new I(t.error)}function ao(e){return ro(e)}var oo=Object.freeze({});function so(e){let t=Object.create(null);for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function co(e){return typeof e==`number`&&Number.isFinite(e)}function lo(e){return!!e}function uo(e,t){if(!Number.isFinite(e))throw new L(`${t} produced a non-finite result`);return e}function fo(e){if(e.steps+=1,e.steps>e.maxSteps)throw new L(`expression evaluation step budget exceeded`)}function B(e,t){switch(fo(t),e.kind){case`literal`:return e.value;case`identifier`:if(!(e.name in t.scope))throw new L(`unknown identifier: ${e.name}`);return t.scope[e.name];case`unary`:return po(e.op,B(e.operand,t));case`binary`:return mo(e.op,B(e.left,t),B(e.right,t));case`logical`:{let n=B(e.left,t);return e.op===`&&`?lo(n)?B(e.right,t):n:lo(n)?n:B(e.right,t)}case`conditional`:return lo(B(e.test,t))?B(e.consequent,t):B(e.alternate,t);case`call`:return ho(e.callee,e.args.map(e=>B(e,t)),t.hooks)}}function po(e,t){if(e===`!`)return!lo(t);if(!co(t))throw new L(`unary "-" requires a finite number`);return uo(-t,`unary "-"`)}function mo(e,t,n){switch(e){case`==`:return t===n;case`!=`:return t!==n;case`+`:if(typeof t==`string`&&typeof n==`string`)return t+n;if(co(t)&&co(n))return uo(t+n,`"+"`);throw new L(`"+" requires two numbers or two strings`);case`-`:case`*`:case`/`:case`%`:if(!co(t)||!co(n))throw new L(`"${e}" requires two finite numbers`);return uo(e===`-`?t-n:e===`*`?t*n:e===`/`?t/n:t%n,`"${e}"`);case`<`:case`<=`:case`>`:case`>=`:if(co(t)&&co(n)||typeof t==`string`&&typeof n==`string`)return e===`<`?t<n:e===`<=`?t<=n:e===`>`?t>n:t>=n;throw new L(`"${e}" requires two numbers or two strings`)}}function ho(e,t,n){if(!Object.prototype.hasOwnProperty.call(Na,e))throw new L(`unknown function: ${e}`);let r=Na[e];if(t.length<r.minArgs||t.length>r.maxArgs)throw new L(`${e}: wrong number of arguments (${t.length})`);return r.apply(t,n)}function go(e,t,n){return B(e,{scope:t,hooks:n?.hooks??oo,maxSteps:n?.maxSteps??4096,steps:0})}var _o=`now`;function vo(e){if(e===null)return null;if(typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:void 0}function yo(e){let t=Object.keys(e.bindings);if(t.length>32)return`too many bindings (${t.length} > 32)`;for(let e of t){if(!Va.test(e))return`invalid binding name '${e}'`;if(Ha.has(e))return`binding name '${e}' is reserved`;if(Pa.has(e))return`binding name '${e}' shadows a builtin function`}let n=ao(e.expr);if(!n.ok)return n.error;let r=new Set(t);for(let e of n.parsed.identifiers)if(e!==`now`&&!r.has(e))return`expression references unbound identifier '${e}'`;return null}function bo(e,t,n,r){let i=ao(e);if(!i.ok)return{ok:!1,error:i.error};let a=so({...t,now:n});try{return{ok:!0,value:go(i.parsed.ast,a,r)}}catch(e){return{ok:!1,error:e instanceof L?e.message:String(e)}}}var xo=i({kind:b(`field`).optional(),sourceKey:_(),cap:_(),fieldPath:_()}),So=i({kind:b(`literal`),value:c([_(),a(),y(),se()])}),Co=i({kind:b(`global`),sourceStableId:_(),cap:_(),fieldPath:_()}),wo=c([xo,So,Co]),To=i({expr:_().min(1).max(Fa),bindings:n(_().regex(Va),wo)}).superRefine((e,t)=>{let n=yo(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Eo=3,Do=32,Oo=h([`eq`,`ne`,`gt`,`gte`,`lt`,`lte`,`contains`,`in`]),ko=i({kind:b(`condition`),deviceId:a().int().nonnegative(),cap:_().min(1),fieldPath:_().min(1),operator:Oo,value:c([_(),a(),y(),p(c([_(),a()]))])}),Ao=i({kind:b(`expression`),expr:_().min(1).max(Fa),bindings:n(_().regex(Va),wo)}).superRefine((e,t)=>{let n=yo(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),jo=r(()=>x(`kind`,[i({kind:b(`all`),children:p(jo)}),i({kind:b(`any`),children:p(jo)}),i({kind:b(`not`),child:jo}),ko,Ao])),Mo=x(`kind`,[i({kind:b(`device-state`),deviceId:a().int().nonnegative(),cap:_().min(1),fieldPath:_().min(1),becomes:c([_(),a(),y()]).optional(),edge:y().optional(),forMs:a().int().min(0).max(864e5).optional(),debounceMs:a().int().min(0).max(6e5).optional()}),i({kind:b(`device-event`),category:_().min(1),deviceId:a().int().nonnegative().optional()}),i({kind:b(`schedule`),cron:_().min(1).max(120)}),i({kind:b(`manual`)})]),No=x(`kind`,[i({kind:b(`wait`),seconds:a().min(0).max(300)}),i({kind:b(`cap`),deviceId:c([a().int(),i({$var:_().min(1)})]),cap:_().min(1),method:_().min(1),args:n(_(),u()).optional()}),i({kind:b(`code`),code:_().min(1).max(2e4)})]),Po=i({triggers:p(Mo),conditions:jo.optional(),actions:p(No)});function Fo(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return 1+Fo(e.child);let t=e.children;if(t.length===0)return 1;let n=0;for(let e of t){let t=Fo(e);t>n&&(n=t)}return 1+n}function Io(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return Io(e.child);let t=0;for(let n of e.children)t+=Io(n);return t}function Lo(e){return e.kind===`condition`||e.kind===`expression`?!1:e.kind===`not`?Lo(e.child):e.children.length===0?!0:e.children.some(Lo)}function Ro(e){if(e.triggers.length===0)return`an automation needs at least one trigger — without one nothing can start a run`;if(e.actions.length===0)return`an automation needs at least one action — a rule that does nothing is not a rule`;let t=e.conditions;if(t!==void 0){if(Lo(t))return`a condition group is empty — group existing rows instead of leaving a container to fill`;let e=Fo(t);if(e>3)return`conditions nest ${e} levels deep — the limit is 3. "not (any of …)" is the same as "all of (not …)", which is one level shallower`;let n=Io(t);if(n>32)return`conditions use ${n} leaves — the limit is 32`}return null}var zo=15e3;function V(e){return JSON.stringify(e)}function Bo(e,t){switch(e.kind){case`all`:return`allOf([\n${e.children.map(e=>`${t} () => ${Bo(e,`${t} `)}`).join(`,
|
|
4
|
+
`)}\n${t}])`;case`any`:return`anyOf([\n${e.children.map(e=>`${t} () => ${Bo(e,`${t} `)}`).join(`,
|
|
5
|
+
`)}\n${t}])`;case`not`:return`notOf(() => ${Bo(e.child,t)})`;case`condition`:return`leaf(${V(e.deviceId)}, ${V(e.cap)}, ${V(e.fieldPath)}, ${V(e.operator)}, ${V(e.value)})`;case`expression`:return`exprLeaf(${V(e.expr)}, ${V(e.bindings)})`}}function Vo(e,t){switch(e.kind){case`schedule`:return` // trigger ${t}: schedule — armed to the next minute boundary and
|
|
6
|
+
// RE-ARMED from the wall clock every tick, so it cannot drift the way a
|
|
7
|
+
// setInterval(24h) does. No cron library: a block cannot resolve one.
|
|
8
|
+
{
|
|
9
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
10
|
+
const arm = (): void => {
|
|
11
|
+
timer = setTimeout(() => {
|
|
12
|
+
if (cronMatches(${V(e.cron)}, new Date())) {
|
|
13
|
+
void run({ kind: 'schedule', at: Date.now() })
|
|
14
|
+
}
|
|
15
|
+
arm()
|
|
16
|
+
}, nextMinuteBoundary())
|
|
17
|
+
}
|
|
18
|
+
arm()
|
|
19
|
+
disposers.push(() => { if (timer !== undefined) clearTimeout(timer) })
|
|
20
|
+
}`;case`device-event`:return` // trigger ${t}: device event
|
|
21
|
+
disposers.push(
|
|
22
|
+
ctx.eventBus.subscribe(
|
|
23
|
+
{ category: ${V(e.category)}${e.deviceId===void 0?``:`, deviceId: ${V(e.deviceId)}`} },
|
|
24
|
+
(event) => {
|
|
25
|
+
void run({
|
|
26
|
+
kind: 'device-event',
|
|
27
|
+
at: Date.now(),
|
|
28
|
+
deviceId: event.deviceId,
|
|
29
|
+
category: ${V(e.category)},
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
),
|
|
33
|
+
)`;case`device-state`:{let n=e.becomes===void 0?`undefined`:V(e.becomes);return` // trigger ${t}: device state — the mirror is the authority, the
|
|
34
|
+
// event only WAKES the evaluation, so a dropped event delays and never loses.
|
|
35
|
+
{
|
|
36
|
+
let previous: unknown = undefined
|
|
37
|
+
let debounce: ReturnType<typeof setTimeout> | undefined
|
|
38
|
+
let heldSince: number | undefined
|
|
39
|
+
const check = async (): Promise<void> => {
|
|
40
|
+
const value = await readField(${V(e.deviceId)}, ${V(e.cap)}, ${V(e.fieldPath)})
|
|
41
|
+
const want = ${n}
|
|
42
|
+
const matches = want === undefined ? value !== previous : value === want
|
|
43
|
+
const changed = value !== previous
|
|
44
|
+
previous = value
|
|
45
|
+
if (!matches) { heldSince = undefined; return }
|
|
46
|
+
if (${e.edge===!0?`true`:`false`} && !changed) return
|
|
47
|
+
const forMs = ${V(e.forMs??0)}
|
|
48
|
+
if (forMs > 0) {
|
|
49
|
+
if (heldSince === undefined) { heldSince = Date.now(); return }
|
|
50
|
+
if (Date.now() - heldSince < forMs) return
|
|
51
|
+
}
|
|
52
|
+
heldSince = undefined
|
|
53
|
+
void run({
|
|
54
|
+
kind: 'device-state',
|
|
55
|
+
at: Date.now(),
|
|
56
|
+
deviceId: ${V(e.deviceId)},
|
|
57
|
+
cap: ${V(e.cap)},
|
|
58
|
+
field: ${V(e.fieldPath)},
|
|
59
|
+
to: value,
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
const wake = (): void => {
|
|
63
|
+
if (debounce !== undefined) clearTimeout(debounce)
|
|
64
|
+
debounce = setTimeout(() => { void check() }, ${V(e.debounceMs??0)})
|
|
65
|
+
}
|
|
66
|
+
disposers.push(
|
|
67
|
+
ctx.eventBus.subscribe({ category: 'device.state-changed', deviceId: ${V(e.deviceId)} }, wake),
|
|
68
|
+
)
|
|
69
|
+
const reconcile = setInterval(() => { void check() }, RECONCILE_MS)
|
|
70
|
+
disposers.push(() => clearInterval(reconcile))
|
|
71
|
+
}`}case`manual`:return` // trigger ${t}: manual — fired by automation-control.trigger
|
|
72
|
+
// ("Run actions"), which runs the THEN half with an EMPTY vars bag.`}}function Ho(e,t){switch(e.kind){case`wait`:return` case ${t}: await sleep(${V(e.seconds*1e3)}); break`;case`cap`:return` case ${t}: {
|
|
73
|
+
const deviceId = ${typeof e.deviceId==`number`?V(e.deviceId):`resolveTarget(vars, ${V(e.deviceId.$var)})`}
|
|
74
|
+
await actuate(deviceId, ${V(e.cap)}, ${V(e.method)}, ${V(e.args??{})}, vars)
|
|
75
|
+
break
|
|
76
|
+
}`;case`code`:return` case ${t}: {
|
|
77
|
+
// inline code action — a fragment of THIS block, bundled by esbuild
|
|
78
|
+
await (async () => {
|
|
79
|
+
${e.code.split(`
|
|
80
|
+
`).map(e=>` ${e}`).join(`
|
|
81
|
+
`)}
|
|
82
|
+
})()
|
|
83
|
+
break
|
|
84
|
+
}`}}function Uo(e){let t=Ro(e.recipe);if(t!==null)throw Error(`cannot generate an automation from an invalid recipe: ${t}`);let{name:n,recipe:r}=e,i=r.conditions===void 0?`true`:`await ${Bo(r.conditions,` `)}`;return`import type { AddonContext } from '@camstack/types'
|
|
85
|
+
import { evaluateExpressionSource, toExpressionValue } from '@camstack/types'
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* ${n}
|
|
89
|
+
*
|
|
90
|
+
* GENERATED FROM A RECIPE — do not edit by hand. Editing this file makes it a
|
|
91
|
+
* script: the visual editor reads AUTOMATION_RECIPE below, and hand edits are
|
|
92
|
+
* lost the next time the recipe is saved. Use "Eject to code" to take ownership
|
|
93
|
+
* of it permanently (one way).
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
const AUTOMATION_RECIPE = ${JSON.stringify(r,null,2)} as const
|
|
97
|
+
|
|
98
|
+
const RECONCILE_MS = ${zo}
|
|
99
|
+
|
|
100
|
+
/** A cap is named \`alarm-panel\`; \`ctx.api\` is keyed by the ROUTER name,
|
|
101
|
+
* \`alarmPanel\`. Indexing ctx.api with the cap name yields undefined and every
|
|
102
|
+
* action throws, so the conversion is not cosmetic. */
|
|
103
|
+
function capToRouterKey(cap: string): string {
|
|
104
|
+
return cap.replace(/-([a-z0-9])/g, (_m, c: string) => c.toUpperCase())
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Ms until the top of the next minute. Recomputed every tick so a long-lived
|
|
108
|
+
* schedule cannot accumulate drift. */
|
|
109
|
+
function nextMinuteBoundary(): number {
|
|
110
|
+
const now = Date.now()
|
|
111
|
+
return 60_000 - (now % 60_000)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Does \`when\` satisfy a 5-field cron expression (min hour dom mon dow)?
|
|
115
|
+
* Supports wildcards, step syntax, ranges, comma lists and plain numbers —
|
|
116
|
+
* the subset an operator can author, and nothing that needs a library. */
|
|
117
|
+
function cronMatches(expr: string, when: Date): boolean {
|
|
118
|
+
const fields = expr.trim().split(/\\s+/)
|
|
119
|
+
if (fields.length !== 5) return false
|
|
120
|
+
const actual = [
|
|
121
|
+
when.getMinutes(),
|
|
122
|
+
when.getHours(),
|
|
123
|
+
when.getDate(),
|
|
124
|
+
when.getMonth() + 1,
|
|
125
|
+
when.getDay(),
|
|
126
|
+
]
|
|
127
|
+
return fields.every((field, i) => matchField(field, actual[i]!))
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function matchField(field: string, value: number): boolean {
|
|
131
|
+
for (const part of field.split(',')) {
|
|
132
|
+
const [range, stepRaw] = part.split('/')
|
|
133
|
+
const step = stepRaw === undefined ? 1 : Number.parseInt(stepRaw, 10)
|
|
134
|
+
if (!Number.isFinite(step) || step < 1) continue
|
|
135
|
+
if (range === '*') {
|
|
136
|
+
if (value % step === 0) return true
|
|
137
|
+
continue
|
|
138
|
+
}
|
|
139
|
+
const bounds = range!.split('-')
|
|
140
|
+
const lo = Number.parseInt(bounds[0]!, 10)
|
|
141
|
+
const hi = bounds[1] === undefined ? lo : Number.parseInt(bounds[1], 10)
|
|
142
|
+
if (!Number.isFinite(lo) || !Number.isFinite(hi)) continue
|
|
143
|
+
if (value >= lo && value <= hi && (value - lo) % step === 0) return true
|
|
144
|
+
}
|
|
145
|
+
return false
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export default function block(ctx: AddonContext) {
|
|
149
|
+
const disposers: Array<() => void> = []
|
|
150
|
+
const sleep = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms))
|
|
151
|
+
|
|
152
|
+
/** Read one cap field off the state mirror. Returns undefined when the device,
|
|
153
|
+
* the cap or the field cannot be resolved — the caller decides what that
|
|
154
|
+
* means, and it always logs. */
|
|
155
|
+
async function readField(
|
|
156
|
+
deviceId: number,
|
|
157
|
+
cap: string,
|
|
158
|
+
fieldPath: string,
|
|
159
|
+
): Promise<unknown> {
|
|
160
|
+
try {
|
|
161
|
+
const slice = await ctx.api.deviceState.getCapSlice.query({ deviceId, capName: cap })
|
|
162
|
+
let cursor: unknown = slice
|
|
163
|
+
for (const part of fieldPath.split('.')) {
|
|
164
|
+
if (cursor === null || typeof cursor !== 'object') return undefined
|
|
165
|
+
cursor = (cursor as Record<string, unknown>)[part]
|
|
166
|
+
}
|
|
167
|
+
return cursor
|
|
168
|
+
} catch {
|
|
169
|
+
return undefined
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function compare(actual: unknown, operator: string, expected: unknown): boolean {
|
|
174
|
+
switch (operator) {
|
|
175
|
+
case 'eq': return actual === expected
|
|
176
|
+
case 'ne': return actual !== expected
|
|
177
|
+
case 'gt': return typeof actual === 'number' && typeof expected === 'number' && actual > expected
|
|
178
|
+
case 'gte': return typeof actual === 'number' && typeof expected === 'number' && actual >= expected
|
|
179
|
+
case 'lt': return typeof actual === 'number' && typeof expected === 'number' && actual < expected
|
|
180
|
+
case 'lte': return typeof actual === 'number' && typeof expected === 'number' && actual <= expected
|
|
181
|
+
case 'contains': return typeof actual === 'string' && typeof expected === 'string' && actual.includes(expected)
|
|
182
|
+
case 'in': return Array.isArray(expected) && expected.some((v) => v === actual)
|
|
183
|
+
default: return false
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** A leaf whose device or cap is currently unresolvable is FALSE and logs.
|
|
188
|
+
* It never throws the pass away, and it never counts as true. */
|
|
189
|
+
async function leaf(
|
|
190
|
+
deviceId: number,
|
|
191
|
+
cap: string,
|
|
192
|
+
fieldPath: string,
|
|
193
|
+
operator: string,
|
|
194
|
+
expected: unknown,
|
|
195
|
+
): Promise<boolean> {
|
|
196
|
+
const actual = await readField(deviceId, cap, fieldPath)
|
|
197
|
+
if (actual === undefined) {
|
|
198
|
+
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
199
|
+
tags: { deviceId },
|
|
200
|
+
cap,
|
|
201
|
+
fieldPath,
|
|
202
|
+
})
|
|
203
|
+
return false
|
|
204
|
+
}
|
|
205
|
+
return compare(actual, operator, expected)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** The expression leaf goes through the bounded engine — parsed AST, no
|
|
209
|
+
* member access, no loops, hard step/node limits. Never inline JS. */
|
|
210
|
+
async function exprLeaf(
|
|
211
|
+
expr: string,
|
|
212
|
+
bindings: Record<string, { kind?: string; cap?: string; fieldPath?: string; value?: unknown; sourceStableId?: string }>,
|
|
213
|
+
): Promise<boolean> {
|
|
214
|
+
const values: Record<string, string | number | boolean | null> = {}
|
|
215
|
+
for (const [alias, binding] of Object.entries(bindings)) {
|
|
216
|
+
if (binding.kind === 'literal') {
|
|
217
|
+
values[alias] = toExpressionValue(binding.value) ?? null
|
|
218
|
+
continue
|
|
219
|
+
}
|
|
220
|
+
const deviceId = await stableIdToDeviceId(binding.sourceStableId)
|
|
221
|
+
if (deviceId === undefined) {
|
|
222
|
+
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
223
|
+
tags: { deviceId: -1 },
|
|
224
|
+
binding: alias,
|
|
225
|
+
})
|
|
226
|
+
return false
|
|
227
|
+
}
|
|
228
|
+
const raw = await readField(deviceId, binding.cap ?? '', binding.fieldPath ?? '')
|
|
229
|
+
values[alias] = toExpressionValue(raw) ?? null
|
|
230
|
+
}
|
|
231
|
+
const result = evaluateExpressionSource(expr, values, Date.now())
|
|
232
|
+
if (!result.ok) {
|
|
233
|
+
ctx.logger.warn('expression leaf failed — treated as false', { expr, error: result.error })
|
|
234
|
+
return false
|
|
235
|
+
}
|
|
236
|
+
return result.value === true
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
async function stableIdToDeviceId(stableId: string | undefined): Promise<number | undefined> {
|
|
240
|
+
if (stableId === undefined) return undefined
|
|
241
|
+
try {
|
|
242
|
+
const all = await ctx.api.deviceManager.listAll.query({})
|
|
243
|
+
const hit = all.devices.find((d: { stableId?: string; id: number }) => d.stableId === stableId)
|
|
244
|
+
return hit?.id
|
|
245
|
+
} catch {
|
|
246
|
+
return undefined
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
async function allOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
251
|
+
for (const c of children) { if (!(await c())) return false }
|
|
252
|
+
return true
|
|
253
|
+
}
|
|
254
|
+
async function anyOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
255
|
+
for (const c of children) { if (await c()) return true }
|
|
256
|
+
return false
|
|
257
|
+
}
|
|
258
|
+
async function notOf(child: () => Promise<boolean>): Promise<boolean> {
|
|
259
|
+
return !(await child())
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** A {$var} action target, resolved from the run's bag BEFORE dispatch — the
|
|
263
|
+
* action runner only ever sees a number. */
|
|
264
|
+
function resolveTarget(vars: Record<string, unknown>, name: string): number {
|
|
265
|
+
const raw = vars[name]
|
|
266
|
+
if (typeof raw === 'number') return raw
|
|
267
|
+
throw new Error('action target var "' + name + '" is not a device id')
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** Substitute {{vars.x}} slots. Substitution only — never evaluation. */
|
|
271
|
+
function substitute(value: unknown, vars: Record<string, unknown>): unknown {
|
|
272
|
+
if (typeof value !== 'string') return value
|
|
273
|
+
return value.replace(/\\{\\{\\s*vars\\.([A-Za-z_][A-Za-z0-9_]*)\\s*\\}\\}/g, (_m, key: string) => {
|
|
274
|
+
const v = vars[key]
|
|
275
|
+
if (v === undefined) {
|
|
276
|
+
ctx.logger.warn('template referenced a var that was never set', { var: key })
|
|
277
|
+
return ''
|
|
278
|
+
}
|
|
279
|
+
return String(v)
|
|
280
|
+
})
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
async function actuate(
|
|
284
|
+
deviceId: number,
|
|
285
|
+
cap: string,
|
|
286
|
+
method: string,
|
|
287
|
+
args: Record<string, unknown>,
|
|
288
|
+
vars: Record<string, unknown>,
|
|
289
|
+
): Promise<void> {
|
|
290
|
+
const resolved: Record<string, unknown> = {}
|
|
291
|
+
for (const [k, v] of Object.entries(args)) resolved[k] = substitute(v, vars)
|
|
292
|
+
const client: unknown = Reflect.get(ctx.api, capToRouterKey(cap))
|
|
293
|
+
const proc: unknown =
|
|
294
|
+
typeof client === 'object' && client !== null ? Reflect.get(client, method) : undefined
|
|
295
|
+
const mutate: unknown =
|
|
296
|
+
typeof proc === 'object' && proc !== null ? Reflect.get(proc, 'mutate') : undefined
|
|
297
|
+
if (typeof mutate !== 'function') {
|
|
298
|
+
throw new Error('no such device method: ' + cap + '.' + method)
|
|
299
|
+
}
|
|
300
|
+
await mutate({ ...resolved, deviceId })
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
async function evaluateConditions(): Promise<boolean> {
|
|
304
|
+
return ${i}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** The THEN half. Stops at the first failure — continuing past a failed step
|
|
308
|
+
* executes an intent the operator never expressed. */
|
|
309
|
+
async function runActions(vars: Record<string, unknown>): Promise<void> {
|
|
310
|
+
for (let step = 0; step < ${r.actions.length}; step += 1) {
|
|
311
|
+
try {
|
|
312
|
+
switch (step) {
|
|
313
|
+
${r.actions.map((e,t)=>Ho(e,t)).join(`
|
|
314
|
+
`)}
|
|
315
|
+
}
|
|
316
|
+
} catch (err: unknown) {
|
|
317
|
+
ctx.logger.warn('action failed — stopping the sequence', {
|
|
318
|
+
step,
|
|
319
|
+
error: err instanceof Error ? err.message : String(err),
|
|
320
|
+
})
|
|
321
|
+
return
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async function run(trigger: Record<string, unknown>): Promise<void> {
|
|
327
|
+
const vars: Record<string, unknown> = { ...trigger }
|
|
328
|
+
const passed = await evaluateConditions()
|
|
329
|
+
if (!passed) {
|
|
330
|
+
ctx.logger.debug('automation did not run — conditions were false', { trigger })
|
|
331
|
+
return
|
|
332
|
+
}
|
|
333
|
+
ctx.logger.info('automation running', { trigger })
|
|
334
|
+
await runActions(vars)
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
${r.triggers.map((e,t)=>Vo(e,t)).join(`
|
|
338
|
+
|
|
339
|
+
`)}
|
|
340
|
+
|
|
341
|
+
return () => {
|
|
342
|
+
for (const dispose of disposers) dispose()
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
`}var Wo=i({id:_(),label:_(),icon:_(),path:_(),remoteName:_(),bundle:_(),section:_().optional(),sectionLabel:_().optional()}),Go=i({addonId:_(),page:Wo,bundleUrl:_()}),Ko={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:E(g(),p(Go).readonly())}},qo=i({id:_(),label:_(),icon:_(),path:_(),remoteName:_(),bundle:_(),section:_().optional(),sectionLabel:_().optional()}),Jo={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:E(g(),p(qo).readonly())}},Yo=i({method:h([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:_(),access:h([`public`,`authenticated`,`admin`]).optional(),description:_().optional()}),Xo=i({method:_(),path:_(),params:n(_(),_()),query:n(_(),_()),body:u(),headers:n(_(),_()),user:i({id:_(),username:_(),isAdmin:y()}).optional(),scopedToken:u().optional()}),Zo=i({status:a().int(),headers:n(_(),_()),redirectUrl:_().nullable(),body:u().optional(),contentType:_().optional()}),Qo={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:E(g(),p(Yo)),invoke:E(Xo,Zo,{kind:`mutation`})},mount:{kind:`skip`}},$o=i({id:_(),label:_(),icon:_(),order:a().optional()}),es=i({id:_(),title:_(),description:_().optional(),style:h([`card`,`accordion`]).optional(),defaultCollapsed:y().optional(),columns:c([b(1),b(2),b(3),b(4)]).optional(),tab:_().optional(),location:h([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(re())}),ts=i({tabs:p($o).optional(),sections:p(es)}),ns=n(_(),u()),rs=i({success:b(!0)}),is={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:E(i({addonId:_(),nodeId:_().optional(),overlay:n(_(),u()).optional(),cap:_().optional()}),ts.nullable()),updateGlobalSettings:E(i({addonId:_(),nodeId:_().optional(),patch:ns}),rs,{kind:`mutation`,auth:`admin`}),getDeviceSettings:E(i({addonId:_(),deviceId:a(),nodeId:_().optional()}),ts.nullable()),updateDeviceSettings:E(i({addonId:_(),deviceId:a(),nodeId:_().optional(),patch:ns}),rs,{kind:`mutation`,auth:`admin`})}},as=h([`device-tab`,`dashboard`,`integration-detail`]),os=h([`xs`,`sm`,`md`,`lg`,`xl`]),ss=i({remoteName:_(),exposedModule:_(),componentKey:_().optional()}),cs=i({tab:_(),subTab:_().optional(),label:_(),order:a().optional(),kind:b(`remote`),remote:ss,stableId:_(),description:_().optional(),icon:_().optional(),bundle:_(),hosts:p(as).readonly(),requires:i({deviceContext:y().default(!1),integrationContext:y().default(!1)}),preAuth:y().optional().default(!1),defaultSize:os.default(`md`),allowedSizes:p(os).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),ls={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:E(g(),p(cs).readonly())}},us=cs.extend({addonId:_(),bundleUrl:_()}),ds={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:E(g(),p(us).readonly())}},fs=h([`info`,`success`,`warning`,`error`]),ps=h([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),ms=i({type:_(),id:_()}),hs=i({id:_(),category:_(),severity:fs,title:_(),message:_(),status:ps,progress:a().optional(),read:y(),createdAt:a(),updatedAt:a(),source:ms.optional(),metadata:n(_(),u()).optional()}),gs={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:E(hs,g(),{kind:`mutation`}),update:E(i({alertId:_(),patch:hs.partial()}),g(),{kind:`mutation`}),list:E(i({unreadOnly:y().optional(),limit:a().optional()}).optional(),p(hs).readonly()),getUnreadCount:E(g(),a()),markRead:E(i({alertId:_()}),g(),{kind:`mutation`}),markAllRead:E(g(),g(),{kind:`mutation`}),dismiss:E(i({alertId:_()}),g(),{kind:`mutation`})}},_s={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:E(i({deviceId:a()}),S())},events:{onAudioLevel:D(i({deviceId:a(),rms:a(),dbfs:a()}))}},vs=h([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),ys=i({data:S(),format:vs,width:a(),height:a(),timestamp:a()}),H=i({x:a(),y:a(),w:a(),h:a()}),bs=i({class:_(),originalClass:_(),score:a(),bbox:H}),xs=i({data:v(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),Ss=i({rms:a(),dbfs:a()}),Cs=i({className:_(),originalClass:_().optional(),score:a()}),ws=i({level:Ss,classification:i({labels:p(Cs).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),Ts=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(_()).default([])}),Es=i({labels:p(Cs).readonly(),rawLabels:p(Cs).readonly().optional(),inferenceMs:a()}),Ds=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Os={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},ks={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:E(i({chunk:xs,settings:Ts}),ws.nullable(),{kind:`mutation`}),classify:E(xs,Es,{timeoutMs:3e4}),isReady:E(g(),y()),dispose:E(g(),g(),{kind:`mutation`}),reprobeAudioEngine:E(g(),i({backend:_()}),{kind:`mutation`,auth:`admin`})}},As=h([`f32le`,`s16le`]),js=i({codec:_(),canDecode:y(),canEncode:y(),label:_().optional()}),Ms=i({codec:_(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:v(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:As.optional(),idleMs:a().int().positive().optional(),tag:_().optional()}),Ns=i({codec:_(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:As.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:_().optional()}),Ps=i({data:v(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:As,pts:a()}),Fs=i({data:v(Uint8Array),codec:_(),pts:a(),frameComplete:y()}),Is=i({sessionId:_(),kind:h([`decode`,`encode`]),codec:_(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:As,tag:_().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Ls={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:E(g(),p(js).readonly()),canHandle:E(i({codec:_(),kind:h([`decode`,`encode`])}),y()),createDecodeSession:E(Ms,i({sessionId:_(),nodeId:_()}),{kind:`mutation`}),createEncodeSession:E(Ns,i({sessionId:_(),nodeId:_()}),{kind:`mutation`}),closeSession:E(i({sessionId:_(),nodeId:_().optional()}),g(),{kind:`mutation`}),pushEncodedFrame:E(i({sessionId:_(),nodeId:_().optional(),data:v(Uint8Array),pts:a().optional()}),g(),{kind:`mutation`}),pullPcm:E(i({sessionId:_(),nodeId:_().optional(),maxCount:a().int().positive().default(8)}),p(Ps)),pushPcm:E(i({sessionId:_(),nodeId:_().optional(),data:v(Uint8Array),pts:a().optional()}),g(),{kind:`mutation`}),pullEncoded:E(i({sessionId:_(),nodeId:_().optional(),maxCount:a().int().positive().default(8)}),p(Fs)),flushEncode:E(i({sessionId:_(),nodeId:_().optional()}),p(Fs),{kind:`mutation`}),listActiveSessions:E(g(),p(Is).readonly())}},Rs=i({userId:_(),username:_(),email:_().optional(),displayName:_().optional(),isAdmin:y().default(!1)}),zs={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:E(i({username:_(),password:_()}),Rs.nullable(),{kind:`mutation`}),getLoginUrl:E(i({state:_()}),_()),handleCallback:E(n(_(),_()),Rs,{kind:`mutation`}),validateToken:E(i({token:_()}),Rs.nullable())},mount:{kind:`skip`}},Bs=i({subId:_(),displayName:_(),description:_().optional(),kind:_(),triggerSupported:y(),restoreSupported:y()}).extend({id:_(),addonId:_(),enabled:y(),retentionCount:a(),label:_().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:_().optional(),nextRunAt:a().optional(),lastRunAt:a().optional()}),Vs=i({id:_(),filename:_(),createdAt:a(),sizeBytes:a(),label:_().optional(),locations:p(_()).readonly()}),Hs=i({id:_(),destinationId:_().optional(),label:_().optional(),createdAt:a(),sizeBytes:a(),locations:p(_()).optional()}),Us=i({path:_(),kind:h([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),Ws=i({archiveVersion:b(1),createdAt:a(),dataDir:_(),locations:p(_()),entries:p(Us),totalBytes:a(),totalFiles:a()}),Gs=i({name:_(),sizeBytes:a(),fileCount:a(),present:y()}),Ks=i({id:_(),label:_(),cron:_(),enabled:y(),locationIds:p(_()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(_()).readonly().optional(),lastRunAt:a().optional(),nextRunAt:a().optional()}),qs={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:E(g(),p(Bs).readonly(),{auth:`admin`}),trigger:E(i({destinations:p(_()).optional(),locations:p(_()).optional(),label:_().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),p(Hs).readonly(),{kind:`mutation`,auth:`admin`}),list:E(g(),p(Hs).readonly(),{auth:`admin`}),listLocations:E(g(),p(Gs).readonly(),{auth:`admin`}),getEntries:E(i({destinationId:_(),backupId:_()}),Ws.nullable(),{auth:`admin`}),restore:E(i({destinationId:_(),backupId:_(),locations:p(_()).optional()}),g(),{kind:`mutation`,auth:`admin`}),delete:E(i({destinationId:_(),backupId:_()}),g(),{kind:`mutation`,auth:`admin`}),listArchives:E(i({destinationId:_()}),p(Vs).readonly(),{auth:`admin`}),upsertDestinationPolicy:E(i({locationId:_(),enabled:y(),retentionCount:a().int().min(1).max(1e3),label:_().optional(),cron:_().optional()}),g(),{kind:`mutation`,auth:`admin`}),previewSchedule:E(i({cron:_(),count:a().int().min(1).max(20).optional()}),i({ok:y(),error:_().optional(),nextRuns:p(a()).readonly()})),listSchedules:E(g(),p(Ks).readonly(),{auth:`admin`}),upsertSchedule:E(i({id:_().optional(),label:_(),cron:_(),enabled:y(),locationIds:p(_()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(_()).readonly().optional()}),Ks,{kind:`mutation`,auth:`admin`}),deleteSchedule:E(i({id:_()}),g(),{kind:`mutation`,auth:`admin`})}},Js=h([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),Ys=i({id:_(),addonId:_(),name:_(),kind:_(),status:Js,info:n(_(),u()),lastCheckedAt:a().nullable(),error:_().nullable()}),Xs=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),Zs=i({addonId:_(),kinds:p(i({kind:_(),label:_()}))}),Qs=i({kind:_().optional()}),$s=i({id:_()}),ec=i({kind:_().min(1),name:_().min(1),id:_().min(1).optional(),settings:n(_(),u())}),tc=i({id:_()}),nc=i({id:_()}),rc=x(`ok`,[i({ok:b(!0),latencyMs:a().nonnegative()}),i({ok:b(!1),error:_()})]),ic=n(_(),u()),ac=i({kind:_()}),oc=i({kind:_(),settings:ic}),sc=x(`ok`,[i({ok:b(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:b(!1),error:_()})]),cc=u().nullable(),lc=i({brokerId:_(),target:n(_(),u()),payload:u().optional()}),uc=i({brokerId:_(),filter:n(_(),u())}),dc=i({subscriptionId:_()}),fc=i({brokerId:_(),subscriptionId:_()}),pc=i({brokerId:_(),key:_()}),mc={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Xs,kind:`poll`},methods:{list:E(Qs,p(Ys)),get:E($s,Ys.nullable()),listProviders:E(g(),p(Zs),{auth:`admin`}),add:E(ec,tc,{kind:`mutation`,auth:`admin`}),remove:E(nc,g(),{kind:`mutation`,auth:`admin`}),testConnection:E($s,rc,{kind:`mutation`,auth:`admin`}),getSettings:E($s,ic.nullable(),{auth:`admin`}),setSettings:E(i({id:_(),settings:ic}),g(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:E($s,ic.nullable(),{auth:`admin`}),getSettingsSchema:E(ac,cc,{auth:`admin`}),testSettings:E(oc,sc,{kind:`mutation`,auth:`admin`}),publish:E(lc,u(),{kind:`mutation`,auth:`admin`}),subscribe:E(uc,dc,{kind:`mutation`,auth:`admin`}),unsubscribe:E(fc,g(),{kind:`mutation`,auth:`admin`}),getState:E(pc,u().nullable()),getStatus:E(g(),Xs)}},hc={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{}},gc=h([`webrtc`,`hls`,`mjpeg`,`rtsp`]),_c=h([`mp4`,`gif`]),vc=i({kind:_c,handle:_(),nodeId:_(),mime:_(),bytes:a().int(),width:a().int(),height:a().int()}),yc=i({fromTs:a(),toTs:a(),packets:a().int()}),bc=i({media:p(vc).readonly(),coverage:yc,profile:C,video:h([`copy`,`encode`])}),xc=i({brokerId:_(),url:_(),mutedUrl:_(),enabled:y(),codec:_().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),Sc=i({sessionId:_(),remoteAddr:_(),userAgent:_().nullish(),playing:y(),muted:y(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),Cc=i({tag:_(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),wc=i({tag:_(),subscribedAt:a(),chunksDelivered:a()}),Tc=h([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),Ec=i({kind:Tc,label:_().optional(),media:h([`audio`,`video`,`both`]).optional(),targetCodec:_().optional(),transport:h([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:_().optional(),userAgent:_().optional(),userId:_().optional(),sessionId:_().optional(),extra:n(_(),_()).optional()}).readonly(),Dc=i({id:_(),channel:h([`annexb`,`rtp`]),attribution:Ec,subscribedAt:a(),packetsDelivered:a()}),Oc=i({rtsp:p(Sc).readonly(),decoded:p(Cc).readonly(),audio:p(wc).readonly(),encoded:p(Dc).readonly(),pipeClients:a(),encodedSubscribers:a()}),kc=h([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Ac=h([`h264`,`h265`,`copy`]),jc=h([`aac`,`opus`,`pcmu`,`copy`,`none`]),Mc=i({deviceId:a().int().nonnegative(),video:Ac,audio:jc.optional(),profile:C.optional(),targetResolution:i({width:a().int().positive(),height:a().int().positive()}).optional(),outputArgs:p(_()).optional(),audioEgress:y().optional(),hostname:_().optional(),tag:_().optional()}),Nc=i({url:_(),videoCodec:h([`H264`,`H265`]),audioCodec:_(),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:y(),encoder:_(),pipelineKey:_()}),Pc=Vn.omit({inputArgs:!0,outputArgs:!0}),Fc=h([`tight`,`relaxed`]),Ic=i({deviceId:a().int().nonnegative(),source:x(`kind`,[i({kind:b(`profile`),profile:C}),i({kind:b(`cam-stream`),camStreamId:_().min(1)})]),encode:Pc,rateControl:Fc.optional(),bitstreamFilter:h([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:y().optional(),pixelFormat:h([`yuv420p`,`nv12`]).optional(),decodeHwAccel:h([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:_().optional(),tag:_().optional()}),Lc=i({url:_(),pipelineKey:_(),videoCodec:h([`H264`,`H265`]),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:y(),encoder:_(),decodeHwAccel:_().nullable(),camStreamId:_().nullable()}),Rc={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:E(i({deviceId:a().int().nonnegative(),camStreamId:_().min(1),kind:Be,url:_().optional(),codec:_().optional(),resolution:Ve.optional(),fps:a().positive().optional(),label:_().optional(),deviceFeatures:p(_()).optional(),autoEligible:y().optional(),metadata:n(_(),u()).optional(),sourceCamStreamId:_().min(1).optional(),encodeProfile:Vn.optional()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:E(i({deviceId:a().int().nonnegative(),camStreamId:_().min(1)}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:E(i({deviceId:a().int().nonnegative(),profile:C,camStreamId:_().min(1)}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:E(i({deviceId:a().int().nonnegative(),profile:C}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:E(i({deviceId:a(),profile:C.optional(),aroundMs:a(),preRollSec:a().min(0).max(20).default(3),postRollSec:a().min(0).max(20).default(5),format:h([`gif`,`mp4`]).default(`gif`),maxWidth:a().int().min(120).max(1920).default(480),fps:a().int().min(1).max(15).default(5),speed:a().min(1).max(8).default(2)}),i({base64:_(),mime:_(),bytes:a().int(),profile:C,durationMs:a()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:E(i({deviceId:a(),profile:C.optional(),aroundMs:a(),preSeconds:a().min(0).max(20).default(4),postSeconds:a().min(0).max(20).default(6),kinds:p(_c).min(1).default([`mp4`]),gifMaxWidth:a().int().min(120).max(1280).default(640),gifFps:a().int().min(1).max(15).default(12),gifSpeed:a().min(1).max(8).default(4),speed:a().min(1).max(8).default(4)}),bc,{kind:`mutation`,auth:`admin`}),fetchEventMedia:E(i({handle:_()}),i({base64:_(),mime:_(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:E(g(),p(He).readonly()),listAllProfileSlots:E(g(),p(We).readonly()),getBrokerStats:E(i({brokerId:_()}),ot),probeStream:E(i({brokerId:_()}),i({probed:y(),summary:_()}),{kind:`mutation`,auth:`admin`}),listClients:E(i({brokerId:_()}),Oc),killClient:E(i({brokerId:_(),channel:h([`rtsp`,`decoded`,`audio`]),handle:_()}),i({killed:y()}),{kind:`mutation`,auth:`admin`}),restartProfile:E(i({deviceId:a().int().nonnegative(),profile:C}),i({success:y()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:E(i({streamId:_(),format:gc}),i({url:_()})),getStreamWithCodec:E(Mc,Nc,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:E(i({pipelineKey:_()}),i({released:y(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:E(Ic,Lc,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:E(i({pipelineKey:_()}),i({released:y(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:E(rt,it,{kind:`mutation`}),pullAudioChunks:E(i({subscriptionId:_(),maxCount:a().int().positive().default(8)}),p(nt).readonly()),unsubscribeAudioChunks:E(i({subscriptionId:_()}),i({released:y()}),{kind:`mutation`}),subscribeFrames:E(et,tt,{kind:`mutation`}),pullFrameHandles:E(i({subscriptionId:_(),maxCount:a().int().positive().default(4)}),p(w).readonly()),unsubscribeFrames:E(i({subscriptionId:_()}),i({released:y()}),{kind:`mutation`}),setPreBufferDuration:E(i({brokerId:_(),seconds:a().min(0).max(30)}),g(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:E(i({brokerId:_()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:E(g(),a()),getAllRtspEntries:E(i({hostname:_().optional()}),p(xc).readonly()),getRtspEntry:E(i({brokerId:_(),hostname:_().optional()}),xc.nullable()),regenerateRtspToken:E(i({brokerId:_()}),_().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:E(i({brokerId:_(),enabled:y()}),g(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:E(i({brokerId:_()}),y()),getDeviceAudioMute:E(i({deviceId:a().int()}),i({muted:y(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:E(i({deviceId:a().int(),muted:y()}),i({muted:y(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:D(i({deviceId:a().int().nonnegative(),camStreamId:_(),profile:C})),onCamStreamIdle:D(i({deviceId:a().int().nonnegative(),camStreamId:_()})),onRequestStreamSourceRefresh:D(i({deviceId:a().int().nonnegative(),camStreamId:_(),brokerId:_()}))}},zc=h([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Bc=i({acceptCodecs:p(zc).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:y().optional(),requireSiblingCodec:p(zc).readonly().optional()}).readonly(),Vc=i({preferredProviders:p(_()).readonly().optional(),resolutionPreference:h([`highest`,`lowest`]).optional()}).readonly(),Hc=i({camStreamId:_(),codec:_().optional(),resolution:Ve.optional(),reason:_()}),Uc={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],methods:{getCameraStreams:E(i({deviceId:a().int().nonnegative()}),p(He).readonly()),getBrokerStreams:E(i({deviceId:a().int().nonnegative()}),p(We).readonly()),getRtspEntries:E(i({deviceId:a().int().nonnegative(),hostname:_().optional()}),p(xc).readonly()),getProfileRtspEntries:E(i({deviceId:a().int().nonnegative(),hostname:_().optional()}),p(st).readonly()),pickStream:E(i({deviceId:a().int().nonnegative(),requirements:Bc,preferences:Vc.optional()}),Hc.nullable())},events:{onCamStreamsChanged:D(i({deviceId:a().int().nonnegative(),camStreams:p(He).readonly()})),onProfileSlotsChanged:D(i({deviceId:a().int().nonnegative(),profileSlots:p(We).readonly()}))},runtimeState:i({online:y(),slotStatuses:i({high:Ue.optional(),mid:Ue.optional(),low:Ue.optional()}),slotErrors:i({high:_().optional(),mid:_().optional(),low:_().optional()}),lastChangedAt:a()}),durability:`session`};function Wc(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Gc(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function Kc(e){let t=e;for(let e=0;e<8&&t!=null;e+=1){let e=t._def,n=t.constructor?.name;if(n===`ZodArray`||e?.type===`array`)return!0;if(!(n===`ZodReadonly`||e?.type===`readonly`||n===`ZodOptional`||e?.type===`optional`||n===`ZodNullable`||e?.type===`nullable`||n===`ZodDefault`||e?.type==="default")||e?.innerType==null)return!1;t=e.innerType}return!1}function qc(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Tt(e)[t];return n!==void 0&&n.kind!==`subscription`&&Kc(n.output)}function Jc(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function Yc(e){if(!(typeof e!=`object`||!e)){for(let t of Object.values(e))if(typeof t==`object`&&t){let e=t.addonId;if(typeof e==`string`)return e}}}function Xc(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Zc(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function Zc(e){return typeof e==`function`?e():e}function Qc(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function $c(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var el=`core-block-`,tl=`core-blocks`;function nl(e){return`${el}${e}`}function rl(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var il=c([b(`hub`),_().min(1)]),al=h([`stopped`,`starting`,`running`,`failed`]),ol=i({name:_().min(1).max(120),code:_().max(2e5),enabled:y(),placement:il,integrationId:_().optional()}),sl=ol.extend({id:_(),createdAt:a(),updatedAt:a(),createdBy:_(),status:al,lastError:_().optional(),lastChangedAt:a()}),cl=i({ok:y(),error:_().optional(),line:a().optional(),column:a().optional()}),ll={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:E(i({}),i({blocks:p(sl)}),{auth:`admin`}),get:E(i({blockId:_()}),i({block:sl.nullable()}),{auth:`admin`}),create:E(i({block:ol}),i({block:sl}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:E(i({blockId:_(),block:ol.partial()}),i({block:sl}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:E(i({blockId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:E(i({blockId:_(),enabled:y()}),i({block:sl}),{kind:`mutation`,auth:`admin`}),restart:E(i({blockId:_()}),i({block:sl}),{kind:`mutation`,auth:`admin`}),compile:E(i({code:_()}),cl,{kind:`mutation`,auth:`admin`}),getTypeDefs:E(i({}),i({libs:p(i({filePath:_(),content:_()}))}),{auth:`admin`})}};function ul(e){return e}function dl(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`},...n?.caller?{caller:`required`}:{}}}function fl(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:{kind:`device`,...n?.deviceTypes?{deviceTypes:n.deviceTypes}:{}}}}var pl=i({stepId:_(),entry:ya}),ml={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:E(g(),p(pl).readonly())}},hl=i({where:n(_(),u()).optional(),whereIn:n(_(),p(u())).optional(),whereBetween:n(_(),s([u(),u()])).optional(),whereNot:n(_(),u()).optional(),orderBy:i({field:_(),direction:h([`asc`,`desc`])}).optional(),limit:a().optional(),offset:a().optional()}),gl=i({where:n(_(),u()).optional(),whereIn:n(_(),p(u())).optional(),whereBetween:n(_(),s([u(),u()])).optional(),whereNot:n(_(),u()).optional()}),_l=i({id:_(),data:n(_(),u())}),vl=i({name:_(),type:h([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:y().optional(),notNull:y().optional(),unique:y().optional(),defaultValue:c([_(),a(),y()]).optional()}),yl=i({name:_(),columns:p(_()).readonly(),unique:y().optional()}),bl={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:E(i({namespace:_().optional(),collection:_(),key:_()}),u()),set:E(i({namespace:_().optional(),collection:_(),key:_(),value:u()}),g(),{kind:`mutation`}),query:E(i({namespace:_().optional(),collection:_(),filter:hl.optional()}),p(_l).readonly()),insert:E(i({namespace:_().optional(),collection:_(),record:_l}),g(),{kind:`mutation`}),update:E(i({namespace:_().optional(),collection:_(),id:_(),data:n(_(),u())}),g(),{kind:`mutation`}),delete:E(i({namespace:_().optional(),collection:_(),key:_()}),g(),{kind:`mutation`}),deleteWhere:E(i({namespace:_().optional(),collection:_(),filter:gl}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:E(i({namespace:_().optional(),collection:_(),filter:gl,data:n(_(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:E(i({namespace:_().optional(),collection:_(),filter:hl.optional()}),a()),histogram:E(i({namespace:_().optional(),collection:_(),field:_(),bucketSize:a().int().positive(),origin:a().int(),filter:hl.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:E(i({namespace:_().optional(),collection:_()}),y()),declareCollection:E(i({namespace:_().optional(),collection:_(),columns:p(vl).readonly(),indexes:p(yl).readonly().optional()}),g(),{kind:`mutation`})}},xl=i({engineId:_(),kind:h([`relational`,`vector`]),displayName:_()}),Sl={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:E(g(),xl),get:E(i({namespace:_().optional(),collection:_(),key:_()}),u()),set:E(i({namespace:_().optional(),collection:_(),key:_(),value:u()}),g(),{kind:`mutation`}),query:E(i({namespace:_().optional(),collection:_(),filter:hl.optional()}),p(_l).readonly()),insert:E(i({namespace:_().optional(),collection:_(),record:_l}),g(),{kind:`mutation`}),update:E(i({namespace:_().optional(),collection:_(),id:_(),data:n(_(),u())}),g(),{kind:`mutation`}),delete:E(i({namespace:_().optional(),collection:_(),key:_()}),g(),{kind:`mutation`}),deleteWhere:E(i({namespace:_().optional(),collection:_(),filter:gl}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:E(i({namespace:_().optional(),collection:_(),filter:gl,data:n(_(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:E(i({namespace:_().optional(),collection:_(),filter:hl.optional()}),a()),histogram:E(i({namespace:_().optional(),collection:_(),field:_(),bucketSize:a().int().positive(),origin:a().int(),filter:hl.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:E(i({namespace:_().optional(),collection:_()}),y()),declareCollection:E(i({namespace:_().optional(),collection:_(),columns:p(vl).readonly(),indexes:p(yl).readonly().optional()}),g(),{kind:`mutation`})}},Cl=[{value:`auto`,label:`Auto (defer to probed best)`},{value:`none`,label:`Off (software)`},{value:`videotoolbox`,label:`VideoToolbox (macOS)`},{value:`cuda`,label:`CUDA (NVIDIA)`},{value:`nvdec`,label:`NVDEC (NVIDIA legacy)`},{value:`vaapi`,label:`VAAPI (Linux Intel/AMD)`},{value:`qsv`,label:`QuickSync (Intel)`},{value:`d3d11va`,label:`D3D11VA (Windows)`},{value:`dxva2`,label:`DXVA2 (Windows legacy)`},{value:`amf`,label:`AMF (AMD)`},{value:`vdpau`,label:`VDPAU (Linux NVIDIA legacy)`},{value:`drm`,label:`DRM (Linux generic)`}],wl={hwaccel:`auto`,probedBestHwaccel:``},Tl=i({sessionId:_(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),El={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:E(i({codec:_()}),y()),getInfo:E(g(),i({id:_(),name:_(),isPullMode:y().optional(),priority:a().optional(),hwaccel:_().optional(),probedBestHwaccel:_().optional()})),createSession:E(Ji,i({sessionId:_(),nodeId:_()})),destroySession:E(i({sessionId:_()}),g()),pushPacket:E(i({sessionId:_(),packet:Ze}),g()),openStream:E(i({sessionId:_(),url:_()}),g()),pullFrames:E(i({sessionId:_(),maxCount:a().default(1),waitMs:a().optional()}),p(Qe)),pullHandles:E(i({sessionId:_(),maxCount:a().default(1),waitMs:a().optional()}),p(w)),getFrame:E(i({handle:w}),Qe.nullable()),getShmStats:E(i({sessionId:_()}),Tl.nullable()),updateConfig:E(i({sessionId:_(),config:Ji.partial()}),g()),getStats:E(i({sessionId:_()}),qi),listActiveSessions:E(g(),p(i({sessionId:_(),codec:_(),outputFormat:_(),createdAtMs:a()})).readonly()),reprobeHwaccel:E(g(),i({backend:_()}),{kind:`mutation`,auth:`admin`})}},Dl={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{}},Ol=i({id:_(),system:_(),uniqueId:_().optional(),raw:n(_(),u()).optional()});function kl(e){return{id:e.stableId,system:e.addonId}}function Al(e,t){let n={...e};for(let[r,i]of Object.entries(t))if(i!==void 0){if(r===`raw`&&typeof i==`object`&&i){n.raw={...e.raw,...i};continue}n[r]=i}return n}function jl(e){if(e==null)return;let t=e.trim();if(t===``)return;let n=t.toLowerCase();return n===`°c`||n===`c`||n===`celsius`?`°C`:n===`°f`||n===`f`||n===`fahrenheit`?`°F`:n===`k`||n===`kelvin`?`K`:n===`%`||n===`percent`||n===`percentage`?`%`:n===`lx`||n===`lux`?`lx`:n===`hpa`||n===`hectopascal`?`hPa`:n===`kpa`?`kPa`:n===`pa`?`Pa`:n===`mbar`||n===`millibar`?`mbar`:n===`w`||n===`watt`?`W`:n===`kw`||n===`kilowatt`?`kW`:n===`wh`||n===`watt-hour`?`Wh`:n===`kwh`||n===`kilowatt-hour`?`kWh`:n===`v`||n===`volt`?`V`:n===`a`||n===`amp`||n===`ampere`?`A`:n===`ma`||n===`milliampere`?`mA`:n===`va`?`VA`:n===`ppm`?`ppm`:n===`ppb`?`ppb`:n===`µg/m³`||n===`ug/m3`||n===`µg/m3`?`µg/m³`:n===`km/h`||n===`kph`?`km/h`:n===`mph`?`mph`:n===`m/s`?`m/s`:n===`m`?`m`:n===`km`?`km`:n===`kg`?`kg`:n===`g`?`g`:t}var Ml=`sourceInfo`;function Nl(e){if(!e)return null;let t=e[Ml];if(!t)return null;let n=Ol.safeParse(t);return n.success?n.data:null}var Pl=h([`online`,`sleeping`,`offline`,`unknown`]),Fl=r(()=>i({childNativeId:_(),name:_(),type:h(O),status:Pl,metadata:i({model:_().optional(),serialNumber:_().optional(),uid:_().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:y().optional(),isDoorbell:y().optional(),isMultifocal:y().optional(),externalLocation:_().optional(),manufacturer:_().optional(),integration:_().optional()}).default({}),alreadyAdopted:y(),adoptedDeviceId:a().int().nonnegative().nullable(),capabilities:p(_()).readonly().optional(),features:p(_()).readonly().optional(),sourceInfo:Ol.optional(),children:p(Fl).readonly().optional()})),Il=i({discovered:p(Fl),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:_().nullable()}),Ll={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Hub],status:{schema:Il,kind:`poll`},runtimeState:Il.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:E(i({deviceId:a().int().nonnegative()}),p(Fl).readonly()),refreshDiscovery:E(i({deviceId:a().int().nonnegative()}),p(Fl).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:E(i({deviceId:a().int().nonnegative(),childNativeId:_(),name:_().optional()}),i({deviceId:a().int().nonnegative(),stableId:_()}),{kind:`mutation`,auth:`admin`}),releaseDevice:E(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})}},Rl=i({id:_(),label:_(),isDefault:y().optional()}),zl=i({search:_().optional(),area:_().optional(),manufacturer:_().optional(),adoptedOnly:y().optional(),unadoptedOnly:y().optional()}),Bl=i({integrationId:_(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:_().optional(),filterText:zl.optional()}),Vl=i({candidates:p(Fl).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),Hl=i({integrationId:_(),childNativeId:_()}),Ul=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:_().nullable()}),Wl=i({name:_().min(1).optional(),hiddenChildIds:p(_()).optional()}),Gl=i({integrationId:_(),childNativeIds:p(_()).min(1),filter:_().optional(),importLocations:y().optional(),perCandidate:n(_(),Wl).optional()}),Kl=i({adopted:p(i({childNativeId:_(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),ql=i({integrationId:_(),camDeviceId:a().int().nonnegative()}),Jl=i({camDeviceId:a().int().nonnegative(),resetToSource:y().optional()}),Yl=i({changed:y(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),Xl={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Ul,kind:`poll`},methods:{listCandidateFilters:E(i({integrationId:_()}),i({filters:p(Rl)}),{auth:`admin`}),listCandidates:E(Bl,Vl,{auth:`admin`}),getCandidate:E(Hl,Fl.nullable(),{auth:`admin`}),refresh:E(i({integrationId:_()}),Ul,{kind:`mutation`,auth:`admin`}),adopt:E(Gl,Kl,{kind:`mutation`,auth:`admin`}),release:E(ql,g(),{kind:`mutation`,auth:`admin`}),resync:E(Jl,Yl,{kind:`mutation`,auth:`admin`})}},Zl=h([`unlinked`,`linked`,`error`]),Ql=i({label:_(),value:_(),secret:y().optional()}),$l=i({qr:_().optional(),fields:p(Ql).readonly().optional(),note:_().optional()}),eu=i({linkState:Zl,exposedDeviceCount:a(),error:_().optional(),setup:$l.optional()}),tu=_(),nu=i({deviceId:_(),exposedAs:_().optional(),capabilities:p(_()).optional()}),ru=i({deviceId:_(),capabilities:p(_()).optional()}),iu=i({deviceId:_()}),au={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:eu,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:E(g(),eu),listSupportedDeviceKinds:E(g(),p(tu)),listExposedDevices:E(g(),p(nu)),exposeDevice:E(ru,g(),{kind:`mutation`}),unexposeDevice:E(iu,g(),{kind:`mutation`})}},ou=i({connected:y(),deviceCount:a(),error:_().optional()}),su=i({externalId:_(),name:_(),type:_(),metadata:n(_(),u()).optional()}),cu=i({stableId:_(),type:h(O),suggestedName:_(),prefilledConfig:n(_(),u()),sourceInfo:Ol.optional()}),lu=i({id:a(),stableId:_(),addonId:_(),type:_(),name:_(),parentDeviceId:a().nullable(),online:y(),features:p(_()),config:n(_(),u()),sourceInfo:Ol.optional()}),uu=i({status:h([`ok`,`error`]),labels:p(_()).optional(),error:_().optional()}),du=u(),fu={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:E(g(),g(),{kind:`mutation`}),stop:E(g(),g(),{kind:`mutation`}),getStatus:E(g(),ou),getDevices:E(g(),p(i({id:_(),name:_(),type:_()}))),supportsDiscovery:E(i({}),y()),discoverDevices:E(i({params:n(_(),u()).optional()}),p(cu),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:E(i({}),du),getManualCreationType:E(i({}),i({deviceType:h(O).nullable()})),adoptDiscoveredDevice:E(i({candidate:cu}),lu,{kind:`mutation`,auth:`admin`}),supportsManualCreation:E(i({}),y()),getChildCreationSchema:E(i({type:h(O)}),du),createDevice:E(i({type:h(O),config:n(_(),u())}),lu,{kind:`mutation`,auth:`admin`}),testCreationField:E(i({type:h(O),key:_(),value:u(),formValues:n(_(),u()).optional()}),uu,{kind:`mutation`,auth:`admin`})}},pu=i({childKey:_(),section:_(),order:a().optional(),collapsed:y().optional()}),mu=i({unit:_().min(1).optional(),precision:a().int().min(0).max(10).optional()}),hu=i({icon:_().min(1).optional(),label:_().min(1).optional(),unit:_().min(1).optional(),precision:a().int().min(0).max(10).optional(),hidden:y().optional(),perCap:n(_(),mu).optional()}),gu=i({unit:_().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:_().min(1).optional()}),_u=i({id:a(),stableId:_(),addonId:_(),type:h(O),name:_(),location:_().nullable(),disabled:y(),parentDeviceId:a().nullable(),role:_().nullable().optional(),online:y(),probed:y().optional(),features:p(_()),isCamera:y(),config:n(_(),u()),metadata:n(_(),u()).nullable().optional(),sourceInfo:Ol.optional(),integrationId:_().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:_().nullable().optional(),childLayout:p(pu).readonly().optional(),display:hu.optional()}),vu=i({key:_(),value:u(),description:_().optional()}),yu=h([`auto`,`manual`]),bu=i({deviceId:a(),name:_(),location:_().nullable(),features:p(_()),producesTrackedEvents:y().optional()}),xu=i({id:a(),stableId:_(),type:_(),name:_(),location:_().nullable(),disabled:y(),parentDeviceId:a().nullable(),role:_().nullable().optional()}),Su=i({id:a(),stableId:_(),addonId:_(),type:_(),name:_(),userNamed:y().optional(),location:_().nullable(),disabled:y(),parentDeviceId:a().nullable(),metadata:n(_(),u()).nullable().optional(),sourceInfo:Ol.optional(),integrationId:_().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:_().nullable().optional(),childLayout:p(pu).readonly().optional(),role:_().nullable().optional(),display:hu.optional()}),Cu=u().nullable(),wu=i({streamId:_(),width:a().optional(),height:a().optional(),codec:_().optional(),fps:a().optional(),bitrateKbps:a().optional()}),Tu=i({addonId:_(),stableId:_(),id:a(),type:_(),name:_(),location:_().nullable().optional(),disabled:y().optional(),parentDeviceId:a().nullable(),role:_().nullable().optional(),features:p(_()).optional(),config:n(_(),u())}),Eu=i({deviceId:a()}),Du=i({deviceId:a(),data:n(_(),u())}),Ou={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:E(i({addonId:_(),stableId:_()}),i({id:a()}),{kind:`mutation`}),registerDevice:E(Tu,g(),{kind:`mutation`}),removeDevice:E(Eu,g(),{kind:`mutation`}),persistConfig:E(Du,g(),{kind:`mutation`}),loadConfig:E(i({deviceId:a()}),n(_(),u())),loadRuntimeState:E(i({deviceId:a()}),n(_(),u())),loadMeta:E(i({deviceId:a()}),Su.nullable()),setName:E(i({deviceId:a(),name:_()}),g(),{kind:`mutation`,auth:`admin`}),setLocation:E(i({deviceId:a(),location:_().nullable()}),g(),{kind:`mutation`,auth:`admin`}),setType:E(i({deviceId:a(),type:h(O)}),g(),{kind:`mutation`,auth:`admin`}),setIntegrationId:E(i({deviceId:a(),integrationId:_()}),g(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:E(i({deviceId:a(),linkDeviceId:a().nullable()}),g(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:E(i({deviceId:a(),primaryChildEntityId:_().nullable()}),g(),{kind:`mutation`,auth:`admin`}),setChildLayout:E(i({deviceId:a(),childLayout:p(pu).readonly()}),g(),{kind:`mutation`,auth:`admin`}),setDisplay:E(i({deviceId:a(),display:hu.nullable()}),g(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:E(i({}),i({defaults:n(_(),gu)}),{kind:`query`}),setRoleDisplayDefaults:E(i({defaults:n(_(),gu)}),g(),{kind:`mutation`,auth:`admin`}),getWireableFields:E(i({deviceId:a(),includeSynthesizable:y().optional()}),i({caps:p(i({cap:_(),fields:p(i({path:_(),kind:h([`string`,`number`,`boolean`,`enum`]),enumValues:p(_()).optional(),item:y().optional()})).readonly(),itemArray:i({path:_(),keyField:_()}).optional()})).readonly()}),{kind:`query`}),setRole:E(i({deviceId:a(),role:_().nullable()}),g(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:E(i({deviceId:a(),name:_().optional(),location:_().nullable().optional(),type:h(O).optional(),integrationId:_().optional(),linkDeviceId:a().nullable().optional(),role:_().nullable().optional()}),g(),{kind:`mutation`,auth:`admin`}),setMetadata:E(i({deviceId:a(),patch:n(_(),u())}),g(),{kind:`mutation`,auth:`admin`}),listLocations:E(g(),p(_())),addLocation:E(i({name:_()}),g(),{kind:`mutation`,auth:`admin`}),removeLocation:E(i({name:_(),cascade:y().optional()}),g(),{kind:`mutation`,auth:`admin`}),setDisabled:E(i({deviceId:a(),disabled:y()}),g(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:E(i({addonId:_()}),p(xu)),listAll:E(i({addonId:_().optional(),projection:h([`full`,`slim`]).optional(),isCamera:y().optional()}),p(_u)),getDevice:E(i({deviceId:a()}),_u.nullable()),getChildren:E(i({parentDeviceId:a()}),p(_u)),getLinkedDevices:E(i({deviceId:a()}),i({mode:yu,devices:p(bu)})),getStreamSources:E(i({deviceId:a()}),p(Ye)),getConfigSchema:E(i({deviceId:a()}),p(vu)),getSettingsSchema:E(i({deviceId:a()}),Cu),updateConfig:E(i({deviceId:a(),values:n(_(),u())}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),enable:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),disable:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),remove:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:E(i({integrationId:_()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:E(i({deviceId:a()}),n(_(),_().nullable())),setStreamProfileMap:E(i({deviceId:a(),profileMap:n(_(),_().nullable())}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:E(i({deviceId:a()}),p(wu),{kind:`mutation`,auth:`admin`}),getBindings:E(i({deviceId:a()}),i({deviceId:a(),entries:p(i({capName:_(),kind:h([`native`,`wrapped`]),providerAddonId:_(),providerNodeId:_(),nativeAddonId:_()}))})),getAllBindings:E(i({}),p(i({deviceId:a(),entries:p(i({capName:_(),kind:h([`native`,`wrapped`]),providerAddonId:_(),providerNodeId:_(),nativeAddonId:_()}))}))),setWrapperActive:E(i({deviceId:a(),capName:_(),wrapperAddonId:_(),active:y()}),g(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:E(i({capName:_()}),p(_())),listBindableCapsForDeviceType:E(i({deviceType:_()}),p(i({capName:_(),wrappers:p(_())}))),getDeviceSettingsAggregate:E(i({deviceId:a()}),ts.nullable()),getDeviceLiveInfoAggregate:E(i({deviceId:a()}),ts.nullable()),getDeviceAggregate:E(i({deviceId:a()}),i({settings:ts.nullable(),live:ts.nullable()})),runDeviceAction:E(i({deviceId:a().int().nonnegative(),action:_().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:E(i({deviceId:a(),writerCapName:_(),writerAddonId:_(),key:_(),value:u()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:E(i({deviceId:a(),changes:p(i({writerCapName:_(),writerAddonId:_(),key:_(),value:u()}))}),i({success:b(!0),failures:p(i({writerCapName:_(),writerAddonId:_(),error:_()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:E(i({addonId:_()}),p(cu),{kind:`mutation`,auth:`admin`}),adoptDevice:E(i({addonId:_(),candidate:cu,integrationId:_().optional()}),lu,{kind:`mutation`,auth:`admin`}),getCreationSchema:E(i({addonId:_(),type:h(O)}),u().nullable()),createDevice:E(i({addonId:_(),type:h(O),config:n(_(),u()),integrationId:_().optional()}),lu,{kind:`mutation`,auth:`admin`}),testCreationField:E(i({addonId:_(),type:h(O),key:_(),value:u(),formValues:n(_(),u()).optional()}),uu,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:E(i({addonId:_(),integrationId:_()}),i({filters:p(Rl)}),{auth:`admin`}),adoptionListCandidates:E(Bl.extend({addonId:_()}),Vl,{auth:`admin`}),adoptionRefresh:E(i({addonId:_(),integrationId:_()}),Ul,{kind:`mutation`,auth:`admin`}),adoptionAdopt:E(Gl.extend({addonId:_()}),Kl,{kind:`mutation`,auth:`admin`}),adoptionRelease:E(ql.extend({addonId:_()}),g(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:E(Gl.extend({addonId:_()}),i({jobId:_()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:E(i({addonId:_(),integrationId:_().optional()}),p(Tr).readonly(),{auth:`admin`}),adoptionCancelJob:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`}),adoptionResync:E(Jl,Yl,{kind:`mutation`,auth:`admin`}),discoveryProviders:E(i({}),i({providers:p(i({addonId:_(),label:_()})).readonly()}),{auth:`admin`}),discoverAllProviders:E(i({}),i({groups:p(i({addonId:_(),label:_(),candidates:p(cu).readonly(),error:_().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:E(i({addonId:_(),params:n(_(),u()).optional()}),i({candidates:p(cu).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:E(i({addonId:_()}),i({deviceType:h(O).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:E(i({addonId:_()}),u(),{auth:`admin`}),testField:E(i({deviceId:a(),key:_(),value:u()}),uu,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:E(i({deviceId:a(),caps:p(_()).readonly().optional()}),n(_(),u().nullable())),getDeviceStatusAggregateBatch:E(i({deviceIds:p(a()).readonly(),caps:p(_()).readonly().optional()}),n(_(),n(_(),u().nullable())))}},ku={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:E(i({deviceId:a()}),n(_(),n(_(),u()))),getCapSlice:E(i({deviceId:a(),capName:_()}),n(_(),u()).nullable()),getAllSnapshots:E(i({}),n(_(),n(_(),n(_(),u())))),setCapSlice:E(i({deviceId:a(),capName:_(),slice:n(_(),u())}),g(),{kind:`mutation`})},events:{onChanged:D(i({deviceId:a(),capName:_(),slice:n(_(),u())}))}},Au=i({embedding:p(a()),inferenceMs:a()}),ju=i({modelId:_(),embeddingDim:a(),ready:y()}),Mu={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:E(i({crop:v(Uint8Array),width:a(),height:a()}),Au),encodeText:E(i({text:_()}),Au),getInfo:E(g(),ju)}},Nu=i({name:_(),path:_()}),Pu=i({path:_(),entries:p(Nu).readonly(),freeBytes:a(),totalBytes:a()}),Fu={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:E(g(),p(_()).readonly(),{auth:`admin`}),browse:E(i({path:_()}),Pu,{auth:`admin`}),createDir:E(i({path:_()}),i({path:_()}),{kind:`mutation`,auth:`admin`})}},Iu=i({inputTokens:a(),outputTokens:a()}),Lu=h([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Ru=i({ok:b(!0),text:_(),model:_(),usage:Iu,truncated:y(),latencyMs:a()}),zu=i({ok:b(!1),code:Lu,message:_(),retryAfterMs:a().optional()}),Bu=x(`ok`,[Ru,zu]),Vu=i({bytes:v(Uint8Array),mimeType:_()}),Hu=i({enabled:y().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Uu={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},Wu=i({addonId:_().optional(),profileId:_().optional(),consumer:_(),system:_().optional(),prompt:_(),jsonSchema:n(_(),u()).optional(),maxTokens:a().int().positive().optional(),temperature:a().optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),timeoutMs:a().int().positive().optional(),retry:Hu.optional(),requestId:_().optional()}),Gu=i({url:_(),filename:_(),sizeBytes:a(),sha256:_().optional()}),Ku=x(`kind`,[i({kind:b(`catalog`),catalogId:_()}),i({kind:b(`url`),url:_(),sha256:_().optional(),label:_().optional(),sizeBytes:a().optional(),extraFiles:p(Gu).optional()}),i({kind:b(`path`),path:_()})]),qu=i({nodeId:_(),engine:h([`llama-cpp`]),model:Ku,contextSize:a().int().default(4096),gpuLayers:a().int().default(0),threads:a().int().optional(),parallel:a().int().default(1),batchSize:a().int().positive().optional(),ubatchSize:a().int().positive().optional(),flashAttention:y().default(!1),mlock:y().default(!1),noMmap:y().default(!1),cacheTypeK:h([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:h([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:p(_()).default([]),autoStart:y().default(!1),idleStopMinutes:a().int().default(30)}),Ju=i({phase:h([`downloading`,`verifying`]),file:_(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),Yu=i({nodeId:_(),state:h([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:a().optional(),port:a().optional(),modelPath:_().optional(),modelId:_().optional(),downloadProgress:a().min(0).max(1).optional(),download:Ju.optional(),lastError:_().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),Xu=i({file:_(),sizeBytes:a(),catalogId:_().optional(),installedAt:a().optional(),path:_().optional()}),Zu=i({nodeId:_(),modelsBytes:a(),freeBytes:a().optional()}),Qu=Wu.extend({images:p(Vu).optional(),runtime:qu,timeoutMs:a().int().positive().optional()}),$u={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:E(Qu,Bu,{kind:`mutation`}),ensureStarted:E(i({runtime:qu}),Yu,{kind:`mutation`,auth:`admin`}),stop:E(i({}),g(),{kind:`mutation`,auth:`admin`}),status:E(i({}),Yu),installModel:E(i({model:Ku}),g(),{kind:`mutation`,auth:`admin`}),deleteModel:E(i({file:_()}),g(),{kind:`mutation`,auth:`admin`}),listLocalModels:E(i({}),p(Xu)),getDiskUsage:E(i({}),Zu)}},ed=h([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),td=i({id:_(),name:_(),kind:ed,addonId:_(),enabled:y(),model:_(),baseUrl:_().optional(),apiKey:_().optional(),supportsVision:y(),temperature:a().min(0).max(2).optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),maxTokens:a().int().positive().optional(),contextLength:a().int().positive().optional(),systemPrompt:_().optional(),timeoutMs:a().int().positive().default(6e4),connectTimeoutMs:a().int().positive().default(1e4),firstTokenTimeoutMs:a().int().positive().default(12e4),idleTimeoutMs:a().int().positive().default(6e4),retry:Hu.default({enabled:!1,maxAttempts:1}),toolsEnabled:y().default(!1),extraHeaders:n(_(),_()).optional(),runtime:qu.optional()}),nd=u(),rd=i({kind:ed,label:_(),icon:_(),addonId:_(),configSchema:nd}),id=c([i({consumer:_()}),i({purpose:h([`text`,`vision`])})]),ad=i({selector:id,profileId:_()}),od=i({day:_(),consumer:_(),profileId:_(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),sd=i({id:_(),label:_(),family:_(),purpose:h([`text`,`vision`]),url:_(),sha256:_(),sizeBytes:a(),quantization:_(),minRamBytes:a(),contextSizeDefault:a().int(),mmprojUrl:_().optional()}),cd=x(`ok`,[i({ok:b(!0),model:Ku,label:_(),repo:_(),quantization:_(),purpose:h([`text`,`vision`]),totalBytes:a(),extraFilenames:p(_())}),i({ok:b(!1),code:_(),message:_(),candidates:p(_()).optional(),requiredBytes:a().optional()})]),ld=i({nodeId:_(),reachable:y(),status:Yu.optional(),disk:Zu.optional(),error:_().optional()}),ud=Wu.extend({images:p(Vu).min(1)}),dd=i({addonId:_(),profileId:_()}),fd={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:E(Wu,Bu,{kind:`mutation`}),generateVision:E(ud,Bu,{kind:`mutation`}),cancel:E(i({addonId:_().optional(),requestId:_()}),g(),{kind:`mutation`}),listProfileKinds:E(i({}),p(rd)),listProfiles:E(i({}),p(td)),upsertProfile:E(i({profile:td}),td,{kind:`mutation`,auth:`admin`}),deleteProfile:E(dd,g(),{kind:`mutation`,auth:`admin`}),testProfile:E(dd,Bu,{kind:`mutation`,auth:`admin`}),listModels:E(dd,p(_())),getDefaults:E(i({}),p(ad)),setDefault:E(i({selector:id,profileId:_().nullable()}),g(),{kind:`mutation`,auth:`admin`}),getUsage:E(i({since:a().optional(),until:a().optional(),consumer:_().optional(),profileId:_().optional()}),p(od)),listModelCatalog:E(i({}),p(sd)),listRuntimeNodes:E(i({}),p(ld)),listNodeModels:E(i({nodeId:_()}),p(Xu)),resolveModelRef:E(i({ref:_(),maxBytes:a().positive().optional()}),cd,{kind:`mutation`,auth:`admin`}),installModel:E(i({nodeId:_(),model:Ku}),g(),{kind:`mutation`,auth:`admin`}),deleteModel:E(i({nodeId:_(),file:_()}),g(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:E(dd,Yu),startRuntime:E(dd,Yu,{kind:`mutation`,auth:`admin`}),stopRuntime:E(dd,g(),{kind:`mutation`,auth:`admin`})}},pd=h([`debug`,`info`,`warn`,`error`]),md=i({timestamp:m(),level:pd,scope:p(_()),message:_(),meta:n(_(),u()).optional(),tags:n(_(),_()).optional()}),hd={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:E(md,g(),{kind:`mutation`}),query:E(i({scope:p(_()).optional(),level:pd.optional(),since:m().optional(),until:m().optional(),limit:a().optional(),tags:n(_(),_()).optional()}),p(md).readonly())},mount:{kind:`skip`}},gd=h([`primary`,`second-factor`]),_d=i({kind:b(`redirect`),id:_(),label:_(),icon:_().optional(),startUrl:_(),stage:gd}),vd=i({kind:b(`widget`),id:_(),addonId:_(),bundle:_(),remote:ss,stage:gd}),yd=i({kind:b(`passkey`),id:_(),label:_(),stage:gd,rpId:_(),origin:_().nullable()}),bd=x(`kind`,[_d,vd,yd]),xd={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:E(g(),p(bd).readonly())},mount:{kind:`skip`}},Sd=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),Cd=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),wd=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),Td=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),Ed=i({utilization:a(),model:_(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Dd=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Od=i({avg10:a(),avg60:a(),avg300:a()}),kd=i({some:Od,full:Od.nullable()}),Ad=i({cpu:Sd,memory:Cd,gpu:Ed.nullable(),network:Td,disk:wd,pressure:i({cpu:kd.nullable(),memory:kd.nullable(),io:kd.nullable()}),process:Dd,cpuTemperature:a().nullable(),timestampMs:a()}),jd=i({path:_(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Md=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),Nd=i({addonId:_(),nodeId:_(),role:h([`hub`,`worker`]),pid:a(),state:h([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),Pd=i({pid:a(),ppid:a(),pgid:a(),classification:h([`root`,`managed`,`system`,`ghost`]),addonId:_().nullable(),nodeId:_().nullable(),command:_(),cpuPercent:a(),memoryRssBytes:a(),uptimeSec:a(),orphaned:y()}),Fd=i({pid:a(),force:y().optional()}),Id=i({success:y(),reason:_().optional(),signal:h([`SIGTERM`,`SIGKILL`]).optional()}),Ld=i({addonId:_()}),Rd=i({success:y(),path:_().optional(),pid:a().optional(),reason:_().optional()}),zd=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),Bd={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:E(g(),Ad),getCached:E(g(),Ad.nullable()),getCurrent:E(g(),zd),getDiskSpace:E(i({dirPath:_()}),jd),getGpuInfo:E(g(),Ed.nullable()),getCpuTemperature:E(g(),a().nullable()),getProcessStats:E(i({pids:p(a())}),p(Md)),listAddonInstances:E(g(),p(Nd).readonly()),getAddonStats:E(i({addonId:_()}),Md.nullable()),listNodeProcesses:E(g(),p(Pd).readonly()),killProcess:E(Fd,Id,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:E(Ld,Rd,{kind:`mutation`,auth:`admin`})}},Vd=i({sourceUrl:_(),metadata:xa,targets:p(ba).min(1).readonly(),calibrationRef:_().optional(),sessionId:_().optional()}),Hd={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:E(Vd,Ca,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},Ud=i({nodeId:_(),modelId:_(),format:h(ha),entry:ya}),Wd=i({ok:y(),sha256:_(),bytes:a(),path:_()}),Gd={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:E(Ud,Wd,{kind:`mutation`,auth:`admin`})}},Kd=i({bbox:H,pixelCount:a(),intensity:a()}),qd=i({detected:y(),regionCount:a(),regions:p(Kd).readonly(),rawRegions:p(Kd).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),Jd={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{analyze:E(i({deviceId:a(),frame:ys.optional(),frameHandle:w.optional()}),qd,{kind:`mutation`}),removeCamera:E(i({deviceId:a()}),g(),{kind:`mutation`}),reset:E(g(),g(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:y(),regionCount:a()})}}},Yd=h([`external`,`embedded`]),Xd=h([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),Zd=i({id:_(),name:_(),url:_(),kind:Yd,status:Xd,latencyMs:a().nullable(),error:_().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),Qd=i({url:_(),username:_().optional(),password:_().optional(),clientIdPrefix:_().optional()}),$d=i({name:_().min(1),url:_().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:_().optional(),password:_().optional(),clientIdPrefix:_().optional()}),ef=i({id:_()}),tf=i({id:_()}),nf=x(`ok`,[i({ok:b(!0),latencyMs:a()}),i({ok:b(!1),error:_()})]),rf=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:y().default(!1),username:_().optional(),password:_().optional()}),af=i({id:_(),url:_()}),of=i({brokerCount:a(),embeddedRunning:y()}),sf={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:of,kind:`poll`},methods:{listBrokers:E(g(),p(Zd)),getBrokerConfig:E(tf,Qd),addBroker:E($d,ef,{kind:`mutation`}),removeBroker:E(tf,g(),{kind:`mutation`}),testConnection:E(tf,nf,{kind:`mutation`}),startEmbeddedBroker:E(rf,af,{kind:`mutation`}),stopEmbeddedBroker:E(tf,g(),{kind:`mutation`}),getStatus:E(g(),of)}},cf=i({url:_(),hostname:_(),port:a(),protocol:h([`http`,`https`])}),lf=i({connected:y(),endpoint:cf.nullable(),error:_().optional()}),uf=cf.extend({id:_(),label:_(),mode:_().optional(),sourcePort:a().optional()}),df={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:E(g(),cf,{kind:`mutation`}),stop:E(g(),g(),{kind:`mutation`}),getEndpoint:E(g(),cf.nullable()),getStatus:E(g(),lf),listEndpoints:E(g(),p(uf).readonly())}},ff=h([`image`,`video`,`gif`,`audio`,`icon`]),pf=i({mediaType:ff,url:_().optional(),bytes:v(Uint8Array).optional(),mime:_().optional(),name:_().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),mf=h([`text`,`markdown`,`html`]),hf=h([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),gf=i({id:_(),label:_(),url:_().optional(),icon:hf.optional(),destructive:y().optional(),mode:h([`navigate`,`background`]).optional()}),_f=i({body:_(),title:_().optional(),format:mf.default(`text`),priority:a().int().min(1).max(5).default(3),level:_().optional(),attachments:p(pf).optional(),clickUrl:_().optional(),actions:p(gf).optional(),sound:_().optional(),ttl:a().optional(),tag:_().optional(),deviceId:a().optional(),eventId:_().optional(),metadata:n(_(),u()).optional()}),vf=i({id:_(),label:_(),ordinal:a().int().min(1).max(5).nullable(),flags:i({critical:y().optional(),silent:y().optional(),noPush:y().optional()}).optional(),requires:p(_()).optional(),description:_().optional()}),yf=i({attachments:i({mediaTypes:p(ff),mode:h([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:y().optional(),levels:p(vf),format:p(mf),clickUrl:y(),sound:y(),ttl:y(),bodyMaxLen:a().int().positive()}),bf=u(),xf=i({kind:_(),label:_(),icon:_(),addonId:_(),iconUrl:_().optional(),iconMediaType:_().optional(),configSchema:bf,supportsDiscovery:y(),caps:yf}),Sf=i({id:_(),name:_(),kind:_(),addonId:_(),enabled:y(),config:n(_(),u())}),Cf=i({kind:_(),suggestedName:_(),config:n(_(),u())}),wf=i({level:_(),format:mf,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:y(),dropped:p(_())}),Tf=i({success:y(),error:_().optional(),renderedAs:wf.optional()}),Ef=Tf,Df={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:E(i({}),p(xf)),listTargets:E(i({}),p(Sf)),discoverTargets:E(i({kind:_(),config:n(_(),u()).optional()}),p(Cf)),send:E(i({targetId:_(),notification:_f}),Tf,{kind:`mutation`}),testTarget:E(i({targetId:_(),sample:_f.optional()}),Ef,{kind:`mutation`}),upsertTarget:E(i({target:Sf}),Sf,{kind:`mutation`}),deleteTarget:E(i({targetId:_()}),g(),{kind:`mutation`}),setTargetEnabled:E(i({targetId:_(),enabled:y()}),g(),{kind:`mutation`})}},Of=[{id:`person`,name:`Person`},{id:`bicycle`,name:`Bicycle`},{id:`car`,name:`Car`},{id:`motorcycle`,name:`Motorcycle`},{id:`airplane`,name:`Airplane`},{id:`bus`,name:`Bus`},{id:`train`,name:`Train`},{id:`truck`,name:`Truck`},{id:`boat`,name:`Boat`},{id:`traffic light`,name:`Traffic Light`},{id:`fire hydrant`,name:`Fire Hydrant`},{id:`stop sign`,name:`Stop Sign`},{id:`parking meter`,name:`Parking Meter`},{id:`bench`,name:`Bench`},{id:`bird`,name:`Bird`},{id:`cat`,name:`Cat`},{id:`dog`,name:`Dog`},{id:`horse`,name:`Horse`},{id:`sheep`,name:`Sheep`},{id:`cow`,name:`Cow`},{id:`elephant`,name:`Elephant`},{id:`bear`,name:`Bear`},{id:`zebra`,name:`Zebra`},{id:`giraffe`,name:`Giraffe`},{id:`backpack`,name:`Backpack`},{id:`umbrella`,name:`Umbrella`},{id:`handbag`,name:`Handbag`},{id:`tie`,name:`Tie`},{id:`suitcase`,name:`Suitcase`},{id:`frisbee`,name:`Frisbee`},{id:`skis`,name:`Skis`},{id:`snowboard`,name:`Snowboard`},{id:`sports ball`,name:`Sports Ball`},{id:`kite`,name:`Kite`},{id:`baseball bat`,name:`Baseball Bat`},{id:`baseball glove`,name:`Baseball Glove`},{id:`skateboard`,name:`Skateboard`},{id:`surfboard`,name:`Surfboard`},{id:`tennis racket`,name:`Tennis Racket`},{id:`bottle`,name:`Bottle`},{id:`wine glass`,name:`Wine Glass`},{id:`cup`,name:`Cup`},{id:`fork`,name:`Fork`},{id:`knife`,name:`Knife`},{id:`spoon`,name:`Spoon`},{id:`bowl`,name:`Bowl`},{id:`banana`,name:`Banana`},{id:`apple`,name:`Apple`},{id:`sandwich`,name:`Sandwich`},{id:`orange`,name:`Orange`},{id:`broccoli`,name:`Broccoli`},{id:`carrot`,name:`Carrot`},{id:`hot dog`,name:`Hot Dog`},{id:`pizza`,name:`Pizza`},{id:`donut`,name:`Donut`},{id:`cake`,name:`Cake`},{id:`chair`,name:`Chair`},{id:`couch`,name:`Couch`},{id:`potted plant`,name:`Potted Plant`},{id:`bed`,name:`Bed`},{id:`dining table`,name:`Dining Table`},{id:`toilet`,name:`Toilet`},{id:`tv`,name:`TV`},{id:`laptop`,name:`Laptop`},{id:`mouse`,name:`Mouse`},{id:`remote`,name:`Remote`},{id:`keyboard`,name:`Keyboard`},{id:`cell phone`,name:`Cell Phone`},{id:`microwave`,name:`Microwave`},{id:`oven`,name:`Oven`},{id:`toaster`,name:`Toaster`},{id:`sink`,name:`Sink`},{id:`refrigerator`,name:`Refrigerator`},{id:`book`,name:`Book`},{id:`clock`,name:`Clock`},{id:`vase`,name:`Vase`},{id:`scissors`,name:`Scissors`},{id:`teddy bear`,name:`Teddy Bear`},{id:`hair drier`,name:`Hair Drier`},{id:`toothbrush`,name:`Toothbrush`}],kf=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Af=new Set(kf.map(e=>e.id));function jf(e){return Af.has(e.trim().toLowerCase())}var Mf={mapping:{person:`person`,bicycle:`vehicle`,car:`vehicle`,motorcycle:`vehicle`,airplane:`vehicle`,bus:`vehicle`,train:`vehicle`,truck:`vehicle`,boat:`vehicle`,bird:`animal`,cat:`animal`,dog:`animal`,horse:`animal`,sheep:`animal`,cow:`animal`,elephant:`animal`,bear:`animal`,zebra:`animal`,giraffe:`animal`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1},Nf=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],Pf={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},Ff={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},If=new Map;for(let[e,t]of Object.entries(Pf.mapping))If.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Ff.mapping))If.set(e.toLowerCase(),t);function Lf(e){return If.get(e.toLowerCase())??null}function Rf(){return Nf.map(e=>e.id)}var U={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},zf=`#22ff55`,Bf={car:`#f59e0b`,truck:`#d97706`,bus:`#b45309`,motorcycle:`#eab308`,bicycle:`#ca8a04`,airplane:`#60a5fa`,boat:`#2563eb`,train:`#1d4ed8`,bird:`#14b8a6`,dog:`#84cc16`,cat:`#f97316`,horse:`#a16207`,sheep:`#a3a3a3`,cow:`#78716c`,elephant:`#6b7280`,bear:`#7c2d12`,zebra:`#404040`,giraffe:`#d4a373`};function Vf(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var Hf=new Map;function W(e,t,n,r,i){Hf.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function G(e,t,n,r,i,a){Hf.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}W(`motion`,`motion`,U.motion,`motion`,`Motion`),W(`audio`,`audio`,U.audio,`audio`,`Audio`),W(`person`,`detection`,U.person,`person`,`Person`),W(`vehicle`,`detection`,U.vehicle,`vehicle`,`Vehicle`),W(`animal`,`detection`,U.animal,`animal`,`Animal`),W(`package`,`package`,U.package,`package`,`Package`),W(`sensor`,`sensor`,U.sensor,`sensor`,`Sensor`),W(`control`,`control`,U.control,`control`,`Control`);for(let[e,t]of Object.entries(Mf.mapping))t!==`vehicle`&&t!==`animal`||Hf.has(e)||G(e,t,`detection`,Bf[e]??U.genericDetection,e,Vf(e));G(`package-delivered`,`package`,`package`,U.package,`package`,`Package delivered`),G(`package-picked-up`,`package`,`package`,U.package,`package`,`Package picked up`),G(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),G(`motion-sensor`,`sensor`,`sensor`,U.sensor,`pir`,`Motion sensor`),G(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),G(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),G(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),G(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),G(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),G(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),G(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),G(`enum-sensor`,`sensor`,`sensor`,U.sensor,`generic`,`Sensor state`),G(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),G(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),G(`switch`,`control`,`control`,U.control,`switch`,`Switch`),G(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),G(`button`,`control`,`control`,`#10b981`,`button`,`Button`),G(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of Nf){let t=`audio-${e.id}`;Hf.has(t)||G(t,`audio`,`audio`,U.audio,t,e.name)}var Uf=Object.freeze(Object.fromEntries(Hf));function Wf(e){return Uf[e]}function Gf(e){return Uf[e]?.color??`#22ff55`}function Kf(e){let t=[];for(let n of Object.values(Uf))n.parentKind===e&&t.push(n);return t}var qf=i({kind:_(),label:_(),parentKind:_().nullable()}),Jf=i({videoClasses:p(qf),audioKinds:p(qf),labels:p(qf)});function Yf(e,t,n){return{kind:e,label:t,parentKind:n}}function Xf(){let e=Object.values(Uf);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>Yf(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>Yf(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>Yf(e.kind,e.label,e.parentKind))}}var Zf=Object.freeze(Xf()),Qf=h([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),$f=h([`home`,`away`,`night`,`vacation`,`custom_bypass`]),ep=i({state:Qf,availableModes:p($f),requiresCode:y(),lastChangedAt:a()}),tp={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.AlarmPanel],methods:{arm:E(i({deviceId:a().int().nonnegative(),mode:$f,code:_().min(1).optional()}),g(),{kind:`mutation`,auth:`admin`}),disarm:E(i({deviceId:a().int().nonnegative(),code:_().min(1).optional()}),g(),{kind:`mutation`,auth:`admin`}),trigger:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:ep,kind:`push`},runtimeState:ep,durability:`restored`,volatileStateFields:[`lastChangedAt`]},np=i({x:a(),y:a()}),K=i({kind:b(`rect`),x:a(),y:a(),width:a(),height:a()}),rp=i({kind:b(`polygon`),points:p(np)}),ip=i({kind:b(`grid`),gridWidth:a(),gridHeight:a(),cells:p(y())}),ap=i({kind:b(`line`),points:p(np)}),op=x(`kind`,[K,rp,ip,ap]),sp=h([`rect`,`polygon`,`grid`,`line`]),cp=i({min:a(),max:a()}),lp=i({width:a(),height:a()}),up=h([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),dp=h([`device-online`,`device-offline`,`device-disabled`,`device-enabled`,`stream-online`,`stream-offline`,`node-online`,`node-offline`,`node-inference-unavailable`,`detection-blind`,`addon-crash-loop`,`addon-update-available`,`server-update-available`,`alarm-triggered`,`alarm-armed`,`alarm-disarmed`,`alarm-arming`,`alarm-arm-refused`,`addon-updated`,`server-updated`,`export-completed`,`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),fp=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),pp=dp.options.filter(e=>!fp.has(e)),mp=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],hp=i({kinds:p(dp).min(1),deviceIds:p(a().int()).min(1).optional(),deviceTypes:p(_().min(1)).min(1).optional(),nodeIds:p(_().min(1)).min(1).optional(),packageNames:p(_().min(1)).min(1).optional()}),gp=1,_p=1440,vp=[10,30,60],yp=i({days:p(a().int().min(0).max(6)).min(1),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(0).max(1439)}),bp=i({windows:p(yp).min(1),timezone:_().optional(),invert:y().optional()}),xp=i({values:p(_().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),Sp=i({zoneId:_().optional(),className:_().optional(),op:h([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:a().int().min(0).default(1),sustainSeconds:a().int().min(0).max(3600).default(15)}),Cp=-96,wp=i({labels:p(_().min(1)).min(1).optional(),dbThreshold:a().min(-96).max(0).optional(),hitPercent:a().int().min(1).max(100).default(60),samplingSeconds:a().int().min(1).max(300).default(10)}),Tp=h([`enter`,`exit`,`any`]),Ep=i({ids:p(_().min(1)).min(1),match:h([`any`,`all`]).default(`any`)}),Dp=x(`kind`,[i({kind:b(`wait`),seconds:a().min(0).max(300)}),i({kind:b(`cap`),deviceId:a().int(),cap:_().min(1),method:_().min(1),args:n(_(),u()).optional()})]),Op=i({name:_().min(1).max(120),enabled:y(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Dp).min(1)}),kp=i({id:_().min(1).max(64),label:_().min(1).max(40),sequence:_().min(1).max(120),icon:hf.optional(),destructive:y().optional()}),Ap=i({onTrigger:p(Op).optional(),buttons:p(kp).max(8).optional()}),jp=i({deviceId:a().int(),states:p(_().min(1)).min(1)}),Mp=i({sceneId:_().min(1),deviceId:a().int().optional(),requiredState:h([`matched`,`diverged`]),latched:y().optional()}),Np=i({deviceState:jp.optional(),scene:Mp.optional(),devices:p(a()).optional(),classes:p(_().min(1)).optional(),classesExclude:p(_().min(1)).optional(),minConfidence:a().min(0).max(1).optional(),zones:Ep.optional(),zonesExclude:p(_().min(1)).optional(),crossing:Tp.optional(),labelEquals:p(_().min(1)).optional(),identities:p(_().min(1)).optional(),plates:xp.optional(),identitiesExclude:p(_().min(1)).optional(),minImportance:a().min(0).max(1).optional(),minDwellSeconds:a().min(0).optional(),source:h([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:a().min(0).max(1).optional(),eventTypeTokens:p(_().min(1)).optional(),sensorKinds:p(_().min(1)).optional(),packagePhase:h([`delivered`,`picked-up`,`both`]).optional(),systemEvent:hp.optional(),customZones:p(rp).optional(),occupancy:Sp.optional(),audio:wp.optional()}),Pp=i({targetId:_().min(1),params:n(_(),u()).optional()}),Fp=h([`cropped`,`full`,`boxed`]),Ip=i({attach:h([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Fp.optional(),zoneCrop:y().optional(),gif:y().optional(),clip:y().optional(),clipPreRollSec:a().int().min(0).max(30).optional(),clipPostRollSec:a().int().min(0).max(30).optional(),clipSpeed:a().min(1).max(8).optional(),profile:C.optional()}),Lp=h([`shared`,`per-class`]),Rp=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:h([`rule`,`rule-device`]).default(`rule-device`),granularity:Lp.optional()}),zp=1e3,Bp=2e4,Vp=8e3,Hp=448,Up=i({op:h([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),Wp=i({enabled:y().default(!1),profileId:_().optional(),prompt:_().max(1e3).optional(),expect:Up.optional(),timeoutMs:a().int().min(zp).max(Bp).default(Vp),onTimeout:h([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),Gp=i({name:_().min(1).max(200),enabled:y().default(!0),delivery:up,conditions:Np.default({}),schedule:bp.optional(),targets:p(Pp),targetUsers:p(_()).optional(),media:Ip.default({attach:`best`}),throttle:Rp.default({cooldownSec:60,scope:`rule-device`}),template:i({title:_().max(500).optional(),body:_().max(2e3).optional()}).optional(),priority:a().int().min(1).max(5).default(3),ownerUserId:_().optional(),snoozeAllowGlobal:y().optional(),snoozeOptions:p(a().int().min(1).max(_p)).max(4).optional(),actions:Ap.optional(),confirm:Wp.optional(),waitForEnhancement:y().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),Kp=Gp.partial().extend({disabledTargetIds:p(_()).optional(),enabled:y().optional(),conditions:Np.optional(),media:Ip.optional(),throttle:Rp.optional(),priority:a().int().min(1).max(5).optional()}),qp=Gp.extend({id:_(),createdBy:_(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(_()).default([])}),Jp=i({recordId:_(),recordKind:h([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:a(),timestamp:a(),wouldFire:y(),failedCondition:_().optional(),className:_().optional(),label:_().optional()}),Yp=i({id:_(),group:h([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:_(),valueType:h([`deviceIdList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:h([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:p(up),phase:_(),description:_().optional(),options:p(i({value:_(),label:_(),hint:_().optional()})).readonly().optional()}),Xp=[{id:`systemEvent`,group:`system`,label:`System event`,valueType:`systemEvent`,options:[{value:`device-online`,label:`Device online`},{value:`device-offline`,label:`Device offline`},{value:`device-disabled`,label:`Device switched off`},{value:`device-enabled`,label:`Device switched on`},{value:`stream-online`,label:`Stream online`},{value:`stream-offline`,label:`Stream offline`},{value:`node-online`,label:`Node online`},{value:`node-offline`,label:`Node offline`},{value:`node-inference-unavailable`,label:`Node has no usable inference device`},{value:`detection-blind`,label:`Camera detecting nothing`},{value:`addon-crash-loop`,label:`Addon stopped after repeated crashes`},{value:`addon-update-available`,label:`Addon update available`},{value:`server-update-available`,label:`Server update available`},{value:`addon-updated`,label:`Addons updated`},{value:`server-updated`,label:`Server updated`},{value:`export-completed`,label:`Export completed`},{value:`alarm-arming`,label:`Alarm arming (exit delay)`},{value:`alarm-armed`,label:`Alarm armed`},{value:`alarm-triggered`,label:`Alarm triggered`},{value:`alarm-disarmed`,label:`Alarm disarmed`}],operator:`in`,appliesTo:[`system-event`],phase:`P1`,description:`Infrastructure and update events. Device liveness covers EVERY device type — narrow it by device type (cameras only, say) and/or by device, node events by node id, and addon updates by package name.`},{id:`devices`,group:`scope`,label:`Devices`,valueType:`deviceIdList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Restrict the rule to these devices; absent = all devices. A sensor event matches either the SENSOR that fired or the camera it is attributed to, so a rule may name either one.`},{id:`classes`,group:`class`,label:`Object classes`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Any overlap with the detection class set passes.`},{id:`classesExclude`,group:`class`,label:`Excluded classes`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`minConfidence`,group:`quality`,label:`Minimum confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`zones`,group:`zones`,label:`Zones`,valueType:`zoneSelection`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Admin zone ids; quantifier any/all over the visited set.`},{id:`zonesExclude`,group:`zones`,label:`Excluded zones`,valueType:`zoneIdList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`crossing`,group:`zones`,label:`Zone crossing`,valueType:`crossingSelect`,options:[{value:``,label:`Not set — entering`,hint:`Entries, and every detection that is not a crossing at all. Exits are excluded. This is what a rule without a crossing condition already does, and choosing it writes nothing to the rule.`},{value:`enter`,label:`Entered a zone`,hint:`The same matches as "not set", stated explicitly: entries and non-crossing detections pass, exits do not.`},{value:`exit`,label:`Left a zone`,hint:`ONLY an exit crossing. A detection that is not a crossing fails, so this rule cannot fire on ordinary movement — pair it with the zones the subject must have left. Also matches a tripwire crossed against its drawn direction.`},{value:`any`,label:`Entered or left`,hint:`No direction filter: entries, exits and non-crossing detections alike. This is the only choice that adds exits to what the rule already matched.`}],operator:`in`,appliesTo:[`immediate`],phase:`P1`,description:`Direction of the zone crossing: enter (the default, and what every rule authored before this did) / exit / any. An exit rule matches only crossings.`},{id:`labelEquals`,group:`label`,label:`Label equals`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Exact match on the collapsed label (identity / plate / subclass).`},{id:`identities`,group:`label`,label:`Known faces`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only recognised people. Selecting NOBODY means every identity in the face gallery; selecting some narrows to those. Matched on the gallery id, so renaming a person does not break the rule. On immediate delivery the name is not known yet when the notification is enqueued — see the rule’s "wait for recognition" switch.`},{id:`plates`,group:`label`,label:`Known plates`,valueType:`plateMatcher`,operator:`fuzzyIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only vehicles whose plate was read. Selecting NO plate means any readable plate; listed plates are matched Levenshtein-tolerantly, because OCR noise makes an exact match useless.`},{id:`identitiesExclude`,group:`label`,label:`Excluded faces`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Veto by identity (mirror of Known faces, same gallery ids). A subject nobody recognised passes — there is nothing to exclude.`},{id:`minLabelConfidence`,group:`label`,label:`Minimum label confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Best identity/plate recognition match confidence [0,1] for the label the track carries at close (peak assigned-identity cosine / peak plate OCR score; the higher of the two when both were read). Distinct from detection confidence. Fails closed for a track that ended un-recognized.`},{id:`minImportance`,group:`quality`,label:`Minimum importance`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Server-computed key-event importance [0,1]; track-end rules only (importance is scored at close). Fails when the record has none.`},{id:`minDwellSeconds`,group:`quality`,label:`Minimum dwell (seconds)`,valueType:`number`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Track lifespan in seconds (lastSeen − firstSeen); track-end rules only.`},{id:`source`,group:`scope`,label:`Detection source`,valueType:`sourceSelect`,options:[{value:`any`,label:`Any source`},{value:`pipeline`,label:`Pipeline`},{value:`onboard`,label:`Onboard (camera)`},{value:`sensor`,label:`Sensor`},{value:`audio`,label:`Audio marker`}],operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`pipeline / onboard / sensor / audio; a record with no stamped source counts as pipeline.`},{id:`deviceState`,group:`scope`,label:`Device state`,valueType:`deviceState`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P2`,description:`Only fire while another device is in one of the chosen states — the alarm armed, a switch on, a contact closed. A state that cannot be read does NOT fire.`},{id:`scene`,group:`scope`,label:`Scene state`,valueType:`scene`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P3`,description:`Only fire while a scene is matched (the baseline is what we see) or diverged (it demonstrably is not) — “tell me about a person at the door, but only while the bin is still out”. A scene that cannot judge, or one this hub has not read yet, does NOT fire.`},{id:`sensorKinds`,group:`device`,label:`Sensor kinds`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Sensor/control taxonomy kinds (doorbell / contact / button / …) matched against the persisted device event.`},{id:`eventTypeTokens`,group:`device`,label:`Event-type tokens`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Raw device event-type tokens (e.g. doorbell press / press_long) from the event-emitter slice; absent on doorbell-pulse / passive sensors.`},{id:`packagePhase`,group:`package`,label:`Package phase`,valueType:`packagePhase`,options:[{value:`delivered`,label:`Delivered`},{value:`picked-up`,label:`Picked up`},{value:`both`,label:`Both`}],operator:`in`,appliesTo:[`package-event`],phase:`P1`,description:`Delivered / picked-up / both.`},{id:`occupancy`,group:`occupancy`,label:`Occupancy`,valueType:`occupancy`,operator:`anyOf`,appliesTo:[`device-event`],phase:`P1`,description:`ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot.`},{id:`audio`,group:`audio`,label:`Sound`,valueType:`audio`,operator:`anyOf`,appliesTo:[`immediate`],phase:`P2`,description:`Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence).`},{id:`customZones`,group:`zones`,label:`Custom zones`,valueType:`polygonDraw`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`User-drawn polygons; a detection whose bbox overlaps any polygon matches.`},{id:`schedule`,group:`schedule`,label:`Schedule`,valueType:`schedule`,operator:`withinSchedule`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`,`system-event`],phase:`P1`,description:`Weekly activation windows (invertible); absent = always active.`}],Zp=h([`pending`,`sent`,`dead`]),Qp=h([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),$p=i({className:_(),label:_().optional(),confidence:a().optional(),zones:p(_()),timestamp:a(),systemEvent:i({kind:dp,subject:_(),title:_(),body:_(),data:n(_(),u())}).optional()}),em=i({id:_(),ruleId:_(),ruleName:_(),delivery:up,targetId:_(),deviceId:a(),recordKind:Qp,recordId:_(),trackId:_().optional(),status:Zp,attempts:a().int(),createdAt:a(),updatedAt:a(),error:_().optional(),subject:$p}),tm=100,nm=500,rm=i({ruleId:_().optional(),deviceId:a().optional(),status:Zp.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),im=h([`rule`,`device`,`all`]),am=i({scope:im,ruleId:_().optional(),deviceId:a().int().optional(),classes:p(_().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(_p),global:y().optional(),summary:y().optional()}),om=i({id:_(),userId:_(),scope:im,ruleId:_().optional(),deviceId:a().int().optional(),classes:p(_().min(1)).min(1).optional(),startedAt:a(),expiresAt:a(),global:y(),summary:y(),digestSentAt:a().optional()}),sm=i({snoozeId:_(),targetId:_(),ruleId:_(),ruleName:_(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),cm=i({exitDelaySec:a().int().min(0).max(600),entryDelaySec:a().int().min(0).max(600),triggeredDurationSec:a().int().min(0).max(3600),announceArm:y(),announceTargets:p(_().min(1)).max(16)}),lm=cm.partial(),um=h([`muted`,`detection-off`,`offline`]),dm=i({deviceId:a().int(),reason:um}),fm=i({mode:$f,ruleCount:a().int().min(0),allDevices:y(),deviceIds:p(a().int()),skippedDevices:p(dm).default([])}),pm=i({deviceId:a().int().nullable(),settings:cm,coverage:p(fm)}),mm={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:E(i({}),i({rules:p(qp)}),{auth:`admin`}),getRule:E(i({ruleId:_()}),i({rule:qp.nullable()}),{auth:`admin`}),createRule:E(i({rule:Gp}),i({rule:qp}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:E(i({ruleId:_(),patch:Kp}),i({rule:qp}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:E(i({ruleId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:E(i({ruleId:_(),enabled:y()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:E(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:E(i({deviceId:a().int(),muted:y()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),testRule:E(i({rule:Gp,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(Jp)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:E(i({}),i({catalog:p(Yp),taxonomy:Jf.optional()})),getHistory:E(i({filter:rm.default({limit:100})}),i({entries:p(em)}),{auth:`admin`}),listSnoozes:E(i({}),i({snoozes:p(om)}),{caller:`required`}),createSnooze:E(i({snooze:am}),i({snooze:om}),{kind:`mutation`,caller:`required`}),cancelSnooze:E(i({snoozeId:_()}),i({success:b(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:E(i({}),pm,{auth:`admin`}),setAlarmConfig:E(i({patch:lm}),pm,{kind:`mutation`,auth:`admin`})}},hm=h([`view`,`create`,`delete`]),gm=c([b(`*`),p(_())]),_m=n(_(),c([b(`*`),p(_())])),vm=h([`device`,`system`]),ym=x(`kind`,[i({kind:b(`all`)}),i({kind:b(`ids`),ids:p(a().int()).min(1)}),i({kind:b(`types`),types:p(h(O)).min(1)}),i({kind:b(`locations`),locations:p(_().min(1)).min(1)})]),bm=i({type:b(`device`),selector:ym,access:p(hm).min(1),includeLinked:y().optional()});function xm(e){if(typeof e!=`object`||!e||Array.isArray(e)||Reflect.get(e,`type`)!==`device`||Reflect.get(e,`selector`)!==void 0)return e;let t=Reflect.get(e,`targets`);return Array.isArray(t)?{type:`device`,selector:{kind:`ids`,ids:t.map(e=>typeof e==`string`?Number(e):e).filter(e=>typeof e==`number`&&Number.isInteger(e))},access:Reflect.get(e,`access`)}:e}var q=ae(xm,x(`type`,[i({type:b(`category`),target:vm,access:p(hm).min(1)}),i({type:b(`capability`),target:_(),access:p(hm).min(1)}),i({type:b(`addon`),target:_(),access:p(hm).min(1)}),bm])),Sm=i({id:_(),username:_(),passwordHash:_(),isAdmin:y().default(!1),allowedProviders:gm,allowedDevices:_m,scopes:p(q).default([]),createdAt:a(),updatedAt:a()}),Cm=i({id:_(),label:_(),isAdmin:y().default(!1),allowedProviders:gm,allowedDevices:_m,tokenHash:_(),tokenPrefix:_(),createdAt:a(),lastUsedAt:a().optional()}),wm=i({id:_(),userId:_(),name:_(),tokenHash:_(),tokenPrefix:_(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Tm=i({integrationId:_(),displayName:_(),requestedScopes:p(q),allowedRedirectPrefixes:p(_()).min(1),allowedPrivateHostPaths:p(_()).optional(),requiresPkce:y().optional(),hubUrl:_().optional(),refreshTokenTtlSec:c([a().int().positive(),b(`never`)]).optional()}),Em={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:E(g(),Tm)}},Dm=h([`new`,`entered`,`left`,`moving`,`idle`]),Om=h([`motion`,`object`,`audio`]),km=x(`kind`,[K,rp]),Am=h([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),jm=h([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),Mm=h([`macro`,`sub`]),Nm=i({kind:_(),labelKey:_(),label:_(),color:_(),iconId:_(),icon:Am,category:jm,parentKind:_().nullable(),level:Mm,source:i({capName:_(),deviceId:a()})}),Pm=i({deviceId:a(),kinds:p(Nm).readonly()}),Fm=i({id:_(),deviceId:a(),sourceDeviceId:a(),kind:_(),value:n(_(),u()).nullable(),timestamp:a()}),Im=i({x:a(),y:a(),timestamp:a(),bbox:H}),Lm=i({timestamp:a(),position:Im,mediaKey:_()}),Rm=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),zm=h([`full`,`slim`]),Bm=i({label:_(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),Vm=h([`pipeline`,`sensor`,`audio`]),Hm=h([`none`,`staging`,`trained`]),Um={markForTrain:y().optional(),debug:y().optional(),favourited:y().optional()},Wm={retrainStatus:Hm.optional()},Gm=i(Um),Km=i({trackId:_(),markForTrain:y(),debug:y(),favourited:y(),retrainStatus:Hm}),qm=c([b(1),b(2)]),Jm=i({stepId:_(),modelId:_().optional(),decidedAt:a(),identityId:_().optional()}),Ym={label:_().optional(),labelScore:a().optional(),labelMeta:Jm.optional(),subLabel:_().optional(),subLabelScore:a().optional(),subLabelMeta:Jm.optional()},Xm=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Zm=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:y(),devices:p(Xm).readonly()}),Qm=i({trackId:_(),deviceId:a(),className:_(),...Ym,producingDeviceName:_().optional(),source:Vm.optional(),firstSeen:a(),lastSeen:a(),positions:p(Im).readonly(),snapshots:p(Lm).readonly(),zonesVisited:p(_()).readonly(),zoneNames:p(_()).readonly().optional(),classes:p(_()).readonly().optional(),totalDistance:a(),state:Dm,active:y(),importance:a().optional(),bestEventId:_().optional(),importanceReason:_().optional(),audioLabels:p(Bm).readonly().optional(),envelope:Rm.optional(),hasFace:y().optional(),hasEmbeddedFace:y().optional(),hasRider:y().optional(),...Um,...Wm}),$m={id:_(),deviceId:a(),timestamp:a()},eh=i({...$m,kind:b(`motion`),regionCount:a(),regions:p(i({bbox:H,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:_().optional()}),th=h([`pipeline`,`onboard`]),nh=h([`enter`,`exit`]),rh=i({direction:nh,zoneId:_(),zoneName:_().optional()}),ih=i({...$m,kind:b(`object`),source:th.optional(),frameId:_().optional(),trackId:_().optional(),className:_(),...Ym,confidence:a().optional(),bbox:H.optional(),zones:p(_()).readonly().optional(),state:Dm.optional(),zoneCrossing:rh.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:_().optional(),keyFrameMediaKey:_().optional(),mediaUrl:_().optional(),importance:a().optional()}),ah=i({...$m,kind:b(`audio`),rms:a(),dbfs:a(),classification:i({className:_(),originalClass:_().optional(),score:a()}).optional(),mediaUrl:_().optional()}),oh=h([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`]),sh=i({key:_(),kind:oh,base64:_(),sizeBytes:a(),timestamp:a()}),ch=sh.omit({base64:!0}),lh=h([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),uh=h([`subject`,`model_error`]),dh=h([`operator`,`assist`]),fh=i({x:a(),y:a(),w:a(),h:a()}),ph=i({id:_(),trackId:_(),deviceId:a(),mediaKey:_(),bbox:fh,macroClass:lh,label:_().optional(),subLabel:_().optional(),kind:uh,source:dh,assistModelId:_().optional(),assistScore:a().optional(),exportedInBatch:_().optional(),createdAt:a()}),mh=ph.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),hh=i({trackId:_(),deviceId:a(),className:_(),label:_().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),gh=i({mediaKey:_(),kind:oh,timestamp:a(),sizeBytes:a().int(),copied:y()}),_h=i({frameId:_(),deviceId:a(),trackId:_(),sourceMediaKey:_(),sourceKind:oh,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),vh=h([`source-missing`,`unreadable-image`,`write-failed`]),yh=i({copied:p(_h).readonly(),refused:p(i({sourceMediaKey:_(),reason:vh})).readonly()}),bh=i({candidates:p(gh).readonly(),copies:p(_h).readonly(),autoPickMediaKey:_().optional()}),xh=x(`kind`,[i({kind:b(`package`),zone:fh.optional()}),i({kind:b(`objects`),modelId:_(),minScore:a().optional()})]),Sh=x(`kind`,[i({kind:b(`proposed`),modelId:_(),stepId:_(),minScore:a(),proposals:p(mh).readonly(),belowThreshold:a().int()}),i({kind:b(`refused`),reason:_(),detail:_().optional()})]),Ch=i({trackId:_(),retrainStatus:Hm,changed:y(),reason:h([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),wh=1e3,Th=5e3,Eh=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(Th).default(wh),projection:h([`full`,`slim`]).optional()}),Dh=Eh.extend({classFilter:_().optional()}),Oh=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:_().optional(),projection:zm.optional(),includeStationary:y().optional()}),kh=i({tracks:p(Qm).readonly(),nextCursor:_().nullable()}),Ah=i({deviceId:a(),since:a(),until:a(),limit:a().int().min(1).max(200).default(50),minImportance:a().min(0).max(1).optional(),classFilter:_().optional()}),jh=i({id:_(),trackId:_(),timestamp:a(),className:_(),...Ym,importance:a(),bestEventId:_(),windowMs:a().optional(),...Um,...Wm}),Mh=i({trackId:_(),className:_(),confidence:a(),bbox:H,zones:p(_()).readonly(),state:Dm}),Nh=f({id:_(),kind:h([`first-level`,`detail`]),macroClass:_(),score:a(),bbox:i({x:a(),y:a(),width:a(),height:a()}),labels:p(f({label:_(),score:a()})).readonly(),parentId:_().optional()}),Ph=ih.extend({score:a()}),Fh=i({text:_(),deviceId:a().optional(),since:a().optional(),until:a().optional(),classFilter:_().optional(),limit:a().default(50),minScore:a().min(0).max(1).default(.2)}),Ih=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int()}),Lh=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),Rh=i({deviceId:a(),rows:a().int(),bytes:a().int()}),zh=i({totalRows:a().int(),totalBytes:a().int(),devices:p(Rh).readonly()}),Bh=i({motion:a().int(),object:a().int(),audio:a().int()}),Vh=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:_().optional(),pacingMs:a().int().nonnegative().optional()}),Hh=i({deleted:a()}),Uh=i({started:y(),alreadyRunning:y()}),Wh=i({running:y(),scanned:a(),rebuilt:a(),missingKeyFrame:a(),missingBbox:a(),notRunnable:a(),noCapableNode:a(),failed:a(),complete:y().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:_().nullable()}),Gh={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:E(i({deviceId:a()}),p(Qm).readonly()),getTrack:E(i({deviceId:a(),trackId:_()}),Qm.nullable()),listTracks:E(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:km.optional(),projection:zm.optional(),includeStationary:y().optional()}),p(Qm).readonly()),listRecentTracks:E(Oh,kh),clearTracks:E(i({deviceId:a()}),g(),{kind:`mutation`,auth:`admin`}),getMotionEvents:E(Eh,p(eh).readonly()),getObjectEvents:E(Dh,p(ih).readonly()),getAudioEvents:E(Eh,p(ah).readonly()),listEventKinds:E(i({deviceId:a()}),p(Nm).readonly()),listEventKindsBatch:E(i({deviceIds:p(a()).min(1).max(200)}),p(Pm).readonly()),getSensorEvents:E(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(_()).optional(),limit:a().int().min(1).max(Th).default(wh)}),p(Fm).readonly()),getKeyEvents:E(Ah,p(jh).readonly()),getEventDensity:E(i({deviceId:a(),since:a(),until:a(),bucketMs:a().int().positive()}),p(i({bucketStart:a(),motion:a().int(),object:a().int(),audio:a().int()})).readonly()),pruneEventsBefore:E(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:E(i({deviceId:a(),cutoffMs:a()}),Ih,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:E(i({deviceId:a()}),Ih,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:E(i({deviceId:a()}),Lh,{kind:`mutation`,auth:`admin`}),deleteTracks:E(i({deviceId:a(),trackIds:p(_()).min(1)}),i({deleted:a().int(),failed:p(_()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:E(i({deviceId:a(),trackId:_(),flags:Gm}),Km,{kind:`mutation`}),getEventStoreFootprint:E(i({}),zh,{kind:`query`,auth:`admin`}),pruneEvents:E(i({olderThanMs:a(),reason:ni.optional()}),Bh,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:E(i({deviceId:a()}),Bh,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:E(M,i({paused:b(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:E(M,i({resumed:b(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:E(M,i({refreshed:b(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:E(Pi,i({jobId:_()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:E(i({jobId:_()}),ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`}),listOpsLog:E(ii,p(ri).readonly(),{kind:`query`,auth:`admin`}),getTrainingExportSummary:E(i({deviceIds:p(a()).optional()}),Zm,{kind:`query`,auth:`admin`}),getTrainingExportUrl:E(i({deviceIds:p(a()).optional()}),i({url:_()}),{kind:`query`,auth:`admin`}),listRetrainStaging:E(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(hh).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:E(i({trackId:_()}),bh,{kind:`query`,auth:`admin`}),selectRetrainFrames:E(i({deviceId:a(),trackId:_(),mediaKeys:p(_()).min(1)}),yh,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:E(i({deviceId:a(),trackId:_(),frameId:_()}),i({removed:y(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:E(i({frameId:_()}),i({base64:_(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:E(i({deviceId:a(),trackId:_(),frameId:_(),subject:xh,nodeId:_().optional()}),Sh,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:E(i({trackId:_()}),p(ph).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:E(i({deviceId:a(),trackId:_(),frameId:_(),annotations:p(mh)}),p(ph).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:E(i({deviceId:a(),trackId:_()}),Ch,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:E(i({deviceId:a(),trackId:_()}),Ch,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:E(i({deviceIds:p(a()).optional()}),i({url:_()}),{kind:`query`,auth:`admin`}),getEventMedia:E(i({eventId:_(),kind:oh.optional(),deviceId:a()}),p(sh).readonly()),getTrackMedia:E(i({trackId:_(),kinds:p(oh).optional(),deviceId:a()}),p(sh).readonly()),listTrackMedia:E(i({trackId:_(),deviceId:a()}),p(ch).readonly()),searchObjectEvents:E(Fh,p(Ph).readonly()),wipeObjectEmbeddings:E(i({}),Hh,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:E(Vh,Uh,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:E(i({}),Wh)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(Nh).readonly()})},onTrackStarted:{data:i({deviceId:a(),trackId:_(),className:_()})},onTrackEnded:{data:i({deviceId:a(),trackId:_(),className:_(),durationMs:a()})},onDetectionEvent:{data:i({deviceId:a(),kind:Om,eventId:_(),timestamp:a()})}}},Kh=i({handle:w,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})}),qh=h([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),Jh=h([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),J=i({runtime:h([`node`,`python`]),backend:_(),format:qh,device:_().optional()}),Yh=i({engine:J,devices:p(i({id:_(),label:_(),description:_().optional()})).readonly(),defaultDevice:_()}),Xh=r(()=>i({addonId:_(),addonName:_(),slot:Jh,inputClasses:p(_()).readonly(),outputClasses:p(_()).readonly(),enabled:y(),modelId:_(),children:p(Xh).readonly(),group:_().optional(),settings:n(_(),u()).optional()})),Zh=r(()=>i({addonId:_(),enabled:y(),modelId:_(),children:p(Zh).readonly(),settings:n(_(),u()).optional()})),Qh=i({id:_(),name:_(),createdAt:_(),updatedAt:_(),engine:J,steps:p(Zh).readonly()}),$h=i({id:_(),name:_(),formats:n(_(),i({downloaded:y(),sizeMB:a()})),group:va.optional(),legacy:y().optional()}),eg=S(),tg=i({id:_(),name:_(),slot:Jh,inputClasses:p(_()).readonly(),outputClasses:p(_()).readonly(),childSlots:p(Jh).readonly(),models:p($h).readonly(),defaultModelId:_(),defaultModelIdByFormat:n(_(),_()).optional(),enabledByDefault:y().optional(),backfillIntoExistingOverrides:y().optional(),defaultConfidence:a(),group:_().optional(),configSchema:p(eg).readonly().optional()}),ng=i({id:Jh,label:_(),priority:a(),parentSlot:Jh.nullable(),addons:p(tg).readonly()}),rg=i({availableEngines:p(Yh).readonly(),selectedEngine:J,slots:p(ng).readonly()}),ig=i({runtimeId:h([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:_().nullable(),state:h([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:a().optional(),error:_().optional(),nextRetryAt:a().optional(),configIssues:p(_()).optional()}),Y=r(()=>i({addonId:_(),modelId:_().optional(),enabled:y().default(!0),children:p(Y).optional(),settings:n(_(),u()).optional(),jumpDeviceKey:_().optional()})),ag=i({addonId:_(),chosen:_(),running:_(),format:_()}),og=i({addonId:_(),kind:h([`unknown-addon`,`no-format-build`]),detail:_()}),sg=i({ok:y(),issues:p(og).readonly(),substitutions:p(ag).readonly(),format:_()}),cg=i({filename:_(),stepIds:p(_()).readonly().optional()}),lg=i({base64:_(),filename:_()}),ug=i({filename:_(),sizeKb:a()}),dg=i({base64:_()}),fg=i({id:_(),name:_(),description:_(),available:y(),rawLabels:p(_()).readonly().optional()}),pg=i({activeBackend:_(),availableBackends:p(fg).readonly(),sampleRate:a(),chunkDurationMs:a()}),mg=i({filePath:_(),sizeMB:a(),durationMs:a()}),hg=i({success:y(),error:_().optional(),frame:S().optional()}),gg=S(),_g=S(),vg=S(),yg=S(),bg=S(),xg=S(),Sg={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:E(g(),p(J)),getSelectedEngine:E(g(),J),getDefaultSteps:E(J,p(Xh)),getEngineProvisioning:E(i({nodeId:_()}),ig),getVideoPipelineSteps:E(g(),n(_(),i({modelId:_(),settings:n(_(),u()).readonly()}))),setVideoPipelineSteps:E(i({steps:n(_(),i({modelId:_(),settings:n(_(),u()).readonly()}))}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:E(i({nodeId:_()}),i({success:b(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getSchema:E(g(),rg),getGlobalSteps:E(g(),p(Xh).readonly().nullable()),getGlobalPipelineConfig:E(g(),gg),getOrchestratorConfigSchema:E(g(),_g),validatePipeline:E(i({steps:p(Y)}),sg),listTemplates:E(g(),p(Qh).readonly()),saveTemplate:E(i({name:_(),steps:p(Zh).readonly(),engine:J}),Qh,{kind:`mutation`}),updateTemplate:E(i({id:_(),name:_().optional(),steps:p(Zh).readonly().optional()}),Qh,{kind:`mutation`}),deleteTemplate:E(i({id:_()}),g(),{kind:`mutation`}),getCapabilities:E(g(),yg),getAddonModels:E(i({addonId:_()}),bg),downloadModel:E(i({addonId:_(),modelId:_(),format:qh}),mg,{kind:`mutation`}),deleteModel:E(i({addonId:_(),modelId:_(),format:qh}),i({success:b(!0)}),{kind:`mutation`}),runPipeline:E(i({engine:J.optional(),steps:p(Y).min(1),frame:ys.optional(),frameHandle:w.optional(),imageBase64:_().optional(),image:v(Uint8Array).optional(),referenceImage:_().optional(),deviceId:a().optional(),sessionId:_().optional(),plane:h([`full`,`frame`]).optional(),deviceKey:_().optional(),nativeCropRef:Kh.optional()}),xg,{kind:`mutation`}),runPipelineBatch:E(i({engine:J.optional(),steps:p(Y).min(1),frames:p(ys).min(1).max(255),deviceId:a().optional(),sessionId:_().optional(),frameId:a().int().nonnegative().optional(),deviceKey:_().optional()}),i({results:p(xg).readonly()}),{kind:`mutation`}),cacheFrameInPool:E(i({data:v(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:h([`rgb`,`bgr`,`gray`])}),i({frameId:a(),width:a(),height:a()}),{kind:`mutation`}),inferCached:E(i({stepId:_(),frameId:a().int()}),n(_(),u()),{kind:`mutation`}),uncacheFrame:E(i({frameId:a().int()}),g(),{kind:`mutation`}),getEffectiveTuning:E(g(),i({batchMode:_(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:E(g(),p(i({engineKey:_(),engine:J,modelsLoaded:p(_()).readonly(),inUseByCameras:p(a()).readonly(),kind:h([`runtime`,`warm-override`,`device-pool`]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:E(i({engine:J}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:E(i({engine:J,force:y().optional()}),i({success:y(),reason:_().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:E(g(),p(cg).readonly()),getReferenceImage:E(i({filename:_()}),lg.nullable()),getReferenceAudioFiles:E(g(),p(ug).readonly()),getReferenceAudio:E(i({filename:_()}),dg.nullable()),getAudioCapabilities:E(g(),pg),runAudioTest:E(i({addonId:_(),modelId:_(),filename:_().optional(),settings:n(_(),u()).optional()}),hg,{kind:`mutation`}),getDetectionConfigSchema:E(g(),vg)}},Cg=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),wg=i({detectionMode:h([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:h([`idle`,`watching`,`active`])}),Tg=wg.extend({deviceId:a()}),Eg=h([`polygon`,`tripwire`]),Dg=i({x:a(),y:a()}),Og=i({id:_(),name:_(),kind:Eg.default(`polygon`),polygon:p(Dg).readonly(),color:_().default(`#3b82f6`)}),kg={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[O.Camera],methods:{listZones:E(i({deviceId:a()}),p(Og).readonly()),addZone:E(i({deviceId:a(),zone:Og}),g(),{kind:`mutation`,auth:`admin`}),removeZone:E(i({deviceId:a(),zoneId:_()}),g(),{kind:`mutation`,auth:`admin`}),updateZone:E(i({deviceId:a(),zone:Og}),g(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(Og).readonly()}),durability:`restored`},Ag=i({x:a(),y:a(),w:a(),h:a()}),jg=i({bytes:v(Uint8Array).optional(),jpeg:_().optional(),width:a().int().positive(),height:a().int().positive(),tier:h([`native`,`ram-fullframe`]).optional()}),Mg=i({bbox:Ag,className:_()}),Ng=i({stepId:_(),className:_(),score:a(),bbox:Ag.optional(),embedding:_().optional(),embeddingMagnitude:a().optional(),embeddingModelId:_().optional(),label:_().optional(),labelTier:c([b(1),b(2)]).optional(),labelModelId:_().optional(),alignedCropJpeg:_().optional(),nativeFaceShortSidePx:a().optional()}),Pg=h([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),Fg=x(`kind`,[i({kind:b(`ran`),nodeId:_(),modelId:_(),details:p(Ng)}),i({kind:b(`refused`),nodeId:_(),reason:Pg,detail:_()})]),Ig={min:0,max:6e4,default:3e4,step:500},Lg={min:0,max:6e5,default:12e4,step:5e3},Rg={min:5e3,max:6e5,default:9e4,step:5e3},zg={min:1,max:30,default:4,step:1},Bg={min:1,max:30,default:10,step:1},Vg={min:0,max:300,default:300,step:5},Hg={min:1,max:10,default:4,step:1},Ug=h([`onboard`,`analyzer`]),Wg=p(Ug),Gg=i({deviceId:a(),detected:y(),source:Ug.default(`analyzer`),regions:p(Kd).readonly().optional()}),Kg=x(`kind`,[i({kind:b(`local-broker`)}),i({kind:b(`remote-restream`),ownerNodeId:_(),ownerReachableHost:_().optional(),hubHostnameOverride:_().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),qg=i({deviceKey:_(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),Jg=i({deviceId:a(),detectionMode:h([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:h([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:a().min(Ig.min).default(Ig.default),maxSessionHoldMs:a().min(Lg.min).max(Lg.max).optional(),audioMotionWindowMs:a().min(Rg.min).max(Rg.max).optional(),motionFps:a().min(zg.min).max(zg.max).default(zg.default),detectionFps:a().min(Bg.min).max(Bg.max).default(Bg.default),motionStreamId:_(),detectionStreamId:_(),motionSources:Wg.default([`analyzer`]),pipelineEnabled:y().default(!0),steps:p(Y).readonly().optional(),audio:i({modelId:_().optional(),enabled:y()}).nullable().optional(),zones:p(Og).readonly().default([]),onboardMotionDrivesAnalyzer:y().default(!0),occupancyRecheckEnabled:y().default(!0),occupancyRecheckSec:a().min(Vg.min).max(Vg.max).default(Vg.default),occupancyRecheckFrames:a().min(Hg.min).max(Hg.max).default(Hg.default),frameSource:Kg.default({kind:`local-broker`}),deviceKey:_().optional(),inferenceDevices:p(qg).readonly().optional()}),Yg=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:[{value:`analyzer`,label:`Frame-diff Analyzer (motion addon)`},{value:`onboard`,label:`Camera Onboard Sensor`}]},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:zg.min,max:zg.max,step:zg.step,default:zg.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:Bg.min,max:Bg.max,step:Bg.step,default:Bg.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`},{key:`motionCooldownMs`,type:`slider`,label:`Motion Cooldown`,description:`Time without a fresh motion event before the active phase ends. Applies to all motion sources — every motion event re-arms the timer.`,min:Ig.min,max:Ig.max,step:Ig.step,default:Ig.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`maxSessionHoldMs`,type:`slider`,label:`Max session hold`,description:`Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.`,min:Lg.min,max:Lg.max,step:Lg.step,default:Lg.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`audioMotionWindowMs`,type:`slider`,label:`Audio window after motion`,description:`How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.`,min:Rg.min,max:Rg.max,step:Rg.step,default:Rg.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`,showWhen:{field:`audioMode`,equals:`on-motion`}},{key:`onboardMotionDrivesAnalyzer`,type:`boolean`,label:`Run motion analyzer on onboard motion`,description:`When onboard motion is detected, temporarily start the frame-diff analyzer to emit zone results. Stops after the motion cooldown window.`,default:!0,showWhen:{field:`motionSources`,includes:`onboard`}},{key:`occupancyRecheckEnabled`,type:`boolean`,style:`checkbox`,label:`Occupancy re-check`,description:`Periodically re-sample a few frames during the watching phase, so objects that are simply parked are still counted (motion gating alone loses them after a restart). On by default at a wide interval; turn it off on cameras where the extra decoder re-dial is expensive.`,default:!0},{key:`occupancyRecheckSec`,type:`slider`,label:`Occupancy re-check interval`,description:`How often (in seconds) the runner re-samples a few frames to confirm the scene is truly empty during the watching phase.`,min:Vg.min,max:Vg.max,step:Vg.step,default:Vg.default,showValue:!0,unit:`s`,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:Hg.min,max:Hg.max,step:Hg.step,default:Hg.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],Xg=i({nodeId:_(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),devices:p(i({deviceKey:_(),backend:_(),attachedCameras:a(),queueDepthTotal:a()})).default([]),hardware:i({hasGpu:y(),inferenceBackend:_().optional(),cpuCores:a().optional()})}),Zg=i({nodeId:_(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Qg={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:E(Jg,i({success:b(!0)}),{kind:`mutation`}),detachCamera:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`}),reportMotion:E(Gg,i({success:b(!0)}),{kind:`mutation`}),getLocalLoad:E(g(),Xg),getLocalMetrics:E(g(),Zg),getCameraMetrics:E(i({deviceId:a()}),wg.nullable()),getAllCameraMetrics:E(g(),p(Tg).readonly()),getLocalCameras:E(g(),p(a()).readonly()),getNativeCrop:E(i({handle:w,bbox:Ag,maxWidth:a().int().positive().optional(),encodeJpeg:y().optional()}),jg.nullable()),runDetailSubtree:E(i({deviceId:a(),frameHandle:w.optional(),frameJpeg:_().optional(),cropJpeg:_().optional(),parent:Mg,steps:p(_()).optional()}),i({details:p(Ng)}).nullable(),{kind:`mutation`}),runStatelessStep:E(i({stepId:_(),modelId:_(),frameJpeg:_(),bbox:Ag,className:_(),sourceDeviceId:a()}),Fg,{kind:`mutation`})}},$g=i({engine:J.optional(),steps:p(Y).readonly(),audio:i({engine:J.optional(),modelId:_().optional(),enabled:y(),settings:n(_(),u()).readonly().optional()}).nullable().optional()}),e_=i({id:_(),name:_(),description:_().optional(),config:$g,createdAt:_(),updatedAt:_()}),t_=i({modelId:_().optional(),settings:n(_(),u()).optional(),jumpDeviceKey:_().optional()}),n_=i({maxCameras:a().int().nonnegative().nullable().default(null),detectWeight:a().positive().optional(),detect:y().optional(),decode:y().optional(),audio:y().optional(),ingest:y().optional(),reachableHost:_().optional(),inferenceDevices:n(_(),i({enabled:y(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(_(),t_).optional()})).optional()}),r_=i({steps:p(Y).readonly(),audio:i({modelId:_(),enabled:y()}).nullable()}),i_=i({modelId:_().optional(),settings:n(_(),u()).readonly().optional()}),a_=i({pinnedAgentNodeId:_().optional(),stepToggles:n(_(),y()).optional(),stepOverridesByDevice:n(_(),n(_(),n(_(),i_))).optional(),pipelineByAgent:n(_(),r_).optional()}),o_=i({deviceId:a(),agentNodeId:_(),pinned:y(),reason:h([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),s_=i({nodeId:_(),online:y(),load:Xg,score:a(),decodeHwaccel:_().nullable()}),c_=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),l_=n(_(),_()),u_=i({ownerNodeId:_(),reachableHost:_().optional(),configIssue:_().optional()}),d_=i({camStreamId:_(),codec:_(),width:a(),height:a(),fps:a(),kind:_()}),f_=i({streams:p(d_).readonly()}),p_=i({detectionNodeId:_().nullable(),decoderNodeId:_().nullable(),audioNodeId:_().nullable(),sourceNodeId:_().nullable(),pinned:i({detection:y(),decoder:y(),audio:y()}),reasons:i({detection:_().optional(),decoder:_().optional(),audio:_().optional()})}),m_=i({profile:_(),status:_(),codec:_(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),h_=i({profiles:p(m_).readonly(),webrtcSessions:a(),rtspRestream:y()}),g_=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),__=i({nodeId:_(),formats:p(_()).readonly(),sessionCount:a(),shm:g_}),v_=i({enabled:y(),fps:a()}),y_=h([`idle`,`installing`,`verifying`,`ready`,`failed`]),b_=i({state:y_,error:_().optional()}),x_=h([`idle`,`watching`,`active`]),S_=i({nodeId:_(),engine:i({backend:_(),device:_()}),phase:x_,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:b_}),C_=i({nodeId:_(),enabled:y()}),w_=h([`off`,`continuous`,`events`]),T_=i({mode:w_,active:y(),storageBytes:a()}),E_=h([`source`,`broker`,`detection`,`recording`,`switches`]),D_=h([`timeout`,`error`,`partial`]),O_=i({stage:E_,reason:D_,elapsedMs:a()}),k_=i({state:h([`idle`,`running`,`done`,`error`]),total:a().int().nonnegative(),completed:a().int().nonnegative(),currentDeviceId:a().int().nullable(),failed:p(a().int()).readonly(),mediaDropped:a().int().nonnegative(),tracks:a().int().nonnegative(),events:a().int().nonnegative(),startedAtMs:a().int().nullable(),finishedAtMs:a().int().nullable(),error:_().nullable()}),A_=i({deviceId:a(),assignment:p_,source:f_,broker:h_.nullable(),decoder:__.nullable(),motion:v_.nullable(),detection:S_.nullable(),audio:C_.nullable(),recording:T_.nullable(),switchedOff:p(Dr).readonly(),degraded:p(O_).readonly(),fetchedAt:a()}),j_=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],M_=h(j_),N_=i({key:_(),backend:_(),device:_(),format:h(ha),available:y(),enabled:y(),weight:a(),maxSessions:a().nullable(),defaultModelId:_(),steps:n(_(),t_).optional(),exclusion:M_.nullable()}),P_=i({nodeId:_(),reachable:y(),devices:p(N_).readonly()}),F_={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:E(M,i({paused:b(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:E(M,i({resumed:b(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:E(i({deviceId:a(),agentNodeId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:E(i({deviceId:a(),deviceKey:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:E(i({deviceId:a()}),i({deviceKey:_().nullable()})),rebalance:E(g(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:E(g(),p(o_).readonly()),getPipelineAssignment:E(i({deviceId:a()}),o_.nullable()),getAgentLoad:E(g(),p(s_).readonly()),getGlobalMetrics:E(g(),c_),getCameraMetrics:E(i({deviceId:a()}),wg.nullable()),getCapabilityBindings:E(i({nodeId:_()}),l_),setCapabilityBinding:E(i({nodeId:_(),capName:_(),addonId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:E(g(),u_),assignAudio:E(i({deviceId:a(),nodeId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:E(i({deviceId:a()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:E(i({deviceId:a()}),i({nodeId:_(),pinned:y(),assignedAt:a()}).nullable()),getAudioNodeLoad:E(g(),p(i({nodeId:_(),deviceCount:a()}))),getAudioAssignments:E(g(),p(i({deviceId:a(),nodeId:_(),pinned:y(),assignedAt:a()}))),getAgentSettings:E(i({agentNodeId:_()}),n_.nullable()),listAgentSettings:E(g(),p(i({nodeId:_(),settings:n_})).readonly()),removeAgentSettings:E(i({agentNodeId:_()}),i({success:y(),removed:y()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:E(i({agentNodeId:_(),maxCameras:a().int().nonnegative().nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:E(i({agentNodeId:_(),detectWeight:a().positive().nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:E(i({agentNodeId:_(),detect:y().nullable().optional(),audio:y().nullable().optional(),ingest:y().nullable().optional()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:E(i({agentNodeId:_(),reachableHost:_().nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:E(i({agentNodeId:_(),inferenceDevices:n(_(),i({enabled:y(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(_(),t_).optional()}))}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:E(i({nodeId:_()}),P_),resetNodePipelineDefaults:E(i({agentNodeId:_()}),i({success:b(!0),effectiveModelId:_().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:E(i({deviceId:a()}),a_.nullable()),setCameraStepToggle:E(i({deviceId:a(),addonId:_(),enabled:y().nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:E(i({deviceId:a()}),n(_(),n(_(),n(_(),i_))).nullable()),setCameraStepOverride:E(i({deviceId:a(),agentNodeId:_(),deviceKey:_(),addonId:_(),patch:i_.nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:E(i({deviceId:a(),agentNodeId:_(),pipeline:r_.nullable()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:E(i({deviceId:a(),agentNodeId:_().optional()}),$g),getCameraSwitches:E(i({deviceId:a()}),Mr),setCameraSwitch:E(i({deviceId:a(),switchId:Dr,enabled:y()}),Mr,{kind:`mutation`,auth:`admin`}),getCameraStatus:E(i({deviceId:a()}),A_),getCameraStatuses:E(i({deviceIds:p(a()).optional()}),p(A_).readonly()),reconcileFromDisk:E(g(),k_,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:E(g(),k_,{auth:`admin`}),listTemplates:E(g(),p(e_).readonly()),saveTemplate:E(i({name:_(),description:_().optional(),config:$g}),e_,{kind:`mutation`,auth:`admin`}),updateTemplate:E(i({id:_(),name:_().optional(),description:_().optional(),config:$g.optional()}),e_,{kind:`mutation`,auth:`admin`}),deleteTemplate:E(i({id:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`})}},I_={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function L_(e){return I_[e]??`generic`}var R_={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,switch:`switch`,button:`button`,doorbell:`doorbell`};function z_(e,t){let n=Uf[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:L_(n.iconId)}}var B_=Object.freeze(Object.fromEntries(Object.entries(R_).map(([e,t])=>[e,z_(e,t)]))),V_=Object.keys(R_);function H_(e,t){let n=Uf[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:L_(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var U_=h([`workspace`,`baked`,`data-root`]),W_=h([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),G_=h([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),K_=i({state:G_,seedVersion:_().nullable(),contractVersion:_().nullable(),contractSource:h([`registry`,`running`]).nullable(),message:_()}),q_=i({fromVersion:_(),toVersion:_().nullable(),atMs:a(),reason:_()}),J_=i({packageName:_(),runningVersion:_().nullable(),nodeRuntimeVersion:_().nullable(),activeVersion:_().nullable(),previousVersion:_().nullable(),seedVersion:_().nullable(),latestVersion:_().nullable(),updateAvailable:y(),bootMode:U_,updateState:W_,pendingVersion:_().nullable(),rolledBack:q_.nullable(),stateFileCorrupt:y(),lastCheckedAtMs:a().nullable(),imageContract:K_.optional()}),Y_=i({packageName:_(),runningVersion:_().nullable(),latestVersion:_().nullable(),updateAvailable:y(),checkedAtMs:a(),error:_().nullable()}),X_=i({accepted:y(),targetVersion:_().nullable(),restarting:y(),message:_()}),Z_={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:E(g(),J_,{auth:`admin`}),checkServerUpdate:E(g(),Y_,{kind:`mutation`,auth:`admin`}),applyServerUpdate:E(i({version:_().optional()}),X_,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:E(g(),X_,{kind:`mutation`,auth:`admin`}),restartServer:E(g(),X_,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Q_=d(),$_=i({to:c([Q_,p(Q_).min(1)]),cc:p(Q_).optional(),bcc:p(Q_).optional(),from:_().optional(),replyTo:_().optional(),subject:_(),text:_(),html:_().optional()}),ev=i({messageId:_(),accepted:p(Q_).default([]),rejected:p(Q_).default([])}),tv=i({ready:y(),host:_(),error:_().optional(),lastVerifiedAt:a().optional()}),nv={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:E($_,ev,{kind:`mutation`,auth:`admin`,access:`create`}),verify:E(g(),tv,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:E(g(),tv,{auth:`admin`})}},rv=i({base64:_(),contentType:_()}),iv=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:_().nullable()}),av={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:E(i({deviceId:a(),streamId:_().optional(),force:y().optional()}),rv.nullable()),invalidateCache:E(i({deviceId:a()}),g(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:Et(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:_().nullable()}))),getDebugState:Et(i({deviceId:a()}),i({battery:i({sleeping:y(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:y(),reason:h([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:y()})),getSnapshotLinks:Et(i({targets:p(i({deviceId:a(),width:a().int().positive().optional()})).min(1).max(200)}),p(i({deviceId:a(),url:_().nullable(),capturedAt:a().nullable(),ageMs:a().nullable(),expiresAt:a().nullable(),width:a().nullable(),neverCaptured:y(),sleeping:y(),stateReason:h([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:y()})))},status:{schema:iv,kind:`poll`}},ov=i({userId:_(),username:_(),isAdmin:y(),provider:_(),email:_().optional(),displayName:_().optional(),hubUrl:_().optional(),scopes:p(q).optional(),redirectUri:_().optional(),integrationId:_().optional(),jti:_().optional(),codeChallenge:_().optional(),sessionId:_().optional(),refreshTtl:c([a().int().positive(),b(`never`)]).optional()}),sv={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:E(i({claims:ov,ttlSec:c([a().int().positive(),b(`never`)]).optional()}),i({token:_()})),verifyBridgeToken:E(i({token:_()}),ov.nullable())}},cv=x(`shouldSaveDiskSpace`,[i({providerId:_().min(1),displayName:_().min(1),configSchema:u(),nodeLocal:y(),shouldSaveDiskSpace:b(!0),minFreePercent:a().min(0).max(100)}),i({providerId:_().min(1),displayName:_().min(1),configSchema:u(),nodeLocal:y(),shouldSaveDiskSpace:b(!1),minFreePercent:b(null)})]),lv={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:E(i({location:P,relativePath:_()}),_()),write:E(i({location:P,relativePath:_(),data:v(Uint8Array)}),g(),{kind:`mutation`}),read:E(i({location:P,relativePath:_()}),v(Uint8Array)),exists:E(i({location:P,relativePath:_()}),y()),list:E(i({location:P,prefix:_().optional()}),p(_()).readonly()),delete:E(i({location:P,relativePath:_()}),g(),{kind:`mutation`}),getAvailableSpace:E(i({location:P}),a().nullable()),beginUpload:E(i({location:P,relativePath:_(),sizeBytes:a().optional()}),i({uploadId:_()}),{kind:`mutation`}),writeChunk:E(i({uploadId:_(),offset:a(),data:v(Uint8Array)}),g(),{kind:`mutation`}),finalizeUpload:E(i({uploadId:_()}),g(),{kind:`mutation`}),abortUpload:E(i({uploadId:_()}),g(),{kind:`mutation`}),beginDownload:E(i({location:P,relativePath:_()}),i({downloadId:_(),sizeBytes:a()}),{kind:`mutation`}),readChunk:E(i({downloadId:_(),offset:a(),length:a()}),v(Uint8Array)),endDownload:E(i({downloadId:_()}),g(),{kind:`mutation`}),listLocations:E(i({type:Gi.optional()}),p(N).readonly()),getDefaultLocation:E(i({type:Gi}),N.nullable()),listLocationDeclarations:E(g(),p(Ki).readonly()),upsertLocation:E(N.omit({createdAt:!0,updatedAt:!0}),N,{kind:`mutation`,auth:`admin`}),deleteLocation:E(i({id:_()}),g(),{kind:`mutation`,auth:`admin`}),testLocation:E(i({id:_()}),i({ok:y(),error:_().optional()}),{auth:`admin`}),listProviders:E(g(),p(cv).readonly()),testConfig:E(i({providerId:_(),config:n(_(),u())}),i({ok:y(),error:_().optional()}),{auth:`admin`})}},uv=i({bytes:a().int().nonnegative()}),dv=i({reclaimedBytes:a().int().nonnegative(),exhausted:y()}),fv={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:E(i({locationId:_()}),uv),evict:E(i({locationId:_(),targetBytes:a().int().positive()}),dv,{kind:`mutation`})}},pv={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:E(Li,Hi,{auth:`admin`}),start:E(Li,i({jobId:_()}),{kind:`mutation`,auth:`admin`}),status:E(i({jobId:_().optional()}),Vi.nullable(),{auth:`admin`}),cancel:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`})}},mv=x(`shouldSaveDiskSpace`,[i({providerId:_().min(1),displayName:_().min(1),configSchema:u(),nodeLocal:y(),shouldSaveDiskSpace:b(!0),minFreePercent:a().min(0).max(100)}),i({providerId:_().min(1),displayName:_().min(1),configSchema:u(),nodeLocal:y(),shouldSaveDiskSpace:b(!1),minFreePercent:b(null)})]),hv=i({ok:y(),error:_().optional()}),gv=i({location:N,relativePath:_(),sizeBytes:a().optional()}),_v=i({uploadId:_()}),vv=i({uploadId:_(),offset:a(),data:v(Uint8Array)}),yv=i({uploadId:_()}),bv=i({uploadId:_()}),xv=i({location:N,relativePath:_()}),Sv=i({downloadId:_(),sizeBytes:a()}),Cv=i({downloadId:_(),offset:a(),length:a()}),wv=i({downloadId:_()}),Tv={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:E(g(),mv),testLocation:E(i({config:n(_(),u())}),hv,{auth:`admin`}),resolve:E(i({location:N,relativePath:_()}),_()),write:E(i({location:N,relativePath:_(),data:v(Uint8Array)}),g(),{kind:`mutation`}),read:E(i({location:N,relativePath:_()}),v(Uint8Array)),exists:E(i({location:N,relativePath:_()}),y()),list:E(i({location:N,prefix:_().optional()}),p(_()).readonly()),delete:E(i({location:N,relativePath:_()}),g(),{kind:`mutation`}),getAvailableSpace:E(i({location:N}),a().nullable()),beginUpload:E(gv,_v,{kind:`mutation`}),writeChunk:E(vv,g(),{kind:`mutation`}),finalizeUpload:E(yv,g(),{kind:`mutation`}),abortUpload:E(bv,g(),{kind:`mutation`}),beginDownload:E(xv,Sv,{kind:`mutation`}),readChunk:E(Cv,v(Uint8Array)),endDownload:E(wv,g(),{kind:`mutation`})}},Ev=i({sessionId:_(),profileId:_(),label:_(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),Dv=i({profileId:_(),label:_(),description:_().optional(),executable:_().optional(),args:p(_()).readonly().optional(),cwd:_().optional(),environment:p(_()).readonly().optional()}),Ov=i({instanceId:_(),cameraStableId:_(),nodeId:_(),profileId:_(),profileLabel:_(),name:_(),enabled:y(),executable:_(),args:p(_()).readonly(),cwd:_(),environment:p(_()).readonly()}),kv=i({stableId:_(),nodeId:_(),profileId:_(),profileLabel:_(),name:_(),adoptable:y()}),Av=x(`kind`,[i({seq:a().int().positive(),kind:b(`data`),data:_()}),i({seq:a().int().positive(),kind:b(`exit`),exitCode:a().int(),signal:a().int().optional()})]),jv=i({cursor:a().int().nonnegative(),reset:y(),snapshot:_().optional(),events:p(Av).readonly()}),Mv={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:E(g(),p(Dv).readonly(),{auth:`admin`}),listInstances:E(g(),p(Ov).readonly(),{auth:`admin`}),createInstance:E(i({targetNodeId:_().min(1),profileId:_().min(1),name:_().trim().min(1).max(160).optional(),executable:_().max(1024).optional(),args:p(_().max(2048)).max(64).optional(),cwd:_().max(1024).optional(),environment:p(_().max(4096)).max(64).optional()}),Ov,{kind:`mutation`,auth:`admin`}),updateInstance:E(i({instanceId:_().min(1),name:_().trim().min(1).max(160).optional(),executable:_().max(1024).optional(),args:p(_().max(2048)).max(64).optional(),cwd:_().max(1024).optional(),environment:p(_().max(4096)).max(64).optional()}),Ov,{kind:`mutation`,auth:`admin`}),deleteInstance:E(i({instanceId:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:E(i({instanceId:_().min(1),enabled:y()}),Ov,{kind:`mutation`,auth:`admin`}),listLegacyCameras:E(g(),p(kv).readonly(),{auth:`admin`}),adoptLegacyMonitor:E(i({stableId:_().min(1),name:_().trim().min(1).max(160).optional()}),Ov,{kind:`mutation`,auth:`admin`}),listSessions:E(g(),p(Ev).readonly(),{auth:`admin`}),openSession:E(i({profileId:_(),cols:a().int().positive(),rows:a().int().positive(),executable:_().max(1024).optional(),args:p(_().max(2048)).max(64).optional(),cwd:_().max(1024).optional(),environment:p(_().max(4096)).max(64).optional()}),Ev,{kind:`mutation`,auth:`admin`}),resize:E(i({sessionId:_(),cols:a().int().positive(),rows:a().int().positive()}),g(),{kind:`mutation`,auth:`admin`}),pullOutput:E(i({sessionId:_(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:y().optional()}),jv,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:E(i({sessionId:_(),data:_().max(64*1024)}),g(),{kind:`mutation`,auth:`admin`}),close:E(i({sessionId:_()}),g(),{kind:`mutation`,auth:`admin`})}},Nv=i({urls:c([_(),p(_())]),username:_().optional(),credential:_().optional()}),Pv={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:E(g(),p(Nv).readonly())}},Fv=i({credentialId:_(),label:_(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(_()).default([])}),Iv={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:E(i({userId:_(),username:_()}),i({optionsJSON:n(_(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:E(i({userId:_(),response:n(_(),u()),label:_()}),i({success:b(!0),credentialId:_()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:E(i({userId:_().optional()}),i({optionsJSON:n(_(),u())}),{kind:`mutation`,access:`view`}),finishAuthentication:E(i({userId:_(),response:n(_(),u())}),i({verified:y()}),{kind:`mutation`,access:`view`}),beginDiscoverableAuthentication:E(i({}),i({optionsJSON:n(_(),u())}),{kind:`mutation`,access:`view`}),finishDiscoverableAuthentication:E(i({response:n(_(),u())}),i({verified:y(),userId:_().nullable()}),{kind:`mutation`,access:`view`}),listPasskeys:E(i({userId:_()}),p(Fv),{auth:`admin`}),removePasskey:E(i({userId:_(),credentialId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:E(i({userId:_()}),i({enabled:y()}),{auth:`admin`}),setSecondFactorPreference:E(i({userId:_(),enabled:y()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},Lv=h([`cosine`,`dot`,`euclidean`]),Rv=n(_(),c([_(),a(),y()])),zv=i({equals:n(_(),c([_(),a(),y()])).optional(),between:n(_(),s([a(),a()])).optional()}),Bv=i({id:_(),vector:_(),metadata:Rv}),Vv=i({id:_(),score:a(),metadata:Rv}),Hv=i({index:_(),dim:a().int().positive(),metric:Lv.default(`cosine`)}),Uv=i({index:_(),items:p(Bv)}),Wv=i({upserted:a(),rejected:a()}),Gv=i({index:_(),vector:_(),topK:a().int().positive(),minScore:a().optional(),filter:zv.optional()}),Kv=i({matches:p(Vv),scanned:a(),truncated:y()}),qv=i({index:_(),ids:p(_())}),Jv=i({index:_(),filter:zv}),Yv=i({deleted:a()}),Xv=i({index:_(),ids:p(_())}),Zv=i({items:p(i({id:_(),metadata:Rv}))}),Qv=i({index:_()}),$v=i({backend:_(),count:a(),dim:a(),metric:Lv,bytes:a().optional(),exact:y()}),ey={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:E(Hv,g(),{kind:`mutation`}),upsert:E(Uv,Wv,{kind:`mutation`}),query:E(Gv,Kv),getByIds:E(Xv,Zv),deleteByIds:E(qv,Yv,{kind:`mutation`}),deleteByFilter:E(Jv,Yv,{kind:`mutation`}),stats:E(Qv,$v)}},ty=24,ny=3,ry=i({id:_(),source:_(),kind:h([`motion`,`object`,`audio`,`native`]),timeRange:i({startMs:a(),endMs:a()}),labels:p(_()).max(3).optional(),thumbnail:_().optional(),stillAtMs:a().optional(),eventIds:p(_()).optional(),eventCount:a().int().nonnegative().optional(),holes:p(i({startMs:a(),endMs:a()})).optional()}),iy=i({playbackUrl:_(),playbackEndpoints:p(_()).optional(),token:_().optional()}),ay={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],methods:{listClips:E(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p(ry).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:E(i({deviceId:a(),clipId:_()}),iy,{kind:`query`,auth:`admin`})}},oy=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:_().optional()}).partial(),sy=x(`kind`,[i({kind:b(`adaptive`)}),i({kind:b(`profile`),profile:C}),i({kind:b(`cam-stream`),camStreamId:_().min(1)})]),cy=i({id:_(),label:_(),target:sy,codec:_().nullable(),resolution:i({width:a(),height:a()}).nullable(),status:h([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:a().nullable(),decodeFps:a().nullable(),bitrateKbps:a().nullable()}),ly={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[O.Camera],methods:{listStreams:E(i({deviceId:a().int().nonnegative()}),p(cy)),createSession:E(i({deviceId:a().int().nonnegative(),target:sy,hints:oy.optional(),relayOnly:y().optional(),consumerAttribution:Ec.optional()}),i({sessionId:_(),sdpOffer:_()}),{kind:`mutation`}),handleOffer:E(i({deviceId:a().int().nonnegative(),target:sy.optional(),sdpOffer:_(),sessionId:_().optional(),relayOnly:y().optional(),nonTrickle:y().optional(),disableTurn:y().optional(),disableIpv6:y().optional(),consumerAttribution:Ec.optional(),hints:oy.optional()}),i({sessionId:_(),sdpAnswer:_()}),{kind:`mutation`}),handleAnswer:E(i({deviceId:a().int().nonnegative(),sessionId:_(),sdpAnswer:_()}),g(),{kind:`mutation`}),addIceCandidate:E(i({deviceId:a().int().nonnegative(),sessionId:_(),candidate:_(),sdpMid:_().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),g(),{kind:`mutation`}),getIceCandidates:E(i({deviceId:a().int().nonnegative(),sessionId:_()}),i({candidates:p(i({candidate:_(),sdpMid:_().nullable(),sdpMLineIndex:a().int().nullable()})),done:y()}),{kind:`query`}),closeSession:E(i({deviceId:a().int().nonnegative(),sessionId:_()}),g(),{kind:`mutation`}),hasAdaptiveBitrate:E(i({deviceId:a().int().nonnegative(),profile:C}),y()),getSessionState:E(i({deviceId:a().int().nonnegative(),sessionId:_()}),i({pendingRenegotiation:i({target:sy,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},uy=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),dy={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera,O.Hub,O.Switch,O.Light,O.Sensor,O.Thermostat,O.Cover,O.Lock,O.Fan,O.MediaPlayer,O.AlarmPanel,O.Generic],methods:{setChildHidden:E(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative(),hidden:y()}),g(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:i({deviceId:a(),childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()})},onChildVisibilityChanged:{data:i({deviceId:a(),childDeviceId:a(),hidden:y()})}},status:{schema:uy,kind:`command-driven`}},fy=h([`install`,`update`,`uninstall`,`restart`]),py=h([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),my=h([`framework`,`addon`]),hy=i({tsMs:a(),nodeId:_(),packageName:_(),phase:py,message:_()}),gy=i({taskId:_(),nodeId:_(),packageName:_(),fromVersion:_().nullable(),toVersion:_(),target:my,phase:py,stagedPath:_().nullable(),attempts:a(),steps:p(hy),error:_().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),_y=h([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),vy=h([`single`,`bulk`,`cluster`]),yy=i({jobId:_(),kind:fy,createdAtMs:a(),createdBy:_(),scope:vy,tasks:p(gy),state:_y,schemaVersion:b(1)}),by=h([`debug`,`info`,`warn`,`error`]),xy=h([`off`,`latest`,`beta`]),Sy=h([`off`,`latest`,`beta`,`inherit`]),Cy=i({id:_(),name:_().optional(),version:_().optional(),description:_().optional(),icon:_().optional(),color:_().optional(),capabilities:p(u()).readonly().optional(),packageName:_(),packageVersion:_(),packageDisplayName:_().optional(),bundle:i({displayName:_(),description:_().optional(),icon:_().optional()}).optional(),protected:y().optional(),removable:y().optional()}),wy=i({pid:a().optional(),mode:_(),state:_()}),Ty=i({phase:h([`pending`,`healthy`,`failed`]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:i({message:_(),stack:_().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:y(),retrying:y(),inGracePeriod:y()}),Ey=i({manifest:Cy,declaration:u().optional(),source:_(),installSource:_().optional(),process:wy.optional(),hasBackup:y().optional(),health:Ty.nullable().optional()}),Dy=i({name:_(),version:_(),dir:_(),installSource:_().optional()}),Oy=i({name:_(),currentVersion:_(),latestVersion:_(),category:h([`addon`,`core`]),requiresRestart:y(),isSystem:y()}),ky=i({version:_(),publishedAt:_(),deprecated:_().optional(),distTags:p(_()).readonly()}),Ay=i({name:_(),version:_(),description:_(),keywords:p(_()).readonly(),publishedAt:_(),author:_(),installed:y(),installedVersion:_().optional()}),jy=i({channel:xy,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),My=Sy,Ny=u(),Py=u(),Fy=u(),Iy=h([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Ly=i({name:_(),isSystem:y(),fromVersion:_(),toVersion:_(),status:Iy,error:_().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),Ry=h([`regular`,`system`,`restarting`,`finalizing`]);i({id:_(),nodeId:_(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:_().nullable(),phase:Ry,cancelled:y(),items:p(Ly).readonly()});var zy=i({packageName:_(),currentVersion:_(),latestVersion:_().nullable(),hasUpdate:y(),description:_().optional(),buildId:_().nullable()}),By=i({timestamp:_(),level:_(),message:_(),scope:_().optional()}),Vy=u(),Hy=i({addonId:_().min(1),action:_().min(1),input:u()}),Uy={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:E(g(),p(Ey).readonly()),getLogs:E(i({addonId:_(),limit:a().min(1).max(500).default(100),level:by.optional()}),p(Vy)),listPackages:E(g(),p(Dy).readonly()),installPackage:E(i({packageName:_(),version:_().optional()}),Py,{kind:`mutation`,auth:`admin`}),installFromWorkspace:E(i({packageName:_()}),Py,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:E(g(),y()),listWorkspacePackages:E(g(),p(u()).readonly()),uninstallPackage:E(i({packageName:_()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:E(g(),Fy,{kind:`mutation`,auth:`admin`}),searchAvailable:E(i({query:_().optional()}),p(Ay)),listUpdates:E(i({nodeId:_().optional()}),p(Oy).readonly(),{auth:`admin`}),updatePackage:E(i({name:_().min(1),version:_().optional(),nodeId:_().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:E(i({name:_().min(1)}),i({rolledBackTo:_().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:E(i({nodeId:_().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:E(i({confirm:b(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:E(g(),i({kind:h([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:_().optional(),fromVersion:_().optional(),toVersion:_().optional(),requestedBy:_().optional(),requestedAt:a()}).nullable(),{auth:`admin`}),listFrameworkPackages:E(g(),p(zy).readonly(),{auth:`admin`}),listCapabilityProviders:E(i({capName:_().min(1)}),p(i({addonId:_(),mode:h([`singleton`,`collection`]),isActive:y()})).readonly()),setCapabilityProviderEnabled:E(i({capName:_().min(1),addonId:_().min(1),enabled:y()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:E(i({name:_()}),p(ky).readonly()),restartAddon:E(i({addonId:_()}),Ny,{kind:`mutation`,auth:`admin`}),retryLoad:E(i({packageName:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:E(g(),jy,{auth:`admin`}),setAutoUpdateSettings:E(i({channel:xy,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:E(i({addonId:_()}),My,{auth:`admin`}),setAddonAutoUpdate:E(i({addonId:_(),channel:Sy}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:E(i({channel:xy}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),custom:E(Hy,u(),{kind:`mutation`}),startJob:E(i({kind:h([`install`,`update`,`uninstall`,`restart`]),targets:p(i({name:_().min(1),version:_().min(1)})).min(1),nodeIds:p(_()).optional()}),i({jobId:_()}),{kind:`mutation`,auth:`admin`}),getJob:E(i({jobId:_()}),yy.nullable(),{auth:`admin`}),listJobs:E(i({activeOnly:y().optional()}),p(yy),{auth:`admin`}),cancelJob:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:E(i({addonId:_(),level:by.optional()}),By,{kind:`subscription`})},mount:{kind:`server-provided`}},Wy=i({co2Ppm:a().min(0).optional(),vocPpb:a().min(0).optional(),pm25:a().min(0).optional(),pm10:a().min(0).optional(),aqi:a().optional(),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),Gy={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:Wy,kind:`push`},runtimeState:Wy,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Ky=i({lux:a().min(0),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),qy={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:Ky,kind:`push`},runtimeState:Ky,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Jy=i({className:_(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),Yy=i({ts:a().int(),windowSec:a().int().positive(),level:i({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:i({className:_(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:p(Jy).readonly()}),Xy=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:_().nullable(),topScore:a().min(0).max(1).nullable()}),Zy=i({points:p(Xy).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),Qy={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[O.Camera],methods:{getCurrentSnapshot:E(i({deviceId:a()}),Yy.nullable()),getHistory:E(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),Zy)},runtimeState:Yy,durability:`session`},$y=i({enabled:y(),isRunning:y(),lastTriggeredAt:a(),lastError:_().nullable(),lastChangedAt:a()}),eb={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Automation],methods:{enable:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),disable:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),trigger:E(i({deviceId:a().int().nonnegative(),skipCondition:y().optional()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:$y,kind:`push`},runtimeState:$y,durability:`session`},tb=i({percentage:a().min(0).max(100),charging:h([`dc`,`solar`,`none`]),sleeping:y(),lastUpdated:a(),lastContactAt:a().optional(),binary:y().optional()}),nb={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera,O.Sensor,O.Button,O.Switch],methods:{wakeForStream:E(i({deviceId:a(),timeoutMs:a().int().min(500).max(3e4).default(8e3)}),i({awoke:y(),durationMs:a()}),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:tb})}},status:{schema:tb,kind:`push`,empty:{percentage:0,charging:`none`,sleeping:!1,lastUpdated:0}},runtimeState:tb,durability:`restored`,volatileStateFields:[`lastUpdated`]},rb=i({on:y(),lastChangedAt:a()}),ib={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:rb,kind:`push`},runtimeState:rb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ab=i({percentage:a().min(0).max(100),lastChangedAt:a()}),ob={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Light],methods:{setBrightness:E(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:i({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:ab,kind:`command-driven`},runtimeState:ab,durability:`session`},sb={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Button],methods:{press:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})}},cb=i({host:_(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:y().optional(),username:_().optional(),password:_().optional(),onvifProfile:_().optional()}),lb=i({host:_(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:y().nullable(),hasUsername:y(),hasPassword:y(),onvifProfile:_().nullable()}),ub={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],methods:{getCredentials:E(i({deviceId:a()}),cb.nullable(),{kind:`query`,auth:`admin`})},status:{schema:lb,kind:`command-driven`}},db=i({detected:y(),lastChangedAt:a()}),fb={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:db,kind:`push`},runtimeState:db,durability:`restored`,volatileStateFields:[`lastChangedAt`]},pb=h([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),mb=i({mode:pb,availableModes:p(pb),fanMode:_(),availableFanModes:p(_()),preset:_(),availablePresets:p(_()),target:a().nullable(),targetHigh:a().nullable(),targetLow:a().nullable(),targetHumidity:a().min(0).max(100).nullable(),currentTemp:a().nullable(),currentHumidity:a().min(0).max(100).nullable(),swingVertical:y().nullable(),swingHorizontal:y().nullable(),lastFetchedAt:a()}),hb={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Thermostat,O.Climate],methods:{setMode:E(i({deviceId:a().int().nonnegative(),mode:pb}),g(),{kind:`mutation`,auth:`admin`}),setFanMode:E(i({deviceId:a().int().nonnegative(),fanMode:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),setPreset:E(i({deviceId:a().int().nonnegative(),preset:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),setTarget:E(i({deviceId:a().int().nonnegative(),target:a()}),g(),{kind:`mutation`,auth:`admin`}),setTargetRange:E(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),g(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:E(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`}),setSwingVertical:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:mb,kind:`push`},runtimeState:mb,durability:`session`},gb=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),_b=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),vb=x(`mode`,[i({mode:b(`rgb`),rgb:gb}),i({mode:b(`hsv`),hsv:_b}),i({mode:b(`mired`),mireds:a().int().min(50).max(1e3)})]),yb=i({mode:h([`rgb`,`hsv`,`mired`]),rgb:gb.optional(),hsv:_b.optional(),mireds:a().int().optional(),lastChangedAt:a()}),bb={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Light],methods:{setColor:E(i({deviceId:a().int().nonnegative(),color:vb}),g(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:h([`rgb`,`hsv`,`mired`]),rgb:gb.optional(),hsv:_b.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:yb,kind:`command-driven`},runtimeState:yb,durability:`session`},xb=2e4,Sb=x(`outcome`,[i({outcome:b(`validated`),latencyMs:a().nonnegative().optional(),detail:_().optional()}).strict(),i({outcome:b(`rejected`),error:_()}).strict(),i({outcome:b(`inconclusive`),error:_()}).strict()]),Cb=i({settings:n(_(),u())}),wb=i({label:_()}),Tb={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:E(Cb,Sb,{kind:`mutation`,auth:`admin`}),describeTest:E(g(),wb,{auth:`admin`})}},Eb=i({connected:y(),lastChangedAt:a()}),Db={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:Eb,kind:`push`},runtimeState:Eb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Ob=i({key:_().min(1),label:_().min(1),level:a().min(0).max(100).nullable(),status:h([`ok`,`replace`]).nullable(),lastResetAt:a().nullable(),resettable:y()}),kb=i({items:p(Ob),lastChangedAt:a()}),Ab={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(O),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:E(i({deviceId:a().int().nonnegative(),key:_().min(1)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:kb,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:Ob,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:kb.extend({lastFetchedAt:a()}),durability:`session`},jb=i({entryOpen:y(),lastChangedAt:a()}),Mb={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:jb,kind:`push`},runtimeState:jb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Nb=h([`numeric`,`select`,`text`,`datetime`]),Pb=i({kind:Nb,value:c([a(),_()]),options:p(_()),lastChangedAt:a(),unit:_().optional(),min:a().optional(),max:a().optional(),step:a().optional(),precision:a().int().min(0).max(10).optional(),format:h([`date`,`time`,`datetime`]).optional()}),Fb=x(`kind`,[i({kind:b(`numeric`),value:a()}),i({kind:b(`select`),value:_().min(1)}),i({kind:b(`text`),value:_()}),i({kind:b(`datetime`),value:_().min(1)})]),Ib={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Control],methods:{setValue:E(i({deviceId:a().int().nonnegative(),control:Fb}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:Pb,kind:`push`},runtimeState:Pb,durability:`session`},Lb=h([`open`,`opening`,`closing`,`closed`,`stopped`]),Rb=i({state:Lb,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),zb={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Cover],methods:{open:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),close:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),stop:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),setPosition:E(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`}),setTiltPosition:E(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:Rb,kind:`push`},runtimeState:Rb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Bb=h([`auto`,`day`,`night`,`schedule`]),Vb=i({min:a(),max:a(),step:a()}),Hb=i({mode:Bb,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),Ub=i({modes:p(Bb),supportsSensitivity:y(),sensitivity:Vb.optional(),supportsSwitchDelay:y(),switchDelaySec:Vb.optional()}),Wb=i({mode:Bb.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),Gb={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:E(i({deviceId:a()}),Ub),setSettings:E(i({deviceId:a(),settings:Wb}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:Hb,kind:`poll`},runtimeState:Hb,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Kb=i({online:y(),lastChangedAt:a()}),qb={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:Kb})}},status:{schema:Kb,kind:`push`},runtimeState:Kb,durability:`restored`,volatileStateFields:[`lastChangedAt`]},Jb=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),Yb=i({deviceId:a(),timestamp:a()}),Xb={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[O.Button,O.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:Yb}},status:{schema:Jb,kind:`push`},runtimeState:Jb,durability:`restored`},Zb=h([`date`,`time`,`datetime`]),Qb=i({value:_(),format:Zb.optional(),lastFetchedAt:a()}),$b={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:Qb,kind:`push`},runtimeState:Qb,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ex=i({deviceId:a(),eventType:_(),data:n(_(),u()).nullable(),timestamp:a(),seq:a()}),tx=i({eventTypes:p(_()),lastEvent:ex.nullable(),eventCountSinceStart:a()}),nx={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.EventEmitter],methods:{},events:{onEvent:{data:ex}},status:{schema:tx,kind:`push`},runtimeState:tx,durability:`session`},rx=i({id:_(),type:_(),timestamp:a(),label:_().optional(),thumbnailUrl:_().optional(),clipUrl:_().optional(),metadata:n(_(),u()).optional()}),ix={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[O.Camera],methods:{getEvents:E(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p(rx)),getEventThumbnail:E(i({deviceId:a(),eventId:_()}),i({base64:_(),contentType:_()}).nullable()),getEventClipUrl:E(i({deviceId:a(),eventId:_()}),_().nullable())}},ax=i({id:_(),name:_(),sampleCount:a().int().nonnegative(),coverMediaKey:_().optional(),coverBase64:_().optional()}),ox=i({id:_(),source:h([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:_().optional()}),sx=i({faceId:_(),deviceId:a().int(),trackId:_(),timestamp:a().int(),recognizedIdentityId:_().optional(),identityName:_().optional(),assigned:y(),base64:_().optional(),cropUrl:_().optional(),faceBbox:H.optional(),keyFrameMediaKey:_().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:_().optional(),suggestedMatchScore:a().optional()}),cx=h([`unassigned`,`recognized`,`identified`,`all`]),lx=i({key:_(),kind:_(),base64:_(),sizeBytes:a(),timestamp:a()}),ux={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:E(g(),p(ax).readonly()),createIdentity:E(i({name:_().min(1)}),ax,{kind:`mutation`,auth:`admin`}),renameIdentity:E(i({id:_(),name:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),deleteIdentity:E(i({id:_()}),g(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:E(i({identityId:_()}),p(ox).readonly()),removeSample:E(i({identityId:_(),sampleId:_()}),g(),{kind:`mutation`,auth:`admin`}),listRecentFaces:E(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),filter:cx.optional(),includeCrops:y().optional()}).optional(),p(sx).readonly()),getFaceByTrack:E(i({deviceId:a().int(),trackId:_()}),sx.nullable()),getFaceMedia:E(i({faceId:_()}),p(lx).readonly()),assignFace:E(i({faceId:_(),identityId:_()}),g(),{kind:`mutation`,auth:`admin`}),unassignFace:E(i({faceId:_()}),g(),{kind:`mutation`,auth:`admin`}),deleteFace:E(i({faceId:_()}),g(),{kind:`mutation`,auth:`admin`}),assignFaces:E(i({faceIds:p(_()).min(1),identityId:_()}),i({assigned:a().int(),failed:p(_()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:E(i({faceIds:p(_()).min(1)}),i({unassigned:a().int(),failed:p(_()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:E(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(i({faceIds:p(_()).readonly(),representativeFaceId:_(),size:a().int(),cohesion:a()})).readonly())}},dx=h([`forward`,`reverse`]),fx=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:_(),availablePresets:p(_()),direction:dx.nullable(),oscillating:y().nullable(),lastChangedAt:a()}),px={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Fan],methods:{setPercentage:E(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`}),setPreset:E(i({deviceId:a().int().nonnegative(),preset:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),setDirection:E(i({deviceId:a().int().nonnegative(),direction:dx}),g(),{kind:`mutation`,auth:`admin`}),setOscillating:E(i({deviceId:a().int().nonnegative(),oscillating:y()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:fx,kind:`push`},runtimeState:fx,durability:`session`},mx=i({flags:n(_(),u()),deviceType:_().nullable(),model:_().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),hx={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:mx})}},status:{schema:mx,kind:`push`},runtimeState:mx,durability:`session`},gx=i({flooded:y(),lastChangedAt:a()}),_x={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:gx,kind:`push`},runtimeState:gx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},vx=i({detected:y(),lastChangedAt:a()}),yx={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:vx,kind:`push`},runtimeState:vx,durability:`restored`,volatileStateFields:[`lastChangedAt`]},bx=i({on:y(),currentHumidity:a().min(0).max(100).nullable(),targetHumidity:a().min(0).max(100).nullable(),mode:_().nullable(),availableModes:p(_()),action:_().nullable(),minHumidity:a().nullable(),maxHumidity:a().nullable(),lastChangedAt:a()}),xx={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Humidifier],methods:{setOn:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:E(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`}),setMode:E(i({deviceId:a().int().nonnegative(),mode:_().min(1)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:bx,kind:`push`},runtimeState:bx,durability:`session`},Sx=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),Cx={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor,O.Thermostat],methods:{},status:{schema:Sx,kind:`push`},runtimeState:Sx,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},wx=i({url:_().nullable(),lastUpdated:a().nullable()}),Tx={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Image],methods:{},status:{schema:wx,kind:`push`},runtimeState:wx,durability:`session`},Ex=h([`0`,`90`,`180`,`270`]),Dx=h([`auto`,`manual`]),Ox=h([`auto`,`manual`]),kx=h([`off`,`blc`,`wdr`,`hlc`]),Ax=i({min:a(),max:a(),step:a()}),jx=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:y().optional(),flip:y().optional(),rotate:Ex.optional(),whiteBalance:Dx.optional(),warmth:a().optional(),exposureMode:Ox.optional(),backlightMode:kx.optional(),lastFetchedAt:a()}),Mx=i({supportsBrightness:y(),brightness:Ax.optional(),supportsContrast:y(),contrast:Ax.optional(),supportsSaturation:y(),saturation:Ax.optional(),supportsSharpness:y(),sharpness:Ax.optional(),supportsMirror:y(),supportsFlip:y(),rotateOptions:p(Ex),whiteBalanceModes:p(Dx),supportsWarmth:y(),warmth:Ax.optional(),exposureModes:p(Ox),backlightModes:p(kx)}),Nx=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:y().optional(),flip:y().optional(),rotate:Ex.optional(),whiteBalance:Dx.optional(),warmth:a().optional(),exposureMode:Ox.optional(),backlightMode:kx.optional()}),Px={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:E(i({deviceId:a()}),Mx),setSettings:E(i({deviceId:a(),settings:Nx}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:jx,kind:`poll`},runtimeState:jx,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Fx=i({id:_(),addonId:_(),name:_(),enabled:y(),info:n(_(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:_()}),Ix=i({id:_(),addonId:_(),name:_(),enabled:y(),info:n(_(),u()).readonly(),createdAt:a(),updatedAt:a()}),Lx=i({addonId:_(),name:_(),description:_(),iconUrl:_().nullable(),color:_(),instanceMode:_(),mode:h([`standalone`,`account`,`broker`]),discoveryMode:_(),kind:h([`device-adoption`,`device-provider`]),brokerKind:_().nullable(),supportsLocationImport:y(),canTest:y(),existingInstances:p(i({id:_(),name:_()})),canAdd:y()}),Rx=h([`validated`,`rejected`,`inconclusive`,`unsupported`]),zx=i({success:y(),error:_().optional(),status:Rx.optional(),testedBy:_().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:_().optional()}),Bx=i({addonId:_(),name:_(),enabled:y().optional(),info:n(_(),u()).optional(),settings:n(_(),u()).optional(),skipRestart:y().optional()}),Vx=i({id:_(),name:_().optional(),enabled:y().optional(),info:n(_(),u()).optional()}),Hx=i({success:y(),deletedId:_()}),Ux={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:E(g(),p(Fx)),get:E(i({id:_()}),Fx),getByAddonId:E(i({addonId:_()}),Ix.nullable()),create:E(Bx,Ix,{kind:`mutation`,auth:`admin`}),update:E(Vx,Ix,{kind:`mutation`,auth:`admin`}),delete:E(i({id:_()}),Hx,{kind:`mutation`,auth:`admin`}),getSettings:E(i({id:_()}),n(_(),u()),{auth:`admin`}),setSettings:E(i({id:_(),settings:n(_(),u())}),i({success:y()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:E(g(),p(Lx),{auth:`admin`}),testConnection:E(i({addonId:_(),settings:n(_(),u())}),zx,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Wx=i({codecs:p(_()),sampleRate:a(),duplex:h([`half`,`full`]),maxBacklogMs:a()}),Gx=i({talking:y(),lastSessionAt:a().nullable(),ability:Wx.nullable()}),Kx=h([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),qx={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],methods:{startSession:E(i({deviceId:a()}),i({sessionId:_(),sdpOffer:_()}),{kind:`mutation`,auth:`admin`}),handleAnswer:E(i({deviceId:a(),sessionId:_(),sdpAnswer:_()}),g(),{kind:`mutation`,auth:`admin`}),stopSession:E(i({deviceId:a(),sessionId:_()}),g(),{kind:`mutation`,auth:`admin`}),startTalkSession:E(i({deviceId:a()}),i({sessionId:_()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:E(i({deviceId:a(),audioBase64:_(),codec:Kx.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:y()}),{kind:`mutation`,auth:`admin`}),endTalkSession:E(i({deviceId:a()}),g(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Gx})}},status:{schema:Gx,kind:`command-driven`},runtimeState:Gx,durability:`session`},Jx=h([`idle`,`mowing`,`paused`,`docked`,`error`]),Yx=h([`info`,`warning`,`error`]),Xx=i({activity:Jx,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:_().nullable(),severity:Yx,lastChangedAt:a()}),Zx={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.LawnMower],methods:{startMowing:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),pause:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),dock:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:Xx,kind:`push`},runtimeState:Xx,durability:`session`},Qx=h([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),$x=i({name:_(),family:h([`IPv4`,`IPv6`]),address:_(),cidr:_(),netmask:_(),internal:y(),mac:_(),kind:Qx,preferred:y(),plausible:y(),plausibleReason:_()}),eS=i({interfaces:p($x).readonly(),probedAt:a()}),tS=$x.nullable(),nS=i({label:_(),baseUrl:_(),kind:h([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:h([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:y(),plausibleReason:_(),priority:a()}),rS=h([`server-config`,`server-env`,`caller-hint`,`default`]),iS=i({port:a().int().min(1).max(65535),source:rS}),aS=i({endpoints:p(nS).readonly(),localPort:iS}),oS=i({baseUrl:_().nullable(),resolved:_().nullable()}),sS=i({addresses:p(_()).readonly()}),cS=i({mode:h([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:_().nullable(),caFingerprintSha256:_().nullable(),validTo:_().nullable(),sans:p(_()),caCertPem:_().nullable(),reissueError:_().nullable(),restartRequired:y()}),lS={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:E(g(),eS),getPreferred:E(g(),tS),getConnectionEndpoints:E(i({port:a().int().min(1).max(65535).optional(),includeLoopback:y().optional(),ipv4Only:y().optional(),scheme:h([`http`,`https`]).optional()}),aS),getNotificationEndpoint:E(g(),oS),setNotificationEndpoint:E(i({baseUrl:_().nullable()}),oS,{kind:`mutation`}),getAllowedAddresses:E(g(),sS),setAllowedAddresses:E(sS,i({success:b(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:E(g(),sS,{kind:`mutation`}),getTlsStatus:E(g(),cS),regenerateCertificate:E(i({reason:_().optional()}),cS,{kind:`mutation`,auth:`admin`}),uploadCertificate:E(i({certPem:_().min(1),keyPem:_().min(1),caPem:_().optional()}),cS,{kind:`mutation`,auth:`admin`}),downloadCa:E(g(),i({pem:_()})),revertToGeneratedCertificate:E(g(),cS,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},uS=h([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),dS=i({state:uS,lastChangedAt:a()}),fS={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Lock],methods:{lock:E(i({deviceId:a().int().nonnegative(),code:_().min(1).optional()}),g(),{kind:`mutation`,auth:`admin`}),unlock:E(i({deviceId:a().int().nonnegative(),code:_().min(1).optional()}),g(),{kind:`mutation`,auth:`admin`}),open:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:dS,kind:`push`},runtimeState:dS,durability:`restored`,volatileStateFields:[`lastChangedAt`]},pS=h([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),mS=h([`off`,`all`,`one`]),hS=i({type:_(),title:_(),artist:_().optional(),album:_().optional(),imageUrl:_().optional()}),gS=i({state:pS,volumeLevel:a().min(0).max(100).nullable(),isMuted:y().nullable(),source:_(),availableSources:p(_()),currentMedia:hS.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:y().nullable(),repeat:mS.nullable(),lastChangedAt:a()}),_S={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.MediaPlayer],methods:{play:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),pause:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),stop:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),next:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),previous:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),seek:E(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),setVolume:E(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`}),setMute:E(i({deviceId:a().int().nonnegative(),muted:y()}),g(),{kind:`mutation`,auth:`admin`}),setShuffle:E(i({deviceId:a().int().nonnegative(),shuffle:y()}),g(),{kind:`mutation`,auth:`admin`}),setRepeat:E(i({deviceId:a().int().nonnegative(),repeat:mS}),g(),{kind:`mutation`,auth:`admin`}),selectSource:E(i({deviceId:a().int().nonnegative(),source:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),playMedia:E(i({deviceId:a().int().nonnegative(),mediaId:_().min(1),mediaType:_().min(1)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:gS,kind:`push`},runtimeState:gS,durability:`session`},vS=i({id:_(),label:_(),scope:h([`mesh`,`public`]),url:_(),hostname:_(),port:a(),protocol:h([`http`,`https`])}),yS=i({id:_(),hostname:_(),magicDns:_(),addresses:p(_()).readonly(),os:_().optional(),online:y(),lastSeenMs:a(),isSelf:y(),connection:h([`direct`,`relay`,`idle`]),relay:_().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:p(_()).readonly(),exitNodeOption:y(),advertisedRoutes:p(_()).readonly(),userLogin:_().nullable(),keyExpiry:a().nullable()}),bS=i({joined:y(),meshIp:_(),magicDnsHostname:_(),peerCount:a(),endpoints:p(vS).readonly(),error:_().optional(),tenantName:_(),magicDnsSuffix:_(),userLogin:_().nullable(),controlPlaneUrl:_(),keyExpiry:a().nullable(),daemonSocket:_().optional(),daemonCliPath:_().optional()}),xS={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:E(g(),bS),join:E(i({authKey:_().min(8),hostname:_().optional()}),i({joined:b(!0)}),{kind:`mutation`}),startLogin:E(i({hostname:_().optional()}),i({loginUrl:_()}),{kind:`mutation`}),leave:E(g(),i({left:b(!0)}),{kind:`mutation`}),logout:E(g(),i({loggedOut:b(!0)}),{kind:`mutation`}),listPeers:E(g(),i({peers:p(yS).readonly()})),testConnection:E(i({authKey:_().optional()}),i({ok:y(),tenant:_().optional(),daemonVersion:_().optional(),error:_().optional()}),{kind:`mutation`})}},SS=i({detected:y(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),CS=i({deviceId:a(),detected:y(),timestamp:a(),source:Ug,regions:p(Kd).readonly().optional()}),wS={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[O.Camera,O.Sensor],methods:{isDetected:E(i({deviceId:a()}),y())},events:{onMotionChanged:{data:CS}},status:{schema:SS,kind:`push`},runtimeState:SS,durability:`session`},TS=i({enabled:y(),lastChangedAt:a()}),ES=TS.extend({lastFetchedAt:a()}),DS={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Light,O.Siren,O.Switch],methods:{setMotionTrigger:E(i({deviceId:a().int().nonnegative(),enabled:y()}),g(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:y(),lastChangedAt:a()})}},status:{schema:TS,kind:`command-driven`},runtimeState:ES,durability:`session`},OS=i({id:a(),enabled:y(),shape:ip}),kS=i({enabled:y(),sensitivity:a(),regions:p(OS),lastFetchedAt:a()}),AS=i({maxRegions:a(),supportedShapes:p(sp),grid:lp,sensitivity:i({min:a(),max:a(),step:a()})}),jS=i({enabled:y().optional(),sensitivity:a().optional(),regions:p(OS).optional()}),MS={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:E(i({deviceId:a()}),AS),setZone:E(i({deviceId:a(),patch:jS}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:kS,kind:`poll`},runtimeState:kS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NS=h([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),PS=i({class:NS,timestamp:a(),confidence:a().min(0).max(1).optional()}),FS=i({lastByClass:l(NS,PS.nullable()),supportedClasses:p(NS).readonly(),enabled:y()}),IS=FS.extend({lastFetchedAt:a()}),LS={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],methods:{setEnabled:E(i({deviceId:a(),enabled:y()}),g(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:PS})}},status:{schema:FS,kind:`push`},runtimeState:IS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},RS=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),zS=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),BS=i({deviceId:a(),streams:n(_(),RS),client:zS.optional()}),VS={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:E(i({deviceId:a()}),BS.nullable()),getAllStats:E(g(),p(BS).readonly()),reportClientStats:E(i({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6),packetLossPercent:a().min(0).max(100)}),g(),{kind:`mutation`})},mount:{kind:`server-provided`}},HS=i({addonId:_(),capabilities:p(_()).readonly(),status:_()}),US=i({pid:a(),name:_(),state:_(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(HS).readonly(),groupId:_().optional()}),WS=i({id:_(),status:_(),cpuPercent:a(),memoryRss:a()}),GS=i({category:_(),total:a(),healthy:a(),addons:p(WS).readonly()}),KS=i({name:_(),version:_()}),qS=i({id:_(),name:_(),hostname:_(),platform:_(),arch:_(),cpuModel:_().nullable(),cpuCores:a(),memoryMB:a(),engines:p(_()).readonly(),isHub:y(),isOnline:y(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:_(),localIps:p(_()).readonly(),addons:p(i({id:_(),capabilities:p(_()).readonly(),status:_()})).readonly(),processes:p(US).readonly(),categories:p(GS).readonly(),rootPackage:KS.nullable()}),JS=i({callerAddonId:_(),providerAddonId:_(),capName:_(),callsPerMin:a(),lastCallAtMs:a()}),YS=i({nodeId:_(),name:_(),version:_(),status:_(),synced:y()}),XS=i({hubVersion:_(),nodes:p(YS)}),ZS=i({nodeId:_(),addonId:_()}),QS=i({id:_(),status:_(),version:_().optional(),packageName:_().optional()}),$S=i({success:y()}),eC=i({success:y(),reason:_().optional()}),tC=i({restarted:p(_()).readonly(),failed:p(_()).readonly()}),nC=i({nodeId:_(),name:_()}),rC={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:E(g(),p(qS).readonly(),{auth:`admin`}),deployAddon:E(ZS,$S,{kind:`mutation`,auth:`admin`}),undeployAddon:E(ZS,$S,{kind:`mutation`,auth:`admin`}),restartAddon:E(ZS,$S,{kind:`mutation`,auth:`admin`}),restartProcess:E(i({nodeId:_(),processName:_()}),eC,{kind:`mutation`,auth:`admin`}),restartNode:E(i({nodeId:_()}),tC,{kind:`mutation`,auth:`admin`}),shutdownNode:E(i({nodeId:_()}),$S,{kind:`mutation`,auth:`admin`}),renameNode:E(i({nodeId:_(),name:_().min(1).max(64)}),nC,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:E(g(),n(_(),XS),{auth:`admin`}),getCapUsageGraph:E(i({windowSeconds:a().int().positive().max(300).default(60)}),p(JS).readonly(),{auth:`admin`}),getNodeAddons:E(i({nodeId:_()}),p(QS).readonly(),{auth:`admin`}),setProcessLogLevel:E(i({nodeId:_(),level:_()}),$S,{kind:`mutation`,auth:`admin`}),executeQuery:E(i({nodeId:_(),addonId:_(),queryName:_(),params:n(_(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},iC=h([`min`,`low`,`normal`,`high`]),aC=i({id:_().min(1),title:_().min(1),uri:o().optional(),destructive:y().optional()}),oC=i({image:y(),priority:y(),data:y(),actions:y(),recipients:y()}),sC=i({lastSentAt:a(),lastError:_().nullable(),queueDepth:a().int().nonnegative(),supports:oC}),cC=i({deviceId:a().int().nonnegative(),title:_().optional(),body:_().min(1),image:_().optional(),priority:iC.optional(),channel:_().optional(),recipients:p(_()).optional(),actions:p(aC).optional(),data:n(_(),u()).optional()}),lC=i({notificationId:_(),acceptedAt:a()}),uC={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Notifier],methods:{send:E(cC,lC,{kind:`mutation`,auth:`admin`}),cancel:E(i({deviceId:a().int().nonnegative(),notificationId:_().min(1)}),g(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:i({deviceId:a(),notificationId:_(),success:y(),error:_().nullable(),acceptedAt:a()})}},status:{schema:sC,kind:`command-driven`},runtimeState:sC,durability:`session`},dC=i({value:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),fC={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:dC,kind:`push`},runtimeState:dC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},pC=h([`text`,`timestamp`,`watermark`]),mC=h([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),hC=i({id:_(),kind:pC,enabled:y(),text:_().optional(),position:mC.optional(),availablePositions:p(mC).readonly(),readOnly:y().optional()}),gC=i({overlays:p(hC).readonly()}),_C=i({enabled:y().optional(),text:_().optional(),position:mC.optional()}).partial(),vC={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],methods:{setOverlay:E(i({deviceId:a(),overlayId:_(),patch:_C}),g(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:gC})}},status:{schema:gC,kind:`command-driven`},settings:{bindings:[{kind:`array`,statusPath:`overlays`,idField:`id`,method:`setOverlay`,idArg:`overlayId`,patchArg:`patch`,sectionId:`osd`,sectionTitle:`Video overlays`,itemFields:{enabled:{label:e=>`${String(e.id)} enabled`,kind:`boolean`},text:{label:e=>`${String(e.id)} text`,kind:`text`,when:e=>e.kind!==`timestamp`&&!e.readOnly},position:{label:e=>`${String(e.id)} position`,kind:`select`,options:e=>e.availablePositions??[],when:e=>Array.isArray(e.availablePositions)&&e.availablePositions.length>0}}}]}},yC=x(`kind`,[i({kind:b(`static`),text:_().max(64)}),i({kind:b(`clock`),pattern:_().min(1).max(32).default(`HH:mm`),timezone:_().min(1).max(64).optional()}),i({kind:b(`device-state`),deviceId:a().int().optional(),capName:_().min(1).max(64),valuePath:_().min(1).max(64)}),i({kind:b(`latest-recognition`),recognition:h([`person`,`plate`])})]),bC=i({enabled:y().default(!0),source:yC,template:_().max(96).default("${value}"),maxCharacters:a().int().min(4).max(64).optional(),maxDecimals:a().int().min(0).max(4).default(1),unitLabel:_().max(8).optional(),valueMap:n(_(),_()).optional(),schedule:bp.optional(),conditions:Np.optional(),fallbackText:_().max(64).default(``)}),xC=i({slotId:_(),kind:pC,readOnly:y(),cameraEnabled:y(),cameraText:_().optional(),binding:bC.nullable()}),SC=h([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),CC=i({slotId:_(),outcome:SC,text:_(),reason:_().optional()}),wC=h([`number`,`boolean`,`string`,`enum`]),TC=i({deviceId:a().int(),deviceName:_(),capName:_(),valuePath:_(),label:_(),valueType:wC,enumValues:p(_()).readonly().optional()}),EC={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:E(i({deviceId:a().int()}),i({supported:y(),slots:p(xC)}),{auth:`admin`}),getSourceCatalog:E(i({deviceId:a().int()}),i({sources:p(TC)}),{auth:`admin`}),getConditionSupport:E(i({}),i({supported:p(_()),catalog:p(Yp)}),{auth:`admin`}),setSlotBinding:E(i({deviceId:a().int(),slotId:_().min(1),binding:bC}),i({slot:xC,render:CC}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:E(i({deviceId:a().int(),slotId:_().min(1)}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:E(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:E(i({deviceId:a().int(),slotId:_().min(1),binding:bC.optional()}),CC,{kind:`mutation`,auth:`admin`}),renderDevice:E(i({deviceId:a().int()}),i({results:p(CC)}),{kind:`mutation`,auth:`admin`})}},DC=4,OC=200,kC=h([`normal`,`offline`,`on_batteries`]),AC=a().int().min(4).max(200),jC=i({foodLevel:a().nullable(),food1:a().nullable(),food2:a().nullable(),lowFood:y(),batteryPower:a().min(0).max(100).nullable(),desiccantLeftDays:a().nullable(),feeding:y(),status:kC.nullable(),error:_().nullable(),errorCode:a().nullable(),isDualHopper:y(),childLock:y(),indicatorLight:y(),feedSound:y(),volume:a(),lastFetchedAt:a()}),MC={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.PetFeeder],methods:{feed:E(i({deviceId:a().int().nonnegative(),grams:AC.optional(),hopper1:AC.optional(),hopper2:AC.optional()}),g(),{kind:`mutation`,auth:`admin`}),cancelFeed:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),resetDesiccant:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),callPet:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),playSound:E(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),setChildLock:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`}),setFeedSound:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`}),setVolume:E(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:jC,kind:`poll`},runtimeState:jC,durability:`session`},NC=i({id:_(),name:_(),sampleCount:a().int().nonnegative(),coverMediaKey:_().optional(),coverBase64:_().optional()}),PC=i({id:_(),text:_(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:_().optional()}),FC=i({plateId:_(),deviceId:a().int(),trackId:_(),timestamp:a().int(),text:_(),score:a(),corrected:y(),recognizedVehicleId:_().optional(),vehicleName:_().optional(),assigned:y(),plateBbox:H.optional(),keyFrameMediaKey:_().optional(),base64:_().optional()}),IC=i({key:_(),kind:_(),base64:_(),sizeBytes:a(),timestamp:a()}),LC=i({plateIds:p(_()).readonly(),representativePlateId:_(),representativeText:_(),size:a().int(),cohesion:a()}),RC={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:E(i({deviceId:a().int().optional(),limit:a().int().positive().optional()}).optional(),p(FC).readonly()),getPlateByTrack:E(i({deviceId:a().int(),trackId:_()}),FC.nullable()),getPlateMedia:E(i({plateId:_()}),p(IC).readonly()),searchPlates:E(i({text:_().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional()}),p(FC).readonly()),suggestPlateClusters:E(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(LC).readonly()),correctPlateText:E(i({plateId:_(),text:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),deletePlate:E(i({plateId:_()}),g(),{kind:`mutation`,auth:`admin`}),listVehicles:E(g(),p(NC).readonly()),createVehicle:E(i({name:_().min(1)}),NC,{kind:`mutation`,auth:`admin`}),renameVehicle:E(i({id:_(),name:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),deleteVehicle:E(i({id:_()}),g(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:E(i({vehicleId:_()}),p(PC).readonly()),removeVehicleSample:E(i({vehicleId:_(),sampleId:_()}),g(),{kind:`mutation`,auth:`admin`}),assignPlate:E(i({plateId:_(),vehicleId:_()}),g(),{kind:`mutation`,auth:`admin`}),unassignPlate:E(i({plateId:_()}),g(),{kind:`mutation`,auth:`admin`}),assignPlates:E(i({plateIds:p(_()).min(1),vehicleId:_()}),i({assigned:a().int(),failed:p(_()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:E(i({plateIds:p(_()).min(1)}),i({unassigned:a().int(),failed:p(_()).readonly()}),{kind:`mutation`,auth:`admin`})}},zC=h(ha),BC=h([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),VC=i({preferred:p(_()).readonly(),rationale:_()}),HC=h([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);i({encoders:p(i({encoder:HC,codec:h([`H264`,`H265`]),family:h([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:y(),reason:_().optional()})).readonly(),defaultH264:HC,defaultH265:HC,probedAt:a()}),i({methods:p(_()).readonly(),probedAt:a()});var UC=h([`darwin`,`linux`,`win32`]),WC=h([`arm64`,`x64`]),GC=i({type:h([`nvidia`,`amd`,`intel`,`apple`]),name:_(),memoryMB:a().optional()}),KC=i({type:h([`apple-ane`,`intel-npu`])}),qC=i({type:b(`coral-edgetpu`),bus:_().optional()}),JC=i({platform:UC,arch:WC,cpuModel:_(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:GC.nullable(),npu:KC.nullable(),coral:qC.nullable().optional()}),YC=i({runtime:h([`node`,`python`]),backend:_(),format:h([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:_(),available:y()}),XC=i({key:_(),backend:_(),device:_(),format:zC,runtime:b(`python`),score:a(),available:y()}),ZC=i({hardware:JC,scores:p(YC).readonly(),bestScore:YC,pythonPath:_().nullable(),devices:p(XC).readonly()}),QC=i({modelId:_(),name:_(),minRAM_MB:a(),accuracyScore:a(),formats:p(_()).readonly()}),$C=i({modelId:_(),runtime:h([`node`,`python`]),backend:_(),format:zC,reason:_()}),ew={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:E(g(),ZC),getHardware:E(g(),JC),resolveInferenceConfig:E(i({requirements:p(QC).readonly()}),$C),resolveHwAccel:E(i({prefer:BC}),VC)}},tw=i({watts:a().optional(),kwhTotal:a().optional(),volts:a().optional(),amps:a().optional(),va:a().optional(),powerFactor:a().min(0).max(1).optional(),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),nw={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:tw,kind:`push`},runtimeState:tw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},rw=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),iw=i({state:_(),location:_().nullable(),gps:rw.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),aw={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Presence],methods:{},status:{schema:iw,kind:`push`},runtimeState:iw,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ow=i({hpa:a(),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),sw={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:ow,kind:`push`},runtimeState:ow,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},cw=x(`kind`,[K,rp]),lw=i({id:a(),enabled:y(),shape:cw}),uw=i({enabled:y(),regions:p(lw),audioEnabled:y().nullable(),lastFetchedAt:a()}),dw=i({maxRegions:a(),supportedShapes:p(sp),polygonVertices:cp.optional(),supportsAudioMute:y()}),fw=i({enabled:y().optional(),regions:p(lw).optional()}),pw={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:E(i({deviceId:a()}),dw),setMask:E(i({deviceId:a(),patch:fw}),g(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:E(i({deviceId:a(),enabled:y()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:uw,kind:`poll`},runtimeState:uw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function mw(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var hw=i({id:_(),name:_()}),gw=i({pan:a(),tilt:a(),zoom:a()}),_w=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),vw=gw.extend({autofocus:y()}),yw=i({hasPan:y(),hasTilt:y(),hasZoom:y(),supportsPresets:y(),maxPresets:a().optional(),hasAutofocus:y()}),bw={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:E(_w.extend({deviceId:a()}),g(),{kind:`mutation`}),continuousMove:E(_w.extend({deviceId:a()}),g(),{kind:`mutation`}),stop:E(i({deviceId:a()}),g(),{kind:`mutation`}),getPresets:E(i({deviceId:a()}),p(hw)),goToPreset:E(i({deviceId:a(),presetId:_()}),g(),{kind:`mutation`}),savePreset:E(i({deviceId:a(),presetId:_(),name:_()}),g(),{kind:`mutation`,auth:`admin`}),deletePreset:E(i({deviceId:a(),presetId:_()}),g(),{kind:`mutation`,auth:`admin`}),getOptions:E(i({deviceId:a()}),yw),goHome:E(i({deviceId:a()}),g(),{kind:`mutation`}),getPosition:E(i({deviceId:a()}),gw),setAutofocus:E(i({deviceId:a(),enabled:y()}),g(),{kind:`mutation`})},status:{schema:vw,kind:`command-driven`}},xw=i({targetType:_().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),Sw=i({value:_(),label:_()}),Cw=i({enabled:y(),lastChangedAt:a(),currentSettings:xw.nullable(),supportedTargetTypes:p(Sw)}),ww=Cw.extend({lastFetchedAt:a()}),Tw={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:E(i({deviceId:a()}),Cw),setEnabled:E(i({deviceId:a(),enabled:y()}),g(),{kind:`mutation`}),getSettings:E(i({deviceId:a()}),xw.nullable()),setSettings:E(i({deviceId:a(),settings:xw.partial()}),g(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Cw})}},status:{schema:Cw,kind:`command-driven`},runtimeState:ww,durability:`session`},Ew={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera,O.Sensor,O.Switch],methods:{reboot:E(i({deviceId:a().int().nonnegative()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`})}},Dw=i({deviceId:a(),enabled:y(),activeMode:h([`off`,`continuous`,`events`]),nodeId:_(),storageBytes:a()}),Ow=i({profile:_(),startMs:a(),endMs:a()}),kw=i({deviceId:a(),ranges:p(Ow)}),Aw=i({deviceId:a(),days:p(a())}),jw=i({deviceId:a(),localMasterPath:_().nullable(),playbackUrl:_().nullable(),playbackEndpoints:p(_())}),Mw=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),Nw=i({locationId:_().nullable(),locationIds:p(_()).optional(),root:_().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),Pw=i({nodeId:_(),totalUsedBytes:a(),devices:p(Mw),locations:p(Nw).optional()}),Fw=i({deviceId:a(),profile:_(),fromLocationId:_(),toLocationId:_(),bytes:a(),files:a().int()}),Iw=h([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),Lw=i({deviceId:a(),profile:_(),fromLocationId:_(),toLocationId:_().nullable(),bytes:a(),reason:Iw}),Rw=i({moves:p(Fw),skipped:p(Lw),bytesToMove:a(),jobIds:p(_())}),zw=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),Bw=x(`kind`,[i({kind:b(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:b(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),Vw=i({data:v(Uint8Array)}),Hw=i({data:v(Uint8Array),gopStartMs:a(),gopDurMs:a()}),Uw={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:Dw,kind:`command-driven`},methods:{getAvailability:E(i({deviceId:a(),fromMs:a(),toMs:a()}),kw,{kind:`query`,auth:`protected`}),getDaysWithRecordings:E(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),Aw,{kind:`query`,auth:`protected`}),getPlaybackManifest:E(i({deviceId:a(),fromMs:a(),toMs:a()}),jw,{kind:`query`,auth:`protected`}),getStorageUsage:E(i({}),Pw,{kind:`query`,auth:`admin`}),getDeviceConfig:E(i({deviceId:a()}),wi,{kind:`query`,auth:`admin`}),locateSegment:E(i({deviceId:a(),profile:_(),epochMs:a()}),Bw,{kind:`query`,auth:`admin`}),readSegmentBytes:E(i({deviceId:a(),profile:_(),startMs:a()}),Vw,{kind:`query`,auth:`admin`}),readGopBytes:E(i({deviceId:a(),profile:_(),startMs:a(),epochMs:a()}),Hw,{kind:`query`,auth:`admin`}),setDeviceConfig:E(i({deviceId:a(),config:wi}),wi,{kind:`mutation`,auth:`admin`}),rescanStorage:E(i({deviceId:a()}),Dw,{kind:`mutation`,auth:`admin`}),pruneFootage:E(i({deviceId:a(),reason:ni.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:E(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:E(ii,p(ri).readonly(),{kind:`query`,auth:`admin`}),renderGif:E(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(2),postRollSec:a().min(0).max(30).default(5),maxWidth:a().int().min(120).max(1280).default(480),fps:a().int().min(1).max(15).default(5)}),i({gifBase64:_(),fromMs:a(),toMs:a()}),{kind:`mutation`,auth:`admin`}),renderClip:E(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(3),postRollSec:a().min(0).max(30).default(7),maxWidth:a().int().min(160).max(1920).default(640)}),i({clipBase64:_(),mime:_(),fromMs:a(),toMs:a(),bytes:a().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:E(M,i({paused:b(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:E(M,i({resumed:b(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:E(M,i({refreshed:b(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:E(Mi,i({jobId:_()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:E(i({jobId:_()}),ki.nullable(),{auth:`admin`}),cancelStorageMigrationMove:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`}),relocateFootage:E(ji,i({jobId:_()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:E(i({}),p(ki).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateJob:E(i({jobId:_()}),i({cancelled:y()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:E(zw,Rw,{kind:`query`,auth:`admin`}),startStorageRebalance:E(zw,Rw,{kind:`mutation`,auth:`admin`})}},Ww=a().min(.25).max(32),Gw=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),Kw=200,qw=i({everyMs:a().int().positive(),ranges:p(Gw).min(1).max(200)}),Jw=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:qw.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:ce.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),Yw=i({speed:Ww.optional(),timelapse:Jw.optional(),includeAudio:y(),maxLifeMs:a().int().positive(),deleteAfterDownload:y(),title:_().max(200).optional(),notifyTargetIds:p(_().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:ce.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),Xw=h([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),Zw=i({id:_(),deviceId:a(),profile:_(),fromMs:a(),toMs:a(),options:Yw,state:Xw,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:y(),downloadedAt:a().nullable(),createdAt:a(),createdBy:_(),error:_().nullable()}),Qw=i({url:_(),endpoints:p(_())}),$w=50*1024*1024,eT=i({base64:_(),contentType:_(),name:_(),bytes:a().int().nonnegative()}),tT={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:E(i({deviceId:a(),profile:_().optional(),profiles:p(_()).min(1).optional(),fromMs:a(),toMs:a(),options:Yw}).superRefine((e,t)=>{(e.profiles!==void 0&&e.profiles.length>0?e.profiles:e.profile===void 0?[]:[e.profile]).length<1&&t.addIssue({code:ce.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})}),Zw,{kind:`mutation`,auth:`protected`}),listExports:E(i({deviceId:a().optional()}),p(Zw),{kind:`query`,auth:`protected`}),getExport:E(i({exportId:_()}),Zw,{kind:`query`,auth:`protected`}),cancelExport:E(i({exportId:_()}),Zw,{kind:`mutation`,auth:`protected`}),deleteExport:E(i({exportId:_()}),Zw,{kind:`mutation`,auth:`protected`}),getDownloadUrl:E(i({exportId:_()}),Qw,{kind:`query`,auth:`protected`}),readExportBytes:E(i({exportId:_()}),eT,{kind:`query`,auth:`protected`})}},nT=_(),rT=[`day`,`ir`,`night`,`dawn`,`dusk`],iT=h([`skip`,`judge-anyway`]),aT=`__diverged__`,oT=h([`matched`,`diverged`,`unknown`]),sT=h([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),cT=i({embedding:p(a()),modelId:_(),condition:nT,capturedAt:a(),thumbnailMediaId:_().optional(),anchorEmbedding:p(a()).optional()}),lT=i({id:_(),label:_(),references:p(cT),textPrompts:p(_()).optional(),referenceCount:a(),currentlyMatched:y()}),uT=x(`mode`,[i({mode:b(`similarity`),threshold:a().min(0).max(1),hysteresisCount:a().int().positive()}),i({mode:b(`llm`),prompt:_(),profileId:_().optional(),hysteresisCount:a().int().positive()})]),dT=60,fT=120,pT=60,mT=.85,hT=`skip`,gT=8e3,_T=448,vT=!0,yT=i({enabled:y().default(!1),prompt:_().min(1).max(1e3),profileId:_().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(gT),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:h([`flip`,`hold`]).default(`hold`)}),bT=i({id:_(),label:_(),roi:K,enabled:y(),triggerMode:h([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:uT,states:p(lT),currentStateId:_().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:nT.nullable(),availability:h([`ok`,`unavailable`]),unavailableReason:_().nullable(),baselineStateId:_().nullable(),emit:h([`latched`,`live`]).default(`latched`),verdict:oT,latched:y(),armedAt:a(),divergedAt:a().nullable(),restoredAt:a().nullable(),quietSeconds:a().int().min(0).max(3600).default(60),minObservationSpacingSec:a().int().min(0).max(3600).default(120),confirm:yT.optional(),anchorThreshold:a().min(0).max(1).default(mT),autoRestore:y().default(!1),onUncoveredCondition:iT.default(hT),suspendedCondition:nT.nullable().default(null),unavailable:sT.nullable(),coveredConditions:p(nT)}),xT=i({monitors:p(bT),lastFetchedAt:a()}),ST={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[O.Camera],methods:{listScenes:E(i({deviceId:a()}),xT),createScene:E(i({deviceId:a(),label:_(),roi:K,check:uT,triggerMode:h([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),bT,{kind:`mutation`,auth:`admin`}),updateScene:E(i({deviceId:a(),monitorId:_(),patch:i({label:_().optional(),roi:K.optional(),enabled:y().optional(),triggerMode:h([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:uT.optional(),emit:h([`latched`,`live`]).optional(),quietSeconds:a().int().min(0).max(3600).optional(),minObservationSpacingSec:a().int().min(0).max(3600).optional(),anchorThreshold:a().min(0).max(1).optional(),autoRestore:y().optional(),onUncoveredCondition:iT.optional(),confirm:yT.nullable().optional()})}),g(),{kind:`mutation`,auth:`admin`}),deleteScene:E(i({deviceId:a(),monitorId:_()}),g(),{kind:`mutation`,auth:`admin`}),captureReference:E(i({deviceId:a(),monitorId:_(),stateId:_().optional(),label:_().optional(),condition:nT.optional()}),i({stateId:_(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:E(i({deviceId:a(),monitorId:_(),stateId:_(),index:a()}),g(),{kind:`mutation`,auth:`admin`}),recheckNow:E(i({deviceId:a(),monitorId:_()}),g(),{kind:`mutation`,auth:`admin`}),resetScene:E(i({deviceId:a(),monitorId:_(),recapture:y().optional()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:xT,kind:`push`},runtimeState:xT,durability:`session`},CT=h([`include`,`exclude`]),wT=i({id:_(),name:_().optional(),zoneIds:p(_()).min(1).readonly(),mode:CT,classFilter:p(_()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:y().optional(),enabled:y().default(!0)}),TT=p(wT).readonly(),ET=i({isRunning:y(),lastRunAt:a(),lastRunSuccess:y().nullable(),lastError:_().nullable(),lastChangedAt:a()}),DT={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Script],methods:{run:E(i({deviceId:a().int().nonnegative(),variables:n(_(),u()).optional()}),g(),{kind:`mutation`,auth:`admin`}),stop:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:ET,kind:`push`},runtimeState:ET,durability:`session`},OT=i({detected:y(),lastChangedAt:a()}),kT={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:OT,kind:`push`},runtimeState:OT,durability:`restored`,volatileStateFields:[`lastChangedAt`]},AT=i({camStreamId:_().min(1),kind:Be,url:_().optional(),codec:_().optional(),resolution:Ve.optional(),fps:a().positive().optional(),label:_().optional(),deviceFeatures:p(_()).optional(),autoEligible:y().optional(),metadata:n(_(),u()).optional()}),jT=i({descriptors:p(AT),lastFetchedAt:a()}),MT={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],methods:{getCatalog:E(i({deviceId:a().int().nonnegative()}),p(AT).readonly())},runtimeState:jT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NT=h([`main`,`sub`,`ext`]),PT=i({width:a(),height:a(),codec:h([`h264`,`h265`]),framerate:a(),bitrate:a(),bitrateMode:h([`vbr`,`cbr`]).optional(),encoderProfile:h([`high`,`main`,`baseline`]).optional(),gop:a().optional(),audio:y().optional()}),FT=i({main:PT.optional(),sub:PT.optional(),ext:PT.optional(),lastFetchedAt:a()}),IT=i({resolutions:p(i({width:a(),height:a()})),codecs:p(h([`h264`,`h265`])),framerates:p(a()),bitrates:p(a()),bitrateRange:s([a(),a()]).optional(),supportsBitrateMode:y(),supportsEncoderProfile:y(),supportsGop:y(),gop:i({min:a(),max:a(),step:a()}).optional()}),LT=i({main:IT.optional(),sub:IT.optional(),ext:IT.optional()}),RT=i({width:a().optional(),height:a().optional(),codec:h([`h264`,`h265`]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:h([`vbr`,`cbr`]).optional(),encoderProfile:h([`high`,`main`,`baseline`]).optional(),gop:a().optional()}),zT={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:E(i({deviceId:a()}),LT),setProfile:E(i({deviceId:a(),profile:NT,patch:RT}),g(),{kind:`mutation`,auth:`admin`}),getConfigSchema:E(i({deviceId:a()}),u().nullable())},status:{schema:FT,kind:`poll`},runtimeState:FT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},BT=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function VT(e,t,n){let r=[];if(t.resolutions.length>0){let i=t.resolutions.map(e=>({value:`${String(e.width)}x${String(e.height)}`,label:`${String(e.width)}×${String(e.height)}`})),a=n?`${String(n.width)}x${String(n.height)}`:void 0;a&&!i.some(e=>e.value===a)&&i.unshift({value:a,label:`${a.replace(`x`,`×`)} (current)`}),r.push({type:`select`,key:`${e.prefix}_resolution`,label:`Resolution`,options:i,default:a??i[0]?.value??``})}if(t.codecs.length>0&&r.push({type:`select`,key:`${e.prefix}_codec`,label:`Codec`,options:t.codecs.map(e=>({value:e,label:e===`h264`?`H.264`:`H.265`})),default:n?.codec??t.codecs[0]}),t.framerates.length>0){let i=t.framerates.map(e=>({value:String(e),label:`${String(e)} fps`})),a=n?.framerate;a!==void 0&&!t.framerates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} fps (current)`}),r.push({type:`select`,key:`${e.prefix}_framerate`,label:`Frame rate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}if(t.bitrates.length>0){let i=t.bitrates.map(e=>({value:String(e),label:`${String(e)} kbps`})),a=n?.bitrate;a!==void 0&&!t.bitrates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} kbps (current)`}),r.push({type:`select`,key:`${e.prefix}_bitrate`,label:`Bitrate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}else{let i=t.bitrateRange;r.push({type:`number`,key:`${e.prefix}_bitrate`,label:`Bitrate`,unit:`kbps`,...i?{min:i[0],max:i[1]}:{},default:n?.bitrate??i?.[0]??0})}if(t.supportsBitrateMode&&r.push({type:`select`,key:`${e.prefix}_bitrateMode`,label:`Bitrate mode`,options:[{value:`vbr`,label:`VBR (variable)`},{value:`cbr`,label:`CBR (constant)`}],default:n?.bitrateMode??`vbr`}),t.supportsEncoderProfile&&r.push({type:`select`,key:`${e.prefix}_encoderProfile`,label:`Encoder profile`,options:[{value:`baseline`,label:`Baseline`},{value:`main`,label:`Main`},{value:`high`,label:`High`}],default:n?.encoderProfile??`main`}),t.supportsGop){let i=t.gop;if(i){let t=[];for(let e=i.min;e<=i.max;e+=i.step)t.push({value:String(e),label:`${String(e)} s`});let a=n?.gop;a!==void 0&&!t.some(e=>e.value===String(a))&&t.unshift({value:String(a),label:`${String(a)} s (current)`}),r.push({type:`select`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,options:t,default:a===void 0?t[0]?.value??``:String(a)})}else r.push({type:`number`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,unit:`s`,min:1,default:n?.gop??1})}return r.length===0?null:{id:`stream-${e.profile}`,tab:`streaming`,title:e.label,description:`Encoder parameters pushed to the camera. Option lists are read live from the camera — fields the firmware doesn't expose are hidden.`,columns:2,fields:r}}function HT(e,t){let n=[];for(let r of BT){let i=e[r.profile];if(!i)continue;let a=VT(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function UT(e,t){let n={},r=!1,i=`${t}_resolution`;if(i in e&&typeof e[i]==`string`){let[t,a]=e[i].split(`x`).map(Number);Number.isFinite(t)&&Number.isFinite(a)&&(n.width=t,n.height=a,r=!0)}let a=`${t}_codec`;a in e&&(e[a]===`h264`||e[a]===`h265`)&&(n.codec=e[a],r=!0);let o=`${t}_framerate`;if(o in e){let t=Number(e[o]);Number.isFinite(t)&&(n.framerate=t,r=!0)}let s=`${t}_bitrate`;if(s in e){let t=Number(e[s]);Number.isFinite(t)&&(n.bitrate=t,r=!0)}let c=`${t}_bitrateMode`;c in e&&(e[c]===`vbr`||e[c]===`cbr`)&&(n.bitrateMode=e[c],r=!0);let l=`${t}_encoderProfile`;l in e&&(e[l]===`high`||e[l]===`main`||e[l]===`baseline`)&&(n.encoderProfile=e[l],r=!0);let u=`${t}_gop`;if(u in e){let t=Number(e[u]);Number.isFinite(t)&&(n.gop=t,r=!0)}return r?n:null}var WT=i({on:y(),lastChangedAt:a()}),GT={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Switch,O.Siren,O.Light],methods:{setState:E(i({deviceId:a(),on:y()}),g(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:y(),lastChangedAt:a()})}},status:{schema:WT,kind:`command-driven`},runtimeState:WT,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},KT=i({streaming:y(),notifications:y(),objectDetection:y(),remoteAccess:y(),agentCluster:y(),smartHome:y(),recordings:y(),backup:y(),repl:y()}),qT=i({status:b(`ok`),uptime:a()}),JT=i({name:_(),address:_(),family:_(),internal:y()}),YT=h([`operator-set`,`derived-from-ip`]),XT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:YT,updatedAt:a(),label:_().optional()}),ZT=i({location:XT.nullable(),derivationAttemptedAt:a().nullable(),derivationError:_().nullable()}),QT=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),$T={name:`system`,scope:`system`,mode:`singleton`,methods:{info:E(g(),KT),health:E(g(),qT),featureFlags:E(g(),KT),networkAddresses:E(g(),p(JT).readonly()),getRetentionConfig:E(g(),u().nullable(),{auth:`admin`}),setRetentionConfig:E(n(_(),u()),se(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:E(g(),g(),{kind:`mutation`,auth:`admin`}),getSiteLocation:E(g(),ZT),setSiteLocation:E(QT,ZT,{kind:`mutation`,auth:`admin`}),detectSiteLocation:E(g(),ZT,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},eE=i({tampered:y(),lastChangedAt:a()}),tE={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:eE,kind:`push`},runtimeState:eE,durability:`restored`,volatileStateFields:[`lastChangedAt`]},nE=i({celsius:a(),lastFetchedAt:a(),unit:_().optional(),precision:a().int().min(0).max(10).optional()}),rE={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor,O.Thermostat],methods:{},status:{schema:nE,kind:`push`},runtimeState:nE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},iE=i({title:_(),message:_(),severity:h([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:_(),url:_()}).optional()}),aE={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:E(g(),iE,{kind:`subscription`})},mount:{kind:`server-provided`}},oE=i({currentVersion:_().nullable(),availableVersion:_().nullable(),updatable:y(),state:_().nullable(),inProgress:y()}),sE={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Update],methods:{installUpdate:E(g(),g(),{kind:`mutation`,auth:`admin`})},status:{schema:oE,kind:`poll`},runtimeState:oE,durability:`session`},cE=i({id:_(),username:_(),isAdmin:y().default(!1),allowedProviders:c([p(_()),b(`*`)]),allowedDevices:n(_(),c([p(_()),b(`*`)])),scopes:p(q).default([]),totpEnabled:y().default(!1),createdAt:a(),updatedAt:a()}),lE=i({username:_(),password:_().min(6),isAdmin:y().default(!1),allowedProviders:c([p(_()),b(`*`)]).optional(),allowedDevices:n(_(),c([p(_()),b(`*`)])).optional(),scopes:p(q).optional()}),uE=i({id:_(),isAdmin:y().optional(),allowedProviders:c([p(_()),b(`*`)]).optional(),allowedDevices:n(_(),c([p(_()),b(`*`)])).optional(),scopes:p(q).optional()}),dE=i({id:_(),label:_(),isAdmin:y().default(!1),allowedProviders:c([p(_()),b(`*`)]).optional(),allowedDevices:n(_(),c([p(_()),b(`*`)])).optional(),tokenPrefix:_(),createdAt:a(),lastUsedAt:a().optional()}),fE=i({label:_(),isAdmin:y().default(!1),allowedProviders:c([p(_()),b(`*`)]).optional(),allowedDevices:n(_(),c([p(_()),b(`*`)])).optional()}),pE=i({token:_(),record:dE}),mE=i({id:_(),userId:_(),name:_(),tokenPrefix:_(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),hE=i({userId:_(),name:_(),scopes:p(q),expiresAt:a().optional()}),gE=i({token:_(),record:mE}),_E=i({id:_(),userId:_(),username:_(),integrationId:_(),scopes:p(q),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),vE=i({secret:_(),otpauthUrl:_()}),yE=i({enabled:y(),confirmedAt:a().nullable()}),bE={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:E(g(),p(cE),{auth:`admin`}),createUser:E(lE,cE,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:E(uE,i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:E(i({id:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:E(i({id:_(),newPassword:_().min(6)}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:E(i({userId:_(),scopes:p(q)}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:E(i({username:_(),password:_()}),cE.extend({passwordHash:_()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:E(g(),p(dE),{auth:`admin`}),createApiKey:E(fE,pE,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:E(i({id:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:E(i({token:_()}),dE.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:E(hE,gE,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:E(i({id:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:E(i({token:_()}),mE.nullable(),{access:`view`}),listScopedTokens:E(i({userId:_()}),p(mE),{auth:`admin`}),setupTotp:E(i({userId:_()}),vE,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:E(i({userId:_(),code:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:E(i({userId:_()}),i({success:b(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:E(i({userId:_()}),yE,{auth:`admin`}),verifyTotp:E(i({userId:_(),code:_()}),i({valid:y()}),{kind:`mutation`,access:`view`}),oauthIssueCode:E(i({integrationId:_(),userId:_(),username:_(),scopes:p(q),redirectUri:_(),hubUrl:_(),codeChallenge:_().optional(),refreshTtlSec:c([a().int().positive(),b(`never`)]).optional()}),i({code:_()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:E(i({code:_(),redirectUri:_(),codeVerifier:_().optional()}),i({accessToken:_(),refreshToken:_(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:E(i({refreshToken:_()}),i({accessToken:_(),refreshToken:_(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:E(i({token:_()}),i({userId:_(),username:_(),scopes:p(q)}).nullable(),{access:`view`}),listOauthSessions:E(g(),p(_E),{auth:`admin`}),revokeOauthSession:E(i({id:_()}),i({success:y()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},xE=h([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),SE=i({level:a().min(0).max(100).nullable(),status:h([`ok`,`low`,`full`]).nullable()}),CE=i({state:xE,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:_().nullable(),availableFanSpeeds:p(_()),cleanWater:SE.nullable(),dirtyWater:SE.nullable(),detergent:SE.nullable(),dustBin:SE.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:_().nullable(),lastChangedAt:a()}),wE={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Vacuum],methods:{start:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),pause:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),stop:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),returnToBase:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),locate:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),setFanSpeed:E(i({deviceId:a().int().nonnegative(),speed:_().min(1)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:CE,kind:`push`},runtimeState:CE,durability:`session`},TE=h([`open`,`opening`,`closing`,`closed`,`stopped`]),EE=i({state:TE,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),DE={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Valve],methods:{open:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),close:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),stop:E(i({deviceId:a().int().nonnegative()}),g(),{kind:`mutation`,auth:`admin`}),setPosition:E(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:EE,kind:`push`},runtimeState:EE,durability:`session`},OE=i({detected:y(),lastChangedAt:a()}),kE={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Sensor],methods:{},status:{schema:OE,kind:`push`},runtimeState:OE,durability:`restored`,volatileStateFields:[`lastChangedAt`]},AE=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:_().nullable(),availableModes:p(_()),away:y().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),jE={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.WaterHeater],methods:{setTargetTemp:E(i({deviceId:a().int().nonnegative(),temp:a().finite()}),g(),{kind:`mutation`,auth:`admin`}),setOperationMode:E(i({deviceId:a().int().nonnegative(),mode:_().min(1)}),g(),{kind:`mutation`,auth:`admin`}),setAway:E(i({deviceId:a().int().nonnegative(),on:y()}),g(),{kind:`mutation`,auth:`admin`})},status:{schema:AE,kind:`push`},runtimeState:AE,durability:`session`},ME=i({condition:_().nullable(),temperature:a().nullable(),temperatureUnit:_().nullable(),humidity:a().min(0).max(100).nullable(),pressure:a().nullable(),pressureUnit:_().nullable(),windSpeed:a().nullable(),windSpeedUnit:_().nullable(),windBearing:a().nullable(),lastFetchedAt:a()}),NE={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[O.Weather],methods:{},status:{schema:ME,kind:`push`},runtimeState:ME,durability:`session`},PE=i({totalObjects:a().int().nonnegative(),byClass:n(_(),a().int().nonnegative())}),FE=PE.extend({zoneId:_(),zoneName:_(),trackIds:p(_()).readonly()}),IE=i({id:_(),className:_(),bbox:i({x:a(),y:a(),w:a(),h:a()}),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),firstSeenAt:a().int(),becameStationaryAt:a().int(),lastConfirmedAt:a().int(),label:_().optional(),keyFrameMediaKey:_().optional()}),LE=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(FE).readonly(),frame:PE,unzoned:PE,stationaryObjects:p(IE).readonly().optional()}),RE=h([`minute`,`5min`,`hour`]),zE=i({from:a().int(),to:a().int(),resolution:RE}),BE=i({ts:a().int(),count:a().int().nonnegative()}),VE={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[O.Camera],methods:{getCurrentSnapshot:E(i({deviceId:a()}),LE.nullable()),getZoneHistory:E(i({deviceId:a(),zoneId:_(),className:_().optional()}).extend(zE.shape),p(BE).readonly()),getCameraHistory:E(i({deviceId:a(),className:_().optional()}).extend(zE.shape),p(BE).readonly()),getUnzonedHistory:E(i({deviceId:a(),className:_().optional()}).extend(zE.shape),p(BE).readonly())},runtimeState:LE,durability:`session`},HE=h([`motion`,`detection`,`package`]),UE={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[O.Camera],methods:{listRules:E(i({deviceId:a(),stage:HE}),p(wT).readonly()),setRules:E(i({deviceId:a(),stage:HE,rules:p(wT).readonly()}),g(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(wT).readonly(),detection:p(wT).readonly(),package:p(wT).readonly()}),durability:`restored`},WE=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],GE=[...WE,`pipeline-orchestrator`,`pipeline-runner`],KE=[{cap:`alarm-panel`,field:`state`},{cap:`cover`,field:`state`},{cap:`presence`,field:`state`},{cap:`lock`,field:`locked`,booleanWords:[`locked`,`unlocked`]},{cap:`contact`,field:`entryOpen`,booleanWords:[`open`,`closed`]},{cap:`switch`,field:`on`,booleanWords:[`on`,`off`]},{cap:`binary`,field:`on`,booleanWords:[`on`,`off`]}];function qE(e){for(let t of KE){let n=e[t.cap];if(typeof n!=`object`||!n)continue;let r=n[t.field];if(typeof r==`string`&&r.length>0)return r;if(typeof r==`boolean`&&t.booleanWords!==void 0)return r?t.booleanWords[0]:t.booleanWords[1]}}function JE(e,t=[]){for(let n of KE){let r=e[n.cap];if(typeof r!=`object`||!r)continue;if(n.booleanWords!==void 0)return[...n.booleanWords];if(n.cap===`alarm-panel`)return[...t];let i=r[n.field];return typeof i==`string`?[i]:[]}return[]}var YE=`camstack/camstack-models`,XE=`https://huggingface.co/${YE}/resolve/main`,ZE={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":`info`,"logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":`sqlite-storage`,"storage.locations":{data:`camstack-data/data`,media:`camstack-data/media`,recordings:`camstack-data/recordings`,cache:`/tmp/camstack-cache`,logs:`camstack-data/logs`,models:`camstack-data/models`},providers:[],"ffmpeg.binaryPath":`ffmpeg`,"ffmpeg.hwAccel":`auto`,"ffmpeg.threadCount":0,"auth.tokenExpiry":`7d`},X={Siren:k.Siren,Floodlight:k.Floodlight,Spotlight:k.Spotlight,PirSensor:k.PirSensor,Chime:k.Chime,Autotrack:k.Autotrack,Nightvision:k.Nightvision,PrivacyMask:k.PrivacyMask},QE={[X.Siren]:`Siren`,[X.Floodlight]:`Floodlight`,[X.Spotlight]:`Spotlight`,[X.PirSensor]:`PIR`,[X.Chime]:`Chime`,[X.Autotrack]:`Autotracking`,[X.Nightvision]:`Night Vision`,[X.PrivacyMask]:`Privacy Mask`};function $E(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var eD=class e{schema;data;persistFn;constructor(e,t,n){this.schema=e,this.data=t,this.persistFn=n}static fromSchema(t,n,r={},i){let a=t.safeParse(r);if(a.success)return new e(t,a.data,n);let o=new Set;for(let e of a.error.issues){let t=e.path[0];typeof t==`string`&&o.add(t)}let s={...r};for(let e of o)delete s[e];let c=t.safeParse(s);return i?.({droppedKeys:[...o],issues:a.error.issues}),c.success?(n(c.data).catch(()=>{}),new e(t,c.data,n)):new e(t,t.parse({}),n)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){let n=this.schema.parse({...this.data,[e]:t});this.data=n,await this.persistFn(this.data)}async setAll(e){let t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){let{[e]:t,...n}=this.data,r=this.schema.parse(n);this.data=r,await this.persistFn(this.data)}entries(){let e=this.schema.shape;return Object.entries(e).map(([e,t])=>({key:e,schema:t,value:this.data[e],description:t.description}))}},tD=class e{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t){this.writer=t,this.slices=new Map;for(let[t,n]of Object.entries(e))n&&typeof n==`object`&&!Array.isArray(n)&&this.slices.set(t,{...n})}static fromInitial(t,n){return new e(t,n)}installCapSchema(e,t){let n=this.schemas.get(e);if(n){if(n!==t)throw Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);let r=this.slices.get(e);if(r){let n=t.safeParse(r);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){let t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,n){let r=this.schemas.get(e);if(!r)throw Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);let i=this.slices.get(e)??{},a=n?{...i,...t}:{...t},o=r.parse(a);if(nD(i,o))return;this.slices.set(e,o),this.fireListeners([e]);let s=this.writer(e,{...o}).catch(()=>{});this.pendingWrites.add(s),s.finally(()=>{this.pendingWrites.delete(s)})}fireListeners(e){let t=this.snapshot();for(let n of this.listeners)try{n(e,t)}catch{}for(let t of e){let e=this.capListeners.get(t);if(!e)continue;let n=this.getCapState(t);for(let t of e)try{t(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let n=this.capListeners.get(e);n||(n=new Set,this.capListeners.set(e,n));let r=e=>{t(e)};return n.add(r),()=>{let t=this.capListeners.get(e);t&&(t.delete(r),t.size===0&&this.capListeners.delete(e))}}snapshot(){let e={};for(let[t,n]of this.slices)e[t]=Object.freeze({...n});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;let e=[...this.pendingWrites];await Promise.allSettled(e)}};function nD(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var rD={airQualitySensor:Gy,alarmPanel:tp,ambientLightSensor:qy,audioMetrics:Qy,automationControl:eb,battery:nb,binary:ib,brightness:ob,cameraStreams:Uc,carbonMonoxide:fb,climateControl:hb,color:bb,connectivity:Db,consumables:Ab,contact:Mb,control:Ib,cover:zb,dayNight:Gb,deviceDiscovery:Ll,deviceStatus:qb,doorbell:Xb,enumSensor:$b,eventEmitter:nx,fanControl:px,featureProbe:hx,flood:_x,gas:yx,humidifier:xx,humiditySensor:Cx,image:Tx,imageSettings:Px,intercom:qx,lawnMowerControl:Zx,lockControl:fS,mediaPlayer:_S,motion:wS,motionTrigger:DS,motionZones:MS,nativeObjectDetection:LS,notifier:uC,numericSensor:fC,petFeeder:MC,powerMeter:nw,presence:aw,pressureSensor:sw,privacyMask:pw,ptzAutotrack:Tw,sceneMonitor:ST,scriptRunner:DT,smoke:kT,streamCatalog:MT,streamParams:zT,switch:GT,tamper:tE,temperatureSensor:rE,update:sE,vacuumControl:wE,valve:DE,vibration:kE,waterHeater:jE,weather:NE,zoneAnalytics:VE,zoneRules:UE,zones:kg},iD=class{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState(`device-status`)?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){let e={},t={get:(t,n)=>{let r=n;if(r in e)return e[r];let i=rD[r];if(!i)return;let a=this.sliceProxy(i);return e[r]=a,a}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;_sourceInfoCache=null;constructor(e,t,n){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=n.type,!e.deviceMeta)throw Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=n.role,this.parentDeviceId=e.parentDeviceId;let r=e.persistedConfig??{};this.config=eD.fromSchema(t,t=>e.persistConfig(t),r,({droppedKeys:t,issues:n})=>{e.logger.warn(`Device config recovery: dropping invalid persisted fields`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...t],firstIssue:n[0]?.message??null}})});let i=null,a=async(t,n)=>{i||=e.fetchDevice(e.id),await(await i).deviceState.setCapSlice({capName:t,slice:n})},o=e.initialRuntimeState??{};this.runtimeState=tD.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(qb,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(hx,{}),this.runtimeState.setCapState(`feature-probe`,{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0})}deviceActions=new Map;registerDeviceAction(e,t,n){this.deviceActions.set(e,{spec:t,handler:n})}async runDeviceAction(e,t){let n=this.deviceActions.get(e);if(!n)throw Error(`unknown device action "${e}" on device ${this.id}`);let r=n.spec.input.parse(t);return n.handler(r)}async removeDevice(){}markOnline(e){if(this.online===e)return;let t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,t)}get sourceInfo(){if(this._sourceInfoCache)return this._sourceInfoCache;let e=Nl(this.ctx.deviceMeta.metadata)??kl({stableId:this.stableId,addonId:this.ctx.deviceMeta.addonId});return this._sourceInfoCache=Object.freeze({...e}),this._sourceInfoCache}get sourceId(){return this.sourceInfo.id}async updateSourceInfo(e){let t=Al(this.sourceInfo,e);this._sourceInfoCache=Object.freeze({...t});let n=this.ctx.api?.deviceManager?.setMetadata;if(n)try{await n.mutate({deviceId:this.id,patch:{[Ml]:t}})}catch{}this.ctx.eventBus.emit(Ee(`device.source-info-changed`,{type:`device`,id:this.stableId},{deviceId:this.id,sourceInfo:t}))}async refreshFeatures(){let e=this.ctx.api?.deviceManager?.registerDevice;if(e)try{await e.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){return new Proxy({},{get:(t,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(t,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(t,n)=>{let r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{let t=this.runtimeState.getCapState(e.name);return t?Object.keys(t):[]},getOwnPropertyDescriptor:(t,n)=>{let r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}})}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}async onProbe(){let e=this.runtimeState.getCapState(`feature-probe`)??{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState(`feature-probe`,{...e,lastProbedAt:Date.now()})}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState(`feature-probe`)?.flags??{}}hasProbed(){return(this.runtimeState.getCapState(`feature-probe`)?.lastProbedAt??0)>0}};function aD(e,t){let n={};for(let t of e.config.entries())n[t.key]=t.value;return{id:e.id,stableId:e.stableId,addonId:t,type:String(e.type),name:e.name,parentDeviceId:e.parentDeviceId,online:e.online,features:[...e.features],config:n,sourceInfo:e.sourceInfo}}var oD=class extends Pe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:fu,provider:this}]}async onShutdown(){let e=await this.ctx.kernel.devices?.getAll()??[];for(let t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(e){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:e instanceof Error?e.message:String(e)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.length}})}async start(){}async stop(){}async getStatus(){return{connected:!0,deviceCount:(await this.ctx.kernel.devices?.getAll()??[]).length}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(e=>({id:e.stableId,name:e.name,type:String(e.type)}))}async supportsDiscovery(){return!1}async discoverDevices(e){return[]}async getDiscoveryParamsSchema(){return null}async getManualCreationType(){return await this.supportsManualCreation()?{deviceType:Object.values(O).find(e=>this.deviceClasses[e]!==void 0)??null}:{deviceType:null}}async adoptDiscoveredDevice(e){throw Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){let t=await this.onCreateDevice(e.type,e.config),n=this.deviceClasses[t.meta.type];if(!n)throw Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);let r=this.generateStableId(t.meta.type,t.config),i=await this.ctx.kernel.devices.create(r,n,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(i)}catch(e){this.ctx.logger.warn(`createDevice: onAfterCreate hook threw — device is already registered`,{tags:{deviceId:i.id,stableId:r},meta:{error:e instanceof Error?e.message:String(e)}})}return this.toSummary(i)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:`ok`,labels:[`probe not implemented`]}}async restoreDevices(e){await this.onRestoreDevices(e),e.length>0&&this.ctx.logger.info(`Restored ${e.length} ${this.providerName} device(s)`)}async onRestoreDevices(e){let t=new Set,n=e.filter(e=>e.parentDeviceId===null),r=async e=>{let n=this.deviceClasses[e.type];if(!n){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:e.stableId},meta:{type:e.type}});return}try{await this.ctx.kernel.devices.create(e.stableId,n,{}),t.add(e.id)}catch(t){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:e.stableId},meta:{type:e.type,error:t instanceof Error?t.message:String(t)}})}};await Promise.all(n.map(e=>r(e)));let i=e.filter(e=>e.parentDeviceId!==null);for(let e of i){let n=this.deviceClasses[e.type];if(n&&e.parentDeviceId!==null&&t.has(e.parentDeviceId))try{await this.ctx.kernel.devices.create(e.stableId,n,{},e.parentDeviceId),t.add(e.id)}catch(t){this.ctx.logger.warn(`Failed to restore hub-adopted child`,{tags:{stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type,error:t instanceof Error?t.message:String(t)}})}}}toSummary(e){return aD(e,this.addonId)}},sD=`fixed`;function cD(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var lD=32,uD=class{ports;constructor(e){let t=e.addonId;if(typeof t!=`string`||t.length===0)throw Error(`DeclaredDevices: addonId must be the declaring addon's id, got ${JSON.stringify(t)}. On an addon context it is \`ctx.id\` — there is no \`ctx.addonId\`.`);this.ports=e}async reconcile(e){if((e.placement??`hub`)===`hub`){let e=cD(this.ports.localNodeId);if(e!==`hub`)return this.ports.logger.info(`declared devices are hub-owned — skipping on this node`,{meta:{nodeId:e,rawNodeId:this.ports.localNodeId??null}}),{integrationId:null,devices:[],removed:[],owned:!1}}let t=e.integrationId??await this.ensureIntegration(e.integrationName),n=await this.readIndex(),r=await this.readLiveByStableId(),i=[];for(let a of e.devices){let e=await this.applyDeclaration(a,t,n,r);e!==null&&i.push(e)}return{integrationId:t,devices:i,removed:await this.sweepWithdrawn(e.devices,t,n),owned:!0}}async ensureIntegration(e){let t=await this.ports.getIntegration(this.ports.addonId);if(t===null){let t=await this.ports.createIntegration({addonId:this.ports.addonId,name:e,info:{[sD]:!0}});return this.ports.logger.info(`declared a fixed integration`,{meta:{integrationId:t.id,name:e}}),t.id}return t.info?.fixed!==!0&&(await this.ports.updateIntegration({id:t.id,info:{[sD]:!0}}),this.ports.logger.info("re-asserted `fixed` on a declared integration",{meta:{integrationId:t.id}})),t.id}async readIndex(){let e=await this.ports.listOwnDevices();return new Map(e.map(e=>[e.stableId,e]))}async readLiveByStableId(){try{let e=await this.ports.devices.getAll();return new Map(e.map(e=>[e.stableId,e]))}catch(e){return this.ports.logger.warn(`could not read live devices — falling back to adopt-by-row`,{meta:{error:e instanceof Error?e.message:String(e)}}),new Map}}async applyDeclaration(e,t,n,r){try{let i=r.get(e.stableId);if(i!==void 0)return{stableId:e.stableId,deviceId:i.id,device:i,created:!1};let a=n.get(e.stableId);if(a===void 0&&(a=(await this.readIndex()).get(e.stableId),a!==void 0&&this.ports.logger.warn(`device index disagreed with itself — adopting instead of re-creating`,{tags:{deviceId:a.id},meta:{stableId:e.stableId,addonId:this.ports.addonId}})),a!==void 0){let n=await this.ports.devices.create(e.stableId,e.DeviceClass,{},null,void 0);return this.ports.logger.info(`declared device adopted`,{tags:{deviceId:n.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:n.id,device:n,created:!1}}let o=await this.ports.devices.create(e.stableId,e.DeviceClass,e.config??{},null,{type:e.type,name:e.name,integrationId:t,...e.role===void 0?{}:{role:e.role}});return this.ports.logger.info(`declared device created`,{tags:{deviceId:o.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:o.id,device:o,created:!0}}catch(t){return this.ports.logger.warn(`a declared device could not be brought up`,{meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}}),null}}async sweepWithdrawn(e,t,n){let r=new Set(e.map(e=>e.stableId)),i=[...n.values()].filter(e=>e.integrationId===t&&!r.has(e.stableId));if(i.length===0)return[];if(i.length>32)return this.ports.logger.warn(`withdrawal sweep exceeded its bound — removing nothing`,{meta:{integrationId:t,candidates:i.length,bound:32}}),[];let a=[];for(let e of i)try{await this.ports.devices.remove(e.id),a.push(e.id),this.ports.logger.info(`declared device removed — its declaration was withdrawn`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,integrationId:t}})}catch(t){this.ports.logger.warn(`a withdrawn declared device could not be removed`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}})}return a}},dD={[O.Cover]:`cover`,[O.Valve]:`valve`,[O.Humidifier]:`humidifier`,[O.WaterHeater]:`water-heater`,[O.Camera]:`dummy`,[O.Hub]:`dummy`,[O.Switch]:`switch`,[O.Siren]:`switch`,[O.Light]:`light`,[O.Fan]:`fan`,[O.Sensor]:`sensor`,[O.Thermostat]:`thermostat`,[O.Climate]:`climate`,[O.Button]:`button`,[O.EventEmitter]:`dummy`,[O.Update]:`update`,[O.Generic]:`dummy`,[O.Notifier]:`dummy`,[O.Script]:`script`,[O.Automation]:`automation`,[O.Lock]:`lock`,[O.MediaPlayer]:`media-player`,[O.AlarmPanel]:`alarm`,[O.Control]:`control`,[O.Presence]:`sensor`,[O.Weather]:`weather`,[O.Vacuum]:`vacuum`,[O.LawnMower]:`lawn-mower`,[O.Container]:`dummy`,[O.Image]:`image`,[O.PetFeeder]:`pet-feeder`},fD=new Set(Object.values(O));function pD(e){return fD.has(e)?dD[e]:null}var mD=`motion-trigger`;function hD(e){return e.includes(mD)}var gD=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function _D(e){let t=new Set(e.features);switch(e.type){case O.Cover:return{kind:`cover`};case O.Valve:return{kind:`valve`};case O.Lock:return{kind:`lock`};case O.AlarmPanel:return{kind:`alarm`};case O.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case O.Switch:case O.Siren:return{kind:`switch`};case O.Sensor:case O.Presence:{let e=gD.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var vD={"temperature-sensor":{capKey:`temperatureSensor`,field:`celsius`,fallbackUnit:`°C`},"humidity-sensor":{capKey:`humiditySensor`,field:`percent`,fallbackUnit:`%`},"ambient-light-sensor":{capKey:`ambientLightSensor`,field:`lux`,fallbackUnit:`lx`},"numeric-sensor":{capKey:`numericSensor`,field:`value`}};function yD(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function bD(e,t){if(!yD(e))return null;let n=e[t];if(!yD(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function xD(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var SD={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:jt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},CD=[SD];function wD(e){for(let t of CD)if(xD(e,t))return t;return null}var TD=360*6e4;function ED(e){let t=e.status;if(!t)return`sleeping`;if(t.sleeping!==!0)return`awake`;let n=t.lastContactAt;if(typeof n!=`number`||n<=0)return`sleeping`;let r=e.unreachableAfterMs??216e5;return e.nowMs-n>r?`unreachable`:`sleeping`}function DD(e){return e===`unreachable`}function OD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function kD(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!OD(r))return;r=r[e]}return r}function AD(e,t,n){let r=t.indexOf(`.`);if(r===-1)return{...e,[t]:n};let i=t.slice(0,r),a=t.slice(r+1),o=e[i],s=OD(o)?o:{};return{...e,[i]:AD(s,a,n)}}var jD=3e4,MD=3,ND=1e4;async function PD(e,t,n){let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${String(t)}ms`)),t)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}}function FD(e){let t=e.intervalMs??3e4,n=e.failuresToOffline??3,r=e.probeTimeoutMs??1e4,i=e.runImmediately??!0,a=!1,o=!1,s=0,c,l=async()=>{if(!a&&!o&&!(e.isEnabled&&!e.isEnabled())){o=!0;try{let t=await PD(Promise.resolve().then(e.probe),r,`reachability probe`);if(a)return;t?(s=0,e.setOnline(!0)):u(`probe resolved unreachable`)}catch(e){if(a)return;u(e instanceof Error?e.message:`probe threw`)}finally{o=!1}}},u=t=>{s+=1,e.logger?.debug(`reachability probe failed`,{reason:t,consecutiveFailures:s,failuresToOffline:n}),s>=n&&e.setOnline(!1)};return c=setInterval(()=>{l()},t),typeof c==`object`&&c&&`unref`in c&&c.unref(),i&&l(),{stop:()=>{a||(a=!0,c!==void 0&&clearInterval(c),c=void 0)}}}var ID=`lastFetchedAt`,LD=6e4,RD=10*6e4;function zD(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[ID];return typeof e==`number`?e:0},p=e=>{u=Date.now()+c,s?.warn(`${n.name}: refresh did not land — serving the last slice and not re-reading the camera for ${String(c)}ms`,{tags:{deviceId:r},meta:{cooldownMs:c,error:e===void 0?null:e instanceof Error?e.message:String(e)}})},ee=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},m=e=>{let t=d;if(t!==null)return t;let n=ee(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},te=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){m(r);return}await m(r);return}await ee(r)}},ne=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[ID]:r,...i}=e;return i};return{ensureFresh:te,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await te(),ne()}}}function BD(e){let t=e;for(;t instanceof de||t instanceof pe||t instanceof ee;)t=t.unwrap();return t}function VD(e){let t=BD(e);return t instanceof le?{kind:`enum`,enumValues:t.options}:t instanceof te?{kind:`number`}:t instanceof ne?{kind:`string`}:t instanceof ie?{kind:`boolean`}:null}function HD(e,t=``){let n=BD(e);if(!(n instanceof oe))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=BD(n);if(a instanceof oe){r.push(...HD(a,i));continue}let o=VD(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function UD(e){return HD(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var WD=`device.state-changed`,GD=`capability.binding-changed`,KD=`device.registered`,qD=`device.unregistered`,JD=`device.updated`,YD=class{api;stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=Ht(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{let t=(t,n)=>Number.isFinite(e)?new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`SystemMirror.init: '${n}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}):t,[n,r,i]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),`deviceManager.getAllBindings`),t(this.api.deviceState.getAllSnapshots.query({}),`deviceState.getAllSnapshots`),t(this.api.deviceManager.listAll.query({}),`deviceManager.listAll`)]);for(let e of n)this.bindings.set(e.deviceId,e);for(let[e,t]of Object.entries(r)){let n=Number(e);if(!Number.isFinite(n))continue;let r=new Map;for(let[e,n]of Object.entries(t))r.set(e,n);this.stateMirror.set(n,r)}for(let e of i)this.devices.set(e.id,e);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(let e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){let t=this.bindings.get(e);return t?Wt(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(let t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(let t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){let e=[];for(let t of this.bindings.keys()){let n=this.getDeviceById(t);n&&e.push(n)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){let t=[];for(let[n,r]of this.bindings){let i=this.devices.get(n);if(e.id!==void 0&&!XD(n,e.id)||e.stableId!==void 0&&(!i||!XD(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!XD(i.addonId,e.addonId))||e.type!==void 0&&(!i||!XD(i.type,e.type)))continue;if(e.caps!==void 0){let t=ZD(e.caps),n=new Set(r.entries.map(e=>e.capName));if(!t.every(e=>n.has(e)))continue}if(e.anyCap!==void 0){let t=ZD(e.anyCap),n=new Set(r.entries.map(e=>e.capName));if(!t.some(e=>n.has(e)))continue}if(e.name!==void 0&&(!i||!QD(i.name,e.name))||e.online!==void 0&&(!i||i.online!==e.online))continue;if(e.parentDeviceId!==void 0){if(!i)continue;let t=e.parentDeviceId;if((i.parentDeviceId??null)!==t)continue}if(e.feature!==void 0&&(!i||!ZD(e.feature).every(e=>i.features.includes(e)))||e.isCamera!==void 0&&(!i||i.isCamera!==e.isCamera))continue;let a=this.getDeviceById(n);if(a){if(e.where&&i){if(!e.where(i,a))continue}else if(e.where&&!i)continue;t.push(a)}}return t}whereState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);if(!a||!t(a,r))continue;let o=this.getDeviceById(r);o&&n.push(o)}return n}mapState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);a&&n.push(t(a,r))}return n}findState(e,t){for(let[n,r]of this.stateMirror){let i=r.get(e);if(i&&t(i,n))return this.getDeviceById(n)}return null}countByCap(e){let t=0;for(let n of this.bindings.values())n.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let n=0;for(let[r,i]of this.stateMirror){let a=i.get(e);a&&t(a,r)&&n++}return n}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let n=this.capListeners.get(e);return n||(n=new Set,this.capListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.capListeners.delete(e)}}listenDevice(e,t){let n=this.deviceListeners.get(e);return n||(n=new Set,this.deviceListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,n,r=3e4){return new Promise((i,a)=>{let o=(()=>{let r=this.stateMirror.get(e)?.get(t);return r&&n(r)?r:null})();if(o){i(o);return}let s=null,c=this.listenDevice(e,(e,r,a)=>{r===t&&a&&n(a)&&(s&&clearTimeout(s),c(),i(a))});Number.isFinite(r)&&(s=setTimeout(()=>{c(),a(Error(`waitForState timed out after ${r}ms (deviceId=${e}, capName=${t})`))},r))})}waitForDevice(e,t=3e4){return new Promise((n,r)=>{let i=this.getDeviceById(e);if(i){n(i);return}let a=null,o=this.onDeviceAdded(t=>{if(t!==e)return;let r=this.getDeviceById(t);r&&(a&&clearTimeout(a),o(),n(r))});Number.isFinite(t)&&(a=setTimeout(()=>{o(),r(Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(let n of this.filterByCap(e))await t(n)}async invokeCap(e,t,n,r={}){let i=this.filterByCap(e),a=Math.max(1,r.parallelism??i.length),o=[];for(let r=0;r<i.length;r+=a){let s=i.slice(r,r+a),c=await Promise.allSettled(s.map(async r=>{let i=r[e];if(!i||typeof i[t]!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await i[t](n)}));for(let e=0;e<c.length;e++){let t=s[e],n=c[e];n.status===`fulfilled`?o.push({deviceId:t.deviceId,ok:!0,result:n.value}):o.push({deviceId:t.deviceId,ok:!1,error:n.reason})}}return o}summary(){let e={},t={},n={},r=0,i=0;for(let t of this.bindings.values())for(let n of t.entries)e[n.capName]=(e[n.capName]??0)+1;for(let e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,n[e.type]=(n[e.type]??0)+1,e.online?r++:i++;return{totalDevices:this.bindings.size,online:r,offline:i,byCap:e,byAddon:t,byType:n,statedDevices:this.stateMirror.size}}dump(e){let t=e=>{let t=this.devices.get(e)??null,n=this.bindings.get(e)??null,r={},i=this.stateMirror.get(e);if(i)for(let[e,t]of i)r[e]={...t};return{deviceId:e,info:t,binding:n?{...n,entries:n.entries.map(e=>({...e}))}:null,state:r}};if(e!==void 0)return t(e);let n=[];for(let e of this.bindings.keys())n.push(t(e));return n}getRawMirror(){return this.stateMirror}getSystemState(){let e=new Map;for(let[t,n]of this.stateMirror){let r=new Map;for(let[e,t]of n)r.set(e,{...t});e.set(t,r)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;let e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:WD},{onData:e=>{let t=e.data;!t||typeof t.deviceId!=`number`||typeof t.capName!=`string`||this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:GD},{onData:e=>{let t=e.data,n=typeof t?.deviceId==`number`?t.deviceId:t?.source?.type===`device`&&typeof t.source.id==`number`?t.source.id:null;n!==null&&this.refreshBinding(n)}})),this.bridges.push(e.subscribe({category:KD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:qD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:JD},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`updated`)}}))}applyStateUpdate(e,t,n){let r=this.stateMirror.get(e);r||(r=new Map,this.stateMirror.set(e,r)),n===void 0?r.delete(t):r.set(t,n);let i=`${e}:${t}`,a=this.handleListeners.get(i);if(a)for(let e of a)try{e(n)}catch{}for(let r of this.globalStateListeners)try{r(e,t,n)}catch{}let o=this.capListeners.get(t);if(o)for(let t of o)try{t(e,n)}catch{}let s=this.deviceListeners.get(e);if(s)for(let r of s)try{r(e,t,n)}catch{}}applyDeviceRemoval(e){let t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(let n of this.removedListeners)try{n(e,t)}catch{}}async refreshBinding(e){try{let t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0){this.bindings.set(e,t);return}if(await this.api.deviceManager.getDevice.query({deviceId:e})===null){this.applyDeviceRemoval(e);return}this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{let n=await this.api.deviceManager.getDevice.query({deviceId:e});if(!n)return;let r=!this.devices.has(e);if(this.devices.set(e,n),t===`added`&&r){await this.refreshBinding(e);for(let t of this.addedListeners)try{t(e,n)}catch{}}}catch{}}};function XD(e,t){return Array.isArray(t)?t.includes(e):e===t}function ZD(e){return Array.isArray(e)?e:[e]}function QD(e,t){return typeof t==`string`?e===t:t instanceof RegExp?t.test(e):`exact`in t?e===t.exact:`contains`in t?e.toLowerCase().includes(t.contains.toLowerCase()):!1}function $D(e){return e.def}function eO(e){return e}function tO(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>nO(e.key,e.schema,e.description))}]}}function nO(e,t,n){let r=sO(t),i=cO(t),a={key:e,label:n??lO(e),description:n,default:i};return r instanceof ne?rO(e,a):r instanceof te?iO(r,a):r instanceof ie?{...a,type:`boolean`}:r instanceof le?oO(r,a):r instanceof ue||r instanceof oe?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function rO(e,t){let n=e.toLowerCase();return n.includes(`password`)||n.includes(`secret`)||n.includes(`token`)||n.includes(`apikey`)||n.includes(`api_key`)?{...t,type:`password`,showToggle:!0}:{...t,type:`text`}}function iO(e,t){let n=eO(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=aO(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function aO(e){let t=$D(e).checks??[];for(let e of t)if(e._zod?.def?.check===`multiple_of`&&e._zod.def.value!==void 0)return e._zod.def.value}function oO(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:lO(e),value:e}))}}function sO(e){return e instanceof ee||e instanceof pe||e instanceof de?sO($D(e).innerType):e}function cO(e){if(e instanceof ee)return $D(e).defaultValue}function lO(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var uO=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.automation-control.battery.binary.brightness.broker.camera-credentials.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.notifier.numeric-sensor.osd.pet-feeder.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),dO={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,airQualitySensor:`air-quality-sensor`,alarmPanel:`alarm-panel`,alerts:`alerts`,ambientLightSensor:`ambient-light-sensor`,audioAnalysis:`audio-analysis`,audioAnalyzer:`audio-analyzer`,audioCodec:`audio-codec`,audioMetrics:`audio-metrics`,authProvider:`auth-provider`,automationControl:`automation-control`,backup:`backup`,battery:`battery`,binary:`binary`,brightness:`brightness`,broker:`broker`,button:`button`,cameraCredentials:`camera-credentials`,cameraPipelineConfig:`camera-pipeline-config`,cameraStreams:`camera-streams`,carbonMonoxide:`carbon-monoxide`,climateControl:`climate-control`,color:`color`,connectionTest:`connection-test`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,coreBlocks:`core-blocks`,cover:`cover`,customModelRegistry:`custom-model-registry`,dataStoreProvider:`data-store-provider`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,deviceDiscovery:`device-discovery`,deviceExport:`device-export`,deviceManager:`device-manager`,deviceOps:`device-ops`,deviceProvider:`device-provider`,deviceState:`device-state`,deviceStatus:`device-status`,doorbell:`doorbell`,embeddingEncoder:`embedding-encoder`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,llm:`llm`,llmRuntime:`llm-runtime`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,networkAccess:`network-access`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,osdManager:`osd-manager`,petFeeder:`pet-feeder`,pipelineAnalytics:`pipeline-analytics`,pipelineExecutor:`pipeline-executor`,pipelineOrchestrator:`pipeline-orchestrator`,pipelineRunner:`pipeline-runner`,plateGallery:`plate-gallery`,platformProbe:`platform-probe`,powerMeter:`power-meter`,presence:`presence`,pressureSensor:`pressure-sensor`,privacyMask:`privacy-mask`,ptz:`ptz`,ptzAutotrack:`ptz-autotrack`,reboot:`reboot`,recording:`recording`,recordingExport:`recording-export`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageMigration:`storage-migration`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,terminalSession:`terminal-session`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vectorStore:`vector-store`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},fO=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`airQualitySensor`,name:`air-quality-sensor`},{key:`alarmPanel`,name:`alarm-panel`},{key:`alerts`,name:`alerts`},{key:`ambientLightSensor`,name:`ambient-light-sensor`},{key:`audioAnalysis`,name:`audio-analysis`},{key:`audioAnalyzer`,name:`audio-analyzer`},{key:`audioCodec`,name:`audio-codec`},{key:`audioMetrics`,name:`audio-metrics`},{key:`authProvider`,name:`auth-provider`},{key:`automationControl`,name:`automation-control`},{key:`backup`,name:`backup`},{key:`battery`,name:`battery`},{key:`binary`,name:`binary`},{key:`brightness`,name:`brightness`},{key:`broker`,name:`broker`},{key:`button`,name:`button`},{key:`cameraCredentials`,name:`camera-credentials`},{key:`cameraPipelineConfig`,name:`camera-pipeline-config`},{key:`cameraStreams`,name:`camera-streams`},{key:`carbonMonoxide`,name:`carbon-monoxide`},{key:`climateControl`,name:`climate-control`},{key:`color`,name:`color`},{key:`connectionTest`,name:`connection-test`},{key:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`coreBlocks`,name:`core-blocks`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dataStoreProvider`,name:`data-store-provider`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{key:`deviceDiscovery`,name:`device-discovery`},{key:`deviceExport`,name:`device-export`},{key:`deviceManager`,name:`device-manager`},{key:`deviceOps`,name:`device-ops`},{key:`deviceProvider`,name:`device-provider`},{key:`deviceState`,name:`device-state`},{key:`deviceStatus`,name:`device-status`},{key:`doorbell`,name:`doorbell`},{key:`embeddingEncoder`,name:`embedding-encoder`},{key:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`llm`,name:`llm`},{key:`llmRuntime`,name:`llm-runtime`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`networkAccess`,name:`network-access`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notificationRules`,name:`notification-rules`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{key:`osdManager`,name:`osd-manager`},{key:`petFeeder`,name:`pet-feeder`},{key:`pipelineAnalytics`,name:`pipeline-analytics`},{key:`pipelineExecutor`,name:`pipeline-executor`},{key:`pipelineOrchestrator`,name:`pipeline-orchestrator`},{key:`pipelineRunner`,name:`pipeline-runner`},{key:`plateGallery`,name:`plate-gallery`},{key:`platformProbe`,name:`platform-probe`},{key:`powerMeter`,name:`power-meter`},{key:`presence`,name:`presence`},{key:`pressureSensor`,name:`pressure-sensor`},{key:`privacyMask`,name:`privacy-mask`},{key:`ptz`,name:`ptz`},{key:`ptzAutotrack`,name:`ptz-autotrack`},{key:`reboot`,name:`reboot`},{key:`recording`,name:`recording`},{key:`recordingExport`,name:`recording-export`},{key:`sceneMonitor`,name:`scene-monitor`},{key:`scriptRunner`,name:`script-runner`},{key:`serverManagement`,name:`server-management`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageMigration`,name:`storage-migration`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{key:`terminalSession`,name:`terminal-session`},{key:`toast`,name:`toast`},{key:`turnProvider`,name:`turn-provider`},{key:`update`,name:`update`},{key:`userManagement`,name:`user-management`},{key:`userPasskeys`,name:`user-passkeys`},{key:`vacuumControl`,name:`vacuum-control`},{key:`valve`,name:`valve`},{key:`vectorStore`,name:`vector-store`},{key:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`viewerUi`,name:`viewer-ui`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],pO=[dy,Ko,Jo,Qo,is,ds,ls,Uy,At,Gy,tp,gs,qy,_s,ks,Ls,Qy,zs,eb,qs,nb,ib,ob,mc,sb,ub,hc,Uc,fb,hb,bb,Tb,Db,Ab,Mb,Ib,ll,zb,ml,Sl,Gb,El,Dl,Xl,Ll,au,Ou,zt,fu,ku,qb,Xb,Mu,$b,nx,ix,ux,px,hx,Fu,_x,yx,xx,Cx,Tx,Px,Ux,qx,Zx,fd,$u,lS,fS,hd,xd,_S,xS,Bd,Hd,Gd,wS,Jd,DS,MS,sf,LS,df,VS,rC,Df,mm,uC,fC,Em,vC,EC,MC,Gh,Sg,F_,Qg,RC,ew,nw,aw,sw,pw,bw,Tw,Ew,Uw,tT,ST,DT,Z_,bl,kT,nv,av,sv,lv,fv,pv,Tv,Rc,MT,zT,GT,$T,tE,rE,Mv,aE,Pv,sE,bE,Iv,wE,DE,ey,kE,ay,Ft,jE,NE,ly,VE,UE,kg],mO=Object.freeze({"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`},"addonPages.listPages":{capName:`addon-pages`,capScope:`system`,addonId:null,access:`view`},"addonPagesSource.listPages":{capName:`addon-pages-source`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.getRoutes":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.invoke":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`create`},"addons.applyAutoUpdateToAll":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.cancelJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.custom":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.forceRefresh":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.getAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getJob":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLastRestart":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getVersions":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.installFromWorkspace":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.installPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.isWorkspaceAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.list":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listCapabilityProviders":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listFrameworkPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listJobs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listUpdates":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listWorkspacePackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.onAddonLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.reloadPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartAddon":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartServer":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.retryLoad":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.rollbackPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.searchAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.setAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setCapabilityProviderEnabled":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alerts.dismiss":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.emit":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.getUnreadCount":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.list":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.markAllRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.markRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.update":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"audioAnalysis.resolveDeviceSettings":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`},"audioAnalyzer.analyseChunk":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.classify":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`},"audioAnalyzer.dispose":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.isReady":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`},"audioAnalyzer.reprobeAudioEngine":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioCodec.canHandle":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.closeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.createDecodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.createEncodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.flushEncode":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.listActiveSessions":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.listSupportedCodecs":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pullEncoded":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pullPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pushEncodedFrame":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.pushPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioMetrics.getCurrentSnapshot":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`},"audioMetrics.getHistory":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`},"authProvider.getLoginUrl":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`},"authProvider.handleCallback":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`},"authProvider.validateCredentials":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`},"authProvider.validateToken":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.deleteSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listSchedules":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"button.press":{capName:`button`,capScope:`device`,addonId:null,access:`create`},"cameraCredentials.getCredentials":{capName:`camera-credentials`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getBrokerStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getCameraStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`},"decoder.createSession":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.destroySession":{capName:`decoder`,capScope:`system`,addonId:null,access:`delete`},"decoder.getFrame":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.getInfo":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.getShmStats":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.getStats":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.listActiveSessions":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.openStream":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.pullFrames":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.pullHandles":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.pushPacket":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.reprobeHwaccel":{capName:`decoder`,capScope:`system`,addonId:null,access:`create`},"decoder.supportsCodec":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.updateConfig":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceDiscovery.adoptDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.listDiscovered":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`view`},"deviceDiscovery.refreshDiscovery":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.releaseDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceExport.exposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`},"deviceExport.getStatus":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.listExposedDevices":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.listSupportedDeviceKinds":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.unexposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`},"deviceManager.addLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getSettingsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamSources":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getWireableFields":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listAll":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listBindableCapsForDeviceType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listLocations":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listPersistedByAddon":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listWrappersForCap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadRuntimeState":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.persistConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.probeStreams":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeByIntegration":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.getAllSnapshots":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getSnapshot":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.setCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"embeddingEncoder.encode":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.encodeText":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.getInfo":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"events.getEventClipUrl":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEvents":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"events.getEventThumbnail":{capName:`events`,capScope:`device`,addonId:null,access:`view`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.dumpHeapSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.killProcess":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.isDetected":{capName:`motion`,capScope:`device`,addonId:null,access:`view`},"motionDetection.analyze":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`},"motionDetection.removeCamera":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionDetection.reset":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionTrigger.setMotionTrigger":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`create`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.setZone":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`create`},"mqttBroker.addBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.getBrokerConfig":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.getStatus":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.listBrokers":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.removeBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`delete`},"mqttBroker.startEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.stopEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.testConnection":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkQuality.getAllStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.getDeviceStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.reportClientStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`create`},"nodes.clusterAddonStatus":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.deployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.executeQuery":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.getNodeAddons":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.renameNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartProcess":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.setProcessLogLevel":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.shutdownNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.topology":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.undeployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"notifier.send":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"oauthIntegration.getDescriptor":{capName:`oauth-integration`,capScope:`system`,addonId:null,access:`view`},"osd.setOverlay":{capName:`osd`,capScope:`device`,addonId:null,access:`create`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getStorageMigrationMoveStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listTemplates":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.saveTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.updateTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.assignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.assignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.deleteTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.getAgentLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioNodeLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStepOverrides":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getReconcileFromDiskStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listTemplates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentReachableHost":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepOverride":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepToggle":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.updateTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.attachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.detachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.getAllCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalCameras":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalLoad":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.unassignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"ptz.continuousMove":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.deletePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`delete`},"ptz.getOptions":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getPosition":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getPresets":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.goHome":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.goToPreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.move":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.savePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.setAutofocus":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.stop":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptzAutotrack.getSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`},"ptzAutotrack.getStatus":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`},"ptzAutotrack.setEnabled":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`},"ptzAutotrack.setSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`},"reboot.reboot":{capName:`reboot`,capScope:`device`,addonId:null,access:`create`},"recording.cancelRelocateJob":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.cancelStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.deleteFootprint":{capName:`recording`,capScope:`system`,addonId:null,access:`delete`},"recording.getAvailability":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlaybackManifest":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageMigrationMoveStatus":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listOpsLog":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listRelocateJobs":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pauseForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.planStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readGopBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.refreshStorageLocationsForMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.relocateFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderClip":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderGif":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.resumeForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.updateWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.getStatus":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"smtpProvider.sendEmail":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.verify":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"snapshot.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"ssoBridge.signBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"ssoBridge.verifyBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"storage.abortUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.delete":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.deleteLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.endDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.exists":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.finalizeUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.getAvailableSpace":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.getDefaultLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.list":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocationDeclarations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listProviders":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.read":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.readChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.resolve":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testConfig":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.upsertLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.write":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.writeChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.pullFrameHandles":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.renderPreBufferClip":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeFrames":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unassignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unsubscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unsubscribeFrames":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.updateInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.writeInput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`},"userManagement.confirmTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.deleteUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.disableTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.getTotpStatus":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listApiKeys":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listOauthSessions":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listScopedTokens":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listUsers":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthExchangeCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthIssueCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.oauthRefresh":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthVerifyAccessToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.resetPassword":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.revokeApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.revokeOauthSession":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.revokeScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.setupTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.setUserScopes":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.updateUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.validateApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.validateCredentials":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.validateScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.verifyTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.handleAnswer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.handleOffer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.hasAdaptiveBitrate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.listStreams":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCameraHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshot":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getUnzonedHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getZoneHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneRules.listRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`view`},"zoneRules.setRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`create`},"zones.addZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`},"zones.listZones":{capName:`zones`,capScope:`device`,addonId:null,access:`view`},"zones.removeZone":{capName:`zones`,capScope:`device`,addonId:null,access:`delete`},"zones.updateZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`}}),hO=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alarm-panel.alerts.audio-analysis.audio-analyzer.audio-codec.audio-metrics.auth-provider.automation-control.backup.battery.brightness.broker.button.camera-credentials.camera-streams.climate-control.color.connection-test.consumables.control.core-blocks.cover.custom-model-registry.data-store-provider.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.local-network.lock-control.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.network-access.network-quality.nodes.notification-output.notification-rules.notifier.oauth-integration.osd.osd-manager.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-export.scene-monitor.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-migration.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.terminal-session.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.vector-store.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),gO=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.day-night.device-discovery.device-ops.events.fan-control.humidifier.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.osd.pet-feeder.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.scene-monitor.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),_O=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.connection-test.core-blocks.custom-model-registry.data-store-provider.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.llm.llm-runtime.local-network.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.notification-rules.oauth-integration.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.recording-export.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-migration.storage-provider.stream-broker.system.terminal-session.toast.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`),vO=Object.freeze({"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.getDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.updateDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.arm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.disarm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.resolveDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.classify":[{name:`deviceId`,form:`single`,optional:!0}],"audioMetrics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getHistory":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.disable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.enable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"battery.wakeForStream":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.setBrightness":[{name:`deviceId`,form:`single`,optional:!1}],"button.press":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getCredentials":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getBrokerStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getCameraStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getProfileRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.pickStream":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setFanMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingHorizontal":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingVertical":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTarget":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetRange":[{name:`deviceId`,form:`single`,optional:!1}],"color.setColor":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.reset":[{name:`deviceId`,form:`single`,optional:!1}],"control.setValue":[{name:`deviceId`,form:`single`,optional:!1}],"cover.close":[{name:`deviceId`,form:`single`,optional:!1}],"cover.open":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setTiltPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.stop":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"decoder.createSession":[{name:`deviceId`,form:`single`,optional:!0}],"deviceAdoption.release":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceAdoption.resync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceDiscovery.adoptDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.listDiscovered":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.refreshDiscovery":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.releaseDevice":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.adoptionRelease":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.adoptionResync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.applyInitialMeta":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.disable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.enable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindings":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceLiveInfoAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceSettingsAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregateBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getLinkedDevices":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWireableFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadMeta":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadRuntimeState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.persistConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.probeStreams":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.registerDevice":[{name:`parentDeviceId`,form:`single`,optional:!0}],"deviceManager.remove":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.runDeviceAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setChildLayout":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisplay":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setIntegrationId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setLinkDeviceId":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.setLocation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setMetadata":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setName":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setPrimaryChildEntityId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setRole":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setType":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setWrapperActive":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.testField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceFieldsBatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getConfigEntries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getRawState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.setConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.setCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventClipUrl":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEvents":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventThumbnail":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.getFaceByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.listRecentFaces":[{name:`deviceId`,form:`single`,optional:!0}],"fanControl.setDirection":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setOscillating":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPercentage":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setOn":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.endTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.pushTalkAudio":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.stopSession":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.dock":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.startMowing":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.lock":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.open":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.unlock":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.next":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.pause":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.play":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.playMedia":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.previous":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.seek":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.selectSource":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setMute":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setRepeat":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setShuffle":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.stop":[{name:`deviceId`,form:`single`,optional:!1}],"motion.isDetected":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.analyze":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.removeCamera":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.setMotionTrigger":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.setZone":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.getDeviceStats":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.reportClientStats":[{name:`deviceId`,form:`single`,optional:!1}],"notificationRules.setDeviceMuted":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.cancel":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.send":[{name:`deviceId`,form:`single`,optional:!1}],"osd.setOverlay":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.clearSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.copyDeviceConfiguration":[{name:`sourceDeviceId`,form:`single`,optional:!1},{name:`targetDeviceId`,form:`single`,optional:!1}],"osdManager.getDeviceOsd":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.getSourceCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.previewSlot":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.renderDevice":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.setSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.callPet":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.cancelFeed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.feed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.markFoodReplenished":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.resetDesiccant":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setFeedSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setIndicatorLight":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.completeRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteDeviceEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deselectRetrainFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getActiveTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getAudioEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getKeyEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getMotionEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getObjectEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getRetrainExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getSensorEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrainingExportSummary":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getTrainingExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listEventKinds":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listEventKindsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listRecentTracks":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listRetrainStaging":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneEventsBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneTracksBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.rebuildObjectEmbeddings":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.reconcileFromDisk":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.restageRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.saveRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.searchObjectEvents":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.selectRetrainFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackFlags":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.wipeAllAnalytics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineExecutor.runPipeline":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineExecutor.runPipelineBatch":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineOrchestrator.assignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getAudioAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatuses":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineOrchestrator.getCameraStepOverrides":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSwitches":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.resolvePipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraPipelineForAgent":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepOverride":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepToggle":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSwitch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.attachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.detachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.reportMotion":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runDetailSubtree":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runStatelessStep":[{name:`sourceDeviceId`,form:`single`,optional:!1}],"plateGallery.getPlateByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"plateGallery.listPlates":[{name:`deviceId`,form:`single`,optional:!0}],"privacyMask.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setAudioEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setMask":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.continuousMove":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.deletePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPosition":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPresets":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goHome":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goToPreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.move":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.savePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setAutofocus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.stop":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getSettings":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"reboot.reboot":[{name:`deviceId`,form:`single`,optional:!1}],"recording.deleteFootprint":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailability":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDaysWithRecordings":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlaybackManifest":[{name:`deviceId`,form:`single`,optional:!1}],"recording.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"recording.locateSegment":[{name:`deviceId`,form:`single`,optional:!1}],"recording.pruneFootage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readGopBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readSegmentBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.relocateFootage":[{name:`deviceId`,form:`single`,optional:!0}],"recording.renderClip":[{name:`deviceId`,form:`single`,optional:!1}],"recording.renderGif":[{name:`deviceId`,form:`single`,optional:!1}],"recording.rescanStorage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.startStorageMigrationMove":[{name:`deviceId`,form:`single`,optional:!0}],"recordingExport.createExport":[{name:`deviceId`,form:`single`,optional:!1}],"recordingExport.listExports":[{name:`deviceId`,form:`single`,optional:!0}],"sceneMonitor.captureReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.createScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenes":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.recheckNow":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.resetScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.updateScene":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.run":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.stop":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDebugState":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshotLinks":[{name:`targets`,form:`object-array`,optional:!1,itemField:`deviceId`}],"snapshot.getSnapshotOverview":[{name:`deviceIds`,form:`array`,optional:!1}],"snapshot.invalidateCache":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.acquireEgressTranscode":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.assignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getStreamWithCodec":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.produceEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.publishCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.renderPreBufferClip":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.restartProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.retractCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.setDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.unassignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamCatalog.getCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.setProfile":[{name:`deviceId`,form:`single`,optional:!1}],"switch.setState":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.locate":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.returnToBase":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.setFanSpeed":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.start":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.stop":[{name:`deviceId`,form:`single`,optional:!1}],"valve.close":[{name:`deviceId`,form:`single`,optional:!1}],"valve.open":[{name:`deviceId`,form:`single`,optional:!1}],"valve.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"valve.stop":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getClipPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listClips":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setAway":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setOperationMode":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setTargetTemp":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.addIceCandidate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.closeSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.createSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getIceCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionState":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleOffer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.hasAdaptiveBitrate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.listStreams":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCameraHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getUnzonedHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getZoneHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.listRules":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.setRules":[{name:`deviceId`,form:`single`,optional:!1}],"zones.addZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.listZones":[{name:`deviceId`,form:`single`,optional:!1}],"zones.removeZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.updateZone":[{name:`deviceId`,form:`single`,optional:!1}]}),yO=`addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.classify,decoder.createSession,deviceAdoption.release,deviceAdoption.resync,deviceManager.adoptionRelease,deviceManager.adoptionResync,deviceManager.applyInitialMeta,deviceManager.disable,deviceManager.enable,deviceManager.getBindings,deviceManager.getChildren,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.loadConfig,deviceManager.loadMeta,deviceManager.loadRuntimeState,deviceManager.persistConfig,deviceManager.probeStreams,deviceManager.registerDevice,deviceManager.remove,deviceManager.removeDevice,deviceManager.runDeviceAction,deviceManager.setChildLayout,deviceManager.setDisabled,deviceManager.setDisplay,deviceManager.setIntegrationId,deviceManager.setLinkDeviceId,deviceManager.setLocation,deviceManager.setMetadata,deviceManager.setName,deviceManager.setPrimaryChildEntityId,deviceManager.setRole,deviceManager.setStreamProfileMap,deviceManager.setType,deviceManager.setWrapperActive,deviceManager.testField,deviceManager.updateConfig,deviceManager.updateDeviceField,deviceManager.updateDeviceFieldsBatch,deviceState.getCapSlice,deviceState.getSnapshot,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraStepOverrides,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraPipelineForAgent,pipelineOrchestrator.setCameraStepOverride,pipelineOrchestrator.setCameraStepToggle,pipelineOrchestrator.setCameraSwitch,pipelineOrchestrator.setPipelineDevicePin,pipelineOrchestrator.unassignAudio,pipelineOrchestrator.unassignPipeline,pipelineRunner.attachCamera,pipelineRunner.detachCamera,pipelineRunner.getCameraMetrics,pipelineRunner.reportMotion,pipelineRunner.runDetailSubtree,pipelineRunner.runStatelessStep,plateGallery.getPlateByTrack,plateGallery.listPlates,recording.deleteFootprint,recording.getAvailability,recording.getDaysWithRecordings,recording.getDeviceConfig,recording.getPlaybackManifest,recording.listOpsLog,recording.locateSegment,recording.pruneFootage,recording.readGopBytes,recording.readSegmentBytes,recording.relocateFootage,recording.renderClip,recording.renderGif,recording.rescanStorage,recording.setDeviceConfig,recording.startStorageMigrationMove,recordingExport.createExport,recordingExport.listExports,streamBroker.acquireEgressTranscode,streamBroker.assignProfile,streamBroker.getDeviceAudioMute,streamBroker.getStreamWithCodec,streamBroker.produceEventMedia,streamBroker.publishCameraStream,streamBroker.renderPreBufferClip,streamBroker.restartProfile,streamBroker.retractCameraStream,streamBroker.setDeviceAudioMute,streamBroker.unassignProfile`.split(`,`),bO=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),xO=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function SO(e){let t=[];for(let[n,r]of Object.entries(bO))r===e&&t.push(n);return t}var CO={"air-quality-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"alarm-panel":{durability:`restored`,volatileFields:[`lastChangedAt`]},"ambient-light-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"audio-metrics":{durability:`session`,volatileFields:[]},"automation-control":{durability:`session`,volatileFields:[]},battery:{durability:`restored`,volatileFields:[`lastUpdated`]},binary:{durability:`restored`,volatileFields:[`lastChangedAt`]},brightness:{durability:`session`,volatileFields:[]},"camera-streams":{durability:`session`,volatileFields:[]},"carbon-monoxide":{durability:`restored`,volatileFields:[`lastChangedAt`]},"climate-control":{durability:`session`,volatileFields:[]},color:{durability:`session`,volatileFields:[]},connectivity:{durability:`restored`,volatileFields:[`lastChangedAt`]},consumables:{durability:`session`,volatileFields:[]},contact:{durability:`restored`,volatileFields:[`lastChangedAt`]},control:{durability:`session`,volatileFields:[]},cover:{durability:`restored`,volatileFields:[`lastChangedAt`]},"day-night":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"device-discovery":{durability:`session`,volatileFields:[]},"device-status":{durability:`restored`,volatileFields:[`lastChangedAt`]},doorbell:{durability:`restored`,volatileFields:[]},"enum-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"event-emitter":{durability:`session`,volatileFields:[]},"fan-control":{durability:`session`,volatileFields:[]},"feature-probe":{durability:`session`,volatileFields:[]},flood:{durability:`restored`,volatileFields:[`lastChangedAt`]},gas:{durability:`restored`,volatileFields:[`lastChangedAt`]},humidifier:{durability:`session`,volatileFields:[]},"humidity-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},image:{durability:`session`,volatileFields:[]},"image-settings":{durability:`restored`,volatileFields:[`lastFetchedAt`]},intercom:{durability:`session`,volatileFields:[]},"lawn-mower-control":{durability:`session`,volatileFields:[]},"lock-control":{durability:`restored`,volatileFields:[`lastChangedAt`]},"media-player":{durability:`session`,volatileFields:[]},motion:{durability:`session`,volatileFields:[]},"motion-trigger":{durability:`session`,volatileFields:[]},"motion-zones":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"native-object-detection":{durability:`restored`,volatileFields:[`lastFetchedAt`]},notifier:{durability:`session`,volatileFields:[]},"numeric-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"pet-feeder":{durability:`session`,volatileFields:[]},"power-meter":{durability:`restored`,volatileFields:[`lastFetchedAt`]},presence:{durability:`restored`,volatileFields:[`lastChangedAt`]},"pressure-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"privacy-mask":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"ptz-autotrack":{durability:`session`,volatileFields:[]},"scene-monitor":{durability:`session`,volatileFields:[]},"script-runner":{durability:`session`,volatileFields:[]},smoke:{durability:`restored`,volatileFields:[`lastChangedAt`]},"stream-catalog":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-params":{durability:`restored`,volatileFields:[`lastFetchedAt`]},switch:{durability:`restored`,volatileFields:[`lastChangedAt`]},tamper:{durability:`restored`,volatileFields:[`lastChangedAt`]},"temperature-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},update:{durability:`session`,volatileFields:[]},"vacuum-control":{durability:`session`,volatileFields:[]},valve:{durability:`session`,volatileFields:[]},vibration:{durability:`restored`,volatileFields:[`lastChangedAt`]},"water-heater":{durability:`session`,volatileFields:[]},weather:{durability:`session`,volatileFields:[]},"zone-analytics":{durability:`session`,volatileFields:[]},"zone-rules":{durability:`restored`,volatileFields:[]},zones:{durability:`restored`,volatileFields:[]}};function wO(e){return CO[e]??TO}var TO={durability:`session`,volatileFields:[]};function EO(e){return wO(e).durability===`restored`}var DO=`air-quality-sensor.alarm-panel.ambient-light-sensor.battery.binary.carbon-monoxide.connectivity.contact.cover.day-night.device-status.doorbell.enum-sensor.flood.gas.humidity-sensor.image-settings.lock-control.motion-zones.native-object-detection.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),OO=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus PTZ control, intercom, snapshots and recording start/stop. Cannot delete devices or recordings.",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`full-management`,label:`Full management`,description:`Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.`,rows:[{type:`category`,target:`device`,access:[`view`,`create`,`delete`]},{type:`category`,target:`system`,access:[`view`,`create`,`delete`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`events`,access:[`view`]},{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}];function kO(e){let t=e;function n(e,n,r,i,a){let o=t[e]?.[n];if(!o)throw Error(`SystemProxy: api has no '${e}.${n}'`);let s=o;return r===`mutation`?s.mutate(i):r===`subscription`?s.subscribe(i,a):s.query(i)}return{addonPages:{listPages:e=>n(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>n(`addons`,`list`,`query`,e),getLogs:e=>n(`addons`,`getLogs`,`query`,e),listPackages:e=>n(`addons`,`listPackages`,`query`,e),installPackage:e=>n(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>n(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>n(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>n(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>n(`addons`,`uninstallPackage`,`mutation`,e),reloadPackages:e=>n(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>n(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>n(`addons`,`listUpdates`,`query`,e),updatePackage:e=>n(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>n(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>n(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>n(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>n(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>n(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>n(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>n(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>n(`backup`,`listSchedules`,`query`,e),upsertSchedule:e=>n(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>n(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>n(`broker`,`list`,`query`,e),get:e=>n(`broker`,`get`,`query`,e),listProviders:e=>n(`broker`,`listProviders`,`query`,e),add:e=>n(`broker`,`add`,`mutation`,e),remove:e=>n(`broker`,`remove`,`mutation`,e),testConnection:e=>n(`broker`,`testConnection`,`mutation`,e),getSettings:e=>n(`broker`,`getSettings`,`query`,e),setSettings:e=>n(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>n(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>n(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>n(`broker`,`testSettings`,`mutation`,e),publish:e=>n(`broker`,`publish`,`mutation`,e),subscribe:e=>n(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>n(`broker`,`unsubscribe`,`mutation`,e),getState:e=>n(`broker`,`getState`,`query`,e),getStatus:e=>n(`broker`,`getStatus`,`query`,e)},connectionTest:{testSettings:e=>n(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>n(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>n(`coreBlocks`,`list`,`query`,e),get:e=>n(`coreBlocks`,`get`,`query`,e),create:e=>n(`coreBlocks`,`create`,`mutation`,e),update:e=>n(`coreBlocks`,`update`,`mutation`,e),delete:e=>n(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>n(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>n(`coreBlocks`,`restart`,`mutation`,e),compile:e=>n(`coreBlocks`,`compile`,`mutation`,e),getTypeDefs:e=>n(`coreBlocks`,`getTypeDefs`,`query`,e)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>n(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>n(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>n(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>n(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>n(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>n(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>n(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>n(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>n(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>n(`deviceProvider`,`start`,`mutation`,e),stop:e=>n(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>n(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>n(`deviceProvider`,`getDevices`,`query`,e),supportsDiscovery:e=>n(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>n(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>n(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>n(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>n(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>n(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>n(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>n(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>n(`deviceState`,`getAllSnapshots`,`query`,e)},faceGallery:{listIdentities:e=>n(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>n(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>n(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>n(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>n(`faceGallery`,`listIdentitySamples`,`query`,e),removeSample:e=>n(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>n(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>n(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>n(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>n(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>n(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>n(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>n(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>n(`integrations`,`list`,`query`,e),get:e=>n(`integrations`,`get`,`query`,e),getByAddonId:e=>n(`integrations`,`getByAddonId`,`query`,e),create:e=>n(`integrations`,`create`,`mutation`,e),update:e=>n(`integrations`,`update`,`mutation`,e),delete:e=>n(`integrations`,`delete`,`mutation`,e),getSettings:e=>n(`integrations`,`getSettings`,`query`,e),setSettings:e=>n(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>n(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>n(`integrations`,`testConnection`,`mutation`,e)},llm:{generate:e=>n(`llm`,`generate`,`mutation`,e),generateVision:e=>n(`llm`,`generateVision`,`mutation`,e),cancel:e=>n(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>n(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>n(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>n(`llm`,`upsertProfile`,`mutation`,e),deleteProfile:e=>n(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>n(`llm`,`testProfile`,`mutation`,e),listModels:e=>n(`llm`,`listModels`,`query`,e),getDefaults:e=>n(`llm`,`getDefaults`,`query`,e),setDefault:e=>n(`llm`,`setDefault`,`mutation`,e),getUsage:e=>n(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>n(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>n(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>n(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>n(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>n(`llm`,`installModel`,`mutation`,e),deleteModel:e=>n(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>n(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>n(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>n(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>n(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>n(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),killProcess:e=>n(`metricsProvider`,`killProcess`,`mutation`,e),dumpHeapSnapshot:e=>n(`metricsProvider`,`dumpHeapSnapshot`,`mutation`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},osdManager:{getConditionSupport:e=>n(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>n(`osdManager`,`copyDeviceConfiguration`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{pauseForStorageMigration:e=>n(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>n(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>n(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>n(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getGlobalMetrics:e=>n(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>n(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>n(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>n(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentDetectWeight:e=>n(`pipelineOrchestrator`,`setAgentDetectWeight`,`mutation`,e),setAgentCapabilities:e=>n(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentReachableHost:e=>n(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>n(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),getNodeInferenceDevices:e=>n(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),reconcileFromDisk:e=>n(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>n(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e),listTemplates:e=>n(`pipelineOrchestrator`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineOrchestrator`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineOrchestrator`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineOrchestrator`,`deleteTemplate`,`mutation`,e)},pipelineRunner:{attachCamera:e=>n(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>n(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>n(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>n(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>n(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>n(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>n(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>n(`pipelineRunner`,`runStatelessStep`,`mutation`,e)},plateGallery:{getPlateMedia:e=>n(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>n(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>n(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>n(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>n(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>n(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>n(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>n(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>n(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>n(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>n(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>n(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>n(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>n(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>n(`plateGallery`,`unassignPlates`,`mutation`,e)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e),listOpsLog:e=>n(`recording`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>n(`recording`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`recording`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>n(`recording`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>n(`recording`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>n(`recording`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>n(`recording`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>n(`recording`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>n(`recording`,`listRelocateJobs`,`query`,e),cancelRelocateJob:e=>n(`recording`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>n(`recording`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>n(`recording`,`startStorageRebalance`,`mutation`,e)},recordingExport:{createExport:e=>n(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>n(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>n(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>n(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>n(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>n(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>n(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>n(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),getDefaultLocation:e=>n(`storage`,`getDefaultLocation`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>n(`storageMigration`,`plan`,`query`,e),start:e=>n(`storageMigration`,`start`,`mutation`,e),status:e=>n(`storageMigration`,`status`,`query`,e),cancel:e=>n(`storageMigration`,`cancel`,`mutation`,e)},streamBroker:{fetchEventMedia:e=>n(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>n(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>n(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>n(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>n(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>n(`streamBroker`,`listClients`,`query`,e),killClient:e=>n(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>n(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>n(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>n(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>n(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>n(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>n(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>n(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>n(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),subscribeFrames:e=>n(`streamBroker`,`subscribeFrames`,`mutation`,e),pullFrameHandles:e=>n(`streamBroker`,`pullFrameHandles`,`query`,e),unsubscribeFrames:e=>n(`streamBroker`,`unsubscribeFrames`,`mutation`,e),setPreBufferDuration:e=>n(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>n(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>n(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>n(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>n(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>n(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>n(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>n(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>n(`system`,`info`,`query`,e),health:e=>n(`system`,`health`,`query`,e),featureFlags:e=>n(`system`,`featureFlags`,`query`,e),networkAddresses:e=>n(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>n(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>n(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>n(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>n(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>n(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>n(`system`,`detectSiteLocation`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`mutation`,e),deleteInstance:e=>n(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>n(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>n(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>n(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>n(`terminalSession`,`listSessions`,`query`,e),openSession:e=>n(`terminalSession`,`openSession`,`mutation`,e),resize:e=>n(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>n(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>n(`terminalSession`,`writeInput`,`mutation`,e),close:e=>n(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,t)=>n(`toast`,`onToast`,`subscription`,e,t)},turnProvider:{getTurnServers:e=>n(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>n(`userManagement`,`listUsers`,`query`,e),createUser:e=>n(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>n(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>n(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>n(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>n(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>n(`userManagement`,`validateCredentials`,`mutation`,e),listApiKeys:e=>n(`userManagement`,`listApiKeys`,`query`,e),createApiKey:e=>n(`userManagement`,`createApiKey`,`mutation`,e),revokeApiKey:e=>n(`userManagement`,`revokeApiKey`,`mutation`,e),validateApiKey:e=>n(`userManagement`,`validateApiKey`,`mutation`,e),createScopedToken:e=>n(`userManagement`,`createScopedToken`,`mutation`,e),revokeScopedToken:e=>n(`userManagement`,`revokeScopedToken`,`mutation`,e),validateScopedToken:e=>n(`userManagement`,`validateScopedToken`,`query`,e),listScopedTokens:e=>n(`userManagement`,`listScopedTokens`,`query`,e),setupTotp:e=>n(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>n(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>n(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>n(`userManagement`,`getTotpStatus`,`query`,e),verifyTotp:e=>n(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>n(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>n(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>n(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>n(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listOauthSessions:e=>n(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>n(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var AO=`audio-`;function Z(e){return e.startsWith(AO)?e.slice(6):e}function jO(e){return e.startsWith(AO)?e:`${AO}${e}`}var MO=-96,NO=0,PO=3,FO=-55,IO=1,LO=100,RO=1,zO=300,BO={hitPercent:60,samplingSeconds:10};function VO(e){return e??BO}function HO(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function UO(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function WO(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function GO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function KO(e,t){let n=VO(e),r=GO(t,`labels`)?t.labels:n.labels,i=GO(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(GO(t,`labels`)&&a?`label`:GO(t,`dbThreshold`)&&i!==void 0?`level`:a?`label`:i===void 0?null:`level`),s=o===`label`&&a?r:void 0,c=o===`level`?i??(t.mode===`level`?-55:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:WO(c,-96,0)},hitPercent:WO(t.hitPercent??n.hitPercent,1,100),samplingSeconds:WO(t.samplingSeconds??n.samplingSeconds,1,300)}}function qO(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=Z(e.kind);return{value:t,label:e.label,iconId:jO(t),unknown:!1}}):Nf.map(e=>({value:e.id,label:e.name,iconId:jO(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=Z(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:jO(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function JO(e,t){let n=Z(t);return(e??[]).some(e=>Z(e)===n)}function YO(e,t){let n=Z(t),r=e??[];if(JO(r,n)){let e=r.filter(e=>Z(e)!==n);return e.length>0?e:void 0}return[...r,n]}var XO=new Set([`classes`,`classesExclude`]),ZO=new Set([`sensorKinds`]),QO=new Set([`occupancy`]);function $O(e){return{value:e.kind,label:e.label}}function ek(e){let t=[],n=new Map,r=(e,r)=>{let i=n.get(e);if(i!==void 0)return i;let a={fallbackLabel:r,options:[]};return n.set(e,a),t.push(e),a};for(let t of e){let e=t.parentKind??t.kind,n=r(e,t.parentKind===null?t.label:e);n.options.push($O(t)),t.parentKind===null&&(n.fallbackLabel=t.label)}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function tk(e){let t=[],n=new Map;for(let r of e){let e=r.parentKind??`other`,i=n.get(e);i===void 0?(n.set(e,[$O(r)]),t.push(e)):i.push($O(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function nk(e,t){if(!t)return null;if(XO.has(e)){let e=ek(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map($O)}),e.length>0?{groups:e}:null}if(QO.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map($O);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(ZO.has(e)){let e=tk(t.labels);return e.length>0?{groups:e}:null}return null}function rk(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var ik=[`devices`,`classes`],ak=new Set(ik);function ok(e){return ak.has(e)}function sk(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/`([^`]*)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s*/gm,``).replace(/^\s{0,3}>\s?/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).trim()}var ck=[[/ /g,` `],[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function lk(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
|
|
346
|
+
`).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
|
|
347
|
+
`).replace(/<[^>]+>/g,``);for(let[e,n]of ck)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
|
|
348
|
+
|
|
349
|
+
`).trim()}var uk=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function dk(e){let t=e;for(let[e,n]of uk)t=t.replace(e,n);return t}function fk(e){return dk(e).replace(/\n/g,`<br>`)}function pk(e){return dk(e).replace(/(\*\*|__)(.*?)\1/g,`<b>$2</b>`).replace(/(\*|_)(.*?)\1/g,`<i>$2</i>`).replace(/`([^`]*)`/g,`<code>$1</code>`).replace(/\[([^\]]*)\]\(([^)]*)\)/g,`<a href="$2">$1</a>`).replace(/\n/g,`<br>`)}var mk={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function hk(e,t){for(let n of mk[e]??mk.text)if(t.includes(n))return n;return t[0]??`text`}function gk(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return sk(e);if(t===`html`)return lk(e)}if(n===`html`){if(t===`text`)return fk(e);if(t===`markdown`)return pk(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return lk(e)}return e}function _k(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function vk(e,t){if(e.length===0)return null;if(t.level!==void 0){let n=e.find(e=>e.id===t.level);if(n)return _k(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return _k(e[0]);let r=t.priority;return _k([...n].sort((e,t)=>{let n=Math.abs((e.ordinal??0)-r),i=Math.abs((t.ordinal??0)-r);return n===i?(t.ordinal??0)-(e.ordinal??0):n-i})[0])}function yk(e,t){if(!Number.isFinite(t)||t<=0||e.length<=t)return[e];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function bk(e,t){let n=[],r=t.format,i=hk(r,e.format);i!==r&&n.push(`format`);let a=gk(t.body,r,i),o=vk(e.levels,t),s=t.attachments??[],c=[];for(let t of s){if(!e.attachments.mediaTypes.includes(t.mediaType)){n.push(`attachment:${t.mediaType}`);continue}if(e.attachments.mode===`url`&&t.url===void 0){n.push(`attachment:noUrl`);continue}if(t.bytes!==void 0&&e.attachments.maxBytes!==void 0&&t.bytes.length>e.attachments.maxBytes){n.push(`attachment:maxBytes`);continue}if(c.length>=e.attachments.max){n.push(`attachment:max`);continue}let r=e.attachments.mode===`bytes`&&t.bytes===void 0&&t.url!==void 0;c.push({mediaType:t.mediaType,...t.url===void 0?{}:{url:t.url},...t.bytes===void 0?{}:{bytes:t.bytes},...t.mime===void 0?{}:{mime:t.mime},...t.name===void 0?{}:{name:t.name},needsFetch:r})}let l=t.actions??[],u=l.slice(0,Math.max(0,e.actions));l.length>u.length&&n.push(`actions`);let d=e.actionIcons===!0;!d&&u.some(e=>e.icon!==void 0)&&n.push(`actionIcons`);let f=d?u:u.map(({icon:e,...t})=>t),p=null;t.clickUrl!==void 0&&(e.clickUrl?p=t.clickUrl:n.push(`clickUrl`));let ee=null;t.sound!==void 0&&(e.sound?ee=t.sound:n.push(`sound`));let m=null;t.ttl!==void 0&&(e.ttl?m=t.ttl:n.push(`ttl`));let te=t.tag??null,ne=yk(a,e.bodyMaxLen),h=ne.length>1,re={level:o?.id??``,format:i,attachmentsSent:c.length,actionsSent:f.length,truncated:h,dropped:n};return{body:ne[0]??``,...t.title===void 0?{}:{title:t.title},format:i,level:o,attachments:c,actions:f,clickUrl:p,sound:ee,ttl:m,tag:te,bodyParts:ne,renderedAs:re}}var xk=`An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.`,Sk=`An occupancy edge carries no device event-type token — that comes from an event-emitter slice, which a count crossing has none of.`,Ck=`An occupancy edge is always produced by the pipeline, so any other source can never match and “pipeline” narrows nothing.`,wk=`A confirmed sound window is always stamped as an audio subject, so any other source can never match.`,Tk=`A sound rule fires on what the camera HEARD. Its subject carries no detection, so this condition can never match one — name the sounds in the Sound condition instead.`,Ek=`A sound window’s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.`,Dk=`A sound has no position in the frame, so a zone or a drawn polygon can never match it.`,Ok=[{kind:`detection`,label:`Conditions`,excluded:{},carriesMedia:!0,carriesSubjectCrop:!0},{kind:`sensor`,label:`Conditions`,excluded:{},carriesMedia:!0,carriesSubjectCrop:!0,blurb:`A doorbell press or a linked sensor changing state. The picture comes from the camera the sensor is attributed to.`},{kind:`occupancy`,label:`Occupancy`,discriminator:`occupancy`,excluded:{sensorKinds:xk,eventTypeTokens:Sk,source:Ck},carriesMedia:!0,carriesSubjectCrop:!0,blurb:`Fires when the count in a camera frame or a zone crosses your threshold and holds. Pick the camera first — the zone list is that camera’s.`},{kind:`sound`,label:`Sound`,discriminator:`audio`,excluded:{classes:Tk,classesExclude:Tk,minConfidence:Ek,zones:Dk,zonesExclude:Dk,customZones:Dk,crossing:Dk,labelEquals:Tk,identities:Tk,identitiesExclude:Tk,plates:Tk,source:wk},carriesMedia:!0,carriesSubjectCrop:!1,blurb:`Fires on a confirmed sampling window of audio, never on a picture. Name the sounds and/or keep a level threshold — with neither it can never match.`,mediaBlurb:`A sound owns no frame, so the picture is a photograph of the camera taken at the moment of the match — the whole scene, never a crop. The GIF and the clip are cut around the same instant, from the camera.`},{kind:`system`,label:`Events`,discriminator:`systemEvent`,excluded:{},carriesMedia:!1,carriesSubjectCrop:!1,blurb:`The installation itself: a camera or stream dropping, a node leaving, an update landing. There is no detection behind it and no frame to attach.`}];function kk(e){return Ok.find(t=>t.kind===e)??Ok[0]}var Ak=`system-event`;function jk(e){return e===Ak}function Mk(e){return jk(e.delivery)?`system`:e.conditions.occupancy!==void 0&&e.delivery===`device-event`?`occupancy`:e.conditions.audio!==void 0&&e.delivery===`immediate`?`sound`:e.delivery===`device-event`?`sensor`:`detection`}function Nk(e,t,n){let r=kk(n);return e.id===r.discriminator?!0:e.appliesTo.includes(t)?r.excluded[e.id]===void 0:!1}function Pk(e,t){let n=kk(t);return e===n.discriminator?null:n.excluded[e]??null}function Fk(e,t){let n=kk(t),r=[];for(let[t,i]of Object.entries(e)){if(i===void 0||Array.isArray(i)&&i.length===0)continue;let e=n.excluded[t];e!==void 0&&r.push({conditionId:t,reason:e})}return r}var Ik=[{key:`all`,label:`All rules`,blurb:`Every notification rule, whatever its trigger. Each rule picks a trigger, matches conditions and fans out to one or more delivery targets.`,newRuleLabel:`New rule`,emptyHint:`No notification rules yet. Create one to be told what your cameras see.`},{key:`detection`,label:`Detections & devices`,blurb:`Rules driven by what the cameras and sensors SEE — detections, tracks, doorbell presses and package events.`,newRuleLabel:`New detection rule`,emptyHint:`No detection rules yet. Create one to be told what your cameras see.`},{key:`audio`,label:`Sound`,blurb:`Rules on what the cameras HEAR: a sustained window of sound loud enough, or classified as one of the sounds you name. A sound rule fires only on a confirmed sampling window, never on a picture.`,newRuleLabel:`New sound rule`,emptyHint:`No sound rules yet. A new sound rule opens on the sound condition already filled in with a level threshold, so you only have to name the sounds and the targets.`},{key:`occupancy`,label:`Occupancy`,blurb:`Rules on how many objects are in a camera frame or a zone, and for how long: "the driveway became occupied", "the garden emptied".`,newRuleLabel:`New occupancy rule`,emptyHint:`No occupancy rules yet. A new occupancy rule opens on the occupancy condition; pick the camera first, then the zone and the count.`},{key:`system`,label:`System events`,blurb:`Rules about the installation itself: a camera or stream dropping, a node leaving the cluster, an addon or server update becoming available. These carry no image and are not tied to a detection.`,newRuleLabel:`New system rule`,emptyHint:`No system-event rules yet. These tell you when a camera drops, a node leaves or an update lands.`}];function Lk(e){return Ik.find(t=>t.key===e)??Ik[0]}function Rk(e){return Ik.find(t=>t.key===e)?.key}function zk(e){return e.conditions.audio!==void 0}function Bk(e){return e.conditions.occupancy!==void 0}function Vk(e,t){return t===`all`?!0:t===`system`?jk(e.delivery):t===`audio`?zk(e):t===`occupancy`?Bk(e):!jk(e.delivery)&&!zk(e)&&!Bk(e)}function Hk(e){return Vk(e,`system`)?`system`:Vk(e,`audio`)?`audio`:Vk(e,`occupancy`)?`occupancy`:`detection`}var Uk={op:`became-occupied`,count:1,sustainSeconds:15},Wk={hitPercent:BO.hitPercent,samplingSeconds:BO.samplingSeconds,dbThreshold:-55};function Gk(e){switch(e){case`system`:return{delivery:Ak,conditions:{}};case`audio`:return{delivery:`immediate`,conditions:{audio:Wk}};case`occupancy`:return{delivery:`device-event`,conditions:{occupancy:Uk}};default:return{delivery:`immediate`,conditions:{}}}}function Kk(e){return Gk(e).delivery}var qk=[`rule`,`devices`,`conditions`,`notification`,`actions`,`advanced`],Jk={rule:`Rule`,devices:`Cameras`,conditions:`Conditions`,notification:`Notification`,actions:`Actions`,advanced:`Advanced`};function Yk(e){let t=kk(e),n=[];for(let r of qk)r===`devices`&&e===`system`||n.push({key:r,label:r===`conditions`?t.label:Jk[r]});return n}var Xk={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function Zk(e,t){let n=new Date(e);if(t!==void 0)try{let e=new Intl.DateTimeFormat(`en-US`,{timeZone:t,weekday:`short`,hour:`numeric`,minute:`numeric`,hourCycle:`h23`}).formatToParts(n),r,i,a;for(let t of e)t.type===`weekday`?r=t.value:t.type===`hour`?i=Number(t.value):t.type===`minute`&&(a=Number(t.value));let o=r===void 0?void 0:Xk[r];if(o!==void 0&&i!==void 0&&a!==void 0)return{day:o,minute:i*60+a}}catch{}return{day:n.getDay(),minute:n.getHours()*60+n.getMinutes()}}function Qk(e,t){if(e===void 0)return!0;let{day:n,minute:r}=Zk(t,e.timezone),i=(n+6)%7,a=!1;for(let t of e.windows)if(t.startMinute<=t.endMinute){if(t.days.includes(n)&&r>=t.startMinute&&r<t.endMinute){a=!0;break}}else if(t.days.includes(n)&&r>=t.startMinute||t.days.includes(i)&&r<t.endMinute){a=!0;break}return e.invert===!0?!a:a}var $k=[`deviceIds`,`deviceTypes`,`nodeIds`,`packageNames`];function eA(e,t){switch(t){case`deviceIds`:return e.startsWith(`device-`)||e.startsWith(`stream-`)||e===`detection-blind`||e===`alarm-triggered`||e===`export-completed`;case`deviceTypes`:return e.startsWith(`device-`)||e===`detection-blind`;case`nodeIds`:return e.startsWith(`node-`)||e===`addon-crash-loop`||e===`addon-update-available`||e===`addon-updated`||e===`server-update-available`||e===`server-updated`;case`packageNames`:return e.endsWith(`update-available`)||e===`addon-updated`||e===`server-updated`}}function tA(e,t){return e.some(e=>eA(e,t))}var nA=i({title:_().max(500).optional(),body:_().max(2e3).optional()}),rA=_().min(1).max(200),iA=p(a()).min(1),aA=a().int().min(2).max(3600),oA=a().int().min(1).max(60),sA=p(Pp).min(1),cA=a().int().min(1).max(5),lA=.1,uA=a().min(lA).max(3600),dA=a().min(0).max(60),fA=_().max(200),pA=h([`image`,`gif`]),mA=p(_().min(1).max(40)).max(20),hA=i({name:rA,enabled:y().default(!0),deviceIds:iA,schedule:bp,cadenceSec:aA.default(15),framerate:oA.default(10),denseCadenceSec:uA.optional(),minDwellSec:dA.optional(),targets:sA,template:nA.optional(),previewText:fA.optional(),previewMode:pA.default(`image`),reportClasses:mA.optional(),priority:cA.default(3)}),gA=`Timelapse {{camera}}`,_A=i({name:rA.optional(),enabled:y().optional(),deviceIds:iA.optional(),schedule:bp.optional(),cadenceSec:aA.optional(),framerate:oA.optional(),denseCadenceSec:uA.optional(),minDwellSec:dA.optional(),targets:sA.optional(),template:nA.nullable().optional(),previewText:fA.optional(),previewMode:pA.optional(),reportClasses:mA.optional(),priority:cA.optional()}),vA=hA.extend({id:_(),ownerUserId:_().optional(),lastGeneratedAt:a().optional(),generatedByDevice:n(_(),a()).optional(),createdBy:_(),createdAt:a(),updatedAt:a()});function yA(e){let t=e.denseCadenceSec;if(t!==void 0&&t>=e.cadenceSec)throw Error(`denseCadenceSec (${t}s) must be strictly smaller than cadenceSec (${e.cadenceSec}s) — a dense cadence that is not denser renders a uniform timelapse`)}function bA(e,t){let n=e.generatedByDevice;return n===void 0?e.lastGeneratedAt??0:n[String(t)]??0}var xA=[{stepId:`face-embedding`,label:`Face recognition model`,defaultModelId:`arcface-r100`,indexName:`the enrolled face gallery`,options:[{id:`arcface-r100`,label:`ArcFace (ResNet34)`},{id:`auraface-r100`,label:`AuraFace R100`},{id:`inception-resnet-v1`,label:`Inception ResNet V1`}]},{stepId:`clip-embedding`,label:`Semantic search model`,defaultModelId:`mobileclip-s1`,indexName:`the object semantic-search index`,options:[{id:`mobileclip-s1`,label:`MobileCLIP S1`},{id:`mobileclip-s2`,label:`MobileCLIP S2`}]}],SA=`cluster-step-models`;function CA(e){return`clusterModel:${e}`}function wA(e){return xA.some(t=>t.stepId===e)}var TA=Object.freeze(Object.fromEntries(xA.map(e=>[e.stepId,e.defaultModelId]))),EA=_().min(1);function DA(e){let t={};for(let n of xA){let r=EA.safeParse(e[CA(n.stepId)]);t[n.stepId]=r.success?r.data:n.defaultModelId}return t}function OA(e){return typeof e==`object`&&!!e&&`key`in e}function kA(e){if(e===null)return TA;let t={},n=new Set(xA.map(e=>CA(e.stepId)));for(let r of e.sections)for(let e of r.fields)!OA(e)||typeof e.key!=`string`||n.has(e.key)&&(t[e.key]=e.value);return DA(t)}function AA(e,t){let n=xA.find(t=>t.stepId===e);if(n===void 0)return null;let r=t[e];return r!==void 0&&r!==``?r:n.defaultModelId}var jA=24,MA=[{stepId:`face-embedding`,key:`minLandmarkFaceSize`,label:`Min face size for recognition (detection px)`,description:`Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.`,type:`slider`,min:0,max:64,step:2,default:24}];function NA(e,t){return`clusterStepSetting:${e}:${t}`}function PA(e){return MA.filter(t=>t.stepId===e)}var FA=a().finite();function IA(e){let t={};for(let n of MA){let r=FA.safeParse(e[NA(n.stepId,n.key)]),i=r.success?r.data:n.default,a=t[n.stepId]??{};t[n.stepId]={...a,[n.key]:i}}return t}var LA=IA({});function RA(e){if(e===null)return LA;let t={},n=new Set(MA.map(e=>NA(e.stepId,e.key)));for(let r of e.sections)for(let e of r.fields)!OA(e)||typeof e.key!=`string`||n.has(e.key)&&(t[e.key]=e.value);return IA(t)}function zA(e,t,n){let r=n[e];return r===void 0||Object.keys(r).length===0?t===void 0?void 0:{...t}:t===void 0?{...r}:{...t,...r}}var BA=`detail-crop`,VA=`detailCropPaddingRatio`,HA=`detailCropSquare`,UA=i({paddingRatio:a().min(0).max(4),square:y()}),WA={paddingRatio:.15,square:!1};function GA(e){let t=UA.shape.paddingRatio.safeParse(e[VA]),n=UA.shape.square.safeParse(e[HA]);return{paddingRatio:t.success?t.data:WA.paddingRatio,square:n.success?n.data:WA.square}}function KA(e){return typeof e==`object`&&!!e&&`key`in e}function qA(e){if(e===null)return WA;let t={};for(let n of e.sections)for(let e of n.fields)!KA(e)||typeof e.key!=`string`||(e.key===`detailCropPaddingRatio`||e.key===`detailCropSquare`)&&(t[e.key]=e.value);return GA(t)}var JA=Object.freeze({x:0,y:0,w:1,h:1}),YA={min:0,max:1,step:.05,default:WA.paddingRatio};function XA(e,t,n,r){let i=r.paddingRatio*e.w,a=r.paddingRatio*e.h,o={x:e.x-i,y:e.y-a,w:e.w+2*i,h:e.h+2*a};return r.square?$A(ZA(o,t,n),t,n):QA(o,t,n)}function ZA(e,t,n){let r=Math.min(Math.max(e.w,e.h),Math.min(t,n)),i=e.x+e.w/2,a=e.y+e.h/2;return{x:i-r/2,y:a-r/2,w:r,h:r}}function QA(e,t,n){let r=Math.max(0,e.x),i=Math.max(0,e.y),a=Math.min(t,e.x+e.w),o=Math.min(n,e.y+e.h);return{x:r,y:i,w:Math.max(0,a-r),h:Math.max(0,o-i)}}function $A(e,t,n){let r=Math.max(0,Math.min(e.w,t)),i=Math.max(0,Math.min(e.h,n));return{x:Math.min(Math.max(0,e.x),Math.max(0,t-r)),y:Math.min(Math.max(0,e.y),Math.max(0,n-i)),w:r,h:i}}var ej=`native-lease`,tj=`nativeLeaseHoldFrames`,nj=`nativeLeaseBudgetMb`,rj=`nativeLeaseActivityMs`,ij=`nativeLeaseAdmission`,aj=`nativeTileBudgetMb`,oj=h([`all`,`inferred`]),sj=i({holdFrames:a().int().min(1).max(64),budgetMb:a().int().min(0).max(4096),activityMs:a().int().min(0).max(12e4),admission:oj,tileBudgetMb:a().int().min(0).max(1024)}),Q={holdFrames:8,budgetMb:1024,activityMs:15e3,tileBudgetMb:64,admission:`inferred`},cj={min:1,max:64,step:1,default:Q.holdFrames},lj={min:0,max:4096,step:64,default:Q.budgetMb},uj={min:0,max:12e4,step:1e3,default:Q.activityMs},dj={min:0,max:1024,step:16,default:Q.tileBudgetMb},fj={options:[{value:`all`,label:`Every delivered frame`},{value:`inferred`,label:`Only frames sent to inference`}],default:Q.admission};function pj(e,t){let n=sj.shape[e].safeParse(t);return n.success?n.data===Q[e]?null:n.data:null}function mj(e){let t=oj.safeParse(e);return t.success?t.data===Q.admission?null:t.data:null}function hj(e){let t=pj(`holdFrames`,e[tj]),n=pj(`budgetMb`,e[nj]),r=pj(`activityMs`,e[rj]),i=mj(e[ij]),a=pj(`tileBudgetMb`,e[aj]);return{...t===null?{}:{holdFrames:t},...n===null?{}:{budgetMb:n},...r===null?{}:{activityMs:r},...i===null?{}:{admission:i},...a===null?{}:{tileBudgetMb:a}}}function gj(e){return typeof e==`object`&&!!e&&`key`in e}var _j=[tj,nj,rj,ij,aj];function vj(e){if(e===null)return{};let t={};for(let n of e.sections)for(let e of n.fields)!gj(e)||typeof e.key!=`string`||_j.includes(e.key)&&(t[e.key]=e.value);return hj(t)}var yj=[{id:`viewer`,label:`View`,description:`Watch live and recorded video, browse events and read device state. Cannot change anything.`,deviceAccess:[`view`],systemAccess:[`view`]},{id:`operator`,label:`Operate`,description:`Everything View does, plus acting on a device: PTZ, lights, sirens, locks, and snoozing notifications. Cannot delete.`,deviceAccess:[`view`,`create`],systemAccess:[`view`,`create`]},{id:`manager`,label:`Full management`,description:`Everything Operate does, plus deleting devices, recordings and events. Short of admin — no user or cluster administration.`,deviceAccess:[`view`,`create`,`delete`],systemAccess:[`view`,`create`,`delete`]}];function bj(e){let t=yj.find(t=>t.id===e);if(!t)throw Error(`Unknown access role '${e}'`);return t}function xj(e){let t=bj(e.roleId);return[{type:`device`,selector:e.selector,access:[...t.deviceAccess],includeLinked:e.includeLinked},{type:`category`,target:`system`,access:[...t.systemAccess]}]}function Sj(e,t){if(e.length!==t.length)return!1;let n=new Set(e);return t.every(e=>n.has(e))}function Cj(e){if(e.length!==2)return null;let t=e.filter(e=>e.type===`device`),n=e.filter(e=>e.type===`category`&&e.target===`system`);if(t.length!==1||n.length!==1)return null;let[r]=t,[i]=n;if(r===void 0||i===void 0||r.type!==`device`||r.includeLinked===void 0)return null;let a=yj.find(e=>Sj(e.deviceAccess,r.access)&&Sj(e.systemAccess,i.access));return a?{roleId:a.id,selector:r.selector,includeLinked:r.includeLinked}:null}var wj=8;function Tj(e,t){switch(e.kind){case`all`:return!0;case`ids`:return e.ids.includes(t.id);case`types`:return e.types.some(e=>String(e)===t.type);case`locations`:return t.location!==null&&e.locations.includes(t.location)}}function Ej(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function Dj(e,t){return e.filter(e=>e.type===`device`&&e.access.includes(t))}function Oj(e,t){return e.includeLinked??t===`view`}function kj(e,t){let n=[],r=e;for(let e=0;e<wj;e++){let e=r===null?null:t.get(r)?.parentDeviceId??null;if(e===null||e===r)break;n.push(e),r=e}return n}function Aj(e,t,n){if(Ej(e,n))return new Set(t.map(e=>e.id));let r=new Map;for(let e of t)r.set(e.id,e);let i=Dj(e,n),a=new Set;for(let e of t)for(let t of i){if(Tj(t.selector,e)){a.add(e.id);break}if(Oj(t,n)&&kj(e.id,r).some(e=>{let n=r.get(e);return n!==void 0&&Tj(t.selector,n)})){a.add(e.id);break}}return a}function jj(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=q.safeParse(n);e.success&&t.push(e.data)}return t}var Mj=[`view`,`create`,`delete`];function Nj(e,t,n,r){return r?{all:!0,deviceCount:t.length}:{all:Ej(e,n)||Dj(e,n).some(e=>e.selector.kind===`all`),deviceCount:Aj(e,t,n).size}}function Pj(e){let t=[];for(let n of e)n.type===`capability`&&t.push({name:n.target,access:n.access});return t}function Fj(e){let t=[];for(let n of e)n.type===`addon`&&t.push({name:n.target,access:n.access});return t}function Ij(e,t,n){let r={view:Nj(e,t,`view`,n),create:Nj(e,t,`create`,n),delete:Nj(e,t,`delete`,n)},i=n?Mj:Mj.filter(t=>e.some(e=>e.type===`category`&&e.target===`system`&&e.access.includes(t)));return{isAdmin:n,allDevicesViewable:r.view.all,viewableDeviceCount:r.view.deviceCount,device:r,system:i,capabilities:Pj(e),addons:Fj(e)}}var Lj={camera:{type:`camera`,label:`Camera`,icon:`camera`}},Rj={"°C":{dimension:`temperature`,factor:1,offset:0},"°F":{dimension:`temperature`,factor:5/9,offset:-160/9},K:{dimension:`temperature`,factor:1,offset:-273.15},hPa:{dimension:`pressure`,factor:1,offset:0},kPa:{dimension:`pressure`,factor:10,offset:0},Pa:{dimension:`pressure`,factor:.01,offset:0},mbar:{dimension:`pressure`,factor:1,offset:0},bar:{dimension:`pressure`,factor:1e3,offset:0},inHg:{dimension:`pressure`,factor:33.8639,offset:0},mmHg:{dimension:`pressure`,factor:1.33322,offset:0},psi:{dimension:`pressure`,factor:68.9476,offset:0},"m/s":{dimension:`speed`,factor:1,offset:0},"km/h":{dimension:`speed`,factor:1/3.6,offset:0},mph:{dimension:`speed`,factor:.44704,offset:0},kn:{dimension:`speed`,factor:.514444,offset:0},"mm/h":{dimension:`precipitation-rate`,factor:1,offset:0},"in/h":{dimension:`precipitation-rate`,factor:25.4,offset:0},m:{dimension:`length`,factor:1,offset:0},mm:{dimension:`length`,factor:.001,offset:0},cm:{dimension:`length`,factor:.01,offset:0},km:{dimension:`length`,factor:1e3,offset:0},in:{dimension:`length`,factor:.0254,offset:0},ft:{dimension:`length`,factor:.3048,offset:0},mi:{dimension:`length`,factor:1609.344,offset:0},lx:{dimension:`illuminance`,factor:1,offset:0},"W/m²":{dimension:`irradiance`,factor:1,offset:0},W:{dimension:`power`,factor:1,offset:0},kW:{dimension:`power`,factor:1e3,offset:0},VA:{dimension:`apparent-power`,factor:1,offset:0},Wh:{dimension:`energy`,factor:1,offset:0},kWh:{dimension:`energy`,factor:1e3,offset:0},MWh:{dimension:`energy`,factor:1e6,offset:0},V:{dimension:`voltage`,factor:1,offset:0},mV:{dimension:`voltage`,factor:.001,offset:0},A:{dimension:`current`,factor:1,offset:0},mA:{dimension:`current`,factor:.001,offset:0},ppm:{dimension:`concentration-volume`,factor:1,offset:0},ppb:{dimension:`concentration-volume`,factor:.001,offset:0},"µg/m³":{dimension:`concentration-mass`,factor:1,offset:0},"mg/m³":{dimension:`concentration-mass`,factor:1e3,offset:0},kg:{dimension:`mass`,factor:1,offset:0},g:{dimension:`mass`,factor:.001,offset:0},lb:{dimension:`mass`,factor:.453592,offset:0},oz:{dimension:`mass`,factor:.0283495,offset:0},"%":{dimension:`percentage`,factor:1,offset:0}},zj=class extends Error{from;to;reason;constructor(e,t,n){super(`[units] cannot convert '${e}' → '${t}': ${n}`),this.name=`UnitConversionError`,this.from=e,this.to=t,this.reason=n}};function Bj(e){return Object.hasOwn(Rj,e)?Rj[e]:void 0}function Vj(e){return Bj(e)?.dimension}function Hj(e,t){return e*t.factor+t.offset}function Uj(e,t){return(e-t.offset)/t.factor}function Wj(e,t,n){if(t===n)return e;let r=Bj(t);if(!r)throw new zj(t,n,`unknown-from`);let i=Bj(n);if(!i)throw new zj(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new zj(t,n,`cross-dimension`);return Uj(Hj(e,r),i)}function Gj(e,t,n){if(t===n)return e;let r=Bj(t);if(!r)return;let i=Bj(n);if(i&&r.dimension===i.dimension)return Uj(Hj(e,r),i)}function Kj(e,t){if(e===t)return!0;let n=Vj(e);return n===void 0?!1:n===Vj(t)}function qj(e){let t=[];for(let[n,r]of Object.entries(Rj))r.dimension===e&&t.push(n);return t}function Jj(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array.from({length:r+1},(e,t)=>t),a=Array.from({length:r+1},()=>0);for(let o=1;o<=n;o++){a[0]=o;let n=i[0]??0;for(let s=1;s<=r;s++){let r=i[s]??0,c=a[s-1]??0,l=e.charCodeAt(o-1)===t.charCodeAt(s-1)?0:1;a[s]=Math.min(r+1,c+1,n+l),n=r}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function Yj(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-Jj(n,r)/Math.max(n.length,r.length)}function Xj(e,t,n=.8){let r=null,i=0;for(let a of t){let t=Yj(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var Zj=`addon:`;function Qj(e){return e.startsWith(Zj)?e.slice(6):e}function $j(e,t){return Qj(e)===Qj(t)}function eM(e,t){if(e.length!==t.length)return 0;let n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}var tM=class{elementId;cache={};listeners=new Set;loaded=!1;getBackend;constructor(e,t){this.elementId=e,this.getBackend=typeof t==`function`?t:()=>t}async ensureLoaded(){if(this.loaded)return;let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available`);let t=await e.query({collection:`config`,filter:{where:{id:this.elementId},limit:1}});t.length>0&&(this.cache=t[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(e){let t=e.split(`.`),n=this.cache;for(let e of t){if(typeof n!=`object`||!n||Array.isArray(n))return;n=Reflect.get(n,e)}return n}async set(e,t){await this.ensureLoaded(),nM(this.cache,e,t),await this.persist(),this.notifyListeners()}async setAll(e){await this.ensureLoaded(),this.cache={...e},await this.persist(),this.notifyListeners()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}async load(){await this.ensureLoaded()}async loadDefaults(e){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...e},await this.persist())}async persist(){let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await e.set({collection:`config`,key:this.elementId,value:this.cache})}notifyListeners(){let e=this.getAll();for(let t of this.listeners)try{t(e)}catch{}}};function nM(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e],n=i[t];if(typeof n!=`object`||!n||Array.isArray(n)){let e={};i[t]=e,i=e}else i=n}i[r[r.length-1]]=n}function rM(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}var iM=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function aM(e){return iM.some(t=>t.test(e))}function oM(e){try{let t=new URL(e),n=!1;(t.username||t.password)&&(t.username=``,t.password=``,n=!0);for(let e of Array.from(t.searchParams.keys()))aM(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var $=1024*1024,sM={sampleIntervalMs:6e4,baselineSettleSamples:5,baselineSampleCount:3,restartMultiple:4,floorBytes:1024*$,ceilingBytes:3072*$,cooldownMs:30*6e4,maxRestartsPerWindow:6,restartWindowMs:1440*6e4};function cM(e){let t=(t,n,r)=>{let i=e[t];if(i===void 0)return n;let a=Number(i);return Number.isFinite(a)&&a>=r?a:n},n=sM;return{sampleIntervalMs:t(`CAMSTACK_POOL_MEM_INTERVAL_MS`,n.sampleIntervalMs,5e3),baselineSettleSamples:n.baselineSettleSamples,baselineSampleCount:n.baselineSampleCount,restartMultiple:t(`CAMSTACK_POOL_MEM_MULTIPLE`,n.restartMultiple,1.5),floorBytes:t(`CAMSTACK_POOL_MEM_FLOOR_MB`,n.floorBytes/$,128)*$,ceilingBytes:t(`CAMSTACK_POOL_MEM_CEILING_MB`,n.ceilingBytes/$,256)*$,cooldownMs:t(`CAMSTACK_POOL_MEM_COOLDOWN_MS`,n.cooldownMs,6e4),maxRestartsPerWindow:t(`CAMSTACK_POOL_MEM_MAX_RESTARTS`,n.maxRestartsPerWindow,1),restartWindowMs:t(`CAMSTACK_POOL_MEM_RESTART_WINDOW_MS`,n.restartWindowMs,6e4)}}function lM(e){let t=t=>{let n=e.match(RegExp(`^${t}:\\s+(\\d+)\\s*kB`,`m`));return n?Number(n[1])*1024:null},n=t(`VmRSS`);if(n===null)return null;let r=e.match(/^Threads:\s+(\d+)/m);return{rssBytes:n,vmBytes:t(`VmSize`)??0,hwmBytes:t(`VmHWM`)??0,swapBytes:t(`VmSwap`)??0,threads:r?Number(r[1]):0}}function uM(){return{settleSeen:0,baselineWindow:[],baselineBytes:null,restartsAt:[],lastRestartAt:null}}function dM(e){let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function fM(e,t,n){if(e.baselineBytes!==null)return e;if(e.settleSeen<n.baselineSettleSamples)return{...e,settleSeen:e.settleSeen+1};let r=[...e.baselineWindow,t];return r.length<n.baselineSampleCount?{...e,baselineWindow:r}:{...e,baselineWindow:r,baselineBytes:dM(r)}}function pM(e,t){return e===null?t.ceilingBytes:Math.min(t.ceilingBytes,Math.max(t.floorBytes,t.restartMultiple*e))}function mM(e,t,n){return e.filter(e=>t-e<n.restartWindowMs)}function hM(e,t,n,r){let i=fM(e,t,r),a=pM(i.baselineBytes,r);if(t<=a)return{state:i,action:i.baselineBytes===null?`baseline-pending`:`ok`,baselineBytes:i.baselineBytes,thresholdBytes:a};let o=mM(i.restartsAt,n,r),s={...i,restartsAt:o};return o.length>=r.maxRestartsPerWindow?{state:s,action:`exhausted`,baselineBytes:i.baselineBytes,thresholdBytes:a}:s.lastRestartAt!==null&&n-s.lastRestartAt<r.cooldownMs?{state:s,action:`cooldown`,baselineBytes:i.baselineBytes,thresholdBytes:a}:{state:s,action:`restart`,baselineBytes:i.baselineBytes,thresholdBytes:a}}function gM(e,t){return{...uM(),restartsAt:[...e.restartsAt,t],lastRestartAt:t}}function _M(e){return{...uM(),restartsAt:e.restartsAt,lastRestartAt:e.lastRestartAt}}function vM(e){if(e.length===0)return null;let t=e[0];for(let n of e)n.rssBytes/n.thresholdBytes>t.rssBytes/t.thresholdBytes&&(t=n);return t.key}var yM=class{pools=new Map;timer=null;sweeping=!1;stopped=!1;opts;now;setTimer;clearTimer;constructor(e){this.opts=e,this.now=e.now??(()=>Date.now()),this.setTimer=e.setTimer??((e,t)=>setTimeout(e,t)),this.clearTimer=e.clearTimer??(e=>clearTimeout(e))}start(){this.timer||this.stopped||this.arm()}stop(){this.stopped=!0,this.timer&&=(this.clearTimer(this.timer),null)}arm(){let e=this.setTimer(()=>{this.sweep().finally(()=>{this.stopped||this.arm()})},this.opts.policy.sampleIntervalMs);typeof e.unref==`function`&&e.unref(),this.timer=e}async sweep(){if(!this.sweeping){this.sweeping=!0;try{await this.doSweep()}catch(e){this.opts.log.warn(`pool memory sweep failed`,{meta:{error:e instanceof Error?e.message:String(e)}})}finally{this.sweeping=!1}}}async doSweep(){let e=this.now(),t=await this.opts.sample(),n=[],r=new Map;for(let i of t){let t=this.pools.get(i.key),a=t?.state??uM();t&&t.pids.length>0&&!bM(t.pids,i.pids)&&(this.opts.log.warn(`pool process changed outside the watchdog — re-baselining`,{meta:{poolKey:i.key,previousPids:t.pids,pids:i.pids}}),a=_M(a));let o=hM(a,i.rssBytes,e,this.opts.policy);this.pools.set(i.key,{state:o.state,pids:i.pids}),r.set(i.key,o),this.opts.log.info(`pool memory`,{meta:{poolKey:i.key,pids:i.pids,rssMb:Math.round(i.rssBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),action:o.action,...i.meta}}),o.action===`restart`?n.push({key:i.key,rssBytes:i.rssBytes,thresholdBytes:o.thresholdBytes}):o.action===`cooldown`?this.opts.log.warn(`pool over memory threshold but inside restart cooldown`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),cooldownMs:this.opts.policy.cooldownMs}}):o.action===`exhausted`&&this.opts.log.error(`pool memory watchdog gave up — restart budget exhausted, pool leaks faster than restarts can pay for; needs a heap profile (py-spy / tracemalloc)`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),maxRestartsPerWindow:this.opts.policy.maxRestartsPerWindow,restartWindowMs:this.opts.policy.restartWindowMs}})}for(let e of[...this.pools.keys()])t.some(t=>t.key===e)||this.pools.delete(e);let i=vM(n);if(i===null)return;let a=n.find(e=>e.key===i),o=r.get(i),s=this.pools.get(i),c=s.state.restartsAt.length+1;this.opts.log.warn(`pool memory watchdog restarting pool — RSS over threshold`,{meta:{poolKey:i,pids:s.pids,rssMb:Math.round(a.rssBytes/$),thresholdMb:Math.round(a.thresholdBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),restartsInWindow:c,deferredCandidates:n.filter(e=>e.key!==i).map(e=>e.key)}});try{await this.opts.restart(i),this.pools.set(i,{state:gM(s.state,this.now()),pids:[]})}catch(e){this.opts.log.error(`pool memory watchdog restart failed`,{meta:{poolKey:i,error:e instanceof Error?e.message:String(e)}})}}};function bM(e,t){if(e.length!==t.length)return!1;let n=[...e].sort((e,t)=>e-t),r=[...t].sort((e,t)=>e-t);return n.every((e,t)=>e===r[t])}function xM(e,t,n){let r=t*n;if(r<=0||e.length===0)return Array.from({length:Math.max(0,r)}).fill(!1);let i=Array.from({length:r}).fill(!1);for(let r=0;r<n;r++)for(let a=0;a<t;a++){let o=(a+.5)/t,s=(r+.5)/n;for(let n of e)if(o>=n.x&&o<=n.x+n.w&&s>=n.y&&s<=n.y+n.h){i[r*t+a]=!0;break}}return i}function SM(e,t,n,r){if(t<=0||n<=0||r<=0)return[];let i=t*n,a=Array.from({length:i}).fill(!1),o=Math.min(e.length,i);for(let t=0;t<o;t++)a[t]=e[t]===!0;let s=[],c=[];for(let e=0;e<=n;e++){let r=[];if(e<n){let n=-1;for(let i=0;i<=t;i++){let o=i<t&&a[e*t+i]===!0;o&&n===-1?n=i:!o&&n!==-1&&(r.push({colStart:n,colEnd:i-1}),n=-1)}}let i=new Set,o=[];for(let t of c){let n=r.findIndex(e=>e.colStart===t.colStart&&e.colEnd===t.colEnd);n>=0?(o.push(t),i.add(n)):s.push({...t,rowEnd:e-1})}for(let t=0;t<r.length;t++)if(!i.has(t)){let n=r[t];o.push({colStart:n.colStart,colEnd:n.colEnd,rowStart:e})}c.length=0;for(let e of o)c.push(e)}if(s.length===0)return[];let l=s.slice().toSorted((e,t)=>{let n=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);return(t.colEnd-t.colStart+1)*(t.rowEnd-t.rowStart+1)-n});return(r>0?l.slice(0,r):l).map(e=>({x:e.colStart/t,y:e.rowStart/n,w:(e.colEnd-e.colStart+1)/t,h:(e.rowEnd-e.rowStart+1)/n}))}var CM=class{capacity;items;head=0;tail=0;count=0;constructor(e){this.capacity=e,this.items=Array.from({length:e})}get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){let t=[],n=Math.min(e,this.count);for(let e=0;e<n;e++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=n,t}};async function wM(e,t){let n=performance.now();try{return{output:t===void 0?await e():await EM(e(),t),durationMs:TM(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:TM(performance.now()-n),ok:!1,error:Pn(e)}}}function TM(e){return Math.round(e*100)/100}function EM(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(Error(`Inference timeout after ${t}ms`)),t);e.then(e=>{clearTimeout(i),n(e)}).catch(e=>{clearTimeout(i),r(e)})})}var DM={cpu:`onnx`,coreml:`onnx`,cuda:`onnx`,tensorrt:`onnx`,"onnx-py":`onnx`,pytorch:`pt`,openvino:`openvino`},OM={openvino:`openvino`,edgetpu:`tflite`,coreml:`coreml`,onnx:`onnx`,cpu:`onnx`,cuda:`onnx`};function kM(e){return OM[e]??`onnx`}var AM={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},jM={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function MM(e,t){return e===`node`?`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pytorch`,"onnx-py":`onnx`,cpu:`onnx`}[t]??t}function NM(e,t){return e===`node`?DM[t]??`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pt`,"onnx-py":`onnx`,cpu:`onnx`}[t]??`onnx`}function PM(e,t){return!e||e===`auto`?`auto`:MM(e,t??`cpu`)}function FM(e){return DM[e]??`onnx`}function IM(e){return AM[e]}function LM(e){return jM[e]}function RM(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function zM(e){let t=e instanceof Float32Array?e:Float32Array.from(e),n=new Uint8Array(t.length*4),r=new DataView(n.buffer);for(let e=0;e<t.length;e+=1)r.setFloat32(e*4,t[e]??0,!0);return Buffer.from(n).toString(`base64`)}function BM(e){let t=Buffer.from(e,`base64`);if(t.byteLength%4!=0)throw Error(`decodeVectorBase64: ${t.byteLength} bytes is not a whole number of Float32 values`);let n=new Float32Array(t.byteLength/4);for(let e=0;e<n.length;e+=1)n[e]=t.readFloatLE(e*4);return n}function VM(e){return Math.floor(Buffer.from(e,`base64`).byteLength/4)}function HM(e,t,n,r,i){if(n.length===0||t.length===0)return{passed:e,excluded:[]};let a=n.filter(e=>e.enabled!==!1),o=a.filter(e=>e.mode===`include`),s=a.filter(e=>e.mode===`exclude`),c=o.length>0,l=new Map(t.map(e=>[e.id,e])),u=[],d=[];for(let t of e){let e=r(t),n=i?.(t),a=o.some(t=>UM(t,e,n,l)),f=s.some(t=>UM(t,e,n,l));c?a&&!f?u.push(t):d.push(t):f?d.push(t):u.push(t)}return{passed:u,excluded:d}}function UM(e,t,n,r){if(e.classFilter&&e.classFilter.length>0&&n!==void 0&&!e.classFilter.includes(n))return!1;for(let n of e.zoneIds){let e=r.get(n);if(e&&WM(t,e.polygon))return!0}return!1}function WM(e,t){if(t.length<3)return!1;let n=!1,{x:r,y:i}=e;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a];o.y>i!=s.y>i&&r<(s.x-o.x)*(i-o.y)/(s.y-o.y||2**-52)+o.x&&(n=!n)}return n}function GM(e,t,n){let r={};for(let i of Object.keys(n))r[i]=n=>e.addons.custom.mutate({addonId:t,action:i,input:n});return r}var KM={value:`auto`,label:`Auto`},qM={value:`cpu`,label:`CPU`},JM={value:`usb`,label:`Coral USB`},YM=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[qM];let t=[qM];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.npu?.type===`apple-ane`&&t.push({value:`coreml`,label:`CoreML EP`}),t},defaultDevice:`cpu`},{id:`openvino`,supports:e=>e?.arch===`x64`&&e.platform!==`darwin`&&e.gpu?.type===`intel`,devices:e=>{if(!e)return[KM];let t=[KM,qM];return e.gpu?.type===`intel`&&t.push({value:`gpu`,label:`GPU`}),e.npu?.type===`intel-npu`&&t.push({value:`npu`,label:`NPU`}),t},defaultDevice:`auto`},{id:`coreml`,supports:e=>e?.platform===`darwin`,devices:e=>{let t={value:`all`,label:`All (ANE + GPU + CPU)`};if(!e)return[t];let n=[t];return e.npu?.type===`apple-ane`&&n.push({value:`ane`,label:`Apple Neural Engine`}),n.push({value:`gpu`,label:`GPU`},qM),n},defaultDevice:`all`},{id:`edgetpu`,supports:e=>e?.coral!=null,devices:()=>[JM],defaultDevice:`usb`}];function XM(e){let t=YM.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function ZM(e){return YM.filter(t=>t.supports(e)).map(e=>e.id)}function QM(e,t){return XM(e).devices(t)}function $M(e){return XM(e).defaultDevice}function eN(e){return e===`edgetpu`?`tflite`:IM(e)}function tN(e){let t=[];if(e.platform===`darwin`&&e.arch===`arm64`&&t.push({runtime:`python`,backend:`coreml`,format:`coreml`,score:95,reason:`Apple Neural Engine (Python CoreML)`,available:!0}),e.gpu?.type===`nvidia`&&t.push({runtime:`python`,backend:`cuda`,format:`onnx`,score:85,reason:`NVIDIA CUDA (Python ONNX Runtime)`,available:!0}),e.gpu?.type===`intel`){let n=e.npu?.type===`intel-npu`?90:80;t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:n,reason:`Intel OpenVINO`,available:!0})}e.coral!=null&&t.push({runtime:`python`,backend:`edgetpu`,format:`tflite`,score:70,reason:`Coral Edge TPU (Python LiteRT)`,available:!0}),t.push({runtime:`python`,backend:`cpu`,format:`onnx`,score:50,reason:`CPU (Python ONNX Runtime)`,available:!0});let n=t.toSorted((e,t)=>t.score-e.score);return{scores:n,best:n.find(e=>e.available)??n[n.length-1]}}var nN={cuda:`gpu`,edgetpu:`usb`,coreml:`all`,cpu:`cpu`};function rN(e,t,n,r){return{key:e===`cpu`?`cpu`:`${e}:${t}`,backend:e,device:t,format:n,runtime:`python`,score:r,available:!0}}function iN(e){let{scores:t}=tN(e),n=[];for(let r of t){if(r.backend===`openvino`){e.npu?.type===`intel-npu`&&n.push(rN(`openvino`,`npu`,r.format,r.score+2)),e.gpu?.type===`intel`&&n.push(rN(`openvino`,`gpu`,r.format,r.score));continue}if(r.backend===`edgetpu`){let t=Math.max(1,e.coral?.count??1);for(let e=0;e<t;e++){let t=e===0?`usb`:`usb:${e}`;n.push(rN(`edgetpu`,t,r.format,r.score))}continue}let t=nN[r.backend]??r.backend;n.push(rN(r.backend,t,r.format,r.score))}return n}export{QE as ACCESSORY_LABEL,yj as ACCESS_ROLES,Gn as ALEXA_EGRESS_PROFILE,pO as ALL_CAPABILITY_DEFINITIONS,Ff as APPLE_SA_TO_MACRO,Pr as AUDIO_ANALYSIS_CAP_NAME,Ds as AUDIO_BACKEND_CHOICES,Nf as AUDIO_MACRO_LABELS,sn as AUDIO_PRESETS,uy as AccessoriesStatusSchema,X as AccessoryKind,$d as AddBrokerInputSchema,My as AddonAutoUpdateSchema,Ey as AddonListItemSchema,qo as AddonPageDeclarationSchema,Go as AddonPageInfoSchema,Gl as AdoptionAdoptInputSchema,Kl as AdoptionAdoptResultSchema,wr as AdoptionCandidateResultSchema,Rl as AdoptionFilterSchema,Hl as AdoptionGetCandidateInputSchema,Tr as AdoptionJobSchema,Sr as AdoptionJobStateSchema,Bl as AdoptionListCandidatesInputSchema,Vl as AdoptionListCandidatesOutputSchema,Cr as AdoptionOutcomeSchema,ql as AdoptionReleaseInputSchema,Ul as AdoptionStatusSchema,s_ as AgentLoadSummarySchema,Wy as AirQualitySensorStatusSchema,$f as AlarmArmModeSchema,ep as AlarmPanelStatusSchema,Qf as AlarmStateSchema,hs as AlertSchema,fs as AlertSeveritySchema,ms as AlertSourceSchema,ps as AlertStatusSchema,Ky as AmbientLightSensorStatusSchema,Cm as ApiKeyRecordSchema,dE as ApiKeySummarySchema,Us as ArchiveEntrySchema,Ws as ArchiveManifestSchema,ff as AttachmentMediaTypeSchema,pf as AttachmentSchema,ws as AudioAnalysisResultSchema,Ts as AudioAnalysisSettingsSchema,xs as AudioChunkInputSchema,Jy as AudioClassSummarySchema,Cs as AudioClassificationLabelSchema,Es as AudioClassificationResultSchema,js as AudioCodecInfoSchema,Ms as AudioDecodeSessionConfigSchema,Bn as AudioEncodeSchema,Ns as AudioEncodeSessionConfigSchema,Fs as AudioEncodedChunkSchema,ah as AudioEventSchema,Ss as AudioLevelSchema,Xy as AudioMetricsHistoryPointSchema,Zy as AudioMetricsHistorySchema,Yy as AudioMetricsSnapshotSchema,Ps as AudioPcmChunkSchema,Rs as AuthResultSchema,jy as AutoUpdateSettingsSchema,No as AutomationActionSchema,Oo as AutomationConditionOperatorSchema,jo as AutomationConditionSchema,$y as AutomationControlStatusSchema,Po as AutomationRecipeSchema,Mo as AutomationTriggerSchema,Lx as AvailableIntegrationTypeSchema,DM as BACKEND_TO_FORMAT,Un as BASE_LIVE_EGRESS_PROFILE,SD as BATTERY_DEVICE_PROFILE,TD as BATTERY_UNREACHABLE_AFTER_MS,qt as BOOT_RECOVERY_BACKOFF_MS,kx as BacklightModeSchema,Bs as BackupDestinationInfoSchema,Hs as BackupEntrySchema,Pe as BaseAddon,iD as BaseDevice,oD as BaseDeviceProvider,tb as BatteryStatusSchema,rb as BinaryStatusSchema,H as BoundingBoxSchema,ab as BrightnessStatusSchema,ec as BrokerAddInputSchema,wc as BrokerAudioClientSchema,Oc as BrokerClientsSchema,Qd as BrokerConnectionDetailsSchema,Ec as BrokerConsumerAttributionSchema,Tc as BrokerConsumerKindSchema,Cc as BrokerDecodedClientSchema,Dc as BrokerEncodedClientSchema,pc as BrokerGetStateInputSchema,Zd as BrokerInfoSchema,Zs as BrokerProviderInfoSchema,lc as BrokerPublishInputSchema,Xs as BrokerRegistryStatusSchema,Sc as BrokerRtspClientSchema,ot as BrokerStatsSchema,Js as BrokerStatusEnum,at as BrokerStatusSchema,uc as BrokerSubscribeInputSchema,dc as BrokerSubscribeResultSchema,rc as BrokerTestConnectionResultSchema,fc as BrokerUnsubscribeInputSchema,Ir as CAMERA_SWITCH_CATALOG,Or as CAMERA_SWITCH_ORDER,ze as CAM_PROFILE_ORDER,dO as CAPABILITY_NAMES,fO as CAPABILITY_ROUTER_KEYS,uO as CAP_NAMES_WITH_STATUS,ht as CAP_NODE_PIN_CONTEXT_KEY,bO as CAP_PROVIDER_KIND_MAP,xA as CLUSTER_MODEL_SCOPED_STEPS,SA as CLUSTER_MODEL_SECTION_ID,MA as CLUSTER_STEP_SETTING_FIELDS,Of as COCO_80_LABELS,Mf as COCO_TO_MACRO,xb as CONNECTION_TEST_TIMEOUT_MS,tl as CORE_BLOCKS_ADDON_ID,el as CORE_BLOCK_ADDON_PREFIX,C as CamProfileSchema,AT as CamStreamDescriptorSchema,Be as CamStreamKindSchema,Ve as CamStreamResolutionSchema,p_ as CameraAssignmentStatusSchema,C_ as CameraAudioStatusSchema,m_ as CameraBrokerProfileSchema,h_ as CameraBrokerStatusSchema,cb as CameraCredentialsSchema,lb as CameraCredentialsStatusSchema,g_ as CameraDecoderShmSchema,__ as CameraDecoderStatusSchema,x_ as CameraDetectionPhaseSchema,b_ as CameraDetectionProvisioningSchema,y_ as CameraDetectionProvisioningStateSchema,S_ as CameraDetectionStatusSchema,wg as CameraMetricsSchema,Tg as CameraMetricsWithDeviceIdSchema,v_ as CameraMotionStatusSchema,w_ as CameraRecordingModeSchema,T_ as CameraRecordingStatusSchema,f_ as CameraSourceStatusSchema,d_ as CameraSourceStreamSchema,D_ as CameraStatusDegradationReasonSchema,O_ as CameraStatusDegradationSchema,A_ as CameraStatusSchema,E_ as CameraStatusStageSchema,He as CameraStreamSchema,kr as CameraSwitchAuthoritySchema,Mr as CameraSwitchGroupSchema,Dr as CameraSwitchIdSchema,jr as CameraSwitchSchema,Ar as CameraSwitchUnavailableReasonSchema,zl as CandidateQueryFilterSchema,vm as CapScopeSchema,l_ as CapabilityBindingsSchema,db as CarbonMonoxideStatusSchema,Mt as ChargingStatus,zS as ClientNetworkStatsSchema,mb as ClimateControlStatusSchema,iy as ClipPlaybackSchema,ry as ClipSchema,YS as ClusterAddonNodeDeploymentSchema,XS as ClusterAddonStatusEntrySchema,vl as CollectionColumnSchema,yl as CollectionIndexSchema,yb as ColorStatusSchema,vu as ConfigEntrySchema,es as ConfigSectionWithValuesSchema,$o as ConfigTabDeclarationSchema,wb as ConnectionTestDescriptorSchema,Cb as ConnectionTestInputSchema,Sb as ConnectionTestOutcomeSchema,Eb as ConnectivityStatusSchema,Ob as ConsumableItemSchema,kb as ConsumablesStatusSchema,jb as ContactStatusSchema,Nb as ControlKindSchema,Pb as ControlStatusSchema,Sa as ConvertArtifactSchema,Ca as ConvertResultSchema,ba as ConvertTargetSchema,cl as CoreBlockCompileResultSchema,ol as CoreBlockInputSchema,il as CoreBlockPlacementSchema,sl as CoreBlockSchema,al as CoreBlockStatusSchema,Lb as CoverStateSchema,Rb as CoverStatusSchema,fE as CreateApiKeyInputSchema,pE as CreateApiKeyResultSchema,Bx as CreateIntegrationInputSchema,hE as CreateScopedTokenInputSchema,gE as CreateScopedTokenResultSchema,lE as CreateUserInputSchema,Hy as CustomActionInputSchema,pl as CustomModelDescriptorSchema,Re as DATAPLANE_SECRET_HEADER,lD as DECLARED_DEVICE_SWEEP_LIMIT,sD as DECLARED_INTEGRATION_FIXED_KEY,mr as DEFAULT_ADDON_PLACEMENT,Os as DEFAULT_AUDIO_ANALYZER_CONFIG,TA as DEFAULT_CLUSTER_STEP_MODELS,LA as DEFAULT_CLUSTER_STEP_SETTINGS,wl as DEFAULT_DECODER_HWACCEL_CONFIG,WA as DEFAULT_DETAIL_CROP_CONVENTION,hi as DEFAULT_EVENTS_BAND_BUFFER_SEC,zf as DEFAULT_EVENT_COLOR,Zr as DEFAULT_FEATURES,jA as DEFAULT_MIN_LANDMARK_FACE_SIZE_PX,Q as DEFAULT_NATIVE_LEASE_SETTINGS,sM as DEFAULT_POOL_MEMORY_POLICY,Ei as DEFAULT_RECORDING_PROFILES,Er as DEFAULT_RETENTION,yt as DEFAULT_RUNTIME_STATE_DURABILITY,yi as DEFAULT_SCRUB_THUMBNAIL_PRESET,gA as DEFAULT_TIMELAPSE_PREVIEW_TEXT,YA as DETAIL_CROP_PADDING_FIELD,VA as DETAIL_CROP_PADDING_KEY,BA as DETAIL_CROP_SECTION_ID,HA as DETAIL_CROP_SQUARE_KEY,Af as DETECTION_MACRO_CLASSES,Nr as DETECTION_PIPELINE_CAP_NAME,OM as DEVICE_BACKEND_TO_FORMAT,gO as DEVICE_CAP_NAMES,CD as DEVICE_PROFILES,Gt as DEVICE_SCOPED_CAPS,Ct as DEVICE_SETTINGS_CONTRIBUTION_METHODS,KE as DEVICE_STATE_READERS,wt as DEVICE_STATUS_METHOD,dD as DEVICE_TYPE_CONTROL_KIND,Lj as DEVICE_TYPE_INFO,xl as DataStoreEngineInfoSchema,Bb as DayNightModeSchema,Ub as DayNightOptionsSchema,Wb as DayNightSettingsPatchSchema,Hb as DayNightStatusSchema,uD as DeclaredDevices,nt as DecodedAudioChunkSchema,Qe as DecodedFrameSchema,Ji as DecoderSessionConfigSchema,qi as DecoderStatsSchema,Hx as DeleteIntegrationResultSchema,UA as DetailCropConventionSchema,th as DetectionSourceSchema,Yx as DeviceCodeSeveritySchema,eD as DeviceConfig,Il as DeviceDiscoveryStatusSchema,ru as DeviceExportExposeInputSchema,eu as DeviceExportStatusSchema,iu as DeviceExportUnexposeInputSchema,jt as DeviceFeature,_u as DeviceInfoSchema,BS as DeviceNetworkStatsSchema,k as DeviceRole,tD as DeviceRuntimeState,ym as DeviceSelectorSchema,Kb as DeviceStatusSchema,O as DeviceType,Fl as DiscoveredChildDeviceSchema,Pl as DiscoveredChildStatusSchema,su as DiscoveredDeviceSchema,Cf as DiscoveredTargetSchema,k_ as DiskReconcileJobSchema,Le as DisposerChain,Yb as DoorbellPressEventSchema,Jb as DoorbellStatusSchema,V_ as EVENTFUL_CAP_NAMES,B_ as EVENT_KIND_BY_CAP,si as EVENT_PAD_MS,Uf as EVENT_TAXONOMY,Kw as EXPORT_DENSE_MAX_RANGES,Na as EXPRESSION_BUILTINS,Pa as EXPRESSION_BUILTIN_NAMES,Ba as EXPRESSION_COMPILE_CACHE_CAPACITY,Va as EXPRESSION_IDENTIFIER_RE,_o as EXPRESSION_INJECTED_NOW,Pc as EgressEncodeSchema,Fc as EgressRateControlSchema,Ic as EgressTranscodeRequestSchema,Lc as EgressTranscodeSchema,tM as ElementConfigStore,ju as EmbeddingInfoSchema,Au as EmbeddingResultSchema,Vn as EncodeProfileSchema,Ze as EncodedPacketSchema,us as EnrichedWidgetMetadataSchema,Zb as EnumSensorDateTimeFormatSchema,Qb as EnumSensorStatusSchema,me as EventCategory,tx as EventEmitterStatusSchema,ex as EventFireSchema,rx as EventItemSchema,jm as EventKindCategorySchema,Nm as EventKindDescriptorSchema,Am as EventKindIconSchema,Om as EventKindSchema,Pm as EventKindsForDeviceSchema,vc as EventMediaArtifactSchema,yc as EventMediaCoverageSchema,_c as EventMediaKindSchema,bc as EventMediaProductionSchema,Nn as EventSourceType,eT as ExportBytesSchema,Gw as ExportDenseRangeSchema,qw as ExportDenseSchema,Qw as ExportDownloadSchema,Yw as ExportOptionsSchema,Zw as ExportRecordSchema,Ql as ExportSetupFieldSchema,$l as ExportSetupSchema,Ww as ExportSpeedSchema,Xw as ExportStateSchema,Jw as ExportTimelapseSchema,nu as ExposedDeviceSchema,Ox as ExposureModeSchema,wo as ExpressionBindingSourceSchema,L as ExpressionEvalError,xo as ExpressionFieldBindingSchema,Co as ExpressionGlobalBindingSchema,So as ExpressionLiteralBindingSchema,I as ExpressionParseError,To as ExpressionSourceSchema,JA as FULL_IMAGE_BBOX,fx as FanControlStatusSchema,dx as FanDirectionSchema,KT as FeatureManifestSchema,mx as FeatureProbeStatusSchema,gx as FloodStatusSchema,An as Fmp4BoxSplitter,$e as FrameHandleFormatSchema,w as FrameHandleSchema,ys as FrameInputSchema,vx as GasStatusSchema,Mc as GetStreamWithCodecInputSchema,c_ as GlobalMetricsSchema,Zn as HAP_AUDIO_BASE,Xn as HAP_AUDIO_BITRATE_KBPS,Qn as HAP_AUDIO_VBV_KBITS,$n as HAP_KEYFRAME_INTERVAL_SEC,XE as HF_BASE_URL,YE as HF_REPO,Cl as HWACCEL_OPTIONS,qT as HealthStatusSchema,cd as HfModelResolutionSchema,BE as HistoryPointSchema,RE as HistoryResolutionEnum,bx as HumidifierStatusSchema,Sx as HumiditySensorStatusSchema,pb as HvacModeSchema,j_ as INFERENCE_DEVICE_EXCLUSION_REASONS,K_ as ImageContractSchema,G_ as ImageContractStateSchema,Ex as ImageRotateSchema,Mx as ImageSettingsOptionsSchema,Nx as ImageSettingsPatchSchema,jx as ImageSettingsStatusSchema,wx as ImageStatusSchema,M_ as InferenceDeviceExclusionReasonSchema,u_ as IngestOwnerSchema,Dy as InstalledPackageSchema,Ix as IntegrationLiteSchema,Fx as IntegrationWithStateSchema,Wx as IntercomAbilitySchema,Gx as IntercomStatusSchema,hO as KNOWN_CAP_NAMES,jh as KeyEventSchema,Qr as LOG_LEVEL_RANK,Jm as LabelAttributionSchema,ta as LabelDefinitionSchema,qm as LabelTierSchema,Jx as LawnMowerActivitySchema,Xx as LawnMowerControlStatusSchema,bu as LinkedDeviceSchema,yu as LinkedDevicesModeSchema,ad as LlmDefaultSchema,id as LlmDefaultSelectorSchema,Ju as LlmDownloadProgressSchema,Lu as LlmErrorCodeSchema,Wu as LlmGenerateBaseInputSchema,zu as LlmGenerateErrSchema,Ru as LlmGenerateOkSchema,Bu as LlmGenerateResultSchema,Vu as LlmImageSchema,Xu as LlmNodeModelSchema,rd as LlmProfileKindDescriptorSchema,ed as LlmProfileKindSchema,td as LlmProfileSchema,Hu as LlmRetryPolicySchema,Qu as LlmRuntimeCompleteInputSchema,Zu as LlmRuntimeDiskUsageSchema,ld as LlmRuntimeNodeSchema,Yu as LlmRuntimeStatusSchema,Uu as LlmTimeoutDefaults,od as LlmUsageRollupSchema,Iu as LlmUsageSchema,Bw as LocateSegmentResultSchema,Gs as LocationStatSchema,dS as LockControlStatusSchema,uS as LockStateSchema,md as LogEntrySchema,pd as LogLevelSchema,By as LogStreamEntrySchema,bd as LoginMethodContributionSchema,gd as LoginStageEnum,kf as MACRO_LABELS,ty as MAX_CLIP_EVENT_IDS,ny as MAX_CLIP_LABELS,Eo as MAX_CONDITION_DEPTH,Do as MAX_CONDITION_LEAVES,Ia as MAX_EXPRESSION_AST_NODES,Ra as MAX_EXPRESSION_BINDINGS,za as MAX_EXPRESSION_CALL_ARGS,La as MAX_EXPRESSION_EVAL_STEPS,Fa as MAX_EXPRESSION_SOURCE_LENGTH,mO as METHOD_ACCESS_MAP,vO as METHOD_DEVICE_SELECTORS,ha as MODEL_FORMATS,mD as MOTION_TRIGGER_FEATURE,sd as ManagedModelCatalogEntrySchema,Gu as ManagedModelExtraFileSchema,Ku as ManagedModelRefSchema,qu as ManagedRuntimeConfigSchema,lp as MaskGridDimsSchema,ip as MaskGridShapeSchema,ap as MaskLineShapeSchema,np as MaskPointSchema,rp as MaskPolygonShapeSchema,cp as MaskPolygonVerticesSchema,K as MaskRectShapeSchema,sp as MaskShapeKindSchema,op as MaskShapeSchema,ch as MediaFileInfoSchema,sh as MediaFileSchema,mS as MediaPlayerRepeatSchema,pS as MediaPlayerStateSchema,gS as MediaPlayerStatusSchema,yS as MeshPeerSchema,bS as MeshStatusSchema,hm as MethodAccessSchema,ya as ModelCatalogEntrySchema,Vd as ModelConvertInputSchema,xa as ModelConvertMetadataSchema,Ud as ModelDistributeInputSchema,Wd as ModelDistributeResultSchema,ga as ModelExtraFileSchema,F as ModelFormatEntrySchema,_a as ModelFormatsSchema,ag as ModelSubstitutionSchema,va as ModelVariantGroupSchema,qd as MotionAnalysisResultSchema,eh as MotionEventSchema,CS as MotionOnMotionChangedDataSchema,Kd as MotionRegionSchema,Ug as MotionSourceEnum,Wg as MotionSourcesSchema,SS as MotionStatusSchema,ES as MotionTriggerRuntimeStateSchema,TS as MotionTriggerStatusSchema,AS as MotionZoneOptionsSchema,jS as MotionZonePatchSchema,OS as MotionZoneRegionSchema,kS as MotionZoneStatusSchema,of as MqttBrokerStatusSchema,gl as MutationFilterSchema,uj as NATIVE_LEASE_ACTIVITY_FIELD,rj as NATIVE_LEASE_ACTIVITY_KEY,fj as NATIVE_LEASE_ADMISSION_FIELD,ij as NATIVE_LEASE_ADMISSION_KEY,lj as NATIVE_LEASE_BUDGET_FIELD,nj as NATIVE_LEASE_BUDGET_KEY,cj as NATIVE_LEASE_HOLD_FIELD,tj as NATIVE_LEASE_HOLD_KEY,ej as NATIVE_LEASE_SECTION_ID,dj as NATIVE_LEASE_TILE_BUDGET_FIELD,aj as NATIVE_LEASE_TILE_BUDGET_KEY,mp as NC_ALARM_SYSTEM_EVENT_KINDS,Cp as NC_AUDIO_DBFS_FLOOR,NO as NC_AUDIO_DB_MAX,MO as NC_AUDIO_DB_MIN,FO as NC_AUDIO_DB_OFFERED,PO as NC_AUDIO_DB_STEP,BO as NC_AUDIO_DEFAULTS,LO as NC_AUDIO_HIT_PERCENT_MAX,IO as NC_AUDIO_HIT_PERCENT_MIN,zO as NC_AUDIO_SAMPLING_MAX_SEC,RO as NC_AUDIO_SAMPLING_MIN_SEC,Wk as NC_AUDIO_SEED,pp as NC_AUTHORABLE_SYSTEM_EVENT_KINDS,ik as NC_BASE_CONDITION_KEYS,Xp as NC_CONDITION_CATALOG,Hp as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX,Vp as NC_CONFIRM_DEFAULT_TIMEOUT_MS,Bp as NC_CONFIRM_MAX_TIMEOUT_MS,zp as NC_CONFIRM_MIN_TIMEOUT_MS,vp as NC_DEFAULT_SNOOZE_MINUTES,tm as NC_HISTORY_LIMIT_DEFAULT,nm as NC_HISTORY_LIMIT_MAX,gp as NC_MAX_PER_TRACK_IMMEDIATE,Uk as NC_OCCUPANCY_DEFAULTS,qk as NC_RULE_EDITOR_SECTION_ORDER,Ok as NC_RULE_KIND_SPECS,Ik as NC_RULE_SECTIONS,_p as NC_SNOOZE_MAX_MINUTES,Ak as NC_SYSTEM_DELIVERY,$k as NC_SYSTEM_EVENT_FILTER_KEYS,Zf as NC_TAXONOMY,Ag as NativeCropBboxSchema,Kh as NativeCropRefSchema,jg as NativeCropResultSchema,PS as NativeDetectionSchema,oj as NativeLeaseAdmissionSchema,sj as NativeLeaseSettingsSchema,NS as NativeObjectClassEnum,IS as NativeObjectDetectionRuntimeStateSchema,FS as NativeObjectDetectionStatusSchema,pm as NcAlarmConfigSchema,fm as NcAlarmModeCoverageSchema,lm as NcAlarmSettingsPatchSchema,cm as NcAlarmSettingsSchema,um as NcAlarmSkipReasonSchema,dm as NcAlarmSkippedDeviceSchema,wp as NcAudioConditionSchema,Yp as NcConditionDescriptorSchema,Np as NcConditionsSchema,Up as NcConfirmExpectSchema,Wp as NcConfirmSchema,Tp as NcCrossingSchema,up as NcDeliverySchema,jp as NcDeviceStateConditionSchema,em as NcHistoryEntrySchema,rm as NcHistoryFilterSchema,Qp as NcHistoryRecordKindSchema,Zp as NcHistoryStatusSchema,$p as NcHistorySubjectSchema,Fp as NcMediaFrameSchema,Ip as NcMediaPolicySchema,Sp as NcOccupancyConditionSchema,xp as NcPlateMatcherSchema,Dp as NcRuleActionSchema,Op as NcRuleActionSequenceSchema,Ap as NcRuleActionsSchema,Gp as NcRuleInputSchema,kp as NcRuleNotificationButtonSchema,Kp as NcRulePatchSchema,qp as NcRuleSchema,Pp as NcRuleTargetSchema,Mp as NcSceneConditionSchema,bp as NcScheduleSchema,yp as NcScheduleWindowSchema,am as NcSnoozeInputSchema,om as NcSnoozeSchema,im as NcSnoozeScopeSchema,sm as NcSnoozeSuppressedSchema,hp as NcSystemEventConditionSchema,dp as NcSystemEventKindSchema,qf as NcTaxonomyEntrySchema,Jf as NcTaxonomySchema,Jp as NcTestResultSchema,Lp as NcThrottleGranularitySchema,Rp as NcThrottleSchema,Ep as NcZoneConditionSchema,lf as NetworkAccessStatusSchema,JT as NetworkAddressSchema,cf as NetworkEndpointSchema,hf as NotificationActionIconSchema,gf as NotificationActionSchema,mf as NotificationFormatSchema,_f as NotificationSchema,sC as NotifierStatusSchema,dC as NumericSensorStatusSchema,RD as OPERATOR_WRITTEN_STALE_MS,oi as OPS_LOG_DEFAULT_LIMIT,ai as OPS_LOG_RING_DEFAULT_MAX,Tm as OauthIntegrationDescriptorSchema,ih as ObjectEventSchema,ei as OpsLogDomainSchema,ri as OpsLogEntrySchema,ti as OpsLogOpSchema,ii as OpsLogQueryInputSchema,ni as OpsLogReasonSchema,Cg as OrchestratorMetricsSchema,pC as OsdOverlayKindEnum,_C as OsdOverlayPatchSchema,hC as OsdOverlaySchema,mC as OsdPositionEnum,SC as OsdRenderOutcomeEnum,CC as OsdRenderResultSchema,bC as OsdSlotBindingSchema,xC as OsdSlotViewSchema,TC as OsdSourceOptionSchema,yC as OsdSourceSchema,wC as OsdSourceValueTypeEnum,gC as OsdStatusSchema,OC as PET_FEEDER_MANUAL_FEED_MAX,DC as PET_FEEDER_MANUAL_FEED_MIN,WE as PIPELINE_FLOW_CAPABILITY_NAMES,GE as PIPELINE_OWNER_CAPABILITY_NAMES,Fr as PRIVACY_MASK_CAP_NAME,xO as PROVIDER_KIND_CAP_NAMES,jM as PYTHON_SCRIPT,Oy as PackageUpdateSchema,ky as PackageVersionInfoSchema,yd as PasskeyLoginMethodSchema,Fv as PasskeySummarySchema,As as PcmSampleFormatSchema,PE as PerScopeBreakdownSchema,jC as PetFeederStatusSchema,Vc as PickStreamPreferencesSchema,Bc as PickStreamRequirementsSchema,Hc as PickedCamStreamSchema,o_ as PipelineAssignmentSchema,Xh as PipelineDefaultStepSchema,J as PipelineEngineChoiceSchema,xg as PipelineRunResultBridge,Y as PipelineStepInputSchema,og as PipelineValidationIssueSchema,sg as PipelineValidationResultSchema,kc as PlaceholderReasonSchema,Dg as PolygonPointSchema,yM as PoolMemoryWatchdog,tw as PowerMeterStatusSchema,iw as PresenceStatusSchema,ow as PressureSensorStatusSchema,dw as PrivacyMaskOptionsSchema,fw as PrivacyMaskPatchSchema,lw as PrivacyMaskRegionSchema,cw as PrivacyMaskShapeSchema,uw as PrivacyMaskStatusSchema,st as ProfileRtspEntrySchema,We as ProfileSlotSchema,Ue as ProfileSlotStatusSchema,ou as ProviderStatusSchema,ww as PtzAutotrackRuntimeStateSchema,xw as PtzAutotrackSettingsSchema,Cw as PtzAutotrackStatusSchema,Sw as PtzAutotrackTargetOptionSchema,_w as PtzMoveCommandSchema,yw as PtzOptionsSchema,gw as PtzPositionSchema,hw as PtzPresetSchema,vw as PtzStatusSchema,hl as QueryFilterSchema,qn as RATE_CONTROL_RELAXED,Kn as RATE_CONTROL_TIGHT,MD as REACHABILITY_FAILURES_TO_OFFLINE,jD as REACHABILITY_POLL_INTERVAL_MS,ND as REACHABILITY_PROBE_TIMEOUT_MS,Wi as RECOGNITION_TYPES,$w as RECORDING_EXPORT_MAX_READ_BYTES,Ha as RESERVED_BINDING_NAMES,DO as RESTORED_CAP_NAMES,ZE as RUNTIME_DEFAULTS,CO as RUNTIME_STATE_POLICY,LD as RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS,AM as RUNTIME_TO_FORMAT,Rt as RawStateResultSchema,Hw as ReadGopBytesResultSchema,Vw as ReadSegmentBytesResultSchema,ft as ReadinessRegistry,ct as ReadinessTimeoutError,kh as RecentTracksPageSchema,Oh as RecentTracksQueryInput,kw as RecordingAvailabilitySchema,fi as RecordingBandModeSchema,mi as RecordingBandSchema,pi as RecordingBandTriggersSchema,wi as RecordingConfigSchema,Aw as RecordingDaysSchema,Mw as RecordingDeviceUsageSchema,Nw as RecordingLocationUsageSchema,jw as RecordingManifestSchema,Ow as RecordingRangeSchema,zw as RecordingRebalanceInputSchema,Fw as RecordingRebalanceMoveSchema,Rw as RecordingRebalancePlanSchema,Iw as RecordingRebalanceSkipReasonSchema,Lw as RecordingRebalanceSkipSchema,_i as RecordingRetentionSchema,Dw as RecordingStatusSchema,ui as RecordingStorageModeSchema,Pw as RecordingStorageUsageSchema,di as RecordingTriggersSchema,ci as RecordingWeekdaySchema,_d as RedirectLoginMethodSchema,Ai as RelocateFootageClassSchema,ji as RelocateFootageInputSchema,ki as RelocateJobSchema,Oi as RelocateJobStateSchema,Ni as RelocateMediaInputSchema,wf as RenderedAsSchema,Gg as ReportMotionInputSchema,mh as RetrainAnnotationDraftSchema,uh as RetrainAnnotationKindSchema,ph as RetrainAnnotationSchema,dh as RetrainAnnotationSourceSchema,Sh as RetrainAssistResultSchema,xh as RetrainAssistSubjectSchema,vh as RetrainCopyRefusalSchema,gh as RetrainFrameCandidateSchema,bh as RetrainFrameListSchema,_h as RetrainFrameSchema,yh as RetrainFrameSelectionSchema,lh as RetrainMacroClassSchema,Hm as RetrainStatusSchema,hh as RetrainTrackSchema,Ch as RetrainTransitionResultSchema,CM as RingBuffer,Nc as RtpSourceSchema,xc as RtspRestreamEntrySchema,Jg as RunnerCameraConfigSchema,Yg as RunnerCameraDeviceUIFields,Kg as RunnerFrameSourceSchema,qg as RunnerInferenceDeviceSchema,Xg as RunnerLocalLoadSchema,Zg as RunnerLocalMetricsSchema,rT as SCENE_CONDITIONS,_T as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX,gT as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS,mT as SCENE_DEFAULT_ANCHOR_THRESHOLD,pT as SCENE_DEFAULT_CHECK_INTERVAL_SEC,fT as SCENE_DEFAULT_OBSERVATION_SPACING_SEC,dT as SCENE_DEFAULT_QUIET_SECONDS,hT as SCENE_DEFAULT_UNCOVERED_POLICY,aT as SCENE_DIVERGED,vT as SCENE_RESET_RECAPTURES,OO as SCOPE_PRESETS,bi as SCRUB_THUMBNAIL_PRESETS,xi as SCRUB_THUMBNAIL_PRESET_LABELS,Si as SCRUB_THUMBNAIL_PRESET_ORDER,gD as SENSOR_FEATURES,vD as SENSOR_MAP,Ml as SOURCE_INFO_METADATA_KEY,BT as STREAM_PROFILE_META,Vr as STREAM_QUALITY_LABELS,Ui as SUB_DETECTION_TYPES,_O as SYSTEM_CAP_NAMES,yO as SYSTEM_SCOPE_DEVICE_METHODS,uT as SceneCheckSchema,nT as SceneConditionSchema,yT as SceneConfirmSchema,bT as SceneMonitorSchema,lT as SceneMonitorStateSchema,xT as SceneMonitorStatusSchema,cT as SceneReferenceSchema,sT as SceneUnavailableSchema,iT as SceneUncoveredPolicySchema,oT as SceneVerdictSchema,wm as ScopedTokenSchema,mE as ScopedTokenSummarySchema,Ph as ScoredObjectEventSchema,ET as ScriptRunnerStatusSchema,vi as ScrubThumbnailPresetSchema,Ay as SearchResultSchema,$_ as SendEmailInputSchema,ev as SendEmailResultSchema,Tf as SendResultSchema,Fm as SensorEventSchema,U_ as ServerBootModeSchema,J_ as ServerPackageStatusSchema,q_ as ServerRollbackInfoSchema,X_ as ServerUpdateActionResultSchema,Y_ as ServerUpdateCheckResultSchema,W_ as ServerUpdateStateSchema,QT as SetSiteLocationInputSchema,ns as SettingsPatchSchema,_l as SettingsRecordSchema,ts as SettingsSchemaWithValuesSchema,rs as SettingsUpdateResultSchema,Tl as ShmRingStatsSchema,XT as SiteLocationSchema,YT as SiteLocationSourceSchema,ZT as SiteLocationStatusSchema,OT as SmokeStatusSchema,tv as SmtpStatusSchema,rv as SnapshotImageSchema,Ol as SourceInfoSchema,bs as SpatialDetectionSchema,ov as SsoBridgeClaimsSchema,rf as StartEmbeddedInputSchema,IE as StationaryObjectSchema,bv as StorageAbortUploadInputSchema,xv as StorageBeginDownloadInputSchema,Sv as StorageBeginDownloadResultSchema,gv as StorageBeginUploadInputSchema,_v as StorageBeginUploadResultSchema,wv as StorageEndDownloadInputSchema,yv as StorageFinalizeUploadInputSchema,Ki as StorageLocationDeclarationSchema,P as StorageLocationRefSchema,N as StorageLocationSchema,Gi as StorageLocationTypeSchema,Fi as StorageMigrationClassSchema,Ii as StorageMigrationDestinationsSchema,Mi as StorageMigrationFootageMoveInputSchema,Li as StorageMigrationInputSchema,Vi as StorageMigrationJobSchema,M as StorageMigrationLeaseInputSchema,Pi as StorageMigrationMediaMoveInputSchema,Bi as StorageMigrationMoveSchema,zi as StorageMigrationParticipantSchema,Ri as StorageMigrationPhaseSchema,Hi as StorageMigrationPlanSchema,mv as StorageProviderInfoSchema,Cv as StorageReadChunkInputSchema,hv as StorageTestLocationResultSchema,vv as StorageWriteChunkInputSchema,zc as StreamCodecSchema,gc as StreamFormatSchema,RS as StreamNetworkStatsSchema,LT as StreamParamsOptionsSchema,FT as StreamParamsStatusSchema,PT as StreamProfileConfigSchema,IT as StreamProfileOptionsSchema,RT as StreamProfilePatchSchema,NT as StreamProfileSchema,Ye as StreamSourceEntrySchema,Xe as StreamSourceSchema,rt as SubscribeAudioChunksInputSchema,it as SubscribeAudioChunksResultSchema,et as SubscribeFramesInputSchema,tt as SubscribeFramesResultSchema,WT as SwitchStatusSchema,zd as SystemMetricsSchema,YD as SystemMirror,U as TAXONOMY_COLORS,lA as TIMELAPSE_DENSE_FLOOR_SEC,Zi as TIMEZONES,Yn as TRANSCODE_DOWN_MAX_BITRATE_KBPS,Jn as TRANSCODE_DOWN_MAX_HEIGHT,eE as TamperStatusSchema,SE as TankStatusSchema,yf as TargetKindCapsSchema,vf as TargetKindLevelSchema,xf as TargetKindSchema,Sf as TargetSchema,nE as TemperatureSensorStatusSchema,Ov as TerminalInstanceInfoSchema,kv as TerminalLegacyCameraSchema,jv as TerminalOutputBatchSchema,Av as TerminalOutputEventSchema,Dv as TerminalProfileInfoSchema,Ev as TerminalSessionInfoSchema,zx as TestConnectionResultSchema,Rx as TestConnectionStatusEnum,Ef as TestResultSchema,hA as TimelapseRuleInputSchema,_A as TimelapseRulePatchSchema,vA as TimelapseRuleSchema,nA as TimelapseTemplateSchema,iE as ToastSchema,q as TokenScopeSchema,qS as TopologyNodeSchema,US as TopologyProcessSchema,HS as TopologyServiceSchema,Ih as TrackCascadeCountsSchema,Rm as TrackEnvelopeSchema,Gm as TrackFlagsPatchSchema,Km as TrackFlagsSchema,zm as TrackProjectionSchema,Qm as TrackSchema,Vm as TrackSourceSchema,Dm as TrackStateSchema,km as TrackZoneFilterSchema,Mh as TrackedDetectionSchema,Xm as TrainingExportDeviceTotalsSchema,Zm as TrainingExportSummarySchema,Nv as TurnServerSchema,Rj as UNIT_TABLE,Ys as UnifiedBrokerInfoSchema,zj as UnitConversionError,Vx as UpdateIntegrationInputSchema,oE as UpdateStatusSchema,uE as UpdateUserInputSchema,Sm as UserRecordSchema,cE as UserSummarySchema,gi as VISIT_MERGE_GAP_MS,CE as VacuumControlStatusSchema,xE as VacuumStateSchema,TE as ValveStateSchema,EE as ValveStatusSchema,Hv as VectorDeclareIndexInputSchema,Jv as VectorDeleteByFilterInputSchema,qv as VectorDeleteInputSchema,Yv as VectorDeleteResultSchema,zv as VectorFilterSchema,Xv as VectorGetInputSchema,Zv as VectorGetResultSchema,Bv as VectorItemSchema,Vv as VectorMatchSchema,Rv as VectorMetadataSchema,Lv as VectorMetricSchema,Gv as VectorQueryInputSchema,Kv as VectorQueryResultSchema,Qv as VectorStatsInputSchema,$v as VectorStatsResultSchema,Uv as VectorUpsertInputSchema,Wv as VectorUpsertResultSchema,OE as VibrationStatusSchema,zn as VideoEncodeSchema,Wn as WEBRTC_EGRESS_PROFILE,he as WELL_KNOWN_TABS,ge as WELL_KNOWN_TAB_MAP,AE as WaterHeaterStatusSchema,ME as WeatherStatusSchema,cy as WebrtcStreamChoiceSchema,sy as WebrtcStreamTargetSchema,Dx as WhiteBalanceModeSchema,as as WidgetHostEnum,vd as WidgetLoginMethodSchema,cs as WidgetMetadataSchema,ss as WidgetRemoteSchema,os as WidgetSizeEnum,Pf as YAMNET_TO_MACRO,nh as ZoneCrossingDirectionSchema,rh as ZoneCrossingSchema,Eg as ZoneKindEnum,CT as ZoneRuleModeEnum,wT as ZoneRuleSchema,HE as ZoneRuleStageEnum,TT as ZoneRulesArraySchema,Og as ZoneSchema,FE as ZoneScopeBreakdownSchema,dy as accessoriesCapability,$E as accessoryStableId,Ko as addonPagesCapability,Jo as addonPagesSourceCapability,Qo as addonRoutesCapability,is as addonSettingsCapability,ds as addonWidgetsCapability,ls as addonWidgetsSourceCapability,Uy as addonsCapability,At as adminUiCapability,Gy as airQualitySensorCapability,tp as alarmPanelCapability,gs as alertsCapability,qy as ambientLightSensorCapability,$t as asBoolean,Xt as asJsonArray,Yt as asJsonObject,Qt as asNumber,Zt as asString,yA as assertTimelapseCadences,_s as audioAnalysisCapability,ks as audioAnalyzerCapability,Ls as audioCodecCapability,UO as audioIsFailClosed,jO as audioKindId,qO as audioLabelChoices,Qy as audioMetricsCapability,HO as audioModeOf,VO as audioOrDefaults,Tn as audioPlanFromEncodeProfile,zs as authProviderCapability,Xr as autoAssignProfiles,eb as automationControlCapability,qs as backupCapability,Qj as bareAddonId,nb as batteryCapability,Xj as bestLocationMatch,ib as binaryCapability,GM as bindAddonActions,ob as brightnessCapability,mc as brokerCapability,Fn as buildAddonRouteProvider,mn as buildAudioArgs,H_ as buildEventKindDescriptor,Sn as buildFfmpegArgs,un as buildInputArgs,fa as buildModelVariantGroups,Xf as buildNcTaxonomy,xj as buildRoleScopes,HT as buildStreamParamsConfigSchema,pn as buildVideoArgs,sb as buttonCapability,ub as cameraCredentialsCapability,hc as cameraPipelineConfigCapability,Uc as cameraStreamsCapability,Kj as canConvertUnit,sr as canonicalEgressPlan,fb as carbonMonoxideCapability,SM as cellsToRects,Da as classifyBearerPrincipal,Gr as classifyStream,Wr as classifyStreams,hb as climateControlCapability,CA as clusterModelSettingKey,PA as clusterStepSettingFieldsFor,NA as clusterStepSettingKey,ve as collectHydratedFieldEntries,be as collectHydratedFieldValues,bb as colorCapability,Gf as colorForKind,gM as commitWatchdogRestart,io as compileExpression,ao as compileExpressionSafe,Br as composeSwitchedOff,Fo as conditionDepth,Pk as conditionExclusionReason,Nk as conditionVisibleForKind,Tb as connectionTestCapability,Db as connectivityCapability,Ab as consumablesCapability,Mb as contactCapability,Ib as controlCapability,Wj as convertUnit,nl as coreBlockAddonId,rl as coreBlockIdFromAddonId,ll as coreBlocksCapability,eM as cosineSimilarity,Io as countConditionLeaves,zb as coverCapability,Wt as createDeviceProxy,Oe as createDurableState,Ee as createEvent,so as createExpressionScope,er as createHwAccelCache,Vt as createLazyTrpcSource,Ht as createMirrorSource,zD as createRuntimeStateBridge,A as createSliceHandle,kO as createSystemProxy,dl as customAction,ml as customModelRegistryCapability,Sl as dataStoreProviderCapability,Gb as dayNightCapability,cD as declarationOwnerNodeId,BM as decodeVectorBase64,El as decoderCapability,Kk as defaultDeliveryForSection,$M as defaultDeviceFor,ul as defineCustomActions,ED as deriveBatteryPresence,Rr as deriveCameraSwitches,XA as deriveDetailCropRect,Ti as deriveRecordingMode,ma as describeModelVariant,Cj as detectAccessRole,Dl as detectionPipelineCapability,Xl as deviceAdoptionCapability,kM as deviceBackendToFormat,fl as deviceCustomAction,Ll as deviceDiscoveryCapability,au as deviceExportCapability,Ou as deviceManagerCapability,xD as deviceMatchesProfile,zt as deviceOpsCapability,fu as deviceProviderCapability,Tj as deviceSelectorMatches,ku as deviceStateCapability,qb as deviceStatusCapability,Xb as doorbellCapability,Fk as droppedConditionsForKind,cr as egressTranscodeSharingKey,rr as egressTransportFromRequest,Mu as embeddingEncoderCapability,mt as emitDownForOwnedCaps,De as emitReadiness,Hn as encodeProfileFromStreamShape,zM as encodeVectorBase64,$b as enumSensorCapability,iN as enumerateInferenceDevices,UD as enumerateItemArrayFields,HD as enumerateSchemaFields,Pn as errMsg,go as evaluateAst,bo as evaluateExpressionSource,hM as evaluatePoolMemory,HM as evaluateZoneRules,D as event,nx as eventEmitterCapability,ix as eventsCapability,Tt as expandCapMethods,Yc as extractNestedAddonId,Nl as extractSourceInfoFromMetadata,ux as faceGalleryCapability,px as fanControlCapability,hx as featureProbeCapability,Fu as filesystemBrowseCapability,Qi as findTimezone,_x as floodCapability,FM as formatForBackend,IM as formatForRuntime,yx as gasCapability,Uo as generateAutomationBlock,Rf as getAudioMacroClassIds,kD as getByPath,SO as getCapsByProviderKind,Wf as getTaxonomyEntry,hD as hasMotionTrigger,rM as hfModelUrl,lk as htmlToText,xx as humidifierCapability,Cx as humiditySensorCapability,Se as hydrateSchema,Tx as imageCapability,Px as imageSettingsCapability,uM as initialPoolMemoryState,Ux as integrationsCapability,qx as intercomCapability,En as invocationFromEncodeProfile,_r as isAgentOnlyPlacement,Kc as isArrayOutputSchema,JO as isAudioLabelSelected,zk as isAudioRule,ok as isBaseConditionKey,DD as isBatteryPresenceFault,wA as isClusterScopedStep,qc as isCollectionArrayMethod,gr as isDeployableToAgent,jf as isDetectionMacroClass,Dt as isDeviceConfigCap,Kt as isDeviceScopedCap,Te as isEvent,xr as isIsolatedBuiltin,yD as isNode,Gc as isObjectInput,Bk as isOccupancyRule,EO as isRestoredCap,$j as isSameAddonId,Qk as isScheduleActive,ln as isSoftwareDecode,jk as isSystemDelivery,Wc as isVoidInput,fy as jobKindSchema,$c as kebabToCamel,rk as knownValues,Zx as lawnMowerControlCapability,yy as lifecycleJobSchema,vy as lifecycleJobScopeSchema,_y as lifecycleJobStateSchema,gy as lifecycleTaskSchema,fd as llmCapability,$u as llmRuntimeCapability,lS as localNetworkCapability,Yj as locationSimilarity,fS as lockControlCapability,cn as logBannerArgs,hd as logDestinationCapability,$r as logLevelAtMost,xd as loginMethodCapability,Jc as looseSchema,Ge as makeProfileBrokerId,Ke as makeSourceBrokerId,Lf as mapAudioLabelToMacro,pk as markdownToHtmlLite,sk as markdownToText,oM as maskUrlCredentials,_S as mediaPlayerCapability,Al as mergeSourceInfo,xS as meshNetworkCapability,E as method,wa as methodAccessForHttpMethod,Bd as metricsProviderCapability,Hd as modelConvertCapability,Gd as modelDistributorCapability,eN as modelFormatForRuntime,wS as motionCapability,Jd as motionDetectionCapability,DS as motionTriggerCapability,MS as motionZonesCapability,sf as mqttBrokerCapability,LS as nativeObjectDetectionCapability,df as networkAccessCapability,VS as networkQualityCapability,gt as nodePin,rC as nodesCapability,Ie as normalizeAddonInitResult,Z as normalizeAudioLabel,jj as normalizeTokenScopes,jl as normalizeUnit,Df as notificationOutputCapability,mm as notificationRulesCapability,uC as notifierCapability,fC as numericSensorCapability,Em as oauthIntegrationCapability,Xc as objectInputDeclaresAddonId,vC as osdCapability,EC as osdManagerCapability,zA as overlayClusterStepSettings,Yr as parseCameraStreamConfig,to as parseExpression,tn as parseJsonArray,en as parseJsonObject,Jt as parseJsonUnknown,lM as parseProcStatus,qe as parseProfileBrokerId,Rk as parseRuleSection,UT as parseStreamParamsFormPatch,KO as patchAudio,MC as petFeederCapability,_D as pickAccessoryControl,kA as pickClusterStepModels,RA as pickClusterStepSettings,qA as pickDetailCropConvention,vj as pickNativeLeaseOverride,$i as pickPreferredRtspEntry,vM as pickRestartCandidate,wn as pickVideoEncoder,nk as pickerForCondition,Gh as pipelineAnalyticsCapability,Sg as pipelineExecutorCapability,F_ as pipelineOrchestratorCapability,Qg as pipelineRunnerCapability,RC as plateGalleryCapability,ew as platformProbeCapability,pM as poolMemoryThreshold,nw as powerMeterCapability,bk as prepareNotification,aw as presenceCapability,sw as pressureSensorCapability,Oa as principalMayReachAddon,pw as privacyMaskCapability,Qc as procedureAuthKey,Tw as ptzAutotrackCapability,bw as ptzCapability,LM as pythonScriptForBackend,DA as readClusterStepModels,IA as readClusterStepSettings,GA as readDetailCropConvention,qE as readDeviceStateFrom,hj as readNativeLeaseOverride,vt as readNodePin,bA as readTimelapseGeneratedAt,lt as readinessKey,Ew as rebootCapability,Uw as recordingCapability,tT as recordingExportCapability,xM as rectsToCells,RM as requiresPython,_M as resetPoolBaseline,hr as resolveAddonExecution,vr as resolveAddonGroup,br as resolveAddonPlacement,PM as resolveAddonRuntime,bt as resolveCapMount,AA as resolveClusterStepModelId,MM as resolveDetectionRuntime,pD as resolveDeviceControlKind,wD as resolveDeviceProfile,nr as resolveEgressDecodeHwAccel,hk as resolveFormat,xe as resolveHydratedFieldValue,NM as resolveModelFormat,bD as resolveMutate,cM as resolvePoolMemoryPolicy,Di as resolveRecordingProfiles,yr as resolveRunnerId,Ci as resolveScrubThumbnailGeometry,pa as resolveVariantModelId,Aj as resolveViewableDeviceIds,bj as roleSpec,Yk as ruleEditorSectionsForKind,Mk as ruleKindOf,kk as ruleKindSpec,Vk as ruleMatchesSection,Lk as ruleSection,Hk as ruleSectionOf,Gk as ruleSeedForSection,wM as runInferenceStep,QM as runtimeDevices,wO as runtimeStatePolicyFor,ST as sceneMonitorCapability,Oj as scopeInherits,T as scopeKey,Ea as scopesAllowAddon,Ta as scopesAllowDeviceCap,tN as scoreRuntimes,DT as scriptRunnerCapability,Je as selectAssignedProfileSlots,Z_ as serverManagementCapability,AD as setByPath,bl as settingsStoreCapability,nn as sleep,rn as sleepCancellable,kT as smokeCapability,nv as smtpProviderCapability,av as snapshotCapability,sv as ssoBridgeCapability,FD as startReachabilityPoll,JE as stateVocabularyFor,lv as storageCapability,fv as storageEvictableCapability,pv as storageMigrationCapability,Tv as storageProviderCapability,Rc as streamBrokerCapability,MT as streamCatalogCapability,zT as streamParamsCapability,Ur as streamPixels,Hr as streamQualityLabel,Kf as subKindsOf,mw as summarisePrivacyAudio,Ij as summarizeEffectiveScope,ZM as supportedRuntimes,GT as switchCapability,zr as switchedOffIds,kl as synthesizeSourceInfo,$T as systemCapability,eA as systemEventFilterApplies,tA as systemEventFilterAppliesToAnyKind,tE as tamperCapability,hy as taskLogEntrySchema,py as taskPhaseSchema,my as taskTargetSchema,rE as temperatureSensorCapability,Mv as terminalSessionCapability,fk as textToHtml,aD as toDeviceSummary,vo as toExpressionValue,_t as toNodeId,Kr as toStreamSourceEntry,aE as toastCapability,YO as toggleAudioLabel,Ja as tokenize,gk as transcodeBody,Gj as tryConvertUnit,Pv as turnProviderCapability,Vj as unitDimension,qj as unitsForDimension,sE as updateCapability,bE as userManagementCapability,Iv as userPasskeysCapability,wE as vacuumControlCapability,yo as validateExpressionSource,Ro as validateRecipeBounds,DE as valveCapability,VM as vectorDimFromBase64,ey as vectorStoreCapability,kE as vibrationCapability,ay as videoclipsCapability,Ft as viewerUiCapability,jE as waterHeaterCapability,NE as weatherCapability,oy as webrtcClientHintsSchema,ly as webrtcSessionCapability,dr as wiringAddonHealthSchema,pr as wiringHealthSnapshotSchema,fr as wiringNodeHealthSchema,lr as wiringProbeKindSchema,ur as wiringProbeResultSchema,tO as zodEntriesToConfigUI,VE as zoneAnalyticsCapability,UE as zoneRulesCapability,kg as zonesCapability};
|